diff --git a/asset-manifest.json b/asset-manifest.json deleted file mode 100644 index 83729637..00000000 --- a/asset-manifest.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "files": { - "main.js": "/dooboo-ui/static/js/main.008bb478.js", - "static/js/44.02438977.chunk.js": "/dooboo-ui/static/js/44.02438977.chunk.js", - "static/js/101.86506b9e.js": "/dooboo-ui/static/js/101.86506b9e.js", - "static/media/Pretendard-Bold.otf": "/dooboo-ui/static/media/Pretendard-Bold.3ec32cdae5bc0c0026a6.otf", - "static/media/Pretendard-Regular.otf": "/dooboo-ui/static/media/Pretendard-Regular.de88013f2ea98a04dede.otf", - "static/media/Pretendard-Thin.otf": "/dooboo-ui/static/media/Pretendard-Thin.6c732c788300615e6a65.otf", - "static/media/doobooui.ttf": "/dooboo-ui/static/media/doobooui.39a1ca6a9fbb40dd5cb1.ttf", - "static/media/MaterialCommunityIcons.ttf": "/dooboo-ui/static/media/MaterialCommunityIcons.5d42b4e60858731e7b65.ttf", - "static/media/Fontisto.ttf": "/dooboo-ui/static/media/Fontisto.c0edd68811e0237502fe.ttf", - "static/media/Ionicons.ttf": "/dooboo-ui/static/media/Ionicons.3517aeaa34b2f8cd8eef.ttf", - "static/media/MaterialIcons.ttf": "/dooboo-ui/static/media/MaterialIcons.120b4c7bbd155bd0a04d.ttf", - "static/media/FontAwesome5_Solid.ttf": "/dooboo-ui/static/media/FontAwesome5_Solid.07c3313b24f7b1ca85ee.ttf", - "static/media/FontAwesome.ttf": "/dooboo-ui/static/media/FontAwesome.1e59d2330b4c6deb84b3.ttf", - "static/media/FontAwesome5_Brands.ttf": "/dooboo-ui/static/media/FontAwesome5_Brands.9e138496e8f1719c6ebf.ttf", - "static/media/AntDesign.ttf": "/dooboo-ui/static/media/AntDesign.163adab9dbd7cb1ed12a.ttf", - "static/media/Entypo.ttf": "/dooboo-ui/static/media/Entypo.fc6169344c041cffcdae.ttf", - "static/media/Foundation.ttf": "/dooboo-ui/static/media/Foundation.c0cbb004854f9c746f89.ttf", - "static/media/Feather.ttf": "/dooboo-ui/static/media/Feather.0f5d9cede2e831f3fc80.ttf", - "static/media/SimpleLineIcons.ttf": "/dooboo-ui/static/media/SimpleLineIcons.3ec13a24af3fdda11107.ttf", - "static/media/Octicons.ttf": "/dooboo-ui/static/media/Octicons.6b742a230954dc640ba2.ttf", - "static/media/FontAwesome5_Regular.ttf": "/dooboo-ui/static/media/FontAwesome5_Regular.1017bce89c72f95bcf8e.ttf", - "static/media/Zocial.ttf": "/dooboo-ui/static/media/Zocial.07fea2ac49bcc67d9a6b.ttf", - "static/media/magnifier.png": "/dooboo-ui/static/media/magnifier.9f82873e7319c21df14c.png", - "static/media/color-circle.png": "/dooboo-ui/static/media/color-circle.aeee73f0894698b72020.png", - "static/media/hsv_triangle_mask.png": "/dooboo-ui/static/media/hsv_triangle_mask.cd409b9d9ff9690858ea.png", - "favicon.ico": "/dooboo-ui/favicon.ico", - "static/media/EvilIcons.ttf": "/dooboo-ui/static/media/EvilIcons.699664b33ac2837d5bee.ttf", - "static/media/mask.png": "/dooboo-ui/static/media/mask.7a74ac5a507b3a005a29.png", - "index.html": "/dooboo-ui/index.html", - "static/media/placeholder_dark.png": "/dooboo-ui/static/media/placeholder_dark.168ee04933a1df8a6913.png", - "static/media/placeholder_light.png": "/dooboo-ui/static/media/placeholder_light.47e6070ae07c31afeb38.png", - "static/media/google.png": "/dooboo-ui/static/media/google.3825992ff5f176bd2318.png", - "favicon-32.png": "/dooboo-ui/favicon-32.png", - "static/media/facebook.png": "/dooboo-ui/static/media/facebook.5466c53753af6b4411bb.png", - "favicon-16.png": "/dooboo-ui/favicon-16.png", - "static/media/ic_delete.png": "/dooboo-ui/static/media/ic_delete.7d8b16b3349241350746.png", - "static/media/ic_edit.png": "/dooboo-ui/static/media/ic_edit.2206248b83b4b215ea3f.png", - "serve.json": "/dooboo-ui/serve.json", - "static/media/ic_arr_down.png": "/dooboo-ui/static/media/ic_arr_down.cad392c3611d531d19dc.png", - "manifest.json": "/dooboo-ui/manifest.json", - "static/media/ic_arr_up.png": "/dooboo-ui/static/media/ic_arr_up.caac537439d5de9094b4.png", - "main.008bb478.js.map": "/dooboo-ui/static/js/main.008bb478.js.map", - "44.02438977.chunk.js.map": "/dooboo-ui/static/js/44.02438977.chunk.js.map", - "101.86506b9e.js.map": "/dooboo-ui/static/js/101.86506b9e.js.map" - }, - "entrypoints": [ - "static/js/101.86506b9e.js", - "static/js/main.008bb478.js" - ] -} \ No newline at end of file diff --git a/favicon-16.png b/favicon-16.png deleted file mode 100644 index f14b804f..00000000 Binary files a/favicon-16.png and /dev/null differ diff --git a/favicon-32.png b/favicon-32.png deleted file mode 100644 index caea45fd..00000000 Binary files a/favicon-32.png and /dev/null differ diff --git a/favicon.ico b/favicon.ico deleted file mode 100644 index 4b50d38f..00000000 Binary files a/favicon.ico and /dev/null differ diff --git a/index.html b/index.html deleted file mode 100644 index 427b2680..00000000 --- a/index.html +++ /dev/null @@ -1 +0,0 @@ -dooboo-ui
\ No newline at end of file diff --git a/manifest.json b/manifest.json deleted file mode 100644 index 4448c662..00000000 --- a/manifest.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "background_color": "#ffffff", - "display": "standalone", - "lang": "en", - "name": "dooboo-ui", - "short_name": "dooboo-ui", - "start_url": "/?utm_source=web_app_manifest" -} \ No newline at end of file diff --git a/pwa/apple-touch-icon/apple-touch-icon-180.png b/pwa/apple-touch-icon/apple-touch-icon-180.png deleted file mode 100644 index d26df06d..00000000 Binary files a/pwa/apple-touch-icon/apple-touch-icon-180.png and /dev/null differ diff --git a/pwa/apple-touch-startup-image/apple-touch-startup-image-1125x2436.png b/pwa/apple-touch-startup-image/apple-touch-startup-image-1125x2436.png deleted file mode 100644 index bab2255e..00000000 Binary files a/pwa/apple-touch-startup-image/apple-touch-startup-image-1125x2436.png and /dev/null differ diff --git a/pwa/apple-touch-startup-image/apple-touch-startup-image-1242x2208.png b/pwa/apple-touch-startup-image/apple-touch-startup-image-1242x2208.png deleted file mode 100644 index 45dedb72..00000000 Binary files a/pwa/apple-touch-startup-image/apple-touch-startup-image-1242x2208.png and /dev/null differ diff --git a/pwa/apple-touch-startup-image/apple-touch-startup-image-1242x2688.png b/pwa/apple-touch-startup-image/apple-touch-startup-image-1242x2688.png deleted file mode 100644 index 6182521e..00000000 Binary files a/pwa/apple-touch-startup-image/apple-touch-startup-image-1242x2688.png and /dev/null differ diff --git a/pwa/apple-touch-startup-image/apple-touch-startup-image-1536x2048.png b/pwa/apple-touch-startup-image/apple-touch-startup-image-1536x2048.png deleted file mode 100644 index 4823207f..00000000 Binary files a/pwa/apple-touch-startup-image/apple-touch-startup-image-1536x2048.png and /dev/null differ diff --git a/pwa/apple-touch-startup-image/apple-touch-startup-image-1668x2224.png b/pwa/apple-touch-startup-image/apple-touch-startup-image-1668x2224.png deleted file mode 100644 index 23ba5b68..00000000 Binary files a/pwa/apple-touch-startup-image/apple-touch-startup-image-1668x2224.png and /dev/null differ diff --git a/pwa/apple-touch-startup-image/apple-touch-startup-image-1668x2388.png b/pwa/apple-touch-startup-image/apple-touch-startup-image-1668x2388.png deleted file mode 100644 index f6a57089..00000000 Binary files a/pwa/apple-touch-startup-image/apple-touch-startup-image-1668x2388.png and /dev/null differ diff --git a/pwa/apple-touch-startup-image/apple-touch-startup-image-2048x2732.png b/pwa/apple-touch-startup-image/apple-touch-startup-image-2048x2732.png deleted file mode 100644 index 96103569..00000000 Binary files a/pwa/apple-touch-startup-image/apple-touch-startup-image-2048x2732.png and /dev/null differ diff --git a/pwa/apple-touch-startup-image/apple-touch-startup-image-640x1136.png b/pwa/apple-touch-startup-image/apple-touch-startup-image-640x1136.png deleted file mode 100644 index 92a74913..00000000 Binary files a/pwa/apple-touch-startup-image/apple-touch-startup-image-640x1136.png and /dev/null differ diff --git a/pwa/apple-touch-startup-image/apple-touch-startup-image-750x1334.png b/pwa/apple-touch-startup-image/apple-touch-startup-image-750x1334.png deleted file mode 100644 index 888714ed..00000000 Binary files a/pwa/apple-touch-startup-image/apple-touch-startup-image-750x1334.png and /dev/null differ diff --git a/pwa/apple-touch-startup-image/apple-touch-startup-image-828x1792.png b/pwa/apple-touch-startup-image/apple-touch-startup-image-828x1792.png deleted file mode 100644 index 1a514b92..00000000 Binary files a/pwa/apple-touch-startup-image/apple-touch-startup-image-828x1792.png and /dev/null differ diff --git a/serve.json b/serve.json deleted file mode 100644 index f6258590..00000000 --- a/serve.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "headers": [ - { - "source": "static/**/*.js", - "headers": [ - { - "key": "Cache-Control", - "value": "public, max-age=31536000, immutable" - } - ] - } - ] -} diff --git a/static/js/101.86506b9e.js b/static/js/101.86506b9e.js deleted file mode 100644 index 255330c5..00000000 --- a/static/js/101.86506b9e.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see 101.86506b9e.js.LICENSE.txt */ -(self.webpackChunkweb=self.webpackChunkweb||[]).push([[101],{68902:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.ThemeProvider=function(e){var t=e.children,r=e.initialThemeType,n=e.customTheme,a=void 0===n?{}:n,s=e.responsiveDesignMode,c=void 0===s?"mobile-first":s,p=(0,l.useMediaQuery)({orientation:"portrait"}),m=(0,l.useMediaQuery)("mobile-first"===c?{minWidth:0}:{minWidth:0,maxWidth:767}),v=(0,l.useMediaQuery)("mobile-first"===c?{minWidth:767}:{minWidth:768,maxWidth:992}),g=(0,l.useMediaQuery)("mobile-first"===c?{minWidth:992}:{minWidth:0}),w=(0,f.useDebouncedColorScheme)(),k=(0,i.useState)(null!=r?r:w),_=(0,o.default)(k,2),O=_[0],S=_[1];(0,i.useEffect)((function(){r||S(w)}),[w,r]);var E={light:b("light",a),dark:b("dark",a)}[O||"light"],x={isPortrait:p,isMobile:m,isTablet:v,isDesktop:g};return(0,d.jsx)(y,{value:{media:x,themeType:O,changeThemeType:function(e){S(e||("light"===O?"dark":"light"))},theme:E},children:(0,d.jsx)(u.ThemeProvider,{theme:h(h({},E),x),children:t})})},t.useTheme=void 0,Object.defineProperty(t,"withTheme",{enumerable:!0,get:function(){return u.withTheme}});var a=n(r(93709)),o=n(r(69133));r(62389);var i=r(21939),l=r(17466),u=r(90549),s=r(99181),c=n(r(36072)),f=r(58683),d=r(75054);function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.light=t.dark=void 0;t.light={bg:{basic:"#FFFFFF",paper:"#EDEDED",disabled:"#BEBEBE"},role:{primary:"#1B1B1B",secondary:"#3D8BFF",accent:"#6BF3C5",info:"#307EF1",link:"#A351F4",success:"#1CD66C",warning:"#E2B101",danger:"#F84444",border:"#CCCCCC",underlay:"rgba(0, 0, 0, 0.16)",underlayContrast:"rgba(0, 0, 0, 0.8)"},text:{basic:"#000000",label:"#4D4D4D",placeholder:"#787878",disabled:"#BEBEBE",validation:"#DA0000",contrast:"#FFFFFF"},button:{primary:{bg:"#1B1B1B",text:"#FFFFFF"},secondary:{bg:"#3D8BFF",text:"#FFFFFF"},success:{bg:"#1CD66C",text:"#FFFFFF"},danger:{bg:"#F84444",text:"#FFFFFF"},warning:{bg:"#E2B101",text:"#FFFFFF"},info:{bg:"#307EF1",text:"#FFFFFF"},light:{bg:"#E8E8E8",text:"#232323"},disabled:{bg:"#EDEDED",text:"#BEBEBE"}}};t.dark={bg:{basic:"#242424",paper:"#1E1D1D",disabled:"#474747"},role:{primary:"#FFFFFF",secondary:"#3D8BFF",accent:"#6BF3C5",info:"#2998FF",link:"#A351F4",success:"#2FFA86",warning:"#F4CC3E",danger:"#FF3C3C",border:"#363636",underlay:"rgba(255, 255, 255, 0.16)",underlayContrast:"rgba(255, 255, 255, 0.8)"},text:{basic:"#FFFFFF",label:"#BEBEBE",placeholder:"#909090",disabled:"#4D4D4D",validation:"#FF2C2C",contrast:"#000000"},button:{primary:{bg:"#FFFFFF",text:"#000000"},secondary:{bg:"#3D8BFF",text:"#000000"},success:{bg:"#2FFA86",text:"#000000"},danger:{bg:"#FF3C3C",text:"#000000"},warning:{bg:"#F4CC3E",text:"#000000"},info:{bg:"#2998FF",text:"#000000"},light:{bg:"#313131",text:"#EBEBEB"},disabled:{bg:"#292929",text:"#474747"}}}},36072:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(21939));var o=function(){var e=a.default.createContext(void 0);return[function(){var t=a.default.useContext(e);if(!t)throw new Error("useTheme must be inside a ThemeProvider");return t},e.Provider]};t.default=o},64290:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={DoobooTheme:!0,DoobooThemeParams:!0,ThemeType:!0,dark:!0,light:!0};Object.defineProperty(t,"DoobooTheme",{enumerable:!0,get:function(){return o.DoobooTheme}}),Object.defineProperty(t,"DoobooThemeParams",{enumerable:!0,get:function(){return o.DoobooThemeParams}}),Object.defineProperty(t,"ThemeType",{enumerable:!0,get:function(){return o.ThemeType}}),Object.defineProperty(t,"dark",{enumerable:!0,get:function(){return o.dark}}),Object.defineProperty(t,"light",{enumerable:!0,get:function(){return o.light}});var a=r(68902);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var o=r(99181)},58683:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.useDebouncedColorScheme=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;return function(e,t){var r=(0,o.useState)(e),n=(0,a.default)(r,2),i=n[0],l=n[1];return(0,o.useEffect)((function(){var r=setTimeout((function(){return l(e)}),t||500);return function(){clearTimeout(r)}}),[e,t]),i}((0,i.default)(),e)};var a=n(r(69133)),o=r(21939),i=n(r(14286))},61327:(e,t)=>{"use strict";function r(){return r=Object.assign||function(e){for(var t=1;t-1}var G=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===v&&(e=this.compute()),m&&this.manager.element.style&&_[e]&&(this.manager.element.style[h]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return z(this.manager.recognizers,(function(t){W(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(U(e,b))return b;var t=U(e,w),r=U(e,k);return t&&r?b:t||r?t?w:k:U(e,y)?y:g}(e.join(" "))},t.preventDefaults=function(e){var t=e.srcEvent,r=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var n=this.actions,a=U(n,b)&&!_[b],o=U(n,k)&&!_[k],i=U(n,w)&&!_[w];if(a){var l=1===e.pointers.length,u=e.distance<2,s=e.deltaTime<250;if(l&&u&&s)return}if(!i||!o)return a||o&&r&F||i&&r&V?this.preventSrc(t):void 0}},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function q(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function Y(e){var t=e.length;if(1===t)return{x:c(e[0].clientX),y:c(e[0].clientY)};for(var r=0,n=0,a=0;a=f(t)?e<0?M:I:t<0?D:N}function Q(e,t,r){return{x:t/e||0,y:r/e||0}}function Z(e,t){var r=e.session,n=t.pointers,a=n.length;r.firstInput||(r.firstInput=X(t)),a>1&&!r.firstMultiple?r.firstMultiple=X(t):1===a&&(r.firstMultiple=!1);var o=r.firstInput,i=r.firstMultiple,l=i?i.center:o.center,u=t.center=Y(n);t.timeStamp=d(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=$(l,u),t.distance=K(l,u),function(e,t){var r=t.center,n=e.offsetDelta||{},a=e.prevDelta||{},o=e.prevInput||{};t.eventType!==T&&o.eventType!==j||(a=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},n=e.offsetDelta={x:r.x,y:r.y}),t.deltaX=a.x+(r.x-n.x),t.deltaY=a.y+(r.y-n.y)}(r,t),t.offsetDirection=J(t.deltaX,t.deltaY);var s,c,p=Q(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=p.x,t.overallVelocityY=p.y,t.overallVelocity=f(p.x)>f(p.y)?p.x:p.y,t.scale=i?(s=i.pointers,K((c=n)[0],c[1],B)/K(s[0],s[1],B)):1,t.rotation=i?function(e,t){return $(t[1],t[0],B)+$(e[1],e[0],B)}(i.pointers,n):0,t.maxPointers=r.prevInput?t.pointers.length>r.prevInput.maxPointers?t.pointers.length:r.prevInput.maxPointers:t.pointers.length,function(e,t){var r,n,a,o,i=e.lastInterval||t,l=t.timeStamp-i.timeStamp;if(t.eventType!==C&&(l>A||void 0===i.velocity)){var u=t.deltaX-i.deltaX,s=t.deltaY-i.deltaY,c=Q(l,u,s);n=c.x,a=c.y,r=f(c.x)>f(c.y)?c.x:c.y,o=J(u,s),e.lastInterval=t}else r=i.velocity,n=i.velocityX,a=i.velocityY,o=i.direction;t.velocity=r,t.velocityX=n,t.velocityY=a,t.direction=o}(r,t);var h,m=e.element,v=t.srcEvent;q(h=v.composedPath?v.composedPath()[0]:v.path?v.path[0]:v.target,m)&&(m=h),t.target=m}function ee(e,t,r){var n=r.pointers.length,a=r.changedPointers.length,o=t&T&&n-a===0,i=t&(j|C)&&n-a===0;r.isFirst=!!o,r.isFinal=!!i,o&&(e.session={}),r.eventType=t,Z(e,r),e.emit("hammer.input",r),e.recognize(r),e.session.prevInput=r}function te(e){return e.trim().split(/\s+/g)}function re(e,t,r){z(te(t),(function(t){e.addEventListener(t,r,!1)}))}function ne(e,t,r){z(te(t),(function(t){e.removeEventListener(t,r,!1)}))}function ae(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}t.TouchAction=G;var oe=function(){function e(e,t){var r=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){W(e.options.enable,[e])&&r.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&re(this.element,this.evEl,this.domHandler),this.evTarget&&re(this.target,this.evTarget,this.domHandler),this.evWin&&re(ae(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&ne(this.element,this.evEl,this.domHandler),this.evTarget&&ne(this.target,this.evTarget,this.domHandler),this.evWin&&ne(ae(this.element),this.evWin,this.domHandler)},e}();function ie(e,t,r){if(e.indexOf&&!r)return e.indexOf(t);for(var n=0;nr[t]})):n.sort()),n}t.PointerEventInput=fe;var he={touchstart:T,touchmove:2,touchend:j,touchcancel:C},me=function(e){function t(){var r;return t.prototype.evTarget="touchstart touchmove touchend touchcancel",(r=e.apply(this,arguments)||this).targetIds={},r}return n(t,e),t.prototype.handler=function(e){var t=he[e.type],r=ve.call(this,e,t);r&&this.callback(this.manager,t,{pointers:r[0],changedPointers:r[1],pointerType:x,srcEvent:e})},t}(oe);function ve(e,t){var r,n,a=de(e.touches),o=this.targetIds;if(t&(2|T)&&1===a.length)return o[a[0].identifier]=!0,[a,a];var i=de(e.changedTouches),l=[],u=this.target;if(n=a.filter((function(e){return q(e.target,u)})),t===T)for(r=0;r-1&&n.splice(e,1)}),be)}}function ke(e,t){e&T?(this.primaryTouch=t.changedPointers[0].identifier,we.call(this,t)):e&(j|C)&&we.call(this,t)}function _e(e){for(var t=e.srcEvent.clientX,r=e.srcEvent.clientY,n=0;n-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,r=this.state;function n(r){t.manager.emit(r,e)}r<8&&n(t.options.event+Te(r)),n(t.options.event),e.additionalEvent&&n(e.additionalEvent),r>=8&&n(t.options.event+Te(r))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=xe},t.canEmit=function(){for(var e=0;et.threshold&&a&t.direction},a.attrTest=function(e){return Re.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},a.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var r=Me(t.direction);r&&(t.additionalEvent=this.options.event+r),e.prototype.emit.call(this,t)},t}(Re);t.Pan=Ie;var De=function(e){function t(t){return void 0===t&&(t={}),e.call(this,r({event:"swipe",threshold:10,velocity:.3,direction:F|V,pointers:1},t))||this}n(t,e);var a=t.prototype;return a.getTouchAction=function(){return Ie.prototype.getTouchAction.call(this)},a.attrTest=function(t){var r,n=this.options.direction;return n&(F|V)?r=t.overallVelocity:n&F?r=t.overallVelocityX:n&V&&(r=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&f(r)>this.options.velocity&&t.eventType&j},a.emit=function(e){var t=Me(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(Re);t.Swipe=De;var Ne=function(e){function t(t){return void 0===t&&(t={}),e.call(this,r({event:"pinch",threshold:0,pointers:2},t))||this}n(t,e);var a=t.prototype;return a.getTouchAction=function(){return[b]},a.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},a.emit=function(t){if(1!==t.scale){var r=t.scale<1?"in":"out";t.additionalEvent=this.options.event+r}e.prototype.emit.call(this,t)},t}(Re);t.Pinch=Ne;var Fe=function(e){function t(t){return void 0===t&&(t={}),e.call(this,r({event:"rotate",threshold:0,pointers:2},t))||this}n(t,e);var a=t.prototype;return a.getTouchAction=function(){return[b]},a.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)},t}(Re);t.Rotate=Fe;var Ve=function(e){function t(t){var n;return void 0===t&&(t={}),(n=e.call(this,r({event:"press",pointers:1,time:251,threshold:9},t))||this)._timer=null,n._input=null,n}n(t,e);var a=t.prototype;return a.getTouchAction=function(){return[g]},a.process=function(e){var t=this,r=this.options,n=e.pointers.length===r.pointers,a=e.distancer.time;if(this._input=e,!a||!n||e.eventType&(j|C)&&!o)this.reset();else if(e.eventType&T)this.reset(),this._timer=setTimeout((function(){t.state=8,t.tryEmit()}),r.time);else if(e.eventType&j)return 8;return xe},a.reset=function(){clearTimeout(this._timer)},a.emit=function(e){8===this.state&&(e&&e.eventType&j?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=d(),this.manager.emit(this.options.event,this._input)))},t}(je);t.Press=Ve;var Le={domEvents:!1,touchAction:v,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},He=[[Fe,{enable:!1}],[Ne,{enable:!1},["rotate"]],[De,{direction:F}],[Ie,{direction:F},["swipe"]],[Ce],[Ce,{event:"doubletap",taps:2},["tap"]],[Ve]];function Be(e,t){var r,n=e.element;n.style&&(z(e.options.cssProps,(function(a,o){r=p(n.style,o),t?(e.oldCssProps[r]=n.style[r],n.style[r]=a):n.style[r]=e.oldCssProps[r]||""})),t||(e.oldCssProps={}))}var ze=function(){function e(e,t){var r,n=this;this.options=o({},Le,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((r=this).options.inputClass||(S?fe:E?me:O?Oe:ye))(r,ee),this.touchAction=new G(this,this.options.touchAction),Be(this,!0),z(this.options.recognizers,(function(e){var t=n.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}var t=e.prototype;return t.set=function(e){return o(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?2:1},t.recognize=function(e){var t=this.session;if(!t.stopped){var r;this.touchAction.preventDefaults(e);var n=this.recognizers,a=t.curRecognizer;(!a||a&&8&a.state)&&(t.curRecognizer=null,a=null);for(var o=0;o\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",a=window.console&&(window.console.warn||window.console.log);return a&&a.call(window.console,n,r),e.apply(this,arguments)}}t.SingleTouchInput=Ue;var Ye=qe((function(e,t,r){for(var n=Object.keys(t),a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}},74938:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.css=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==typeof e&&"function"!==typeof e)return{default:e};var r=l(t);if(r&&r.has(e))return r.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=a?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(31827)),o=n(r(69261)),i=r(40791);function l(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(l=function(e){return e?r:t})(e)}var u=(0,i.createStyled)(o.default),s=(0,i.createCss)(a.StyleSheet);t.css=s;var c=["ActivityIndicator","Button","DatePickerIOS","DrawerLayoutAndroid","FlatList","Image","ImageBackground","KeyboardAvoidingView","ListView","Modal","NavigatorIOS","Picker","PickerIOS","Pressable","ProgressBarAndroid","ProgressViewIOS","RecyclerViewBackedScrollView","RefreshControl","SafeAreaView","ScrollView","SectionList","SegmentedControlIOS","Slider","SnapshotViewIOS","StatusBar","SwipeableListView","Switch","SwitchIOS","TabBarIOS","Text","TextInput","ToolbarAndroid","TouchableHighlight","TouchableNativeFeedback","TouchableOpacity","TouchableWithoutFeedback","View","ViewPagerAndroid"].reduce((function(e,t){return Object.defineProperty(e,t,{enumerable:!0,configurable:!1,get:function(){return u(a[t])}})}),u);t.default=c},40791:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.createCss=h,t.createStyled=function(e,t){var r=(void 0===t?{}:t).getShouldForwardProp,n=void 0===r?function(){return y}:r,a=h(e);return function e(t,r){var o=r&&r.shouldForwardProp?r.shouldForwardProp:void 0,u=o||n(t),c=!u("as");return function(){for(var r,f=arguments.length,d=new Array(f),p=0;p{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(25625));t.default=function(e,t){return(0,a.default)(e,t)}},33513:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.a=t._=t.T=t.E=t.C=void 0,t.b=function(e){var t=e.displayName||e.name||"Component",r=o.forwardRef((function(t,r){var n=o.useContext(y);return o.createElement(e,(0,l.default)({theme:n,ref:r},t))}));return r.displayName="WithTheme("+t+")",(0,s.default)(r,e)},t.w=t.u=t.i=t.h=t.c=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==typeof e&&"function"!==typeof e)return{default:e};var r=p(t);if(r&&r.has(e))return r.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=a?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(21939)),o=a,i=n(r(49558)),l=n(r(62492)),u=n(r(64693)),s=n(r(76587)),c=r(44145),f=r(28570),d=r(54943);function p(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(p=function(e){return e?r:t})(e)}t.i=true;var h={}.hasOwnProperty;t.h=h;var m=o.createContext("undefined"!==typeof HTMLElement?(0,i.default)({key:"css"}):null);var v=m.Provider;t.C=v;t._=function(){return(0,a.useContext)(m)};var g=function(e){return(0,a.forwardRef)((function(t,r){var n=(0,a.useContext)(m);return e(t,n,r)}))};t.w=g;var y=o.createContext({});t.T=y;t.u=function(){return o.useContext(y)};var b=(0,u.default)((function(e){return(0,u.default)((function(t){return function(e,t){return"function"===typeof t?t(e):(0,l.default)({},e,t)}(e,t)}))}));t.a=function(e){var t=o.useContext(y);return e.theme!==t&&(t=b(t)(e.theme)),o.createElement(y.Provider,{value:t},e.children)};new Set(["renderWithHooks","processChild","finishClassComponent","renderToString"]);var w="__EMOTION_TYPE_PLEASE_DO_NOT_USE__";t.c=function(e,t){var r={};for(var n in t)h.call(t,n)&&(r[n]=t[n]);return r[w]=e,r};var k=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return(0,c.registerStyles)(t,r,n),(0,d.useInsertionEffectAlwaysWithSyncFallback)((function(){return(0,c.insertStyles)(t,r,n)})),null};var _=g((function(e,t,r){var n=e.css;"string"===typeof n&&void 0!==t.registered[n]&&(n=t.registered[n]);var a=e[w],i=[n],l="";"string"===typeof e.className?l=(0,c.getRegisteredStyles)(t.registered,i,e.className):null!=e.className&&(l=e.className+" ");var u=(0,f.serializeStyles)(i,void 0,o.useContext(y));l+=t.key+"-"+u.name;var s={};for(var d in e)h.call(e,d)&&"css"!==d&&d!==w&&(s[d]=e[d]);return s.ref=r,s.className=l,o.createElement(o.Fragment,null,o.createElement(k,{cache:t,serialized:u,isStringTag:"string"===typeof a}),o.createElement(a,s))}));t.E=_},90549:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"CacheProvider",{enumerable:!0,get:function(){return n.C}}),t.Global=t.ClassNames=void 0,Object.defineProperty(t,"ThemeContext",{enumerable:!0,get:function(){return n.T}}),Object.defineProperty(t,"ThemeProvider",{enumerable:!0,get:function(){return n.a}}),Object.defineProperty(t,"__unsafe_useEmotionCache",{enumerable:!0,get:function(){return n._}}),t.createElement=void 0,t.css=c,t.keyframes=t.jsx=void 0,Object.defineProperty(t,"useTheme",{enumerable:!0,get:function(){return n.u}}),Object.defineProperty(t,"withEmotionCache",{enumerable:!0,get:function(){return n.w}}),Object.defineProperty(t,"withTheme",{enumerable:!0,get:function(){return n.b}});var n=r(33513),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==typeof e&&"function"!==typeof e)return{default:e};var r=u(t);if(r&&r.has(e))return r.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=a?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(21939)),o=r(44145),i=r(54943),l=r(28570);function u(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(u=function(e){return e?r:t})(e)}r(49558),r(99227),r(64693),r(76587),r(25625);t.jsx=t.createElement=function(e,t){var r=arguments;if(null==t||!n.h.call(t,"css"))return a.createElement.apply(void 0,r);var o=r.length,i=new Array(o);i[0]=n.E,i[1]=(0,n.c)(e,t);for(var l=2;l{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Fragment=void 0,t.jsx=function(e,t,r){if(!a.h.call(t,"css"))return n.jsx(e,t,r);return n.jsx(a.E,(0,a.c)(e,t),r)},t.jsxs=function(e,t,r){if(!a.h.call(t,"css"))return n.jsxs(e,t,r);return n.jsxs(a.E,(0,a.c)(e,t),r)};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==typeof e&&"function"!==typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(n,i,l):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(74701)),a=r(33513);function o(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}r(21939),r(49558),r(99227),r(64693),r(76587),r(25625),r(44145),r(28570),r(54943);var i=n.Fragment;t.Fragment=i},49558:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(19559),a=r(99381);r(64693),r(17644);var o=function(e,t,r){for(var n=0,o=0;n=o,o=(0,a.peek)(),38===n&&12===o&&(t[r]=1),!(0,a.token)(o);)(0,a.next)();return(0,a.slice)(e,a.position)},i=function(e,t){return(0,a.dealloc)(function(e,t){var r=-1,n=44;do{switch((0,a.token)(n)){case 0:38===n&&12===(0,a.peek)()&&(t[r]=1),e[r]+=o(a.position-1,t,r);break;case 2:e[r]+=(0,a.delimit)(n);break;case 4:if(44===n){e[++r]=58===(0,a.peek)()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=(0,a.from)(n)}}while(n=(0,a.next)());return e}((0,a.alloc)(e),t))},l=new WeakMap,u=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||l.get(r))&&!n){l.set(e,!0);for(var a=[],o=i(t,a),u=r.props,s=0,c=0;s6)switch((0,a.charat)(e,t+1)){case 109:if(45!==(0,a.charat)(e,t+4))break;case 102:return(0,a.replace)(e,/(.+:)(.+)-([^]+)/,"$1"+a.WEBKIT+"$2-$3$1"+a.MOZ+(108==(0,a.charat)(e,t+3)?"$3":"$2-$3"))+e;case 115:return~(0,a.indexof)(e,"stretch")?c((0,a.replace)(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==(0,a.charat)(e,t+1))break;case 6444:switch((0,a.charat)(e,(0,a.strlen)(e)-3-(~(0,a.indexof)(e,"!important")&&10))){case 107:return(0,a.replace)(e,":",":"+a.WEBKIT)+e;case 101:return(0,a.replace)(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+a.WEBKIT+(45===(0,a.charat)(e,14)?"inline-":"")+"box$3$1"+a.WEBKIT+"$2$3$1"+a.MS+"$2box$3")+e}break;case 5936:switch((0,a.charat)(e,t+11)){case 114:return a.WEBKIT+e+a.MS+(0,a.replace)(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return a.WEBKIT+e+a.MS+(0,a.replace)(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return a.WEBKIT+e+a.MS+(0,a.replace)(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return a.WEBKIT+e+a.MS+e+e}return e}var f=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case a.DECLARATION:e.return=c(e.value,e.length);break;case a.KEYFRAMES:return(0,a.serialize)([(0,a.copy)(e,{value:(0,a.replace)(e.value,"@","@"+a.WEBKIT)})],n);case a.RULESET:if(e.length)return(0,a.combine)(e.props,(function(t){switch((0,a.match)(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return(0,a.serialize)([(0,a.copy)(e,{props:[(0,a.replace)(t,/:(read-\w+)/,":"+a.MOZ+"$1")]})],n);case"::placeholder":return(0,a.serialize)([(0,a.copy)(e,{props:[(0,a.replace)(t,/:(plac\w+)/,":"+a.WEBKIT+"input-$1")]}),(0,a.copy)(e,{props:[(0,a.replace)(t,/:(plac\w+)/,":"+a.MOZ+"$1")]}),(0,a.copy)(e,{props:[(0,a.replace)(t,/:(plac\w+)/,a.MS+"input-$1")]})],n)}return""}))}}];t.default=function(e){var t=e.key;if("css"===t){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o=e.stylisPlugins||f;var i,l,c={},d=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){for(var t,r=0,n=0,a=e.length;a>=4;++n,a-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(a){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}},28570:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.serializeStyles=void 0;var a=n(r(76308)),o=n(r(51229)),i=n(r(17644)),l=/[A-Z]|^ms/g,u=/_EMO_([^_]+?)_([^]*?)_EMO_/g,s=function(e){return 45===e.charCodeAt(1)},c=function(e){return null!=e&&"boolean"!==typeof e},f=(0,i.default)((function(e){return s(e)?e:e.replace(l,"-$&").toLowerCase()})),d=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(u,(function(e,t,r){return h={name:t,styles:r,next:h},t}))}return 1===o.default[e]||s(e)||"number"!==typeof t||0===t?t:t+"px"};function p(e,t,r){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return h={name:r.name,styles:r.styles,next:h},r.name;if(void 0!==r.styles){var n=r.next;if(void 0!==n)for(;void 0!==n;)h={name:n.name,styles:n.styles,next:h},n=n.next;return r.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StyleSheet=void 0;var r=function(){function e(e){var t=this;this._insertTag=function(e){var r;r=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,r),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},44145:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRegisteredStyles=function(e,t,r){var n="";return r.split(" ").forEach((function(r){void 0!==e[r]?t.push(e[r]+";"):n+=r+" "})),n},t.registerStyles=t.insertStyles=void 0;var r=function(e,t,r){var n=e.key+"-"+t.name;!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles)};t.registerStyles=r;t.insertStyles=function(e,t,n){r(e,t,n);var a=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+a:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}},54943:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useInsertionEffectWithLayoutFallback=t.useInsertionEffectAlwaysWithSyncFallback=void 0;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==typeof e&&"function"!==typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(n,i,l):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(21939));function a(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}var o=!!n.useInsertionEffect&&n.useInsertionEffect,i=o||function(e){return e()};t.useInsertionEffectAlwaysWithSyncFallback=i;var l=o||n.useLayoutEffect;t.useInsertionEffectWithLayoutFallback=l},64693:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){var t=new WeakMap;return function(r){if(t.has(r))return t.get(r);var n=e(r);return t.set(r,n),n}}},62389:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(65088)},65088:()=>{},19374:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(9610)),o=n(r(67142)),i=n(r(33908)),l=(0,a.default)(i.default,"anticon",o.default);t.default=l},70993:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(9610)),o=n(r(87994)),i=n(r(73918)),l=(0,a.default)(i.default,"entypo",o.default);t.default=l},73094:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(9610)),o=n(r(55349)),i=n(r(58462)),l=(0,a.default)(i.default,"evilicons",o.default);t.default=l},71755:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(9610)),o=n(r(13984)),i=n(r(26447)),l=(0,a.default)(i.default,"feather",o.default);t.default=l},98265:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(9610)),o=n(r(24679)),i=n(r(66228)),l=(0,a.default)(i.default,"FontAwesome",o.default);t.default=l},80467:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FA5Style=void 0;var a=r(35991),o=n(r(79802)),i=n(r(43753)),l={Regular:r(73542),Light:r(73542),Solid:r(72207),Brand:r(22462)};t.FA5Style={regular:"regular",light:"light",solid:"solid",brand:"brand"};var u=(0,a.createFA5iconSet)(o.default,i.default,l,!1);t.default=u},7232:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(9610)),o=n(r(84892)),i=n(r(48421)),l=(0,a.default)(i.default,"Fontisto",o.default);t.default=l},84860:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(9610)),o=n(r(12740)),i=n(r(37726)),l=(0,a.default)(i.default,"foundation",o.default);t.default=l},93536:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AntDesign",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"Entypo",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"EvilIcons",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"Feather",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"FontAwesome",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"FontAwesome5",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"Fontisto",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"Foundation",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"Ionicons",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"MaterialCommunityIcons",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"MaterialIcons",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"Octicons",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(t,"SimpleLineIcons",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(t,"Zocial",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"createIconSet",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(t,"createIconSetFromFontello",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(t,"createIconSetFromIcoMoon",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(t,"createMu",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(t,"createMultiStyleIconSet",{enumerable:!0,get:function(){return y.default}});var a=n(r(19374)),o=n(r(70993)),i=n(r(73094)),l=n(r(71755)),u=n(r(7232)),s=n(r(98265)),c=n(r(80467)),f=n(r(84860)),d=n(r(50310)),p=n(r(35704)),h=n(r(17731)),m=n(r(87130)),v=n(r(87537)),g=n(r(23410)),y=n(r(18507)),b=n(r(9610)),w=n(r(34370)),k=n(r(78718))},50310:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(9610)),o=n(r(20293)),i=n(r(21842)),l=(0,a.default)(i.default,"ionicons",o.default);t.default=l},35704:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(9610)),o=n(r(22355)),i=n(r(78774)),l=(0,a.default)(i.default,"material-community",o.default);t.default=l},17731:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(9610)),o=n(r(2564)),i=n(r(68049)),l=(0,a.default)(i.default,"material",o.default);t.default=l},87130:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(9610)),o=n(r(40976)),i=n(r(55811)),l=(0,a.default)(i.default,"octicons",o.default);t.default=l},87537:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(9610)),o=n(r(96792)),i=n(r(85719)),l=(0,a.default)(i.default,"simple-line-icons",o.default);t.default=l},23410:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(9610)),o=n(r(54857)),i=n(r(63662)),l=(0,a.default)(i.default,"zocial",o.default);t.default=l},9610:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DEFAULT_ICON_COLOR",{enumerable:!0,get:function(){return h.DEFAULT_ICON_COLOR}}),Object.defineProperty(t,"DEFAULT_ICON_SIZE",{enumerable:!0,get:function(){return h.DEFAULT_ICON_SIZE}}),t.default=function(e,t,r,n){var g,y=(0,c.default)({},t,r),w=(0,h.default)(e,t,null,n);return(g=function(e){(0,l.default)(n,e);var r=function(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,s.default)(e);if(t){var a=(0,s.default)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return(0,u.default)(this,r)}}(n);function n(){var e;return(0,o.default)(this,n),(e=r.apply(this,arguments))._mounted=!1,e.state={fontIsLoaded:f.isLoaded(t)},e}return(0,i.default)(n,[{key:"componentDidMount",value:function(){var e=(0,a.default)((function*(){this._mounted=!0,this.state.fontIsLoaded||(yield f.loadAsync(y),this._mounted&&this.setState({fontIsLoaded:!0}))}));return function(){return e.apply(this,arguments)}}()},{key:"componentWillUnmount",value:function(){this._mounted=!1}},{key:"setNativeProps",value:function(e){this._icon&&this._icon.setNativeProps(e)}},{key:"render",value:function(){var e=this;return this.state.fontIsLoaded?(0,v.jsx)(w,function(e){for(var t=1;t{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.FA5Style=void 0,t.createFA5iconSet=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=Object.keys(t),l="FontAwesome5"+(n?"Pro":"Free");function u(t,n){return{fontFamily:`${arguments.length>2&&void 0!==arguments[2]?arguments[2]:l}-${t}`,fontFile:r[t],fontStyle:a.default.select({ios:{fontWeight:n},default:{}}),glyphMap:e}}var s=u("Brand","400"),c=u("Light","100"),f=u("Regular","400"),d=u("Solid","700");return(0,o.default)({brand:s,light:c,regular:f,solid:d},{defaultStyle:"regular",fallbackFamily:function(e){for(var r=0;r{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){return(0,a.default)(e,t,r)};var a=n(r(11648))},78718:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){var n={};e.icons.forEach((function(e){e.properties.name.split(/\s*,\s*/g).forEach((function(t){n[t]=e.properties.code}))}));var o=t||e.preferences.fontPref.metadata.fontFamily;return(0,a.default)(n,o,r||`${o}.ttf`)};var a=n(r(9610))},18507:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.keys(e);if(0===r.length)throw new Error("You need to add at least one style");var n=function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"";return-1===r.indexOf(e)?d[n.defaultStyle]:t?m((0,s.default)({name:t},e,!0)):d[h((0,s.default)({},e,!0))]}function g(){return v(arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.defaultStyle).getFontFamily()}function y(){return v(arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.defaultStyle).getRawGlyphMap()}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.defaultStyle;return n.glyphValidator(e,t)}function w(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=function(e){(0,i.default)(s,e);var n=function(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,u.default)(e);if(t){var a=(0,u.default)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return(0,l.default)(this,r)}}(s);function s(){return(0,a.default)(this,s),n.apply(this,arguments)}return(0,o.default)(s,[{key:"render",value:function(){var e,n,a=m(this.props),o=(e=a,(n=t).length>0?e[n]:e),i=function(e){return Object.keys(e).reduce((function(t,n){return-1===r.indexOf(n)&&(t[n]=e[n]),t}),{})}(this.props);return c.default.createElement(o,i)}}]),s}(c.PureComponent);return n.defaultProps=r.reduce((function(e,t){return e[t]=!1,e}),{}),n.font=Object.values(e).reduce((function(e,t){return e[t.fontFamily]=t.fontFile,e}),{}),n.StyledIconSet=v,n.getFontFamily=g,n.getRawGlyphMap=y,n.hasIcon=b,n}var k=w();return k.Button=w("Button"),k};var a=n(r(35527)),o=n(r(78439)),i=n(r(3755)),l=n(r(23335)),u=n(r(31355)),s=n(r(93709)),c=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==typeof e&&"function"!==typeof e)return{default:e};var r=d(t);if(r&&r.has(e))return r.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=a?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(21939)),f=n(r(9610));function d(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(d=function(e){return e?r:t})(e)}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}},11648:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){var n={};e.glyphs.forEach((function(e){n[e.css]=e.code}));var o=t||e.name||"fontello";return(0,a.default)(n,o,r||`${o}.ttf`)};var a=n(r(94139))},94139:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.NativeIconAPI=t.DEFAULT_ICON_SIZE=t.DEFAULT_ICON_COLOR=void 0,t.default=function(e,t,r,n){var i=r?r.replace(/\.(otf|ttf)$/,""):t,h=m.default.select({windows:`/Assets/${r}#${t}`,android:i,web:i,default:t}),S=function(t){(0,c.default)(a,t);var r=function(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,d.default)(e);if(t){var a=(0,d.default)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return(0,f.default)(this,r)}}(a);function a(){var e;(0,u.default)(this,a);for(var t=arguments.length,n=new Array(t),o=0;o1&&void 0!==arguments[1]?arguments[1]:A,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:T;(0,b.default)();var n=j(e),a=(0,g.default)(r),o=`${n}:${t}:${a}`;if(E.has(o))return E.get(o);try{var i={uri:yield P.getImageForFont(h,n,t,a),scale:v.default.get()};return E.setValue(o,i),i}catch(l){throw E.setError(o,l),l}})),C.apply(this,arguments)}function R(){return R=(0,o.default)((function*(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r;if("ios"===m.default.OS){if((0,b.default)(),!e)throw new Error("Unable to load font, because no file was specified. ");yield P.loadFontWithFileName.apply(P,(0,a.default)(e.split(".")))}})),R.apply(this,arguments)}return S.Button=(0,k.default)(S),S.getImageSource=function(e){return C.apply(this,arguments)},S.getImageSourceSync=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:T;(0,b.default)();var n=j(e),a=(0,g.default)(r),o=`${n}:${t}:${a}`;if(E.has(o))return E.get(o);try{var i={uri:P.getImageForFontSync(h,n,t,a),scale:v.default.get()};return E.setValue(o,i),i}catch(l){throw E.setError(o,l),l}},S.loadFont=function(){return R.apply(this,arguments)},S.hasIcon=function(t){return Object.prototype.hasOwnProperty.call(e,t)},S.getRawGlyphMap=function(){return e},S.getFontFamily=function(){return h},S};var a=n(r(59046)),o=n(r(81315)),i=n(r(93709)),l=n(r(53591)),u=n(r(35527)),s=n(r(78439)),c=n(r(3755)),f=n(r(23335)),d=n(r(31355)),p=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==typeof e&&"function"!==typeof e)return{default:e};var r=S(t);if(r&&r.has(e))return r.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=a?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(21939)),h=n(r(97969)),m=n(r(27410)),v=n(r(23042)),g=n(r(8325)),y=n(r(50798)),b=n(r(91630)),w=n(r(2089)),k=n(r(92585)),_=r(75054),O=["name","size","color","style","children"];function S(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(S=function(e){return e?r:t})(e)}function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=new Map;return{setValue:function(t,n){return e.set(t,{type:r,data:n})},setError:function(t,r){return e.set(t,{type:n,data:r})},has:function(t){return e.has(t)},get:function(t){if(e.has(t)){var r=e.get(t),a=r.type,o=r.data;if(a===n)throw o;return o}}}};var r="value",n="error"},91630:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!i){if("android"===a.default.OS)throw new Error("RNVectorIconsModule not available, did you properly integrate the module? Try running `react-native link react-native-vector-icons` and recompiling.");throw new Error("RNVectorIconsManager not available, did you add the library to your project and link with libRNVectorIcons.a? Try running `react-native link react-native-vector-icons` and recompiling.")}};var a=n(r(27410)),o=n(r(97969)),i=o.default.RNVectorIconsManager||o.default.RNVectorIconsModule},92585:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return(t=function(t){(0,u.default)(n,t);var r=function(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,c.default)(e);if(t){var a=(0,c.default)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}(n);function n(){return(0,i.default)(this,n),r.apply(this,arguments)}return(0,l.default)(n,[{key:"render",value:function(){var t=this.props,r=t.style,n=t.iconStyle,a=t.children,i=(0,o.default)(t,y),l=(0,v.pick)(i,S,"style","name","size","color"),u=(0,v.pick)(i,E),s=(0,v.omit)(i,Object.keys(l),Object.keys(u),"iconStyle","borderRadius","backgroundColor");l.style=n?[_.icon,n]:_.icon;var c=(0,v.pick)(this.props,"color"),f=(0,v.pick)(this.props,"backgroundColor","borderRadius");return(0,g.jsx)(h.default,k(k({style:[_.touchable,f]},u),{},{children:(0,g.jsxs)(m.default,k(k({style:[_.container,f,r]},s),{},{children:[(0,g.jsx)(e,k({},l)),"string"===typeof a?(0,g.jsx)(p.default,{style:[_.text,c],selectable:!1,children:a}):a]}))}))}}]),n}(f.PureComponent)).defaultProps={backgroundColor:O,borderRadius:5,color:"white",size:20},t};var a=n(r(93709)),o=n(r(53591)),i=n(r(35527)),l=n(r(78439)),u=n(r(3755)),s=n(r(23335)),c=n(r(31355)),f=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==typeof e&&"function"!==typeof e)return{default:e};var r=b(t);if(r&&r.has(e))return r.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=a?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(21939)),d=n(r(69261)),p=n(r(50798)),h=n(r(44005)),m=n(r(50899)),v=r(88772),g=r(75054),y=["style","iconStyle","children"];function b(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(b=function(e){return e?r:t})(e)}function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function k(e){for(var t=1;t{e.exports={pick:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n1?t-1:0),n=1;n{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(77556)).default.bind({concatArrays:!0,ignoreUndefined:!0});function o(e,t){return new Promise((function(r,n){try{var a=e();null===t||void 0===t||t(null,a),r(a)}catch(o){null===t||void 0===t||t(o),n(o)}}))}function i(e,t,r){return Promise.all(e).then((function(e){var n,a=null!=(n=null===r||void 0===r?void 0:r(e))?n:null;return null===t||void 0===t||t(null,a),Promise.resolve(a)}),(function(e){return null===t||void 0===t||t(e),Promise.reject(e)}))}var l={getItem:function(e,t){return o((function(){return window.localStorage.getItem(e)}),t)},setItem:function(e,t,r){return o((function(){return window.localStorage.setItem(e,t)}),r)},removeItem:function(e,t){return o((function(){return window.localStorage.removeItem(e)}),t)},mergeItem:function(e,t,r){return o((function(){return function(e,t){var r=window.localStorage.getItem(e);if(r){var n=JSON.parse(r),o=JSON.parse(t),i=JSON.stringify(a(n,o));window.localStorage.setItem(e,i)}else window.localStorage.setItem(e,t)}(e,t)}),r)},clear:function(e){return o((function(){return window.localStorage.clear()}),e)},getAllKeys:function(e){return o((function(){for(var e=window.localStorage.length,t=[],r=0;r{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.useAsyncStorage=function(e){return{getItem:function(){for(var t=arguments.length,r=new Array(t),n=0;n{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,Object.defineProperty(t,"useAsyncStorage",{enumerable:!0,get:function(){return o.useAsyncStorage}});var a=n(r(19441)),o=r(70915),i=a.default;t.default=i},34365:function(e,t,r){var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(59046)),o=n(r(99227)),i=n(r(69133)),l=n(r(53591)),u=n(r(52809)),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==typeof e&&"function"!==typeof e)return{default:e};var r=h(t);if(r&&r.has(e))return r.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=a?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(21939)),c=r(31827),f=["value","minimumValue","maximumValue","step","minimumTrackTintColor","maximumTrackTintColor","thumbTintColor","thumbStyle","style","inverted","disabled","trackHeight","thumbSize","thumbImage","onRNCSliderSlidingStart","onRNCSliderSlidingComplete","onRNCSliderValueChange"],d=this,p="C:\\Dev\\react-native-slider\\package\\src\\RNCSliderNativeComponent.web.tsx";function h(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(h=function(e){return e?r:t})(e)}var m=function(e){return{nativeEvent:{value:e}}},v=s.default.forwardRef((function(e,t){var r=e.value,n=e.minimumValue,a=void 0===n?0:n,h=e.maximumValue,v=void 0===h?0:h,y=e.step,b=void 0===y?1:y,w=e.minimumTrackTintColor,k=void 0===w?"#009688":w,_=e.maximumTrackTintColor,O=void 0===_?"#939393":_,S=e.thumbTintColor,E=void 0===S?"#009688":S,x=e.thumbStyle,P=void 0===x?{}:x,A=e.style,T=void 0===A?{}:A,j=e.inverted,C=void 0!==j&&j,R=e.disabled,M=void 0!==R&&R,I=e.trackHeight,D=void 0===I?4:I,N=e.thumbSize,F=void 0===N?20:N,V=e.thumbImage,L=e.onRNCSliderSlidingStart,H=void 0===L?function(e){}:L,B=e.onRNCSliderSlidingComplete,z=void 0===B?function(e){}:B,W=e.onRNCSliderValueChange,U=void 0===W?function(e){}:W,G=(0,l.default)(e,f),q=s.default.useRef({width:0,height:0}),Y=s.default.useRef(0),X=t||s.default.createRef(),K=s.default.useRef(!1),$=s.default.useState(r||a),J=(0,i.default)($,2),Q=J[0],Z=J[1],ee=s.default.useRef(),te=s.default.useRef({val:new c.Animated.Value(Q),min:new c.Animated.Value(a),max:new c.Animated.Value(v),diff:new c.Animated.Value(v-a||1)}).current;s.default.useEffect((function(){te.min.setValue(a),te.max.setValue(v),te.diff.setValue(v-a||1)}),[te,a,v]);var re=s.default.useRef(c.Animated.multiply(new c.Animated.Value(100),c.Animated.divide(c.Animated.subtract(te.val,te.min),te.diff))).current,ne=s.default.useRef(c.Animated.subtract(new c.Animated.Value(100),re)).current,ae=(0,s.useCallback)((function(e){U&&U(m(e))}),[U]),oe=(0,s.useCallback)((function(e){H&&H(m(e))}),[H]),ie=(0,s.useCallback)((function(e){z&&z(m(e))}),[z]),le=(0,s.useCallback)((function(e){var t=pe.current<20?Number.parseFloat(e.toFixed(pe.current)):e,r=Math.max(a,Math.min(t,v));return Q!==r?(Z(r),ae(r),r):t}),[a,v,Q,ae]);s.default.useLayoutEffect((function(){if(r!==ee.current){ee.current=r;var e=le(r);te.val.setValue(e)}}),[r,le,te]),s.default.useEffect((function(){var e=function(){K.current=!0},t=function(t){!K.current&&X.current&&t.target.contains(X.current)&&e()};return window.addEventListener("resize",e),document.addEventListener("scroll",t,{capture:!0}),function(){window.removeEventListener("resize",e),document.removeEventListener("scroll",t,{capture:!0})}}),[X]);var ue=c.StyleSheet.compose({flexGrow:1,flexShrink:1,flexBasis:"auto",flexDirection:"row",alignItems:"center"},T),se={height:D,borderRadius:D/2,userSelect:"none"},ce=Object.assign({},se,{backgroundColor:k,flexGrow:re}),fe=Object.assign({},se,{backgroundColor:O,flexGrow:ne}),de=c.StyleSheet.compose({width:F,height:F,backgroundColor:E,zIndex:1,borderRadius:F/2,overflow:"hidden"},P),pe=s.default.useRef(g(a,v,b));s.default.useEffect((function(){pe.current=g(a,v,b)}),[v,a,b]);var he=function(){var e,t=null==(e=u.default.findDOMNode(X.current).getBoundingClientRect())?void 0:e.x;Y.current=null!=t?t:0},me=function(e){var t=q.current.width,r=void 0===t?1:t;K.current&&(K.current=!1,he());var n=Y.current;if(en+r)return C?a:v;var o=e-n,i=C?v-(v-a)*o/r:a+(v-a)*o/r;return b?Math.round(i/b)*b:i};return s.default.useImperativeHandle(t,(function(){return{updateValue:function(e){le(e)}}}),[le]),s.default.createElement(c.View,(0,o.default)({ref:X,onLayout:function(e){var t=e.nativeEvent.layout;q.current.height=t.height,q.current.width=t.width,X.current&&he()},accessibilityActions:[{name:"increment",label:"increment"},{name:"decrement",label:"decrement"}],onAccessibilityAction:function(e){var t=(v-a)/10;switch(e.nativeEvent.actionName){case"increment":le(Q+(b||t));break;case"decrement":le(Q-(b||t))}},accessible:!0,accessibilityRole:"adjustable",style:ue},G,{onStartShouldSetResponder:function(){return!M},onMoveShouldSetResponder:function(){return!M},onResponderGrant:function(){return oe(Q)},onResponderRelease:function(e){var t=e.nativeEvent,r=le(me(t.pageX));te.val.setValue(r),ie(r)},onResponderMove:function(e){var t=e.nativeEvent,r=me(t.pageX);te.val.setValue(r),le(r)},__self:d,__source:{fileName:p,lineNumber:318,columnNumber:7}}),s.default.createElement(c.Animated.View,{pointerEvents:"none",style:ce,__self:d,__source:{fileName:p,lineNumber:343,columnNumber:9}}),s.default.createElement(c.View,{pointerEvents:"none",style:de,__self:d,__source:{fileName:p,lineNumber:344,columnNumber:9}},void 0!==V?s.default.createElement(c.Image,{source:V,style:{width:"100%",height:"100%"},__self:d,__source:{fileName:p,lineNumber:346,columnNumber:13}}):null),s.default.createElement(c.Animated.View,{pointerEvents:"none",style:fe,__self:d,__source:{fileName:p,lineNumber:352,columnNumber:9}}))}));function g(e,t,r){if(r){var n=[e,t,r].map((function(e){return((e+"").split(".").pop()||"").length}));return Math.max.apply(Math,(0,a.default)(n))}return 1/0}v.displayName="RTCSliderWebComponent";var y=v;t.default=y},43115:function(e,t,r){var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(99227)),o=n(r(53591)),i=n(r(21939)),l=r(31827),u=n(r(6597)),s=["onValueChange","onSlidingStart","onSlidingComplete","onAccessibilityAction"],c=this,f=Number.MIN_SAFE_INTEGER,d=Number.MAX_SAFE_INTEGER,p=i.default.forwardRef((function(e,t){var r,n=l.StyleSheet.compose(e.style,h.slider),p=e.onValueChange,m=e.onSlidingStart,v=e.onSlidingComplete,g=e.onAccessibilityAction,y=(0,o.default)(e,s),b=p?function(e){p(e.nativeEvent.value)}:null,w="boolean"===typeof e.disabled?e.disabled:!0===(null==(r=e.accessibilityState)?void 0:r.disabled),k="boolean"===typeof e.disabled?Object.assign({},e.accessibilityState,{disabled:e.disabled}):e.accessibilityState,_=m?function(e){m(e.nativeEvent.value)}:null,O=v?function(e){v(e.nativeEvent.value)}:null,S=g?function(e){g(e)}:null,E=Number.isNaN(e.value)||!e.value?void 0:e.value,x=y.lowerLimit||0===y.lowerLimit?y.lowerLimit:f,P=y.upperLimit||0===y.upperLimit?y.upperLimit:d;return i.default.createElement(u.default,(0,a.default)({},y,{value:E,lowerLimit:x,upperLimit:P,accessibilityState:k,thumbImage:"web"===l.Platform.OS?e.thumbImage:e.thumbImage?l.Image.resolveAssetSource(e.thumbImage):void 0,ref:t,style:n,onChange:b,onRNCSliderSlidingStart:_,onRNCSliderSlidingComplete:O,onRNCSliderValueChange:b,disabled:w,onStartShouldSetResponder:function(){return!0},onResponderTerminationRequest:function(){return!1},onRNCSliderAccessibilityAction:S,__self:c,__source:{fileName:"C:\\Dev\\react-native-slider\\package\\src\\Slider.tsx",lineNumber:251,columnNumber:5}}))}));p.defaultProps={value:0,minimumValue:0,maximumValue:1,step:0,inverted:!1,tapToSeek:!1,lowerLimit:f,upperLimit:d};var h=l.StyleSheet.create("ios"===l.Platform.OS?{slider:{height:40}}:{slider:{}}),m=p;t.default=m},6597:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(34365).default;t.default=n},29711:e=>{"use strict";var t=[];e.exports={registerAsset:function(e){return t.push(e)},getAssetByID:function(e){return t[e-1]}}},26329:e=>{"use strict";function t(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function r(e,r,n){var a=n<.5?n*(1+r):n+r-n*r,o=2*n-a,i=t(o,a,e+1/3),l=t(o,a,e),u=t(o,a,e-1/3);return Math.round(255*i)<<24|Math.round(255*l)<<16|Math.round(255*u)<<8}var n,a="[-+]?\\d*\\.?\\d+",o=a+"%";function i(){for(var e=arguments.length,t=new Array(e),r=0;r255?255:t}function c(e){return(parseFloat(e)%360+360)%360/360}function f(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function d(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}e.exports=function(e){if("number"===typeof e)return e>>>0===e&&e>=0&&e<=4294967295?e:null;if("string"!==typeof e)return null;var p,h=function(){void 0===n&&(n={rgb:new RegExp("rgb"+i(a,a,a)),rgba:new RegExp("rgba("+u(a,a,a,a)+"|"+l(a,a,a,a)+")"),hsl:new RegExp("hsl"+i(a,o,o)),hsla:new RegExp("hsla("+u(a,o,o,a)+"|"+l(a,o,o,a)+")"),hwb:new RegExp("hwb"+i(a,o,o)),hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{6})$/,hex8:/^#([0-9a-fA-F]{8})$/});return n}();if(p=h.hex6.exec(e))return parseInt(p[1]+"ff",16)>>>0;var m=function(e){switch(e){case"transparent":return 0;case"aliceblue":return 4042850303;case"antiquewhite":return 4209760255;case"aqua":case"cyan":return 16777215;case"aquamarine":return 2147472639;case"azure":return 4043309055;case"beige":return 4126530815;case"bisque":return 4293182719;case"black":return 255;case"blanchedalmond":return 4293643775;case"blue":return 65535;case"blueviolet":return 2318131967;case"brown":return 2771004159;case"burlywood":return 3736635391;case"burntsienna":return 3934150143;case"cadetblue":return 1604231423;case"chartreuse":return 2147418367;case"chocolate":return 3530104575;case"coral":return 4286533887;case"cornflowerblue":return 1687547391;case"cornsilk":return 4294499583;case"crimson":return 3692313855;case"darkblue":return 35839;case"darkcyan":return 9145343;case"darkgoldenrod":return 3095792639;case"darkgray":case"darkgrey":return 2846468607;case"darkgreen":return 6553855;case"darkkhaki":return 3182914559;case"darkmagenta":return 2332068863;case"darkolivegreen":return 1433087999;case"darkorange":return 4287365375;case"darkorchid":return 2570243327;case"darkred":return 2332033279;case"darksalmon":return 3918953215;case"darkseagreen":return 2411499519;case"darkslateblue":return 1211993087;case"darkslategray":case"darkslategrey":return 793726975;case"darkturquoise":return 13554175;case"darkviolet":return 2483082239;case"deeppink":return 4279538687;case"deepskyblue":return 12582911;case"dimgray":case"dimgrey":return 1768516095;case"dodgerblue":return 512819199;case"firebrick":return 2988581631;case"floralwhite":return 4294635775;case"forestgreen":return 579543807;case"fuchsia":case"magenta":return 4278255615;case"gainsboro":return 3705462015;case"ghostwhite":return 4177068031;case"gold":return 4292280575;case"goldenrod":return 3668254975;case"gray":case"grey":return 2155905279;case"green":return 8388863;case"greenyellow":return 2919182335;case"honeydew":return 4043305215;case"hotpink":return 4285117695;case"indianred":return 3445382399;case"indigo":return 1258324735;case"ivory":return 4294963455;case"khaki":return 4041641215;case"lavender":return 3873897215;case"lavenderblush":return 4293981695;case"lawngreen":return 2096890111;case"lemonchiffon":return 4294626815;case"lightblue":return 2916673279;case"lightcoral":return 4034953471;case"lightcyan":return 3774873599;case"lightgoldenrodyellow":return 4210742015;case"lightgray":case"lightgrey":return 3553874943;case"lightgreen":return 2431553791;case"lightpink":return 4290167295;case"lightsalmon":return 4288707327;case"lightseagreen":return 548580095;case"lightskyblue":return 2278488831;case"lightslategray":case"lightslategrey":return 2005441023;case"lightsteelblue":return 2965692159;case"lightyellow":return 4294959359;case"lime":return 16711935;case"limegreen":return 852308735;case"linen":return 4210091775;case"maroon":return 2147483903;case"mediumaquamarine":return 1724754687;case"mediumblue":return 52735;case"mediumorchid":return 3126187007;case"mediumpurple":return 2473647103;case"mediumseagreen":return 1018393087;case"mediumslateblue":return 2070474495;case"mediumspringgreen":return 16423679;case"mediumturquoise":return 1221709055;case"mediumvioletred":return 3340076543;case"midnightblue":return 421097727;case"mintcream":return 4127193855;case"mistyrose":return 4293190143;case"moccasin":return 4293178879;case"navajowhite":return 4292783615;case"navy":return 33023;case"oldlace":return 4260751103;case"olive":return 2155872511;case"olivedrab":return 1804477439;case"orange":return 4289003775;case"orangered":return 4282712319;case"orchid":return 3664828159;case"palegoldenrod":return 4008225535;case"palegreen":return 2566625535;case"paleturquoise":return 2951671551;case"palevioletred":return 3681588223;case"papayawhip":return 4293907967;case"peachpuff":return 4292524543;case"peru":return 3448061951;case"pink":return 4290825215;case"plum":return 3718307327;case"powderblue":return 2967529215;case"purple":return 2147516671;case"rebeccapurple":return 1714657791;case"red":return 4278190335;case"rosybrown":return 3163525119;case"royalblue":return 1097458175;case"saddlebrown":return 2336560127;case"salmon":return 4202722047;case"sandybrown":return 4104413439;case"seagreen":return 780883967;case"seashell":return 4294307583;case"sienna":return 2689740287;case"silver":return 3233857791;case"skyblue":return 2278484991;case"slateblue":return 1784335871;case"slategray":case"slategrey":return 1887473919;case"snow":return 4294638335;case"springgreen":return 16744447;case"steelblue":return 1182971135;case"tan":return 3535047935;case"teal":return 8421631;case"thistle":return 3636451583;case"tomato":return 4284696575;case"turquoise":return 1088475391;case"violet":return 4001558271;case"wheat":return 4125012991;case"white":return 4294967295;case"whitesmoke":return 4126537215;case"yellow":return 4294902015;case"yellowgreen":return 2597139199}return null}(e);return null!=m?m:(p=h.rgb.exec(e))?(s(p[1])<<24|s(p[2])<<16|s(p[3])<<8|255)>>>0:(p=h.rgba.exec(e))?void 0!==p[6]?(s(p[6])<<24|s(p[7])<<16|s(p[8])<<8|f(p[9]))>>>0:(s(p[2])<<24|s(p[3])<<16|s(p[4])<<8|f(p[5]))>>>0:(p=h.hex3.exec(e))?parseInt(p[1]+p[1]+p[2]+p[2]+p[3]+p[3]+"ff",16)>>>0:(p=h.hex8.exec(e))?parseInt(p[1],16)>>>0:(p=h.hex4.exec(e))?parseInt(p[1]+p[1]+p[2]+p[2]+p[3]+p[3]+p[4]+p[4],16)>>>0:(p=h.hsl.exec(e))?(255|r(c(p[1]),d(p[2]),d(p[3])))>>>0:(p=h.hsla.exec(e))?void 0!==p[6]?(r(c(p[6]),d(p[7]),d(p[8]))|f(p[9]))>>>0:(r(c(p[2]),d(p[3]),d(p[4]))|f(p[5]))>>>0:(p=h.hwb.exec(e))?(255|function(e,r,n){if(r+n>=1){var a=Math.round(255*r/(r+n));return a<<24|a<<16|a<<8}var o=t(0,1,e+1/3)*(1-r-n)+r,i=t(0,1,e)*(1-r-n)+r,l=t(0,1,e-1/3)*(1-r-n)+r;return Math.round(255*o)<<24|Math.round(255*i)<<16|Math.round(255*l)<<8}(c(p[1]),d(p[2]),d(p[3])))>>>0:null}},11916:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PARAM_KEY=t.PANEL_ID=t.EVENT_ID=t.CYCLIC_KEY=t.ADDON_ID=void 0;t.PARAM_KEY="actions";var r="storybook/actions";t.ADDON_ID=r;var n="".concat(r,"/panel");t.PANEL_ID=n;var a="".concat(r,"/action-event");t.EVENT_ID=a;t.CYCLIC_KEY="$___storybook.isCyclic"},35594:(e,t,r)=>{"use strict";e=r.nmd(e),Object.defineProperty(t,"__esModule",{value:!0});var n=r(11916);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}));var a=r(36652);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var o=r(95778);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))})),e&&e.hot},21849:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},27749:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},33590:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},27146:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},23816:()=>{},41066:()=>{},36652:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(21849);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}));var a=r(33590);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var o=r(27749);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var i=r(27146);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var l=r(23816);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var u=r(41066);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}))},33297:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.action=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.assign({},l.config,t);return function(){for(var t=o.addons.getChannel(),n=(0,a.default)(),l=arguments.length,u=new Array(l),s=0;s1?c:c[0],p={id:n,count:0,data:{name:e,args:d},options:Object.assign({},r,{maxDepth:5+(r.depth||3),allowFunction:r.allowFunction||!1})};t.emit(i.EVENT_ID,p)}},r(65526),r(78744),r(28381),r(4065),r(79041),r(56505),r(59849),r(59135),r(25536),r(75785),r(46970),r(68053),r(26884),r(19387);var a=n(r(5825)),o=r(46673),i=r(11916),l=r(696);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}var s=function e(t,r){var n=Object.getPrototypeOf(t);return!n||r(n)?n:e(n,r)},c=function(e){return Boolean("object"===u(e)&&e&&s(e,(function(e){return/^Synthetic(?:Base)?Event$/.test(e.constructor.name)}))&&"function"===typeof e.persist)},f=function(e){if(c(e)){var t=Object.create(e.constructor.prototype,Object.getOwnPropertyDescriptors(e));t.persist();var r=Object.getOwnPropertyDescriptor(t,"view"),n=null===r||void 0===r?void 0:r.value;return"object"===u(n)&&"Window"===(null===n||void 0===n?void 0:n.constructor.name)&&Object.defineProperty(t,"view",Object.assign({},r,{value:Object.create(n.constructor.prototype)})),t}return e}},42433:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.actions=void 0,r(56505),r(75785),r(46330),r(27757),r(59135),r(25536),r(46970),r(68053),r(26884),r(19387),r(13237),r(28381),r(25442),r(78744);var n=r(33297),a=r(696);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,a,o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){l=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(l)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.configureActions=t.config=void 0,r(56505);var n={depth:10,clearOnStoryChange:!0,limit:50};t.config=n;t.configureActions=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.assign(n,e)}},45251:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.decorateAction=t.decorate=void 0,r(13237),r(71114);var a,o,i=n(r(15650)),l=n(r(13005));function u(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}t.decorateAction=function(e){return(0,i.default)((function(){}),(0,l.default)(a||(a=u(["\n decorateAction is no longer supported as of Storybook 6.0.\n "]))))};var s=(0,i.default)((function(){}),"decorate.* is no longer supported as of Storybook 6.0.");t.decorate=function(e){return(0,i.default)((function(){return{action:s,actions:s,withActions:s}}),(0,l.default)(o||(o=u(["\n decorate is deprecated, please configure addon-actions using the addParameter api:\n \n addParameters({\n actions: {\n handles: options\n },\n });\n "]))))}},95778:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(33297);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}));var a=r(42433);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var o=r(696);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var i=r(45251);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var l=r(42729);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}))},42729:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.withActions=void 0,r(59135),r(25536),r(46970),r(68053),r(26884),r(19387),r(13237),r(28381),r(25442),r(71114),r(59849),r(64603),r(78744),r(15001),r(98426),r(75785),r(46330);var a,o=n(r(78031)),i=r(46673),l=n(r(15650)),u=n(r(13005)),s=r(42433),c=r(11916);function f(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,a,o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){l=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(l)throw a}}return o}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"===typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1?t-1:0),n=1;n1?t-1:0),n=1;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(78031),a=s(r(41184)),o=r(22890),i=s(r(82841)),l=r(6796),u=r(88207);function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function f(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function n(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deserializers=t.serializers=t.converters=void 0;var r=function(){},n={jsonParse:function(e){return JSON.parse(e)},jsonStringify:function(e){return JSON.stringify(e)},simple:function(e){return e},stringifyIfSet:function(e){return null===e||void 0===e?"":String(e)},stringifyIfTruthy:function(e){return e?String(e):null},toArray:function(e){return Array.isArray(e)?e:e.split(",")},toBoolean:function(e){return"true"===e},toDate:function(e){return new Date(e).getTime()||(new Date).getTime()},toFloat:function(e){return""===e?null:parseFloat(e)}};t.converters=n;var a={array:n.simple,boolean:n.stringifyIfTruthy,button:r,checkbox:n.simple,color:n.simple,date:n.toDate,files:r,number:n.stringifyIfSet,object:n.jsonStringify,options:n.simple,radios:n.simple,select:n.simple,text:n.simple};t.serializers=a;var o={array:n.toArray,boolean:n.toBoolean,button:r,checkbox:n.simple,color:n.simple,date:n.toDate,files:r,number:n.toFloat,object:n.jsonParse,options:n.simple,radios:n.simple,select:n.simple,text:n.simple};t.deserializers=o},16946:(e,t,r)=>{"use strict";function n(e){return n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}e=r.nmd(e),Object.defineProperty(t,"__esModule",{value:!0});var a={knob:!0,text:!0,boolean:!0,number:!0,color:!0,object:!0,select:!0,radios:!0,array:!0,date:!0,button:!0,files:!0,optionsKnob:!0,withKnobs:!0};t.knob=function(e,t){return l.manager.knob(e,t)},t.text=function(e,t,r){return l.manager.knob(e,{type:"text",value:t,groupId:r})},t.boolean=function(e,t,r){return l.manager.knob(e,{type:"boolean",value:t,groupId:r})},t.number=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,a=r.range?c(c({},{min:0,max:10,step:1}),r):r,o=c(c({type:"number"},a),{},{value:t,groupId:n});return l.manager.knob(e,o)},t.color=function(e,t,r){return l.manager.knob(e,{type:"color",value:t,groupId:r})},t.object=function(e,t,r){return l.manager.knob(e,{type:"object",value:t,groupId:r})},t.select=function(e,t,r,n){return l.manager.knob(e,{type:"select",selectV2:!0,options:t,value:r,groupId:n})},t.radios=function(e,t,r,n){return l.manager.knob(e,{type:"radios",options:t,value:r,groupId:n})},t.array=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:",",n=arguments.length>3?arguments[3]:void 0;return l.manager.knob(e,{type:"array",value:t,separator:r,groupId:n})},t.date=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,r=arguments.length>2?arguments[2]:void 0,n=t?t.getTime():(new Date).getTime();return l.manager.knob(e,{type:"date",value:n,groupId:r})},t.button=function(e,t,r){return l.manager.knob(e,{type:"button",callback:t,hideLabel:!0,groupId:r})},t.files=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3?arguments[3]:void 0;return l.manager.knob(e,{type:"files",accept:t,value:r,groupId:n})},t.optionsKnob=function(e,t,r,n,a){return l.manager.knob(e,{type:"options",options:t,value:r,optionsObj:n,groupId:a})},t.withKnobs=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!==typeof e)return{default:e};var r=u(t);if(r&&r.has(e))return r.get(e);var a={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(a,i,l):a[i]=e[i]}a.default=e,r&&r.set(e,a);return a}(r(46673)),i=r(6796);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var l=r(76795);function u(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(u=function(e){return e?r:t})(e)}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerKnobs=function(){(0,a.useEffect)(k,[])},t.manager=void 0;var n=s(r(46673)),a=r(22890),o=r(51629),i=s(r(23193)),l=s(r(49482)),u=r(6796);function s(e){return e&&e.__esModule?e:{default:e}}var c=new l.default;t.manager=c;var f=c.knobStore;function d(){n.default.getChannel().emit(o.FORCE_RE_RENDER)}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:+new Date;n.default.getChannel().emit(u.SET,{knobs:f.getAll(),timestamp:e})}var h=function(){f.markAllUnused(),d()},m=(0,i.default)(h,325);function v(e){var t=e.name,r=e.value,n=f.get(t);n.value=r,c.options.disableForceUpdate||n.disableForceUpdate||(c.options.disableDebounce||n.disableDebounce?h():m())}function g(e){var t=f.get(e.name);t.callback&&!1!==t.callback()&&d()}function y(){f.reset(),p(!1)}function b(){f.reset(),d(),p(!1)}function w(){var e=n.default.getChannel();e.removeListener(u.CHANGE,v),e.removeListener(u.CLICK,g),e.removeListener(o.STORY_CHANGED,y),e.removeListener(u.RESET,b),f.unsubscribe(p)}function k(){var e=n.default.getChannel();return e.on(u.CHANGE,v),e.on(u.CLICK,g),e.on(o.STORY_CHANGED,y),e.on(u.RESET,b),f.subscribe(p),w}},6796:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CLICK=t.SET_OPTIONS=t.CHANGE=t.SET=t.RESET=t.PANEL_ID=t.ADDON_ID=t.PARAM_KEY=void 0;t.PARAM_KEY="knobs";var r="storybookjs/knobs";t.ADDON_ID=r;var n="".concat(r,"/panel");t.PANEL_ID=n;var a="".concat(r,"/reset");t.RESET=a;var o="".concat(r,"/set");t.SET=o;var i="".concat(r,"/change");t.CHANGE=i;var l="".concat(r,"/set-options");t.SET_OPTIONS=l;var u="".concat(r,"/click");t.CLICK=u},14327:function(e,t,r){"use strict";var n=r(69133),a=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&a(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var l=r(74701),u=i(r(21939)),s=r(31827),c="rgb(136, 19, 145)",f="rgb(128, 128, 128)",d="rgb(128, 128, 128)",p="rgb(196, 26, 22)",h="rgb(196, 26, 22)",m="rgb(28, 0, 207)",v="rgb(28, 0, 207)",g="rgb(13, 34, 170)",y="#859499";function b(e){var t=e.value;if(null===t)return(0,l.jsx)(s.Text,{style:{color:f},children:"null"});if(void 0===t)return(0,l.jsx)(s.Text,{style:{color:d},children:"undefined"});if(t instanceof RegExp)return(0,l.jsx)(s.Text,{style:{color:p},children:`/${t.source}/${t.flags}`});switch(typeof t){case"string":return(0,l.jsx)(s.Text,{style:{color:h},children:JSON.stringify(t)});case"number":return(0,l.jsx)(s.Text,{style:{color:m},children:JSON.stringify(t)});case"boolean":return(0,l.jsx)(s.Text,{style:{color:v},children:JSON.stringify(t)});case"function":return(0,l.jsx)(s.Text,{style:{color:g},children:"[Function]"});default:return(0,l.jsx)(s.Text,{children:JSON.stringify(t)})}}t.default=function e(t){var r=t.name,a=t.value,o=(0,u.useState)(!1),i=n(o,2),f=i[0],d=i[1],p=r&&(Array.isArray(a)&&a.length||a&&"object"===typeof a&&Object.keys(a).length),h=u.default.useCallback((function(){p&&d((function(e){return!e}))}),[p]),m=(0,l.jsx)(s.Text,{style:{color:p?y:"transparent",paddingRight:8},children:f?"\u25bc":"\u25b6"}),v=r?(0,l.jsx)(s.Text,{style:{color:c},children:r}):null;return Array.isArray(a)?r?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(s.TouchableOpacity,{onPress:h,style:w.row,children:[m,v,(0,l.jsx)(s.Text,{children:": "+(0===a.length?"[]":f?"[":"[...]")})]}),f?(0,l.jsxs)(s.View,{style:w.expanded,children:[a.map((function(t,r){return(0,l.jsx)(s.View,{style:w.expanded,children:(0,l.jsx)(e,{value:t})},r)})),(0,l.jsx)(s.View,{style:w.spacingLeft,children:(0,l.jsx)(s.Text,{children:"]"})})]}):null]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.Text,{children:"["}),a.map((function(t,r){return(0,l.jsx)(s.View,{style:w.spacingLeft,children:(0,l.jsx)(e,{value:t})},r)})),(0,l.jsx)(s.Text,{children:"]"})]}):!a||"object"!==typeof a||a instanceof RegExp?r?(0,l.jsxs)(s.View,{style:w.row,children:[m,v,(0,l.jsx)(s.Text,{children:": "}),(0,l.jsx)(b,{value:a})]}):(0,l.jsx)(b,{value:a}):r?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(s.TouchableOpacity,{style:w.row,onPress:h,children:[m,v,(0,l.jsx)(s.Text,{children:": "+(0===Object.keys(a).length?"{}":f?"{":"{...}")})]}),f?(0,l.jsxs)(s.View,{style:w.expanded,children:[Object.entries(a).map((function(t){var r=n(t,2),a=r[0],o=r[1];return(0,l.jsx)(s.View,{children:(0,l.jsx)(e,{name:a,value:o})},a)})),(0,l.jsx)(s.View,{style:w.spacingLeft,children:(0,l.jsx)(s.Text,{children:"}"})})]}):null]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.Text,{children:"{"}),Object.entries(a).map((function(t){var r=n(t,2),a=r[0],o=r[1];return(0,l.jsx)(s.View,{children:(0,l.jsx)(e,{name:a,value:o})},a)})),(0,l.jsx)(s.Text,{children:"}"})]})};var w=s.StyleSheet.create({spacingLeft:{marginLeft:20},expanded:{marginLeft:20},row:{paddingBottom:8,flexDirection:"row",alignItems:"center"}})},40747:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ActionLogger=void 0;var a=r(74701),o=r(31827),i=n(r(14327));t.ActionLogger=function(e){var t=e.actions,r=e.onClear;return(0,a.jsxs)(o.ScrollView,{children:[(0,a.jsx)(o.ScrollView,{horizontal:!0,children:(0,a.jsx)(o.View,{children:t.map((function(e){return(0,a.jsxs)(o.View,{style:l.row,children:[(0,a.jsx)(o.View,{children:e.count>1?(0,a.jsx)(o.Text,{children:e.count}):null}),(0,a.jsx)(o.View,{style:l.grow,children:(0,a.jsx)(i.default,{name:e.data.name,value:e.data.args||e.data})})]},e.id)}))})}),(0,a.jsx)(o.View,{children:(0,a.jsx)(o.Button,{onPress:r,title:"CLEAR"})})]})},t.default=t.ActionLogger;var l=o.StyleSheet.create({grow:{flexGrow:1},row:{flexDirection:"row"}})},93816:function(e,t,r){"use strict";var n=r(59046),a=r(69133),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(74701),l=r(21939),u=o(r(20276)),s=r(46673),c=r(51629),f=r(35594),d=r(40747);t.default=function(e){var t=e.active,r=(0,l.useState)([]),o=a(r,2),p=o[0],h=o[1],m=function(){return h([])},v=p.length>0&&p[0].options.clearOnStoryChange;return(0,l.useEffect)((function(){var e=function(){v&&m()},t=s.addons.getChannel();return t.addListener(c.SELECT_STORY,e),function(){t.removeListener(c.SELECT_STORY,e)}}),[v]),(0,l.useEffect)((function(){var e=function(e){h((function(t){var r=n(t),a=r.length&&r[0];return a&&function(e,t){try{return(0,u.default)(e,t)}catch(r){return!1}}(a.data,e.data)?a.count++:(e.count=1,r.unshift(e)),r.slice(0,e.options.limit)}))},t=s.addons.getChannel();return t.addListener(f.EVENT_ID,e),function(){t.removeListener(f.EVENT_ID,e)}}),[]),t?(0,i.jsx)(d.ActionLogger,{actions:p,onClear:m}):null}},31309:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.register=void 0;var a=r(74701),o=n(r(46673)),i=r(35594),l=n(r(93816));t.register=function(){o.default.register(i.ADDON_ID,(function(){o.default.addPanel(i.PANEL_ID,{title:"Actions",render:function(e){var t=e.active,r=e.key;return(0,a.jsx)(l.default,{active:t},r)},paramKey:i.PARAM_KEY})}))}},20276:e=>{"use strict";var t=Array.isArray,r=Object.keys,n=Object.prototype.hasOwnProperty;e.exports=function e(a,o){if(a===o)return!0;if(a&&o&&"object"==typeof a&&"object"==typeof o){var i,l,u,s=t(a),c=t(o);if(s&&c){if((l=a.length)!=o.length)return!1;for(i=l;0!==i--;)if(!e(a[i],o[i]))return!1;return!0}if(s!=c)return!1;var f=a instanceof Date,d=o instanceof Date;if(f!=d)return!1;if(f&&d)return a.getTime()==o.getTime();var p=a instanceof RegExp,h=o instanceof RegExp;if(p!=h)return!1;if(p&&h)return a.toString()==o.toString();var m=r(a);if((l=m.length)!==r(o).length)return!1;for(i=l;0!==i--;)if(!n.call(o,m[i]))return!1;for(i=l;0!==i--;)if(!e(a[u=m[i]],o[u]))return!1;return!0}return a!==a&&o!==o}},1602:(e,t,r)=>{r(31309).register()},25357:function(e,t,r){"use strict";var n=r(69133),a=r(35527),o=r(78439),i=r(3755),l=r(23335),u=r(31355);function s(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=u(e);if(t){var a=u(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return l(this,r)}}var c=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),f=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),d=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&c(t,e,r);return f(t,e),t},p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var h=r(74701),m=p(r(40520)),v=d(r(21939)),g=r(31827),y=r(31525),b=y.styled.TouchableOpacity((function(e){var t=e.theme,r=e.active;return{borderWidth:t.tabs.borderWidth,borderColor:r?t.tabs.activeBorderColor:t.tabs.inactiveBorderColor,borderRadius:t.tabs.borderRadius,backgroundColor:r?t.tabs.activeBackgroundColor:t.tabs.inactiveBackgroundColor}})),w=y.styled.Text((function(e){var t=e.theme;return{color:e.active?t.tabs.activeTextColor:t.tabs.inactiveTextColor,paddingVertical:.5*t.tabs.paddingVertical,paddingHorizontal:t.tabs.paddingHorizontal,fontSize:t.tabs.fontSize,fontWeight:t.tabs.fontWeight}})),k=function(e){i(r,e);var t=s(r);function r(){return a(this,r),t.apply(this,arguments)}return o(r,[{key:"renderTab",value:function(e,t){var r=t.title;"function"===typeof r&&(r=r());var n=this.props,a=n.onGroupSelect,o=n.selectedGroup===e;return(0,h.jsx)(b,{onPress:function(){return a(e)},active:o,activeOpacity:.8,children:(0,h.jsx)(w,{active:o,children:r})},e)}},{key:"render",value:function(){var e=this,t=this.props.groups,r=t?Object.entries(t):null;return r&&r.length?(0,h.jsx)(g.ScrollView,{horizontal:!0,style:{marginBottom:12},children:r.map((function(t){var r=n(t,2),a=r[0],o=r[1];return e.renderTab(a,o)}))}):(0,h.jsx)(g.Text,{children:"no groups available"})}}]),r}(v.Component);k.defaultProps={groups:{},onGroupSelect:function(){},selectedGroup:null},k.propTypes={groups:m.default.object,onGroupSelect:m.default.func,selectedGroup:m.default.string},t.default=k},51381:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=r(74701),o=n(r(40520)),i=r(31827),l=(n(r(21939)),r(31525)),u=n(r(55387)),s=function(){return(0,a.jsx)(i.Text,{style:{margin:10},children:"Invalid Type"})},c=l.styled.Text((function(e){var t=e.theme;return{paddingBottom:t.tokens.spacing1,fontSize:t.inputs.labelFontSize,color:t.inputs.labelTextColor,fontWeight:"500"}})),f=l.styled.View((function(e){return{paddingBottom:e.theme.tokens.spacing4}})),d=l.styled.View(),p=function(e){var t=e.onChange,r=e.onPress,n=e.knob,o=u.default[n.type]||s;return(0,a.jsxs)(f,{children:[n.hideLabel?null:(0,a.jsx)(c,{children:`${n.label||n.name}`}),(0,a.jsx)(d,{children:(0,a.jsx)(o,{knob:n,onChange:t,onPress:r})})]})};p.propTypes={knob:o.default.shape({name:o.default.string,label:o.default.string,value:o.default.any,hideLabel:o.default.bool,type:o.default.oneOf(["text","number","color","boolean","object","select","array","date","button","radios"])}).isRequired,onChange:o.default.func.isRequired,onPress:o.default.func.isRequired},t.default=p},15819:function(e,t,r){"use strict";var n=r(35527),a=r(78439),o=r(3755),i=r(23335),l=r(31355);function u(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=l(e);if(t){var a=l(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=r(74701),f=s(r(21939)),d=s(r(40520)),p=(r(31827),s(r(51381))),h=function(e){o(r,e);var t=u(r);function r(){return n(this,r),t.apply(this,arguments)}return a(r,[{key:"makeChangeHandler",value:function(e,t){var r=this;return function(n){(0,r.props.onFieldChange)({name:e,type:t,value:n})}}},{key:"render",value:function(){var e=this,t=this.props,r=t.knobs,n=t.onFieldClick;return(0,c.jsx)(c.Fragment,{children:r.map((function(t){var r=e.makeChangeHandler(t.name,t.type);return(0,c.jsx)(p.default,{name:t.name,type:t.type,value:t.value,knob:t,onChange:r,onPress:n},t.name)}))})}}]),r}(f.default.Component);t.default=h,h.displayName="PropForm",h.defaultProps={knobs:[]},h.propTypes={knobs:d.default.arrayOf(d.default.shape({name:d.default.string,value:d.default.any})),onFieldChange:d.default.func.isRequired,onFieldClick:d.default.func.isRequired}},16493:function(e,t,r){"use strict";var n=r(35527),a=r(78439),o=r(3755),i=r(23335),l=r(31355);function u(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=l(e);if(t){var a=l(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=r(74701),f=r(31525),d=s(r(40520)),p=s(r(21939)),h=f.styled.View((function(e){e.theme;var t=e.isInline;return{flexDirection:t?"row":"column",alignItems:t?"center":"flex-start",flexWrap:"wrap"}})),m=f.styled.TouchableOpacity((function(e){return{alignItems:"center",flexDirection:"row",paddingVertical:e.theme.inputs.radio.itemSpacing}})),v=f.styled.View((function(e){var t=e.theme;return{width:t.inputs.radio.height,height:t.inputs.radio.height,borderWidth:t.inputs.radio.borderWidth,borderColor:t.inputs.radio.borderColor,borderRadius:t.tokens.borderRadius.round,backgroundColor:t.inputs.radio.backgroundColor,alignItems:"center",justifyContent:"center",paddingVertical:t.inputs.radio.paddingVertical,paddingHorizontal:t.inputs.radio.paddingHorizontal}})),g=f.styled.View((function(e){var t=e.theme,r=e.selected;return{height:"100%",width:"100%",borderRadius:t.tokens.borderRadius.round,backgroundColor:r?t.inputs.radio.activeBackgroundColor:"transparent"}})),y=f.styled.Text((function(e){var t=e.theme;return{fontSize:t.inputs.radio.fontSize,paddingStart:t.inputs.radio.labelSpacing,color:t.inputs.labelTextColor}})),b=function(e){o(r,e);var t=u(r);function r(e){var a;n(this,r);var o=(a=t.call(this,e)).props.initValue;return a.state={value:o},a}return a(r,[{key:"render",value:function(){var e=this,t=this.props,r=t.data,n=t.onChange,a=this.state.value;return(0,c.jsx)(h,{children:r.map((function(t){return(0,c.jsxs)(m,{activeOpacity:.7,onPress:function(){n(t),e.setState({value:t.key})},children:[(0,c.jsx)(v,{children:(0,c.jsx)(g,{selected:a===t.key})}),(0,c.jsx)(y,{children:t.label})]},t.label)}))})}}]),r}(p.default.Component);t.default=b,b.defaultProps={data:[],onChange:function(e){return e},initValue:""},b.propTypes={data:d.default.arrayOf(d.default.object),initValue:d.default.string,onChange:d.default.func}},58953:function(e,t,r){"use strict";var n=r(93709),a=r(35527),o=r(78439),i=r(90434),l=r(3755),u=r(23335),s=r(31355);function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t1||a<0||i>1||i<0,o._handleColorChange({x:t,y:r})},onMove:o._handleColorChange}),o.pickerContainer=m.default.createRef(),o}return o(n,[{key:"getColor",value:function(){return(0,y.default)(this._getColor()).toHexString()}},{key:"_getColor",value:function(){return("string"===typeof this.props.color?(0,y.default)(this.props.color).toHsv():this.props.color)||this.state.color}},{key:"_onColorSelected",value:function(){var e=this.props.onColorSelected,t=(0,y.default)(this._getColor()).toHexString();e&&e(t)}},{key:"_onOldColorSelected",value:function(){var e=this.props,t=e.oldColor,r=e.onOldColorSelected,n=(0,y.default)(t);this.setState({color:n.toHsv()}),r&&r(n.toHexString())}},{key:"_onSValueChange",value:function(e){var t=this._getColor(),r=t.h,n=t.v;this._onColorChange({h:r,s:e,v:n})}},{key:"_onVValueChange",value:function(e){var t=this._getColor(),r=t.h,n=t.s;this._onColorChange({h:r,s:n,v:e})}},{key:"_onColorChange",value:function(e){this.setState({color:e}),this.props.onColorChange&&this.props.onColorChange(e)}},{key:"_onLayout",value:function(e){var t=this;this._layout=e.nativeEvent.layout;var r=this._layout,n=r.width,a=r.height,o=Math.min(n,a);this.state.pickerSize!==o&&this.setState({pickerSize:o}),g.InteractionManager.runAfterInteractions((function(){t.pickerContainer.current&&t.pickerContainer.current.measure((function(e,r,n,a,o,i){t._pageX=o,t._pageY=i}))}))}},{key:"_computeHValue",value:function(e,t){var r=e-this.state.pickerSize/2,n=t-this.state.pickerSize/2;return 180*(Math.atan2(r,n)+Math.PI+Math.PI/2)/Math.PI%360}},{key:"_hValueToRad",value:function(e){return e*Math.PI/180-Math.PI-Math.PI/2}},{key:"_handleHColorChange",value:function(e){var t=e.x,r=e.y,n=this._getColor(),a=n.s,o=n.v,i=(this._layout.width-this.state.pickerSize)/2,l=(this._layout.height-this.state.pickerSize)/2,u=t-this._pageX-i,s=r-this._pageY-l,c=this._computeHValue(u,s);this._onColorChange({h:c,s:a,v:o})}},{key:"_handleSVColorChange",value:function(e){var t=e.x,r=e.y,n=this._computeColorFromTriangle({x:t,y:r}),a=n.h,o=n.s,i=n.v,l=Math.min(Math.max(0,o),1),u=Math.min(Math.max(0,i),1);this._onColorChange({h:a,s:l,v:u})}},{key:"_normalizeTriangleTouch",value:function(e,t,r){var n=.1,a=e>1?t>0?1-(1-e)*r:1-e*r:t>0?e*r:(1-e)*r;if(e>.88&&t>.88)return{s:e,v:t};(a<.12&&t>.88||a<.12&&t<.12)&&(n=.05);var o=e,i=t;return{s1:o=(o=o<0&&a>0-n?0:o)>1&&a<1+n?1:o,v1:i=(i=i<0&&i>0-n?0:i)>1&&i<1+n?1:i}}},{key:"_computeColorFromTriangle",value:function(e){var t=e.x,r=e.y,n=this.state.pickerSize,a=k(n),o=a.triangleHeight,i=a.triangleWidth,l=n/2-i/2,u=n/2-2*o/3,s=(this._layout.width-this.state.pickerSize)/2,c=(this._layout.height-this.state.pickerSize)/2,f=t-this._pageX-s-l,d=r-this._pageY-c-u,p=this._getColor().h,h=(p-330+360)%360*Math.PI/180,m={x:i/2,y:2*o/3},v=(0,b.rotatePoint)({x:f,y:d},h,m),g=i*v.y/o,y=i/2-i/2*v.y/o,w=(v.x-y)/g,_=v.y/o,O=this._normalizeTriangleTouch(w,_,g/o);return{h:p,s:O.s,v:O.v}}},{key:"render",value:function(){var e=this.state.pickerSize,t=this.props,n=t.oldColor,a=t.style,o=this._getColor(),i=o.h,l=this._hValueToRad(i),u=(0,y.default)(o).toHexString(),s=(0,y.default)({h:i,s:1,v:1}).toHexString(),c=_({pickerSize:e,selectedColor:u,selectedColorHsv:o,indicatorColor:s,oldColor:n,angle:l,isRTL:this._isRTL}),d=function(e,t){var r=e.rotationHackFactor;if(!(r<1))return`r${Math.floor(t*r)}`}(this.props,l);return(0,h.jsxs)(g.View,{style:a,children:[(0,h.jsx)(g.View,{onLayout:this._onLayout,ref:this.pickerContainer,style:O.pickerContainer,children:e?(0,h.jsxs)(g.View,{children:[(0,h.jsxs)(g.View,{style:[O.triangleContainer,c.triangleContainer],children:[(0,h.jsx)(g.View,{style:[O.triangleUnderlayingColor,c.triangleUnderlayingColor]}),(0,h.jsx)(g.Image,{style:[O.triangleImage,c.triangleImage],source:r(55299)})]},d),(0,h.jsxs)(g.View,f(f({},this._pickerResponder.panHandlers),{},{style:[O.picker,c.picker],collapsable:!1,children:[(0,h.jsx)(g.Image,{source:r(91454),resizeMode:"contain",style:[O.pickerImage]}),(0,h.jsx)(g.View,{style:[O.pickerIndicator,c.pickerIndicator],children:(0,h.jsx)(g.View,{style:[O.pickerIndicatorTick,c.pickerIndicatorTick]})},d),(0,h.jsx)(g.View,{style:[O.svIndicator,c.svIndicator]})]}))]}):null}),(0,h.jsxs)(g.View,{style:[O.colorPreviews,c.colorPreviews],children:[n&&(0,h.jsx)(g.TouchableOpacity,{style:[O.colorPreview,{backgroundColor:n}],onPress:this._onOldColorSelected,activeOpacity:.7}),(0,h.jsx)(g.TouchableOpacity,{style:[O.colorPreview,{backgroundColor:u}],onPress:this._onColorSelected,activeOpacity:.7})]})]})}}]),n}(m.default.PureComponent);function k(e){var t=42/510,r=t*e,n=r,a=r/3,o=e-6*a,i=o/2;return{triangleSize:o,triangleRadius:i,triangleHeight:3*i/2,triangleWidth:2*i*Math.sqrt(3/4),indicatorPickerRatio:t,indicatorSize:n,pickerPadding:a}}t.TriangleColorPicker=w,w.propTypes={color:v.default.oneOfType([v.default.string,v.default.shape({h:v.default.number,s:v.default.number,v:v.default.number})]),defaultColor:v.default.string,oldColor:v.default.string,onColorChange:v.default.func,onColorSelected:v.default.func,onOldColorSelected:v.default.func,rotationHackFactor:v.default.number,style:{}},w.defaultProps={rotationHackFactor:100};var _=function(e){var t,r,a=e.indicatorColor,o=e.angle,i=e.pickerSize,l=e.selectedColorHsv,u=e.isRTL,s=k(i),c=s.triangleSize,f=s.triangleHeight,d=s.triangleWidth,p=s.indicatorSize,h=s.pickerPadding,m=i/2-p/2-h,v=i/2,g=i/2,y=Math.cos(o)*m,w=Math.sin(o)*m,_=3*h,O=3*h,S=-o+Math.PI/3,E="rgba(0,0,0,0.8)",x=l.s,P=l.v,A=P*f,T=d/2-P*(d/2),j=x*(d-2*T)+T,C=(i-d)/2,R=(i-4*f/3)/2,M=(l.h-330+360)%360*Math.PI/180,I={x:i/2,y:i/2},D={x:R+A,y:C+j},N=(0,b.rotatePoint)(D,M,I);return{picker:{padding:h,width:i,height:i},pickerIndicator:(t={top:v+y-p/2},n(t,u?"right":"left",g+w-p/2),n(t,"width",p),n(t,"height",p),n(t,"transform",[{rotate:-o+"rad"}]),t),pickerIndicatorTick:{height:p/2,backgroundColor:E},svIndicator:(r={top:N.x-9},n(r,u?"right":"left",N.y-9),n(r,"width",18),n(r,"height",18),n(r,"borderRadius",9),n(r,"borderColor",E),r),triangleContainer:{width:c,height:c,transform:[{rotate:`${S}rad`}],top:_,left:O},triangleImage:{width:d,height:f},triangleUnderlayingColor:{left:(c-d)/2,borderLeftWidth:d/2,borderRightWidth:d/2,borderBottomWidth:f,borderBottomColor:a},colorPreviews:{height:.1*i}}},O=g.StyleSheet.create({pickerContainer:{flex:1,alignItems:"center",justifyContent:"center"},pickerImage:{flex:1,width:null,height:null},pickerIndicator:{position:"absolute",alignItems:"center",justifyContent:"center"},triangleContainer:{position:"absolute",alignItems:"center"},triangleUnderlayingColor:{position:"absolute",top:0,width:0,height:0,backgroundColor:"transparent",borderStyle:"solid",borderLeftColor:"transparent",borderRightColor:"transparent"},pickerAlignment:{alignItems:"center"},svIndicator:{position:"absolute",borderWidth:4},pickerIndicatorTick:{width:5},colorPreviews:{flexDirection:"row"},colorPreview:{flex:1}})},70298:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TriangleColorPicker=t.ColorPicker=t.toHsv=t.fromHsv=void 0;var n=r(55574);Object.defineProperty(t,"fromHsv",{enumerable:!0,get:function(){return n.fromHsv}}),Object.defineProperty(t,"toHsv",{enumerable:!0,get:function(){return n.toHsv}});var a=r(58953);Object.defineProperty(t,"ColorPicker",{enumerable:!0,get:function(){return a.HoloColorPicker}});var o=r(68646);Object.defineProperty(t,"TriangleColorPicker",{enumerable:!0,get:function(){return o.TriangleColorPicker}})},55574:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.rotatePoint=t.createPanResponder=t.fromHsv=t.toHsv=void 0;var a=n(r(63265)),o=r(31827);t.toHsv=function(e){return(0,a.default)(e).toHsv()},t.fromHsv=function(e){return(0,a.default)(e).toHexString()};var i=function(){return!0};t.createPanResponder=function(e){var t=e.onStart,r=void 0===t?i:t,n=e.onMove,a=void 0===n?i:n,l=e.onEnd,u=void 0===l?i:l;return o.PanResponder.create({onStartShouldSetPanResponder:i,onStartShouldSetPanResponderCapture:i,onMoveShouldSetPanResponder:i,onMoveShouldSetPanResponderCapture:i,onPanResponderTerminationRequest:i,onPanResponderGrant:function(e,t){return r({x:e.nativeEvent.pageX,y:e.nativeEvent.pageY},e,t)},onPanResponderMove:function(e,t){return a({x:e.nativeEvent.pageX,y:e.nativeEvent.pageY},e,t)},onPanResponderRelease:function(e,t){return u({x:e.nativeEvent.pageX,y:e.nativeEvent.pageY},e,t)}})},t.rotatePoint=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0},n=e.x-r.x,a=e.y-r.y,o=n*Math.cos(t)-a*Math.sin(t),i=a*Math.cos(t)+n*Math.sin(t);return{x:o+r.x,y:i+r.y}}},24599:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.register=t.withKnobs=void 0;var a=r(74701),o=(n(r(21939)),n(r(46673))),i=n(r(28432)),l=r(16946);Object.defineProperty(t,"withKnobs",{enumerable:!0,get:function(){return l.withKnobs}}),t.register=function(){o.default.register("RNKNOBS",(function(){var e=o.default.getChannel();o.default.addPanel("RNKNOBS",{title:"Knobs",render:function(t){var r=t.active,n=t.key;return(0,a.jsx)(i.default,{channel:e,active:r},n)},paramKey:"knobs"})}))}},28432:function(e,t,r){"use strict";var n=r(93709),a=r(35527),o=r(78439),i=r(90434),l=r(3755),u=r(23335),s=r(31355);function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{timestamps:!1};this.options=e}},{key:"setKnobs",value:function(e){var t=e.knobs,r=e.timestamp;(!this.options.timestamps||!r||this.lastEdit<=r)&&this.setState({knobs:t})}},{key:"emitChange",value:function(e){this.props.channel.emit(b.CHANGE,e)}},{key:"handleChange",value:function(e){this.lastEdit=O();var t=this.state.knobs,r=e.name,n=f({},t);n[r]=f(f({},n[r]),e),this.setState({knobs:n}),this.setState({knobs:n},this.emitChange("number"===e.type?f(f({},e),{},{value:parseFloat(e.value)}):e))}},{key:"handleClick",value:function(e){this.props.channel.emit(b.CLICK,e)}},{key:"render",value:function(){if(!this.props.active)return null;var e=this.state,t=e.knobs,r=e.groupId,n={},a=[],o=Object.keys(t),i=o.filter((function(e){return t[e].groupId}));i.forEach((function(e){var r=t[e].groupId;a.push(r),n[r]={render:function(){return(0,h.jsx)(v.Text,{id:r,children:r})},title:r}}));var l=a.length>0&&o.length===i.length,u=r===S&&l?t[i[0]].groupId:r;return a.length>0&&(l||(n[S]={render:function(){return(0,h.jsx)(v.Text,{id:S,children:S})},title:S}),u===S&&(o=o.filter((function(e){return!t[e].groupId}))),u!==S&&(o=o.filter((function(e){return t[e].groupId===u})))),0===(o=o.map((function(e){return t[e]}))).length?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(P,{children:"This story is not configured to handle knobs."}),(0,h.jsxs)(P,{children:["Knobs are deprecated, consider migrating"," ",(0,h.jsx)(A,{onPress:function(){return v.Linking.openURL("https://storybook.js.org/docs/react/essentials/controls")},children:"to Storybook controls"})," ","and see"," ",(0,h.jsx)(A,{onPress:function(){return v.Linking.openURL("https://github.com/storybookjs/react-native/tree/next-6.0/examples/expo-example/components/ControlExamples")},children:"examples in the Storybook React Native repository."})]})]}):(0,h.jsxs)(v.View,{style:{flex:1},children:[a.length>0&&(0,h.jsx)(k.default,{groups:n,onGroupSelect:this.onGroupSelect,selectedGroup:u}),(0,h.jsx)(_.default,{knobs:o,onFieldChange:this.handleChange,onFieldClick:this.handleClick}),(0,h.jsx)(E,{onPress:this.reset,children:(0,h.jsx)(x,{children:"RESET"})})]})}}]),r}(m.default.Component);t.default=T,T.propTypes={active:g.default.bool.isRequired,channel:g.default.shape({emit:g.default.func,on:g.default.func,removeListener:g.default.func}).isRequired,onReset:g.default.object}},83724:function(e,t,r){"use strict";var n=r(59046),a=r(93709);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=r(74701),u=i(r(40520)),s=(i(r(21939)),r(31525)),c=r(38540),f=s.styled.TextInput((function(e){var t=e.theme;return function(e){for(var t=1;t{"use strict";var n=r(93709);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t1&&void 0!==arguments[1])||arguments[1];return o(o({backgroundColor:e.inputs.text.backgroundColor,borderWidth:e.inputs.text.borderWidth,borderColor:e.inputs.text.borderColor,borderRadius:e.inputs.text.borderRadius,fontSize:e.inputs.text.fontSize,color:e.inputs.text.textColor,paddingHorizontal:e.inputs.text.paddingHorizontal},i.Platform.select({android:{paddingVertical:t?0:void 0},default:{paddingVertical:e.inputs.text.paddingVertical}})),{},{margin:0})}},55387:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(r(46409)),o=n(r(99683)),i=n(r(21354)),l=n(r(53261)),u=n(r(84346)),s=n(r(11080)),c=n(r(83724)),f=n(r(3592)),d=n(r(40064)),p=n(r(25019));t.default={text:a.default,number:o.default,color:i.default,boolean:l.default,object:u.default,select:s.default,array:c.default,date:f.default,button:d.default,radios:p.default}},21062:(e,t,r)=>{r(24599).register()},48504:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.applyHooks=t.HooksContext=void 0,t.useArgs=function(){var e=l.addons.getChannel(),t=x(),r=t.id,n=t.args,a=_((function(t){return e.emit(i.UPDATE_STORY_ARGS,{storyId:r,updatedArgs:t})}),[e,r]),o=_((function(t){return e.emit(i.RESET_STORY_ARGS,{storyId:r,argNames:t})}),[e,r]);return[n,a,o]},t.useCallback=_,t.useChannel=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=l.addons.getChannel();return E((function(){return Object.entries(e).forEach((function(e){var t=u(e,2),n=t[0],a=t[1];return r.on(n,a)})),function(){Object.entries(e).forEach((function(e){var t=u(e,2),n=t[0],a=t[1];return r.removeListener(n,a)}))}}),[].concat(s(Object.keys(e)),s(t))),_(r.emit.bind(r),[r])},t.useEffect=E,t.useGlobals=function(){var e=l.addons.getChannel(),t=x().globals,r=_((function(t){return e.emit(i.UPDATE_GLOBALS,{globals:t})}),[e]);return[t,r]},t.useMemo=function(e,t){return k("useMemo",e,t)},t.useParameter=function(e,t){var r,n=x().parameters;return e?null!==(r=n[e])&&void 0!==r?r:t:void 0},t.useReducer=function(e,t,r){var n=u(S("useReducer",null!=r?function(){return r(t)}:t),2),a=n[0],o=n[1];return[a,function(t){return o((function(r){return e(r,t)}))}]},t.useRef=function(e){return O("useRef",e)},t.useState=function(e){return S("useState",e)},t.useStoryContext=x,r(68053),r(75785),r(26884),r(61249),r(19387),r(58329),r(46330),r(46797),r(70517),r(28381),r(59849),r(98426),r(64603),r(27757),r(59135),r(25536),r(46970),r(25442),r(13237),r(78744);var a=n(r(78031)),o=r(72144),i=r(51629),l=r(43761);function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,a,o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){l=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(l)throw a}}return o}(e,t)||c(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){if(e){if("string"===typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r25)throw new Error("Too many re-renders. Storybook limits the number of renders to prevent an infinite loop.");return a.addRenderListeners(),o}}};var g=function(e,t){return e.length===t.length&&e.every((function(e,r){return e===t[r]}))},y=function(){return new Error("Storybook preview hooks can only be called inside decorators and story functions.")};function b(){return p.STORYBOOK_HOOKS_CONTEXT||null}function w(){var e=b();if(null==e)throw y();return e}function k(e,t,r){var n=function(e,t,r){var n=w();if("MOUNT"===n.currentPhase){null==r||Array.isArray(r)||o.logger.warn("".concat(e," received a final argument that is not an array (instead, received ").concat(r,"). When specified, the final argument must be an array."));var a={name:e,deps:r};return n.currentHooks.push(a),t(a),a}if("UPDATE"===n.currentPhase){var i=n.getNextHook();if(null==i)throw new Error("Rendered more hooks than during the previous render.");return i.name!==e&&o.logger.warn("Storybook has detected a change in the order of Hooks".concat(n.currentDecoratorName?" called by ".concat(n.currentDecoratorName):"",". This will lead to bugs and errors if not fixed.")),null!=r&&null==i.deps&&o.logger.warn("".concat(e," received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.")),null!=r&&null!=i.deps&&r.length!==i.deps.length&&o.logger.warn("The final argument passed to ".concat(e," changed size between renders. The order and size of this array must remain constant.\nPrevious: ").concat(i.deps,"\nIncoming: ").concat(r)),null!=r&&null!=i.deps&&g(r,i.deps)||(t(i),i.deps=r),i}throw y()}(e,(function(e){e.memoizedState=t()}),r);return n.memoizedState}function _(e,t){return k("useCallback",(function(){return e}),t)}function O(e,t){return k(e,(function(){return{current:t}}),[])}function S(e,t){var r=O(e,"function"===typeof t?t():t);return[r.current,function(e){r.current="function"===typeof e?e(r.current):e,function(){var e=b();if(null!=e&&"NONE"!==e.currentPhase)e.hasUpdates=!0;else try{l.addons.getChannel().emit(i.FORCE_RE_RENDER)}catch(t){o.logger.warn("State updates of Storybook preview hooks work only in browser")}}()}]}function E(e,t){var r=w(),n=k("useEffect",(function(){return{create:e}}),t);r.currentEffects.includes(n)||r.currentEffects.push(n)}function x(){var e=w().currentContext;if(null==e)throw y();return e}},43761:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.AddonStore=void 0,Object.defineProperty(t,"Channel",{enumerable:!0,get:function(){return o.Channel}}),t.addons=void 0,r(56505),r(75785),r(46330),r(4034),r(84186);var a=n(r(78031)),o=r(50483),i=r(72144),l=r(92416),u=r(32038);function s(e,t){for(var r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeDecorator=void 0,r(28381),r(98426);t.makeDecorator=function(e){var t=e.name,r=e.parameterName,n=e.wrapper,a=e.skipIfNoParametersOrOptions,o=void 0!==a&&a,i=function(e){return function(t,a){var i=a.parameters&&a.parameters[r];return i&&i.disable?t(a):!o||e||i?n(t,a,{options:e,parameters:i}):t(a)}};return function(){for(var e=arguments.length,n=new Array(e),a=0;a1)return n.length>1?i(n).apply(void 0,arguments):i.apply(void 0,n).apply(void 0,arguments);throw new Error("Passing stories directly into ".concat(t,"() is not allowed,\n instead use addDecorator(").concat(t,") and pass options with the '").concat(r,"' parameter"))}}}},46673:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={};t.default=void 0;var a=r(43761);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var o=r(77170);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var i=r(32038);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var l=r(92416);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var u=r(48504);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var s=a.addons;t.default=s},92416:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.mockChannel=function(){return new a.default({transport:{setHandler:function(){},send:function(){}}})};var a=n(r(50483))},32038:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.isSupportedType=function(e){return!!Object.values(n).find((function(t){return t===e}))},t.types=void 0,r(13117),r(75785),r(4034),t.types=n,function(e){e.TAB="tab",e.PANEL="panel",e.TOOL="tool",e.TOOLEXTRA="toolextra",e.PREVIEW="preview",e.NOTES_ELEMENT="notes-element"}(n||(t.types=n={}))},66692:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.WebsocketTransport=void 0,t.default=function(e){var t=e.url,r=e.async,n=void 0!==r&&r,a=e.onError,l=new c({url:t,onError:void 0===a?function(e){return i.logger.warn(e)}:a});return new o.Channel({transport:l,async:n})},r(75785),r(46330);var a=n(r(78031)),o=r(50483),i=r(72144),l=r(9259);function u(e,t){for(var r=0;r{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Channel=void 0,r(71114),r(13237),r(75785),r(82632),r(76273),r(27757),r(19373),r(46330);var a,o=n(r(15650)),i=n(r(13005));function l(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},u=l.transport,s=l.async,c=void 0!==s&&s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.isAsync=void 0,this.sender=Math.random().toString(16).slice(2),this.events={},this.data={},this.transport=void 0,this.addPeerListener=(0,o.default)((function(e,t){n.addListener(e,t)}),(0,i.default)(a||(t=["\n channel.addPeerListener is deprecated\n "],r||(r=t.slice(0)),a=Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(r)}}))))),this.isAsync=c,u&&(this.transport=u,this.transport.setHandler((function(e){return n.handleEvent(e)})))}var t,r,n;return t=e,r=[{key:"hasTransport",get:function(){return!!this.transport}},{key:"addListener",value:function(e,t){this.events[e]=this.events[e]||[],this.events[e].push(t)}},{key:"emit",value:function(e){for(var t=this,r=arguments.length,n=new Array(r>1?r-1:0),a=1;a=1&&n[0]&&n[0].options&&(i=n[0].options);var l=function(){t.transport&&t.transport.send(o,i),t.handleEvent(o)};this.isAsync?setImmediate(l):l()}},{key:"last",value:function(e){return this.data[e]}},{key:"eventNames",value:function(){return Object.keys(this.events)}},{key:"listenerCount",value:function(e){var t=this.listeners(e);return t?t.length:0}},{key:"listeners",value:function(e){var t=this.events[e];return t||void 0}},{key:"once",value:function(e,t){var r=this.onceListener(e,t);this.addListener(e,r)}},{key:"removeAllListeners",value:function(e){e?this.events[e]&&delete this.events[e]:this.events={}}},{key:"removeListener",value:function(e,t){var r=this.listeners(e);r&&(this.events[e]=r.filter((function(e){return e!==t})))}},{key:"on",value:function(e,t){this.addListener(e,t)}},{key:"off",value:function(e,t){this.removeListener(e,t)}},{key:"handleEvent",value:function(e){var t=this.listeners(e.type);t&&t.length&&t.forEach((function(t){t.apply(e,e.args)})),this.data[e.type]=e.args}},{key:"onceListener",value:function(e,t){var r=this,n=function n(){return r.removeListener(e,n),t.apply(void 0,arguments)};return n}}],r&&l(t.prototype,r),n&&l(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.Channel=u;var s=u;t.default=s},15013:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.setGlobalRender=t.getGlobalRender=t.addParameters=t.addLoader=t.addDecorator=t.addArgsEnhancer=t.addArgs=t.addArgTypesEnhancer=t.addArgTypes=t.ClientApi=void 0,r(13237),r(71114),r(59135),r(25536),r(46970),r(25442),r(78744),r(68053),r(75785),r(58329),r(26884),r(19387),r(56505),r(65526),r(82632),r(27757),r(98426),r(46330),r(64603),r(28381),r(4034);var a,o,i,l,u,s=n(r(15650)),c=n(r(13005)),f=n(r(78031)),d=r(72144),p=r(14022),h=r(48443),m=r(553),v=["globals","globalTypes"],g=["decorators","loaders","component","args","argTypes"],y=["component","args","argTypes"];function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,a,o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){l=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(l)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return w(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function O(e,t){for(var r=0;r1&&void 0!==arguments[1])||arguments[1]),u.addDecorator(e)};t.addParameters=function(e){A("addParameters",!(arguments.length>1&&void 0!==arguments[1])||arguments[1]),u.addParameters(e)};t.addLoader=function(e){A("addLoader",!(arguments.length>1&&void 0!==arguments[1])||arguments[1]),u.addLoader(e)};t.addArgs=function(e){A("addArgs",!1),u.addArgs(e)};t.addArgTypes=function(e){A("addArgTypes",!1),u.addArgTypes(e)};t.addArgsEnhancer=function(e){A("addArgsEnhancer",!1),u.addArgsEnhancer(e)};t.addArgTypesEnhancer=function(e){A("addArgTypesEnhancer",!1),u.addArgTypesEnhancer(e)};t.getGlobalRender=function(){return A("getGlobalRender",!1),u.facade.projectAnnotations.render};t.setGlobalRender=function(e){A("setGlobalRender",!1),u.facade.projectAnnotations.render=e};var T=new Set(["string","number","boolean","symbol"]),j=function(){function e(){var t=this,r=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).storyStore;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.facade=void 0,this.storyStore=void 0,this.addons=void 0,this.onImportFnChanged=void 0,this.lastFileName=0,this.setAddon=(0,s.default)((function(e){t.addons=Object.assign({},t.addons,e)}),(0,c.default)(i||(i=S(["\n `setAddon` is deprecated and will be removed in Storybook 7.0.\n\n https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-setaddon\n "],["\n \\`setAddon\\` is deprecated and will be removed in Storybook 7.0.\n\n https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-setaddon\n "])))),this.addDecorator=function(e){t.facade.projectAnnotations.decorators.push(e)},this.clearDecorators=(0,s.default)((function(){t.facade.projectAnnotations.decorators=[]}),(0,c.default)(l||(l=S(["\n `clearDecorators` is deprecated and will be removed in Storybook 7.0.\n\n https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-cleardecorators\n "],["\n \\`clearDecorators\\` is deprecated and will be removed in Storybook 7.0.\n\n https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-cleardecorators\n "])))),this.addParameters=function(e){var r=e.globals,n=e.globalTypes,a=_(e,v);t.facade.projectAnnotations.parameters=(0,h.combineParameters)(t.facade.projectAnnotations.parameters,a),r&&(t.facade.projectAnnotations.globals=Object.assign({},t.facade.projectAnnotations.globals,r)),n&&(t.facade.projectAnnotations.globalTypes=Object.assign({},t.facade.projectAnnotations.globalTypes,(0,h.normalizeInputTypes)(n)))},this.addLoader=function(e){t.facade.projectAnnotations.loaders.push(e)},this.addArgs=function(e){t.facade.projectAnnotations.args=Object.assign({},t.facade.projectAnnotations.args,e)},this.addArgTypes=function(e){t.facade.projectAnnotations.argTypes=Object.assign({},t.facade.projectAnnotations.argTypes,(0,h.normalizeInputTypes)(e))},this.addArgsEnhancer=function(e){t.facade.projectAnnotations.argsEnhancers.push(e)},this.addArgTypesEnhancer=function(e){t.facade.projectAnnotations.argTypesEnhancers.push(e)},this.storiesOf=function(e,r){if(!e&&"string"!==typeof e)throw new Error("Invalid or missing kind provided for stories, should be a string");if(r||d.logger.warn("Missing 'module' parameter for story with a kind of '".concat(e,"'. It will break your HMR")),r){var n=Object.getPrototypeOf(r);n.exports&&n.exports.default&&d.logger.error("Illegal mix of CSF default export and storiesOf calls in a single file: ".concat(n.i))}for(var a=r&&r.id?"".concat(r.id):(t.lastFileName++).toString(),o=a,i=1;t.facade.csfExports[o]&&Object.keys(t.facade.csfExports[o]).length>0;)i+=1,o="".concat(a,"-").concat(i);r&&r.hot&&r.hot.accept&&(r.hot.accept(),r.hot.dispose((function(){t.facade.clearFilenameExports(o),setTimeout((function(){var e;null===(e=t.onImportFnChanged)||void 0===e||e.call(t,{importFn:t.importFn.bind(t)})}),0)})));var l=!1,u={kind:e.toString(),add:function(){return u},addDecorator:function(){return u},addLoader:function(){return u},addParameters:function(){return u}};Object.keys(t.addons).forEach((function(e){var r=t.addons[e];u[e]=function(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:{};if(l=!0,"string"!==typeof r)throw new Error('Invalid or missing storyName provided for a "'.concat(e,'" story.'));if(!n||Array.isArray(n)||T.has(k(n)))throw new Error('Cannot load story "'.concat(r,'" in "').concat(e,'" due to invalid format. Storybook expected a function/object but received ').concat(k(n)," instead."));var i=a.decorators,s=a.loaders,f=a.component,d=a.args,h=a.argTypes,m=_(a,g),v=a.__id||(0,p.toId)(e,r),y=t.facade.csfExports[o];return y["story".concat(c)]={name:r,parameters:Object.assign({fileName:o,__id:v},m),decorators:i,loaders:s,args:d,argTypes:h,component:f,render:n},c+=1,t.facade.stories[v]={id:v,title:y.default.title,name:r,importPath:o},u},u.addDecorator=function(e){if(l)throw new Error("You cannot add a decorator after the first story for a kind.\nRead more here: https://github.com/storybookjs/storybook/blob/master/MIGRATION.md#can-no-longer-add-decoratorsparameters-after-stories");return s.decorators.push(e),u},u.addLoader=function(e){if(l)throw new Error("You cannot add a loader after the first story for a kind.");return s.loaders.push(e),u},u.addParameters=function(e){var t=e.component,r=e.args,n=e.argTypes,a=_(e,y);if(l)throw new Error("You cannot add parameters after the first story for a kind.\nRead more here: https://github.com/storybookjs/storybook/blob/master/MIGRATION.md#can-no-longer-add-decoratorsparameters-after-stories");return s.parameters=(0,h.combineParameters)(s.parameters,a),t&&(s.component=t),r&&(s.args=Object.assign({},s.args,r)),n&&(s.argTypes=Object.assign({},s.argTypes,n)),u},u},this.getStorybook=function(){var e=t.storyStore.storyIndex.stories,r={};return Object.entries(e).forEach((function(e){var n=b(e,2),a=n[0],o=n[1],i=o.title,l=o.name,u=o.importPath;r[i]||(r[i]={kind:i,fileName:u,stories:[]});var s=t.storyStore.fromId(a).storyFn;r[i].stories.push({name:l,render:s})})),Object.values(r)},this.raw=function(){return t.storyStore.raw()},this.facade=new m.StoryStoreFacade,this.addons={},this.storyStore=r,u=this}var t,r,n;return t=e,(r=[{key:"importFn",value:function(e){return this.facade.importFn(e)}},{key:"getStoryIndex",value:function(){if(!this.storyStore)throw new Error("Cannot get story index before setting storyStore");return this.facade.getStoryIndex(this.storyStore)}},{key:"_storyStore",get:function(){return this.storyStore}}])&&O(t.prototype,r),n&&O(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.ClientApi=j},553:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.StoryStoreFacade=void 0,r(59135),r(25536),r(46970),r(68053),r(26884),r(19387),r(13237),r(25442),r(71114),r(27757),r(64603),r(59849),r(75785),r(46330),r(56505),r(88232),r(78744),r(82632),r(98426),r(19373),r(28381);var a,o=n(r(78031)),i=n(r(13005)),l=r(35130),u=r(14022),s=r(48443),c=r(72144),f=["default","__namedExportsOrder"];function d(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,a,o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){l=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(l)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return h(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r ","\n \n Are you using a V7-style sort function in V6 compatibility mode?\n \n More info: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#v7-style-story-sort\n "],l||(l=o.slice(0)),a=Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(l)}}))),f,h.message));throw h}return{v:3,stories:n.reduce((function(e,t){return e[t.id]=u.stories[t.id],e}),{})}}},{key:"clearFilenameExports",value:function(e){var t=this;this.csfExports[e]&&(Object.entries(this.stories).forEach((function(r){var n=p(r,2),a=n[0];n[1].importPath===e&&delete t.stories[a]})),this.csfExports[e]={})}},{key:"addStoriesFromExports",value:function(e,t){var r=this;if(this.csfExports[e]!==t){this.clearFilenameExports(e);var n=t.default,a=t.__namedExportsOrder,i=d(t,f),l=n||{},h=l.id,m=l.title,v=(o.default.STORIES||[]).map((function(e){return Object.assign({},e,{importPathMatcher:new RegExp(e.importPathMatcher)})}));if(m=(0,s.userOrAutoTitle)(e,v,m)){this.csfExports[e]=Object.assign({},t,{default:Object.assign({},n,{title:m})});var g=i;Array.isArray(a)&&(g={},a.forEach((function(e){var t=i[e];t&&(g[e]=t)}))),Object.entries(g).filter((function(e){var t=p(e,1)[0];return(0,u.isExportStory)(t,n)})).forEach((function(t){var n,a,o=p(t,2),i=o[0],l=o[1],s=(0,u.storyNameFromExport)(i),c=(null===(n=l.parameters)||void 0===n?void 0:n.__id)||(0,u.toId)(h||m,s),f="function"!==typeof l&&l.name||l.storyName||(null===(a=l.story)||void 0===a?void 0:a.name)||s;r.stories[c]={id:c,name:f,title:m,importPath:e}}))}else c.logger.info("Unexpected default export without title in '".concat(e,"': ").concat(JSON.stringify(t.default)))}}}],r&&m(t.prototype,r),n&&m(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.StoryStoreFacade=v},22890:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={ClientApi:!0,addDecorator:!0,addParameters:!0,addLoader:!0,addArgs:!0,addArgTypes:!0,addArgsEnhancer:!0,addArgTypesEnhancer:!0,setGlobalRender:!0};Object.defineProperty(t,"ClientApi",{enumerable:!0,get:function(){return a.ClientApi}}),Object.defineProperty(t,"addArgTypes",{enumerable:!0,get:function(){return a.addArgTypes}}),Object.defineProperty(t,"addArgTypesEnhancer",{enumerable:!0,get:function(){return a.addArgTypesEnhancer}}),Object.defineProperty(t,"addArgs",{enumerable:!0,get:function(){return a.addArgs}}),Object.defineProperty(t,"addArgsEnhancer",{enumerable:!0,get:function(){return a.addArgsEnhancer}}),Object.defineProperty(t,"addDecorator",{enumerable:!0,get:function(){return a.addDecorator}}),Object.defineProperty(t,"addLoader",{enumerable:!0,get:function(){return a.addLoader}}),Object.defineProperty(t,"addParameters",{enumerable:!0,get:function(){return a.addParameters}}),Object.defineProperty(t,"setGlobalRender",{enumerable:!0,get:function(){return a.setGlobalRender}});var a=r(15013),o=r(44733);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var i=r(43866);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var l=r(48443);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}))},43866:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.getQueryParams=t.getQueryParam=void 0,r(78744),r(32577);var a=n(r(78031)),o=r(56582),i=a.default.document,l=function(){return i&&i.location&&i.location.search?(0,o.parse)(i.location.search,{ignoreQueryPrefix:!0}):{}};t.getQueryParams=l;t.getQueryParam=function(e){return l()[e]}},44733:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},72144:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.pretty=t.once=t.logger=void 0,r(98426),r(68053),r(75785),r(58329),r(26884),r(19387),r(78744),r(25105);var a=n(r(78031)),o=a.default.LOGLEVEL,i=a.default.console,l={trace:1,debug:2,info:3,warn:4,error:5,silent:10},u=l[o]||l.info,s={trace:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n1?r-1:0),a=1;a/gi;for(t.push(n[0].replace(i,"%c").replace(/<\/span>/gi,"%c"));o=i.exec(n[0]);)t.push(o[2]),t.push("");for(var l=1;l{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.UPDATE_STORY_ARGS=t.UPDATE_QUERY_PARAMS=t.UPDATE_GLOBALS=t.STORY_UNCHANGED=t.STORY_THREW_EXCEPTION=t.STORY_SPECIFIED=t.STORY_RENDER_PHASE_CHANGED=t.STORY_RENDERED=t.STORY_PREPARED=t.STORY_MISSING=t.STORY_INDEX_INVALIDATED=t.STORY_ERRORED=t.STORY_CHANGED=t.STORY_ARGS_UPDATED=t.STORIES_EXPAND_ALL=t.STORIES_COLLAPSE_ALL=t.SHARED_STATE_SET=t.SHARED_STATE_CHANGED=t.SET_STORIES=t.SET_GLOBALS=t.SET_CURRENT_STORY=t.SELECT_STORY=t.RESET_STORY_ARGS=t.REGISTER_SUBSCRIPTION=t.PREVIEW_KEYDOWN=t.PRELOAD_STORIES=t.NAVIGATE_URL=t.IGNORED_EXCEPTION=t.GLOBALS_UPDATED=t.FORCE_RE_RENDER=t.FORCE_REMOUNT=t.DOCS_RENDERED=t.CURRENT_STORY_WAS_SET=t.CONFIG_ERROR=t.CHANNEL_CREATED=void 0,function(e){e.CHANNEL_CREATED="channelCreated",e.CONFIG_ERROR="configError",e.STORY_INDEX_INVALIDATED="storyIndexInvalidated",e.STORY_SPECIFIED="storySpecified",e.SET_STORIES="setStories",e.SET_CURRENT_STORY="setCurrentStory",e.CURRENT_STORY_WAS_SET="currentStoryWasSet",e.FORCE_RE_RENDER="forceReRender",e.FORCE_REMOUNT="forceRemount",e.PRELOAD_STORIES="preloadStories",e.STORY_PREPARED="storyPrepared",e.STORY_CHANGED="storyChanged",e.STORY_UNCHANGED="storyUnchanged",e.STORY_RENDERED="storyRendered",e.STORY_MISSING="storyMissing",e.STORY_ERRORED="storyErrored",e.STORY_THREW_EXCEPTION="storyThrewException",e.STORY_RENDER_PHASE_CHANGED="storyRenderPhaseChanged",e.UPDATE_STORY_ARGS="updateStoryArgs",e.STORY_ARGS_UPDATED="storyArgsUpdated",e.RESET_STORY_ARGS="resetStoryArgs",e.SET_GLOBALS="setGlobals",e.UPDATE_GLOBALS="updateGlobals",e.GLOBALS_UPDATED="globalsUpdated",e.REGISTER_SUBSCRIPTION="registerSubscription",e.PREVIEW_KEYDOWN="previewKeydown",e.SELECT_STORY="selectStory",e.STORIES_COLLAPSE_ALL="storiesCollapseAll",e.STORIES_EXPAND_ALL="storiesExpandAll",e.DOCS_RENDERED="docsRendered",e.SHARED_STATE_CHANGED="sharedStateChanged",e.SHARED_STATE_SET="sharedStateSet",e.NAVIGATE_URL="navigateUrl",e.UPDATE_QUERY_PARAMS="updateQueryParams"}(r||(r={}));var n=r;t.default=n;var a=r.CHANNEL_CREATED,o=r.CONFIG_ERROR,i=r.STORY_INDEX_INVALIDATED,l=r.STORY_SPECIFIED,u=r.SET_STORIES,s=r.SET_CURRENT_STORY,c=r.CURRENT_STORY_WAS_SET,f=r.FORCE_RE_RENDER,d=r.FORCE_REMOUNT,p=r.STORY_PREPARED,h=r.STORY_CHANGED,m=r.STORY_UNCHANGED,v=r.PRELOAD_STORIES,g=r.STORY_RENDERED,y=r.STORY_MISSING,b=r.STORY_ERRORED,w=r.STORY_THREW_EXCEPTION,k=r.STORY_RENDER_PHASE_CHANGED,_=r.UPDATE_STORY_ARGS,O=r.STORY_ARGS_UPDATED,S=r.RESET_STORY_ARGS,E=r.SET_GLOBALS,x=r.UPDATE_GLOBALS,P=r.GLOBALS_UPDATED,A=r.REGISTER_SUBSCRIPTION,T=r.PREVIEW_KEYDOWN,j=r.SELECT_STORY,C=r.STORIES_COLLAPSE_ALL,R=r.STORIES_EXPAND_ALL,M=r.DOCS_RENDERED,I=r.SHARED_STATE_CHANGED,D=r.SHARED_STATE_SET,N=r.NAVIGATE_URL,F=r.UPDATE_QUERY_PARAMS;t.UPDATE_QUERY_PARAMS=F,t.NAVIGATE_URL=N,t.SHARED_STATE_SET=D,t.SHARED_STATE_CHANGED=I,t.DOCS_RENDERED=M,t.STORIES_EXPAND_ALL=R,t.STORIES_COLLAPSE_ALL=C,t.SELECT_STORY=j,t.PREVIEW_KEYDOWN=T,t.REGISTER_SUBSCRIPTION=A,t.GLOBALS_UPDATED=P,t.UPDATE_GLOBALS=x,t.SET_GLOBALS=E,t.RESET_STORY_ARGS=S,t.STORY_ARGS_UPDATED=O,t.UPDATE_STORY_ARGS=_,t.STORY_RENDER_PHASE_CHANGED=k,t.STORY_THREW_EXCEPTION=w,t.STORY_ERRORED=b,t.STORY_MISSING=y,t.STORY_RENDERED=g,t.PRELOAD_STORIES=v,t.STORY_UNCHANGED=m,t.STORY_CHANGED=h,t.STORY_PREPARED=p,t.FORCE_REMOUNT=d,t.FORCE_RE_RENDER=f,t.CURRENT_STORY_WAS_SET=c,t.SET_CURRENT_STORY=s,t.SET_STORIES=u,t.STORY_SPECIFIED=l,t.STORY_INDEX_INVALIDATED=i,t.CONFIG_ERROR=o,t.CHANNEL_CREATED=a;var V=new Error("ignoredException");t.IGNORED_EXCEPTION=V},72139:()=>{},40116:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.includeConditionalArg=t.testValue=void 0;var n,a=(n=r(38322))&&n.__esModule?n:{default:n};var o=function(e){return e.map((function(e){return"undefined"!==typeof e})).filter(Boolean).length},i=function(e,t){var r=e,n=r.exists,i=r.eq,l=r.neq,u=r.truthy;if(o([n,i,l,u])>1)throw new Error("Invalid conditional test ".concat(JSON.stringify({exists:n,eq:i,neq:l})));if("undefined"!==typeof i)return(0,a.default)(t,i);if("undefined"!==typeof l)return!(0,a.default)(t,l);if("undefined"!==typeof n){var s="undefined"!==typeof t;return n?s:!s}return"undefined"===typeof u||u?!!t:!t};t.testValue=i;t.includeConditionalArg=function(e,t,r){if(!e.if)return!0;var n=e.if,a=n.arg,l=n.global;if(1!==o([a,l]))throw new Error("Invalid conditional value ".concat(JSON.stringify({arg:a,global:l})));var u=a?t[a]:r[l];return i(e.if,u)}},14022:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={sanitize:!0,toId:!0,storyNameFromExport:!0,isExportStory:!0,parseKind:!0,includeConditionalArg:!0};t.isExportStory=function(e,t){var r=t.includeStories,n=t.excludeStories;return"__esModule"!==e&&(!r||d(e,r))&&(!n||!d(e,n))},Object.defineProperty(t,"includeConditionalArg",{enumerable:!0,get:function(){return i.includeConditionalArg}}),t.parseKind=t.storyNameFromExport=t.toId=t.sanitize=void 0;var a,o=(a=r(14535))&&a.__esModule?a:{default:a},i=r(40116),l=r(83983);function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(n=(i=l.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(u){a=!0,o=u}finally{try{n||null==l.return||l.return()}finally{if(a)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")};t.sanitize=c;var f=function(e,t){var r=c(e);if(""===r)throw new Error("Invalid ".concat(t," '").concat(e,"', must include alphanumeric characters"));return r};t.toId=function(e,t){return"".concat(f(e,"kind")).concat(t?"--".concat(f(t,"name")):"")};function d(e,t){return Array.isArray(t)?t.includes(e):e.match(t)}t.storyNameFromExport=function(e){return(0,o.default)(e)};t.parseKind=function(e,t){var r=t.rootSeparator,n=t.groupSeparator,a=u(e.split(r,2),2),o=a[0],i=a[1];return{root:i?o:null,groups:(i||e).split(n).filter((function(e){return!!e}))}}},83983:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(72139);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}))},29931:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.DocsRender=void 0;var a=n(r(99326));r(32688),r(28381),r(56505),r(75785),r(84186);var o=n(r(78031)),i=r(51629);function l(e,t,r,n,a,o,i){try{var l=e[o](i),u=l.value}catch(s){return void r(s)}l.done?t(u):Promise.resolve(u).then(n,a)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){l(o,n,a,i,u,"next",e)}function u(e){l(o,n,a,i,u,"throw",e)}i(void 0)}))}}function s(e,t){for(var r=0;r0&&void 0!==t[0]?t[0]:{}).viewModeChanged&&this.canvasElement){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,r.e(44).then(r.bind(r,29044));case 5:e.sent.unmountDocs(this.canvasElement);case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}],l=[{key:"fromStoryRender",value:function(t){return new e(t.channel,t.store,t.id,t.story)}}],n&&s(t.prototype,n),l&&s(t,l),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.DocsRender=c,c.displayName="DocsRender"},60979:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.Preview=void 0;var a=n(r(99326));r(13237),r(71114),r(59135),r(25536),r(46970),r(25442),r(28381),r(78744),r(32688),r(75785),r(84186),r(68053),r(26884),r(19387),r(59849),r(19373),r(13117),r(58329),r(98426),r(27757);var o,i,l=n(r(13005)),u=n(r(78031)),s=r(35130),c=r(51629),f=r(72144),d=r(46673),p=r(48443),h=r(27810);function m(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return v(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return v(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==n[1]?n[1]:{}).viewModeChanged,this.storyRenders=this.storyRenders.filter((function(e){return e!==t})),e.next=4,null===t||void 0===t?void 0:t.teardown({viewModeChanged:r});case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"extract",value:function(){var e=y(a.default.mark((function e(t){var r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.previewEntryError){e.next=2;break}throw this.previewEntryError;case 2:if(this.storyStore.projectAnnotations){e.next=4;break}throw new Error((0,l.default)(i||(i=b(["Failed to initialize Storybook.\n \n Do you have an error in your `preview.js`? Check your Storybook's browser console for errors."],["Failed to initialize Storybook.\n \n Do you have an error in your \\`preview.js\\`? Check your Storybook's browser console for errors."]))));case 4:if(null===(r=u.default.FEATURES)||void 0===r||!r.storyStoreV7){e.next=7;break}return e.next=7,this.storyStore.cacheAllCSFFiles();case 7:return e.abrupt("return",this.storyStore.extract(t));case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"inlineStoryCallbacks",value:function(e){return{showMain:function(){},showError:function(t){return f.logger.error("Error rendering docs story (".concat(e,")"),t)},showException:function(t){return f.logger.error("Error rendering docs story (".concat(e,")"),t)}}}},{key:"renderPreviewEntryError",value:function(e,t){this.previewEntryError=t,f.logger.error(e),f.logger.error(t),this.channel.emit(c.CONFIG_ERROR,t)}}],r&&w(t.prototype,r),n&&w(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.Preview=_},97082:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.PreviewWeb=void 0;var a=n(r(99326));r(65526),r(32440),r(78705),r(79041),r(13237),r(71114),r(46970),r(32688),r(78744),r(56505),r(68053),r(75785),r(84186),r(26884),r(19387),r(59849),r(19373),r(59135),r(25536),r(98426);var o,i,l,u,s=n(r(15650)),c=n(r(13005)),f=n(r(78031)),d=r(51629),p=r(72144),h=r(60979),m=r(73796),v=r(51606),g=r(27810),y=r(29931);function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function w(e,t,r,n,a,o,i){try{var l=e[o](i),u=l.value}catch(s){return void r(s)}l.done?t(u):Promise.resolve(u).then(n,a)}function k(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){w(o,n,a,i,l,"next",e)}function l(e){w(o,n,a,i,l,"throw",e)}i(void 0)}))}}function _(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function O(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:new m.UrlStore,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new v.WebView;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),(e=h.call(this)).urlStore=void 0,e.view=void 0,e.previewEntryError=void 0,e.currentSelection=void 0,e.currentRender=void 0,e.view=r,e.urlStore=t,e.storyStore.getSelection=(0,s.default)((function(){return e.urlStore.selection}),(0,c.default)(o||(o=_(["\n `__STORYBOOK_STORY_STORE__.getSelection()` is deprecated and will be removed in 7.0.\n \n To get the current selection, use the `useStoryContext()` hook from `@storybook/addons`.\n "],["\n \\`__STORYBOOK_STORY_STORE__.getSelection()\\` is deprecated and will be removed in 7.0.\n \n To get the current selection, use the \\`useStoryContext()\\` hook from \\`@storybook/addons\\`.\n "])))),e}return t=b,r=[{key:"setupListeners",value:function(){S(P(b.prototype),"setupListeners",this).call(this),A.onkeydown=this.onKeydown.bind(this),this.channel.on(d.SET_CURRENT_STORY,this.onSetCurrentStory.bind(this)),this.channel.on(d.UPDATE_QUERY_PARAMS,this.onUpdateQueryParams.bind(this)),this.channel.on(d.PRELOAD_STORIES,this.onPreloadStories.bind(this))}},{key:"initializeWithProjectAnnotations",value:function(e){var t=this;return S(P(b.prototype),"initializeWithProjectAnnotations",this).call(this,e).then((function(){return t.setInitialGlobals()}))}},{key:"setInitialGlobals",value:function(){var e=k(a.default.mark((function e(){var t,r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.urlStore.selectionSpecifier||{},(r=t.globals)&&this.storyStore.globals.updateFromPersisted(r),this.emitGlobals();case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"initializeWithStoryIndex",value:function(e){var t=this;return S(P(b.prototype),"initializeWithStoryIndex",this).call(this,e).then((function(){var e;return null!==(e=f.default.FEATURES)&&void 0!==e&&e.storyStoreV7||t.channel.emit(d.SET_STORIES,t.storyStore.getSetStoriesPayload()),t.selectSpecifiedStory()}))}},{key:"selectSpecifiedStory",value:function(){var e=k(a.default.mark((function e(){var t,r,n,o,u;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.urlStore.selectionSpecifier){e.next=3;break}return this.renderMissingStory(),e.abrupt("return");case 3:if(t=this.urlStore.selectionSpecifier,r=t.storySpecifier,n=t.viewMode,o=t.args,u=this.storyStore.storyIndex.storyIdFromSpecifier(r)){e.next=8;break}return"*"===r?this.renderStoryLoadingException(r,new Error((0,c.default)(i||(i=_(["\n Couldn't find any stories in your Storybook.\n - Please check your stories field of your main.js config.\n - Also check the browser console and terminal for error messages.\n "]))))):this.renderStoryLoadingException(r,new Error((0,c.default)(l||(l=_(["\n Couldn't find story matching '","'.\n - Are you sure a story with that id exists?\n - Please check your stories field of your main.js config.\n - Also check the browser console and terminal for error messages.\n "])),r))),e.abrupt("return");case 8:return this.urlStore.setSelection({storyId:u,viewMode:n}),this.channel.emit(d.STORY_SPECIFIED,this.urlStore.selection),this.channel.emit(d.CURRENT_STORY_WAS_SET,this.urlStore.selection),e.next=13,this.renderSelection({persistedArgs:o});case 13:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"onGetProjectAnnotationsChanged",value:function(){var e=k(a.default.mark((function e(t){var r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.getProjectAnnotations,e.next=3,S(P(b.prototype),"onGetProjectAnnotationsChanged",this).call(this,{getProjectAnnotations:r});case 3:this.renderSelection();case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"onStoriesChanged",value:function(){var e=k(a.default.mark((function e(t){var r,n,o;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.importFn,o=t.storyIndex,S(P(b.prototype),"onStoriesChanged",this).call(this,{importFn:n,storyIndex:o}),null!==(r=f.default.FEATURES)&&void 0!==r&&r.storyStoreV7){e.next=9;break}return e.t0=this.channel,e.t1=d.SET_STORIES,e.next=7,this.storyStore.getSetStoriesPayload();case 7:e.t2=e.sent,e.t0.emit.call(e.t0,e.t1,e.t2);case 9:if(!this.urlStore.selection){e.next=14;break}return e.next=12,this.renderSelection();case 12:e.next=16;break;case 14:return e.next=16,this.selectSpecifiedStory();case 16:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"onKeydown",value:function(e){var t;if((null===(t=this.currentRender)||void 0===t||!t.disableKeyListeners)&&!function(e){var t=e.target;return/input|textarea/i.test(t.tagName)||null!==t.getAttribute("contenteditable")}(e)){var r=e.altKey,n=e.ctrlKey,a=e.metaKey,o=e.shiftKey,i=e.key,l=e.code,u=e.keyCode;this.channel.emit(d.PREVIEW_KEYDOWN,{event:{altKey:r,ctrlKey:n,metaKey:a,shiftKey:o,key:i,code:l,keyCode:u}})}}},{key:"onSetCurrentStory",value:function(e){this.urlStore.setSelection(Object.assign({viewMode:"story"},e)),this.channel.emit(d.CURRENT_STORY_WAS_SET,this.urlStore.selection),this.renderSelection()}},{key:"onUpdateQueryParams",value:function(e){this.urlStore.setQueryParams(e)}},{key:"onUpdateGlobals",value:function(){var e=k(a.default.mark((function e(t){var r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.globals,S(P(b.prototype),"onUpdateGlobals",this).call(this,{globals:r}),!(this.currentRender instanceof y.DocsRender)){e.next=5;break}return e.next=5,this.currentRender.rerender(!0);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"onUpdateArgs",value:function(){var e=k(a.default.mark((function e(t){var r,n;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.storyId,n=t.updatedArgs,S(P(b.prototype),"onUpdateArgs",this).call(this,{storyId:r,updatedArgs:n}),!(this.currentRender instanceof y.DocsRender)){e.next=5;break}return e.next=5,this.currentRender.rerender(!1);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"onPreloadStories",value:function(){var e=k(a.default.mark((function e(t){var r=this;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){return r.storyStore.loadStory({storyId:e})})));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"renderSelection",value:function(){var e=k(a.default.mark((function e(){var t,r,n,o,i,l,u,s,c,p,h,m,v,b,w,k,_,O,S=this,E=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(E.length>0&&void 0!==E[0]?E[0]:{}).persistedArgs,l=this.urlStore.selection){e.next=4;break}throw new Error("Cannot render story as no selection was made");case 4:if(u=l.storyId,s=(null===(t=this.currentSelection)||void 0===t?void 0:t.storyId)!==u,c=(null===(r=this.currentSelection)||void 0===r?void 0:r.viewMode)!==l.viewMode,"story"===l.viewMode?this.view.showPreparingStory({immediate:c}):this.view.showPreparingDocs(),p=this.currentSelection,h=this.currentRender,null===(n=h)||void 0===n||!n.isPreparing()){e.next=14;break}return e.next=13,this.teardownRender(h);case 13:h=null;case 14:return m=new g.StoryRender(this.channel,this.storyStore,(function(){return S.view.showStoryDuringRender(),S.renderToDOM.apply(S,arguments)}),this.mainStoryCallbacks(u),u,"story"),this.currentSelection=l,this.currentRender=m,e.prev=17,e.next=20,m.prepare();case 20:e.next=29;break;case 22:if(e.prev=22,e.t0=e.catch(17),e.t0===g.PREPARE_ABORTED){e.next=28;break}return e.next=27,this.teardownRender(h);case 27:this.renderStoryLoadingException(u,e.t0);case 28:return e.abrupt("return");case 29:if(v=!s&&!m.isEqual(h),i&&this.storyStore.args.updateFromPersisted(m.story,i),b=m.context(),w=b.parameters,k=b.initialArgs,_=b.argTypes,O=b.args,!h||s||v||c){e.next=37;break}return this.currentRender=h,this.channel.emit(d.STORY_UNCHANGED,u),this.view.showMain(),e.abrupt("return");case 37:return e.next=39,this.teardownRender(h,{viewModeChanged:c});case 39:p&&(s||c)&&this.channel.emit(d.STORY_CHANGED,u),null!==(o=f.default.FEATURES)&&void 0!==o&&o.storyStoreV7&&this.channel.emit(d.STORY_PREPARED,{id:u,parameters:w,initialArgs:k,argTypes:_,args:O}),(v||i)&&this.channel.emit(d.STORY_ARGS_UPDATED,{storyId:u,args:O}),"docs"===l.viewMode||w.docsOnly?(this.currentRender=y.DocsRender.fromStoryRender(m),this.currentRender.renderToElement(this.view.prepareForDocs(),this.renderStoryToElement.bind(this))):(this.storyRenders.push(m),this.currentRender.renderToElement(this.view.prepareForStory(m.story)));case 43:case"end":return e.stop()}}),e,this,[[17,22]])})));return function(){return e.apply(this,arguments)}}()},{key:"renderStoryToElement",value:function(e,t){var r=this,n=new g.StoryRender(this.channel,this.storyStore,this.renderToDOM,this.inlineStoryCallbacks(e.id),e.id,"docs",e);return n.renderToElement(t),this.storyRenders.push(n),k(a.default.mark((function e(){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.teardownRender(n);case 2:case"end":return e.stop()}}),e)})))}},{key:"teardownRender",value:function(){var e=k(a.default.mark((function e(t){var r,n=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(n.length>1&&void 0!==n[1]?n[1]:{}).viewModeChanged,this.storyRenders=this.storyRenders.filter((function(e){return e!==t})),e.next=4,null===t||void 0===t?void 0:t.teardown({viewModeChanged:r});case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"extract",value:function(){var e=k(a.default.mark((function e(t){var r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.previewEntryError){e.next=2;break}throw this.previewEntryError;case 2:if(this.storyStore.projectAnnotations){e.next=4;break}throw new Error((0,c.default)(u||(u=_(["Failed to initialize Storybook.\n \n Do you have an error in your `preview.js`? Check your Storybook's browser console for errors."],["Failed to initialize Storybook.\n \n Do you have an error in your \\`preview.js\\`? Check your Storybook's browser console for errors."]))));case 4:if(null===(r=f.default.FEATURES)||void 0===r||!r.storyStoreV7){e.next=7;break}return e.next=7,this.storyStore.cacheAllCSFFiles();case 7:return e.abrupt("return",this.storyStore.extract(t));case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"mainStoryCallbacks",value:function(e){var t=this;return{showMain:function(){return t.view.showMain()},showError:function(r){return t.renderError(e,r)},showException:function(r){return t.renderException(e,r)}}}},{key:"inlineStoryCallbacks",value:function(e){return{showMain:function(){},showError:function(t){return p.logger.error("Error rendering docs story (".concat(e,")"),t)},showException:function(t){return p.logger.error("Error rendering docs story (".concat(e,")"),t)}}}},{key:"renderPreviewEntryError",value:function(e,t){S(P(b.prototype),"renderPreviewEntryError",this).call(this,e,t),this.view.showErrorDisplay(t)}},{key:"renderMissingStory",value:function(){this.view.showNoPreview(),this.channel.emit(d.STORY_MISSING)}},{key:"renderStoryLoadingException",value:function(e,t){p.logger.error("Unable to load story '".concat(e,"':")),p.logger.error(t),this.view.showErrorDisplay(t),this.channel.emit(d.STORY_MISSING,e)}},{key:"renderException",value:function(e,t){this.channel.emit(d.STORY_THREW_EXCEPTION,t),this.channel.emit(d.STORY_RENDER_PHASE_CHANGED,{newPhase:"errored",storyId:e}),t!==d.IGNORED_EXCEPTION&&(this.view.showErrorDisplay(t),p.logger.error("Error rendering story '".concat(e,"':")),p.logger.error(t))}},{key:"renderError",value:function(e,t){var r=t.title,n=t.description;p.logger.error("Error rendering story ".concat(r,": ").concat(n)),this.channel.emit(d.STORY_ERRORED,{title:r,description:n}),this.channel.emit(d.STORY_RENDER_PHASE_CHANGED,{newPhase:"errored",storyId:e}),this.view.showErrorDisplay({message:r,stack:n})}}],r&&O(t.prototype,r),n&&O(t,n),Object.defineProperty(t,"prototype",{writable:!1}),b}(h.Preview);t.PreviewWeb=T},27810:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.StoryRender=t.PREPARE_ABORTED=void 0;var a=n(r(99326));r(46797),r(28381),r(56505),r(75785),r(84186),r(32688);var o=n(r(78031)),i=r(51629);function l(e,t,r,n,a,o,i){try{var l=e[o](i),u=l.value}catch(s){return void r(s)}l.done?t(u):Promise.resolve(u).then(n,a)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){l(o,n,a,i,u,"next",e)}function u(e){l(o,n,a,i,u,"throw",e)}i(void 0)}))}}function s(e,t){for(var r=0;r0&&void 0!==O[0]?O[0]:{}).initial,n=void 0!==r&&r,o=t.forceRemount,l=void 0!==o&&o,this.story){e.next=3;break}throw new Error("cannot render when not prepared");case 3:return s=this.story,c=s.id,d=s.componentId,p=s.title,h=s.name,m=s.applyLoaders,v=s.unboundStoryFn,g=s.playFunction,l&&!n&&(this.cancelRender(),this.abortController=f()),y=this.abortController.signal,e.prev=6,e.next=9,this.runPhase(y,"loading",u(a.default.mark((function e(){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m(Object.assign({},_.context(),{viewMode:_.viewMode}));case 2:b=e.sent;case 3:case"end":return e.stop()}}),e)}))));case 9:if(!y.aborted){e.next=11;break}return e.abrupt("return");case 11:return w=Object.assign({},b,this.context(),{abortSignal:y,canvasElement:this.canvasElement}),k=Object.assign({componentId:d,title:p,kind:p,id:c,name:h,story:h},this.callbacks,{forceRemount:l||this.notYetRendered,storyContext:w,storyFn:function(){return v(w)},unboundStoryFn:v}),e.next=15,this.runPhase(y,"rendering",u(a.default.mark((function e(){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",_.renderToScreen(k,_.canvasElement));case 1:case"end":return e.stop()}}),e)}))));case 15:if(this.notYetRendered=!1,!y.aborted){e.next=18;break}return e.abrupt("return");case 18:if(!l||!g){e.next=27;break}return this.disableKeyListeners=!0,e.next=22,this.runPhase(y,"playing",u(a.default.mark((function e(){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",g(k.storyContext));case 1:case"end":return e.stop()}}),e)}))));case 22:return e.next=24,this.runPhase(y,"played");case 24:if(this.disableKeyListeners=!1,!y.aborted){e.next=27;break}return e.abrupt("return");case 27:return e.next=29,this.runPhase(y,"completed",u(a.default.mark((function e(){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",_.channel.emit(i.STORY_RENDERED,c));case 1:case"end":return e.stop()}}),e)}))));case 29:e.next=34;break;case 31:e.prev=31,e.t0=e.catch(6),this.callbacks.showException(e.t0);case 34:case"end":return e.stop()}}),e,this,[[6,31]])})));return function(){return e.apply(this,arguments)}}()},{key:"rerender",value:function(){var e=u(a.default.mark((function e(){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.render());case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"remount",value:function(){var e=u(a.default.mark((function e(){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.render({forceRemount:!0}));case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"cancelRender",value:function(){this.abortController.abort()}},{key:"teardown",value:function(){var e=u(a.default.mark((function e(){var t;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.cancelRender(),this.story&&this.store.cleanupStory(this.story),t=0;case 4:if(!(t<3)){e.next=12;break}if(this.isPending()){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,new Promise((function(e){return setTimeout(e,0)}));case 9:t+=1,e.next=4;break;case 12:return o.default.window.location.reload(),e.next=15,new Promise((function(){}));case 15:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}],r&&s(t.prototype,r),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.StoryRender=p,p.displayName="StoryRender"},73796:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.getSelectionSpecifierFromPath=t.UrlStore=void 0,t.pathToId=h,t.setPath=void 0,r(27757),r(59135),r(25536),r(75785),r(46970),r(68053),r(26884),r(19387),r(78744),r(15001),r(32577),r(56505),r(98426),r(4034);var a=n(r(78031)),o=n(r(56582)),i=n(r(15650)),l=r(92910),u=["path","selectedKind","selectedStory"];function s(e,t){for(var r=0;r=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var d=a.default.history,p=a.default.document;function h(e){var t=(e||"").match(/^\/story\/(.+)/);if(!t)throw new Error("Invalid path '".concat(e,"', must start with '/story/'"));return t[1]}var m=function(e){var t=e.selection,r=e.extraParams,n=p.location.search,a=void 0===n?"":n,i=o.default.parse(a,{ignoreQueryPrefix:!0}),l=(i.path,i.selectedKind,i.selectedStory,f(i,u));return o.default.stringify(Object.assign({},l,r,t&&{id:t.storyId,viewMode:t.viewMode}),{encode:!1,addQueryPrefix:!0})},v=function(e){if(e){var t=m({selection:e}),r=p.location.hash,n=void 0===r?"":r;p.title=e.storyId,d.replaceState({},"","".concat(p.location.pathname).concat(t).concat(n))}};t.setPath=v;var g=function e(t){return"string"===typeof t?t:Array.isArray(t)?e(t[0]):null!=(r=t)&&"object"===c(r)&&!1===Array.isArray(r)?e(Object.values(t)):void 0;var r},y=(0,i.default)((function(){return 0}),"URL formats with `selectedKind` and `selectedName` query parameters are deprecated.\nUse `id=$storyId` instead.\nSee https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#new-url-structure"),b=function(){var e=o.default.parse(p.location.search,{ignoreQueryPrefix:!0}),t="string"===typeof e.args?(0,l.parseArgsParam)(e.args):void 0,r="string"===typeof e.globals?(0,l.parseArgsParam)(e.globals):void 0,n=g(e.viewMode);"string"===typeof n&&n.match(/docs|story/)||(n="story");var a=g(e.path),i=a?h(a):g(e.id);if(i)return{storySpecifier:i,args:t,globals:r,viewMode:n};var u=g(e.selectedKind),s=g(e.selectedStory);return u&&s?(y(),{storySpecifier:{title:u,name:s},args:t,globals:r,viewMode:n}):null};t.getSelectionSpecifierFromPath=b;var w=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.selectionSpecifier=void 0,this.selection=void 0,this.selectionSpecifier=b()}var t,r,n;return t=e,(r=[{key:"setSelection",value:function(e){this.selection=e,v(this.selection)}},{key:"setQueryParams",value:function(e){var t=m({extraParams:e}),r=p.location.hash,n=void 0===r?"":r;d.replaceState({},"","".concat(p.location.pathname).concat(t).concat(n))}}])&&s(t.prototype,r),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.UrlStore=w},51606:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.WebView=void 0,r(71114),r(59135),r(25536),r(46970),r(68053),r(26884),r(19387),r(28381),r(25442),r(78744),r(32577),r(26982),r(27757),r(75785),r(46330),r(67196),r(13237);var a,o=n(r(78031)),i=r(72144),l=n(r(27505)),u=n(r(13005)),s=n(r(56582));function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,a,o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){l=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(l)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:"padded";if("none"===e)return h.body.classList.remove(this.currentLayoutClass),void(this.currentLayoutClass=null);this.checkIfLayoutExists(e);var t=m[e];h.body.classList.remove(this.currentLayoutClass),h.body.classList.add(t),this.currentLayoutClass=t}},{key:"checkIfLayoutExists",value:function(e){var t,r;m[e]||i.logger.warn((0,u.default)(a||(t=["The desired layout: "," is not a valid option.\n The possible options are: ",", none."],r||(r=t.slice(0)),a=Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(r)}}))),e,Object.keys(m).join(", ")))}},{key:"showMode",value:function(e){clearTimeout(this.preparingTimeout),Object.keys(p).forEach((function(t){t===e?h.body.classList.add(v[t]):h.body.classList.remove(v[t])}))}},{key:"showErrorDisplay",value:function(e){var t=e.message,r=void 0===t?"":t,n=e.stack,a=r,o=void 0===n?"":n,i=r.split("\n");i.length>1&&(a=c(i,1)[0],o=i.slice(1).join("\n")),h.getElementById("error-message").innerHTML=g.toHtml(a),h.getElementById("error-stack").innerHTML=g.toHtml(o),this.showMode(p.ERROR)}},{key:"showNoPreview",value:function(){var e,t;this.testing||(this.showMode(p.NOPREVIEW),null===(e=this.storyRoot())||void 0===e||e.setAttribute("hidden","true"),null===(t=this.docsRoot())||void 0===t||t.setAttribute("hidden","true"))}},{key:"showPreparingStory",value:function(){var e=this,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).immediate,r=void 0!==t&&t;clearTimeout(this.preparingTimeout),r?this.showMode(p.PREPARING_STORY):this.preparingTimeout=setTimeout((function(){return e.showMode(p.PREPARING_STORY)}),100)}},{key:"showPreparingDocs",value:function(){var e=this;clearTimeout(this.preparingTimeout),this.preparingTimeout=setTimeout((function(){return e.showMode(p.PREPARING_DOCS)}),100)}},{key:"showMain",value:function(){this.showMode(p.MAIN)}},{key:"showDocs",value:function(){this.storyRoot().setAttribute("hidden","true"),this.docsRoot().removeAttribute("hidden")}},{key:"showStory",value:function(){this.docsRoot().setAttribute("hidden","true"),this.storyRoot().removeAttribute("hidden")}},{key:"showStoryDuringRender",value:function(){h.body.classList.add(v.MAIN)}}],r&&d(t.prototype,r),n&&d(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.WebView=y},12143:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={composeConfigs:!0,Preview:!0,PreviewWeb:!0,simulatePageLoad:!0,simulateDOMContentLoaded:!0};Object.defineProperty(t,"Preview",{enumerable:!0,get:function(){return o.Preview}}),Object.defineProperty(t,"PreviewWeb",{enumerable:!0,get:function(){return i.PreviewWeb}}),Object.defineProperty(t,"composeConfigs",{enumerable:!0,get:function(){return a.composeConfigs}}),Object.defineProperty(t,"simulateDOMContentLoaded",{enumerable:!0,get:function(){return l.simulateDOMContentLoaded}}),Object.defineProperty(t,"simulatePageLoad",{enumerable:!0,get:function(){return l.simulatePageLoad}});var a=r(48443),o=r(60979),i=r(97082),l=r(17153),u=r(67382);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}))},92910:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.parseArgsParam=void 0,r(59135),r(25536),r(46970),r(68053),r(26884),r(19387),r(28381),r(25442),r(71114),r(78744),r(75785),r(64603),r(82632),r(86465),r(25233),r(13237),r(15001),r(98426),r(71178),r(59849),r(67196),r(25105),r(26982),r(56505);var a,o=n(r(56582)),i=n(r(13005)),l=r(72144),u=n(r(5302));function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,a,o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){l=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(l)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0;return null!==t&&(!(""===t||!f.test(t))&&(null===r||void 0===r||(r instanceof Date||("number"===typeof r||"boolean"===typeof r||("string"===typeof r?f.test(r)||d.test(r)||p.test(r)||h.test(r):Array.isArray(r)?r.every((function(r){return e(t,r)})):!!(0,u.default)(r)&&Object.entries(r).every((function(t){var r=s(t,2),n=r[0],a=r[1];return e(n,a)})))))))},v={delimiter:";",allowDots:!0,allowSparse:!0,decoder:function(e){function t(t,r,n,a){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e,t,r,n){if("value"===n&&e.startsWith("!")){if("!undefined"===e)return;if("!null"===e)return null;if(e.startsWith("!date(")&&e.endsWith(")"))return new Date(e.slice(6,-1));if(e.startsWith("!hex(")&&e.endsWith(")"))return"#".concat(e.slice(5,-1));var a=e.slice(1).match(h);if(a)return e.startsWith("!rgba")?"".concat(a[1],"(").concat(a[2],", ").concat(a[3],", ").concat(a[4],", ").concat(a[5],")"):e.startsWith("!hsla")?"".concat(a[1],"(").concat(a[2],", ").concat(a[3],"%, ").concat(a[4],"%, ").concat(a[5],")"):e.startsWith("!rgb")?"".concat(a[1],"(").concat(a[2],", ").concat(a[3],", ").concat(a[4],")"):"".concat(a[1],"(").concat(a[2],", ").concat(a[3],"%, ").concat(a[4],"%)")}return"value"===n&&d.test(e)?Number(e):t(e,t,r)}))};t.parseArgsParam=function(e){var t=e.split(";").map((function(e){return e.replace("=","~").replace(":","=")}));return Object.entries(o.default.parse(t.join(";"),v)).reduce((function(e,t){var r,n,o=s(t,2),u=o[0],c=o[1];return m(u,c)?Object.assign(e,function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({},u,c)):(l.once.warn((0,i.default)(a||(r=["\n Omitted potentially unsafe URL args.\n\n More info: https://storybook.js.org/docs/react/writing-stories/args#setting-args-through-the-url\n "],n||(n=r.slice(0)),a=Object.freeze(Object.defineProperties(r,{raw:{value:Object.freeze(n)}}))))),e)}),{})}},17153:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.simulateDOMContentLoaded=u,t.simulatePageLoad=function(e){var t=a.getElementById(l);t?t.innerHTML="":((t=a.createElement("div")).id=l,a.body.appendChild(t));var r=Array.from(e.querySelectorAll(i));if(r.length){var n=[];r.forEach((function(e){var r=e.getAttribute("type");r&&!o.includes(r)||n.push((function(r){return function(e,t,r){var n=a.createElement("script");n.type="module"===e.type?"module":"text/javascript",e.src?(n.onload=t,n.onerror=t,n.src=e.src):n.textContent=e.innerText;r?r.appendChild(n):a.head.appendChild(n);e.parentNode.removeChild(e),e.src||t()}(e,r,t)}))})),n.length&&s(n,u,void 0)}else u()},r(25442),r(26884),r(75785),r(46330),r(46797);var a=n(r(78031)).default.document,o=["application/javascript","application/ecmascript","application/x-ecmascript","application/x-javascript","text/ecmascript","text/javascript","text/javascript1.0","text/javascript1.1","text/javascript1.2","text/javascript1.3","text/javascript1.4","text/javascript1.5","text/jscript","text/livescript","text/x-ecmascript","text/x-javascript","module"],i="script",l="scripts-root";function u(){var e=a.createEvent("Event");e.initEvent("DOMContentLoaded",!0,!0),a.dispatchEvent(e)}function s(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;e[r]((function(){++r===e.length?t():s(e,t,r)}))}},67382:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},31525:(e,t,r)=>{var n,a=Object.create,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=function(e,t){return function(){return t||(0,e[l(e)[0]])((t={exports:{}}).exports,t),t.exports}},f=function(e,t,r,n){if(t&&"object"===typeof t||"function"===typeof t){var a=function(a){s.call(e,a)||a===r||o(e,a,{get:function(){return t[a]},enumerable:!(n=i(t,a))||n.enumerable})};for(var u of l(t))a(u)}return e},d=function(e,t,r){return r=null!=e?a(u(e)):{},f(!t&&e&&e.__esModule?r:o(r,"default",{value:e,enumerable:!0}),e)},p=c({"../../node_modules/postcss-value-parser/lib/parse.js":function(e,t){var r="(".charCodeAt(0),n=")".charCodeAt(0),a="'".charCodeAt(0),o='"'.charCodeAt(0),i="\\".charCodeAt(0),l="/".charCodeAt(0),u=",".charCodeAt(0),s=":".charCodeAt(0),c="*".charCodeAt(0),f="u".charCodeAt(0),d="U".charCodeAt(0),p="+".charCodeAt(0),h=/^[a-f0-9?-]+$/i;t.exports=function(e){for(var t,m,v,g,y,b,w,k,_,O=[],S=e,E=0,x=S.charCodeAt(E),P=S.length,A=[{nodes:O}],T=0,j="",C="",R="";E=48&&t<=57)return!0;var i=e.charCodeAt(2);return t===a&&i>=48&&i<=57}return o===a?(t=e.charCodeAt(1))>=48&&t<=57:o>=48&&o<=57}(e))return!1;for((t=e.charCodeAt(s))!==n&&t!==r||s++;s57);)s+=1;if(t=e.charCodeAt(s),l=e.charCodeAt(s+1),t===a&&l>=48&&l<=57)for(s+=2;s57);)s+=1;if(t=e.charCodeAt(s),l=e.charCodeAt(s+1),u=e.charCodeAt(s+2),(t===o||t===i)&&(l>=48&&l<=57||(l===n||l===r)&&u>=48&&u<=57))for(s+=l===n||l===r?3:2;s57);)s+=1;return{number:e.slice(0,s),unit:e.slice(s)}}}}),g=c({"../../node_modules/postcss-value-parser/lib/index.js":function(e,t){var r=p(),n=h(),a=m();function o(e){return this instanceof o?(this.nodes=r(e),this):new o(e)}o.prototype.toString=function(){return Array.isArray(this.nodes)?a(this.nodes):""},o.prototype.walk=function(e,t){return n(this.nodes,e,t),this},o.unit=v(),o.walk=n,o.stringify=a,t.exports=o}}),y=c({"../../node_modules/camelize/index.js":function(e,t){"use strict";function r(e){return e&&"object"===typeof e?o(e)||i(e)?e:a(e)?function(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n":null}},c=function(e,t){return void 0===t&&(t=String),function(r){if("word"!==r.type)return null;var n=r.value.match(e);return null===n?null:t(n[1])}},f=s((function(e){return"space"===e.type})),d=s((function(e){return"div"===e.type&&"/"===e.value})),p=s((function(e){return"div"===e.type&&","===e.value})),h=(r="word",function(e){return e.type===r?e.value:null}),m=c(/^(none)$/i),v=c(/^(auto)$/i),b=c(/^([+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?)$/i,Number),k=c(/^(0$|(?:[+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?)(?=px$))/i,Number),_=c(/^([+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?(ch|em|ex|rem|vh|vw|vmin|vmax|cm|mm|in|pc|pt))$/i),O=c(/^([+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?(?:deg|rad))$/i,(function(e){return e.toLowerCase()})),S=c(/^([+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?%)$/i),E=c(/(^-?[_a-z][_a-z0-9-]*$)/i),x=function(e){return"string"!==e.type?null:e.value.replace(/\\([0-9a-f]{1,6})(?:\s|$)/gi,(function(e,t){return String.fromCharCode(parseInt(t,16))})).replace(/\\/g,"")},P=function(e){return"word"===e.type&&(l.test(e.value)||e.value in i||"transparent"===e.value)?e.value:"function"===e.type&&u.test(e.value)?n.stringify(e):null},A=c(/^(none|underline|line-through)$/i),T=c(/^(solid|dashed|dotted)$/),j=function(e){var t=e.types,r=void 0===t?[k,_,S]:t,n=e.directions,a=void 0===n?["Top","Right","Bottom","Left"]:n,o=e.prefix,i=void 0===o?"":o,l=e.suffix,u=void 0===l?"":l;return function(e){var t,n=[];for(n.push(e.expect.apply(e,r));n.length<4&&e.hasTokens();)e.expect(f),n.push(e.expect.apply(e,r));e.expectEmpty();var o=n[0],l=n[1],s=void 0===l?o:l,c=n[2],d=void 0===c?o:c,p=n[3],h=void 0===p?s:p,m=function(e){return""+i+a[e]+u};return(t={})[m(0)]=o,t[m(1)]=s,t[m(2)]=d,t[m(3)]=h,t}},C=function(e){var t=e.expect(k),r=e.matches(f)?e.expect(k):t;return e.expectEmpty(),{width:t,height:r}},R=function(e){var t,r,n,a;if(e.matches(m))return e.expectEmpty(),{offset:{width:0,height:0},radius:0,color:"black"};for(var o=!1;e.hasTokens();)o&&e.expect(f),void 0===t&&e.matches(k,_)?(t=e.lastValue,e.expect(f),r=e.expect(k,_),e.saveRewindPoint(),e.matches(f)&&e.matches(k,_)?n=e.lastValue:e.rewind()):void 0===a&&e.matches(P)?a=e.lastValue:e.throw(),o=!0;return void 0===t&&e.throw(),{offset:{width:t,height:r},radius:void 0!==n?n:0,color:void 0!==a?a:"black"}},M=c(/(nowrap|wrap|wrap-reverse)/),I=c(/(row|row-reverse|column|column-reverse)/),D=function(e){var t;if(e.matches(x))t=e.lastValue;else for(t=e.expect(E);e.hasTokens();){e.expect(f),t+=" "+e.expect(E)}return e.expectEmpty(),{fontFamily:t}},N=c(/^(normal)$/),F=c(/^(italic)$/),V=c(/^([1-9]00|bold)$/),L=c(/^(small-caps)$/),H=[],B=c(/(flex-(?:start|end)|center|stretch|space-(?:between|around))/),z=c(/(flex-(?:start|end)|center|space-(?:between|around|evenly))/),W=c(/^(solid|double|dotted|dashed)$/),U=function(e){return function(t){var r=t.expect(e);return t.expectEmpty(),r}},G=U(b),q=U(k),Y=U(O),X=function(e){return function(t,r){return function(n){var a,o,i,l=n.expect(e);if(n.hasTokens())n.expect(p),i=n.expect(e);else{if(void 0===r)return l;i=r}return n.expectEmpty(),[(a={},a[t+"Y"]=i,a),(o={},o[t+"X"]=l,o)]}}},K=X(b),$=X(k),J=X(O),Q={perspective:G,scale:K("scale"),scaleX:G,scaleY:G,translate:$("translate",0),translateX:q,translateY:q,rotate:Y,rotateX:Y,rotateY:Y,rotateZ:Y,skewX:Y,skewY:Y,skew:J("skew","0deg")},Z=j({types:[P],prefix:"border",suffix:"Color"}),ee=j({directions:["TopLeft","TopRight","BottomRight","BottomLeft"],prefix:"border",suffix:"Radius"}),te=j({prefix:"border",suffix:"Width"}),re=j({types:[k,_,S,v],prefix:"margin"}),ne=j({prefix:"padding"}),ae={aspectRatio:function(e){var t=e.expect(b);return e.hasTokens()&&(e.expect(d),t/=e.expect(b)),{aspectRatio:t}},background:function(e){return{backgroundColor:e.expect(P)}},border:function(e){var t,r,n;if(e.matches(m))return e.expectEmpty(),{borderWidth:0,borderColor:"black",borderStyle:"solid"};for(var a=0;a<3&&e.hasTokens();)0!==a&&e.expect(f),void 0===t&&e.matches(k,_)?t=e.lastValue:void 0===r&&e.matches(P)?r=e.lastValue:void 0===n&&e.matches(T)?n=e.lastValue:e.throw(),a+=1;return e.expectEmpty(),void 0===t&&(t=1),void 0===r&&(r="black"),void 0===n&&(n="solid"),{borderWidth:t,borderColor:r,borderStyle:n}},borderColor:Z,borderRadius:ee,borderWidth:te,boxShadow:function(e){var t=R(e);return{shadowOffset:t.offset,shadowRadius:t.radius,shadowColor:t.color,shadowOpacity:1}},flex:function(e){var t,r,n;if(e.matches(m))return e.expectEmpty(),{flexGrow:0,flexShrink:0,flexBasis:"auto"};if(e.saveRewindPoint(),e.matches(v)&&!e.hasTokens())return{flexGrow:1,flexShrink:1,flexBasis:"auto"};e.rewind();for(var a=0;a<2&&e.hasTokens();)0!==a&&e.expect(f),void 0===t&&e.matches(b)?(t=e.lastValue,e.saveRewindPoint(),e.matches(f)&&e.matches(b)?r=e.lastValue:e.rewind()):void 0===n&&e.matches(k,_,S)?n=e.lastValue:void 0===n&&e.matches(v)?n="auto":e.throw(),a+=1;return e.expectEmpty(),void 0===t&&(t=1),void 0===r&&(r=1),void 0===n&&(n=0),{flexGrow:t,flexShrink:r,flexBasis:n}},flexFlow:function(e){for(var t,r,n=0;n<2&&e.hasTokens();)0!==n&&e.expect(f),void 0===t&&e.matches(M)?t=e.lastValue:void 0===r&&e.matches(I)?r=e.lastValue:e.throw(),n+=1;return e.expectEmpty(),void 0===t&&(t="nowrap"),void 0===r&&(r="row"),{flexWrap:t,flexDirection:r}},font:function(e){for(var t,r,n,a,o=0;o<3&&e.hasTokens();){if(e.matches(N));else if(void 0===t&&e.matches(F))t=e.lastValue;else if(void 0===r&&e.matches(V))r=e.lastValue;else{if(void 0!==n||!e.matches(L))break;n=[e.lastValue]}e.expect(f),o+=1}var i=e.expect(k,_);e.matches(d)&&(a=e.expect(k,_)),e.expect(f);var l=D(e).fontFamily;void 0===t&&(t="normal"),void 0===r&&(r="normal"),void 0===n&&(n=H);var u={fontStyle:t,fontWeight:r,fontVariant:n,fontSize:i,fontFamily:l};return void 0!==a&&(u.lineHeight=a),u},fontFamily:D,fontVariant:function(e){for(var t=[e.expect(E)];e.hasTokens();)e.expect(f),t.push(e.expect(E));return{fontVariant:t}},fontWeight:function(e){return{fontWeight:e.expect(h)}},margin:re,padding:ne,placeContent:function(e){var t,r=e.expect(B);return e.hasTokens()?(e.expect(f),t=e.expect(z)):t="stretch",e.expectEmpty(),{alignContent:r,justifyContent:t}},shadowOffset:function(e){return{shadowOffset:C(e)}},textShadow:function(e){var t=R(e);return{textShadowOffset:t.offset,textShadowRadius:t.radius,textShadowColor:t.color}},textShadowOffset:function(e){return{textShadowOffset:C(e)}},textDecoration:function(e){for(var t,r,n,a=!1;e.hasTokens();){if(a&&e.expect(f),void 0===t&&e.matches(A)){var o=[e.lastValue.toLowerCase()];e.saveRewindPoint(),"none"!==o[0]&&e.matches(f)&&e.matches(A)?(o.push(e.lastValue.toLowerCase()),o.sort().reverse()):e.rewind(),t=o.join(" ")}else void 0===r&&e.matches(W)?r=e.lastValue:void 0===n&&e.matches(P)?n=e.lastValue:e.throw();a=!0}return{textDecorationLine:void 0!==t?t:"none",textDecorationColor:void 0!==n?n:"black",textDecorationStyle:void 0!==r?r:"solid"}},textDecorationLine:function(e){for(var t=[],r=!1;e.hasTokens();)r&&e.expect(f),t.push(e.expect(A).toLowerCase()),r=!0;return t.sort().reverse(),{textDecorationLine:t.join(" ")}},transform:function(e){for(var t=[],r=!1;e.hasTokens();){r&&e.expect(f);var n,a=e.expectFunction(),o=a.functionName,i=Q[o](a);if(!Array.isArray(i))i=[(n={},n[o]=i,n)];t=i.concat(t),r=!0}return{transform:t}}};var oe="SYMBOL_MATCH",ie=function(){function e(e,t){this.index=0,this.nodes=e,this.functionName=null!=t?t.value:null,this.lastValue=null,this.rewindIndex=-1}var t=e.prototype;return t.hasTokens=function(){return this.index<=this.nodes.length-1},t[oe]=function(){if(!this.hasTokens())return null;for(var e=this.nodes[this.index],t=0;t2||me(le)>3?"":" "}function we(e,t){for(;--t&&fe()&&!(le<48||le>102||le>57&&le<65||le>70&&le<97););return he(e,pe()+(t<6&&32==de()&&32==fe()))}function ke(e){for(;fe();)switch(le){case e:return ie;case 34:case 39:34!==e&&39!==e&&ke(le);break;case 40:41===e&&ke(e);break;case 92:fe()}return ie}function _e(e,t){for(;fe()&&e+le!==57&&(e+le!==84||47!==de()););return"/*"+he(t,ie-1)+"*"+Y(47===e?e:fe())}function Oe(e){for(;!me(de());)fe();return he(e,ie)}function Se(e){return ge(Ee("",null,null,null,[""],e=ve(e),0,[0],e))}function Ee(e,t,r,n,a,o,i,l,u){for(var s=0,c=0,f=i,d=0,p=0,h=0,m=1,v=1,g=1,y=0,b="",w=a,k=o,_=n,O=b;v;)switch(h=y,y=fe()){case 40:if(108!=h&&58==Q(O,f-1)){-1!=J(O+=$(ye(y),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:O+=ye(y);break;case 9:case 10:case 13:case 32:O+=be(h);break;case 92:O+=we(pe()-1,7);continue;case 47:switch(de()){case 42:case 47:re(Pe(_e(fe(),pe()),t,r),u);break;default:O+="/"}break;case 123*m:l[s++]=ee(O)*g;case 125*m:case 59:case 0:switch(y){case 0:case 125:v=0;case 59+c:-1==g&&(O=$(O,/\f/g,"")),p>0&&ee(O)-f&&re(p>32?Ae(O+";",n,r,f-1):Ae($(O," ","")+";",n,r,f-2),u);break;case 59:O+=";";default:if(re(_=xe(O,t,r,s,c,a,l,b,w=[],k=[],f),o),123===y)if(0===c)Ee(O,t,_,_,w,o,f,l,k);else switch(99===d&&110===Q(O,3)?100:d){case 100:case 108:case 109:case 115:Ee(e,_,_,n&&re(xe(e,_,_,0,0,a,l,b,a,w=[],f),k),a,k,f,l,n?w:k);break;default:Ee(O,_,_,_,[""],k,0,l,k)}}s=c=p=0,m=g=1,b=O="",f=i;break;case 58:f=1+ee(O),p=h;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==(le=ie>0?Q(ue,--ie):0,ae--,10===le&&(ae=1,ne--),le))continue;switch(O+=Y(y),y*m){case 38:g=c>0?1:(O+="\f",-1);break;case 44:l[s++]=(ee(O)-1)*g,g=1;break;case 64:45===de()&&(O+=ye(fe())),d=de(),c=f=ee(b=O+=Oe(pe())),y++;break;case 45:45===h&&2==ee(O)&&(m=0)}}return o}function xe(e,t,r,n,a,o,i,l,u,s,c){for(var f=a-1,d=0===a?o:[""],p=te(d),h=0,m=0,v=0;h0?d[g]+" "+y:$(y,/&\f/g,d[g])))&&(u[v++]=b);return se(e,t,r,0===a?W:l,u,s,c)}function Pe(e,t,r){return se(e,t,r,z,Y(le),Z(e,2,-2),0)}function Ae(e,t,r,n){return se(e,t,r,U,Z(e,0,n),Z(e,n+1,-1),n)}function Te(e,t){for(var r="",n=te(e),a=0;a6)switch(Q(e,t+1)){case 109:if(45!==Q(e,t+4))break;case 102:return $(e,/(.+:)(.+)-([^]+)/,"$1"+B+"$2-$3$1"+H+(108==Q(e,t+3)?"$3":"$2-$3"))+e;case 115:return~J(e,"stretch")?Le($(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Q(e,t+1))break;case 6444:switch(Q(e,ee(e)-3-(~J(e,"!important")&&10))){case 107:return $(e,":",":"+B)+e;case 101:return $(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+B+(45===Q(e,14)?"inline-":"")+"box$3$1"+B+"$2$3$1"+L+"$2box$3")+e}break;case 5936:switch(Q(e,t+11)){case 114:return B+e+L+$(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return B+e+L+$(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return B+e+L+$(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return B+e+L+e+e}return e}var He="undefined"!==typeof document,Be=He?void 0:Re((function(){return Me((function(){var e={};return function(t){return e[t]}}))})),ze=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case U:e.return=Le(e.value,e.length);break;case G:return Te([ce(e,{value:$(e.value,"@","@"+B)})],n);case W:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Te([ce(e,{props:[$(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return Te([ce(e,{props:[$(t,/:(plac\w+)/,":"+B+"input-$1")]}),ce(e,{props:[$(t,/:(plac\w+)/,":-moz-$1")]}),ce(e,{props:[$(t,/:(plac\w+)/,L+"input-$1")]})],n)}return""}))}}],We=function(e){var t=e.key;if(He&&"css"===t){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var n=e.stylisPlugins||ze;var a,o,i={},l=[];He&&(a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;r=4;++n,a-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(a){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}(a)+u;return{name:s,styles:a,next:nt}},it=d(r(21939)),lt="undefined"!==typeof document,ut=function(e){return e()},st=!!it.useInsertionEffect&&it.useInsertionEffect,ct=lt&&st||ut,ft=st||it.useLayoutEffect,dt="undefined"!==typeof document,pt={}.hasOwnProperty,ht=N.createContext("undefined"!==typeof HTMLElement?We({key:"css"}):null);ht.Provider;var mt=function(e){return(0,F.forwardRef)((function(t,r){var n=(0,F.useContext)(ht);return e(t,n,r)}))};dt||(mt=function(e){return function(t){var r=(0,F.useContext)(ht);return null===r?(r=We({key:"css"}),N.createElement(ht.Provider,{value:r},e(t,r))):e(t,r)}});var vt=N.createContext({});var gt=function(){return N.useContext(vt)},yt=Re((function(e){return Re((function(t){return function(e,t){return"function"===typeof t?t(e):Ue({},e,t)}(e,t)}))})),bt=function(e){var t=N.useContext(vt);return e.theme!==t&&(t=yt(t)(e.theme)),N.createElement(vt.Provider,{value:t},e.children)},wt="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",kt=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;Ye(t,r,n);var a=ct((function(){return Xe(t,r,n)}));if(!dt&&void 0!==a){for(var o,i=r.name,l=r.next;void 0!==l;)i+=" "+l.name,l=l.next;return N.createElement("style",((o={})["data-emotion"]=t.key+" "+i,o.dangerouslySetInnerHTML={__html:a},o.nonce=t.sheet.nonce,o))}return null};mt((function(e,t,r){var n=e.css;"string"===typeof n&&void 0!==t.registered[n]&&(n=t.registered[n]);var a=e[wt],o=[n],i="";"string"===typeof e.className?i=qe(t.registered,o,e.className):null!=e.className&&(i=e.className+" ");var l=ot(o,void 0,N.useContext(vt));i+=t.key+"-"+l.name;var u={};for(var s in e)pt.call(e,s)&&"css"!==s&&s!==wt&&(u[s]=e[s]);return u.ref=r,u.className=i,N.createElement(N.Fragment,null,N.createElement(kt,{cache:t,serialized:l,isStringTag:"string"===typeof a}),N.createElement(a,u))}));var _t=d(r(21939));d(E()),d(S()),mt((function(e,t){var r=e.styles,n=ot([r],void 0,_t.useContext(vt));if(!dt){for(var a,o=n.name,i=n.styles,l=n.next;void 0!==l;)o+=" "+l.name,i+=l.styles,l=l.next;var u=!0===t.compat,s=t.insert("",{name:o,styles:i},t.sheet,u);return u?null:_t.createElement("style",((a={})["data-emotion"]=t.key+"-global "+o,a.dangerouslySetInnerHTML={__html:s},a.nonce=t.sheet.nonce,a))}var c=_t.useRef();return ft((function(){var e=t.key+"-global",r=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),a=!1,o=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return t.sheet.tags.length&&(r.before=t.sheet.tags[0]),null!==o&&(a=!0,o.setAttribute("data-emotion",e),r.hydrate([o])),c.current=[r,a],function(){r.flush()}}),[t]),ft((function(){var e=c.current,r=e[0];if(e[1])e[1]=!1;else{if(void 0!==n.next&&Xe(t,n.next,!0),r.tags.length){var a=r.tags[r.tags.length-1].nextElementSibling;r.before=a,r.flush()}t.insert("",n,r,!1)}}),[t,n.name]),null}));var Ot=function e(t){for(var r=t.length,n=0,a="";n{var n,a=r(81315),o=r(78439),i=r(35527),l=r(93709),u=r(53591),s=r(69133),c=["name"],f=["name"];function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t-1&&r(t-1)},config:Gt,children:(0,Ut.jsx)(Ft,{index:t,onPress:r,style:{paddingBottom:a.bottom}})})}),(0,Ut.jsxs)(Xt,{children:[(0,Ut.jsx)(zt,{}),(0,Ut.jsx)(Wt,{})]})]})}));function Xt(e){var t=e.children,r=(0,Ct.useSafeAreaInsets)();return(0,Ut.jsx)(jt.View,{style:{zIndex:100,alignSelf:"center",justifyContent:"center",alignItems:"center",flexDirection:"row-reverse",position:"absolute",bottom:r.bottom+14,right:8},children:t})}var Kt=_(r(21939)),$t=r(31827),Jt=r(31525),Qt=r(74701),Zt=(0,Jt.styled)($t.Animated.View)((function(e){var t=e.theme,r=e.edge;return{backgroundColor:t.panel.backgroundColor,borderTopWidth:"top"===r?t.panel.borderWidth:void 0,borderStartWidth:"left"===r?t.panel.borderWidth:void 0,borderEndWidth:"right"===r?t.panel.borderWidth:void 0,borderColor:t.panel.borderColor}})),er=Kt.default.memo((function(e){var t=e.edge,r=e.children,n=e.style,a=$t.StyleSheet.flatten(["top"===t?void 0:$t.StyleSheet.absoluteFillObject,n]);return(0,Qt.jsx)(Zt,{edge:t,style:a,children:r})})),tr=r(31827),rr=r(24166),nr=r(31525),ar=r(74701),or="ios"===J.Platform.OS,ir=void 0!==(r.g.Expo||r.g.__expo||r.g.__exponent),lr="android"===J.Platform.OS,ur={flex:1};function sr(e){var t=e.animatedValue,r=e.style,n=e.children,a=p({backgroundColor:(0,nr.useTheme)().preview.backgroundColor},function(e){return{elevation:8,shadowColor:"#000",shadowOpacity:e.interpolate({inputRange:[Ot,0,1],outputRange:[.25,0,.25]}),shadowRadius:8,shadowOffset:{width:0,height:0},overflow:"visible"}}(t));return(0,ar.jsx)(J.Animated.View,{style:[ur,a],children:(0,ar.jsx)(J.View,{style:[ur,r],children:n})})}var cr=J.StyleSheet.create({expoAndroidContainer:{paddingTop:J.StatusBar.currentHeight}}),fr=K.styled.View((function(e){return p(p({flex:1,backgroundColor:e.theme.preview.containerBackgroundColor},lr&&ir?cr.expoAndroidContainer:void 0),J.Platform.select({web:{overflow:"hidden"}}))})),dr=$.default.memo((function(e){var t=e.storyIndex,r=e.shouldDisableKeyboardAvoidingView,n=e.keyboardAvoidingViewVerticalOffset,a=e.tabOpen,o=(0,$.useState)(a||0),i=s(o,2),l=i[0],u=i[1],c=$.default.useRef(l),f=(0,$.useState)((function(){return{width:J.Dimensions.get("window").width,height:J.Dimensions.get("window").height}})),d=s(f,2),p=d[0],h=d[1],m=(0,$.useRef)(new J.Animated.Value(l)),v=(0,tr.useWindowDimensions)().width>=1024,g=(0,rr.useSafeAreaInsets)(),y=$.default.useCallback((function(e){e!==l&&(c.current=l,J.Animated.timing(m.current,{toValue:e,duration:400,easing:J.Easing.inOut(J.Easing.cubic),useNativeDriver:!0}).start(),u(e),0===e&&J.Keyboard.dismiss())}),[l]),b=function(e,t){var r,n=(0,F.useMemo)((function(){return(0,V.atom)((function(t){var r,n;return null==(r=t(L))||null==(n=r.parameters)?void 0:n[e]}))}),[e]);return null!=(r=(0,V.useAtomValue)(n))?r:t}("noSafeArea",!1),w=[ur,At({animatedValue:m.current,previewDimensions:p,wide:v,insets:g,tabOpen:l,lastTabOpen:c.current})],k=G(),_=s(k,1)[0],O=$.default.useState(g.bottom+40),S=s(O,2),E=S[0],x=S[1],P=$.default.useCallback((function(e){var t=e.nativeEvent,r=g.bottom;x(_?t.layout.height-r:0)}),[_,g]),A={paddingBottom:_?g.bottom+E:b?0:g.bottom,paddingTop:b?0:g.top,overflow:"hidden"},T={paddingBottom:g.bottom+E,paddingTop:g.top},j=-T.paddingBottom+(null!=n?n:0),C=Y(),R=s(C,1)[0],M=0!==l;return(0,ar.jsx)(ar.Fragment,{children:(0,ar.jsxs)(fr,{children:[(0,ar.jsx)(J.KeyboardAvoidingView,{enabled:!r||M,behavior:or?"padding":null,keyboardVerticalOffset:j,style:ur,children:(0,ar.jsxs)(Fe,{onLayout:h,previewDimensions:p,children:[(0,ar.jsxs)(J.Animated.View,{style:w,children:[(0,ar.jsxs)(sr,{style:A,animatedValue:m.current,children:[(0,ar.jsx)(Re,{}),R?(0,ar.jsxs)(er,{edge:"top",style:{flex:1},children:[(0,ar.jsx)(ct,{active:!0}),(0,ar.jsx)(mt,{visible:M})]}):null]}),M?(0,ar.jsx)(J.TouchableOpacity,{style:J.StyleSheet.absoluteFillObject,onPress:function(){return y(0)}}):null]}),(0,ar.jsx)(er,{edge:"right",style:[xt(m.current,p.width,v),T],children:(0,ar.jsx)(xe,{storyIndex:t})}),(0,ar.jsx)(er,{edge:"left",style:[Pt(m.current,p.width,v),T],children:(0,ar.jsx)(ct,{active:1===l})})]})}),(0,ar.jsx)(Yt,{onLayout:P,tabOpen:l,onChangeTab:y})]})})})),pr=r(31525),hr=_(r(66692));function mr(e){return e&&("AndroidConstants"===e[0]||"PlatformConstants"===e[0])}function vr(e){if("object"!==typeof __fbBatchedBridge||"localhost"!==e&&"127.0.0.1"!==e)return e;var t=function(e){var t,r,n=null==(t=window)||null==(r=t.__fbBatchedBridgeConfig)?void 0:r.remoteModuleConfig;if(!Array.isArray(n)||"localhost"!==e&&"127.0.0.1"!==e)return{hostname:e,passed:!1};var a=(n.find(mr)||[])[1];return a?{hostname:(a.ServerHost||e).split(":")[0],passed:!0}:{hostname:e,passed:!1}}(e);return t.passed?t.hostname:function(e){var t,r,n;return"undefined"!==typeof window&&window.__DEV__&&"function"===typeof window.require&&"metroRequire"!==window.require.name&&(t=window.require("NativeModules"))&&(t.PlatformConstants||t.AndroidConstants)?(r=t.PlatformConstants,n=t.AndroidConstants,((r?r.ServerHost:n.ServerHost)||e).split(":")[0]):e}(e)}var gr=_(r(51629)),yr=r(31827),br=_(r(56175)),wr=r(74701),kr="lastOpenedStory",_r=o((function e(t){"use strict";var r=this;i(this,e),this._setStory=function(){},this._ready=!1,this._getInitialStory=a((function*(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.initialSelection,n=e.shouldPersistSelection,a=void 0===n||n;if(t)return"string"===typeof t?{storySpecifier:t,viewMode:"story"}:{storySpecifier:(0,M.toId)(t.kind,t.name),viewMode:"story"};if(a)try{var o,i=r._asyncStorageStoryId;return i||(i=yield R.default.getItem(kr),r._asyncStorageStoryId=i),{storySpecifier:null!=(o=i)?o:"*",viewMode:"story"}}catch(l){console.warn("storybook-log: error reading from async storage",l)}return{storySpecifier:"*",viewMode:"story"}})),this._getServerChannel=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=vr(e.host||"localhost"),r=`:${e.port||7007}`,n=e.query||"",o=`${e.secured?"wss":"ws"}://${t}${r}/${n}`;return(0,hr.default)({url:o,async:!0,onError:function(){var e=a((function*(){}));return function(){return e.apply(this,arguments)}}()})},this.getStorybookUI=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.shouldPersistSelection,n=void 0===t||t,a=e.onDeviceUI,o=void 0===a||a,i=e.enableWebsockets,l=void 0!==i&&i,u=r._getInitialStory(e);if(l){var c=r._getServerChannel(e);I.addons.setChannel(c),r._preview.channel=c,r._preview.setupListeners(),c.emit(gr.default.CHANNEL_CREATED),r._preview.initializeWithStoryIndex(r._storyIndex)}I.addons.loadAddons({store:function(){return{fromId:function(e){return r._preview.storyStore.getStoryContext(r._preview.storyStore.fromId(e))},getSelection:function(){return r._preview.currentSelection},_channel:r._preview.channel}}});var f=r;return function(e){var t=e.isUIVisible,r=e.isSplitPanelVisible,n=(0,V.getDefaultStore)();void 0!==t&&n.set(U,t),void 0!==r&&n.set(q,r)}({isUIVisible:void 0!==e.isUIHidden?!e.isUIHidden:void 0,isSplitPanelVisible:e.isSplitPanelVisible}),function(){var t=(0,V.useSetAtom)(L),r=(0,yr.useColorScheme)(),a=(0,C.useReducer)((function(e){return e+1}),0),i=s(a,2)[1],l=(0,C.useMemo)((function(){var t;return(0,br.default)("dark"===r?pr.darkTheme:pr.theme,null!=(t=e.theme)?t:{})}),[r]);return(0,C.useEffect)((function(){f._setStory=function(e){t(e),n&&R.default.setItem(kr,e.id).catch((function(e){console.warn("storybook-log: error writing to async storage",e)}))},f._forceRerender=function(){return i()},u.then((function(e){f._preview.urlStore.selectionSpecifier=e,f._preview.selectSpecifiedStory()}))}),[]),o?(0,wr.jsx)(N.SafeAreaProvider,{children:(0,wr.jsx)(D.ThemeProvider,{theme:l,children:(0,wr.jsx)(dr,{storyIndex:f._storyIndex,tabOpen:e.tabOpen,shouldDisableKeyboardAvoidingView:e.shouldDisableKeyboardAvoidingView,keyboardAvoidingViewVerticalOffset:e.keyboardAvoidingViewVerticalOffset})})}):(0,wr.jsx)(Re,{})}},this._preview=t})),Or=r(74701),Sr=function(e,t){var r=t.id,n=t.component;if(!n)throw new Error(`Unable to render story ${r} as the component annotation is missing from the default export`);return(0,Or.jsx)(n,p({},e))};var Er=r(31525),xr=function(){var e=new E.default({async:!0});S.addons.setChannel(e);var t=new x.ClientApi,r={prepareForStory:function(){return null},showNoPreview:function(){},showPreparingStory:function(){},applyLayout:function(){},showErrorDisplay:function(e){console.log(e)},showStoryDuringRender:function(){},showMain:function(){},checkIfLayoutExists:function(){},showStory:function(){},docsRoot:null,prepareForDocs:function(){return null},showDocs:function(){},preparingTimeout:setTimeout((function(){}),0),showMode:function(){},showPreparingDocs:function(){},storyRoot:null,testing:!1},n={selection:null,selectionSpecifier:null,setQueryParams:function(){},setSelection:function(e){a.urlStore.selection=e}},a=new A.PreviewWeb(n,r);t.storyStore=a.storyStore,(0,x.setGlobalRender)(Sr);var o=!1,i=new _r(a);return{view:i,forceReRender:function(){return e.emit(P.default.FORCE_RE_RENDER)},clientApi:t,preview:a,configure:function(e,r){t.addParameters({framework:"react-native"});var n=function(){var n=j(e,r),a=n.added,o=n.removed;return Array.from(a.entries()).forEach((function(e){var r=s(e,2),n=r[0],a=r[1];return t.facade.addStoriesFromExports(n,a)})),Array.from(o.entries()).forEach((function(e){var r=s(e,1)[0];return t.facade.clearFilenameExports(r)})),p(p({},t.facade.projectAnnotations),{},{renderToDOM:function(e){i._setStory(e.storyContext)}})};o?(n(),function(){var e=t.getStoryIndex();a.onStoriesChanged({storyIndex:e}),i._storyIndex=e}()):(a.initialize({getStoryIndex:function(){var e=t.getStoryIndex();return i._storyIndex=e,e},importFn:function(e){return t.importFn(e)},getProjectAnnotations:n}),o=!0)}}}(),Pr=xr.clientApi,Ar=xr.configure,Tr=xr.view,jr=Pr.storiesOf.bind(Pr),Cr=Pr.setAddon.bind(Pr),Rr=Pr.addDecorator.bind(Pr),Mr=Pr.addParameters.bind(Pr),Ir=Pr.addArgsEnhancer.bind(Pr),Dr=Pr.addArgTypesEnhancer.bind(Pr),Nr=Pr.clearDecorators.bind(Pr),Fr=Pr.getStorybook.bind(Pr),Vr=Pr.raw.bind(Pr),Lr=function(e,t){return jr(e,{hot:function(){}}).addParameters({framework:"react-native"})},Hr=Tr.getStorybookUI;r.g.__STORYBOOK_STORY_STORE__={initializationPromise:null==(n=Pr.storyStore)?void 0:n.initializationPromise}},11185:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgsStore=void 0,r(75785),r(46330),r(27757),r(56505);var n=r(77754);function a(e,t){for(var r=0;r{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalsStore=void 0,r(13237),r(71114),r(59135),r(25536),r(46970),r(25442),r(28381),r(78744),r(68053),r(75785),r(58329),r(26884),r(19387),r(98426),r(27757),r(56505),r(64603),r(46330);var a,o=n(r(15650)),i=n(r(13005)),l=r(77754),u=r(1872);function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,a,o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){l=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(l)throw a}}return o}(e,t)||f(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){if(e){if("string"===typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.StoryIndexStore=void 0,r(27757),r(13117),r(75785),r(86465),r(28381),r(64603),r(59135),r(25536),r(46970),r(68053),r(26884),r(19387),r(13237),r(25442),r(78744),r(71114);var a,o=n(r(13005));function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,a,o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){l=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(l)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{v:3,stories:{}}).stories;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.channel=void 0,this.stories=void 0,this.stories=t}var t,r,n;return t=e,(r=[{key:"storyIdFromSpecifier",value:function(e){var t=Object.keys(this.stories);if("*"===e)return t[0];if("string"===typeof e)return t.indexOf(e)>=0?e:t.find((function(t){return t.startsWith(e)}));var r=e.name,n=e.title,a=Object.entries(this.stories).find((function(e){var t=i(e,2),a=(t[0],t[1]);return a.name===r&&a.title===n}));return a&&a[0]}},{key:"storyIdToEntry",value:function(e){var t,r,n=this.stories[e];if(!n)throw new Error((0,o.default)(a||(t=["Couldn't find story matching '","' after HMR.\n - Did you remove it from your CSF file?\n - Are you sure a story with that id exists?\n - Please check your stories field of your main.js config.\n - Also check the browser console and terminal for error messages."],r||(r=t.slice(0)),a=Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(r)}}))),e));return n}}])&&u(t.prototype,r),n&&u(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.StoryIndexStore=s},56897:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.StoryStore=void 0;var a=n(r(99326));r(32688),r(56505),r(28381),r(75785),r(46330),r(64603),r(59849),r(19373),r(27757),r(54303),r(13237),r(4034),r(84186),r(59135),r(25536),r(46970),r(68053),r(26884),r(19387),r(25442),r(78744);var o=n(r(77859)),i=n(r(67224)),l=n(r(62132)),u=n(r(78031)),s=r(35130),c=r(82377),f=r(11185),d=r(43044),p=r(13297),h=r(28619);function m(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,a,o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){l=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(l)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{includeDocsOnly:!1};if(!this.cachedCSFFiles)throw new Error("Cannot call extract() unless you call cacheAllCSFFiles() first.");return Object.entries(this.storyIndex.stories).reduce((function(r,n){var a=v(n,2),o=a[0],i=a[1].importPath,l=e.cachedCSFFiles[i],u=e.storyFromCSFFile({storyId:o,csfFile:l});return!t.includeDocsOnly&&u.parameters.docsOnly||(r[o]=Object.entries(u).reduce((function(e,t){var r=v(t,2),n=r[0],a=r[1];return"function"===typeof a?e:Array.isArray(a)?Object.assign(e,m({},n,a.slice().sort())):Object.assign(e,m({},n,a))}),{args:u.initialArgs})),r}),{})}},{key:"getSetStoriesPayload",value:function(){var e=this.extract({includeDocsOnly:!0}),t=Object.values(e).reduce((function(e,t){return e[t.title]={},e}),{});return{v:2,globals:this.globals.get(),globalParameters:{},kindParameters:t,stories:e}}},{key:"raw",value:function(){var e=this;return Object.values(this.extract()).map((function(t){var r=t.id;return e.fromId(r)}))}},{key:"fromId",value:function(e){var t,r=this;if(!this.cachedCSFFiles)throw new Error("Cannot call fromId/raw() unless you call cacheAllCSFFiles() first.");try{t=this.storyIndex.storyIdToEntry(e).importPath}catch(o){return null}var n=this.cachedCSFFiles[t],a=this.storyFromCSFFile({storyId:e,csfFile:n});return Object.assign({},a,{storyFn:function(e){var t=Object.assign({},r.getStoryContext(a),{viewMode:"story"});return a.unboundStoryFn(Object.assign({},t,e))}})}}],r&&w(t.prototype,r),n&&w(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.StoryStore=k},77754:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.deepDiff=t.combineArgs=t.NO_TARGET_NAME=t.DEEPLY_EQUAL=void 0,t.groupArgsByTarget=k,t.mapArgsToTypes=void 0,t.noTargetArgs=function(e){return k(e)[w]},t.validateOptions=void 0,r(46970),r(68053),r(26884),r(19387),r(13237),r(25442),r(78744),r(71114),r(59135),r(25536),r(75785),r(28381),r(71178),r(64603),r(56505),r(19373),r(27757),r(46797),r(75104),r(70517),r(98426),r(26982),r(59849),r(89729),r(46330);var a,o,i=n(r(49359)),l=r(72144),u=n(r(5302)),s=n(r(13005));function c(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function f(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,a,o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){l=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(l)throw a}}return o}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){if(e){if("string"===typeof e)return m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t.length?n:n.concat(new Array(t.length-r.length).fill(void 0))}return(0,u.default)(t)&&(0,u.default)(r)?Object.keys(Object.assign({},t,r)).reduce((function(n,a){var o=e(null===t||void 0===t?void 0:t[a],null===r||void 0===r?void 0:r[a]);return o===b?n:Object.assign(n,d({},a,o))}),{}):r};var w="";function k(e){var t=e.args,r=e.argTypes,n={};return Object.entries(t).forEach((function(e){var t=p(e,2),a=t[0],o=t[1],i=(r[a]||{}).target,l=void 0===i?w:i;n[l]=n[l]||{},n[l][a]=o})),n}t.NO_TARGET_NAME=w},52953:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.userOrAutoTitleFromSpecifier=t.userOrAutoTitle=void 0,r(59135),r(25536),r(46970),r(68053),r(26884),r(19387),r(25442),r(28381),r(71114),r(13237),r(19373),r(75785),r(78744),r(88232),r(82632),r(25105),r(26982),r(67196);var a,o=n(r(89440)),i=n(r(13005)),l=r(72144);function u(e){return function(e){if(Array.isArray(e))return e}(e)||f(e)||c(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e){return function(e){if(Array.isArray(e))return d(e)}(e)||f(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){if(e){if("string"===typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function f(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?r.substr(0,n):r;t[t.length-1]=a;var o=u(t),i=o[0],l=o.slice(1);return""===i&&(t=l),t}(w))).join("/")}return g?(0,o.default)(h([g,r])):r}};t.userOrAutoTitleFromSpecifier=m;t.userOrAutoTitle=function(e,t,r){for(var n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.composeConfigs=function(e){var t=l(e,"argTypesEnhancers");return{parameters:n.combineParameters.apply(void 0,a(i(e,"parameters"))),decorators:l(e,"decorators"),args:u(e,"args"),argsEnhancers:l(e,"argsEnhancers"),argTypes:u(e,"argTypes"),argTypesEnhancers:[].concat(a(t.filter((function(e){return!e.secondPass}))),a(t.filter((function(e){return e.secondPass})))),globals:u(e,"globals"),globalTypes:u(e,"globalTypes"),loaders:l(e,"loaders"),render:s(e,"render"),renderToDOM:s(e,"renderToDOM"),applyDecorators:s(e,"applyDecorators")}},t.getArrayField=l,t.getField=i,t.getObjectField=u,t.getSingletonField=s,r(19373),r(75785),r(59849),r(98426),r(56505),r(59135),r(25536),r(46970),r(68053),r(26884),r(19387),r(25442),r(13237),r(28381),r(78744);var n=r(86061);function a(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,a,o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){l=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(l)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce((function(e,t){var r=n(t,2),a=r[0],o=r[1].defaultValue;return"undefined"!==typeof o&&(e[a]=o),e}),{})}},13297:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(86026);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}));var a=r(17037);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var o=r(48284);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var i=r(48144);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var l=r(58894);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var u=r(73826);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var s=r(1872);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var c=r(59991);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var f=r(62120);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}))},58894:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeComponentAnnotations=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.title,r=arguments.length>2?arguments[2]:void 0,o=e.id,i=e.argTypes;return Object.assign({id:(0,n.sanitize)(o||t)},e,{title:t},i&&{argTypes:(0,a.normalizeInputTypes)(i)},{parameters:Object.assign({fileName:r},e.parameters)})},r(56505);var n=r(14022),a=r(86026)},86026:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeInputTypes=t.normalizeInputType=void 0,r(27757),r(59135),r(56505);var a=n(r(67224)),o=["type","control"];function i(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=function(e,t){var r=e.type,n=e.control,a=i(e,o),l=Object.assign({name:t},a);return r&&(l.type=function(e){return"string"===typeof e?{name:e}:e}(r)),n?l.control=function(e){return"string"===typeof e?{type:e}:e}(n):!1===n&&(l.control={disable:!0}),l};t.normalizeInputType=l;t.normalizeInputTypes=function(e){return(0,a.default)(e,l)}},73826:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeProjectAnnotations=function(e){var t=e.argTypes,r=e.globalTypes,f=e.argTypesEnhancers,d=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,i);return Object.assign({},t&&{argTypes:(0,o.normalizeInputTypes)(t)},r&&{globalTypes:(0,o.normalizeInputTypes)(r)},{argTypesEnhancers:[].concat((p=f||[],c(p)||s(p)||u(p)||l()),[n.inferArgTypes,a.inferControls])},d);var p},r(27757),r(59135),r(25536),r(75785),r(46970),r(68053),r(26884),r(19387),r(25442),r(13237),r(28381),r(78744),r(56505),r(98426);var n=r(24699),a=r(53670),o=r(86026),i=["argTypes","globalTypes","argTypesEnhancers"];function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){if(e){if("string"===typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}function s(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function c(e){if(Array.isArray(e))return f(e)}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeStory=function(e,t,r){var n,a;"function"===typeof t?(n=t,a=t):a=t;var i=a.story;i&&(l.logger.debug("deprecated story",i),m());var u=(0,o.storyNameFromExport)(e),f="function"!==typeof a&&a.name||a.storyName||(null===i||void 0===i?void 0:i.name)||u,d=[].concat(c(a.decorators||[]),c((null===i||void 0===i?void 0:i.decorators)||[])),p=Object.assign({},null===i||void 0===i?void 0:i.parameters,a.parameters),h=Object.assign({},null===i||void 0===i?void 0:i.args,a.args),v=Object.assign({},null===i||void 0===i?void 0:i.argTypes,a.argTypes),g=[].concat(c(a.loaders||[]),c((null===i||void 0===i?void 0:i.loaders)||[])),y=a,b=y.render,w=y.play,k=p.__id||(0,o.toId)(r.id||r.title,u);return Object.assign({id:k,name:f,decorators:d,parameters:p,args:h,argTypes:(0,s.normalizeInputTypes)(v),loaders:g},b&&{render:b},n&&{userStoryFn:n},w&&{play:w})},r(13237),r(71114),r(59135),r(25536),r(75785),r(46970),r(68053),r(26884),r(19387),r(25442),r(78744),r(28381),r(98426),r(56505);var a,o=r(14022),i=n(r(13005)),l=r(72144),u=n(r(15650)),s=r(86026);function c(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r StoryFn.storyName\n- StoryFn.story.(parameters|decorators) => StoryFn.(parameters|decorators)\nSee https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations for details and codemod.\n"],p||(p=d.slice(0)),a=Object.freeze(Object.defineProperties(d,{raw:{value:Object.freeze(p)}})))),m=(0,u.default)((function(){}),h)},48144:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.prepareStory=function(e,t,r){var n,o=e.id,i=e.name,l=t.title,y=(0,c.combineParameters)(r.parameters,t.parameters,e.parameters),b=[].concat(g(e.decorators||[]),g(t.decorators||[]),g(r.decorators||[])),w=r.applyDecorators,k=void 0===w?d.defaultDecorateStory:w,O=r.argTypesEnhancers,S=void 0===O?[]:O,E=r.argsEnhancers,x=void 0===E?[]:E,P=[].concat(g(r.loaders||[]),g(t.loaders||[]),g(e.loaders||[])),A=e.userStoryFn||e.render||t.render||r.render,T=(0,c.combineParameters)(r.argTypes,t.argTypes,e.argTypes),j=y.passArgsFirst,C=void 0===j||j;y.__isArgsStory=C&&A.length>0;var R=Object.assign({},r.args,t.args,e.args),M={componentId:t.id,title:l,kind:l,id:o,name:i,story:i,component:t.component,subcomponents:t.subcomponents,parameters:y,initialArgs:R,argTypes:T};M.argTypes=S.reduce((function(e,t){return t(Object.assign({},M,{argTypes:e}))}),M.argTypes);var I=(0,h.getValuesFromArgTypes)(M.argTypes);Object.keys(I).length>0&&_();var D=Object.assign({},I,R);M.initialArgs=x.reduce((function(e,t){return Object.assign({},e,t(Object.assign({},M,{initialArgs:e})))}),D),null!==(n=u.default.FEATURES)&&void 0!==n&&n.breakingChangesV7||(M.parameters=Object.assign({},M.parameters,{__id:o,globals:r.globals,globalTypes:r.globalTypes,args:M.initialArgs,argTypes:M.argTypes}));var N=function(){var e,t=(e=a.default.mark((function e(t){var r,n;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(P.map((function(e){return e(t)})));case 2:return r=e.sent,n=Object.assign.apply(Object,[{}].concat(g(r))),e.abrupt("return",Object.assign({},t,{loaded:n}));case 5:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){v(o,n,a,i,l,"next",e)}function l(e){v(o,n,a,i,l,"throw",e)}i(void 0)}))});return function(e){return t.apply(this,arguments)}}(),F=function(e){var t=Object.entries(e.args).reduce((function(t,r){var n,a=m(r,2),o=a[0],i=a[1],l=null===(n=e.argTypes[o])||void 0===n?void 0:n.mapping;return t[o]=l&&i in l?l[i]:i,t}),{}),r=Object.entries(t).reduce((function(r,n){var a=m(n,2),o=a[0],i=a[1],l=e.argTypes[o]||{};return(0,s.includeConditionalArg)(l,t,e.globals)&&(r[o]=i),r}),{}),n=Object.assign({},e,{args:r}),a=e.parameters.passArgsFirst;return void 0===a||a?A(n.args,n):A(n)},V=(0,f.applyHooks)(k)(F,b),L=e.play;return Object.freeze(Object.assign({},M,{originalStoryFn:A,undecoratedStoryFn:F,unboundStoryFn:function(e){var t,r=e;if(null!==(t=u.default.FEATURES)&&void 0!==t&&t.argTypeTargetsV7){var n=(0,p.groupArgsByTarget)(Object.assign({args:e.args},e));r=Object.assign({},e,{allArgs:e.args,argsByTarget:n,args:n[p.NO_TARGET_NAME]||{}})}return V(r)},applyLoaders:N,playFunction:L}))};var a=n(r(99326));r(13237),r(59135),r(25536),r(46970),r(25442),r(78744),r(32688),r(28381),r(98426),r(56505),r(75785),r(27757),r(68053),r(84186),r(26884),r(19387),r(59849),r(64603),r(71114);var o,i=n(r(13005)),l=n(r(15650)),u=n(r(78031)),s=r(14022),c=r(86061),f=r(28619),d=r(94356),p=r(77754),h=r(1872);function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,a,o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){l=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(l)throw a}}return o}(e,t)||y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t,r,n,a,o,i){try{var l=e[o](i),u=l.value}catch(s){return void r(s)}l.done?t(u):Promise.resolve(u).then(n,a)}function g(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||y(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){if(e){if("string"===typeof e)return b(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.processCSFFile=function(e,t,r){var a=e.default,s=(e.__namedExportsOrder,function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,l)),c=(0,i.normalizeComponentAnnotations)(a,r,t);u(c.parameters);var f={meta:c,stories:{}};return Object.keys(s).forEach((function(e){if((0,n.isExportStory)(e,c)){var t=(0,o.normalizeStory)(e,s[e],c);u(t.parameters),f.stories[t.id]=t}})),f},r(59135),r(75785),r(46330),r(27757);var n=r(14022),a=r(72144),o=r(17037),i=r(58894),l=["default","__namedExportsOrder"];var u=function(e){e&&(function(e){var t=e.globals,r=e.globalTypes;(t||r)&&a.logger.error("Global args/argTypes can only be set globally",JSON.stringify({globals:t,globalTypes:r}))}(e),function(e){var t=e.options;null!==t&&void 0!==t&&t.storySort&&a.logger.error("The storySort option parameter can only be set globally")}(e))}},62120:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={setProjectAnnotations:!0,composeStory:!0,composeStories:!0};t.composeStories=function(e,t,r){var n=e.default,o=(e.__esModule,e.__namedExportsOrder,function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,p));return Object.entries(o).reduce((function(e,o){var i,l,u=(l=2,function(e){if(Array.isArray(e))return e}(i=o)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){l=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(l)throw a}}return o}}(i,l)||function(e,t){if(e){if("string"===typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}(i,l)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=u[0],c=u[1];return(0,a.isExportStory)(s,n)?Object.assign(e,function(e,t,r){t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r;return e}({},s,r(c,n,t,s))):e}),{})},t.composeStory=function(e,t){var r,n,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:m,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},d=arguments.length>4?arguments[4]:void 0;if(void 0===e)throw new Error("Expected a story but received undefined.");t.title=null!==(r=t.title)&&void 0!==r?r:"ComposedStory";var p=(0,s.normalizeComponentAnnotations)(t),h=d||e.storyName||(null===(n=e.story)||void 0===n?void 0:n.name)||e.name,v=(0,l.normalizeStory)(h,e,p),g=(0,f.normalizeProjectAnnotations)(Object.assign({},a,o)),y=(0,i.prepareStory)(v,p,g),b=(0,c.getValuesFromArgTypes)(a.globalTypes),w=function(e){var t=Object.assign({},y,{hooks:new u.HooksContext,globals:b,args:Object.assign({},y.initialArgs,e)});return y.unboundStoryFn(t)};return w.storyName=h,w.args=y.initialArgs,w.play=y.playFunction,w.parameters=y.parameters,w},t.setProjectAnnotations=function(e){var t=Array.isArray(e)?e:[e];m=(0,o.composeConfigs)(t)},r(27757),r(59135),r(25536),r(46970),r(68053),r(26884),r(19387),r(13237),r(25442),r(78744),r(28381),r(56505),r(75785),r(64603);var a=r(14022),o=r(59991),i=r(48144),l=r(17037),u=r(28619),s=r(58894),c=r(1872),f=r(73826),d=r(84355);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}));var p=["default","__esModule","__namedExportsOrder"];function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},94356:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decorateStory=o,t.defaultDecorateStory=function(e,t){var r={},n=function(e){return function(t){return r.value=Object.assign({},r.value,i(t)),e(r.value)}},a=t.reduce((function(e,t){return o(e,t,n)}),e);return function(e){return r.value=e,a(e)}},t.sanitizeStoryContextUpdate=i,r(27757),r(59135),r(28381),r(56505),r(75785);var n=["componentId","title","kind","id","name","story","parameters","initialArgs","argTypes"];function a(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function o(e,t,r){var n=r(e);return function(e){return t(n,e)}}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.componentId,e.title,e.kind,e.id,e.name,e.story,e.parameters,e.initialArgs,e.argTypes;return a(e,n)}},93838:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.filterArgTypes=void 0,r(46797),r(70517),r(78744),r(15001),r(28381);var a=n(r(50619)),o=function(e,t){return Array.isArray(t)?t.includes(e):e.match(t)};t.filterArgTypes=function(e,t,r){return t||r?e&&(0,a.default)(e,(function(e,n){var a=e.name||n;return(!t||o(a,t))&&(!r||!o(a,r))})):e}},28619:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HooksContext",{enumerable:!0,get:function(){return a.HooksContext}}),Object.defineProperty(t,"applyHooks",{enumerable:!0,get:function(){return a.applyHooks}}),t.useAddonState=function(e,t){return u(e,t)},Object.defineProperty(t,"useArgs",{enumerable:!0,get:function(){return a.useArgs}}),Object.defineProperty(t,"useCallback",{enumerable:!0,get:function(){return a.useCallback}}),Object.defineProperty(t,"useChannel",{enumerable:!0,get:function(){return a.useChannel}}),Object.defineProperty(t,"useEffect",{enumerable:!0,get:function(){return a.useEffect}}),Object.defineProperty(t,"useGlobals",{enumerable:!0,get:function(){return a.useGlobals}}),Object.defineProperty(t,"useMemo",{enumerable:!0,get:function(){return a.useMemo}}),Object.defineProperty(t,"useParameter",{enumerable:!0,get:function(){return a.useParameter}}),Object.defineProperty(t,"useReducer",{enumerable:!0,get:function(){return a.useReducer}}),Object.defineProperty(t,"useRef",{enumerable:!0,get:function(){return a.useRef}}),t.useSharedState=u,Object.defineProperty(t,"useState",{enumerable:!0,get:function(){return a.useState}}),Object.defineProperty(t,"useStoryContext",{enumerable:!0,get:function(){return a.useStoryContext}}),r(98426),r(59135),r(25536),r(75785),r(46970),r(68053),r(26884),r(19387),r(13237),r(28381),r(25442),r(78744);var n=r(51629),a=r(46673);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,a,o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){l=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(l)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={StoryStore:!0,combineParameters:!0,filterArgTypes:!0,inferControls:!0};Object.defineProperty(t,"StoryStore",{enumerable:!0,get:function(){return a.StoryStore}}),Object.defineProperty(t,"combineParameters",{enumerable:!0,get:function(){return o.combineParameters}}),Object.defineProperty(t,"filterArgTypes",{enumerable:!0,get:function(){return i.filterArgTypes}}),Object.defineProperty(t,"inferControls",{enumerable:!0,get:function(){return l.inferControls}});var a=r(56897),o=r(86061),i=r(93838),l=r(53670),u=r(82648);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var s=r(13297);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var c=r(28619);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var f=r(94356);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var d=r(77754);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}));var p=r(52953);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===p[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))}));var h=r(55079);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}))},24699:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.inferArgTypes=void 0,r(13237),r(71114),r(68053),r(75785),r(58329),r(26884),r(19387),r(98426),r(59135),r(25536),r(46970);var a,o=n(r(67224)),i=n(r(13005)),l=r(72144),u=r(86061);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}var c=function e(t,r,n){var u,c,f=s(t);switch(f){case"boolean":case"string":case"number":case"function":case"symbol":return{name:f}}return t?n.has(t)?(l.logger.warn((0,i.default)(a||(u=["\n We've detected a cycle in arg '","'. Args should be JSON-serializable.\n\n Consider using the mapping feature or fully custom args:\n - Mapping: https://storybook.js.org/docs/react/writing-stories/args#mapping-to-complex-arg-values\n - Custom args: https://storybook.js.org/docs/react/essentials/controls#fully-custom-args\n "],c||(c=u.slice(0)),a=Object.freeze(Object.defineProperties(u,{raw:{value:Object.freeze(c)}}))),r)),{name:"other",value:"cyclic object"}):(n.add(t),Array.isArray(t)?{name:"array",value:t.length>0?e(t[0],r,new Set(n)):{name:"other",value:"unknown"}}:{name:"object",value:(0,o.default)(t,(function(t){return e(t,r,new Set(n))}))}):{name:"object",value:{}}},f=function(e){var t=e.id,r=e.argTypes,n=void 0===r?{}:r,a=e.initialArgs,i=void 0===a?{}:a,l=(0,o.default)(i,(function(e,r){return{name:r,type:c(e,"".concat(t,".").concat(r),new Set)}})),s=(0,o.default)(n,(function(e,t){return{name:t}}));return(0,u.combineParameters)(l,s,n)};t.inferArgTypes=f,f.secondPass=!0},53670:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.inferControls=t.argTypesEnhancers=void 0,r(78744),r(28381);var a=n(r(67224)),o=r(72144),i=r(93838),l=r(86061),u=function(e){var t=e.argTypes,r=e.parameters,n=r.__isArgsStory,u=r.controls,s=(u=void 0===u?{}:u).include,c=void 0===s?null:s,f=u.exclude,d=void 0===f?null:f,p=u.matchers,h=void 0===p?{}:p;if(!n)return t;var m=(0,i.filterArgTypes)(t,c,d),v=(0,a.default)(m,(function(e,t){return(null===e||void 0===e?void 0:e.type)&&function(e,t,r){var n=e.type,a=e.options;if(n||a){if(r.color&&r.color.test(t)){var i=e.type.name;if("string"===i)return{control:{type:"color"}};o.logger.warn('Addon controls: Control of type color only supports string, received "'.concat(i,'" instead'))}if(r.date&&r.date.test(t))return{control:{type:"date"}};switch(n.name){case"array":return{control:{type:"object"}};case"boolean":return{control:{type:"boolean"}};case"string":return{control:{type:"text"}};case"number":return{control:{type:"number"}};case"enum":var l=n.value;return{control:{type:(null===l||void 0===l?void 0:l.length)<=5?"radio":"select"},options:l};case"function":case"symbol":return null;default:return{control:{type:a?"select":"object"}}}}}(e,t,h)}));return(0,l.combineParameters)(v,m)};t.inferControls=u,u.secondPass=!0;var s=[u];t.argTypesEnhancers=s},86061:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.combineParameters=void 0,r(75785),r(19373),r(46330),r(64603),r(27757),r(59849),r(59135),r(25536),r(46970),r(68053),r(26884),r(19387),r(13237),r(28381),r(25442),r(78744);var a=n(r(5302));function o(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,a,o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){l=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(l)throw a}}return o}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"===typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.sortStoriesV7=t.sortStoriesV6=void 0,r(13237),r(71114),r(28381),r(59849);var a,o=n(r(77054)),i=n(r(13005)),l=r(62346);var u=function(e,t,r){var n;t?(n="function"===typeof t?t:(0,l.storySort)(t),o.default.inplace(e,n)):o.default.inplace(e,(function(e,t){return r.indexOf(e.importPath)-r.indexOf(t.importPath)}));return e};t.sortStoriesV7=function(e,t,r){try{return u(e,t,r)}catch(l){throw new Error((0,i.default)(a||(n=["\n Error sorting stories with sort parameter ",":\n\n > ","\n \n Are you using a V6-style sort function in V7 mode?\n\n More info: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#v7-style-story-sort\n "],o||(o=n.slice(0)),a=Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(o)}}))),t,l.message))}var n,o};var s=function(e){return{id:e.id,title:e.title,name:e.name,importPath:e.parameters.fileName}};t.sortStoriesV6=function(e,t,r){if(t&&"function"===typeof t)return o.default.inplace(e,t),e.map((function(e){return s(e[1])}));var n=e.map((function(e){return s(e[1])}));return u(n,t,r)}},62346:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.storySort=void 0,r(78744),r(67196),r(9719),r(28381);var n=/\s*\/\s*/;t.storySort=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,r){if(t.title===r.title&&!e.includeNames)return 0;var a=e.method||"configure",o=e.order||[],i=t.title.trim().split(n),l=r.title.trim().split(n);e.includeNames&&(i.push(t.name),l.push(r.name));for(var u=0;i[u]||l[u];){if(!i[u])return-1;if(!l[u])return 1;var s=i[u],c=l[u];if(s!==c){var f=o.indexOf(s),d=o.indexOf(c),p=o.indexOf("*");return-1!==f||-1!==d?(-1===f&&(f=-1!==p?p:o.length),-1===d&&(d=-1!==p?p:o.length),f-d):"configure"===a?0:s.localeCompare(c,e.locales?e.locales:void 0,{numeric:!0,sensitivity:"accent"})}var h=o.indexOf(s);o=-1!==h&&Array.isArray(o[h+1])?o[h+1]:[],u+=1}return 0}}},82648:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},27505:(e,t,r)=>{"use strict";function n(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,a,i=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?40*e+55:0,l=t>0?40*t+55:0,s=r>0?40*r+55:0;n[o]=function(e){var t,r=[],n=a(e);try{for(n.s();!(t=n.n()).done;){var o=t.value;r.push(u(o))}}catch(i){n.e(i)}finally{n.f()}return"#"+r.join("")}([i,l,s])}(t,r,n,e)}))}))})),f(0,23).forEach((function(t){var r=t+232,n=u(10*t+8);e[r]="#"+n+n+n})),e}()};function u(e){for(var t=e.toString(16);t.length<2;)t="0"+t;return t}function s(e,t,r,n){var a;return"text"===t?a=function(e,t){if(t.escapeXML)return i.encodeXML(e);return e}(r,n):"display"===t?a=function(e,t,r){t=parseInt(t,10);var n,a={"-1":function(){return"
"},0:function(){return e.length&&c(e)},1:function(){return p(e,"b")},3:function(){return p(e,"i")},4:function(){return p(e,"u")},8:function(){return h(e,"display:none")},9:function(){return p(e,"strike")},22:function(){return h(e,"font-weight:normal;text-decoration:none;font-style:normal")},23:function(){return g(e,"i")},24:function(){return g(e,"u")},39:function(){return m(e,r.fg)},49:function(){return v(e,r.bg)},53:function(){return h(e,"text-decoration:overline")}};a[t]?n=a[t]():4"})).join("")}function f(e,t){for(var r=[],n=e;n<=t;n++)r.push(n);return r}function d(e){var t=null;return 0===(e=parseInt(e,10))?t="all":1===e?t="bold":2")}function h(e,t){return p(e,"span",t)}function m(e,t){return p(e,"span","color:"+t)}function v(e,t){return p(e,"span","background-color:"+t)}function g(e,t){var r;if(e.slice(-1)[0]===t&&(r=e.pop()),r)return""}var y=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),(t=t||{}).colors&&(t.colors=Object.assign({},l.colors,t.colors)),this.options=Object.assign({},l,t),this.stack=[],this.stickyStack=[]}var t,r,o;return t=e,(r=[{key:"toHtml",value:function(e){var t=this;e="string"===typeof e?[e]:e;var r=this.stack,n=this.options,o=[];return this.stickyStack.forEach((function(e){var t=s(r,e.token,e.data,n);t&&o.push(t)})),function(e,t,r){var n=!1;function o(){return""}function i(e){return t.newline?r("display",-1):r("text",e),""}var l=[{pattern:/^\x08+/,sub:o},{pattern:/^\x1b\[[012]?K/,sub:o},{pattern:/^\x1b\[\(B/,sub:o},{pattern:/^\x1b\[[34]8;2;\d+;\d+;\d+m/,sub:function(e){return r("rgb",e),""}},{pattern:/^\x1b\[38;5;(\d+)m/,sub:function(e,t){return r("xterm256",t),""}},{pattern:/^\n/,sub:i},{pattern:/^\r+\n/,sub:i},{pattern:/^\x1b\[((?:\d{1,3};?)+|)m/,sub:function(e,t){n=!0,0===t.trim().length&&(t="0");var o,i=a(t=t.trimRight(";").split(";"));try{for(i.s();!(o=i.n()).done;){var l=o.value;r("display",l)}}catch(u){i.e(u)}finally{i.f()}return""}},{pattern:/^\x1b\[\d?J/,sub:o},{pattern:/^\x1b\[\d{0,3};\d{0,3}f/,sub:o},{pattern:/^\x1b\[?[\d;]{0,3}/,sub:o},{pattern:/^(([^\x1b\x08\r\n])+)/,sub:function(e){return r("text",e),""}}];function u(t,r){r>3&&n||(n=!1,e=e.replace(t.pattern,t.sub))}var s=[],c=e.length;e:for(;c>0;){for(var f=0,d=0,p=l.length;d{"use strict";var n=r(6917),a=r(26503),o=a(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"===typeof r&&o(e,".prototype.")>-1?a(r):r}},26503:(e,t,r)=>{"use strict";var n=r(7122),a=r(6917),o=a("%Function.prototype.apply%"),i=a("%Function.prototype.call%"),l=a("%Reflect.apply%",!0)||n.call(i,o),u=a("%Object.getOwnPropertyDescriptor%",!0),s=a("%Object.defineProperty%",!0),c=a("%Math.max%");if(s)try{s({},"a",{value:1})}catch(d){s=null}e.exports=function(e){var t=l(n,i,arguments);u&&s&&(u(t,"length").configurable&&s(t,"length",{value:1+c(0,e.length-(arguments.length-1))}));return t};var f=function(){return l(n,o,arguments)};s?s(e.exports,"apply",{value:f}):e.exports.apply=f},61662:e=>{"use strict";function t(e){return e&&"object"===typeof e?a(e)||o(e)?e:n(e)?function(e,t){if(e.map)return e.map(t);for(var r=[],n=0;ns)return 1;if(s>u)return-1}var c=o[o.length-1],f=i[i.length-1];if(c&&f){var d=c.split(".").map(n),p=f.split(".").map(n);for(l=0;lp[l])return 1;if(p[l]>d[l])return-1}}else if(c||f)return c?-1:1;return 0}var i=[">",">=","=","<","<="],l={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]};function u(e){if("string"!==typeof e)throw new TypeError("Invalid operator type, expected string but got "+typeof e);if(-1===i.indexOf(e))throw new TypeError("Invalid operator, expected one of "+i.join("|"))}return o.validate=function(t){return"string"===typeof t&&e.test(t)},o.compare=function(e,t,r){u(r);var n=o(e,t);return l[r].indexOf(n)>-1},o})?r.apply(t,n):r)||(e.exports=a)},25865:(e,t,r)=>{"use strict";var n=r(74414),a=r(62073),o=TypeError;e.exports=function(e){if(n(e))return e;throw o(a(e)+" is not a function")}},65432:(e,t,r)=>{"use strict";var n=r(26924),a=r(62073),o=TypeError;e.exports=function(e){if(n(e))return e;throw o(a(e)+" is not a constructor")}},45435:(e,t,r)=>{"use strict";var n=r(74414),a=String,o=TypeError;e.exports=function(e){if("object"==typeof e||n(e))return e;throw o("Can't set "+a(e)+" as a prototype")}},54057:(e,t,r)=>{"use strict";var n=r(42365),a=r(24560),o=r(75625).f,i=n("unscopables"),l=Array.prototype;void 0===l[i]&&o(l,i,{configurable:!0,value:a(null)}),e.exports=function(e){l[i][e]=!0}},39330:(e,t,r)=>{"use strict";var n=r(60959).charAt;e.exports=function(e,t,r){return t+(r?n(e,t).length:1)}},1296:(e,t,r)=>{"use strict";var n=r(86535),a=TypeError;e.exports=function(e,t){if(n(t,e))return e;throw a("Incorrect invocation")}},14302:(e,t,r)=>{"use strict";var n=r(14953),a=String,o=TypeError;e.exports=function(e){if(n(e))return e;throw o(a(e)+" is not an object")}},61028:(e,t,r)=>{"use strict";var n=r(12329);e.exports=n((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},30888:(e,t,r)=>{"use strict";var n=r(99639),a=r(66166),o=r(64906);e.exports=function(e){for(var t=n(this),r=o(t),i=arguments.length,l=a(i>1?arguments[1]:void 0,r),u=i>2?arguments[2]:void 0,s=void 0===u?r:a(u,r);s>l;)t[l++]=e;return t}},47385:(e,t,r)=>{"use strict";var n=r(84512).forEach,a=r(49418)("forEach");e.exports=a?[].forEach:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}},63660:(e,t,r)=>{"use strict";var n=r(49110),a=r(71082),o=r(99639),i=r(95878),l=r(83255),u=r(26924),s=r(64906),c=r(76754),f=r(58247),d=r(63955),p=Array;e.exports=function(e){var t=o(e),r=u(this),h=arguments.length,m=h>1?arguments[1]:void 0,v=void 0!==m;v&&(m=n(m,h>2?arguments[2]:void 0));var g,y,b,w,k,_,O=d(t),S=0;if(!O||this===p&&l(O))for(g=s(t),y=r?new this(g):p(g);g>S;S++)_=v?m(t[S],S):t[S],c(y,S,_);else for(k=(w=f(t,O)).next,y=r?new this:[];!(b=a(k,w)).done;S++)_=v?i(w,m,[b.value,S],!0):b.value,c(y,S,_);return y.length=S,y}},44740:(e,t,r)=>{"use strict";var n=r(17963),a=r(66166),o=r(64906),i=function(e){return function(t,r,i){var l,u=n(t),s=o(u),c=a(i,s);if(e&&r!==r){for(;s>c;)if((l=u[c++])!==l)return!0}else for(;s>c;c++)if((e||c in u)&&u[c]===r)return e||c||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},84512:(e,t,r)=>{"use strict";var n=r(49110),a=r(25021),o=r(61352),i=r(99639),l=r(64906),u=r(60792),s=a([].push),c=function(e){var t=1===e,r=2===e,a=3===e,c=4===e,f=6===e,d=7===e,p=5===e||f;return function(h,m,v,g){for(var y,b,w=i(h),k=o(w),_=n(m,v),O=l(k),S=0,E=g||u,x=t?E(h,O):r||d?E(h,0):void 0;O>S;S++)if((p||S in k)&&(b=_(y=k[S],S,w),e))if(t)x[S]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return S;case 2:s(x,y)}else switch(e){case 4:return!1;case 7:s(x,y)}return f?-1:a||c?c:x}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterReject:c(7)}},48154:(e,t,r)=>{"use strict";var n=r(12329),a=r(42365),o=r(44585),i=a("species");e.exports=function(e){return o>=51||!n((function(){var t=[];return(t.constructor={})[i]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},49418:(e,t,r)=>{"use strict";var n=r(12329);e.exports=function(e,t){var r=[][e];return!!r&&n((function(){r.call(null,t||function(){return 1},1)}))}},80535:(e,t,r)=>{"use strict";var n=r(66166),a=r(64906),o=r(76754),i=Array,l=Math.max;e.exports=function(e,t,r){for(var u=a(e),s=n(t,u),c=n(void 0===r?u:r,u),f=i(l(c-s,0)),d=0;s{"use strict";var n=r(25021);e.exports=n([].slice)},30265:(e,t,r)=>{"use strict";var n=r(80535),a=Math.floor,o=function(e,t){for(var r,n,a=e.length,o=1;o0;)e[n]=e[--n];n!==o++&&(e[n]=r)}return e},i=function(e,t,r,n){for(var a=t.length,o=r.length,i=0,l=0;i{"use strict";var n=r(30835),a=r(26924),o=r(14953),i=r(42365)("species"),l=Array;e.exports=function(e){var t;return n(e)&&(t=e.constructor,(a(t)&&(t===l||n(t.prototype))||o(t)&&null===(t=t[i]))&&(t=void 0)),void 0===t?l:t}},60792:(e,t,r)=>{"use strict";var n=r(81621);e.exports=function(e,t){return new(n(e))(0===t?0:t)}},95878:(e,t,r)=>{"use strict";var n=r(14302),a=r(54695);e.exports=function(e,t,r,o){try{return o?t(n(r)[0],r[1]):t(r)}catch(i){a(e,"throw",i)}}},53626:(e,t,r)=>{"use strict";var n=r(42365)("iterator"),a=!1;try{var o=0,i={next:function(){return{done:!!o++}},return:function(){a=!0}};i[n]=function(){return this},Array.from(i,(function(){throw 2}))}catch(l){}e.exports=function(e,t){try{if(!t&&!a)return!1}catch(l){return!1}var r=!1;try{var o={};o[n]=function(){return{next:function(){return{done:r=!0}}}},e(o)}catch(l){}return r}},78261:(e,t,r)=>{"use strict";var n=r(25021),a=n({}.toString),o=n("".slice);e.exports=function(e){return o(a(e),8,-1)}},16868:(e,t,r)=>{"use strict";var n=r(61104),a=r(74414),o=r(78261),i=r(42365)("toStringTag"),l=Object,u="Arguments"===o(function(){return arguments}());e.exports=n?o:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(r){}}(t=l(e),i))?r:u?o(t):"Object"===(n=o(t))&&a(t.callee)?"Arguments":n}},99593:(e,t,r)=>{"use strict";var n=r(24560),a=r(90361),o=r(47530),i=r(49110),l=r(1296),u=r(95090),s=r(29828),c=r(70184),f=r(80835),d=r(86176),p=r(62039),h=r(97485).fastKey,m=r(85915),v=m.set,g=m.getterFor;e.exports={getConstructor:function(e,t,r,c){var f=e((function(e,a){l(e,d),v(e,{type:t,index:n(null),first:void 0,last:void 0,size:0}),p||(e.size=0),u(a)||s(a,e[c],{that:e,AS_ENTRIES:r})})),d=f.prototype,m=g(t),y=function(e,t,r){var n,a,o=m(e),i=b(e,t);return i?i.value=r:(o.last=i={index:a=h(t,!0),key:t,value:r,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=i),n&&(n.next=i),p?o.size++:e.size++,"F"!==a&&(o.index[a]=i)),e},b=function(e,t){var r,n=m(e),a=h(t);if("F"!==a)return n.index[a];for(r=n.first;r;r=r.next)if(r.key===t)return r};return o(d,{clear:function(){for(var e=m(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,p?e.size=0:this.size=0},delete:function(e){var t=this,r=m(t),n=b(t,e);if(n){var a=n.next,o=n.previous;delete r.index[n.index],n.removed=!0,o&&(o.next=a),a&&(a.previous=o),r.first===n&&(r.first=a),r.last===n&&(r.last=o),p?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=m(this),n=i(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!b(this,e)}}),o(d,r?{get:function(e){var t=b(this,e);return t&&t.value},set:function(e,t){return y(this,0===e?0:e,t)}}:{add:function(e){return y(this,e=0===e?0:e,e)}}),p&&a(d,"size",{configurable:!0,get:function(){return m(this).size}}),f},setStrong:function(e,t,r){var n=t+" Iterator",a=g(t),o=g(n);c(e,t,(function(e,t){v(this,{type:n,target:e,state:a(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?f("keys"===t?r.key:"values"===t?r.value:[r.key,r.value],!1):(e.target=void 0,f(void 0,!0))}),r?"entries":"values",!r,!0),d(t)}}},97636:(e,t,r)=>{"use strict";var n=r(25021),a=r(47530),o=r(97485).getWeakData,i=r(1296),l=r(14302),u=r(95090),s=r(14953),c=r(29828),f=r(84512),d=r(4797),p=r(85915),h=p.set,m=p.getterFor,v=f.find,g=f.findIndex,y=n([].splice),b=0,w=function(e){return e.frozen||(e.frozen=new k)},k=function(){this.entries=[]},_=function(e,t){return v(e.entries,(function(e){return e[0]===t}))};k.prototype={get:function(e){var t=_(this,e);if(t)return t[1]},has:function(e){return!!_(this,e)},set:function(e,t){var r=_(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(e){var t=g(this.entries,(function(t){return t[0]===e}));return~t&&y(this.entries,t,1),!!~t}},e.exports={getConstructor:function(e,t,r,n){var f=e((function(e,a){i(e,p),h(e,{type:t,id:b++,frozen:void 0}),u(a)||c(a,e[n],{that:e,AS_ENTRIES:r})})),p=f.prototype,v=m(t),g=function(e,t,r){var n=v(e),a=o(l(t),!0);return!0===a?w(n).set(t,r):a[n.id]=r,e};return a(p,{delete:function(e){var t=v(this);if(!s(e))return!1;var r=o(e);return!0===r?w(t).delete(e):r&&d(r,t.id)&&delete r[t.id]},has:function(e){var t=v(this);if(!s(e))return!1;var r=o(e);return!0===r?w(t).has(e):r&&d(r,t.id)}}),a(p,r?{get:function(e){var t=v(this);if(s(e)){var r=o(e);return!0===r?w(t).get(e):r?r[t.id]:void 0}},set:function(e,t){return g(this,e,t)}}:{add:function(e){return g(this,e,!0)}}),f}}},42567:(e,t,r)=>{"use strict";var n=r(46609),a=r(89246),o=r(25021),i=r(96730),l=r(26692),u=r(97485),s=r(29828),c=r(1296),f=r(74414),d=r(95090),p=r(14953),h=r(12329),m=r(53626),v=r(99519),g=r(87854);e.exports=function(e,t,r){var y=-1!==e.indexOf("Map"),b=-1!==e.indexOf("Weak"),w=y?"set":"add",k=a[e],_=k&&k.prototype,O=k,S={},E=function(e){var t=o(_[e]);l(_,e,"add"===e?function(e){return t(this,0===e?0:e),this}:"delete"===e?function(e){return!(b&&!p(e))&&t(this,0===e?0:e)}:"get"===e?function(e){return b&&!p(e)?void 0:t(this,0===e?0:e)}:"has"===e?function(e){return!(b&&!p(e))&&t(this,0===e?0:e)}:function(e,r){return t(this,0===e?0:e,r),this})};if(i(e,!f(k)||!(b||_.forEach&&!h((function(){(new k).entries().next()})))))O=r.getConstructor(t,e,y,w),u.enable();else if(i(e,!0)){var x=new O,P=x[w](b?{}:-0,1)!==x,A=h((function(){x.has(1)})),T=m((function(e){new k(e)})),j=!b&&h((function(){for(var e=new k,t=5;t--;)e[w](t,t);return!e.has(-0)}));T||((O=t((function(e,t){c(e,_);var r=g(new k,e,O);return d(t)||s(t,r[w],{that:r,AS_ENTRIES:y}),r}))).prototype=_,_.constructor=O),(A||j)&&(E("delete"),E("has"),y&&E("get")),(j||P)&&E(w),b&&_.clear&&delete _.clear}return S[e]=O,n({global:!0,constructor:!0,forced:O!==k},S),v(O,e),b||r.setStrong(O,e,y),O}},99437:(e,t,r)=>{"use strict";var n=r(4797),a=r(68360),o=r(17062),i=r(75625);e.exports=function(e,t,r){for(var l=a(t),u=i.f,s=o.f,c=0;c{"use strict";var n=r(42365)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[n]=!1,"/./"[e](t)}catch(a){}}return!1}},60447:(e,t,r)=>{"use strict";var n=r(12329);e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},80835:e=>{"use strict";e.exports=function(e,t){return{value:e,done:t}}},13818:(e,t,r)=>{"use strict";var n=r(62039),a=r(75625),o=r(57077);e.exports=n?function(e,t,r){return a.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},57077:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},76754:(e,t,r)=>{"use strict";var n=r(61154),a=r(75625),o=r(57077);e.exports=function(e,t,r){var i=n(t);i in e?a.f(e,i,o(0,r)):e[i]=r}},90361:(e,t,r)=>{"use strict";var n=r(3928),a=r(75625);e.exports=function(e,t,r){return r.get&&n(r.get,t,{getter:!0}),r.set&&n(r.set,t,{setter:!0}),a.f(e,t,r)}},26692:(e,t,r)=>{"use strict";var n=r(74414),a=r(75625),o=r(3928),i=r(34929);e.exports=function(e,t,r,l){l||(l={});var u=l.enumerable,s=void 0!==l.name?l.name:t;if(n(r)&&o(r,s,l),l.global)u?e[t]=r:i(t,r);else{try{l.unsafe?e[t]&&(u=!0):delete e[t]}catch(c){}u?e[t]=r:a.f(e,t,{value:r,enumerable:!1,configurable:!l.nonConfigurable,writable:!l.nonWritable})}return e}},47530:(e,t,r)=>{"use strict";var n=r(26692);e.exports=function(e,t,r){for(var a in t)n(e,a,t[a],r);return e}},34929:(e,t,r)=>{"use strict";var n=r(89246),a=Object.defineProperty;e.exports=function(e,t){try{a(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},12745:(e,t,r)=>{"use strict";var n=r(62073),a=TypeError;e.exports=function(e,t){if(!delete e[t])throw a("Cannot delete property "+n(t)+" of "+n(e))}},62039:(e,t,r)=>{"use strict";var n=r(12329);e.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4606:e=>{"use strict";var t="object"==typeof document&&document.all,r="undefined"==typeof t&&void 0!==t;e.exports={all:t,IS_HTMLDDA:r}},32795:(e,t,r)=>{"use strict";var n=r(89246),a=r(14953),o=n.document,i=a(o)&&a(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},91707:e=>{"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},67859:e=>{"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},35588:(e,t,r)=>{"use strict";var n=r(32795)("span").classList,a=n&&n.constructor&&n.constructor.prototype;e.exports=a===Object.prototype?void 0:a},48383:(e,t,r)=>{"use strict";var n=r(67530).match(/firefox\/(\d+)/i);e.exports=!!n&&+n[1]},18372:(e,t,r)=>{"use strict";var n=r(9575),a=r(21014);e.exports=!n&&!a&&"object"==typeof window&&"object"==typeof document},17445:e=>{"use strict";e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},9575:e=>{"use strict";e.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},20076:(e,t,r)=>{"use strict";var n=r(67530);e.exports=/MSIE|Trident/.test(n)},17:(e,t,r)=>{"use strict";var n=r(67530);e.exports=/ipad|iphone|ipod/i.test(n)&&"undefined"!=typeof Pebble},27293:(e,t,r)=>{"use strict";var n=r(67530);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},21014:(e,t,r)=>{"use strict";var n=r(89246),a=r(78261);e.exports="process"===a(n.process)},24507:(e,t,r)=>{"use strict";var n=r(67530);e.exports=/web0s(?!.*chrome)/i.test(n)},67530:e=>{"use strict";e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},44585:(e,t,r)=>{"use strict";var n,a,o=r(89246),i=r(67530),l=o.process,u=o.Deno,s=l&&l.versions||u&&u.version,c=s&&s.v8;c&&(a=(n=c.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!a&&i&&(!(n=i.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=i.match(/Chrome\/(\d+)/))&&(a=+n[1]),e.exports=a},84170:(e,t,r)=>{"use strict";var n=r(67530).match(/AppleWebKit\/(\d+)\./);e.exports=!!n&&+n[1]},83950:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},46609:(e,t,r)=>{"use strict";var n=r(89246),a=r(17062).f,o=r(13818),i=r(26692),l=r(34929),u=r(99437),s=r(96730);e.exports=function(e,t){var r,c,f,d,p,h=e.target,m=e.global,v=e.stat;if(r=m?n:v?n[h]||l(h,{}):(n[h]||{}).prototype)for(c in t){if(d=t[c],f=e.dontCallGetSet?(p=a(r,c))&&p.value:r[c],!s(m?c:h+(v?".":"#")+c,e.forced)&&void 0!==f){if(typeof d==typeof f)continue;u(d,f)}(e.sham||f&&f.sham)&&o(d,"sham",!0),i(r,c,d,e)}}},12329:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(t){return!0}}},89026:(e,t,r)=>{"use strict";r(78744);var n=r(37254),a=r(26692),o=r(53189),i=r(12329),l=r(42365),u=r(13818),s=l("species"),c=RegExp.prototype;e.exports=function(e,t,r,f){var d=l(e),p=!i((function(){var t={};return t[d]=function(){return 7},7!==""[e](t)})),h=p&&!i((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[s]=function(){return r},r.flags="",r[d]=/./[d]),r.exec=function(){return t=!0,null},r[d](""),!t}));if(!p||!h||r){var m=n(/./[d]),v=t(d,""[e],(function(e,t,r,a,i){var l=n(e),u=t.exec;return u===o||u===c.exec?p&&!i?{done:!0,value:m(t,r,a)}:{done:!0,value:l(r,t,a)}:{done:!1}}));a(String.prototype,e,v[0]),a(c,d,v[1])}f&&u(c[d],"sham",!0)}},44918:(e,t,r)=>{"use strict";var n=r(12329);e.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},40139:(e,t,r)=>{"use strict";var n=r(4281),a=Function.prototype,o=a.apply,i=a.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?i.bind(o):function(){return i.apply(o,arguments)})},49110:(e,t,r)=>{"use strict";var n=r(37254),a=r(25865),o=r(4281),i=n(n.bind);e.exports=function(e,t){return a(e),void 0===t?e:o?i(e,t):function(){return e.apply(t,arguments)}}},4281:(e,t,r)=>{"use strict";var n=r(12329);e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},61632:(e,t,r)=>{"use strict";var n=r(25021),a=r(25865),o=r(14953),i=r(4797),l=r(71820),u=r(4281),s=Function,c=n([].concat),f=n([].join),d={};e.exports=u?s.bind:function(e){var t=a(this),r=t.prototype,n=l(arguments,1),u=function(){var r=c(n,l(arguments));return this instanceof u?function(e,t,r){if(!i(d,t)){for(var n=[],a=0;a{"use strict";var n=r(4281),a=Function.prototype.call;e.exports=n?a.bind(a):function(){return a.apply(a,arguments)}},84847:(e,t,r)=>{"use strict";var n=r(62039),a=r(4797),o=Function.prototype,i=n&&Object.getOwnPropertyDescriptor,l=a(o,"name"),u=l&&"something"===function(){}.name,s=l&&(!n||n&&i(o,"name").configurable);e.exports={EXISTS:l,PROPER:u,CONFIGURABLE:s}},39388:(e,t,r)=>{"use strict";var n=r(25021),a=r(25865);e.exports=function(e,t,r){try{return n(a(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(o){}}},37254:(e,t,r)=>{"use strict";var n=r(78261),a=r(25021);e.exports=function(e){if("Function"===n(e))return a(e)}},25021:(e,t,r)=>{"use strict";var n=r(4281),a=Function.prototype,o=a.call,i=n&&a.bind.bind(o,o);e.exports=n?i:function(e){return function(){return o.apply(e,arguments)}}},73674:(e,t,r)=>{"use strict";var n=r(89246),a=r(74414);e.exports=function(e,t){return arguments.length<2?(r=n[e],a(r)?r:void 0):n[e]&&n[e][t];var r}},63955:(e,t,r)=>{"use strict";var n=r(16868),a=r(67794),o=r(95090),i=r(92214),l=r(42365)("iterator");e.exports=function(e){if(!o(e))return a(e,l)||a(e,"@@iterator")||i[n(e)]}},58247:(e,t,r)=>{"use strict";var n=r(71082),a=r(25865),o=r(14302),i=r(62073),l=r(63955),u=TypeError;e.exports=function(e,t){var r=arguments.length<2?l(e):t;if(a(r))return o(n(r,e));throw u(i(e)+" is not iterable")}},41361:(e,t,r)=>{"use strict";var n=r(25021),a=r(30835),o=r(74414),i=r(78261),l=r(32053),u=n([].push);e.exports=function(e){if(o(e))return e;if(a(e)){for(var t=e.length,r=[],n=0;n{"use strict";var n=r(25865),a=r(95090);e.exports=function(e,t){var r=e[t];return a(r)?void 0:n(r)}},20649:(e,t,r)=>{"use strict";var n=r(25021),a=r(99639),o=Math.floor,i=n("".charAt),l=n("".replace),u=n("".slice),s=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,c=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,r,n,f,d){var p=r+e.length,h=n.length,m=c;return void 0!==f&&(f=a(f),m=s),l(d,m,(function(a,l){var s;switch(i(l,0)){case"$":return"$";case"&":return e;case"`":return u(t,0,r);case"'":return u(t,p);case"<":s=f[u(l,1,-1)];break;default:var c=+l;if(0===c)return a;if(c>h){var d=o(c/10);return 0===d?a:d<=h?void 0===n[d-1]?i(l,1):n[d-1]+i(l,1):a}s=n[c-1]}return void 0===s?"":s}))}},89246:function(e,t,r){"use strict";var n=function(e){return e&&e.Math===Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||function(){return this}()||this||Function("return this")()},4797:(e,t,r)=>{"use strict";var n=r(25021),a=r(99639),o=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(a(e),t)}},82058:e=>{"use strict";e.exports={}},91593:e=>{"use strict";e.exports=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(r){}}},48742:(e,t,r)=>{"use strict";var n=r(73674);e.exports=n("document","documentElement")},9448:(e,t,r)=>{"use strict";var n=r(62039),a=r(12329),o=r(32795);e.exports=!n&&!a((function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},61352:(e,t,r)=>{"use strict";var n=r(25021),a=r(12329),o=r(78261),i=Object,l=n("".split);e.exports=a((function(){return!i("z").propertyIsEnumerable(0)}))?function(e){return"String"===o(e)?l(e,""):i(e)}:i},87854:(e,t,r)=>{"use strict";var n=r(74414),a=r(14953),o=r(73795);e.exports=function(e,t,r){var i,l;return o&&n(i=t.constructor)&&i!==r&&a(l=i.prototype)&&l!==r.prototype&&o(e,l),e}},13259:(e,t,r)=>{"use strict";var n=r(25021),a=r(74414),o=r(84196),i=n(Function.toString);a(o.inspectSource)||(o.inspectSource=function(e){return i(e)}),e.exports=o.inspectSource},97485:(e,t,r)=>{"use strict";var n=r(46609),a=r(25021),o=r(82058),i=r(14953),l=r(4797),u=r(75625).f,s=r(82608),c=r(16352),f=r(40697),d=r(25565),p=r(44918),h=!1,m=d("meta"),v=0,g=function(e){u(e,m,{value:{objectID:"O"+v++,weakData:{}}})},y=e.exports={enable:function(){y.enable=function(){},h=!0;var e=s.f,t=a([].splice),r={};r[m]=1,e(r).length&&(s.f=function(r){for(var n=e(r),a=0,o=n.length;a{"use strict";var n,a,o,i=r(80837),l=r(89246),u=r(14953),s=r(13818),c=r(4797),f=r(84196),d=r(7242),p=r(82058),h="Object already initialized",m=l.TypeError,v=l.WeakMap;if(i||f.state){var g=f.state||(f.state=new v);g.get=g.get,g.has=g.has,g.set=g.set,n=function(e,t){if(g.has(e))throw m(h);return t.facade=e,g.set(e,t),t},a=function(e){return g.get(e)||{}},o=function(e){return g.has(e)}}else{var y=d("state");p[y]=!0,n=function(e,t){if(c(e,y))throw m(h);return t.facade=e,s(e,y,t),t},a=function(e){return c(e,y)?e[y]:{}},o=function(e){return c(e,y)}}e.exports={set:n,get:a,has:o,enforce:function(e){return o(e)?a(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!u(t)||(r=a(t)).type!==e)throw m("Incompatible receiver, "+e+" required");return r}}}},83255:(e,t,r)=>{"use strict";var n=r(42365),a=r(92214),o=n("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(a.Array===e||i[o]===e)}},30835:(e,t,r)=>{"use strict";var n=r(78261);e.exports=Array.isArray||function(e){return"Array"===n(e)}},74414:(e,t,r)=>{"use strict";var n=r(4606),a=n.all;e.exports=n.IS_HTMLDDA?function(e){return"function"==typeof e||e===a}:function(e){return"function"==typeof e}},26924:(e,t,r)=>{"use strict";var n=r(25021),a=r(12329),o=r(74414),i=r(16868),l=r(73674),u=r(13259),s=function(){},c=[],f=l("Reflect","construct"),d=/^\s*(?:class|function)\b/,p=n(d.exec),h=!d.exec(s),m=function(e){if(!o(e))return!1;try{return f(s,c,e),!0}catch(t){return!1}},v=function(e){if(!o(e))return!1;switch(i(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!p(d,u(e))}catch(t){return!0}};v.sham=!0,e.exports=!f||a((function(){var e;return m(m.call)||!m(Object)||!m((function(){e=!0}))||e}))?v:m},35434:(e,t,r)=>{"use strict";var n=r(4797);e.exports=function(e){return void 0!==e&&(n(e,"value")||n(e,"writable"))}},96730:(e,t,r)=>{"use strict";var n=r(12329),a=r(74414),o=/#|\.prototype\./,i=function(e,t){var r=u[l(e)];return r===c||r!==s&&(a(t)?n(t):!!t)},l=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},u=i.data={},s=i.NATIVE="N",c=i.POLYFILL="P";e.exports=i},95090:e=>{"use strict";e.exports=function(e){return null===e||void 0===e}},14953:(e,t,r)=>{"use strict";var n=r(74414),a=r(4606),o=a.all;e.exports=a.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:n(e)||e===o}:function(e){return"object"==typeof e?null!==e:n(e)}},16634:e=>{"use strict";e.exports=!1},61069:(e,t,r)=>{"use strict";var n=r(14953),a=r(78261),o=r(42365)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[o])?!!t:"RegExp"===a(e))}},96315:(e,t,r)=>{"use strict";var n=r(73674),a=r(74414),o=r(86535),i=r(98652),l=Object;e.exports=i?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return a(t)&&o(t.prototype,l(e))}},29828:(e,t,r)=>{"use strict";var n=r(49110),a=r(71082),o=r(14302),i=r(62073),l=r(83255),u=r(64906),s=r(86535),c=r(58247),f=r(63955),d=r(54695),p=TypeError,h=function(e,t){this.stopped=e,this.result=t},m=h.prototype;e.exports=function(e,t,r){var v,g,y,b,w,k,_,O=r&&r.that,S=!(!r||!r.AS_ENTRIES),E=!(!r||!r.IS_RECORD),x=!(!r||!r.IS_ITERATOR),P=!(!r||!r.INTERRUPTED),A=n(t,O),T=function(e){return v&&d(v,"normal",e),new h(!0,e)},j=function(e){return S?(o(e),P?A(e[0],e[1],T):A(e[0],e[1])):P?A(e,T):A(e)};if(E)v=e.iterator;else if(x)v=e;else{if(!(g=f(e)))throw p(i(e)+" is not iterable");if(l(g)){for(y=0,b=u(e);b>y;y++)if((w=j(e[y]))&&s(m,w))return w;return new h(!1)}v=c(e,g)}for(k=E?e.next:v.next;!(_=a(k,v)).done;){try{w=j(_.value)}catch(C){d(v,"throw",C)}if("object"==typeof w&&w&&s(m,w))return w}return new h(!1)}},54695:(e,t,r)=>{"use strict";var n=r(71082),a=r(14302),o=r(67794);e.exports=function(e,t,r){var i,l;a(e);try{if(!(i=o(e,"return"))){if("throw"===t)throw r;return r}i=n(i,e)}catch(u){l=!0,i=u}if("throw"===t)throw r;if(l)throw i;return a(i),r}},13594:(e,t,r)=>{"use strict";var n=r(17057).IteratorPrototype,a=r(24560),o=r(57077),i=r(99519),l=r(92214),u=function(){return this};e.exports=function(e,t,r,s){var c=t+" Iterator";return e.prototype=a(n,{next:o(+!s,r)}),i(e,c,!1,!0),l[c]=u,e}},70184:(e,t,r)=>{"use strict";var n=r(46609),a=r(71082),o=r(16634),i=r(84847),l=r(74414),u=r(13594),s=r(27500),c=r(73795),f=r(99519),d=r(13818),p=r(26692),h=r(42365),m=r(92214),v=r(17057),g=i.PROPER,y=i.CONFIGURABLE,b=v.IteratorPrototype,w=v.BUGGY_SAFARI_ITERATORS,k=h("iterator"),_="keys",O="values",S="entries",E=function(){return this};e.exports=function(e,t,r,i,h,v,x){u(r,t,i);var P,A,T,j=function(e){if(e===h&&D)return D;if(!w&&e&&e in M)return M[e];switch(e){case _:case O:case S:return function(){return new r(this,e)}}return function(){return new r(this)}},C=t+" Iterator",R=!1,M=e.prototype,I=M[k]||M["@@iterator"]||h&&M[h],D=!w&&I||j(h),N="Array"===t&&M.entries||I;if(N&&(P=s(N.call(new e)))!==Object.prototype&&P.next&&(o||s(P)===b||(c?c(P,b):l(P[k])||p(P,k,E)),f(P,C,!0,!0),o&&(m[C]=E)),g&&h===O&&I&&I.name!==O&&(!o&&y?d(M,"name",O):(R=!0,D=function(){return a(I,this)})),h)if(A={values:j(O),keys:v?D:j(_),entries:j(S)},x)for(T in A)(w||R||!(T in M))&&p(M,T,A[T]);else n({target:t,proto:!0,forced:w||R},A);return o&&!x||M[k]===D||p(M,k,D,{name:h}),m[t]=D,A}},17057:(e,t,r)=>{"use strict";var n,a,o,i=r(12329),l=r(74414),u=r(14953),s=r(24560),c=r(27500),f=r(26692),d=r(42365),p=r(16634),h=d("iterator"),m=!1;[].keys&&("next"in(o=[].keys())?(a=c(c(o)))!==Object.prototype&&(n=a):m=!0),!u(n)||i((function(){var e={};return n[h].call(e)!==e}))?n={}:p&&(n=s(n)),l(n[h])||f(n,h,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:m}},92214:e=>{"use strict";e.exports={}},64906:(e,t,r)=>{"use strict";var n=r(88307);e.exports=function(e){return n(e.length)}},3928:(e,t,r)=>{"use strict";var n=r(25021),a=r(12329),o=r(74414),i=r(4797),l=r(62039),u=r(84847).CONFIGURABLE,s=r(13259),c=r(85915),f=c.enforce,d=c.get,p=String,h=Object.defineProperty,m=n("".slice),v=n("".replace),g=n([].join),y=l&&!a((function(){return 8!==h((function(){}),"length",{value:8}).length})),b=String(String).split("String"),w=e.exports=function(e,t,r){"Symbol("===m(p(t),0,7)&&(t="["+v(p(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!i(e,"name")||u&&e.name!==t)&&(l?h(e,"name",{value:t,configurable:!0}):e.name=t),y&&r&&i(r,"arity")&&e.length!==r.arity&&h(e,"length",{value:r.arity});try{r&&i(r,"constructor")&&r.constructor?l&&h(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(a){}var n=f(e);return i(n,"source")||(n.source=g(b,"string"==typeof t?t:"")),e};Function.prototype.toString=w((function(){return o(this)&&d(this).source||s(this)}),"toString")},79757:e=>{"use strict";var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function(e){var n=+e;return(n>0?r:t)(n)}},64878:(e,t,r)=>{"use strict";var n,a,o,i,l,u=r(89246),s=r(49110),c=r(17062).f,f=r(6217).set,d=r(12392),p=r(27293),h=r(17),m=r(24507),v=r(21014),g=u.MutationObserver||u.WebKitMutationObserver,y=u.document,b=u.process,w=u.Promise,k=c(u,"queueMicrotask"),_=k&&k.value;if(!_){var O=new d,S=function(){var e,t;for(v&&(e=b.domain)&&e.exit();t=O.get();)try{t()}catch(r){throw O.head&&n(),r}e&&e.enter()};p||v||m||!g||!y?!h&&w&&w.resolve?((i=w.resolve(void 0)).constructor=w,l=s(i.then,i),n=function(){l(S)}):v?n=function(){b.nextTick(S)}:(f=s(f,u),n=function(){f(S)}):(a=!0,o=y.createTextNode(""),new g(S).observe(o,{characterData:!0}),n=function(){o.data=a=!a}),_=function(e){O.head||n(),O.add(e)}}e.exports=_},15371:(e,t,r)=>{"use strict";var n=r(25865),a=TypeError,o=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw a("Bad Promise constructor");t=e,r=n})),this.resolve=n(t),this.reject=n(r)};e.exports.f=function(e){return new o(e)}},99165:(e,t,r)=>{"use strict";var n=r(61069),a=TypeError;e.exports=function(e){if(n(e))throw a("The method doesn't accept regular expressions");return e}},99229:(e,t,r)=>{"use strict";var n=r(62039),a=r(25021),o=r(71082),i=r(12329),l=r(82157),u=r(79684),s=r(87290),c=r(99639),f=r(61352),d=Object.assign,p=Object.defineProperty,h=a([].concat);e.exports=!d||i((function(){if(n&&1!==d({b:1},d(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol("assign detection"),a="abcdefghijklmnopqrst";return e[r]=7,a.split("").forEach((function(e){t[e]=e})),7!==d({},e)[r]||l(d({},t)).join("")!==a}))?function(e,t){for(var r=c(e),a=arguments.length,i=1,d=u.f,p=s.f;a>i;)for(var m,v=f(arguments[i++]),g=d?h(l(v),d(v)):l(v),y=g.length,b=0;y>b;)m=g[b++],n&&!o(p,v,m)||(r[m]=v[m]);return r}:d},24560:(e,t,r)=>{"use strict";var n,a=r(14302),o=r(86332),i=r(83950),l=r(82058),u=r(48742),s=r(32795),c=r(7242),f="prototype",d="script",p=c("IE_PROTO"),h=function(){},m=function(e){return"<"+d+">"+e+""},v=function(e){e.write(m("")),e.close();var t=e.parentWindow.Object;return e=null,t},g=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}g="undefined"!=typeof document?document.domain&&n?v(n):function(){var e,t=s("iframe"),r="java"+d+":";return t.style.display="none",u.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(m("document.F=Object")),e.close(),e.F}():v(n);for(var e=i.length;e--;)delete g[f][i[e]];return g()};l[p]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(h[f]=a(e),r=new h,h[f]=null,r[p]=e):r=g(),void 0===t?r:o.f(r,t)}},86332:(e,t,r)=>{"use strict";var n=r(62039),a=r(82819),o=r(75625),i=r(14302),l=r(17963),u=r(82157);t.f=n&&!a?Object.defineProperties:function(e,t){i(e);for(var r,n=l(t),a=u(t),s=a.length,c=0;s>c;)o.f(e,r=a[c++],n[r]);return e}},75625:(e,t,r)=>{"use strict";var n=r(62039),a=r(9448),o=r(82819),i=r(14302),l=r(61154),u=TypeError,s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,f="enumerable",d="configurable",p="writable";t.f=n?o?function(e,t,r){if(i(e),t=l(t),i(r),"function"===typeof e&&"prototype"===t&&"value"in r&&p in r&&!r[p]){var n=c(e,t);n&&n[p]&&(e[t]=r.value,r={configurable:d in r?r[d]:n[d],enumerable:f in r?r[f]:n[f],writable:!1})}return s(e,t,r)}:s:function(e,t,r){if(i(e),t=l(t),i(r),a)try{return s(e,t,r)}catch(n){}if("get"in r||"set"in r)throw u("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},17062:(e,t,r)=>{"use strict";var n=r(62039),a=r(71082),o=r(87290),i=r(57077),l=r(17963),u=r(61154),s=r(4797),c=r(9448),f=Object.getOwnPropertyDescriptor;t.f=n?f:function(e,t){if(e=l(e),t=u(t),c)try{return f(e,t)}catch(r){}if(s(e,t))return i(!a(o.f,e,t),e[t])}},16352:(e,t,r)=>{"use strict";var n=r(78261),a=r(17963),o=r(82608).f,i=r(80535),l="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return l&&"Window"===n(e)?function(e){try{return o(e)}catch(t){return i(l)}}(e):o(a(e))}},82608:(e,t,r)=>{"use strict";var n=r(68697),a=r(83950).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,a)}},79684:(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},27500:(e,t,r)=>{"use strict";var n=r(4797),a=r(74414),o=r(99639),i=r(7242),l=r(60447),u=i("IE_PROTO"),s=Object,c=s.prototype;e.exports=l?s.getPrototypeOf:function(e){var t=o(e);if(n(t,u))return t[u];var r=t.constructor;return a(r)&&t instanceof r?r.prototype:t instanceof s?c:null}},40697:(e,t,r)=>{"use strict";var n=r(12329),a=r(14953),o=r(78261),i=r(61028),l=Object.isExtensible,u=n((function(){l(1)}));e.exports=u||i?function(e){return!!a(e)&&((!i||"ArrayBuffer"!==o(e))&&(!l||l(e)))}:l},86535:(e,t,r)=>{"use strict";var n=r(25021);e.exports=n({}.isPrototypeOf)},68697:(e,t,r)=>{"use strict";var n=r(25021),a=r(4797),o=r(17963),i=r(44740).indexOf,l=r(82058),u=n([].push);e.exports=function(e,t){var r,n=o(e),s=0,c=[];for(r in n)!a(l,r)&&a(n,r)&&u(c,r);for(;t.length>s;)a(n,r=t[s++])&&(~i(c,r)||u(c,r));return c}},82157:(e,t,r)=>{"use strict";var n=r(68697),a=r(83950);e.exports=Object.keys||function(e){return n(e,a)}},87290:(e,t)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,a=n&&!r.call({1:2},1);t.f=a?function(e){var t=n(this,e);return!!t&&t.enumerable}:r},73795:(e,t,r)=>{"use strict";var n=r(39388),a=r(14302),o=r(45435);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=n(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(i){}return function(r,n){return a(r),o(n),t?e(r,n):r.__proto__=n,r}}():void 0)},90596:(e,t,r)=>{"use strict";var n=r(62039),a=r(12329),o=r(25021),i=r(27500),l=r(82157),u=r(17963),s=o(r(87290).f),c=o([].push),f=n&&a((function(){var e=Object.create(null);return e[2]=2,!s(e,2)})),d=function(e){return function(t){for(var r,a=u(t),o=l(a),d=f&&null===i(a),p=o.length,h=0,m=[];p>h;)r=o[h++],n&&!(d?r in a:s(a,r))||c(m,e?[r,a[r]]:a[r]);return m}};e.exports={entries:d(!0),values:d(!1)}},24111:(e,t,r)=>{"use strict";var n=r(61104),a=r(16868);e.exports=n?{}.toString:function(){return"[object "+a(this)+"]"}},52118:(e,t,r)=>{"use strict";var n=r(71082),a=r(74414),o=r(14953),i=TypeError;e.exports=function(e,t){var r,l;if("string"===t&&a(r=e.toString)&&!o(l=n(r,e)))return l;if(a(r=e.valueOf)&&!o(l=n(r,e)))return l;if("string"!==t&&a(r=e.toString)&&!o(l=n(r,e)))return l;throw i("Can't convert object to primitive value")}},68360:(e,t,r)=>{"use strict";var n=r(73674),a=r(25021),o=r(82608),i=r(79684),l=r(14302),u=a([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=o.f(l(e)),r=i.f;return r?u(t,r(e)):t}},39802:(e,t,r)=>{"use strict";var n=r(89246);e.exports=n},50427:e=>{"use strict";e.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}},22682:(e,t,r)=>{"use strict";var n=r(89246),a=r(41076),o=r(74414),i=r(96730),l=r(13259),u=r(42365),s=r(18372),c=r(9575),f=r(16634),d=r(44585),p=a&&a.prototype,h=u("species"),m=!1,v=o(n.PromiseRejectionEvent),g=i("Promise",(function(){var e=l(a),t=e!==String(a);if(!t&&66===d)return!0;if(f&&(!p.catch||!p.finally))return!0;if(!d||d<51||!/native code/.test(e)){var r=new a((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[h]=n,!(m=r.then((function(){}))instanceof n))return!0}return!t&&(s||c)&&!v}));e.exports={CONSTRUCTOR:g,REJECTION_EVENT:v,SUBCLASSING:m}},41076:(e,t,r)=>{"use strict";var n=r(89246);e.exports=n.Promise},5406:(e,t,r)=>{"use strict";var n=r(14302),a=r(14953),o=r(15371);e.exports=function(e,t){if(n(e),a(t)&&t.constructor===e)return t;var r=o.f(e);return(0,r.resolve)(t),r.promise}},47612:(e,t,r)=>{"use strict";var n=r(41076),a=r(53626),o=r(22682).CONSTRUCTOR;e.exports=o||!a((function(e){n.all(e).then(void 0,(function(){}))}))},78874:(e,t,r)=>{"use strict";var n=r(75625).f;e.exports=function(e,t,r){r in e||n(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})}},12392:e=>{"use strict";var t=function(){this.head=null,this.tail=null};t.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},e.exports=t},23250:(e,t,r)=>{"use strict";var n=r(71082),a=r(14302),o=r(74414),i=r(78261),l=r(53189),u=TypeError;e.exports=function(e,t){var r=e.exec;if(o(r)){var s=n(r,e,t);return null!==s&&a(s),s}if("RegExp"===i(e))return n(l,e,t);throw u("RegExp#exec called on incompatible receiver")}},53189:(e,t,r)=>{"use strict";var n=r(71082),a=r(25021),o=r(32053),i=r(61220),l=r(1983),u=r(90820),s=r(24560),c=r(85915).get,f=r(58306),d=r(45017),p=u("native-string-replace",String.prototype.replace),h=RegExp.prototype.exec,m=h,v=a("".charAt),g=a("".indexOf),y=a("".replace),b=a("".slice),w=function(){var e=/a/,t=/b*/g;return n(h,e,"a"),n(h,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),k=l.BROKEN_CARET,_=void 0!==/()??/.exec("")[1];(w||_||k||f||d)&&(m=function(e){var t,r,a,l,u,f,d,O=this,S=c(O),E=o(e),x=S.raw;if(x)return x.lastIndex=O.lastIndex,t=n(m,x,E),O.lastIndex=x.lastIndex,t;var P=S.groups,A=k&&O.sticky,T=n(i,O),j=O.source,C=0,R=E;if(A&&(T=y(T,"y",""),-1===g(T,"g")&&(T+="g"),R=b(E,O.lastIndex),O.lastIndex>0&&(!O.multiline||O.multiline&&"\n"!==v(E,O.lastIndex-1))&&(j="(?: "+j+")",R=" "+R,C++),r=new RegExp("^(?:"+j+")",T)),_&&(r=new RegExp("^"+j+"$(?!\\s)",T)),w&&(a=O.lastIndex),l=n(h,A?r:O,R),A?l?(l.input=b(l.input,C),l[0]=b(l[0],C),l.index=O.lastIndex,O.lastIndex+=l[0].length):O.lastIndex=0:w&&l&&(O.lastIndex=O.global?l.index+l[0].length:a),_&&l&&l.length>1&&n(p,l[0],r,(function(){for(u=1;u{"use strict";var n=r(14302);e.exports=function(){var e=n(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},6715:(e,t,r)=>{"use strict";var n=r(71082),a=r(4797),o=r(86535),i=r(61220),l=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in l||a(e,"flags")||!o(l,e)?t:n(i,e)}},1983:(e,t,r)=>{"use strict";var n=r(12329),a=r(89246).RegExp,o=n((function(){var e=a("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),i=o||n((function(){return!a("a","y").sticky})),l=o||n((function(){var e=a("^r","gy");return e.lastIndex=2,null!==e.exec("str")}));e.exports={BROKEN_CARET:l,MISSED_STICKY:i,UNSUPPORTED_Y:o}},58306:(e,t,r)=>{"use strict";var n=r(12329),a=r(89246).RegExp;e.exports=n((function(){var e=a(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))},45017:(e,t,r)=>{"use strict";var n=r(12329),a=r(89246).RegExp;e.exports=n((function(){var e=a("(?b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$c")}))},16095:(e,t,r)=>{"use strict";var n=r(95090),a=TypeError;e.exports=function(e){if(n(e))throw a("Can't call method on "+e);return e}},85389:e=>{"use strict";e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}},12587:(e,t,r)=>{"use strict";var n=r(89246),a=r(40139),o=r(74414),i=r(17445),l=r(67530),u=r(71820),s=r(70075),c=n.Function,f=/MSIE .\./.test(l)||i&&function(){var e=n.Bun.version.split(".");return e.length<3||"0"===e[0]&&(e[1]<3||"3"===e[1]&&"0"===e[2])}();e.exports=function(e,t){var r=t?2:1;return f?function(n,i){var l=s(arguments.length,1)>r,f=o(n)?n:c(n),d=l?u(arguments,r):[],p=l?function(){a(f,this,d)}:f;return t?e(p,i):e(p)}:e}},86176:(e,t,r)=>{"use strict";var n=r(73674),a=r(90361),o=r(42365),i=r(62039),l=o("species");e.exports=function(e){var t=n(e);i&&t&&!t[l]&&a(t,l,{configurable:!0,get:function(){return this}})}},99519:(e,t,r)=>{"use strict";var n=r(75625).f,a=r(4797),o=r(42365)("toStringTag");e.exports=function(e,t,r){e&&!r&&(e=e.prototype),e&&!a(e,o)&&n(e,o,{configurable:!0,value:t})}},7242:(e,t,r)=>{"use strict";var n=r(90820),a=r(25565),o=n("keys");e.exports=function(e){return o[e]||(o[e]=a(e))}},84196:(e,t,r)=>{"use strict";var n=r(89246),a=r(34929),o="__core-js_shared__",i=n[o]||a(o,{});e.exports=i},90820:(e,t,r)=>{"use strict";var n=r(16634),a=r(84196);(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.32.2",mode:n?"pure":"global",copyright:"\xa9 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.2/LICENSE",source:"https://github.com/zloirock/core-js"})},74017:(e,t,r)=>{"use strict";var n=r(14302),a=r(65432),o=r(95090),i=r(42365)("species");e.exports=function(e,t){var r,l=n(e).constructor;return void 0===l||o(r=n(l)[i])?t:a(r)}},60959:(e,t,r)=>{"use strict";var n=r(25021),a=r(3160),o=r(32053),i=r(16095),l=n("".charAt),u=n("".charCodeAt),s=n("".slice),c=function(e){return function(t,r){var n,c,f=o(i(t)),d=a(r),p=f.length;return d<0||d>=p?e?"":void 0:(n=u(f,d))<55296||n>56319||d+1===p||(c=u(f,d+1))<56320||c>57343?e?l(f,d):n:e?s(f,d,d+2):c-56320+(n-55296<<10)+65536}};e.exports={codeAt:c(!1),charAt:c(!0)}},72923:(e,t,r)=>{"use strict";var n=r(84847).PROPER,a=r(12329),o=r(12617);e.exports=function(e){return a((function(){return!!o[e]()||"\u200b\x85\u180e"!=="\u200b\x85\u180e"[e]()||n&&o[e].name!==e}))}},77691:(e,t,r)=>{"use strict";var n=r(25021),a=r(16095),o=r(32053),i=r(12617),l=n("".replace),u=RegExp("^["+i+"]+"),s=RegExp("(^|[^"+i+"])["+i+"]+$"),c=function(e){return function(t){var r=o(a(t));return 1&e&&(r=l(r,u,"")),2&e&&(r=l(r,s,"$1")),r}};e.exports={start:c(1),end:c(2),trim:c(3)}},12670:(e,t,r)=>{"use strict";var n=r(44585),a=r(12329),o=r(89246).String;e.exports=!!Object.getOwnPropertySymbols&&!a((function(){var e=Symbol("symbol detection");return!o(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},51039:(e,t,r)=>{"use strict";var n=r(71082),a=r(73674),o=r(42365),i=r(26692);e.exports=function(){var e=a("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,l=o("toPrimitive");t&&!t[l]&&i(t,l,(function(e){return n(r,this)}),{arity:1})}},68050:(e,t,r)=>{"use strict";var n=r(12670);e.exports=n&&!!Symbol.for&&!!Symbol.keyFor},6217:(e,t,r)=>{"use strict";var n,a,o,i,l=r(89246),u=r(40139),s=r(49110),c=r(74414),f=r(4797),d=r(12329),p=r(48742),h=r(71820),m=r(32795),v=r(70075),g=r(27293),y=r(21014),b=l.setImmediate,w=l.clearImmediate,k=l.process,_=l.Dispatch,O=l.Function,S=l.MessageChannel,E=l.String,x=0,P={},A="onreadystatechange";d((function(){n=l.location}));var T=function(e){if(f(P,e)){var t=P[e];delete P[e],t()}},j=function(e){return function(){T(e)}},C=function(e){T(e.data)},R=function(e){l.postMessage(E(e),n.protocol+"//"+n.host)};b&&w||(b=function(e){v(arguments.length,1);var t=c(e)?e:O(e),r=h(arguments,1);return P[++x]=function(){u(t,void 0,r)},a(x),x},w=function(e){delete P[e]},y?a=function(e){k.nextTick(j(e))}:_&&_.now?a=function(e){_.now(j(e))}:S&&!g?(i=(o=new S).port2,o.port1.onmessage=C,a=s(i.postMessage,i)):l.addEventListener&&c(l.postMessage)&&!l.importScripts&&n&&"file:"!==n.protocol&&!d(R)?(a=R,l.addEventListener("message",C,!1)):a=A in m("script")?function(e){p.appendChild(m("script"))[A]=function(){p.removeChild(this),T(e)}}:function(e){setTimeout(j(e),0)}),e.exports={set:b,clear:w}},20654:(e,t,r)=>{"use strict";var n=r(25021);e.exports=n(1..valueOf)},66166:(e,t,r)=>{"use strict";var n=r(3160),a=Math.max,o=Math.min;e.exports=function(e,t){var r=n(e);return r<0?a(r+t,0):o(r,t)}},17963:(e,t,r)=>{"use strict";var n=r(61352),a=r(16095);e.exports=function(e){return n(a(e))}},3160:(e,t,r)=>{"use strict";var n=r(79757);e.exports=function(e){var t=+e;return t!==t||0===t?0:n(t)}},88307:(e,t,r)=>{"use strict";var n=r(3160),a=Math.min;e.exports=function(e){return e>0?a(n(e),9007199254740991):0}},99639:(e,t,r)=>{"use strict";var n=r(16095),a=Object;e.exports=function(e){return a(n(e))}},54100:(e,t,r)=>{"use strict";var n=r(71082),a=r(14953),o=r(96315),i=r(67794),l=r(52118),u=r(42365),s=TypeError,c=u("toPrimitive");e.exports=function(e,t){if(!a(e)||o(e))return e;var r,u=i(e,c);if(u){if(void 0===t&&(t="default"),r=n(u,e,t),!a(r)||o(r))return r;throw s("Can't convert object to primitive value")}return void 0===t&&(t="number"),l(e,t)}},61154:(e,t,r)=>{"use strict";var n=r(54100),a=r(96315);e.exports=function(e){var t=n(e,"string");return a(t)?t:t+""}},61104:(e,t,r)=>{"use strict";var n={};n[r(42365)("toStringTag")]="z",e.exports="[object z]"===String(n)},32053:(e,t,r)=>{"use strict";var n=r(16868),a=String;e.exports=function(e){if("Symbol"===n(e))throw TypeError("Cannot convert a Symbol value to a string");return a(e)}},62073:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(r){return"Object"}}},25565:(e,t,r)=>{"use strict";var n=r(25021),a=0,o=Math.random(),i=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+i(++a+o,36)}},98652:(e,t,r)=>{"use strict";var n=r(12670);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},82819:(e,t,r)=>{"use strict";var n=r(62039),a=r(12329);e.exports=n&&a((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},70075:e=>{"use strict";var t=TypeError;e.exports=function(e,r){if(e{"use strict";var n=r(89246),a=r(74414),o=n.WeakMap;e.exports=a(o)&&/native code/.test(String(o))},35256:(e,t,r)=>{"use strict";var n=r(39802),a=r(4797),o=r(51765),i=r(75625).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});a(t,e)||i(t,e,{value:o.f(e)})}},51765:(e,t,r)=>{"use strict";var n=r(42365);t.f=n},42365:(e,t,r)=>{"use strict";var n=r(89246),a=r(90820),o=r(4797),i=r(25565),l=r(12670),u=r(98652),s=n.Symbol,c=a("wks"),f=u?s.for||s:s&&s.withoutSetter||i;e.exports=function(e){return o(c,e)||(c[e]=l&&o(s,e)?s[e]:f("Symbol."+e)),c[e]}},12617:e=>{"use strict";e.exports="\t\n\v\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},98426:(e,t,r)=>{"use strict";var n=r(46609),a=r(12329),o=r(30835),i=r(14953),l=r(99639),u=r(64906),s=r(91707),c=r(76754),f=r(60792),d=r(48154),p=r(42365),h=r(44585),m=p("isConcatSpreadable"),v=h>=51||!a((function(){var e=[];return e[m]=!1,e.concat()[0]!==e})),g=function(e){if(!i(e))return!1;var t=e[m];return void 0!==t?!!t:o(e)};n({target:"Array",proto:!0,arity:1,forced:!v||!d("concat")},{concat:function(e){var t,r,n,a,o,i=l(this),d=f(i,0),p=0;for(t=-1,n=arguments.length;t{"use strict";var n=r(46609),a=r(30888),o=r(54057);n({target:"Array",proto:!0},{fill:a}),o("fill")},19373:(e,t,r)=>{"use strict";var n=r(46609),a=r(84512).filter;n({target:"Array",proto:!0,forced:!r(48154)("filter")},{filter:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}})},75104:(e,t,r)=>{"use strict";var n=r(46609),a=r(84512).findIndex,o=r(54057),i="findIndex",l=!0;i in[]&&Array(1)[i]((function(){l=!1})),n({target:"Array",proto:!0,forced:l},{findIndex:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),o(i)},13117:(e,t,r)=>{"use strict";var n=r(46609),a=r(84512).find,o=r(54057),i="find",l=!0;i in[]&&Array(1)[i]((function(){l=!1})),n({target:"Array",proto:!0,forced:l},{find:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),o(i)},25442:(e,t,r)=>{"use strict";var n=r(46609),a=r(63660);n({target:"Array",stat:!0,forced:!r(53626)((function(e){Array.from(e)}))},{from:a})},46797:(e,t,r)=>{"use strict";var n=r(46609),a=r(44740).includes,o=r(12329),i=r(54057);n({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),i("includes")},68053:(e,t,r)=>{"use strict";var n=r(17963),a=r(54057),o=r(92214),i=r(85915),l=r(75625).f,u=r(70184),s=r(80835),c=r(16634),f=r(62039),d="Array Iterator",p=i.set,h=i.getterFor(d);e.exports=u(Array,"Array",(function(e,t){p(this,{type:d,target:n(e),index:0,kind:t})}),(function(){var e=h(this),t=e.target,r=e.kind,n=e.index++;if(!t||n>=t.length)return e.target=void 0,s(void 0,!0);switch(r){case"keys":return s(n,!1);case"values":return s(t[n],!1)}return s([n,t[n]],!1)}),"values");var m=o.Arguments=o.Array;if(a("keys"),a("values"),a("entries"),!c&&f&&"values"!==m.name)try{l(m,"name",{value:"values"})}catch(v){}},26982:(e,t,r)=>{"use strict";var n=r(46609),a=r(25021),o=r(61352),i=r(17963),l=r(49418),u=a([].join);n({target:"Array",proto:!0,forced:o!==Object||!l("join",",")},{join:function(e){return u(i(this),void 0===e?",":e)}})},59849:(e,t,r)=>{"use strict";var n=r(46609),a=r(84512).map;n({target:"Array",proto:!0,forced:!r(48154)("map")},{map:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}})},13237:(e,t,r)=>{"use strict";var n=r(46609),a=r(30835),o=r(26924),i=r(14953),l=r(66166),u=r(64906),s=r(17963),c=r(76754),f=r(42365),d=r(48154),p=r(71820),h=d("slice"),m=f("species"),v=Array,g=Math.max;n({target:"Array",proto:!0,forced:!h},{slice:function(e,t){var r,n,f,d=s(this),h=u(d),y=l(e,h),b=l(void 0===t?h:t,h);if(a(d)&&(r=d.constructor,(o(r)&&(r===v||a(r.prototype))||i(r)&&null===(r=r[m]))&&(r=void 0),r===v||void 0===r))return p(d,y,b);for(n=new(void 0===r?v:r)(g(b-y,0)),f=0;y{"use strict";var n=r(46609),a=r(25021),o=r(25865),i=r(99639),l=r(64906),u=r(12745),s=r(32053),c=r(12329),f=r(30265),d=r(49418),p=r(48383),h=r(20076),m=r(44585),v=r(84170),g=[],y=a(g.sort),b=a(g.push),w=c((function(){g.sort(void 0)})),k=c((function(){g.sort(null)})),_=d("sort"),O=!c((function(){if(m)return m<70;if(!(p&&p>3)){if(h)return!0;if(v)return v<603;var e,t,r,n,a="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)g.push({k:t+n,v:r})}for(g.sort((function(e,t){return t.v-e.v})),n=0;ns(r)?1:-1}}(e)),r=l(a),n=0;n{"use strict";var n=r(62039),a=r(84847).EXISTS,o=r(25021),i=r(90361),l=Function.prototype,u=o(l.toString),s=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,c=o(s.exec);n&&!a&&i(l,"name",{configurable:!0,get:function(){try{return c(s,u(this))[1]}catch(e){return""}}})},95808:(e,t,r)=>{"use strict";var n=r(46609),a=r(73674),o=r(40139),i=r(71082),l=r(25021),u=r(12329),s=r(74414),c=r(96315),f=r(71820),d=r(41361),p=r(12670),h=String,m=a("JSON","stringify"),v=l(/./.exec),g=l("".charAt),y=l("".charCodeAt),b=l("".replace),w=l(1..toString),k=/[\uD800-\uDFFF]/g,_=/^[\uD800-\uDBFF]$/,O=/^[\uDC00-\uDFFF]$/,S=!p||u((function(){var e=a("Symbol")("stringify detection");return"[null]"!==m([e])||"{}"!==m({a:e})||"{}"!==m(Object(e))})),E=u((function(){return'"\\udf06\\ud834"'!==m("\udf06\ud834")||'"\\udead"'!==m("\udead")})),x=function(e,t){var r=f(arguments),n=d(t);if(s(n)||void 0!==e&&!c(e))return r[1]=function(e,t){if(s(n)&&(t=i(n,this,h(e),t)),!c(t))return t},o(m,null,r)},P=function(e,t,r){var n=g(r,t-1),a=g(r,t+1);return v(_,e)&&!v(O,a)||v(O,e)&&!v(_,n)?"\\u"+w(y(e,0),16):e};m&&n({target:"JSON",stat:!0,arity:3,forced:S||E},{stringify:function(e,t,r){var n=f(arguments),a=o(S?x:m,null,n);return E&&"string"==typeof a?b(a,k,P):a}})},71178:(e,t,r)=>{"use strict";var n=r(46609),a=r(16634),o=r(62039),i=r(89246),l=r(39802),u=r(25021),s=r(96730),c=r(4797),f=r(87854),d=r(86535),p=r(96315),h=r(54100),m=r(12329),v=r(82608).f,g=r(17062).f,y=r(75625).f,b=r(20654),w=r(77691).trim,k="Number",_=i[k],O=l[k],S=_.prototype,E=i.TypeError,x=u("".slice),P=u("".charCodeAt),A=function(e){var t,r,n,a,o,i,l,u,s=h(e,"number");if(p(s))throw E("Cannot convert a Symbol value to a number");if("string"==typeof s&&s.length>2)if(s=w(s),43===(t=P(s,0))||45===t){if(88===(r=P(s,2))||120===r)return NaN}else if(48===t){switch(P(s,1)){case 66:case 98:n=2,a=49;break;case 79:case 111:n=8,a=55;break;default:return+s}for(i=(o=x(s,2)).length,l=0;la)return NaN;return parseInt(o,n)}return+s},T=s(k,!_(" 0o1")||!_("0b1")||_("+0x1")),j=function(e){var t,r=arguments.length<1?0:_(function(e){var t=h(e,"number");return"bigint"==typeof t?t:A(t)}(e));return d(S,t=this)&&m((function(){b(t)}))?f(Object(r),this,j):r};j.prototype=S,T&&!a&&(S.constructor=j),n({global:!0,constructor:!0,wrap:!0,forced:T},{Number:j});var C=function(e,t){for(var r,n=o?v(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),a=0;n.length>a;a++)c(t,r=n[a])&&!c(e,r)&&y(e,r,g(t,r))};a&&O&&C(l[k],O),(T||a)&&C(l[k],_)},56505:(e,t,r)=>{"use strict";var n=r(46609),a=r(99229);n({target:"Object",stat:!0,arity:2,forced:Object.assign!==a},{assign:a})},64603:(e,t,r)=>{"use strict";var n=r(46609),a=r(90596).entries;n({target:"Object",stat:!0},{entries:function(e){return a(e)}})},71114:(e,t,r)=>{"use strict";var n=r(46609),a=r(44918),o=r(12329),i=r(14953),l=r(97485).onFreeze,u=Object.freeze;n({target:"Object",stat:!0,forced:o((function(){u(1)})),sham:!a},{freeze:function(e){return u&&i(e)?u(l(e)):e}})},79041:(e,t,r)=>{"use strict";var n=r(46609),a=r(12329),o=r(17963),i=r(17062).f,l=r(62039);n({target:"Object",stat:!0,forced:!l||a((function(){i(1)})),sham:!l},{getOwnPropertyDescriptor:function(e,t){return i(o(e),t)}})},4065:(e,t,r)=>{"use strict";var n=r(46609),a=r(62039),o=r(68360),i=r(17963),l=r(17062),u=r(76754);n({target:"Object",stat:!0,sham:!a},{getOwnPropertyDescriptors:function(e){for(var t,r,n=i(e),a=l.f,s=o(n),c={},f=0;s.length>f;)void 0!==(r=a(n,t=s[f++]))&&u(c,t,r);return c}})},66718:(e,t,r)=>{"use strict";var n=r(46609),a=r(12670),o=r(12329),i=r(79684),l=r(99639);n({target:"Object",stat:!0,forced:!a||o((function(){i.f(1)}))},{getOwnPropertySymbols:function(e){var t=i.f;return t?t(l(e)):[]}})},65526:(e,t,r)=>{"use strict";var n=r(46609),a=r(12329),o=r(99639),i=r(27500),l=r(60447);n({target:"Object",stat:!0,forced:a((function(){i(1)})),sham:!l},{getPrototypeOf:function(e){return i(o(e))}})},27757:(e,t,r)=>{"use strict";var n=r(46609),a=r(99639),o=r(82157);n({target:"Object",stat:!0,forced:r(12329)((function(){o(1)}))},{keys:function(e){return o(a(e))}})},75785:(e,t,r)=>{"use strict";var n=r(61104),a=r(26692),o=r(24111);n||a(Object.prototype,"toString",o,{unsafe:!0})},4034:(e,t,r)=>{"use strict";var n=r(46609),a=r(90596).values;n({target:"Object",stat:!0},{values:function(e){return a(e)}})},38244:(e,t,r)=>{"use strict";var n=r(46609),a=r(71082),o=r(25865),i=r(15371),l=r(50427),u=r(29828);n({target:"Promise",stat:!0,forced:r(47612)},{all:function(e){var t=this,r=i.f(t),n=r.resolve,s=r.reject,c=l((function(){var r=o(t.resolve),i=[],l=0,c=1;u(e,(function(e){var o=l++,u=!1;c++,a(r,t,e).then((function(e){u||(u=!0,i[o]=e,--c||n(i))}),s)})),--c||n(i)}));return c.error&&s(c.value),r.promise}})},71642:(e,t,r)=>{"use strict";var n=r(46609),a=r(16634),o=r(22682).CONSTRUCTOR,i=r(41076),l=r(73674),u=r(74414),s=r(26692),c=i&&i.prototype;if(n({target:"Promise",proto:!0,forced:o,real:!0},{catch:function(e){return this.then(void 0,e)}}),!a&&u(i)){var f=l("Promise").prototype.catch;c.catch!==f&&s(c,"catch",f,{unsafe:!0})}},42902:(e,t,r)=>{"use strict";var n,a,o,i=r(46609),l=r(16634),u=r(21014),s=r(89246),c=r(71082),f=r(26692),d=r(73795),p=r(99519),h=r(86176),m=r(25865),v=r(74414),g=r(14953),y=r(1296),b=r(74017),w=r(6217).set,k=r(64878),_=r(91593),O=r(50427),S=r(12392),E=r(85915),x=r(41076),P=r(22682),A=r(15371),T="Promise",j=P.CONSTRUCTOR,C=P.REJECTION_EVENT,R=P.SUBCLASSING,M=E.getterFor(T),I=E.set,D=x&&x.prototype,N=x,F=D,V=s.TypeError,L=s.document,H=s.process,B=A.f,z=B,W=!!(L&&L.createEvent&&s.dispatchEvent),U="unhandledrejection",G=function(e){var t;return!(!g(e)||!v(t=e.then))&&t},q=function(e,t){var r,n,a,o=t.value,i=1===t.state,l=i?e.ok:e.fail,u=e.resolve,s=e.reject,f=e.domain;try{l?(i||(2===t.rejection&&J(t),t.rejection=1),!0===l?r=o:(f&&f.enter(),r=l(o),f&&(f.exit(),a=!0)),r===e.promise?s(V("Promise-chain cycle")):(n=G(r))?c(n,r,u,s):u(r)):s(o)}catch(d){f&&!a&&f.exit(),s(d)}},Y=function(e,t){e.notified||(e.notified=!0,k((function(){for(var r,n=e.reactions;r=n.get();)q(r,e);e.notified=!1,t&&!e.rejection&&K(e)})))},X=function(e,t,r){var n,a;W?((n=L.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),s.dispatchEvent(n)):n={promise:t,reason:r},!C&&(a=s["on"+e])?a(n):e===U&&_("Unhandled promise rejection",r)},K=function(e){c(w,s,(function(){var t,r=e.facade,n=e.value;if($(e)&&(t=O((function(){u?H.emit("unhandledRejection",n,r):X(U,r,n)})),e.rejection=u||$(e)?2:1,t.error))throw t.value}))},$=function(e){return 1!==e.rejection&&!e.parent},J=function(e){c(w,s,(function(){var t=e.facade;u?H.emit("rejectionHandled",t):X("rejectionhandled",t,e.value)}))},Q=function(e,t,r){return function(n){e(t,n,r)}},Z=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Y(e,!0))},ee=function e(t,r,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===r)throw V("Promise can't be resolved itself");var a=G(r);a?k((function(){var n={done:!1};try{c(a,r,Q(e,n,t),Q(Z,n,t))}catch(o){Z(n,o,t)}})):(t.value=r,t.state=1,Y(t,!1))}catch(o){Z({done:!1},o,t)}}};if(j&&(F=(N=function(e){y(this,F),m(e),c(n,this);var t=M(this);try{e(Q(ee,t),Q(Z,t))}catch(r){Z(t,r)}}).prototype,(n=function(e){I(this,{type:T,done:!1,notified:!1,parent:!1,reactions:new S,rejection:!1,state:0,value:void 0})}).prototype=f(F,"then",(function(e,t){var r=M(this),n=B(b(this,N));return r.parent=!0,n.ok=!v(e)||e,n.fail=v(t)&&t,n.domain=u?H.domain:void 0,0===r.state?r.reactions.add(n):k((function(){q(n,r)})),n.promise})),a=function(){var e=new n,t=M(e);this.promise=e,this.resolve=Q(ee,t),this.reject=Q(Z,t)},A.f=B=function(e){return e===N||undefined===e?new a(e):z(e)},!l&&v(x)&&D!==Object.prototype)){o=D.then,R||f(D,"then",(function(e,t){var r=this;return new N((function(e,t){c(o,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete D.constructor}catch(te){}d&&d(D,F)}i({global:!0,constructor:!0,wrap:!0,forced:j},{Promise:N}),p(N,T,!1,!0),h(T)},84186:(e,t,r)=>{"use strict";r(42902),r(38244),r(71642),r(72099),r(50853),r(3859)},72099:(e,t,r)=>{"use strict";var n=r(46609),a=r(71082),o=r(25865),i=r(15371),l=r(50427),u=r(29828);n({target:"Promise",stat:!0,forced:r(47612)},{race:function(e){var t=this,r=i.f(t),n=r.reject,s=l((function(){var i=o(t.resolve);u(e,(function(e){a(i,t,e).then(r.resolve,n)}))}));return s.error&&n(s.value),r.promise}})},50853:(e,t,r)=>{"use strict";var n=r(46609),a=r(71082),o=r(15371);n({target:"Promise",stat:!0,forced:r(22682).CONSTRUCTOR},{reject:function(e){var t=o.f(this);return a(t.reject,void 0,e),t.promise}})},3859:(e,t,r)=>{"use strict";var n=r(46609),a=r(73674),o=r(16634),i=r(41076),l=r(22682).CONSTRUCTOR,u=r(5406),s=a("Promise"),c=o&&!l;n({target:"Promise",stat:!0,forced:o||l},{resolve:function(e){return u(c&&this===s?i:this,e)}})},32440:(e,t,r)=>{"use strict";var n=r(46609),a=r(73674),o=r(40139),i=r(61632),l=r(65432),u=r(14302),s=r(14953),c=r(24560),f=r(12329),d=a("Reflect","construct"),p=Object.prototype,h=[].push,m=f((function(){function e(){}return!(d((function(){}),[],e)instanceof e)})),v=!f((function(){d((function(){}))})),g=m||v;n({target:"Reflect",stat:!0,forced:g,sham:g},{construct:function(e,t){l(e),u(t);var r=arguments.length<3?e:l(arguments[2]);if(v&&!m)return d(e,t,r);if(e===r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return o(h,n,t),new(o(i,e,n))}var a=r.prototype,f=c(s(a)?a:p),g=o(e,f,t);return s(g)?g:f}})},78705:(e,t,r)=>{"use strict";var n=r(46609),a=r(71082),o=r(14953),i=r(14302),l=r(35434),u=r(17062),s=r(27500);n({target:"Reflect",stat:!0},{get:function e(t,r){var n,c,f=arguments.length<3?t:arguments[2];return i(t)===f?t[r]:(n=u.f(t,r))?l(n)?n.value:void 0===n.get?void 0:a(n.get,f):o(c=s(t))?e(c,r,f):void 0}})},88232:(e,t,r)=>{"use strict";var n=r(62039),a=r(89246),o=r(25021),i=r(96730),l=r(87854),u=r(13818),s=r(82608).f,c=r(86535),f=r(61069),d=r(32053),p=r(6715),h=r(1983),m=r(78874),v=r(26692),g=r(12329),y=r(4797),b=r(85915).enforce,w=r(86176),k=r(42365),_=r(58306),O=r(45017),S=k("match"),E=a.RegExp,x=E.prototype,P=a.SyntaxError,A=o(x.exec),T=o("".charAt),j=o("".replace),C=o("".indexOf),R=o("".slice),M=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,I=/a/g,D=/a/g,N=new E(I)!==I,F=h.MISSED_STICKY,V=h.UNSUPPORTED_Y,L=n&&(!N||F||_||O||g((function(){return D[S]=!1,E(I)!==I||E(D)===D||"/a/i"!==String(E(I,"i"))})));if(i("RegExp",L)){for(var H=function(e,t){var r,n,a,o,i,s,h=c(x,this),m=f(e),v=void 0===t,g=[],w=e;if(!h&&m&&v&&e.constructor===H)return e;if((m||c(x,e))&&(e=e.source,v&&(t=p(w))),e=void 0===e?"":d(e),t=void 0===t?"":d(t),w=e,_&&"dotAll"in I&&(n=!!t&&C(t,"s")>-1)&&(t=j(t,/s/g,"")),r=t,F&&"sticky"in I&&(a=!!t&&C(t,"y")>-1)&&V&&(t=j(t,/y/g,"")),O&&(o=function(e){for(var t,r=e.length,n=0,a="",o=[],i={},l=!1,u=!1,s=0,c="";n<=r;n++){if("\\"===(t=T(e,n)))t+=T(e,++n);else if("]"===t)l=!1;else if(!l)switch(!0){case"["===t:l=!0;break;case"("===t:A(M,R(e,n+1))&&(n+=2,u=!0),a+=t,s++;continue;case">"===t&&u:if(""===c||y(i,c))throw new P("Invalid capture group name");i[c]=!0,o[o.length]=[c,s],u=!1,c="";continue}u?c+=t:a+=t}return[a,o]}(e),e=o[0],g=o[1]),i=l(E(e,t),h?this:x,H),(n||a||g.length)&&(s=b(i),n&&(s.dotAll=!0,s.raw=H(function(e){for(var t,r=e.length,n=0,a="",o=!1;n<=r;n++)"\\"!==(t=T(e,n))?o||"."!==t?("["===t?o=!0:"]"===t&&(o=!1),a+=t):a+="[\\s\\S]":a+=t+T(e,++n);return a}(e),r)),a&&(s.sticky=!0),g.length&&(s.groups=g)),e!==w)try{u(i,"source",""===w?"(?:)":w)}catch(k){}return i},B=s(E),z=0;B.length>z;)m(H,E,B[z++]);x.constructor=H,H.prototype=x,v(a,"RegExp",H,{constructor:!0})}w("RegExp")},78744:(e,t,r)=>{"use strict";var n=r(46609),a=r(53189);n({target:"RegExp",proto:!0,forced:/./.exec!==a},{exec:a})},82632:(e,t,r)=>{"use strict";var n=r(84847).PROPER,a=r(26692),o=r(14302),i=r(32053),l=r(12329),u=r(6715),s="toString",c=RegExp.prototype[s],f=l((function(){return"/a/b"!==c.call({source:"a",flags:"b"})})),d=n&&c.name!==s;(f||d)&&a(RegExp.prototype,s,(function(){var e=o(this);return"/"+i(e.source)+"/"+i(u(e))}),{unsafe:!0})},88810:(e,t,r)=>{"use strict";r(42567)("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(99593))},58329:(e,t,r)=>{"use strict";r(88810)},25233:(e,t,r)=>{"use strict";var n=r(46609),a=r(37254),o=r(17062).f,i=r(88307),l=r(32053),u=r(99165),s=r(16095),c=r(20509),f=r(16634),d=a("".endsWith),p=a("".slice),h=Math.min,m=c("endsWith");n({target:"String",proto:!0,forced:!(!f&&!m&&!!function(){var e=o(String.prototype,"endsWith");return e&&!e.writable}())&&!m},{endsWith:function(e){var t=l(s(this));u(e);var r=arguments.length>1?arguments[1]:void 0,n=t.length,a=void 0===r?n:h(i(r),n),o=l(e);return d?d(t,o,a):p(t,a-o.length,a)===o}})},70517:(e,t,r)=>{"use strict";var n=r(46609),a=r(25021),o=r(99165),i=r(16095),l=r(32053),u=r(20509),s=a("".indexOf);n({target:"String",proto:!0,forced:!u("includes")},{includes:function(e){return!!~s(l(i(this)),l(o(e)),arguments.length>1?arguments[1]:void 0)}})},26884:(e,t,r)=>{"use strict";var n=r(60959).charAt,a=r(32053),o=r(85915),i=r(70184),l=r(80835),u="String Iterator",s=o.set,c=o.getterFor(u);i(String,"String",(function(e){s(this,{type:u,string:a(e),index:0})}),(function(){var e,t=c(this),r=t.string,a=t.index;return a>=r.length?l(void 0,!0):(e=n(r,a),t.index+=e.length,l(e,!1))}))},15001:(e,t,r)=>{"use strict";var n=r(71082),a=r(89026),o=r(14302),i=r(95090),l=r(88307),u=r(32053),s=r(16095),c=r(67794),f=r(39330),d=r(23250);a("match",(function(e,t,r){return[function(t){var r=s(this),a=i(t)?void 0:c(t,e);return a?n(a,t,r):new RegExp(t)[e](u(r))},function(e){var n=o(this),a=u(e),i=r(t,n,a);if(i.done)return i.value;if(!n.global)return d(n,a);var s=n.unicode;n.lastIndex=0;for(var c,p=[],h=0;null!==(c=d(n,a));){var m=u(c[0]);p[h]=m,""===m&&(n.lastIndex=f(a,l(n.lastIndex),s)),h++}return 0===h?null:p}]}))},25105:(e,t,r)=>{"use strict";var n=r(40139),a=r(71082),o=r(25021),i=r(89026),l=r(12329),u=r(14302),s=r(74414),c=r(95090),f=r(3160),d=r(88307),p=r(32053),h=r(16095),m=r(39330),v=r(67794),g=r(20649),y=r(23250),b=r(42365)("replace"),w=Math.max,k=Math.min,_=o([].concat),O=o([].push),S=o("".indexOf),E=o("".slice),x="$0"==="a".replace(/./,"$0"),P=!!/./[b]&&""===/./[b]("a","$0");i("replace",(function(e,t,r){var o=P?"$":"$0";return[function(e,r){var n=h(this),o=c(e)?void 0:v(e,b);return o?a(o,e,n,r):a(t,p(n),e,r)},function(e,a){var i=u(this),l=p(e);if("string"==typeof a&&-1===S(a,o)&&-1===S(a,"$<")){var c=r(t,i,l,a);if(c.done)return c.value}var h=s(a);h||(a=p(a));var v,b=i.global;b&&(v=i.unicode,i.lastIndex=0);for(var x,P=[];null!==(x=y(i,l))&&(O(P,x),b);){""===p(x[0])&&(i.lastIndex=m(l,d(i.lastIndex),v))}for(var A,T="",j=0,C=0;C=j&&(T+=E(l,j,I)+R,j=I+M.length)}return T+E(l,j)}]}),!!l((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")}))||!x||P)},32577:(e,t,r)=>{"use strict";var n=r(71082),a=r(89026),o=r(14302),i=r(95090),l=r(16095),u=r(85389),s=r(32053),c=r(67794),f=r(23250);a("search",(function(e,t,r){return[function(t){var r=l(this),a=i(t)?void 0:c(t,e);return a?n(a,t,r):new RegExp(t)[e](s(r))},function(e){var n=o(this),a=s(e),i=r(t,n,a);if(i.done)return i.value;var l=n.lastIndex;u(l,0)||(n.lastIndex=0);var c=f(n,a);return u(n.lastIndex,l)||(n.lastIndex=l),null===c?-1:c.index}]}))},67196:(e,t,r)=>{"use strict";var n=r(40139),a=r(71082),o=r(25021),i=r(89026),l=r(14302),u=r(95090),s=r(61069),c=r(16095),f=r(74017),d=r(39330),p=r(88307),h=r(32053),m=r(67794),v=r(80535),g=r(23250),y=r(53189),b=r(1983),w=r(12329),k=b.UNSUPPORTED_Y,_=4294967295,O=Math.min,S=[].push,E=o(/./.exec),x=o(S),P=o("".slice);i("split",(function(e,t,r){var o;return o="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,r){var o=h(c(this)),i=void 0===r?_:r>>>0;if(0===i)return[];if(void 0===e)return[o];if(!s(e))return a(t,o,e,i);for(var l,u,f,d=[],p=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),m=0,g=new RegExp(e.source,p+"g");(l=a(y,g,o))&&!((u=g.lastIndex)>m&&(x(d,P(o,m,l.index)),l.length>1&&l.index=i));)g.lastIndex===l.index&&g.lastIndex++;return m===o.length?!f&&E(g,"")||x(d,""):x(d,P(o,m)),d.length>i?v(d,0,i):d}:"0".split(void 0,0).length?function(e,r){return void 0===e&&0===r?[]:a(t,this,e,r)}:t,[function(t,r){var n=c(this),i=u(t)?void 0:m(t,e);return i?a(i,t,n,r):a(o,h(n),t,r)},function(e,n){var a=l(this),i=h(e),u=r(o,a,i,n,o!==t);if(u.done)return u.value;var s=f(a,RegExp),c=a.unicode,m=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(k?"g":"y"),v=new s(k?"^(?:"+a.source+")":a,m),y=void 0===n?_:n>>>0;if(0===y)return[];if(0===i.length)return null===g(v,i)?[i]:[];for(var b=0,w=0,S=[];w{"use strict";var n=r(46609),a=r(37254),o=r(17062).f,i=r(88307),l=r(32053),u=r(99165),s=r(16095),c=r(20509),f=r(16634),d=a("".startsWith),p=a("".slice),h=Math.min,m=c("startsWith");n({target:"String",proto:!0,forced:!(!f&&!m&&!!function(){var e=o(String.prototype,"startsWith");return e&&!e.writable}())&&!m},{startsWith:function(e){var t=l(s(this));u(e);var r=i(h(arguments.length>1?arguments[1]:void 0,t.length)),n=l(e);return d?d(t,n,r):p(t,r,r+n.length)===n}})},9719:(e,t,r)=>{"use strict";var n=r(46609),a=r(77691).trim;n({target:"String",proto:!0,forced:r(72923)("trim")},{trim:function(){return a(this)}})},10187:(e,t,r)=>{"use strict";var n=r(46609),a=r(89246),o=r(71082),i=r(25021),l=r(16634),u=r(62039),s=r(12670),c=r(12329),f=r(4797),d=r(86535),p=r(14302),h=r(17963),m=r(61154),v=r(32053),g=r(57077),y=r(24560),b=r(82157),w=r(82608),k=r(16352),_=r(79684),O=r(17062),S=r(75625),E=r(86332),x=r(87290),P=r(26692),A=r(90361),T=r(90820),j=r(7242),C=r(82058),R=r(25565),M=r(42365),I=r(51765),D=r(35256),N=r(51039),F=r(99519),V=r(85915),L=r(84512).forEach,H=j("hidden"),B="Symbol",z="prototype",W=V.set,U=V.getterFor(B),G=Object[z],q=a.Symbol,Y=q&&q[z],X=a.TypeError,K=a.QObject,$=O.f,J=S.f,Q=k.f,Z=x.f,ee=i([].push),te=T("symbols"),re=T("op-symbols"),ne=T("wks"),ae=!K||!K[z]||!K[z].findChild,oe=u&&c((function(){return 7!==y(J({},"a",{get:function(){return J(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=$(G,t);n&&delete G[t],J(e,t,r),n&&e!==G&&J(G,t,n)}:J,ie=function(e,t){var r=te[e]=y(Y);return W(r,{type:B,tag:e,description:t}),u||(r.description=t),r},le=function(e,t,r){e===G&&le(re,t,r),p(e);var n=m(t);return p(r),f(te,n)?(r.enumerable?(f(e,H)&&e[H][n]&&(e[H][n]=!1),r=y(r,{enumerable:g(0,!1)})):(f(e,H)||J(e,H,g(1,{})),e[H][n]=!0),oe(e,n,r)):J(e,n,r)},ue=function(e,t){p(e);var r=h(t),n=b(r).concat(de(r));return L(n,(function(t){u&&!o(se,r,t)||le(e,t,r[t])})),e},se=function(e){var t=m(e),r=o(Z,this,t);return!(this===G&&f(te,t)&&!f(re,t))&&(!(r||!f(this,t)||!f(te,t)||f(this,H)&&this[H][t])||r)},ce=function(e,t){var r=h(e),n=m(t);if(r!==G||!f(te,n)||f(re,n)){var a=$(r,n);return!a||!f(te,n)||f(r,H)&&r[H][n]||(a.enumerable=!0),a}},fe=function(e){var t=Q(h(e)),r=[];return L(t,(function(e){f(te,e)||f(C,e)||ee(r,e)})),r},de=function(e){var t=e===G,r=Q(t?re:h(e)),n=[];return L(r,(function(e){!f(te,e)||t&&!f(G,e)||ee(n,te[e])})),n};s||(P(Y=(q=function(){if(d(Y,this))throw X("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?v(arguments[0]):void 0,t=R(e);return u&&ae&&oe(G,t,{configurable:!0,set:function e(r){this===G&&o(e,re,r),f(this,H)&&f(this[H],t)&&(this[H][t]=!1),oe(this,t,g(1,r))}}),ie(t,e)})[z],"toString",(function(){return U(this).tag})),P(q,"withoutSetter",(function(e){return ie(R(e),e)})),x.f=se,S.f=le,E.f=ue,O.f=ce,w.f=k.f=fe,_.f=de,I.f=function(e){return ie(M(e),e)},u&&(A(Y,"description",{configurable:!0,get:function(){return U(this).description}}),l||P(G,"propertyIsEnumerable",se,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!s,sham:!s},{Symbol:q}),L(b(ne),(function(e){D(e)})),n({target:B,stat:!0,forced:!s},{useSetter:function(){ae=!0},useSimple:function(){ae=!1}}),n({target:"Object",stat:!0,forced:!s,sham:!u},{create:function(e,t){return void 0===t?y(e):ue(y(e),t)},defineProperty:le,defineProperties:ue,getOwnPropertyDescriptor:ce}),n({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:fe}),N(),F(q,B),C[H]=!0},25536:(e,t,r)=>{"use strict";var n=r(46609),a=r(62039),o=r(89246),i=r(25021),l=r(4797),u=r(74414),s=r(86535),c=r(32053),f=r(90361),d=r(99437),p=o.Symbol,h=p&&p.prototype;if(a&&u(p)&&(!("description"in h)||void 0!==p().description)){var m={},v=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:c(arguments[0]),t=s(h,this)?new p(e):void 0===e?p():p(e);return""===e&&(m[t]=!0),t};d(v,p),v.prototype=h,h.constructor=v;var g="Symbol(description detection)"===String(p("description detection")),y=i(h.valueOf),b=i(h.toString),w=/^Symbol\((.*)\)[^)]+$/,k=i("".replace),_=i("".slice);f(h,"description",{configurable:!0,get:function(){var e=y(this);if(l(m,e))return"";var t=b(e),r=g?_(t,7,-1):k(t,w,"$1");return""===r?void 0:r}}),n({global:!0,constructor:!0,forced:!0},{Symbol:v})}},82379:(e,t,r)=>{"use strict";var n=r(46609),a=r(73674),o=r(4797),i=r(32053),l=r(90820),u=r(68050),s=l("string-to-symbol-registry"),c=l("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!u},{for:function(e){var t=i(e);if(o(s,t))return s[t];var r=a("Symbol")(t);return s[t]=r,c[r]=t,r}})},46970:(e,t,r)=>{"use strict";r(35256)("iterator")},59135:(e,t,r)=>{"use strict";r(10187),r(82379),r(81295),r(95808),r(66718)},81295:(e,t,r)=>{"use strict";var n=r(46609),a=r(4797),o=r(96315),i=r(62073),l=r(90820),u=r(68050),s=l("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!u},{keyFor:function(e){if(!o(e))throw TypeError(i(e)+" is not a symbol");if(a(s,e))return s[e]}})},53694:(e,t,r)=>{"use strict";var n,a=r(44918),o=r(89246),i=r(25021),l=r(47530),u=r(97485),s=r(42567),c=r(97636),f=r(14953),d=r(85915).enforce,p=r(12329),h=r(80837),m=Object,v=Array.isArray,g=m.isExtensible,y=m.isFrozen,b=m.isSealed,w=m.freeze,k=m.seal,_={},O={},S=!o.ActiveXObject&&"ActiveXObject"in o,E=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},x=s("WeakMap",E,c),P=x.prototype,A=i(P.set);if(h)if(S){n=c.getConstructor(E,"WeakMap",!0),u.enable();var T=i(P.delete),j=i(P.has),C=i(P.get);l(P,{delete:function(e){if(f(e)&&!g(e)){var t=d(this);return t.frozen||(t.frozen=new n),T(this,e)||t.frozen.delete(e)}return T(this,e)},has:function(e){if(f(e)&&!g(e)){var t=d(this);return t.frozen||(t.frozen=new n),j(this,e)||t.frozen.has(e)}return j(this,e)},get:function(e){if(f(e)&&!g(e)){var t=d(this);return t.frozen||(t.frozen=new n),j(this,e)?C(this,e):t.frozen.get(e)}return C(this,e)},set:function(e,t){if(f(e)&&!g(e)){var r=d(this);r.frozen||(r.frozen=new n),j(this,e)?A(this,e,t):r.frozen.set(e,t)}else A(this,e,t);return this}})}else a&&p((function(){var e=w([]);return A(new x,e,1),!y(e)}))&&l(P,{set:function(e,t){var r;return v(e)&&(y(e)?r=_:b(e)&&(r=O)),A(this,e,t),r===_&&w(e),r===O&&k(e),this}})},61249:(e,t,r)=>{"use strict";r(53694)},79358:(e,t,r)=>{"use strict";var n=r(46609),a=r(89246),o=r(6217).clear;n({global:!0,bind:!0,enumerable:!0,forced:a.clearImmediate!==o},{clearImmediate:o})},46330:(e,t,r)=>{"use strict";var n=r(89246),a=r(67859),o=r(35588),i=r(47385),l=r(13818),u=function(e){if(e&&e.forEach!==i)try{l(e,"forEach",i)}catch(t){e.forEach=i}};for(var s in a)a[s]&&u(n[s]&&n[s].prototype);u(o)},19387:(e,t,r)=>{"use strict";var n=r(89246),a=r(67859),o=r(35588),i=r(68053),l=r(13818),u=r(42365),s=u("iterator"),c=u("toStringTag"),f=i.values,d=function(e,t){if(e){if(e[s]!==f)try{l(e,s,f)}catch(n){e[s]=f}if(e[c]||l(e,c,t),a[t])for(var r in i)if(e[r]!==i[r])try{l(e,r,i[r])}catch(n){e[r]=i[r]}}};for(var p in a)d(n[p]&&n[p].prototype,p);d(o,"DOMTokenList")},76273:(e,t,r)=>{"use strict";r(79358),r(79077)},79077:(e,t,r)=>{"use strict";var n=r(46609),a=r(89246),o=r(6217).set,i=r(12587),l=a.setImmediate?i(o,!1):o;n({global:!0,bind:!0,enumerable:!0,forced:a.setImmediate!==l},{setImmediate:l})},25380:(e,t,r)=>{"use strict";e.exports=r(96236)},50739:(e,t)=>{"use strict";function r(e){return r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(a.hasOwnProperty(e))return a[e];var t=e.replace(r,o).replace(n,"ms");return a[e]=t,t};var r=/-([a-z])/g,n=/^Ms/g,a={};function o(e){return e[1].toUpperCase()}},82237:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,a.default)(e)+":"+t};var a=n(r(49885))},26215:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t="";for(var r in e){var n=e[r];"string"!==typeof n&&"number"!==typeof n||(t&&(t+=";"),t+=(0,a.default)(r,n))}return t};var a=n(r(82237))},49885:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,a.default)(e)};var a=n(r(17115))},17182:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"assignStyle",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"camelCaseProperty",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"cssifyDeclaration",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"cssifyObject",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"hyphenateProperty",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"isPrefixedProperty",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"isPrefixedValue",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"isUnitlessProperty",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"normalizeProperty",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"resolveArrayValue",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"unprefixProperty",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"unprefixValue",{enumerable:!0,get:function(){return m.default}});var a=n(r(50739)),o=n(r(32868)),i=n(r(82237)),l=n(r(26215)),u=n(r(49885)),s=n(r(71471)),c=n(r(85464)),f=n(r(34358)),d=n(r(91335)),p=n(r(47108)),h=n(r(64614)),m=n(r(55845))},71471:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return r.test(e)};var r=/^(Webkit|Moz|O|ms)/},85464:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"string"===typeof e&&r.test(e)};var r=/-webkit-|-moz-|-ms-/},34358:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return o.hasOwnProperty(e)};var a=n(r(49885)),o={borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},i=["animationIterationCount","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","order"],l=["Webkit","ms","Moz","O"];function u(e,t){return e+t.charAt(0).toUpperCase()+t.slice(1)}for(var s=0,c=i.length;s{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)((0,a.default)(e))};var a=n(r(32868)),o=n(r(64614))},47108:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return t.join(";"+(0,a.default)(e)+":")};var a=n(r(49885))},64614:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.replace(r,"");return t.charAt(0).toLowerCase()+t.slice(1)};var r=/^(ms|Webkit|Moz|O)/},55845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"===typeof e)return e.replace(r,"");return e};var r=/(-ms-|-webkit-|-moz-|-o-)/g},49765:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e)};var n,a=r(17115),o=(n=a)&&n.__esModule?n:{default:n}},37252:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"string"===typeof e&&r.test(e)};var r=/-webkit-|-moz-|-ms-/},74001:(e,t,r)=>{"use strict";function n(e){return e&&"object"===typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var a,o=r(49443),i=n(o),l=n(r(61662)),u=n(r(25380)),s=/^(#(?:[0-9a-f]{3,4}){1,2})$/i,c=/^(rgba?|hsla?|hwb|lab|lch|gray|color)$/,f=function(e){return function(t){return e(t)?"":null}},d=function(e,t){return void 0===t&&(t=String),function(r){if("word"!==r.type)return null;var n=r.value.match(e);return null===n?null:t(n[1])}},p=f((function(e){return"space"===e.type})),h=f((function(e){return"div"===e.type&&"/"===e.value})),m=f((function(e){return"div"===e.type&&","===e.value})),v=(a="word",function(e){return e.type===a?e.value:null}),g=d(/^(none)$/i),y=d(/^(auto)$/i),b=d(/^([+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?)$/i,Number),w=d(/^(0$|(?:[+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?)(?=px$))/i,Number),k=d(/^([+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?(ch|em|ex|rem|vh|vw|vmin|vmax|cm|mm|in|pc|pt))$/i),_=d(/^([+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?(?:deg|rad))$/i,(function(e){return e.toLowerCase()})),O=d(/^([+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?%)$/i),S=d(/(^-?[_a-z][_a-z0-9-]*$)/i),E=function(e){return"string"!==e.type?null:e.value.replace(/\\([0-9a-f]{1,6})(?:\s|$)/gi,(function(e,t){return String.fromCharCode(parseInt(t,16))})).replace(/\\/g,"")},x=function(e){return"word"===e.type&&(s.test(e.value)||e.value in u||"transparent"===e.value)?e.value:"function"===e.type&&c.test(e.value)?o.stringify(e):null},P=d(/^(none|underline|line-through)$/i),A=d(/^(solid|dashed|dotted)$/),T=function(e){var t=e.types,r=void 0===t?[w,k,O]:t,n=e.directions,a=void 0===n?["Top","Right","Bottom","Left"]:n,o=e.prefix,i=void 0===o?"":o,l=e.suffix,u=void 0===l?"":l;return function(e){var t,n=[];for(n.push(e.expect.apply(e,r));n.length<4&&e.hasTokens();)e.expect(p),n.push(e.expect.apply(e,r));e.expectEmpty();var o=n[0],l=n[1],s=void 0===l?o:l,c=n[2],f=void 0===c?o:c,d=n[3],h=void 0===d?s:d,m=function(e){return""+i+a[e]+u};return(t={})[m(0)]=o,t[m(1)]=s,t[m(2)]=f,t[m(3)]=h,t}},j=function(e){var t=e.expect(w),r=e.matches(p)?e.expect(w):t;return e.expectEmpty(),{width:t,height:r}},C=function(e){var t,r,n,a;if(e.matches(g))return e.expectEmpty(),{offset:{width:0,height:0},radius:0,color:"black"};for(var o=!1;e.hasTokens();)o&&e.expect(p),void 0===t&&e.matches(w,k)?(t=e.lastValue,e.expect(p),r=e.expect(w,k),e.saveRewindPoint(),e.matches(p)&&e.matches(w,k)?n=e.lastValue:e.rewind()):void 0===a&&e.matches(x)?a=e.lastValue:e.throw(),o=!0;return void 0===t&&e.throw(),{offset:{width:t,height:r},radius:void 0!==n?n:0,color:void 0!==a?a:"black"}},R=d(/(nowrap|wrap|wrap-reverse)/),M=d(/(row|row-reverse|column|column-reverse)/),I=function(e){var t;if(e.matches(E))t=e.lastValue;else for(t=e.expect(S);e.hasTokens();){e.expect(p),t+=" "+e.expect(S)}return e.expectEmpty(),{fontFamily:t}},D=d(/^(normal)$/),N=d(/^(italic)$/),F=d(/^([1-9]00|bold)$/),V=d(/^(small-caps)$/),L=[],H=d(/(flex-(?:start|end)|center|stretch|space-(?:between|around))/),B=d(/(flex-(?:start|end)|center|space-(?:between|around|evenly))/),z=d(/^(solid|double|dotted|dashed)$/),W=function(e){return function(t){var r=t.expect(e);return t.expectEmpty(),r}},U=W(b),G=W(w),q=W(_),Y=function(e){return function(t,r){return function(n){var a,o,i,l=n.expect(e);if(n.hasTokens())n.expect(m),i=n.expect(e);else{if(void 0===r)return l;i=r}return n.expectEmpty(),[(a={},a[t+"Y"]=i,a),(o={},o[t+"X"]=l,o)]}}},X=Y(b),K=Y(w),$=Y(_),J={perspective:U,scale:X("scale"),scaleX:U,scaleY:U,translate:K("translate",0),translateX:G,translateY:G,rotate:q,rotateX:q,rotateY:q,rotateZ:q,skewX:q,skewY:q,skew:$("skew","0deg")},Q=T({types:[x],prefix:"border",suffix:"Color"}),Z=T({directions:["TopLeft","TopRight","BottomRight","BottomLeft"],prefix:"border",suffix:"Radius"}),ee=T({prefix:"border",suffix:"Width"}),te=T({types:[w,k,O,y],prefix:"margin"}),re=T({prefix:"padding"}),ne={aspectRatio:function(e){var t=e.expect(b);return e.hasTokens()&&(e.expect(h),t/=e.expect(b)),{aspectRatio:t}},background:function(e){return{backgroundColor:e.expect(x)}},border:function(e){var t,r,n;if(e.matches(g))return e.expectEmpty(),{borderWidth:0,borderColor:"black",borderStyle:"solid"};for(var a=0;a<3&&e.hasTokens();)0!==a&&e.expect(p),void 0===t&&e.matches(w,k)?t=e.lastValue:void 0===r&&e.matches(x)?r=e.lastValue:void 0===n&&e.matches(A)?n=e.lastValue:e.throw(),a+=1;return e.expectEmpty(),void 0===t&&(t=1),void 0===r&&(r="black"),void 0===n&&(n="solid"),{borderWidth:t,borderColor:r,borderStyle:n}},borderColor:Q,borderRadius:Z,borderWidth:ee,boxShadow:function(e){var t=C(e);return{shadowOffset:t.offset,shadowRadius:t.radius,shadowColor:t.color,shadowOpacity:1}},flex:function(e){var t,r,n;if(e.matches(g))return e.expectEmpty(),{flexGrow:0,flexShrink:0,flexBasis:"auto"};if(e.saveRewindPoint(),e.matches(y)&&!e.hasTokens())return{flexGrow:1,flexShrink:1,flexBasis:"auto"};e.rewind();for(var a=0;a<2&&e.hasTokens();)0!==a&&e.expect(p),void 0===t&&e.matches(b)?(t=e.lastValue,e.saveRewindPoint(),e.matches(p)&&e.matches(b)?r=e.lastValue:e.rewind()):void 0===n&&e.matches(w,k,O)?n=e.lastValue:void 0===n&&e.matches(y)?n="auto":e.throw(),a+=1;return e.expectEmpty(),void 0===t&&(t=1),void 0===r&&(r=1),void 0===n&&(n=0),{flexGrow:t,flexShrink:r,flexBasis:n}},flexFlow:function(e){for(var t,r,n=0;n<2&&e.hasTokens();)0!==n&&e.expect(p),void 0===t&&e.matches(R)?t=e.lastValue:void 0===r&&e.matches(M)?r=e.lastValue:e.throw(),n+=1;return e.expectEmpty(),void 0===t&&(t="nowrap"),void 0===r&&(r="row"),{flexWrap:t,flexDirection:r}},font:function(e){for(var t,r,n,a,o=0;o<3&&e.hasTokens();){if(e.matches(D));else if(void 0===t&&e.matches(N))t=e.lastValue;else if(void 0===r&&e.matches(F))r=e.lastValue;else{if(void 0!==n||!e.matches(V))break;n=[e.lastValue]}e.expect(p),o+=1}var i=e.expect(w,k);e.matches(h)&&(a=e.expect(w,k)),e.expect(p);var l=I(e).fontFamily;void 0===t&&(t="normal"),void 0===r&&(r="normal"),void 0===n&&(n=L);var u={fontStyle:t,fontWeight:r,fontVariant:n,fontSize:i,fontFamily:l};return void 0!==a&&(u.lineHeight=a),u},fontFamily:I,fontVariant:function(e){for(var t=[e.expect(S)];e.hasTokens();)e.expect(p),t.push(e.expect(S));return{fontVariant:t}},fontWeight:function(e){return{fontWeight:e.expect(v)}},margin:te,padding:re,placeContent:function(e){var t,r=e.expect(H);return e.hasTokens()?(e.expect(p),t=e.expect(B)):t="stretch",e.expectEmpty(),{alignContent:r,justifyContent:t}},shadowOffset:function(e){return{shadowOffset:j(e)}},textShadow:function(e){var t=C(e);return{textShadowOffset:t.offset,textShadowRadius:t.radius,textShadowColor:t.color}},textShadowOffset:function(e){return{textShadowOffset:j(e)}},textDecoration:function(e){for(var t,r,n,a=!1;e.hasTokens();){if(a&&e.expect(p),void 0===t&&e.matches(P)){var o=[e.lastValue.toLowerCase()];e.saveRewindPoint(),"none"!==o[0]&&e.matches(p)&&e.matches(P)?(o.push(e.lastValue.toLowerCase()),o.sort().reverse()):e.rewind(),t=o.join(" ")}else void 0===r&&e.matches(z)?r=e.lastValue:void 0===n&&e.matches(x)?n=e.lastValue:e.throw();a=!0}return{textDecorationLine:void 0!==t?t:"none",textDecorationColor:void 0!==n?n:"black",textDecorationStyle:void 0!==r?r:"solid"}},textDecorationLine:function(e){for(var t=[],r=!1;e.hasTokens();)r&&e.expect(p),t.push(e.expect(P).toLowerCase()),r=!0;return t.sort().reverse(),{textDecorationLine:t.join(" ")}},transform:function(e){for(var t=[],r=!1;e.hasTokens();){r&&e.expect(p);var n,a=e.expectFunction(),o=a.functionName,i=J[o](a);if(!Array.isArray(i))i=[(n={},n[o]=i,n)];t=i.concat(t),r=!0}return{transform:t}}};var ae="SYMBOL_MATCH",oe=function(){function e(e,t){this.index=0,this.nodes=e,this.functionName=null!=t?t.value:null,this.lastValue=null,this.rewindIndex=-1}var t=e.prototype;return t.hasTokens=function(){return this.index<=this.nodes.length-1},t[ae]=function(){if(!this.hasTokens())return null;for(var e=this.nodes[this.index],t=0;t{var n=r(83444),a=r(42583),o=r(52502),i=r(15981),l=r(12042),u=r(6595),s=Date.prototype.getTime;function c(e,t,r){var p=r||{};return!!(p.strict?o(e,t):e===t)||(!e||!t||"object"!==typeof e&&"object"!==typeof t?p.strict?o(e,t):e==t:function(e,t,r){var o,p;if(typeof e!==typeof t)return!1;if(f(e)||f(t))return!1;if(e.prototype!==t.prototype)return!1;if(a(e)!==a(t))return!1;var h=i(e),m=i(t);if(h!==m)return!1;if(h||m)return e.source===t.source&&l(e)===l(t);if(u(e)&&u(t))return s.call(e)===s.call(t);var v=d(e),g=d(t);if(v!==g)return!1;if(v||g){if(e.length!==t.length)return!1;for(o=0;o=0;o--)if(y[o]!=b[o])return!1;for(o=y.length-1;o>=0;o--)if(!c(e[p=y[o]],t[p],r))return!1;return!0}(e,t,p))}function f(e){return null===e||void 0===e}function d(e){return!(!e||"object"!==typeof e||"number"!==typeof e.length)&&("function"===typeof e.copy&&"function"===typeof e.slice&&!(e.length>0&&"number"!==typeof e[0]))}e.exports=c},56175:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"===typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===r}(e)}(e)};var r="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?u((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function a(e,t,r){return e.concat(t).map((function(e){return n(e,r)}))}function o(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function i(e,t){try{return t in e}catch(r){return!1}}function l(e,t,r){var a={};return r.isMergeableObject(e)&&o(e).forEach((function(t){a[t]=n(e[t],r)})),o(t).forEach((function(o){(function(e,t){return i(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(i(e,o)&&r.isMergeableObject(t[o])?a[o]=function(e,t){if(!t.customMerge)return u;var r=t.customMerge(e);return"function"===typeof r?r:u}(o,r)(e[o],t[o],r):a[o]=n(t[o],r))})),a}function u(e,r,o){(o=o||{}).arrayMerge=o.arrayMerge||a,o.isMergeableObject=o.isMergeableObject||t,o.cloneUnlessOtherwiseSpecified=n;var i=Array.isArray(r);return i===Array.isArray(e)?i?o.arrayMerge(e,r,o):l(e,r,o):n(r,o)}u.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return u(e,r,t)}),{})};var s=u;e.exports=s},1568:(e,t,r)=>{"use strict";var n=r(39090)(),a=r(6917),o=n&&a("%Object.defineProperty%",!0),i=a("%SyntaxError%"),l=a("%TypeError%"),u=r(85635);e.exports=function(e,t,r){if(!e||"object"!==typeof e&&"function"!==typeof e)throw new l("`obj` must be an object or a function`");if("string"!==typeof t&&"symbol"!==typeof t)throw new l("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!==typeof arguments[3]&&null!==arguments[3])throw new l("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!==typeof arguments[4]&&null!==arguments[4])throw new l("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!==typeof arguments[5]&&null!==arguments[5])throw new l("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!==typeof arguments[6])throw new l("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],f=!!u&&u(e,t);if(o)o(e,t,{configurable:null===s&&f?f.configurable:!s,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===a&&f?f.writable:!a});else{if(!c&&(n||a||s))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},52938:(e,t,r)=>{"use strict";var n=r(83444),a="function"===typeof Symbol&&"symbol"===typeof Symbol("foo"),o=Object.prototype.toString,i=Array.prototype.concat,l=r(1568),u=r(39090)(),s=function(e,t,r,n){if(t in e)if(!0===n){if(e[t]===r)return}else if("function"!==typeof(a=n)||"[object Function]"!==o.call(a)||!n())return;var a;u?l(e,t,r,!0):l(e,t,r)},c=function(e,t){var r=arguments.length>2?arguments[2]:{},o=n(t);a&&(o=i.call(o,Object.getOwnPropertySymbols(t)));for(var l=0;l65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)};t.default=function(e){return e>=55296&&e<=57343||e>1114111?"\ufffd":(e in a.default&&(e=a.default[e]),o(e))}},57811:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.escapeUTF8=t.escape=t.encodeNonAsciiHTML=t.encodeHTML=t.encodeXML=void 0;var a=c(n(r(2586)).default),o=f(a);t.encodeXML=v(a);var i,l,u=c(n(r(59323)).default),s=f(u);function c(e){return Object.keys(e).sort().reduce((function(t,r){return t[e[r]]="&"+r+";",t}),{})}function f(e){for(var t=[],r=[],n=0,a=Object.keys(e);n1?p(e):e.charCodeAt(0)).toString(16).toUpperCase()+";"}var m=new RegExp(o.source+"|"+d.source,"g");function v(e){return function(t){return t.replace(m,(function(t){return e[t]||h(t)}))}}t.escape=function(e){return e.replace(m,h)},t.escapeUTF8=function(e){return e.replace(o,h)}},32764:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.encodeHTML5=t.encodeHTML4=t.escapeUTF8=t.escape=t.encodeNonAsciiHTML=t.encodeHTML=t.encodeXML=t.encode=t.decodeStrict=t.decode=void 0;var n=r(54227),a=r(57811);t.decode=function(e,t){return(!t||t<=0?n.decodeXML:n.decodeHTML)(e)},t.decodeStrict=function(e,t){return(!t||t<=0?n.decodeXML:n.decodeHTMLStrict)(e)},t.encode=function(e,t){return(!t||t<=0?a.encodeXML:a.encodeHTML)(e)};var o=r(57811);Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return o.encodeXML}}),Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return o.encodeNonAsciiHTML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return o.escape}}),Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return o.escapeUTF8}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return o.encodeHTML}});var i=r(54227);Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return i.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return i.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return i.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return i.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return i.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return i.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return i.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return i.decodeXML}})},41184:e=>{"use strict";var t=/["'&<>]/;e.exports=function(e){var r,n=""+e,a=t.exec(n);if(!a)return n;var o="",i=0,l=0;for(i=a.index;i{"use strict";var n=r(8946),a=r(39372),o=r(22575);a.IS_ENV_WITH_UPDATES_ENABLED&&(0,o.setCustomSourceTransformer)((function(e){try{if(e.asset.fileHashes){var t=n.Asset.fromMetadata(e.asset);return e.fromSource(t.downloaded?t.localUri:t.uri)}return e.defaultAsset()}catch(r){return e.defaultAsset()}}))},8946:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.Asset=void 0;var a=n(r(81315)),o=n(r(35527)),i=n(r(78439)),l=r(83668),u=r(34264),s=r(42209),c=v(r(86947)),f=v(r(91981)),d=r(47471),p=r(39372),h=n(r(22575));function m(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(m=function(e){return e?r:t})(e)}function v(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==typeof e&&"function"!==typeof e)return{default:e};var r=m(t);if(r&&r.has(e))return r.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=a?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}var g=function(){function e(t){var r=t.name,n=t.type,a=t.hash,i=void 0===a?null:a,u=t.uri,s=t.width,f=t.height;(0,o.default)(this,e),this.hash=null,this.localUri=null,this.width=null,this.height=null,this.downloading=!1,this.downloaded=!1,this._downloadCallbacks=[],this.name=r,this.type=n,this.hash=i,this.uri=u,"number"===typeof s&&(this.width=s),"number"===typeof f&&(this.height=f),i&&(this.localUri=(0,d.getLocalAssetUri)(i,n),this.localUri&&(this.downloaded=!0)),"web"===l.Platform.OS&&(r||(this.name=c.getFilename(u)),n||(this.type=c.getFileExtension(u)))}return(0,i.default)(e,[{key:"downloadAsync",value:function(){var e=(0,a.default)((function*(){var e=this;if(this.downloaded)return this;if(this.downloading)return yield new Promise((function(t,r){e._downloadCallbacks.push({resolve:t,reject:r})})),this;this.downloading=!0;try{if("web"===l.Platform.OS)if(f.isImageType(this.type)){var t=yield f.getImageInfoAsync(this.uri),r=t.width,n=t.height,a=t.name;this.width=r,this.height=n,this.name=a}else this.name=c.getFilename(this.uri);this.localUri=yield(0,p.downloadAsync)(this.uri,this.hash,this.type,this.name),this.downloaded=!0,this._downloadCallbacks.forEach((function(e){return(0,e.resolve)()}))}catch(o){throw this._downloadCallbacks.forEach((function(e){return(0,e.reject)(o)})),o}finally{this.downloading=!1,this._downloadCallbacks=[]}return this}));return function(){return e.apply(this,arguments)}}()}],[{key:"loadAsync",value:function(t){var r=Array.isArray(t)?t:[t];return Promise.all(r.map((function(t){return e.fromModule(t).downloadAsync()})))}},{key:"fromModule",value:function(t){if("string"===typeof t)return e.fromURI(t);var r=(0,u.getAssetByID)(t);if(!r)throw new Error(`Module "${t}" is missing from the asset registry`);if(!p.IS_ENV_WITH_UPDATES_ENABLED){var n=(0,h.default)(t).uri,a=new e({name:r.name,type:r.type,hash:r.hash,uri:n,width:r.width,height:r.height});return"android"!==l.Platform.OS||n.includes(":")||!r.width&&!r.height||(a.localUri=a.uri,a.downloaded=!0),e.byHash[r.hash]=a,a}return e.fromMetadata(r)}},{key:"fromMetadata",value:function(t){var r=t.hash;if(e.byHash[r])return e.byHash[r];var n=(0,s.selectAssetSource)(t),a=n.uri,o=n.hash,i=new e({name:t.name,type:t.type,hash:o,uri:a,width:t.width,height:t.height});return e.byHash[r]=i,i}},{key:"fromURI",value:function(t){if(e.byUri[t])return e.byUri[t];var r="";if(t.indexOf(";base64")>-1)r=t.split(";")[0].split("/")[1];else{var n=c.getFileExtension(t);r=n.startsWith(".")?n.substring(1):n}var a=new e({name:"",type:r,hash:null,uri:t});return e.byUri[t]=a,a}}]),e}();t.Asset=g,g.byHash={},g.byUri={}},84767:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.useAssets=function(e){var t=(0,o.useState)(),r=(0,a.default)(t,2),n=r[0],l=r[1],u=(0,o.useState)(),s=(0,a.default)(u,2),c=s[0],f=s[1];return(0,o.useEffect)((function(){i.Asset.loadAsync(e).then(l).catch(f)}),[]),[n,c]};var a=n(r(69133)),o=r(21939),i=r(8946)},26528:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(35527)),o=n(r(78439)),i=r(83668),l=n(r(23042));function u(e){var t=s.pickScale(e.scales,l.default.get()),r=1===t?"":"@"+t+"x",n=e.type?`.${e.type}`:"";return e.httpServerLocation.replace(/\.\.\//g,"_")+"/"+e.name+r+n}var s=function(){function e(t,r,n){(0,a.default)(this,e),this.serverUrl=t||"https://expo.dev",this.jsbundleUrl=null,this.asset=n}return(0,o.default)(e,[{key:"isLoadedFromServer",value:function(){return!0}},{key:"isLoadedFromFileSystem",value:function(){return!1}},{key:"defaultAsset",value:function(){return this.assetServerURL()}},{key:"assetServerURL",value:function(){var e=new URL(u(this.asset),this.serverUrl);return e.searchParams.set("platform",i.Platform.OS),e.searchParams.set("hash",this.asset.hash),this.fromSource(e.toString().replace(e.origin,""))}},{key:"fromSource",value:function(t){var r,n;return{__packager_asset:!0,width:null!=(r=this.asset.width)?r:void 0,height:null!=(n=this.asset.height)?n:void 0,uri:t,scale:e.pickScale(this.asset.scales,l.default.get())}}}],[{key:"pickScale",value:function(e,t){for(var r=0;r=t)return e[r];return e[e.length-1]||1}}]),e}();t.default=s},42209:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.resolveUri=h,t.selectAssetSource=function(e){var t,r;p&&p.hasOwnProperty(e.hash)&&(e=d(d({},e),p[e.hash]));var n=s.default.pickScale(e.scales,l.default.get()),a=e.scales.findIndex((function(e){return e===n})),f=e.fileHashes?e.fileHashes[a]||e.fileHashes[0]:e.hash,m=e.fileUris?e.fileUris[a]||e.fileUris[0]:e.uri;if(m)return{uri:h(m),hash:f};var v=(0,c.getManifest)().assetUrlOverride;if(v){return{uri:h(i.default.join(v,f)),hash:f}}var g=1===n?"":`@${n}x`,y=e.type?`.${encodeURIComponent(e.type)}`:"",b=`/${encodeURIComponent(e.name)}${g}${y}?platform=${encodeURIComponent(o.Platform.OS)}&hash=${encodeURIComponent(e.hash)}`;if(/^https?:\/\//.test(e.httpServerLocation)){return{uri:e.httpServerLocation+b,hash:f}}var w=(0,c.getManifest2)();if(null!=w&&null!=(t=w.extra)&&null!=(r=t.expoGo)&&r.developer){var k=new u.default(`http://${w.extra.expoGo.debuggerHost}`);return k.set("pathname",e.httpServerLocation+b),{uri:k.href,hash:f}}if((0,c.getManifest)().developer){var _=new u.default((0,c.getManifest)().bundleUrl);return _.set("pathname",e.httpServerLocation+b),{uri:_.href,hash:f}}return{uri:`https://classic-assets.eascdn.net/~assets/${encodeURIComponent(f)}`,hash:f}};var a=n(r(93709)),o=r(83668),i=n(r(28419)),l=n(r(23042)),u=n(r(87298)),s=n(r(26528)),c=r(39372);function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.getFileExtension=function(e){var t=o(e),r=t.lastIndexOf(".");return r>0?t.substring(r):""},t.getFilename=o,t.getManifestBaseUrl=function(e){var t=new a.default(e,{});"exp:"===t.protocol?t.set("protocol","http:"):"exps:"===t.protocol&&t.set("protocol","https:");var r=t.pathname.substring(0,t.pathname.lastIndexOf("/")+1);return t.set("pathname",r),t.set("query",""),t.set("hash",""),t.href};var a=n(r(87298));function o(e){var t=new a.default(e,{}).pathname;return t.substring(t.lastIndexOf("/")+1)}},91981:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getImageInfoAsync=function(e){if(!n.Platform.isDOMAvailable)return Promise.resolve({name:(0,a.getFilename)(e),width:0,height:0});return new Promise((function(t,r){var n=new Image;n.onerror=r,n.onload=function(){t({name:(0,a.getFilename)(e),width:n.naturalWidth,height:n.naturalHeight})},n.src=e}))},t.isImageType=function(e){return/^(jpeg|jpg|gif|png|bmp|webp|heic)$/i.test(e)};var n=r(83668),a=r(86947)},47471:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalAssetUri=function(e,t){return null}},39372:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.IS_MANAGED_ENV=t.IS_ENV_WITH_UPDATES_ENABLED=t.IS_ENV_WITHOUT_UPDATES_ENABLED=void 0,t.downloadAsync=function(e,t,r,n){return o.apply(this,arguments)},t.getManifest=function(){return{}},t.getManifest2=function(){return{}},t.manifestBaseUrl=void 0;var a=n(r(81315));t.IS_MANAGED_ENV=!1;t.IS_ENV_WITH_UPDATES_ENABLED=!1;t.IS_ENV_WITHOUT_UPDATES_ENABLED=!1;function o(){return(o=(0,a.default)((function*(e,t,r,n){return e}))).apply(this,arguments)}t.manifestBaseUrl=null},35562:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(69556);var n=r(8946);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}));var a=r(84767);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}))},22575:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=u,t.pickScale=void 0,t.setCustomSourceTransformer=l;var a,o=r(34264),i=n(r(26528));function l(e){a=e}function u(e){if("object"===typeof e)return e;var t=(0,o.getAssetByID)(e);if(t){var r=new i.default("https://expo.dev",null,t);return a?a(r):r.defaultAsset()}}Object.defineProperty(u,"setCustomSourceTransformer",{get:function(){return l}});var s=i.default.pickScale;t.pickScale=s},9924:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(81315)),o=n(r(59046)),i=r(83668),l=n(r(26024)),u=r(38060);function s(){if(!i.Platform.isDOMAvailable)return null;var e=p();return e.sheet?e.sheet:null}function c(e,t){return function(){var e=s();if(e){for(var t=(0,o.default)(e.cssRules),r=[],n=0;n{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"FontDisplay",{enumerable:!0,get:function(){return l.FontDisplay}}),t.isLoaded=f,t.isLoading=function(e){return e in c},t.loadAsync=function(e,t){return d.apply(this,arguments)},t.processFontFamily=function(e){if(!e||!(0,u.fontFamilyNeedsScoping)(e))return e;if(!f(e))return"System";return`ExpoFont-${(0,u.getNativeFontName)(e)}`},t.unloadAllAsync=function(){return m.apply(this,arguments)},t.unloadAsync=function(e,t){return v.apply(this,arguments)};var a=n(r(81315)),o=r(83668),i=n(r(9924)),l=r(38060),u=r(43302),s={},c={};function f(e){return e in s}function d(){return(d=(0,a.default)((function*(e,t){if("object"!==typeof e)return yield p(e,t);if(t)throw new o.CodedError("ERR_FONT_API",`No fontFamily can be used for the provided source: ${t}. The second argument of \`loadAsync()\` can only be used with a \`string\` value as the first argument.`);var r=e,n=Object.keys(r);yield Promise.all(n.map((function(e){return p(e,r[e])})))}))).apply(this,arguments)}function p(e,t){return h.apply(this,arguments)}function h(){return(h=(0,a.default)((function*(e,t){if(!t)throw new o.CodedError("ERR_FONT_SOURCE",`Cannot load null or undefined font source: { "${e}": ${t} }. Expected asset of type \`FontSource\` for fontFamily of name: "${e}"`);if(!s[e]){if(c.hasOwnProperty(e))return c[e];var r=(0,u.getAssetForSource)(t);c[e]=(0,a.default)((function*(){try{yield(0,u.loadSingleFontAsync)(e,r),s[e]=!0}finally{delete c[e]}}))(),yield c[e]}}))).apply(this,arguments)}function m(){return(m=(0,a.default)((function*(){if(!i.default.unloadAllAsync)throw new o.UnavailabilityError("expo-font","unloadAllAsync");if(Object.keys(c).length)throw new o.CodedError("ERR_UNLOAD",`Cannot unload fonts while they're still loading: ${Object.keys(c).join(", ")}`);for(var e of Object.keys(s))delete s[e];yield i.default.unloadAllAsync()}))).apply(this,arguments)}function v(){return(v=(0,a.default)((function*(e,t){if(!i.default.unloadAsync)throw new o.UnavailabilityError("expo-font","unloadAsync");if("object"!==typeof e)return yield g(e,t);if(t)throw new o.CodedError("ERR_FONT_API",`No fontFamily can be used for the provided options: ${t}. The second argument of \`unloadAsync()\` can only be used with a \`string\` value as the first argument.`);var r=e,n=Object.keys(r);yield Promise.all(n.map((function(e){return g(e,r[e])})))}))).apply(this,arguments)}function g(e,t){return y.apply(this,arguments)}function y(){return(y=(0,a.default)((function*(e,t){if(s[e]){delete s[e];var r=(0,u.getNativeFontName)(e);if(!r)throw new o.CodedError("ERR_FONT_FAMILY","Cannot unload an empty name");yield i.default.unloadAsync(r,t)}}))).apply(this,arguments)}},38060:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.FontDisplay=void 0,t.FontDisplay=r,function(e){e.AUTO="auto",e.SWAP="swap",e.BLOCK="block",e.FALLBACK="fallback",e.OPTIONAL="optional"}(r||(t.FontDisplay=r={}))},54791:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.useFonts=function(e){var t=(0,o.useState)(!1),r=(0,a.default)(t,2),n=r[0],l=r[1],u=(0,o.useState)(null),s=(0,a.default)(u,2),c=s[0],f=s[1];return(0,o.useEffect)((function(){(0,i.loadAsync)(e).then((function(){return l(!0)})).catch(f)}),[]),[n,c]};var a=n(r(69133)),o=r(21939),i=r(54200)},43302:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.fontFamilyNeedsScoping=function(e){return!1},t.getAssetForSource=function(e){var t=s(e),r=(n=e,n.display||u.FontDisplay.AUTO);var n;t&&"string"===typeof t||c(t);return{uri:t,display:r}},t.getNativeFontName=function(e){return e},t.loadSingleFontAsync=function(e,t){return f.apply(this,arguments)};var a=n(r(81315)),o=r(35562),i=r(83668),l=n(r(9924)),u=r(38060);function s(e){return"string"===typeof e?e||null:"object"===typeof e?e.uri||e.localUri||e.default||null:"number"===typeof e?s(o.Asset.fromModule(e)):null}function c(e){var t=typeof e;throw"object"===t&&(t=JSON.stringify(e,null,2)),new i.CodedError("ERR_FONT_SOURCE",`Expected font asset of type \`string | FontResource | Asset\` instead got: ${t}`)}function f(){return(f=(0,a.default)((function*(e,t){("object"!==typeof t||"string"!==typeof t.uri||t.downloadAsync)&&c(t),yield l.default.loadAsync(e,t)}))).apply(this,arguments)}},54019:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={useFonts:!0};Object.defineProperty(t,"useFonts",{enumerable:!0,get:function(){return o.useFonts}});var a=r(54200);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var o=r(54791)},18480:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.EventEmitter=void 0;var a=n(r(93709)),o=n(r(35527)),i=n(r(78439)),l=n(r(85521)),u=n(r(23873)),s=n(r(97969)),c=n(r(27410)),f="@@nativeEmitterSubscription@@",d=function(){function e(t){(0,o.default)(this,e),this._listenerCount=0,t.__expo_module_name__&&s.default.EXReactNativeEventEmitter&&(t.addListener=function(){for(var e,r=arguments.length,n=new Array(r),a=0;a=0,"EventEmitter must have a non-negative number of listeners"),!this._listenerCount&&"ios"!==c.default.OS&&this._nativeModule.stopObserving&&this._nativeModule.stopObserving()}},{key:"removeSubscription",value:function(e){var t=e[f];t&&("remove"in t?t.remove():"removeSubscription"in this._eventEmitter&&this._eventEmitter.removeSubscription(t),this._listenerCount--,delete e[f],e.remove=function(){},!this._listenerCount&&"ios"!==c.default.OS&&this._nativeModule.stopObserving&&this._nativeModule.stopObserving())}},{key:"emit",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),a=1;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={}},75354:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.requireNativeViewManager=function(e){throw new n.UnavailabilityError("expo-modules-core","requireNativeViewManager")};var n=r(55249)},90709:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.createPermissionHook=function(e){return function(t){return function(e,t){var r=(0,l.useRef)(!0),n=(0,l.useState)(null),s=(0,i.default)(n,2),c=s[0],f=s[1],d=t||{},p=d.get,h=void 0===p||p,m=d.request,v=void 0!==m&&m,g=(0,o.default)(d,u),y=(0,l.useCallback)((0,a.default)((function*(){var t=yield e.getMethod(Object.keys(g).length>0?g:void 0);return r.current&&f(t),t})),[e.getMethod]),b=(0,l.useCallback)((0,a.default)((function*(){var t=yield e.requestMethod(Object.keys(g).length>0?g:void 0);return r.current&&f(t),t})),[e.requestMethod]);return(0,l.useEffect)((function(){v&&b(),!v&&h&&y()}),[h,v,b,y]),(0,l.useEffect)((function(){return r.current=!0,function(){r.current=!1}}),[]),[c,b,y]}(e,t)}};var a=n(r(81315)),o=n(r(53591)),i=n(r(69133)),l=r(21939),u=["get","request"]},91628:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.PermissionStatus=void 0,t.PermissionStatus=r,function(e){e.GRANTED="granted",e.UNDETERMINED="undetermined",e.DENIED="denied"}(r||(t.PermissionStatus=r={}))},7055:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(27410)),o=r(76633),i={OS:a.default.OS,select:a.default.select,isDOMAvailable:o.isDOMAvailable,canUseEventListeners:o.canUseEventListeners,canUseViewport:o.canUseViewport,isAsyncDebugging:o.isAsyncDebugging};t.default=i},15208:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a.default}});var a=n(r(49488))},18415:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},54362:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.currentVersion,u=r.versionToRemove,s=r.replacement,c=`${function(e){var t=e.replace(/[-.]/g,"_").toUpperCase();return t}(e)}:${t}:${s}`;i[c]||(i[c]=!0);if(!n||!u||(0,a.default)(n,u)>=0){var f=`\`${t}\` has been removed`;throw u&&(f=`${f} as of version "${u}"`),s&&s.length&&(f=`${f} please migrate to: \`${s}\``),new o.CodedError("ERR_DEPRECATED_API",l(e,f))}var d=`\`${t}\` has been deprecated`;s&&s.length&&(d=`${d} in favor of \`${s}\``);u&&u.length&&(d=`${d} and will be removed in version "${u}"`);console.warn(l(e,d))};var a=n(r(37772)),o=r(34793),i={};function l(e,t){return`${e}: ${t}`}},76633:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.isDOMAvailable=t.isAsyncDebugging=t.canUseViewport=t.canUseEventListeners=void 0;var n="undefined"!==typeof window&&!(null==(r=window.document)||!r.createElement);t.isDOMAvailable=n;var a=n&&!(!window.addEventListener&&!window.attachEvent);t.canUseEventListeners=a;var o=n&&!!window.screen;t.canUseViewport=o;t.isAsyncDebugging=!1},34793:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.CodedError=void 0;var a=n(r(78439)),o=n(r(35527)),i=n(r(3755)),l=n(r(23335)),u=n(r(31355));function s(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,u.default)(e);if(t){var a=(0,u.default)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return(0,l.default)(this,r)}}var c=function(e){(0,i.default)(r,e);var t=s(r);function r(e,n){var a;return(0,o.default)(this,r),(a=t.call(this,n)).code=e,a}return(0,a.default)(r)}((0,n(r(42259)).default)(Error));t.CodedError=c},55249:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.UnavailabilityError=void 0;var a=n(r(78439)),o=n(r(35527)),i=n(r(3755)),l=n(r(23335)),u=n(r(31355)),s=n(r(7055));function c(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,u.default)(e);if(t){var a=(0,u.default)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return(0,l.default)(this,r)}}var f=function(e){(0,i.default)(r,e);var t=c(r);function r(e,n){return(0,o.default)(this,r),t.call(this,"ERR_UNAVAILABLE",`The method or property ${e}.${n} is not available on ${s.default.OS}, are you sure you've linked all the native dependencies properly?`)}return(0,a.default)(r)}(r(34793).CodedError);t.UnavailabilityError=f},83668:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0});var a={RCTDeviceEventEmitter:!0,DeviceEventEmitter:!0,EventEmitter:!0,NativeModulesProxy:!0,requireNativeViewManager:!0,Platform:!0,SyntheticPlatformEmitter:!0,CodedError:!0,UnavailabilityError:!0,deprecate:!0};Object.defineProperty(t,"CodedError",{enumerable:!0,get:function(){return f.CodedError}}),Object.defineProperty(t,"DeviceEventEmitter",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"EventEmitter",{enumerable:!0,get:function(){return i.EventEmitter}}),Object.defineProperty(t,"NativeModulesProxy",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"Platform",{enumerable:!0,get:function(){return s.default}}),t.RCTDeviceEventEmitter=void 0,Object.defineProperty(t,"SyntheticPlatformEmitter",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"UnavailabilityError",{enumerable:!0,get:function(){return d.UnavailabilityError}}),Object.defineProperty(t,"deprecate",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"requireNativeViewManager",{enumerable:!0,get:function(){return u.requireNativeViewManager}});var o=n(r(49488)),i=r(18480),l=n(r(1375)),u=r(75354),s=n(r(7055)),c=n(r(15208)),f=r(34793),d=r(55249);r(69143);var p=n(r(54362)),h=r(58613);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var m=r(18415);Object.keys(m).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||e in t&&t[e]===m[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return m[e]}}))}));var v=r(91628);Object.keys(v).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||e in t&&t[e]===v[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return v[e]}}))}));var g=r(90709);Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||e in t&&t[e]===g[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}}))}));var y=o.default;t.RCTDeviceEventEmitter=y},58613:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.requireNativeModule=function(e){var t,r,n,o,i,l=null!=(t=null!=(r=null==(n=globalThis.expo)||null==(o=n.modules)?void 0:o[e])?r:null==(i=globalThis.ExpoModules)?void 0:i[e])?t:a.default[e];if(!l)throw new Error(`Cannot find native module '${e}'`);return l};var a=n(r(1375))},99085:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(1375)).default.ExpoModulesCoreErrorManager;t.default=a},69143:(e,t,r)=>{"use strict";var n=r(12976),a=(r(18480),n(r(7055)),r(34793));n(r(99085));globalThis.ExpoModulesCore_CodedError=a.CodedError},84548:(e,t,r)=>{"use strict";var n=r(12976),a=n(r(27346)),o=n(r(10156));(0,a.default)(o.default)},57479:()=>{0},98973:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createRoot",{enumerable:!0,get:function(){return n.createRoot}});var n=r(54228)},27346:(e,t,r)=>{"use strict";var n=r(12976);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e;0;if("web"!==i.default.OS)o.default.registerComponent("main",(function(){return t}));else if("undefined"!==typeof document){var r=document.getElementById("root");if(r||(r=document.getElementById("main")),!r)throw new Error('Required HTML element with id "root" was not found in the document HTML. This is required for mounting the root React component.');(0,l.createRoot)(r).render(a.createElement(t))}},r(57479);var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==typeof e&&"function"!==typeof e)return{default:e};var r=u(t);if(r&&r.has(e))return r.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=a?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(21939)),o=n(r(46778)),i=n(r(27410)),l=r(98973);function u(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(u=function(e){return e?r:t})(e)}},49359:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,a,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(a=n;0!==a--;)if(!e(t[a],r[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(a=n;0!==a--;)if(!Object.prototype.hasOwnProperty.call(r,o[a]))return!1;for(a=n;0!==a--;){var i=o[a];if(!e(t[i],r[i]))return!1}return!0}return t!==t&&r!==r}},98767:e=>{"use strict";var t=!("undefined"===typeof window||!window.document||!window.document.createElement),r={canUseDOM:t,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:t&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:t&&!!window.screen,isInWorker:!t};e.exports=r},9784:e=>{"use strict";function t(e){return function(){return e}}var r=function(){};r.thatReturns=t,r.thatReturnsFalse=t(!1),r.thatReturnsTrue=t(!0),r.thatReturnsNull=t(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},8765:e=>{"use strict";var t=function(e){};e.exports=function(e,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),o=2;o{"use strict";var n=r(9784);e.exports=n},26024:e=>{!function(){function t(e,t){document.addEventListener?e.addEventListener("scroll",t,!1):e.attachEvent("scroll",t)}function r(e){this.g=document.createElement("div"),this.g.setAttribute("aria-hidden","true"),this.g.appendChild(document.createTextNode(e)),this.h=document.createElement("span"),this.i=document.createElement("span"),this.m=document.createElement("span"),this.j=document.createElement("span"),this.l=-1,this.h.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.i.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.j.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.m.style.cssText="display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;",this.h.appendChild(this.m),this.i.appendChild(this.j),this.g.appendChild(this.h),this.g.appendChild(this.i)}function n(e,t){e.g.style.cssText="max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:"+t+";"}function a(e){var t=e.g.offsetWidth,r=t+100;return e.j.style.width=r+"px",e.i.scrollLeft=r,e.h.scrollLeft=e.h.scrollWidth+100,e.l!==t&&(e.l=t,!0)}function o(e,r){function n(){var e=o;a(e)&&null!==e.g.parentNode&&r(e.l)}var o=e;t(e.h,n),t(e.i,n),a(e)}function i(e,t,r){t=t||{},r=r||window,this.family=e,this.style=t.style||"normal",this.weight=t.weight||"normal",this.stretch=t.stretch||"normal",this.context=r}var l=null,u=null,s=null,c=null;function f(e){return null===c&&(c=!!e.document.fonts),c}function d(e,t){var r=e.style,n=e.weight;if(null===s){var a=document.createElement("div");try{a.style.font="condensed 100px sans-serif"}catch(o){}s=""!==a.style.font}return[r,n,s?e.stretch:"","100px",t].join(" ")}i.prototype.load=function(e,t){var a=this,i=e||"BESbswy",s=0,c=t||3e3,p=(new Date).getTime();return new Promise((function(e,t){if(f(a.context)&&!function(e){return null===u&&(f(e)&&/Apple/.test(window.navigator.vendor)?(e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))(?:\.([0-9]+))/.exec(window.navigator.userAgent),u=!!e&&603>parseInt(e[1],10)):u=!1),u}(a.context)){var h=new Promise((function(e,t){!function r(){(new Date).getTime()-p>=c?t(Error(c+"ms timeout exceeded")):a.context.document.fonts.load(d(a,'"'+a.family+'"'),i).then((function(t){1<=t.length?e():setTimeout(r,25)}),t)}()})),m=new Promise((function(e,t){s=setTimeout((function(){t(Error(c+"ms timeout exceeded"))}),c)}));Promise.race([m,h]).then((function(){clearTimeout(s),e(a)}),t)}else!function(e){document.body?e():document.addEventListener?document.addEventListener("DOMContentLoaded",(function t(){document.removeEventListener("DOMContentLoaded",t),e()})):document.attachEvent("onreadystatechange",(function t(){"interactive"!=document.readyState&&"complete"!=document.readyState||(document.detachEvent("onreadystatechange",t),e())}))}((function(){function u(){var t;(t=-1!=v&&-1!=g||-1!=v&&-1!=y||-1!=g&&-1!=y)&&((t=v!=g&&v!=y&&g!=y)||(null===l&&(t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent),l=!!t&&(536>parseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))),t=l&&(v==b&&g==b&&y==b||v==w&&g==w&&y==w||v==k&&g==k&&y==k)),t=!t),t&&(null!==_.parentNode&&_.parentNode.removeChild(_),clearTimeout(s),e(a))}var f=new r(i),h=new r(i),m=new r(i),v=-1,g=-1,y=-1,b=-1,w=-1,k=-1,_=document.createElement("div");_.dir="ltr",n(f,d(a,"sans-serif")),n(h,d(a,"serif")),n(m,d(a,"monospace")),_.appendChild(f.g),_.appendChild(h.g),_.appendChild(m.g),a.context.document.body.appendChild(_),b=f.g.offsetWidth,w=h.g.offsetWidth,k=m.g.offsetWidth,function e(){if((new Date).getTime()-p>=c)null!==_.parentNode&&_.parentNode.removeChild(_),t(Error(c+"ms timeout exceeded"));else{var r=a.context.document.hidden;!0!==r&&void 0!==r||(v=f.g.offsetWidth,g=h.g.offsetWidth,y=m.g.offsetWidth,u()),s=setTimeout(e,50)}}(),o(f,(function(e){v=e,u()})),n(f,d(a,'"'+a.family+'",sans-serif')),o(h,(function(e){g=e,u()})),n(h,d(a,'"'+a.family+'",serif')),o(m,(function(e){y=e,u()})),n(m,d(a,'"'+a.family+'",monospace'))}))}))},e.exports=i}()},17775:e=>{"use strict";var t=Array.prototype.slice,r=Object.prototype.toString;e.exports=function(e){var n=this;if("function"!==typeof n||"[object Function]"!==r.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var a,o=t.call(arguments,1),i=Math.max(0,n.length-o.length),l=[],u=0;u{"use strict";var n=r(17775);e.exports=Function.prototype.bind||n},58814:e=>{"use strict";var t=function(){return"string"===typeof function(){}.name},r=Object.getOwnPropertyDescriptor;if(r)try{r([],"length")}catch(a){r=null}t.functionsHaveConfigurableNames=function(){if(!t()||!r)return!1;var e=r((function(){}),"name");return!!e&&!!e.configurable};var n=Function.prototype.bind;t.boundFunctionsHaveNames=function(){return t()&&"function"===typeof n&&""!==function(){}.bind().name},e.exports=t},6917:(e,t,r)=>{"use strict";var n,a=SyntaxError,o=Function,i=TypeError,l=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(t){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(j){u=null}var s=function(){throw new i},c=u?function(){try{return s}catch(e){try{return u(arguments,"callee").get}catch(t){return s}}}():s,f=r(19418)(),d=r(79838)(),p=Object.getPrototypeOf||(d?function(e){return e.__proto__}:null),h={},m="undefined"!==typeof Uint8Array&&p?p(Uint8Array):n,v={"%AggregateError%":"undefined"===typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":f&&p?p([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"===typeof Atomics?n:Atomics,"%BigInt%":"undefined"===typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"===typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"===typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"===typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":"undefined"===typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f&&p?p(p([][Symbol.iterator]())):n,"%JSON%":"object"===typeof JSON?JSON:n,"%Map%":"undefined"===typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&f&&p?p((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?n:Promise,"%Proxy%":"undefined"===typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"===typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&f&&p?p((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f&&p?p(""[Symbol.iterator]()):n,"%Symbol%":f?Symbol:n,"%SyntaxError%":a,"%ThrowTypeError%":c,"%TypedArray%":m,"%TypeError%":i,"%Uint8Array%":"undefined"===typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"===typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"===typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"===typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?n:WeakSet};if(p)try{null.error}catch(j){var g=p(p(j));v["%Error.prototype%"]=g}var y=function e(t){var r;if("%AsyncFunction%"===t)r=l("async function () {}");else if("%GeneratorFunction%"===t)r=l("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=l("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var a=e("%AsyncGenerator%");a&&p&&(r=p(a.prototype))}return v[t]=r,r},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},w=r(7122),k=r(32392),_=w.call(Function.call,Array.prototype.concat),O=w.call(Function.apply,Array.prototype.splice),S=w.call(Function.call,String.prototype.replace),E=w.call(Function.call,String.prototype.slice),x=w.call(Function.call,RegExp.prototype.exec),P=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,A=/\\(\\)?/g,T=function(e,t){var r,n=e;if(k(b,n)&&(n="%"+(r=b[n])[0]+"%"),k(v,n)){var o=v[n];if(o===h&&(o=y(n)),"undefined"===typeof o&&!t)throw new i("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new a("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!==typeof e||0===e.length)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof t)throw new i('"allowMissing" argument must be a boolean');if(null===x(/^%?[^%]*%?$/,e))throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=E(e,0,1),r=E(e,-1);if("%"===t&&"%"!==r)throw new a("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new a("invalid intrinsic syntax, expected opening `%`");var n=[];return S(e,P,(function(e,t,r,a){n[n.length]=r?S(a,A,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",o=T("%"+n+"%",t),l=o.name,s=o.value,c=!1,f=o.alias;f&&(n=f[0],O(r,_([0,1],f)));for(var d=1,p=!0;d=r.length){var y=u(s,h);s=(p=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:s[h]}else p=k(s,h),s=s[h];p&&!c&&(v[l]=s)}}return s}},78031:(e,t,r)=>{var n;n="undefined"!==typeof window?window:"undefined"!==typeof r.g?r.g:"undefined"!==typeof self?self:{},e.exports=n},85635:(e,t,r)=>{"use strict";var n=r(6917)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(a){n=null}e.exports=n},39090:(e,t,r)=>{"use strict";var n=r(6917)("%Object.defineProperty%",!0),a=function(){if(n)try{return n({},"a",{value:1}),!0}catch(e){return!1}return!1};a.hasArrayLengthDefineBug=function(){if(!a())return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=a},79838:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},19418:(e,t,r)=>{"use strict";var n="undefined"!==typeof Symbol&&Symbol,a=r(27071);e.exports=function(){return"function"===typeof n&&("function"===typeof Symbol&&("symbol"===typeof n("foo")&&("symbol"===typeof Symbol("bar")&&a())))}},27071:e=>{"use strict";e.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"===typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"===typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,t);if(42!==a.value||!0!==a.enumerable)return!1}return!0}},94538:(e,t,r)=>{"use strict";var n=r(27071);e.exports=function(){return n()&&!!Symbol.toStringTag}},32392:(e,t,r)=>{"use strict";var n=r(7122);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},25625:(e,t,r)=>{"use strict";var n=r(96443),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function u(e){return n.isMemo(e)?i:l[e.$$typeof]||a}l[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[n.Memo]=i;var s=Object.defineProperty,c=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,r,n){if("string"!==typeof r){if(h){var a=p(r);a&&a!==h&&e(t,a,n)}var i=c(r);f&&(i=i.concat(f(r)));for(var l=u(t),m=u(r),v=0;v{"use strict";var r="function"===typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,i=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,s=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function k(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case c:case f:case o:case l:case i:case p:return e;default:switch(e=e&&e.$$typeof){case s:case d:case v:case m:case u:return e;default:return t}}case a:return t}}}function _(e){return k(e)===f}t.AsyncMode=c,t.ConcurrentMode=f,t.ContextConsumer=s,t.ContextProvider=u,t.Element=n,t.ForwardRef=d,t.Fragment=o,t.Lazy=v,t.Memo=m,t.Portal=a,t.Profiler=l,t.StrictMode=i,t.Suspense=p,t.isAsyncMode=function(e){return _(e)||k(e)===c},t.isConcurrentMode=_,t.isContextConsumer=function(e){return k(e)===s},t.isContextProvider=function(e){return k(e)===u},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return k(e)===d},t.isFragment=function(e){return k(e)===o},t.isLazy=function(e){return k(e)===v},t.isMemo=function(e){return k(e)===m},t.isPortal=function(e){return k(e)===a},t.isProfiler=function(e){return k(e)===l},t.isStrictMode=function(e){return k(e)===i},t.isSuspense=function(e){return k(e)===p},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===o||e===f||e===l||e===i||e===p||e===h||"object"===typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===u||e.$$typeof===s||e.$$typeof===d||e.$$typeof===y||e.$$typeof===b||e.$$typeof===w||e.$$typeof===g)},t.typeOf=k},96443:(e,t,r)=>{"use strict";e.exports=r(97347)},17115:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=/[A-Z]/g,n=/^ms-/,a={};function o(e){return"-"+e.toLowerCase()}var i=function(e){if(a.hasOwnProperty(e))return a[e];var t=e.replace(r,o);return a[e]=n.test(t)?"-"+t:t};t.default=i},26687:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.prefixMap,r=e.plugins;return function e(l){for(var u in l){var s=l[u];if((0,i.default)(s))l[u]=e(s);else if(Array.isArray(s)){for(var c=[],f=0,d=s.length;f0&&(l[u]=c)}else{var h=(0,a.default)(r,u,s,l,t);h&&(l[u]=h),l=(0,n.default)(t,u,l)}}return l}};var n=l(r(88227)),a=l(r(43807)),o=l(r(84594)),i=l(r(44525));function l(e){return e&&e.__esModule?e:{default:e}}},95923:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return null}},56941:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("string"===typeof t&&!(0,n.isPrefixedValue)(t)&&-1!==t.indexOf("cross-fade("))return o.map((function(e){return t.replace(a,e+"cross-fade(")}))};var n=r(17182),a=/cross-fade\(/g,o=["-webkit-",""]},40971:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("cursor"===e&&n.hasOwnProperty(t))return r.map((function(e){return e+t}))};var r=["-webkit-","-moz-",""],n={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0}},60041:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("string"===typeof t&&!(0,n.isPrefixedValue)(t)&&-1!==t.indexOf("filter("))return o.map((function(e){return t.replace(a,e+"filter(")}))};var n=r(17182),a=/filter\(/g,o=["-webkit-",""]},41531:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("string"===typeof t&&!(0,o.default)(t)&&t.indexOf("image-set(")>-1)return i.map((function(e){return t.replace(/image-set\(/g,e+"image-set(")}))};var n,a=r(37252),o=(n=a)&&n.__esModule?n:{default:n};var i=["-webkit-",""]},16250:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(Object.prototype.hasOwnProperty.call(r,e))for(var a=r[e],o=0,i=a.length;o{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("position"===e&&"sticky"===t)return["-webkit-sticky","sticky"]}},11400:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(n.hasOwnProperty(e)&&a.hasOwnProperty(t))return r.map((function(e){return e+t}))};var r=["-webkit-","-moz-",""],n={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},a={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0}},45752:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,i){if("string"===typeof t&&l.hasOwnProperty(e)){var s=function(e,t){if((0,a.default)(e))return e;for(var r=e.split(/,(?![^()]*(?:\([^()]*\))?\))/g),o=0,i=r.length;o-1&&"order"!==f)for(var d=t[c],p=0,h=d.length;p-1)return c;var f=s.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter((function(e){return!/-webkit-|-ms-/.test(e)})).join(",");return e.indexOf("Moz")>-1?f:(r["Webkit"+(0,o.default)(e)]=c,r["Moz"+(0,o.default)(e)]=f,s)}};var n=i(r(49765)),a=i(r(37252)),o=i(r(90747));function i(e){return e&&e.__esModule?e:{default:e}}var l={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},u={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-"}},84594:(e,t)=>{"use strict";function r(e,t){-1===e.indexOf(t)&&e.push(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(Array.isArray(t))for(var n=0,a=t.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},44525:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e instanceof Object&&!Array.isArray(e)}},88227:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){var n=e[t];if(n&&r.hasOwnProperty(t))for(var a=(0,o.default)(t),i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,n,a){for(var o=0,i=e.length;o{r.g.IntlPolyfill=r(56583),r(12482),r.g.Intl||(r.g.Intl=r.g.IntlPolyfill,r.g.IntlPolyfill.__applyLocaleSensitivePrototypes()),e.exports=r.g.IntlPolyfill},56583:(e,t,r)=>{"use strict";var n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},a=function(){var e="function"===typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;return function(t,r,n,a){var o=t&&t.defaultProps,i=arguments.length-3;if(r||0===i||(r={}),r&&o)for(var l in o)void 0===r[l]&&(r[l]=o[l]);else r||(r=o||{});if(1===i)r.children=a;else if(i>1){for(var u=Array(i),s=0;s=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},possibleConstructorReturn:function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t},selfGlobal:u,set:function e(t,r,n,a){var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);null!==i&&e(i,r,n,a)}else if("value"in o&&o.writable)o.value=n;else{var l=o.set;void 0!==l&&l.call(a,n)}return n},slicedToArray:s,slicedToArrayLoose:function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){for(var r,n=[],a=e[Symbol.iterator]();!(r=a.next()).done&&(n.push(r.value),!t||n.length!==t););return n}throw new TypeError("Invalid attempt to destructure non-iterable instance")},taggedTemplateLiteral:function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))},taggedTemplateLiteralLoose:function(e,t){return e.raw=t,e},temporalRef:function(e,t,r){if(e===r)throw new ReferenceError(t+" is not defined - temporal dead zone");return e},temporalUndefined:{},toArray:function(e){return Array.isArray(e)?e:Array.from(e)},toConsumableArray:function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t="a"&&r<="z"&&(e=e.slice(0,t)+r.toUpperCase()+e.slice(t+1))}return e}function W(e){return!!N.test(e)&&(!F.test(e)&&!V.test(e))}function U(e){for(var t=void 0,r=void 0,n=1,a=(r=(e=e.toLowerCase()).split("-")).length;n1&&(t.sort(),e=e.replace(RegExp("(?:"+L.source+")+","i"),w.call(t,""))),p.call(B.tags,e)&&(e=B.tags[e]);for(var o=1,i=(r=e.split("-")).length;o-1)return r;var n=r.lastIndexOf("-");if(n<0)return;n>=2&&"-"===r.charAt(n-2)&&(n-=2),r=r.substring(0,n)}}function K(e,t){for(var r=0,n=t.length,a=void 0,o=void 0,i=void 0;r2){var _=l[k+1];-1!==w.call(g,_)&&(b="-"+v+"-"+(y=_))}else{-1!==w(g,"true")&&(y="true")}}if(p.call(r,"[["+v+"]]")){var O=r["[["+v+"]]"];-1!==w.call(g,O)&&O!==y&&(y=O,b="")}c["[["+v+"]]"]=y,f+=b,d++}if(f.length>2){var S=i.indexOf("-x-");if(-1===S)i+=f;else{var x=i.substring(0,S),P=i.substring(S);i=x+f+P}i=U(i)}return c["[[locale]]"]=i,c}function J(e,t){for(var r=t.length,n=new x,a=0;an)throw new RangeError("Value is not a number or outside accepted range");return Math.floor(o)}return a}var te={};Object.defineProperty(te,"getCanonicalLocales",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t=Y(e),r=[],n=t.length,a=0;a-1&&sf){var h=l.substring(f,s);b.call(u,{"[[type]]":"literal","[[value]]":h})}var m=l.substring(s+1,c);if("number"===m)if(isNaN(t)){var v=i.nan;b.call(u,{"[[type]]":"nan","[[value]]":v})}else if(isFinite(t)){"percent"===r["[[style]]"]&&isFinite(t)&&(t*=100);var g=void 0;g=p.call(r,"[[minimumSignificantDigits]]")&&p.call(r,"[[maximumSignificantDigits]]")?le(t,r["[[minimumSignificantDigits]]"],r["[[maximumSignificantDigits]]"]):ue(t,r["[[minimumIntegerDigits]]"],r["[[minimumFractionDigits]]"],r["[[maximumFractionDigits]]"]),se[a]?function(){var e=se[a];g=String(g).replace(/\d/g,(function(t){return e[t]}))}():g=String(g);var y=void 0,w=void 0,_=g.indexOf(".",0);if(_>0?(y=g.substring(0,_),w=g.substring(_+1,_.length)):(y=g,w=void 0),!0===r["[[useGrouping]]"]){var S=i.group,E=[],P=o.patterns.primaryGroupSize||3,A=o.patterns.secondaryGroupSize||P;if(y.length>P){var T=y.length-P,j=T%A,R=y.slice(0,j);for(R.length&&b.call(E,R);ja;a++){n+=r[a]["[[value]]"]}return n}function le(e,t,r){var n=r,a=void 0,o=void 0;if(0===e)a=w.call(Array(n+1),"0"),o=0;else{o=function(e){if("function"===typeof Math.log10)return Math.floor(Math.log10(e));var t=Math.round(Math.log(e)*Math.LOG10E);return t-(Number("1e"+t)>e)}(Math.abs(e));var i=Math.round(Math.exp(Math.abs(o-n+1)*Math.LN10));a=String(Math.round(o-n+1<0?e*i:e/i))}if(o>=n)return a+w.call(Array(o-n+1+1),"0");if(o===n-1)return a;if(o>=0?a=a.slice(0,o+1)+"."+a.slice(o+1):o<0&&(a="0."+w.call(Array(1-(o+1)),"0")+a),a.indexOf(".")>=0&&r>t){for(var l=r-t;l>0&&"0"===a.charAt(a.length-1);)a=a.slice(0,-1),l--;"."===a.charAt(a.length-1)&&(a=a.slice(0,-1))}return a}function ue(e,t,r,n){var a,o=n,i=Math.pow(10,o)*e,l=0===i?"0":i.toFixed(0),u=(a=l.indexOf("e"))>-1?l.slice(a+1):0;u&&(l=l.slice(0,a).replace(".",""),l+=w.call(Array(u-(l.length-1)+1),"0"));var s=void 0;if(0!==o){var c=l.length;if(c<=o)l=w.call(Array(o+1-c+1),"0")+l,c=o+1;var f=l.substring(0,c-o),d=l.substring(c-o,l.length);l=f+"."+d,s=f.length}else s=l.length;for(var p=n-r;p>0&&"0"===l.slice(-1);)l=l.slice(0,-1),p--;("."===l.slice(-1)&&(l=l.slice(0,-1)),so;o++){var i=r[o],l={};l.type=i["[[type]]"],l.value=i["[[value]]"],n[a]=l,a+=1}return n}(this,Number(e))}});var se={arab:["\u0660","\u0661","\u0662","\u0663","\u0664","\u0665","\u0666","\u0667","\u0668","\u0669"],arabext:["\u06f0","\u06f1","\u06f2","\u06f3","\u06f4","\u06f5","\u06f6","\u06f7","\u06f8","\u06f9"],bali:["\u1b50","\u1b51","\u1b52","\u1b53","\u1b54","\u1b55","\u1b56","\u1b57","\u1b58","\u1b59"],beng:["\u09e6","\u09e7","\u09e8","\u09e9","\u09ea","\u09eb","\u09ec","\u09ed","\u09ee","\u09ef"],deva:["\u0966","\u0967","\u0968","\u0969","\u096a","\u096b","\u096c","\u096d","\u096e","\u096f"],fullwide:["\uff10","\uff11","\uff12","\uff13","\uff14","\uff15","\uff16","\uff17","\uff18","\uff19"],gujr:["\u0ae6","\u0ae7","\u0ae8","\u0ae9","\u0aea","\u0aeb","\u0aec","\u0aed","\u0aee","\u0aef"],guru:["\u0a66","\u0a67","\u0a68","\u0a69","\u0a6a","\u0a6b","\u0a6c","\u0a6d","\u0a6e","\u0a6f"],hanidec:["\u3007","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d"],khmr:["\u17e0","\u17e1","\u17e2","\u17e3","\u17e4","\u17e5","\u17e6","\u17e7","\u17e8","\u17e9"],knda:["\u0ce6","\u0ce7","\u0ce8","\u0ce9","\u0cea","\u0ceb","\u0cec","\u0ced","\u0cee","\u0cef"],laoo:["\u0ed0","\u0ed1","\u0ed2","\u0ed3","\u0ed4","\u0ed5","\u0ed6","\u0ed7","\u0ed8","\u0ed9"],latn:["0","1","2","3","4","5","6","7","8","9"],limb:["\u1946","\u1947","\u1948","\u1949","\u194a","\u194b","\u194c","\u194d","\u194e","\u194f"],mlym:["\u0d66","\u0d67","\u0d68","\u0d69","\u0d6a","\u0d6b","\u0d6c","\u0d6d","\u0d6e","\u0d6f"],mong:["\u1810","\u1811","\u1812","\u1813","\u1814","\u1815","\u1816","\u1817","\u1818","\u1819"],mymr:["\u1040","\u1041","\u1042","\u1043","\u1044","\u1045","\u1046","\u1047","\u1048","\u1049"],orya:["\u0b66","\u0b67","\u0b68","\u0b69","\u0b6a","\u0b6b","\u0b6c","\u0b6d","\u0b6e","\u0b6f"],tamldec:["\u0be6","\u0be7","\u0be8","\u0be9","\u0bea","\u0beb","\u0bec","\u0bed","\u0bee","\u0bef"],telu:["\u0c66","\u0c67","\u0c68","\u0c69","\u0c6a","\u0c6b","\u0c6c","\u0c6d","\u0c6e","\u0c6f"],thai:["\u0e50","\u0e51","\u0e52","\u0e53","\u0e54","\u0e55","\u0e56","\u0e57","\u0e58","\u0e59"],tibt:["\u0f20","\u0f21","\u0f22","\u0f23","\u0f24","\u0f25","\u0f26","\u0f27","\u0f28","\u0f29"]};h(te.NumberFormat.prototype,"resolvedOptions",{configurable:!0,writable:!0,value:function(){var e=void 0,t=new E,r=["locale","numberingSystem","style","currency","currencyDisplay","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","useGrouping"],n=null!==this&&"object"===c.typeof(this)&&C(this);if(!n||!n["[[initializedNumberFormat]]"])throw new TypeError("`this` value for resolvedOptions() is not an initialized Intl.NumberFormat object.");for(var a=0,o=r.length;au&&(u=h,s=d),c++}return s}(l,_);else{var A=Z(r,"hour12","boolean");l.hour12=void 0===A?k.hour12:A,w=function(e,t){var r=[];for(var n in Ee)p.call(Ee,n)&&void 0!==e["[["+n+"]]"]&&r.push(n);if(1===r.length){var a=function(e,t){var r;if(ke[e]&&ke[e][t])return r={originalPattern:ke[e][t],_:i({},e,t),extendedPattern:"{"+e+"}"},i(r,e,t),i(r,"pattern12","{"+e+"}"),i(r,"pattern","{"+e+"}"),r}(r[0],e["[["+r[0]+"]]"]);if(a)return a}var o=120,l=20,u=8,s=6,c=6,f=3,d=2,h=1,v=-1/0,g=void 0,y=0,b=t.length;for(;y=2||P>=2&&x<=1?A>0?k-=s:A<0&&(k-=u):A>1?k-=f:A<-1&&(k-=c)}}w._.hour12!==e.hour12&&(k-=h),k>v&&(v=k,g=w),y++}return g}(l,_)}for(var T in Ee)if(p.call(Ee,T)&&p.call(w,T)){var j=w[T];j=w._&&p.call(w._,T)?w._[T]:j,n["[["+T+"]]"]=j}var R=void 0,M=Z(r,"hour12","boolean");if(n["[[hour]]"])if(M=void 0===M?k.hour12:M,n["[[hour12]]"]=M,!0===M){var I=k.hourNo0;n["[[hourNo0]]"]=I,R=w.pattern12}else R=w.pattern;else R=w.pattern;n["[[pattern]]"]=R,n["[[boundFormat]]"]=void 0,n["[[initializedDateTimeFormat]]"]=!0,d&&(e.format=Pe.call(e));return a(),e}(A(this),e,t):new te.DateTimeFormat(e,t)}h(te,"DateTimeFormat",{configurable:!0,writable:!0,value:Se}),h(Se,"prototype",{writable:!1});var Ee={weekday:["narrow","short","long"],era:["narrow","short","long"],year:["2-digit","numeric"],month:["2-digit","numeric","narrow","short","long"],day:["2-digit","numeric"],hour:["2-digit","numeric"],minute:["2-digit","numeric"],second:["2-digit","numeric"],timeZoneName:["short","long"]};function xe(e,t,r){if(void 0===e)e=null;else{var n=A(e);for(var a in e=new E,n)e[a]=n[a]}e=v(e);var o=!0;return"date"!==t&&"any"!==t||void 0===e.weekday&&void 0===e.year&&void 0===e.month&&void 0===e.day||(o=!1),"time"!==t&&"any"!==t||void 0===e.hour&&void 0===e.minute&&void 0===e.second||(o=!1),!o||"date"!==r&&"all"!==r||(e.year=e.month=e.day="numeric"),!o||"time"!==r&&"all"!==r||(e.hour=e.minute=e.second="numeric"),e}function Pe(){var e=null!==this&&"object"===c.typeof(this)&&C(this);if(!e||!e["[[initializedDateTimeFormat]]"])throw new TypeError("`this` value for format() is not an initialized Intl.DateTimeFormat object.");if(void 0===e["[[boundFormat]]"]){var t=_.call((function(){var e=arguments.length<=0||void 0===arguments[0]?void 0:arguments[0];return Te(this,void 0===e?Date.now():T(e))}),this);e["[[boundFormat]]"]=t}return e["[[boundFormat]]"]}function Ae(e,t){if(!isFinite(t))throw new RangeError("Invalid valid date passed to format");var r=e.__getInternalProperties(S);P();for(var n=r["[[locale]]"],a=new te.NumberFormat([n],{useGrouping:!1}),o=new te.NumberFormat([n],{minimumIntegerDigits:2,useGrouping:!1}),i=function(e,t,r){var n=new Date(e),a="get"+(r||"");return new E({"[[weekday]]":n[a+"Day"](),"[[era]]":+(n[a+"FullYear"]()>=0),"[[year]]":n[a+"FullYear"](),"[[month]]":n[a+"Month"](),"[[day]]":n[a+"Date"](),"[[hour]]":n[a+"Hours"](),"[[minute]]":n[a+"Minutes"](),"[[second]]":n[a+"Seconds"](),"[[inDST]]":!1})}(t,r["[[calendar]]"],r["[[timeZone]]"]),l=r["[[pattern]]"],u=new x,s=0,c=l.indexOf("{"),f=0,d=r["[[dataLocale]]"],p=O.DateTimeFormat["[[localeData]]"][d].calendars,h=r["[[calendar]]"];-1!==c;){var m=void 0;if(-1===(f=l.indexOf("}",c)))throw new Error("Unclosed pattern");c>s&&b.call(u,{type:"literal",value:l.substring(s,c)});var v=l.substring(c+1,f);if(Ee.hasOwnProperty(v)){var g=r["[["+v+"]]"],y=i["[["+v+"]]"];if("year"===v&&y<=0?y=1-y:"month"===v?y++:"hour"===v&&!0===r["[[hour12]]"]&&0===(y%=12)&&!0===r["[[hourNo0]]"]&&(y=12),"numeric"===g)m=ie(a,y);else if("2-digit"===g)(m=ie(o,y)).length>2&&(m=m.slice(-2));else if(g in _e)switch(v){case"month":m=Oe(p,h,"months",g,i["[["+v+"]]"]);break;case"weekday":try{m=Oe(p,h,"days",g,i["[["+v+"]]"])}catch(w){throw new Error("Could not find weekday data for locale "+n)}break;case"timeZoneName":m="";break;case"era":try{m=Oe(p,h,"eras",g,i["[["+v+"]]"])}catch(w){throw new Error("Could not find era data for locale "+n)}break;default:m=i["[["+v+"]]"]}b.call(u,{type:v,value:m})}else if("ampm"===v){m=Oe(p,h,"dayPeriods",i["[[hour]]"]>11?"pm":"am",null),b.call(u,{type:"dayPeriod",value:m})}else b.call(u,{type:"literal",value:l.substring(c,f+1)});s=f+1,c=l.indexOf("{",s)}return fa;a++){n+=r[a].value}return n}O.DateTimeFormat={"[[availableLocales]]":[],"[[relevantExtensionKeys]]":["ca","nu"],"[[localeData]]":{}},h(te.DateTimeFormat,"supportedLocalesOf",{configurable:!0,writable:!0,value:_.call((function(e){if(!p.call(this,"[[availableLocales]]"))throw new TypeError("supportedLocalesOf() is not a constructor");var t=P(),r=arguments[1],n=this["[[availableLocales]]"],a=Y(e);return t(),Q(n,a,r)}),O.NumberFormat)}),h(te.DateTimeFormat.prototype,"format",{configurable:!0,get:Pe}),Object.defineProperty(te.DateTimeFormat.prototype,"formatToParts",{enumerable:!1,writable:!0,configurable:!0,value:function(){var e=arguments.length<=0||void 0===arguments[0]?void 0:arguments[0],t=null!==this&&"object"===c.typeof(this)&&C(this);if(!t||!t["[[initializedDateTimeFormat]]"])throw new TypeError("`this` value for formatToParts() is not an initialized Intl.DateTimeFormat object.");return function(e,t){for(var r=Ae(e,t),n=[],a=0;r.length>a;a++){var o=r[a];n.push({type:o.type,value:o.value})}return n}(this,void 0===e?Date.now():T(e))}}),h(te.DateTimeFormat.prototype,"resolvedOptions",{writable:!0,configurable:!0,value:function(){var e=void 0,t=new E,r=["locale","calendar","numberingSystem","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName"],n=null!==this&&"object"===c.typeof(this)&&C(this);if(!n||!n["[[initializedDateTimeFormat]]"])throw new TypeError("`this` value for resolvedOptions() is not an initialized Intl.DateTimeFormat object.");for(var a=0,o=r.length;a2&&4===a[1].length&&b.call(n,a[0]+"-"+a[2]);for(;r=k.call(n);)b.call(O.NumberFormat["[[availableLocales]]"],r),O.NumberFormat["[[localeData]]"][r]=e.number,e.date&&(e.date.nu=e.number.nu,b.call(O.DateTimeFormat["[[availableLocales]]"],r),O.DateTimeFormat["[[localeData]]"][r]=e.date);void 0===H&&function(e){H=e}(t)}(e,e.locale)}}),h(te,"__disableRegExpRestore",{value:function(){O.disableRegExpRestore=!0}}),e.exports=te},35827:()=>{IntlPolyfill.__addLocaleData({locale:"en",date:{ca:["gregory","buddhist","chinese","coptic","dangi","ethioaa","ethiopic","generic","hebrew","indian","islamic","islamicc","japanese","persian","roc"],hourNo0:!0,hour12:!0,formats:{short:"{1}, {0}",medium:"{1}, {0}",full:"{1} 'at' {0}",long:"{1} 'at' {0}",availableFormats:{d:"d",E:"ccc",Ed:"d E",Ehm:"E h:mm a",EHm:"E HH:mm",Ehms:"E h:mm:ss a",EHms:"E HH:mm:ss",Gy:"y G",GyMMM:"MMM y G",GyMMMd:"MMM d, y G",GyMMMEd:"E, MMM d, y G",h:"h a",H:"HH",hm:"h:mm a",Hm:"HH:mm",hms:"h:mm:ss a",Hms:"HH:mm:ss",hmsv:"h:mm:ss a v",Hmsv:"HH:mm:ss v",hmv:"h:mm a v",Hmv:"HH:mm v",M:"L",Md:"M/d",MEd:"E, M/d",MMM:"LLL",MMMd:"MMM d",MMMEd:"E, MMM d",MMMMd:"MMMM d",ms:"mm:ss",y:"y",yM:"M/y",yMd:"M/d/y",yMEd:"E, M/d/y",yMMM:"MMM y",yMMMd:"MMM d, y",yMMMEd:"E, MMM d, y",yMMMM:"MMMM y",yQQQ:"QQQ y",yQQQQ:"QQQQ y"},dateFormats:{yMMMMEEEEd:"EEEE, MMMM d, y",yMMMMd:"MMMM d, y",yMMMd:"MMM d, y",yMd:"M/d/yy"},timeFormats:{hmmsszzzz:"h:mm:ss a zzzz",hmsz:"h:mm:ss a z",hms:"h:mm:ss a",hm:"h:mm a"}},calendars:{buddhist:{months:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],long:["January","February","March","April","May","June","July","August","September","October","November","December"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["BE"],short:["BE"],long:["BE"]},dayPeriods:{am:"AM",pm:"PM"}},chinese:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],short:["Mo1","Mo2","Mo3","Mo4","Mo5","Mo6","Mo7","Mo8","Mo9","Mo10","Mo11","Mo12"],long:["Month1","Month2","Month3","Month4","Month5","Month6","Month7","Month8","Month9","Month10","Month11","Month12"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dayPeriods:{am:"AM",pm:"PM"}},coptic:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12","13"],short:["Tout","Baba","Hator","Kiahk","Toba","Amshir","Baramhat","Baramouda","Bashans","Paona","Epep","Mesra","Nasie"],long:["Tout","Baba","Hator","Kiahk","Toba","Amshir","Baramhat","Baramouda","Bashans","Paona","Epep","Mesra","Nasie"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["ERA0","ERA1"],short:["ERA0","ERA1"],long:["ERA0","ERA1"]},dayPeriods:{am:"AM",pm:"PM"}},dangi:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],short:["Mo1","Mo2","Mo3","Mo4","Mo5","Mo6","Mo7","Mo8","Mo9","Mo10","Mo11","Mo12"],long:["Month1","Month2","Month3","Month4","Month5","Month6","Month7","Month8","Month9","Month10","Month11","Month12"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dayPeriods:{am:"AM",pm:"PM"}},ethiopic:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12","13"],short:["Meskerem","Tekemt","Hedar","Tahsas","Ter","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehasse","Pagumen"],long:["Meskerem","Tekemt","Hedar","Tahsas","Ter","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehasse","Pagumen"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["ERA0","ERA1"],short:["ERA0","ERA1"],long:["ERA0","ERA1"]},dayPeriods:{am:"AM",pm:"PM"}},ethioaa:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12","13"],short:["Meskerem","Tekemt","Hedar","Tahsas","Ter","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehasse","Pagumen"],long:["Meskerem","Tekemt","Hedar","Tahsas","Ter","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehasse","Pagumen"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["ERA0"],short:["ERA0"],long:["ERA0"]},dayPeriods:{am:"AM",pm:"PM"}},generic:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],short:["M01","M02","M03","M04","M05","M06","M07","M08","M09","M10","M11","M12"],long:["M01","M02","M03","M04","M05","M06","M07","M08","M09","M10","M11","M12"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["ERA0","ERA1"],short:["ERA0","ERA1"],long:["ERA0","ERA1"]},dayPeriods:{am:"AM",pm:"PM"}},gregory:{months:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],long:["January","February","March","April","May","June","July","August","September","October","November","December"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["B","A","BCE","CE"],short:["BC","AD","BCE","CE"],long:["Before Christ","Anno Domini","Before Common Era","Common Era"]},dayPeriods:{am:"AM",pm:"PM"}},hebrew:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12","13","7"],short:["Tishri","Heshvan","Kislev","Tevet","Shevat","Adar I","Adar","Nisan","Iyar","Sivan","Tamuz","Av","Elul","Adar II"],long:["Tishri","Heshvan","Kislev","Tevet","Shevat","Adar I","Adar","Nisan","Iyar","Sivan","Tamuz","Av","Elul","Adar II"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["AM"],short:["AM"],long:["AM"]},dayPeriods:{am:"AM",pm:"PM"}},indian:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],short:["Chaitra","Vaisakha","Jyaistha","Asadha","Sravana","Bhadra","Asvina","Kartika","Agrahayana","Pausa","Magha","Phalguna"],long:["Chaitra","Vaisakha","Jyaistha","Asadha","Sravana","Bhadra","Asvina","Kartika","Agrahayana","Pausa","Magha","Phalguna"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["Saka"],short:["Saka"],long:["Saka"]},dayPeriods:{am:"AM",pm:"PM"}},islamic:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],short:["Muh.","Saf.","Rab. I","Rab. II","Jum. I","Jum. II","Raj.","Sha.","Ram.","Shaw.","Dhu\u02bbl-Q.","Dhu\u02bbl-H."],long:["Muharram","Safar","Rabi\u02bb I","Rabi\u02bb II","Jumada I","Jumada II","Rajab","Sha\u02bbban","Ramadan","Shawwal","Dhu\u02bbl-Qi\u02bbdah","Dhu\u02bbl-Hijjah"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["AH"],short:["AH"],long:["AH"]},dayPeriods:{am:"AM",pm:"PM"}},islamicc:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],short:["Muh.","Saf.","Rab. I","Rab. II","Jum. I","Jum. II","Raj.","Sha.","Ram.","Shaw.","Dhu\u02bbl-Q.","Dhu\u02bbl-H."],long:["Muharram","Safar","Rabi\u02bb I","Rabi\u02bb II","Jumada I","Jumada II","Rajab","Sha\u02bbban","Ramadan","Shawwal","Dhu\u02bbl-Qi\u02bbdah","Dhu\u02bbl-Hijjah"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["AH"],short:["AH"],long:["AH"]},dayPeriods:{am:"AM",pm:"PM"}},japanese:{months:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],long:["January","February","March","April","May","June","July","August","September","October","November","December"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["Taika (645\u2013650)","Hakuchi (650\u2013671)","Hakuh\u014d (672\u2013686)","Shuch\u014d (686\u2013701)","Taih\u014d (701\u2013704)","Keiun (704\u2013708)","Wad\u014d (708\u2013715)","Reiki (715\u2013717)","Y\u014dr\u014d (717\u2013724)","Jinki (724\u2013729)","Tenpy\u014d (729\u2013749)","Tenpy\u014d-kamp\u014d (749-749)","Tenpy\u014d-sh\u014dh\u014d (749-757)","Tenpy\u014d-h\u014dji (757-765)","Tenpy\u014d-jingo (765-767)","Jingo-keiun (767-770)","H\u014dki (770\u2013780)","Ten-\u014d (781-782)","Enryaku (782\u2013806)","Daid\u014d (806\u2013810)","K\u014dnin (810\u2013824)","Tench\u014d (824\u2013834)","J\u014dwa (834\u2013848)","Kaj\u014d (848\u2013851)","Ninju (851\u2013854)","Saik\u014d (854\u2013857)","Ten-an (857-859)","J\u014dgan (859\u2013877)","Gangy\u014d (877\u2013885)","Ninna (885\u2013889)","Kanpy\u014d (889\u2013898)","Sh\u014dtai (898\u2013901)","Engi (901\u2013923)","Ench\u014d (923\u2013931)","J\u014dhei (931\u2013938)","Tengy\u014d (938\u2013947)","Tenryaku (947\u2013957)","Tentoku (957\u2013961)","\u014cwa (961\u2013964)","K\u014dh\u014d (964\u2013968)","Anna (968\u2013970)","Tenroku (970\u2013973)","Ten\u2019en (973\u2013976)","J\u014dgen (976\u2013978)","Tengen (978\u2013983)","Eikan (983\u2013985)","Kanna (985\u2013987)","Eien (987\u2013989)","Eiso (989\u2013990)","Sh\u014dryaku (990\u2013995)","Ch\u014dtoku (995\u2013999)","Ch\u014dh\u014d (999\u20131004)","Kank\u014d (1004\u20131012)","Ch\u014dwa (1012\u20131017)","Kannin (1017\u20131021)","Jian (1021\u20131024)","Manju (1024\u20131028)","Ch\u014dgen (1028\u20131037)","Ch\u014dryaku (1037\u20131040)","Ch\u014dky\u016b (1040\u20131044)","Kantoku (1044\u20131046)","Eish\u014d (1046\u20131053)","Tengi (1053\u20131058)","K\u014dhei (1058\u20131065)","Jiryaku (1065\u20131069)","Enky\u016b (1069\u20131074)","Sh\u014dho (1074\u20131077)","Sh\u014dryaku (1077\u20131081)","Eih\u014d (1081\u20131084)","\u014ctoku (1084\u20131087)","Kanji (1087\u20131094)","Kah\u014d (1094\u20131096)","Eich\u014d (1096\u20131097)","J\u014dtoku (1097\u20131099)","K\u014dwa (1099\u20131104)","Ch\u014dji (1104\u20131106)","Kash\u014d (1106\u20131108)","Tennin (1108\u20131110)","Ten-ei (1110-1113)","Eiky\u016b (1113\u20131118)","Gen\u2019ei (1118\u20131120)","H\u014dan (1120\u20131124)","Tenji (1124\u20131126)","Daiji (1126\u20131131)","Tensh\u014d (1131\u20131132)","Ch\u014dsh\u014d (1132\u20131135)","H\u014den (1135\u20131141)","Eiji (1141\u20131142)","K\u014dji (1142\u20131144)","Ten\u2019y\u014d (1144\u20131145)","Ky\u016ban (1145\u20131151)","Ninpei (1151\u20131154)","Ky\u016bju (1154\u20131156)","H\u014dgen (1156\u20131159)","Heiji (1159\u20131160)","Eiryaku (1160\u20131161)","\u014cho (1161\u20131163)","Ch\u014dkan (1163\u20131165)","Eiman (1165\u20131166)","Nin\u2019an (1166\u20131169)","Ka\u014d (1169\u20131171)","Sh\u014dan (1171\u20131175)","Angen (1175\u20131177)","Jish\u014d (1177\u20131181)","Y\u014dwa (1181\u20131182)","Juei (1182\u20131184)","Genryaku (1184\u20131185)","Bunji (1185\u20131190)","Kenky\u016b (1190\u20131199)","Sh\u014dji (1199\u20131201)","Kennin (1201\u20131204)","Genky\u016b (1204\u20131206)","Ken\u2019ei (1206\u20131207)","J\u014dgen (1207\u20131211)","Kenryaku (1211\u20131213)","Kenp\u014d (1213\u20131219)","J\u014dky\u016b (1219\u20131222)","J\u014d\u014d (1222\u20131224)","Gennin (1224\u20131225)","Karoku (1225\u20131227)","Antei (1227\u20131229)","Kanki (1229\u20131232)","J\u014dei (1232\u20131233)","Tenpuku (1233\u20131234)","Bunryaku (1234\u20131235)","Katei (1235\u20131238)","Ryakunin (1238\u20131239)","En\u2019\u014d (1239\u20131240)","Ninji (1240\u20131243)","Kangen (1243\u20131247)","H\u014dji (1247\u20131249)","Kench\u014d (1249\u20131256)","K\u014dgen (1256\u20131257)","Sh\u014dka (1257\u20131259)","Sh\u014dgen (1259\u20131260)","Bun\u2019\u014d (1260\u20131261)","K\u014dch\u014d (1261\u20131264)","Bun\u2019ei (1264\u20131275)","Kenji (1275\u20131278)","K\u014dan (1278\u20131288)","Sh\u014d\u014d (1288\u20131293)","Einin (1293\u20131299)","Sh\u014dan (1299\u20131302)","Kengen (1302\u20131303)","Kagen (1303\u20131306)","Tokuji (1306\u20131308)","Enky\u014d (1308\u20131311)","\u014cch\u014d (1311\u20131312)","Sh\u014dwa (1312\u20131317)","Bunp\u014d (1317\u20131319)","Gen\u014d (1319\u20131321)","Genk\u014d (1321\u20131324)","Sh\u014dch\u016b (1324\u20131326)","Karyaku (1326\u20131329)","Gentoku (1329\u20131331)","Genk\u014d (1331\u20131334)","Kenmu (1334\u20131336)","Engen (1336\u20131340)","K\u014dkoku (1340\u20131346)","Sh\u014dhei (1346\u20131370)","Kentoku (1370\u20131372)","Bunch\u016b (1372\u20131375)","Tenju (1375\u20131379)","K\u014dryaku (1379\u20131381)","K\u014dwa (1381\u20131384)","Gench\u016b (1384\u20131392)","Meitoku (1384\u20131387)","Kakei (1387\u20131389)","K\u014d\u014d (1389\u20131390)","Meitoku (1390\u20131394)","\u014cei (1394\u20131428)","Sh\u014dch\u014d (1428\u20131429)","Eiky\u014d (1429\u20131441)","Kakitsu (1441\u20131444)","Bun\u2019an (1444\u20131449)","H\u014dtoku (1449\u20131452)","Ky\u014dtoku (1452\u20131455)","K\u014dsh\u014d (1455\u20131457)","Ch\u014droku (1457\u20131460)","Kansh\u014d (1460\u20131466)","Bunsh\u014d (1466\u20131467)","\u014cnin (1467\u20131469)","Bunmei (1469\u20131487)","Ch\u014dky\u014d (1487\u20131489)","Entoku (1489\u20131492)","Mei\u014d (1492\u20131501)","Bunki (1501\u20131504)","Eish\u014d (1504\u20131521)","Taiei (1521\u20131528)","Ky\u014droku (1528\u20131532)","Tenbun (1532\u20131555)","K\u014dji (1555\u20131558)","Eiroku (1558\u20131570)","Genki (1570\u20131573)","Tensh\u014d (1573\u20131592)","Bunroku (1592\u20131596)","Keich\u014d (1596\u20131615)","Genna (1615\u20131624)","Kan\u2019ei (1624\u20131644)","Sh\u014dho (1644\u20131648)","Keian (1648\u20131652)","J\u014d\u014d (1652\u20131655)","Meireki (1655\u20131658)","Manji (1658\u20131661)","Kanbun (1661\u20131673)","Enp\u014d (1673\u20131681)","Tenna (1681\u20131684)","J\u014dky\u014d (1684\u20131688)","Genroku (1688\u20131704)","H\u014dei (1704\u20131711)","Sh\u014dtoku (1711\u20131716)","Ky\u014dh\u014d (1716\u20131736)","Genbun (1736\u20131741)","Kanp\u014d (1741\u20131744)","Enky\u014d (1744\u20131748)","Kan\u2019en (1748\u20131751)","H\u014dreki (1751\u20131764)","Meiwa (1764\u20131772)","An\u2019ei (1772\u20131781)","Tenmei (1781\u20131789)","Kansei (1789\u20131801)","Ky\u014dwa (1801\u20131804)","Bunka (1804\u20131818)","Bunsei (1818\u20131830)","Tenp\u014d (1830\u20131844)","K\u014dka (1844\u20131848)","Kaei (1848\u20131854)","Ansei (1854\u20131860)","Man\u2019en (1860\u20131861)","Bunky\u016b (1861\u20131864)","Genji (1864\u20131865)","Kei\u014d (1865\u20131868)","M","T","S","H"],short:["Taika (645\u2013650)","Hakuchi (650\u2013671)","Hakuh\u014d (672\u2013686)","Shuch\u014d (686\u2013701)","Taih\u014d (701\u2013704)","Keiun (704\u2013708)","Wad\u014d (708\u2013715)","Reiki (715\u2013717)","Y\u014dr\u014d (717\u2013724)","Jinki (724\u2013729)","Tenpy\u014d (729\u2013749)","Tenpy\u014d-kamp\u014d (749-749)","Tenpy\u014d-sh\u014dh\u014d (749-757)","Tenpy\u014d-h\u014dji (757-765)","Tenpy\u014d-jingo (765-767)","Jingo-keiun (767-770)","H\u014dki (770\u2013780)","Ten-\u014d (781-782)","Enryaku (782\u2013806)","Daid\u014d (806\u2013810)","K\u014dnin (810\u2013824)","Tench\u014d (824\u2013834)","J\u014dwa (834\u2013848)","Kaj\u014d (848\u2013851)","Ninju (851\u2013854)","Saik\u014d (854\u2013857)","Ten-an (857-859)","J\u014dgan (859\u2013877)","Gangy\u014d (877\u2013885)","Ninna (885\u2013889)","Kanpy\u014d (889\u2013898)","Sh\u014dtai (898\u2013901)","Engi (901\u2013923)","Ench\u014d (923\u2013931)","J\u014dhei (931\u2013938)","Tengy\u014d (938\u2013947)","Tenryaku (947\u2013957)","Tentoku (957\u2013961)","\u014cwa (961\u2013964)","K\u014dh\u014d (964\u2013968)","Anna (968\u2013970)","Tenroku (970\u2013973)","Ten\u2019en (973\u2013976)","J\u014dgen (976\u2013978)","Tengen (978\u2013983)","Eikan (983\u2013985)","Kanna (985\u2013987)","Eien (987\u2013989)","Eiso (989\u2013990)","Sh\u014dryaku (990\u2013995)","Ch\u014dtoku (995\u2013999)","Ch\u014dh\u014d (999\u20131004)","Kank\u014d (1004\u20131012)","Ch\u014dwa (1012\u20131017)","Kannin (1017\u20131021)","Jian (1021\u20131024)","Manju (1024\u20131028)","Ch\u014dgen (1028\u20131037)","Ch\u014dryaku (1037\u20131040)","Ch\u014dky\u016b (1040\u20131044)","Kantoku (1044\u20131046)","Eish\u014d (1046\u20131053)","Tengi (1053\u20131058)","K\u014dhei (1058\u20131065)","Jiryaku (1065\u20131069)","Enky\u016b (1069\u20131074)","Sh\u014dho (1074\u20131077)","Sh\u014dryaku (1077\u20131081)","Eih\u014d (1081\u20131084)","\u014ctoku (1084\u20131087)","Kanji (1087\u20131094)","Kah\u014d (1094\u20131096)","Eich\u014d (1096\u20131097)","J\u014dtoku (1097\u20131099)","K\u014dwa (1099\u20131104)","Ch\u014dji (1104\u20131106)","Kash\u014d (1106\u20131108)","Tennin (1108\u20131110)","Ten-ei (1110-1113)","Eiky\u016b (1113\u20131118)","Gen\u2019ei (1118\u20131120)","H\u014dan (1120\u20131124)","Tenji (1124\u20131126)","Daiji (1126\u20131131)","Tensh\u014d (1131\u20131132)","Ch\u014dsh\u014d (1132\u20131135)","H\u014den (1135\u20131141)","Eiji (1141\u20131142)","K\u014dji (1142\u20131144)","Ten\u2019y\u014d (1144\u20131145)","Ky\u016ban (1145\u20131151)","Ninpei (1151\u20131154)","Ky\u016bju (1154\u20131156)","H\u014dgen (1156\u20131159)","Heiji (1159\u20131160)","Eiryaku (1160\u20131161)","\u014cho (1161\u20131163)","Ch\u014dkan (1163\u20131165)","Eiman (1165\u20131166)","Nin\u2019an (1166\u20131169)","Ka\u014d (1169\u20131171)","Sh\u014dan (1171\u20131175)","Angen (1175\u20131177)","Jish\u014d (1177\u20131181)","Y\u014dwa (1181\u20131182)","Juei (1182\u20131184)","Genryaku (1184\u20131185)","Bunji (1185\u20131190)","Kenky\u016b (1190\u20131199)","Sh\u014dji (1199\u20131201)","Kennin (1201\u20131204)","Genky\u016b (1204\u20131206)","Ken\u2019ei (1206\u20131207)","J\u014dgen (1207\u20131211)","Kenryaku (1211\u20131213)","Kenp\u014d (1213\u20131219)","J\u014dky\u016b (1219\u20131222)","J\u014d\u014d (1222\u20131224)","Gennin (1224\u20131225)","Karoku (1225\u20131227)","Antei (1227\u20131229)","Kanki (1229\u20131232)","J\u014dei (1232\u20131233)","Tenpuku (1233\u20131234)","Bunryaku (1234\u20131235)","Katei (1235\u20131238)","Ryakunin (1238\u20131239)","En\u2019\u014d (1239\u20131240)","Ninji (1240\u20131243)","Kangen (1243\u20131247)","H\u014dji (1247\u20131249)","Kench\u014d (1249\u20131256)","K\u014dgen (1256\u20131257)","Sh\u014dka (1257\u20131259)","Sh\u014dgen (1259\u20131260)","Bun\u2019\u014d (1260\u20131261)","K\u014dch\u014d (1261\u20131264)","Bun\u2019ei (1264\u20131275)","Kenji (1275\u20131278)","K\u014dan (1278\u20131288)","Sh\u014d\u014d (1288\u20131293)","Einin (1293\u20131299)","Sh\u014dan (1299\u20131302)","Kengen (1302\u20131303)","Kagen (1303\u20131306)","Tokuji (1306\u20131308)","Enky\u014d (1308\u20131311)","\u014cch\u014d (1311\u20131312)","Sh\u014dwa (1312\u20131317)","Bunp\u014d (1317\u20131319)","Gen\u014d (1319\u20131321)","Genk\u014d (1321\u20131324)","Sh\u014dch\u016b (1324\u20131326)","Karyaku (1326\u20131329)","Gentoku (1329\u20131331)","Genk\u014d (1331\u20131334)","Kenmu (1334\u20131336)","Engen (1336\u20131340)","K\u014dkoku (1340\u20131346)","Sh\u014dhei (1346\u20131370)","Kentoku (1370\u20131372)","Bunch\u016b (1372\u20131375)","Tenju (1375\u20131379)","K\u014dryaku (1379\u20131381)","K\u014dwa (1381\u20131384)","Gench\u016b (1384\u20131392)","Meitoku (1384\u20131387)","Kakei (1387\u20131389)","K\u014d\u014d (1389\u20131390)","Meitoku (1390\u20131394)","\u014cei (1394\u20131428)","Sh\u014dch\u014d (1428\u20131429)","Eiky\u014d (1429\u20131441)","Kakitsu (1441\u20131444)","Bun\u2019an (1444\u20131449)","H\u014dtoku (1449\u20131452)","Ky\u014dtoku (1452\u20131455)","K\u014dsh\u014d (1455\u20131457)","Ch\u014droku (1457\u20131460)","Kansh\u014d (1460\u20131466)","Bunsh\u014d (1466\u20131467)","\u014cnin (1467\u20131469)","Bunmei (1469\u20131487)","Ch\u014dky\u014d (1487\u20131489)","Entoku (1489\u20131492)","Mei\u014d (1492\u20131501)","Bunki (1501\u20131504)","Eish\u014d (1504\u20131521)","Taiei (1521\u20131528)","Ky\u014droku (1528\u20131532)","Tenbun (1532\u20131555)","K\u014dji (1555\u20131558)","Eiroku (1558\u20131570)","Genki (1570\u20131573)","Tensh\u014d (1573\u20131592)","Bunroku (1592\u20131596)","Keich\u014d (1596\u20131615)","Genna (1615\u20131624)","Kan\u2019ei (1624\u20131644)","Sh\u014dho (1644\u20131648)","Keian (1648\u20131652)","J\u014d\u014d (1652\u20131655)","Meireki (1655\u20131658)","Manji (1658\u20131661)","Kanbun (1661\u20131673)","Enp\u014d (1673\u20131681)","Tenna (1681\u20131684)","J\u014dky\u014d (1684\u20131688)","Genroku (1688\u20131704)","H\u014dei (1704\u20131711)","Sh\u014dtoku (1711\u20131716)","Ky\u014dh\u014d (1716\u20131736)","Genbun (1736\u20131741)","Kanp\u014d (1741\u20131744)","Enky\u014d (1744\u20131748)","Kan\u2019en (1748\u20131751)","H\u014dreki (1751\u20131764)","Meiwa (1764\u20131772)","An\u2019ei (1772\u20131781)","Tenmei (1781\u20131789)","Kansei (1789\u20131801)","Ky\u014dwa (1801\u20131804)","Bunka (1804\u20131818)","Bunsei (1818\u20131830)","Tenp\u014d (1830\u20131844)","K\u014dka (1844\u20131848)","Kaei (1848\u20131854)","Ansei (1854\u20131860)","Man\u2019en (1860\u20131861)","Bunky\u016b (1861\u20131864)","Genji (1864\u20131865)","Kei\u014d (1865\u20131868)","Meiji","Taish\u014d","Sh\u014dwa","Heisei"],long:["Taika (645\u2013650)","Hakuchi (650\u2013671)","Hakuh\u014d (672\u2013686)","Shuch\u014d (686\u2013701)","Taih\u014d (701\u2013704)","Keiun (704\u2013708)","Wad\u014d (708\u2013715)","Reiki (715\u2013717)","Y\u014dr\u014d (717\u2013724)","Jinki (724\u2013729)","Tenpy\u014d (729\u2013749)","Tenpy\u014d-kamp\u014d (749-749)","Tenpy\u014d-sh\u014dh\u014d (749-757)","Tenpy\u014d-h\u014dji (757-765)","Tenpy\u014d-jingo (765-767)","Jingo-keiun (767-770)","H\u014dki (770\u2013780)","Ten-\u014d (781-782)","Enryaku (782\u2013806)","Daid\u014d (806\u2013810)","K\u014dnin (810\u2013824)","Tench\u014d (824\u2013834)","J\u014dwa (834\u2013848)","Kaj\u014d (848\u2013851)","Ninju (851\u2013854)","Saik\u014d (854\u2013857)","Ten-an (857-859)","J\u014dgan (859\u2013877)","Gangy\u014d (877\u2013885)","Ninna (885\u2013889)","Kanpy\u014d (889\u2013898)","Sh\u014dtai (898\u2013901)","Engi (901\u2013923)","Ench\u014d (923\u2013931)","J\u014dhei (931\u2013938)","Tengy\u014d (938\u2013947)","Tenryaku (947\u2013957)","Tentoku (957\u2013961)","\u014cwa (961\u2013964)","K\u014dh\u014d (964\u2013968)","Anna (968\u2013970)","Tenroku (970\u2013973)","Ten\u2019en (973\u2013976)","J\u014dgen (976\u2013978)","Tengen (978\u2013983)","Eikan (983\u2013985)","Kanna (985\u2013987)","Eien (987\u2013989)","Eiso (989\u2013990)","Sh\u014dryaku (990\u2013995)","Ch\u014dtoku (995\u2013999)","Ch\u014dh\u014d (999\u20131004)","Kank\u014d (1004\u20131012)","Ch\u014dwa (1012\u20131017)","Kannin (1017\u20131021)","Jian (1021\u20131024)","Manju (1024\u20131028)","Ch\u014dgen (1028\u20131037)","Ch\u014dryaku (1037\u20131040)","Ch\u014dky\u016b (1040\u20131044)","Kantoku (1044\u20131046)","Eish\u014d (1046\u20131053)","Tengi (1053\u20131058)","K\u014dhei (1058\u20131065)","Jiryaku (1065\u20131069)","Enky\u016b (1069\u20131074)","Sh\u014dho (1074\u20131077)","Sh\u014dryaku (1077\u20131081)","Eih\u014d (1081\u20131084)","\u014ctoku (1084\u20131087)","Kanji (1087\u20131094)","Kah\u014d (1094\u20131096)","Eich\u014d (1096\u20131097)","J\u014dtoku (1097\u20131099)","K\u014dwa (1099\u20131104)","Ch\u014dji (1104\u20131106)","Kash\u014d (1106\u20131108)","Tennin (1108\u20131110)","Ten-ei (1110-1113)","Eiky\u016b (1113\u20131118)","Gen\u2019ei (1118\u20131120)","H\u014dan (1120\u20131124)","Tenji (1124\u20131126)","Daiji (1126\u20131131)","Tensh\u014d (1131\u20131132)","Ch\u014dsh\u014d (1132\u20131135)","H\u014den (1135\u20131141)","Eiji (1141\u20131142)","K\u014dji (1142\u20131144)","Ten\u2019y\u014d (1144\u20131145)","Ky\u016ban (1145\u20131151)","Ninpei (1151\u20131154)","Ky\u016bju (1154\u20131156)","H\u014dgen (1156\u20131159)","Heiji (1159\u20131160)","Eiryaku (1160\u20131161)","\u014cho (1161\u20131163)","Ch\u014dkan (1163\u20131165)","Eiman (1165\u20131166)","Nin\u2019an (1166\u20131169)","Ka\u014d (1169\u20131171)","Sh\u014dan (1171\u20131175)","Angen (1175\u20131177)","Jish\u014d (1177\u20131181)","Y\u014dwa (1181\u20131182)","Juei (1182\u20131184)","Genryaku (1184\u20131185)","Bunji (1185\u20131190)","Kenky\u016b (1190\u20131199)","Sh\u014dji (1199\u20131201)","Kennin (1201\u20131204)","Genky\u016b (1204\u20131206)","Ken\u2019ei (1206\u20131207)","J\u014dgen (1207\u20131211)","Kenryaku (1211\u20131213)","Kenp\u014d (1213\u20131219)","J\u014dky\u016b (1219\u20131222)","J\u014d\u014d (1222\u20131224)","Gennin (1224\u20131225)","Karoku (1225\u20131227)","Antei (1227\u20131229)","Kanki (1229\u20131232)","J\u014dei (1232\u20131233)","Tenpuku (1233\u20131234)","Bunryaku (1234\u20131235)","Katei (1235\u20131238)","Ryakunin (1238\u20131239)","En\u2019\u014d (1239\u20131240)","Ninji (1240\u20131243)","Kangen (1243\u20131247)","H\u014dji (1247\u20131249)","Kench\u014d (1249\u20131256)","K\u014dgen (1256\u20131257)","Sh\u014dka (1257\u20131259)","Sh\u014dgen (1259\u20131260)","Bun\u2019\u014d (1260\u20131261)","K\u014dch\u014d (1261\u20131264)","Bun\u2019ei (1264\u20131275)","Kenji (1275\u20131278)","K\u014dan (1278\u20131288)","Sh\u014d\u014d (1288\u20131293)","Einin (1293\u20131299)","Sh\u014dan (1299\u20131302)","Kengen (1302\u20131303)","Kagen (1303\u20131306)","Tokuji (1306\u20131308)","Enky\u014d (1308\u20131311)","\u014cch\u014d (1311\u20131312)","Sh\u014dwa (1312\u20131317)","Bunp\u014d (1317\u20131319)","Gen\u014d (1319\u20131321)","Genk\u014d (1321\u20131324)","Sh\u014dch\u016b (1324\u20131326)","Karyaku (1326\u20131329)","Gentoku (1329\u20131331)","Genk\u014d (1331\u20131334)","Kenmu (1334\u20131336)","Engen (1336\u20131340)","K\u014dkoku (1340\u20131346)","Sh\u014dhei (1346\u20131370)","Kentoku (1370\u20131372)","Bunch\u016b (1372\u20131375)","Tenju (1375\u20131379)","K\u014dryaku (1379\u20131381)","K\u014dwa (1381\u20131384)","Gench\u016b (1384\u20131392)","Meitoku (1384\u20131387)","Kakei (1387\u20131389)","K\u014d\u014d (1389\u20131390)","Meitoku (1390\u20131394)","\u014cei (1394\u20131428)","Sh\u014dch\u014d (1428\u20131429)","Eiky\u014d (1429\u20131441)","Kakitsu (1441\u20131444)","Bun\u2019an (1444\u20131449)","H\u014dtoku (1449\u20131452)","Ky\u014dtoku (1452\u20131455)","K\u014dsh\u014d (1455\u20131457)","Ch\u014droku (1457\u20131460)","Kansh\u014d (1460\u20131466)","Bunsh\u014d (1466\u20131467)","\u014cnin (1467\u20131469)","Bunmei (1469\u20131487)","Ch\u014dky\u014d (1487\u20131489)","Entoku (1489\u20131492)","Mei\u014d (1492\u20131501)","Bunki (1501\u20131504)","Eish\u014d (1504\u20131521)","Taiei (1521\u20131528)","Ky\u014droku (1528\u20131532)","Tenbun (1532\u20131555)","K\u014dji (1555\u20131558)","Eiroku (1558\u20131570)","Genki (1570\u20131573)","Tensh\u014d (1573\u20131592)","Bunroku (1592\u20131596)","Keich\u014d (1596\u20131615)","Genna (1615\u20131624)","Kan\u2019ei (1624\u20131644)","Sh\u014dho (1644\u20131648)","Keian (1648\u20131652)","J\u014d\u014d (1652\u20131655)","Meireki (1655\u20131658)","Manji (1658\u20131661)","Kanbun (1661\u20131673)","Enp\u014d (1673\u20131681)","Tenna (1681\u20131684)","J\u014dky\u014d (1684\u20131688)","Genroku (1688\u20131704)","H\u014dei (1704\u20131711)","Sh\u014dtoku (1711\u20131716)","Ky\u014dh\u014d (1716\u20131736)","Genbun (1736\u20131741)","Kanp\u014d (1741\u20131744)","Enky\u014d (1744\u20131748)","Kan\u2019en (1748\u20131751)","H\u014dreki (1751\u20131764)","Meiwa (1764\u20131772)","An\u2019ei (1772\u20131781)","Tenmei (1781\u20131789)","Kansei (1789\u20131801)","Ky\u014dwa (1801\u20131804)","Bunka (1804\u20131818)","Bunsei (1818\u20131830)","Tenp\u014d (1830\u20131844)","K\u014dka (1844\u20131848)","Kaei (1848\u20131854)","Ansei (1854\u20131860)","Man\u2019en (1860\u20131861)","Bunky\u016b (1861\u20131864)","Genji (1864\u20131865)","Kei\u014d (1865\u20131868)","Meiji","Taish\u014d","Sh\u014dwa","Heisei"]},dayPeriods:{am:"AM",pm:"PM"}},persian:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],short:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],long:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["AP"],short:["AP"],long:["AP"]},dayPeriods:{am:"AM",pm:"PM"}},roc:{months:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],long:["January","February","March","April","May","June","July","August","September","October","November","December"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["Before R.O.C.","Minguo"],short:["Before R.O.C.","Minguo"],long:["Before R.O.C.","Minguo"]},dayPeriods:{am:"AM",pm:"PM"}}}},number:{nu:["latn"],patterns:{decimal:{positivePattern:"{number}",negativePattern:"{minusSign}{number}"},currency:{positivePattern:"{currency}{number}",negativePattern:"{minusSign}{currency}{number}"},percent:{positivePattern:"{number}{percentSign}",negativePattern:"{minusSign}{number}{percentSign}"}},symbols:{latn:{decimal:".",group:",",nan:"NaN",plusSign:"+",minusSign:"-",percentSign:"%",infinity:"\u221e"}},currencies:{AUD:"A$",BRL:"R$",CAD:"CA$",CNY:"CN\xa5",EUR:"\u20ac",GBP:"\xa3",HKD:"HK$",ILS:"\u20aa",INR:"\u20b9",JPY:"\xa5",KRW:"\u20a9",MXN:"MX$",NZD:"NZ$",TWD:"NT$",USD:"$",VND:"\u20ab",XAF:"FCFA",XCD:"EC$",XOF:"CFA",XPF:"CFPF"}}})},85521:e=>{"use strict";e.exports=function(e,t,r,n,a,o,i,l){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[r,n,a,o,i,l],c=0;(u=new Error(t.replace(/%s/g,(function(){return s[c++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},42583:(e,t,r)=>{"use strict";var n=r(94538)(),a=r(35586)("Object.prototype.toString"),o=function(e){return!(n&&e&&"object"===typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===a(e)},i=function(e){return!!o(e)||null!==e&&"object"===typeof e&&"number"===typeof e.length&&e.length>=0&&"[object Array]"!==a(e)&&"[object Function]"===a(e.callee)},l=function(){return o(arguments)}();o.isLegacyArguments=i,e.exports=l?o:i},6595:(e,t,r)=>{"use strict";var n=Date.prototype.getDay,a=Object.prototype.toString,o=r(94538)();e.exports=function(e){return"object"===typeof e&&null!==e&&(o?function(e){try{return n.call(e),!0}catch(t){return!1}}(e):"[object Date]"===a.call(e))}},20476:e=>{e.exports=function(e){if(!e)return!1;var r=t.call(e);return"[object Function]"===r||"function"===typeof e&&"[object RegExp]"!==r||"undefined"!==typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var t=Object.prototype.toString},15981:(e,t,r)=>{"use strict";var n,a,o,i,l=r(35586),u=r(94538)();if(u){n=l("Object.prototype.hasOwnProperty"),a=l("RegExp.prototype.exec"),o={};var s=function(){throw o};i={toString:s,valueOf:s},"symbol"===typeof Symbol.toPrimitive&&(i[Symbol.toPrimitive]=s)}var c=l("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;e.exports=u?function(e){if(!e||"object"!==typeof e)return!1;var t=f(e,"lastIndex");if(!(t&&n(t,"value")))return!1;try{a(e,i)}catch(r){return r===o}}:function(e){return!(!e||"object"!==typeof e&&"function"!==typeof e)&&"[object RegExp]"===c(e)}},76856:(e,t,r)=>{"use strict";var n=Object.prototype.toString;if(r(19418)()){var a=Symbol.prototype.toString,o=/^Symbol\(.*\)$/;e.exports=function(e){if("symbol"===typeof e)return!0;if("[object Symbol]"!==n.call(e))return!1;try{return function(e){return"symbol"===typeof e.valueOf()&&o.test(a.call(e))}(e)}catch(t){return!1}}}else e.exports=function(e){return!1}},5299:(e,t,r)=>{"use strict";var n=r(41292),a=r(73253);Object.keys(n).forEach((function(e){"default"===e||Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})})),Object.keys(a).forEach((function(e){"default"===e||Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}))},73253:(e,t,r)=>{"use strict";var n=r(21939),a=r(41292),o=n.createContext(void 0),i=function(e){var t=n.useContext(o);return(null==e?void 0:e.store)||t||a.getDefaultStore()},l=function(e){return"function"===typeof(null==e?void 0:e.then)},u=n.use||function(e){if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((function(t){e.status="fulfilled",e.value=t}),(function(t){e.status="rejected",e.reason=t})),e)};function s(e,t){var r=i(t),a=n.useReducer((function(t){var n=r.get(e);return Object.is(t[0],n)&&t[1]===r&&t[2]===e?t:[n,r,e]}),void 0,(function(){return[r.get(e),r,e]})),o=a[0],s=o[0],c=o[1],f=o[2],d=a[1],p=s;c===r&&f===e||(d(),p=r.get(e));var h=null==t?void 0:t.delay;return n.useEffect((function(){var t=r.sub(e,(function(){"number"!==typeof h?d():setTimeout(d,h)}));return d(),t}),[r,e,h]),n.useDebugValue(p),l(p)?u(p):p}function c(e,t){var r=i(t),a=n.useCallback((function(){for(var t=arguments.length,n=new Array(t),a=0;a{"use strict";var r=0;var n,a=function(e){return"init"in e},o=function(e){return!!e.write},i=new WeakMap,l=function(e,t){var r=i.get(e);r&&(i.delete(e),r(t))},u=function(e,t){e.status="fulfilled",e.value=t},s=function(e,t){e.status="rejected",e.reason=t},c=function(e,t){return"v"in e&&"v"in t&&Object.is(e.v,t.v)},f=function(e,t){return"e"in e&&"e"in t&&Object.is(e.e,t.e)},d=function(e){return"v"in e&&e.v instanceof Promise},p=function(e){if("e"in e)throw e.e;return e.v},h=function(){var e=new WeakMap,t=new WeakMap,r=new Map;var n=function(t){return e.get(t)},h=function(t,n){var a=e.get(t);if(e.set(t,n),r.has(t)||r.set(t,a),a&&d(a)){var o="v"in n?n.v instanceof Promise?n.v:Promise.resolve(n.v):Promise.reject(n.e);l(a.v,o)}},m=function(e,t,r){var n=new Map,a=!1;r.forEach((function(r,o){r||o!==e||(r=t),r&&(n.set(o,r),t.d.get(o)!==r&&(a=!0))})),(a||t.d.size!==n.size)&&(t.d=n)},v=function(e,t,r){var a,o,i=n(e),l={d:(null==i?void 0:i.d)||new Map,v:t};if(r&&m(e,l,r),i&&c(i,l)&&i.d===l.d)return i;if(i&&d(i)&&d(l)&&(o=l,"v"in(a=i)&&"v"in o&&a.v.orig&&a.v.orig===o.v.orig)){if(i.d===l.d)return i;l.v=i.v}return h(e,l),l},g=function(e,r,a,o){if("function"===typeof(null==(f=r)?void 0:f.then)){var l,c=new Promise((function(o,i){var f=!1;r.then((function(r){if(!f){f=!0;var i=n(e),l=v(e,c,a);u(c,r),o(r),t.has(e)&&(null==i?void 0:i.d)!==l.d&&S(e,l,null==i?void 0:i.d)}}),(function(r){if(!f){f=!0;var o=n(e),l=v(e,c,a);s(c,r),i(r),t.has(e)&&(null==o?void 0:o.d)!==l.d&&S(e,l,null==o?void 0:o.d)}})),l=function(e){f||(f=!0,e.then((function(e){return u(c,e)}),(function(e){return s(c,e)})),o(e))}}));return c.orig=r,c.status="pending",function(e,t){i.set(e,t),e.catch((function(){})).finally((function(){return i.delete(e)}))}(c,(function(e){e&&l(e),null==o||o()})),v(e,c,a)}var f;return v(e,r,a)},y=function e(r,i){var l=n(r);if(!i&&l){if(t.has(r))return l;if(Array.from(l.d).every((function(t){var n=t[0],a=t[1];return n===r||e(n)===a})))return l}var u,s,c=new Map,d=!0,v={get signal(){return u||(u=new AbortController),u.signal},get setSelf(){return!s&&o(r)&&(s=function(){if(!d){for(var e=arguments.length,t=new Array(e),n=0;n1?l-1:0),s=1;s1?s-1:0),d=1;d1?t-1:0),n=1;n{var n=r(91244)(r(15674),"DataView");e.exports=n},37577:(e,t,r)=>{var n=r(35597),a=r(51376),o=r(89412),i=r(76554),l=r(21767);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(253),a=r(9043),o=r(73312),i=r(63134),l=r(23693);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(91244)(r(15674),"Map");e.exports=n},26975:(e,t,r)=>{var n=r(94623),a=r(35640),o=r(88998),i=r(5366),l=r(68523);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(91244)(r(15674),"Promise");e.exports=n},56266:(e,t,r)=>{var n=r(91244)(r(15674),"Set");e.exports=n},73793:(e,t,r)=>{var n=r(26975),a=r(12089),o=r(85333);function i(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t{var n=r(70355),a=r(89155),o=r(80064),i=r(57140),l=r(21633),u=r(93792);function s(e){var t=this.__data__=new n(e);this.size=t.size}s.prototype.clear=a,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=l,s.prototype.set=u,e.exports=s},11176:(e,t,r)=>{var n=r(15674).Symbol;e.exports=n},64662:(e,t,r)=>{var n=r(15674).Uint8Array;e.exports=n},44758:(e,t,r)=>{var n=r(91244)(r(15674),"WeakMap");e.exports=n},84625:e=>{e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},19157:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,a=0,o=[];++r{var n=r(89037),a=r(29871),o=r(29559),i=r(74874),l=r(58802),u=r(94126),s=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=o(e),c=!r&&a(e),f=!r&&!c&&i(e),d=!r&&!c&&!f&&u(e),p=r||c||f||d,h=p?n(e.length,String):[],m=h.length;for(var v in e)!t&&!s.call(e,v)||p&&("length"==v||f&&("offset"==v||"parent"==v)||d&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||l(v,m))||h.push(v);return h}},5585:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,a=Array(n);++r{e.exports=function(e,t){for(var r=-1,n=t.length,a=e.length;++r{e.exports=function(e,t,r,n){var a=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++a]);++a{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r{e.exports=function(e){return e.split("")}},96142:e=>{var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},63768:(e,t,r)=>{var n=r(90274),a=r(57100),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var i=e[t];o.call(e,t)&&a(i,r)&&(void 0!==r||t in e)||n(e,t,r)}},34667:(e,t,r)=>{var n=r(57100);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},90274:(e,t,r)=>{var n=r(75519);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},91173:(e,t,r)=>{var n=r(28905),a=r(56698);e.exports=function e(t,r,o,i,l){var u=-1,s=t.length;for(o||(o=a),l||(l=[]);++u0&&o(c)?r>1?e(c,r-1,o,i,l):n(l,c):i||(l[l.length]=c)}return l}},3959:(e,t,r)=>{var n=r(72884)();e.exports=n},32674:(e,t,r)=>{var n=r(3959),a=r(10767);e.exports=function(e,t){return e&&n(e,t,a)}},55749:(e,t,r)=>{var n=r(78667),a=r(13938);e.exports=function(e,t){for(var r=0,o=(t=n(t,e)).length;null!=e&&r{var n=r(28905),a=r(29559);e.exports=function(e,t,r){var o=t(e);return a(e)?o:n(o,r(e))}},41040:(e,t,r)=>{var n=r(11176),a=r(119),o=r(91278),i=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?a(e):o(e)}},37992:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},14287:(e,t,r)=>{var n=r(41040),a=r(52806);e.exports=function(e){return a(e)&&"[object Arguments]"==n(e)}},82354:(e,t,r)=>{var n=r(68841),a=r(52806);e.exports=function e(t,r,o,i,l){return t===r||(null==t||null==r||!a(t)&&!a(r)?t!==t&&r!==r:n(t,r,o,i,e,l))}},68841:(e,t,r)=>{var n=r(52792),a=r(38917),o=r(48733),i=r(58051),l=r(49471),u=r(29559),s=r(74874),c=r(94126),f="[object Arguments]",d="[object Array]",p="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,m,v,g){var y=u(e),b=u(t),w=y?d:l(e),k=b?d:l(t),_=(w=w==f?p:w)==p,O=(k=k==f?p:k)==p,S=w==k;if(S&&s(e)){if(!s(t))return!1;y=!0,_=!1}if(S&&!_)return g||(g=new n),y||c(e)?a(e,t,r,m,v,g):o(e,t,w,r,m,v,g);if(!(1&r)){var E=_&&h.call(e,"__wrapped__"),x=O&&h.call(t,"__wrapped__");if(E||x){var P=E?e.value():e,A=x?t.value():t;return g||(g=new n),v(P,A,r,m,g)}}return!!S&&(g||(g=new n),i(e,t,r,m,v,g))}},98798:(e,t,r)=>{var n=r(52792),a=r(82354);e.exports=function(e,t,r,o){var i=r.length,l=i,u=!o;if(null==e)return!l;for(e=Object(e);i--;){var s=r[i];if(u&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i{var n=r(69351),a=r(63246),o=r(55661),i=r(8415),l=/^\[object .+?Constructor\]$/,u=Function.prototype,s=Object.prototype,c=u.toString,f=s.hasOwnProperty,d=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||a(e))&&(n(e)?d:l).test(i(e))}},72859:(e,t,r)=>{var n=r(41040),a=r(89597),o=r(52806),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&a(e.length)&&!!i[n(e)]}},55569:(e,t,r)=>{var n=r(61500),a=r(41211),o=r(73282),i=r(29559),l=r(91703);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?i(e)?a(e[0],e[1]):n(e):l(e)}},11500:(e,t,r)=>{var n=r(56333),a=r(83722),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return a(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}},91626:(e,t,r)=>{var n=r(55661),a=r(56333),o=r(34298),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=a(e),r=[];for(var l in e)("constructor"!=l||!t&&i.call(e,l))&&r.push(l);return r}},61500:(e,t,r)=>{var n=r(98798),a=r(9573),o=r(99378);e.exports=function(e){var t=a(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}},41211:(e,t,r)=>{var n=r(82354),a=r(26421),o=r(41209),i=r(61855),l=r(94549),u=r(99378),s=r(13938);e.exports=function(e,t){return i(e)&&l(t)?u(s(e),t):function(r){var i=a(r,e);return void 0===i&&i===t?o(r,e):n(t,i,3)}}},93231:(e,t,r)=>{var n=r(72516),a=r(41209);e.exports=function(e,t){return n(e,t,(function(t,r){return a(e,r)}))}},72516:(e,t,r)=>{var n=r(55749),a=r(32458),o=r(78667);e.exports=function(e,t,r){for(var i=-1,l=t.length,u={};++i{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},69040:(e,t,r)=>{var n=r(55749);e.exports=function(e){return function(t){return n(t,e)}}},71822:e=>{e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},32458:(e,t,r)=>{var n=r(63768),a=r(78667),o=r(58802),i=r(55661),l=r(13938);e.exports=function(e,t,r,u){if(!i(e))return e;for(var s=-1,c=(t=a(t,e)).length,f=c-1,d=e;null!=d&&++s{var n=r(70277),a=r(75519),o=r(73282),i=a?function(e,t){return a(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:o;e.exports=i},54405:e=>{e.exports=function(e,t,r){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(r=r>a?a:r)<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(a);++n{e.exports=function(e,t){for(var r=-1,n=Array(e);++r{var n=r(11176),a=r(5585),o=r(29559),i=r(76236),l=n?n.prototype:void 0,u=l?l.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return a(t,e)+"";if(i(t))return u?u.call(t):"";var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r}},78552:(e,t,r)=>{var n=r(10981),a=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(a,""):e}},93030:e=>{e.exports=function(e){return function(t){return e(t)}}},17346:e=>{e.exports=function(e,t){return e.has(t)}},78667:(e,t,r)=>{var n=r(29559),a=r(61855),o=r(13629),i=r(20761);e.exports=function(e,t){return n(e)?e:a(e,t)?[e]:o(i(e))}},80230:(e,t,r)=>{var n=r(54405);e.exports=function(e,t,r){var a=e.length;return r=void 0===r?a:r,!t&&r>=a?e:n(e,t,r)}},9244:(e,t,r)=>{var n=r(15674)["__core-js_shared__"];e.exports=n},72884:e=>{e.exports=function(e){return function(t,r,n){for(var a=-1,o=Object(t),i=n(t),l=i.length;l--;){var u=i[e?l:++a];if(!1===r(o[u],u,o))break}return t}}},58387:(e,t,r)=>{var n=r(80230),a=r(59429),o=r(84619),i=r(20761);e.exports=function(e){return function(t){t=i(t);var r=a(t)?o(t):void 0,l=r?r[0]:t.charAt(0),u=r?n(r,1).join(""):t.slice(1);return l[e]()+u}}},6316:(e,t,r)=>{var n=r(31533),a=r(66271),o=r(9339),i=RegExp("['\u2019]","g");e.exports=function(e){return function(t){return n(o(a(t).replace(i,"")),e,"")}}},22067:(e,t,r)=>{var n=r(71822)({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"});e.exports=n},75519:(e,t,r)=>{var n=r(91244),a=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=a},38917:(e,t,r)=>{var n=r(73793),a=r(8830),o=r(17346);e.exports=function(e,t,r,i,l,u){var s=1&r,c=e.length,f=t.length;if(c!=f&&!(s&&f>c))return!1;var d=u.get(e),p=u.get(t);if(d&&p)return d==t&&p==e;var h=-1,m=!0,v=2&r?new n:void 0;for(u.set(e,t),u.set(t,e);++h{var n=r(11176),a=r(64662),o=r(57100),i=r(38917),l=r(7896),u=r(64529),s=n?n.prototype:void 0,c=s?s.valueOf:void 0;e.exports=function(e,t,r,n,s,f,d){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new a(e),new a(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=l;case"[object Set]":var h=1&n;if(p||(p=u),e.size!=t.size&&!h)return!1;var m=d.get(e);if(m)return m==t;n|=2,d.set(e,t);var v=i(p(e),p(t),n,s,f,d);return d.delete(e),v;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},58051:(e,t,r)=>{var n=r(71852),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,o,i,l){var u=1&r,s=n(e),c=s.length;if(c!=n(t).length&&!u)return!1;for(var f=c;f--;){var d=s[f];if(!(u?d in t:a.call(t,d)))return!1}var p=l.get(e),h=l.get(t);if(p&&h)return p==t&&h==e;var m=!0;l.set(e,t),l.set(t,e);for(var v=u;++f{var n=r(37183),a=r(32708),o=r(49284);e.exports=function(e){return o(a(e,void 0,n),e+"")}},21812:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},71852:(e,t,r)=>{var n=r(55681),a=r(26374),o=r(10767);e.exports=function(e){return n(e,o,a)}},27759:(e,t,r)=>{var n=r(55681),a=r(34695),o=r(17400);e.exports=function(e){return n(e,o,a)}},22930:(e,t,r)=>{var n=r(59980);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},9573:(e,t,r)=>{var n=r(94549),a=r(10767);e.exports=function(e){for(var t=a(e),r=t.length;r--;){var o=t[r],i=e[o];t[r]=[o,i,n(i)]}return t}},91244:(e,t,r)=>{var n=r(88555),a=r(6081);e.exports=function(e,t){var r=a(e,t);return n(r)?r:void 0}},45396:(e,t,r)=>{var n=r(38624)(Object.getPrototypeOf,Object);e.exports=n},119:(e,t,r)=>{var n=r(11176),a=Object.prototype,o=a.hasOwnProperty,i=a.toString,l=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,l),r=e[l];try{e[l]=void 0;var n=!0}catch(u){}var a=i.call(e);return n&&(t?e[l]=r:delete e[l]),a}},26374:(e,t,r)=>{var n=r(19157),a=r(95641),o=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols,l=i?function(e){return null==e?[]:(e=Object(e),n(i(e),(function(t){return o.call(e,t)})))}:a;e.exports=l},34695:(e,t,r)=>{var n=r(28905),a=r(45396),o=r(26374),i=r(95641),l=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,o(e)),e=a(e);return t}:i;e.exports=l},49471:(e,t,r)=>{var n=r(37960),a=r(21550),o=r(15680),i=r(56266),l=r(44758),u=r(41040),s=r(8415),c="[object Map]",f="[object Promise]",d="[object Set]",p="[object WeakMap]",h="[object DataView]",m=s(n),v=s(a),g=s(o),y=s(i),b=s(l),w=u;(n&&w(new n(new ArrayBuffer(1)))!=h||a&&w(new a)!=c||o&&w(o.resolve())!=f||i&&w(new i)!=d||l&&w(new l)!=p)&&(w=function(e){var t=u(e),r="[object Object]"==t?e.constructor:void 0,n=r?s(r):"";if(n)switch(n){case m:return h;case v:return c;case g:return f;case y:return d;case b:return p}return t}),e.exports=w},6081:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},63124:(e,t,r)=>{var n=r(78667),a=r(29871),o=r(29559),i=r(58802),l=r(89597),u=r(13938);e.exports=function(e,t,r){for(var s=-1,c=(t=n(t,e)).length,f=!1;++s{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},495:e=>{var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},35597:(e,t,r)=>{var n=r(41868);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},51376:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},89412:(e,t,r)=>{var n=r(41868),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return a.call(t,e)?t[e]:void 0}},76554:(e,t,r)=>{var n=r(41868),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:a.call(t,e)}},21767:(e,t,r)=>{var n=r(41868);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},56698:(e,t,r)=>{var n=r(11176),a=r(29871),o=r(29559),i=n?n.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||a(e)||!!(i&&e&&e[i])}},58802:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e{var n=r(29559),a=r(76236),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!a(e))||(i.test(e)||!o.test(e)||null!=t&&e in Object(t))}},59980:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},63246:(e,t,r)=>{var n=r(9244),a=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!a&&a in e}},56333:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},94549:(e,t,r)=>{var n=r(55661);e.exports=function(e){return e===e&&!n(e)}},253:e=>{e.exports=function(){this.__data__=[],this.size=0}},9043:(e,t,r)=>{var n=r(34667),a=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():a.call(t,r,1),--this.size,!0)}},73312:(e,t,r)=>{var n=r(34667);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},63134:(e,t,r)=>{var n=r(34667);e.exports=function(e){return n(this.__data__,e)>-1}},23693:(e,t,r)=>{var n=r(34667);e.exports=function(e,t){var r=this.__data__,a=n(r,e);return a<0?(++this.size,r.push([e,t])):r[a][1]=t,this}},94623:(e,t,r)=>{var n=r(37577),a=r(70355),o=r(21550);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||a),string:new n}}},35640:(e,t,r)=>{var n=r(22930);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},88998:(e,t,r)=>{var n=r(22930);e.exports=function(e){return n(this,e).get(e)}},5366:(e,t,r)=>{var n=r(22930);e.exports=function(e){return n(this,e).has(e)}},68523:(e,t,r)=>{var n=r(22930);e.exports=function(e,t){var r=n(this,e),a=r.size;return r.set(e,t),this.size+=r.size==a?0:1,this}},7896:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}},99378:e=>{e.exports=function(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}},11300:(e,t,r)=>{var n=r(33721);e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},41868:(e,t,r)=>{var n=r(91244)(Object,"create");e.exports=n},83722:(e,t,r)=>{var n=r(38624)(Object.keys,Object);e.exports=n},34298:e=>{e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},29862:(e,t,r)=>{e=r.nmd(e);var n=r(21812),a=t&&!t.nodeType&&t,o=a&&e&&!e.nodeType&&e,i=o&&o.exports===a&&n.process,l=function(){try{var e=o&&o.require&&o.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(t){}}();e.exports=l},91278:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},38624:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},32708:(e,t,r)=>{var n=r(84625),a=Math.max;e.exports=function(e,t,r){return t=a(void 0===t?e.length-1:t,0),function(){for(var o=arguments,i=-1,l=a(o.length-t,0),u=Array(l);++i{var n=r(21812),a="object"==typeof self&&self&&self.Object===Object&&self,o=n||a||Function("return this")();e.exports=o},12089:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},85333:e=>{e.exports=function(e){return this.__data__.has(e)}},64529:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},49284:(e,t,r)=>{var n=r(46762),a=r(96471)(n);e.exports=a},96471:e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var a=t(),o=16-(a-n);if(n=a,o>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},89155:(e,t,r)=>{var n=r(70355);e.exports=function(){this.__data__=new n,this.size=0}},80064:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},57140:e=>{e.exports=function(e){return this.__data__.get(e)}},21633:e=>{e.exports=function(e){return this.__data__.has(e)}},93792:(e,t,r)=>{var n=r(70355),a=r(21550),o=r(26975);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var i=r.__data__;if(!a||i.length<199)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new o(i)}return r.set(e,t),this.size=r.size,this}},84619:(e,t,r)=>{var n=r(20798),a=r(59429),o=r(3774);e.exports=function(e){return a(e)?o(e):n(e)}},13629:(e,t,r)=>{var n=r(11300),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,i=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(a,(function(e,r,n,a){t.push(n?a.replace(o,"$1"):r||e)})),t}));e.exports=i},13938:(e,t,r)=>{var n=r(76236);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}},8415:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(r){}try{return e+""}catch(r){}}return""}},10981:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},3774:e=>{var t="\\ud800-\\udfff",r="["+t+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",a="\\ud83c[\\udffb-\\udfff]",o="[^"+t+"]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",l="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+n+"|"+a+")"+"?",s="[\\ufe0e\\ufe0f]?",c=s+u+("(?:\\u200d(?:"+[o,i,l].join("|")+")"+s+u+")*"),f="(?:"+[o+n+"?",n,i,l,r].join("|")+")",d=RegExp(a+"(?="+a+")|"+f+c,"g");e.exports=function(e){return e.match(d)||[]}},76280:e=>{var t="\\ud800-\\udfff",r="\\u2700-\\u27bf",n="a-z\\xdf-\\xf6\\xf8-\\xff",a="A-Z\\xc0-\\xd6\\xd8-\\xde",o="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",i="["+o+"]",l="\\d+",u="["+r+"]",s="["+n+"]",c="[^"+t+o+l+r+n+a+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",d="[\\ud800-\\udbff][\\udc00-\\udfff]",p="["+a+"]",h="(?:"+s+"|"+c+")",m="(?:"+p+"|"+c+")",v="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",g="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",y="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",b="[\\ufe0e\\ufe0f]?",w=b+y+("(?:\\u200d(?:"+["[^"+t+"]",f,d].join("|")+")"+b+y+")*"),k="(?:"+[u,f,d].join("|")+")"+w,_=RegExp([p+"?"+s+"+"+v+"(?="+[i,p,"$"].join("|")+")",m+"+"+g+"(?="+[i,p+h,"$"].join("|")+")",p+"?"+h+"+"+v,p+"+"+g,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",l,k].join("|"),"g");e.exports=function(e){return e.match(_)||[]}},70277:e=>{e.exports=function(e){return function(){return e}}},23193:(e,t,r)=>{var n=r(55661),a=r(66555),o=r(62533),i=Math.max,l=Math.min;e.exports=function(e,t,r){var u,s,c,f,d,p,h=0,m=!1,v=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var r=u,n=s;return u=s=void 0,h=t,f=e.apply(n,r)}function b(e){var r=e-p;return void 0===p||r>=t||r<0||v&&e-h>=c}function w(){var e=a();if(b(e))return k(e);d=setTimeout(w,function(e){var r=t-(e-p);return v?l(r,c-(e-h)):r}(e))}function k(e){return d=void 0,g&&u?y(e):(u=s=void 0,f)}function _(){var e=a(),r=b(e);if(u=arguments,s=this,p=e,r){if(void 0===d)return function(e){return h=e,d=setTimeout(w,t),m?y(e):f}(p);if(v)return clearTimeout(d),d=setTimeout(w,t),y(p)}return void 0===d&&(d=setTimeout(w,t)),f}return t=o(t)||0,n(r)&&(m=!!r.leading,c=(v="maxWait"in r)?i(o(r.maxWait)||0,t):c,g="trailing"in r?!!r.trailing:g),_.cancel=function(){void 0!==d&&clearTimeout(d),h=0,u=p=s=d=void 0},_.flush=function(){return void 0===d?f:k(a())},_}},66271:(e,t,r)=>{var n=r(22067),a=r(20761),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=a(e))&&e.replace(o,n).replace(i,"")}},57100:e=>{e.exports=function(e,t){return e===t||e!==e&&t!==t}},37183:(e,t,r)=>{var n=r(91173);e.exports=function(e){return(null==e?0:e.length)?n(e,1):[]}},26421:(e,t,r)=>{var n=r(55749);e.exports=function(e,t,r){var a=null==e?void 0:n(e,t);return void 0===a?r:a}},41209:(e,t,r)=>{var n=r(37992),a=r(63124);e.exports=function(e,t){return null!=e&&a(e,t,n)}},73282:e=>{e.exports=function(e){return e}},29871:(e,t,r)=>{var n=r(14287),a=r(52806),o=Object.prototype,i=o.hasOwnProperty,l=o.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return a(e)&&i.call(e,"callee")&&!l.call(e,"callee")};e.exports=u},29559:e=>{var t=Array.isArray;e.exports=t},20048:(e,t,r)=>{var n=r(69351),a=r(89597);e.exports=function(e){return null!=e&&a(e.length)&&!n(e)}},74874:(e,t,r)=>{e=r.nmd(e);var n=r(15674),a=r(35058),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,l=i&&i.exports===o?n.Buffer:void 0,u=(l?l.isBuffer:void 0)||a;e.exports=u},38322:(e,t,r)=>{var n=r(82354);e.exports=function(e,t){return n(e,t)}},69351:(e,t,r)=>{var n=r(41040),a=r(55661);e.exports=function(e){if(!a(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},89597:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},55661:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},52806:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},5302:(e,t,r)=>{var n=r(41040),a=r(45396),o=r(52806),i=Function.prototype,l=Object.prototype,u=i.toString,s=l.hasOwnProperty,c=u.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=n(e))return!1;var t=a(e);if(null===t)return!0;var r=s.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&u.call(r)==c}},76236:(e,t,r)=>{var n=r(41040),a=r(52806);e.exports=function(e){return"symbol"==typeof e||a(e)&&"[object Symbol]"==n(e)}},94126:(e,t,r)=>{var n=r(72859),a=r(93030),o=r(29862),i=o&&o.isTypedArray,l=i?a(i):n;e.exports=l},10767:(e,t,r)=>{var n=r(78491),a=r(11500),o=r(20048);e.exports=function(e){return o(e)?n(e):a(e)}},17400:(e,t,r)=>{var n=r(78491),a=r(91626),o=r(20048);e.exports=function(e){return o(e)?n(e,!0):a(e)}},67224:(e,t,r)=>{var n=r(90274),a=r(32674),o=r(55569);e.exports=function(e,t){var r={};return t=o(t,3),a(e,(function(e,a,o){n(r,a,t(e,a,o))})),r}},33721:(e,t,r)=>{var n=r(26975);function a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function r(){var n=arguments,a=t?t.apply(this,n):n[0],o=r.cache;if(o.has(a))return o.get(a);var i=e.apply(this,n);return r.cache=o.set(a,i)||o,i};return r.cache=new(a.Cache||n),r}a.Cache=n,e.exports=a},66555:(e,t,r)=>{var n=r(15674);e.exports=function(){return n.Date.now()}},62132:(e,t,r)=>{var n=r(93231),a=r(78772)((function(e,t){return null==e?{}:n(e,t)}));e.exports=a},50619:(e,t,r)=>{var n=r(5585),a=r(55569),o=r(72516),i=r(27759);e.exports=function(e,t){if(null==e)return{};var r=n(i(e),(function(e){return[e]}));return t=a(t),o(e,r,(function(e,r){return t(e,r[0])}))}},91703:(e,t,r)=>{var n=r(7526),a=r(69040),o=r(61855),i=r(13938);e.exports=function(e){return o(e)?n(i(e)):a(e)}},14535:(e,t,r)=>{var n=r(6316),a=r(90556),o=n((function(e,t,r){return e+(r?" ":"")+a(t)}));e.exports=o},95641:e=>{e.exports=function(){return[]}},35058:e=>{e.exports=function(){return!1}},62533:(e,t,r)=>{var n=r(78552),a=r(55661),o=r(76236),i=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,u=/^0o[0-7]+$/i,s=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(a(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=l.test(e);return r||u.test(e)?s(e.slice(2),r?2:8):i.test(e)?NaN:+e}},20761:(e,t,r)=>{var n=r(47944);e.exports=function(e){return null==e?"":n(e)}},90556:(e,t,r)=>{var n=r(58387)("toUpperCase");e.exports=n},9339:(e,t,r)=>{var n=r(96142),a=r(495),o=r(20761),i=r(76280);e.exports=function(e,t,r){return e=o(e),void 0===(t=r?void 0:t)?a(e)?i(e):n(e):e.match(t)||[]}},77859:e=>{e.exports=function e(t,r,n){function a(i,l){if(!r[i]){if(!t[i]){if(o)return o(i,!0);var u=new Error("Cannot find module '"+i+"'");throw u.code="MODULE_NOT_FOUND",u}var s=r[i]={exports:{}};t[i][0].call(s.exports,(function(e){var r=t[i][1][e];return a(r||e)}),s,s.exports,e,t,r,n)}return r[i].exports}for(var o=void 0,i=0;i=0?(this.lastItem=this.list[t],this.list[t].val):void 0},n.prototype.set=function(e,t){var r;return this.lastItem&&this.isEqual(this.lastItem.key,e)?(this.lastItem.val=t,this):(r=this.indexOf(e))>=0?(this.lastItem=this.list[r],this.list[r].val=t,this):(this.lastItem={key:e,val:t},this.list.push(this.lastItem),this.size++,this)},n.prototype.delete=function(e){var t;if(this.lastItem&&this.isEqual(this.lastItem.key,e)&&(this.lastItem=void 0),(t=this.indexOf(e))>=0)return this.size--,this.list.splice(t,1)[0]},n.prototype.has=function(e){var t;return!(!this.lastItem||!this.isEqual(this.lastItem.key,e))||(t=this.indexOf(e))>=0&&(this.lastItem=this.list[t],!0)},n.prototype.forEach=function(e,t){var r;for(r=0;r=0&&(!(t=(a=e[r]).cacheItem.get(a.arg))||!t.size);r--)a.cacheItem.delete(a.arg)}function i(e,t){return e===t||e!==e&&t!==t}t.exports=function(e){var t=new n(!1),r=[];return function(i){var l=function l(){var u,s,c,f=t,d=arguments.length-1,p=Array(d+1),h=!0;if((l.numArgs||0===l.numArgs)&&l.numArgs!==d+1)throw new Error("Memoizerific functions should always be called with the same number of arguments");for(c=0;c0&&(p[d]={cacheItem:f,arg:arguments[d]},h?a(r,p):r.push(p),r.length>e&&o(r.shift())),l.wasMemoized=h,l.numArgs=d+1,s};return l.limit=e,l.wasMemoized=!1,l.cache=t,l.lru=r,l}}},{"map-or-similar":1}]},{},[3])(3)},77556:function(e,t,r){"use strict";var n=r(52462),a=Object.prototype.hasOwnProperty,o=Object.propertyIsEnumerable,i=function(e,t,r){return Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})},l=this,u={concatArrays:!1,ignoreUndefined:!1},s=function(e){var t=[];for(var r in e)a.call(e,r)&&t.push(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(var i of n)o.call(e,i)&&t.push(i)}return t};function c(e){return Array.isArray(e)?function(e){var t=e.slice(0,0);return s(e).forEach((function(r){i(t,r,c(e[r]))})),t}(e):n(e)?function(e){var t=null===Object.getPrototypeOf(e)?Object.create(null):{};return s(e).forEach((function(r){i(t,r,c(e[r]))})),t}(e):e}var f=function(e,t,r,n){return r.forEach((function(r){"undefined"===typeof t[r]&&n.ignoreUndefined||(r in e&&e[r]!==Object.getPrototypeOf(e)?i(e,r,p(e[r],t[r],n)):i(e,r,c(t[r])))})),e},d=function(e,t,r){var n=e.slice(0,0),o=0;return[e,t].forEach((function(t){for(var l=[],u=0;u{"use strict";e.exports=function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}},3164:e=>{"use strict";function t(e,t){if(null!=e)return e;var r=new Error(void 0!==t?t:"Got unexpected "+e);throw r.framesToPop=1,r}e.exports=t,e.exports.default=t,Object.defineProperty(e.exports,"__esModule",{value:!0})},4267:(e,t,r)=>{var n="function"===typeof Map&&Map.prototype,a=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=n&&a&&"function"===typeof a.get?a.get:null,i=n&&Map.prototype.forEach,l="function"===typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&l?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,s=l&&u&&"function"===typeof u.get?u.get:null,c=l&&Set.prototype.forEach,f="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,m=Object.prototype.toString,v=Function.prototype.toString,g=String.prototype.match,y=String.prototype.slice,b=String.prototype.replace,w=String.prototype.toUpperCase,k=String.prototype.toLowerCase,_=RegExp.prototype.test,O=Array.prototype.concat,S=Array.prototype.join,E=Array.prototype.slice,x=Math.floor,P="function"===typeof BigInt?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,T="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,j="function"===typeof Symbol&&"object"===typeof Symbol.iterator,C="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===j||"symbol")?Symbol.toStringTag:null,R=Object.prototype.propertyIsEnumerable,M=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function I(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||_.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"===typeof e){var n=e<0?-x(-e):x(e);if(n!==e){var a=String(n),o=y.call(t,a.length+1);return b.call(a,r,"$&_")+"."+b.call(b.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,r,"$&_")}var D=r(24654),N=D.custom,F=z(N)?N:null;function V(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function L(e){return b.call(String(e),/"/g,""")}function H(e){return"[object Array]"===G(e)&&(!C||!("object"===typeof e&&C in e))}function B(e){return"[object RegExp]"===G(e)&&(!C||!("object"===typeof e&&C in e))}function z(e){if(j)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!T)return!1;try{return T.call(e),!0}catch(t){}return!1}e.exports=function e(t,r,n,a){var l=r||{};if(U(l,"quoteStyle")&&"single"!==l.quoteStyle&&"double"!==l.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(U(l,"maxStringLength")&&("number"===typeof l.maxStringLength?l.maxStringLength<0&&l.maxStringLength!==1/0:null!==l.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!U(l,"customInspect")||l.customInspect;if("boolean"!==typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(U(l,"indent")&&null!==l.indent&&"\t"!==l.indent&&!(parseInt(l.indent,10)===l.indent&&l.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(U(l,"numericSeparator")&&"boolean"!==typeof l.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var m=l.numericSeparator;if("undefined"===typeof t)return"undefined";if(null===t)return"null";if("boolean"===typeof t)return t?"true":"false";if("string"===typeof t)return Y(t,l);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var w=String(t);return m?I(t,w):w}if("bigint"===typeof t){var _=String(t)+"n";return m?I(t,_):_}var x="undefined"===typeof l.depth?5:l.depth;if("undefined"===typeof n&&(n=0),n>=x&&x>0&&"object"===typeof t)return H(t)?"[Array]":"[Object]";var A=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;r=S.call(Array(e.indent+1)," ")}return{base:r,prev:S.call(Array(t+1),r)}}(l,n);if("undefined"===typeof a)a=[];else if(q(a,t)>=0)return"[Circular]";function N(t,r,o){if(r&&(a=E.call(a)).push(r),o){var i={depth:l.depth};return U(l,"quoteStyle")&&(i.quoteStyle=l.quoteStyle),e(t,i,n+1,a)}return e(t,l,n+1,a)}if("function"===typeof t&&!B(t)){var W=function(e){if(e.name)return e.name;var t=g.call(v.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),X=Z(t,N);return"[Function"+(W?": "+W:" (anonymous)")+"]"+(X.length>0?" { "+S.call(X,", ")+" }":"")}if(z(t)){var ee=j?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):T.call(t);return"object"!==typeof t||j?ee:K(ee)}if(function(e){if(!e||"object"!==typeof e)return!1;if("undefined"!==typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"===typeof e.nodeName&&"function"===typeof e.getAttribute}(t)){for(var te="<"+k.call(String(t.nodeName)),re=t.attributes||[],ne=0;ne"}if(H(t)){if(0===t.length)return"[]";var ae=Z(t,N);return A&&!function(e){for(var t=0;t=0)return!1;return!0}(ae)?"["+Q(ae,A)+"]":"[ "+S.call(ae,", ")+" ]"}if(function(e){return"[object Error]"===G(e)&&(!C||!("object"===typeof e&&C in e))}(t)){var oe=Z(t,N);return"cause"in Error.prototype||!("cause"in t)||R.call(t,"cause")?0===oe.length?"["+String(t)+"]":"{ ["+String(t)+"] "+S.call(oe,", ")+" }":"{ ["+String(t)+"] "+S.call(O.call("[cause]: "+N(t.cause),oe),", ")+" }"}if("object"===typeof t&&u){if(F&&"function"===typeof t[F]&&D)return D(t,{depth:x-n});if("symbol"!==u&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!==typeof e)return!1;try{o.call(e);try{s.call(e)}catch(te){return!0}return e instanceof Map}catch(t){}return!1}(t)){var ie=[];return i&&i.call(t,(function(e,r){ie.push(N(r,t,!0)+" => "+N(e,t))})),J("Map",o.call(t),ie,A)}if(function(e){if(!s||!e||"object"!==typeof e)return!1;try{s.call(e);try{o.call(e)}catch(t){return!0}return e instanceof Set}catch(r){}return!1}(t)){var le=[];return c&&c.call(t,(function(e){le.push(N(e,t))})),J("Set",s.call(t),le,A)}if(function(e){if(!f||!e||"object"!==typeof e)return!1;try{f.call(e,f);try{d.call(e,d)}catch(te){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return $("WeakMap");if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{f.call(e,f)}catch(te){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return $("WeakSet");if(function(e){if(!p||!e||"object"!==typeof e)return!1;try{return p.call(e),!0}catch(t){}return!1}(t))return $("WeakRef");if(function(e){return"[object Number]"===G(e)&&(!C||!("object"===typeof e&&C in e))}(t))return K(N(Number(t)));if(function(e){if(!e||"object"!==typeof e||!P)return!1;try{return P.call(e),!0}catch(t){}return!1}(t))return K(N(P.call(t)));if(function(e){return"[object Boolean]"===G(e)&&(!C||!("object"===typeof e&&C in e))}(t))return K(h.call(t));if(function(e){return"[object String]"===G(e)&&(!C||!("object"===typeof e&&C in e))}(t))return K(N(String(t)));if(!function(e){return"[object Date]"===G(e)&&(!C||!("object"===typeof e&&C in e))}(t)&&!B(t)){var ue=Z(t,N),se=M?M(t)===Object.prototype:t instanceof Object||t.constructor===Object,ce=t instanceof Object?"":"null prototype",fe=!se&&C&&Object(t)===t&&C in t?y.call(G(t),8,-1):ce?"Object":"",de=(se||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||ce?"["+S.call(O.call([],fe||[],ce||[]),": ")+"] ":"");return 0===ue.length?de+"{}":A?de+"{"+Q(ue,A)+"}":de+"{ "+S.call(ue,", ")+" }"}return String(t)};var W=Object.prototype.hasOwnProperty||function(e){return e in this};function U(e,t){return W.call(e,t)}function G(e){return m.call(e)}function q(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;rt.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Y(y.call(e,0,t.maxStringLength),t)+n}return V(b.call(b.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,X),"single",t)}function X(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function K(e){return"Object("+e+")"}function $(e){return e+" { ? }"}function J(e,t,r,n){return e+" ("+t+") {"+(n?Q(r,n):S.call(r,", "))+"}"}function Q(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+S.call(e,","+r)+"\n"+t.prev}function Z(e,t){var r=H(e),n=[];if(r){n.length=e.length;for(var a=0;a{"use strict";var t=function(e){return e!==e};e.exports=function(e,r){return 0===e&&0===r?1/e===1/r:e===r||!(!t(e)||!t(r))}},52502:(e,t,r)=>{"use strict";var n=r(52938),a=r(26503),o=r(64917),i=r(99854),l=r(8687),u=a(i(),Object);n(u,{getPolyfill:i,implementation:o,shim:l}),e.exports=u},99854:(e,t,r)=>{"use strict";var n=r(64917);e.exports=function(){return"function"===typeof Object.is?Object.is:n}},8687:(e,t,r)=>{"use strict";var n=r(99854),a=r(52938);e.exports=function(){var e=n();return a(Object,{is:e},{is:function(){return Object.is!==e}}),e}},82628:(e,t,r)=>{"use strict";var n;if(!Object.keys){var a=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=r(66240),l=Object.prototype.propertyIsEnumerable,u=!l.call({toString:null},"toString"),s=l.call((function(){}),"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"===typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&a.call(window,e)&&null!==window[e]&&"object"===typeof window[e])try{f(window[e])}catch(t){return!0}}catch(t){return!0}return!1}();n=function(e){var t=null!==e&&"object"===typeof e,r="[object Function]"===o.call(e),n=i(e),l=t&&"[object String]"===o.call(e),d=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var h=s&&r;if(l&&e.length>0&&!a.call(e,0))for(var m=0;m0)for(var v=0;v{"use strict";var n=Array.prototype.slice,a=r(66240),o=Object.keys,i=o?function(e){return o(e)}:r(82628),l=Object.keys;i.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return a(e)?l(n.call(e)):l(e)})}else Object.keys=i;return Object.keys||i},e.exports=i},66240:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==e&&"object"===typeof e&&"number"===typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},28419:e=>{"use strict";function t(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var r,n="",a=0,o=-1,i=0,l=0;l<=e.length;++l){if(l2){var u=n.lastIndexOf("/");if(u!==n.length-1){-1===u?(n="",a=0):a=(n=n.slice(0,u)).length-1-n.lastIndexOf("/"),o=l,i=0;continue}}else if(2===n.length||1===n.length){n="",a=0,o=l,i=0;continue}t&&(n.length>0?n+="/..":n="..",a=2)}else n.length>0?n+="/"+e.slice(o+1,l):n=e.slice(o+1,l),a=l-o-1;o=l,i=0}else 46===r&&-1!==i?++i:i=-1}return n}var n={resolve:function(){for(var e,n="",a=!1,o=arguments.length-1;o>=-1&&!a;o--){var i;o>=0?i=arguments[o]:(void 0===e&&(e=process.cwd()),i=e),t(i),0!==i.length&&(n=i+"/"+n,a=47===i.charCodeAt(0))}return n=r(n,!a),a?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),a=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!n)).length||n||(e="."),e.length>0&&a&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,r=0;r0&&(void 0===e?e=a:e+="/"+a)}return void 0===e?".":n.normalize(e)},relative:function(e,r){if(t(e),t(r),e===r)return"";if((e=n.resolve(e))===(r=n.resolve(r)))return"";for(var a=1;as){if(47===r.charCodeAt(l+f))return r.slice(l+f+1);if(0===f)return r.slice(l+f)}else i>s&&(47===e.charCodeAt(a+f)?c=f:0===f&&(c=0));break}var d=e.charCodeAt(a+f);if(d!==r.charCodeAt(l+f))break;47===d&&(c=f)}var p="";for(f=a+c+1;f<=o;++f)f!==o&&47!==e.charCodeAt(f)||(0===p.length?p+="..":p+="/..");return p.length>0?p+r.slice(l+c):(l+=c,47===r.charCodeAt(l)&&++l,r.slice(l))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var r=e.charCodeAt(0),n=47===r,a=-1,o=!0,i=e.length-1;i>=1;--i)if(47===(r=e.charCodeAt(i))){if(!o){a=i;break}}else o=!1;return-1===a?n?"/":".":n&&1===a?"//":e.slice(0,a)},basename:function(e,r){if(void 0!==r&&"string"!==typeof r)throw new TypeError('"ext" argument must be a string');t(e);var n,a=0,o=-1,i=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var l=r.length-1,u=-1;for(n=e.length-1;n>=0;--n){var s=e.charCodeAt(n);if(47===s){if(!i){a=n+1;break}}else-1===u&&(i=!1,u=n+1),l>=0&&(s===r.charCodeAt(l)?-1===--l&&(o=n):(l=-1,o=u))}return a===o?o=u:-1===o&&(o=e.length),e.slice(a,o)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!i){a=n+1;break}}else-1===o&&(i=!1,o=n+1);return-1===o?"":e.slice(a,o)},extname:function(e){t(e);for(var r=-1,n=0,a=-1,o=!0,i=0,l=e.length-1;l>=0;--l){var u=e.charCodeAt(l);if(47!==u)-1===a&&(o=!1,a=l+1),46===u?-1===r?r=l:1!==i&&(i=1):-1!==r&&(i=-1);else if(!o){n=l+1;break}}return-1===r||-1===a||0===i||1===i&&r===a-1&&r===n+1?"":e.slice(r,a)},format:function(e){if(null===e||"object"!==typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+e+n:n}("/",e)},parse:function(e){t(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var n,a=e.charCodeAt(0),o=47===a;o?(r.root="/",n=1):n=0;for(var i=-1,l=0,u=-1,s=!0,c=e.length-1,f=0;c>=n;--c)if(47!==(a=e.charCodeAt(c)))-1===u&&(s=!1,u=c+1),46===a?-1===i?i=c:1!==f&&(f=1):-1!==i&&(f=-1);else if(!s){l=c+1;break}return-1===i||-1===u||0===f||1===f&&i===u-1&&i===l+1?-1!==u&&(r.base=r.name=0===l&&o?e.slice(1,u):e.slice(l,u)):(0===l&&o?(r.name=e.slice(1,i),r.base=e.slice(1,u)):(r.name=e.slice(l,i),r.base=e.slice(l,u)),r.ext=e.slice(i,u)),l>0?r.dir=e.slice(0,l-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n},49443:(e,t,r)=>{var n=r(50843),a=r(40641),o=r(8e4);function i(e){return this instanceof i?(this.nodes=n(e),this):new i(e)}i.prototype.toString=function(){return Array.isArray(this.nodes)?o(this.nodes):""},i.prototype.walk=function(e,t){return a(this.nodes,e,t),this},i.unit=r(4518),i.walk=a,i.stringify=o,e.exports=i},50843:e=>{var t="(".charCodeAt(0),r=")".charCodeAt(0),n="'".charCodeAt(0),a='"'.charCodeAt(0),o="\\".charCodeAt(0),i="/".charCodeAt(0),l=",".charCodeAt(0),u=":".charCodeAt(0),s="*".charCodeAt(0),c="u".charCodeAt(0),f="U".charCodeAt(0),d="+".charCodeAt(0),p=/^[a-f0-9?-]+$/i;e.exports=function(e){for(var h,m,v,g,y,b,w,k,_,O=[],S=e,E=0,x=S.charCodeAt(E),P=S.length,A=[{nodes:O}],T=0,j="",C="",R="";E{function t(e,t){var n,a,o=e.type,i=e.value;return t&&void 0!==(a=t(e))?a:"word"===o||"space"===o?i:"string"===o?(n=e.quote||"")+i+(e.unclosed?"":n):"comment"===o?"/*"+i+(e.unclosed?"":"*/"):"div"===o?(e.before||"")+i+(e.after||""):Array.isArray(e.nodes)?(n=r(e.nodes,t),"function"!==o?n:i+"("+(e.before||"")+n+(e.after||"")+(e.unclosed?"":")")):i}function r(e,r){var n,a;if(Array.isArray(e)){for(n="",a=e.length-1;~a;a-=1)n=t(e[a],r)+n;return n}return t(e,r)}e.exports=r},4518:e=>{var t="-".charCodeAt(0),r="+".charCodeAt(0),n=".".charCodeAt(0),a="e".charCodeAt(0),o="E".charCodeAt(0);e.exports=function(e){var i,l,u,s=0,c=e.length;if(0===c||!function(e){var a,o=e.charCodeAt(0);if(o===r||o===t){if((a=e.charCodeAt(1))>=48&&a<=57)return!0;var i=e.charCodeAt(2);return a===n&&i>=48&&i<=57}return o===n?(a=e.charCodeAt(1))>=48&&a<=57:o>=48&&o<=57}(e))return!1;for((i=e.charCodeAt(s))!==r&&i!==t||s++;s57);)s+=1;if(i=e.charCodeAt(s),l=e.charCodeAt(s+1),i===n&&l>=48&&l<=57)for(s+=2;s57);)s+=1;if(i=e.charCodeAt(s),l=e.charCodeAt(s+1),u=e.charCodeAt(s+2),(i===a||i===o)&&(l>=48&&l<=57||(l===r||l===t)&&u>=48&&u<=57))for(s+=l===r||l===t?3:2;s57);)s+=1;return{number:e.slice(0,s),unit:e.slice(s)}}},40641:e=>{e.exports=function e(t,r,n){var a,o,i,l;for(a=0,o=t.length;a{"use strict";var n=r(17838);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,r,a,o,i){if(i!==n){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return r.PropTypes=r,r}},40520:(e,t,r)=>{e.exports=r(30175)()},17838:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},14496:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC1738",a="RFC3986";e.exports={default:a,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:n,RFC3986:a}},56582:(e,t,r)=>{"use strict";var n=r(15779),a=r(66355),o=r(14496);e.exports={formats:o,parse:a,stringify:n}},66355:(e,t,r)=>{"use strict";var n=r(31046),a=Object.prototype.hasOwnProperty,o=Array.isArray,i={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},l=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},u=function(e,t){return e&&"string"===typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},s=function(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,l=r.depth>0&&/(\[[^[\]]*])/.exec(o),s=l?o.slice(0,l.index):o,c=[];if(s){if(!r.plainObjects&&a.call(Object.prototype,s)&&!r.allowPrototypes)return;c.push(s)}for(var f=0;r.depth>0&&null!==(l=i.exec(o))&&f=0;--o){var i,l=e[o];if("[]"===l&&r.parseArrays)i=[].concat(a);else{i=r.plainObjects?Object.create(null):{};var s="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,c=parseInt(s,10);r.parseArrays||""!==s?!isNaN(c)&&l!==s&&String(c)===s&&c>=0&&r.parseArrays&&c<=r.arrayLimit?(i=[])[c]=a:"__proto__"!==s&&(i[s]=a):i={0:a}}a=i}return a}(c,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return i;if(null!==e.decoder&&void 0!==e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?i.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?i.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:i.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:i.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:i.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:i.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:i.comma,decoder:"function"===typeof e.decoder?e.decoder:i.decoder,delimiter:"string"===typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:i.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:i.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:i.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:i.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:i.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return r.plainObjects?Object.create(null):{};for(var c="string"===typeof e?function(e,t){var r,s={__proto__:null},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,d=c.split(t.delimiter,f),p=-1,h=t.charset;if(t.charsetSentinel)for(r=0;r-1&&(v=o(v)?[v]:v),a.call(s,m)?s[m]=n.combine(s[m],v):s[m]=v}return s}(e,r):e,f=r.plainObjects?Object.create(null):{},d=Object.keys(c),p=0;p{"use strict";var n=r(91710),a=r(31046),o=r(14496),i=Object.prototype.hasOwnProperty,l={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,s=Array.prototype.push,c=function(e,t){s.apply(e,u(t)?t:[t])},f=Date.prototype.toISOString,d=o.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:a.encode,encodeValuesOnly:!1,format:d,formatter:o.formatters[d],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},h={},m=function e(t,r,o,i,l,s,f,d,m,v,g,y,b,w,k,_){for(var O,S=t,E=_,x=0,P=!1;void 0!==(E=E.get(h))&&!P;){var A=E.get(t);if(x+=1,"undefined"!==typeof A){if(A===x)throw new RangeError("Cyclic object value");P=!0}"undefined"===typeof E.get(h)&&(x=0)}if("function"===typeof d?S=d(r,S):S instanceof Date?S=g(S):"comma"===o&&u(S)&&(S=a.maybeMap(S,(function(e){return e instanceof Date?g(e):e}))),null===S){if(l)return f&&!w?f(r,p.encoder,k,"key",y):r;S=""}if("string"===typeof(O=S)||"number"===typeof O||"boolean"===typeof O||"symbol"===typeof O||"bigint"===typeof O||a.isBuffer(S))return f?[b(w?r:f(r,p.encoder,k,"key",y))+"="+b(f(S,p.encoder,k,"value",y))]:[b(r)+"="+b(String(S))];var T,j=[];if("undefined"===typeof S)return j;if("comma"===o&&u(S))w&&f&&(S=a.maybeMap(S,f)),T=[{value:S.length>0?S.join(",")||null:void 0}];else if(u(d))T=d;else{var C=Object.keys(S);T=m?C.sort(m):C}for(var R=i&&u(S)&&1===S.length?r+"[]":r,M=0;M0?k+w:""}},31046:(e,t,r)=>{"use strict";var n=r(14496),a=Object.prototype.hasOwnProperty,o=Array.isArray,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),l=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n1;){var t=e.pop(),r=t.obj[t.prop];if(o(r)){for(var n=[],a=0;a=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===n.RFC1738&&(40===c||41===c)?u+=l.charAt(s):c<128?u+=i[c]:c<2048?u+=i[192|c>>6]+i[128|63&c]:c<55296||c>=57344?u+=i[224|c>>12]+i[128|c>>6&63]+i[128|63&c]:(s+=1,c=65536+((1023&c)<<10|1023&l.charCodeAt(s)),u+=i[240|c>>18]+i[128|c>>12&63]+i[128|c>>6&63]+i[128|63&c])}return u},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var r=[],n=0;n{"use strict";var r=Object.prototype.hasOwnProperty;function n(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return null}}function a(e){try{return encodeURIComponent(e)}catch(t){return null}}t.stringify=function(e,t){t=t||"";var n,o,i=[];for(o in"string"!==typeof t&&(t="?"),e)if(r.call(e,o)){if((n=e[o])||null!==n&&undefined!==n&&!isNaN(n)||(n=""),o=a(o),n=a(n),null===o||null===n)continue;i.push(o+"="+n)}return i.length?t+i.join("&"):""},t.parse=function(e){for(var t,r=/([^=?#&]+)=?([^&]*)/g,a={};t=r.exec(e);){var o=n(t[1]),i=n(t[2]);null===o||null===i||o in a||(a[o]=i)}return a}},3769:(e,t,r)=>{"use strict";var n=r(21939),a=r(68701);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r = readonly [\n () => A,\n React.ProviderExoticComponent>,\n];\n\n// create context with no upfront defaultValue\n// without having to do undefined check all the time\nfunction createCtx(): CreateCtx {\n const ctx = React.createContext(undefined);\n\n function useCtx(): A {\n const c = React.useContext(ctx);\n\n if (!c) {\n throw new Error('useTheme must be inside a ThemeProvider');\n }\n\n return c;\n }\n\n return [useCtx, ctx.Provider] as const;\n}\n\nexport default createCtx;\n","export * from './ThemeProvider';\nexport {DoobooTheme, DoobooThemeParams, ThemeType, dark, light} from './colors';\n","import {useEffect, useState} from 'react';\nimport type {ColorSchemeName} from 'react-native';\nimport {useColorScheme} from 'react-native';\n\nfunction useDebounce(value: T, delay?: number): T {\n const [debouncedValue, setDebouncedValue] = useState(value);\n\n useEffect(() => {\n const timer = setTimeout(() => setDebouncedValue(value), delay || 500);\n\n return () => {\n clearTimeout(timer);\n };\n }, [value, delay]);\n\n return debouncedValue;\n}\n\n/* ?\n * Strangely enough, when useColorScheme() returns from the background state, it first returns a different color value and later returns the original color value.\n * Due to this phenomenon, there's a momentary flickering effect on the screen.\n * Therefore, to prevent this, we use useDebounce to delay the return of the color value until after a certain amount of time has passed.\n */\nexport function useDebouncedColorScheme(\n delay: number = 300,\n): 'light' | 'dark' | null | undefined {\n const colorScheme = useColorScheme();\n\n return useDebounce(colorScheme, delay);\n}\n","/**\n * @private\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} target\n * @param {...Object} objects_to_assign\n * @returns {Object} target\n */\nlet assign;\nif (typeof Object.assign !== 'function') {\n assign = function assign(target) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n let output = Object(target);\n for (let index = 1; index < arguments.length; index++) {\n const source = arguments[index];\n if (source !== undefined && source !== null) {\n for (const nextKey in source) {\n if (source.hasOwnProperty(nextKey)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n }\n return output;\n };\n} else {\n assign = Object.assign;\n}\n\nexport default assign;","\nconst VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];\nconst TEST_ELEMENT = typeof document === \"undefined\" ? {style: {}} : document.createElement('div');\n\nconst TYPE_FUNCTION = 'function';\n\nconst { round, abs } = Math;\nconst { now } = Date;\n\nexport {\n VENDOR_PREFIXES,\n TEST_ELEMENT,\n TYPE_FUNCTION,\n round,\n abs,\n now\n};\n","/* eslint-disable no-new-func, no-nested-ternary */\n\nlet win;\n\nif (typeof window === \"undefined\") {\n\t// window is undefined in node.js\n\twin = {};\n} else {\n\twin = window;\n}\n/* eslint-enable no-new-func, no-nested-ternary */\n\nexport {win as window};\n","import { VENDOR_PREFIXES } from './utils-consts';\n/**\n * @private\n * get the prefixed property\n * @param {Object} obj\n * @param {String} property\n * @returns {String|Undefined} prefixed\n */\nexport default function prefixed(obj, property) {\n let prefix;\n let prop;\n let camelProp = property[0].toUpperCase() + property.slice(1);\n\n let i = 0;\n while (i < VENDOR_PREFIXES.length) {\n prefix = VENDOR_PREFIXES[i];\n prop = (prefix) ? prefix + camelProp : property;\n\n if (prop in obj) {\n return prop;\n }\n i++;\n }\n return undefined;\n}\n","import prefixed from '../utils/prefixed';\nimport { TEST_ELEMENT } from '../utils/utils-consts';\nimport {window} from '../browser';\n\nexport const PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');\nexport const NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;\n\nexport default function getTouchActionProps() {\n if (!NATIVE_TOUCH_ACTION) {\n return false;\n }\n let touchMap = {};\n let cssSupports = window.CSS && window.CSS.supports;\n ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach((val) => {\n\n // If css.supports is not supported but there is native touch-action assume it supports\n // all values. This is the case for IE 10 and 11.\n return touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true;\n });\n return touchMap;\n}\n","import getTouchActionProps from './get-touchaction-props';\n\n\n\n// magical touchAction value\nconst TOUCH_ACTION_COMPUTE = 'compute';\nconst TOUCH_ACTION_AUTO = 'auto';\nconst TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented\nconst TOUCH_ACTION_NONE = 'none';\nconst TOUCH_ACTION_PAN_X = 'pan-x';\nconst TOUCH_ACTION_PAN_Y = 'pan-y';\nconst TOUCH_ACTION_MAP = getTouchActionProps();\n\nexport {\n TOUCH_ACTION_AUTO,\n TOUCH_ACTION_COMPUTE,\n TOUCH_ACTION_MANIPULATION,\n TOUCH_ACTION_NONE,\n TOUCH_ACTION_PAN_X,\n TOUCH_ACTION_PAN_Y,\n TOUCH_ACTION_MAP\n};\n","import prefixed from '../utils/prefixed';\nimport {window} from \"../browser\";\n\nconst MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;\n\nconst SUPPORT_TOUCH = ('ontouchstart' in window);\nconst SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined;\nconst SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);\n\nconst INPUT_TYPE_TOUCH = 'touch';\nconst INPUT_TYPE_PEN = 'pen';\nconst INPUT_TYPE_MOUSE = 'mouse';\nconst INPUT_TYPE_KINECT = 'kinect';\n\nconst COMPUTE_INTERVAL = 25;\n\nconst INPUT_START = 1;\nconst INPUT_MOVE = 2;\nconst INPUT_END = 4;\nconst INPUT_CANCEL = 8;\n\nconst DIRECTION_NONE = 1;\nconst DIRECTION_LEFT = 2;\nconst DIRECTION_RIGHT = 4;\nconst DIRECTION_UP = 8;\nconst DIRECTION_DOWN = 16;\n\nconst DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;\nconst DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;\nconst DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;\n\nconst PROPS_XY = ['x', 'y'];\nconst PROPS_CLIENT_XY = ['clientX', 'clientY'];\n\nexport {\n MOBILE_REGEX,\n SUPPORT_ONLY_TOUCH,\n SUPPORT_POINTER_EVENTS,\n SUPPORT_TOUCH,\n INPUT_TYPE_KINECT,\n INPUT_TYPE_MOUSE,\n INPUT_TYPE_PEN,\n INPUT_TYPE_TOUCH,\n COMPUTE_INTERVAL,\n INPUT_START,\n INPUT_MOVE,\n INPUT_END,\n INPUT_CANCEL,\n DIRECTION_NONE,\n DIRECTION_LEFT,\n DIRECTION_RIGHT,\n DIRECTION_UP,\n DIRECTION_DOWN,\n DIRECTION_HORIZONTAL,\n DIRECTION_VERTICAL,\n DIRECTION_ALL,\n PROPS_XY,\n PROPS_CLIENT_XY\n};\n","/**\n * @private\n * walk objects and arrays\n * @param {Object} obj\n * @param {Function} iterator\n * @param {Object} context\n */\nexport default function each(obj, iterator, context) {\n let i;\n\n if (!obj) {\n return;\n }\n\n if (obj.forEach) {\n obj.forEach(iterator, context);\n } else if (obj.length !== undefined) {\n i = 0;\n while (i < obj.length) {\n iterator.call(context, obj[i], i, obj);\n i++;\n }\n } else {\n for (i in obj) {\n obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);\n }\n }\n}\n","import { TYPE_FUNCTION } from './utils-consts';\n/**\n * @private\n * let a boolean value also be a function that must return a boolean\n * this first item in args will be used as the context\n * @param {Boolean|Function} val\n * @param {Array} [args]\n * @returns {Boolean}\n */\nexport default function boolOrFn(val, args) {\n if (typeof val === TYPE_FUNCTION) {\n return val.apply(args ? args[0] || undefined : undefined, args);\n }\n return val;\n}\n","/**\n * @private\n * small indexOf wrapper\n * @param {String} str\n * @param {String} find\n * @returns {Boolean} found\n */\nexport default function inStr(str, find) {\n return str.indexOf(find) > -1;\n}\n","import inStr from '../utils/in-str';\nimport {\n TOUCH_ACTION_NONE,\n TOUCH_ACTION_PAN_X,\n TOUCH_ACTION_PAN_Y,\n TOUCH_ACTION_MANIPULATION,\n TOUCH_ACTION_AUTO\n} from './touchaction-Consts';\n\n/**\n * @private\n * when the touchActions are collected they are not a valid value, so we need to clean things up. *\n * @param {String} actions\n * @returns {*}\n */\nexport default function cleanTouchActions(actions) {\n // none\n if (inStr(actions, TOUCH_ACTION_NONE)) {\n return TOUCH_ACTION_NONE;\n }\n\n let hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\n let hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);\n\n // if both pan-x and pan-y are set (different recognizers\n // for different directions, e.g. horizontal pan but vertical swipe?)\n // we need none (as otherwise with pan-x pan-y combined none of these\n // recognizers will work, since the browser would handle all panning\n if (hasPanX && hasPanY) {\n return TOUCH_ACTION_NONE;\n }\n\n // pan-x OR pan-y\n if (hasPanX || hasPanY) {\n return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;\n }\n\n // manipulation\n if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {\n return TOUCH_ACTION_MANIPULATION;\n }\n\n return TOUCH_ACTION_AUTO;\n}\n","import {\n TOUCH_ACTION_COMPUTE,\n TOUCH_ACTION_MAP,\n TOUCH_ACTION_NONE,\n TOUCH_ACTION_PAN_X,\n TOUCH_ACTION_PAN_Y\n} from './touchaction-Consts';\nimport {\n NATIVE_TOUCH_ACTION,\n PREFIXED_TOUCH_ACTION,\n} from \"./get-touchaction-props\";\nimport {\n DIRECTION_VERTICAL,\n DIRECTION_HORIZONTAL\n} from '../inputjs/input-consts';\nimport each from '../utils/each';\nimport boolOrFn from '../utils/bool-or-fn';\nimport inStr from '../utils/in-str';\nimport cleanTouchActions from './clean-touch-actions';\n\n/**\n * @private\n * Touch Action\n * sets the touchAction property or uses the js alternative\n * @param {Manager} manager\n * @param {String} value\n * @constructor\n */\nexport default class TouchAction {\n constructor(manager, value) {\n this.manager = manager;\n this.set(value);\n }\n\n /**\n * @private\n * set the touchAction value on the element or enable the polyfill\n * @param {String} value\n */\n set(value) {\n // find out the touch-action by the event handlers\n if (value === TOUCH_ACTION_COMPUTE) {\n value = this.compute();\n }\n\n if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {\n this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;\n }\n this.actions = value.toLowerCase().trim();\n }\n\n /**\n * @private\n * just re-set the touchAction value\n */\n update() {\n this.set(this.manager.options.touchAction);\n }\n\n /**\n * @private\n * compute the value for the touchAction property based on the recognizer's settings\n * @returns {String} value\n */\n compute() {\n let actions = [];\n each(this.manager.recognizers, (recognizer) => {\n if (boolOrFn(recognizer.options.enable, [recognizer])) {\n actions = actions.concat(recognizer.getTouchAction());\n }\n });\n return cleanTouchActions(actions.join(' '));\n }\n\n /**\n * @private\n * this method is called on each input cycle and provides the preventing of the browser behavior\n * @param {Object} input\n */\n preventDefaults(input) {\n let { srcEvent } = input;\n let direction = input.offsetDirection;\n\n // if the touch action did prevented once this session\n if (this.manager.session.prevented) {\n srcEvent.preventDefault();\n return;\n }\n\n let { actions } = this;\n let hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];\n let hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];\n let hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];\n\n if (hasNone) {\n // do not prevent defaults if this is a tap gesture\n let isTapPointer = input.pointers.length === 1;\n let isTapMovement = input.distance < 2;\n let isTapTouchTime = input.deltaTime < 250;\n\n if (isTapPointer && isTapMovement && isTapTouchTime) {\n return;\n }\n }\n\n if (hasPanX && hasPanY) {\n // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent\n return;\n }\n\n if (hasNone ||\n (hasPanY && direction & DIRECTION_HORIZONTAL) ||\n (hasPanX && direction & DIRECTION_VERTICAL)) {\n return this.preventSrc(srcEvent);\n }\n }\n\n /**\n * @private\n * call preventDefault to prevent the browser's default behavior (scrolling in most cases)\n * @param {Object} srcEvent\n */\n preventSrc(srcEvent) {\n this.manager.session.prevented = true;\n srcEvent.preventDefault();\n }\n}\n","/**\n * @private\n * find if a node is in the given parent\n * @method hasParent\n * @param {HTMLElement} node\n * @param {HTMLElement} parent\n * @return {Boolean} found\n */\nexport default function hasParent(node, parent) {\n while (node) {\n if (node === parent) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n}\n","import { round } from '../utils/utils-consts';\n\n/**\n * @private\n * get the center of all the pointers\n * @param {Array} pointers\n * @return {Object} center contains `x` and `y` properties\n */\nexport default function getCenter(pointers) {\n let pointersLength = pointers.length;\n\n // no need to loop when only one touch\n if (pointersLength === 1) {\n return {\n x: round(pointers[0].clientX),\n y: round(pointers[0].clientY)\n };\n }\n\n let x = 0;\n let y = 0;\n let i = 0;\n while (i < pointersLength) {\n x += pointers[i].clientX;\n y += pointers[i].clientY;\n i++;\n }\n\n return {\n x: round(x / pointersLength),\n y: round(y / pointersLength)\n };\n}\n","import { now,round } from '../utils/utils-consts';\nimport getCenter from './get-center';\n\n/**\n * @private\n * create a simple clone from the input used for storage of firstInput and firstMultiple\n * @param {Object} input\n * @returns {Object} clonedInputData\n */\nexport default function simpleCloneInputData(input) {\n // make a simple copy of the pointers because we will get a reference if we don't\n // we only need clientXY for the calculations\n let pointers = [];\n let i = 0;\n while (i < input.pointers.length) {\n pointers[i] = {\n clientX: round(input.pointers[i].clientX),\n clientY: round(input.pointers[i].clientY)\n };\n i++;\n }\n\n return {\n timeStamp: now(),\n pointers,\n center: getCenter(pointers),\n deltaX: input.deltaX,\n deltaY: input.deltaY\n };\n}\n","import { PROPS_XY } from './input-consts';\n\n/**\n * @private\n * calculate the absolute distance between two points\n * @param {Object} p1 {x, y}\n * @param {Object} p2 {x, y}\n * @param {Array} [props] containing x and y keys\n * @return {Number} distance\n */\nexport default function getDistance(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n let x = p2[props[0]] - p1[props[0]];\n let y = p2[props[1]] - p1[props[1]];\n\n return Math.sqrt((x * x) + (y * y));\n}\n","import { PROPS_XY } from './input-consts';\n\n/**\n * @private\n * calculate the angle between two coordinates\n * @param {Object} p1\n * @param {Object} p2\n * @param {Array} [props] containing x and y keys\n * @return {Number} angle\n */\nexport default function getAngle(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n let x = p2[props[0]] - p1[props[0]];\n let y = p2[props[1]] - p1[props[1]];\n return Math.atan2(y, x) * 180 / Math.PI;\n}\n","import { abs } from '../utils/utils-consts';\nimport { DIRECTION_NONE,DIRECTION_LEFT,DIRECTION_RIGHT,DIRECTION_UP,DIRECTION_DOWN } from './input-consts';\n\n/**\n * @private\n * get the direction between two points\n * @param {Number} x\n * @param {Number} y\n * @return {Number} direction\n */\nexport default function getDirection(x, y) {\n if (x === y) {\n return DIRECTION_NONE;\n }\n\n if (abs(x) >= abs(y)) {\n return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n}\n","/**\n * @private\n * calculate the velocity between two points. unit is in px per ms.\n * @param {Number} deltaTime\n * @param {Number} x\n * @param {Number} y\n * @return {Object} velocity `x` and `y`\n */\nexport default function getVelocity(deltaTime, x, y) {\n return {\n x: x / deltaTime || 0,\n y: y / deltaTime || 0\n };\n}\n","import { now } from '../utils/utils-consts';\nimport { abs } from '../utils/utils-consts';\nimport hasParent from '../utils/has-parent';\nimport simpleCloneInputData from './simple-clone-input-data';\nimport getCenter from './get-center';\nimport getDistance from './get-distance';\nimport getAngle from './get-angle';\nimport getDirection from './get-direction';\nimport computeDeltaXY from './compute-delta-xy';\nimport getVelocity from './get-velocity';\nimport getScale from './get-scale';\nimport getRotation from './get-rotation';\nimport computeIntervalInputData from './compute-interval-input-data';\n\n/**\n* @private\n * extend the data with some usable properties like scale, rotate, velocity etc\n * @param {Object} manager\n * @param {Object} input\n */\nexport default function computeInputData(manager, input) {\n let { session } = manager;\n let { pointers } = input;\n let { length:pointersLength } = pointers;\n\n // store the first input to calculate the distance and direction\n if (!session.firstInput) {\n session.firstInput = simpleCloneInputData(input);\n }\n\n // to compute scale and rotation we need to store the multiple touches\n if (pointersLength > 1 && !session.firstMultiple) {\n session.firstMultiple = simpleCloneInputData(input);\n } else if (pointersLength === 1) {\n session.firstMultiple = false;\n }\n\n let { firstInput, firstMultiple } = session;\n let offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;\n\n let center = input.center = getCenter(pointers);\n input.timeStamp = now();\n input.deltaTime = input.timeStamp - firstInput.timeStamp;\n\n input.angle = getAngle(offsetCenter, center);\n input.distance = getDistance(offsetCenter, center);\n\n computeDeltaXY(session, input);\n input.offsetDirection = getDirection(input.deltaX, input.deltaY);\n\n let overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);\n input.overallVelocityX = overallVelocity.x;\n input.overallVelocityY = overallVelocity.y;\n input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y;\n\n input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;\n input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;\n\n input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length >\n session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers);\n\n computeIntervalInputData(session, input);\n\n // find the correct target\n let target = manager.element;\n const srcEvent = input.srcEvent;\n let srcEventTarget;\n\n if (srcEvent.composedPath) {\n srcEventTarget = srcEvent.composedPath()[0];\n } else if (srcEvent.path) {\n srcEventTarget = srcEvent.path[0];\n } else {\n srcEventTarget = srcEvent.target;\n }\n\n if (hasParent(srcEventTarget, target)) {\n target = srcEventTarget;\n }\n input.target = target;\n}\n","import { INPUT_START, INPUT_END } from './input-consts';\n\nexport default function computeDeltaXY(session, input) {\n let { center } = input;\n // let { offsetDelta:offset = {}, prevDelta = {}, prevInput = {} } = session;\n // jscs throwing error on defalut destructured values and without defaults tests fail\n let offset = session.offsetDelta || {};\n let prevDelta = session.prevDelta || {};\n let prevInput = session.prevInput || {};\n\n if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {\n prevDelta = session.prevDelta = {\n x: prevInput.deltaX || 0,\n y: prevInput.deltaY || 0\n };\n\n offset = session.offsetDelta = {\n x: center.x,\n y: center.y\n };\n }\n\n input.deltaX = prevDelta.x + (center.x - offset.x);\n input.deltaY = prevDelta.y + (center.y - offset.y);\n}\n","import { PROPS_CLIENT_XY } from './input-consts';\nimport getDistance from './get-distance';\n/**\n * @private\n * calculate the scale factor between two pointersets\n * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} scale\n */\nexport default function getScale(start, end) {\n return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);\n}\n","import getAngle from './get-angle';\nimport { PROPS_CLIENT_XY } from './input-consts';\n\n/**\n * @private\n * calculate the rotation degrees between two pointersets\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} rotation\n */\nexport default function getRotation(start, end) {\n return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);\n}\n","import { INPUT_CANCEL,COMPUTE_INTERVAL } from './input-consts';\nimport { abs } from '../utils/utils-consts';\nimport getVelocity from './get-velocity';\nimport getDirection from './get-direction';\n\n/**\n * @private\n * velocity is calculated every x ms\n * @param {Object} session\n * @param {Object} input\n */\nexport default function computeIntervalInputData(session, input) {\n let last = session.lastInterval || input;\n let deltaTime = input.timeStamp - last.timeStamp;\n let velocity;\n let velocityX;\n let velocityY;\n let direction;\n\n if (input.eventType !== INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {\n let deltaX = input.deltaX - last.deltaX;\n let deltaY = input.deltaY - last.deltaY;\n\n let v = getVelocity(deltaTime, deltaX, deltaY);\n velocityX = v.x;\n velocityY = v.y;\n velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y;\n direction = getDirection(deltaX, deltaY);\n\n session.lastInterval = input;\n } else {\n // use latest velocity info if it doesn't overtake a minimum period\n velocity = last.velocity;\n velocityX = last.velocityX;\n velocityY = last.velocityY;\n direction = last.direction;\n }\n\n input.velocity = velocity;\n input.velocityX = velocityX;\n input.velocityY = velocityY;\n input.direction = direction;\n}\n","import { INPUT_START,INPUT_END,INPUT_CANCEL } from './input-consts';\nimport computeInputData from './compute-input-data';\n\n/**\n * @private\n * handle input events\n * @param {Manager} manager\n * @param {String} eventType\n * @param {Object} input\n */\nexport default function inputHandler(manager, eventType, input) {\n let pointersLen = input.pointers.length;\n let changedPointersLen = input.changedPointers.length;\n let isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0));\n let isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0));\n\n input.isFirst = !!isFirst;\n input.isFinal = !!isFinal;\n\n if (isFirst) {\n manager.session = {};\n }\n\n // source event is the normalized value of the domEvents\n // like 'touchstart, mouseup, pointerdown'\n input.eventType = eventType;\n\n // compute scale, rotation etc\n computeInputData(manager, input);\n\n // emit secret event\n manager.emit('hammer.input', input);\n\n manager.recognize(input);\n manager.session.prevInput = input;\n}\n","/**\n * @private\n * split string on whitespace\n * @param {String} str\n * @returns {Array} words\n */\n\nexport default function splitStr(str) {\n return str.trim().split(/\\s+/g);\n}\n","import each from './each';\nimport splitStr from './split-str';\n/**\n * @private\n * addEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nexport default function addEventListeners(target, types, handler) {\n each(splitStr(types), (type) => {\n target.addEventListener(type, handler, false);\n });\n}\n","import each from './each';\nimport splitStr from './split-str';\n/**\n * @private\n * removeEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nexport default function removeEventListeners(target, types, handler) {\n each(splitStr(types), (type) => {\n target.removeEventListener(type, handler, false);\n });\n}\n","/**\n * @private\n * get the window object of an element\n * @param {HTMLElement} element\n * @returns {DocumentView|Window}\n */\nexport default function getWindowForElement(element) {\n let doc = element.ownerDocument || element;\n return (doc.defaultView || doc.parentWindow || window);\n}\n","import boolOrFn from '../utils/bool-or-fn';\nimport addEventListeners from '../utils/add-event-listeners';\nimport removeEventListeners from '../utils/remove-event-listeners';\nimport getWindowForElement from '../utils/get-window-for-element';\n\n/**\n * @private\n * create new input type manager\n * @param {Manager} manager\n * @param {Function} callback\n * @returns {Input}\n * @constructor\n */\nexport default class Input {\n constructor(manager, callback) {\n let self = this;\n this.manager = manager;\n this.callback = callback;\n this.element = manager.element;\n this.target = manager.options.inputTarget;\n\n // smaller wrapper around the handler, for the scope and the enabled state of the manager,\n // so when disabled the input events are completely bypassed.\n this.domHandler = function(ev) {\n if (boolOrFn(manager.options.enable, [manager])) {\n self.handler(ev);\n }\n };\n\n this.init();\n\n }\n /**\n * @private\n * should handle the inputEvent data and trigger the callback\n * @virtual\n */\n handler() { }\n\n /**\n * @private\n * bind the events\n */\n init() {\n this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n }\n\n /**\n * @private\n * unbind the events\n */\n destroy() {\n this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n }\n}\n","/**\n * @private\n * find if a array contains the object using indexOf or a simple polyFill\n * @param {Array} src\n * @param {String} find\n * @param {String} [findByKey]\n * @return {Boolean|Number} false when not found, or the index\n */\nexport default function inArray(src, find, findByKey) {\n if (src.indexOf && !findByKey) {\n return src.indexOf(find);\n } else {\n let i = 0;\n while (i < src.length) {\n if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) {// do not use === here, test fails\n return i;\n }\n i++;\n }\n return -1;\n }\n}\n","import {\n INPUT_START,\n INPUT_END,\n INPUT_CANCEL,\n INPUT_MOVE,\n INPUT_TYPE_TOUCH,\n INPUT_TYPE_MOUSE,\n INPUT_TYPE_PEN,\n INPUT_TYPE_KINECT\n} from '../inputjs/input-consts';\nimport {window} from \"../browser\";\nimport Input from '../inputjs/input-constructor';\nimport inArray from '../utils/in-array';\n\nconst POINTER_INPUT_MAP = {\n pointerdown: INPUT_START,\n pointermove: INPUT_MOVE,\n pointerup: INPUT_END,\n pointercancel: INPUT_CANCEL,\n pointerout: INPUT_CANCEL\n};\n\n// in IE10 the pointer types is defined as an enum\nconst IE10_POINTER_TYPE_ENUM = {\n 2: INPUT_TYPE_TOUCH,\n 3: INPUT_TYPE_PEN,\n 4: INPUT_TYPE_MOUSE,\n 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816\n};\n\nlet POINTER_ELEMENT_EVENTS = 'pointerdown';\nlet POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel';\n\n// IE10 has prefixed support, and case-sensitive\nif (window.MSPointerEvent && !window.PointerEvent) {\n POINTER_ELEMENT_EVENTS = 'MSPointerDown';\n POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';\n}\n\n/**\n * @private\n * Pointer events input\n * @constructor\n * @extends Input\n */\nexport default class PointerEventInput extends Input {\n constructor() {\n var proto = PointerEventInput.prototype;\n\n proto.evEl = POINTER_ELEMENT_EVENTS;\n proto.evWin = POINTER_WINDOW_EVENTS;\n super(...arguments);\n this.store = (this.manager.session.pointerEvents = []);\n }\n\n /**\n * @private\n * handle mouse events\n * @param {Object} ev\n */\n handler(ev) {\n let { store } = this;\n let removePointer = false;\n\n let eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');\n let eventType = POINTER_INPUT_MAP[eventTypeNormalized];\n let pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;\n\n let isTouch = (pointerType === INPUT_TYPE_TOUCH);\n\n // get index of the event in the store\n let storeIndex = inArray(store, ev.pointerId, 'pointerId');\n\n // start and mouse must be down\n if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {\n if (storeIndex < 0) {\n store.push(ev);\n storeIndex = store.length - 1;\n }\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n removePointer = true;\n }\n\n // it not found, so the pointer hasn't been down (so it's probably a hover)\n if (storeIndex < 0) {\n return;\n }\n\n // update the event in the store\n store[storeIndex] = ev;\n\n this.callback(this.manager, eventType, {\n pointers: store,\n changedPointers: [ev],\n pointerType,\n srcEvent: ev\n });\n\n if (removePointer) {\n // remove from the store\n store.splice(storeIndex, 1);\n }\n }\n}\n","/**\n * @private\n * convert array-like objects to real arrays\n * @param {Object} obj\n * @returns {Array}\n */\nexport default function toArray(obj) {\n return Array.prototype.slice.call(obj, 0);\n}\n","import inArray from './in-array';\n\n/**\n * @private\n * unique array with objects based on a key (like 'id') or just by the array's value\n * @param {Array} src [{id:1},{id:2},{id:1}]\n * @param {String} [key]\n * @param {Boolean} [sort=False]\n * @returns {Array} [{id:1},{id:2}]\n */\nexport default function uniqueArray(src, key, sort) {\n let results = [];\n let values = [];\n let i = 0;\n\n while (i < src.length) {\n let val = key ? src[i][key] : src[i];\n if (inArray(values, val) < 0) {\n results.push(src[i]);\n }\n values[i] = val;\n i++;\n }\n\n if (sort) {\n if (!key) {\n results = results.sort();\n } else {\n results = results.sort((a, b) => {\n return a[key] > b[key];\n });\n }\n }\n\n return results;\n}\n","import {\n INPUT_START,\n INPUT_MOVE,\n INPUT_END,\n INPUT_CANCEL,\n INPUT_TYPE_TOUCH\n} from '../inputjs/input-consts';\nimport Input from '../inputjs/input-constructor';\nimport toArray from '../utils/to-array';\nimport hasParent from '../utils/has-parent';\nimport uniqueArray from '../utils/unique-array';\n\nconst TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\n\nconst TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * @private\n * Multi-user touch events input\n * @constructor\n * @extends Input\n */\nexport default class TouchInput extends Input {\n constructor() {\n TouchInput.prototype.evTarget = TOUCH_TARGET_EVENTS;\n super(...arguments);\n this.targetIds = {};\n // this.evTarget = TOUCH_TARGET_EVENTS;\n }\n handler(ev) {\n let type = TOUCH_INPUT_MAP[ev.type];\n let touches = getTouches.call(this, ev, type);\n if (!touches) {\n return;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n}\n\n/**\n * @private\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction getTouches(ev, type) {\n let allTouches = toArray(ev.touches);\n let { targetIds } = this;\n\n // when there is only one touch, the process can be simplified\n if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {\n targetIds[allTouches[0].identifier] = true;\n return [allTouches, allTouches];\n }\n\n let i;\n let targetTouches;\n let changedTouches = toArray(ev.changedTouches);\n let changedTargetTouches = [];\n let { target } = this;\n\n // get target touches from touches\n targetTouches = allTouches.filter((touch) => {\n return hasParent(touch.target, target);\n });\n\n // collect touches\n if (type === INPUT_START) {\n i = 0;\n while (i < targetTouches.length) {\n targetIds[targetTouches[i].identifier] = true;\n i++;\n }\n }\n\n // filter changed touches to only contain touches that exist in the collected target ids\n i = 0;\n while (i < changedTouches.length) {\n if (targetIds[changedTouches[i].identifier]) {\n changedTargetTouches.push(changedTouches[i]);\n }\n\n // cleanup removed touches\n if (type & (INPUT_END | INPUT_CANCEL)) {\n delete targetIds[changedTouches[i].identifier];\n }\n i++;\n }\n\n if (!changedTargetTouches.length) {\n return;\n }\n\n return [\n // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'\n uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true),\n changedTargetTouches\n ];\n}\n","import {\n INPUT_START,\n INPUT_MOVE,\n INPUT_END,\n INPUT_TYPE_MOUSE\n} from '../inputjs/input-consts';\nimport Input from '../inputjs/input-constructor';\n\nconst MOUSE_INPUT_MAP = {\n mousedown: INPUT_START,\n mousemove: INPUT_MOVE,\n mouseup: INPUT_END\n};\n\nconst MOUSE_ELEMENT_EVENTS = 'mousedown';\nconst MOUSE_WINDOW_EVENTS = 'mousemove mouseup';\n\n/**\n * @private\n * Mouse events input\n * @constructor\n * @extends Input\n */\nexport default class MouseInput extends Input {\n constructor() {\n var proto = MouseInput.prototype;\n proto.evEl = MOUSE_ELEMENT_EVENTS;\n proto.evWin = MOUSE_WINDOW_EVENTS;\n\n super(...arguments);\n this.pressed = false; // mousedown state\n }\n\n /**\n * @private\n * handle mouse events\n * @param {Object} ev\n */\n handler(ev) {\n let eventType = MOUSE_INPUT_MAP[ev.type];\n\n // on start we want to have the left mouse button down\n if (eventType & INPUT_START && ev.button === 0) {\n this.pressed = true;\n }\n\n if (eventType & INPUT_MOVE && ev.which !== 1) {\n eventType = INPUT_END;\n }\n\n // mouse must be down\n if (!this.pressed) {\n return;\n }\n\n if (eventType & INPUT_END) {\n this.pressed = false;\n }\n\n this.callback(this.manager, eventType, {\n pointers: [ev],\n changedPointers: [ev],\n pointerType: INPUT_TYPE_MOUSE,\n srcEvent: ev\n });\n }\n}\n","import Input from \"../inputjs/input-constructor\";\nimport TouchInput from \"./touch\";\nimport MouseInput from \"./mouse\";\nimport {\n\tINPUT_START,\n\tINPUT_END,\n\tINPUT_CANCEL,\n\tINPUT_TYPE_TOUCH,\n\tINPUT_TYPE_MOUSE,\n} from \"../inputjs/input-consts\";\n\n/**\n * @private\n * Combined touch and mouse input\n *\n * Touch has a higher priority then mouse, and while touching no mouse events are allowed.\n * This because touch devices also emit mouse events while doing a touch.\n *\n * @constructor\n * @extends Input\n */\n\nconst DEDUP_TIMEOUT = 2500;\nconst DEDUP_DISTANCE = 25;\n\nfunction setLastTouch(eventData) {\n\tconst { changedPointers: [touch] } = eventData;\n\n\tif (touch.identifier === this.primaryTouch) {\n\t\tconst lastTouch = { x: touch.clientX, y: touch.clientY };\n\t\tconst lts = this.lastTouches;\n\n\t\tthis.lastTouches.push(lastTouch);\n\n\n\t\tconst removeLastTouch = function() {\n\t\t\tconst i = lts.indexOf(lastTouch);\n\n\t\t\tif (i > -1) {\n\t\t\t\tlts.splice(i, 1);\n\t\t\t}\n\t\t};\n\n\t\tsetTimeout(removeLastTouch, DEDUP_TIMEOUT);\n\t}\n}\n\n\nfunction recordTouches(eventType, eventData) {\n\tif (eventType & INPUT_START) {\n\t\tthis.primaryTouch = eventData.changedPointers[0].identifier;\n\t\tsetLastTouch.call(this, eventData);\n\t} else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n\t\tsetLastTouch.call(this, eventData);\n\t}\n}\nfunction isSyntheticEvent(eventData) {\n\tconst x = eventData.srcEvent.clientX;\n\tconst y = eventData.srcEvent.clientY;\n\n\tfor (let i = 0; i < this.lastTouches.length; i++) {\n\t\tconst t = this.lastTouches[i];\n\t\tconst dx = Math.abs(x - t.x);\n\t\tconst dy = Math.abs(y - t.y);\n\n\t\tif (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n\nexport default class TouchMouseInput extends Input {\n\tconstructor(manager, callback) {\n\t\tsuper(manager, callback);\n\n\t\tthis.touch = new TouchInput(this.manager, this.handler);\n\t\tthis.mouse = new MouseInput(this.manager, this.handler);\n\t\tthis.primaryTouch = null;\n\t\tthis.lastTouches = [];\n\t}\n\n\t/**\n\t * @private\n\t * handle mouse and touch events\n\t * @param {Hammer} manager\n\t * @param {String} inputEvent\n\t * @param {Object} inputData\n\t */\n\thandler = (manager, inputEvent, inputData) => {\n\t\tconst isTouch = (inputData.pointerType === INPUT_TYPE_TOUCH);\n\t\tconst isMouse = (inputData.pointerType === INPUT_TYPE_MOUSE);\n\n\t\tif (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {\n\t\t\treturn;\n\t\t}\n\n\t\t// when we're in a touch event, record touches to de-dupe synthetic mouse event\n\t\tif (isTouch) {\n\t\t\trecordTouches.call(this, inputEvent, inputData);\n\t\t} else if (isMouse && isSyntheticEvent.call(this, inputData)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.callback(manager, inputEvent, inputData);\n\t}\n\n\t/**\n\t * @private\n\t * remove the event listeners\n\t */\n\tdestroy() {\n\t\tthis.touch.destroy();\n\t\tthis.mouse.destroy();\n\t}\n}\n","import each from './each';\n/**\n * @private\n * if the argument is an array, we want to execute the fn on each entry\n * if it aint an array we don't want to do a thing.\n * this is used by all the methods that accept a single and array argument.\n * @param {*|Array} arg\n * @param {String} fn\n * @param {Object} [context]\n * @returns {Boolean}\n */\nexport default function invokeArrayArg(arg, fn, context) {\n if (Array.isArray(arg)) {\n each(arg, context[fn], context);\n return true;\n }\n return false;\n}\n","const STATE_POSSIBLE = 1;\nconst STATE_BEGAN = 2;\nconst STATE_CHANGED = 4;\nconst STATE_ENDED = 8;\nconst STATE_RECOGNIZED = STATE_ENDED;\nconst STATE_CANCELLED = 16;\nconst STATE_FAILED = 32;\n\nexport {\n STATE_POSSIBLE,\n STATE_BEGAN,\n STATE_CHANGED,\n STATE_ENDED,\n STATE_RECOGNIZED,\n STATE_CANCELLED,\n STATE_FAILED\n};\n","/**\n * @private\n * get a unique id\n * @returns {number} uniqueId\n */\nlet _uniqueId = 1;\nexport default function uniqueId() {\n return _uniqueId++;\n}\n","/**\n * @private\n * get a recognizer by name if it is bound to a manager\n * @param {Recognizer|String} otherRecognizer\n * @param {Recognizer} recognizer\n * @returns {Recognizer}\n */\nexport default function getRecognizerByNameIfManager(otherRecognizer, recognizer) {\n let { manager } = recognizer;\n if (manager) {\n return manager.get(otherRecognizer);\n }\n return otherRecognizer;\n}\n","import {\n STATE_CANCELLED,\n STATE_ENDED,\n STATE_CHANGED,\n STATE_BEGAN\n} from './recognizer-consts';\n\n/**\n * @private\n * get a usable string, used as event postfix\n * @param {constant} state\n * @returns {String} state\n */\nexport default function stateStr(state) {\n if (state & STATE_CANCELLED) {\n return 'cancel';\n } else if (state & STATE_ENDED) {\n return 'end';\n } else if (state & STATE_CHANGED) {\n return 'move';\n } else if (state & STATE_BEGAN) {\n return 'start';\n }\n return '';\n}\n","import {\n STATE_POSSIBLE,\n STATE_ENDED,\n STATE_FAILED,\n STATE_RECOGNIZED,\n STATE_CANCELLED,\n STATE_BEGAN,\n STATE_CHANGED\n} from './recognizer-consts';\nimport assign from '../utils/assign';\nimport uniqueId from '../utils/unique-id';\nimport invokeArrayArg from '../utils/invoke-array-arg';\nimport inArray from '../utils/in-array';\nimport boolOrFn from '../utils/bool-or-fn';\nimport getRecognizerByNameIfManager from './get-recognizer-by-name-if-manager';\nimport stateStr from './state-str';\n\n/**\n * @private\n * Recognizer flow explained; *\n * All recognizers have the initial state of POSSIBLE when a input session starts.\n * The definition of a input session is from the first input until the last input, with all it's movement in it. *\n * Example session for mouse-input: mousedown -> mousemove -> mouseup\n *\n * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed\n * which determines with state it should be.\n *\n * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to\n * POSSIBLE to give it another change on the next cycle.\n *\n * Possible\n * |\n * +-----+---------------+\n * | |\n * +-----+-----+ |\n * | | |\n * Failed Cancelled |\n * +-------+------+\n * | |\n * Recognized Began\n * |\n * Changed\n * |\n * Ended/Recognized\n */\n\n/**\n * @private\n * Recognizer\n * Every recognizer needs to extend from this class.\n * @constructor\n * @param {Object} options\n */\nexport default class Recognizer {\n constructor(options = {}) {\n this.options = {\n enable: true,\n ...options,\n };\n\n this.id = uniqueId();\n\n this.manager = null;\n\n // default is enable true\n this.state = STATE_POSSIBLE;\n this.simultaneous = {};\n this.requireFail = [];\n }\n\n /**\n * @private\n * set options\n * @param {Object} options\n * @return {Recognizer}\n */\n set(options) {\n assign(this.options, options);\n\n // also update the touchAction, in case something changed about the directions/enabled state\n this.manager && this.manager.touchAction.update();\n return this;\n }\n\n /**\n * @private\n * recognize simultaneous with an other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n recognizeWith(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {\n return this;\n }\n\n let { simultaneous } = this;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n if (!simultaneous[otherRecognizer.id]) {\n simultaneous[otherRecognizer.id] = otherRecognizer;\n otherRecognizer.recognizeWith(this);\n }\n return this;\n }\n\n /**\n * @private\n * drop the simultaneous link. it doesnt remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n dropRecognizeWith(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n delete this.simultaneous[otherRecognizer.id];\n return this;\n }\n\n /**\n * @private\n * recognizer can only run when an other is failing\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n requireFailure(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {\n return this;\n }\n\n let { requireFail } = this;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n if (inArray(requireFail, otherRecognizer) === -1) {\n requireFail.push(otherRecognizer);\n otherRecognizer.requireFailure(this);\n }\n return this;\n }\n\n /**\n * @private\n * drop the requireFailure link. it does not remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n dropRequireFailure(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n let index = inArray(this.requireFail, otherRecognizer);\n if (index > -1) {\n this.requireFail.splice(index, 1);\n }\n return this;\n }\n\n /**\n * @private\n * has require failures boolean\n * @returns {boolean}\n */\n hasRequireFailures() {\n return this.requireFail.length > 0;\n }\n\n /**\n * @private\n * if the recognizer can recognize simultaneous with an other recognizer\n * @param {Recognizer} otherRecognizer\n * @returns {Boolean}\n */\n canRecognizeWith(otherRecognizer) {\n return !!this.simultaneous[otherRecognizer.id];\n }\n\n /**\n * @private\n * You should use `tryEmit` instead of `emit` directly to check\n * that all the needed recognizers has failed before emitting.\n * @param {Object} input\n */\n emit(input) {\n let self = this;\n let { state } = this;\n\n function emit(event) {\n self.manager.emit(event, input);\n }\n\n // 'panstart' and 'panmove'\n if (state < STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n\n emit(self.options.event); // simple 'eventName' events\n\n if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...)\n emit(input.additionalEvent);\n }\n\n // panend and pancancel\n if (state >= STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n }\n\n /**\n * @private\n * Check that all the require failure recognizers has failed,\n * if true, it emits a gesture event,\n * otherwise, setup the state to FAILED.\n * @param {Object} input\n */\n tryEmit(input) {\n if (this.canEmit()) {\n return this.emit(input);\n }\n // it's failing anyway\n this.state = STATE_FAILED;\n }\n\n /**\n * @private\n * can we emit?\n * @returns {boolean}\n */\n canEmit() {\n let i = 0;\n while (i < this.requireFail.length) {\n if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {\n return false;\n }\n i++;\n }\n return true;\n }\n\n /**\n * @private\n * update the recognizer\n * @param {Object} inputData\n */\n recognize(inputData) {\n // make a new copy of the inputData\n // so we can change the inputData without messing up the other recognizers\n let inputDataClone = assign({}, inputData);\n\n // is is enabled and allow recognizing?\n if (!boolOrFn(this.options.enable, [this, inputDataClone])) {\n this.reset();\n this.state = STATE_FAILED;\n return;\n }\n\n // reset when we've reached the end\n if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {\n this.state = STATE_POSSIBLE;\n }\n\n this.state = this.process(inputDataClone);\n\n // the recognizer has recognized a gesture\n // so trigger an event\n if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {\n this.tryEmit(inputDataClone);\n }\n }\n\n /**\n * @private\n * return the state of the recognizer\n * the actual recognizing happens in this method\n * @virtual\n * @param {Object} inputData\n * @returns {constant} STATE\n */\n\n /* jshint ignore:start */\n process(inputData) { }\n /* jshint ignore:end */\n\n /**\n * @private\n * return the preferred touch-action\n * @virtual\n * @returns {Array}\n */\n getTouchAction() { }\n\n /**\n * @private\n * called when the gesture isn't allowed to recognize\n * like when another is being recognized or it is disabled\n * @virtual\n */\n reset() { }\n}","import Recognizer from '../recognizerjs/recognizer-constructor';\nimport { TOUCH_ACTION_MANIPULATION } from '../touchactionjs/touchaction-Consts';\nimport {INPUT_START,INPUT_END } from '../inputjs/input-consts';\nimport {\n STATE_RECOGNIZED,\n STATE_BEGAN,\n STATE_FAILED\n} from '../recognizerjs/recognizer-consts';\nimport getDistance from '../inputjs/get-distance';\n\n/**\n * @private\n * A tap is recognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur\n * between the given interval and position. The delay option can be used to recognize multi-taps without firing\n * a single tap.\n *\n * The eventData from the emitted event contains the property `tapCount`, which contains the amount of\n * multi-taps being recognized.\n * @constructor\n * @extends Recognizer\n */\nexport default class TapRecognizer extends Recognizer {\n constructor(options = {}) {\n super({\n event: 'tap',\n pointers: 1,\n taps: 1,\n interval: 300, // max time between the multi-tap taps\n time: 250, // max time of the pointer to be down (like finger on the screen)\n threshold: 9, // a minimal movement is ok, but keep it low\n posThreshold: 10, // a multi-tap can be a bit off the initial position\n ...options,\n });\n\n // previous time and center,\n // used for tap counting\n this.pTime = false;\n this.pCenter = false;\n\n this._timer = null;\n this._input = null;\n this.count = 0;\n }\n\n getTouchAction() {\n return [TOUCH_ACTION_MANIPULATION];\n }\n\n process(input) {\n let { options } = this;\n\n let validPointers = input.pointers.length === options.pointers;\n let validMovement = input.distance < options.threshold;\n let validTouchTime = input.deltaTime < options.time;\n\n this.reset();\n\n if ((input.eventType & INPUT_START) && (this.count === 0)) {\n return this.failTimeout();\n }\n\n // we only allow little movement\n // and we've reached an end event, so a tap is possible\n if (validMovement && validTouchTime && validPointers) {\n if (input.eventType !== INPUT_END) {\n return this.failTimeout();\n }\n\n let validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true;\n let validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;\n\n this.pTime = input.timeStamp;\n this.pCenter = input.center;\n\n if (!validMultiTap || !validInterval) {\n this.count = 1;\n } else {\n this.count += 1;\n }\n\n this._input = input;\n\n // if tap count matches we have recognized it,\n // else it has began recognizing...\n let tapCount = this.count % options.taps;\n if (tapCount === 0) {\n // no failing requirements, immediately trigger the tap event\n // or wait as long as the multitap interval to trigger\n if (!this.hasRequireFailures()) {\n return STATE_RECOGNIZED;\n } else {\n this._timer = setTimeout(() => {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.interval);\n return STATE_BEGAN;\n }\n }\n }\n return STATE_FAILED;\n }\n\n failTimeout() {\n this._timer = setTimeout(() => {\n this.state = STATE_FAILED;\n }, this.options.interval);\n return STATE_FAILED;\n }\n\n reset() {\n clearTimeout(this._timer);\n }\n\n emit() {\n if (this.state === STATE_RECOGNIZED) {\n this._input.tapCount = this.count;\n this.manager.emit(this.options.event, this._input);\n }\n }\n}\n","import Recognizer from '../recognizerjs/recognizer-constructor';\nimport {\n STATE_BEGAN,\n STATE_CHANGED,\n STATE_CANCELLED,\n STATE_ENDED,\n STATE_FAILED\n} from '../recognizerjs/recognizer-consts';\nimport {\n INPUT_CANCEL,\n INPUT_END\n} from '../inputjs/input-consts';\n\n/**\n * @private\n * This recognizer is just used as a base for the simple attribute recognizers.\n * @constructor\n * @extends Recognizer\n */\nexport default class AttrRecognizer extends Recognizer {\n constructor(options = {}) {\n super({\n pointers: 1,\n ...options,\n });\n }\n\n /**\n * @private\n * Used to check if it the recognizer receives valid input, like input.distance > 10.\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {Boolean} recognized\n */\n attrTest(input) {\n let optionPointers = this.options.pointers;\n return optionPointers === 0 || input.pointers.length === optionPointers;\n }\n\n /**\n * @private\n * Process the input and return the state for the recognizer\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {*} State\n */\n process(input) {\n let { state } = this;\n let { eventType } = input;\n\n let isRecognized = state & (STATE_BEGAN | STATE_CHANGED);\n let isValid = this.attrTest(input);\n\n // on cancel input and we've recognized before, return STATE_CANCELLED\n if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {\n return state | STATE_CANCELLED;\n } else if (isRecognized || isValid) {\n if (eventType & INPUT_END) {\n return state | STATE_ENDED;\n } else if (!(state & STATE_BEGAN)) {\n return STATE_BEGAN;\n }\n return state | STATE_CHANGED;\n }\n return STATE_FAILED;\n }\n}\n","import {\n DIRECTION_LEFT,\n DIRECTION_RIGHT,\n DIRECTION_UP,\n DIRECTION_DOWN\n} from '../inputjs/input-consts';\n\n/**\n * @private\n * direction cons to string\n * @param {constant} direction\n * @returns {String}\n */\nexport default function directionStr(direction) {\n if (direction === DIRECTION_DOWN) {\n return 'down';\n } else if (direction === DIRECTION_UP) {\n return 'up';\n } else if (direction === DIRECTION_LEFT) {\n return 'left';\n } else if (direction === DIRECTION_RIGHT) {\n return 'right';\n }\n return '';\n}\n","import AttrRecognizer from './attribute';\nimport {\n DIRECTION_ALL,\n DIRECTION_HORIZONTAL,\n DIRECTION_VERTICAL,\n DIRECTION_NONE,\n DIRECTION_UP,\n DIRECTION_DOWN,\n DIRECTION_LEFT,\n DIRECTION_RIGHT\n} from '../inputjs/input-consts';\nimport { STATE_BEGAN } from '../recognizerjs/recognizer-consts';\nimport { TOUCH_ACTION_PAN_X,TOUCH_ACTION_PAN_Y } from '../touchactionjs/touchaction-Consts';\nimport directionStr from '../recognizerjs/direction-str';\n\n/**\n * @private\n * Pan\n * Recognized when the pointer is down and moved in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nexport default class PanRecognizer extends AttrRecognizer {\n constructor(options = {}) {\n super({\n event: 'pan',\n threshold: 10,\n pointers: 1,\n direction: DIRECTION_ALL,\n ...options,\n });\n this.pX = null;\n this.pY = null;\n }\n\n getTouchAction() {\n let { options:{ direction } } = this;\n let actions = [];\n if (direction & DIRECTION_HORIZONTAL) {\n actions.push(TOUCH_ACTION_PAN_Y);\n }\n if (direction & DIRECTION_VERTICAL) {\n actions.push(TOUCH_ACTION_PAN_X);\n }\n return actions;\n }\n\n directionTest(input) {\n let { options } = this;\n let hasMoved = true;\n let { distance } = input;\n let { direction } = input;\n let x = input.deltaX;\n let y = input.deltaY;\n\n // lock to axis?\n if (!(direction & options.direction)) {\n if (options.direction & DIRECTION_HORIZONTAL) {\n direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT;\n hasMoved = x !== this.pX;\n distance = Math.abs(input.deltaX);\n } else {\n direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN;\n hasMoved = y !== this.pY;\n distance = Math.abs(input.deltaY);\n }\n }\n input.direction = direction;\n return hasMoved && distance > options.threshold && direction & options.direction;\n }\n\n attrTest(input) {\n return AttrRecognizer.prototype.attrTest.call(this, input) && // replace with a super call\n (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input)));\n }\n\n emit(input) {\n\n this.pX = input.deltaX;\n this.pY = input.deltaY;\n\n let direction = directionStr(input.direction);\n\n if (direction) {\n input.additionalEvent = this.options.event + direction;\n }\n super.emit(input);\n }\n}\n","import AttrRecognizer from '../recognizers/attribute';\nimport { abs } from '../utils/utils-consts';\nimport { DIRECTION_HORIZONTAL,DIRECTION_VERTICAL } from '../inputjs/input-consts';\nimport PanRecognizer from './pan';\nimport { INPUT_END } from '../inputjs/input-consts';\nimport directionStr from '../recognizerjs/direction-str';\n\n/**\n * @private\n * Swipe\n * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nexport default class SwipeRecognizer extends AttrRecognizer {\n constructor(options = {}) {\n super({\n event: 'swipe',\n threshold: 10,\n velocity: 0.3,\n direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\n pointers: 1,\n ...options,\n });\n }\n\n getTouchAction() {\n return PanRecognizer.prototype.getTouchAction.call(this);\n }\n\n attrTest(input) {\n let { direction } = this.options;\n let velocity;\n\n if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {\n velocity = input.overallVelocity;\n } else if (direction & DIRECTION_HORIZONTAL) {\n velocity = input.overallVelocityX;\n } else if (direction & DIRECTION_VERTICAL) {\n velocity = input.overallVelocityY;\n }\n\n return super.attrTest(input) &&\n direction & input.offsetDirection &&\n input.distance > this.options.threshold &&\n input.maxPointers === this.options.pointers &&\n abs(velocity) > this.options.velocity && input.eventType & INPUT_END;\n }\n\n emit(input) {\n let direction = directionStr(input.offsetDirection);\n if (direction) {\n this.manager.emit(this.options.event + direction, input);\n }\n\n this.manager.emit(this.options.event, input);\n }\n}\n","import AttrRecognizer from './attribute';\nimport { TOUCH_ACTION_NONE } from '../touchactionjs/touchaction-Consts';\nimport { STATE_BEGAN } from '../recognizerjs/recognizer-consts';\n\n/**\n * @private\n * Pinch\n * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).\n * @constructor\n * @extends AttrRecognizer\n */\nexport default class PinchRecognizer extends AttrRecognizer {\n constructor(options = {}) {\n super({\n event: 'pinch',\n threshold: 0,\n pointers: 2,\n ...options,\n });\n }\n\n getTouchAction() {\n return [TOUCH_ACTION_NONE];\n }\n\n attrTest(input) {\n return super.attrTest(input) &&\n (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);\n }\n\n emit(input) {\n if (input.scale !== 1) {\n let inOut = input.scale < 1 ? 'in' : 'out';\n input.additionalEvent = this.options.event + inOut;\n }\n super.emit(input);\n }\n}\n","import AttrRecognizer from './attribute';\nimport { TOUCH_ACTION_NONE } from '../touchactionjs/touchaction-Consts';\nimport { STATE_BEGAN } from '../recognizerjs/recognizer-consts';\n\n/**\n * @private\n * Rotate\n * Recognized when two or more pointer are moving in a circular motion.\n * @constructor\n * @extends AttrRecognizer\n */\nexport default class RotateRecognizer extends AttrRecognizer {\n constructor(options = {}) {\n super( {\n event: 'rotate',\n threshold: 0,\n pointers: 2,\n ...options,\n });\n }\n\n getTouchAction() {\n return [TOUCH_ACTION_NONE];\n }\n\n attrTest(input) {\n return super.attrTest(input) &&\n (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);\n }\n}","import Recognizer from '../recognizerjs/recognizer-constructor';\nimport {\n STATE_RECOGNIZED,\n STATE_FAILED\n} from '../recognizerjs/recognizer-consts';\nimport { now } from '../utils/utils-consts';\nimport { TOUCH_ACTION_AUTO } from '../touchactionjs/touchaction-Consts';\nimport {\n INPUT_START,\n INPUT_END,\n INPUT_CANCEL\n} from '../inputjs/input-consts';\n\n/**\n * @private\n * Press\n * Recognized when the pointer is down for x ms without any movement.\n * @constructor\n * @extends Recognizer\n */\nexport default class PressRecognizer extends Recognizer {\n constructor(options = {}) {\n super({\n event: 'press',\n pointers: 1,\n time: 251, // minimal time of the pointer to be pressed\n threshold: 9, // a minimal movement is ok, but keep it low\n ...options,\n });\n this._timer = null;\n this._input = null;\n }\n\n getTouchAction() {\n return [TOUCH_ACTION_AUTO];\n }\n\n process(input) {\n let { options } = this;\n let validPointers = input.pointers.length === options.pointers;\n let validMovement = input.distance < options.threshold;\n let validTime = input.deltaTime > options.time;\n\n this._input = input;\n\n // we only allow little movement\n // and we've reached an end event, so a tap is possible\n if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) {\n this.reset();\n } else if (input.eventType & INPUT_START) {\n this.reset();\n this._timer = setTimeout(() => {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.time);\n } else if (input.eventType & INPUT_END) {\n return STATE_RECOGNIZED;\n }\n return STATE_FAILED;\n }\n\n reset() {\n clearTimeout(this._timer);\n }\n\n emit(input) {\n if (this.state !== STATE_RECOGNIZED) {\n return;\n }\n\n if (input && (input.eventType & INPUT_END)) {\n this.manager.emit(`${this.options.event}up`, input);\n } else {\n this._input.timeStamp = now();\n this.manager.emit(this.options.event, this._input);\n }\n }\n}\n\n","import { TOUCH_ACTION_COMPUTE } from \"./touchactionjs/touchaction-Consts\";\nimport TapRecognizer from \"./recognizers/tap\";\nimport PanRecognizer from \"./recognizers/pan\";\nimport SwipeRecognizer from \"./recognizers/swipe\";\nimport PinchRecognizer from \"./recognizers/pinch\";\nimport RotateRecognizer from \"./recognizers/rotate\";\nimport PressRecognizer from \"./recognizers/press\";\nimport {DIRECTION_HORIZONTAL} from \"./inputjs/input-consts\";\n\nexport default {\n\t/**\n\t * @private\n\t * set if DOM events are being triggered.\n\t * But this is slower and unused by simple implementations, so disabled by default.\n\t * @type {Boolean}\n\t * @default false\n\t */\n\tdomEvents: false,\n\n\t/**\n\t * @private\n\t * The value for the touchAction property/fallback.\n\t * When set to `compute` it will magically set the correct value based on the added recognizers.\n\t * @type {String}\n\t * @default compute\n\t */\n\ttouchAction: TOUCH_ACTION_COMPUTE,\n\n\t/**\n\t * @private\n\t * @type {Boolean}\n\t * @default true\n\t */\n\tenable: true,\n\n\t/**\n\t * @private\n\t * EXPERIMENTAL FEATURE -- can be removed/changed\n\t * Change the parent input target element.\n\t * If Null, then it is being set the to main element.\n\t * @type {Null|EventTarget}\n\t * @default null\n\t */\n\tinputTarget: null,\n\n\t/**\n\t * @private\n\t * force an input class\n\t * @type {Null|Function}\n\t * @default null\n\t */\n\tinputClass: null,\n\n\t/**\n\t * @private\n\t * Some CSS properties can be used to improve the working of Hammer.\n\t * Add them to this method and they will be set when creating a new Manager.\n\t * @namespace\n\t */\n\tcssProps: {\n\t\t/**\n\t\t * @private\n\t\t * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.\n\t\t * @type {String}\n\t\t * @default 'none'\n\t\t */\n\t\tuserSelect: \"none\",\n\n\t\t/**\n\t\t * @private\n\t\t * Disable the Windows Phone grippers when pressing an element.\n\t\t * @type {String}\n\t\t * @default 'none'\n\t\t */\n\t\ttouchSelect: \"none\",\n\n\t\t/**\n\t\t * @private\n\t\t * Disables the default callout shown when you touch and hold a touch target.\n\t\t * On iOS, when you touch and hold a touch target such as a link, Safari displays\n\t\t * a callout containing information about the link. This property allows you to disable that callout.\n\t\t * @type {String}\n\t\t * @default 'none'\n\t\t */\n\t\ttouchCallout: \"none\",\n\n\t\t/**\n\t\t * @private\n\t\t * Specifies whether zooming is enabled. Used by IE10>\n\t\t * @type {String}\n\t\t * @default 'none'\n\t\t */\n\t\tcontentZooming: \"none\",\n\n\t\t/**\n\t\t * @private\n\t\t * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.\n\t\t * @type {String}\n\t\t * @default 'none'\n\t\t */\n\t\tuserDrag: \"none\",\n\n\t\t/**\n\t\t * @private\n\t\t * Overrides the highlight color shown when the user taps a link or a JavaScript\n\t\t * clickable element in iOS. This property obeys the alpha value, if specified.\n\t\t * @type {String}\n\t\t * @default 'rgba(0,0,0,0)'\n\t\t */\n\t\ttapHighlightColor: \"rgba(0,0,0,0)\",\n\t},\n};\n\n/**\n * @private\n * Default recognizer setup when calling `Hammer()`\n * When creating a new Manager these will be skipped.\n * This is separated with other defaults because of tree-shaking.\n * @type {Array}\n */\nexport const preset = [\n [RotateRecognizer, { enable: false }],\n [PinchRecognizer, { enable: false }, ['rotate']],\n [SwipeRecognizer, { direction: DIRECTION_HORIZONTAL }],\n [PanRecognizer, { direction: DIRECTION_HORIZONTAL }, ['swipe']],\n [TapRecognizer],\n [TapRecognizer, { event: 'doubletap', taps: 2 }, ['tap']],\n [PressRecognizer]\n];\n","import assign from \"./utils/assign\";\nimport TouchAction from \"./touchactionjs/touchaction-constructor\";\nimport createInputInstance from \"./inputjs/create-input-instance\";\nimport each from \"./utils/each\";\nimport inArray from \"./utils/in-array\";\nimport invokeArrayArg from \"./utils/invoke-array-arg\";\nimport splitStr from \"./utils/split-str\";\nimport prefixed from \"./utils/prefixed\";\nimport Recognizer from \"./recognizerjs/recognizer-constructor\";\nimport {\n STATE_BEGAN,\n STATE_ENDED,\n STATE_CHANGED,\n STATE_RECOGNIZED,\n} from \"./recognizerjs/recognizer-consts\";\nimport defaults from \"./defaults\";\n\nconst STOP = 1;\nconst FORCED_STOP = 2;\n\n\n/**\n * @private\n * add/remove the css properties as defined in manager.options.cssProps\n * @param {Manager} manager\n * @param {Boolean} add\n */\nfunction toggleCssProps(manager, add) {\n const { element } = manager;\n\n if (!element.style) {\n return;\n }\n let prop;\n\n each(manager.options.cssProps, (value, name) => {\n prop = prefixed(element.style, name);\n if (add) {\n manager.oldCssProps[prop] = element.style[prop];\n element.style[prop] = value;\n } else {\n element.style[prop] = manager.oldCssProps[prop] || \"\";\n }\n });\n if (!add) {\n manager.oldCssProps = {};\n }\n}\n\n/**\n * @private\n * trigger dom event\n * @param {String} event\n * @param {Object} data\n */\nfunction triggerDomEvent(event, data) {\n const gestureEvent = document.createEvent(\"Event\");\n\n gestureEvent.initEvent(event, true, true);\n gestureEvent.gesture = data;\n data.target.dispatchEvent(gestureEvent);\n}\n\n\n/**\n* @private\n * Manager\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nexport default class Manager {\n constructor(element, options) {\n this.options = assign({}, defaults, options || {});\n\n this.options.inputTarget = this.options.inputTarget || element;\n\n this.handlers = {};\n this.session = {};\n this.recognizers = [];\n this.oldCssProps = {};\n\n this.element = element;\n this.input = createInputInstance(this);\n this.touchAction = new TouchAction(this, this.options.touchAction);\n\n toggleCssProps(this, true);\n\n each(this.options.recognizers, item => {\n const recognizer = this.add(new (item[0])(item[1]));\n\n item[2] && recognizer.recognizeWith(item[2]);\n item[3] && recognizer.requireFailure(item[3]);\n }, this);\n }\n\n\t/**\n\t * @private\n\t * set options\n\t * @param {Object} options\n\t * @returns {Manager}\n\t */\n set(options) {\n assign(this.options, options);\n\n // Options that need a little more setup\n if (options.touchAction) {\n this.touchAction.update();\n }\n if (options.inputTarget) {\n // Clean up existing event listeners and reinitialize\n this.input.destroy();\n this.input.target = options.inputTarget;\n this.input.init();\n }\n return this;\n }\n\n\t/**\n\t * @private\n\t * stop recognizing for this session.\n\t * This session will be discarded, when a new [input]start event is fired.\n\t * When forced, the recognizer cycle is stopped immediately.\n\t * @param {Boolean} [force]\n\t */\n stop(force) {\n this.session.stopped = force ? FORCED_STOP : STOP;\n }\n\n\t/**\n\t * @private\n\t * run the recognizers!\n\t * called by the inputHandler function on every movement of the pointers (touches)\n\t * it walks through all the recognizers and tries to detect the gesture that is being made\n\t * @param {Object} inputData\n\t */\n recognize(inputData) {\n const { session } = this;\n\n if (session.stopped) {\n return;\n }\n\n // run the touch-action polyfill\n this.touchAction.preventDefaults(inputData);\n\n let recognizer;\n const { recognizers } = this;\n\n // this holds the recognizer that is being recognized.\n // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED\n // if no recognizer is detecting a thing, it is set to `null`\n let { curRecognizer } = session;\n\n // reset when the last recognizer is recognized\n // or when we're in a new session\n if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) {\n session.curRecognizer = null;\n curRecognizer = null;\n }\n\n let i = 0;\n\n while (i < recognizers.length) {\n recognizer = recognizers[i];\n\n // find out if we are allowed try to recognize the input for this one.\n // 1. allow if the session is NOT forced stopped (see the .stop() method)\n // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one\n // that is being recognized.\n // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.\n // this can be setup with the `recognizeWith()` method on the recognizer.\n if (session.stopped !== FORCED_STOP && (// 1\n !curRecognizer || recognizer === curRecognizer || // 2\n recognizer.canRecognizeWith(curRecognizer))) { // 3\n recognizer.recognize(inputData);\n } else {\n recognizer.reset();\n }\n\n // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the\n // current active recognizer. but only if we don't already have an active recognizer\n if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {\n session.curRecognizer = recognizer;\n curRecognizer = recognizer;\n }\n i++;\n }\n }\n\n\t/**\n\t * @private\n\t * get a recognizer by its event name.\n\t * @param {Recognizer|String} recognizer\n\t * @returns {Recognizer|Null}\n\t */\n get(recognizer) {\n if (recognizer instanceof Recognizer) {\n return recognizer;\n }\n\n const { recognizers } = this;\n\n for (let i = 0; i < recognizers.length; i++) {\n if (recognizers[i].options.event === recognizer) {\n return recognizers[i];\n }\n }\n return null;\n }\n\n\t/**\n\t * @private add a recognizer to the manager\n\t * existing recognizers with the same event name will be removed\n\t * @param {Recognizer} recognizer\n\t * @returns {Recognizer|Manager}\n\t */\n add(recognizer) {\n if (invokeArrayArg(recognizer, \"add\", this)) {\n return this;\n }\n\n // remove existing\n const existing = this.get(recognizer.options.event);\n\n if (existing) {\n this.remove(existing);\n }\n\n this.recognizers.push(recognizer);\n recognizer.manager = this;\n\n this.touchAction.update();\n return recognizer;\n }\n\n\t/**\n\t * @private\n\t * remove a recognizer by name or instance\n\t * @param {Recognizer|String} recognizer\n\t * @returns {Manager}\n\t */\n remove(recognizer) {\n if (invokeArrayArg(recognizer, \"remove\", this)) {\n return this;\n }\n\n const targetRecognizer = this.get(recognizer);\n\n // let's make sure this recognizer exists\n if (recognizer) {\n const { recognizers } = this;\n const index = inArray(recognizers, targetRecognizer);\n\n if (index !== -1) {\n recognizers.splice(index, 1);\n this.touchAction.update();\n }\n }\n\n return this;\n }\n\n\t/**\n\t * @private\n\t * bind event\n\t * @param {String} events\n\t * @param {Function} handler\n\t * @returns {EventEmitter} this\n\t */\n on(events, handler) {\n if (events === undefined || handler === undefined) {\n return this;\n }\n\n const { handlers } = this;\n\n each(splitStr(events), event => {\n handlers[event] = handlers[event] || [];\n handlers[event].push(handler);\n });\n return this;\n }\n\n\t/**\n\t * @private unbind event, leave emit blank to remove all handlers\n\t * @param {String} events\n\t * @param {Function} [handler]\n\t * @returns {EventEmitter} this\n\t */\n off(events, handler) {\n if (events === undefined) {\n return this;\n }\n\n const { handlers } = this;\n\n each(splitStr(events), event => {\n if (!handler) {\n delete handlers[event];\n } else {\n handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);\n }\n });\n return this;\n }\n\n\t/**\n\t * @private emit event to the listeners\n\t * @param {String} event\n\t * @param {Object} data\n\t */\n emit(event, data) {\n // we also want to trigger dom events\n if (this.options.domEvents) {\n triggerDomEvent(event, data);\n }\n\n // no handlers, so skip it all\n const handlers = this.handlers[event] && this.handlers[event].slice();\n\n if (!handlers || !handlers.length) {\n return;\n }\n\n data.type = event;\n data.preventDefault = function () {\n data.srcEvent.preventDefault();\n };\n\n let i = 0;\n\n while (i < handlers.length) {\n handlers[i](data);\n i++;\n }\n }\n\n\t/**\n\t * @private\n\t * destroy the manager and unbinds all events\n\t * it doesn't unbind dom events, that is the user own responsibility\n\t */\n destroy() {\n this.element && toggleCssProps(this, false);\n\n this.handlers = {};\n this.session = {};\n this.input.destroy();\n this.element = null;\n }\n}\n","import { SUPPORT_POINTER_EVENTS,SUPPORT_ONLY_TOUCH,SUPPORT_TOUCH } from './input-consts';\nimport inputHandler from './input-handler';\nimport PointerEventInput from '../input/pointerevent';\nimport TouchInput from '../input/touch';\nimport MouseInput from '../input/mouse';\nimport TouchMouseInput from '../input/touchmouse';\n\n/**\n * @private\n * create new input type manager\n * called by the Manager constructor\n * @param {Hammer} manager\n * @returns {Input}\n */\nexport default function createInputInstance(manager) {\n let Type;\n // let inputClass = manager.options.inputClass;\n let { options:{ inputClass } } = manager;\n if (inputClass) {\n Type = inputClass;\n } else if (SUPPORT_POINTER_EVENTS) {\n Type = PointerEventInput;\n } else if (SUPPORT_ONLY_TOUCH) {\n Type = TouchInput;\n } else if (!SUPPORT_TOUCH) {\n Type = MouseInput;\n } else {\n Type = TouchMouseInput;\n }\n return new (Type)(manager, inputHandler);\n}\n","import {\n INPUT_START,\n INPUT_MOVE,\n INPUT_END,\n INPUT_CANCEL,\n INPUT_TYPE_TOUCH\n} from '../inputjs/input-consts';\nimport Input from '../inputjs/input-constructor';\nimport toArray from '../utils/to-array';\nimport uniqueArray from '../utils/unique-array';\n\nconst SINGLE_TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\n\nconst SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';\nconst SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * @private\n * Touch events input\n * @constructor\n * @extends Input\n */\nexport default class SingleTouchInput extends Input {\n constructor() {\n var proto = SingleTouchInput.prototype;\n proto.evTarget = SINGLE_TOUCH_TARGET_EVENTS;\n proto.evWin = SINGLE_TOUCH_WINDOW_EVENTS;\n\n super(...arguments);\n this.started = false;\n }\n\n handler(ev) {\n let type = SINGLE_TOUCH_INPUT_MAP[ev.type];\n\n // should we handle the touch events?\n if (type === INPUT_START) {\n this.started = true;\n }\n\n if (!this.started) {\n return;\n }\n\n let touches = normalizeSingleTouches.call(this, ev, type);\n\n // when done, reset the started state\n if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {\n this.started = false;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n}\n\n/**\n * @private\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction normalizeSingleTouches(ev, type) {\n let all = toArray(ev.touches);\n let changed = toArray(ev.changedTouches);\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n all = uniqueArray(all.concat(changed), 'identifier', true);\n }\n\n return [all, changed];\n}\n","/**\n * @private\n * wrap a method with a deprecation warning and stack trace\n * @param {Function} method\n * @param {String} name\n * @param {String} message\n * @returns {Function} A new function wrapping the supplied method.\n */\nexport default function deprecate(method, name, message) {\n let deprecationMessage = `DEPRECATED METHOD: ${name}\\n${message} AT \\n`;\n return function() {\n let e = new Error('get-stack-trace');\n let stack = e && e.stack ? e.stack.replace(/^[^\\(]+?[\\n$]/gm, '')\n .replace(/^\\s+at\\s+/gm, '')\n .replace(/^Object.\\s*\\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';\n\n let log = window.console && (window.console.warn || window.console.log);\n if (log) {\n log.call(window.console, deprecationMessage, stack);\n }\n return method.apply(this, arguments);\n };\n}\n","import deprecate from './deprecate';\n/**\n * @private\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} dest\n * @param {Object} src\n * @param {Boolean} [merge=false]\n * @returns {Object} dest\n */\nconst extend = deprecate((dest, src, merge) => {\n let keys = Object.keys(src);\n let i = 0;\n while (i < keys.length) {\n if (!merge || (merge && dest[keys[i]] === undefined)) {\n dest[keys[i]] = src[keys[i]];\n }\n i++;\n }\n return dest;\n}, 'extend', 'Use `assign`.');\n\nexport default extend;\n","import deprecate from './deprecate';\nimport extend from './extend';\n/**\n * @private\n * merge the values from src in the dest.\n * means that properties that exist in dest will not be overwritten by src\n * @param {Object} dest\n * @param {Object} src\n * @returns {Object} dest\n */\nconst merge = deprecate((dest, src) => {\n return extend(dest, src, true);\n}, 'merge', 'Use `assign`.');\n\nexport default merge;\n","import assign from './assign';\n/**\n * @private\n * simple class inheritance\n * @param {Function} child\n * @param {Function} base\n * @param {Object} [properties]\n */\nexport default function inherit(child, base, properties) {\n let baseP = base.prototype;\n let childP;\n\n childP = child.prototype = Object.create(baseP);\n childP.constructor = child;\n childP._super = baseP;\n\n if (properties) {\n assign(childP, properties);\n }\n}\n","/**\n * @private\n * simple function bind\n * @param {Function} fn\n * @param {Object} context\n * @returns {Function}\n */\nexport default function bindFn(fn, context) {\n return function boundFn() {\n return fn.apply(context, arguments);\n };\n}\n","import Manager from \"./manager\";\nimport defaults, { preset } from \"./defaults\";\nimport assign from './utils/assign';\nimport {\n INPUT_START,\n INPUT_MOVE,\n INPUT_END,\n INPUT_CANCEL,\n DIRECTION_NONE,\n DIRECTION_LEFT,\n DIRECTION_RIGHT,\n DIRECTION_UP,\n DIRECTION_DOWN,\n DIRECTION_HORIZONTAL,\n DIRECTION_VERTICAL,\n DIRECTION_ALL,\n} from \"./inputjs/input-consts\";\nimport {\n STATE_POSSIBLE,\n STATE_BEGAN,\n STATE_CHANGED,\n STATE_ENDED,\n STATE_RECOGNIZED,\n STATE_CANCELLED,\n STATE_FAILED,\n} from \"./recognizerjs/recognizer-consts\";\n\nimport Input from \"./inputjs/input-constructor\";\nimport TouchAction from \"./touchactionjs/touchaction-constructor\";\nimport TouchInput from \"./input/touch\";\nimport MouseInput from \"./input/mouse\";\nimport PointerEventInput from \"./input/pointerevent\";\nimport SingleTouchInput from \"./input/singletouch\";\nimport TouchMouseInput from \"./input/touchmouse\";\n\nimport Recognizer from \"./recognizerjs/recognizer-constructor\";\nimport AttrRecognizer from \"./recognizers/attribute\";\nimport TapRecognizer from \"./recognizers/tap\";\nimport PanRecognizer from \"./recognizers/pan\";\nimport SwipeRecognizer from \"./recognizers/swipe\";\nimport PinchRecognizer from \"./recognizers/pinch\";\nimport RotateRecognizer from \"./recognizers/rotate\";\nimport PressRecognizer from \"./recognizers/press\";\n\nimport addEventListeners from \"./utils/add-event-listeners\";\nimport removeEventListeners from \"./utils/remove-event-listeners\";\nimport each from \"./utils/each\";\nimport merge from \"./utils/merge\";\nimport extend from \"./utils/extend\";\nimport inherit from \"./utils/inherit\";\nimport bindFn from \"./utils/bind-fn\";\nimport prefixed from \"./utils/prefixed\";\nimport toArray from \"./utils/to-array\";\nimport uniqueArray from \"./utils/unique-array\";\nimport splitStr from \"./utils/split-str\";\nimport inArray from \"./utils/in-array\";\nimport boolOrFn from \"./utils/bool-or-fn\";\nimport hasParent from \"./utils/has-parent\";\n/**\n * @private\n * Simple way to create a manager with a default set of recognizers.\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nexport default class Hammer {\n\t/**\n * @private\n * @const {string}\n */\n\tstatic VERSION = \"#__VERSION__#\";\n\tstatic DIRECTION_ALL = DIRECTION_ALL;\n\tstatic DIRECTION_DOWN = DIRECTION_DOWN;\n\tstatic DIRECTION_LEFT = DIRECTION_LEFT;\n\tstatic DIRECTION_RIGHT = DIRECTION_RIGHT;\n\tstatic DIRECTION_UP = DIRECTION_UP;\n\tstatic DIRECTION_HORIZONTAL = DIRECTION_HORIZONTAL;\n\tstatic DIRECTION_VERTICAL = DIRECTION_VERTICAL;\n\tstatic DIRECTION_NONE = DIRECTION_NONE;\n\tstatic DIRECTION_DOWN = DIRECTION_DOWN;\n\tstatic INPUT_START = INPUT_START;\n\tstatic INPUT_MOVE = INPUT_MOVE;\n static INPUT_END = INPUT_END;\n\tstatic INPUT_CANCEL = INPUT_CANCEL;\n\tstatic STATE_POSSIBLE = STATE_POSSIBLE;\n\tstatic STATE_BEGAN = STATE_BEGAN;\n\tstatic STATE_CHANGED = STATE_CHANGED;\n\tstatic STATE_ENDED = STATE_ENDED;\n\tstatic STATE_RECOGNIZED = STATE_RECOGNIZED;\n\tstatic STATE_CANCELLED = STATE_CANCELLED;\n\tstatic STATE_FAILED = STATE_FAILED;\n\tstatic Manager = Manager;\n\tstatic Input = Input;\n\tstatic TouchAction = TouchAction;\n\tstatic TouchInput = TouchInput;\n\tstatic MouseInput = MouseInput;\n\tstatic PointerEventInput = PointerEventInput;\n\tstatic TouchMouseInput = TouchMouseInput;\n\tstatic SingleTouchInput = SingleTouchInput;\n\tstatic Recognizer = Recognizer;\n\tstatic AttrRecognizer = AttrRecognizer;\n\tstatic Tap = TapRecognizer;\n\tstatic Pan = PanRecognizer;\n\tstatic Swipe = SwipeRecognizer;\n\tstatic Pinch = PinchRecognizer;\n\tstatic Rotate = RotateRecognizer;\n\tstatic Press = PressRecognizer;\n\tstatic on = addEventListeners;\n\tstatic off = removeEventListeners;\n\tstatic each = each;\n\tstatic merge = merge;\n\tstatic extend = extend;\n\tstatic bindFn = bindFn;\n\tstatic assign = assign;\n\tstatic inherit = inherit;\n\tstatic bindFn = bindFn;\n\tstatic prefixed = prefixed;\n\tstatic toArray = toArray;\n\tstatic inArray = inArray;\n\tstatic uniqueArray = uniqueArray;\n\tstatic splitStr = splitStr;\n\tstatic boolOrFn = boolOrFn;\n\tstatic hasParent = hasParent;\n\tstatic addEventListeners = addEventListeners;\n\tstatic removeEventListeners = removeEventListeners;\n\tstatic defaults = assign({}, defaults, { preset });\n\tconstructor(element, options = {}) {\n\t\treturn new Manager(element, {\n\t\t\trecognizers: [\n // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]\n ...preset\n\t\t\t],\n\t\t\t...options,\n\t\t});\n\t}\n}\n","\nimport Hammer from \"./hammer\";\nimport assign from \"./utils/assign\";\n\nimport {\n INPUT_START,\n INPUT_MOVE,\n INPUT_END,\n INPUT_CANCEL,\n DIRECTION_NONE,\n DIRECTION_LEFT,\n DIRECTION_RIGHT,\n DIRECTION_UP,\n DIRECTION_DOWN,\n DIRECTION_HORIZONTAL,\n DIRECTION_VERTICAL,\n DIRECTION_ALL,\n} from \"./inputjs/input-consts\";\nimport {\n STATE_POSSIBLE,\n STATE_BEGAN,\n STATE_CHANGED,\n STATE_ENDED,\n STATE_RECOGNIZED,\n STATE_CANCELLED,\n STATE_FAILED,\n} from \"./recognizerjs/recognizer-consts\";\n\nimport Manager from \"./manager\";\nimport Input from \"./inputjs/input-constructor\";\nimport TouchAction from \"./touchactionjs/touchaction-constructor\";\nimport TouchInput from \"./input/touch\";\nimport MouseInput from \"./input/mouse\";\nimport PointerEventInput from \"./input/pointerevent\";\nimport SingleTouchInput from \"./input/singletouch\";\nimport TouchMouseInput from \"./input/touchmouse\";\n\nimport Recognizer from \"./recognizerjs/recognizer-constructor\";\nimport AttrRecognizer from \"./recognizers/attribute\";\nimport TapRecognizer from \"./recognizers/tap\";\nimport PanRecognizer from \"./recognizers/pan\";\nimport SwipeRecognizer from \"./recognizers/swipe\";\nimport PinchRecognizer from \"./recognizers/pinch\";\nimport RotateRecognizer from \"./recognizers/rotate\";\nimport PressRecognizer from \"./recognizers/press\";\n\nimport addEventListeners from \"./utils/add-event-listeners\";\nimport removeEventListeners from \"./utils/remove-event-listeners\";\nimport each from \"./utils/each\";\nimport merge from \"./utils/merge\";\nimport extend from \"./utils/extend\";\nimport inherit from \"./utils/inherit\";\nimport bindFn from \"./utils/bind-fn\";\nimport prefixed from \"./utils/prefixed\";\nimport toArray from \"./utils/to-array\";\nimport uniqueArray from \"./utils/unique-array\";\nimport splitStr from \"./utils/split-str\";\nimport inArray from \"./utils/in-array\";\nimport boolOrFn from \"./utils/bool-or-fn\";\nimport hasParent from \"./utils/has-parent\";\n\n// this prevents errors when Hammer is loaded in the presence of an AMD\n// style loader but by script tag, not by the loader.\n\nconst defaults = Hammer.defaults;\n\nexport {\n Hammer as default,\n INPUT_START,\n INPUT_MOVE,\n INPUT_END,\n INPUT_CANCEL,\n STATE_POSSIBLE,\n STATE_BEGAN,\n STATE_CHANGED,\n STATE_ENDED,\n STATE_RECOGNIZED,\n STATE_CANCELLED,\n STATE_FAILED,\n\n DIRECTION_NONE,\n DIRECTION_LEFT,\n DIRECTION_RIGHT,\n DIRECTION_UP,\n DIRECTION_DOWN,\n DIRECTION_HORIZONTAL,\n DIRECTION_VERTICAL,\n DIRECTION_ALL,\n Manager,\n Input,\n TouchAction,\n TouchInput,\n MouseInput,\n PointerEventInput,\n TouchMouseInput,\n SingleTouchInput,\n Recognizer,\n AttrRecognizer,\n TapRecognizer as Tap,\n PanRecognizer as Pan,\n SwipeRecognizer as Swipe,\n PinchRecognizer as Pinch,\n RotateRecognizer as Rotate,\n PressRecognizer as Press,\n addEventListeners as on,\n removeEventListeners as off,\n each,\n merge,\n extend,\n assign,\n inherit,\n bindFn,\n prefixed,\n toArray,\n inArray,\n uniqueArray,\n splitStr,\n boolOrFn,\n hasParent,\n addEventListeners,\n removeEventListeners,\n defaults,\n};\n","function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport { memoize as default };\n","import * as reactNative from 'react-native';\nimport { StyleSheet } from 'react-native';\nimport { createStyled, createCss } from '@emotion/primitives-core';\n\n/**\n * a function that returns a styled component which render styles in React Native\n */\n\nvar styled = createStyled(StyleSheet);\n\nvar css = createCss(reactNative.StyleSheet);\nvar components = ['ActivityIndicator', 'Button', 'DatePickerIOS', 'DrawerLayoutAndroid', 'FlatList', 'Image', 'ImageBackground', 'KeyboardAvoidingView', 'ListView', 'Modal', 'NavigatorIOS', 'Picker', 'PickerIOS', 'Pressable', 'ProgressBarAndroid', 'ProgressViewIOS', 'RecyclerViewBackedScrollView', 'RefreshControl', 'SafeAreaView', 'ScrollView', 'SectionList', 'SegmentedControlIOS', 'Slider', 'SnapshotViewIOS', 'StatusBar', 'SwipeableListView', 'Switch', 'SwitchIOS', 'TabBarIOS', 'Text', 'TextInput', 'ToolbarAndroid', 'TouchableHighlight', 'TouchableNativeFeedback', 'TouchableOpacity', 'TouchableWithoutFeedback', 'View', 'ViewPagerAndroid'];\nvar index = components.reduce(function (acc, comp) {\n return Object.defineProperty(acc, comp, {\n enumerable: true,\n configurable: false,\n get: function get() {\n return styled(reactNative[comp]);\n }\n });\n}, styled);\n\nexport { css, index as default };\n","import transform from 'css-to-react-native';\nimport * as React from 'react';\nimport { ThemeContext } from '@emotion/react';\n\nfunction interleave(vals) {\n var strings = vals[0];\n var finalArray = [strings[0]];\n\n for (var i = 1, len = vals.length; i < len; i++) {\n finalArray.push(vals[i]);\n\n if (strings[i] !== undefined) {\n finalArray.push(strings[i]);\n }\n }\n\n return finalArray;\n}\n\n// they're reset on every call to css\n// this is done so we don't create a new\n// handleInterpolation function on every css call\n\nvar styles;\nvar generated = {};\nvar buffer = '';\nvar lastType;\n\nfunction handleInterpolation(interpolation, i, arr) {\n var type = typeof interpolation;\n\n if (type === 'string') {\n // strip comments\n interpolation = interpolation.replace(/\\/\\*[\\s\\S]*?\\*\\/|\\/\\/.*$/gm, '');\n }\n\n if (type === 'function') {\n if (this === undefined) {\n if (process.env.NODE_ENV !== 'production') {\n console.error('Interpolating functions in css calls is not allowed.\\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\\n' + 'It can be called directly with props or interpolated in a styled call like this\\n' + 'let SomeComponent = styled.View`${dynamicStyle}`');\n }\n } else {\n handleInterpolation.call(this, interpolation( // $FlowFixMe\n this), i, arr);\n }\n\n return;\n }\n\n var isIrrelevant = interpolation == null || type === 'boolean';\n var isRnStyle = type === 'object' && !Array.isArray(interpolation) || type === 'number';\n\n if (lastType === 'string' && (isRnStyle || isIrrelevant)) {\n var converted = convertStyles(buffer);\n\n if (converted !== undefined) {\n styles.push(converted);\n }\n\n buffer = '';\n }\n\n if (isIrrelevant) {\n return;\n }\n\n if (type === 'string') {\n buffer += interpolation;\n\n if (arr.length - 1 === i) {\n var _converted = convertStyles(buffer);\n\n if (_converted !== undefined) {\n styles.push(_converted);\n }\n\n buffer = '';\n }\n }\n\n if (isRnStyle) {\n styles.push(interpolation);\n }\n\n if (Array.isArray(interpolation)) {\n interpolation.forEach(handleInterpolation, this);\n }\n\n lastType = type;\n} // Use platform specific StyleSheet method for creating the styles.\n// This enables us to use the css``/css({}) in any environment (Native | Sketch | Web)\n\n\nfunction createCss(StyleSheet) {\n return function css() {\n var prevBuffer = buffer;\n var vals; // these are declared earlier\n // this is done so we don't create a new\n // handleInterpolation function on every css call\n\n styles = [];\n buffer = '';\n lastType = undefined;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (args[0] == null || args[0].raw === undefined) {\n vals = args;\n } else {\n vals = interleave(args);\n }\n\n try {\n vals.forEach(handleInterpolation, this);\n } finally {\n buffer = prevBuffer;\n }\n\n var hash = JSON.stringify(styles);\n\n if (!generated[hash]) {\n var styleSheet = StyleSheet.create({\n generated: StyleSheet.flatten(styles)\n });\n generated[hash] = styleSheet.generated;\n }\n\n return generated[hash];\n };\n}\nvar propertyValuePattern = /\\s*([^\\s]+)\\s*:\\s*(.+?)\\s*$/;\n\nfunction convertPropertyValue(style) {\n // Get prop name and prop value\n var match = propertyValuePattern.exec(style); // match[2] will be \" \" in cases where there is no value\n // but there is whitespace, e.g. \"color: \"\n\n if (match !== null && match[2] !== ' ') {\n // the first value in the array will\n // be the whole string so we remove it\n match.shift(); // yes i know this looks funny\n\n this.push(match);\n }\n}\n\nfunction convertStyles(str) {\n if (str.trim() === '') return;\n var stylePairs = [];\n var parsedString = str.split(';');\n parsedString.forEach(convertPropertyValue, stylePairs);\n\n try {\n return transform(stylePairs);\n } catch (error) {\n var msg = error.message;\n\n if (msg.includes('Failed to parse declaration')) {\n var values = msg.replace('Failed to parse declaration ', '').replace(/\"/g, '').trim().split(':');\n var errorMsg = \"'\" + values[0] + \"' shorthand property requires units for example - \" + values[0] + \": 20px or \" + values[0] + \": 10px 20px 40px 50px\";\n console.error(errorMsg);\n }\n }\n}\n\nvar testOmitPropsOnComponent = function testOmitPropsOnComponent(prop) {\n return prop !== 'theme' && prop !== 'as';\n};\n\nfunction createStyled(StyleSheet, _temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$getShouldForward = _ref.getShouldForwardProp,\n getShouldForwardProp = _ref$getShouldForward === void 0 ? function () {\n return testOmitPropsOnComponent;\n } : _ref$getShouldForward;\n\n var css = createCss(StyleSheet);\n return function createEmotion(component, options) {\n var shouldForwardProp = options && options.shouldForwardProp ? options.shouldForwardProp : undefined;\n var defaultShouldForwardProp = shouldForwardProp || getShouldForwardProp(component);\n var shouldUseAs = !defaultShouldForwardProp('as');\n return function createStyledComponent() {\n var styles;\n\n for (var _len = arguments.length, rawStyles = new Array(_len), _key = 0; _key < _len; _key++) {\n rawStyles[_key] = arguments[_key];\n }\n\n if (rawStyles[0] == null || rawStyles[0].raw === undefined) {\n styles = rawStyles;\n } else {\n styles = interleave(rawStyles);\n } // do we really want to use the same infra as the web since it only really uses theming?\n // $FlowFixMe\n\n\n var Styled = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var finalTag = shouldUseAs && props.as || component;\n var mergedProps = props;\n\n if (props.theme == null) {\n mergedProps = {};\n\n for (var key in props) {\n mergedProps[key] = props[key];\n }\n\n mergedProps.theme = React.useContext(ThemeContext);\n }\n\n var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getShouldForwardProp(finalTag) : defaultShouldForwardProp;\n var newProps = {};\n\n for (var _key2 in props) {\n if (shouldUseAs && _key2 === 'as') continue;\n\n if (finalShouldForwardProp(_key2)) {\n newProps[_key2] = props[_key2];\n }\n }\n\n newProps.style = [css.apply(mergedProps, styles), props.style];\n newProps.ref = ref; // $FlowFixMe\n\n return /*#__PURE__*/React.createElement(finalTag, newProps);\n }); // $FlowFixMe\n\n Styled.withComponent = function (newComponent) {\n return createEmotion(newComponent).apply(void 0, styles);\n };\n\n Styled.displayName = \"emotion(\" + getDisplayName(component) + \")\";\n return Styled;\n };\n };\n}\n\nvar getDisplayName = function getDisplayName(primitive) {\n return typeof primitive === 'string' ? primitive : primitive.displayName || primitive.name || 'Styled';\n};\n\nexport { createCss, createStyled };\n","import hoistNonReactStatics$1 from 'hoist-non-react-statics';\n\n// this file isolates this package that is not tree-shakeable\n// and if this module doesn't actually contain any logic of its own\n// then Rollup just use 'hoist-non-react-statics' directly in other chunks\n\nvar hoistNonReactStatics = (function (targetComponent, sourceComponent) {\n return hoistNonReactStatics$1(targetComponent, sourceComponent);\n});\n\nexport { hoistNonReactStatics as default };\n","import * as React from 'react';\nimport { useContext, forwardRef } from 'react';\nimport createCache from '@emotion/cache';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport weakMemoize from '@emotion/weak-memoize';\nimport hoistNonReactStatics from '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport { getRegisteredStyles, registerStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\n\nvar isBrowser = \"object\" !== 'undefined';\nvar hasOwnProperty = {}.hasOwnProperty;\n\nvar EmotionCacheContext = /* #__PURE__ */React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({\n key: 'css'\n}) : null);\n\nif (process.env.NODE_ENV !== 'production') {\n EmotionCacheContext.displayName = 'EmotionCacheContext';\n}\n\nvar CacheProvider = EmotionCacheContext.Provider;\nvar __unsafe_useEmotionCache = function useEmotionCache() {\n return useContext(EmotionCacheContext);\n};\n\nvar withEmotionCache = function withEmotionCache(func) {\n // $FlowFixMe\n return /*#__PURE__*/forwardRef(function (props, ref) {\n // the cache will never be null in the browser\n var cache = useContext(EmotionCacheContext);\n return func(props, cache, ref);\n });\n};\n\nif (!isBrowser) {\n withEmotionCache = function withEmotionCache(func) {\n return function (props) {\n var cache = useContext(EmotionCacheContext);\n\n if (cache === null) {\n // yes, we're potentially creating this on every render\n // it doesn't actually matter though since it's only on the server\n // so there will only every be a single render\n // that could change in the future because of suspense and etc. but for now,\n // this works and i don't want to optimise for a future thing that we aren't sure about\n cache = createCache({\n key: 'css'\n });\n return /*#__PURE__*/React.createElement(EmotionCacheContext.Provider, {\n value: cache\n }, func(props, cache));\n } else {\n return func(props, cache);\n }\n };\n };\n}\n\nvar ThemeContext = /* #__PURE__ */React.createContext({});\n\nif (process.env.NODE_ENV !== 'production') {\n ThemeContext.displayName = 'EmotionThemeContext';\n}\n\nvar useTheme = function useTheme() {\n return React.useContext(ThemeContext);\n};\n\nvar getTheme = function getTheme(outerTheme, theme) {\n if (typeof theme === 'function') {\n var mergedTheme = theme(outerTheme);\n\n if (process.env.NODE_ENV !== 'production' && (mergedTheme == null || typeof mergedTheme !== 'object' || Array.isArray(mergedTheme))) {\n throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!');\n }\n\n return mergedTheme;\n }\n\n if (process.env.NODE_ENV !== 'production' && (theme == null || typeof theme !== 'object' || Array.isArray(theme))) {\n throw new Error('[ThemeProvider] Please make your theme prop a plain object');\n }\n\n return _extends({}, outerTheme, theme);\n};\n\nvar createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {\n return weakMemoize(function (theme) {\n return getTheme(outerTheme, theme);\n });\n});\nvar ThemeProvider = function ThemeProvider(props) {\n var theme = React.useContext(ThemeContext);\n\n if (props.theme !== theme) {\n theme = createCacheWithTheme(theme)(props.theme);\n }\n\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: theme\n }, props.children);\n};\nfunction withTheme(Component) {\n var componentName = Component.displayName || Component.name || 'Component';\n\n var render = function render(props, ref) {\n var theme = React.useContext(ThemeContext);\n return /*#__PURE__*/React.createElement(Component, _extends({\n theme: theme,\n ref: ref\n }, props));\n }; // $FlowFixMe\n\n\n var WithTheme = /*#__PURE__*/React.forwardRef(render);\n WithTheme.displayName = \"WithTheme(\" + componentName + \")\";\n return hoistNonReactStatics(WithTheme, Component);\n}\n\nvar getLastPart = function getLastPart(functionName) {\n // The match may be something like 'Object.createEmotionProps' or\n // 'Loader.prototype.render'\n var parts = functionName.split('.');\n return parts[parts.length - 1];\n};\n\nvar getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) {\n // V8\n var match = /^\\s+at\\s+([A-Za-z0-9$.]+)\\s/.exec(line);\n if (match) return getLastPart(match[1]); // Safari / Firefox\n\n match = /^([A-Za-z0-9$.]+)@/.exec(line);\n if (match) return getLastPart(match[1]);\n return undefined;\n};\n\nvar internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS\n// identifiers, thus we only need to replace what is a valid character for JS,\n// but not for CSS.\n\nvar sanitizeIdentifier = function sanitizeIdentifier(identifier) {\n return identifier.replace(/\\$/g, '-');\n};\n\nvar getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) {\n if (!stackTrace) return undefined;\n var lines = stackTrace.split('\\n');\n\n for (var i = 0; i < lines.length; i++) {\n var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just \"Error\"\n\n if (!functionName) continue; // If we reach one of these, we have gone too far and should quit\n\n if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an\n // uppercase letter\n\n if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName);\n }\n\n return undefined;\n};\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type, props) {\n if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' && // check if there is a css declaration\n props.css.indexOf(':') !== -1) {\n throw new Error(\"Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`\" + props.css + \"`\");\n }\n\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key)) {\n newProps[key] = props[key];\n }\n }\n\n newProps[typePropName] = type; // For performance, only call getLabelFromStackTrace in development and when\n // the label hasn't already been computed\n\n if (process.env.NODE_ENV !== 'production' && !!props.css && (typeof props.css !== 'object' || typeof props.css.name !== 'string' || props.css.name.indexOf('-') === -1)) {\n var label = getLabelFromStackTrace(new Error().stack);\n if (label) newProps[labelPropName] = label;\n }\n\n return newProps;\n};\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serialized = _ref.serialized,\n isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n useInsertionEffectAlwaysWithSyncFallback(function () {\n return insertStyles(cache, serialized, isStringTag);\n });\n\n return null;\n};\n\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n\n var WrappedComponent = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext));\n\n if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {\n var labelFromStack = props[labelPropName];\n\n if (labelFromStack) {\n serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);\n }\n }\n\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {\n newProps[key] = props[key];\n }\n }\n\n newProps.ref = ref;\n newProps.className = className;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof WrappedComponent === 'string'\n }), /*#__PURE__*/React.createElement(WrappedComponent, newProps));\n});\n\nif (process.env.NODE_ENV !== 'production') {\n Emotion.displayName = 'EmotionCssPropInternal';\n}\n\nvar Emotion$1 = Emotion;\n\nexport { CacheProvider as C, Emotion$1 as E, ThemeContext as T, __unsafe_useEmotionCache as _, ThemeProvider as a, withTheme as b, createEmotionProps as c, hasOwnProperty as h, isBrowser as i, useTheme as u, withEmotionCache as w };\n","import { h as hasOwnProperty, E as Emotion, c as createEmotionProps, w as withEmotionCache, T as ThemeContext, i as isBrowser$1 } from './emotion-element-c39617d8.browser.esm.js';\nexport { C as CacheProvider, T as ThemeContext, a as ThemeProvider, _ as __unsafe_useEmotionCache, u as useTheme, w as withEmotionCache, b as withTheme } from './emotion-element-c39617d8.browser.esm.js';\nimport * as React from 'react';\nimport { insertStyles, registerStyles, getRegisteredStyles } from '@emotion/utils';\nimport { useInsertionEffectWithLayoutFallback, useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\nimport { serializeStyles } from '@emotion/serialize';\nimport '@emotion/cache';\nimport '@babel/runtime/helpers/extends';\nimport '@emotion/weak-memoize';\nimport '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport 'hoist-non-react-statics';\n\nvar pkg = {\n\tname: \"@emotion/react\",\n\tversion: \"11.11.1\",\n\tmain: \"dist/emotion-react.cjs.js\",\n\tmodule: \"dist/emotion-react.esm.js\",\n\tbrowser: {\n\t\t\"./dist/emotion-react.esm.js\": \"./dist/emotion-react.browser.esm.js\"\n\t},\n\texports: {\n\t\t\".\": {\n\t\t\tmodule: {\n\t\t\t\tworker: \"./dist/emotion-react.worker.esm.js\",\n\t\t\t\tbrowser: \"./dist/emotion-react.browser.esm.js\",\n\t\t\t\t\"default\": \"./dist/emotion-react.esm.js\"\n\t\t\t},\n\t\t\t\"import\": \"./dist/emotion-react.cjs.mjs\",\n\t\t\t\"default\": \"./dist/emotion-react.cjs.js\"\n\t\t},\n\t\t\"./jsx-runtime\": {\n\t\t\tmodule: {\n\t\t\t\tworker: \"./jsx-runtime/dist/emotion-react-jsx-runtime.worker.esm.js\",\n\t\t\t\tbrowser: \"./jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js\",\n\t\t\t\t\"default\": \"./jsx-runtime/dist/emotion-react-jsx-runtime.esm.js\"\n\t\t\t},\n\t\t\t\"import\": \"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.mjs\",\n\t\t\t\"default\": \"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js\"\n\t\t},\n\t\t\"./_isolated-hnrs\": {\n\t\t\tmodule: {\n\t\t\t\tworker: \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.worker.esm.js\",\n\t\t\t\tbrowser: \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js\",\n\t\t\t\t\"default\": \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js\"\n\t\t\t},\n\t\t\t\"import\": \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.mjs\",\n\t\t\t\"default\": \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.js\"\n\t\t},\n\t\t\"./jsx-dev-runtime\": {\n\t\t\tmodule: {\n\t\t\t\tworker: \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.worker.esm.js\",\n\t\t\t\tbrowser: \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js\",\n\t\t\t\t\"default\": \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.esm.js\"\n\t\t\t},\n\t\t\t\"import\": \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.mjs\",\n\t\t\t\"default\": \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js\"\n\t\t},\n\t\t\"./package.json\": \"./package.json\",\n\t\t\"./types/css-prop\": \"./types/css-prop.d.ts\",\n\t\t\"./macro\": {\n\t\t\ttypes: {\n\t\t\t\t\"import\": \"./macro.d.mts\",\n\t\t\t\t\"default\": \"./macro.d.ts\"\n\t\t\t},\n\t\t\t\"default\": \"./macro.js\"\n\t\t}\n\t},\n\ttypes: \"types/index.d.ts\",\n\tfiles: [\n\t\t\"src\",\n\t\t\"dist\",\n\t\t\"jsx-runtime\",\n\t\t\"jsx-dev-runtime\",\n\t\t\"_isolated-hnrs\",\n\t\t\"types/*.d.ts\",\n\t\t\"macro.*\"\n\t],\n\tsideEffects: false,\n\tauthor: \"Emotion Contributors\",\n\tlicense: \"MIT\",\n\tscripts: {\n\t\t\"test:typescript\": \"dtslint types\"\n\t},\n\tdependencies: {\n\t\t\"@babel/runtime\": \"^7.18.3\",\n\t\t\"@emotion/babel-plugin\": \"^11.11.0\",\n\t\t\"@emotion/cache\": \"^11.11.0\",\n\t\t\"@emotion/serialize\": \"^1.1.2\",\n\t\t\"@emotion/use-insertion-effect-with-fallbacks\": \"^1.0.1\",\n\t\t\"@emotion/utils\": \"^1.2.1\",\n\t\t\"@emotion/weak-memoize\": \"^0.3.1\",\n\t\t\"hoist-non-react-statics\": \"^3.3.1\"\n\t},\n\tpeerDependencies: {\n\t\treact: \">=16.8.0\"\n\t},\n\tpeerDependenciesMeta: {\n\t\t\"@types/react\": {\n\t\t\toptional: true\n\t\t}\n\t},\n\tdevDependencies: {\n\t\t\"@definitelytyped/dtslint\": \"0.0.112\",\n\t\t\"@emotion/css\": \"11.11.0\",\n\t\t\"@emotion/css-prettifier\": \"1.1.3\",\n\t\t\"@emotion/server\": \"11.11.0\",\n\t\t\"@emotion/styled\": \"11.11.0\",\n\t\t\"html-tag-names\": \"^1.1.2\",\n\t\treact: \"16.14.0\",\n\t\t\"svg-tag-names\": \"^1.1.1\",\n\t\ttypescript: \"^4.5.5\"\n\t},\n\trepository: \"https://github.com/emotion-js/emotion/tree/main/packages/react\",\n\tpublishConfig: {\n\t\taccess: \"public\"\n\t},\n\t\"umd:main\": \"dist/emotion-react.umd.min.js\",\n\tpreconstruct: {\n\t\tentrypoints: [\n\t\t\t\"./index.js\",\n\t\t\t\"./jsx-runtime.js\",\n\t\t\t\"./jsx-dev-runtime.js\",\n\t\t\t\"./_isolated-hnrs.js\"\n\t\t],\n\t\tumdName: \"emotionReact\",\n\t\texports: {\n\t\t\tenvConditions: [\n\t\t\t\t\"browser\",\n\t\t\t\t\"worker\"\n\t\t\t],\n\t\t\textra: {\n\t\t\t\t\"./types/css-prop\": \"./types/css-prop.d.ts\",\n\t\t\t\t\"./macro\": {\n\t\t\t\t\ttypes: {\n\t\t\t\t\t\t\"import\": \"./macro.d.mts\",\n\t\t\t\t\t\t\"default\": \"./macro.d.ts\"\n\t\t\t\t\t},\n\t\t\t\t\t\"default\": \"./macro.js\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nvar jsx = function jsx(type, props) {\n var args = arguments;\n\n if (props == null || !hasOwnProperty.call(props, 'css')) {\n // $FlowFixMe\n return React.createElement.apply(undefined, args);\n }\n\n var argsLength = args.length;\n var createElementArgArray = new Array(argsLength);\n createElementArgArray[0] = Emotion;\n createElementArgArray[1] = createEmotionProps(type, props);\n\n for (var i = 2; i < argsLength; i++) {\n createElementArgArray[i] = args[i];\n } // $FlowFixMe\n\n\n return React.createElement.apply(null, createElementArgArray);\n};\n\nvar warnedAboutCssPropForGlobal = false; // maintain place over rerenders.\n// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild\n// initial client-side render from SSR, use place of hydrating tag\n\nvar Global = /* #__PURE__ */withEmotionCache(function (props, cache) {\n if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal && ( // check for className as well since the user is\n // probably using the custom createElement which\n // means it will be turned into a className prop\n // $FlowFixMe I don't really want to add it to the type since it shouldn't be used\n props.className || props.css)) {\n console.error(\"It looks like you're using the css prop on Global, did you mean to use the styles prop instead?\");\n warnedAboutCssPropForGlobal = true;\n }\n\n var styles = props.styles;\n var serialized = serializeStyles([styles], undefined, React.useContext(ThemeContext));\n\n if (!isBrowser$1) {\n var _ref;\n\n var serializedNames = serialized.name;\n var serializedStyles = serialized.styles;\n var next = serialized.next;\n\n while (next !== undefined) {\n serializedNames += ' ' + next.name;\n serializedStyles += next.styles;\n next = next.next;\n }\n\n var shouldCache = cache.compat === true;\n var rules = cache.insert(\"\", {\n name: serializedNames,\n styles: serializedStyles\n }, cache.sheet, shouldCache);\n\n if (shouldCache) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(\"style\", (_ref = {}, _ref[\"data-emotion\"] = cache.key + \"-global \" + serializedNames, _ref.dangerouslySetInnerHTML = {\n __html: rules\n }, _ref.nonce = cache.sheet.nonce, _ref));\n } // yes, i know these hooks are used conditionally\n // but it is based on a constant that will never change at runtime\n // it's effectively like having two implementations and switching them out\n // so it's not actually breaking anything\n\n\n var sheetRef = React.useRef();\n useInsertionEffectWithLayoutFallback(function () {\n var key = cache.key + \"-global\"; // use case of https://github.com/emotion-js/emotion/issues/2675\n\n var sheet = new cache.sheet.constructor({\n key: key,\n nonce: cache.sheet.nonce,\n container: cache.sheet.container,\n speedy: cache.sheet.isSpeedy\n });\n var rehydrating = false; // $FlowFixMe\n\n var node = document.querySelector(\"style[data-emotion=\\\"\" + key + \" \" + serialized.name + \"\\\"]\");\n\n if (cache.sheet.tags.length) {\n sheet.before = cache.sheet.tags[0];\n }\n\n if (node !== null) {\n rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other s\n\n node.setAttribute('data-emotion', key);\n sheet.hydrate([node]);\n }\n\n sheetRef.current = [sheet, rehydrating];\n return function () {\n sheet.flush();\n };\n }, [cache]);\n useInsertionEffectWithLayoutFallback(function () {\n var sheetRefCurrent = sheetRef.current;\n var sheet = sheetRefCurrent[0],\n rehydrating = sheetRefCurrent[1];\n\n if (rehydrating) {\n sheetRefCurrent[1] = false;\n return;\n }\n\n if (serialized.next !== undefined) {\n // insert keyframes\n insertStyles(cache, serialized.next, true);\n }\n\n if (sheet.tags.length) {\n // if this doesn't exist then it will be null so the style element will be appended\n var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;\n sheet.before = element;\n sheet.flush();\n }\n\n cache.insert(\"\", serialized, sheet, false);\n }, [cache, serialized.name]);\n return null;\n});\n\nif (process.env.NODE_ENV !== 'production') {\n Global.displayName = 'EmotionGlobal';\n}\n\nfunction css() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return serializeStyles(args);\n}\n\nvar keyframes = function keyframes() {\n var insertable = css.apply(void 0, arguments);\n var name = \"animation-\" + insertable.name; // $FlowFixMe\n\n return {\n name: name,\n styles: \"@keyframes \" + name + \"{\" + insertable.styles + \"}\",\n anim: 1,\n toString: function toString() {\n return \"_EMO_\" + this.name + \"_\" + this.styles + \"_EMO_\";\n }\n };\n};\n\nvar classnames = function classnames(args) {\n var len = args.length;\n var i = 0;\n var cls = '';\n\n for (; i < len; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n\n switch (typeof arg) {\n case 'boolean':\n break;\n\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n if (process.env.NODE_ENV !== 'production' && arg.styles !== undefined && arg.name !== undefined) {\n console.error('You have passed styles created with `css` from `@emotion/react` package to the `cx`.\\n' + '`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from component.');\n }\n\n toAdd = '';\n\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n\n break;\n }\n\n default:\n {\n toAdd = arg;\n }\n }\n\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n\n return cls;\n};\n\nfunction merge(registered, css, className) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n if (registeredStyles.length < 2) {\n return className;\n }\n\n return rawClassName + css(registeredStyles);\n}\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serializedArr = _ref.serializedArr;\n useInsertionEffectAlwaysWithSyncFallback(function () {\n\n for (var i = 0; i < serializedArr.length; i++) {\n insertStyles(cache, serializedArr[i], false);\n }\n });\n\n return null;\n};\n\nvar ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {\n var hasRendered = false;\n var serializedArr = [];\n\n var css = function css() {\n if (hasRendered && process.env.NODE_ENV !== 'production') {\n throw new Error('css can only be used during render');\n }\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n serializedArr.push(serialized); // registration has to happen here as the result of this might get consumed by `cx`\n\n registerStyles(cache, serialized, false);\n return cache.key + \"-\" + serialized.name;\n };\n\n var cx = function cx() {\n if (hasRendered && process.env.NODE_ENV !== 'production') {\n throw new Error('cx can only be used during render');\n }\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return merge(cache.registered, css, classnames(args));\n };\n\n var content = {\n css: css,\n cx: cx,\n theme: React.useContext(ThemeContext)\n };\n var ele = props.children(content);\n hasRendered = true;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serializedArr: serializedArr\n }), ele);\n});\n\nif (process.env.NODE_ENV !== 'production') {\n ClassNames.displayName = 'EmotionClassNames';\n}\n\nif (process.env.NODE_ENV !== 'production') {\n var isBrowser = \"object\" !== 'undefined'; // #1727, #2905 for some reason Jest and Vitest evaluate modules twice if some consuming module gets mocked\n\n var isTestEnv = typeof jest !== 'undefined' || typeof vi !== 'undefined';\n\n if (isBrowser && !isTestEnv) {\n // globalThis has wide browser support - https://caniuse.com/?search=globalThis, Node.js 12 and later\n var globalContext = // $FlowIgnore\n typeof globalThis !== 'undefined' ? globalThis // eslint-disable-line no-undef\n : isBrowser ? window : global;\n var globalKey = \"__EMOTION_REACT_\" + pkg.version.split('.')[0] + \"__\";\n\n if (globalContext[globalKey]) {\n console.warn('You are loading @emotion/react when it is already loaded. Running ' + 'multiple instances may cause problems. This can happen if multiple ' + 'versions are used, or if multiple builds of the same version are ' + 'used.');\n }\n\n globalContext[globalKey] = true;\n }\n}\n\nexport { ClassNames, Global, jsx as createElement, css, jsx, keyframes };\n","import * as ReactJSXRuntime from 'react/jsx-runtime';\nimport { h as hasOwnProperty, E as Emotion, c as createEmotionProps } from '../../dist/emotion-element-c39617d8.browser.esm.js';\nimport 'react';\nimport '@emotion/cache';\nimport '@babel/runtime/helpers/extends';\nimport '@emotion/weak-memoize';\nimport '../../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport 'hoist-non-react-statics';\nimport '@emotion/utils';\nimport '@emotion/serialize';\nimport '@emotion/use-insertion-effect-with-fallbacks';\n\nvar Fragment = ReactJSXRuntime.Fragment;\nfunction jsx(type, props, key) {\n if (!hasOwnProperty.call(props, 'css')) {\n return ReactJSXRuntime.jsx(type, props, key);\n }\n\n return ReactJSXRuntime.jsx(Emotion, createEmotionProps(type, props), key);\n}\nfunction jsxs(type, props, key) {\n if (!hasOwnProperty.call(props, 'css')) {\n return ReactJSXRuntime.jsxs(type, props, key);\n }\n\n return ReactJSXRuntime.jsxs(Emotion, createEmotionProps(type, props), key);\n}\n\nexport { Fragment, jsx, jsxs };\n","import { StyleSheet } from '@emotion/sheet';\nimport { dealloc, alloc, next, token, from, peek, delimit, slice, position, RULESET, combine, match, serialize, copy, replace, WEBKIT, MOZ, MS, KEYFRAMES, DECLARATION, hash, charat, strlen, indexof, stringify, COMMENT, rulesheet, middleware, compile } from 'stylis';\nimport '@emotion/weak-memoize';\nimport '@emotion/memoize';\n\nvar identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {\n var previous = 0;\n var character = 0;\n\n while (true) {\n previous = character;\n character = peek(); // &\\f\n\n if (previous === 38 && character === 12) {\n points[index] = 1;\n }\n\n if (token(character)) {\n break;\n }\n\n next();\n }\n\n return slice(begin, position);\n};\n\nvar toRules = function toRules(parsed, points) {\n // pretend we've started with a comma\n var index = -1;\n var character = 44;\n\n do {\n switch (token(character)) {\n case 0:\n // &\\f\n if (character === 38 && peek() === 12) {\n // this is not 100% correct, we don't account for literal sequences here - like for example quoted strings\n // stylis inserts \\f after & to know when & where it should replace this sequence with the context selector\n // and when it should just concatenate the outer and inner selectors\n // it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here\n points[index] = 1;\n }\n\n parsed[index] += identifierWithPointTracking(position - 1, points, index);\n break;\n\n case 2:\n parsed[index] += delimit(character);\n break;\n\n case 4:\n // comma\n if (character === 44) {\n // colon\n parsed[++index] = peek() === 58 ? '&\\f' : '';\n points[index] = parsed[index].length;\n break;\n }\n\n // fallthrough\n\n default:\n parsed[index] += from(character);\n }\n } while (character = next());\n\n return parsed;\n};\n\nvar getRules = function getRules(value, points) {\n return dealloc(toRules(alloc(value), points));\n}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11\n\n\nvar fixedElements = /* #__PURE__ */new WeakMap();\nvar compat = function compat(element) {\n if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo\n // negative .length indicates that this rule has been already prefixed\n element.length < 1) {\n return;\n }\n\n var value = element.value,\n parent = element.parent;\n var isImplicitRule = element.column === parent.column && element.line === parent.line;\n\n while (parent.type !== 'rule') {\n parent = parent.parent;\n if (!parent) return;\n } // short-circuit for the simplest case\n\n\n if (element.props.length === 1 && value.charCodeAt(0) !== 58\n /* colon */\n && !fixedElements.get(parent)) {\n return;\n } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)\n // then the props has already been manipulated beforehand as they that array is shared between it and its \"rule parent\"\n\n\n if (isImplicitRule) {\n return;\n }\n\n fixedElements.set(element, true);\n var points = [];\n var rules = getRules(value, points);\n var parentRules = parent.props;\n\n for (var i = 0, k = 0; i < rules.length; i++) {\n for (var j = 0; j < parentRules.length; j++, k++) {\n element.props[k] = points[i] ? rules[i].replace(/&\\f/g, parentRules[j]) : parentRules[j] + \" \" + rules[i];\n }\n }\n};\nvar removeLabel = function removeLabel(element) {\n if (element.type === 'decl') {\n var value = element.value;\n\n if ( // charcode for l\n value.charCodeAt(0) === 108 && // charcode for b\n value.charCodeAt(2) === 98) {\n // this ignores label\n element[\"return\"] = '';\n element.value = '';\n }\n }\n};\nvar ignoreFlag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';\n\nvar isIgnoringComment = function isIgnoringComment(element) {\n return element.type === 'comm' && element.children.indexOf(ignoreFlag) > -1;\n};\n\nvar createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) {\n return function (element, index, children) {\n if (element.type !== 'rule' || cache.compat) return;\n var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);\n\n if (unsafePseudoClasses) {\n var isNested = !!element.parent; // in nested rules comments become children of the \"auto-inserted\" rule and that's always the `element.parent`\n //\n // considering this input:\n // .a {\n // .b /* comm */ {}\n // color: hotpink;\n // }\n // we get output corresponding to this:\n // .a {\n // & {\n // /* comm */\n // color: hotpink;\n // }\n // .b {}\n // }\n\n var commentContainer = isNested ? element.parent.children : // global rule at the root level\n children;\n\n for (var i = commentContainer.length - 1; i >= 0; i--) {\n var node = commentContainer[i];\n\n if (node.line < element.line) {\n break;\n } // it is quite weird but comments are *usually* put at `column: element.column - 1`\n // so we seek *from the end* for the node that is earlier than the rule's `element` and check that\n // this will also match inputs like this:\n // .a {\n // /* comm */\n // .b {}\n // }\n //\n // but that is fine\n //\n // it would be the easiest to change the placement of the comment to be the first child of the rule:\n // .a {\n // .b { /* comm */ }\n // }\n // with such inputs we wouldn't have to search for the comment at all\n // TODO: consider changing this comment placement in the next major version\n\n\n if (node.column < element.column) {\n if (isIgnoringComment(node)) {\n return;\n }\n\n break;\n }\n }\n\n unsafePseudoClasses.forEach(function (unsafePseudoClass) {\n console.error(\"The pseudo class \\\"\" + unsafePseudoClass + \"\\\" is potentially unsafe when doing server-side rendering. Try changing it to \\\"\" + unsafePseudoClass.split('-child')[0] + \"-of-type\\\".\");\n });\n }\n };\n};\n\nvar isImportRule = function isImportRule(element) {\n return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64;\n};\n\nvar isPrependedWithRegularRules = function isPrependedWithRegularRules(index, children) {\n for (var i = index - 1; i >= 0; i--) {\n if (!isImportRule(children[i])) {\n return true;\n }\n }\n\n return false;\n}; // use this to remove incorrect elements from further processing\n// so they don't get handed to the `sheet` (or anything else)\n// as that could potentially lead to additional logs which in turn could be overhelming to the user\n\n\nvar nullifyElement = function nullifyElement(element) {\n element.type = '';\n element.value = '';\n element[\"return\"] = '';\n element.children = '';\n element.props = '';\n};\n\nvar incorrectImportAlarm = function incorrectImportAlarm(element, index, children) {\n if (!isImportRule(element)) {\n return;\n }\n\n if (element.parent) {\n console.error(\"`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles.\");\n nullifyElement(element);\n } else if (isPrependedWithRegularRules(index, children)) {\n console.error(\"`@import` rules can't be after other rules. Please put your `@import` rules before your other rules.\");\n nullifyElement(element);\n }\n};\n\n/* eslint-disable no-fallthrough */\n\nfunction prefix(value, length) {\n switch (hash(value, length)) {\n // color-adjust\n case 5103:\n return WEBKIT + 'print-' + value + value;\n // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n\n case 5737:\n case 4201:\n case 3177:\n case 3433:\n case 1641:\n case 4457:\n case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n\n case 5572:\n case 6356:\n case 5844:\n case 3191:\n case 6645:\n case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,\n\n case 6391:\n case 5879:\n case 5623:\n case 6135:\n case 4599:\n case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n\n case 4215:\n case 6389:\n case 5109:\n case 5365:\n case 5621:\n case 3829:\n return WEBKIT + value + value;\n // appearance, user-select, transform, hyphens, text-size-adjust\n\n case 5349:\n case 4246:\n case 4810:\n case 6968:\n case 2756:\n return WEBKIT + value + MOZ + value + MS + value + value;\n // flex, flex-direction\n\n case 6828:\n case 4268:\n return WEBKIT + value + MS + value + value;\n // order\n\n case 6165:\n return WEBKIT + value + MS + 'flex-' + value + value;\n // align-items\n\n case 5187:\n return WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;\n // align-self\n\n case 5443:\n return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;\n // align-content\n\n case 4675:\n return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;\n // flex-shrink\n\n case 5548:\n return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;\n // flex-basis\n\n case 5292:\n return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;\n // flex-grow\n\n case 6060:\n return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;\n // transition\n\n case 4554:\n return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;\n // cursor\n\n case 6187:\n return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;\n // background, background-image\n\n case 5495:\n case 3959:\n return replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1');\n // justify-content\n\n case 4968:\n return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;\n // (margin|padding)-inline-(start|end)\n\n case 4095:\n case 3583:\n case 4068:\n case 2532:\n return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;\n // (min|max)?(width|height|inline-size|block-size)\n\n case 8116:\n case 7059:\n case 5753:\n case 5535:\n case 5445:\n case 5701:\n case 4933:\n case 4677:\n case 5533:\n case 5789:\n case 5021:\n case 4765:\n // stretch, max-content, min-content, fill-available\n if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {\n // (m)ax-content, (m)in-content\n case 109:\n // -\n if (charat(value, length + 4) !== 45) break;\n // (f)ill-available, (f)it-content\n\n case 102:\n return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;\n // (s)tretch\n\n case 115:\n return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;\n }\n break;\n // position: sticky\n\n case 4949:\n // (s)ticky?\n if (charat(value, length + 1) !== 115) break;\n // display: (flex|inline-flex)\n\n case 6444:\n switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {\n // stic(k)y\n case 107:\n return replace(value, ':', ':' + WEBKIT) + value;\n // (inline-)?fl(e)x\n\n case 101:\n return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;\n }\n\n break;\n // writing-mode\n\n case 5936:\n switch (charat(value, length + 11)) {\n // vertical-l(r)\n case 114:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value;\n // vertical-r(l)\n\n case 108:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value;\n // horizontal(-)tb\n\n case 45:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value;\n }\n\n return WEBKIT + value + MS + value + value;\n }\n\n return value;\n}\n\nvar prefixer = function prefixer(element, index, children, callback) {\n if (element.length > -1) if (!element[\"return\"]) switch (element.type) {\n case DECLARATION:\n element[\"return\"] = prefix(element.value, element.length);\n break;\n\n case KEYFRAMES:\n return serialize([copy(element, {\n value: replace(element.value, '@', '@' + WEBKIT)\n })], callback);\n\n case RULESET:\n if (element.length) return combine(element.props, function (value) {\n switch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n // :read-(only|write)\n case ':read-only':\n case ':read-write':\n return serialize([copy(element, {\n props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]\n })], callback);\n // :placeholder\n\n case '::placeholder':\n return serialize([copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]\n })], callback);\n }\n\n return '';\n });\n }\n};\n\nvar defaultStylisPlugins = [prefixer];\n\nvar createCache = function createCache(options) {\n var key = options.key;\n\n if (process.env.NODE_ENV !== 'production' && !key) {\n throw new Error(\"You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\\n\" + \"If multiple caches share the same key they might \\\"fight\\\" for each other's style elements.\");\n }\n\n if (key === 'css') {\n var ssrStyles = document.querySelectorAll(\"style[data-emotion]:not([data-s])\"); // get SSRed styles out of the way of React's hydration\n // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)\n // note this very very intentionally targets all style elements regardless of the key to ensure\n // that creating a cache works inside of render of a React component\n\n Array.prototype.forEach.call(ssrStyles, function (node) {\n // we want to only move elements which have a space in the data-emotion attribute value\n // because that indicates that it is an Emotion 11 server-side rendered style elements\n // while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector\n // Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)\n // so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles\n // will not result in the Emotion 10 styles being destroyed\n var dataEmotionAttribute = node.getAttribute('data-emotion');\n\n if (dataEmotionAttribute.indexOf(' ') === -1) {\n return;\n }\n document.head.appendChild(node);\n node.setAttribute('data-s', '');\n });\n }\n\n var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;\n\n if (process.env.NODE_ENV !== 'production') {\n // $FlowFixMe\n if (/[^a-z-]/.test(key)) {\n throw new Error(\"Emotion key must only contain lower case alphabetical characters and - but \\\"\" + key + \"\\\" was passed\");\n }\n }\n\n var inserted = {};\n var container;\n var nodesToHydrate = [];\n\n {\n container = options.container || document.head;\n Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which\n // means that the style elements we're looking at are only Emotion 11 server-rendered style elements\n document.querySelectorAll(\"style[data-emotion^=\\\"\" + key + \" \\\"]\"), function (node) {\n var attrib = node.getAttribute(\"data-emotion\").split(' '); // $FlowFixMe\n\n for (var i = 1; i < attrib.length; i++) {\n inserted[attrib[i]] = true;\n }\n\n nodesToHydrate.push(node);\n });\n }\n\n var _insert;\n\n var omnipresentPlugins = [compat, removeLabel];\n\n if (process.env.NODE_ENV !== 'production') {\n omnipresentPlugins.push(createUnsafeSelectorsAlarm({\n get compat() {\n return cache.compat;\n }\n\n }), incorrectImportAlarm);\n }\n\n {\n var currentSheet;\n var finalizingPlugins = [stringify, process.env.NODE_ENV !== 'production' ? function (element) {\n if (!element.root) {\n if (element[\"return\"]) {\n currentSheet.insert(element[\"return\"]);\n } else if (element.value && element.type !== COMMENT) {\n // insert empty rule in non-production environments\n // so @emotion/jest can grab `key` from the (JS)DOM for caches without any rules inserted yet\n currentSheet.insert(element.value + \"{}\");\n }\n }\n } : rulesheet(function (rule) {\n currentSheet.insert(rule);\n })];\n var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));\n\n var stylis = function stylis(styles) {\n return serialize(compile(styles), serializer);\n };\n\n _insert = function insert(selector, serialized, sheet, shouldCache) {\n currentSheet = sheet;\n\n if (process.env.NODE_ENV !== 'production' && serialized.map !== undefined) {\n currentSheet = {\n insert: function insert(rule) {\n sheet.insert(rule + serialized.map);\n }\n };\n }\n\n stylis(selector ? selector + \"{\" + serialized.styles + \"}\" : serialized.styles);\n\n if (shouldCache) {\n cache.inserted[serialized.name] = true;\n }\n };\n }\n\n var cache = {\n key: key,\n sheet: new StyleSheet({\n key: key,\n container: container,\n nonce: options.nonce,\n speedy: options.speedy,\n prepend: options.prepend,\n insertionPoint: options.insertionPoint\n }),\n nonce: options.nonce,\n inserted: inserted,\n registered: {},\n insert: _insert\n };\n cache.sheet.hydrate(nodesToHydrate);\n return cache;\n};\n\nexport { createCache as default };\n","/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n // 'm' and 'r' are mixing constants generated offline.\n // They're not really 'magic', they just happen to work well.\n // const m = 0x5bd1e995;\n // const r = 24;\n // Initialize the hash\n var h = 0; // Mix 4 bytes at a time into the hash\n\n var k,\n i = 0,\n len = str.length;\n\n for (; len >= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n k ^=\n /* k >>> r: */\n k >>> 24;\n h =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Handle the last few bytes of the input array\n\n\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Do a few final mixes of the hash to ensure the last few\n // bytes are well-incorporated.\n\n\n h ^= h >>> 13;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\nexport { murmur2 as default };\n","import hashString from '@emotion/hash';\nimport unitless from '@emotion/unitless';\nimport memoize from '@emotion/memoize';\n\nvar ILLEGAL_ESCAPE_SEQUENCE_ERROR = \"You have illegal escape sequence in your template literal, most likely inside content's property value.\\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \\\"content: '\\\\00d7';\\\" should become \\\"content: '\\\\\\\\00d7';\\\".\\nYou can read more about this here:\\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences\";\nvar UNDEFINED_AS_OBJECT_KEY_ERROR = \"You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).\";\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;\n\nvar isCustomProperty = function isCustomProperty(property) {\n return property.charCodeAt(1) === 45;\n};\n\nvar isProcessableValue = function isProcessableValue(value) {\n return value != null && typeof value !== 'boolean';\n};\n\nvar processStyleName = /* #__PURE__ */memoize(function (styleName) {\n return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\n\nvar processStyleValue = function processStyleValue(key, value) {\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n if (typeof value === 'string') {\n return value.replace(animationRegex, function (match, p1, p2) {\n cursor = {\n name: p1,\n styles: p2,\n next: cursor\n };\n return p1;\n });\n }\n }\n }\n\n if (unitless[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {\n return value + 'px';\n }\n\n return value;\n};\n\nif (process.env.NODE_ENV !== 'production') {\n var contentValuePattern = /(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\\(|(no-)?(open|close)-quote/;\n var contentValues = ['normal', 'none', 'initial', 'inherit', 'unset'];\n var oldProcessStyleValue = processStyleValue;\n var msPattern = /^-ms-/;\n var hyphenPattern = /-(.)/g;\n var hyphenatedCache = {};\n\n processStyleValue = function processStyleValue(key, value) {\n if (key === 'content') {\n if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '\"' && value.charAt(0) !== \"'\")) {\n throw new Error(\"You seem to be using a value for 'content' without quotes, try replacing it with `content: '\\\"\" + value + \"\\\"'`\");\n }\n }\n\n var processed = oldProcessStyleValue(key, value);\n\n if (processed !== '' && !isCustomProperty(key) && key.indexOf('-') !== -1 && hyphenatedCache[key] === undefined) {\n hyphenatedCache[key] = true;\n console.error(\"Using kebab-case for css properties in objects is not supported. Did you mean \" + key.replace(msPattern, 'ms-').replace(hyphenPattern, function (str, _char) {\n return _char.toUpperCase();\n }) + \"?\");\n }\n\n return processed;\n };\n}\n\nvar noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';\n\nfunction handleInterpolation(mergedProps, registered, interpolation) {\n if (interpolation == null) {\n return '';\n }\n\n if (interpolation.__emotion_styles !== undefined) {\n if (process.env.NODE_ENV !== 'production' && interpolation.toString() === 'NO_COMPONENT_SELECTOR') {\n throw new Error(noComponentSelectorMessage);\n }\n\n return interpolation;\n }\n\n switch (typeof interpolation) {\n case 'boolean':\n {\n return '';\n }\n\n case 'object':\n {\n if (interpolation.anim === 1) {\n cursor = {\n name: interpolation.name,\n styles: interpolation.styles,\n next: cursor\n };\n return interpolation.name;\n }\n\n if (interpolation.styles !== undefined) {\n var next = interpolation.next;\n\n if (next !== undefined) {\n // not the most efficient thing ever but this is a pretty rare case\n // and there will be very few iterations of this generally\n while (next !== undefined) {\n cursor = {\n name: next.name,\n styles: next.styles,\n next: cursor\n };\n next = next.next;\n }\n }\n\n var styles = interpolation.styles + \";\";\n\n if (process.env.NODE_ENV !== 'production' && interpolation.map !== undefined) {\n styles += interpolation.map;\n }\n\n return styles;\n }\n\n return createStringFromObject(mergedProps, registered, interpolation);\n }\n\n case 'function':\n {\n if (mergedProps !== undefined) {\n var previousCursor = cursor;\n var result = interpolation(mergedProps);\n cursor = previousCursor;\n return handleInterpolation(mergedProps, registered, result);\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('Functions that are interpolated in css calls will be stringified.\\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\\n' + 'It can be called directly with props or interpolated in a styled call like this\\n' + \"let SomeComponent = styled('div')`${dynamicStyle}`\");\n }\n\n break;\n }\n\n case 'string':\n if (process.env.NODE_ENV !== 'production') {\n var matched = [];\n var replaced = interpolation.replace(animationRegex, function (match, p1, p2) {\n var fakeVarName = \"animation\" + matched.length;\n matched.push(\"const \" + fakeVarName + \" = keyframes`\" + p2.replace(/^@keyframes animation-\\w+/, '') + \"`\");\n return \"${\" + fakeVarName + \"}\";\n });\n\n if (matched.length) {\n console.error('`keyframes` output got interpolated into plain string, please wrap it with `css`.\\n\\n' + 'Instead of doing this:\\n\\n' + [].concat(matched, [\"`\" + replaced + \"`\"]).join('\\n') + '\\n\\nYou should wrap it with `css` like this:\\n\\n' + (\"css`\" + replaced + \"`\"));\n }\n }\n\n break;\n } // finalize string values (regular strings and functions interpolated into css calls)\n\n\n if (registered == null) {\n return interpolation;\n }\n\n var cached = registered[interpolation];\n return cached !== undefined ? cached : interpolation;\n}\n\nfunction createStringFromObject(mergedProps, registered, obj) {\n var string = '';\n\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n string += handleInterpolation(mergedProps, registered, obj[i]) + \";\";\n }\n } else {\n for (var _key in obj) {\n var value = obj[_key];\n\n if (typeof value !== 'object') {\n if (registered != null && registered[value] !== undefined) {\n string += _key + \"{\" + registered[value] + \"}\";\n } else if (isProcessableValue(value)) {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value) + \";\";\n }\n } else {\n if (_key === 'NO_COMPONENT_SELECTOR' && process.env.NODE_ENV !== 'production') {\n throw new Error(noComponentSelectorMessage);\n }\n\n if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {\n for (var _i = 0; _i < value.length; _i++) {\n if (isProcessableValue(value[_i])) {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value[_i]) + \";\";\n }\n }\n } else {\n var interpolated = handleInterpolation(mergedProps, registered, value);\n\n switch (_key) {\n case 'animation':\n case 'animationName':\n {\n string += processStyleName(_key) + \":\" + interpolated + \";\";\n break;\n }\n\n default:\n {\n if (process.env.NODE_ENV !== 'production' && _key === 'undefined') {\n console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);\n }\n\n string += _key + \"{\" + interpolated + \"}\";\n }\n }\n }\n }\n }\n }\n\n return string;\n}\n\nvar labelPattern = /label:\\s*([^\\s;\\n{]+)\\s*(;|$)/g;\nvar sourceMapPattern;\n\nif (process.env.NODE_ENV !== 'production') {\n sourceMapPattern = /\\/\\*#\\ssourceMappingURL=data:application\\/json;\\S+\\s+\\*\\//g;\n} // this is the cursor for keyframes\n// keyframes are stored on the SerializedStyles object as a linked list\n\n\nvar cursor;\nvar serializeStyles = function serializeStyles(args, registered, mergedProps) {\n if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {\n return args[0];\n }\n\n var stringMode = true;\n var styles = '';\n cursor = undefined;\n var strings = args[0];\n\n if (strings == null || strings.raw === undefined) {\n stringMode = false;\n styles += handleInterpolation(mergedProps, registered, strings);\n } else {\n if (process.env.NODE_ENV !== 'production' && strings[0] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles += strings[0];\n } // we start at 1 since we've already handled the first arg\n\n\n for (var i = 1; i < args.length; i++) {\n styles += handleInterpolation(mergedProps, registered, args[i]);\n\n if (stringMode) {\n if (process.env.NODE_ENV !== 'production' && strings[i] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles += strings[i];\n }\n }\n\n var sourceMap;\n\n if (process.env.NODE_ENV !== 'production') {\n styles = styles.replace(sourceMapPattern, function (match) {\n sourceMap = match;\n return '';\n });\n } // using a global regex with .exec is stateful so lastIndex has to be reset each time\n\n\n labelPattern.lastIndex = 0;\n var identifierName = '';\n var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5\n\n while ((match = labelPattern.exec(styles)) !== null) {\n identifierName += '-' + // $FlowFixMe we know it's not null\n match[1];\n }\n\n var name = hashString(styles) + identifierName;\n\n if (process.env.NODE_ENV !== 'production') {\n // $FlowFixMe SerializedStyles type doesn't have toString property (and we don't want to add it)\n return {\n name: name,\n styles: styles,\n map: sourceMap,\n next: cursor,\n toString: function toString() {\n return \"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).\";\n }\n };\n }\n\n return {\n name: name,\n styles: styles,\n next: cursor\n };\n};\n\nexport { serializeStyles };\n","/*\n\nBased off glamor's StyleSheet, thanks Sunil ❤️\n\nhigh performance StyleSheet for css-in-js systems\n\n- uses multiple style tags behind the scenes for millions of rules\n- uses `insertRule` for appending in production for *much* faster performance\n\n// usage\n\nimport { StyleSheet } from '@emotion/sheet'\n\nlet styleSheet = new StyleSheet({ key: '', container: document.head })\n\nstyleSheet.insert('#box { border: 1px solid red; }')\n- appends a css rule into the stylesheet\n\nstyleSheet.flush()\n- empties the stylesheet of all its contents\n\n*/\n// $FlowFixMe\nfunction sheetForTag(tag) {\n if (tag.sheet) {\n // $FlowFixMe\n return tag.sheet;\n } // this weirdness brought to you by firefox\n\n /* istanbul ignore next */\n\n\n for (var i = 0; i < document.styleSheets.length; i++) {\n if (document.styleSheets[i].ownerNode === tag) {\n // $FlowFixMe\n return document.styleSheets[i];\n }\n }\n}\n\nfunction createStyleElement(options) {\n var tag = document.createElement('style');\n tag.setAttribute('data-emotion', options.key);\n\n if (options.nonce !== undefined) {\n tag.setAttribute('nonce', options.nonce);\n }\n\n tag.appendChild(document.createTextNode(''));\n tag.setAttribute('data-s', '');\n return tag;\n}\n\nvar StyleSheet = /*#__PURE__*/function () {\n // Using Node instead of HTMLElement since container may be a ShadowRoot\n function StyleSheet(options) {\n var _this = this;\n\n this._insertTag = function (tag) {\n var before;\n\n if (_this.tags.length === 0) {\n if (_this.insertionPoint) {\n before = _this.insertionPoint.nextSibling;\n } else if (_this.prepend) {\n before = _this.container.firstChild;\n } else {\n before = _this.before;\n }\n } else {\n before = _this.tags[_this.tags.length - 1].nextSibling;\n }\n\n _this.container.insertBefore(tag, before);\n\n _this.tags.push(tag);\n };\n\n this.isSpeedy = options.speedy === undefined ? process.env.NODE_ENV === 'production' : options.speedy;\n this.tags = [];\n this.ctr = 0;\n this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets\n\n this.key = options.key;\n this.container = options.container;\n this.prepend = options.prepend;\n this.insertionPoint = options.insertionPoint;\n this.before = null;\n }\n\n var _proto = StyleSheet.prototype;\n\n _proto.hydrate = function hydrate(nodes) {\n nodes.forEach(this._insertTag);\n };\n\n _proto.insert = function insert(rule) {\n // the max length is how many rules we have per style tag, it's 65000 in speedy mode\n // it's 1 in dev because we insert source maps that map a single rule to a location\n // and you can only have one source map per style tag\n if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {\n this._insertTag(createStyleElement(this));\n }\n\n var tag = this.tags[this.tags.length - 1];\n\n if (process.env.NODE_ENV !== 'production') {\n var isImportRule = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105;\n\n if (isImportRule && this._alreadyInsertedOrderInsensitiveRule) {\n // this would only cause problem in speedy mode\n // but we don't want enabling speedy to affect the observable behavior\n // so we report this error at all times\n console.error(\"You're attempting to insert the following rule:\\n\" + rule + '\\n\\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules.');\n }\n this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule;\n }\n\n if (this.isSpeedy) {\n var sheet = sheetForTag(tag);\n\n try {\n // this is the ultrafast version, works across browsers\n // the big drawback is that the css won't be editable in devtools\n sheet.insertRule(rule, sheet.cssRules.length);\n } catch (e) {\n if (process.env.NODE_ENV !== 'production' && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(rule)) {\n console.error(\"There was a problem inserting the following rule: \\\"\" + rule + \"\\\"\", e);\n }\n }\n } else {\n tag.appendChild(document.createTextNode(rule));\n }\n\n this.ctr++;\n };\n\n _proto.flush = function flush() {\n // $FlowFixMe\n this.tags.forEach(function (tag) {\n return tag.parentNode && tag.parentNode.removeChild(tag);\n });\n this.tags = [];\n this.ctr = 0;\n\n if (process.env.NODE_ENV !== 'production') {\n this._alreadyInsertedOrderInsensitiveRule = false;\n }\n };\n\n return StyleSheet;\n}();\n\nexport { StyleSheet };\n","var unitlessKeys = {\n animationIterationCount: 1,\n aspectRatio: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport { unitlessKeys as default };\n","var isBrowser = \"object\" !== 'undefined';\nfunction getRegisteredStyles(registered, registeredStyles, classNames) {\n var rawClassName = '';\n classNames.split(' ').forEach(function (className) {\n if (registered[className] !== undefined) {\n registeredStyles.push(registered[className] + \";\");\n } else {\n rawClassName += className + \" \";\n }\n });\n return rawClassName;\n}\nvar registerStyles = function registerStyles(cache, serialized, isStringTag) {\n var className = cache.key + \"-\" + serialized.name;\n\n if ( // we only need to add the styles to the registered cache if the\n // class name could be used further down\n // the tree but if it's a string tag, we know it won't\n // so we don't have to add it to registered cache.\n // this improves memory usage since we can avoid storing the whole style string\n (isStringTag === false || // we need to always store it if we're in compat mode and\n // in node since emotion-server relies on whether a style is in\n // the registered cache to know whether a style is global or not\n // also, note that this check will be dead code eliminated in the browser\n isBrowser === false ) && cache.registered[className] === undefined) {\n cache.registered[className] = serialized.styles;\n }\n};\nvar insertStyles = function insertStyles(cache, serialized, isStringTag) {\n registerStyles(cache, serialized, isStringTag);\n var className = cache.key + \"-\" + serialized.name;\n\n if (cache.inserted[serialized.name] === undefined) {\n var current = serialized;\n\n do {\n cache.insert(serialized === current ? \".\" + className : '', current, cache.sheet, true);\n\n current = current.next;\n } while (current !== undefined);\n }\n};\n\nexport { getRegisteredStyles, insertStyles, registerStyles };\n","import * as React from 'react';\n\nvar syncFallback = function syncFallback(create) {\n return create();\n};\n\nvar useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;\nvar useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback;\nvar useInsertionEffectWithLayoutFallback = useInsertionEffect || React.useLayoutEffect;\n\nexport { useInsertionEffectAlwaysWithSyncFallback, useInsertionEffectWithLayoutFallback };\n","var weakMemoize = function weakMemoize(func) {\n // $FlowFixMe flow doesn't include all non-primitive types as allowed for weakmaps\n var cache = new WeakMap();\n return function (arg) {\n if (cache.has(arg)) {\n // $FlowFixMe\n return cache.get(arg);\n }\n\n var ret = func(arg);\n cache.set(arg, ret);\n return ret;\n };\n};\n\nexport { weakMemoize as default };\n","import \"./polyfill\";\n","import createIconSet from './createIconSet';\nimport font from './vendor/react-native-vector-icons/Fonts/AntDesign.ttf';\nimport glyphMap from './vendor/react-native-vector-icons/glyphmaps/AntDesign.json';\n\nexport default createIconSet(glyphMap, 'anticon', font);\n","import createIconSet from './createIconSet';\nimport font from './vendor/react-native-vector-icons/Fonts/Entypo.ttf';\nimport glyphMap from './vendor/react-native-vector-icons/glyphmaps/Entypo.json';\n\nexport default createIconSet(glyphMap, 'entypo', font);\n","import createIconSet from './createIconSet';\nimport font from './vendor/react-native-vector-icons/Fonts/EvilIcons.ttf';\nimport glyphMap from './vendor/react-native-vector-icons/glyphmaps/EvilIcons.json';\n\nexport default createIconSet(glyphMap, 'evilicons', font);\n","import createIconSet from './createIconSet';\nimport font from './vendor/react-native-vector-icons/Fonts/Feather.ttf';\nimport glyphMap from './vendor/react-native-vector-icons/glyphmaps/Feather.json';\n\nexport default createIconSet(glyphMap, 'feather', font);\n","import createIconSet from './createIconSet';\nimport font from './vendor/react-native-vector-icons/Fonts/FontAwesome.ttf';\nimport glyphMap from './vendor/react-native-vector-icons/glyphmaps/FontAwesome.json';\n\nexport default createIconSet(glyphMap, 'FontAwesome', font);\n","import { createFA5iconSet } from './createIconSetFromFontAwesome5';\n\nimport glyphMap from './vendor/react-native-vector-icons/glyphmaps/FontAwesome5Free.json';\nimport metadata from './vendor/react-native-vector-icons/glyphmaps/FontAwesome5Free_meta.json';\nconst fontMap = {\n Regular: require('./vendor/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf'),\n Light: require('./vendor/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf'),\n Solid: require('./vendor/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf'),\n Brand: require('./vendor/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf'),\n};\n\nexport const FA5Style = {\n regular: 'regular',\n light: 'light',\n solid: 'solid',\n brand: 'brand',\n};\n\nconst iconSet = createFA5iconSet(glyphMap, metadata, fontMap, false);\n\nexport default iconSet;\n","/**\n * Feather icon set component.\n * Usage: \n */\n\nimport createIconSet from \"./createIconSet\";\nimport font from \"./vendor/react-native-vector-icons/Fonts/Fontisto.ttf\";\nimport glyphMap from \"./vendor/react-native-vector-icons/glyphmaps/Fontisto.json\";\n\nconst iconSet = createIconSet(glyphMap, \"Fontisto\", font);\n\nexport default iconSet;\n","import createIconSet from './createIconSet';\nimport font from './vendor/react-native-vector-icons/Fonts/Foundation.ttf';\nimport glyphMap from './vendor/react-native-vector-icons/glyphmaps/Foundation.json';\n\nexport default createIconSet(glyphMap, 'foundation', font);\n","export { default as AntDesign } from \"./AntDesign\";\nexport { default as Entypo } from \"./Entypo\";\nexport { default as EvilIcons } from \"./EvilIcons\";\nexport { default as Feather } from \"./Feather\";\nexport { default as Fontisto } from \"./Fontisto\";\nexport { default as FontAwesome } from \"./FontAwesome\";\nexport { default as FontAwesome5 } from \"./FontAwesome5\";\nexport { default as Foundation } from \"./Foundation\";\nexport { default as Ionicons } from \"./Ionicons\";\nexport { default as MaterialCommunityIcons } from \"./MaterialCommunityIcons\";\nexport { default as MaterialIcons } from \"./MaterialIcons\";\nexport { default as Octicons } from \"./Octicons\";\nexport { default as SimpleLineIcons } from \"./SimpleLineIcons\";\nexport { default as Zocial } from \"./Zocial\";\nexport { default as createMultiStyleIconSet } from \"./createMultiStyleIconSet\";\nexport { default as createIconSet } from \"./createIconSet\";\nexport { default as createIconSetFromFontello } from \"./createIconSetFromFontello\";\nexport { default as createIconSetFromIcoMoon } from \"./createIconSetFromIcoMoon\";\nexport { default as createMu } from \"./createIconSetFromIcoMoon\";\n","import createIconSet from './createIconSet';\nimport font from './vendor/react-native-vector-icons/Fonts/Ionicons.ttf';\nimport glyphMap from './vendor/react-native-vector-icons/glyphmaps/Ionicons.json';\n\nexport default createIconSet(glyphMap, 'ionicons', font);\n","import createIconSet from './createIconSet';\nimport font from './vendor/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf';\nimport glyphMap from './vendor/react-native-vector-icons/glyphmaps/MaterialCommunityIcons.json';\n\nexport default createIconSet(glyphMap, 'material-community', font);\n","import createIconSet from './createIconSet';\nimport font from './vendor/react-native-vector-icons/Fonts/MaterialIcons.ttf';\nimport glyphMap from './vendor/react-native-vector-icons/glyphmaps/MaterialIcons.json';\n\nexport default createIconSet(glyphMap, 'material', font);\n","import createIconSet from './createIconSet';\nimport font from './vendor/react-native-vector-icons/Fonts/Octicons.ttf';\nimport glyphMap from './vendor/react-native-vector-icons/glyphmaps/Octicons.json';\n\nexport default createIconSet(glyphMap, 'octicons', font);\n","import createIconSet from './createIconSet';\nimport font from './vendor/react-native-vector-icons/Fonts/SimpleLineIcons.ttf';\nimport glyphMap from './vendor/react-native-vector-icons/glyphmaps/SimpleLineIcons.json';\n\nexport default createIconSet(glyphMap, 'simple-line-icons', font);\n","import createIconSet from './createIconSet';\nimport font from './vendor/react-native-vector-icons/Fonts/Zocial.ttf';\nimport glyphMap from './vendor/react-native-vector-icons/glyphmaps/Zocial.json';\n\nexport default createIconSet(glyphMap, 'zocial', font);\n","import * as Font from \"expo-font\";\nimport React, { ComponentClass } from \"react\";\nimport {\n Text,\n TextProps,\n TouchableHighlightProps,\n ViewProps,\n OpaqueColorValue,\n TextStyle,\n ViewStyle,\n} from \"react-native\";\n\nimport createIconSet from \"./vendor/react-native-vector-icons/lib/create-icon-set\";\nimport createIconButtonComponent from \"./vendor/react-native-vector-icons/lib/icon-button\";\n\nexport {\n DEFAULT_ICON_COLOR,\n DEFAULT_ICON_SIZE,\n} from \"./vendor/react-native-vector-icons/lib/create-icon-set\";\n\nexport interface IconProps extends TextProps {\n /**\n * Size of the icon, can also be passed as fontSize in the style object.\n *\n * @default 12\n */\n size?: number;\n\n /**\n * Name of the icon to show\n *\n * See Icon Explorer app\n * {@link https://expo.github.io/vector-icons/}\n */\n name: GLYPHS;\n\n /**\n * Color of the icon. Can be a string or OpaqueColorValue (returned from\n * PlatformColor(..))\n *\n */\n color?: string | OpaqueColorValue;\n}\n\nexport interface IconButtonProps\n extends IconProps,\n ViewProps,\n TouchableHighlightProps {\n /**\n * Text and icon color\n * Use iconStyle or nest a Text component if you need different colors.\n * Can be a string or OpaqueColorValue (returned from PlatformColor(..))\n *\n * @default 'white'\n */\n color?: string | OpaqueColorValue;\n\n /**\n * Border radius of the button\n * Set to 0 to disable.\n *\n * @default 5\n */\n borderRadius?: number;\n\n /**\n * Styles applied to the icon only\n * Good for setting margins or a different color.\n *\n * @default {marginRight: 10}\n */\n iconStyle?: TextStyle;\n\n /**\n * Style prop inherited from TextProps and TouchableWithoutFeedbackProperties\n * Only exist here so we can have ViewStyle or TextStyle\n *\n */\n style?: ViewStyle | TextStyle;\n\n /**\n * Background color of the button. Can be a string or OpaqueColorValue (returned from\n * PlatformColor(..))\n *\n * @default '#007AFF'\n */\n backgroundColor?: string | OpaqueColorValue;\n}\n\nexport type GlyphMap = { [K in G]: number | string };\n\nexport interface Icon {\n defaultProps: any;\n Button: ComponentClass>;\n glyphMap: GlyphMap;\n getRawGlyphMap: () => GlyphMap;\n getFontFamily: () => FN;\n loadFont: () => Promise;\n font: { [x: string]: any };\n new (props: IconProps): React.Component>;\n}\n\nexport default function (\n glyphMap: GlyphMap,\n fontName: FN,\n expoAssetId,\n fontStyle?: any\n): Icon {\n const font = { [fontName]: expoAssetId };\n const RNVIconComponent = createIconSet(glyphMap, fontName, null, fontStyle);\n\n return class Icon extends React.Component> {\n static defaultProps = RNVIconComponent.defaultProps;\n static Button = createIconButtonComponent(Icon);\n static glyphMap = glyphMap;\n static getRawGlyphMap = () => glyphMap;\n static getFontFamily = () => fontName;\n static loadFont = () => Font.loadAsync(font);\n static font = font;\n\n _mounted = false;\n _icon?: any;\n\n state = {\n fontIsLoaded: Font.isLoaded(fontName),\n };\n\n async componentDidMount() {\n this._mounted = true;\n if (!this.state.fontIsLoaded) {\n await Font.loadAsync(font);\n this._mounted && this.setState({ fontIsLoaded: true });\n }\n }\n\n componentWillUnmount() {\n this._mounted = false;\n }\n\n setNativeProps(props) {\n if (this._icon) {\n this._icon.setNativeProps(props);\n }\n }\n\n render() {\n if (__DEV__ && this.props.name && !(this.props.name in glyphMap)) {\n console.warn(\n `\"${this.props.name}\" is not a valid icon name for family \"${fontName}\"`\n );\n }\n\n if (!this.state.fontIsLoaded) {\n return ;\n }\n\n return (\n {\n this._icon = view;\n }}\n {...this.props}\n />\n );\n }\n };\n}\n","import { Platform } from 'react-native';\nimport createMultiStyleIconSet from './createMultiStyleIconSet';\n\nexport const FA5Style = {\n regular: 'regular',\n light: 'light',\n solid: 'solid',\n brand: 'brand',\n};\n\nexport function createFA5iconSet(glyphMap, metadata = {}, fonts, pro = false) {\n const metadataKeys = Object.keys(metadata);\n const fontFamily = `FontAwesome5${pro ? 'Pro' : 'Free'}`;\n\n function fallbackFamily(glyph) {\n for (let i = 0; i < metadataKeys.length; i += 1) {\n const family = metadataKeys[i];\n if (metadata[family].indexOf(glyph) !== -1) {\n return family === 'brands' ? 'brand' : family;\n }\n }\n\n return 'regular';\n }\n\n function glyphValidator(glyph, style) {\n const family = style === 'brand' ? 'brands' : style;\n if (metadataKeys.indexOf(family) === -1) return false;\n return metadata[family].indexOf(glyph) !== -1;\n }\n\n function createFontAwesomeStyle(styleName, fontWeight, family = fontFamily) {\n let fontFile = fonts[styleName];\n\n return {\n fontFamily: `${family}-${styleName}`,\n fontFile,\n fontStyle: Platform.select({\n ios: {\n fontWeight,\n },\n default: {},\n }),\n glyphMap,\n };\n }\n\n const brandIcons = createFontAwesomeStyle('Brand', '400');\n const lightIcons = createFontAwesomeStyle('Light', '100');\n const regularIcons = createFontAwesomeStyle('Regular', '400');\n const solidIcons = createFontAwesomeStyle('Solid', '700');\n const Icon = createMultiStyleIconSet(\n {\n brand: brandIcons,\n light: lightIcons,\n regular: regularIcons,\n solid: solidIcons,\n },\n {\n defaultStyle: 'regular',\n fallbackFamily,\n glyphValidator,\n },\n );\n\n return Icon;\n}","import createIconSetFromFontello from './vendor/react-native-vector-icons/lib/create-icon-set-from-fontello';\n\nexport default function(config, expoFontName, expoAssetId) {\n return createIconSetFromFontello(config, expoFontName, expoAssetId);\n}\n","import createIconSet from \"./createIconSet\";\n\nexport default function (config, expoFontName, expoAssetId) {\n const glyphMap = {};\n config.icons.forEach(icon => {\n icon.properties.name.split(/\\s*,\\s*/g).forEach(name => {\n glyphMap[name] = icon.properties.code;\n });\n });\n\n const fontFamily =\n expoFontName || config.preferences.fontPref.metadata.fontFamily;\n\n return createIconSet(\n glyphMap,\n fontFamily,\n expoAssetId || `${fontFamily}.ttf`\n );\n}\n","import React, { PureComponent } from 'react';\n\nimport createIconSet from './createIconSet';\n\ntype FontStyle = {\n fontFamily: string;\n fontFile: any;\n glyphMap: any;\n fontStyle: any;\n};\n\ntype FontStyles = {\n [key: string]: FontStyle;\n};\n\nexport default function createMultiStyleIconSet(\n styles: FontStyles,\n optionsInput = {}\n): any {\n const styleNames = Object.keys(styles);\n\n if (styleNames.length === 0) {\n throw new Error('You need to add at least one style');\n }\n\n const options = {\n defaultStyle: styleNames[0],\n fallbackFamily: (_unused: any) => styleNames[0],\n glyphValidator: (_unused: any, __unused: any) => true,\n ...optionsInput,\n };\n\n const iconSets = styleNames.reduce((acc, name) => {\n const style = styles[name];\n\n acc[name] = createIconSet(\n style.glyphMap || {},\n style.fontFamily || '',\n style.fontFile || '',\n style.fontStyle || {}\n );\n\n return acc;\n }, {});\n\n function styleFromProps(props) {\n return Object.keys(props).reduce(\n (result, propName) =>\n styleNames.indexOf(propName) !== -1 && props[propName] === true\n ? propName\n : result,\n options.defaultStyle\n );\n }\n\n function getIconSetForProps(props) {\n const { name } = props;\n const style = styleFromProps(props);\n\n if (options.glyphValidator(name, style)) return iconSets[style];\n\n const family = options.fallbackFamily(name);\n\n if (styleNames.indexOf(family) === -1) {\n return options.defaultStyle;\n }\n\n return iconSets[family];\n }\n\n function selectIconClass(iconSet, iconClass) {\n return iconClass.length > 0 ? iconSet[iconClass] : iconSet;\n }\n\n function reduceProps(props) {\n return Object.keys(props).reduce((acc, prop) => {\n if (styleNames.indexOf(prop) === -1) {\n acc[prop] = props[prop];\n }\n\n return acc;\n }, {});\n }\n\n function getStyledIconSet(style, name = '') {\n if (styleNames.indexOf(style) === -1) {\n return iconSets[options.defaultStyle];\n }\n\n return !name\n ? iconSets[styleFromProps({ [style]: true })]\n : getIconSetForProps({ name, [style]: true });\n }\n\n function getFontFamily(style = options.defaultStyle) {\n return getStyledIconSet(style).getFontFamily();\n }\n\n function getRawGlyphMap(style = options.defaultStyle) {\n return getStyledIconSet(style).getRawGlyphMap();\n }\n\n function hasIcon(name, style = options.defaultStyle) {\n return options.glyphValidator(name, style);\n }\n\n function createStyledIconClass(selectClass = '') {\n class IconClass extends PureComponent {\n static defaultProps = styleNames.reduce((acc, name) => {\n acc[name] = false;\n return acc;\n }, {});\n\n static font = Object.values(styles).reduce((acc, style) => {\n acc[style.fontFamily] = style.fontFile;\n return acc;\n }, {});\n\n static Button: any;\n\n static StyledIconSet = getStyledIconSet;\n static getFontFamily = getFontFamily;\n static getRawGlyphMap = getRawGlyphMap;\n static hasIcon = hasIcon;\n\n render() {\n const selectedIconSet = getIconSetForProps(this.props);\n const SelectedIconClass = selectIconClass(selectedIconSet, selectClass);\n const props = reduceProps(this.props);\n\n return React.createElement(SelectedIconClass, props);\n }\n }\n\n return IconClass;\n }\n\n const Icon = createStyledIconClass();\n Icon.Button = createStyledIconClass('Button');\n return Icon;\n}\n","import createIconSet from './create-icon-set';\n\nexport default function createIconSetFromFontello(\n config,\n fontFamilyArg,\n fontFile\n) {\n const glyphMap = {};\n config.glyphs.forEach(glyph => {\n glyphMap[glyph.css] = glyph.code;\n });\n\n const fontFamily = fontFamilyArg || config.name || 'fontello';\n\n return createIconSet(glyphMap, fontFamily, fontFile || `${fontFamily}.ttf`);\n}\n","import React, { PureComponent } from 'react';\nimport {\n NativeModules,\n Platform,\n PixelRatio,\n processColor,\n Text,\n} from 'react-native';\n\nimport ensureNativeModuleAvailable from './ensure-native-module-available';\nimport createIconSourceCache from './create-icon-source-cache';\nimport createIconButtonComponent from './icon-button';\n\nexport const NativeIconAPI =\n NativeModules.RNVectorIconsManager || NativeModules.RNVectorIconsModule;\n\nexport const DEFAULT_ICON_SIZE = 12;\nexport const DEFAULT_ICON_COLOR = 'black';\n\nexport default function createIconSet(\n glyphMap,\n fontFamily,\n fontFile,\n fontStyle\n) {\n // Android doesn't care about actual fontFamily name, it will only look in fonts folder.\n const fontBasename = fontFile\n ? fontFile.replace(/\\.(otf|ttf)$/, '')\n : fontFamily;\n\n const fontReference = Platform.select({\n windows: `/Assets/${fontFile}#${fontFamily}`,\n android: fontBasename,\n web: fontBasename,\n default: fontFamily,\n });\n\n class Icon extends PureComponent {\n root = null;\n\n static defaultProps = {\n size: DEFAULT_ICON_SIZE,\n allowFontScaling: false,\n };\n\n setNativeProps(nativeProps) {\n if (this.root) {\n this.root.setNativeProps(nativeProps);\n }\n }\n\n handleRef = ref => {\n this.root = ref;\n };\n\n render() {\n const { name, size, color, style, children, ...props } = this.props;\n\n let glyph = name ? glyphMap[name] || '?' : '';\n if (typeof glyph === 'number') {\n glyph = String.fromCodePoint(glyph);\n }\n\n const styleDefaults = {\n fontSize: size,\n color,\n };\n\n const styleOverrides = {\n fontFamily: fontReference,\n fontWeight: 'normal',\n fontStyle: 'normal',\n };\n\n props.style = [styleDefaults, style, styleOverrides, fontStyle || {}];\n props.ref = this.handleRef;\n\n return (\n \n {glyph}\n {children}\n \n );\n }\n }\n\n const imageSourceCache = createIconSourceCache();\n\n function resolveGlyph(name) {\n const glyph = glyphMap[name] || '?';\n if (typeof glyph === 'number') {\n return String.fromCodePoint(glyph);\n }\n return glyph;\n }\n\n function getImageSourceSync(\n name,\n size = DEFAULT_ICON_SIZE,\n color = DEFAULT_ICON_COLOR\n ) {\n ensureNativeModuleAvailable();\n\n const glyph = resolveGlyph(name);\n const processedColor = processColor(color);\n const cacheKey = `${glyph}:${size}:${processedColor}`;\n\n if (imageSourceCache.has(cacheKey)) {\n return imageSourceCache.get(cacheKey);\n }\n try {\n const imagePath = NativeIconAPI.getImageForFontSync(\n fontReference,\n glyph,\n size,\n processedColor\n );\n const value = { uri: imagePath, scale: PixelRatio.get() };\n imageSourceCache.setValue(cacheKey, value);\n return value;\n } catch (error) {\n imageSourceCache.setError(cacheKey, error);\n throw error;\n }\n }\n\n async function getImageSource(\n name,\n size = DEFAULT_ICON_SIZE,\n color = DEFAULT_ICON_COLOR\n ) {\n ensureNativeModuleAvailable();\n\n const glyph = resolveGlyph(name);\n const processedColor = processColor(color);\n const cacheKey = `${glyph}:${size}:${processedColor}`;\n\n if (imageSourceCache.has(cacheKey)) {\n return imageSourceCache.get(cacheKey);\n }\n try {\n const imagePath = await NativeIconAPI.getImageForFont(\n fontReference,\n glyph,\n size,\n processedColor\n );\n const value = { uri: imagePath, scale: PixelRatio.get() };\n imageSourceCache.setValue(cacheKey, value);\n return value;\n } catch (error) {\n imageSourceCache.setError(cacheKey, error);\n throw error;\n }\n }\n\n async function loadFont(file = fontFile) {\n if (Platform.OS === 'ios') {\n ensureNativeModuleAvailable();\n if (!file) {\n throw new Error('Unable to load font, because no file was specified. ');\n }\n await NativeIconAPI.loadFontWithFileName(...file.split('.'));\n }\n }\n\n function hasIcon(name) {\n return Object.prototype.hasOwnProperty.call(glyphMap, name);\n }\n\n function getRawGlyphMap() {\n return glyphMap;\n }\n\n function getFontFamily() {\n return fontReference;\n }\n\n Icon.Button = createIconButtonComponent(Icon);\n Icon.getImageSource = getImageSource;\n Icon.getImageSourceSync = getImageSourceSync;\n Icon.loadFont = loadFont;\n Icon.hasIcon = hasIcon;\n Icon.getRawGlyphMap = getRawGlyphMap;\n Icon.getFontFamily = getFontFamily;\n\n return Icon;\n}\n","const TYPE_VALUE = 'value';\nconst TYPE_ERROR = 'error';\n\nexport default function createIconSourceCache() {\n const cache = new Map();\n\n const setValue = (key, value) =>\n cache.set(key, { type: TYPE_VALUE, data: value });\n\n const setError = (key, error) =>\n cache.set(key, { type: TYPE_ERROR, data: error });\n\n const has = key => cache.has(key);\n\n const get = key => {\n if (!cache.has(key)) {\n return undefined;\n }\n const { type, data } = cache.get(key);\n if (type === TYPE_ERROR) {\n throw data;\n }\n return data;\n };\n\n return { setValue, setError, has, get };\n}\n","import { Platform, NativeModules } from 'react-native';\n\nconst NativeIconAPI =\n NativeModules.RNVectorIconsManager || NativeModules.RNVectorIconsModule;\n\nexport default function ensureNativeModuleAvailable() {\n if (!NativeIconAPI) {\n if (Platform.OS === 'android') {\n throw new Error(\n 'RNVectorIconsModule not available, did you properly integrate the module? Try running `react-native link react-native-vector-icons` and recompiling.'\n );\n }\n throw new Error(\n 'RNVectorIconsManager not available, did you add the library to your project and link with libRNVectorIcons.a? Try running `react-native link react-native-vector-icons` and recompiling.'\n );\n }\n}\n","import React, { PureComponent } from 'react';\nimport { StyleSheet, Text, TouchableHighlight, View } from 'react-native';\nimport { pick, omit } from './object-utils';\n\nconst styles = StyleSheet.create({\n container: {\n flexDirection: 'row',\n justifyContent: 'flex-start',\n alignItems: 'center',\n padding: 8,\n },\n touchable: {\n overflow: 'hidden',\n },\n icon: {\n marginRight: 10,\n },\n text: {\n fontWeight: '600',\n backgroundColor: 'transparent',\n },\n});\n\nconst IOS7_BLUE = '#007AFF';\n\nconst TEXT_PROP_NAMES = [\n 'ellipsizeMode',\n 'numberOfLines',\n 'textBreakStrategy',\n 'selectable',\n 'suppressHighlighting',\n 'allowFontScaling',\n 'adjustsFontSizeToFit',\n 'minimumFontScale',\n];\n\nconst TOUCHABLE_PROP_NAMES = [\n 'accessible',\n 'accessibilityLabel',\n 'accessibilityHint',\n 'accessibilityComponentType',\n 'accessibilityRole',\n 'accessibilityStates',\n 'accessibilityTraits',\n 'onFocus',\n 'onBlur',\n 'disabled',\n 'onPress',\n 'onPressIn',\n 'onPressOut',\n 'onLayout',\n 'onLongPress',\n 'nativeID',\n 'testID',\n 'delayPressIn',\n 'delayPressOut',\n 'delayLongPress',\n 'activeOpacity',\n 'underlayColor',\n 'selectionColor',\n 'onShowUnderlay',\n 'onHideUnderlay',\n 'hasTVPreferredFocus',\n 'tvParallaxProperties',\n];\n\nexport default function createIconButtonComponent(Icon) {\n return class IconButton extends PureComponent {\n static defaultProps = {\n backgroundColor: IOS7_BLUE,\n borderRadius: 5,\n color: 'white',\n size: 20,\n };\n\n render() {\n const { style, iconStyle, children, ...restProps } = this.props;\n\n const iconProps = pick(\n restProps,\n TEXT_PROP_NAMES,\n 'style',\n 'name',\n 'size',\n 'color'\n );\n const touchableProps = pick(restProps, TOUCHABLE_PROP_NAMES);\n const props = omit(\n restProps,\n Object.keys(iconProps),\n Object.keys(touchableProps),\n 'iconStyle',\n 'borderRadius',\n 'backgroundColor'\n );\n iconProps.style = iconStyle ? [styles.icon, iconStyle] : styles.icon;\n\n const colorStyle = pick(this.props, 'color');\n const blockStyle = pick(this.props, 'backgroundColor', 'borderRadius');\n\n return (\n \n \n \n {typeof children === 'string' ? (\n \n {children}\n \n ) : (\n children\n )}\n \n \n );\n }\n };\n}\n","const pick = (obj, ...keys) =>\n keys\n .flat()\n .filter(key => Object.prototype.hasOwnProperty.call(obj, key))\n .reduce((acc, key) => {\n acc[key] = obj[key];\n return acc;\n }, {});\n\nconst omit = (obj, ...keysToOmit) => {\n const keysToOmitSet = new Set(keysToOmit.flat());\n return Object.getOwnPropertyNames(obj)\n .filter(key => !keysToOmitSet.has(key))\n .reduce((acc, key) => {\n acc[key] = obj[key];\n return acc;\n }, {});\n};\n\nmodule.exports = { pick, omit };\n","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n// @ts-ignore Cannot find module 'merge-options' or its corresponding type declarations\nimport mergeOptions from 'merge-options';\nimport type {\n AsyncStorageStatic,\n MultiCallback,\n MultiGetCallback,\n} from './types';\n\nconst merge = mergeOptions.bind({\n concatArrays: true,\n ignoreUndefined: true,\n});\n\nfunction mergeLocalStorageItem(key: string, value: string) {\n const oldValue = window.localStorage.getItem(key);\n if (oldValue) {\n const oldObject = JSON.parse(oldValue);\n const newObject = JSON.parse(value);\n const nextValue = JSON.stringify(merge(oldObject, newObject));\n window.localStorage.setItem(key, nextValue);\n } else {\n window.localStorage.setItem(key, value);\n }\n}\n\nfunction createPromise(\n getValue: () => Result,\n callback?: Callback\n): Promise {\n return new Promise((resolve, reject) => {\n try {\n const value = getValue();\n callback?.(null, value);\n resolve(value);\n } catch (err) {\n callback?.(err);\n reject(err);\n }\n });\n}\n\nfunction createPromiseAll(\n promises: Promise[],\n callback?: MultiCallback | MultiGetCallback,\n processResult?: ResultProcessor\n): Promise {\n return Promise.all(promises).then(\n (result) => {\n const value = processResult?.(result) ?? null;\n callback?.(null, value);\n return Promise.resolve(value);\n },\n (errors) => {\n callback?.(errors);\n return Promise.reject(errors);\n }\n );\n}\n\nconst AsyncStorage: AsyncStorageStatic = {\n /**\n * Fetches `key` value.\n */\n getItem: (key, callback) => {\n return createPromise(() => window.localStorage.getItem(key), callback);\n },\n\n /**\n * Sets `value` for `key`.\n */\n setItem: (key, value, callback) => {\n return createPromise(\n () => window.localStorage.setItem(key, value),\n callback\n );\n },\n\n /**\n * Removes a `key`\n */\n removeItem: (key, callback) => {\n return createPromise(() => window.localStorage.removeItem(key), callback);\n },\n\n /**\n * Merges existing value with input value, assuming they are stringified JSON.\n */\n mergeItem: (key, value, callback) => {\n return createPromise(() => mergeLocalStorageItem(key, value), callback);\n },\n\n /**\n * Erases *all* AsyncStorage for the domain.\n */\n clear: (callback) => {\n return createPromise(() => window.localStorage.clear(), callback);\n },\n\n /**\n * Gets *all* keys known to the app, for all callers, libraries, etc.\n */\n getAllKeys: (callback) => {\n return createPromise(() => {\n const numberOfKeys = window.localStorage.length;\n const keys: string[] = [];\n for (let i = 0; i < numberOfKeys; i += 1) {\n const key = window.localStorage.key(i) || '';\n keys.push(key);\n }\n return keys;\n }, callback);\n },\n\n /**\n * (stub) Flushes any pending requests using a single batch call to get the data.\n */\n flushGetRequests: () => undefined,\n\n /**\n * multiGet resolves to an array of key-value pair arrays that matches the\n * input format of multiSet.\n *\n * multiGet(['k1', 'k2']) -> [['k1', 'val1'], ['k2', 'val2']]\n */\n multiGet: (keys, callback) => {\n const promises = keys.map((key) => AsyncStorage.getItem(key));\n const processResult = (result: string[]) =>\n result.map((value, i) => [keys[i], value]);\n return createPromiseAll(promises, callback, processResult);\n },\n\n /**\n * Takes an array of key-value array pairs.\n * multiSet([['k1', 'val1'], ['k2', 'val2']])\n */\n multiSet: (keyValuePairs, callback) => {\n const promises = keyValuePairs.map((item) =>\n AsyncStorage.setItem(item[0], item[1])\n );\n return createPromiseAll(promises, callback);\n },\n\n /**\n * Delete all the keys in the `keys` array.\n */\n multiRemove: (keys, callback) => {\n const promises = keys.map((key) => AsyncStorage.removeItem(key));\n return createPromiseAll(promises, callback);\n },\n\n /**\n * Takes an array of key-value array pairs and merges them with existing\n * values, assuming they are stringified JSON.\n *\n * multiMerge([['k1', 'val1'], ['k2', 'val2']])\n */\n multiMerge: (keyValuePairs, callback) => {\n const promises = keyValuePairs.map((item) =>\n AsyncStorage.mergeItem(item[0], item[1])\n );\n return createPromiseAll(promises, callback);\n },\n};\n\nexport default AsyncStorage;\n","import AsyncStorage from './AsyncStorage';\nimport type { AsyncStorageHook } from './types';\n\nexport function useAsyncStorage(key: string): AsyncStorageHook {\n return {\n getItem: (...args) => AsyncStorage.getItem(key, ...args),\n setItem: (...args) => AsyncStorage.setItem(key, ...args),\n mergeItem: (...args) => AsyncStorage.mergeItem(key, ...args),\n removeItem: (...args) => AsyncStorage.removeItem(key, ...args),\n };\n}\n","import AsyncStorage from './AsyncStorage';\n\nexport { useAsyncStorage } from './hooks';\n\nexport type { AsyncStorageStatic } from './types';\n\nexport default AsyncStorage;\n","var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");Object.defineProperty(exports,\"__esModule\",{value:true});exports.default=void 0;var _toConsumableArray2=_interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));var _extends2=_interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));var _slicedToArray2=_interopRequireDefault(require(\"@babel/runtime/helpers/slicedToArray\"));var _objectWithoutProperties2=_interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));var _reactDom=_interopRequireDefault(require(\"react-dom\"));var _react=_interopRequireWildcard(require(\"react\"));var _reactNative=require(\"react-native\");var _excluded=[\"value\",\"minimumValue\",\"maximumValue\",\"step\",\"minimumTrackTintColor\",\"maximumTrackTintColor\",\"thumbTintColor\",\"thumbStyle\",\"style\",\"inverted\",\"disabled\",\"trackHeight\",\"thumbSize\",\"thumbImage\",\"onRNCSliderSlidingStart\",\"onRNCSliderSlidingComplete\",\"onRNCSliderValueChange\"];var _this=this,_jsxFileName=\"C:\\\\Dev\\\\react-native-slider\\\\package\\\\src\\\\RNCSliderNativeComponent.web.tsx\";function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!==\"function\")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj;}if(obj===null||typeof obj!==\"object\"&&typeof obj!==\"function\"){return{default:obj};}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!==\"default\"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}var valueToEvent=function valueToEvent(value){return{nativeEvent:{value:value}};};var RCTSliderWebComponent=_react.default.forwardRef(function(_ref,forwardedRef){var initialValue=_ref.value,_ref$minimumValue=_ref.minimumValue,minimumValue=_ref$minimumValue===void 0?0:_ref$minimumValue,_ref$maximumValue=_ref.maximumValue,maximumValue=_ref$maximumValue===void 0?0:_ref$maximumValue,_ref$step=_ref.step,step=_ref$step===void 0?1:_ref$step,_ref$minimumTrackTint=_ref.minimumTrackTintColor,minimumTrackTintColor=_ref$minimumTrackTint===void 0?'#009688':_ref$minimumTrackTint,_ref$maximumTrackTint=_ref.maximumTrackTintColor,maximumTrackTintColor=_ref$maximumTrackTint===void 0?'#939393':_ref$maximumTrackTint,_ref$thumbTintColor=_ref.thumbTintColor,thumbTintColor=_ref$thumbTintColor===void 0?'#009688':_ref$thumbTintColor,_ref$thumbStyle=_ref.thumbStyle,thumbStyle=_ref$thumbStyle===void 0?{}:_ref$thumbStyle,_ref$style=_ref.style,style=_ref$style===void 0?{}:_ref$style,_ref$inverted=_ref.inverted,inverted=_ref$inverted===void 0?false:_ref$inverted,_ref$disabled=_ref.disabled,disabled=_ref$disabled===void 0?false:_ref$disabled,_ref$trackHeight=_ref.trackHeight,trackHeight=_ref$trackHeight===void 0?4:_ref$trackHeight,_ref$thumbSize=_ref.thumbSize,thumbSize=_ref$thumbSize===void 0?20:_ref$thumbSize,thumbImage=_ref.thumbImage,_ref$onRNCSliderSlidi=_ref.onRNCSliderSlidingStart,onRNCSliderSlidingStart=_ref$onRNCSliderSlidi===void 0?function(_){}:_ref$onRNCSliderSlidi,_ref$onRNCSliderSlidi2=_ref.onRNCSliderSlidingComplete,onRNCSliderSlidingComplete=_ref$onRNCSliderSlidi2===void 0?function(_){}:_ref$onRNCSliderSlidi2,_ref$onRNCSliderValue=_ref.onRNCSliderValueChange,onRNCSliderValueChange=_ref$onRNCSliderValue===void 0?function(_){}:_ref$onRNCSliderValue,others=(0,_objectWithoutProperties2.default)(_ref,_excluded);var containerSize=_react.default.useRef({width:0,height:0});var containerPositionX=_react.default.useRef(0);var containerRef=forwardedRef||_react.default.createRef();var containerPositionInvalidated=_react.default.useRef(false);var _React$useState=_react.default.useState(initialValue||minimumValue),_React$useState2=(0,_slicedToArray2.default)(_React$useState,2),value=_React$useState2[0],setValue=_React$useState2[1];var lastInitialValue=_react.default.useRef();var animationValues=_react.default.useRef({val:new _reactNative.Animated.Value(value),min:new _reactNative.Animated.Value(minimumValue),max:new _reactNative.Animated.Value(maximumValue),diff:new _reactNative.Animated.Value(maximumValue-minimumValue||1)}).current;_react.default.useEffect(function(){animationValues.min.setValue(minimumValue);animationValues.max.setValue(maximumValue);animationValues.diff.setValue(maximumValue-minimumValue||1);},[animationValues,minimumValue,maximumValue]);var minPercent=_react.default.useRef(_reactNative.Animated.multiply(new _reactNative.Animated.Value(100),_reactNative.Animated.divide(_reactNative.Animated.subtract(animationValues.val,animationValues.min),animationValues.diff))).current;var maxPercent=_react.default.useRef(_reactNative.Animated.subtract(new _reactNative.Animated.Value(100),minPercent)).current;var onValueChange=(0,_react.useCallback)(function(value){onRNCSliderValueChange&&onRNCSliderValueChange(valueToEvent(value));},[onRNCSliderValueChange]);var onSlidingStart=(0,_react.useCallback)(function(value){onRNCSliderSlidingStart&&onRNCSliderSlidingStart(valueToEvent(value));},[onRNCSliderSlidingStart]);var onSlidingComplete=(0,_react.useCallback)(function(value){onRNCSliderSlidingComplete&&onRNCSliderSlidingComplete(valueToEvent(value));},[onRNCSliderSlidingComplete]);var _updateValue=(0,_react.useCallback)(function(newValue){var hardRounded=decimalPrecision.current<20?Number.parseFloat(newValue.toFixed(decimalPrecision.current)):newValue;var withinBounds=Math.max(minimumValue,Math.min(hardRounded,maximumValue));if(value!==withinBounds){setValue(withinBounds);onValueChange(withinBounds);return withinBounds;}return hardRounded;},[minimumValue,maximumValue,value,onValueChange]);_react.default.useLayoutEffect(function(){if(initialValue!==lastInitialValue.current){lastInitialValue.current=initialValue;var newValue=_updateValue(initialValue);animationValues.val.setValue(newValue);}},[initialValue,_updateValue,animationValues]);_react.default.useEffect(function(){var invalidateContainerPosition=function invalidateContainerPosition(){containerPositionInvalidated.current=true;};var onDocumentScroll=function onDocumentScroll(e){var isAlreadyInvalidated=!containerPositionInvalidated.current;if(isAlreadyInvalidated&&containerRef.current&&e.target.contains(containerRef.current)){invalidateContainerPosition();}};window.addEventListener('resize',invalidateContainerPosition);document.addEventListener('scroll',onDocumentScroll,{capture:true});return function(){window.removeEventListener('resize',invalidateContainerPosition);document.removeEventListener('scroll',onDocumentScroll,{capture:true});};},[containerRef]);var containerStyle=_reactNative.StyleSheet.compose({flexGrow:1,flexShrink:1,flexBasis:'auto',flexDirection:'row',alignItems:'center'},style);var trackStyle={height:trackHeight,borderRadius:trackHeight/2,userSelect:'none'};var minimumTrackStyle=Object.assign({},trackStyle,{backgroundColor:minimumTrackTintColor,flexGrow:minPercent});var maximumTrackStyle=Object.assign({},trackStyle,{backgroundColor:maximumTrackTintColor,flexGrow:maxPercent});var thumbViewStyle=_reactNative.StyleSheet.compose({width:thumbSize,height:thumbSize,backgroundColor:thumbTintColor,zIndex:1,borderRadius:thumbSize/2,overflow:'hidden'},thumbStyle);var decimalPrecision=_react.default.useRef(calculatePrecision(minimumValue,maximumValue,step));_react.default.useEffect(function(){decimalPrecision.current=calculatePrecision(minimumValue,maximumValue,step);},[maximumValue,minimumValue,step]);var updateContainerPositionX=function updateContainerPositionX(){var _ReactDOM$findDOMNode;var positionX=(_ReactDOM$findDOMNode=_reactDom.default.findDOMNode(containerRef.current).getBoundingClientRect())==null?void 0:_ReactDOM$findDOMNode.x;containerPositionX.current=positionX!=null?positionX:0;};var getValueFromNativeEvent=function getValueFromNativeEvent(pageX){var _containerSize$curren=containerSize.current.width,width=_containerSize$curren===void 0?1:_containerSize$curren;if(containerPositionInvalidated.current){containerPositionInvalidated.current=false;updateContainerPositionX();}var containerX=containerPositionX.current;if(pageXcontainerX+width){return inverted?minimumValue:maximumValue;}else{var x=pageX-containerX;var newValue=inverted?maximumValue-(maximumValue-minimumValue)*x/width:minimumValue+(maximumValue-minimumValue)*x/width;return step?Math.round(newValue/step)*step:newValue;}};var onTouchEnd=function onTouchEnd(_ref2){var nativeEvent=_ref2.nativeEvent;var newValue=_updateValue(getValueFromNativeEvent(nativeEvent.pageX));animationValues.val.setValue(newValue);onSlidingComplete(newValue);};var onMove=function onMove(_ref3){var nativeEvent=_ref3.nativeEvent;var newValue=getValueFromNativeEvent(nativeEvent.pageX);animationValues.val.setValue(newValue);_updateValue(newValue);};var accessibilityActions=function accessibilityActions(event){var tenth=(maximumValue-minimumValue)/10;switch(event.nativeEvent.actionName){case'increment':_updateValue(value+(step||tenth));break;case'decrement':_updateValue(value-(step||tenth));break;}};_react.default.useImperativeHandle(forwardedRef,function(){return{updateValue:function updateValue(val){_updateValue(val);}};},[_updateValue]);return _react.default.createElement(_reactNative.View,(0,_extends2.default)({ref:containerRef,onLayout:function onLayout(_ref4){var layout=_ref4.nativeEvent.layout;containerSize.current.height=layout.height;containerSize.current.width=layout.width;if(containerRef.current){updateContainerPositionX();}},accessibilityActions:[{name:'increment',label:'increment'},{name:'decrement',label:'decrement'}],onAccessibilityAction:accessibilityActions,accessible:true,accessibilityRole:'adjustable',style:containerStyle},others,{onStartShouldSetResponder:function onStartShouldSetResponder(){return!disabled;},onMoveShouldSetResponder:function onMoveShouldSetResponder(){return!disabled;},onResponderGrant:function onResponderGrant(){return onSlidingStart(value);},onResponderRelease:onTouchEnd,onResponderMove:onMove,__self:_this,__source:{fileName:_jsxFileName,lineNumber:318,columnNumber:7}}),_react.default.createElement(_reactNative.Animated.View,{pointerEvents:\"none\",style:minimumTrackStyle,__self:_this,__source:{fileName:_jsxFileName,lineNumber:343,columnNumber:9}}),_react.default.createElement(_reactNative.View,{pointerEvents:\"none\",style:thumbViewStyle,__self:_this,__source:{fileName:_jsxFileName,lineNumber:344,columnNumber:9}},thumbImage!==undefined?_react.default.createElement(_reactNative.Image,{source:thumbImage,style:{width:'100%',height:'100%'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:346,columnNumber:13}}):null),_react.default.createElement(_reactNative.Animated.View,{pointerEvents:\"none\",style:maximumTrackStyle,__self:_this,__source:{fileName:_jsxFileName,lineNumber:352,columnNumber:9}}));});function calculatePrecision(minimumValue,maximumValue,step){if(!step){return Infinity;}else{var decimals=[minimumValue,maximumValue,step].map(function(value){return((value+'').split('.').pop()||'').length;});return Math.max.apply(Math,(0,_toConsumableArray2.default)(decimals));}}RCTSliderWebComponent.displayName='RTCSliderWebComponent';var _default=RCTSliderWebComponent;exports.default=_default;","var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");Object.defineProperty(exports,\"__esModule\",{value:true});exports.default=void 0;var _extends2=_interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));var _objectWithoutProperties2=_interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));var _react=_interopRequireDefault(require(\"react\"));var _reactNative=require(\"react-native\");var _index=_interopRequireDefault(require(\"./index\"));var _excluded=[\"onValueChange\",\"onSlidingStart\",\"onSlidingComplete\",\"onAccessibilityAction\"];var _this=this,_jsxFileName=\"C:\\\\Dev\\\\react-native-slider\\\\package\\\\src\\\\Slider.tsx\";var LIMIT_MIN_VALUE=Number.MIN_SAFE_INTEGER;var LIMIT_MAX_VALUE=Number.MAX_SAFE_INTEGER;var SliderComponent=function SliderComponent(props,forwardedRef){var _props$accessibilityS;var style=_reactNative.StyleSheet.compose(props.style,styles.slider);var onValueChange=props.onValueChange,onSlidingStart=props.onSlidingStart,onSlidingComplete=props.onSlidingComplete,onAccessibilityAction=props.onAccessibilityAction,localProps=(0,_objectWithoutProperties2.default)(props,_excluded);var onValueChangeEvent=onValueChange?function(event){onValueChange(event.nativeEvent.value);}:null;var _disabled=typeof props.disabled==='boolean'?props.disabled:((_props$accessibilityS=props.accessibilityState)==null?void 0:_props$accessibilityS.disabled)===true;var _accessibilityState=typeof props.disabled==='boolean'?Object.assign({},props.accessibilityState,{disabled:props.disabled}):props.accessibilityState;var onSlidingStartEvent=onSlidingStart?function(event){onSlidingStart(event.nativeEvent.value);}:null;var onSlidingCompleteEvent=onSlidingComplete?function(event){onSlidingComplete(event.nativeEvent.value);}:null;var onAccessibilityActionEvent=onAccessibilityAction?function(event){onAccessibilityAction(event);}:null;var value=Number.isNaN(props.value)||!props.value?undefined:props.value;var lowerLimit=!!localProps.lowerLimit||localProps.lowerLimit===0?localProps.lowerLimit:LIMIT_MIN_VALUE;var upperLimit=!!localProps.upperLimit||localProps.upperLimit===0?localProps.upperLimit:LIMIT_MAX_VALUE;return _react.default.createElement(_index.default,(0,_extends2.default)({},localProps,{value:value,lowerLimit:lowerLimit,upperLimit:upperLimit,accessibilityState:_accessibilityState,thumbImage:_reactNative.Platform.OS==='web'?props.thumbImage:props.thumbImage?_reactNative.Image.resolveAssetSource(props.thumbImage):undefined,ref:forwardedRef,style:style,onChange:onValueChangeEvent,onRNCSliderSlidingStart:onSlidingStartEvent,onRNCSliderSlidingComplete:onSlidingCompleteEvent,onRNCSliderValueChange:onValueChangeEvent,disabled:_disabled,onStartShouldSetResponder:function onStartShouldSetResponder(){return true;},onResponderTerminationRequest:function onResponderTerminationRequest(){return false;},onRNCSliderAccessibilityAction:onAccessibilityActionEvent,__self:_this,__source:{fileName:_jsxFileName,lineNumber:251,columnNumber:5}}));};var SliderWithRef=_react.default.forwardRef(SliderComponent);SliderWithRef.defaultProps={value:0,minimumValue:0,maximumValue:1,step:0,inverted:false,tapToSeek:false,lowerLimit:LIMIT_MIN_VALUE,upperLimit:LIMIT_MAX_VALUE};var styles=_reactNative.StyleSheet.create(_reactNative.Platform.OS==='ios'?{slider:{height:40}}:{slider:{}});var _default=SliderWithRef;exports.default=_default;","Object.defineProperty(exports,\"__esModule\",{value:true});exports.default=void 0;var RNCSlider=require('./RNCSliderNativeComponent').default;var _default=RNCSlider;exports.default=_default;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\n'use strict';\n\nexport type PackagerAsset = {\n +__packager_asset: boolean,\n +fileSystemLocation: string,\n +httpServerLocation: string,\n +width: ?number,\n +height: ?number,\n +scales: Array,\n +hash: string,\n +name: string,\n +type: string,\n ...\n};\n\nconst assets: Array = [];\n\nfunction registerAsset(asset: PackagerAsset): number {\n // `push` returns new array length, so the first asset will\n // get id 1 (not 0) to make the value truthy\n return assets.push(asset);\n}\n\nfunction getAssetByID(assetId: number): PackagerAsset {\n return assets[assetId - 1];\n}\n\nmodule.exports = {registerAsset, getAssetByID};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @noflow\n */\n\n/* eslint no-bitwise: 0 */\n\n'use strict';\n\nfunction normalizeColor(color) {\n if (typeof color === 'number') {\n if (color >>> 0 === color && color >= 0 && color <= 0xffffffff) {\n return color;\n }\n return null;\n }\n\n if (typeof color !== 'string') {\n return null;\n }\n\n const matchers = getMatchers();\n let match;\n\n // Ordered based on occurrences on Facebook codebase\n if ((match = matchers.hex6.exec(color))) {\n return parseInt(match[1] + 'ff', 16) >>> 0;\n }\n\n const colorFromKeyword = normalizeKeyword(color);\n if (colorFromKeyword != null) {\n return colorFromKeyword;\n }\n\n if ((match = matchers.rgb.exec(color))) {\n return (\n ((parse255(match[1]) << 24) | // r\n (parse255(match[2]) << 16) | // g\n (parse255(match[3]) << 8) | // b\n 0x000000ff) >>> // a\n 0\n );\n }\n\n if ((match = matchers.rgba.exec(color))) {\n // rgba(R G B / A) notation\n if (match[6] !== undefined) {\n return (\n ((parse255(match[6]) << 24) | // r\n (parse255(match[7]) << 16) | // g\n (parse255(match[8]) << 8) | // b\n parse1(match[9])) >>> // a\n 0\n );\n }\n\n // rgba(R, G, B, A) notation\n return (\n ((parse255(match[2]) << 24) | // r\n (parse255(match[3]) << 16) | // g\n (parse255(match[4]) << 8) | // b\n parse1(match[5])) >>> // a\n 0\n );\n }\n\n if ((match = matchers.hex3.exec(color))) {\n return (\n parseInt(\n match[1] +\n match[1] + // r\n match[2] +\n match[2] + // g\n match[3] +\n match[3] + // b\n 'ff', // a\n 16,\n ) >>> 0\n );\n }\n\n // https://drafts.csswg.org/css-color-4/#hex-notation\n if ((match = matchers.hex8.exec(color))) {\n return parseInt(match[1], 16) >>> 0;\n }\n\n if ((match = matchers.hex4.exec(color))) {\n return (\n parseInt(\n match[1] +\n match[1] + // r\n match[2] +\n match[2] + // g\n match[3] +\n match[3] + // b\n match[4] +\n match[4], // a\n 16,\n ) >>> 0\n );\n }\n\n if ((match = matchers.hsl.exec(color))) {\n return (\n (hslToRgb(\n parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]), // l\n ) |\n 0x000000ff) >>> // a\n 0\n );\n }\n\n if ((match = matchers.hsla.exec(color))) {\n // hsla(H S L / A) notation\n if (match[6] !== undefined) {\n return (\n (hslToRgb(\n parse360(match[6]), // h\n parsePercentage(match[7]), // s\n parsePercentage(match[8]), // l\n ) |\n parse1(match[9])) >>> // a\n 0\n );\n }\n\n // hsla(H, S, L, A) notation\n return (\n (hslToRgb(\n parse360(match[2]), // h\n parsePercentage(match[3]), // s\n parsePercentage(match[4]), // l\n ) |\n parse1(match[5])) >>> // a\n 0\n );\n }\n\n if ((match = matchers.hwb.exec(color))) {\n return (\n (hwbToRgb(\n parse360(match[1]), // h\n parsePercentage(match[2]), // w\n parsePercentage(match[3]), // b\n ) |\n 0x000000ff) >>> // a\n 0\n );\n }\n\n return null;\n}\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\nfunction hslToRgb(h, s, l) {\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n const r = hue2rgb(p, q, h + 1 / 3);\n const g = hue2rgb(p, q, h);\n const b = hue2rgb(p, q, h - 1 / 3);\n\n return (\n (Math.round(r * 255) << 24) |\n (Math.round(g * 255) << 16) |\n (Math.round(b * 255) << 8)\n );\n}\n\nfunction hwbToRgb(h, w, b) {\n if (w + b >= 1) {\n const gray = Math.round((w * 255) / (w + b));\n\n return (gray << 24) | (gray << 16) | (gray << 8);\n }\n\n const red = hue2rgb(0, 1, h + 1 / 3) * (1 - w - b) + w;\n const green = hue2rgb(0, 1, h) * (1 - w - b) + w;\n const blue = hue2rgb(0, 1, h - 1 / 3) * (1 - w - b) + w;\n\n return (\n (Math.round(red * 255) << 24) |\n (Math.round(green * 255) << 16) |\n (Math.round(blue * 255) << 8)\n );\n}\n\nconst NUMBER = '[-+]?\\\\d*\\\\.?\\\\d+';\nconst PERCENTAGE = NUMBER + '%';\n\nfunction call(...args) {\n return '\\\\(\\\\s*(' + args.join(')\\\\s*,?\\\\s*(') + ')\\\\s*\\\\)';\n}\n\nfunction callWithSlashSeparator(...args) {\n return (\n '\\\\(\\\\s*(' +\n args.slice(0, args.length - 1).join(')\\\\s*,?\\\\s*(') +\n ')\\\\s*/\\\\s*(' +\n args[args.length - 1] +\n ')\\\\s*\\\\)'\n );\n}\n\nfunction commaSeparatedCall(...args) {\n return '\\\\(\\\\s*(' + args.join(')\\\\s*,\\\\s*(') + ')\\\\s*\\\\)';\n}\n\nlet cachedMatchers;\n\nfunction getMatchers() {\n if (cachedMatchers === undefined) {\n cachedMatchers = {\n rgb: new RegExp('rgb' + call(NUMBER, NUMBER, NUMBER)),\n rgba: new RegExp(\n 'rgba(' +\n commaSeparatedCall(NUMBER, NUMBER, NUMBER, NUMBER) +\n '|' +\n callWithSlashSeparator(NUMBER, NUMBER, NUMBER, NUMBER) +\n ')',\n ),\n hsl: new RegExp('hsl' + call(NUMBER, PERCENTAGE, PERCENTAGE)),\n hsla: new RegExp(\n 'hsla(' +\n commaSeparatedCall(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER) +\n '|' +\n callWithSlashSeparator(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER) +\n ')',\n ),\n hwb: new RegExp('hwb' + call(NUMBER, PERCENTAGE, PERCENTAGE)),\n hex3: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex4: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#([0-9a-fA-F]{6})$/,\n hex8: /^#([0-9a-fA-F]{8})$/,\n };\n }\n return cachedMatchers;\n}\n\nfunction parse255(str) {\n const int = parseInt(str, 10);\n if (int < 0) {\n return 0;\n }\n if (int > 255) {\n return 255;\n }\n return int;\n}\n\nfunction parse360(str) {\n const int = parseFloat(str);\n return (((int % 360) + 360) % 360) / 360;\n}\n\nfunction parse1(str) {\n const num = parseFloat(str);\n if (num < 0) {\n return 0;\n }\n if (num > 1) {\n return 255;\n }\n return Math.round(num * 255);\n}\n\nfunction parsePercentage(str) {\n // parseFloat conveniently ignores the final %\n const int = parseFloat(str);\n if (int < 0) {\n return 0;\n }\n if (int > 100) {\n return 1;\n }\n return int / 100;\n}\n\nfunction normalizeKeyword(name) {\n // prettier-ignore\n switch (name) {\n case 'transparent': return 0x00000000;\n // http://www.w3.org/TR/css3-color/#svg-color\n case 'aliceblue': return 0xf0f8ffff;\n case 'antiquewhite': return 0xfaebd7ff;\n case 'aqua': return 0x00ffffff;\n case 'aquamarine': return 0x7fffd4ff;\n case 'azure': return 0xf0ffffff;\n case 'beige': return 0xf5f5dcff;\n case 'bisque': return 0xffe4c4ff;\n case 'black': return 0x000000ff;\n case 'blanchedalmond': return 0xffebcdff;\n case 'blue': return 0x0000ffff;\n case 'blueviolet': return 0x8a2be2ff;\n case 'brown': return 0xa52a2aff;\n case 'burlywood': return 0xdeb887ff;\n case 'burntsienna': return 0xea7e5dff;\n case 'cadetblue': return 0x5f9ea0ff;\n case 'chartreuse': return 0x7fff00ff;\n case 'chocolate': return 0xd2691eff;\n case 'coral': return 0xff7f50ff;\n case 'cornflowerblue': return 0x6495edff;\n case 'cornsilk': return 0xfff8dcff;\n case 'crimson': return 0xdc143cff;\n case 'cyan': return 0x00ffffff;\n case 'darkblue': return 0x00008bff;\n case 'darkcyan': return 0x008b8bff;\n case 'darkgoldenrod': return 0xb8860bff;\n case 'darkgray': return 0xa9a9a9ff;\n case 'darkgreen': return 0x006400ff;\n case 'darkgrey': return 0xa9a9a9ff;\n case 'darkkhaki': return 0xbdb76bff;\n case 'darkmagenta': return 0x8b008bff;\n case 'darkolivegreen': return 0x556b2fff;\n case 'darkorange': return 0xff8c00ff;\n case 'darkorchid': return 0x9932ccff;\n case 'darkred': return 0x8b0000ff;\n case 'darksalmon': return 0xe9967aff;\n case 'darkseagreen': return 0x8fbc8fff;\n case 'darkslateblue': return 0x483d8bff;\n case 'darkslategray': return 0x2f4f4fff;\n case 'darkslategrey': return 0x2f4f4fff;\n case 'darkturquoise': return 0x00ced1ff;\n case 'darkviolet': return 0x9400d3ff;\n case 'deeppink': return 0xff1493ff;\n case 'deepskyblue': return 0x00bfffff;\n case 'dimgray': return 0x696969ff;\n case 'dimgrey': return 0x696969ff;\n case 'dodgerblue': return 0x1e90ffff;\n case 'firebrick': return 0xb22222ff;\n case 'floralwhite': return 0xfffaf0ff;\n case 'forestgreen': return 0x228b22ff;\n case 'fuchsia': return 0xff00ffff;\n case 'gainsboro': return 0xdcdcdcff;\n case 'ghostwhite': return 0xf8f8ffff;\n case 'gold': return 0xffd700ff;\n case 'goldenrod': return 0xdaa520ff;\n case 'gray': return 0x808080ff;\n case 'green': return 0x008000ff;\n case 'greenyellow': return 0xadff2fff;\n case 'grey': return 0x808080ff;\n case 'honeydew': return 0xf0fff0ff;\n case 'hotpink': return 0xff69b4ff;\n case 'indianred': return 0xcd5c5cff;\n case 'indigo': return 0x4b0082ff;\n case 'ivory': return 0xfffff0ff;\n case 'khaki': return 0xf0e68cff;\n case 'lavender': return 0xe6e6faff;\n case 'lavenderblush': return 0xfff0f5ff;\n case 'lawngreen': return 0x7cfc00ff;\n case 'lemonchiffon': return 0xfffacdff;\n case 'lightblue': return 0xadd8e6ff;\n case 'lightcoral': return 0xf08080ff;\n case 'lightcyan': return 0xe0ffffff;\n case 'lightgoldenrodyellow': return 0xfafad2ff;\n case 'lightgray': return 0xd3d3d3ff;\n case 'lightgreen': return 0x90ee90ff;\n case 'lightgrey': return 0xd3d3d3ff;\n case 'lightpink': return 0xffb6c1ff;\n case 'lightsalmon': return 0xffa07aff;\n case 'lightseagreen': return 0x20b2aaff;\n case 'lightskyblue': return 0x87cefaff;\n case 'lightslategray': return 0x778899ff;\n case 'lightslategrey': return 0x778899ff;\n case 'lightsteelblue': return 0xb0c4deff;\n case 'lightyellow': return 0xffffe0ff;\n case 'lime': return 0x00ff00ff;\n case 'limegreen': return 0x32cd32ff;\n case 'linen': return 0xfaf0e6ff;\n case 'magenta': return 0xff00ffff;\n case 'maroon': return 0x800000ff;\n case 'mediumaquamarine': return 0x66cdaaff;\n case 'mediumblue': return 0x0000cdff;\n case 'mediumorchid': return 0xba55d3ff;\n case 'mediumpurple': return 0x9370dbff;\n case 'mediumseagreen': return 0x3cb371ff;\n case 'mediumslateblue': return 0x7b68eeff;\n case 'mediumspringgreen': return 0x00fa9aff;\n case 'mediumturquoise': return 0x48d1ccff;\n case 'mediumvioletred': return 0xc71585ff;\n case 'midnightblue': return 0x191970ff;\n case 'mintcream': return 0xf5fffaff;\n case 'mistyrose': return 0xffe4e1ff;\n case 'moccasin': return 0xffe4b5ff;\n case 'navajowhite': return 0xffdeadff;\n case 'navy': return 0x000080ff;\n case 'oldlace': return 0xfdf5e6ff;\n case 'olive': return 0x808000ff;\n case 'olivedrab': return 0x6b8e23ff;\n case 'orange': return 0xffa500ff;\n case 'orangered': return 0xff4500ff;\n case 'orchid': return 0xda70d6ff;\n case 'palegoldenrod': return 0xeee8aaff;\n case 'palegreen': return 0x98fb98ff;\n case 'paleturquoise': return 0xafeeeeff;\n case 'palevioletred': return 0xdb7093ff;\n case 'papayawhip': return 0xffefd5ff;\n case 'peachpuff': return 0xffdab9ff;\n case 'peru': return 0xcd853fff;\n case 'pink': return 0xffc0cbff;\n case 'plum': return 0xdda0ddff;\n case 'powderblue': return 0xb0e0e6ff;\n case 'purple': return 0x800080ff;\n case 'rebeccapurple': return 0x663399ff;\n case 'red': return 0xff0000ff;\n case 'rosybrown': return 0xbc8f8fff;\n case 'royalblue': return 0x4169e1ff;\n case 'saddlebrown': return 0x8b4513ff;\n case 'salmon': return 0xfa8072ff;\n case 'sandybrown': return 0xf4a460ff;\n case 'seagreen': return 0x2e8b57ff;\n case 'seashell': return 0xfff5eeff;\n case 'sienna': return 0xa0522dff;\n case 'silver': return 0xc0c0c0ff;\n case 'skyblue': return 0x87ceebff;\n case 'slateblue': return 0x6a5acdff;\n case 'slategray': return 0x708090ff;\n case 'slategrey': return 0x708090ff;\n case 'snow': return 0xfffafaff;\n case 'springgreen': return 0x00ff7fff;\n case 'steelblue': return 0x4682b4ff;\n case 'tan': return 0xd2b48cff;\n case 'teal': return 0x008080ff;\n case 'thistle': return 0xd8bfd8ff;\n case 'tomato': return 0xff6347ff;\n case 'turquoise': return 0x40e0d0ff;\n case 'violet': return 0xee82eeff;\n case 'wheat': return 0xf5deb3ff;\n case 'white': return 0xffffffff;\n case 'whitesmoke': return 0xf5f5f5ff;\n case 'yellow': return 0xffff00ff;\n case 'yellowgreen': return 0x9acd32ff;\n }\n return null;\n}\n\nmodule.exports = normalizeColor;\n","export var PARAM_KEY = 'actions';\nexport var ADDON_ID = 'storybook/actions';\nexport var PANEL_ID = \"\".concat(ADDON_ID, \"/panel\");\nexport var EVENT_ID = \"\".concat(ADDON_ID, \"/action-event\");\nexport var CYCLIC_KEY = '$___storybook.isCyclic';","export * from './constants';\nexport * from './models';\nexport * from './preview';\n\nif (module && module.hot && module.hot.decline) {\n module.hot.decline();\n}","export * from './ActionDisplay';\nexport * from './ActionsFunction';\nexport * from './ActionOptions';\nexport * from './ActionsMap';\nexport * from './DecoratorFunction';\nexport * from './HandlerFunction';","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\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.object.get-own-property-descriptors.js\";\nimport \"core-js/modules/es.object.get-own-property-descriptor.js\";\nimport \"core-js/modules/es.object.assign.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport uuidv4 from 'uuid-browser/v4';\nimport { addons } from '@storybook/addons';\nimport { EVENT_ID } from '../constants';\nimport { config } from './configureActions';\n\n// import('react').SyntheticEvent;\nvar findProto = function findProto(obj, callback) {\n var proto = Object.getPrototypeOf(obj);\n if (!proto || callback(proto)) return proto;\n return findProto(proto, callback);\n};\n\nvar isReactSyntheticEvent = function isReactSyntheticEvent(e) {\n return Boolean(_typeof(e) === 'object' && e && findProto(e, function (proto) {\n return /^Synthetic(?:Base)?Event$/.test(proto.constructor.name);\n }) && typeof e.persist === 'function');\n};\n\nvar serializeArg = function serializeArg(a) {\n if (isReactSyntheticEvent(a)) {\n var e = Object.create(a.constructor.prototype, Object.getOwnPropertyDescriptors(a));\n e.persist();\n var viewDescriptor = Object.getOwnPropertyDescriptor(e, 'view'); // don't send the entire window object over.\n\n var view = viewDescriptor === null || viewDescriptor === void 0 ? void 0 : viewDescriptor.value;\n\n if (_typeof(view) === 'object' && (view === null || view === void 0 ? void 0 : view.constructor.name) === 'Window') {\n Object.defineProperty(e, 'view', Object.assign({}, viewDescriptor, {\n value: Object.create(view.constructor.prototype)\n }));\n }\n\n return e;\n }\n\n return a;\n};\n\nexport function action(name) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var actionOptions = Object.assign({}, config, options);\n\n var handler = function actionHandler() {\n var channel = addons.getChannel();\n var id = uuidv4();\n var minDepth = 5; // anything less is really just storybook internals\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var serializedArgs = args.map(serializeArg);\n var normalizedArgs = args.length > 1 ? serializedArgs : serializedArgs[0];\n var actionDisplayToEmit = {\n id: id,\n count: 0,\n data: {\n name: name,\n args: normalizedArgs\n },\n options: Object.assign({}, actionOptions, {\n maxDepth: minDepth + (actionOptions.depth || 3),\n allowFunction: actionOptions.allowFunction || false\n })\n };\n channel.emit(EVENT_ID, actionDisplayToEmit);\n };\n\n return handler;\n}","import \"core-js/modules/es.object.assign.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport { action } from './action';\nimport { config } from './configureActions';\nexport var actions = function actions() {\n var options = config;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var names = args; // args argument can be a single argument as an array\n\n if (names.length === 1 && Array.isArray(names[0])) {\n var _names = names;\n\n var _names2 = _slicedToArray(_names, 1);\n\n names = _names2[0];\n } // last argument can be options\n\n\n if (names.length !== 1 && typeof names[names.length - 1] !== 'string') {\n options = Object.assign({}, config, names.pop());\n }\n\n var namesObject = names[0];\n\n if (names.length !== 1 || typeof namesObject === 'string') {\n namesObject = {};\n names.forEach(function (name) {\n namesObject[name] = name;\n });\n }\n\n var actionsObject = {};\n Object.keys(namesObject).forEach(function (name) {\n actionsObject[name] = action(namesObject[name], options);\n });\n return actionsObject;\n};","import \"core-js/modules/es.object.assign.js\";\nexport var config = {\n depth: 10,\n clearOnStoryChange: true,\n limit: 50\n};\nexport var configureActions = function configureActions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n Object.assign(config, options);\n};","import \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.object.freeze.js\";\n\nvar _templateObject, _templateObject2;\n\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\n\nimport deprecate from 'util-deprecate';\nimport dedent from 'ts-dedent';\nexport var decorateAction = function decorateAction(_decorators) {\n return deprecate(function () {}, dedent(_templateObject || (_templateObject = _taggedTemplateLiteral([\"\\n decorateAction is no longer supported as of Storybook 6.0.\\n \"]))));\n};\nvar deprecatedCallback = deprecate(function () {}, 'decorate.* is no longer supported as of Storybook 6.0.');\nexport var decorate = function decorate(_decorators) {\n return deprecate(function () {\n return {\n action: deprecatedCallback,\n actions: deprecatedCallback,\n withActions: deprecatedCallback\n };\n }, dedent(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral([\"\\n decorate is deprecated, please configure addon-actions using the addParameter api:\\n \\n addParameters({\\n actions: {\\n handles: options\\n },\\n });\\n \"]))));\n};","export * from './action';\nexport * from './actions';\nexport * from './configureActions';\nexport * from './decorateAction';\nexport * from './withActions';","import \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.object.freeze.js\";\n\nvar _templateObject;\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.object.entries.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.match.js\";\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\n// Based on http://backbonejs.org/docs/backbone.html#section-164\nimport global from 'global';\nimport { useEffect, makeDecorator } from '@storybook/addons';\nimport deprecate from 'util-deprecate';\nimport dedent from 'ts-dedent';\nimport { actions } from './actions';\nimport { PARAM_KEY } from '../constants';\nvar document = global.document,\n Element = global.Element;\nvar delegateEventSplitter = /^(\\S+)\\s*(.*)$/;\nvar isIE = Element != null && !Element.prototype.matches;\nvar matchesMethod = isIE ? 'msMatchesSelector' : 'matches';\nvar root = document && document.getElementById('root');\n\nvar hasMatchInAncestry = function hasMatchInAncestry(element, selector) {\n if (element[matchesMethod](selector)) {\n return true;\n }\n\n var parent = element.parentElement;\n\n if (!parent) {\n return false;\n }\n\n return hasMatchInAncestry(parent, selector);\n};\n\nvar createHandlers = function createHandlers(actionsFn) {\n for (var _len = arguments.length, handles = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n handles[_key - 1] = arguments[_key];\n }\n\n var actionsObject = actionsFn.apply(void 0, handles);\n return Object.entries(actionsObject).map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n key = _ref2[0],\n action = _ref2[1];\n\n var _key$match = key.match(delegateEventSplitter),\n _key$match2 = _slicedToArray(_key$match, 3),\n _ = _key$match2[0],\n eventName = _key$match2[1],\n selector = _key$match2[2];\n\n return {\n eventName: eventName,\n handler: function handler(e) {\n if (!selector || hasMatchInAncestry(e.target, selector)) {\n action(e);\n }\n }\n };\n });\n};\n\nvar applyEventHandlers = deprecate(function (actionsFn) {\n for (var _len2 = arguments.length, handles = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n handles[_key2 - 1] = arguments[_key2];\n }\n\n useEffect(function () {\n if (root != null) {\n var handlers = createHandlers.apply(void 0, [actionsFn].concat(handles));\n handlers.forEach(function (_ref3) {\n var eventName = _ref3.eventName,\n handler = _ref3.handler;\n return root.addEventListener(eventName, handler);\n });\n return function () {\n return handlers.forEach(function (_ref4) {\n var eventName = _ref4.eventName,\n handler = _ref4.handler;\n return root.removeEventListener(eventName, handler);\n });\n };\n }\n\n return undefined;\n }, [root, actionsFn, handles]);\n}, dedent(_templateObject || (_templateObject = _taggedTemplateLiteral([\"\\n withActions(options) is deprecated, please configure addon-actions using the addParameter api:\\n\\n addParameters({\\n actions: {\\n handles: options\\n },\\n });\\n \"]))));\n\nvar applyDeprecatedOptions = function applyDeprecatedOptions(actionsFn, options) {\n if (options) {\n applyEventHandlers(actionsFn, options);\n }\n};\n\nexport var withActions = makeDecorator({\n name: 'withActions',\n parameterName: PARAM_KEY,\n skipIfNoParametersOrOptions: true,\n wrapper: function wrapper(getStory, context, _ref5) {\n var parameters = _ref5.parameters,\n options = _ref5.options;\n applyDeprecatedOptions(actions, options);\n if (parameters && parameters.handles) applyEventHandlers.apply(void 0, [actions].concat(_toConsumableArray(parameters.handles)));\n return getStory(context);\n }\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _global = require(\"global\");\n\nvar _escapeHtml = _interopRequireDefault(require(\"escape-html\"));\n\nvar _clientApi = require(\"@storybook/client-api\");\n\nvar _KnobStore = _interopRequireDefault(require(\"./KnobStore\"));\n\nvar _shared = require(\"./shared\");\n\nvar _converters = require(\"./converters\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nvar knobValuesFromUrl = Object.entries((0, _clientApi.getQueryParams)()).reduce(function (acc, _ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n k = _ref2[0],\n v = _ref2[1];\n\n if (k.includes('knob-')) {\n return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, k.replace('knob-', ''), v));\n }\n\n return acc;\n}, {}); // This is used by _mayCallChannel to determine how long to wait to before triggering a panel update\n\nvar PANEL_UPDATE_INTERVAL = 400;\n\nfunction escapeStrings(obj) {\n if (typeof obj === 'string') {\n return (0, _escapeHtml[\"default\"])(obj);\n }\n\n if (obj == null || _typeof(obj) !== 'object') {\n return obj;\n }\n\n if (Array.isArray(obj)) {\n var newArray = obj.map(escapeStrings);\n var didChange = newArray.some(function (newValue, key) {\n return newValue !== obj[key];\n });\n return didChange ? newArray : obj;\n }\n\n return Object.entries(obj).reduce(function (acc, _ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n key = _ref4[0],\n oldValue = _ref4[1];\n\n var newValue = escapeStrings(oldValue);\n return newValue === oldValue ? acc : _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, key, newValue));\n }, obj);\n}\n\nvar KnobManager = /*#__PURE__*/function () {\n function KnobManager() {\n _classCallCheck(this, KnobManager);\n\n _defineProperty(this, \"knobStore\", new _KnobStore[\"default\"]());\n\n _defineProperty(this, \"options\", {});\n\n _defineProperty(this, \"calling\", false);\n }\n\n _createClass(KnobManager, [{\n key: \"setChannel\",\n value: function setChannel(channel) {\n this.channel = channel;\n }\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n this.options = options;\n }\n }, {\n key: \"getKnobValue\",\n value: function getKnobValue(_ref5) {\n var value = _ref5.value;\n return this.options.escapeHTML ? escapeStrings(value) : value;\n }\n }, {\n key: \"knob\",\n value: function knob(name, options) {\n this._mayCallChannel();\n\n var knobName = options.groupId ? \"\".concat(name, \"_\").concat(options.groupId) : name;\n var knobStore = this.knobStore;\n var existingKnob = knobStore.get(knobName); // We need to return the value set by the knob editor via this.\n // Normally the knobs are reset and so re-use is safe as long as the types match\n // when in storyshots, though the change event isn't called and so the knobs aren't reset, making this code fail\n // so always create a new knob when in storyshots\n\n if (existingKnob && options.type === existingKnob.type && _global.navigator && ( // userAgent is not set in react-native\n !_global.navigator.userAgent || !_global.navigator.userAgent.includes('jsdom'))) {\n var value = options.value,\n restOptions = _objectWithoutProperties(options, [\"value\"]);\n\n knobStore.update(knobName, restOptions);\n return this.getKnobValue(existingKnob);\n }\n\n var knobInfo = _objectSpread(_objectSpread({}, options), {}, {\n name: knobName,\n label: name\n });\n\n if (knobValuesFromUrl[knobName]) {\n var _value = _converters.deserializers[options.type](knobValuesFromUrl[knobName]);\n\n knobInfo.defaultValue = _value;\n knobInfo.value = _value;\n delete knobValuesFromUrl[knobName];\n } else {\n knobInfo.defaultValue = options.value;\n }\n\n knobStore.set(knobName, knobInfo);\n return this.getKnobValue(knobStore.get(knobName));\n }\n }, {\n key: \"_mayCallChannel\",\n value: function _mayCallChannel() {\n var _this = this;\n\n // Re rendering of the story may cause changes to the knobStore. Some new knobs maybe added and\n // Some knobs may go unused. So we need to update the panel accordingly. For example remove the\n // unused knobs from the panel. This function sends the `setKnobs` message to the channel\n // triggering a panel re-render.\n if (!this.channel) {\n // to prevent call to undefined channel and therefore throwing TypeError\n return;\n }\n\n if (this.calling) {\n // If a call to channel has already registered ignore this call.\n // Once the previous call is completed all the changes to knobStore including the one that\n // triggered this, will be added to the panel.\n // This avoids emitting to the channel within very short periods of time.\n return;\n }\n\n this.calling = true;\n var timestamp = +new Date();\n setTimeout(function () {\n _this.calling = false; // emit to the channel and trigger a panel re-render\n\n if (_this.channel) _this.channel.emit(_shared.SET, {\n knobs: _this.knobStore.getAll(),\n timestamp: timestamp\n });\n }, PANEL_UPDATE_INTERVAL);\n }\n }]);\n\n return KnobManager;\n}();\n\nexports[\"default\"] = KnobManager;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar callArg = function callArg(fn) {\n return fn();\n};\n\nvar callAll = function callAll(fns) {\n return fns.forEach(callArg);\n};\n\nvar KnobStore = /*#__PURE__*/function () {\n function KnobStore() {\n _classCallCheck(this, KnobStore);\n\n _defineProperty(this, \"store\", {});\n\n _defineProperty(this, \"callbacks\", []);\n }\n\n _createClass(KnobStore, [{\n key: \"has\",\n value: function has(key) {\n return this.store[key] !== undefined;\n }\n }, {\n key: \"set\",\n value: function set(key, value) {\n this.store[key] = _objectSpread(_objectSpread({}, value), {}, {\n used: true,\n groupId: value.groupId\n }); // debounce the execution of the callbacks for 50 milliseconds\n\n if (this.timer) {\n clearTimeout(this.timer);\n }\n\n this.timer = setTimeout(callAll, 50, this.callbacks);\n }\n }, {\n key: \"update\",\n value: function update(key, options) {\n this.store[key] = _objectSpread(_objectSpread({}, this.store[key]), options);\n }\n }, {\n key: \"get\",\n value: function get(key) {\n var knob = this.store[key];\n\n if (knob) {\n knob.used = true;\n }\n\n return knob;\n }\n }, {\n key: \"getAll\",\n value: function getAll() {\n return this.store;\n }\n }, {\n key: \"reset\",\n value: function reset() {\n this.store = {};\n }\n }, {\n key: \"markAllUnused\",\n value: function markAllUnused() {\n var _this = this;\n\n Object.keys(this.store).forEach(function (knobName) {\n _this.store[knobName].used = false;\n });\n }\n }, {\n key: \"subscribe\",\n value: function subscribe(cb) {\n this.callbacks.push(cb);\n }\n }, {\n key: \"unsubscribe\",\n value: function unsubscribe(cb) {\n var index = this.callbacks.indexOf(cb);\n this.callbacks.splice(index, 1);\n }\n }]);\n\n return KnobStore;\n}();\n\nexports[\"default\"] = KnobStore;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.deserializers = exports.serializers = exports.converters = void 0;\n\nvar unconvertable = function unconvertable() {\n return undefined;\n};\n\nvar converters = {\n jsonParse: function jsonParse(value) {\n return JSON.parse(value);\n },\n jsonStringify: function jsonStringify(value) {\n return JSON.stringify(value);\n },\n simple: function simple(value) {\n return value;\n },\n stringifyIfSet: function stringifyIfSet(value) {\n return value === null || value === undefined ? '' : String(value);\n },\n stringifyIfTruthy: function stringifyIfTruthy(value) {\n return value ? String(value) : null;\n },\n toArray: function toArray(value) {\n if (Array.isArray(value)) {\n return value;\n }\n\n return value.split(',');\n },\n toBoolean: function toBoolean(value) {\n return value === 'true';\n },\n toDate: function toDate(value) {\n return new Date(value).getTime() || new Date().getTime();\n },\n toFloat: function toFloat(value) {\n return value === '' ? null : parseFloat(value);\n }\n};\nexports.converters = converters;\nvar serializers = {\n array: converters.simple,\n \"boolean\": converters.stringifyIfTruthy,\n button: unconvertable,\n checkbox: converters.simple,\n color: converters.simple,\n date: converters.toDate,\n files: unconvertable,\n number: converters.stringifyIfSet,\n object: converters.jsonStringify,\n options: converters.simple,\n radios: converters.simple,\n select: converters.simple,\n text: converters.simple\n};\nexports.serializers = serializers;\nvar deserializers = {\n array: converters.toArray,\n \"boolean\": converters.toBoolean,\n button: unconvertable,\n checkbox: converters.simple,\n color: converters.simple,\n date: converters.toDate,\n files: unconvertable,\n number: converters.toFloat,\n object: converters.jsonParse,\n options: converters.simple,\n radios: converters.simple,\n select: converters.simple,\n text: converters.simple\n};\nexports.deserializers = deserializers;","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar _exportNames = {\n knob: true,\n text: true,\n \"boolean\": true,\n number: true,\n color: true,\n object: true,\n select: true,\n radios: true,\n array: true,\n date: true,\n button: true,\n files: true,\n optionsKnob: true,\n withKnobs: true\n};\nexports.knob = knob;\nexports.text = text;\nexports[\"boolean\"] = _boolean;\nexports.number = number;\nexports.color = color;\nexports.object = object;\nexports.select = select;\nexports.radios = radios;\nexports.array = array;\nexports.date = date;\nexports.button = button;\nexports.files = files;\nexports.optionsKnob = optionsKnob;\nexports.withKnobs = void 0;\n\nvar _addons = _interopRequireWildcard(require(\"@storybook/addons\"));\n\nvar _shared = require(\"./shared\");\n\nObject.keys(_shared).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] === _shared[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _shared[key];\n }\n });\n});\n\nvar _registerKnobs = require(\"./registerKnobs\");\n\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\n\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction knob(name, options) {\n return _registerKnobs.manager.knob(name, options);\n}\n\nfunction text(name, value, groupId) {\n return _registerKnobs.manager.knob(name, {\n type: 'text',\n value: value,\n groupId: groupId\n });\n}\n\nfunction _boolean(name, value, groupId) {\n return _registerKnobs.manager.knob(name, {\n type: 'boolean',\n value: value,\n groupId: groupId\n });\n}\n\nfunction number(name, value) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var groupId = arguments.length > 3 ? arguments[3] : undefined;\n var rangeDefaults = {\n min: 0,\n max: 10,\n step: 1\n };\n var mergedOptions = options.range ? _objectSpread(_objectSpread({}, rangeDefaults), options) : options;\n\n var finalOptions = _objectSpread(_objectSpread({\n type: 'number'\n }, mergedOptions), {}, {\n value: value,\n groupId: groupId\n });\n\n return _registerKnobs.manager.knob(name, finalOptions);\n}\n\nfunction color(name, value, groupId) {\n return _registerKnobs.manager.knob(name, {\n type: 'color',\n value: value,\n groupId: groupId\n });\n}\n\nfunction object(name, value, groupId) {\n return _registerKnobs.manager.knob(name, {\n type: 'object',\n value: value,\n groupId: groupId\n });\n}\n\nfunction select(name, options, value, groupId) {\n return _registerKnobs.manager.knob(name, {\n type: 'select',\n selectV2: true,\n options: options,\n value: value,\n groupId: groupId\n });\n}\n\nfunction radios(name, options, value, groupId) {\n return _registerKnobs.manager.knob(name, {\n type: 'radios',\n options: options,\n value: value,\n groupId: groupId\n });\n}\n\nfunction array(name, value) {\n var separator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ',';\n var groupId = arguments.length > 3 ? arguments[3] : undefined;\n return _registerKnobs.manager.knob(name, {\n type: 'array',\n value: value,\n separator: separator,\n groupId: groupId\n });\n}\n\nfunction date(name) {\n var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Date();\n var groupId = arguments.length > 2 ? arguments[2] : undefined;\n var proxyValue = value ? value.getTime() : new Date().getTime();\n return _registerKnobs.manager.knob(name, {\n type: 'date',\n value: proxyValue,\n groupId: groupId\n });\n}\n\nfunction button(name, callback, groupId) {\n return _registerKnobs.manager.knob(name, {\n type: 'button',\n callback: callback,\n hideLabel: true,\n groupId: groupId\n });\n}\n\nfunction files(name, accept) {\n var value = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n var groupId = arguments.length > 3 ? arguments[3] : undefined;\n return _registerKnobs.manager.knob(name, {\n type: 'files',\n accept: accept,\n value: value,\n groupId: groupId\n });\n}\n\nfunction optionsKnob(name, valuesObj, value, optionsObj, groupId) {\n return _registerKnobs.manager.knob(name, {\n type: 'options',\n options: valuesObj,\n value: value,\n optionsObj: optionsObj,\n groupId: groupId\n });\n}\n\nvar defaultOptions = {\n escapeHTML: true\n};\nvar withKnobs = (0, _addons.makeDecorator)({\n name: 'withKnobs',\n parameterName: 'knobs',\n skipIfNoParametersOrOptions: false,\n wrapper: function wrapper(getStory, context, _ref) {\n var options = _ref.options,\n parameters = _ref.parameters;\n var storyOptions = parameters || options;\n\n var allOptions = _objectSpread(_objectSpread({}, defaultOptions), storyOptions);\n\n var channel = _addons[\"default\"].getChannel();\n\n _registerKnobs.manager.setChannel(channel);\n\n _registerKnobs.manager.setOptions(allOptions);\n\n channel.emit(_shared.SET_OPTIONS, allOptions);\n (0, _registerKnobs.registerKnobs)();\n return getStory(context);\n }\n});\nexports.withKnobs = withKnobs;\n\nif (module && module.hot && module.hot.decline) {\n module.hot.decline();\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.registerKnobs = registerKnobs;\nexports.manager = void 0;\n\nvar _addons = _interopRequireDefault(require(\"@storybook/addons\"));\n\nvar _clientApi = require(\"@storybook/client-api\");\n\nvar _coreEvents = require(\"@storybook/core-events\");\n\nvar _debounce = _interopRequireDefault(require(\"lodash/debounce\"));\n\nvar _KnobManager = _interopRequireDefault(require(\"./KnobManager\"));\n\nvar _shared = require(\"./shared\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nvar manager = new _KnobManager[\"default\"]();\nexports.manager = manager;\nvar knobStore = manager.knobStore;\nvar COMPONENT_FORCE_RENDER_DEBOUNCE_DELAY_MS = 325;\n\nfunction forceReRender() {\n _addons[\"default\"].getChannel().emit(_coreEvents.FORCE_RE_RENDER);\n}\n\nfunction setPaneKnobs() {\n var timestamp = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : +new Date();\n\n var channel = _addons[\"default\"].getChannel();\n\n channel.emit(_shared.SET, {\n knobs: knobStore.getAll(),\n timestamp: timestamp\n });\n}\n\nvar resetAndForceUpdate = function resetAndForceUpdate() {\n knobStore.markAllUnused();\n forceReRender();\n}; // Increase performance by reducing how frequently the story is recreated during knob changes\n\n\nvar debouncedResetAndForceUpdate = (0, _debounce[\"default\"])(resetAndForceUpdate, COMPONENT_FORCE_RENDER_DEBOUNCE_DELAY_MS);\n\nfunction knobChanged(change) {\n var name = change.name;\n var value = change.value; // Update the related knob and it's value.\n\n var knobOptions = knobStore.get(name);\n knobOptions.value = value;\n\n if (!manager.options.disableForceUpdate && !knobOptions.disableForceUpdate) {\n if (!manager.options.disableDebounce && !knobOptions.disableDebounce) {\n debouncedResetAndForceUpdate();\n } else {\n resetAndForceUpdate();\n }\n }\n}\n\nfunction knobClicked(clicked) {\n var knobOptions = knobStore.get(clicked.name);\n\n if (knobOptions.callback && knobOptions.callback() !== false) {\n forceReRender();\n }\n}\n\nfunction resetKnobs() {\n knobStore.reset();\n setPaneKnobs(false);\n}\n\nfunction resetKnobsAndForceReRender() {\n knobStore.reset();\n forceReRender();\n setPaneKnobs(false);\n}\n\nfunction disconnectCallbacks() {\n var channel = _addons[\"default\"].getChannel();\n\n channel.removeListener(_shared.CHANGE, knobChanged);\n channel.removeListener(_shared.CLICK, knobClicked);\n channel.removeListener(_coreEvents.STORY_CHANGED, resetKnobs);\n channel.removeListener(_shared.RESET, resetKnobsAndForceReRender);\n knobStore.unsubscribe(setPaneKnobs);\n}\n\nfunction connectCallbacks() {\n var channel = _addons[\"default\"].getChannel();\n\n channel.on(_shared.CHANGE, knobChanged);\n channel.on(_shared.CLICK, knobClicked);\n channel.on(_coreEvents.STORY_CHANGED, resetKnobs);\n channel.on(_shared.RESET, resetKnobsAndForceReRender);\n knobStore.subscribe(setPaneKnobs);\n return disconnectCallbacks;\n}\n\nfunction registerKnobs() {\n (0, _clientApi.useEffect)(connectCallbacks, []);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CLICK = exports.SET_OPTIONS = exports.CHANGE = exports.SET = exports.RESET = exports.PANEL_ID = exports.ADDON_ID = exports.PARAM_KEY = void 0;\n// addons, panels and events get unique names using a prefix\nvar PARAM_KEY = 'knobs';\nexports.PARAM_KEY = PARAM_KEY;\nvar ADDON_ID = 'storybookjs/knobs';\nexports.ADDON_ID = ADDON_ID;\nvar PANEL_ID = \"\".concat(ADDON_ID, \"/panel\");\nexports.PANEL_ID = PANEL_ID;\nvar RESET = \"\".concat(ADDON_ID, \"/reset\");\nexports.RESET = RESET;\nvar SET = \"\".concat(ADDON_ID, \"/set\");\nexports.SET = SET;\nvar CHANGE = \"\".concat(ADDON_ID, \"/change\");\nexports.CHANGE = CHANGE;\nvar SET_OPTIONS = \"\".concat(ADDON_ID, \"/set-options\");\nexports.SET_OPTIONS = SET_OPTIONS;\nvar CLICK = \"\".concat(ADDON_ID, \"/click\");\nexports.CLICK = CLICK;","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst react_1 = __importStar(require(\"react\"));\nconst react_native_1 = require(\"react-native\");\nconst theme = {\n OBJECT_NAME_COLOR: 'rgb(136, 19, 145)',\n OBJECT_VALUE_NULL_COLOR: 'rgb(128, 128, 128)',\n OBJECT_VALUE_UNDEFINED_COLOR: 'rgb(128, 128, 128)',\n OBJECT_VALUE_REGEXP_COLOR: 'rgb(196, 26, 22)',\n OBJECT_VALUE_STRING_COLOR: 'rgb(196, 26, 22)',\n OBJECT_VALUE_SYMBOL_COLOR: 'rgb(196, 26, 22)',\n OBJECT_VALUE_NUMBER_COLOR: 'rgb(28, 0, 207)',\n OBJECT_VALUE_BOOLEAN_COLOR: 'rgb(28, 0, 207)',\n OBJECT_VALUE_FUNCTION_PREFIX_COLOR: 'rgb(13, 34, 170)',\n ARROW_COLOR: '#859499',\n};\nconst Inspect = ({ name, value }) => {\n const [expanded, setExpanded] = (0, react_1.useState)(false);\n const canExpand = name &&\n ((Array.isArray(value) && value.length) ||\n (value && typeof value === 'object' && Object.keys(value).length));\n const toggleExpanded = react_1.default.useCallback(() => {\n if (canExpand) {\n setExpanded((currentValue) => !currentValue);\n }\n }, [canExpand]);\n const toggle = ((0, jsx_runtime_1.jsx)(react_native_1.Text, { style: { color: canExpand ? theme.ARROW_COLOR : 'transparent', paddingRight: 8 }, children: expanded ? '▼' : '▶' }));\n const nameComponent = name ? ((0, jsx_runtime_1.jsx)(react_native_1.Text, { style: { color: theme.OBJECT_NAME_COLOR }, children: name })) : null;\n if (Array.isArray(value)) {\n if (name) {\n return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_native_1.TouchableOpacity, { onPress: toggleExpanded, style: styles.row, children: [toggle, nameComponent, (0, jsx_runtime_1.jsx)(react_native_1.Text, { children: `: ${value.length === 0 ? '[]' : expanded ? '[' : '[...]'}` })] }), expanded ? ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles.expanded, children: [value.map((v, i) => ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.expanded, children: (0, jsx_runtime_1.jsx)(Inspect, { value: v }) }, i))), (0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.spacingLeft, children: (0, jsx_runtime_1.jsx)(react_native_1.Text, { children: \"]\" }) })] })) : null] }));\n }\n return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_native_1.Text, { children: \"[\" }), value.map((v, i) => ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.spacingLeft, children: (0, jsx_runtime_1.jsx)(Inspect, { value: v }) }, i))), (0, jsx_runtime_1.jsx)(react_native_1.Text, { children: \"]\" })] }));\n }\n if (value && typeof value === 'object' && !(value instanceof RegExp)) {\n if (name) {\n return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_native_1.TouchableOpacity, { style: styles.row, onPress: toggleExpanded, children: [toggle, nameComponent, (0, jsx_runtime_1.jsx)(react_native_1.Text, { children: `: ${Object.keys(value).length === 0 ? '{}' : expanded ? '{' : '{...}'}` })] }), expanded ? ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles.expanded, children: [Object.entries(value).map(([key, v]) => ((0, jsx_runtime_1.jsx)(react_native_1.View, { children: (0, jsx_runtime_1.jsx)(Inspect, { name: key, value: v }) }, key))), (0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.spacingLeft, children: (0, jsx_runtime_1.jsx)(react_native_1.Text, { children: '}' }) })] })) : null] }));\n }\n return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_native_1.Text, { children: '{' }), Object.entries(value).map(([key, v]) => ((0, jsx_runtime_1.jsx)(react_native_1.View, { children: (0, jsx_runtime_1.jsx)(Inspect, { name: key, value: v }) }, key))), (0, jsx_runtime_1.jsx)(react_native_1.Text, { children: '}' })] }));\n }\n if (name) {\n return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles.row, children: [toggle, nameComponent, (0, jsx_runtime_1.jsx)(react_native_1.Text, { children: \": \" }), (0, jsx_runtime_1.jsx)(Value, { value: value })] }));\n }\n return (0, jsx_runtime_1.jsx)(Value, { value: value });\n};\nfunction Value({ value }) {\n if (value === null) {\n return (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: { color: theme.OBJECT_VALUE_NULL_COLOR }, children: \"null\" });\n }\n if (value === undefined) {\n return (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: { color: theme.OBJECT_VALUE_UNDEFINED_COLOR }, children: \"undefined\" });\n }\n if (value instanceof RegExp) {\n return ((0, jsx_runtime_1.jsx)(react_native_1.Text, { style: { color: theme.OBJECT_VALUE_REGEXP_COLOR }, children: `/${value.source}/${value.flags}` }));\n }\n switch (typeof value) {\n case 'string':\n return ((0, jsx_runtime_1.jsx)(react_native_1.Text, { style: { color: theme.OBJECT_VALUE_STRING_COLOR }, children: JSON.stringify(value) }));\n case 'number':\n return ((0, jsx_runtime_1.jsx)(react_native_1.Text, { style: { color: theme.OBJECT_VALUE_NUMBER_COLOR }, children: JSON.stringify(value) }));\n case 'boolean':\n return ((0, jsx_runtime_1.jsx)(react_native_1.Text, { style: { color: theme.OBJECT_VALUE_BOOLEAN_COLOR }, children: JSON.stringify(value) }));\n case 'function':\n return (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: { color: theme.OBJECT_VALUE_FUNCTION_PREFIX_COLOR }, children: \"[Function]\" });\n default:\n return (0, jsx_runtime_1.jsx)(react_native_1.Text, { children: JSON.stringify(value) });\n }\n}\nexports.default = Inspect;\nconst styles = react_native_1.StyleSheet.create({\n spacingLeft: { marginLeft: 20 },\n expanded: { marginLeft: 20 },\n row: { paddingBottom: 8, flexDirection: 'row', alignItems: 'center' },\n});\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ActionLogger = void 0;\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst react_native_1 = require(\"react-native\");\nconst Inspect_1 = __importDefault(require(\"./Inspect\"));\nconst ActionLogger = ({ actions, onClear }) => ((0, jsx_runtime_1.jsxs)(react_native_1.ScrollView, { children: [(0, jsx_runtime_1.jsx)(react_native_1.ScrollView, { horizontal: true, children: (0, jsx_runtime_1.jsx)(react_native_1.View, { children: actions.map((action) => ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles.row, children: [(0, jsx_runtime_1.jsx)(react_native_1.View, { children: action.count > 1 ? (0, jsx_runtime_1.jsx)(react_native_1.Text, { children: action.count }) : null }), (0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.grow, children: (0, jsx_runtime_1.jsx)(Inspect_1.default, { name: action.data.name, value: action.data.args || action.data }) })] }, action.id))) }) }), (0, jsx_runtime_1.jsx)(react_native_1.View, { children: (0, jsx_runtime_1.jsx)(react_native_1.Button, { onPress: onClear, title: \"CLEAR\" }) })] }));\nexports.ActionLogger = ActionLogger;\nexports.default = exports.ActionLogger;\nconst styles = react_native_1.StyleSheet.create({\n grow: { flexGrow: 1 },\n row: { flexDirection: 'row' },\n});\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst react_1 = require(\"react\");\nconst fast_deep_equal_1 = __importDefault(require(\"fast-deep-equal\"));\nconst addons_1 = require(\"@storybook/addons\");\nconst core_events_1 = require(\"@storybook/core-events\");\nconst addon_actions_1 = require(\"@storybook/addon-actions\");\nconst ActionLogger_1 = require(\"../../components/ActionLogger\");\nconst safeDeepEqual = (a, b) => {\n try {\n return (0, fast_deep_equal_1.default)(a, b);\n }\n catch (e) {\n return false;\n }\n};\nconst ActionLogger = ({ active }) => {\n const [actions, setActions] = (0, react_1.useState)([]);\n const clearActions = () => setActions([]);\n const clearActionsOnStoryChange = actions.length > 0 && actions[0].options.clearOnStoryChange;\n (0, react_1.useEffect)(() => {\n const handleStoryChange = () => {\n if (clearActionsOnStoryChange) {\n clearActions();\n }\n };\n const channel = addons_1.addons.getChannel();\n channel.addListener(core_events_1.SELECT_STORY, handleStoryChange);\n return () => {\n channel.removeListener(core_events_1.SELECT_STORY, handleStoryChange);\n };\n }, [clearActionsOnStoryChange]);\n (0, react_1.useEffect)(() => {\n const addAction = (action) => {\n setActions((prevState) => {\n const newActions = [...prevState];\n const previous = newActions.length && newActions[0];\n if (previous && safeDeepEqual(previous.data, action.data)) {\n previous.count++;\n }\n else {\n action.count = 1;\n newActions.unshift(action);\n }\n return newActions.slice(0, action.options.limit);\n });\n };\n const channel = addons_1.addons.getChannel();\n channel.addListener(addon_actions_1.EVENT_ID, addAction);\n return () => {\n channel.removeListener(addon_actions_1.EVENT_ID, addAction);\n };\n }, []);\n return active ? (0, jsx_runtime_1.jsx)(ActionLogger_1.ActionLogger, { actions: actions, onClear: clearActions }) : null;\n};\nexports.default = ActionLogger;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.register = void 0;\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst addons_1 = __importDefault(require(\"@storybook/addons\"));\nconst addon_actions_1 = require(\"@storybook/addon-actions\");\nconst ActionLogger_1 = __importDefault(require(\"./containers/ActionLogger\"));\nfunction register() {\n addons_1.default.register(addon_actions_1.ADDON_ID, () => {\n addons_1.default.addPanel(addon_actions_1.PANEL_ID, {\n title: 'Actions',\n render: ({ active, key }) => (0, jsx_runtime_1.jsx)(ActionLogger_1.default, { active: active }, key),\n paramKey: addon_actions_1.PARAM_KEY,\n });\n });\n}\nexports.register = register;\n","'use strict';\n\nvar isArray = Array.isArray;\nvar keyList = Object.keys;\nvar hasProp = Object.prototype.hasOwnProperty;\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n var arrA = isArray(a)\n , arrB = isArray(b)\n , i\n , length\n , key;\n\n if (arrA && arrB) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n if (arrA != arrB) return false;\n\n var dateA = a instanceof Date\n , dateB = b instanceof Date;\n if (dateA != dateB) return false;\n if (dateA && dateB) return a.getTime() == b.getTime();\n\n var regexpA = a instanceof RegExp\n , regexpB = b instanceof RegExp;\n if (regexpA != regexpB) return false;\n if (regexpA && regexpB) return a.toString() == b.toString();\n\n var keys = keyList(a);\n length = keys.length;\n\n if (length !== keyList(b).length)\n return false;\n\n for (i = length; i-- !== 0;)\n if (!hasProp.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n key = keys[i];\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n return a!==a && b!==b;\n};\n","require('./dist').register();\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst prop_types_1 = __importDefault(require(\"prop-types\"));\nconst react_1 = __importStar(require(\"react\"));\nconst react_native_1 = require(\"react-native\");\nconst react_native_theming_1 = require(\"@storybook/react-native-theming\");\nconst TabButtonTouchable = react_native_theming_1.styled.TouchableOpacity(({ theme, active }) => ({\n borderWidth: theme.tabs.borderWidth,\n borderColor: active ? theme.tabs.activeBorderColor : theme.tabs.inactiveBorderColor,\n borderRadius: theme.tabs.borderRadius,\n backgroundColor: active ? theme.tabs.activeBackgroundColor : theme.tabs.inactiveBackgroundColor,\n}));\nconst TabButtonText = react_native_theming_1.styled.Text(({ theme, active }) => ({\n color: active ? theme.tabs.activeTextColor : theme.tabs.inactiveTextColor,\n paddingVertical: theme.tabs.paddingVertical * 0.5,\n paddingHorizontal: theme.tabs.paddingHorizontal,\n fontSize: theme.tabs.fontSize,\n fontWeight: theme.tabs.fontWeight,\n}));\nclass GroupTabs extends react_1.Component {\n renderTab(name, group) {\n let { title } = group;\n if (typeof title === 'function') {\n title = title();\n }\n const { onGroupSelect, selectedGroup } = this.props;\n const active = selectedGroup === name;\n return ((0, jsx_runtime_1.jsx)(TabButtonTouchable, { onPress: () => onGroupSelect(name), active: active, activeOpacity: 0.8, children: (0, jsx_runtime_1.jsx)(TabButtonText, { active: active, children: title }) }, name));\n }\n render() {\n const { groups } = this.props;\n const entries = groups ? Object.entries(groups) : null;\n return entries && entries.length ? ((0, jsx_runtime_1.jsx)(react_native_1.ScrollView, { horizontal: true, style: {\n marginBottom: 12,\n }, children: entries.map(([key, value]) => this.renderTab(key, value)) })) : ((0, jsx_runtime_1.jsx)(react_native_1.Text, { children: \"no groups available\" }));\n }\n}\nGroupTabs.defaultProps = {\n groups: {},\n onGroupSelect: () => { },\n selectedGroup: null,\n};\nGroupTabs.propTypes = {\n // eslint-disable-next-line react/forbid-prop-types\n groups: prop_types_1.default.object,\n onGroupSelect: prop_types_1.default.func,\n selectedGroup: prop_types_1.default.string,\n};\nexports.default = GroupTabs;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst prop_types_1 = __importDefault(require(\"prop-types\"));\nconst react_native_1 = require(\"react-native\");\nconst react_1 = __importDefault(require(\"react\"));\nconst react_native_theming_1 = require(\"@storybook/react-native-theming\");\nconst types_1 = __importDefault(require(\"./types\"));\nconst InvalidType = () => (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: { margin: 10 }, children: \"Invalid Type\" });\nconst Label = react_native_theming_1.styled.Text(({ theme }) => ({\n paddingBottom: theme.tokens.spacing1,\n fontSize: theme.inputs.labelFontSize,\n color: theme.inputs.labelTextColor,\n fontWeight: '500',\n}));\nconst Container = react_native_theming_1.styled.View(({ theme }) => ({\n paddingBottom: theme.tokens.spacing4,\n}));\nconst InputContainer = react_native_theming_1.styled.View();\nconst PropField = ({ onChange, onPress, knob }) => {\n const InputType = types_1.default[knob.type] || InvalidType;\n return ((0, jsx_runtime_1.jsxs)(Container, { children: [!knob.hideLabel ? (0, jsx_runtime_1.jsx)(Label, { children: `${knob.label || knob.name}` }) : null, (0, jsx_runtime_1.jsx)(InputContainer, { children: (0, jsx_runtime_1.jsx)(InputType, { knob: knob, onChange: onChange, onPress: onPress }) })] }));\n};\nPropField.propTypes = {\n knob: prop_types_1.default.shape({\n name: prop_types_1.default.string,\n label: prop_types_1.default.string,\n value: prop_types_1.default.any,\n hideLabel: prop_types_1.default.bool,\n type: prop_types_1.default.oneOf([\n 'text',\n 'number',\n 'color',\n 'boolean',\n 'object',\n 'select',\n 'array',\n 'date',\n 'button',\n 'radios',\n ]),\n }).isRequired,\n onChange: prop_types_1.default.func.isRequired,\n onPress: prop_types_1.default.func.isRequired,\n};\nexports.default = PropField;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\n/* eslint no-underscore-dangle: 0 */\nconst react_1 = __importDefault(require(\"react\"));\nconst prop_types_1 = __importDefault(require(\"prop-types\"));\nconst react_native_1 = require(\"react-native\");\nconst PropField_1 = __importDefault(require(\"./PropField\"));\nclass PropForm extends react_1.default.Component {\n makeChangeHandler(name, type) {\n return (value) => {\n const { onFieldChange } = this.props;\n const change = { name, type, value };\n onFieldChange(change);\n };\n }\n render() {\n const { knobs, onFieldClick } = this.props;\n return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: knobs.map((knob) => {\n const changeHandler = this.makeChangeHandler(knob.name, knob.type);\n return ((0, jsx_runtime_1.jsx)(PropField_1.default, { name: knob.name, type: knob.type, value: knob.value, knob: knob, onChange: changeHandler, onPress: onFieldClick }, knob.name));\n }) }));\n }\n}\nexports.default = PropForm;\nPropForm.displayName = 'PropForm';\nPropForm.defaultProps = {\n knobs: [],\n};\nPropForm.propTypes = {\n knobs: prop_types_1.default.arrayOf(prop_types_1.default.shape({\n name: prop_types_1.default.string,\n value: prop_types_1.default.any,\n })),\n onFieldChange: prop_types_1.default.func.isRequired,\n onFieldClick: prop_types_1.default.func.isRequired,\n};\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst react_native_theming_1 = require(\"@storybook/react-native-theming\");\nconst prop_types_1 = __importDefault(require(\"prop-types\"));\nconst react_1 = __importDefault(require(\"react\"));\nconst RadioContainer = react_native_theming_1.styled.View(({ theme, isInline }) => ({\n flexDirection: isInline ? 'row' : 'column',\n alignItems: isInline ? 'center' : 'flex-start',\n flexWrap: 'wrap',\n}));\nconst RadioTouchable = react_native_theming_1.styled.TouchableOpacity(({ theme }) => ({\n alignItems: 'center',\n flexDirection: 'row',\n paddingVertical: theme.inputs.radio.itemSpacing,\n}));\nconst RadioCircle = react_native_theming_1.styled.View(({ theme }) => ({\n width: theme.inputs.radio.height,\n height: theme.inputs.radio.height,\n borderWidth: theme.inputs.radio.borderWidth,\n borderColor: theme.inputs.radio.borderColor,\n borderRadius: theme.tokens.borderRadius.round,\n backgroundColor: theme.inputs.radio.backgroundColor,\n alignItems: 'center',\n justifyContent: 'center',\n paddingVertical: theme.inputs.radio.paddingVertical,\n paddingHorizontal: theme.inputs.radio.paddingHorizontal,\n}));\nconst RadioInnerCircle = react_native_theming_1.styled.View(({ theme, selected }) => ({\n height: '100%',\n width: '100%',\n borderRadius: theme.tokens.borderRadius.round,\n backgroundColor: selected ? theme.inputs.radio.activeBackgroundColor : 'transparent',\n}));\nconst RadioLabel = react_native_theming_1.styled.Text(({ theme }) => ({\n fontSize: theme.inputs.radio.fontSize,\n paddingStart: theme.inputs.radio.labelSpacing,\n color: theme.inputs.labelTextColor,\n}));\nclass RadioSelect extends react_1.default.Component {\n constructor(props) {\n super(props);\n const { initValue } = this.props;\n this.state = {\n value: initValue,\n };\n }\n render() {\n const { data, onChange } = this.props;\n const { value } = this.state;\n return ((0, jsx_runtime_1.jsx)(RadioContainer, { children: data.map((item) => ((0, jsx_runtime_1.jsxs)(RadioTouchable, { activeOpacity: 0.7, onPress: () => {\n onChange(item);\n this.setState({ value: item.key });\n }, children: [(0, jsx_runtime_1.jsx)(RadioCircle, { children: (0, jsx_runtime_1.jsx)(RadioInnerCircle, { selected: value === item.key }) }), (0, jsx_runtime_1.jsx)(RadioLabel, { children: item.label })] }, item.label))) }));\n }\n}\nexports.default = RadioSelect;\nRadioSelect.defaultProps = {\n data: [],\n onChange: (value) => value,\n initValue: '',\n};\nRadioSelect.propTypes = {\n data: prop_types_1.default.arrayOf(prop_types_1.default.object),\n initValue: prop_types_1.default.string,\n onChange: prop_types_1.default.func,\n};\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HoloColorPicker = void 0;\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\n/* eslint-disable react/require-default-props */\n/* eslint-disable global-require */\n/* eslint-disable react/destructuring-assignment */\n/* eslint-disable no-underscore-dangle */\nconst react_1 = __importDefault(require(\"react\"));\nconst prop_types_1 = __importDefault(require(\"prop-types\"));\nconst react_native_1 = require(\"react-native\");\nconst tinycolor2_1 = __importDefault(require(\"tinycolor2\"));\nconst utils_1 = require(\"./utils\");\n// TODO: Raise PR at react-native-color-picker with these fixes\nclass HoloColorPicker extends react_1.default.PureComponent {\n constructor(props, ctx) {\n super(props, ctx);\n const state = {\n color: { h: 0, s: 1, v: 1 },\n pickerSize: null,\n };\n if (props.oldColor) {\n state.color = (0, tinycolor2_1.default)(props.oldColor).toHsv();\n }\n if (props.defaultColor) {\n state.color = (0, tinycolor2_1.default)(props.defaultColor).toHsv();\n }\n this.state = state;\n this._layout = { width: 0, height: 0, x: 0, y: 0 };\n this._pageX = 0;\n this._pageY = 0;\n this._onLayout = this._onLayout.bind(this);\n this._onSValueChange = this._onSValueChange.bind(this);\n this._onVValueChange = this._onVValueChange.bind(this);\n this._onColorSelected = this._onColorSelected.bind(this);\n this._onOldColorSelected = this._onOldColorSelected.bind(this);\n this._isRTL = react_native_1.I18nManager.isRTL;\n this._pickerResponder = (0, utils_1.createPanResponder)({\n onStart: this._handleColorChange,\n onMove: this._handleColorChange,\n });\n this.pickerContainer = react_1.default.createRef();\n }\n getColor() {\n return (0, tinycolor2_1.default)(this._getColor()).toHexString();\n }\n _handleColorChange = ({ x, y }) => {\n const { s, v } = this._getColor();\n const marginLeft = (this._layout.width - this.state.pickerSize) / 2;\n const marginTop = (this._layout.height - this.state.pickerSize) / 2;\n const relativeX = x - this._pageX - marginLeft;\n const relativeY = y - this._pageY - marginTop;\n const h = this._computeHValue(relativeX, relativeY);\n this._onColorChange({ h, s, v });\n };\n _onSValueChange(s) {\n const { h, v } = this._getColor();\n this._onColorChange({ h, s, v });\n }\n _onVValueChange(v) {\n const { h, s } = this._getColor();\n this._onColorChange({ h, s, v });\n }\n _onColorChange(color) {\n this.setState({ color });\n if (this.props.onColorChange) {\n this.props.onColorChange(color);\n }\n }\n _onLayout(l) {\n this._layout = l.nativeEvent.layout;\n const { width, height } = this._layout;\n const pickerSize = Math.min(width, height);\n if (this.state.pickerSize !== pickerSize) {\n this.setState({ pickerSize });\n }\n // layout.x, layout.y is always 0\n // we always measure because layout is the same even though picker is moved on the page\n react_native_1.InteractionManager.runAfterInteractions(() => \n // measure only after (possible) animation ended\n this.pickerContainer.current &&\n this.pickerContainer.current.measure((_x, _y, _width, _height, pageX, pageY) => {\n // picker position in the screen\n this._pageX = pageX;\n this._pageY = pageY;\n }));\n }\n _getColor() {\n const passedColor = typeof this.props.color === 'string' ? (0, tinycolor2_1.default)(this.props.color).toHsv() : this.props.color;\n return passedColor || this.state.color;\n }\n _onColorSelected() {\n const { onColorSelected } = this.props;\n const color = (0, tinycolor2_1.default)(this._getColor()).toHexString();\n if (onColorSelected)\n onColorSelected(color);\n }\n _onOldColorSelected() {\n const { oldColor, onOldColorSelected } = this.props;\n const color = (0, tinycolor2_1.default)(oldColor);\n this.setState({ color: color.toHsv() });\n if (onOldColorSelected)\n onOldColorSelected(color.toHexString());\n }\n _computeHValue(x, y) {\n const mx = this.state.pickerSize / 2;\n const my = this.state.pickerSize / 2;\n const dx = x - mx;\n const dy = y - my;\n const rad = Math.atan2(dx, dy) + Math.PI + Math.PI / 2;\n return ((rad * 180) / Math.PI) % 360;\n }\n _hValueToRad(deg) {\n const rad = (deg * Math.PI) / 180;\n return rad - Math.PI - Math.PI / 2;\n }\n _getSlider() {\n if (this.props.hideSliders) {\n return undefined;\n }\n if (this.props.sliderComponent) {\n return this.props.sliderComponent;\n }\n if (!react_native_1.Slider) {\n throw new Error('You need to install `@react-native-community/slider` and pass it (or any other Slider compatible component) as `sliderComponent` prop');\n }\n return react_native_1.Slider;\n }\n render() {\n const { pickerSize } = this.state;\n const { oldColor, style } = this.props;\n const color = this._getColor();\n const { h, s, v } = color;\n const angle = this._hValueToRad(h);\n const selectedColor = (0, tinycolor2_1.default)(color).toHexString();\n const indicatorColor = (0, tinycolor2_1.default)({ h, s: 1, v: 1 }).toHexString();\n const computed = makeComputedStyles({\n pickerSize,\n selectedColor,\n indicatorColor,\n oldColor,\n angle,\n isRTL: this._isRTL,\n });\n const SliderComp = this._getSlider();\n return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: style, children: [(0, jsx_runtime_1.jsx)(react_native_1.View, { onLayout: this._onLayout, ref: this.pickerContainer, style: styles.pickerContainer, children: !pickerSize ? null : ((0, jsx_runtime_1.jsxs)(react_native_1.View, { children: [(0, jsx_runtime_1.jsxs)(react_native_1.View, { ...this._pickerResponder.panHandlers, style: [styles.picker, computed.picker], collapsable: false, children: [(0, jsx_runtime_1.jsx)(react_native_1.Image, { source: require('./resources/color-circle.png'), resizeMode: \"contain\", style: [styles.pickerImage] }), (0, jsx_runtime_1.jsx)(react_native_1.View, { style: [styles.pickerIndicator, computed.pickerIndicator] })] }), oldColor && ((0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { style: [styles.selectedPreview, computed.selectedPreview], onPress: this._onColorSelected, activeOpacity: 0.7 })), oldColor && ((0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { style: [styles.originalPreview, computed.originalPreview], onPress: this._onOldColorSelected, activeOpacity: 0.7 })), !oldColor && ((0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { style: [styles.selectedFullPreview, computed.selectedFullPreview], onPress: this._onColorSelected, activeOpacity: 0.7 }))] })) }), this.props.hideSliders ? null : ((0, jsx_runtime_1.jsxs)(react_native_1.View, { children: [(0, jsx_runtime_1.jsx)(SliderComp, { value: s, onValueChange: this._onSValueChange }), (0, jsx_runtime_1.jsx)(SliderComp, { value: v, onValueChange: this._onVValueChange })] }))] }));\n }\n}\nexports.HoloColorPicker = HoloColorPicker;\nHoloColorPicker.propTypes = {\n color: prop_types_1.default.oneOfType([\n prop_types_1.default.string,\n prop_types_1.default.shape({ h: prop_types_1.default.number, s: prop_types_1.default.number, v: prop_types_1.default.number }),\n ]),\n defaultColor: prop_types_1.default.string,\n oldColor: prop_types_1.default.string,\n onColorChange: prop_types_1.default.func,\n onColorSelected: prop_types_1.default.func,\n onOldColorSelected: prop_types_1.default.func,\n hideSliders: prop_types_1.default.bool,\n sliderComponent: prop_types_1.default.elementType,\n // eslint-disable-next-line react/forbid-prop-types\n style: prop_types_1.default.any,\n};\nconst makeComputedStyles = ({ indicatorColor, selectedColor, oldColor, angle, pickerSize, isRTL, }) => {\n const summarySize = 0.5 * pickerSize;\n const indicatorPickerRatio = 42 / 510; // computed from picker image\n const indicatorSize = indicatorPickerRatio * pickerSize;\n const pickerPadding = indicatorSize / 3;\n const indicatorRadius = pickerSize / 2 - indicatorSize / 2 - pickerPadding;\n const mx = pickerSize / 2;\n const my = pickerSize / 2;\n const dx = Math.cos(angle) * indicatorRadius;\n const dy = Math.sin(angle) * indicatorRadius;\n return {\n picker: {\n padding: pickerPadding,\n width: pickerSize,\n height: pickerSize,\n },\n pickerIndicator: {\n top: mx + dx - indicatorSize / 2,\n [isRTL ? 'right' : 'left']: my + dy - indicatorSize / 2,\n width: indicatorSize,\n height: indicatorSize,\n borderRadius: indicatorSize / 2,\n backgroundColor: indicatorColor,\n },\n selectedPreview: {\n width: summarySize / 2,\n height: summarySize,\n top: pickerSize / 2 - summarySize / 2,\n left: Math.floor(pickerSize / 2),\n borderTopRightRadius: summarySize / 2,\n borderBottomRightRadius: summarySize / 2,\n backgroundColor: selectedColor,\n },\n originalPreview: {\n width: Math.ceil(summarySize / 2),\n height: summarySize,\n top: pickerSize / 2 - summarySize / 2,\n left: pickerSize / 2 - summarySize / 2,\n borderTopLeftRadius: summarySize / 2,\n borderBottomLeftRadius: summarySize / 2,\n backgroundColor: oldColor,\n },\n selectedFullPreview: {\n width: summarySize,\n height: summarySize,\n top: pickerSize / 2 - summarySize / 2,\n left: pickerSize / 2 - summarySize / 2,\n borderRadius: summarySize / 2,\n backgroundColor: selectedColor,\n },\n };\n};\nconst styles = react_native_1.StyleSheet.create({\n pickerContainer: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n },\n pickerImage: {\n flex: 1,\n width: null,\n height: null,\n },\n pickerIndicator: {\n position: 'absolute',\n // Shadow only works on iOS.\n shadowColor: 'black',\n shadowOpacity: 0.3,\n shadowOffset: { width: 3, height: 3 },\n shadowRadius: 4,\n // This will elevate the view on Android, causing shadow to be drawn.\n elevation: 5,\n },\n selectedPreview: {\n position: 'absolute',\n borderLeftWidth: 0,\n },\n originalPreview: {\n position: 'absolute',\n borderRightWidth: 0,\n },\n selectedFullPreview: {\n position: 'absolute',\n },\n pickerAlignment: {\n alignItems: 'center',\n },\n});\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TriangleColorPicker = void 0;\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\n/* eslint-disable react/require-default-props */\n/* eslint-disable global-require */\n/* eslint-disable react/destructuring-assignment */\n/* eslint-disable no-underscore-dangle */\nconst react_1 = __importDefault(require(\"react\"));\nconst prop_types_1 = __importDefault(require(\"prop-types\"));\nconst react_native_1 = require(\"react-native\");\nconst tinycolor2_1 = __importDefault(require(\"tinycolor2\"));\nconst utils_1 = require(\"./utils\");\nfunction makeRotationKey(props, angle) {\n const { rotationHackFactor } = props;\n if (rotationHackFactor < 1) {\n return undefined;\n }\n const key = Math.floor(angle * rotationHackFactor);\n return `r${key}`;\n}\nclass TriangleColorPicker extends react_1.default.PureComponent {\n constructor(props, ctx) {\n super(props, ctx);\n const state = {\n color: { h: 0, s: 1, v: 1 },\n pickerSize: null,\n };\n if (props.oldColor) {\n state.color = (0, tinycolor2_1.default)(props.oldColor).toHsv();\n }\n if (props.defaultColor) {\n state.color = (0, tinycolor2_1.default)(props.defaultColor).toHsv();\n }\n this.state = state;\n this._layout = { width: 0, height: 0, x: 0, y: 0 };\n this._pageX = 0;\n this._pageY = 0;\n this._onLayout = this._onLayout.bind(this);\n this._onSValueChange = this._onSValueChange.bind(this);\n this._onVValueChange = this._onVValueChange.bind(this);\n this._onColorSelected = this._onColorSelected.bind(this);\n this._onOldColorSelected = this._onOldColorSelected.bind(this);\n this._isRTL = react_native_1.I18nManager.isRTL;\n this._pickerResponder = (0, utils_1.createPanResponder)({\n onStart: ({ x, y }) => {\n const { s, v } = this._computeColorFromTriangle({ x, y });\n this._changingHColor = s > 1 || s < 0 || v > 1 || v < 0;\n this._handleColorChange({ x, y });\n },\n onMove: this._handleColorChange,\n });\n this.pickerContainer = react_1.default.createRef();\n }\n getColor() {\n return (0, tinycolor2_1.default)(this._getColor()).toHexString();\n }\n _handleColorChange = ({ x, y }) => {\n if (this._changingHColor) {\n this._handleHColorChange({ x, y });\n }\n else {\n this._handleSVColorChange({ x, y });\n }\n };\n _getColor() {\n const passedColor = typeof this.props.color === 'string' ? (0, tinycolor2_1.default)(this.props.color).toHsv() : this.props.color;\n return passedColor || this.state.color;\n }\n _onColorSelected() {\n const { onColorSelected } = this.props;\n const color = (0, tinycolor2_1.default)(this._getColor()).toHexString();\n if (onColorSelected)\n onColorSelected(color);\n }\n _onOldColorSelected() {\n const { oldColor, onOldColorSelected } = this.props;\n const color = (0, tinycolor2_1.default)(oldColor);\n this.setState({ color: color.toHsv() });\n if (onOldColorSelected)\n onOldColorSelected(color.toHexString());\n }\n _onSValueChange(s) {\n const { h, v } = this._getColor();\n this._onColorChange({ h, s, v });\n }\n _onVValueChange(v) {\n const { h, s } = this._getColor();\n this._onColorChange({ h, s, v });\n }\n _onColorChange(color) {\n this.setState({ color });\n if (this.props.onColorChange) {\n this.props.onColorChange(color);\n }\n }\n _onLayout(l) {\n this._layout = l.nativeEvent.layout;\n const { width, height } = this._layout;\n const pickerSize = Math.min(width, height);\n if (this.state.pickerSize !== pickerSize) {\n this.setState({ pickerSize });\n }\n // layout.x, layout.y is always 0\n // we always measure because layout is the same even though picker is moved on the page\n react_native_1.InteractionManager.runAfterInteractions(() => {\n // measure only after (possible) animation ended\n if (this.pickerContainer.current) {\n this.pickerContainer.current.measure((_x, _y, _width, _height, pageX, pageY) => {\n // picker position in the screen\n this._pageX = pageX;\n this._pageY = pageY;\n });\n }\n });\n }\n _computeHValue(x, y) {\n const mx = this.state.pickerSize / 2;\n const my = this.state.pickerSize / 2;\n const dx = x - mx;\n const dy = y - my;\n const rad = Math.atan2(dx, dy) + Math.PI + Math.PI / 2;\n return ((rad * 180) / Math.PI) % 360;\n }\n _hValueToRad(deg) {\n const rad = (deg * Math.PI) / 180;\n return rad - Math.PI - Math.PI / 2;\n }\n _handleHColorChange({ x, y }) {\n const { s, v } = this._getColor();\n const marginLeft = (this._layout.width - this.state.pickerSize) / 2;\n const marginTop = (this._layout.height - this.state.pickerSize) / 2;\n const relativeX = x - this._pageX - marginLeft;\n const relativeY = y - this._pageY - marginTop;\n const h = this._computeHValue(relativeX, relativeY);\n this._onColorChange({ h, s, v });\n }\n _handleSVColorChange({ x, y }) {\n const { h, s: rawS, v: rawV } = this._computeColorFromTriangle({ x, y });\n const s = Math.min(Math.max(0, rawS), 1);\n const v = Math.min(Math.max(0, rawV), 1);\n this._onColorChange({ h, s, v });\n }\n _normalizeTriangleTouch(s, v, sRatio) {\n const CORNER_ZONE_SIZE = 0.12; // relative size to be considered as corner zone\n const NORMAL_MARGIN = 0.1; // relative triangle margin to be considered as touch in triangle\n const CORNER_MARGIN = 0.05; // relative triangle margin to be considered as touch in triangle in corner zone\n let margin = NORMAL_MARGIN;\n const posNS = v > 0 ? 1 - (1 - s) * sRatio : 1 - s * sRatio;\n const negNS = v > 0 ? s * sRatio : (1 - s) * sRatio;\n const ns = s > 1 ? posNS : negNS; // normalized s value according to ratio and s value\n const rightCorner = s > 1 - CORNER_ZONE_SIZE && v > 1 - CORNER_ZONE_SIZE;\n const leftCorner = ns < 0 + CORNER_ZONE_SIZE && v > 1 - CORNER_ZONE_SIZE;\n const topCorner = ns < 0 + CORNER_ZONE_SIZE && v < 0 + CORNER_ZONE_SIZE;\n if (rightCorner) {\n return { s, v };\n }\n if (leftCorner || topCorner) {\n margin = CORNER_MARGIN;\n }\n let s1 = s;\n let v1 = v;\n // color normalization according to margin\n s1 = s1 < 0 && ns > 0 - margin ? 0 : s1;\n s1 = s1 > 1 && ns < 1 + margin ? 1 : s1;\n v1 = v1 < 0 && v1 > 0 - margin ? 0 : v1;\n v1 = v1 > 1 && v1 < 1 + margin ? 1 : v1;\n return { s1, v1 };\n }\n /**\n * Computes s, v from position (x, y). If position is outside of triangle,\n * it will return invalid values (greater than 1 or lower than 0)\n */\n _computeColorFromTriangle({ x, y }) {\n const { pickerSize } = this.state;\n const { triangleHeight, triangleWidth } = getPickerProperties(pickerSize);\n const left = pickerSize / 2 - triangleWidth / 2;\n const top = pickerSize / 2 - (2 * triangleHeight) / 3;\n // triangle relative coordinates\n const marginLeft = (this._layout.width - this.state.pickerSize) / 2;\n const marginTop = (this._layout.height - this.state.pickerSize) / 2;\n const relativeX = x - this._pageX - marginLeft - left;\n const relativeY = y - this._pageY - marginTop - top;\n // rotation\n const { h } = this._getColor();\n const deg = (h - 330 + 360) % 360; // starting angle is 330 due to comfortable calculation\n const rad = (deg * Math.PI) / 180;\n const center = {\n x: triangleWidth / 2,\n y: (2 * triangleHeight) / 3,\n };\n const rotated = (0, utils_1.rotatePoint)({ x: relativeX, y: relativeY }, rad, center);\n const line = (triangleWidth * rotated.y) / triangleHeight;\n const margin = triangleWidth / 2 - ((triangleWidth / 2) * rotated.y) / triangleHeight;\n const s = (rotated.x - margin) / line;\n const v = rotated.y / triangleHeight;\n // normalize\n const normalized = this._normalizeTriangleTouch(s, v, line / triangleHeight);\n return { h, s: normalized.s, v: normalized.v };\n }\n render() {\n const { pickerSize } = this.state;\n const { oldColor, style } = this.props;\n const color = this._getColor();\n const { h } = color;\n const angle = this._hValueToRad(h);\n const selectedColor = (0, tinycolor2_1.default)(color).toHexString();\n const indicatorColor = (0, tinycolor2_1.default)({ h, s: 1, v: 1 }).toHexString();\n const computed = makeComputedStyles({\n pickerSize,\n selectedColor,\n selectedColorHsv: color,\n indicatorColor,\n oldColor,\n angle,\n isRTL: this._isRTL,\n });\n // Hack for https://github.com/instea/react-native-color-picker/issues/17\n const rotationHack = makeRotationKey(this.props, angle);\n return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: style, children: [(0, jsx_runtime_1.jsx)(react_native_1.View, { onLayout: this._onLayout, ref: this.pickerContainer, style: styles.pickerContainer, children: !pickerSize ? null : ((0, jsx_runtime_1.jsxs)(react_native_1.View, { children: [(0, jsx_runtime_1.jsxs)(react_native_1.View, { style: [styles.triangleContainer, computed.triangleContainer], children: [(0, jsx_runtime_1.jsx)(react_native_1.View, { style: [styles.triangleUnderlayingColor, computed.triangleUnderlayingColor] }), (0, jsx_runtime_1.jsx)(react_native_1.Image, { style: [styles.triangleImage, computed.triangleImage], source: require('./resources/hsv_triangle_mask.png') })] }, rotationHack), (0, jsx_runtime_1.jsxs)(react_native_1.View, { ...this._pickerResponder.panHandlers, style: [styles.picker, computed.picker], collapsable: false, children: [(0, jsx_runtime_1.jsx)(react_native_1.Image, { source: require('./resources/color-circle.png'), resizeMode: \"contain\", style: [styles.pickerImage] }), (0, jsx_runtime_1.jsx)(react_native_1.View, { style: [styles.pickerIndicator, computed.pickerIndicator], children: (0, jsx_runtime_1.jsx)(react_native_1.View, { style: [styles.pickerIndicatorTick, computed.pickerIndicatorTick] }) }, rotationHack), (0, jsx_runtime_1.jsx)(react_native_1.View, { style: [styles.svIndicator, computed.svIndicator] })] })] })) }), (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: [styles.colorPreviews, computed.colorPreviews], children: [oldColor && ((0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { style: [styles.colorPreview, { backgroundColor: oldColor }], onPress: this._onOldColorSelected, activeOpacity: 0.7 })), (0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { style: [styles.colorPreview, { backgroundColor: selectedColor }], onPress: this._onColorSelected, activeOpacity: 0.7 })] })] }));\n }\n}\nexports.TriangleColorPicker = TriangleColorPicker;\nTriangleColorPicker.propTypes = {\n color: prop_types_1.default.oneOfType([\n prop_types_1.default.string,\n prop_types_1.default.shape({ h: prop_types_1.default.number, s: prop_types_1.default.number, v: prop_types_1.default.number }),\n ]),\n defaultColor: prop_types_1.default.string,\n oldColor: prop_types_1.default.string,\n onColorChange: prop_types_1.default.func,\n onColorSelected: prop_types_1.default.func,\n onOldColorSelected: prop_types_1.default.func,\n rotationHackFactor: prop_types_1.default.number,\n style: {},\n};\nTriangleColorPicker.defaultProps = {\n rotationHackFactor: 100,\n};\nfunction getPickerProperties(pickerSize) {\n const indicatorPickerRatio = 42 / 510; // computed from picker image\n const originalIndicatorSize = indicatorPickerRatio * pickerSize;\n const indicatorSize = originalIndicatorSize;\n const pickerPadding = originalIndicatorSize / 3;\n const triangleSize = pickerSize - 6 * pickerPadding;\n const triangleRadius = triangleSize / 2;\n const triangleHeight = (triangleRadius * 3) / 2;\n const triangleWidth = 2 * triangleRadius * Math.sqrt(3 / 4); // pythagorean theorem\n return {\n triangleSize,\n triangleRadius,\n triangleHeight,\n triangleWidth,\n indicatorPickerRatio,\n indicatorSize,\n pickerPadding,\n };\n}\nconst makeComputedStyles = ({ indicatorColor, angle, pickerSize, selectedColorHsv, isRTL }) => {\n const { triangleSize, triangleHeight, triangleWidth, indicatorSize, pickerPadding, } = getPickerProperties(pickerSize);\n /* ===== INDICATOR ===== */\n const indicatorRadius = pickerSize / 2 - indicatorSize / 2 - pickerPadding;\n const mx = pickerSize / 2;\n const my = pickerSize / 2;\n const dx = Math.cos(angle) * indicatorRadius;\n const dy = Math.sin(angle) * indicatorRadius;\n /* ===== TRIANGLE ===== */\n const triangleTop = pickerPadding * 3;\n const triangleLeft = pickerPadding * 3;\n const triangleAngle = -angle + Math.PI / 3;\n /* ===== SV INDICATOR ===== */\n const markerColor = 'rgba(0,0,0,0.8)';\n const { s, v, h } = selectedColorHsv;\n const svIndicatorSize = 18;\n const svY = v * triangleHeight;\n const margin = triangleWidth / 2 - v * (triangleWidth / 2);\n const svX = s * (triangleWidth - 2 * margin) + margin;\n const svIndicatorMarginLeft = (pickerSize - triangleWidth) / 2;\n const svIndicatorMarginTop = (pickerSize - (4 * triangleHeight) / 3) / 2;\n const deg = (h - 330 + 360) % 360; // starting angle is 330 due to comfortable calculation\n const rad = (deg * Math.PI) / 180;\n const center = { x: pickerSize / 2, y: pickerSize / 2 };\n const notRotatedPoint = {\n x: svIndicatorMarginTop + svY,\n y: svIndicatorMarginLeft + svX,\n };\n const svIndicatorPoint = (0, utils_1.rotatePoint)(notRotatedPoint, rad, center);\n return {\n picker: {\n padding: pickerPadding,\n width: pickerSize,\n height: pickerSize,\n },\n pickerIndicator: {\n top: mx + dx - indicatorSize / 2,\n [isRTL ? 'right' : 'left']: my + dy - indicatorSize / 2,\n width: indicatorSize,\n height: indicatorSize,\n transform: [\n {\n rotate: `${-angle}rad`,\n },\n ],\n },\n pickerIndicatorTick: {\n height: indicatorSize / 2,\n backgroundColor: markerColor,\n },\n svIndicator: {\n top: svIndicatorPoint.x - svIndicatorSize / 2,\n [isRTL ? 'right' : 'left']: svIndicatorPoint.y - svIndicatorSize / 2,\n width: svIndicatorSize,\n height: svIndicatorSize,\n borderRadius: svIndicatorSize / 2,\n borderColor: markerColor,\n },\n triangleContainer: {\n width: triangleSize,\n height: triangleSize,\n transform: [\n {\n rotate: `${triangleAngle}rad`,\n },\n ],\n top: triangleTop,\n left: triangleLeft,\n },\n triangleImage: {\n width: triangleWidth,\n height: triangleHeight,\n },\n triangleUnderlayingColor: {\n left: (triangleSize - triangleWidth) / 2,\n borderLeftWidth: triangleWidth / 2,\n borderRightWidth: triangleWidth / 2,\n borderBottomWidth: triangleHeight,\n borderBottomColor: indicatorColor,\n },\n colorPreviews: {\n height: pickerSize * 0.1, // responsive height\n },\n };\n};\nconst styles = react_native_1.StyleSheet.create({\n pickerContainer: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n },\n pickerImage: {\n flex: 1,\n width: null,\n height: null,\n },\n pickerIndicator: {\n position: 'absolute',\n alignItems: 'center',\n justifyContent: 'center',\n },\n triangleContainer: {\n position: 'absolute',\n alignItems: 'center',\n },\n triangleUnderlayingColor: {\n position: 'absolute',\n top: 0,\n width: 0,\n height: 0,\n backgroundColor: 'transparent',\n borderStyle: 'solid',\n borderLeftColor: 'transparent',\n borderRightColor: 'transparent',\n },\n pickerAlignment: {\n alignItems: 'center',\n },\n svIndicator: {\n position: 'absolute',\n borderWidth: 4,\n },\n pickerIndicatorTick: {\n width: 5,\n },\n colorPreviews: {\n flexDirection: 'row',\n },\n colorPreview: {\n flex: 1,\n },\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TriangleColorPicker = exports.ColorPicker = exports.toHsv = exports.fromHsv = void 0;\nvar utils_1 = require(\"./utils\");\nObject.defineProperty(exports, \"fromHsv\", { enumerable: true, get: function () { return utils_1.fromHsv; } });\nObject.defineProperty(exports, \"toHsv\", { enumerable: true, get: function () { return utils_1.toHsv; } });\nvar HoloColorPicker_1 = require(\"./HoloColorPicker\");\nObject.defineProperty(exports, \"ColorPicker\", { enumerable: true, get: function () { return HoloColorPicker_1.HoloColorPicker; } });\nvar TriangleColorPicker_1 = require(\"./TriangleColorPicker\");\nObject.defineProperty(exports, \"TriangleColorPicker\", { enumerable: true, get: function () { return TriangleColorPicker_1.TriangleColorPicker; } });\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.rotatePoint = exports.createPanResponder = exports.fromHsv = exports.toHsv = void 0;\nconst tinycolor2_1 = __importDefault(require(\"tinycolor2\"));\nconst react_native_1 = require(\"react-native\");\n/**\n * Converts color to hsv representation.\n * @param {string} color any color represenation - name, hexa, rgb\n * @return {object} { h: number, s: number, v: number } object literal\n */\nfunction toHsv(color) {\n return (0, tinycolor2_1.default)(color).toHsv();\n}\nexports.toHsv = toHsv;\n/**\n * Converts hsv object to hexa color string.\n * @param {object} hsv { h: number, s: number, v: number } object literal\n * @return {string} color in hexa representation\n */\nfunction fromHsv(hsv) {\n return (0, tinycolor2_1.default)(hsv).toHexString();\n}\nexports.fromHsv = fromHsv;\nconst fn = () => true;\n/**\n * Simplified pan responder wrapper.\n */\nfunction createPanResponder({ onStart = fn, onMove = fn, onEnd = fn }) {\n return react_native_1.PanResponder.create({\n onStartShouldSetPanResponder: fn,\n onStartShouldSetPanResponderCapture: fn,\n onMoveShouldSetPanResponder: fn,\n onMoveShouldSetPanResponderCapture: fn,\n onPanResponderTerminationRequest: fn,\n onPanResponderGrant: (evt, state) => {\n return onStart({ x: evt.nativeEvent.pageX, y: evt.nativeEvent.pageY }, evt, state);\n },\n onPanResponderMove: (evt, state) => {\n return onMove({ x: evt.nativeEvent.pageX, y: evt.nativeEvent.pageY }, evt, state);\n },\n onPanResponderRelease: (evt, state) => {\n return onEnd({ x: evt.nativeEvent.pageX, y: evt.nativeEvent.pageY }, evt, state);\n },\n });\n}\nexports.createPanResponder = createPanResponder;\n/**\n * Rotates point around given center in 2d.\n * Point is object literal { x: number, y: number }\n * @param {point} point to be rotated\n * @param {number} angle in radians\n * @param {point} center to be rotated around\n * @return {point} rotated point\n */\nfunction rotatePoint(point, angle, center = { x: 0, y: 0 }) {\n // translation to origin\n const transOriginX = point.x - center.x;\n const transOriginY = point.y - center.y;\n // rotation around origin\n const rotatedX = transOriginX * Math.cos(angle) - transOriginY * Math.sin(angle);\n const rotatedY = transOriginY * Math.cos(angle) + transOriginX * Math.sin(angle);\n // translate back from origin\n const normalizedX = rotatedX + center.x;\n const normalizedY = rotatedY + center.y;\n return {\n x: normalizedX,\n y: normalizedY,\n };\n}\nexports.rotatePoint = rotatePoint;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.register = exports.withKnobs = void 0;\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst react_1 = __importDefault(require(\"react\"));\nconst addons_1 = __importDefault(require(\"@storybook/addons\"));\nconst panel_1 = __importDefault(require(\"./panel\"));\nvar addon_knobs_1 = require(\"@storybook/addon-knobs\");\nObject.defineProperty(exports, \"withKnobs\", { enumerable: true, get: function () { return addon_knobs_1.withKnobs; } });\nfunction register() {\n addons_1.default.register('RNKNOBS', () => {\n const channel = addons_1.default.getChannel();\n addons_1.default.addPanel('RNKNOBS', {\n title: 'Knobs',\n // eslint-disable-next-line react/prop-types\n render: ({ active, key }) => (0, jsx_runtime_1.jsx)(panel_1.default, { channel: channel, active: active }, key),\n paramKey: 'knobs',\n });\n });\n}\nexports.register = register;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst react_1 = __importDefault(require(\"react\"));\nconst react_native_1 = require(\"react-native\");\nconst prop_types_1 = __importDefault(require(\"prop-types\"));\nconst core_events_1 = require(\"@storybook/core-events\");\nconst addon_knobs_1 = require(\"@storybook/addon-knobs\");\nconst react_native_theming_1 = require(\"@storybook/react-native-theming\");\nconst GroupTabs_1 = __importDefault(require(\"./GroupTabs\"));\nconst PropForm_1 = __importDefault(require(\"./PropForm\"));\nconst getTimestamp = () => +new Date();\nconst DEFAULT_GROUP_ID = 'Other';\nconst Touchable = react_native_theming_1.styled.TouchableOpacity(({ theme }) => ({\n backgroundColor: theme.button.secondary.backgroundColor,\n borderRadius: theme.button.secondary.borderRadius,\n borderWidth: theme.button.secondary.borderWidth,\n borderColor: theme.button.secondary.borderColor,\n paddingVertical: theme.button.paddingVertical,\n paddingHorizontal: theme.button.paddingHorizontal,\n justifyContent: 'center',\n alignItems: 'center',\n}));\nconst ResetButton = react_native_theming_1.styled.Text(({ theme }) => ({\n color: theme.button.secondary.textColor,\n fontSize: theme.button.fontSize,\n fontWeight: theme.button.fontWeight,\n}));\nconst Paragraph = react_native_theming_1.styled.Text(({ theme }) => ({\n marginBottom: theme.tokens.spacing3,\n color: theme.text.primaryColor,\n}));\nconst LinkText = react_native_theming_1.styled.Text(({ theme }) => ({\n color: theme.text.linkColor,\n}));\nclass Panel extends react_1.default.Component {\n constructor(props) {\n super(props);\n this.handleChange = this.handleChange.bind(this);\n this.handleClick = this.handleClick.bind(this);\n this.setKnobs = this.setKnobs.bind(this);\n this.reset = this.reset.bind(this);\n this.setOptions = this.setOptions.bind(this);\n this.onGroupSelect = this.onGroupSelect.bind(this);\n this.state = { knobs: {}, groupId: DEFAULT_GROUP_ID };\n this.options = {};\n this.lastEdit = getTimestamp();\n this.loadedFromUrl = false;\n }\n componentDidMount() {\n const { channel } = this.props;\n channel.on(addon_knobs_1.SET, this.setKnobs);\n channel.on(addon_knobs_1.SET_OPTIONS, this.setOptions);\n channel.on(core_events_1.SET_CURRENT_STORY, this.selectStory);\n channel.emit(core_events_1.FORCE_RE_RENDER);\n }\n componentWillUnmount() {\n const { channel } = this.props;\n channel.removeListener(addon_knobs_1.SET, this.setKnobs);\n channel.removeListener(core_events_1.SET_CURRENT_STORY, this.selectStory);\n }\n onGroupSelect(name) {\n this.setState({ groupId: name });\n }\n setOptions(options = { timestamps: false }) {\n this.options = options;\n }\n setKnobs({ knobs, timestamp }) {\n if (!this.options.timestamps || !timestamp || this.lastEdit <= timestamp) {\n this.setState({ knobs });\n }\n }\n reset = () => {\n const { channel } = this.props;\n this.setState({ knobs: {} });\n channel.emit(addon_knobs_1.RESET);\n };\n selectStory = () => {\n const { channel } = this.props;\n this.setState({ knobs: {}, groupId: DEFAULT_GROUP_ID });\n channel.emit(addon_knobs_1.RESET);\n };\n emitChange(changedKnob) {\n const { channel } = this.props;\n channel.emit(addon_knobs_1.CHANGE, changedKnob);\n }\n handleChange(changedKnob) {\n this.lastEdit = getTimestamp();\n const { knobs } = this.state;\n const { name } = changedKnob;\n const newKnobs = { ...knobs };\n newKnobs[name] = {\n ...newKnobs[name],\n ...changedKnob,\n };\n this.setState({ knobs: newKnobs });\n this.setState({ knobs: newKnobs }, this.emitChange(changedKnob.type === 'number'\n ? { ...changedKnob, value: parseFloat(changedKnob.value) }\n : changedKnob));\n }\n handleClick(knob) {\n const { channel } = this.props;\n channel.emit(addon_knobs_1.CLICK, knob);\n }\n render() {\n const { active } = this.props;\n if (!active) {\n return null;\n }\n const { knobs, groupId: stateGroupId } = this.state;\n const groups = {};\n const groupIds = [];\n let knobsArray = Object.keys(knobs);\n const knobsWithGroups = knobsArray.filter((key) => knobs[key].groupId);\n knobsWithGroups.forEach((key) => {\n const knobKeyGroupId = knobs[key].groupId;\n groupIds.push(knobKeyGroupId);\n groups[knobKeyGroupId] = {\n render: () => (0, jsx_runtime_1.jsx)(react_native_1.Text, { id: knobKeyGroupId, children: knobKeyGroupId }),\n title: knobKeyGroupId,\n };\n });\n const allHaveGroups = groupIds.length > 0 && knobsArray.length === knobsWithGroups.length;\n // If all of the knobs are assigned to a group, we don't need the default group.\n const groupId = stateGroupId === DEFAULT_GROUP_ID && allHaveGroups\n ? knobs[knobsWithGroups[0]].groupId\n : stateGroupId;\n if (groupIds.length > 0) {\n if (!allHaveGroups) {\n groups[DEFAULT_GROUP_ID] = {\n render: () => (0, jsx_runtime_1.jsx)(react_native_1.Text, { id: DEFAULT_GROUP_ID, children: DEFAULT_GROUP_ID }),\n title: DEFAULT_GROUP_ID,\n };\n }\n if (groupId === DEFAULT_GROUP_ID) {\n knobsArray = knobsArray.filter((key) => !knobs[key].groupId);\n }\n if (groupId !== DEFAULT_GROUP_ID) {\n knobsArray = knobsArray.filter((key) => knobs[key].groupId === groupId);\n }\n }\n knobsArray = knobsArray.map((key) => knobs[key]);\n if (knobsArray.length === 0) {\n return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Paragraph, { children: \"This story is not configured to handle knobs.\" }), (0, jsx_runtime_1.jsxs)(Paragraph, { children: [\"Knobs are deprecated, consider migrating\", ' ', (0, jsx_runtime_1.jsx)(LinkText, { onPress: () => react_native_1.Linking.openURL('https://storybook.js.org/docs/react/essentials/controls'), children: \"to Storybook controls\" }), ' ', \"and see\", ' ', (0, jsx_runtime_1.jsx)(LinkText, { onPress: () => react_native_1.Linking.openURL('https://github.com/storybookjs/react-native/tree/next-6.0/examples/expo-example/components/ControlExamples'), children: \"examples in the Storybook React Native repository.\" })] })] }));\n }\n return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: { flex: 1 }, children: [groupIds.length > 0 && ((0, jsx_runtime_1.jsx)(GroupTabs_1.default, { groups: groups, onGroupSelect: this.onGroupSelect, selectedGroup: groupId })), (0, jsx_runtime_1.jsx)(PropForm_1.default, { knobs: knobsArray, onFieldChange: this.handleChange, onFieldClick: this.handleClick }), (0, jsx_runtime_1.jsx)(Touchable, { onPress: this.reset, children: (0, jsx_runtime_1.jsx)(ResetButton, { children: \"RESET\" }) })] }));\n }\n}\nexports.default = Panel;\nPanel.propTypes = {\n active: prop_types_1.default.bool.isRequired,\n channel: prop_types_1.default.shape({\n emit: prop_types_1.default.func,\n on: prop_types_1.default.func,\n removeListener: prop_types_1.default.func,\n }).isRequired,\n onReset: prop_types_1.default.object, // eslint-disable-line\n};\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst prop_types_1 = __importDefault(require(\"prop-types\"));\nconst react_1 = __importDefault(require(\"react\"));\nconst react_native_theming_1 = require(\"@storybook/react-native-theming\");\nconst common_1 = require(\"./common\");\nconst Input = react_native_theming_1.styled.TextInput(({ theme }) => ({\n ...(0, common_1.inputStyle)(theme),\n}));\nfunction formatArray(value, separator) {\n if (value === '') {\n return [];\n }\n return value.split(separator);\n}\nconst ArrayType = ({ knob, onChange }) => ((0, jsx_runtime_1.jsx)(Input, { id: knob.name, underlineColorAndroid: \"transparent\", autoCapitalize: \"none\", value: knob.value.join(knob.separator), onChangeText: (e) => onChange(formatArray(e, knob.separator)) }));\nArrayType.defaultProps = {\n knob: {},\n onChange: (value) => value,\n};\nArrayType.propTypes = {\n knob: prop_types_1.default.shape({\n name: prop_types_1.default.string,\n value: prop_types_1.default.array,\n separator: prop_types_1.default.string,\n }),\n onChange: prop_types_1.default.func,\n};\nArrayType.serialize = (value) => value;\nArrayType.deserialize = (value) => {\n if (Array.isArray(value)) {\n return value;\n }\n return Object.keys(value)\n .sort()\n .reduce((array, key) => [...array, value[key]], []);\n};\nexports.default = ArrayType;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst prop_types_1 = __importDefault(require(\"prop-types\"));\nconst react_native_1 = require(\"react-native\");\nconst react_1 = __importDefault(require(\"react\"));\nclass BooleanType extends react_1.default.Component {\n onValueChange = () => {\n const { onChange, knob } = this.props;\n onChange(!knob.value);\n };\n render() {\n const { knob } = this.props;\n return (0, jsx_runtime_1.jsx)(react_native_1.Switch, { id: knob.name, onValueChange: this.onValueChange, value: knob.value });\n }\n}\nBooleanType.defaultProps = {\n knob: {},\n onChange: (value) => value,\n};\nBooleanType.propTypes = {\n knob: prop_types_1.default.shape({\n name: prop_types_1.default.string,\n value: prop_types_1.default.bool,\n }),\n onChange: prop_types_1.default.func,\n};\nBooleanType.serialize = (value) => (value ? String(value) : null);\nBooleanType.deserialize = (value) => value === 'true';\nexports.default = BooleanType;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst prop_types_1 = __importDefault(require(\"prop-types\"));\nconst react_1 = __importDefault(require(\"react\"));\nconst react_native_1 = require(\"react-native\");\nconst react_native_theming_1 = require(\"@storybook/react-native-theming\");\nconst Label = react_native_theming_1.styled.Text(({ theme }) => ({\n fontSize: 17,\n color: theme.inputs.labelTextColor,\n}));\nconst ButtonType = ({ knob, onPress }) => ((0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { style: { margin: 10 }, onPress: () => onPress(knob), children: (0, jsx_runtime_1.jsx)(Label, { children: knob.name }) }));\nButtonType.defaultProps = {\n knob: {},\n};\nButtonType.propTypes = {\n knob: prop_types_1.default.shape({\n name: prop_types_1.default.string,\n }),\n onPress: prop_types_1.default.func.isRequired,\n};\nButtonType.serialize = (value) => value;\nButtonType.deserialize = (value) => value;\nexports.default = ButtonType;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst prop_types_1 = __importDefault(require(\"prop-types\"));\nconst react_1 = __importDefault(require(\"react\"));\nconst react_native_1 = require(\"react-native\");\nconst react_native_theming_1 = require(\"@storybook/react-native-theming\");\nconst color_picker_1 = require(\"../components/color-picker\");\nconst TouchableContainer = react_native_theming_1.styled.View(({ theme }) => ({\n width: theme.inputs.swatch.height,\n height: theme.inputs.swatch.height,\n borderWidth: theme.inputs.swatch.borderWidth,\n borderColor: theme.inputs.swatch.borderColor,\n borderRadius: theme.inputs.swatch.outerBorderRadius,\n paddingVertical: theme.inputs.swatch.paddingVertical,\n paddingHorizontal: theme.inputs.swatch.paddingHorizontal,\n backgroundColor: theme.inputs.swatch.backgroundColor,\n}));\nconst Touchable = react_native_theming_1.styled.TouchableOpacity(({ theme, color }) => ({\n width: '100%',\n height: '100%',\n borderRadius: theme.inputs.swatch.innerBorderRadius,\n backgroundColor: color,\n}));\nclass ColorType extends react_1.default.Component {\n constructor(props) {\n super(props);\n this.state = {\n displayColorPicker: false,\n };\n }\n openColorPicker = () => {\n this.setState({\n displayColorPicker: true,\n });\n };\n closeColorPicker = () => {\n this.setState({\n displayColorPicker: false,\n });\n };\n onChangeColor = (color) => {\n const { onChange } = this.props;\n onChange((0, color_picker_1.fromHsv)(color));\n };\n render() {\n const { knob } = this.props;\n const { displayColorPicker } = this.state;\n return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { children: [(0, jsx_runtime_1.jsx)(TouchableContainer, { children: (0, jsx_runtime_1.jsx)(Touchable, { color: knob.value, onPress: this.openColorPicker }) }), (0, jsx_runtime_1.jsx)(react_native_1.Modal, { supportedOrientations: ['portrait', 'landscape'], transparent: true, visible: displayColorPicker, onRequestClose: this.closeColorPicker, children: (0, jsx_runtime_1.jsx)(react_native_1.TouchableWithoutFeedback, { onPress: this.closeColorPicker, children: (0, jsx_runtime_1.jsx)(react_native_1.View, { style: { flex: 1, justifyContent: 'center', alignItems: 'center' }, children: (0, jsx_runtime_1.jsx)(react_native_1.TouchableWithoutFeedback, { children: (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: {\n backgroundColor: 'white',\n borderWidth: 1,\n borderColor: 'rgb(247, 244, 244)',\n width: 250,\n height: 250,\n padding: 10,\n }, children: [(0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { onPress: this.closeColorPicker, style: { alignSelf: 'flex-end', padding: 5 }, children: (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: { fontSize: 18, fontWeight: 'bold' }, children: \"X\" }) }), (0, jsx_runtime_1.jsx)(color_picker_1.ColorPicker, { onColorSelected: this.onChangeColor, defaultColor: knob.value, style: { flex: 1 } })] }) }) }) }) })] }));\n }\n}\nColorType.propTypes = {\n knob: prop_types_1.default.shape({\n name: prop_types_1.default.string,\n value: prop_types_1.default.string,\n }),\n onChange: prop_types_1.default.func,\n};\nColorType.defaultProps = {\n knob: {},\n onChange: (value) => value,\n};\nColorType.serialize = (value) => value;\nColorType.deserialize = (value) => value;\nexports.default = ColorType;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst prop_types_1 = __importDefault(require(\"prop-types\"));\nconst react_1 = __importStar(require(\"react\"));\nconst react_native_1 = require(\"react-native\");\nconst react_native_modal_datetime_picker_1 = __importDefault(require(\"react-native-modal-datetime-picker\"));\nconst react_native_theming_1 = require(\"@storybook/react-native-theming\");\nconst common_1 = require(\"./common\");\nconst Touchable = react_native_theming_1.styled.TouchableOpacity(({ theme }) => ({\n ...(0, common_1.inputStyle)(theme),\n}));\nconst Label = react_native_theming_1.styled.Text(({ theme }) => ({\n fontSize: theme.inputs.text.fontSize,\n color: theme.inputs.text.textColor,\n}));\n// TODO seconds support\nclass DateType extends react_1.PureComponent {\n constructor() {\n super();\n this.state = {\n isDateVisible: false,\n isTimeVisible: false,\n };\n }\n showDatePicker = () => {\n this.setState({ isDateVisible: true });\n };\n showTimePicker = () => {\n this.setState({ isTimeVisible: true });\n };\n hidePicker = () => {\n this.setState({ isDateVisible: false, isTimeVisible: false });\n };\n onDatePicked = (date) => {\n const value = date.valueOf();\n const { onChange } = this.props;\n onChange(value);\n this.hidePicker();\n };\n render() {\n const { knob } = this.props;\n const { isTimeVisible, isDateVisible } = this.state;\n let d = new Date(knob.value);\n if (isNaN(d.valueOf())) {\n d = new Date();\n }\n // https://stackoverflow.com/a/30272803\n const dateString = [\n `0${d.getDate()}`.slice(-2),\n `0${d.getMonth() + 1}`.slice(-2),\n d.getFullYear(),\n ].join('-');\n const timeString = `${`0${d.getHours()}`.slice(-2)}:${`0${d.getMinutes()}`.slice(-2)}`;\n return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { children: [(0, jsx_runtime_1.jsxs)(react_native_1.View, { style: { flexDirection: 'row' }, children: [(0, jsx_runtime_1.jsx)(Touchable, { onPress: this.showDatePicker, children: (0, jsx_runtime_1.jsx)(Label, { children: dateString }) }), (0, jsx_runtime_1.jsx)(Touchable, { style: { marginLeft: 4 }, onPress: this.showTimePicker, children: (0, jsx_runtime_1.jsx)(Label, { children: timeString }) })] }), (0, jsx_runtime_1.jsx)(react_native_modal_datetime_picker_1.default, { date: d, isVisible: isTimeVisible || isDateVisible, mode: isTimeVisible ? 'time' : 'date', onConfirm: this.onDatePicked, onCancel: this.hidePicker })] }));\n }\n}\nDateType.defaultProps = {\n knob: {},\n onChange: (value) => value,\n};\nDateType.propTypes = {\n knob: prop_types_1.default.shape({\n name: prop_types_1.default.string,\n value: prop_types_1.default.number,\n }),\n onChange: prop_types_1.default.func,\n};\nDateType.serialize = (value) => String(value);\nDateType.deserialize = (value) => parseFloat(value);\nexports.default = DateType;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst prop_types_1 = __importDefault(require(\"prop-types\"));\nconst react_1 = __importDefault(require(\"react\"));\nconst slider_1 = __importDefault(require(\"@react-native-community/slider\"));\nconst react_native_1 = require(\"react-native\");\nconst react_native_theming_1 = require(\"@storybook/react-native-theming\");\nconst common_1 = require(\"./common\");\nconst Input = react_native_theming_1.styled.TextInput(({ theme, showError }) => {\n const style = (0, common_1.inputStyle)(theme);\n return {\n ...style,\n borderColor: showError ? theme.inputs.errorTextColor : style.borderColor,\n };\n});\nclass NumberType extends react_1.default.Component {\n constructor(props) {\n super(props);\n const { knob } = this.props;\n const initialInputValue = Number.isNaN(knob.value) ? '' : knob.value.toString();\n this.state = {\n inputValue: initialInputValue,\n showError: false,\n };\n }\n shouldComponentUpdate(nextProps, nextState) {\n const { knob } = this.props;\n const { inputValue } = this.state;\n return nextProps.knob.value !== knob.value || nextState.inputValue !== inputValue;\n }\n onChangeNormal = (text) => {\n const { onChange } = this.props;\n const inputValue = text.trim().replace(/,/, '.');\n if (inputValue === '') {\n this.setState({ showError: false, inputValue });\n return;\n }\n const parsedValue = Number(inputValue);\n this.setState({ inputValue });\n if (!Number.isNaN(parsedValue)) {\n onChange(parsedValue);\n this.setState({ showError: false });\n }\n else {\n this.setState({ showError: true });\n }\n };\n renderNormal = () => {\n const { inputValue, showError } = this.state;\n return ((0, jsx_runtime_1.jsx)(Input, { autoCapitalize: \"none\", underlineColorAndroid: \"transparent\", value: inputValue, keyboardType: \"numeric\", onChangeText: this.onChangeNormal, showError: showError }));\n };\n renderRange = () => {\n const { knob, onChange } = this.props;\n return ((0, jsx_runtime_1.jsx)(slider_1.default, { value: knob.value, minimumValue: knob.min, maximumValue: knob.max, step: knob.step, onSlidingComplete: (val) => onChange(parseFloat(val)) }));\n };\n render() {\n const { knob } = this.props;\n return (0, jsx_runtime_1.jsx)(react_native_1.View, { children: knob.range ? this.renderRange() : this.renderNormal() });\n }\n}\nNumberType.defaultProps = {\n knob: {},\n onChange: (value) => value,\n};\nNumberType.propTypes = {\n knob: prop_types_1.default.shape({\n name: prop_types_1.default.string,\n value: prop_types_1.default.oneOfType([prop_types_1.default.number, prop_types_1.default.string]),\n step: prop_types_1.default.number,\n min: prop_types_1.default.number,\n max: prop_types_1.default.number,\n range: prop_types_1.default.bool,\n defaultValue: prop_types_1.default.number,\n }),\n onChange: prop_types_1.default.func,\n};\nNumberType.serialize = (value) => String(value);\nNumberType.deserialize = (value) => parseFloat(value);\nexports.default = NumberType;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst prop_types_1 = __importDefault(require(\"prop-types\"));\nconst react_1 = __importDefault(require(\"react\"));\nconst deep_equal_1 = __importDefault(require(\"deep-equal\"));\nconst react_native_theming_1 = require(\"@storybook/react-native-theming\");\nconst common_1 = require(\"./common\");\nconst Input = react_native_theming_1.styled.TextInput(({ theme }) => ({\n ...(0, common_1.inputStyle)(theme),\n}));\nclass ObjectType extends react_1.default.Component {\n constructor(...args) {\n super(...args);\n this.state = {};\n }\n getJSONString() {\n const { json, jsonString } = this.state;\n const { knob } = this.props;\n // If there is an error in the JSON, we need to give that errored JSON.\n if (this.failed)\n return jsonString;\n // If the editor value and the knob value is the same, we need to return the\n // editor value as it allow user to add new fields to the JSON.\n if ((0, deep_equal_1.default)(json, knob.value))\n return jsonString;\n // If the knob's value is different from the editor, it seems like\n // there's a outside change and we need to get that.\n return JSON.stringify(knob.value, null, 2);\n }\n handleChange = (value) => {\n const { onChange } = this.props;\n const withReplacedQuotes = value\n .replace(/[\\u2018\\u2019]/g, \"'\")\n .replace(/[\\u201C\\u201D]/g, '\"');\n const newState = {\n jsonString: withReplacedQuotes,\n };\n try {\n newState.json = JSON.parse(withReplacedQuotes.trim());\n onChange(newState.json);\n this.failed = false;\n }\n catch (err) {\n this.failed = true;\n }\n this.setState(newState);\n };\n render() {\n const { knob } = this.props;\n const jsonString = this.getJSONString();\n const extraStyle = {};\n if (this.failed) {\n extraStyle.borderWidth = 1;\n extraStyle.borderColor = '#fadddd';\n extraStyle.backgroundColor = '#fff5f5';\n }\n return ((0, jsx_runtime_1.jsx)(Input, { id: knob.name, style: extraStyle, value: jsonString, onChangeText: this.handleChange, multiline: true, autoCapitalize: \"none\", underlineColorAndroid: \"transparent\" }));\n }\n}\nObjectType.defaultProps = {\n knob: {},\n onChange: (value) => value,\n};\nObjectType.propTypes = {\n knob: prop_types_1.default.shape({\n name: prop_types_1.default.string,\n value: prop_types_1.default.oneOfType([prop_types_1.default.object, prop_types_1.default.array]),\n }),\n onChange: prop_types_1.default.func,\n};\nObjectType.serialize = (object) => JSON.stringify(object);\nObjectType.deserialize = (value) => (value ? JSON.parse(value) : {});\nexports.default = ObjectType;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst prop_types_1 = __importDefault(require(\"prop-types\"));\nconst react_native_1 = require(\"react-native\");\nconst react_1 = __importDefault(require(\"react\"));\nconst RadioSelect_1 = __importDefault(require(\"../components/RadioSelect\"));\nclass SelectType extends react_1.default.Component {\n getOptions = ({ options }) => {\n if (Array.isArray(options)) {\n return options.map((val) => ({ key: val, label: val }));\n }\n return Object.keys(options).map((key) => ({ label: key, key: options[key] }));\n };\n render() {\n const { knob, onChange, isInline } = this.props;\n const options = this.getOptions(knob);\n return ((0, jsx_runtime_1.jsx)(react_native_1.View, { children: (0, jsx_runtime_1.jsx)(RadioSelect_1.default, { data: options, initValue: knob.value, onChange: (option) => onChange(option.key), inline: isInline }) }));\n }\n}\nSelectType.defaultProps = {\n knob: {},\n onChange: (value) => value,\n isInline: false,\n};\nSelectType.propTypes = {\n knob: prop_types_1.default.shape({\n name: prop_types_1.default.string,\n value: prop_types_1.default.string,\n options: prop_types_1.default.oneOfType([prop_types_1.default.array, prop_types_1.default.object]),\n }),\n onChange: prop_types_1.default.func,\n isInline: prop_types_1.default.bool,\n};\nSelectType.serialize = (value) => value;\nSelectType.deserialize = (value) => value;\nexports.default = SelectType;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\n/* eslint no-underscore-dangle: 0 */\nconst prop_types_1 = __importDefault(require(\"prop-types\"));\nconst react_native_1 = require(\"react-native\");\nconst react_1 = __importDefault(require(\"react\"));\nconst react_native_modal_selector_1 = __importDefault(require(\"react-native-modal-selector\"));\nconst react_native_theming_1 = require(\"@storybook/react-native-theming\");\nconst common_1 = require(\"./common\");\nconst Input = react_native_theming_1.styled.TextInput(({ theme }) => ({\n ...(0, common_1.inputStyle)(theme),\n}));\nclass SelectType extends react_1.default.Component {\n getOptions = ({ options }) => {\n if (Array.isArray(options)) {\n return options.map((val) => ({ key: val, label: val }));\n }\n return Object.keys(options).map((key) => ({ label: key, key: options[key] }));\n };\n render() {\n const { knob, onChange } = this.props;\n const options = this.getOptions(knob);\n const active = options.filter(({ key }) => knob.value === key)[0];\n const selected = active && active.label;\n return ((0, jsx_runtime_1.jsx)(react_native_1.View, { children: (0, jsx_runtime_1.jsx)(react_native_modal_selector_1.default, { data: options, initValue: knob.value, onChange: (option) => onChange(option.key), animationType: \"none\", keyExtractor: ({ key, label }) => `${label}-${key}`, children: (0, jsx_runtime_1.jsx)(Input, { editable: false, value: selected, autoCapitalize: \"none\", underlineColorAndroid: \"transparent\" }) }) }));\n }\n}\nSelectType.defaultProps = {\n knob: {},\n onChange: (value) => value,\n};\nSelectType.propTypes = {\n knob: prop_types_1.default.shape({\n name: prop_types_1.default.string,\n value: prop_types_1.default.string,\n options: prop_types_1.default.oneOfType([prop_types_1.default.array, prop_types_1.default.object]),\n selectV2: prop_types_1.default.bool,\n }),\n onChange: prop_types_1.default.func,\n};\nSelectType.serialize = (value) => value;\nSelectType.deserialize = (value) => value;\nexports.default = SelectType;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst prop_types_1 = __importDefault(require(\"prop-types\"));\nconst react_1 = __importDefault(require(\"react\"));\nconst react_native_theming_1 = require(\"@storybook/react-native-theming\");\nconst common_1 = require(\"./common\");\nconst Input = react_native_theming_1.styled.TextInput(({ theme }) => ({\n ...(0, common_1.inputStyle)(theme),\n}));\nconst TextType = ({ knob, onChange }) => ((0, jsx_runtime_1.jsx)(Input, { id: knob.name, value: knob.value, onChangeText: onChange, autoCapitalize: \"none\", underlineColorAndroid: \"transparent\" }));\nTextType.defaultProps = {\n knob: {},\n onChange: (value) => value,\n};\nTextType.propTypes = {\n knob: prop_types_1.default.shape({\n name: prop_types_1.default.string,\n value: prop_types_1.default.string,\n }),\n onChange: prop_types_1.default.func,\n};\nTextType.serialize = (value) => value;\nTextType.deserialize = (value) => value;\nexports.default = TextType;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.inputStyle = void 0;\nconst react_native_1 = require(\"react-native\");\nfunction inputStyle(theme, isTextInput = true) {\n return {\n backgroundColor: theme.inputs.text.backgroundColor,\n borderWidth: theme.inputs.text.borderWidth,\n borderColor: theme.inputs.text.borderColor,\n borderRadius: theme.inputs.text.borderRadius,\n fontSize: theme.inputs.text.fontSize,\n color: theme.inputs.text.textColor,\n paddingHorizontal: theme.inputs.text.paddingHorizontal,\n ...react_native_1.Platform.select({\n android: {\n // Android seems to have builtin vertical padding to `TextInput`,\n // but not for multiline inputs.\n paddingVertical: isTextInput ? 0 : undefined,\n },\n default: {\n paddingVertical: theme.inputs.text.paddingVertical,\n },\n }),\n margin: 0,\n };\n}\nexports.inputStyle = inputStyle;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Text_1 = __importDefault(require(\"./Text\"));\nconst Number_1 = __importDefault(require(\"./Number\"));\nconst Color_1 = __importDefault(require(\"./Color\"));\nconst Boolean_1 = __importDefault(require(\"./Boolean\"));\nconst Object_1 = __importDefault(require(\"./Object\"));\nconst Select_1 = __importDefault(require(\"./Select\"));\nconst Array_1 = __importDefault(require(\"./Array\"));\nconst Date_1 = __importDefault(require(\"./Date\"));\nconst Button_1 = __importDefault(require(\"./Button\"));\nconst Radio_1 = __importDefault(require(\"./Radio\"));\nexports.default = {\n text: Text_1.default,\n number: Number_1.default,\n color: Color_1.default,\n boolean: Boolean_1.default,\n object: Object_1.default,\n select: Select_1.default,\n array: Array_1.default,\n date: Date_1.default,\n button: Button_1.default,\n radios: Radio_1.default,\n};\n","require('./dist/index').register();\n","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.object.entries.js\";\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport global from 'global';\nimport { logger } from '@storybook/client-logger';\nimport { FORCE_RE_RENDER, STORY_RENDERED, UPDATE_STORY_ARGS, RESET_STORY_ARGS, UPDATE_GLOBALS } from '@storybook/core-events';\nimport { addons } from './index';\nvar globalWindow = global.window;\nexport var HooksContext = /*#__PURE__*/function () {\n function HooksContext() {\n var _this = this;\n\n _classCallCheck(this, HooksContext);\n\n this.hookListsMap = void 0;\n this.mountedDecorators = void 0;\n this.prevMountedDecorators = void 0;\n this.currentHooks = void 0;\n this.nextHookIndex = void 0;\n this.currentPhase = void 0;\n this.currentEffects = void 0;\n this.prevEffects = void 0;\n this.currentDecoratorName = void 0;\n this.hasUpdates = void 0;\n this.currentContext = void 0;\n\n this.renderListener = function (storyId) {\n if (storyId !== _this.currentContext.id) return;\n\n _this.triggerEffects();\n\n _this.currentContext = null;\n\n _this.removeRenderListeners();\n };\n\n this.init();\n }\n\n _createClass(HooksContext, [{\n key: \"init\",\n value: function init() {\n this.hookListsMap = new WeakMap();\n this.mountedDecorators = new Set();\n this.prevMountedDecorators = this.mountedDecorators;\n this.currentHooks = [];\n this.nextHookIndex = 0;\n this.currentPhase = 'NONE';\n this.currentEffects = [];\n this.prevEffects = [];\n this.currentDecoratorName = null;\n this.hasUpdates = false;\n this.currentContext = null;\n }\n }, {\n key: \"clean\",\n value: function clean() {\n this.prevEffects.forEach(function (effect) {\n if (effect.destroy) {\n effect.destroy();\n }\n });\n this.init();\n this.removeRenderListeners();\n }\n }, {\n key: \"getNextHook\",\n value: function getNextHook() {\n var hook = this.currentHooks[this.nextHookIndex];\n this.nextHookIndex += 1;\n return hook;\n }\n }, {\n key: \"triggerEffects\",\n value: function triggerEffects() {\n var _this2 = this;\n\n // destroy removed effects\n this.prevEffects.forEach(function (effect) {\n if (!_this2.currentEffects.includes(effect) && effect.destroy) {\n effect.destroy();\n }\n }); // trigger added effects\n\n this.currentEffects.forEach(function (effect) {\n if (!_this2.prevEffects.includes(effect)) {\n // eslint-disable-next-line no-param-reassign\n effect.destroy = effect.create();\n }\n });\n this.prevEffects = this.currentEffects;\n this.currentEffects = [];\n }\n }, {\n key: \"addRenderListeners\",\n value: function addRenderListeners() {\n this.removeRenderListeners();\n var channel = addons.getChannel();\n channel.on(STORY_RENDERED, this.renderListener);\n }\n }, {\n key: \"removeRenderListeners\",\n value: function removeRenderListeners() {\n var channel = addons.getChannel();\n channel.removeListener(STORY_RENDERED, this.renderListener);\n }\n }]);\n\n return HooksContext;\n}();\n\nfunction hookify(fn) {\n return function () {\n var _ref = typeof (arguments.length <= 0 ? undefined : arguments[0]) === 'function' ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 0 ? undefined : arguments[0],\n hooks = _ref.hooks;\n\n var prevPhase = hooks.currentPhase;\n var prevHooks = hooks.currentHooks;\n var prevNextHookIndex = hooks.nextHookIndex;\n var prevDecoratorName = hooks.currentDecoratorName;\n hooks.currentDecoratorName = fn.name;\n\n if (hooks.prevMountedDecorators.has(fn)) {\n hooks.currentPhase = 'UPDATE';\n hooks.currentHooks = hooks.hookListsMap.get(fn) || [];\n } else {\n hooks.currentPhase = 'MOUNT';\n hooks.currentHooks = [];\n hooks.hookListsMap.set(fn, hooks.currentHooks);\n hooks.prevMountedDecorators.add(fn);\n }\n\n hooks.nextHookIndex = 0;\n var prevContext = globalWindow.STORYBOOK_HOOKS_CONTEXT;\n globalWindow.STORYBOOK_HOOKS_CONTEXT = hooks;\n var result = fn.apply(void 0, arguments);\n globalWindow.STORYBOOK_HOOKS_CONTEXT = prevContext;\n\n if (hooks.currentPhase === 'UPDATE' && hooks.getNextHook() != null) {\n throw new Error('Rendered fewer hooks than expected. This may be caused by an accidental early return statement.');\n }\n\n hooks.currentPhase = prevPhase;\n hooks.currentHooks = prevHooks;\n hooks.nextHookIndex = prevNextHookIndex;\n hooks.currentDecoratorName = prevDecoratorName;\n return result;\n };\n} // Counter to prevent infinite loops.\n\n\nvar numberOfRenders = 0;\nvar RENDER_LIMIT = 25;\nexport var applyHooks = function applyHooks(applyDecorators) {\n return function (storyFn, decorators) {\n var decorated = applyDecorators(hookify(storyFn), decorators.map(function (decorator) {\n return hookify(decorator);\n }));\n return function (context) {\n var _ref2 = context,\n hooks = _ref2.hooks;\n hooks.prevMountedDecorators = hooks.mountedDecorators;\n hooks.mountedDecorators = new Set([storyFn].concat(_toConsumableArray(decorators)));\n hooks.currentContext = context;\n hooks.hasUpdates = false;\n var result = decorated(context);\n numberOfRenders = 1;\n\n while (hooks.hasUpdates) {\n hooks.hasUpdates = false;\n hooks.currentEffects = [];\n result = decorated(context);\n numberOfRenders += 1;\n\n if (numberOfRenders > RENDER_LIMIT) {\n throw new Error('Too many re-renders. Storybook limits the number of renders to prevent an infinite loop.');\n }\n }\n\n hooks.addRenderListeners();\n return result;\n };\n };\n};\n\nvar areDepsEqual = function areDepsEqual(deps, nextDeps) {\n return deps.length === nextDeps.length && deps.every(function (dep, i) {\n return dep === nextDeps[i];\n });\n};\n\nvar invalidHooksError = function invalidHooksError() {\n return new Error('Storybook preview hooks can only be called inside decorators and story functions.');\n};\n\nfunction getHooksContextOrNull() {\n return globalWindow.STORYBOOK_HOOKS_CONTEXT || null;\n}\n\nfunction getHooksContextOrThrow() {\n var hooks = getHooksContextOrNull();\n\n if (hooks == null) {\n throw invalidHooksError();\n }\n\n return hooks;\n}\n\nfunction useHook(name, callback, deps) {\n var hooks = getHooksContextOrThrow();\n\n if (hooks.currentPhase === 'MOUNT') {\n if (deps != null && !Array.isArray(deps)) {\n logger.warn(\"\".concat(name, \" received a final argument that is not an array (instead, received \").concat(deps, \"). When specified, the final argument must be an array.\"));\n }\n\n var _hook = {\n name: name,\n deps: deps\n };\n hooks.currentHooks.push(_hook);\n callback(_hook);\n return _hook;\n }\n\n if (hooks.currentPhase === 'UPDATE') {\n var _hook2 = hooks.getNextHook();\n\n if (_hook2 == null) {\n throw new Error('Rendered more hooks than during the previous render.');\n }\n\n if (_hook2.name !== name) {\n logger.warn(\"Storybook has detected a change in the order of Hooks\".concat(hooks.currentDecoratorName ? \" called by \".concat(hooks.currentDecoratorName) : '', \". This will lead to bugs and errors if not fixed.\"));\n }\n\n if (deps != null && _hook2.deps == null) {\n logger.warn(\"\".concat(name, \" received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.\"));\n }\n\n if (deps != null && _hook2.deps != null && deps.length !== _hook2.deps.length) {\n logger.warn(\"The final argument passed to \".concat(name, \" changed size between renders. The order and size of this array must remain constant.\\nPrevious: \").concat(_hook2.deps, \"\\nIncoming: \").concat(deps));\n }\n\n if (deps == null || _hook2.deps == null || !areDepsEqual(deps, _hook2.deps)) {\n callback(_hook2);\n _hook2.deps = deps;\n }\n\n return _hook2;\n }\n\n throw invalidHooksError();\n}\n\nfunction useMemoLike(name, nextCreate, deps) {\n var _useHook = useHook(name, function (hook) {\n // eslint-disable-next-line no-param-reassign\n hook.memoizedState = nextCreate();\n }, deps),\n memoizedState = _useHook.memoizedState;\n\n return memoizedState;\n}\n/* Returns a memoized value, see https://reactjs.org/docs/hooks-reference.html#usememo */\n\n\nexport function useMemo(nextCreate, deps) {\n return useMemoLike('useMemo', nextCreate, deps);\n}\n/* Returns a memoized callback, see https://reactjs.org/docs/hooks-reference.html#usecallback */\n\nexport function useCallback(callback, deps) {\n return useMemoLike('useCallback', function () {\n return callback;\n }, deps);\n}\n\nfunction useRefLike(name, initialValue) {\n return useMemoLike(name, function () {\n return {\n current: initialValue\n };\n }, []);\n}\n/* Returns a mutable ref object, see https://reactjs.org/docs/hooks-reference.html#useref */\n\n\nexport function useRef(initialValue) {\n return useRefLike('useRef', initialValue);\n}\n\nfunction triggerUpdate() {\n var hooks = getHooksContextOrNull(); // Rerun storyFn if updates were triggered synchronously, force rerender otherwise\n\n if (hooks != null && hooks.currentPhase !== 'NONE') {\n hooks.hasUpdates = true;\n } else {\n try {\n addons.getChannel().emit(FORCE_RE_RENDER);\n } catch (e) {\n logger.warn('State updates of Storybook preview hooks work only in browser');\n }\n }\n}\n\nfunction useStateLike(name, initialState) {\n var stateRef = useRefLike(name, // @ts-ignore S type should never be function, but there's no way to tell that to TypeScript\n typeof initialState === 'function' ? initialState() : initialState);\n\n var setState = function setState(update) {\n // @ts-ignore S type should never be function, but there's no way to tell that to TypeScript\n stateRef.current = typeof update === 'function' ? update(stateRef.current) : update;\n triggerUpdate();\n };\n\n return [stateRef.current, setState];\n}\n/* Returns a stateful value, and a function to update it, see https://reactjs.org/docs/hooks-reference.html#usestate */\n\n\nexport function useState(initialState) {\n return useStateLike('useState', initialState);\n}\n/* A redux-like alternative to useState, see https://reactjs.org/docs/hooks-reference.html#usereducer */\n\nexport function useReducer(reducer, initialArg, init) {\n var initialState = init != null ? function () {\n return init(initialArg);\n } : initialArg;\n\n var _useStateLike = useStateLike('useReducer', initialState),\n _useStateLike2 = _slicedToArray(_useStateLike, 2),\n state = _useStateLike2[0],\n setState = _useStateLike2[1];\n\n var dispatch = function dispatch(action) {\n return setState(function (prevState) {\n return reducer(prevState, action);\n });\n };\n\n return [state, dispatch];\n}\n/*\n Triggers a side effect, see https://reactjs.org/docs/hooks-reference.html#usestate\n Effects are triggered synchronously after rendering the story\n*/\n\nexport function useEffect(create, deps) {\n var hooks = getHooksContextOrThrow();\n var effect = useMemoLike('useEffect', function () {\n return {\n create: create\n };\n }, deps);\n\n if (!hooks.currentEffects.includes(effect)) {\n hooks.currentEffects.push(effect);\n }\n}\n\n/* Accepts a map of Storybook channel event listeners, returns an emit function */\nexport function useChannel(eventMap) {\n var deps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var channel = addons.getChannel();\n useEffect(function () {\n Object.entries(eventMap).forEach(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n type = _ref4[0],\n listener = _ref4[1];\n\n return channel.on(type, listener);\n });\n return function () {\n Object.entries(eventMap).forEach(function (_ref5) {\n var _ref6 = _slicedToArray(_ref5, 2),\n type = _ref6[0],\n listener = _ref6[1];\n\n return channel.removeListener(type, listener);\n });\n };\n }, [].concat(_toConsumableArray(Object.keys(eventMap)), _toConsumableArray(deps)));\n return useCallback(channel.emit.bind(channel), [channel]);\n}\n/* Returns current story context */\n\nexport function useStoryContext() {\n var _getHooksContextOrThr = getHooksContextOrThrow(),\n currentContext = _getHooksContextOrThr.currentContext;\n\n if (currentContext == null) {\n throw invalidHooksError();\n }\n\n return currentContext;\n}\n/* Returns current value of a story parameter */\n\nexport function useParameter(parameterKey, defaultValue) {\n var _useStoryContext = useStoryContext(),\n parameters = _useStoryContext.parameters;\n\n if (parameterKey) {\n var _parameters$parameter;\n\n return (_parameters$parameter = parameters[parameterKey]) !== null && _parameters$parameter !== void 0 ? _parameters$parameter : defaultValue;\n }\n\n return undefined;\n}\n/* Returns current value of story args */\n\nexport function useArgs() {\n var channel = addons.getChannel();\n\n var _useStoryContext2 = useStoryContext(),\n storyId = _useStoryContext2.id,\n args = _useStoryContext2.args;\n\n var updateArgs = useCallback(function (updatedArgs) {\n return channel.emit(UPDATE_STORY_ARGS, {\n storyId: storyId,\n updatedArgs: updatedArgs\n });\n }, [channel, storyId]);\n var resetArgs = useCallback(function (argNames) {\n return channel.emit(RESET_STORY_ARGS, {\n storyId: storyId,\n argNames: argNames\n });\n }, [channel, storyId]);\n return [args, updateArgs, resetArgs];\n}\n/* Returns current value of global args */\n\nexport function useGlobals() {\n var channel = addons.getChannel();\n\n var _useStoryContext3 = useStoryContext(),\n globals = _useStoryContext3.globals;\n\n var updateGlobals = useCallback(function (newGlobals) {\n return channel.emit(UPDATE_GLOBALS, {\n globals: newGlobals\n });\n }, [channel]);\n return [globals, updateGlobals];\n}","import \"core-js/modules/es.object.assign.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.object.values.js\";\nimport \"core-js/modules/es.promise.js\";\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport global from 'global';\nimport { Channel } from '@storybook/channels';\nimport { logger } from '@storybook/client-logger';\nimport { mockChannel } from './storybook-channel-mock';\nimport { types } from './types';\nexport { Channel };\nexport var AddonStore = /*#__PURE__*/_createClass(function AddonStore() {\n var _this = this;\n\n _classCallCheck(this, AddonStore);\n\n this.loaders = {};\n this.elements = {};\n this.config = {};\n this.channel = void 0;\n this.serverChannel = void 0;\n this.promise = void 0;\n this.resolve = void 0;\n\n this.getChannel = function () {\n // this.channel should get overwritten by setChannel. If it wasn't called (e.g. in non-browser environment), set a mock instead.\n if (!_this.channel) {\n _this.setChannel(mockChannel());\n }\n\n return _this.channel;\n };\n\n this.getServerChannel = function () {\n if (!_this.serverChannel) {\n throw new Error('Accessing non-existent serverChannel');\n }\n\n return _this.serverChannel;\n };\n\n this.ready = function () {\n return _this.promise;\n };\n\n this.hasChannel = function () {\n return !!_this.channel;\n };\n\n this.hasServerChannel = function () {\n return !!_this.serverChannel;\n };\n\n this.setChannel = function (channel) {\n _this.channel = channel;\n\n _this.resolve();\n };\n\n this.setServerChannel = function (channel) {\n _this.serverChannel = channel;\n };\n\n this.getElements = function (type) {\n if (!_this.elements[type]) {\n _this.elements[type] = {};\n }\n\n return _this.elements[type];\n };\n\n this.addPanel = function (name, options) {\n _this.add(name, Object.assign({\n type: types.PANEL\n }, options));\n };\n\n this.add = function (name, addon) {\n var type = addon.type;\n\n var collection = _this.getElements(type);\n\n collection[name] = Object.assign({\n id: name\n }, addon);\n };\n\n this.setConfig = function (value) {\n Object.assign(_this.config, value);\n };\n\n this.getConfig = function () {\n return _this.config;\n };\n\n this.register = function (name, registerCallback) {\n if (_this.loaders[name]) {\n logger.warn(\"\".concat(name, \" was loaded twice, this could have bad side-effects\"));\n }\n\n _this.loaders[name] = registerCallback;\n };\n\n this.loadAddons = function (api) {\n Object.values(_this.loaders).forEach(function (value) {\n return value(api);\n });\n };\n\n this.promise = new Promise(function (res) {\n _this.resolve = function () {\n return res(_this.getChannel());\n };\n });\n}); // Enforce addons store to be a singleton\n\nvar KEY = '__STORYBOOK_ADDONS';\n\nfunction getAddonsStore() {\n if (!global[KEY]) {\n global[KEY] = new AddonStore();\n }\n\n return global[KEY];\n} // Exporting this twice in order to to be able to import it like { addons } instead of 'addons'\n// prefer import { addons } from '@storybook/addons' over import addons from '@storybook/addons'\n//\n// See public_api.ts\n\n\nexport var addons = getAddonsStore();","import \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.array.concat.js\";\nexport var makeDecorator = function makeDecorator(_ref) {\n var name = _ref.name,\n parameterName = _ref.parameterName,\n wrapper = _ref.wrapper,\n _ref$skipIfNoParamete = _ref.skipIfNoParametersOrOptions,\n skipIfNoParametersOrOptions = _ref$skipIfNoParamete === void 0 ? false : _ref$skipIfNoParamete;\n\n var decorator = function decorator(options) {\n return function (storyFn, context) {\n var parameters = context.parameters && context.parameters[parameterName];\n\n if (parameters && parameters.disable) {\n return storyFn(context);\n }\n\n if (skipIfNoParametersOrOptions && !options && !parameters) {\n return storyFn(context);\n }\n\n return wrapper(storyFn, context, {\n options: options,\n parameters: parameters\n });\n };\n };\n\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n // Used without options as .addDecorator(decorator)\n if (typeof args[0] === 'function') {\n return decorator().apply(void 0, args);\n }\n\n return function () {\n // Used as [.]addDecorator(decorator(options))\n if (arguments.length > 1) {\n // Used as [.]addDecorator(decorator(option1, option2))\n if (args.length > 1) {\n return decorator(args).apply(void 0, arguments);\n }\n\n return decorator.apply(void 0, args).apply(void 0, arguments);\n }\n\n throw new Error(\"Passing stories directly into \".concat(name, \"() is not allowed,\\n instead use addDecorator(\").concat(name, \") and pass options with the '\").concat(parameterName, \"' parameter\"));\n };\n };\n};","// There can only be 1 default export per entry point and it has to be directly from public_api\n// Exporting this twice in order to to be able to import it like { addons } instead of 'addons'\n// prefer import { addons } from '@storybook/addons' over import addons from '@storybook/addons'\n//\n// See index.ts\nimport { addons } from './index';\nexport * from './make-decorator';\nexport * from './index';\nexport * from './types';\nexport * from './storybook-channel-mock';\nexport * from './hooks';\nexport default addons;","import Channel from '@storybook/channels';\nexport function mockChannel() {\n var transport = {\n setHandler: function setHandler() {},\n send: function send() {}\n };\n return new Channel({\n transport: transport\n });\n}","import \"core-js/modules/es.array.find.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.object.values.js\";\n// NOTE: The types exported from this file are simplified versions of the types exported\n// by @storybook/csf, with the simpler form retained for backwards compatibility.\n// We will likely start exporting the more complex based types in 7.0\n// The `any` here is the story store's `StoreItem` record. Ideally we should probably only\n// pass a defined subset of that full data, but we pass it all so far :shrug:\nexport var types;\n\n(function (types) {\n types[\"TAB\"] = \"tab\";\n types[\"PANEL\"] = \"panel\";\n types[\"TOOL\"] = \"tool\";\n types[\"TOOLEXTRA\"] = \"toolextra\";\n types[\"PREVIEW\"] = \"preview\";\n types[\"NOTES_ELEMENT\"] = \"notes-element\";\n})(types || (types = {}));\n\nexport function isSupportedType(type) {\n return !!Object.values(types).find(function (typeVal) {\n return typeVal === type;\n });\n}","import \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport global from 'global';\nimport { Channel } from '@storybook/channels';\nimport { logger } from '@storybook/client-logger';\nimport { isJSON, parse, stringify } from 'telejson';\nvar WebSocket = global.WebSocket;\nexport var WebsocketTransport = /*#__PURE__*/function () {\n function WebsocketTransport(_ref) {\n var url = _ref.url,\n onError = _ref.onError;\n\n _classCallCheck(this, WebsocketTransport);\n\n this.socket = void 0;\n this.handler = void 0;\n this.buffer = [];\n this.isReady = false;\n this.connect(url, onError);\n }\n\n _createClass(WebsocketTransport, [{\n key: \"setHandler\",\n value: function setHandler(handler) {\n this.handler = handler;\n }\n }, {\n key: \"send\",\n value: function send(event) {\n if (!this.isReady) {\n this.sendLater(event);\n } else {\n this.sendNow(event);\n }\n }\n }, {\n key: \"sendLater\",\n value: function sendLater(event) {\n this.buffer.push(event);\n }\n }, {\n key: \"sendNow\",\n value: function sendNow(event) {\n var data = stringify(event, {\n maxDepth: 15,\n allowFunction: true\n });\n this.socket.send(data);\n }\n }, {\n key: \"flush\",\n value: function flush() {\n var _this = this;\n\n var buffer = this.buffer;\n this.buffer = [];\n buffer.forEach(function (event) {\n return _this.send(event);\n });\n }\n }, {\n key: \"connect\",\n value: function connect(url, onError) {\n var _this2 = this;\n\n this.socket = new WebSocket(url);\n\n this.socket.onopen = function () {\n _this2.isReady = true;\n\n _this2.flush();\n };\n\n this.socket.onmessage = function (_ref2) {\n var data = _ref2.data;\n var event = typeof data === 'string' && isJSON(data) ? parse(data) : data;\n\n _this2.handler(event);\n };\n\n this.socket.onerror = function (e) {\n if (onError) {\n onError(e);\n }\n };\n }\n }]);\n\n return WebsocketTransport;\n}();\nexport default function createChannel(_ref3) {\n var url = _ref3.url,\n _ref3$async = _ref3.async,\n async = _ref3$async === void 0 ? false : _ref3$async,\n _ref3$onError = _ref3.onError,\n onError = _ref3$onError === void 0 ? function (err) {\n return logger.warn(err);\n } : _ref3$onError;\n var transport = new WebsocketTransport({\n url: url,\n onError: onError\n });\n return new Channel({\n transport: transport,\n async: async\n });\n}","import \"core-js/modules/es.object.freeze.js\";\n\nvar _templateObject;\n\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.regexp.to-string.js\";\nimport \"core-js/modules/web.immediate.js\";\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport deprecate from 'util-deprecate';\nimport dedent from 'ts-dedent';\n\nvar generateRandomId = function generateRandomId() {\n // generates a random 13 character string\n return Math.random().toString(16).slice(2);\n};\n\nexport var Channel = /*#__PURE__*/function () {\n function Channel() {\n var _this = this;\n\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n transport = _ref.transport,\n _ref$async = _ref.async,\n async = _ref$async === void 0 ? false : _ref$async;\n\n _classCallCheck(this, Channel);\n\n this.isAsync = void 0;\n this.sender = generateRandomId();\n this.events = {};\n this.data = {};\n this.transport = undefined;\n this.addPeerListener = deprecate(function (eventName, listener) {\n _this.addListener(eventName, listener);\n }, dedent(_templateObject || (_templateObject = _taggedTemplateLiteral([\"\\n channel.addPeerListener is deprecated\\n \"]))));\n this.isAsync = async;\n\n if (transport) {\n this.transport = transport;\n this.transport.setHandler(function (event) {\n return _this.handleEvent(event);\n });\n }\n }\n\n _createClass(Channel, [{\n key: \"hasTransport\",\n get: function get() {\n return !!this.transport;\n }\n }, {\n key: \"addListener\",\n value: function addListener(eventName, listener) {\n this.events[eventName] = this.events[eventName] || [];\n this.events[eventName].push(listener);\n }\n }, {\n key: \"emit\",\n value: function emit(eventName) {\n var _this2 = this;\n\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\n var event = {\n type: eventName,\n args: args,\n from: this.sender\n };\n var options = {};\n\n if (args.length >= 1 && args[0] && args[0].options) {\n options = args[0].options;\n }\n\n var handler = function handler() {\n if (_this2.transport) {\n _this2.transport.send(event, options);\n }\n\n _this2.handleEvent(event);\n };\n\n if (this.isAsync) {\n // todo I'm not sure how to test this\n setImmediate(handler);\n } else {\n handler();\n }\n }\n }, {\n key: \"last\",\n value: function last(eventName) {\n return this.data[eventName];\n }\n }, {\n key: \"eventNames\",\n value: function eventNames() {\n return Object.keys(this.events);\n }\n }, {\n key: \"listenerCount\",\n value: function listenerCount(eventName) {\n var listeners = this.listeners(eventName);\n return listeners ? listeners.length : 0;\n }\n }, {\n key: \"listeners\",\n value: function listeners(eventName) {\n var listeners = this.events[eventName];\n return listeners || undefined;\n }\n }, {\n key: \"once\",\n value: function once(eventName, listener) {\n var onceListener = this.onceListener(eventName, listener);\n this.addListener(eventName, onceListener);\n }\n }, {\n key: \"removeAllListeners\",\n value: function removeAllListeners(eventName) {\n if (!eventName) {\n this.events = {};\n } else if (this.events[eventName]) {\n delete this.events[eventName];\n }\n }\n }, {\n key: \"removeListener\",\n value: function removeListener(eventName, listener) {\n var listeners = this.listeners(eventName);\n\n if (listeners) {\n this.events[eventName] = listeners.filter(function (l) {\n return l !== listener;\n });\n }\n }\n }, {\n key: \"on\",\n value: function on(eventName, listener) {\n this.addListener(eventName, listener);\n }\n }, {\n key: \"off\",\n value: function off(eventName, listener) {\n this.removeListener(eventName, listener);\n }\n }, {\n key: \"handleEvent\",\n value: function handleEvent(event) {\n var listeners = this.listeners(event.type);\n\n if (listeners && listeners.length) {\n listeners.forEach(function (fn) {\n fn.apply(event, event.args);\n });\n }\n\n this.data[event.type] = event.args;\n }\n }, {\n key: \"onceListener\",\n value: function onceListener(eventName, listener) {\n var _this3 = this;\n\n var onceListener = function onceListener() {\n _this3.removeListener(eventName, onceListener);\n\n return listener.apply(void 0, arguments);\n };\n\n return onceListener;\n }\n }]);\n\n return Channel;\n}();\nexport default Channel;","import \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.object.freeze.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nvar _excluded = [\"globals\", \"globalTypes\"],\n _excluded2 = [\"decorators\", \"loaders\", \"component\", \"args\", \"argTypes\"],\n _excluded3 = [\"component\", \"args\", \"argTypes\"];\n\nvar _templateObject, _templateObject2, _templateObject3, _templateObject4;\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _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\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.object.assign.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.regexp.to-string.js\";\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.object.entries.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.object.values.js\";\n\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\n\nimport deprecate from 'util-deprecate';\nimport dedent from 'ts-dedent';\nimport global from 'global';\nimport { logger } from '@storybook/client-logger';\nimport { toId, sanitize } from '@storybook/csf';\nimport { combineParameters, normalizeInputTypes } from '@storybook/store';\nimport { StoryStoreFacade } from './StoryStoreFacade';\n// ClientApi (and StoreStore) are really singletons. However they are not created until the\n// relevant framework instanciates them via `start.js`. The good news is this happens right away.\nvar singleton;\nvar warningAlternatives = {\n addDecorator: \"Instead, use `export const decorators = [];` in your `preview.js`.\",\n addParameters: \"Instead, use `export const parameters = {};` in your `preview.js`.\",\n addLoaders: \"Instead, use `export const loaders = [];` in your `preview.js`.\"\n};\n\nvar warningMessage = function warningMessage(method) {\n return deprecate(function () {}, dedent(_templateObject || (_templateObject = _taggedTemplateLiteral([\"\\n `\", \"` is deprecated, and will be removed in Storybook 7.0.\\n\\n \", \"\\n\\n Read more at https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-addparameters-and-adddecorator).\"], [\"\\n \\\\`\", \"\\\\` is deprecated, and will be removed in Storybook 7.0.\\n\\n \", \"\\n\\n Read more at https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-addparameters-and-adddecorator).\"])), method, warningAlternatives[method]));\n};\n\nvar warnings = {\n addDecorator: warningMessage('addDecorator'),\n addParameters: warningMessage('addParameters'),\n addLoaders: warningMessage('addLoaders')\n};\n\nvar checkMethod = function checkMethod(method, deprecationWarning) {\n var _global$FEATURES;\n\n if ((_global$FEATURES = global.FEATURES) !== null && _global$FEATURES !== void 0 && _global$FEATURES.storyStoreV7) {\n throw new Error(dedent(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral([\"You cannot use `\", \"` with the new Story Store.\\n \\n \", \"\"], [\"You cannot use \\\\`\", \"\\\\` with the new Story Store.\\n \\n \", \"\"])), method, warningAlternatives[method]));\n }\n\n if (!singleton) {\n throw new Error(\"Singleton client API not yet initialized, cannot call `\".concat(method, \"`.\"));\n }\n\n if (deprecationWarning) {\n warnings[method]();\n }\n};\n\nexport var addDecorator = function addDecorator(decorator) {\n var deprecationWarning = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n checkMethod('addDecorator', deprecationWarning);\n singleton.addDecorator(decorator);\n};\nexport var addParameters = function addParameters(parameters) {\n var deprecationWarning = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n checkMethod('addParameters', deprecationWarning);\n singleton.addParameters(parameters);\n};\nexport var addLoader = function addLoader(loader) {\n var deprecationWarning = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n checkMethod('addLoader', deprecationWarning);\n singleton.addLoader(loader);\n};\nexport var addArgs = function addArgs(args) {\n checkMethod('addArgs', false);\n singleton.addArgs(args);\n};\nexport var addArgTypes = function addArgTypes(argTypes) {\n checkMethod('addArgTypes', false);\n singleton.addArgTypes(argTypes);\n};\nexport var addArgsEnhancer = function addArgsEnhancer(enhancer) {\n checkMethod('addArgsEnhancer', false);\n singleton.addArgsEnhancer(enhancer);\n};\nexport var addArgTypesEnhancer = function addArgTypesEnhancer(enhancer) {\n checkMethod('addArgTypesEnhancer', false);\n singleton.addArgTypesEnhancer(enhancer);\n};\nexport var getGlobalRender = function getGlobalRender() {\n checkMethod('getGlobalRender', false);\n return singleton.facade.projectAnnotations.render;\n};\nexport var setGlobalRender = function setGlobalRender(render) {\n checkMethod('setGlobalRender', false);\n singleton.facade.projectAnnotations.render = render;\n};\nvar invalidStoryTypes = new Set(['string', 'number', 'boolean', 'symbol']);\nexport var ClientApi = /*#__PURE__*/function () {\n // If we don't get passed modules so don't know filenames, we can\n // just use numeric indexes\n function ClientApi() {\n var _this = this;\n\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n storyStore = _ref.storyStore;\n\n _classCallCheck(this, ClientApi);\n\n this.facade = void 0;\n this.storyStore = void 0;\n this.addons = void 0;\n this.onImportFnChanged = void 0;\n this.lastFileName = 0;\n this.setAddon = deprecate(function (addon) {\n _this.addons = Object.assign({}, _this.addons, addon);\n }, dedent(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral([\"\\n `setAddon` is deprecated and will be removed in Storybook 7.0.\\n\\n https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-setaddon\\n \"], [\"\\n \\\\`setAddon\\\\` is deprecated and will be removed in Storybook 7.0.\\n\\n https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-setaddon\\n \"]))));\n\n this.addDecorator = function (decorator) {\n _this.facade.projectAnnotations.decorators.push(decorator);\n };\n\n this.clearDecorators = deprecate(function () {\n _this.facade.projectAnnotations.decorators = [];\n }, dedent(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral([\"\\n `clearDecorators` is deprecated and will be removed in Storybook 7.0.\\n\\n https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-cleardecorators\\n \"], [\"\\n \\\\`clearDecorators\\\\` is deprecated and will be removed in Storybook 7.0.\\n\\n https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-cleardecorators\\n \"]))));\n\n this.addParameters = function (_ref2) {\n var globals = _ref2.globals,\n globalTypes = _ref2.globalTypes,\n parameters = _objectWithoutProperties(_ref2, _excluded);\n\n _this.facade.projectAnnotations.parameters = combineParameters(_this.facade.projectAnnotations.parameters, parameters);\n\n if (globals) {\n _this.facade.projectAnnotations.globals = Object.assign({}, _this.facade.projectAnnotations.globals, globals);\n }\n\n if (globalTypes) {\n _this.facade.projectAnnotations.globalTypes = Object.assign({}, _this.facade.projectAnnotations.globalTypes, normalizeInputTypes(globalTypes));\n }\n };\n\n this.addLoader = function (loader) {\n _this.facade.projectAnnotations.loaders.push(loader);\n };\n\n this.addArgs = function (args) {\n _this.facade.projectAnnotations.args = Object.assign({}, _this.facade.projectAnnotations.args, args);\n };\n\n this.addArgTypes = function (argTypes) {\n _this.facade.projectAnnotations.argTypes = Object.assign({}, _this.facade.projectAnnotations.argTypes, normalizeInputTypes(argTypes));\n };\n\n this.addArgsEnhancer = function (enhancer) {\n _this.facade.projectAnnotations.argsEnhancers.push(enhancer);\n };\n\n this.addArgTypesEnhancer = function (enhancer) {\n _this.facade.projectAnnotations.argTypesEnhancers.push(enhancer);\n };\n\n this.storiesOf = function (kind, m) {\n if (!kind && typeof kind !== 'string') {\n throw new Error('Invalid or missing kind provided for stories, should be a string');\n }\n\n if (!m) {\n logger.warn(\"Missing 'module' parameter for story with a kind of '\".concat(kind, \"'. It will break your HMR\"));\n }\n\n if (m) {\n var proto = Object.getPrototypeOf(m);\n\n if (proto.exports && proto.exports.default) {\n // FIXME: throw an error in SB6.0\n logger.error(\"Illegal mix of CSF default export and storiesOf calls in a single file: \".concat(proto.i));\n }\n } // eslint-disable-next-line no-plusplus\n\n\n var baseFilename = m && m.id ? \"\".concat(m.id) : (_this.lastFileName++).toString();\n var fileName = baseFilename;\n var i = 1; // Deal with `storiesOf()` being called twice in the same file.\n // On HMR, `this.csfExports[fileName]` will be reset to `{}`, so an empty object is due\n // to this export, not a second call of `storiesOf()`.\n\n while (_this.facade.csfExports[fileName] && Object.keys(_this.facade.csfExports[fileName]).length > 0) {\n i += 1;\n fileName = \"\".concat(baseFilename, \"-\").concat(i);\n }\n\n if (m && m.hot && m.hot.accept) {\n // This module used storiesOf(), so when it re-runs on HMR, it will reload\n // itself automatically without us needing to look at our imports\n m.hot.accept();\n m.hot.dispose(function () {\n _this.facade.clearFilenameExports(fileName); // We need to update the importFn as soon as the module re-evaluates\n // (and calls storiesOf() again, etc). We could call `onImportFnChanged()`\n // at the end of every setStories call (somehow), but then we'd need to\n // debounce it somehow for initial startup. Instead, we'll take advantage of\n // the fact that the evaluation of the module happens immediately in the same tick\n\n\n setTimeout(function () {\n var _this$onImportFnChang;\n\n (_this$onImportFnChang = _this.onImportFnChanged) === null || _this$onImportFnChang === void 0 ? void 0 : _this$onImportFnChang.call(_this, {\n importFn: _this.importFn.bind(_this)\n });\n }, 0);\n });\n }\n\n var hasAdded = false;\n var api = {\n kind: kind.toString(),\n add: function add() {\n return api;\n },\n addDecorator: function addDecorator() {\n return api;\n },\n addLoader: function addLoader() {\n return api;\n },\n addParameters: function addParameters() {\n return api;\n }\n }; // apply addons\n\n Object.keys(_this.addons).forEach(function (name) {\n var addon = _this.addons[name];\n\n api[name] = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n addon.apply(api, args);\n return api;\n };\n });\n var meta = {\n id: sanitize(kind),\n title: kind,\n decorators: [],\n loaders: [],\n parameters: {}\n }; // We map these back to a simple default export, even though we have type guarantees at this point\n\n _this.facade.csfExports[fileName] = {\n default: meta\n };\n var counter = 0;\n\n api.add = function (storyName, storyFn) {\n var parameters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n hasAdded = true;\n\n if (typeof storyName !== 'string') {\n throw new Error(\"Invalid or missing storyName provided for a \\\"\".concat(kind, \"\\\" story.\"));\n }\n\n if (!storyFn || Array.isArray(storyFn) || invalidStoryTypes.has(_typeof(storyFn))) {\n throw new Error(\"Cannot load story \\\"\".concat(storyName, \"\\\" in \\\"\").concat(kind, \"\\\" due to invalid format. Storybook expected a function/object but received \").concat(_typeof(storyFn), \" instead.\"));\n }\n\n var decorators = parameters.decorators,\n loaders = parameters.loaders,\n component = parameters.component,\n args = parameters.args,\n argTypes = parameters.argTypes,\n storyParameters = _objectWithoutProperties(parameters, _excluded2); // eslint-disable-next-line no-underscore-dangle\n\n\n var storyId = parameters.__id || toId(kind, storyName);\n var csfExports = _this.facade.csfExports[fileName]; // Whack a _ on the front incase it is \"default\"\n\n csfExports[\"story\".concat(counter)] = {\n name: storyName,\n parameters: Object.assign({\n fileName: fileName,\n __id: storyId\n }, storyParameters),\n decorators: decorators,\n loaders: loaders,\n args: args,\n argTypes: argTypes,\n component: component,\n render: storyFn\n };\n counter += 1;\n _this.facade.stories[storyId] = {\n id: storyId,\n title: csfExports.default.title,\n name: storyName,\n importPath: fileName\n };\n return api;\n };\n\n api.addDecorator = function (decorator) {\n if (hasAdded) throw new Error(\"You cannot add a decorator after the first story for a kind.\\nRead more here: https://github.com/storybookjs/storybook/blob/master/MIGRATION.md#can-no-longer-add-decoratorsparameters-after-stories\");\n meta.decorators.push(decorator);\n return api;\n };\n\n api.addLoader = function (loader) {\n if (hasAdded) throw new Error(\"You cannot add a loader after the first story for a kind.\");\n meta.loaders.push(loader);\n return api;\n };\n\n api.addParameters = function (_ref3) {\n var component = _ref3.component,\n args = _ref3.args,\n argTypes = _ref3.argTypes,\n parameters = _objectWithoutProperties(_ref3, _excluded3);\n\n if (hasAdded) throw new Error(\"You cannot add parameters after the first story for a kind.\\nRead more here: https://github.com/storybookjs/storybook/blob/master/MIGRATION.md#can-no-longer-add-decoratorsparameters-after-stories\");\n meta.parameters = combineParameters(meta.parameters, parameters);\n if (component) meta.component = component;\n if (args) meta.args = Object.assign({}, meta.args, args);\n if (argTypes) meta.argTypes = Object.assign({}, meta.argTypes, argTypes);\n return api;\n };\n\n return api;\n };\n\n this.getStorybook = function () {\n var stories = _this.storyStore.storyIndex.stories;\n var kinds = {};\n Object.entries(stories).forEach(function (_ref4) {\n var _ref5 = _slicedToArray(_ref4, 2),\n storyId = _ref5[0],\n _ref5$ = _ref5[1],\n title = _ref5$.title,\n name = _ref5$.name,\n importPath = _ref5$.importPath;\n\n if (!kinds[title]) {\n kinds[title] = {\n kind: title,\n fileName: importPath,\n stories: []\n };\n }\n\n var _this$storyStore$from = _this.storyStore.fromId(storyId),\n storyFn = _this$storyStore$from.storyFn;\n\n kinds[title].stories.push({\n name: name,\n render: storyFn\n });\n });\n return Object.values(kinds);\n };\n\n this.raw = function () {\n return _this.storyStore.raw();\n };\n\n this.facade = new StoryStoreFacade();\n this.addons = {};\n this.storyStore = storyStore;\n singleton = this;\n }\n\n _createClass(ClientApi, [{\n key: \"importFn\",\n value: function importFn(path) {\n return this.facade.importFn(path);\n }\n }, {\n key: \"getStoryIndex\",\n value: function getStoryIndex() {\n if (!this.storyStore) {\n throw new Error('Cannot get story index before setting storyStore');\n }\n\n return this.facade.getStoryIndex(this.storyStore);\n }\n }, {\n key: \"_storyStore\",\n get: // @deprecated\n function get() {\n return this.storyStore;\n }\n }]);\n\n return ClientApi;\n}();","import \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.object.freeze.js\";\nvar _excluded = [\"default\", \"__namedExportsOrder\"];\n\nvar _templateObject;\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.object.entries.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.object.assign.js\";\nimport \"core-js/modules/es.regexp.constructor.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.regexp.to-string.js\";\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.function.name.js\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport global from 'global';\nimport dedent from 'ts-dedent';\nimport { SynchronousPromise } from 'synchronous-promise';\nimport { toId, isExportStory, storyNameFromExport } from '@storybook/csf';\nimport { userOrAutoTitle, sortStoriesV6 } from '@storybook/store';\nimport { logger } from '@storybook/client-logger';\nexport var StoryStoreFacade = /*#__PURE__*/function () {\n function StoryStoreFacade() {\n _classCallCheck(this, StoryStoreFacade);\n\n this.projectAnnotations = void 0;\n this.stories = void 0;\n this.csfExports = void 0;\n this.projectAnnotations = {\n loaders: [],\n decorators: [],\n parameters: {},\n argsEnhancers: [],\n argTypesEnhancers: [],\n args: {},\n argTypes: {}\n };\n this.stories = {};\n this.csfExports = {};\n } // This doesn't actually import anything because the client-api loads fully\n // on startup, but this is a shim after all.\n\n\n _createClass(StoryStoreFacade, [{\n key: \"importFn\",\n value: function importFn(path) {\n var _this = this;\n\n return SynchronousPromise.resolve().then(function () {\n var moduleExports = _this.csfExports[path];\n if (!moduleExports) throw new Error(\"Unknown path: \".concat(path));\n return moduleExports;\n });\n }\n }, {\n key: \"getStoryIndex\",\n value: function getStoryIndex(store) {\n var _this$projectAnnotati,\n _this$projectAnnotati2,\n _this2 = this;\n\n var fileNameOrder = Object.keys(this.csfExports);\n var storySortParameter = (_this$projectAnnotati = this.projectAnnotations.parameters) === null || _this$projectAnnotati === void 0 ? void 0 : (_this$projectAnnotati2 = _this$projectAnnotati.options) === null || _this$projectAnnotati2 === void 0 ? void 0 : _this$projectAnnotati2.storySort;\n var storyEntries = Object.entries(this.stories); // Add the kind parameters and global parameters to each entry\n\n var sortableV6 = storyEntries.map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n storyId = _ref2[0],\n importPath = _ref2[1].importPath;\n\n var exports = _this2.csfExports[importPath];\n var csfFile = store.processCSFFileWithCache(exports, importPath, exports.default.title);\n return [storyId, store.storyFromCSFFile({\n storyId: storyId,\n csfFile: csfFile\n }), csfFile.meta.parameters, _this2.projectAnnotations.parameters];\n }); // NOTE: the sortStoriesV6 version returns the v7 data format. confusing but more convenient!\n\n var sortedV7;\n\n try {\n sortedV7 = sortStoriesV6(sortableV6, storySortParameter, fileNameOrder);\n } catch (err) {\n if (typeof storySortParameter === 'function') {\n throw new Error(dedent(_templateObject || (_templateObject = _taggedTemplateLiteral([\"\\n Error sorting stories with sort parameter \", \":\\n\\n > \", \"\\n \\n Are you using a V7-style sort function in V6 compatibility mode?\\n \\n More info: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#v7-style-story-sort\\n \"])), storySortParameter, err.message));\n }\n\n throw err;\n }\n\n var stories = sortedV7.reduce(function (acc, s) {\n // We use the original entry we stored in `this.stories` because it is possible that the CSF file itself\n // exports a `parameters.fileName` which can be different and mess up our `importFn`.\n // In fact, in Storyshots there is a Jest transformer that does exactly that.\n // NOTE: this doesn't actually change the story object, just the index.\n acc[s.id] = _this2.stories[s.id];\n return acc;\n }, {});\n return {\n v: 3,\n stories: stories\n };\n }\n }, {\n key: \"clearFilenameExports\",\n value: function clearFilenameExports(fileName) {\n var _this3 = this;\n\n if (!this.csfExports[fileName]) {\n return;\n } // Clear this module's stories from the storyList and existing exports\n\n\n Object.entries(this.stories).forEach(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n id = _ref4[0],\n importPath = _ref4[1].importPath;\n\n if (importPath === fileName) {\n delete _this3.stories[id];\n }\n }); // We keep this as an empty record so we can use it to maintain component order\n\n this.csfExports[fileName] = {};\n } // NOTE: we could potentially share some of this code with the stories.json generation\n\n }, {\n key: \"addStoriesFromExports\",\n value: function addStoriesFromExports(fileName, fileExports) {\n var _this4 = this;\n\n // if the export haven't changed since last time we added them, this is a no-op\n if (this.csfExports[fileName] === fileExports) {\n return;\n } // OTOH, if they have changed, let's clear them out first\n\n\n this.clearFilenameExports(fileName);\n\n var defaultExport = fileExports.default,\n __namedExportsOrder = fileExports.__namedExportsOrder,\n namedExports = _objectWithoutProperties(fileExports, _excluded); // eslint-disable-next-line prefer-const\n\n\n var _ref5 = defaultExport || {},\n componentId = _ref5.id,\n title = _ref5.title;\n\n var specifiers = (global.STORIES || []).map(function (specifier) {\n return Object.assign({}, specifier, {\n importPathMatcher: new RegExp(specifier.importPathMatcher)\n });\n });\n title = userOrAutoTitle(fileName, specifiers, title);\n\n if (!title) {\n logger.info(\"Unexpected default export without title in '\".concat(fileName, \"': \").concat(JSON.stringify(fileExports.default)));\n return;\n }\n\n this.csfExports[fileName] = Object.assign({}, fileExports, {\n default: Object.assign({}, defaultExport, {\n title: title\n })\n });\n var sortedExports = namedExports; // prefer a user/loader provided `__namedExportsOrder` array if supplied\n // we do this as es module exports are always ordered alphabetically\n // see https://github.com/storybookjs/storybook/issues/9136\n\n if (Array.isArray(__namedExportsOrder)) {\n sortedExports = {};\n\n __namedExportsOrder.forEach(function (name) {\n var namedExport = namedExports[name];\n if (namedExport) sortedExports[name] = namedExport;\n });\n }\n\n Object.entries(sortedExports).filter(function (_ref6) {\n var _ref7 = _slicedToArray(_ref6, 1),\n key = _ref7[0];\n\n return isExportStory(key, defaultExport);\n }).forEach(function (_ref8) {\n var _storyExport$paramete, _storyExport$story;\n\n var _ref9 = _slicedToArray(_ref8, 2),\n key = _ref9[0],\n storyExport = _ref9[1];\n\n var exportName = storyNameFromExport(key);\n var id = ((_storyExport$paramete = storyExport.parameters) === null || _storyExport$paramete === void 0 ? void 0 : _storyExport$paramete.__id) || toId(componentId || title, exportName);\n var name = typeof storyExport !== 'function' && storyExport.name || storyExport.storyName || ((_storyExport$story = storyExport.story) === null || _storyExport$story === void 0 ? void 0 : _storyExport$story.name) || exportName;\n _this4.stories[id] = {\n id: id,\n name: name,\n title: title,\n importPath: fileName\n };\n });\n }\n }]);\n\n return StoryStoreFacade;\n}();","import { ClientApi, addDecorator, addParameters, addLoader, addArgs, addArgTypes, addArgsEnhancer, addArgTypesEnhancer, setGlobalRender } from './ClientApi';\nexport * from './types';\nexport * from './queryparams';\nexport * from '@storybook/store';\nexport { addArgsEnhancer, addArgTypesEnhancer, addDecorator, addLoader, addArgs, addArgTypes, addParameters, setGlobalRender, ClientApi };","import \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.search.js\";\nimport global from 'global';\nimport { parse } from 'qs';\nvar document = global.document;\nexport var getQueryParams = function getQueryParams() {\n // document.location is not defined in react-native\n if (document && document.location && document.location.search) {\n return parse(document.location.search, {\n ignoreQueryPrefix: true\n });\n }\n\n return {};\n};\nexport var getQueryParam = function getQueryParam(key) {\n var params = getQueryParams();\n return params[key];\n};","import \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.replace.js\";\nimport global from 'global';\nvar LOGLEVEL = global.LOGLEVEL,\n console = global.console;\nvar levels = {\n trace: 1,\n debug: 2,\n info: 3,\n warn: 4,\n error: 5,\n silent: 10\n};\nvar currentLogLevelString = LOGLEVEL;\nvar currentLogLevelNumber = levels[currentLogLevelString] || levels.info;\nexport var logger = {\n trace: function trace(message) {\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\n return currentLogLevelNumber <= levels.trace && console.trace.apply(console, [message].concat(rest));\n },\n debug: function debug(message) {\n for (var _len2 = arguments.length, rest = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n rest[_key2 - 1] = arguments[_key2];\n }\n\n return currentLogLevelNumber <= levels.debug && console.debug.apply(console, [message].concat(rest));\n },\n info: function info(message) {\n for (var _len3 = arguments.length, rest = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n rest[_key3 - 1] = arguments[_key3];\n }\n\n return currentLogLevelNumber <= levels.info && console.info.apply(console, [message].concat(rest));\n },\n warn: function warn(message) {\n for (var _len4 = arguments.length, rest = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n rest[_key4 - 1] = arguments[_key4];\n }\n\n return currentLogLevelNumber <= levels.warn && console.warn.apply(console, [message].concat(rest));\n },\n error: function error(message) {\n for (var _len5 = arguments.length, rest = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {\n rest[_key5 - 1] = arguments[_key5];\n }\n\n return currentLogLevelNumber <= levels.error && console.error.apply(console, [message].concat(rest));\n },\n log: function log(message) {\n for (var _len6 = arguments.length, rest = new Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) {\n rest[_key6 - 1] = arguments[_key6];\n }\n\n return currentLogLevelNumber < levels.silent && console.log.apply(console, [message].concat(rest));\n }\n};\nvar logged = new Set();\nexport var once = function once(type) {\n return function (message) {\n if (logged.has(message)) return undefined;\n logged.add(message);\n\n for (var _len7 = arguments.length, rest = new Array(_len7 > 1 ? _len7 - 1 : 0), _key7 = 1; _key7 < _len7; _key7++) {\n rest[_key7 - 1] = arguments[_key7];\n }\n\n return logger[type].apply(logger, [message].concat(rest));\n };\n};\n\nonce.clear = function () {\n return logged.clear();\n};\n\nonce.trace = once('trace');\nonce.debug = once('debug');\nonce.info = once('info');\nonce.warn = once('warn');\nonce.error = once('error');\nonce.log = once('log');\nexport var pretty = function pretty(type) {\n return function () {\n var argArray = [];\n\n for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {\n args[_key8] = arguments[_key8];\n }\n\n if (args.length) {\n var startTagRe = //gi;\n var endTagRe = /<\\/span>/gi;\n var reResultArray;\n argArray.push(args[0].replace(startTagRe, '%c').replace(endTagRe, '%c')); // eslint-disable-next-line no-cond-assign\n\n while (reResultArray = startTagRe.exec(args[0])) {\n argArray.push(reResultArray[2]);\n argArray.push('');\n } // pass through subsequent args since chrome dev tools does not (yet) support console.log styling of the following form: console.log('%cBlue!', 'color: blue;', '%cRed!', 'color: red;');\n // eslint-disable-next-line no-plusplus\n\n\n for (var j = 1; j < args.length; j++) {\n argArray.push(args[j]);\n }\n } // eslint-disable-next-line prefer-spread\n\n\n logger[type].apply(logger, argArray);\n };\n};\npretty.trace = pretty('trace');\npretty.debug = pretty('debug');\npretty.info = pretty('info');\npretty.warn = pretty('warn');\npretty.error = pretty('error');","var events; // Enables: `import Events from ...`\n\n(function (events) {\n events[\"CHANNEL_CREATED\"] = \"channelCreated\";\n events[\"CONFIG_ERROR\"] = \"configError\";\n events[\"STORY_INDEX_INVALIDATED\"] = \"storyIndexInvalidated\";\n events[\"STORY_SPECIFIED\"] = \"storySpecified\";\n events[\"SET_STORIES\"] = \"setStories\";\n events[\"SET_CURRENT_STORY\"] = \"setCurrentStory\";\n events[\"CURRENT_STORY_WAS_SET\"] = \"currentStoryWasSet\";\n events[\"FORCE_RE_RENDER\"] = \"forceReRender\";\n events[\"FORCE_REMOUNT\"] = \"forceRemount\";\n events[\"PRELOAD_STORIES\"] = \"preloadStories\";\n events[\"STORY_PREPARED\"] = \"storyPrepared\";\n events[\"STORY_CHANGED\"] = \"storyChanged\";\n events[\"STORY_UNCHANGED\"] = \"storyUnchanged\";\n events[\"STORY_RENDERED\"] = \"storyRendered\";\n events[\"STORY_MISSING\"] = \"storyMissing\";\n events[\"STORY_ERRORED\"] = \"storyErrored\";\n events[\"STORY_THREW_EXCEPTION\"] = \"storyThrewException\";\n events[\"STORY_RENDER_PHASE_CHANGED\"] = \"storyRenderPhaseChanged\";\n events[\"UPDATE_STORY_ARGS\"] = \"updateStoryArgs\";\n events[\"STORY_ARGS_UPDATED\"] = \"storyArgsUpdated\";\n events[\"RESET_STORY_ARGS\"] = \"resetStoryArgs\";\n events[\"SET_GLOBALS\"] = \"setGlobals\";\n events[\"UPDATE_GLOBALS\"] = \"updateGlobals\";\n events[\"GLOBALS_UPDATED\"] = \"globalsUpdated\";\n events[\"REGISTER_SUBSCRIPTION\"] = \"registerSubscription\";\n events[\"PREVIEW_KEYDOWN\"] = \"previewKeydown\";\n events[\"SELECT_STORY\"] = \"selectStory\";\n events[\"STORIES_COLLAPSE_ALL\"] = \"storiesCollapseAll\";\n events[\"STORIES_EXPAND_ALL\"] = \"storiesExpandAll\";\n events[\"DOCS_RENDERED\"] = \"docsRendered\";\n events[\"SHARED_STATE_CHANGED\"] = \"sharedStateChanged\";\n events[\"SHARED_STATE_SET\"] = \"sharedStateSet\";\n events[\"NAVIGATE_URL\"] = \"navigateUrl\";\n events[\"UPDATE_QUERY_PARAMS\"] = \"updateQueryParams\";\n})(events || (events = {}));\n\nexport default events; // Enables: `import * as Events from ...` or `import { CHANNEL_CREATED } as Events from ...`\n// This is the preferred method\n\nvar CHANNEL_CREATED = events.CHANNEL_CREATED,\n CONFIG_ERROR = events.CONFIG_ERROR,\n STORY_INDEX_INVALIDATED = events.STORY_INDEX_INVALIDATED,\n STORY_SPECIFIED = events.STORY_SPECIFIED,\n SET_STORIES = events.SET_STORIES,\n SET_CURRENT_STORY = events.SET_CURRENT_STORY,\n CURRENT_STORY_WAS_SET = events.CURRENT_STORY_WAS_SET,\n FORCE_RE_RENDER = events.FORCE_RE_RENDER,\n FORCE_REMOUNT = events.FORCE_REMOUNT,\n STORY_PREPARED = events.STORY_PREPARED,\n STORY_CHANGED = events.STORY_CHANGED,\n STORY_UNCHANGED = events.STORY_UNCHANGED,\n PRELOAD_STORIES = events.PRELOAD_STORIES,\n STORY_RENDERED = events.STORY_RENDERED,\n STORY_MISSING = events.STORY_MISSING,\n STORY_ERRORED = events.STORY_ERRORED,\n STORY_THREW_EXCEPTION = events.STORY_THREW_EXCEPTION,\n STORY_RENDER_PHASE_CHANGED = events.STORY_RENDER_PHASE_CHANGED,\n UPDATE_STORY_ARGS = events.UPDATE_STORY_ARGS,\n STORY_ARGS_UPDATED = events.STORY_ARGS_UPDATED,\n RESET_STORY_ARGS = events.RESET_STORY_ARGS,\n SET_GLOBALS = events.SET_GLOBALS,\n UPDATE_GLOBALS = events.UPDATE_GLOBALS,\n GLOBALS_UPDATED = events.GLOBALS_UPDATED,\n REGISTER_SUBSCRIPTION = events.REGISTER_SUBSCRIPTION,\n PREVIEW_KEYDOWN = events.PREVIEW_KEYDOWN,\n SELECT_STORY = events.SELECT_STORY,\n STORIES_COLLAPSE_ALL = events.STORIES_COLLAPSE_ALL,\n STORIES_EXPAND_ALL = events.STORIES_EXPAND_ALL,\n DOCS_RENDERED = events.DOCS_RENDERED,\n SHARED_STATE_CHANGED = events.SHARED_STATE_CHANGED,\n SHARED_STATE_SET = events.SHARED_STATE_SET,\n NAVIGATE_URL = events.NAVIGATE_URL,\n UPDATE_QUERY_PARAMS = events.UPDATE_QUERY_PARAMS; // Used to break out of the current render without showing a redbox\n\nexport { CHANNEL_CREATED, CONFIG_ERROR, STORY_INDEX_INVALIDATED, STORY_SPECIFIED, SET_STORIES, SET_CURRENT_STORY, CURRENT_STORY_WAS_SET, FORCE_RE_RENDER, FORCE_REMOUNT, STORY_PREPARED, STORY_CHANGED, STORY_UNCHANGED, PRELOAD_STORIES, STORY_RENDERED, STORY_MISSING, STORY_ERRORED, STORY_THREW_EXCEPTION, STORY_RENDER_PHASE_CHANGED, UPDATE_STORY_ARGS, STORY_ARGS_UPDATED, RESET_STORY_ARGS, SET_GLOBALS, UPDATE_GLOBALS, GLOBALS_UPDATED, REGISTER_SUBSCRIPTION, PREVIEW_KEYDOWN, SELECT_STORY, STORIES_COLLAPSE_ALL, STORIES_EXPAND_ALL, DOCS_RENDERED, SHARED_STATE_CHANGED, SHARED_STATE_SET, NAVIGATE_URL, UPDATE_QUERY_PARAMS };\nexport var IGNORED_EXCEPTION = new Error('ignoredException');","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.includeConditionalArg = exports.testValue = void 0;\n\nvar _isEqual = _interopRequireDefault(require(\"lodash/isEqual\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nvar count = function count(vals) {\n return vals.map(function (v) {\n return typeof v !== 'undefined';\n }).filter(Boolean).length;\n};\n\nvar testValue = function testValue(cond, value) {\n var _ref = cond,\n exists = _ref.exists,\n eq = _ref.eq,\n neq = _ref.neq,\n truthy = _ref.truthy;\n\n if (count([exists, eq, neq, truthy]) > 1) {\n throw new Error(\"Invalid conditional test \".concat(JSON.stringify({\n exists: exists,\n eq: eq,\n neq: neq\n })));\n }\n\n if (typeof eq !== 'undefined') {\n return (0, _isEqual[\"default\"])(value, eq);\n }\n\n if (typeof neq !== 'undefined') {\n return !(0, _isEqual[\"default\"])(value, neq);\n }\n\n if (typeof exists !== 'undefined') {\n var valueExists = typeof value !== 'undefined';\n return exists ? valueExists : !valueExists;\n }\n\n var shouldBeTruthy = typeof truthy === 'undefined' ? true : truthy;\n return shouldBeTruthy ? !!value : !value;\n};\n/**\n * Helper function to include/exclude an arg based on the value of other other args\n * aka \"conditional args\"\n */\n\n\nexports.testValue = testValue;\n\nvar includeConditionalArg = function includeConditionalArg(argType, args, globals) {\n if (!argType[\"if\"]) return true;\n var _ref2 = argType[\"if\"],\n arg = _ref2.arg,\n global = _ref2.global;\n\n if (count([arg, global]) !== 1) {\n throw new Error(\"Invalid conditional value \".concat(JSON.stringify({\n arg: arg,\n global: global\n })));\n }\n\n var value = arg ? args[arg] : globals[global];\n return testValue(argType[\"if\"], value);\n};\n\nexports.includeConditionalArg = includeConditionalArg;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar _exportNames = {\n sanitize: true,\n toId: true,\n storyNameFromExport: true,\n isExportStory: true,\n parseKind: true,\n includeConditionalArg: true\n};\nexports.isExportStory = isExportStory;\nObject.defineProperty(exports, \"includeConditionalArg\", {\n enumerable: true,\n get: function get() {\n return _includeConditionalArg.includeConditionalArg;\n }\n});\nexports.parseKind = exports.storyNameFromExport = exports.toId = exports.sanitize = void 0;\n\nvar _startCase = _interopRequireDefault(require(\"lodash/startCase\"));\n\nvar _includeConditionalArg = require(\"./includeConditionalArg\");\n\nvar _story = require(\"./story\");\n\nObject.keys(_story).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _story[key];\n }\n });\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(n); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n/**\n * Remove punctuation and illegal characters from a story ID.\n *\n * See https://gist.github.com/davidjrice/9d2af51100e41c6c4b4a\n */\nvar sanitize = function sanitize(string) {\n return string.toLowerCase() // eslint-disable-next-line no-useless-escape\n .replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\\-=?;:'\",.<>\\{\\}\\[\\]\\\\\\/]/gi, '-').replace(/-+/g, '-').replace(/^-+/, '').replace(/-+$/, '');\n};\n\nexports.sanitize = sanitize;\n\nvar sanitizeSafe = function sanitizeSafe(string, part) {\n var sanitized = sanitize(string);\n\n if (sanitized === '') {\n throw new Error(\"Invalid \".concat(part, \" '\").concat(string, \"', must include alphanumeric characters\"));\n }\n\n return sanitized;\n};\n/**\n * Generate a storybook ID from a component/kind and story name.\n */\n\n\nvar toId = function toId(kind, name) {\n return \"\".concat(sanitizeSafe(kind, 'kind')).concat(name ? \"--\".concat(sanitizeSafe(name, 'name')) : '');\n};\n/**\n * Transform a CSF named export into a readable story name\n */\n\n\nexports.toId = toId;\n\nvar storyNameFromExport = function storyNameFromExport(key) {\n return (0, _startCase[\"default\"])(key);\n};\n\nexports.storyNameFromExport = storyNameFromExport;\n\nfunction matches(storyKey, arrayOrRegex) {\n if (Array.isArray(arrayOrRegex)) {\n return arrayOrRegex.includes(storyKey);\n }\n\n return storyKey.match(arrayOrRegex);\n}\n/**\n * Does a named export match CSF inclusion/exclusion options?\n */\n\n\nfunction isExportStory(key, _ref) {\n var includeStories = _ref.includeStories,\n excludeStories = _ref.excludeStories;\n return (// https://babeljs.io/docs/en/babel-plugin-transform-modules-commonjs\n key !== '__esModule' && (!includeStories || matches(key, includeStories)) && (!excludeStories || !matches(key, excludeStories))\n );\n}\n\n/**\n * Parse out the component/kind name from a path, using the given separator config.\n */\nvar parseKind = function parseKind(kind, _ref2) {\n var rootSeparator = _ref2.rootSeparator,\n groupSeparator = _ref2.groupSeparator;\n\n var _kind$split = kind.split(rootSeparator, 2),\n _kind$split2 = _slicedToArray(_kind$split, 2),\n root = _kind$split2[0],\n remainder = _kind$split2[1];\n\n var groups = (remainder || kind).split(groupSeparator).filter(function (i) {\n return !!i;\n }); // when there's no remainder, it means the root wasn't found/split\n\n return {\n root: remainder ? root : null,\n groups: groups\n };\n};\n\nexports.parseKind = parseKind;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _SBType = require(\"./SBType\");\n\nObject.keys(_SBType).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _SBType[key];\n }\n });\n});","import \"regenerator-runtime/runtime.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.object.assign.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.promise.js\";\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport global from 'global';\nimport { DOCS_RENDERED } from '@storybook/core-events';\nexport var DocsRender = /*#__PURE__*/function () {\n // eslint-disable-next-line no-useless-constructor\n function DocsRender(channel, store, id, story) {\n _classCallCheck(this, DocsRender);\n\n this.channel = channel;\n this.store = store;\n this.id = id;\n this.story = story;\n this.canvasElement = void 0;\n this.context = void 0;\n this.disableKeyListeners = false;\n } // DocsRender doesn't prepare, it is created *from* a prepared StoryRender\n\n\n _createClass(DocsRender, [{\n key: \"isPreparing\",\n value: function isPreparing() {\n return false;\n }\n }, {\n key: \"renderToElement\",\n value: function () {\n var _renderToElement = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(canvasElement, renderStoryToElement) {\n var _this = this,\n _global$FEATURES;\n\n var _this$story, id, title, name, csfFile;\n\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n this.canvasElement = canvasElement;\n _this$story = this.story, id = _this$story.id, title = _this$story.title, name = _this$story.name;\n _context.next = 4;\n return this.store.loadCSFFileByStoryId(this.id);\n\n case 4:\n csfFile = _context.sent;\n this.context = Object.assign({\n id: id,\n title: title,\n name: name,\n // NOTE: these two functions are *sync* so cannot access stories from other CSF files\n storyById: function storyById(storyId) {\n return _this.store.storyFromCSFFile({\n storyId: storyId,\n csfFile: csfFile\n });\n },\n componentStories: function componentStories() {\n return _this.store.componentStoriesFromCSFFile({\n csfFile: csfFile\n });\n },\n loadStory: function loadStory(storyId) {\n return _this.store.loadStory({\n storyId: storyId\n });\n },\n renderStoryToElement: renderStoryToElement,\n getStoryContext: function getStoryContext(renderedStory) {\n return Object.assign({}, _this.store.getStoryContext(renderedStory), {\n viewMode: 'docs'\n });\n }\n }, !((_global$FEATURES = global.FEATURES) !== null && _global$FEATURES !== void 0 && _global$FEATURES.breakingChangesV7) && this.store.getStoryContext(this.story));\n return _context.abrupt(\"return\", this.render());\n\n case 7:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function renderToElement(_x, _x2) {\n return _renderToElement.apply(this, arguments);\n }\n\n return renderToElement;\n }()\n }, {\n key: \"render\",\n value: function () {\n var _render = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n var _this2 = this;\n\n var renderer;\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n if (!(!this.story || !this.context || !this.canvasElement)) {\n _context2.next = 2;\n break;\n }\n\n throw new Error('DocsRender not ready to render');\n\n case 2:\n _context2.next = 4;\n return import('./renderDocs');\n\n case 4:\n renderer = _context2.sent;\n renderer.renderDocs(this.story, this.context, this.canvasElement, function () {\n return _this2.channel.emit(DOCS_RENDERED, _this2.id);\n });\n\n case 6:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function render() {\n return _render.apply(this, arguments);\n }\n\n return render;\n }()\n }, {\n key: \"rerender\",\n value: function () {\n var _rerender = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(isGlobals) {\n var _global$FEATURES2;\n\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n if (!(!((_global$FEATURES2 = global.FEATURES) !== null && _global$FEATURES2 !== void 0 && _global$FEATURES2.modernInlineRender) || isGlobals)) {\n _context3.next = 3;\n break;\n }\n\n _context3.next = 3;\n return this.render();\n\n case 3:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n\n function rerender(_x3) {\n return _rerender.apply(this, arguments);\n }\n\n return rerender;\n }()\n }, {\n key: \"teardown\",\n value: function () {\n var _teardown = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {\n var _ref,\n viewModeChanged,\n renderer,\n _args4 = arguments;\n\n return regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _ref = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {}, viewModeChanged = _ref.viewModeChanged;\n\n if (!(!viewModeChanged || !this.canvasElement)) {\n _context4.next = 3;\n break;\n }\n\n return _context4.abrupt(\"return\");\n\n case 3:\n _context4.next = 5;\n return import('./renderDocs');\n\n case 5:\n renderer = _context4.sent;\n renderer.unmountDocs(this.canvasElement);\n\n case 7:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n\n function teardown() {\n return _teardown.apply(this, arguments);\n }\n\n return teardown;\n }()\n }], [{\n key: \"fromStoryRender\",\n value: function fromStoryRender(storyRender) {\n var channel = storyRender.channel,\n store = storyRender.store,\n id = storyRender.id,\n story = storyRender.story;\n return new DocsRender(channel, store, id, story);\n }\n }]);\n\n return DocsRender;\n}();\nDocsRender.displayName = \"DocsRender\";","import \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.object.freeze.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\n\nvar _templateObject, _templateObject2;\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport \"regenerator-runtime/runtime.js\";\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.promise.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.array.find.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.object.keys.js\";\nimport dedent from 'ts-dedent';\nimport global from 'global';\nimport { SynchronousPromise } from 'synchronous-promise';\nimport { CONFIG_ERROR, FORCE_REMOUNT, FORCE_RE_RENDER, GLOBALS_UPDATED, RESET_STORY_ARGS, SET_GLOBALS, STORY_ARGS_UPDATED, STORY_INDEX_INVALIDATED, UPDATE_GLOBALS, UPDATE_STORY_ARGS } from '@storybook/core-events';\nimport { logger } from '@storybook/client-logger';\nimport { addons } from '@storybook/addons';\nimport { StoryStore } from '@storybook/store';\nimport { StoryRender } from './StoryRender';\nvar fetch = global.fetch;\nvar STORY_INDEX_PATH = './stories.json';\nexport var Preview = /*#__PURE__*/function () {\n function Preview() {\n var _global$FEATURES;\n\n _classCallCheck(this, Preview);\n\n this.channel = void 0;\n this.serverChannel = void 0;\n this.storyStore = void 0;\n this.getStoryIndex = void 0;\n this.importFn = void 0;\n this.renderToDOM = void 0;\n this.storyRenders = [];\n this.previewEntryError = void 0;\n this.channel = addons.getChannel();\n\n if ((_global$FEATURES = global.FEATURES) !== null && _global$FEATURES !== void 0 && _global$FEATURES.storyStoreV7 && addons.hasServerChannel()) {\n this.serverChannel = addons.getServerChannel();\n }\n\n this.storyStore = new StoryStore();\n } // INITIALIZATION\n // NOTE: the reason that the preview and store's initialization code is written in a promise\n // style and not `async-await`, and the use of `SynchronousPromise`s is in order to allow\n // storyshots to immediately call `raw()` on the store without waiting for a later tick.\n // (Even simple things like `Promise.resolve()` and `await` involve the callback happening\n // in the next promise \"tick\").\n // See the comment in `storyshots-core/src/api/index.ts` for more detail.\n\n\n _createClass(Preview, [{\n key: \"initialize\",\n value: function initialize(_ref) {\n var _this = this;\n\n var getStoryIndex = _ref.getStoryIndex,\n importFn = _ref.importFn,\n getProjectAnnotations = _ref.getProjectAnnotations;\n // We save these two on initialization in case `getProjectAnnotations` errors,\n // in which case we may need them later when we recover.\n this.getStoryIndex = getStoryIndex;\n this.importFn = importFn;\n this.setupListeners();\n return this.getProjectAnnotationsOrRenderError(getProjectAnnotations).then(function (projectAnnotations) {\n return _this.initializeWithProjectAnnotations(projectAnnotations);\n });\n }\n }, {\n key: \"setupListeners\",\n value: function setupListeners() {\n var _this$serverChannel;\n\n (_this$serverChannel = this.serverChannel) === null || _this$serverChannel === void 0 ? void 0 : _this$serverChannel.on(STORY_INDEX_INVALIDATED, this.onStoryIndexChanged.bind(this));\n this.channel.on(UPDATE_GLOBALS, this.onUpdateGlobals.bind(this));\n this.channel.on(UPDATE_STORY_ARGS, this.onUpdateArgs.bind(this));\n this.channel.on(RESET_STORY_ARGS, this.onResetArgs.bind(this));\n this.channel.on(FORCE_RE_RENDER, this.onForceReRender.bind(this));\n this.channel.on(FORCE_REMOUNT, this.onForceRemount.bind(this));\n }\n }, {\n key: \"getProjectAnnotationsOrRenderError\",\n value: function getProjectAnnotationsOrRenderError(getProjectAnnotations) {\n var _this2 = this;\n\n return SynchronousPromise.resolve().then(getProjectAnnotations).then(function (projectAnnotations) {\n _this2.renderToDOM = projectAnnotations.renderToDOM;\n\n if (!_this2.renderToDOM) {\n throw new Error(dedent(_templateObject || (_templateObject = _taggedTemplateLiteral([\"\\n Expected your framework's preset to export a `renderToDOM` field.\\n\\n Perhaps it needs to be upgraded for Storybook 6.4?\\n\\n More info: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mainjs-framework-field \\n \"], [\"\\n Expected your framework's preset to export a \\\\`renderToDOM\\\\` field.\\n\\n Perhaps it needs to be upgraded for Storybook 6.4?\\n\\n More info: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mainjs-framework-field \\n \"]))));\n }\n\n return projectAnnotations;\n }).catch(function (err) {\n // This is an error extracting the projectAnnotations (i.e. evaluating the previewEntries) and\n // needs to be show to the user as a simple error\n _this2.renderPreviewEntryError('Error reading preview.js:', err);\n\n throw err;\n });\n } // If initialization gets as far as project annotations, this function runs.\n\n }, {\n key: \"initializeWithProjectAnnotations\",\n value: function initializeWithProjectAnnotations(projectAnnotations) {\n var _global$FEATURES2,\n _this3 = this;\n\n this.storyStore.setProjectAnnotations(projectAnnotations);\n this.setInitialGlobals();\n var storyIndexPromise;\n\n if ((_global$FEATURES2 = global.FEATURES) !== null && _global$FEATURES2 !== void 0 && _global$FEATURES2.storyStoreV7) {\n storyIndexPromise = this.getStoryIndexFromServer();\n } else {\n if (!this.getStoryIndex) {\n throw new Error('No `getStoryIndex` passed defined in v6 mode');\n }\n\n storyIndexPromise = SynchronousPromise.resolve().then(this.getStoryIndex);\n }\n\n return storyIndexPromise.then(function (storyIndex) {\n return _this3.initializeWithStoryIndex(storyIndex);\n }).catch(function (err) {\n _this3.renderPreviewEntryError('Error loading story index:', err);\n\n throw err;\n });\n }\n }, {\n key: \"setInitialGlobals\",\n value: function () {\n var _setInitialGlobals = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n this.emitGlobals();\n\n case 1:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function setInitialGlobals() {\n return _setInitialGlobals.apply(this, arguments);\n }\n\n return setInitialGlobals;\n }()\n }, {\n key: \"emitGlobals\",\n value: function emitGlobals() {\n this.channel.emit(SET_GLOBALS, {\n globals: this.storyStore.globals.get() || {},\n globalTypes: this.storyStore.projectAnnotations.globalTypes || {}\n });\n }\n }, {\n key: \"getStoryIndexFromServer\",\n value: function () {\n var _getStoryIndexFromServer = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n var result;\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return fetch(STORY_INDEX_PATH);\n\n case 2:\n result = _context2.sent;\n\n if (!(result.status === 200)) {\n _context2.next = 5;\n break;\n }\n\n return _context2.abrupt(\"return\", result.json());\n\n case 5:\n _context2.t0 = Error;\n _context2.next = 8;\n return result.text();\n\n case 8:\n _context2.t1 = _context2.sent;\n throw new _context2.t0(_context2.t1);\n\n case 10:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n\n function getStoryIndexFromServer() {\n return _getStoryIndexFromServer.apply(this, arguments);\n }\n\n return getStoryIndexFromServer;\n }() // If initialization gets as far as the story index, this function runs.\n\n }, {\n key: \"initializeWithStoryIndex\",\n value: function initializeWithStoryIndex(storyIndex) {\n var _global$FEATURES3;\n\n return this.storyStore.initialize({\n storyIndex: storyIndex,\n importFn: this.importFn,\n cache: !((_global$FEATURES3 = global.FEATURES) !== null && _global$FEATURES3 !== void 0 && _global$FEATURES3.storyStoreV7)\n });\n } // EVENT HANDLERS\n // This happens when a config file gets reloaded\n\n }, {\n key: \"onGetProjectAnnotationsChanged\",\n value: function () {\n var _onGetProjectAnnotationsChanged = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(_ref2) {\n var getProjectAnnotations, projectAnnotations;\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n getProjectAnnotations = _ref2.getProjectAnnotations;\n delete this.previewEntryError;\n _context3.next = 4;\n return this.getProjectAnnotationsOrRenderError(getProjectAnnotations);\n\n case 4:\n projectAnnotations = _context3.sent;\n\n if (this.storyStore.projectAnnotations) {\n _context3.next = 9;\n break;\n }\n\n _context3.next = 8;\n return this.initializeWithProjectAnnotations(projectAnnotations);\n\n case 8:\n return _context3.abrupt(\"return\");\n\n case 9:\n _context3.next = 11;\n return this.storyStore.setProjectAnnotations(projectAnnotations);\n\n case 11:\n this.emitGlobals();\n\n case 12:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n\n function onGetProjectAnnotationsChanged(_x) {\n return _onGetProjectAnnotationsChanged.apply(this, arguments);\n }\n\n return onGetProjectAnnotationsChanged;\n }()\n }, {\n key: \"onStoryIndexChanged\",\n value: function () {\n var _onStoryIndexChanged = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {\n var storyIndex;\n return regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n delete this.previewEntryError;\n\n if (this.storyStore.projectAnnotations) {\n _context4.next = 3;\n break;\n }\n\n return _context4.abrupt(\"return\");\n\n case 3:\n _context4.prev = 3;\n _context4.next = 6;\n return this.getStoryIndexFromServer();\n\n case 6:\n storyIndex = _context4.sent;\n\n if (this.storyStore.storyIndex) {\n _context4.next = 10;\n break;\n }\n\n _context4.next = 10;\n return this.initializeWithStoryIndex(storyIndex);\n\n case 10:\n _context4.next = 12;\n return this.onStoriesChanged({\n storyIndex: storyIndex\n });\n\n case 12:\n _context4.next = 18;\n break;\n\n case 14:\n _context4.prev = 14;\n _context4.t0 = _context4[\"catch\"](3);\n this.renderPreviewEntryError('Error loading story index:', _context4.t0);\n throw _context4.t0;\n\n case 18:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4, this, [[3, 14]]);\n }));\n\n function onStoryIndexChanged() {\n return _onStoryIndexChanged.apply(this, arguments);\n }\n\n return onStoryIndexChanged;\n }() // This happens when a glob gets HMR-ed\n\n }, {\n key: \"onStoriesChanged\",\n value: function () {\n var _onStoriesChanged = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(_ref3) {\n var importFn, storyIndex;\n return regeneratorRuntime.wrap(function _callee5$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n importFn = _ref3.importFn, storyIndex = _ref3.storyIndex;\n _context5.next = 3;\n return this.storyStore.onStoriesChanged({\n importFn: importFn,\n storyIndex: storyIndex\n });\n\n case 3:\n case \"end\":\n return _context5.stop();\n }\n }\n }, _callee5, this);\n }));\n\n function onStoriesChanged(_x2) {\n return _onStoriesChanged.apply(this, arguments);\n }\n\n return onStoriesChanged;\n }()\n }, {\n key: \"onUpdateGlobals\",\n value: function () {\n var _onUpdateGlobals = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(_ref4) {\n var globals;\n return regeneratorRuntime.wrap(function _callee6$(_context6) {\n while (1) {\n switch (_context6.prev = _context6.next) {\n case 0:\n globals = _ref4.globals;\n this.storyStore.globals.update(globals);\n _context6.next = 4;\n return Promise.all(this.storyRenders.map(function (r) {\n return r.rerender();\n }));\n\n case 4:\n this.channel.emit(GLOBALS_UPDATED, {\n globals: this.storyStore.globals.get(),\n initialGlobals: this.storyStore.globals.initialGlobals\n });\n\n case 5:\n case \"end\":\n return _context6.stop();\n }\n }\n }, _callee6, this);\n }));\n\n function onUpdateGlobals(_x3) {\n return _onUpdateGlobals.apply(this, arguments);\n }\n\n return onUpdateGlobals;\n }()\n }, {\n key: \"onUpdateArgs\",\n value: function () {\n var _onUpdateArgs = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(_ref5) {\n var storyId, updatedArgs;\n return regeneratorRuntime.wrap(function _callee7$(_context7) {\n while (1) {\n switch (_context7.prev = _context7.next) {\n case 0:\n storyId = _ref5.storyId, updatedArgs = _ref5.updatedArgs;\n this.storyStore.args.update(storyId, updatedArgs);\n _context7.next = 4;\n return Promise.all(this.storyRenders.filter(function (r) {\n return r.id === storyId;\n }).map(function (r) {\n return r.rerender();\n }));\n\n case 4:\n this.channel.emit(STORY_ARGS_UPDATED, {\n storyId: storyId,\n args: this.storyStore.args.get(storyId)\n });\n\n case 5:\n case \"end\":\n return _context7.stop();\n }\n }\n }, _callee7, this);\n }));\n\n function onUpdateArgs(_x4) {\n return _onUpdateArgs.apply(this, arguments);\n }\n\n return onUpdateArgs;\n }()\n }, {\n key: \"onResetArgs\",\n value: function () {\n var _onResetArgs = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8(_ref6) {\n var storyId, argNames, render, story, argNamesToReset, updatedArgs;\n return regeneratorRuntime.wrap(function _callee8$(_context8) {\n while (1) {\n switch (_context8.prev = _context8.next) {\n case 0:\n storyId = _ref6.storyId, argNames = _ref6.argNames;\n // NOTE: we have to be careful here and avoid await-ing when updating a rendered's args.\n // That's because below in `renderStoryToElement` we have also bound to this event and will\n // render the story in the same tick.\n // However, we can do that safely as the current story is available in `this.storyRenders`\n render = this.storyRenders.find(function (r) {\n return r.id === storyId;\n });\n _context8.t0 = render === null || render === void 0 ? void 0 : render.story;\n\n if (_context8.t0) {\n _context8.next = 7;\n break;\n }\n\n _context8.next = 6;\n return this.storyStore.loadStory({\n storyId: storyId\n });\n\n case 6:\n _context8.t0 = _context8.sent;\n\n case 7:\n story = _context8.t0;\n argNamesToReset = argNames || _toConsumableArray(new Set([].concat(_toConsumableArray(Object.keys(story.initialArgs)), _toConsumableArray(Object.keys(this.storyStore.args.get(storyId))))));\n updatedArgs = argNamesToReset.reduce(function (acc, argName) {\n acc[argName] = story.initialArgs[argName];\n return acc;\n }, {});\n _context8.next = 12;\n return this.onUpdateArgs({\n storyId: storyId,\n updatedArgs: updatedArgs\n });\n\n case 12:\n case \"end\":\n return _context8.stop();\n }\n }\n }, _callee8, this);\n }));\n\n function onResetArgs(_x5) {\n return _onResetArgs.apply(this, arguments);\n }\n\n return onResetArgs;\n }() // ForceReRender does not include a story id, so we simply must\n // re-render all stories in case they are relevant\n\n }, {\n key: \"onForceReRender\",\n value: function () {\n var _onForceReRender = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {\n return regeneratorRuntime.wrap(function _callee9$(_context9) {\n while (1) {\n switch (_context9.prev = _context9.next) {\n case 0:\n _context9.next = 2;\n return Promise.all(this.storyRenders.map(function (r) {\n return r.rerender();\n }));\n\n case 2:\n case \"end\":\n return _context9.stop();\n }\n }\n }, _callee9, this);\n }));\n\n function onForceReRender() {\n return _onForceReRender.apply(this, arguments);\n }\n\n return onForceReRender;\n }()\n }, {\n key: \"onForceRemount\",\n value: function () {\n var _onForceRemount = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10(_ref7) {\n var storyId;\n return regeneratorRuntime.wrap(function _callee10$(_context10) {\n while (1) {\n switch (_context10.prev = _context10.next) {\n case 0:\n storyId = _ref7.storyId;\n _context10.next = 3;\n return Promise.all(this.storyRenders.filter(function (r) {\n return r.id === storyId;\n }).map(function (r) {\n return r.remount();\n }));\n\n case 3:\n case \"end\":\n return _context10.stop();\n }\n }\n }, _callee10, this);\n }));\n\n function onForceRemount(_x6) {\n return _onForceRemount.apply(this, arguments);\n }\n\n return onForceRemount;\n }() // Used by docs' modernInlineRender to render a story to a given element\n // Note this short-circuits the `prepare()` phase of the StoryRender,\n // main to be consistent with the previous behaviour. In the future,\n // we will change it to go ahead and load the story, which will end up being\n // \"instant\", although async.\n\n }, {\n key: \"renderStoryToElement\",\n value: function renderStoryToElement(story, element) {\n var _this4 = this;\n\n var render = new StoryRender(this.channel, this.storyStore, this.renderToDOM, this.inlineStoryCallbacks(story.id), story.id, 'docs', story);\n render.renderToElement(element);\n this.storyRenders.push(render);\n return /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {\n return regeneratorRuntime.wrap(function _callee11$(_context11) {\n while (1) {\n switch (_context11.prev = _context11.next) {\n case 0:\n _context11.next = 2;\n return _this4.teardownRender(render);\n\n case 2:\n case \"end\":\n return _context11.stop();\n }\n }\n }, _callee11);\n }));\n }\n }, {\n key: \"teardownRender\",\n value: function () {\n var _teardownRender = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12(render) {\n var _ref9,\n viewModeChanged,\n _args12 = arguments;\n\n return regeneratorRuntime.wrap(function _callee12$(_context12) {\n while (1) {\n switch (_context12.prev = _context12.next) {\n case 0:\n _ref9 = _args12.length > 1 && _args12[1] !== undefined ? _args12[1] : {}, viewModeChanged = _ref9.viewModeChanged;\n this.storyRenders = this.storyRenders.filter(function (r) {\n return r !== render;\n });\n _context12.next = 4;\n return render === null || render === void 0 ? void 0 : render.teardown({\n viewModeChanged: viewModeChanged\n });\n\n case 4:\n case \"end\":\n return _context12.stop();\n }\n }\n }, _callee12, this);\n }));\n\n function teardownRender(_x7) {\n return _teardownRender.apply(this, arguments);\n }\n\n return teardownRender;\n }() // API\n\n }, {\n key: \"extract\",\n value: function () {\n var _extract = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13(options) {\n var _global$FEATURES4;\n\n return regeneratorRuntime.wrap(function _callee13$(_context13) {\n while (1) {\n switch (_context13.prev = _context13.next) {\n case 0:\n if (!this.previewEntryError) {\n _context13.next = 2;\n break;\n }\n\n throw this.previewEntryError;\n\n case 2:\n if (this.storyStore.projectAnnotations) {\n _context13.next = 4;\n break;\n }\n\n throw new Error(dedent(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral([\"Failed to initialize Storybook.\\n \\n Do you have an error in your `preview.js`? Check your Storybook's browser console for errors.\"], [\"Failed to initialize Storybook.\\n \\n Do you have an error in your \\\\`preview.js\\\\`? Check your Storybook's browser console for errors.\"]))));\n\n case 4:\n if (!((_global$FEATURES4 = global.FEATURES) !== null && _global$FEATURES4 !== void 0 && _global$FEATURES4.storyStoreV7)) {\n _context13.next = 7;\n break;\n }\n\n _context13.next = 7;\n return this.storyStore.cacheAllCSFFiles();\n\n case 7:\n return _context13.abrupt(\"return\", this.storyStore.extract(options));\n\n case 8:\n case \"end\":\n return _context13.stop();\n }\n }\n }, _callee13, this);\n }));\n\n function extract(_x8) {\n return _extract.apply(this, arguments);\n }\n\n return extract;\n }() // UTILITIES\n\n }, {\n key: \"inlineStoryCallbacks\",\n value: function inlineStoryCallbacks(storyId) {\n return {\n showMain: function showMain() {},\n showError: function showError(err) {\n return logger.error(\"Error rendering docs story (\".concat(storyId, \")\"), err);\n },\n showException: function showException(err) {\n return logger.error(\"Error rendering docs story (\".concat(storyId, \")\"), err);\n }\n };\n }\n }, {\n key: \"renderPreviewEntryError\",\n value: function renderPreviewEntryError(reason, err) {\n this.previewEntryError = err;\n logger.error(reason);\n logger.error(err);\n this.channel.emit(CONFIG_ERROR, err);\n }\n }]);\n\n return Preview;\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\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.reflect.get.js\";\nimport \"core-js/modules/es.object.get-own-property-descriptor.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.object.freeze.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\n\nvar _templateObject, _templateObject2, _templateObject3, _templateObject4;\n\nimport \"regenerator-runtime/runtime.js\";\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.object.assign.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.promise.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.array.concat.js\";\nimport deprecate from 'util-deprecate';\nimport dedent from 'ts-dedent';\nimport global from 'global';\nimport { CURRENT_STORY_WAS_SET, IGNORED_EXCEPTION, PRELOAD_STORIES, PREVIEW_KEYDOWN, SET_CURRENT_STORY, SET_STORIES, STORY_ARGS_UPDATED, STORY_CHANGED, STORY_ERRORED, STORY_MISSING, STORY_PREPARED, STORY_RENDER_PHASE_CHANGED, STORY_SPECIFIED, STORY_THREW_EXCEPTION, STORY_UNCHANGED, UPDATE_QUERY_PARAMS } from '@storybook/core-events';\nimport { logger } from '@storybook/client-logger';\nimport { Preview } from './Preview';\nimport { UrlStore } from './UrlStore';\nimport { WebView } from './WebView';\nimport { PREPARE_ABORTED, StoryRender } from './StoryRender';\nimport { DocsRender } from './DocsRender';\nvar globalWindow = global.window;\n\nfunction focusInInput(event) {\n var target = event.target;\n return /input|textarea/i.test(target.tagName) || target.getAttribute('contenteditable') !== null;\n}\n\nexport var PreviewWeb = /*#__PURE__*/function (_Preview) {\n _inherits(PreviewWeb, _Preview);\n\n var _super = _createSuper(PreviewWeb);\n\n function PreviewWeb() {\n var _this;\n\n var urlStore = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new UrlStore();\n var webview = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new WebView();\n\n _classCallCheck(this, PreviewWeb);\n\n _this = _super.call(this);\n _this.urlStore = void 0;\n _this.view = void 0;\n _this.previewEntryError = void 0;\n _this.currentSelection = void 0;\n _this.currentRender = void 0;\n _this.view = webview;\n _this.urlStore = urlStore; // Add deprecated APIs for back-compat\n // @ts-ignore\n\n _this.storyStore.getSelection = deprecate(function () {\n return _this.urlStore.selection;\n }, dedent(_templateObject || (_templateObject = _taggedTemplateLiteral([\"\\n `__STORYBOOK_STORY_STORE__.getSelection()` is deprecated and will be removed in 7.0.\\n \\n To get the current selection, use the `useStoryContext()` hook from `@storybook/addons`.\\n \"], [\"\\n \\\\`__STORYBOOK_STORY_STORE__.getSelection()\\\\` is deprecated and will be removed in 7.0.\\n \\n To get the current selection, use the \\\\`useStoryContext()\\\\` hook from \\\\`@storybook/addons\\\\`.\\n \"]))));\n return _this;\n }\n\n _createClass(PreviewWeb, [{\n key: \"setupListeners\",\n value: function setupListeners() {\n _get(_getPrototypeOf(PreviewWeb.prototype), \"setupListeners\", this).call(this);\n\n globalWindow.onkeydown = this.onKeydown.bind(this);\n this.channel.on(SET_CURRENT_STORY, this.onSetCurrentStory.bind(this));\n this.channel.on(UPDATE_QUERY_PARAMS, this.onUpdateQueryParams.bind(this));\n this.channel.on(PRELOAD_STORIES, this.onPreloadStories.bind(this));\n }\n }, {\n key: \"initializeWithProjectAnnotations\",\n value: function initializeWithProjectAnnotations(projectAnnotations) {\n var _this2 = this;\n\n return _get(_getPrototypeOf(PreviewWeb.prototype), \"initializeWithProjectAnnotations\", this).call(this, projectAnnotations).then(function () {\n return _this2.setInitialGlobals();\n });\n }\n }, {\n key: \"setInitialGlobals\",\n value: function () {\n var _setInitialGlobals = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var _ref, globals;\n\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _ref = this.urlStore.selectionSpecifier || {}, globals = _ref.globals;\n\n if (globals) {\n this.storyStore.globals.updateFromPersisted(globals);\n }\n\n this.emitGlobals();\n\n case 3:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function setInitialGlobals() {\n return _setInitialGlobals.apply(this, arguments);\n }\n\n return setInitialGlobals;\n }() // If initialization gets as far as the story index, this function runs.\n\n }, {\n key: \"initializeWithStoryIndex\",\n value: function initializeWithStoryIndex(storyIndex) {\n var _this3 = this;\n\n return _get(_getPrototypeOf(PreviewWeb.prototype), \"initializeWithStoryIndex\", this).call(this, storyIndex).then(function () {\n var _global$FEATURES;\n\n if (!((_global$FEATURES = global.FEATURES) !== null && _global$FEATURES !== void 0 && _global$FEATURES.storyStoreV7)) {\n _this3.channel.emit(SET_STORIES, _this3.storyStore.getSetStoriesPayload());\n }\n\n return _this3.selectSpecifiedStory();\n });\n } // Use the selection specifier to choose a story, then render it\n\n }, {\n key: \"selectSpecifiedStory\",\n value: function () {\n var _selectSpecifiedStory = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n var _this$urlStore$select, storySpecifier, viewMode, args, storyId;\n\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n if (this.urlStore.selectionSpecifier) {\n _context2.next = 3;\n break;\n }\n\n this.renderMissingStory();\n return _context2.abrupt(\"return\");\n\n case 3:\n _this$urlStore$select = this.urlStore.selectionSpecifier, storySpecifier = _this$urlStore$select.storySpecifier, viewMode = _this$urlStore$select.viewMode, args = _this$urlStore$select.args;\n storyId = this.storyStore.storyIndex.storyIdFromSpecifier(storySpecifier);\n\n if (storyId) {\n _context2.next = 8;\n break;\n }\n\n if (storySpecifier === '*') {\n this.renderStoryLoadingException(storySpecifier, new Error(dedent(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral([\"\\n Couldn't find any stories in your Storybook.\\n - Please check your stories field of your main.js config.\\n - Also check the browser console and terminal for error messages.\\n \"])))));\n } else {\n this.renderStoryLoadingException(storySpecifier, new Error(dedent(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral([\"\\n Couldn't find story matching '\", \"'.\\n - Are you sure a story with that id exists?\\n - Please check your stories field of your main.js config.\\n - Also check the browser console and terminal for error messages.\\n \"])), storySpecifier)));\n }\n\n return _context2.abrupt(\"return\");\n\n case 8:\n this.urlStore.setSelection({\n storyId: storyId,\n viewMode: viewMode\n });\n this.channel.emit(STORY_SPECIFIED, this.urlStore.selection);\n this.channel.emit(CURRENT_STORY_WAS_SET, this.urlStore.selection);\n _context2.next = 13;\n return this.renderSelection({\n persistedArgs: args\n });\n\n case 13:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function selectSpecifiedStory() {\n return _selectSpecifiedStory.apply(this, arguments);\n }\n\n return selectSpecifiedStory;\n }() // EVENT HANDLERS\n // This happens when a config file gets reloaded\n\n }, {\n key: \"onGetProjectAnnotationsChanged\",\n value: function () {\n var _onGetProjectAnnotationsChanged = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(_ref2) {\n var getProjectAnnotations;\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n getProjectAnnotations = _ref2.getProjectAnnotations;\n _context3.next = 3;\n return _get(_getPrototypeOf(PreviewWeb.prototype), \"onGetProjectAnnotationsChanged\", this).call(this, {\n getProjectAnnotations: getProjectAnnotations\n });\n\n case 3:\n this.renderSelection();\n\n case 4:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n\n function onGetProjectAnnotationsChanged(_x) {\n return _onGetProjectAnnotationsChanged.apply(this, arguments);\n }\n\n return onGetProjectAnnotationsChanged;\n }() // This happens when a glob gets HMR-ed\n\n }, {\n key: \"onStoriesChanged\",\n value: function () {\n var _onStoriesChanged = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(_ref3) {\n var _global$FEATURES2;\n\n var importFn, storyIndex;\n return regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n importFn = _ref3.importFn, storyIndex = _ref3.storyIndex;\n\n _get(_getPrototypeOf(PreviewWeb.prototype), \"onStoriesChanged\", this).call(this, {\n importFn: importFn,\n storyIndex: storyIndex\n });\n\n if ((_global$FEATURES2 = global.FEATURES) !== null && _global$FEATURES2 !== void 0 && _global$FEATURES2.storyStoreV7) {\n _context4.next = 9;\n break;\n }\n\n _context4.t0 = this.channel;\n _context4.t1 = SET_STORIES;\n _context4.next = 7;\n return this.storyStore.getSetStoriesPayload();\n\n case 7:\n _context4.t2 = _context4.sent;\n\n _context4.t0.emit.call(_context4.t0, _context4.t1, _context4.t2);\n\n case 9:\n if (!this.urlStore.selection) {\n _context4.next = 14;\n break;\n }\n\n _context4.next = 12;\n return this.renderSelection();\n\n case 12:\n _context4.next = 16;\n break;\n\n case 14:\n _context4.next = 16;\n return this.selectSpecifiedStory();\n\n case 16:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n\n function onStoriesChanged(_x2) {\n return _onStoriesChanged.apply(this, arguments);\n }\n\n return onStoriesChanged;\n }()\n }, {\n key: \"onKeydown\",\n value: function onKeydown(event) {\n var _this$currentRender;\n\n if (!((_this$currentRender = this.currentRender) !== null && _this$currentRender !== void 0 && _this$currentRender.disableKeyListeners) && !focusInInput(event)) {\n // We have to pick off the keys of the event that we need on the other side\n var altKey = event.altKey,\n ctrlKey = event.ctrlKey,\n metaKey = event.metaKey,\n shiftKey = event.shiftKey,\n key = event.key,\n code = event.code,\n keyCode = event.keyCode;\n this.channel.emit(PREVIEW_KEYDOWN, {\n event: {\n altKey: altKey,\n ctrlKey: ctrlKey,\n metaKey: metaKey,\n shiftKey: shiftKey,\n key: key,\n code: code,\n keyCode: keyCode\n }\n });\n }\n }\n }, {\n key: \"onSetCurrentStory\",\n value: function onSetCurrentStory(selection) {\n this.urlStore.setSelection(Object.assign({\n viewMode: 'story'\n }, selection));\n this.channel.emit(CURRENT_STORY_WAS_SET, this.urlStore.selection);\n this.renderSelection();\n }\n }, {\n key: \"onUpdateQueryParams\",\n value: function onUpdateQueryParams(queryParams) {\n this.urlStore.setQueryParams(queryParams);\n }\n }, {\n key: \"onUpdateGlobals\",\n value: function () {\n var _onUpdateGlobals = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(_ref4) {\n var globals;\n return regeneratorRuntime.wrap(function _callee5$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n globals = _ref4.globals;\n\n _get(_getPrototypeOf(PreviewWeb.prototype), \"onUpdateGlobals\", this).call(this, {\n globals: globals\n });\n\n if (!(this.currentRender instanceof DocsRender)) {\n _context5.next = 5;\n break;\n }\n\n _context5.next = 5;\n return this.currentRender.rerender(true);\n\n case 5:\n case \"end\":\n return _context5.stop();\n }\n }\n }, _callee5, this);\n }));\n\n function onUpdateGlobals(_x3) {\n return _onUpdateGlobals.apply(this, arguments);\n }\n\n return onUpdateGlobals;\n }()\n }, {\n key: \"onUpdateArgs\",\n value: function () {\n var _onUpdateArgs = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(_ref5) {\n var storyId, updatedArgs;\n return regeneratorRuntime.wrap(function _callee6$(_context6) {\n while (1) {\n switch (_context6.prev = _context6.next) {\n case 0:\n storyId = _ref5.storyId, updatedArgs = _ref5.updatedArgs;\n\n _get(_getPrototypeOf(PreviewWeb.prototype), \"onUpdateArgs\", this).call(this, {\n storyId: storyId,\n updatedArgs: updatedArgs\n }); // NOTE: we aren't checking to see the story args are targetted at the \"right\" story.\n // This is because we may render >1 story on the page and there is no easy way to keep track\n // of which ones were rendered by the docs page.\n // However, in `modernInlineRender`, the individual stories track their own events as they\n // each call `renderStoryToElement` below.\n\n\n if (!(this.currentRender instanceof DocsRender)) {\n _context6.next = 5;\n break;\n }\n\n _context6.next = 5;\n return this.currentRender.rerender(false);\n\n case 5:\n case \"end\":\n return _context6.stop();\n }\n }\n }, _callee6, this);\n }));\n\n function onUpdateArgs(_x4) {\n return _onUpdateArgs.apply(this, arguments);\n }\n\n return onUpdateArgs;\n }()\n }, {\n key: \"onPreloadStories\",\n value: function () {\n var _onPreloadStories = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(ids) {\n var _this4 = this;\n\n return regeneratorRuntime.wrap(function _callee7$(_context7) {\n while (1) {\n switch (_context7.prev = _context7.next) {\n case 0:\n _context7.next = 2;\n return Promise.all(ids.map(function (id) {\n return _this4.storyStore.loadStory({\n storyId: id\n });\n }));\n\n case 2:\n case \"end\":\n return _context7.stop();\n }\n }\n }, _callee7);\n }));\n\n function onPreloadStories(_x5) {\n return _onPreloadStories.apply(this, arguments);\n }\n\n return onPreloadStories;\n }() // RENDERING\n // We can either have:\n // - a story selected in \"story\" viewMode,\n // in which case we render it to the root element, OR\n // - a story selected in \"docs\" viewMode,\n // in which case we render the docsPage for that story\n\n }, {\n key: \"renderSelection\",\n value: function () {\n var _renderSelection = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {\n var _this$currentSelectio,\n _this$currentSelectio2,\n _lastRender,\n _this5 = this,\n _global$FEATURES3;\n\n var _ref6,\n persistedArgs,\n selection,\n storyId,\n storyIdChanged,\n viewModeChanged,\n lastSelection,\n lastRender,\n storyRender,\n implementationChanged,\n _storyRender$context,\n parameters,\n initialArgs,\n argTypes,\n args,\n _args8 = arguments;\n\n return regeneratorRuntime.wrap(function _callee8$(_context8) {\n while (1) {\n switch (_context8.prev = _context8.next) {\n case 0:\n _ref6 = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {}, persistedArgs = _ref6.persistedArgs;\n selection = this.urlStore.selection;\n\n if (selection) {\n _context8.next = 4;\n break;\n }\n\n throw new Error('Cannot render story as no selection was made');\n\n case 4:\n storyId = selection.storyId;\n storyIdChanged = ((_this$currentSelectio = this.currentSelection) === null || _this$currentSelectio === void 0 ? void 0 : _this$currentSelectio.storyId) !== storyId;\n viewModeChanged = ((_this$currentSelectio2 = this.currentSelection) === null || _this$currentSelectio2 === void 0 ? void 0 : _this$currentSelectio2.viewMode) !== selection.viewMode; // Show a spinner while we load the next story\n\n if (selection.viewMode === 'story') {\n this.view.showPreparingStory({\n immediate: viewModeChanged\n });\n } else {\n this.view.showPreparingDocs();\n }\n\n lastSelection = this.currentSelection;\n lastRender = this.currentRender; // If the last render is still preparing, let's drop it right now. Either\n // (a) it is a different story, which means we would drop it later, OR\n // (b) it is the *same* story, in which case we will resolve our own .prepare() at the\n // same moment anyway, and we should just \"take over\" the rendering.\n // (We can't tell which it is yet, because it is possible that an HMR is going on and\n // even though the storyId is the same, the story itself is not).\n\n if (!((_lastRender = lastRender) !== null && _lastRender !== void 0 && _lastRender.isPreparing())) {\n _context8.next = 14;\n break;\n }\n\n _context8.next = 13;\n return this.teardownRender(lastRender);\n\n case 13:\n lastRender = null;\n\n case 14:\n storyRender = new StoryRender(this.channel, this.storyStore, function () {\n // At the start of renderToDOM we make the story visible (see note in WebView)\n _this5.view.showStoryDuringRender();\n\n return _this5.renderToDOM.apply(_this5, arguments);\n }, this.mainStoryCallbacks(storyId), storyId, 'story'); // We need to store this right away, so if the story changes during\n // the async `.prepare()` below, we can (potentially) cancel it\n\n this.currentSelection = selection; // Note this may be replaced by a docsRender after preparing\n\n this.currentRender = storyRender;\n _context8.prev = 17;\n _context8.next = 20;\n return storyRender.prepare();\n\n case 20:\n _context8.next = 29;\n break;\n\n case 22:\n _context8.prev = 22;\n _context8.t0 = _context8[\"catch\"](17);\n\n if (!(_context8.t0 !== PREPARE_ABORTED)) {\n _context8.next = 28;\n break;\n }\n\n _context8.next = 27;\n return this.teardownRender(lastRender);\n\n case 27:\n this.renderStoryLoadingException(storyId, _context8.t0);\n\n case 28:\n return _context8.abrupt(\"return\");\n\n case 29:\n implementationChanged = !storyIdChanged && !storyRender.isEqual(lastRender);\n if (persistedArgs) this.storyStore.args.updateFromPersisted(storyRender.story, persistedArgs);\n _storyRender$context = storyRender.context(), parameters = _storyRender$context.parameters, initialArgs = _storyRender$context.initialArgs, argTypes = _storyRender$context.argTypes, args = _storyRender$context.args; // Don't re-render the story if nothing has changed to justify it\n\n if (!(lastRender && !storyIdChanged && !implementationChanged && !viewModeChanged)) {\n _context8.next = 37;\n break;\n }\n\n this.currentRender = lastRender;\n this.channel.emit(STORY_UNCHANGED, storyId);\n this.view.showMain();\n return _context8.abrupt(\"return\");\n\n case 37:\n _context8.next = 39;\n return this.teardownRender(lastRender, {\n viewModeChanged: viewModeChanged\n });\n\n case 39:\n // If we are rendering something new (as opposed to re-rendering the same or first story), emit\n if (lastSelection && (storyIdChanged || viewModeChanged)) {\n this.channel.emit(STORY_CHANGED, storyId);\n }\n\n if ((_global$FEATURES3 = global.FEATURES) !== null && _global$FEATURES3 !== void 0 && _global$FEATURES3.storyStoreV7) {\n this.channel.emit(STORY_PREPARED, {\n id: storyId,\n parameters: parameters,\n initialArgs: initialArgs,\n argTypes: argTypes,\n args: args\n });\n } // For v6 mode / compatibility\n // If the implementation changed, or args were persisted, the args may have changed,\n // and the STORY_PREPARED event above may not be respected.\n\n\n if (implementationChanged || persistedArgs) {\n this.channel.emit(STORY_ARGS_UPDATED, {\n storyId: storyId,\n args: args\n });\n }\n\n if (selection.viewMode === 'docs' || parameters.docsOnly) {\n this.currentRender = DocsRender.fromStoryRender(storyRender);\n this.currentRender.renderToElement(this.view.prepareForDocs(), this.renderStoryToElement.bind(this));\n } else {\n this.storyRenders.push(storyRender);\n this.currentRender.renderToElement(this.view.prepareForStory(storyRender.story));\n }\n\n case 43:\n case \"end\":\n return _context8.stop();\n }\n }\n }, _callee8, this, [[17, 22]]);\n }));\n\n function renderSelection() {\n return _renderSelection.apply(this, arguments);\n }\n\n return renderSelection;\n }() // Used by docs' modernInlineRender to render a story to a given element\n // Note this short-circuits the `prepare()` phase of the StoryRender,\n // main to be consistent with the previous behaviour. In the future,\n // we will change it to go ahead and load the story, which will end up being\n // \"instant\", although async.\n\n }, {\n key: \"renderStoryToElement\",\n value: function renderStoryToElement(story, element) {\n var _this6 = this;\n\n var render = new StoryRender(this.channel, this.storyStore, this.renderToDOM, this.inlineStoryCallbacks(story.id), story.id, 'docs', story);\n render.renderToElement(element);\n this.storyRenders.push(render);\n return /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {\n return regeneratorRuntime.wrap(function _callee9$(_context9) {\n while (1) {\n switch (_context9.prev = _context9.next) {\n case 0:\n _context9.next = 2;\n return _this6.teardownRender(render);\n\n case 2:\n case \"end\":\n return _context9.stop();\n }\n }\n }, _callee9);\n }));\n }\n }, {\n key: \"teardownRender\",\n value: function () {\n var _teardownRender = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10(render) {\n var _ref8,\n viewModeChanged,\n _args10 = arguments;\n\n return regeneratorRuntime.wrap(function _callee10$(_context10) {\n while (1) {\n switch (_context10.prev = _context10.next) {\n case 0:\n _ref8 = _args10.length > 1 && _args10[1] !== undefined ? _args10[1] : {}, viewModeChanged = _ref8.viewModeChanged;\n this.storyRenders = this.storyRenders.filter(function (r) {\n return r !== render;\n });\n _context10.next = 4;\n return render === null || render === void 0 ? void 0 : render.teardown({\n viewModeChanged: viewModeChanged\n });\n\n case 4:\n case \"end\":\n return _context10.stop();\n }\n }\n }, _callee10, this);\n }));\n\n function teardownRender(_x6) {\n return _teardownRender.apply(this, arguments);\n }\n\n return teardownRender;\n }() // API\n\n }, {\n key: \"extract\",\n value: function () {\n var _extract = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11(options) {\n var _global$FEATURES4;\n\n return regeneratorRuntime.wrap(function _callee11$(_context11) {\n while (1) {\n switch (_context11.prev = _context11.next) {\n case 0:\n if (!this.previewEntryError) {\n _context11.next = 2;\n break;\n }\n\n throw this.previewEntryError;\n\n case 2:\n if (this.storyStore.projectAnnotations) {\n _context11.next = 4;\n break;\n }\n\n throw new Error(dedent(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral([\"Failed to initialize Storybook.\\n \\n Do you have an error in your `preview.js`? Check your Storybook's browser console for errors.\"], [\"Failed to initialize Storybook.\\n \\n Do you have an error in your \\\\`preview.js\\\\`? Check your Storybook's browser console for errors.\"]))));\n\n case 4:\n if (!((_global$FEATURES4 = global.FEATURES) !== null && _global$FEATURES4 !== void 0 && _global$FEATURES4.storyStoreV7)) {\n _context11.next = 7;\n break;\n }\n\n _context11.next = 7;\n return this.storyStore.cacheAllCSFFiles();\n\n case 7:\n return _context11.abrupt(\"return\", this.storyStore.extract(options));\n\n case 8:\n case \"end\":\n return _context11.stop();\n }\n }\n }, _callee11, this);\n }));\n\n function extract(_x7) {\n return _extract.apply(this, arguments);\n }\n\n return extract;\n }() // UTILITIES\n\n }, {\n key: \"mainStoryCallbacks\",\n value: function mainStoryCallbacks(storyId) {\n var _this7 = this;\n\n return {\n showMain: function showMain() {\n return _this7.view.showMain();\n },\n showError: function showError(err) {\n return _this7.renderError(storyId, err);\n },\n showException: function showException(err) {\n return _this7.renderException(storyId, err);\n }\n };\n }\n }, {\n key: \"inlineStoryCallbacks\",\n value: function inlineStoryCallbacks(storyId) {\n return {\n showMain: function showMain() {},\n showError: function showError(err) {\n return logger.error(\"Error rendering docs story (\".concat(storyId, \")\"), err);\n },\n showException: function showException(err) {\n return logger.error(\"Error rendering docs story (\".concat(storyId, \")\"), err);\n }\n };\n }\n }, {\n key: \"renderPreviewEntryError\",\n value: function renderPreviewEntryError(reason, err) {\n _get(_getPrototypeOf(PreviewWeb.prototype), \"renderPreviewEntryError\", this).call(this, reason, err);\n\n this.view.showErrorDisplay(err);\n }\n }, {\n key: \"renderMissingStory\",\n value: function renderMissingStory() {\n this.view.showNoPreview();\n this.channel.emit(STORY_MISSING);\n }\n }, {\n key: \"renderStoryLoadingException\",\n value: function renderStoryLoadingException(storySpecifier, err) {\n logger.error(\"Unable to load story '\".concat(storySpecifier, \"':\"));\n logger.error(err);\n this.view.showErrorDisplay(err);\n this.channel.emit(STORY_MISSING, storySpecifier);\n } // renderException is used if we fail to render the story and it is uncaught by the app layer\n\n }, {\n key: \"renderException\",\n value: function renderException(storyId, err) {\n this.channel.emit(STORY_THREW_EXCEPTION, err);\n this.channel.emit(STORY_RENDER_PHASE_CHANGED, {\n newPhase: 'errored',\n storyId: storyId\n }); // Ignored exceptions exist for control flow purposes, and are typically handled elsewhere.\n\n if (err !== IGNORED_EXCEPTION) {\n this.view.showErrorDisplay(err);\n logger.error(\"Error rendering story '\".concat(storyId, \"':\"));\n logger.error(err);\n }\n } // renderError is used by the various app layers to inform the user they have done something\n // wrong -- for instance returned the wrong thing from a story\n\n }, {\n key: \"renderError\",\n value: function renderError(storyId, _ref9) {\n var title = _ref9.title,\n description = _ref9.description;\n logger.error(\"Error rendering story \".concat(title, \": \").concat(description));\n this.channel.emit(STORY_ERRORED, {\n title: title,\n description: description\n });\n this.channel.emit(STORY_RENDER_PHASE_CHANGED, {\n newPhase: 'errored',\n storyId: storyId\n });\n this.view.showErrorDisplay({\n message: title,\n stack: description\n });\n }\n }]);\n\n return PreviewWeb;\n}(Preview);","import \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.object.assign.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.promise.js\";\nimport \"regenerator-runtime/runtime.js\";\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport global from 'global';\nimport { STORY_RENDER_PHASE_CHANGED, STORY_RENDERED } from '@storybook/core-events';\nvar AbortController = global.AbortController;\n\nfunction createController() {\n if (AbortController) return new AbortController(); // Polyfill for IE11\n\n return {\n signal: {\n aborted: false\n },\n abort: function abort() {\n this.signal.aborted = true;\n }\n };\n}\n\nexport var PREPARE_ABORTED = new Error('prepareAborted');\nexport var StoryRender = /*#__PURE__*/function () {\n function StoryRender(channel, store, renderToScreen, callbacks, id, viewMode, story) {\n _classCallCheck(this, StoryRender);\n\n this.channel = channel;\n this.store = store;\n this.renderToScreen = renderToScreen;\n this.callbacks = callbacks;\n this.id = id;\n this.viewMode = viewMode;\n this.story = void 0;\n this.phase = void 0;\n this.abortController = void 0;\n this.canvasElement = void 0;\n this.notYetRendered = true;\n this.disableKeyListeners = false;\n this.abortController = createController(); // Allow short-circuiting preparing if we happen to already\n // have the story (this is used by docs mode)\n\n if (story) {\n this.story = story; // TODO -- what should the phase be now?\n // TODO -- should we emit the render phase changed event?\n\n this.phase = 'preparing';\n }\n }\n\n _createClass(StoryRender, [{\n key: \"runPhase\",\n value: function () {\n var _runPhase = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(signal, phase, phaseFn) {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n this.phase = phase;\n this.channel.emit(STORY_RENDER_PHASE_CHANGED, {\n newPhase: this.phase,\n storyId: this.id\n });\n\n if (!phaseFn) {\n _context.next = 5;\n break;\n }\n\n _context.next = 5;\n return phaseFn();\n\n case 5:\n if (signal.aborted) {\n this.phase = 'aborted';\n this.channel.emit(STORY_RENDER_PHASE_CHANGED, {\n newPhase: this.phase,\n storyId: this.id\n });\n }\n\n case 6:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function runPhase(_x, _x2, _x3) {\n return _runPhase.apply(this, arguments);\n }\n\n return runPhase;\n }()\n }, {\n key: \"prepare\",\n value: function () {\n var _prepare = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {\n var _this = this;\n\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _context3.next = 2;\n return this.runPhase(this.abortController.signal, 'preparing', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return _this.store.loadStory({\n storyId: _this.id\n });\n\n case 2:\n _this.story = _context2.sent;\n\n case 3:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n })));\n\n case 2:\n if (!this.abortController.signal.aborted) {\n _context3.next = 5;\n break;\n }\n\n this.store.cleanupStory(this.story);\n throw PREPARE_ABORTED;\n\n case 5:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n\n function prepare() {\n return _prepare.apply(this, arguments);\n }\n\n return prepare;\n }() // The two story \"renders\" are equal and have both loaded the same story\n\n }, {\n key: \"isEqual\",\n value: function isEqual(other) {\n return other && this.id === other.id && this.story && this.story === other.story;\n }\n }, {\n key: \"isPreparing\",\n value: function isPreparing() {\n return ['preparing'].includes(this.phase);\n }\n }, {\n key: \"isPending\",\n value: function isPending() {\n return ['rendering', 'playing'].includes(this.phase);\n }\n }, {\n key: \"context\",\n value: function context() {\n return this.store.getStoryContext(this.story);\n }\n }, {\n key: \"renderToElement\",\n value: function () {\n var _renderToElement = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(canvasElement) {\n return regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n this.canvasElement = canvasElement; // FIXME: this comment\n // Start the first (initial) render. We don't await here because we need to return the \"cleanup\"\n // function below right away, so if the user changes story during the first render we can cancel\n // it without having to first wait for it to finish.\n // Whenever the selection changes we want to force the component to be remounted.\n\n return _context4.abrupt(\"return\", this.render({\n initial: true,\n forceRemount: true\n }));\n\n case 2:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n\n function renderToElement(_x4) {\n return _renderToElement.apply(this, arguments);\n }\n\n return renderToElement;\n }()\n }, {\n key: \"render\",\n value: function () {\n var _render = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {\n var _this2 = this;\n\n var _ref2,\n _ref2$initial,\n initial,\n _ref2$forceRemount,\n forceRemount,\n _this$story,\n id,\n componentId,\n title,\n name,\n applyLoaders,\n unboundStoryFn,\n playFunction,\n abortSignal,\n loadedContext,\n renderStoryContext,\n _renderContext,\n _args9 = arguments;\n\n return regeneratorRuntime.wrap(function _callee9$(_context9) {\n while (1) {\n switch (_context9.prev = _context9.next) {\n case 0:\n _ref2 = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {}, _ref2$initial = _ref2.initial, initial = _ref2$initial === void 0 ? false : _ref2$initial, _ref2$forceRemount = _ref2.forceRemount, forceRemount = _ref2$forceRemount === void 0 ? false : _ref2$forceRemount;\n\n if (this.story) {\n _context9.next = 3;\n break;\n }\n\n throw new Error('cannot render when not prepared');\n\n case 3:\n _this$story = this.story, id = _this$story.id, componentId = _this$story.componentId, title = _this$story.title, name = _this$story.name, applyLoaders = _this$story.applyLoaders, unboundStoryFn = _this$story.unboundStoryFn, playFunction = _this$story.playFunction;\n\n if (forceRemount && !initial) {\n // NOTE: we don't check the cancel actually worked here, so the previous\n // render could conceivably still be running after this call.\n // We might want to change that in the future.\n this.cancelRender();\n this.abortController = createController();\n } // We need a stable reference to the signal -- if a re-mount happens the\n // abort controller may be torn down (above) before we actually check the signal.\n\n\n abortSignal = this.abortController.signal;\n _context9.prev = 6;\n _context9.next = 9;\n return this.runPhase(abortSignal, 'loading', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {\n return regeneratorRuntime.wrap(function _callee5$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n _context5.next = 2;\n return applyLoaders(Object.assign({}, _this2.context(), {\n viewMode: _this2.viewMode\n }));\n\n case 2:\n loadedContext = _context5.sent;\n\n case 3:\n case \"end\":\n return _context5.stop();\n }\n }\n }, _callee5);\n })));\n\n case 9:\n if (!abortSignal.aborted) {\n _context9.next = 11;\n break;\n }\n\n return _context9.abrupt(\"return\");\n\n case 11:\n renderStoryContext = Object.assign({}, loadedContext, this.context(), {\n abortSignal: abortSignal,\n canvasElement: this.canvasElement\n });\n _renderContext = Object.assign({\n componentId: componentId,\n title: title,\n kind: title,\n id: id,\n name: name,\n story: name\n }, this.callbacks, {\n forceRemount: forceRemount || this.notYetRendered,\n storyContext: renderStoryContext,\n storyFn: function storyFn() {\n return unboundStoryFn(renderStoryContext);\n },\n unboundStoryFn: unboundStoryFn\n });\n _context9.next = 15;\n return this.runPhase(abortSignal, 'rendering', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {\n return regeneratorRuntime.wrap(function _callee6$(_context6) {\n while (1) {\n switch (_context6.prev = _context6.next) {\n case 0:\n return _context6.abrupt(\"return\", _this2.renderToScreen(_renderContext, _this2.canvasElement));\n\n case 1:\n case \"end\":\n return _context6.stop();\n }\n }\n }, _callee6);\n })));\n\n case 15:\n this.notYetRendered = false;\n\n if (!abortSignal.aborted) {\n _context9.next = 18;\n break;\n }\n\n return _context9.abrupt(\"return\");\n\n case 18:\n if (!(forceRemount && playFunction)) {\n _context9.next = 27;\n break;\n }\n\n this.disableKeyListeners = true;\n _context9.next = 22;\n return this.runPhase(abortSignal, 'playing', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {\n return regeneratorRuntime.wrap(function _callee7$(_context7) {\n while (1) {\n switch (_context7.prev = _context7.next) {\n case 0:\n return _context7.abrupt(\"return\", playFunction(_renderContext.storyContext));\n\n case 1:\n case \"end\":\n return _context7.stop();\n }\n }\n }, _callee7);\n })));\n\n case 22:\n _context9.next = 24;\n return this.runPhase(abortSignal, 'played');\n\n case 24:\n this.disableKeyListeners = false;\n\n if (!abortSignal.aborted) {\n _context9.next = 27;\n break;\n }\n\n return _context9.abrupt(\"return\");\n\n case 27:\n _context9.next = 29;\n return this.runPhase(abortSignal, 'completed', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {\n return regeneratorRuntime.wrap(function _callee8$(_context8) {\n while (1) {\n switch (_context8.prev = _context8.next) {\n case 0:\n return _context8.abrupt(\"return\", _this2.channel.emit(STORY_RENDERED, id));\n\n case 1:\n case \"end\":\n return _context8.stop();\n }\n }\n }, _callee8);\n })));\n\n case 29:\n _context9.next = 34;\n break;\n\n case 31:\n _context9.prev = 31;\n _context9.t0 = _context9[\"catch\"](6);\n this.callbacks.showException(_context9.t0);\n\n case 34:\n case \"end\":\n return _context9.stop();\n }\n }\n }, _callee9, this, [[6, 31]]);\n }));\n\n function render() {\n return _render.apply(this, arguments);\n }\n\n return render;\n }()\n }, {\n key: \"rerender\",\n value: function () {\n var _rerender = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {\n return regeneratorRuntime.wrap(function _callee10$(_context10) {\n while (1) {\n switch (_context10.prev = _context10.next) {\n case 0:\n return _context10.abrupt(\"return\", this.render());\n\n case 1:\n case \"end\":\n return _context10.stop();\n }\n }\n }, _callee10, this);\n }));\n\n function rerender() {\n return _rerender.apply(this, arguments);\n }\n\n return rerender;\n }()\n }, {\n key: \"remount\",\n value: function () {\n var _remount = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {\n return regeneratorRuntime.wrap(function _callee11$(_context11) {\n while (1) {\n switch (_context11.prev = _context11.next) {\n case 0:\n return _context11.abrupt(\"return\", this.render({\n forceRemount: true\n }));\n\n case 1:\n case \"end\":\n return _context11.stop();\n }\n }\n }, _callee11, this);\n }));\n\n function remount() {\n return _remount.apply(this, arguments);\n }\n\n return remount;\n }() // If the story is torn down (either a new story is rendered or the docs page removes it)\n // we need to consider the fact that the initial render may not be finished\n // (possibly the loaders or the play function are still running). We use the controller\n // as a method to abort them, ASAP, but this is not foolproof as we cannot control what\n // happens inside the user's code.\n\n }, {\n key: \"cancelRender\",\n value: function cancelRender() {\n this.abortController.abort();\n }\n }, {\n key: \"teardown\",\n value: function () {\n var _teardown = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {\n var options,\n i,\n _args12 = arguments;\n return regeneratorRuntime.wrap(function _callee12$(_context12) {\n while (1) {\n switch (_context12.prev = _context12.next) {\n case 0:\n options = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};\n this.cancelRender(); // If the story has loaded, we need to cleanup\n\n if (this.story) this.store.cleanupStory(this.story); // Check if we're done rendering/playing. If not, we may have to reload the page.\n // Wait several ticks that may be needed to handle the abort, then try again.\n // Note that there's a max of 5 nested timeouts before they're no longer \"instant\".\n\n i = 0;\n\n case 4:\n if (!(i < 3)) {\n _context12.next = 12;\n break;\n }\n\n if (this.isPending()) {\n _context12.next = 7;\n break;\n }\n\n return _context12.abrupt(\"return\");\n\n case 7:\n _context12.next = 9;\n return new Promise(function (resolve) {\n return setTimeout(resolve, 0);\n });\n\n case 9:\n i += 1;\n _context12.next = 4;\n break;\n\n case 12:\n // If we still haven't completed, reload the page (iframe) to ensure we have a clean slate\n // for the next render. Since the reload can take a brief moment to happen, we want to stop\n // further rendering by awaiting a never-resolving promise (which is destroyed on reload).\n global.window.location.reload();\n _context12.next = 15;\n return new Promise(function () {});\n\n case 15:\n case \"end\":\n return _context12.stop();\n }\n }\n }, _callee12, this);\n }));\n\n function teardown() {\n return _teardown.apply(this, arguments);\n }\n\n return teardown;\n }()\n }]);\n\n return StoryRender;\n}();\nStoryRender.displayName = \"StoryRender\";","import \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nvar _excluded = [\"path\", \"selectedKind\", \"selectedStory\"];\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _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\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.match.js\";\nimport \"core-js/modules/es.string.search.js\";\nimport \"core-js/modules/es.object.assign.js\";\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.object.values.js\";\nimport global from 'global';\nimport qs from 'qs';\nimport deprecate from 'util-deprecate';\nimport { parseArgsParam } from './parseArgsParam';\nvar history = global.history,\n document = global.document;\nexport function pathToId(path) {\n var match = (path || '').match(/^\\/story\\/(.+)/);\n\n if (!match) {\n throw new Error(\"Invalid path '\".concat(path, \"', must start with '/story/'\"));\n }\n\n return match[1];\n}\n\nvar getQueryString = function getQueryString(_ref) {\n var selection = _ref.selection,\n extraParams = _ref.extraParams;\n var _document$location$se = document.location.search,\n search = _document$location$se === void 0 ? '' : _document$location$se;\n\n var _qs$parse = qs.parse(search, {\n ignoreQueryPrefix: true\n }),\n path = _qs$parse.path,\n selectedKind = _qs$parse.selectedKind,\n selectedStory = _qs$parse.selectedStory,\n rest = _objectWithoutProperties(_qs$parse, _excluded);\n\n return qs.stringify(Object.assign({}, rest, extraParams, selection && {\n id: selection.storyId,\n viewMode: selection.viewMode\n }), {\n encode: false,\n addQueryPrefix: true\n });\n};\n\nexport var setPath = function setPath(selection) {\n if (!selection) return;\n var query = getQueryString({\n selection: selection\n });\n var _document$location$ha = document.location.hash,\n hash = _document$location$ha === void 0 ? '' : _document$location$ha;\n document.title = selection.storyId;\n history.replaceState({}, '', \"\".concat(document.location.pathname).concat(query).concat(hash));\n};\n\nvar isObject = function isObject(val) {\n return val != null && _typeof(val) === 'object' && Array.isArray(val) === false;\n};\n\nvar getFirstString = function getFirstString(v) {\n if (typeof v === 'string') {\n return v;\n }\n\n if (Array.isArray(v)) {\n return getFirstString(v[0]);\n }\n\n if (isObject(v)) {\n // @ts-ignore\n return getFirstString(Object.values(v));\n }\n\n return undefined;\n};\n\nvar deprecatedLegacyQuery = deprecate(function () {\n return 0;\n}, \"URL formats with `selectedKind` and `selectedName` query parameters are deprecated.\\nUse `id=$storyId` instead.\\nSee https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#new-url-structure\");\nexport var getSelectionSpecifierFromPath = function getSelectionSpecifierFromPath() {\n var query = qs.parse(document.location.search, {\n ignoreQueryPrefix: true\n });\n var args = typeof query.args === 'string' ? parseArgsParam(query.args) : undefined;\n var globals = typeof query.globals === 'string' ? parseArgsParam(query.globals) : undefined;\n var viewMode = getFirstString(query.viewMode);\n\n if (typeof viewMode !== 'string' || !viewMode.match(/docs|story/)) {\n viewMode = 'story';\n }\n\n var path = getFirstString(query.path);\n var storyId = path ? pathToId(path) : getFirstString(query.id);\n\n if (storyId) {\n return {\n storySpecifier: storyId,\n args: args,\n globals: globals,\n viewMode: viewMode\n };\n } // Legacy URL format\n\n\n var title = getFirstString(query.selectedKind);\n var name = getFirstString(query.selectedStory);\n\n if (title && name) {\n deprecatedLegacyQuery();\n return {\n storySpecifier: {\n title: title,\n name: name\n },\n args: args,\n globals: globals,\n viewMode: viewMode\n };\n }\n\n return null;\n};\nexport var UrlStore = /*#__PURE__*/function () {\n function UrlStore() {\n _classCallCheck(this, UrlStore);\n\n this.selectionSpecifier = void 0;\n this.selection = void 0;\n this.selectionSpecifier = getSelectionSpecifierFromPath();\n }\n\n _createClass(UrlStore, [{\n key: \"setSelection\",\n value: function setSelection(selection) {\n this.selection = selection;\n setPath(this.selection);\n }\n }, {\n key: \"setQueryParams\",\n value: function setQueryParams(queryParams) {\n var query = getQueryString({\n extraParams: queryParams\n });\n var _document$location$ha2 = document.location.hash,\n hash = _document$location$ha2 === void 0 ? '' : _document$location$ha2;\n history.replaceState({}, '', \"\".concat(document.location.pathname).concat(query).concat(hash));\n }\n }]);\n\n return UrlStore;\n}();","import \"core-js/modules/es.object.freeze.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.array.from.js\";\n\nvar _templateObject;\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\n\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.search.js\";\nimport \"core-js/modules/es.array.join.js\";\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.string.split.js\";\nimport \"core-js/modules/es.array.slice.js\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport global from 'global';\nimport { logger } from '@storybook/client-logger';\nimport AnsiToHtml from 'ansi-to-html';\nimport dedent from 'ts-dedent';\nimport qs from 'qs';\nvar document = global.document;\nvar PREPARING_DELAY = 100;\nvar layoutClassMap = {\n centered: 'sb-main-centered',\n fullscreen: 'sb-main-fullscreen',\n padded: 'sb-main-padded'\n};\nvar Mode;\n\n(function (Mode) {\n Mode[\"MAIN\"] = \"MAIN\";\n Mode[\"NOPREVIEW\"] = \"NOPREVIEW\";\n Mode[\"PREPARING_STORY\"] = \"PREPARING_STORY\";\n Mode[\"PREPARING_DOCS\"] = \"PREPARING_DOCS\";\n Mode[\"ERROR\"] = \"ERROR\";\n})(Mode || (Mode = {}));\n\nvar classes = {\n PREPARING_STORY: 'sb-show-preparing-story',\n PREPARING_DOCS: 'sb-show-preparing-docs',\n MAIN: 'sb-show-main',\n NOPREVIEW: 'sb-show-nopreview',\n ERROR: 'sb-show-errordisplay'\n};\nvar ansiConverter = new AnsiToHtml({\n escapeXML: true\n});\nexport var WebView = /*#__PURE__*/function () {\n function WebView() {\n _classCallCheck(this, WebView);\n\n this.currentLayoutClass = void 0;\n this.testing = false;\n this.preparingTimeout = null;\n\n // Special code for testing situations\n var _qs$parse = qs.parse(document.location.search, {\n ignoreQueryPrefix: true\n }),\n __SPECIAL_TEST_PARAMETER__ = _qs$parse.__SPECIAL_TEST_PARAMETER__;\n\n switch (__SPECIAL_TEST_PARAMETER__) {\n case 'preparing-story':\n {\n this.showPreparingStory();\n this.testing = true;\n break;\n }\n\n case 'preparing-docs':\n {\n this.showPreparingDocs();\n this.testing = true;\n break;\n }\n\n default: // pass;\n\n }\n } // Get ready to render a story, returning the element to render to\n\n\n _createClass(WebView, [{\n key: \"prepareForStory\",\n value: function prepareForStory(story) {\n this.showStory();\n this.applyLayout(story.parameters.layout);\n document.documentElement.scrollTop = 0;\n document.documentElement.scrollLeft = 0;\n return this.storyRoot();\n }\n }, {\n key: \"storyRoot\",\n value: function storyRoot() {\n return document.getElementById('root');\n }\n }, {\n key: \"prepareForDocs\",\n value: function prepareForDocs() {\n this.showMain();\n this.showDocs();\n this.applyLayout('fullscreen');\n return this.docsRoot();\n }\n }, {\n key: \"docsRoot\",\n value: function docsRoot() {\n return document.getElementById('docs-root');\n }\n }, {\n key: \"applyLayout\",\n value: function applyLayout() {\n var layout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'padded';\n\n if (layout === 'none') {\n document.body.classList.remove(this.currentLayoutClass);\n this.currentLayoutClass = null;\n return;\n }\n\n this.checkIfLayoutExists(layout);\n var layoutClass = layoutClassMap[layout];\n document.body.classList.remove(this.currentLayoutClass);\n document.body.classList.add(layoutClass);\n this.currentLayoutClass = layoutClass;\n }\n }, {\n key: \"checkIfLayoutExists\",\n value: function checkIfLayoutExists(layout) {\n if (!layoutClassMap[layout]) {\n logger.warn(dedent(_templateObject || (_templateObject = _taggedTemplateLiteral([\"The desired layout: \", \" is not a valid option.\\n The possible options are: \", \", none.\"])), layout, Object.keys(layoutClassMap).join(', ')));\n }\n }\n }, {\n key: \"showMode\",\n value: function showMode(mode) {\n clearTimeout(this.preparingTimeout);\n Object.keys(Mode).forEach(function (otherMode) {\n if (otherMode === mode) {\n document.body.classList.add(classes[otherMode]);\n } else {\n document.body.classList.remove(classes[otherMode]);\n }\n });\n }\n }, {\n key: \"showErrorDisplay\",\n value: function showErrorDisplay(_ref) {\n var _ref$message = _ref.message,\n message = _ref$message === void 0 ? '' : _ref$message,\n _ref$stack = _ref.stack,\n stack = _ref$stack === void 0 ? '' : _ref$stack;\n var header = message;\n var detail = stack;\n var parts = message.split('\\n');\n\n if (parts.length > 1) {\n var _parts = _slicedToArray(parts, 1);\n\n header = _parts[0];\n detail = parts.slice(1).join('\\n');\n }\n\n document.getElementById('error-message').innerHTML = ansiConverter.toHtml(header);\n document.getElementById('error-stack').innerHTML = ansiConverter.toHtml(detail);\n this.showMode(Mode.ERROR);\n }\n }, {\n key: \"showNoPreview\",\n value: function showNoPreview() {\n var _this$storyRoot, _this$docsRoot;\n\n if (this.testing) return;\n this.showMode(Mode.NOPREVIEW); // In storyshots this can get called and these two can be null\n\n (_this$storyRoot = this.storyRoot()) === null || _this$storyRoot === void 0 ? void 0 : _this$storyRoot.setAttribute('hidden', 'true');\n (_this$docsRoot = this.docsRoot()) === null || _this$docsRoot === void 0 ? void 0 : _this$docsRoot.setAttribute('hidden', 'true');\n }\n }, {\n key: \"showPreparingStory\",\n value: function showPreparingStory() {\n var _this = this;\n\n var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref2$immediate = _ref2.immediate,\n immediate = _ref2$immediate === void 0 ? false : _ref2$immediate;\n\n clearTimeout(this.preparingTimeout);\n\n if (immediate) {\n this.showMode(Mode.PREPARING_STORY);\n } else {\n this.preparingTimeout = setTimeout(function () {\n return _this.showMode(Mode.PREPARING_STORY);\n }, PREPARING_DELAY);\n }\n }\n }, {\n key: \"showPreparingDocs\",\n value: function showPreparingDocs() {\n var _this2 = this;\n\n clearTimeout(this.preparingTimeout);\n this.preparingTimeout = setTimeout(function () {\n return _this2.showMode(Mode.PREPARING_DOCS);\n }, PREPARING_DELAY);\n }\n }, {\n key: \"showMain\",\n value: function showMain() {\n this.showMode(Mode.MAIN);\n }\n }, {\n key: \"showDocs\",\n value: function showDocs() {\n this.storyRoot().setAttribute('hidden', 'true');\n this.docsRoot().removeAttribute('hidden');\n }\n }, {\n key: \"showStory\",\n value: function showStory() {\n this.docsRoot().setAttribute('hidden', 'true');\n this.storyRoot().removeAttribute('hidden');\n }\n }, {\n key: \"showStoryDuringRender\",\n value: function showStoryDuringRender() {\n // When 'showStory' is called (at the start of rendering) we get rid of our display:none\n // from all children of the root (but keep the preparing spinner visible). This may mean\n // that very weird and high z-index stories are briefly visible.\n // See https://github.com/storybookjs/storybook/issues/16847 and\n // http://localhost:9011/?path=/story/core-rendering--auto-focus (official SB)\n document.body.classList.add(classes.MAIN);\n }\n }]);\n\n return WebView;\n}();","// FIXME: breaks builder-vite, remove this in 7.0\nexport { composeConfigs } from '@storybook/store';\nexport { Preview } from './Preview';\nexport { PreviewWeb } from './PreviewWeb';\nexport { simulatePageLoad, simulateDOMContentLoaded } from './simulate-pageload';\nexport * from './types';","import \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.object.freeze.js\";\n\nvar _templateObject;\n\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.object.entries.js\";\nimport \"core-js/modules/es.regexp.to-string.js\";\nimport \"core-js/modules/es.string.starts-with.js\";\nimport \"core-js/modules/es.string.ends-with.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.string.match.js\";\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.string.split.js\";\nimport \"core-js/modules/es.string.replace.js\";\nimport \"core-js/modules/es.array.join.js\";\nimport \"core-js/modules/es.object.assign.js\";\nimport qs from 'qs';\nimport dedent from 'ts-dedent';\nimport { once } from '@storybook/client-logger';\nimport isPlainObject from 'lodash/isPlainObject'; // Keep this in sync with validateArgs in router/src/utils.ts\n\nvar VALIDATION_REGEXP = /^[a-zA-Z0-9 _-]*$/;\nvar NUMBER_REGEXP = /^-?[0-9]+(\\.[0-9]+)?$/;\nvar HEX_REGEXP = /^#([a-f0-9]{3,4}|[a-f0-9]{6}|[a-f0-9]{8})$/i;\nvar COLOR_REGEXP = /^(rgba?|hsla?)\\(([0-9]{1,3}),\\s?([0-9]{1,3})%?,\\s?([0-9]{1,3})%?,?\\s?([0-9](\\.[0-9]{1,2})?)?\\)$/i;\n\nvar validateArgs = function validateArgs() {\n var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var value = arguments.length > 1 ? arguments[1] : undefined;\n if (key === null) return false;\n if (key === '' || !VALIDATION_REGEXP.test(key)) return false;\n if (value === null || value === undefined) return true; // encoded as `!null` or `!undefined`\n\n if (value instanceof Date) return true; // encoded as modified ISO string\n\n if (typeof value === 'number' || typeof value === 'boolean') return true;\n\n if (typeof value === 'string') {\n return VALIDATION_REGEXP.test(value) || NUMBER_REGEXP.test(value) || HEX_REGEXP.test(value) || COLOR_REGEXP.test(value);\n }\n\n if (Array.isArray(value)) return value.every(function (v) {\n return validateArgs(key, v);\n });\n if (isPlainObject(value)) return Object.entries(value).every(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n k = _ref2[0],\n v = _ref2[1];\n\n return validateArgs(k, v);\n });\n return false;\n};\n\nvar QS_OPTIONS = {\n delimiter: ';',\n // we're parsing a single query param\n allowDots: true,\n // objects are encoded using dot notation\n allowSparse: true,\n // arrays will be merged on top of their initial value\n decoder: function (_decoder) {\n function decoder(_x, _x2, _x3, _x4) {\n return _decoder.apply(this, arguments);\n }\n\n decoder.toString = function () {\n return _decoder.toString();\n };\n\n return decoder;\n }(function (str, defaultDecoder, charset, type) {\n if (type === 'value' && str.startsWith('!')) {\n if (str === '!undefined') return undefined;\n if (str === '!null') return null;\n if (str.startsWith('!date(') && str.endsWith(')')) return new Date(str.slice(6, -1));\n if (str.startsWith('!hex(') && str.endsWith(')')) return \"#\".concat(str.slice(5, -1));\n var color = str.slice(1).match(COLOR_REGEXP);\n\n if (color) {\n if (str.startsWith('!rgba')) return \"\".concat(color[1], \"(\").concat(color[2], \", \").concat(color[3], \", \").concat(color[4], \", \").concat(color[5], \")\");\n if (str.startsWith('!hsla')) return \"\".concat(color[1], \"(\").concat(color[2], \", \").concat(color[3], \"%, \").concat(color[4], \"%, \").concat(color[5], \")\");\n return str.startsWith('!rgb') ? \"\".concat(color[1], \"(\").concat(color[2], \", \").concat(color[3], \", \").concat(color[4], \")\") : \"\".concat(color[1], \"(\").concat(color[2], \", \").concat(color[3], \"%, \").concat(color[4], \"%)\");\n }\n }\n\n if (type === 'value' && NUMBER_REGEXP.test(str)) return Number(str);\n return defaultDecoder(str, defaultDecoder, charset);\n })\n};\nexport var parseArgsParam = function parseArgsParam(argsString) {\n var parts = argsString.split(';').map(function (part) {\n return part.replace('=', '~').replace(':', '=');\n });\n return Object.entries(qs.parse(parts.join(';'), QS_OPTIONS)).reduce(function (acc, _ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n key = _ref4[0],\n value = _ref4[1];\n\n if (validateArgs(key, value)) return Object.assign(acc, _defineProperty({}, key, value));\n once.warn(dedent(_templateObject || (_templateObject = _taggedTemplateLiteral([\"\\n Omitted potentially unsafe URL args.\\n\\n More info: https://storybook.js.org/docs/react/writing-stories/args#setting-args-through-the-url\\n \"]))));\n return acc;\n }, {});\n};","import \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport global from 'global';\nvar document = global.document; // https://html.spec.whatwg.org/multipage/scripting.html\n\nvar runScriptTypes = ['application/javascript', 'application/ecmascript', 'application/x-ecmascript', 'application/x-javascript', 'text/ecmascript', 'text/javascript', 'text/javascript1.0', 'text/javascript1.1', 'text/javascript1.2', 'text/javascript1.3', 'text/javascript1.4', 'text/javascript1.5', 'text/jscript', 'text/livescript', 'text/x-ecmascript', 'text/x-javascript', // Support modern javascript\n'module'];\nvar SCRIPT = 'script';\nvar SCRIPTS_ROOT_ID = 'scripts-root'; // trigger DOMContentLoaded\n\nexport function simulateDOMContentLoaded() {\n var DOMContentLoadedEvent = document.createEvent('Event');\n DOMContentLoadedEvent.initEvent('DOMContentLoaded', true, true);\n document.dispatchEvent(DOMContentLoadedEvent);\n}\n\nfunction insertScript($script, callback, $scriptRoot) {\n var scriptEl = document.createElement('script');\n scriptEl.type = $script.type === 'module' ? 'module' : 'text/javascript';\n\n if ($script.src) {\n scriptEl.onload = callback;\n scriptEl.onerror = callback;\n scriptEl.src = $script.src;\n } else {\n scriptEl.textContent = $script.innerText;\n } // re-insert the script tag so it executes.\n\n\n if ($scriptRoot) $scriptRoot.appendChild(scriptEl);else document.head.appendChild(scriptEl); // clean-up\n\n $script.parentNode.removeChild($script); // run the callback immediately for inline scripts\n\n if (!$script.src) callback();\n} // runs an array of async functions in sequential order\n\n/* eslint-disable no-param-reassign, no-plusplus */\n\n\nfunction insertScriptsSequentially(scriptsToExecute, callback) {\n var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n scriptsToExecute[index](function () {\n index++;\n\n if (index === scriptsToExecute.length) {\n callback();\n } else {\n insertScriptsSequentially(scriptsToExecute, callback, index);\n }\n });\n}\n\nexport function simulatePageLoad($container) {\n var $scriptsRoot = document.getElementById(SCRIPTS_ROOT_ID);\n\n if (!$scriptsRoot) {\n $scriptsRoot = document.createElement('div');\n $scriptsRoot.id = SCRIPTS_ROOT_ID;\n document.body.appendChild($scriptsRoot);\n } else {\n $scriptsRoot.innerHTML = '';\n }\n\n var $scripts = Array.from($container.querySelectorAll(SCRIPT));\n\n if ($scripts.length) {\n var scriptsToExecute = [];\n $scripts.forEach(function ($script) {\n var typeAttr = $script.getAttribute('type'); // only run script tags without the type attribute\n // or with a javascript mime attribute value from the list\n\n if (!typeAttr || runScriptTypes.includes(typeAttr)) {\n scriptsToExecute.push(function (callback) {\n return insertScript($script, callback, $scriptsRoot);\n });\n }\n }); // insert the script tags sequentially\n // to preserve execution order\n\n if (scriptsToExecute.length) {\n insertScriptsSequentially(scriptsToExecute, simulateDOMContentLoaded, undefined);\n }\n } else {\n simulateDOMContentLoaded();\n }\n}","var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __commonJS = (cb, mod) => function __require() {\n return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;\n};\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from2, except, desc) => {\n if (from2 && typeof from2 === \"object\" || typeof from2 === \"function\") {\n for (let key of __getOwnPropNames(from2))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// ../../node_modules/postcss-value-parser/lib/parse.js\nvar require_parse = __commonJS({\n \"../../node_modules/postcss-value-parser/lib/parse.js\"(exports, module2) {\n var openParentheses = \"(\".charCodeAt(0);\n var closeParentheses = \")\".charCodeAt(0);\n var singleQuote = \"'\".charCodeAt(0);\n var doubleQuote = '\"'.charCodeAt(0);\n var backslash = \"\\\\\".charCodeAt(0);\n var slash = \"/\".charCodeAt(0);\n var comma = \",\".charCodeAt(0);\n var colon = \":\".charCodeAt(0);\n var star = \"*\".charCodeAt(0);\n var uLower = \"u\".charCodeAt(0);\n var uUpper = \"U\".charCodeAt(0);\n var plus = \"+\".charCodeAt(0);\n var isUnicodeRange = /^[a-f0-9?-]+$/i;\n module2.exports = function(input) {\n var tokens2 = [];\n var value = input;\n var next2, quote, prev2, token2, escape, escapePos, whitespacePos, parenthesesOpenPos;\n var pos = 0;\n var code = value.charCodeAt(pos);\n var max = value.length;\n var stack = [{ nodes: tokens2 }];\n var balanced = 0;\n var parent;\n var name = \"\";\n var before = \"\";\n var after = \"\";\n while (pos < max) {\n if (code <= 32) {\n next2 = pos;\n do {\n next2 += 1;\n code = value.charCodeAt(next2);\n } while (code <= 32);\n token2 = value.slice(pos, next2);\n prev2 = tokens2[tokens2.length - 1];\n if (code === closeParentheses && balanced) {\n after = token2;\n } else if (prev2 && prev2.type === \"div\") {\n prev2.after = token2;\n prev2.sourceEndIndex += token2.length;\n } else if (code === comma || code === colon || code === slash && value.charCodeAt(next2 + 1) !== star && (!parent || parent && parent.type === \"function\" && parent.value !== \"calc\")) {\n before = token2;\n } else {\n tokens2.push({\n type: \"space\",\n sourceIndex: pos,\n sourceEndIndex: next2,\n value: token2\n });\n }\n pos = next2;\n } else if (code === singleQuote || code === doubleQuote) {\n next2 = pos;\n quote = code === singleQuote ? \"'\" : '\"';\n token2 = {\n type: \"string\",\n sourceIndex: pos,\n quote\n };\n do {\n escape = false;\n next2 = value.indexOf(quote, next2 + 1);\n if (~next2) {\n escapePos = next2;\n while (value.charCodeAt(escapePos - 1) === backslash) {\n escapePos -= 1;\n escape = !escape;\n }\n } else {\n value += quote;\n next2 = value.length - 1;\n token2.unclosed = true;\n }\n } while (escape);\n token2.value = value.slice(pos + 1, next2);\n token2.sourceEndIndex = token2.unclosed ? next2 : next2 + 1;\n tokens2.push(token2);\n pos = next2 + 1;\n code = value.charCodeAt(pos);\n } else if (code === slash && value.charCodeAt(pos + 1) === star) {\n next2 = value.indexOf(\"*/\", pos);\n token2 = {\n type: \"comment\",\n sourceIndex: pos,\n sourceEndIndex: next2 + 2\n };\n if (next2 === -1) {\n token2.unclosed = true;\n next2 = value.length;\n token2.sourceEndIndex = next2;\n }\n token2.value = value.slice(pos + 2, next2);\n tokens2.push(token2);\n pos = next2 + 2;\n code = value.charCodeAt(pos);\n } else if ((code === slash || code === star) && parent && parent.type === \"function\" && parent.value === \"calc\") {\n token2 = value[pos];\n tokens2.push({\n type: \"word\",\n sourceIndex: pos - before.length,\n sourceEndIndex: pos + token2.length,\n value: token2\n });\n pos += 1;\n code = value.charCodeAt(pos);\n } else if (code === slash || code === comma || code === colon) {\n token2 = value[pos];\n tokens2.push({\n type: \"div\",\n sourceIndex: pos - before.length,\n sourceEndIndex: pos + token2.length,\n value: token2,\n before,\n after: \"\"\n });\n before = \"\";\n pos += 1;\n code = value.charCodeAt(pos);\n } else if (openParentheses === code) {\n next2 = pos;\n do {\n next2 += 1;\n code = value.charCodeAt(next2);\n } while (code <= 32);\n parenthesesOpenPos = pos;\n token2 = {\n type: \"function\",\n sourceIndex: pos - name.length,\n value: name,\n before: value.slice(parenthesesOpenPos + 1, next2)\n };\n pos = next2;\n if (name === \"url\" && code !== singleQuote && code !== doubleQuote) {\n next2 -= 1;\n do {\n escape = false;\n next2 = value.indexOf(\")\", next2 + 1);\n if (~next2) {\n escapePos = next2;\n while (value.charCodeAt(escapePos - 1) === backslash) {\n escapePos -= 1;\n escape = !escape;\n }\n } else {\n value += \")\";\n next2 = value.length - 1;\n token2.unclosed = true;\n }\n } while (escape);\n whitespacePos = next2;\n do {\n whitespacePos -= 1;\n code = value.charCodeAt(whitespacePos);\n } while (code <= 32);\n if (parenthesesOpenPos < whitespacePos) {\n if (pos !== whitespacePos + 1) {\n token2.nodes = [\n {\n type: \"word\",\n sourceIndex: pos,\n sourceEndIndex: whitespacePos + 1,\n value: value.slice(pos, whitespacePos + 1)\n }\n ];\n } else {\n token2.nodes = [];\n }\n if (token2.unclosed && whitespacePos + 1 !== next2) {\n token2.after = \"\";\n token2.nodes.push({\n type: \"space\",\n sourceIndex: whitespacePos + 1,\n sourceEndIndex: next2,\n value: value.slice(whitespacePos + 1, next2)\n });\n } else {\n token2.after = value.slice(whitespacePos + 1, next2);\n token2.sourceEndIndex = next2;\n }\n } else {\n token2.after = \"\";\n token2.nodes = [];\n }\n pos = next2 + 1;\n token2.sourceEndIndex = token2.unclosed ? next2 : pos;\n code = value.charCodeAt(pos);\n tokens2.push(token2);\n } else {\n balanced += 1;\n token2.after = \"\";\n token2.sourceEndIndex = pos + 1;\n tokens2.push(token2);\n stack.push(token2);\n tokens2 = token2.nodes = [];\n parent = token2;\n }\n name = \"\";\n } else if (closeParentheses === code && balanced) {\n pos += 1;\n code = value.charCodeAt(pos);\n parent.after = after;\n parent.sourceEndIndex += after.length;\n after = \"\";\n balanced -= 1;\n stack[stack.length - 1].sourceEndIndex = pos;\n stack.pop();\n parent = stack[balanced];\n tokens2 = parent.nodes;\n } else {\n next2 = pos;\n do {\n if (code === backslash) {\n next2 += 1;\n }\n next2 += 1;\n code = value.charCodeAt(next2);\n } while (next2 < max && !(code <= 32 || code === singleQuote || code === doubleQuote || code === comma || code === colon || code === slash || code === openParentheses || code === star && parent && parent.type === \"function\" && parent.value === \"calc\" || code === slash && parent.type === \"function\" && parent.value === \"calc\" || code === closeParentheses && balanced));\n token2 = value.slice(pos, next2);\n if (openParentheses === code) {\n name = token2;\n } else if ((uLower === token2.charCodeAt(0) || uUpper === token2.charCodeAt(0)) && plus === token2.charCodeAt(1) && isUnicodeRange.test(token2.slice(2))) {\n tokens2.push({\n type: \"unicode-range\",\n sourceIndex: pos,\n sourceEndIndex: next2,\n value: token2\n });\n } else {\n tokens2.push({\n type: \"word\",\n sourceIndex: pos,\n sourceEndIndex: next2,\n value: token2\n });\n }\n pos = next2;\n }\n }\n for (pos = stack.length - 1; pos; pos -= 1) {\n stack[pos].unclosed = true;\n stack[pos].sourceEndIndex = value.length;\n }\n return stack[0].nodes;\n };\n }\n});\n\n// ../../node_modules/postcss-value-parser/lib/walk.js\nvar require_walk = __commonJS({\n \"../../node_modules/postcss-value-parser/lib/walk.js\"(exports, module2) {\n module2.exports = function walk(nodes, cb, bubble) {\n var i, max, node2, result;\n for (i = 0, max = nodes.length; i < max; i += 1) {\n node2 = nodes[i];\n if (!bubble) {\n result = cb(node2, i, nodes);\n }\n if (result !== false && node2.type === \"function\" && Array.isArray(node2.nodes)) {\n walk(node2.nodes, cb, bubble);\n }\n if (bubble) {\n cb(node2, i, nodes);\n }\n }\n };\n }\n});\n\n// ../../node_modules/postcss-value-parser/lib/stringify.js\nvar require_stringify = __commonJS({\n \"../../node_modules/postcss-value-parser/lib/stringify.js\"(exports, module2) {\n function stringifyNode(node2, custom) {\n var type = node2.type;\n var value = node2.value;\n var buf;\n var customResult;\n if (custom && (customResult = custom(node2)) !== void 0) {\n return customResult;\n } else if (type === \"word\" || type === \"space\") {\n return value;\n } else if (type === \"string\") {\n buf = node2.quote || \"\";\n return buf + value + (node2.unclosed ? \"\" : buf);\n } else if (type === \"comment\") {\n return \"/*\" + value + (node2.unclosed ? \"\" : \"*/\");\n } else if (type === \"div\") {\n return (node2.before || \"\") + value + (node2.after || \"\");\n } else if (Array.isArray(node2.nodes)) {\n buf = stringify2(node2.nodes, custom);\n if (type !== \"function\") {\n return buf;\n }\n return value + \"(\" + (node2.before || \"\") + buf + (node2.after || \"\") + (node2.unclosed ? \"\" : \")\");\n }\n return value;\n }\n function stringify2(nodes, custom) {\n var result, i;\n if (Array.isArray(nodes)) {\n result = \"\";\n for (i = nodes.length - 1; ~i; i -= 1) {\n result = stringifyNode(nodes[i], custom) + result;\n }\n return result;\n }\n return stringifyNode(nodes, custom);\n }\n module2.exports = stringify2;\n }\n});\n\n// ../../node_modules/postcss-value-parser/lib/unit.js\nvar require_unit = __commonJS({\n \"../../node_modules/postcss-value-parser/lib/unit.js\"(exports, module2) {\n var minus = \"-\".charCodeAt(0);\n var plus = \"+\".charCodeAt(0);\n var dot = \".\".charCodeAt(0);\n var exp = \"e\".charCodeAt(0);\n var EXP = \"E\".charCodeAt(0);\n function likeNumber(value) {\n var code = value.charCodeAt(0);\n var nextCode;\n if (code === plus || code === minus) {\n nextCode = value.charCodeAt(1);\n if (nextCode >= 48 && nextCode <= 57) {\n return true;\n }\n var nextNextCode = value.charCodeAt(2);\n if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) {\n return true;\n }\n return false;\n }\n if (code === dot) {\n nextCode = value.charCodeAt(1);\n if (nextCode >= 48 && nextCode <= 57) {\n return true;\n }\n return false;\n }\n if (code >= 48 && code <= 57) {\n return true;\n }\n return false;\n }\n module2.exports = function(value) {\n var pos = 0;\n var length2 = value.length;\n var code;\n var nextCode;\n var nextNextCode;\n if (length2 === 0 || !likeNumber(value)) {\n return false;\n }\n code = value.charCodeAt(pos);\n if (code === plus || code === minus) {\n pos++;\n }\n while (pos < length2) {\n code = value.charCodeAt(pos);\n if (code < 48 || code > 57) {\n break;\n }\n pos += 1;\n }\n code = value.charCodeAt(pos);\n nextCode = value.charCodeAt(pos + 1);\n if (code === dot && nextCode >= 48 && nextCode <= 57) {\n pos += 2;\n while (pos < length2) {\n code = value.charCodeAt(pos);\n if (code < 48 || code > 57) {\n break;\n }\n pos += 1;\n }\n }\n code = value.charCodeAt(pos);\n nextCode = value.charCodeAt(pos + 1);\n nextNextCode = value.charCodeAt(pos + 2);\n if ((code === exp || code === EXP) && (nextCode >= 48 && nextCode <= 57 || (nextCode === plus || nextCode === minus) && nextNextCode >= 48 && nextNextCode <= 57)) {\n pos += nextCode === plus || nextCode === minus ? 3 : 2;\n while (pos < length2) {\n code = value.charCodeAt(pos);\n if (code < 48 || code > 57) {\n break;\n }\n pos += 1;\n }\n }\n return {\n number: value.slice(0, pos),\n unit: value.slice(pos)\n };\n };\n }\n});\n\n// ../../node_modules/postcss-value-parser/lib/index.js\nvar require_lib = __commonJS({\n \"../../node_modules/postcss-value-parser/lib/index.js\"(exports, module2) {\n var parse2 = require_parse();\n var walk = require_walk();\n var stringify2 = require_stringify();\n function ValueParser(value) {\n if (this instanceof ValueParser) {\n this.nodes = parse2(value);\n return this;\n }\n return new ValueParser(value);\n }\n ValueParser.prototype.toString = function() {\n return Array.isArray(this.nodes) ? stringify2(this.nodes) : \"\";\n };\n ValueParser.prototype.walk = function(cb, bubble) {\n walk(this.nodes, cb, bubble);\n return this;\n };\n ValueParser.unit = require_unit();\n ValueParser.walk = walk;\n ValueParser.stringify = stringify2;\n module2.exports = ValueParser;\n }\n});\n\n// ../../node_modules/camelize/index.js\nvar require_camelize = __commonJS({\n \"../../node_modules/camelize/index.js\"(exports, module2) {\n \"use strict\";\n module2.exports = function(obj) {\n if (typeof obj === \"string\") {\n return camelCase(obj);\n }\n return walk(obj);\n };\n function walk(obj) {\n if (!obj || typeof obj !== \"object\") {\n return obj;\n }\n if (isDate(obj) || isRegex(obj)) {\n return obj;\n }\n if (isArray(obj)) {\n return map(obj, walk);\n }\n return reduce(objectKeys(obj), function(acc, key) {\n var camel = camelCase(key);\n acc[camel] = walk(obj[key]);\n return acc;\n }, {});\n }\n function camelCase(str) {\n return str.replace(/[_.-](\\w|$)/g, function(_, x) {\n return x.toUpperCase();\n });\n }\n var isArray = Array.isArray || function(obj) {\n return Object.prototype.toString.call(obj) === \"[object Array]\";\n };\n var isDate = function(obj) {\n return Object.prototype.toString.call(obj) === \"[object Date]\";\n };\n var isRegex = function(obj) {\n return Object.prototype.toString.call(obj) === \"[object RegExp]\";\n };\n var has = Object.prototype.hasOwnProperty;\n var objectKeys = Object.keys || function(obj) {\n var keys = [];\n for (var key in obj) {\n if (has.call(obj, key)) {\n keys.push(key);\n }\n }\n return keys;\n };\n function map(xs, f) {\n if (xs.map) {\n return xs.map(f);\n }\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n res.push(f(xs[i], i));\n }\n return res;\n }\n function reduce(xs, f, acc) {\n if (xs.reduce) {\n return xs.reduce(f, acc);\n }\n for (var i = 0; i < xs.length; i++) {\n acc = f(acc, xs[i], i);\n }\n return acc;\n }\n }\n});\n\n// ../../node_modules/css-color-keywords/colors.json\nvar require_colors = __commonJS({\n \"../../node_modules/css-color-keywords/colors.json\"(exports, module2) {\n module2.exports = {\n black: \"#000000\",\n silver: \"#c0c0c0\",\n gray: \"#808080\",\n white: \"#ffffff\",\n maroon: \"#800000\",\n red: \"#ff0000\",\n purple: \"#800080\",\n fuchsia: \"#ff00ff\",\n green: \"#008000\",\n lime: \"#00ff00\",\n olive: \"#808000\",\n yellow: \"#ffff00\",\n navy: \"#000080\",\n blue: \"#0000ff\",\n teal: \"#008080\",\n aqua: \"#00ffff\",\n orange: \"#ffa500\",\n aliceblue: \"#f0f8ff\",\n antiquewhite: \"#faebd7\",\n aquamarine: \"#7fffd4\",\n azure: \"#f0ffff\",\n beige: \"#f5f5dc\",\n bisque: \"#ffe4c4\",\n blanchedalmond: \"#ffebcd\",\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 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 gainsboro: \"#dcdcdc\",\n ghostwhite: \"#f8f8ff\",\n gold: \"#ffd700\",\n goldenrod: \"#daa520\",\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 lavender: \"#e6e6fa\",\n lavenderblush: \"#fff0f5\",\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 limegreen: \"#32cd32\",\n linen: \"#faf0e6\",\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 oldlace: \"#fdf5e6\",\n olivedrab: \"#6b8e23\",\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 rosybrown: \"#bc8f8f\",\n royalblue: \"#4169e1\",\n saddlebrown: \"#8b4513\",\n salmon: \"#fa8072\",\n sandybrown: \"#f4a460\",\n seagreen: \"#2e8b57\",\n seashell: \"#fff5ee\",\n sienna: \"#a0522d\",\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 thistle: \"#d8bfd8\",\n tomato: \"#ff6347\",\n turquoise: \"#40e0d0\",\n violet: \"#ee82ee\",\n wheat: \"#f5deb3\",\n whitesmoke: \"#f5f5f5\",\n yellowgreen: \"#9acd32\",\n rebeccapurple: \"#663399\"\n };\n }\n});\n\n// ../../node_modules/css-color-keywords/index.js\nvar require_css_color_keywords = __commonJS({\n \"../../node_modules/css-color-keywords/index.js\"(exports, module2) {\n \"use strict\";\n module2.exports = require_colors();\n }\n});\n\n// ../../node_modules/css-to-react-native/index.js\nvar require_css_to_react_native = __commonJS({\n \"../../node_modules/css-to-react-native/index.js\"(exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n function _interopDefault(ex) {\n return ex && typeof ex === \"object\" && \"default\" in ex ? ex[\"default\"] : ex;\n }\n var parse2 = require_lib();\n var parse__default = _interopDefault(parse2);\n var camelizeStyleName = _interopDefault(require_camelize());\n var cssColorKeywords = _interopDefault(require_css_color_keywords());\n var matchString = function matchString2(node2) {\n if (node2.type !== \"string\")\n return null;\n return node2.value.replace(/\\\\([0-9a-f]{1,6})(?:\\s|$)/gi, function(match2, charCode) {\n return String.fromCharCode(parseInt(charCode, 16));\n }).replace(/\\\\/g, \"\");\n };\n var hexColorRe = /^(#(?:[0-9a-f]{3,4}){1,2})$/i;\n var cssFunctionNameRe = /^(rgba?|hsla?|hwb|lab|lch|gray|color)$/;\n var matchColor = function matchColor2(node2) {\n if (node2.type === \"word\" && (hexColorRe.test(node2.value) || node2.value in cssColorKeywords || node2.value === \"transparent\")) {\n return node2.value;\n } else if (node2.type === \"function\" && cssFunctionNameRe.test(node2.value)) {\n return parse2.stringify(node2);\n }\n return null;\n };\n var noneRe = /^(none)$/i;\n var autoRe = /^(auto)$/i;\n var identRe = /(^-?[_a-z][_a-z0-9-]*$)/i;\n var numberRe = /^([+-]?(?:\\d*\\.)?\\d+(?:e[+-]?\\d+)?)$/i;\n var lengthRe = /^(0$|(?:[+-]?(?:\\d*\\.)?\\d+(?:e[+-]?\\d+)?)(?=px$))/i;\n var unsupportedUnitRe = /^([+-]?(?:\\d*\\.)?\\d+(?:e[+-]?\\d+)?(ch|em|ex|rem|vh|vw|vmin|vmax|cm|mm|in|pc|pt))$/i;\n var angleRe = /^([+-]?(?:\\d*\\.)?\\d+(?:e[+-]?\\d+)?(?:deg|rad))$/i;\n var percentRe = /^([+-]?(?:\\d*\\.)?\\d+(?:e[+-]?\\d+)?%)$/i;\n var noopToken = function noopToken2(predicate) {\n return function(node2) {\n return predicate(node2) ? \"\" : null;\n };\n };\n var valueForTypeToken = function valueForTypeToken2(type) {\n return function(node2) {\n return node2.type === type ? node2.value : null;\n };\n };\n var regExpToken = function regExpToken2(regExp, transform3) {\n if (transform3 === void 0) {\n transform3 = String;\n }\n return function(node2) {\n if (node2.type !== \"word\")\n return null;\n var match2 = node2.value.match(regExp);\n if (match2 === null)\n return null;\n var value = transform3(match2[1]);\n return value;\n };\n };\n var SPACE = noopToken(function(node2) {\n return node2.type === \"space\";\n });\n var SLASH = noopToken(function(node2) {\n return node2.type === \"div\" && node2.value === \"/\";\n });\n var COMMA = noopToken(function(node2) {\n return node2.type === \"div\" && node2.value === \",\";\n });\n var WORD = valueForTypeToken(\"word\");\n var NONE = regExpToken(noneRe);\n var AUTO = regExpToken(autoRe);\n var NUMBER = regExpToken(numberRe, Number);\n var LENGTH = regExpToken(lengthRe, Number);\n var UNSUPPORTED_LENGTH_UNIT = regExpToken(unsupportedUnitRe);\n var ANGLE = regExpToken(angleRe, function(angle) {\n return angle.toLowerCase();\n });\n var PERCENT = regExpToken(percentRe);\n var IDENT = regExpToken(identRe);\n var STRING = matchString;\n var COLOR = matchColor;\n var LINE = regExpToken(/^(none|underline|line-through)$/i);\n var aspectRatio = function aspectRatio2(tokenStream) {\n var aspectRatio3 = tokenStream.expect(NUMBER);\n if (tokenStream.hasTokens()) {\n tokenStream.expect(SLASH);\n aspectRatio3 /= tokenStream.expect(NUMBER);\n }\n return {\n aspectRatio: aspectRatio3\n };\n };\n var BORDER_STYLE = regExpToken(/^(solid|dashed|dotted)$/);\n var defaultBorderWidth = 1;\n var defaultBorderColor = \"black\";\n var defaultBorderStyle = \"solid\";\n var border = function border2(tokenStream) {\n var borderWidth2;\n var borderColor2;\n var borderStyle;\n if (tokenStream.matches(NONE)) {\n tokenStream.expectEmpty();\n return {\n borderWidth: 0,\n borderColor: \"black\",\n borderStyle: \"solid\"\n };\n }\n var partsParsed = 0;\n while (partsParsed < 3 && tokenStream.hasTokens()) {\n if (partsParsed !== 0)\n tokenStream.expect(SPACE);\n if (borderWidth2 === void 0 && tokenStream.matches(LENGTH, UNSUPPORTED_LENGTH_UNIT)) {\n borderWidth2 = tokenStream.lastValue;\n } else if (borderColor2 === void 0 && tokenStream.matches(COLOR)) {\n borderColor2 = tokenStream.lastValue;\n } else if (borderStyle === void 0 && tokenStream.matches(BORDER_STYLE)) {\n borderStyle = tokenStream.lastValue;\n } else {\n tokenStream[\"throw\"]();\n }\n partsParsed += 1;\n }\n tokenStream.expectEmpty();\n if (borderWidth2 === void 0)\n borderWidth2 = defaultBorderWidth;\n if (borderColor2 === void 0)\n borderColor2 = defaultBorderColor;\n if (borderStyle === void 0)\n borderStyle = defaultBorderStyle;\n return {\n borderWidth: borderWidth2,\n borderColor: borderColor2,\n borderStyle\n };\n };\n var directionFactory = function directionFactory2(_ref) {\n var _ref$types = _ref.types, types = _ref$types === void 0 ? [LENGTH, UNSUPPORTED_LENGTH_UNIT, PERCENT] : _ref$types, _ref$directions = _ref.directions, directions = _ref$directions === void 0 ? [\"Top\", \"Right\", \"Bottom\", \"Left\"] : _ref$directions, _ref$prefix = _ref.prefix, prefix2 = _ref$prefix === void 0 ? \"\" : _ref$prefix, _ref$suffix = _ref.suffix, suffix = _ref$suffix === void 0 ? \"\" : _ref$suffix;\n return function(tokenStream) {\n var _ref2;\n var values = [];\n values.push(tokenStream.expect.apply(tokenStream, types));\n while (values.length < 4 && tokenStream.hasTokens()) {\n tokenStream.expect(SPACE);\n values.push(tokenStream.expect.apply(tokenStream, types));\n }\n tokenStream.expectEmpty();\n var top = values[0], _values$ = values[1], right = _values$ === void 0 ? top : _values$, _values$2 = values[2], bottom = _values$2 === void 0 ? top : _values$2, _values$3 = values[3], left = _values$3 === void 0 ? right : _values$3;\n var keyFor = function keyFor2(n) {\n return \"\" + prefix2 + directions[n] + suffix;\n };\n return _ref2 = {}, _ref2[keyFor(0)] = top, _ref2[keyFor(1)] = right, _ref2[keyFor(2)] = bottom, _ref2[keyFor(3)] = left, _ref2;\n };\n };\n var parseShadowOffset = function parseShadowOffset2(tokenStream) {\n var width = tokenStream.expect(LENGTH);\n var height = tokenStream.matches(SPACE) ? tokenStream.expect(LENGTH) : width;\n tokenStream.expectEmpty();\n return {\n width,\n height\n };\n };\n var parseShadow = function parseShadow2(tokenStream) {\n var offsetX;\n var offsetY;\n var radius;\n var color;\n if (tokenStream.matches(NONE)) {\n tokenStream.expectEmpty();\n return {\n offset: {\n width: 0,\n height: 0\n },\n radius: 0,\n color: \"black\"\n };\n }\n var didParseFirst = false;\n while (tokenStream.hasTokens()) {\n if (didParseFirst)\n tokenStream.expect(SPACE);\n if (offsetX === void 0 && tokenStream.matches(LENGTH, UNSUPPORTED_LENGTH_UNIT)) {\n offsetX = tokenStream.lastValue;\n tokenStream.expect(SPACE);\n offsetY = tokenStream.expect(LENGTH, UNSUPPORTED_LENGTH_UNIT);\n tokenStream.saveRewindPoint();\n if (tokenStream.matches(SPACE) && tokenStream.matches(LENGTH, UNSUPPORTED_LENGTH_UNIT)) {\n radius = tokenStream.lastValue;\n } else {\n tokenStream.rewind();\n }\n } else if (color === void 0 && tokenStream.matches(COLOR)) {\n color = tokenStream.lastValue;\n } else {\n tokenStream[\"throw\"]();\n }\n didParseFirst = true;\n }\n if (offsetX === void 0)\n tokenStream[\"throw\"]();\n return {\n offset: {\n width: offsetX,\n height: offsetY\n },\n radius: radius !== void 0 ? radius : 0,\n color: color !== void 0 ? color : \"black\"\n };\n };\n var boxShadow = function boxShadow2(tokenStream) {\n var _parseShadow = parseShadow(tokenStream), offset = _parseShadow.offset, radius = _parseShadow.radius, color = _parseShadow.color;\n return {\n shadowOffset: offset,\n shadowRadius: radius,\n shadowColor: color,\n shadowOpacity: 1\n };\n };\n var defaultFlexGrow = 1;\n var defaultFlexShrink = 1;\n var defaultFlexBasis = 0;\n var flex = function flex2(tokenStream) {\n var flexGrow;\n var flexShrink;\n var flexBasis;\n if (tokenStream.matches(NONE)) {\n tokenStream.expectEmpty();\n return {\n flexGrow: 0,\n flexShrink: 0,\n flexBasis: \"auto\"\n };\n }\n tokenStream.saveRewindPoint();\n if (tokenStream.matches(AUTO) && !tokenStream.hasTokens()) {\n return {\n flexGrow: 1,\n flexShrink: 1,\n flexBasis: \"auto\"\n };\n }\n tokenStream.rewind();\n var partsParsed = 0;\n while (partsParsed < 2 && tokenStream.hasTokens()) {\n if (partsParsed !== 0)\n tokenStream.expect(SPACE);\n if (flexGrow === void 0 && tokenStream.matches(NUMBER)) {\n flexGrow = tokenStream.lastValue;\n tokenStream.saveRewindPoint();\n if (tokenStream.matches(SPACE) && tokenStream.matches(NUMBER)) {\n flexShrink = tokenStream.lastValue;\n } else {\n tokenStream.rewind();\n }\n } else if (flexBasis === void 0 && tokenStream.matches(LENGTH, UNSUPPORTED_LENGTH_UNIT, PERCENT)) {\n flexBasis = tokenStream.lastValue;\n } else if (flexBasis === void 0 && tokenStream.matches(AUTO)) {\n flexBasis = \"auto\";\n } else {\n tokenStream[\"throw\"]();\n }\n partsParsed += 1;\n }\n tokenStream.expectEmpty();\n if (flexGrow === void 0)\n flexGrow = defaultFlexGrow;\n if (flexShrink === void 0)\n flexShrink = defaultFlexShrink;\n if (flexBasis === void 0)\n flexBasis = defaultFlexBasis;\n return {\n flexGrow,\n flexShrink,\n flexBasis\n };\n };\n var FLEX_WRAP = regExpToken(/(nowrap|wrap|wrap-reverse)/);\n var FLEX_DIRECTION = regExpToken(/(row|row-reverse|column|column-reverse)/);\n var defaultFlexWrap = \"nowrap\";\n var defaultFlexDirection = \"row\";\n var flexFlow = function flexFlow2(tokenStream) {\n var flexWrap;\n var flexDirection;\n var partsParsed = 0;\n while (partsParsed < 2 && tokenStream.hasTokens()) {\n if (partsParsed !== 0)\n tokenStream.expect(SPACE);\n if (flexWrap === void 0 && tokenStream.matches(FLEX_WRAP)) {\n flexWrap = tokenStream.lastValue;\n } else if (flexDirection === void 0 && tokenStream.matches(FLEX_DIRECTION)) {\n flexDirection = tokenStream.lastValue;\n } else {\n tokenStream[\"throw\"]();\n }\n partsParsed += 1;\n }\n tokenStream.expectEmpty();\n if (flexWrap === void 0)\n flexWrap = defaultFlexWrap;\n if (flexDirection === void 0)\n flexDirection = defaultFlexDirection;\n return {\n flexWrap,\n flexDirection\n };\n };\n var fontFamily = function fontFamily2(tokenStream) {\n var fontFamily3;\n if (tokenStream.matches(STRING)) {\n fontFamily3 = tokenStream.lastValue;\n } else {\n fontFamily3 = tokenStream.expect(IDENT);\n while (tokenStream.hasTokens()) {\n tokenStream.expect(SPACE);\n var nextIdent = tokenStream.expect(IDENT);\n fontFamily3 += \" \" + nextIdent;\n }\n }\n tokenStream.expectEmpty();\n return {\n fontFamily: fontFamily3\n };\n };\n var NORMAL = regExpToken(/^(normal)$/);\n var STYLE = regExpToken(/^(italic)$/);\n var WEIGHT = regExpToken(/^([1-9]00|bold)$/);\n var VARIANT = regExpToken(/^(small-caps)$/);\n var defaultFontStyle = \"normal\";\n var defaultFontWeight = \"normal\";\n var defaultFontVariant = [];\n var font = function font2(tokenStream) {\n var fontStyle;\n var fontWeight2;\n var fontVariant2;\n var lineHeight;\n var numStyleWeightVariantMatched = 0;\n while (numStyleWeightVariantMatched < 3 && tokenStream.hasTokens()) {\n if (tokenStream.matches(NORMAL))\n ;\n else if (fontStyle === void 0 && tokenStream.matches(STYLE)) {\n fontStyle = tokenStream.lastValue;\n } else if (fontWeight2 === void 0 && tokenStream.matches(WEIGHT)) {\n fontWeight2 = tokenStream.lastValue;\n } else if (fontVariant2 === void 0 && tokenStream.matches(VARIANT)) {\n fontVariant2 = [tokenStream.lastValue];\n } else {\n break;\n }\n tokenStream.expect(SPACE);\n numStyleWeightVariantMatched += 1;\n }\n var fontSize = tokenStream.expect(LENGTH, UNSUPPORTED_LENGTH_UNIT);\n if (tokenStream.matches(SLASH)) {\n lineHeight = tokenStream.expect(LENGTH, UNSUPPORTED_LENGTH_UNIT);\n }\n tokenStream.expect(SPACE);\n var _fontFamily = fontFamily(tokenStream), fontFamily$1 = _fontFamily.fontFamily;\n if (fontStyle === void 0)\n fontStyle = defaultFontStyle;\n if (fontWeight2 === void 0)\n fontWeight2 = defaultFontWeight;\n if (fontVariant2 === void 0)\n fontVariant2 = defaultFontVariant;\n var out = {\n fontStyle,\n fontWeight: fontWeight2,\n fontVariant: fontVariant2,\n fontSize,\n fontFamily: fontFamily$1\n };\n if (lineHeight !== void 0)\n out.lineHeight = lineHeight;\n return out;\n };\n var fontVariant = function fontVariant2(tokenStream) {\n var values = [tokenStream.expect(IDENT)];\n while (tokenStream.hasTokens()) {\n tokenStream.expect(SPACE);\n values.push(tokenStream.expect(IDENT));\n }\n return {\n fontVariant: values\n };\n };\n var ALIGN_CONTENT = regExpToken(/(flex-(?:start|end)|center|stretch|space-(?:between|around))/);\n var JUSTIFY_CONTENT = regExpToken(/(flex-(?:start|end)|center|space-(?:between|around|evenly))/);\n var placeContent = function placeContent2(tokenStream) {\n var alignContent = tokenStream.expect(ALIGN_CONTENT);\n var justifyContent;\n if (tokenStream.hasTokens()) {\n tokenStream.expect(SPACE);\n justifyContent = tokenStream.expect(JUSTIFY_CONTENT);\n } else {\n justifyContent = \"stretch\";\n }\n tokenStream.expectEmpty();\n return {\n alignContent,\n justifyContent\n };\n };\n var STYLE$1 = regExpToken(/^(solid|double|dotted|dashed)$/);\n var defaultTextDecorationLine = \"none\";\n var defaultTextDecorationStyle = \"solid\";\n var defaultTextDecorationColor = \"black\";\n var textDecoration = function textDecoration2(tokenStream) {\n var line2;\n var style;\n var color;\n var didParseFirst = false;\n while (tokenStream.hasTokens()) {\n if (didParseFirst)\n tokenStream.expect(SPACE);\n if (line2 === void 0 && tokenStream.matches(LINE)) {\n var lines = [tokenStream.lastValue.toLowerCase()];\n tokenStream.saveRewindPoint();\n if (lines[0] !== \"none\" && tokenStream.matches(SPACE) && tokenStream.matches(LINE)) {\n lines.push(tokenStream.lastValue.toLowerCase());\n lines.sort().reverse();\n } else {\n tokenStream.rewind();\n }\n line2 = lines.join(\" \");\n } else if (style === void 0 && tokenStream.matches(STYLE$1)) {\n style = tokenStream.lastValue;\n } else if (color === void 0 && tokenStream.matches(COLOR)) {\n color = tokenStream.lastValue;\n } else {\n tokenStream[\"throw\"]();\n }\n didParseFirst = true;\n }\n return {\n textDecorationLine: line2 !== void 0 ? line2 : defaultTextDecorationLine,\n textDecorationColor: color !== void 0 ? color : defaultTextDecorationColor,\n textDecorationStyle: style !== void 0 ? style : defaultTextDecorationStyle\n };\n };\n var textDecorationLine = function textDecorationLine2(tokenStream) {\n var lines = [];\n var didParseFirst = false;\n while (tokenStream.hasTokens()) {\n if (didParseFirst)\n tokenStream.expect(SPACE);\n lines.push(tokenStream.expect(LINE).toLowerCase());\n didParseFirst = true;\n }\n lines.sort().reverse();\n return {\n textDecorationLine: lines.join(\" \")\n };\n };\n var textShadow = function textShadow2(tokenStream) {\n var _parseShadow2 = parseShadow(tokenStream), offset = _parseShadow2.offset, radius = _parseShadow2.radius, color = _parseShadow2.color;\n return {\n textShadowOffset: offset,\n textShadowRadius: radius,\n textShadowColor: color\n };\n };\n var oneOfType = function oneOfType2(tokenType) {\n return function(functionStream) {\n var value = functionStream.expect(tokenType);\n functionStream.expectEmpty();\n return value;\n };\n };\n var singleNumber = oneOfType(NUMBER);\n var singleLength = oneOfType(LENGTH);\n var singleAngle = oneOfType(ANGLE);\n var xyTransformFactory = function xyTransformFactory2(tokenType) {\n return function(key, valueIfOmitted) {\n return function(functionStream) {\n var _ref3, _ref4;\n var x = functionStream.expect(tokenType);\n var y;\n if (functionStream.hasTokens()) {\n functionStream.expect(COMMA);\n y = functionStream.expect(tokenType);\n } else if (valueIfOmitted !== void 0) {\n y = valueIfOmitted;\n } else {\n return x;\n }\n functionStream.expectEmpty();\n return [(_ref3 = {}, _ref3[key + \"Y\"] = y, _ref3), (_ref4 = {}, _ref4[key + \"X\"] = x, _ref4)];\n };\n };\n };\n var xyNumber = xyTransformFactory(NUMBER);\n var xyLength = xyTransformFactory(LENGTH);\n var xyAngle = xyTransformFactory(ANGLE);\n var partTransforms = {\n perspective: singleNumber,\n scale: xyNumber(\"scale\"),\n scaleX: singleNumber,\n scaleY: singleNumber,\n translate: xyLength(\"translate\", 0),\n translateX: singleLength,\n translateY: singleLength,\n rotate: singleAngle,\n rotateX: singleAngle,\n rotateY: singleAngle,\n rotateZ: singleAngle,\n skewX: singleAngle,\n skewY: singleAngle,\n skew: xyAngle(\"skew\", \"0deg\")\n };\n var transform2 = function transform3(tokenStream) {\n var transforms2 = [];\n var didParseFirst = false;\n while (tokenStream.hasTokens()) {\n if (didParseFirst)\n tokenStream.expect(SPACE);\n var functionStream = tokenStream.expectFunction();\n var functionName = functionStream.functionName;\n var transformedValues = partTransforms[functionName](functionStream);\n if (!Array.isArray(transformedValues)) {\n var _ref5;\n transformedValues = [(_ref5 = {}, _ref5[functionName] = transformedValues, _ref5)];\n }\n transforms2 = transformedValues.concat(transforms2);\n didParseFirst = true;\n }\n return {\n transform: transforms2\n };\n };\n var background = function background2(tokenStream) {\n return {\n backgroundColor: tokenStream.expect(COLOR)\n };\n };\n var borderColor = directionFactory({\n types: [COLOR],\n prefix: \"border\",\n suffix: \"Color\"\n });\n var borderRadius = directionFactory({\n directions: [\"TopLeft\", \"TopRight\", \"BottomRight\", \"BottomLeft\"],\n prefix: \"border\",\n suffix: \"Radius\"\n });\n var borderWidth = directionFactory({\n prefix: \"border\",\n suffix: \"Width\"\n });\n var margin = directionFactory({\n types: [LENGTH, UNSUPPORTED_LENGTH_UNIT, PERCENT, AUTO],\n prefix: \"margin\"\n });\n var padding = directionFactory({\n prefix: \"padding\"\n });\n var fontWeight = function fontWeight2(tokenStream) {\n return {\n fontWeight: tokenStream.expect(WORD)\n // Also match numbers as strings\n };\n };\n var shadowOffset = function shadowOffset2(tokenStream) {\n return {\n shadowOffset: parseShadowOffset(tokenStream)\n };\n };\n var textShadowOffset = function textShadowOffset2(tokenStream) {\n return {\n textShadowOffset: parseShadowOffset(tokenStream)\n };\n };\n var transforms = {\n aspectRatio,\n background,\n border,\n borderColor,\n borderRadius,\n borderWidth,\n boxShadow,\n flex,\n flexFlow,\n font,\n fontFamily,\n fontVariant,\n fontWeight,\n margin,\n padding,\n placeContent,\n shadowOffset,\n textShadow,\n textShadowOffset,\n textDecoration,\n textDecorationLine,\n transform: transform2\n };\n var propertiesWithoutUnits;\n if (process.env.NODE_ENV !== \"production\") {\n propertiesWithoutUnits = [\"aspectRatio\", \"elevation\", \"flexGrow\", \"flexShrink\", \"opacity\", \"shadowOpacity\", \"zIndex\"];\n }\n var devPropertiesWithUnitsRegExp = propertiesWithoutUnits != null ? new RegExp(propertiesWithoutUnits.join(\"|\")) : null;\n var SYMBOL_MATCH = \"SYMBOL_MATCH\";\n var TokenStream = /* @__PURE__ */ function() {\n function TokenStream2(nodes, parent) {\n this.index = 0;\n this.nodes = nodes;\n this.functionName = parent != null ? parent.value : null;\n this.lastValue = null;\n this.rewindIndex = -1;\n }\n var _proto = TokenStream2.prototype;\n _proto.hasTokens = function hasTokens() {\n return this.index <= this.nodes.length - 1;\n };\n _proto[SYMBOL_MATCH] = function() {\n if (!this.hasTokens())\n return null;\n var node2 = this.nodes[this.index];\n for (var i = 0; i < arguments.length; i += 1) {\n var tokenDescriptor = i < 0 || arguments.length <= i ? void 0 : arguments[i];\n var value = tokenDescriptor(node2);\n if (value !== null) {\n this.index += 1;\n this.lastValue = value;\n return value;\n }\n }\n return null;\n };\n _proto.matches = function matches() {\n return this[SYMBOL_MATCH].apply(this, arguments) !== null;\n };\n _proto.expect = function expect() {\n var value = this[SYMBOL_MATCH].apply(this, arguments);\n return value !== null ? value : this[\"throw\"]();\n };\n _proto.matchesFunction = function matchesFunction() {\n var node2 = this.nodes[this.index];\n if (node2.type !== \"function\")\n return null;\n var value = new TokenStream2(node2.nodes, node2);\n this.index += 1;\n this.lastValue = null;\n return value;\n };\n _proto.expectFunction = function expectFunction() {\n var value = this.matchesFunction();\n return value !== null ? value : this[\"throw\"]();\n };\n _proto.expectEmpty = function expectEmpty() {\n if (this.hasTokens())\n this[\"throw\"]();\n };\n _proto[\"throw\"] = function _throw() {\n throw new Error(\"Unexpected token type: \" + this.nodes[this.index].type);\n };\n _proto.saveRewindPoint = function saveRewindPoint() {\n this.rewindIndex = this.index;\n };\n _proto.rewind = function rewind() {\n if (this.rewindIndex === -1)\n throw new Error(\"Internal error\");\n this.index = this.rewindIndex;\n this.lastValue = null;\n };\n return TokenStream2;\n }();\n var numberOrLengthRe = /^([+-]?(?:\\d*\\.)?\\d+(?:e[+-]?\\d+)?)(?:px)?$/i;\n var numberOnlyRe = /^[+-]?(?:\\d*\\.\\d*|[1-9]\\d*)(?:e[+-]?\\d+)?$/i;\n var boolRe = /^true|false$/i;\n var nullRe = /^null$/i;\n var undefinedRe = /^undefined$/i;\n var transformRawValue = function transformRawValue2(propName, value) {\n if (process.env.NODE_ENV !== \"production\") {\n var needsUnit = !devPropertiesWithUnitsRegExp.test(propName);\n var isNumberWithoutUnit = numberOnlyRe.test(value);\n if (needsUnit && isNumberWithoutUnit) {\n console.warn('Expected style \"' + propName + \": \" + value + '\" to contain units');\n }\n if (!needsUnit && value !== \"0\" && !isNumberWithoutUnit) {\n console.warn('Expected style \"' + propName + \": \" + value + '\" to be unitless');\n }\n }\n var numberMatch = value.match(numberOrLengthRe);\n if (numberMatch !== null)\n return Number(numberMatch[1]);\n var boolMatch = value.match(boolRe);\n if (boolMatch !== null)\n return boolMatch[0].toLowerCase() === \"true\";\n var nullMatch = value.match(nullRe);\n if (nullMatch !== null)\n return null;\n var undefinedMatch = value.match(undefinedRe);\n if (undefinedMatch !== null)\n return void 0;\n return value;\n };\n var baseTransformShorthandValue = function baseTransformShorthandValue2(propName, value) {\n var ast = parse__default(value);\n var tokenStream = new TokenStream(ast.nodes);\n return transforms[propName](tokenStream);\n };\n var transformShorthandValue = process.env.NODE_ENV === \"production\" ? baseTransformShorthandValue : function(propName, value) {\n try {\n return baseTransformShorthandValue(propName, value);\n } catch (e) {\n throw new Error('Failed to parse declaration \"' + propName + \": \" + value + '\"');\n }\n };\n var getStylesForProperty = function getStylesForProperty2(propName, inputValue, allowShorthand) {\n var _ref6;\n var isRawValue = allowShorthand === false || !(propName in transforms);\n var value = inputValue.trim();\n var propValues = isRawValue ? (_ref6 = {}, _ref6[propName] = transformRawValue(propName, value), _ref6) : transformShorthandValue(propName, value);\n return propValues;\n };\n var getPropertyName = function getPropertyName2(propName) {\n var isCustomProp = /^--\\w+/.test(propName);\n if (isCustomProp) {\n return propName;\n }\n return camelizeStyleName(propName);\n };\n var index2 = function index3(rules, shorthandBlacklist) {\n if (shorthandBlacklist === void 0) {\n shorthandBlacklist = [];\n }\n return rules.reduce(function(accum, rule) {\n var propertyName = getPropertyName(rule[0]);\n var value = rule[1];\n var allowShorthand = shorthandBlacklist.indexOf(propertyName) === -1;\n return Object.assign(accum, getStylesForProperty(propertyName, value, allowShorthand));\n }, {});\n };\n exports[\"default\"] = index2;\n exports.getPropertyName = getPropertyName;\n exports.getStylesForProperty = getStylesForProperty;\n exports.transformRawValue = transformRawValue;\n }\n});\n\n// ../../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js\nvar require_react_is_production_min = __commonJS({\n \"../../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js\"(exports) {\n \"use strict\";\n var b = \"function\" === typeof Symbol && Symbol.for;\n var c = b ? Symbol.for(\"react.element\") : 60103;\n var d = b ? Symbol.for(\"react.portal\") : 60106;\n var e = b ? Symbol.for(\"react.fragment\") : 60107;\n var f = b ? Symbol.for(\"react.strict_mode\") : 60108;\n var g = b ? Symbol.for(\"react.profiler\") : 60114;\n var h = b ? Symbol.for(\"react.provider\") : 60109;\n var k = b ? Symbol.for(\"react.context\") : 60110;\n var l = b ? Symbol.for(\"react.async_mode\") : 60111;\n var m = b ? Symbol.for(\"react.concurrent_mode\") : 60111;\n var n = b ? Symbol.for(\"react.forward_ref\") : 60112;\n var p = b ? Symbol.for(\"react.suspense\") : 60113;\n var q = b ? Symbol.for(\"react.suspense_list\") : 60120;\n var r = b ? Symbol.for(\"react.memo\") : 60115;\n var t = b ? Symbol.for(\"react.lazy\") : 60116;\n var v = b ? Symbol.for(\"react.block\") : 60121;\n var w = b ? Symbol.for(\"react.fundamental\") : 60117;\n var x = b ? Symbol.for(\"react.responder\") : 60118;\n var y = b ? Symbol.for(\"react.scope\") : 60119;\n function z(a) {\n if (\"object\" === typeof a && null !== a) {\n var u = a.$$typeof;\n switch (u) {\n case c:\n switch (a = a.type, a) {\n case l:\n case m:\n case e:\n case g:\n case f:\n case p:\n return a;\n default:\n switch (a = a && a.$$typeof, a) {\n case k:\n case n:\n case t:\n case r:\n case h:\n return a;\n default:\n return u;\n }\n }\n case d:\n return u;\n }\n }\n }\n function A(a) {\n return z(a) === m;\n }\n exports.AsyncMode = l;\n exports.ConcurrentMode = m;\n exports.ContextConsumer = k;\n exports.ContextProvider = h;\n exports.Element = c;\n exports.ForwardRef = n;\n exports.Fragment = e;\n exports.Lazy = t;\n exports.Memo = r;\n exports.Portal = d;\n exports.Profiler = g;\n exports.StrictMode = f;\n exports.Suspense = p;\n exports.isAsyncMode = function(a) {\n return A(a) || z(a) === l;\n };\n exports.isConcurrentMode = A;\n exports.isContextConsumer = function(a) {\n return z(a) === k;\n };\n exports.isContextProvider = function(a) {\n return z(a) === h;\n };\n exports.isElement = function(a) {\n return \"object\" === typeof a && null !== a && a.$$typeof === c;\n };\n exports.isForwardRef = function(a) {\n return z(a) === n;\n };\n exports.isFragment = function(a) {\n return z(a) === e;\n };\n exports.isLazy = function(a) {\n return z(a) === t;\n };\n exports.isMemo = function(a) {\n return z(a) === r;\n };\n exports.isPortal = function(a) {\n return z(a) === d;\n };\n exports.isProfiler = function(a) {\n return z(a) === g;\n };\n exports.isStrictMode = function(a) {\n return z(a) === f;\n };\n exports.isSuspense = function(a) {\n return z(a) === p;\n };\n exports.isValidElementType = function(a) {\n return \"string\" === typeof a || \"function\" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || \"object\" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);\n };\n exports.typeOf = z;\n }\n});\n\n// ../../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js\nvar require_react_is_development = __commonJS({\n \"../../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js\"(exports) {\n \"use strict\";\n if (process.env.NODE_ENV !== \"production\") {\n (function() {\n \"use strict\";\n var hasSymbol = typeof Symbol === \"function\" && Symbol.for;\n var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for(\"react.element\") : 60103;\n var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for(\"react.portal\") : 60106;\n var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for(\"react.fragment\") : 60107;\n var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for(\"react.strict_mode\") : 60108;\n var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for(\"react.profiler\") : 60114;\n var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for(\"react.provider\") : 60109;\n var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for(\"react.context\") : 60110;\n var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for(\"react.async_mode\") : 60111;\n var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for(\"react.concurrent_mode\") : 60111;\n var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for(\"react.forward_ref\") : 60112;\n var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for(\"react.suspense\") : 60113;\n var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for(\"react.suspense_list\") : 60120;\n var REACT_MEMO_TYPE = hasSymbol ? Symbol.for(\"react.memo\") : 60115;\n var REACT_LAZY_TYPE = hasSymbol ? Symbol.for(\"react.lazy\") : 60116;\n var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for(\"react.block\") : 60121;\n var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for(\"react.fundamental\") : 60117;\n var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for(\"react.responder\") : 60118;\n var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for(\"react.scope\") : 60119;\n function isValidElementType(type) {\n return typeof type === \"string\" || typeof type === \"function\" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === \"object\" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n }\n function typeOf(object) {\n if (typeof object === \"object\" && object !== null) {\n var $$typeof = object.$$typeof;\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n default:\n var $$typeofType = type && type.$$typeof;\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n default:\n return $$typeof;\n }\n }\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n return void 0;\n }\n var AsyncMode = REACT_ASYNC_MODE_TYPE;\n var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\n var ContextConsumer = REACT_CONTEXT_TYPE;\n var ContextProvider = REACT_PROVIDER_TYPE;\n var Element = REACT_ELEMENT_TYPE;\n var ForwardRef = REACT_FORWARD_REF_TYPE;\n var Fragment3 = REACT_FRAGMENT_TYPE;\n var Lazy = REACT_LAZY_TYPE;\n var Memo = REACT_MEMO_TYPE;\n var Portal = REACT_PORTAL_TYPE;\n var Profiler = REACT_PROFILER_TYPE;\n var StrictMode = REACT_STRICT_MODE_TYPE;\n var Suspense = REACT_SUSPENSE_TYPE;\n var hasWarnedAboutDeprecatedIsAsyncMode = false;\n function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n console[\"warn\"](\"The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.\");\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n }\n function isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n }\n function isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n }\n function isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n }\n function isElement(object) {\n return typeof object === \"object\" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n function isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n }\n function isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n }\n function isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n }\n function isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n }\n function isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n }\n function isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n }\n function isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n }\n function isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n }\n exports.AsyncMode = AsyncMode;\n exports.ConcurrentMode = ConcurrentMode;\n exports.ContextConsumer = ContextConsumer;\n exports.ContextProvider = ContextProvider;\n exports.Element = Element;\n exports.ForwardRef = ForwardRef;\n exports.Fragment = Fragment3;\n exports.Lazy = Lazy;\n exports.Memo = Memo;\n exports.Portal = Portal;\n exports.Profiler = Profiler;\n exports.StrictMode = StrictMode;\n exports.Suspense = Suspense;\n exports.isAsyncMode = isAsyncMode;\n exports.isConcurrentMode = isConcurrentMode;\n exports.isContextConsumer = isContextConsumer;\n exports.isContextProvider = isContextProvider;\n exports.isElement = isElement;\n exports.isForwardRef = isForwardRef;\n exports.isFragment = isFragment;\n exports.isLazy = isLazy;\n exports.isMemo = isMemo;\n exports.isPortal = isPortal;\n exports.isProfiler = isProfiler;\n exports.isStrictMode = isStrictMode;\n exports.isSuspense = isSuspense;\n exports.isValidElementType = isValidElementType;\n exports.typeOf = typeOf;\n })();\n }\n }\n});\n\n// ../../node_modules/hoist-non-react-statics/node_modules/react-is/index.js\nvar require_react_is = __commonJS({\n \"../../node_modules/hoist-non-react-statics/node_modules/react-is/index.js\"(exports, module2) {\n \"use strict\";\n if (process.env.NODE_ENV === \"production\") {\n module2.exports = require_react_is_production_min();\n } else {\n module2.exports = require_react_is_development();\n }\n }\n});\n\n// ../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js\nvar require_hoist_non_react_statics_cjs = __commonJS({\n \"../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js\"(exports, module2) {\n \"use strict\";\n var reactIs = require_react_is();\n var REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n };\n var KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n };\n var FORWARD_REF_STATICS = {\n \"$$typeof\": true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n };\n var MEMO_STATICS = {\n \"$$typeof\": true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n };\n var TYPE_STATICS = {};\n TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\n TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n function getStatics(component) {\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n }\n return TYPE_STATICS[component[\"$$typeof\"]] || REACT_STATICS;\n }\n var defineProperty = Object.defineProperty;\n var getOwnPropertyNames = Object.getOwnPropertyNames;\n var getOwnPropertySymbols = Object.getOwnPropertySymbols;\n var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n var getPrototypeOf = Object.getPrototypeOf;\n var objectPrototype = Object.prototype;\n function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== \"string\") {\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n var keys = getOwnPropertyNames(sourceComponent);\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n try {\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {\n }\n }\n }\n }\n return targetComponent;\n }\n module2.exports = hoistNonReactStatics;\n }\n});\n\n// ../../node_modules/@emotion/react/node_modules/@babel/runtime/helpers/extends.js\nvar require_extends = __commonJS({\n \"../../node_modules/@emotion/react/node_modules/@babel/runtime/helpers/extends.js\"(exports, module2) {\n function _extends2() {\n module2.exports = _extends2 = Object.assign ? Object.assign.bind() : function(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n }, module2.exports.__esModule = true, module2.exports[\"default\"] = module2.exports;\n return _extends2.apply(this, arguments);\n }\n module2.exports = _extends2, module2.exports.__esModule = true, module2.exports[\"default\"] = module2.exports;\n }\n});\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n ThemeProvider: () => ThemeProvider,\n darkTheme: () => darkTheme,\n styled: () => index,\n theme: () => theme,\n useTheme: () => useTheme\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/theme.ts\nvar tokens = {\n spacing1: 4,\n spacing2: 8,\n spacing3: 12,\n spacing4: 16,\n spacing5: 20,\n spacing6: 24,\n fontSize: {\n small: 12,\n smaller: 14,\n normal: 16\n },\n color: {\n navy: \"#001a23\",\n black: \"#000\",\n offBlack: \"#222\",\n white: \"#ffffff\",\n grey200: \"#dee2e3\",\n grey700: \"#859499\",\n grey800: \"#575757\",\n red500: \"#ff4400\",\n blue100: \"#f6f9fc\",\n blue200: \"#e0eaf5\",\n blue250: \"#dcebf9\",\n blue300: \"#b2cbe6\",\n blue400: \"#a3c1e0\",\n blue600: \"#1ea7fd\",\n green500: \"#66bf3c\"\n },\n borderRadius: {\n small: 4,\n medium: 6,\n large: 8,\n round: 100\n },\n borderWidthNormal: 1,\n elevation: {\n floating: {\n shadowColor: \"#000000\",\n shadowOpacity: 0.2,\n shadowOffset: { width: 0, height: 0 },\n shadowRadius: 16,\n elevation: 10\n }\n }\n};\nvar text = {\n primaryColor: tokens.color.navy,\n secondaryColor: tokens.color.grey700,\n linkColor: \"#0000ff\"\n};\nvar textOnDark = {\n primaryColor: tokens.color.white,\n secondaryColor: tokens.color.grey200,\n linkColor: tokens.color.blue600\n};\nvar theme = {\n tokens,\n text,\n backgroundColor: tokens.color.white,\n preview: {\n containerBackgroundColor: tokens.color.white,\n backgroundColor: tokens.color.white\n },\n navigation: {\n backgroundColor: tokens.color.white,\n borderColor: tokens.color.grey200,\n borderWidth: tokens.borderWidthNormal,\n visibilityBorderRadius: tokens.borderRadius.small,\n visibilityInnerBorderColor: tokens.color.grey700,\n visibilityOuterBorderColor: tokens.color.white\n },\n panel: {\n backgroundColor: tokens.color.blue100,\n borderWidth: tokens.borderWidthNormal,\n borderColor: tokens.color.blue200,\n paddingVertical: 0,\n paddingHorizontal: tokens.spacing2\n },\n storyList: {\n fontSize: tokens.fontSize.normal,\n headerPaddingHorizontal: tokens.spacing2,\n headerPaddingVertical: tokens.spacing2,\n headerTextColor: text.primaryColor,\n headerFontWeight: \"500\",\n storyPaddingHorizontal: tokens.spacing2,\n storyPaddingVertical: tokens.spacing1 * 1.5,\n storyIndent: tokens.spacing6,\n storyTextColor: text.primaryColor,\n storyFontWeight: \"400\",\n storySelectedBackgroundColor: tokens.color.blue600,\n storySelectedTextColor: tokens.color.white,\n storySelectedFontWeight: \"700\",\n sectionSpacing: tokens.spacing2,\n sectionActiveBackgroundColor: tokens.color.blue200,\n sectionBorderRadius: tokens.borderRadius.medium,\n search: {\n fontSize: tokens.fontSize.normal,\n textColor: text.primaryColor,\n placeholderTextColor: text.secondaryColor,\n borderRadius: tokens.borderRadius.round,\n borderColor: tokens.color.blue400,\n borderWidth: tokens.borderWidthNormal,\n backgroundColor: tokens.color.white,\n paddingVertical: tokens.spacing2,\n paddingHorizontal: tokens.spacing3\n }\n },\n button: {\n fontSize: tokens.fontSize.smaller,\n fontWeight: \"600\",\n paddingVertical: tokens.spacing2,\n paddingHorizontal: tokens.spacing5,\n primary: {\n textColor: text.primaryColor,\n backgroundColor: tokens.color.blue250,\n borderColor: tokens.color.blue300,\n borderWidth: tokens.borderWidthNormal,\n borderRadius: tokens.borderRadius.medium\n },\n secondary: {\n textColor: text.primaryColor,\n backgroundColor: \"transparent\",\n borderColor: tokens.color.blue300,\n borderWidth: tokens.borderWidthNormal,\n borderRadius: tokens.borderRadius.medium\n }\n },\n tabs: {\n fontSize: tokens.fontSize.small,\n fontWeight: \"500\",\n paddingVertical: tokens.spacing2,\n paddingHorizontal: tokens.spacing2 * 1.25,\n borderWidth: tokens.borderWidthNormal,\n borderRadius: tokens.borderRadius.round,\n activeBorderColor: tokens.color.blue300,\n activeBackgroundColor: tokens.color.blue250,\n activeTextColor: text.primaryColor,\n inactiveBorderColor: \"transparent\",\n inactiveBackgroundColor: \"transparent\",\n inactiveTextColor: text.secondaryColor\n },\n inputs: {\n errorTextColor: tokens.color.red500,\n labelFontSize: tokens.fontSize.smaller,\n labelTextColor: text.primaryColor,\n text: {\n fontSize: tokens.fontSize.smaller,\n textColor: text.primaryColor,\n borderWidth: tokens.borderWidthNormal,\n borderColor: tokens.color.blue400,\n backgroundColor: tokens.color.white,\n borderRadius: tokens.borderRadius.medium,\n paddingVertical: tokens.spacing1 * 1.5,\n paddingHorizontal: tokens.spacing1 * 1.5\n },\n radio: {\n fontSize: tokens.fontSize.smaller,\n height: 20,\n borderWidth: tokens.borderWidthNormal,\n borderColor: tokens.color.blue400,\n backgroundColor: tokens.color.white,\n paddingVertical: 3,\n paddingHorizontal: 3,\n activeBackgroundColor: tokens.color.green500,\n itemSpacing: tokens.spacing1,\n labelSpacing: tokens.spacing2\n },\n swatch: {\n fontSize: tokens.fontSize.smaller,\n height: 40,\n borderWidth: tokens.borderWidthNormal,\n borderColor: tokens.color.blue400,\n backgroundColor: tokens.color.white,\n outerBorderRadius: tokens.borderRadius.medium,\n innerBorderRadius: tokens.borderRadius.small,\n paddingVertical: tokens.spacing1,\n paddingHorizontal: tokens.spacing1,\n nameTextWeight: \"600\"\n },\n slider: {\n fontSize: tokens.fontSize.smaller,\n labelTextColor: text.secondaryColor,\n valueTextColor: text.primaryColor\n }\n }\n};\nvar darkTheme = {\n tokens,\n text: textOnDark,\n backgroundColor: tokens.color.offBlack,\n preview: {\n containerBackgroundColor: tokens.color.black,\n backgroundColor: tokens.color.offBlack\n },\n navigation: {\n backgroundColor: tokens.color.offBlack,\n //tokens.color.black,\n borderColor: tokens.color.grey800,\n borderWidth: tokens.borderWidthNormal,\n visibilityBorderRadius: tokens.borderRadius.small,\n visibilityInnerBorderColor: tokens.color.navy,\n visibilityOuterBorderColor: tokens.color.navy\n },\n panel: {\n backgroundColor: tokens.color.offBlack,\n //tokens.color.blue100,\n borderWidth: tokens.borderWidthNormal,\n borderColor: tokens.color.grey800,\n paddingVertical: 0,\n paddingHorizontal: tokens.spacing2\n },\n storyList: {\n fontSize: tokens.fontSize.normal,\n headerPaddingHorizontal: tokens.spacing2,\n headerPaddingVertical: tokens.spacing2,\n headerTextColor: textOnDark.primaryColor,\n headerFontWeight: \"500\",\n storyPaddingHorizontal: tokens.spacing2,\n storyPaddingVertical: tokens.spacing1 * 1.5,\n storyIndent: tokens.spacing6,\n storyTextColor: textOnDark.primaryColor,\n storyFontWeight: \"400\",\n storySelectedBackgroundColor: tokens.color.navy,\n storySelectedTextColor: tokens.color.white,\n storySelectedFontWeight: \"700\",\n sectionSpacing: tokens.spacing2,\n sectionActiveBackgroundColor: tokens.color.grey800,\n sectionBorderRadius: tokens.borderRadius.medium,\n search: {\n fontSize: tokens.fontSize.normal,\n textColor: textOnDark.primaryColor,\n placeholderTextColor: textOnDark.secondaryColor,\n borderRadius: tokens.borderRadius.round,\n borderColor: tokens.color.grey800,\n //tokens.color.blue400,\n borderWidth: tokens.borderWidthNormal,\n backgroundColor: tokens.color.grey800,\n paddingVertical: tokens.spacing2,\n paddingHorizontal: tokens.spacing3\n }\n },\n button: {\n fontSize: tokens.fontSize.smaller,\n fontWeight: \"600\",\n paddingVertical: tokens.spacing2,\n paddingHorizontal: tokens.spacing5,\n primary: {\n textColor: textOnDark.primaryColor,\n backgroundColor: tokens.color.black,\n borderColor: tokens.color.blue300,\n borderWidth: tokens.borderWidthNormal,\n borderRadius: tokens.borderRadius.medium\n },\n secondary: {\n textColor: textOnDark.primaryColor,\n backgroundColor: \"transparent\",\n borderColor: tokens.color.blue300,\n borderWidth: tokens.borderWidthNormal,\n borderRadius: tokens.borderRadius.medium\n }\n },\n tabs: {\n fontSize: tokens.fontSize.small,\n fontWeight: \"500\",\n paddingVertical: tokens.spacing2,\n paddingHorizontal: tokens.spacing2 * 1.25,\n borderWidth: tokens.borderWidthNormal,\n borderRadius: tokens.borderRadius.round,\n activeBorderColor: tokens.color.blue300,\n activeBackgroundColor: tokens.color.navy,\n activeTextColor: textOnDark.primaryColor,\n inactiveBorderColor: \"transparent\",\n inactiveBackgroundColor: \"transparent\",\n inactiveTextColor: textOnDark.secondaryColor\n },\n inputs: {\n errorTextColor: tokens.color.red500,\n labelFontSize: tokens.fontSize.smaller,\n labelTextColor: textOnDark.primaryColor,\n text: {\n fontSize: tokens.fontSize.smaller,\n textColor: textOnDark.primaryColor,\n borderWidth: tokens.borderWidthNormal,\n borderColor: tokens.color.blue400,\n backgroundColor: tokens.color.black,\n borderRadius: tokens.borderRadius.medium,\n paddingVertical: tokens.spacing1 * 1.5,\n paddingHorizontal: tokens.spacing1 * 1.5\n },\n radio: {\n fontSize: tokens.fontSize.smaller,\n height: 20,\n borderWidth: tokens.borderWidthNormal,\n borderColor: tokens.color.blue400,\n backgroundColor: tokens.color.black,\n paddingVertical: 3,\n paddingHorizontal: 3,\n activeBackgroundColor: tokens.color.green500,\n itemSpacing: tokens.spacing1,\n labelSpacing: tokens.spacing2\n },\n swatch: {\n fontSize: tokens.fontSize.smaller,\n height: 40,\n borderWidth: tokens.borderWidthNormal,\n borderColor: tokens.color.blue400,\n backgroundColor: tokens.color.navy,\n outerBorderRadius: tokens.borderRadius.medium,\n innerBorderRadius: tokens.borderRadius.small,\n paddingVertical: tokens.spacing1,\n paddingHorizontal: tokens.spacing1,\n nameTextWeight: \"600\"\n },\n slider: {\n fontSize: tokens.fontSize.smaller,\n labelTextColor: textOnDark.secondaryColor,\n valueTextColor: textOnDark.primaryColor\n }\n }\n};\n\n// ../../node_modules/@emotion/native/dist/emotion-native.esm.js\nvar reactNative = __toESM(require(\"react-native\"));\nvar import_react_native = require(\"react-native\");\n\n// ../../node_modules/@emotion/primitives-core/dist/emotion-primitives-core.esm.js\nvar import_css_to_react_native = __toESM(require_css_to_react_native());\nvar React4 = __toESM(require(\"react\"));\n\n// ../../node_modules/@emotion/react/dist/emotion-element-6bdfffb2.esm.js\nvar React2 = __toESM(require(\"react\"));\nvar import_react = require(\"react\");\n\n// ../../node_modules/@emotion/react/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js\nfunction sheetForTag(tag) {\n if (tag.sheet) {\n return tag.sheet;\n }\n for (var i = 0; i < document.styleSheets.length; i++) {\n if (document.styleSheets[i].ownerNode === tag) {\n return document.styleSheets[i];\n }\n }\n}\nfunction createStyleElement(options) {\n var tag = document.createElement(\"style\");\n tag.setAttribute(\"data-emotion\", options.key);\n if (options.nonce !== void 0) {\n tag.setAttribute(\"nonce\", options.nonce);\n }\n tag.appendChild(document.createTextNode(\"\"));\n tag.setAttribute(\"data-s\", \"\");\n return tag;\n}\nvar StyleSheet = /* @__PURE__ */ function() {\n function StyleSheet4(options) {\n var _this = this;\n this._insertTag = function(tag) {\n var before;\n if (_this.tags.length === 0) {\n if (_this.insertionPoint) {\n before = _this.insertionPoint.nextSibling;\n } else if (_this.prepend) {\n before = _this.container.firstChild;\n } else {\n before = _this.before;\n }\n } else {\n before = _this.tags[_this.tags.length - 1].nextSibling;\n }\n _this.container.insertBefore(tag, before);\n _this.tags.push(tag);\n };\n this.isSpeedy = options.speedy === void 0 ? process.env.NODE_ENV === \"production\" : options.speedy;\n this.tags = [];\n this.ctr = 0;\n this.nonce = options.nonce;\n this.key = options.key;\n this.container = options.container;\n this.prepend = options.prepend;\n this.insertionPoint = options.insertionPoint;\n this.before = null;\n }\n var _proto = StyleSheet4.prototype;\n _proto.hydrate = function hydrate(nodes) {\n nodes.forEach(this._insertTag);\n };\n _proto.insert = function insert(rule) {\n if (this.ctr % (this.isSpeedy ? 65e3 : 1) === 0) {\n this._insertTag(createStyleElement(this));\n }\n var tag = this.tags[this.tags.length - 1];\n if (process.env.NODE_ENV !== \"production\") {\n var isImportRule3 = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105;\n if (isImportRule3 && this._alreadyInsertedOrderInsensitiveRule) {\n console.error(\"You're attempting to insert the following rule:\\n\" + rule + \"\\n\\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules.\");\n }\n this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule3;\n }\n if (this.isSpeedy) {\n var sheet = sheetForTag(tag);\n try {\n sheet.insertRule(rule, sheet.cssRules.length);\n } catch (e) {\n if (process.env.NODE_ENV !== \"production\" && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(rule)) {\n console.error('There was a problem inserting the following rule: \"' + rule + '\"', e);\n }\n }\n } else {\n tag.appendChild(document.createTextNode(rule));\n }\n this.ctr++;\n };\n _proto.flush = function flush() {\n this.tags.forEach(function(tag) {\n return tag.parentNode && tag.parentNode.removeChild(tag);\n });\n this.tags = [];\n this.ctr = 0;\n if (process.env.NODE_ENV !== \"production\") {\n this._alreadyInsertedOrderInsensitiveRule = false;\n }\n };\n return StyleSheet4;\n}();\n\n// ../../node_modules/stylis/src/Enum.js\nvar MS = \"-ms-\";\nvar MOZ = \"-moz-\";\nvar WEBKIT = \"-webkit-\";\nvar COMMENT = \"comm\";\nvar RULESET = \"rule\";\nvar DECLARATION = \"decl\";\nvar IMPORT = \"@import\";\nvar KEYFRAMES = \"@keyframes\";\nvar LAYER = \"@layer\";\n\n// ../../node_modules/stylis/src/Utility.js\nvar abs = Math.abs;\nvar from = String.fromCharCode;\nvar assign = Object.assign;\nfunction hash(value, length2) {\n return charat(value, 0) ^ 45 ? (((length2 << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;\n}\nfunction trim(value) {\n return value.trim();\n}\nfunction match(value, pattern) {\n return (value = pattern.exec(value)) ? value[0] : value;\n}\nfunction replace(value, pattern, replacement) {\n return value.replace(pattern, replacement);\n}\nfunction indexof(value, search) {\n return value.indexOf(search);\n}\nfunction charat(value, index2) {\n return value.charCodeAt(index2) | 0;\n}\nfunction substr(value, begin, end) {\n return value.slice(begin, end);\n}\nfunction strlen(value) {\n return value.length;\n}\nfunction sizeof(value) {\n return value.length;\n}\nfunction append(value, array) {\n return array.push(value), value;\n}\nfunction combine(array, callback) {\n return array.map(callback).join(\"\");\n}\n\n// ../../node_modules/stylis/src/Tokenizer.js\nvar line = 1;\nvar column = 1;\nvar length = 0;\nvar position = 0;\nvar character = 0;\nvar characters = \"\";\nfunction node(value, root, parent, type, props, children, length2) {\n return { value, root, parent, type, props, children, line, column, length: length2, return: \"\" };\n}\nfunction copy(root, props) {\n return assign(node(\"\", null, null, \"\", null, null, 0), root, { length: -root.length }, props);\n}\nfunction char() {\n return character;\n}\nfunction prev() {\n character = position > 0 ? charat(characters, --position) : 0;\n if (column--, character === 10)\n column = 1, line--;\n return character;\n}\nfunction next() {\n character = position < length ? charat(characters, position++) : 0;\n if (column++, character === 10)\n column = 1, line++;\n return character;\n}\nfunction peek() {\n return charat(characters, position);\n}\nfunction caret() {\n return position;\n}\nfunction slice(begin, end) {\n return substr(characters, begin, end);\n}\nfunction token(type) {\n switch (type) {\n case 0:\n case 9:\n case 10:\n case 13:\n case 32:\n return 5;\n case 33:\n case 43:\n case 44:\n case 47:\n case 62:\n case 64:\n case 126:\n case 59:\n case 123:\n case 125:\n return 4;\n case 58:\n return 3;\n case 34:\n case 39:\n case 40:\n case 91:\n return 2;\n case 41:\n case 93:\n return 1;\n }\n return 0;\n}\nfunction alloc(value) {\n return line = column = 1, length = strlen(characters = value), position = 0, [];\n}\nfunction dealloc(value) {\n return characters = \"\", value;\n}\nfunction delimit(type) {\n return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)));\n}\nfunction whitespace(type) {\n while (character = peek())\n if (character < 33)\n next();\n else\n break;\n return token(type) > 2 || token(character) > 3 ? \"\" : \" \";\n}\nfunction escaping(index2, count) {\n while (--count && next())\n if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97)\n break;\n return slice(index2, caret() + (count < 6 && peek() == 32 && next() == 32));\n}\nfunction delimiter(type) {\n while (next())\n switch (character) {\n case type:\n return position;\n case 34:\n case 39:\n if (type !== 34 && type !== 39)\n delimiter(character);\n break;\n case 40:\n if (type === 41)\n delimiter(type);\n break;\n case 92:\n next();\n break;\n }\n return position;\n}\nfunction commenter(type, index2) {\n while (next())\n if (type + character === 47 + 10)\n break;\n else if (type + character === 42 + 42 && peek() === 47)\n break;\n return \"/*\" + slice(index2, position - 1) + \"*\" + from(type === 47 ? type : next());\n}\nfunction identifier(index2) {\n while (!token(peek()))\n next();\n return slice(index2, position);\n}\n\n// ../../node_modules/stylis/src/Parser.js\nfunction compile(value) {\n return dealloc(parse(\"\", null, null, null, [\"\"], value = alloc(value), 0, [0], value));\n}\nfunction parse(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n var index2 = 0;\n var offset = 0;\n var length2 = pseudo;\n var atrule = 0;\n var property = 0;\n var previous = 0;\n var variable = 1;\n var scanning = 1;\n var ampersand = 1;\n var character2 = 0;\n var type = \"\";\n var props = rules;\n var children = rulesets;\n var reference = rule;\n var characters2 = type;\n while (scanning)\n switch (previous = character2, character2 = next()) {\n case 40:\n if (previous != 108 && charat(characters2, length2 - 1) == 58) {\n if (indexof(characters2 += replace(delimit(character2), \"&\", \"&\\f\"), \"&\\f\") != -1)\n ampersand = -1;\n break;\n }\n case 34:\n case 39:\n case 91:\n characters2 += delimit(character2);\n break;\n case 9:\n case 10:\n case 13:\n case 32:\n characters2 += whitespace(previous);\n break;\n case 92:\n characters2 += escaping(caret() - 1, 7);\n continue;\n case 47:\n switch (peek()) {\n case 42:\n case 47:\n append(comment(commenter(next(), caret()), root, parent), declarations);\n break;\n default:\n characters2 += \"/\";\n }\n break;\n case 123 * variable:\n points[index2++] = strlen(characters2) * ampersand;\n case 125 * variable:\n case 59:\n case 0:\n switch (character2) {\n case 0:\n case 125:\n scanning = 0;\n case 59 + offset:\n if (ampersand == -1)\n characters2 = replace(characters2, /\\f/g, \"\");\n if (property > 0 && strlen(characters2) - length2)\n append(property > 32 ? declaration(characters2 + \";\", rule, parent, length2 - 1) : declaration(replace(characters2, \" \", \"\") + \";\", rule, parent, length2 - 2), declarations);\n break;\n case 59:\n characters2 += \";\";\n default:\n append(reference = ruleset(characters2, root, parent, index2, offset, rules, points, type, props = [], children = [], length2), rulesets);\n if (character2 === 123)\n if (offset === 0)\n parse(characters2, root, reference, reference, props, rulesets, length2, points, children);\n else\n switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) {\n case 100:\n case 108:\n case 109:\n case 115:\n parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length2), children), rules, children, length2, points, rule ? props : children);\n break;\n default:\n parse(characters2, reference, reference, reference, [\"\"], children, 0, points, children);\n }\n }\n index2 = offset = property = 0, variable = ampersand = 1, type = characters2 = \"\", length2 = pseudo;\n break;\n case 58:\n length2 = 1 + strlen(characters2), property = previous;\n default:\n if (variable < 1) {\n if (character2 == 123)\n --variable;\n else if (character2 == 125 && variable++ == 0 && prev() == 125)\n continue;\n }\n switch (characters2 += from(character2), character2 * variable) {\n case 38:\n ampersand = offset > 0 ? 1 : (characters2 += \"\\f\", -1);\n break;\n case 44:\n points[index2++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;\n break;\n case 64:\n if (peek() === 45)\n characters2 += delimit(next());\n atrule = peek(), offset = length2 = strlen(type = characters2 += identifier(caret())), character2++;\n break;\n case 45:\n if (previous === 45 && strlen(characters2) == 2)\n variable = 0;\n }\n }\n return rulesets;\n}\nfunction ruleset(value, root, parent, index2, offset, rules, points, type, props, children, length2) {\n var post = offset - 1;\n var rule = offset === 0 ? rules : [\"\"];\n var size = sizeof(rule);\n for (var i = 0, j = 0, k = 0; i < index2; ++i)\n for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n if (z = trim(j > 0 ? rule[x] + \" \" + y : replace(y, /&\\f/g, rule[x])))\n props[k++] = z;\n return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length2);\n}\nfunction comment(value, root, parent) {\n return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0);\n}\nfunction declaration(value, root, parent, length2) {\n return node(value, root, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2);\n}\n\n// ../../node_modules/stylis/src/Serializer.js\nfunction serialize(children, callback) {\n var output = \"\";\n var length2 = sizeof(children);\n for (var i = 0; i < length2; i++)\n output += callback(children[i], i, children, callback) || \"\";\n return output;\n}\nfunction stringify(element, index2, children, callback) {\n switch (element.type) {\n case LAYER:\n if (element.children.length)\n break;\n case IMPORT:\n case DECLARATION:\n return element.return = element.return || element.value;\n case COMMENT:\n return \"\";\n case KEYFRAMES:\n return element.return = element.value + \"{\" + serialize(element.children, callback) + \"}\";\n case RULESET:\n element.value = element.props.join(\",\");\n }\n return strlen(children = serialize(element.children, callback)) ? element.return = element.value + \"{\" + children + \"}\" : \"\";\n}\n\n// ../../node_modules/stylis/src/Middleware.js\nfunction middleware(collection) {\n var length2 = sizeof(collection);\n return function(element, index2, children, callback) {\n var output = \"\";\n for (var i = 0; i < length2; i++)\n output += collection[i](element, index2, children, callback) || \"\";\n return output;\n };\n}\nfunction rulesheet(callback) {\n return function(element) {\n if (!element.root) {\n if (element = element.return)\n callback(element);\n }\n };\n}\n\n// ../../node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js\nvar weakMemoize = function weakMemoize2(func) {\n var cache = /* @__PURE__ */ new WeakMap();\n return function(arg) {\n if (cache.has(arg)) {\n return cache.get(arg);\n }\n var ret = func(arg);\n cache.set(arg, ret);\n return ret;\n };\n};\n\n// ../../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js\nfunction memoize(fn) {\n var cache = /* @__PURE__ */ Object.create(null);\n return function(arg) {\n if (cache[arg] === void 0)\n cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\n// ../../node_modules/@emotion/react/node_modules/@emotion/cache/dist/emotion-cache.esm.js\nvar identifierWithPointTracking = function identifierWithPointTracking2(begin, points, index2) {\n var previous = 0;\n var character2 = 0;\n while (true) {\n previous = character2;\n character2 = peek();\n if (previous === 38 && character2 === 12) {\n points[index2] = 1;\n }\n if (token(character2)) {\n break;\n }\n next();\n }\n return slice(begin, position);\n};\nvar toRules = function toRules2(parsed, points) {\n var index2 = -1;\n var character2 = 44;\n do {\n switch (token(character2)) {\n case 0:\n if (character2 === 38 && peek() === 12) {\n points[index2] = 1;\n }\n parsed[index2] += identifierWithPointTracking(position - 1, points, index2);\n break;\n case 2:\n parsed[index2] += delimit(character2);\n break;\n case 4:\n if (character2 === 44) {\n parsed[++index2] = peek() === 58 ? \"&\\f\" : \"\";\n points[index2] = parsed[index2].length;\n break;\n }\n default:\n parsed[index2] += from(character2);\n }\n } while (character2 = next());\n return parsed;\n};\nvar getRules = function getRules2(value, points) {\n return dealloc(toRules(alloc(value), points));\n};\nvar fixedElements = /* @__PURE__ */ new WeakMap();\nvar compat = function compat2(element) {\n if (element.type !== \"rule\" || !element.parent || // positive .length indicates that this rule contains pseudo\n // negative .length indicates that this rule has been already prefixed\n element.length < 1) {\n return;\n }\n var value = element.value, parent = element.parent;\n var isImplicitRule = element.column === parent.column && element.line === parent.line;\n while (parent.type !== \"rule\") {\n parent = parent.parent;\n if (!parent)\n return;\n }\n if (element.props.length === 1 && value.charCodeAt(0) !== 58 && !fixedElements.get(parent)) {\n return;\n }\n if (isImplicitRule) {\n return;\n }\n fixedElements.set(element, true);\n var points = [];\n var rules = getRules(value, points);\n var parentRules = parent.props;\n for (var i = 0, k = 0; i < rules.length; i++) {\n for (var j = 0; j < parentRules.length; j++, k++) {\n element.props[k] = points[i] ? rules[i].replace(/&\\f/g, parentRules[j]) : parentRules[j] + \" \" + rules[i];\n }\n }\n};\nvar removeLabel = function removeLabel2(element) {\n if (element.type === \"decl\") {\n var value = element.value;\n if (\n // charcode for l\n value.charCodeAt(0) === 108 && // charcode for b\n value.charCodeAt(2) === 98\n ) {\n element[\"return\"] = \"\";\n element.value = \"\";\n }\n }\n};\nvar ignoreFlag = \"emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason\";\nvar isIgnoringComment = function isIgnoringComment2(element) {\n return element.type === \"comm\" && element.children.indexOf(ignoreFlag) > -1;\n};\nvar createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm2(cache) {\n return function(element, index2, children) {\n if (element.type !== \"rule\" || cache.compat)\n return;\n var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);\n if (unsafePseudoClasses) {\n var isNested = !!element.parent;\n var commentContainer = isNested ? element.parent.children : (\n // global rule at the root level\n children\n );\n for (var i = commentContainer.length - 1; i >= 0; i--) {\n var node2 = commentContainer[i];\n if (node2.line < element.line) {\n break;\n }\n if (node2.column < element.column) {\n if (isIgnoringComment(node2)) {\n return;\n }\n break;\n }\n }\n unsafePseudoClasses.forEach(function(unsafePseudoClass) {\n console.error('The pseudo class \"' + unsafePseudoClass + '\" is potentially unsafe when doing server-side rendering. Try changing it to \"' + unsafePseudoClass.split(\"-child\")[0] + '-of-type\".');\n });\n }\n };\n};\nvar isImportRule = function isImportRule2(element) {\n return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64;\n};\nvar isPrependedWithRegularRules = function isPrependedWithRegularRules2(index2, children) {\n for (var i = index2 - 1; i >= 0; i--) {\n if (!isImportRule(children[i])) {\n return true;\n }\n }\n return false;\n};\nvar nullifyElement = function nullifyElement2(element) {\n element.type = \"\";\n element.value = \"\";\n element[\"return\"] = \"\";\n element.children = \"\";\n element.props = \"\";\n};\nvar incorrectImportAlarm = function incorrectImportAlarm2(element, index2, children) {\n if (!isImportRule(element)) {\n return;\n }\n if (element.parent) {\n console.error(\"`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles.\");\n nullifyElement(element);\n } else if (isPrependedWithRegularRules(index2, children)) {\n console.error(\"`@import` rules can't be after other rules. Please put your `@import` rules before your other rules.\");\n nullifyElement(element);\n }\n};\nfunction prefix(value, length2) {\n switch (hash(value, length2)) {\n case 5103:\n return WEBKIT + \"print-\" + value + value;\n case 5737:\n case 4201:\n case 3177:\n case 3433:\n case 1641:\n case 4457:\n case 2921:\n case 5572:\n case 6356:\n case 5844:\n case 3191:\n case 6645:\n case 3005:\n case 6391:\n case 5879:\n case 5623:\n case 6135:\n case 4599:\n case 4855:\n case 4215:\n case 6389:\n case 5109:\n case 5365:\n case 5621:\n case 3829:\n return WEBKIT + value + value;\n case 5349:\n case 4246:\n case 4810:\n case 6968:\n case 2756:\n return WEBKIT + value + MOZ + value + MS + value + value;\n case 6828:\n case 4268:\n return WEBKIT + value + MS + value + value;\n case 6165:\n return WEBKIT + value + MS + \"flex-\" + value + value;\n case 5187:\n return WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + \"box-$1$2\" + MS + \"flex-$1$2\") + value;\n case 5443:\n return WEBKIT + value + MS + \"flex-item-\" + replace(value, /flex-|-self/, \"\") + value;\n case 4675:\n return WEBKIT + value + MS + \"flex-line-pack\" + replace(value, /align-content|flex-|-self/, \"\") + value;\n case 5548:\n return WEBKIT + value + MS + replace(value, \"shrink\", \"negative\") + value;\n case 5292:\n return WEBKIT + value + MS + replace(value, \"basis\", \"preferred-size\") + value;\n case 6060:\n return WEBKIT + \"box-\" + replace(value, \"-grow\", \"\") + WEBKIT + value + MS + replace(value, \"grow\", \"positive\") + value;\n case 4554:\n return WEBKIT + replace(value, /([^-])(transform)/g, \"$1\" + WEBKIT + \"$2\") + value;\n case 6187:\n return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + \"$1\"), /(image-set)/, WEBKIT + \"$1\"), value, \"\") + value;\n case 5495:\n case 3959:\n return replace(value, /(image-set\\([^]*)/, WEBKIT + \"$1$`$1\");\n case 4968:\n return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + \"box-pack:$3\" + MS + \"flex-pack:$3\"), /s.+-b[^;]+/, \"justify\") + WEBKIT + value + value;\n case 4095:\n case 3583:\n case 4068:\n case 2532:\n return replace(value, /(.+)-inline(.+)/, WEBKIT + \"$1$2\") + value;\n case 8116:\n case 7059:\n case 5753:\n case 5535:\n case 5445:\n case 5701:\n case 4933:\n case 4677:\n case 5533:\n case 5789:\n case 5021:\n case 4765:\n if (strlen(value) - 1 - length2 > 6)\n switch (charat(value, length2 + 1)) {\n case 109:\n if (charat(value, length2 + 4) !== 45)\n break;\n case 102:\n return replace(value, /(.+:)(.+)-([^]+)/, \"$1\" + WEBKIT + \"$2-$3$1\" + MOZ + (charat(value, length2 + 3) == 108 ? \"$3\" : \"$2-$3\")) + value;\n case 115:\n return ~indexof(value, \"stretch\") ? prefix(replace(value, \"stretch\", \"fill-available\"), length2) + value : value;\n }\n break;\n case 4949:\n if (charat(value, length2 + 1) !== 115)\n break;\n case 6444:\n switch (charat(value, strlen(value) - 3 - (~indexof(value, \"!important\") && 10))) {\n case 107:\n return replace(value, \":\", \":\" + WEBKIT) + value;\n case 101:\n return replace(value, /(.+:)([^;!]+)(;|!.+)?/, \"$1\" + WEBKIT + (charat(value, 14) === 45 ? \"inline-\" : \"\") + \"box$3$1\" + WEBKIT + \"$2$3$1\" + MS + \"$2box$3\") + value;\n }\n break;\n case 5936:\n switch (charat(value, length2 + 11)) {\n case 114:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, \"tb\") + value;\n case 108:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, \"tb-rl\") + value;\n case 45:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, \"lr\") + value;\n }\n return WEBKIT + value + MS + value + value;\n }\n return value;\n}\nvar prefixer = function prefixer2(element, index2, children, callback) {\n if (element.length > -1) {\n if (!element[\"return\"])\n switch (element.type) {\n case DECLARATION:\n element[\"return\"] = prefix(element.value, element.length);\n break;\n case KEYFRAMES:\n return serialize([copy(element, {\n value: replace(element.value, \"@\", \"@\" + WEBKIT)\n })], callback);\n case RULESET:\n if (element.length)\n return combine(element.props, function(value) {\n switch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n case \":read-only\":\n case \":read-write\":\n return serialize([copy(element, {\n props: [replace(value, /:(read-\\w+)/, \":\" + MOZ + \"$1\")]\n })], callback);\n case \"::placeholder\":\n return serialize([copy(element, {\n props: [replace(value, /:(plac\\w+)/, \":\" + WEBKIT + \"input-$1\")]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, \":\" + MOZ + \"$1\")]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, MS + \"input-$1\")]\n })], callback);\n }\n return \"\";\n });\n }\n }\n};\nvar isBrowser = typeof document !== \"undefined\";\nvar getServerStylisCache = isBrowser ? void 0 : weakMemoize(function() {\n return memoize(function() {\n var cache = {};\n return function(name) {\n return cache[name];\n };\n });\n});\nvar defaultStylisPlugins = [prefixer];\nvar createCache = function createCache2(options) {\n var key = options.key;\n if (process.env.NODE_ENV !== \"production\" && !key) {\n throw new Error(\"You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\\nIf multiple caches share the same key they might \\\"fight\\\" for each other's style elements.\");\n }\n if (isBrowser && key === \"css\") {\n var ssrStyles = document.querySelectorAll(\"style[data-emotion]:not([data-s])\");\n Array.prototype.forEach.call(ssrStyles, function(node2) {\n var dataEmotionAttribute = node2.getAttribute(\"data-emotion\");\n if (dataEmotionAttribute.indexOf(\" \") === -1) {\n return;\n }\n document.head.appendChild(node2);\n node2.setAttribute(\"data-s\", \"\");\n });\n }\n var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;\n if (process.env.NODE_ENV !== \"production\") {\n if (/[^a-z-]/.test(key)) {\n throw new Error('Emotion key must only contain lower case alphabetical characters and - but \"' + key + '\" was passed');\n }\n }\n var inserted = {};\n var container;\n var nodesToHydrate = [];\n if (isBrowser) {\n container = options.container || document.head;\n Array.prototype.forEach.call(\n // this means we will ignore elements which don't have a space in them which\n // means that the style elements we're looking at are only Emotion 11 server-rendered style elements\n document.querySelectorAll('style[data-emotion^=\"' + key + ' \"]'),\n function(node2) {\n var attrib = node2.getAttribute(\"data-emotion\").split(\" \");\n for (var i = 1; i < attrib.length; i++) {\n inserted[attrib[i]] = true;\n }\n nodesToHydrate.push(node2);\n }\n );\n }\n var _insert;\n var omnipresentPlugins = [compat, removeLabel];\n if (process.env.NODE_ENV !== \"production\") {\n omnipresentPlugins.push(createUnsafeSelectorsAlarm({\n get compat() {\n return cache.compat;\n }\n }), incorrectImportAlarm);\n }\n if (isBrowser) {\n var currentSheet;\n var finalizingPlugins = [stringify, process.env.NODE_ENV !== \"production\" ? function(element) {\n if (!element.root) {\n if (element[\"return\"]) {\n currentSheet.insert(element[\"return\"]);\n } else if (element.value && element.type !== COMMENT) {\n currentSheet.insert(element.value + \"{}\");\n }\n }\n } : rulesheet(function(rule) {\n currentSheet.insert(rule);\n })];\n var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));\n var stylis = function stylis2(styles2) {\n return serialize(compile(styles2), serializer);\n };\n _insert = function insert(selector, serialized, sheet, shouldCache) {\n currentSheet = sheet;\n if (process.env.NODE_ENV !== \"production\" && serialized.map !== void 0) {\n currentSheet = {\n insert: function insert2(rule) {\n sheet.insert(rule + serialized.map);\n }\n };\n }\n stylis(selector ? selector + \"{\" + serialized.styles + \"}\" : serialized.styles);\n if (shouldCache) {\n cache.inserted[serialized.name] = true;\n }\n };\n } else {\n var _finalizingPlugins = [stringify];\n var _serializer = middleware(omnipresentPlugins.concat(stylisPlugins, _finalizingPlugins));\n var _stylis = function _stylis2(styles2) {\n return serialize(compile(styles2), _serializer);\n };\n var serverStylisCache = getServerStylisCache(stylisPlugins)(key);\n var getRules3 = function getRules4(selector, serialized) {\n var name = serialized.name;\n if (serverStylisCache[name] === void 0) {\n serverStylisCache[name] = _stylis(selector ? selector + \"{\" + serialized.styles + \"}\" : serialized.styles);\n }\n return serverStylisCache[name];\n };\n _insert = function _insert2(selector, serialized, sheet, shouldCache) {\n var name = serialized.name;\n var rules = getRules3(selector, serialized);\n if (cache.compat === void 0) {\n if (shouldCache) {\n cache.inserted[name] = true;\n }\n if (\n // using === development instead of !== production\n // because if people do ssr in tests, the source maps showing up would be annoying\n process.env.NODE_ENV === \"development\" && serialized.map !== void 0\n ) {\n return rules + serialized.map;\n }\n return rules;\n } else {\n if (shouldCache) {\n cache.inserted[name] = rules;\n } else {\n return rules;\n }\n }\n };\n }\n var cache = {\n key,\n sheet: new StyleSheet({\n key,\n container,\n nonce: options.nonce,\n speedy: options.speedy,\n prepend: options.prepend,\n insertionPoint: options.insertionPoint\n }),\n nonce: options.nonce,\n inserted,\n registered: {},\n insert: _insert\n };\n cache.sheet.hydrate(nodesToHydrate);\n return cache;\n};\n\n// ../../node_modules/@emotion/react/node_modules/@babel/runtime/helpers/esm/extends.js\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\n// ../../node_modules/@emotion/react/node_modules/@emotion/utils/dist/emotion-utils.esm.js\nvar isBrowser2 = typeof document !== \"undefined\";\nfunction getRegisteredStyles(registered, registeredStyles, classNames) {\n var rawClassName = \"\";\n classNames.split(\" \").forEach(function(className) {\n if (registered[className] !== void 0) {\n registeredStyles.push(registered[className] + \";\");\n } else {\n rawClassName += className + \" \";\n }\n });\n return rawClassName;\n}\nvar registerStyles = function registerStyles2(cache, serialized, isStringTag) {\n var className = cache.key + \"-\" + serialized.name;\n if (\n // we only need to add the styles to the registered cache if the\n // class name could be used further down\n // the tree but if it's a string tag, we know it won't\n // so we don't have to add it to registered cache.\n // this improves memory usage since we can avoid storing the whole style string\n (isStringTag === false || // we need to always store it if we're in compat mode and\n // in node since emotion-server relies on whether a style is in\n // the registered cache to know whether a style is global or not\n // also, note that this check will be dead code eliminated in the browser\n isBrowser2 === false && cache.compat !== void 0) && cache.registered[className] === void 0\n ) {\n cache.registered[className] = serialized.styles;\n }\n};\nvar insertStyles = function insertStyles2(cache, serialized, isStringTag) {\n registerStyles(cache, serialized, isStringTag);\n var className = cache.key + \"-\" + serialized.name;\n if (cache.inserted[serialized.name] === void 0) {\n var stylesForSSR = \"\";\n var current = serialized;\n do {\n var maybeStyles = cache.insert(serialized === current ? \".\" + className : \"\", current, cache.sheet, true);\n if (!isBrowser2 && maybeStyles !== void 0) {\n stylesForSSR += maybeStyles;\n }\n current = current.next;\n } while (current !== void 0);\n if (!isBrowser2 && stylesForSSR.length !== 0) {\n return stylesForSSR;\n }\n }\n};\n\n// ../../node_modules/@emotion/react/node_modules/@emotion/hash/dist/emotion-hash.esm.js\nfunction murmur2(str) {\n var h = 0;\n var k, i = 0, len = str.length;\n for (; len >= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 255 | (str.charCodeAt(++i) & 255) << 8 | (str.charCodeAt(++i) & 255) << 16 | (str.charCodeAt(++i) & 255) << 24;\n k = /* Math.imul(k, m): */\n (k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16);\n k ^= /* k >>> r: */\n k >>> 24;\n h = /* Math.imul(k, m): */\n (k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */\n (h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);\n }\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 255) << 16;\n case 2:\n h ^= (str.charCodeAt(i + 1) & 255) << 8;\n case 1:\n h ^= str.charCodeAt(i) & 255;\n h = /* Math.imul(h, m): */\n (h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);\n }\n h ^= h >>> 13;\n h = /* Math.imul(h, m): */\n (h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\n// ../../node_modules/@emotion/react/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js\nvar unitlessKeys = {\n animationIterationCount: 1,\n aspectRatio: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\n// ../../node_modules/@emotion/react/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js\nvar ILLEGAL_ESCAPE_SEQUENCE_ERROR = `You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\\\00d7';\" should become \"content: '\\\\\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`;\nvar UNDEFINED_AS_OBJECT_KEY_ERROR = \"You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).\";\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;\nvar isCustomProperty = function isCustomProperty2(property) {\n return property.charCodeAt(1) === 45;\n};\nvar isProcessableValue = function isProcessableValue2(value) {\n return value != null && typeof value !== \"boolean\";\n};\nvar processStyleName = /* @__PURE__ */ memoize(function(styleName) {\n return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, \"-$&\").toLowerCase();\n});\nvar processStyleValue = function processStyleValue2(key, value) {\n switch (key) {\n case \"animation\":\n case \"animationName\": {\n if (typeof value === \"string\") {\n return value.replace(animationRegex, function(match2, p1, p2) {\n cursor = {\n name: p1,\n styles: p2,\n next: cursor\n };\n return p1;\n });\n }\n }\n }\n if (unitlessKeys[key] !== 1 && !isCustomProperty(key) && typeof value === \"number\" && value !== 0) {\n return value + \"px\";\n }\n return value;\n};\nif (process.env.NODE_ENV !== \"production\") {\n contentValuePattern = /(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\\(|(no-)?(open|close)-quote/;\n contentValues = [\"normal\", \"none\", \"initial\", \"inherit\", \"unset\"];\n oldProcessStyleValue = processStyleValue;\n msPattern = /^-ms-/;\n hyphenPattern = /-(.)/g;\n hyphenatedCache = {};\n processStyleValue = function processStyleValue3(key, value) {\n if (key === \"content\") {\n if (typeof value !== \"string\" || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '\"' && value.charAt(0) !== \"'\")) {\n throw new Error(\"You seem to be using a value for 'content' without quotes, try replacing it with `content: '\\\"\" + value + \"\\\"'`\");\n }\n }\n var processed = oldProcessStyleValue(key, value);\n if (processed !== \"\" && !isCustomProperty(key) && key.indexOf(\"-\") !== -1 && hyphenatedCache[key] === void 0) {\n hyphenatedCache[key] = true;\n console.error(\"Using kebab-case for css properties in objects is not supported. Did you mean \" + key.replace(msPattern, \"ms-\").replace(hyphenPattern, function(str, _char) {\n return _char.toUpperCase();\n }) + \"?\");\n }\n return processed;\n };\n}\nvar contentValuePattern;\nvar contentValues;\nvar oldProcessStyleValue;\nvar msPattern;\nvar hyphenPattern;\nvar hyphenatedCache;\nvar noComponentSelectorMessage = \"Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.\";\nfunction handleInterpolation(mergedProps, registered, interpolation) {\n if (interpolation == null) {\n return \"\";\n }\n if (interpolation.__emotion_styles !== void 0) {\n if (process.env.NODE_ENV !== \"production\" && interpolation.toString() === \"NO_COMPONENT_SELECTOR\") {\n throw new Error(noComponentSelectorMessage);\n }\n return interpolation;\n }\n switch (typeof interpolation) {\n case \"boolean\": {\n return \"\";\n }\n case \"object\": {\n if (interpolation.anim === 1) {\n cursor = {\n name: interpolation.name,\n styles: interpolation.styles,\n next: cursor\n };\n return interpolation.name;\n }\n if (interpolation.styles !== void 0) {\n var next2 = interpolation.next;\n if (next2 !== void 0) {\n while (next2 !== void 0) {\n cursor = {\n name: next2.name,\n styles: next2.styles,\n next: cursor\n };\n next2 = next2.next;\n }\n }\n var styles2 = interpolation.styles + \";\";\n if (process.env.NODE_ENV !== \"production\" && interpolation.map !== void 0) {\n styles2 += interpolation.map;\n }\n return styles2;\n }\n return createStringFromObject(mergedProps, registered, interpolation);\n }\n case \"function\": {\n if (mergedProps !== void 0) {\n var previousCursor = cursor;\n var result = interpolation(mergedProps);\n cursor = previousCursor;\n return handleInterpolation(mergedProps, registered, result);\n } else if (process.env.NODE_ENV !== \"production\") {\n console.error(\"Functions that are interpolated in css calls will be stringified.\\nIf you want to have a css call based on props, create a function that returns a css call like this\\nlet dynamicStyle = (props) => css`color: ${props.color}`\\nIt can be called directly with props or interpolated in a styled call like this\\nlet SomeComponent = styled('div')`${dynamicStyle}`\");\n }\n break;\n }\n case \"string\":\n if (process.env.NODE_ENV !== \"production\") {\n var matched = [];\n var replaced = interpolation.replace(animationRegex, function(match2, p1, p2) {\n var fakeVarName = \"animation\" + matched.length;\n matched.push(\"const \" + fakeVarName + \" = keyframes`\" + p2.replace(/^@keyframes animation-\\w+/, \"\") + \"`\");\n return \"${\" + fakeVarName + \"}\";\n });\n if (matched.length) {\n console.error(\"`keyframes` output got interpolated into plain string, please wrap it with `css`.\\n\\nInstead of doing this:\\n\\n\" + [].concat(matched, [\"`\" + replaced + \"`\"]).join(\"\\n\") + \"\\n\\nYou should wrap it with `css` like this:\\n\\n\" + (\"css`\" + replaced + \"`\"));\n }\n }\n break;\n }\n if (registered == null) {\n return interpolation;\n }\n var cached = registered[interpolation];\n return cached !== void 0 ? cached : interpolation;\n}\nfunction createStringFromObject(mergedProps, registered, obj) {\n var string = \"\";\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n string += handleInterpolation(mergedProps, registered, obj[i]) + \";\";\n }\n } else {\n for (var _key in obj) {\n var value = obj[_key];\n if (typeof value !== \"object\") {\n if (registered != null && registered[value] !== void 0) {\n string += _key + \"{\" + registered[value] + \"}\";\n } else if (isProcessableValue(value)) {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value) + \";\";\n }\n } else {\n if (_key === \"NO_COMPONENT_SELECTOR\" && process.env.NODE_ENV !== \"production\") {\n throw new Error(noComponentSelectorMessage);\n }\n if (Array.isArray(value) && typeof value[0] === \"string\" && (registered == null || registered[value[0]] === void 0)) {\n for (var _i = 0; _i < value.length; _i++) {\n if (isProcessableValue(value[_i])) {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value[_i]) + \";\";\n }\n }\n } else {\n var interpolated = handleInterpolation(mergedProps, registered, value);\n switch (_key) {\n case \"animation\":\n case \"animationName\": {\n string += processStyleName(_key) + \":\" + interpolated + \";\";\n break;\n }\n default: {\n if (process.env.NODE_ENV !== \"production\" && _key === \"undefined\") {\n console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);\n }\n string += _key + \"{\" + interpolated + \"}\";\n }\n }\n }\n }\n }\n }\n return string;\n}\nvar labelPattern = /label:\\s*([^\\s;\\n{]+)\\s*(;|$)/g;\nvar sourceMapPattern;\nif (process.env.NODE_ENV !== \"production\") {\n sourceMapPattern = /\\/\\*#\\ssourceMappingURL=data:application\\/json;\\S+\\s+\\*\\//g;\n}\nvar cursor;\nvar serializeStyles = function serializeStyles2(args, registered, mergedProps) {\n if (args.length === 1 && typeof args[0] === \"object\" && args[0] !== null && args[0].styles !== void 0) {\n return args[0];\n }\n var stringMode = true;\n var styles2 = \"\";\n cursor = void 0;\n var strings = args[0];\n if (strings == null || strings.raw === void 0) {\n stringMode = false;\n styles2 += handleInterpolation(mergedProps, registered, strings);\n } else {\n if (process.env.NODE_ENV !== \"production\" && strings[0] === void 0) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n styles2 += strings[0];\n }\n for (var i = 1; i < args.length; i++) {\n styles2 += handleInterpolation(mergedProps, registered, args[i]);\n if (stringMode) {\n if (process.env.NODE_ENV !== \"production\" && strings[i] === void 0) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n styles2 += strings[i];\n }\n }\n var sourceMap;\n if (process.env.NODE_ENV !== \"production\") {\n styles2 = styles2.replace(sourceMapPattern, function(match3) {\n sourceMap = match3;\n return \"\";\n });\n }\n labelPattern.lastIndex = 0;\n var identifierName = \"\";\n var match2;\n while ((match2 = labelPattern.exec(styles2)) !== null) {\n identifierName += \"-\" + // $FlowFixMe we know it's not null\n match2[1];\n }\n var name = murmur2(styles2) + identifierName;\n if (process.env.NODE_ENV !== \"production\") {\n return {\n name,\n styles: styles2,\n map: sourceMap,\n next: cursor,\n toString: function toString() {\n return \"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).\";\n }\n };\n }\n return {\n name,\n styles: styles2,\n next: cursor\n };\n};\n\n// ../../node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js\nvar React = __toESM(require(\"react\"));\nvar isBrowser3 = typeof document !== \"undefined\";\nvar syncFallback = function syncFallback2(create) {\n return create();\n};\nvar useInsertionEffect2 = React[\"useInsertionEffect\"] ? React[\"useInsertionEffect\"] : false;\nvar useInsertionEffectAlwaysWithSyncFallback = !isBrowser3 ? syncFallback : useInsertionEffect2 || syncFallback;\nvar useInsertionEffectWithLayoutFallback = useInsertionEffect2 || React.useLayoutEffect;\n\n// ../../node_modules/@emotion/react/dist/emotion-element-6bdfffb2.esm.js\nvar isBrowser4 = typeof document !== \"undefined\";\nvar hasOwnProperty = {}.hasOwnProperty;\nvar EmotionCacheContext = /* @__PURE__ */ React2.createContext(\n // we're doing this to avoid preconstruct's dead code elimination in this one case\n // because this module is primarily intended for the browser and node\n // but it's also required in react native and similar environments sometimes\n // and we could have a special build just for that\n // but this is much easier and the native packages\n // might use a different theme context in the future anyway\n typeof HTMLElement !== \"undefined\" ? /* @__PURE__ */ createCache({\n key: \"css\"\n }) : null\n);\nif (process.env.NODE_ENV !== \"production\") {\n EmotionCacheContext.displayName = \"EmotionCacheContext\";\n}\nvar CacheProvider = EmotionCacheContext.Provider;\nvar withEmotionCache = function withEmotionCache2(func) {\n return /* @__PURE__ */ (0, import_react.forwardRef)(function(props, ref) {\n var cache = (0, import_react.useContext)(EmotionCacheContext);\n return func(props, cache, ref);\n });\n};\nif (!isBrowser4) {\n withEmotionCache = function withEmotionCache3(func) {\n return function(props) {\n var cache = (0, import_react.useContext)(EmotionCacheContext);\n if (cache === null) {\n cache = createCache({\n key: \"css\"\n });\n return /* @__PURE__ */ React2.createElement(EmotionCacheContext.Provider, {\n value: cache\n }, func(props, cache));\n } else {\n return func(props, cache);\n }\n };\n };\n}\nvar ThemeContext = /* @__PURE__ */ React2.createContext({});\nif (process.env.NODE_ENV !== \"production\") {\n ThemeContext.displayName = \"EmotionThemeContext\";\n}\nvar useTheme = function useTheme2() {\n return React2.useContext(ThemeContext);\n};\nvar getTheme = function getTheme2(outerTheme, theme2) {\n if (typeof theme2 === \"function\") {\n var mergedTheme = theme2(outerTheme);\n if (process.env.NODE_ENV !== \"production\" && (mergedTheme == null || typeof mergedTheme !== \"object\" || Array.isArray(mergedTheme))) {\n throw new Error(\"[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!\");\n }\n return mergedTheme;\n }\n if (process.env.NODE_ENV !== \"production\" && (theme2 == null || typeof theme2 !== \"object\" || Array.isArray(theme2))) {\n throw new Error(\"[ThemeProvider] Please make your theme prop a plain object\");\n }\n return _extends({}, outerTheme, theme2);\n};\nvar createCacheWithTheme = /* @__PURE__ */ weakMemoize(function(outerTheme) {\n return weakMemoize(function(theme2) {\n return getTheme(outerTheme, theme2);\n });\n});\nvar ThemeProvider = function ThemeProvider2(props) {\n var theme2 = React2.useContext(ThemeContext);\n if (props.theme !== theme2) {\n theme2 = createCacheWithTheme(theme2)(props.theme);\n }\n return /* @__PURE__ */ React2.createElement(ThemeContext.Provider, {\n value: theme2\n }, props.children);\n};\nvar typePropName = \"__EMOTION_TYPE_PLEASE_DO_NOT_USE__\";\nvar labelPropName = \"__EMOTION_LABEL_PLEASE_DO_NOT_USE__\";\nvar Insertion = function Insertion2(_ref) {\n var cache = _ref.cache, serialized = _ref.serialized, isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n var rules = useInsertionEffectAlwaysWithSyncFallback(function() {\n return insertStyles(cache, serialized, isStringTag);\n });\n if (!isBrowser4 && rules !== void 0) {\n var _ref2;\n var serializedNames = serialized.name;\n var next2 = serialized.next;\n while (next2 !== void 0) {\n serializedNames += \" \" + next2.name;\n next2 = next2.next;\n }\n return /* @__PURE__ */ React2.createElement(\"style\", (_ref2 = {}, _ref2[\"data-emotion\"] = cache.key + \" \" + serializedNames, _ref2.dangerouslySetInnerHTML = {\n __html: rules\n }, _ref2.nonce = cache.sheet.nonce, _ref2));\n }\n return null;\n};\nvar Emotion = /* @__PURE__ */ withEmotionCache(function(props, cache, ref) {\n var cssProp = props.css;\n if (typeof cssProp === \"string\" && cache.registered[cssProp] !== void 0) {\n cssProp = cache.registered[cssProp];\n }\n var WrappedComponent = props[typePropName];\n var registeredStyles = [cssProp];\n var className = \"\";\n if (typeof props.className === \"string\") {\n className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n var serialized = serializeStyles(registeredStyles, void 0, React2.useContext(ThemeContext));\n if (process.env.NODE_ENV !== \"production\" && serialized.name.indexOf(\"-\") === -1) {\n var labelFromStack = props[labelPropName];\n if (labelFromStack) {\n serialized = serializeStyles([serialized, \"label:\" + labelFromStack + \";\"]);\n }\n }\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n for (var key in props) {\n if (hasOwnProperty.call(props, key) && key !== \"css\" && key !== typePropName && (process.env.NODE_ENV === \"production\" || key !== labelPropName)) {\n newProps[key] = props[key];\n }\n }\n newProps.ref = ref;\n newProps.className = className;\n return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(Insertion, {\n cache,\n serialized,\n isStringTag: typeof WrappedComponent === \"string\"\n }), /* @__PURE__ */ React2.createElement(WrappedComponent, newProps));\n});\nif (process.env.NODE_ENV !== \"production\") {\n Emotion.displayName = \"EmotionCssPropInternal\";\n}\n\n// ../../node_modules/@emotion/react/dist/emotion-react.esm.js\nvar React3 = __toESM(require(\"react\"));\nvar import_extends2 = __toESM(require_extends());\nvar import_hoist_non_react_statics = __toESM(require_hoist_non_react_statics_cjs());\nvar pkg = {\n name: \"@emotion/react\",\n version: \"11.11.1\",\n main: \"dist/emotion-react.cjs.js\",\n module: \"dist/emotion-react.esm.js\",\n browser: {\n \"./dist/emotion-react.esm.js\": \"./dist/emotion-react.browser.esm.js\"\n },\n exports: {\n \".\": {\n module: {\n worker: \"./dist/emotion-react.worker.esm.js\",\n browser: \"./dist/emotion-react.browser.esm.js\",\n \"default\": \"./dist/emotion-react.esm.js\"\n },\n \"import\": \"./dist/emotion-react.cjs.mjs\",\n \"default\": \"./dist/emotion-react.cjs.js\"\n },\n \"./jsx-runtime\": {\n module: {\n worker: \"./jsx-runtime/dist/emotion-react-jsx-runtime.worker.esm.js\",\n browser: \"./jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js\",\n \"default\": \"./jsx-runtime/dist/emotion-react-jsx-runtime.esm.js\"\n },\n \"import\": \"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.mjs\",\n \"default\": \"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js\"\n },\n \"./_isolated-hnrs\": {\n module: {\n worker: \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.worker.esm.js\",\n browser: \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js\",\n \"default\": \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js\"\n },\n \"import\": \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.mjs\",\n \"default\": \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.js\"\n },\n \"./jsx-dev-runtime\": {\n module: {\n worker: \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.worker.esm.js\",\n browser: \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js\",\n \"default\": \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.esm.js\"\n },\n \"import\": \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.mjs\",\n \"default\": \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js\"\n },\n \"./package.json\": \"./package.json\",\n \"./types/css-prop\": \"./types/css-prop.d.ts\",\n \"./macro\": {\n types: {\n \"import\": \"./macro.d.mts\",\n \"default\": \"./macro.d.ts\"\n },\n \"default\": \"./macro.js\"\n }\n },\n types: \"types/index.d.ts\",\n files: [\n \"src\",\n \"dist\",\n \"jsx-runtime\",\n \"jsx-dev-runtime\",\n \"_isolated-hnrs\",\n \"types/*.d.ts\",\n \"macro.*\"\n ],\n sideEffects: false,\n author: \"Emotion Contributors\",\n license: \"MIT\",\n scripts: {\n \"test:typescript\": \"dtslint types\"\n },\n dependencies: {\n \"@babel/runtime\": \"^7.18.3\",\n \"@emotion/babel-plugin\": \"^11.11.0\",\n \"@emotion/cache\": \"^11.11.0\",\n \"@emotion/serialize\": \"^1.1.2\",\n \"@emotion/use-insertion-effect-with-fallbacks\": \"^1.0.1\",\n \"@emotion/utils\": \"^1.2.1\",\n \"@emotion/weak-memoize\": \"^0.3.1\",\n \"hoist-non-react-statics\": \"^3.3.1\"\n },\n peerDependencies: {\n react: \">=16.8.0\"\n },\n peerDependenciesMeta: {\n \"@types/react\": {\n optional: true\n }\n },\n devDependencies: {\n \"@definitelytyped/dtslint\": \"0.0.112\",\n \"@emotion/css\": \"11.11.0\",\n \"@emotion/css-prettifier\": \"1.1.3\",\n \"@emotion/server\": \"11.11.0\",\n \"@emotion/styled\": \"11.11.0\",\n \"html-tag-names\": \"^1.1.2\",\n react: \"16.14.0\",\n \"svg-tag-names\": \"^1.1.1\",\n typescript: \"^4.5.5\"\n },\n repository: \"https://github.com/emotion-js/emotion/tree/main/packages/react\",\n publishConfig: {\n access: \"public\"\n },\n \"umd:main\": \"dist/emotion-react.umd.min.js\",\n preconstruct: {\n entrypoints: [\n \"./index.js\",\n \"./jsx-runtime.js\",\n \"./jsx-dev-runtime.js\",\n \"./_isolated-hnrs.js\"\n ],\n umdName: \"emotionReact\",\n exports: {\n envConditions: [\n \"browser\",\n \"worker\"\n ],\n extra: {\n \"./types/css-prop\": \"./types/css-prop.d.ts\",\n \"./macro\": {\n types: {\n \"import\": \"./macro.d.mts\",\n \"default\": \"./macro.d.ts\"\n },\n \"default\": \"./macro.js\"\n }\n }\n }\n }\n};\nvar warnedAboutCssPropForGlobal = false;\nvar Global = /* @__PURE__ */ withEmotionCache(function(props, cache) {\n if (process.env.NODE_ENV !== \"production\" && !warnedAboutCssPropForGlobal && // check for className as well since the user is\n // probably using the custom createElement which\n // means it will be turned into a className prop\n // $FlowFixMe I don't really want to add it to the type since it shouldn't be used\n (props.className || props.css)) {\n console.error(\"It looks like you're using the css prop on Global, did you mean to use the styles prop instead?\");\n warnedAboutCssPropForGlobal = true;\n }\n var styles2 = props.styles;\n var serialized = serializeStyles([styles2], void 0, React3.useContext(ThemeContext));\n if (!isBrowser4) {\n var _ref;\n var serializedNames = serialized.name;\n var serializedStyles = serialized.styles;\n var next2 = serialized.next;\n while (next2 !== void 0) {\n serializedNames += \" \" + next2.name;\n serializedStyles += next2.styles;\n next2 = next2.next;\n }\n var shouldCache = cache.compat === true;\n var rules = cache.insert(\"\", {\n name: serializedNames,\n styles: serializedStyles\n }, cache.sheet, shouldCache);\n if (shouldCache) {\n return null;\n }\n return /* @__PURE__ */ React3.createElement(\"style\", (_ref = {}, _ref[\"data-emotion\"] = cache.key + \"-global \" + serializedNames, _ref.dangerouslySetInnerHTML = {\n __html: rules\n }, _ref.nonce = cache.sheet.nonce, _ref));\n }\n var sheetRef = React3.useRef();\n useInsertionEffectWithLayoutFallback(function() {\n var key = cache.key + \"-global\";\n var sheet = new cache.sheet.constructor({\n key,\n nonce: cache.sheet.nonce,\n container: cache.sheet.container,\n speedy: cache.sheet.isSpeedy\n });\n var rehydrating = false;\n var node2 = document.querySelector('style[data-emotion=\"' + key + \" \" + serialized.name + '\"]');\n if (cache.sheet.tags.length) {\n sheet.before = cache.sheet.tags[0];\n }\n if (node2 !== null) {\n rehydrating = true;\n node2.setAttribute(\"data-emotion\", key);\n sheet.hydrate([node2]);\n }\n sheetRef.current = [sheet, rehydrating];\n return function() {\n sheet.flush();\n };\n }, [cache]);\n useInsertionEffectWithLayoutFallback(function() {\n var sheetRefCurrent = sheetRef.current;\n var sheet = sheetRefCurrent[0], rehydrating = sheetRefCurrent[1];\n if (rehydrating) {\n sheetRefCurrent[1] = false;\n return;\n }\n if (serialized.next !== void 0) {\n insertStyles(cache, serialized.next, true);\n }\n if (sheet.tags.length) {\n var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;\n sheet.before = element;\n sheet.flush();\n }\n cache.insert(\"\", serialized, sheet, false);\n }, [cache, serialized.name]);\n return null;\n});\nif (process.env.NODE_ENV !== \"production\") {\n Global.displayName = \"EmotionGlobal\";\n}\nvar classnames = function classnames2(args) {\n var len = args.length;\n var i = 0;\n var cls = \"\";\n for (; i < len; i++) {\n var arg = args[i];\n if (arg == null)\n continue;\n var toAdd = void 0;\n switch (typeof arg) {\n case \"boolean\":\n break;\n case \"object\": {\n if (Array.isArray(arg)) {\n toAdd = classnames2(arg);\n } else {\n if (process.env.NODE_ENV !== \"production\" && arg.styles !== void 0 && arg.name !== void 0) {\n console.error(\"You have passed styles created with `css` from `@emotion/react` package to the `cx`.\\n`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from component.\");\n }\n toAdd = \"\";\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += \" \");\n toAdd += k;\n }\n }\n }\n break;\n }\n default: {\n toAdd = arg;\n }\n }\n if (toAdd) {\n cls && (cls += \" \");\n cls += toAdd;\n }\n }\n return cls;\n};\nfunction merge(registered, css2, className) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n if (registeredStyles.length < 2) {\n return className;\n }\n return rawClassName + css2(registeredStyles);\n}\nvar Insertion3 = function Insertion4(_ref) {\n var cache = _ref.cache, serializedArr = _ref.serializedArr;\n var rules = useInsertionEffectAlwaysWithSyncFallback(function() {\n var rules2 = \"\";\n for (var i = 0; i < serializedArr.length; i++) {\n var res = insertStyles(cache, serializedArr[i], false);\n if (!isBrowser4 && res !== void 0) {\n rules2 += res;\n }\n }\n if (!isBrowser4) {\n return rules2;\n }\n });\n if (!isBrowser4 && rules.length !== 0) {\n var _ref2;\n return /* @__PURE__ */ React3.createElement(\"style\", (_ref2 = {}, _ref2[\"data-emotion\"] = cache.key + \" \" + serializedArr.map(function(serialized) {\n return serialized.name;\n }).join(\" \"), _ref2.dangerouslySetInnerHTML = {\n __html: rules\n }, _ref2.nonce = cache.sheet.nonce, _ref2));\n }\n return null;\n};\nvar ClassNames = /* @__PURE__ */ withEmotionCache(function(props, cache) {\n var hasRendered = false;\n var serializedArr = [];\n var css2 = function css3() {\n if (hasRendered && process.env.NODE_ENV !== \"production\") {\n throw new Error(\"css can only be used during render\");\n }\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n var serialized = serializeStyles(args, cache.registered);\n serializedArr.push(serialized);\n registerStyles(cache, serialized, false);\n return cache.key + \"-\" + serialized.name;\n };\n var cx = function cx2() {\n if (hasRendered && process.env.NODE_ENV !== \"production\") {\n throw new Error(\"cx can only be used during render\");\n }\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n return merge(cache.registered, css2, classnames(args));\n };\n var content = {\n css: css2,\n cx,\n theme: React3.useContext(ThemeContext)\n };\n var ele = props.children(content);\n hasRendered = true;\n return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(Insertion3, {\n cache,\n serializedArr\n }), ele);\n});\nif (process.env.NODE_ENV !== \"production\") {\n ClassNames.displayName = \"EmotionClassNames\";\n}\nif (process.env.NODE_ENV !== \"production\") {\n isBrowser5 = typeof document !== \"undefined\";\n isTestEnv = typeof jest !== \"undefined\" || typeof vi !== \"undefined\";\n if (isBrowser5 && !isTestEnv) {\n globalContext = // $FlowIgnore\n typeof globalThis !== \"undefined\" ? globalThis : isBrowser5 ? window : global;\n globalKey = \"__EMOTION_REACT_\" + pkg.version.split(\".\")[0] + \"__\";\n if (globalContext[globalKey]) {\n console.warn(\"You are loading @emotion/react when it is already loaded. Running multiple instances may cause problems. This can happen if multiple versions are used, or if multiple builds of the same version are used.\");\n }\n globalContext[globalKey] = true;\n }\n}\nvar isBrowser5;\nvar isTestEnv;\nvar globalContext;\nvar globalKey;\n\n// ../../node_modules/@emotion/primitives-core/dist/emotion-primitives-core.esm.js\nfunction interleave(vals) {\n var strings = vals[0];\n var finalArray = [strings[0]];\n for (var i = 1, len = vals.length; i < len; i++) {\n finalArray.push(vals[i]);\n if (strings[i] !== void 0) {\n finalArray.push(strings[i]);\n }\n }\n return finalArray;\n}\nvar styles;\nvar generated = {};\nvar buffer = \"\";\nvar lastType;\nfunction handleInterpolation2(interpolation, i, arr) {\n var type = typeof interpolation;\n if (type === \"string\") {\n interpolation = interpolation.replace(/\\/\\*[\\s\\S]*?\\*\\/|\\/\\/.*$/gm, \"\");\n }\n if (type === \"function\") {\n if (this === void 0) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(\"Interpolating functions in css calls is not allowed.\\nIf you want to have a css call based on props, create a function that returns a css call like this\\nlet dynamicStyle = (props) => css`color: ${props.color}`\\nIt can be called directly with props or interpolated in a styled call like this\\nlet SomeComponent = styled.View`${dynamicStyle}`\");\n }\n } else {\n handleInterpolation2.call(this, interpolation(\n // $FlowFixMe\n this\n ), i, arr);\n }\n return;\n }\n var isIrrelevant = interpolation == null || type === \"boolean\";\n var isRnStyle = type === \"object\" && !Array.isArray(interpolation) || type === \"number\";\n if (lastType === \"string\" && (isRnStyle || isIrrelevant)) {\n var converted = convertStyles(buffer);\n if (converted !== void 0) {\n styles.push(converted);\n }\n buffer = \"\";\n }\n if (isIrrelevant) {\n return;\n }\n if (type === \"string\") {\n buffer += interpolation;\n if (arr.length - 1 === i) {\n var _converted = convertStyles(buffer);\n if (_converted !== void 0) {\n styles.push(_converted);\n }\n buffer = \"\";\n }\n }\n if (isRnStyle) {\n styles.push(interpolation);\n }\n if (Array.isArray(interpolation)) {\n interpolation.forEach(handleInterpolation2, this);\n }\n lastType = type;\n}\nfunction createCss(StyleSheet4) {\n return function css2() {\n var prevBuffer = buffer;\n var vals;\n styles = [];\n buffer = \"\";\n lastType = void 0;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (args[0] == null || args[0].raw === void 0) {\n vals = args;\n } else {\n vals = interleave(args);\n }\n try {\n vals.forEach(handleInterpolation2, this);\n } finally {\n buffer = prevBuffer;\n }\n var hash2 = JSON.stringify(styles);\n if (!generated[hash2]) {\n var styleSheet = StyleSheet4.create({\n generated: StyleSheet4.flatten(styles)\n });\n generated[hash2] = styleSheet.generated;\n }\n return generated[hash2];\n };\n}\nvar propertyValuePattern = /\\s*([^\\s]+)\\s*:\\s*(.+?)\\s*$/;\nfunction convertPropertyValue(style) {\n var match2 = propertyValuePattern.exec(style);\n if (match2 !== null && match2[2] !== \" \") {\n match2.shift();\n this.push(match2);\n }\n}\nfunction convertStyles(str) {\n if (str.trim() === \"\")\n return;\n var stylePairs = [];\n var parsedString = str.split(\";\");\n parsedString.forEach(convertPropertyValue, stylePairs);\n try {\n return (0, import_css_to_react_native.default)(stylePairs);\n } catch (error) {\n var msg = error.message;\n if (msg.includes(\"Failed to parse declaration\")) {\n var values = msg.replace(\"Failed to parse declaration \", \"\").replace(/\"/g, \"\").trim().split(\":\");\n var errorMsg = \"'\" + values[0] + \"' shorthand property requires units for example - \" + values[0] + \": 20px or \" + values[0] + \": 10px 20px 40px 50px\";\n console.error(errorMsg);\n }\n }\n}\nvar testOmitPropsOnComponent = function testOmitPropsOnComponent2(prop) {\n return prop !== \"theme\" && prop !== \"as\";\n};\nfunction createStyled(StyleSheet4, _temp) {\n var _ref = _temp === void 0 ? {} : _temp, _ref$getShouldForward = _ref.getShouldForwardProp, getShouldForwardProp = _ref$getShouldForward === void 0 ? function() {\n return testOmitPropsOnComponent;\n } : _ref$getShouldForward;\n var css2 = createCss(StyleSheet4);\n return function createEmotion(component, options) {\n var shouldForwardProp = options && options.shouldForwardProp ? options.shouldForwardProp : void 0;\n var defaultShouldForwardProp = shouldForwardProp || getShouldForwardProp(component);\n var shouldUseAs = !defaultShouldForwardProp(\"as\");\n return function createStyledComponent() {\n var styles2;\n for (var _len = arguments.length, rawStyles = new Array(_len), _key = 0; _key < _len; _key++) {\n rawStyles[_key] = arguments[_key];\n }\n if (rawStyles[0] == null || rawStyles[0].raw === void 0) {\n styles2 = rawStyles;\n } else {\n styles2 = interleave(rawStyles);\n }\n var Styled = /* @__PURE__ */ React4.forwardRef(function(props, ref) {\n var finalTag = shouldUseAs && props.as || component;\n var mergedProps = props;\n if (props.theme == null) {\n mergedProps = {};\n for (var key in props) {\n mergedProps[key] = props[key];\n }\n mergedProps.theme = React4.useContext(ThemeContext);\n }\n var finalShouldForwardProp = shouldUseAs && shouldForwardProp === void 0 ? getShouldForwardProp(finalTag) : defaultShouldForwardProp;\n var newProps = {};\n for (var _key2 in props) {\n if (shouldUseAs && _key2 === \"as\")\n continue;\n if (finalShouldForwardProp(_key2)) {\n newProps[_key2] = props[_key2];\n }\n }\n newProps.style = [css2.apply(mergedProps, styles2), props.style];\n newProps.ref = ref;\n return /* @__PURE__ */ React4.createElement(finalTag, newProps);\n });\n Styled.withComponent = function(newComponent) {\n return createEmotion(newComponent).apply(void 0, styles2);\n };\n Styled.displayName = \"emotion(\" + getDisplayName(component) + \")\";\n return Styled;\n };\n };\n}\nvar getDisplayName = function getDisplayName2(primitive) {\n return typeof primitive === \"string\" ? primitive : primitive.displayName || primitive.name || \"Styled\";\n};\n\n// ../../node_modules/@emotion/native/dist/emotion-native.esm.js\nvar styled = createStyled(import_react_native.StyleSheet);\nvar css = createCss(reactNative.StyleSheet);\nvar components = [\"ActivityIndicator\", \"Button\", \"DatePickerIOS\", \"DrawerLayoutAndroid\", \"FlatList\", \"Image\", \"ImageBackground\", \"KeyboardAvoidingView\", \"ListView\", \"Modal\", \"NavigatorIOS\", \"Picker\", \"PickerIOS\", \"Pressable\", \"ProgressBarAndroid\", \"ProgressViewIOS\", \"RecyclerViewBackedScrollView\", \"RefreshControl\", \"SafeAreaView\", \"ScrollView\", \"SectionList\", \"SegmentedControlIOS\", \"Slider\", \"SnapshotViewIOS\", \"StatusBar\", \"SwipeableListView\", \"Switch\", \"SwitchIOS\", \"TabBarIOS\", \"Text\", \"TextInput\", \"ToolbarAndroid\", \"TouchableHighlight\", \"TouchableNativeFeedback\", \"TouchableOpacity\", \"TouchableWithoutFeedback\", \"View\", \"ViewPagerAndroid\"];\nvar index = components.reduce(function(acc, comp) {\n return Object.defineProperty(acc, comp, {\n enumerable: true,\n configurable: false,\n get: function get() {\n return styled(reactNative[comp]);\n }\n });\n}, styled);\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n ThemeProvider,\n darkTheme,\n styled,\n theme,\n useTheme\n});\n/*! Bundled license information:\n\nreact-is/cjs/react-is.production.min.js:\n (** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *)\n\nreact-is/cjs/react-is.development.js:\n (** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *)\n*/\n","var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n addArgTypesEnhancer: () => addArgTypesEnhancer,\n addArgsEnhancer: () => addArgsEnhancer,\n addDecorator: () => addDecorator,\n addParameters: () => addParameters,\n clearDecorators: () => clearDecorators,\n configure: () => configure,\n darkTheme: () => import_react_native_theming14.darkTheme,\n getStorybook: () => getStorybook,\n getStorybookUI: () => getStorybookUI,\n raw: () => raw,\n setAddon: () => setAddon,\n storiesOf: () => storiesOf,\n theme: () => import_react_native_theming14.theme\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/preview/start.tsx\nvar import_addons4 = require(\"@storybook/addons\");\nvar import_channels = __toESM(require(\"@storybook/channels\"));\nvar import_client_api = require(\"@storybook/client-api\");\nvar import_core_events3 = __toESM(require(\"@storybook/core-events\"));\nvar import_preview_web = require(\"@storybook/preview-web\");\n\n// src/preview/executeLoadable.ts\nvar import_client_logger = require(\"@storybook/client-logger\");\nfunction executeLoadable(loadable) {\n let reqs = null;\n if (Array.isArray(loadable)) {\n reqs = loadable;\n } else if (loadable.keys) {\n reqs = [loadable];\n }\n let exportsMap = /* @__PURE__ */ new Map();\n if (reqs) {\n reqs.forEach((req) => {\n req.keys().forEach((filename) => {\n try {\n const fileExports = req(filename);\n exportsMap.set(\n // NOTE context.resolve is not yet implemented for metro\n // typeof req.resolve === 'function' ? req.resolve(filename) : filename,\n filename,\n fileExports\n );\n } catch (error) {\n const errorString = error.message && error.stack ? `${error.message}\n ${error.stack}` : error.toString();\n import_client_logger.logger.error(`Unexpected error while loading ${filename}: ${errorString}`);\n }\n });\n });\n } else {\n const exported = loadable();\n if (typeof exported === \"object\") {\n const csfExports = Object.entries(exported).filter(\n ([_key, value]) => value.default != null\n );\n exportsMap = new Map(csfExports.map(([filePath, fileExports]) => [filePath, fileExports]));\n }\n }\n return exportsMap;\n}\nglobal.lastExportsMap = /* @__PURE__ */ new Map();\nfunction executeLoadableForChanges(loadable, m) {\n if (m?.hot?.accept) {\n m.hot.accept();\n }\n const lastExportsMap = global.lastExportsMap;\n const exportsMap = executeLoadable(loadable);\n const added = /* @__PURE__ */ new Map();\n Array.from(exportsMap.entries()).filter(([, fileExports]) => !!fileExports.default).filter(([fileName, fileExports]) => lastExportsMap.get(fileName) !== fileExports).forEach(([fileName, fileExports]) => added.set(fileName, fileExports));\n const removed = /* @__PURE__ */ new Map();\n Array.from(lastExportsMap.keys()).filter((fileName) => !exportsMap.has(fileName)).forEach((fileName) => removed.set(fileName, lastExportsMap.get(fileName)));\n global.lastExportsMap = exportsMap;\n return { added, removed };\n}\n\n// src/preview/View.tsx\nvar import_react14 = require(\"react\");\nvar import_async_storage = __toESM(require(\"@react-native-async-storage/async-storage\"));\nvar import_csf = require(\"@storybook/csf\");\nvar import_addons3 = require(\"@storybook/addons\");\nvar import_react_native_theming12 = require(\"@storybook/react-native-theming\");\nvar import_react_native_safe_area_context3 = require(\"react-native-safe-area-context\");\n\n// src/hooks.tsx\nvar import_react = __toESM(require(\"react\"));\nvar import_jotai = require(\"jotai\");\nvar storyContextAtom = (0, import_jotai.atom)(null);\nfunction useSetStoryContext() {\n return (0, import_jotai.useSetAtom)(storyContextAtom);\n}\nfunction useStoryContext() {\n return (0, import_jotai.useAtomValue)(storyContextAtom);\n}\nfunction useStoryContextParam(name, defaultValue) {\n const paramAtom = (0, import_react.useMemo)(() => (0, import_jotai.atom)((get) => get(storyContextAtom)?.parameters?.[name]), [name]);\n return (0, import_jotai.useAtomValue)(paramAtom) ?? defaultValue;\n}\nfunction useIsStorySelected(storyId) {\n return (0, import_jotai.useAtomValue)(\n (0, import_react.useMemo)(() => (0, import_jotai.atom)((get) => get(storyContextAtom)?.id === storyId), [storyId])\n );\n}\nfunction useIsStorySectionSelected(title) {\n return (0, import_jotai.useAtomValue)(\n (0, import_react.useMemo)(\n () => (0, import_jotai.atom)((get) => {\n const contextTitle = get(storyContextAtom)?.title;\n return contextTitle === title || contextTitle?.startsWith(`${title}/`);\n }),\n [title]\n )\n );\n}\nfunction useIsChildSelected(entries) {\n return (0, import_jotai.useAtomValue)(\n (0, import_react.useMemo)(\n () => (0, import_jotai.atom)((get) => {\n const contextId = get(storyContextAtom)?.id;\n return !!entries.find(({ id }) => id === contextId);\n }),\n [entries]\n )\n );\n}\nfunction useUpdateOnStoryChanged() {\n (0, import_jotai.useAtomValue)((0, import_react.useMemo)(() => (0, import_jotai.atom)((get) => get(storyContextAtom)?.id), []));\n}\nfunction atomWithToggle(initialValue) {\n const anAtom = (0, import_jotai.atom)(initialValue, (get, set, nextValue) => {\n const update = nextValue ?? !get(anAtom);\n set(anAtom, update);\n });\n return anAtom;\n}\nvar isUIVisibleAtom = atomWithToggle(true);\nfunction useIsUIVisible() {\n return (0, import_jotai.useAtom)(isUIVisibleAtom);\n}\nvar isSplitPanelVisibleAtom = atomWithToggle(false);\nfunction useIsSplitPanelVisible() {\n return (0, import_jotai.useAtom)(isSplitPanelVisibleAtom);\n}\nfunction syncExternalUI({ isUIVisible, isSplitPanelVisible }) {\n const jotaiStore = (0, import_jotai.getDefaultStore)();\n if (isUIVisible !== void 0) {\n jotaiStore.set(isUIVisibleAtom, isUIVisible);\n }\n if (isSplitPanelVisible !== void 0) {\n jotaiStore.set(isSplitPanelVisibleAtom, isSplitPanelVisible);\n }\n}\nvar selectedAddonAtom = (0, import_jotai.atom)(void 0);\nfunction useSelectedAddon(initialValue) {\n const result = (0, import_jotai.useAtom)(selectedAddonAtom);\n const set = result[1];\n import_react.default.useEffect(() => {\n const jotaiStore = (0, import_jotai.getDefaultStore)();\n if (jotaiStore.get(selectedAddonAtom) === void 0) {\n set(initialValue);\n }\n }, []);\n return result;\n}\n\n// src/preview/components/OnDeviceUI/OnDeviceUI.tsx\nvar import_react_native_theming10 = require(\"@storybook/react-native-theming\");\nvar import_react13 = __toESM(require(\"react\"));\nvar import_react_native13 = require(\"react-native\");\n\n// src/constants.ts\nvar ANIMATION_DURATION_TRANSITION = 400;\n\n// src/preview/components/StoryListView/StoryListView.tsx\nvar import_addons = require(\"@storybook/addons\");\nvar import_core_events = __toESM(require(\"@storybook/core-events\"));\nvar import_react_native_theming = require(\"@storybook/react-native-theming\");\nvar import_react2 = __toESM(require(\"react\"));\nvar import_react_native2 = require(\"react-native\");\n\n// src/preview/components/Shared/icons.tsx\nvar import_react_native = require(\"react-native\");\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar iconSources = {\n grid: {\n uri: \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAMAAABHPGVmAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAALdQTFRFAAAAIJ//Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqj9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Haf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqb9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqf9Hqj9Hqf9Hmz01QAAAD10Uk5TAAAEGjNefYqLXDUFAjSY0e79/9KZAghmyMkBQbz6vUIBBnD1cQcOo6Sp76qBePTHVOoC+RQTX4mCDZsBMmX5zDcAAAHcSURBVHic7ZrrcoIwEIVX8W5VpAiUaq33GyJqrfby/s9VacsCDojUJNNx9vzCTLLfZJdkHM4ChJTJSrl8oVj6s4qFckWqZiBed7V6Q24qV6op36uVVgxC042rAQh60LUIhPnY7rBCuOo8dZ9PGb3+gCXC1WA4CjPGE9YIV9NxiNHmwVCUWYAy4rIPV1PMmNnnxVCUoVf9LvOa+xp0f89HqCDzhbWMle3NsuPnWIt5MF7757zogfOxcqLOEGrtzVufm6U5Kz9iR3eHNgYObNWXc4svhQDs1C0GNTbHgZp/l6hnt5ECApqKQZu1471b93O1S1h6OQR2fsbqGcg28JeTtDIFBBwM28iCJON7lZSsVBAN3zFZCpRkkbgwDQQWWJQcvOK2LLYQCwPnoYDPS7aQJQYuwJ4/ZA8l/pASQQhCEIIQhCAEIQhBghB7nSj839xMnmtHQriJIAS5IYiQw3g7dxdBCEIQghCEIAQhyH+ECPmMLsQQKOMzY2vjgIHLYkwaIXaTEOMM+FuAIMbMhJYIW1aIwczaKj9EWuVCTH++7Quml8Qev0aMnl+qtxkfxnu4cYXLXiYhhpg2H4AP1g1L7a55ygDGrVdGZOuVKwFNZN/KSp/XtsPVpOpJ0C+2naE/XA0rpwAAAABJRU5ErkJggg==\"\n },\n \"story-white\": {\n uri: \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAAXNSR0IArs4c6QAAAIRlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAGSgAwAEAAAAAQAAAGQAAAAA3IGzQgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDYuMC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KGV7hBwAACdlJREFUeAHtnW2oZVUZx73jjFNhGYMiKUkhCAYGDdj4FhKRYkIiIZkhhgRKBPahGL9I9CEsISxB7OVDbypaiUoDRmqKOjKNVmhgQiISilYqNJGN83b7/fZZz2nd4znnnnvPPmev46wHnrPWXq/P+v/Xs9ba+9y7zxFHVKkIVAQqAhWBikBFoCJQEWgfgaW2mlxeXt5AW0eih9pqcwHaET/1wNLS0nIx9kLGkWhr5BYzsAkNaXP8U4OoMcyOg9pO/AKCj6Pv9hKdun3aKFFibK9i3A7G/3uNdFJO6ylTAYYBGzDgEOFm7LkTvUjDDkP5Djh8tY1xT0tI4x0QcjvGfA49gMYeEmvqYB8xuyKMcQxe5+kRN7S9KGuoDPbRS/1/ubg2jLp5Wp4e+dG2eXn7kR5pR6WGtkPKDWCxiXB/SltzEI2uuWJ0TPgRKv8RlQiNdWM/nETwN6H/RE+GjH+DSX8ZXysQnozWK1F3a2pAMiJtvW0uYr2NyejjCE9N8XVPymkADNd1dlTpITA1FtMQEiQEMXF9OIdTYxHuNg2Ik+xDGuqGH+L1JPWifJdh2CpWM7e5DUJWAysGNLU7r9bRHPJjLDPrataExAD2MILfonEd4SQDy8tGPMLV6k9aLm8n6hi6pOvZ70DPT2Hkc9m+zJoQj8KeOF7kOHhJ++bPp0WOsS5VL6HvQxeakFhzfdblDVSc2X3UEnlEixSB38hEepNwC9rGAWjVgc7aQ8IAB7efwcHLsk9G424+8osMsTXsyg8kkTaTcC6sJ8tL94hhAIfNEQ4r02raPAlp1fC3a2OVkMKYrYRUQgpDoDBzqodUQgpDoDBzqodUQgpDoDBzqodUQgpDoDBzqodUQgpDoDBzqodUQgpDoDBzqodUQgpDoDBzqodUQgpDoDBzqodUQgpDoDBzqodUQgpDoDBzqodUQgpDoDBzqodUQgpDoDBzqodUQgpDoDBzqodUQgpDoDBzqodUQgpDoDBzqodUQgpDoDBzqodUQgpDoDBzqodUQgpDoDBzqocURsi8Xhwws2GnN0RE+76Fct2v14tGugwXlhCIaF6jBwH7cgBJb7x+Ud4WkdtufCEJAfT+iyaJX8g4tqF6xkMQ8Rihr2z1PSVzeyWGfbYhC0cIQB+lVxAeDwB3oWfnQJB+N9eXU+Y/UTbPLz2+UJt6AEz4foDdjUqGnqEnqL5l6GL0ccock4iL17iSXL4sDCEAvDkBfDKwPoGehO5FfVOdnq76bi7TPozups6xqY4vel4IWQhCEhlvEn4IVPUMlyvfY+Wb3gbFNEk5BX2COidAinUXgpTiCQFI9wwB9YXNu1BfJubJahzAkiJhH0Al5YOpjeKXr6IJcVYDpBu4p6jHUV/yLxmTACthlj0Bdfk6JbU1jkiKdivFEgKA4RnnAtFO1Fk/KRmBqsTpKceiesppyVOKJaVIQhIZesb5APkw6ma9VjKo0ojgS8p70F20eXrJpBRHCIB50ycZ/vTFb1DFo+24ZSqOvE3hIR+SIqHvQnfS9jmJlHFtDmlm9knFEAJIviGzuQMn/CxDvycNX7DHvYTZ/DjyStwoEXzzbetR+vhEIr4oUoogRDIAyUcd+4lfQfwOVAmwe1crP31lqLNeMn6BPoYKtsvTKDHfOsoD9HVhaaR0TkgiwweFknEVQP1EtJDVyIhl7E7q6lHnoX9AXZ68Dxkl4Snm76DPzyRSJKtz6ZQQwLB/fzbpAPGvEP9+QsRHIM78YaJnSJbA/pi6l1KXYOm/XJ+B7kTjPoToUBF821B+Rf3PU98Jscm2esndfHZGCAO3b4E8SPxa4jeivmBZMjxVDZPIF9BbqHtlKuT+0zzdJe0c0h5AYyNPRd4SSHiQciv1v0hdva7TX5zrghDG3v/OQjK+AQjXo4Lt7B9HhmUE8kbA+xKhj9ld7g6helmz7BD/JFk7UL3IPcV2h0lOyo+o/2XboWCQMqresLa6TcN4BysgV6OKgPiLbbkIuPIXtCGfsAEt1f22mYh1o2yTMPBhnmUUyWt+oo74W8gjLW//l1ZAfPQyaFuTkT5y27+W2t9AXtMW4XvRV1LZQTvzds9KdRtsjM9NMG6thDRrM/WCmJvSAF27BweZsprAvMj/ugPk2iVqpHeT199/iP8cVby3ycFrErOPfFJcl/qJMR5DubcVIc8woP6sIf7DBMQkIAWI2xNIztyRZFhGoUzfewb6C3KTCSsC88ITv9lrqWlrC+kvp5KD9cM+sxfGQ/6aDe62NLDVyNBzYrDXJJA3krYqGVlfuaeER9rvIKjJpCbISbkp9auH/CMVGqwbNppdPCEx255OA7sjDWqSNT0Vbe5NnPFrIiMjJfeUSfcsQZY45buom/xLXiAzJaQ/g2IALYcxmzczkHtp+9Oopxg3y1HnffPDri9w6vkpdb0+SHzNpx7qCKB2eLOynbj3K+5FntjUsJFoX7RNIs3XO09Eo+9RdlOkQ2FgseGNO2VRrL/sGM+XIa8HJWal6Zc6PMJWbtZox72n8RbCa1FFT9CmUWJ+eLll8uUp6uRpUy9Zw2ZH2zTHjIq777ge7MebsjiyXsxsdnmT9FZ+q5z2nO2C6A3kt4j7ZEBbGu8jHCbmi5G2K6Ns7+W28DkPQsLM/loeCVmYk/EpALtHMgj3obFUZMXXF6UtSXEJk5TvEb86taRtAXpK6geSMM72fsE2IvMkZJS9+8jQMwTeR+L3BRmjKkyTnggOUn5AW1ek9gTdidGpdE2IjzVclgTiY4D1O8hovkefJSoZKXrhz+jLp8WKE6NTUrokRM/wAeAb6FkAszORMe77DIq2I4kUN3RJ8fsUT4BKp6R0RYhk6Bl70DMB5MkEzFzIoM9GJAX1ZCcpvybxvJTVGSldEBLL1GsMfhtAPJ08Q5I6kUSKS+X9GHAuGvdKc50gDn7ehDhAl6lX0I8CwLOJjLkPnP5XCLY0f91I+AgZZ6PeQGrrXCdKG4RMeiyNPeNvDNI/xXm+i2WKvkdKIsXlazeFzkRdUl1a50ZKG4RMcrOkBziw51A948VExtwGSr8TCbbFnvIUFbahLq3aPokXT4IFTY2WaQiJzl9NzespkZb3uJcLXf8Z1D3j713vGblxw+KJFPeUZ8k/HX0ZdQyOZVBizO47kqdMumr0SrfxCajN3Suh36a9jip7e0Hz6c3XG+n6T4RHN5b2Hoe0YcLM28BmSfB5y4noC6jimPLnV/5jkLIrlfXLsyBp5jau6ICOPR5q8GVoiMbmBnt/8c5Urim/opHCL7Dd5coxHof6RVtIPk4fQG5N5eJJdTcjw5Bm2SO8AP0zGvIvIjegjYGEC0dGIIrtQcrRxG9G96CKRDyI+g9CkjY1Gf8Dj4t7s6eI4kwAAAAASUVORK5CYII=\"\n },\n \"story-blue\": {\n uri: \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAAXNSR0IArs4c6QAAAIRlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAGSgAwAEAAAAAQAAAGQAAAAA3IGzQgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDYuMC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KGV7hBwAAD0JJREFUeAHtnXuMXUUdx2fmnHvv9kXTBgIUusujNrGNJlCh8jCUECFCpCHKdncrwRgEYwCJTzTRbk0MD2MQSJTHHygpu9uCQSNRowSq0gZblqixCLEBetsGlHd3t3vv3ntm/H7nnDk9e9ltt3f33ntucka7Z8658/jN7zO/eZ3DjBCZyzSQaSDTQKaBTAOZBjINZBqYew3IOUuy36g1pwpveInQc5Zm2hN6Scg1pw7L4RvXVIWUJj3ibjOeEGbu4KanZDOThOU3c1N+f2Y5HiUUhemWAUN0DVU/Y7S8VEixCHSMiSGRlatAjhvvnZ+xa+/5zDn321RXF8ZdXV7Jq/vNxXf3yav7LXlN/u7So9TSlg3lexv/njrQLf9mQxLKLC0lqZFk7jPzo5kS/VKvuM8UJk4Ktqr53noBW7FudinPLP9WhiI3OFPGn4r+yb4e75v2wSz/zM5CVoVVvHJS8Ii31FsfvKurkAd9CKR1NaXWlPnc1aTkb+55bYFcOu55Mq77LZmOC8frVGlO9SwZ1v3u0uZvyfTdc/vMWk3eW+J9o3Nr8L/iBu/uNQ+a3PBNssJo9bi66/GaF5DxJ2Sla9CcA6t40QSanTnrjbOReuRpxzgV6amcCPRbHfPV2a+slyMi0Ywfb4HU8UZw4T/YKaK4wbkyb58a2Evd6bl02/DqozIKo9RJY6Pio5R/9SwqZd0KLJwS9tJayNykvrkNNVq/yFFHggQk2hrlV3P1pxXGnF0fEgpyRKpjSWOb3DASx2C2FHHs6L42DYZLOpY8jut+wzNOA3jLPFwNicMlErDTBRso8RDeOCwScXm4EAzusnLP7HVyOlL7U4aaFOUYN7MGgnJMlmqqDCWKY0zVThnDwkFwDBE1C48ILIa9TlEe95tLl4qzwaKrzR3+SdNRGyCMkczDpTG1dpFuFM/lYdPmIATSSeHba5xGYzyzBjIDsVAcJdUCMWtznkFejQlC3ofxx04/bNVpTD5ItdFAjFAKlqAP6VH5RxQLpcK9tRht698xSyYVamgU1vnd9ViRZxoumY6Lw6vWCs0XhvKmAzSuQMXClWVoHJRGA9Ho8j1TEgeKferaZLnbyo85R+eQPih9caqp2PZuZpWpjkI2FggnT6xPGAau3mbye64VldWPi9weIQKBhbk65G1elFXCrFgo/L1XyvJpT4qlyFhFZWmoDI0F4kQHFsKA+Zs9/ejcsdzifkrzde+2sDYVqqLKJYhmuLrnIcct3ObIIjYdd8zWRYisWI81z5qbB8SpdbPzZNepNNB8IFNJkT2LNZABiVWRDk8GJB0cYikyILEq0uHJgKSDQyxFBiRWRTo8GZB0cIilyIDEqkiHJwOSDg6xFBmQWBXp8GRA0sEhliIDEqsiHZ4MSDo4xFJkQGJVpMOTAUkHh1iKDEisinR4MiDp4BBLkQGJVZEOTwYkHRxiKTIgsSrS4cmApINDLEUGJFZFOjwZkHRwiKXIgMSqSIcnA5IODrEUGZBYFenwZEDSwSGWIgMSqyIdngxIOjjEUmRAYlWkw5MBSQeHWIoMSKyKdHgyIOngEEuRAYlVkQ5PBiQdHGIpMiCxKtLhyYCkg0MsRQYkVkU6PM3ZOKCBZeUOES75jveEmc32ei6dVl7bF0i0jd6ebjkxSYHcmJOuTXaLmCQ7btoSiN1osjvcaLJrsHoVdrVbq4SuYJurZ4t98jkWct2zxt9+KXfyaS/XdkDYRA3DKs4cMCcHyvxKzpMX2V03JQwD6u8a1E+WKvI6wBizG97UWlDK+bRVp+4UvGzw8HKt9C61UF6kD+uKHtdVPaarpqwDtVhe05HTO8/aZhazOUv2MSlnYcVrGyDcrJkKXj5UOtsXhd2yQ3XqEV1CKXLYNomWzn9e8IEuyQXq40Ggdy0bMCcyzor7/lOwpW2DP20BZMXvTGHvrbLcuaW8SorcLsA4GVZRxnZP2OEt3EIpvMKPZ7CWkpyvVvrS7F4+aJbtvfUjZQJtAx7p32eXTQ43EesanDhH+v7zMq+WmlLAkVUh3LTS7YPGK/6FG1l2oCkrq3nyDOwvuLvr0fEzCbQdmq9UWwibGjY5ZwyatUZ4O0VOLUI/ARjcutlZxrT1vgArmlAdapnJ5XedNWRWhs1Xui0ltUCsZaCpOX2gcokWeofMqQ4zARjSwXCWMR0Q23zldVmXZUGdWDV69+nbzMdoKWwCp4vV6uepBEIYtgN/rHKFUt526SvPVCIYhrsDHgsG1crmy4YtAGQZTd0JSuvnlw9NnMcmMK19SuqAcJP/EEZ1vcr5f8CWv8JUNU8byE/uM6h057CPIzfWtC7ZlEVQjCCUCVjZfGm8HZ0DlYvT2qekBwh2MLUzcJy4sHywukEVvF/bDaYDewQGNmFOKjoGQU8V55b4aJY4PwS4WuvhvY2bB5QKoGCvevnXzkFzGcGnraNPBxDCeEj4XBjsHKheDxhDrPNGB6z5mF9QobWK5kM54Z2gfH042GbK5jk0SgTHI1ZqXARFyhybPumDnRJP46iNq9IGpfVAuLfvdhwmRhhD5ibU9l+YCQLQVWyBfRQYogIY+eBQsLXY62/QnrwcE8VhtdBjh80JY40DFPYpGBSwCeR++0D9VNdW8zlCoXXWRGjJbWuBcGX2cdRVLAJ2DgS3qXniAQxVoTgToP5z5g03lWWIKmEAwCOA0YPwEudAjRdPVp/Uo8EOtQhbgksxtaXYjl7kcOYHBl5I3hdPdA2ZjawQFgorSAtd84FsikpLGKselzxQrHMouB1KvAeTOaqInfN0p/TY39k0YTf5n+Pcpy/Z1LgnMFZ3CRaALtaj5mmkR0vBnIXWlnTUt32G0w4ApYKzAgpiS9dA9QZCWQdrJeBkjGb6mw+E2nDvLLq7A1jGZrVA3YGaTWVTU4CRVKLz2/qsoWjfHNL37Ov1vmoVxfcifPcBGK7ZKfaoT+tD5imAy6OJwhLLpAQRLYJirRANWAkL+Au8h7uGgpuxSlwVmyMo2G7c5tHEP00Hws7bKhBKhGXcBaX9QI9qWIWtlBEMV0GpD+sHLGkIA5ZxJ2B83dbimrOe4mYHsYq96rOA8oRHSzHc5rxWuUkoOEFqXBusf93fNRB8C/IRilzzXvOXlpoHZFOokOE3wvkCYNwHBX8b/QBHUtROJMtUMPDjQuUhbH+xz/uuhcFmKjo/EXFjRyi2+cITQLk2OKS3sL9B7synpsa7vGgROJxiTGu5SN3dNRh8n5WmtCSsDTj7pCZenN2cexoPJCyz4akIVnpaxmDwEGruLajtmDfwlFAHw5XPWQY6d8BCk6ZgRbcXe73NgKFYe62VueC1VzY7tB44xLkOUB4GFOZPKGwa4ZI6tn72HYLWCig/BJQfcfTFkPjDtJIR+LghrvFAwmLY2TdLgEnfY2imvgwlcfaNkZQ98ClROEYARQnlSanUfCXR2d8Gxd6FvscHDHFUGC4lWg/DwyHujcGIvp+DAdwSMptAXJyOIz/yw0OpRwJC+R6tGPdYIhABpLSAed9I11ggPISRORgxzkJ0DlaH/MVeHywDi4SEYbVy5GIVROVQaVjB6gCMcfGVYo93b9QM6RnBYAp07AucpfR4t6LJuxvNJKGQRASFAelsvvRQYoWwFW+xugXLLD99VYhRGE+l1o4ZeK5dNNaf62RdemheWGwpCp2D+jdqkbw6+ACzb8yYoZJYA2HoyDLYrCjlI4TAK6gvFnvkL8MhrYXkqrTL4NjX0FKUQB9WlPI7aC7H0R9tQtOEwwcxcrNWEecdpWenjV7wPs48Wuh/rXMsOA2l4OFgcBwS14h+bClmHKLBQGAiEzizSaqVWDRfaTtwKdmB1pQIJWVrYXCgkFI5zs/1RNC7v8cfCk8UZdtvz7ubccEmBUS/hcQVrEUVu2U/htolQLlDjwWUpAodI8daKKFto6MPZMH7PFcPMECmoDWyT8pp1jeNbbJC8TDgxMQbHyCg0JiMTQ+DR5iSC8Zd1xAGF/6G18wShlMRobyE3NGvYKR2J/slLNNANtvPsIlESGsCLgavEv9TVna70lkrezLo3PgbbCFOSFup0CnWVq4jloEeA8sZNsSV+3vk7907EZfCnFwJxVjN+mgK77WWMt97QJcwIuNyjYD11rqwAn34eW24ObpvhoVMI2pk/cbwPUXOVAMDdV22r1EwnBQcaPSLYB2WWmApD+pScL3Mo6LgTRiCcOQH9yFLCR834W+LgESWIUQZMPKmEqDv8D61r08+w9erbvzfuPJLs32dCGiFxR7/UXw0scHaBvov5IlZPdXSGigtABLBoGXkVQEdJc7Q9C4sbpA7+FqVr1cbByKRMk+M4zF+hNLnb0ODdTVbVDaddnDRIigtAIJSE0YHLKOMGYmuXrC/V75AxfC1akJljfcSin1ruCePCvFbDB8uRwXB+ddJKI0XI5lDE4HETUDZwijpd5Sprj3QV/hnc5qpZLEn+/d0r7ZfN+JD7T8ZrS/BW8WqhcK3j3aUG8s+OWID7poEJGqm0GeoeWimSvpNfKx+/ut9hZftV4nNaqaOokD7dSP6r/0bc3/BdPAiQBkHFH6Mh1UFqqk5UGYNBBPdGUiKbFAwrEsRRjEI1HnFjR2v2mYqBTAcJ/ZflOnARrkrkMEFmNQeojU3E8qsgWBUXzu5cOVLXE0ZK7Z5PW72Kq3OP/gFeYAFb/xoKiHCDL1hn2LyB3vy/1BGrTXjaFoJxX48UVvUI3XRzm5wtvQMs5k2WN1Aym+GmUsRvG3f5fEFkIVzRMgo1xJgFDAzfkmPjqx9rU/+133JPq1ULf6BUNiUvt4nX8ao6zy8UXwDUMKPJz68csJRCv6vqyoQ71B0/qd19RahbiB7T+GSBuZTHd7TaIbeg+Cc9WOUFFcSrB+Jcayu8sPnv48rtfbADYvfbcloioIep7NfNwLKvm75mvYAZVzvQ8XqQPPFletI4SirFIfVAg8rbXKYAPGTHL4x1M1xZmmD1w2Eb+v4Dvv1a+T7MI6b+cVtWItovBBYYeq7VM3TI2anVurCt7rlKMOnsZmaTnFxn9ItD+YJZUz/21uCb2MUPqdkGVFwLFLO5wIkRmPhO/5+vDfhakCdrn4gyNC+LsUbvH29/oA5LK6Eaf8LVYbC4r8C0IeCd/SPi6/8+RJ+okMYNnydgrYqmutT9nbLt8Y9db5+X/9MGj1iy8jXviPmGW2q52LJ50XR/yy/F7AtR73y/h/SR3nQ/DCj8AAAAABJRU5ErkJggg==\"\n },\n search: {\n uri: \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABgWlDQ1BzUkdCIElFQzYxOTY2LTIuMQAAKJF1kd8rg1EYxz/baGLy88KFsjSuTEyJG2USamnNlOFme+2H2ubtfbe03Cq3K0rc+HXBX8Ctcq0UkZJbrokb1ut5t9Uke07PeT7ne87zdM5zwBpMKim9ZgBS6YwWmPI6F0KLTvsLVlqw00VrWNHVcb/fR1X7vMdixlu3Wav6uX+tYSWqK2CpEx5TVC0jPC3sW8+oJu8ItyuJ8IrwmXCfJhcUvjP1SIlfTY6X+NtkLRiYAGuzsDP+iyO/WEloKWF5Oa5UMquU72O+xBFNz89J7BbvRCfAFF6czDDJBMMMMirzMG489MuKKvkDxfxZ1iRXkVklh8YqcRJk6BM1K9WjEmOiR2UkyZn9/9tXPTbkKVV3eKH22TDee8C+DYW8YXwdGUbhGGxPcJmu5K8dwsiH6PmK5jqApk04v6pokV242IKORzWshYuSTdwai8HbKTSGoO0G6pdKPSvvc/IAwQ35qmvY24deOd+0/AMfDGfFB6WkFAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAqNJREFUWIXF2DmIFFEQBuBvVh3FC0EFdT3QaDORTUTFI9hQPAIRQxE0ETXwQBADD7zAaBEDTQxlIxExE4VFjTzYxQNFERUTr/VCvII3Q78Ze2Z6drvZH5ppmqq//q73XnXVlGRHFzZgJeZiDibjLd7gMa7gOr62wdsWStiEAfzNeH3HhYroXNGNu02CPsN9vMOfBjZHUc5DzBb8qAtwG7uxMMW+jB704kOd3w3MGImYg3WEQ9jehn8nrtVxPMeC4YjZ4v+3S8tIFmzD54jrnnAIMqNbWPcqwRFhU48EC/A04uzLyllSu4Fv5CCmimX4HXGvzeK0Se2eGe4yNcLpiH8QY1s5xHVmR85iYEJFSDXG5mbGXZHhnQLEVLEqinO5meGByHBPgYJKeF2J80XIWirimrGoQEFwLoq1PM2gQyhkhMr8vGBBg9H9nFaC3hYshtAVVNGZZtAhqZ5DhcupjTE+zaBDkplZhcthdnQ/kGbQIUnjTDm1Ck0QL9ODRoKeVO5LQjdYJFZXfj/hVSOjjZKj2FugmGn4WYlzq5nhJMlX/oMGxzEHHJa8+MlWxhcj46sFiFkiyc57TG/lME9tL7Q1RzFlYQNXuXdmdTweOX3C/JwEHYt4BzAuq2MZNyPnx1g6AiFlYer4FXH2tEsyEy8igl84of36tFgYkepHo2F1EwvxsI7oIVZk8J2KQ5INnHbta0bQqG+egktYV/f8lTAuDwoVfkj4HHRijVD44mw+ErLShbPR8/041UxYI7HrK6RZx+jq9RG71G7gvdrIVDOMFea1PuFPhEYiPqMfZ4S9mIaWotoddSYK81unUNHHC0f5AV5WgrTCXrXLNazlyxu5LV+eSBU1ZhQF9eObpFj2CIdh1BFn6s1oZqiKfqHtWYLz/wAUO/neFu9thgAAAABJRU5ErkJggg==\"\n },\n \"layout-bottom\": {\n uri: \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAEzSURBVHgB7ZjhDYIwEIWfTsAIjOAIHYGNZANwAnQi3KBu4AhYIiYNNHCF0ivxvuR+mHjNe70eyR0gCIKQOspEZUKb6CJFa6IxkWMD2SC8Y45q0OItvgXALd6uiJeJFG7eVQkSuSNZ49sL3qVcSQF3zylKcoOp+FjCbTJMTdSUxPHbL8CHwvQyFxmXjZMMC3pOjqSO8J+YzOo54+CIAW7EADdigBsxwI0Y4EYMcLPWwNXEG+HGxf4s8si4xNI8sOe8XK7Q450Q8uZdlfDS85c9cMN+PBAAypvrtwOhm7jcoGc2gWOlYuPdA6/R7wv4GK90niDQPw/bsUY6i62GkqgwLVt/UKwFVzZo0A4dOfWQGvt969cGaa1o38Kh1+s/EylUosbGHsxN3BG3InoQriAIgpA0H3BBw2jFymiHAAAAAElFTkSuQmCC\"\n },\n \"layout-bottom-inverse\": {\n uri: \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFgSURBVHgB7ZjhcYMwDIXlTEA2YISOYDbIRmSD0AloJ+kIyQbuBskGqnz4R+OYw7jYchN9dzouwYIn2+LgAQiCIFQNImqKE4XBcpwpRooWUqHkxgnnxmpo5nSqOfF0+KJ4gzq4UHRKqZt/YjeT0EM94i1WSx81kma/DSyjwakXGigA3eeA4Z7TMcljQHwR4Z6OJlDEEJN49pIOwIRb9bvJ9MeoQBLeDSCACbfy19//+XqqLsCypGcH/xwpgBspgBspgBspgBspgBspgJukAugFsae44nbYa51gC/wrB87ndCqOa/Ws/h6ws0WHXJ+YN7rdHlboeckeeId8fMJfWdpzbsyA2zfxMUXPYg8Q+5AjVoqUHvj2frM5dPho6VxikgZv1QzWY2yNMYk6sEcNFjK4nHCNYWuxjb3IgPURtBWf0153AzvI+8yPxWrokp+EONntH/ho+ubE4LSNNQiCIFTND53ElQfvR3pDAAAAAElFTkSuQmCC\"\n },\n \"layout-split\": {\n uri: \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADxSURBVHgB7ZjhCcIwFITP4gAdISM4QkZwI0doNqgb1Q3iJjU/Imga5YVK3yveB/ejkJa7vgTCAYQQYh2fNCTFpHkjTUljksMK+mx8VtaQvTSbnwBom3+dSFMIC3++NgkRDlA3+0m+NNtVAlxgl7NkkaW9XyqWZg+VADNs8+a5w85hAG0YQBsG0IYBtNl9gKNgzQG6fL3acAtpwwDaMIA2DKDNXwRorvW2pBbgXjyfoEfZA90gIGDZxWhMoceyER8lL3rUCyVRK/YD+uwhVnw46UcC7LVyAQ3svl5/hrAwiYCVZ9AlXbHtRGI27kEIIaZ5ALildIGPrcQbAAAAAElFTkSuQmCC\"\n },\n \"layout-split-inverse\": {\n uri: \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAEaSURBVHgB7ZntDYJADIaLcQBGYARHgAl0I0YQJ8BNdAPZ4BzBDWov8ENrkYuJtJA+SUO4D/K+1yaQAuA4jmMaRCwpjhQB5+NG0VIU8Cu0OR+EaxM15GM6szHxdLlQ7MAGHUWVZdmDT2xGNtRgR3wkaqmliY8MYF93AWwSs3B9HZAyUINdDnxAMmCpdDh7PiCVEIJhqITeNG9g4bgBbdyANm5AGzegzeINbKcW8Ff33Ex92ngJaeMGtHED2rgBbdZv4FtbzwKSgTu7V2uz0OHxPlCXsqlhzdWgkQXsm8uBaWlTNpZChzgIp/EXBuElyu38IvUhDdqjkbSus70+LKwoTqBP1CCKT4KyUVCcsf/tMxcB+zIuwXEcxzRPpfGo9y3IYogAAAAASUVORK5CYII=\"\n },\n folder: {\n uri: \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAuIwAALiMBeKU/dgAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAHTSURBVGiB7Zk7LwRRGIbf7wwRRIJGlDSEpdmI6Fw6lRWZXiJ0lkZUsn8A2dD5B0MhkS1UepGIXZu4hsKlJASxyZyjoJAx4uzutztjc57yXN58T+Z8M5kZoEKg2R4nSpL6IdCQ72YlhQLh3LLc/dUj+7YUBepC8ciWYshxidSy+1a/tHYx+s6QlzeCKcdSihZEzWtqfsCpZcrMCy6RTwgj8knsBCHDKwIEJsPVI36cKOCGK4ygnkHYbcpkNxJISO98lc+eR4Au9eJVG4DmXyY7CejUrvRPCFCIPUQifTjG1I9ZnyuynTyeiOlEx3udDkixB6CVo1RdXCHb19P21fexonokmbZPIeQQgPuiKssTS1K3d6zoZg9Choh+tATLXSuZtk8tSwyC1B1HXiH4NXtBrByNn8V7nWFIMcmVCVJzAGp0lrKJAF/HDFjkyotHtmagKcL/QAwIIxI2jEjYMCJhw4iEDSMSNoxI2DAiYcOIhI2KEfF71W2c7XGiZa/EDwVLd6mfyCApccBYTlmomKNlRAJFymvv0P8TIRzediHjHRYAMgBK9Y+EkxygUpBybHPTdr2TBADT0Z06K/ek9UUvKFpk9Usia+eCrsNgMBgMBkM5+ADkCHptw04GlAAAAABJRU5ErkJggg==\"\n }\n};\nfunction Icon({ name, ...props }) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\n import_react_native.Image,\n {\n source: {\n ...iconSources[name],\n width: 16,\n height: 16\n },\n ...props\n }\n );\n}\nfunction BackgroundIcon({ name, ...props }) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\n import_react_native.ImageBackground,\n {\n source: {\n ...iconSources[name],\n width: 16,\n height: 16\n },\n ...props\n }\n );\n}\n\n// src/preview/components/StoryListView/getNestedStories.ts\nfunction getNestedStories(storyIndex) {\n const stories = Object.values(storyIndex.stories);\n const group = [];\n stories.forEach((story) => {\n const nameParts = story.title.split(\"/\");\n formGroup(nameParts, story, group);\n });\n return group;\n}\nfunction formGroup(nameParts, story, group) {\n if (nameParts.length === 1) {\n const current = group.find(({ name }) => name === nameParts[0]);\n if (current) {\n current.stories.push(story);\n } else {\n group.push({\n title: story.title,\n name: nameParts[0],\n children: [],\n stories: [story]\n });\n }\n return;\n }\n const newParts = nameParts.slice(1);\n const currentListPart = group.find(({ name }) => name === nameParts[0]);\n if (!currentListPart) {\n const toPush = {\n name: nameParts[0],\n title: story.title,\n children: [],\n stories: []\n };\n group.push(toPush);\n return formGroup(newParts, story, toPush.children);\n } else if (!currentListPart.children) {\n currentListPart.children = [];\n }\n const newGroup = currentListPart.children;\n return formGroup(newParts, story, newGroup);\n}\nvar filterNestedStories = (stories, filter) => {\n const filteredStories = [];\n stories.forEach((story) => {\n const filtered = filterStoryGroup(story, filter);\n if (filtered) {\n filteredStories.push(filtered);\n }\n });\n return filteredStories;\n};\nvar filterStoryGroup = (story, filter) => {\n const filteredStories = story.stories.filter(\n (item) => item.title.toLowerCase().includes(filter.toLowerCase()) || item.name.toLowerCase().includes(filter.toLowerCase())\n );\n const filteredChildren = filterNestedStories(story.children, filter);\n if (filteredStories.length || filteredChildren.length) {\n return {\n ...story,\n children: filteredChildren,\n stories: filteredStories\n };\n }\n};\nvar findFirstChildStory = (story) => {\n if (story.stories.length) {\n return story.stories[0];\n }\n if (story.children.length) {\n return findFirstChildStory(story.children[0]);\n }\n};\n\n// src/preview/components/StoryListView/StoryListView.tsx\nvar import_jsx_runtime2 = require(\"react/jsx-runtime\");\nvar SectionHeaderText = import_react_native_theming.styled.Text(({ theme: theme3 }) => ({\n fontSize: theme3.storyList.fontSize,\n color: theme3.storyList.headerTextColor,\n fontWeight: theme3.storyList.headerFontWeight,\n flexShrink: 1\n}));\nvar StoryNameText = import_react_native_theming.styled.Text(({ selected, theme: theme3 }) => ({\n fontSize: theme3.storyList.fontSize,\n fontWeight: selected ? theme3.storyList.storySelectedFontWeight : theme3.storyList.storyFontWeight,\n color: selected ? theme3.storyList.storySelectedTextColor : theme3.storyList.storyTextColor\n}));\nvar SEARCH_ICON_SIZE = 24;\nvar SearchInput = import_react_native_theming.styled.TextInput(\n {\n padding: 0,\n ...import_react_native2.StyleSheet.absoluteFillObject\n },\n ({ theme: theme3 }) => ({\n fontSize: theme3.storyList.search.fontSize,\n paddingStart: theme3.storyList.search.paddingHorizontal + SEARCH_ICON_SIZE,\n color: theme3.storyList.search.textColor\n })\n);\nvar SearchContainer = import_react_native_theming.styled.View(({ theme: theme3 }) => ({\n flexDirection: \"row\",\n alignItems: \"center\",\n margin: theme3.panel.paddingHorizontal,\n paddingVertical: theme3.storyList.search.paddingVertical,\n paddingStart: theme3.storyList.search.paddingHorizontal,\n borderColor: theme3.storyList.search.borderColor,\n borderWidth: theme3.storyList.search.borderWidth,\n borderRadius: theme3.storyList.search.borderRadius,\n backgroundColor: theme3.storyList.search.backgroundColor\n}));\nvar SearchBar = (props) => {\n const theme3 = (0, import_react_native_theming.useTheme)();\n return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(SearchContainer, { children: [\n /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icon, { name: \"search\", style: { opacity: 0.5 } }),\n /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(\n SearchInput,\n {\n ...props,\n autoCapitalize: \"none\",\n autoComplete: \"off\",\n autoCorrect: false,\n spellCheck: false,\n clearButtonMode: \"while-editing\",\n disableFullscreenUI: true,\n placeholderTextColor: theme3.storyList.search.placeholderTextColor,\n returnKeyType: \"search\"\n }\n )\n ] });\n};\nvar HeaderContainer = import_react_native_theming.styled.TouchableOpacity(\n {\n flexDirection: \"row\",\n alignItems: \"center\"\n },\n ({ selected, theme: theme3, childSelected }) => ({\n marginTop: theme3.storyList.sectionSpacing,\n paddingHorizontal: theme3.storyList.headerPaddingHorizontal,\n paddingVertical: theme3.storyList.headerPaddingVertical,\n backgroundColor: selected ? theme3.storyList.sectionActiveBackgroundColor : void 0,\n borderTopLeftRadius: theme3.storyList.sectionBorderRadius,\n borderTopRightRadius: theme3.storyList.sectionBorderRadius,\n borderBottomLeftRadius: selected && !childSelected ? theme3.storyList.sectionBorderRadius : void 0,\n borderBottomRightRadius: selected && !childSelected ? theme3.storyList.sectionBorderRadius : void 0\n })\n);\nvar SectionHeader = import_react2.default.memo(\n ({ name, onPress, isChildSelected, icon = \"grid\", expanded }) => {\n const selected = useIsStorySectionSelected(name) || isChildSelected;\n return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(\n HeaderContainer,\n {\n selected,\n childSelected: isChildSelected,\n onPress,\n activeOpacity: 0.8,\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(\n import_react_native2.View,\n {\n style: {\n transform: [{ rotate: expanded ? \"90deg\" : \"0deg\" }],\n marginRight: 6,\n alignItems: \"center\",\n justifyContent: \"center\"\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { style: { fontSize: 8, color: \"grey\", lineHeight: 8 }, children: \"\\u27A4\" })\n }\n ),\n /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icon, { name: icon, width: 12, height: 12, style: { marginRight: 6 } }),\n /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SectionHeaderText, { numberOfLines: 2, selected, children: name })\n ]\n },\n name\n );\n }\n);\nvar ItemTouchable = import_react_native_theming.styled.TouchableOpacity(\n {\n flexDirection: \"row\",\n alignItems: \"center\"\n },\n ({ selected, sectionSelected, isLastItem, theme: theme3 }) => ({\n padding: theme3.storyList.storyPaddingHorizontal,\n paddingStart: theme3.storyList.storyIndent,\n backgroundColor: selected ? theme3.storyList.storySelectedBackgroundColor : sectionSelected ? theme3.storyList.sectionActiveBackgroundColor : void 0,\n borderBottomLeftRadius: isLastItem ? theme3.storyList.sectionBorderRadius : void 0,\n borderBottomRightRadius: isLastItem ? theme3.storyList.sectionBorderRadius : void 0\n })\n);\nvar ListItem = ({\n storyId,\n kind,\n title,\n isLastItem,\n onPress,\n isSiblingSelected\n}) => {\n const selected = useIsStorySelected(storyId);\n const sectionSelected = useIsStorySectionSelected(kind) || isSiblingSelected;\n return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(\n ItemTouchable,\n {\n onPress,\n activeOpacity: 0.8,\n testID: `Storybook.ListItem.${kind}.${title}`,\n accessibilityLabel: `Storybook.ListItem.${title}`,\n selected,\n sectionSelected,\n isLastItem,\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(\n Icon,\n {\n width: 14,\n height: 14,\n name: selected ? \"story-white\" : \"story-blue\",\n style: { marginRight: 6 }\n }\n ),\n /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(StoryNameText, { selected, children: title })\n ]\n },\n title\n );\n};\nvar styles = import_react_native2.StyleSheet.create({\n sectionList: { flex: 1 },\n sectionListContentContainer: { paddingBottom: 6 }\n});\nfunction keyExtractor(item, index) {\n return item.name + index;\n}\nvar RenderItem = ({\n item,\n changeStory\n}) => {\n const isChildSelected = useIsChildSelected(item.stories);\n const firstChild = findFirstChildStory(item);\n const firstChildSelected = useIsStorySelected(firstChild?.id);\n const [showChildren, setShowChildren] = (0, import_react2.useState)(false);\n return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [\n /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(\n SectionHeader,\n {\n name: item.name,\n isChildSelected,\n onPress: () => {\n if (firstChildSelected && showChildren) {\n setShowChildren(false);\n } else if (!showChildren && firstChild) {\n setShowChildren(true);\n changeStory(firstChild.id);\n } else if (showChildren && !firstChildSelected && firstChild) {\n changeStory(firstChild.id);\n }\n },\n icon: item.children.length ? \"folder\" : \"grid\",\n expanded: showChildren\n }\n ),\n showChildren && item.stories?.map((story, idx) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(\n ListItem,\n {\n storyId: story.id,\n title: story.name,\n kind: item.name,\n isSiblingSelected: isChildSelected,\n isLastItem: idx === item.stories.length - 1,\n onPress: () => changeStory(story.id)\n },\n story.id\n )),\n showChildren && item.children?.map((child, idx) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.View, { style: { marginLeft: 16 }, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RenderItem, { item: child, changeStory }) }, `${child.title}-${idx}`))\n ] });\n};\nvar StoryListView = ({ storyIndex }) => {\n const originalData = (0, import_react2.useMemo)(() => getNestedStories(storyIndex), [storyIndex]);\n const [data, setData] = (0, import_react2.useState)(originalData);\n const theme3 = (0, import_react_native_theming.useTheme)();\n const handleChangeSearchText = (text) => {\n const query = text.trim();\n if (!query) {\n setData(originalData);\n return;\n }\n setData(filterNestedStories(originalData, query));\n };\n const changeStory = (storyId) => {\n const channel = import_addons.addons.getChannel();\n channel.emit(import_core_events.default.SET_CURRENT_STORY, { storyId });\n };\n const renderItem = import_react2.default.useCallback(({ item }) => {\n return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RenderItem, { item, changeStory });\n }, []);\n return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native2.View, { style: { flex: 1 }, children: [\n /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(\n SearchBar,\n {\n testID: \"Storybook.ListView.SearchBar\",\n onChangeText: handleChangeSearchText,\n placeholder: \"Find by name\"\n }\n ),\n /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(\n import_react_native2.FlatList,\n {\n style: styles.sectionList,\n contentContainerStyle: [\n styles.sectionListContentContainer,\n {\n paddingVertical: theme3.panel.paddingVertical,\n paddingHorizontal: theme3.panel.paddingHorizontal\n }\n ],\n testID: \"Storybook.ListView\",\n renderItem,\n keyExtractor,\n data\n }\n )\n ] });\n};\nvar StoryListView_default = import_react2.default.memo(StoryListView);\n\n// src/preview/components/StoryView/StoryView.tsx\nvar import_react3 = __toESM(require(\"react\"));\nvar import_react_native_theming2 = require(\"@storybook/react-native-theming\");\nvar import_react_native3 = require(\"react-native\");\nvar import_jsx_runtime3 = require(\"react/jsx-runtime\");\nfunction dismissOnStartResponder() {\n import_react_native3.Keyboard.dismiss();\n return false;\n}\nvar StoryView = () => {\n const context = useStoryContext();\n const id = context?.id;\n const { backgroundColor } = (0, import_react_native_theming2.useTheme)();\n if (context && context.unboundStoryFn) {\n const { unboundStoryFn: StoryComponent } = context;\n return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(\n import_react_native3.View,\n {\n style: { flex: 1, backgroundColor },\n testID: id,\n onStartShouldSetResponder: dismissOnStartResponder,\n children: StoryComponent && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(StoryComponent, { ...context })\n },\n id\n );\n }\n return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.View, { style: { flex: 1, padding: 16, alignItems: \"center\", justifyContent: \"center\" }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { children: \"Please open the sidebar and select a story to preview.\" }) });\n};\nvar StoryView_default = import_react3.default.memo(StoryView);\n\n// src/preview/components/OnDeviceUI/absolute-positioned-keyboard-aware-view.tsx\nvar import_react4 = __toESM(require(\"react\"));\nvar import_react_native4 = require(\"react-native\");\nvar import_jsx_runtime4 = require(\"react/jsx-runtime\");\nvar AbsolutePositionedKeyboardAwareView = ({\n onLayout,\n previewDimensions: { width, height },\n children\n}) => {\n const onLayoutHandler = ({ nativeEvent }) => {\n const { height: layoutHeight, width: layoutWidth } = nativeEvent.layout;\n if (layoutHeight !== height || layoutWidth !== width) {\n onLayout({\n height: layoutHeight,\n width: layoutWidth\n });\n }\n };\n return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native4.View, { style: styles2.container, onLayout: onLayoutHandler, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(\n import_react_native4.View,\n {\n style: width === 0 ? styles2.container : [styles2.absolute, { position: \"absolute\", width, height }],\n children\n }\n ) });\n};\nvar styles2 = import_react_native4.StyleSheet.create({\n absolute: { position: \"absolute\" },\n container: { flex: 1 }\n});\nvar absolute_positioned_keyboard_aware_view_default = import_react4.default.memo(AbsolutePositionedKeyboardAwareView);\n\n// src/preview/components/OnDeviceUI/addons/Addons.tsx\nvar import_addons2 = require(\"@storybook/addons\");\nvar import_react_native_theming6 = require(\"@storybook/react-native-theming\");\nvar import_react8 = __toESM(require(\"react\"));\nvar import_react_native7 = require(\"react-native\");\n\n// src/preview/components/OnDeviceUI/addons/List.tsx\nvar import_react6 = __toESM(require(\"react\"));\n\n// src/preview/components/Shared/tabs.tsx\nvar import_react5 = __toESM(require(\"react\"));\nvar import_react_native5 = require(\"react-native\");\nvar import_react_native_theming3 = require(\"@storybook/react-native-theming\");\nvar import_react_native_theming4 = require(\"@storybook/react-native-theming\");\nvar import_jsx_runtime5 = require(\"react/jsx-runtime\");\nvar TabButtonText = import_react_native_theming3.styled.Text(({ theme: theme3, active }) => ({\n color: active ? theme3.tabs.activeTextColor : theme3.tabs.inactiveTextColor,\n paddingVertical: theme3.tabs.paddingVertical,\n paddingHorizontal: theme3.tabs.paddingHorizontal,\n fontSize: theme3.tabs.fontSize,\n fontWeight: theme3.tabs.fontWeight\n}));\nvar hitSlop = { top: 8, left: 0, right: 0, bottom: 20 };\nvar TabButtonTouchable = import_react_native_theming3.styled.TouchableOpacity(({ theme: theme3, active }) => ({\n borderWidth: theme3.tabs.borderWidth,\n borderColor: active ? theme3.tabs.activeBorderColor : theme3.tabs.inactiveBorderColor,\n borderRadius: theme3.tabs.borderRadius,\n backgroundColor: active ? theme3.tabs.activeBackgroundColor : theme3.tabs.inactiveBackgroundColor\n}));\nvar TabButton = import_react5.default.memo(({ onPress, id, active, children, testID }) => {\n return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(\n TabButtonTouchable,\n {\n active,\n testID,\n onPress: () => onPress(id),\n activeOpacity: 0.8,\n hitSlop,\n children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TabButtonText, { active, children })\n }\n );\n});\nvar TabBar = import_react5.default.memo(({ scrollable = false, style, children }) => {\n const theme3 = (0, import_react_native_theming4.useTheme)();\n if (scrollable) {\n children = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(\n import_react_native5.ScrollView,\n {\n showsHorizontalScrollIndicator: false,\n horizontal: true,\n contentContainerStyle: { paddingHorizontal: theme3.tokens.spacing2 },\n children\n }\n );\n }\n return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native5.View, { style, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TabBarContainer, { children }) });\n});\nvar TabBarContainer = import_react_native_theming3.styled.View(() => ({\n flexDirection: \"row\",\n paddingVertical: 6,\n justifyItems: \"center\"\n}));\n\n// src/preview/components/OnDeviceUI/addons/List.tsx\nvar import_jsx_runtime6 = require(\"react/jsx-runtime\");\nvar AddonList = ({ panels, addonSelected, onPressAddon }) => {\n const addonKeys = Object.keys(panels);\n return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TabBar, { scrollable: true, children: addonKeys.map((id) => {\n const { title } = panels[id];\n const resolvedTitle = typeof title === \"function\" ? title() : title;\n return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(\n TabButton,\n {\n active: id === addonSelected,\n id,\n onPress: () => onPressAddon(id),\n children: resolvedTitle.toUpperCase()\n },\n id\n );\n }) });\n};\nvar List_default = import_react6.default.memo(AddonList);\n\n// src/preview/components/OnDeviceUI/addons/Wrapper.tsx\nvar import_react7 = __toESM(require(\"react\"));\nvar import_react_native6 = require(\"react-native\");\nvar import_react_native_theming5 = require(\"@storybook/react-native-theming\");\nvar import_jsx_runtime7 = require(\"react/jsx-runtime\");\nvar Container = import_react_native_theming5.styled.View(({ selected }) => ({\n display: selected ? \"flex\" : \"none\",\n flex: 1\n}));\nvar Wrapper = ({ panels, addonSelected }) => {\n useUpdateOnStoryChanged();\n const theme3 = (0, import_react_native_theming5.useTheme)();\n const addonKeys = Object.keys(panels);\n const content = addonKeys.map((id) => {\n const selected = addonSelected === id;\n return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Container, { selected, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native6.ScrollView, { contentContainerStyle: { padding: theme3.panel.paddingHorizontal }, children: panels[id].render({ active: selected, key: id }) }) }, id);\n });\n return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: content });\n};\nvar Wrapper_default = import_react7.default.memo(Wrapper);\n\n// src/preview/components/OnDeviceUI/addons/Addons.tsx\nvar import_jsx_runtime8 = require(\"react/jsx-runtime\");\nvar Text3 = import_react_native_theming6.styled.Text(({ theme: theme3 }) => ({\n marginTop: theme3.tokens.spacing4\n}));\nvar Addons = ({ active }) => {\n const panels = import_addons2.addons.getElements(\"panel\");\n const [addonSelected, setAddonSelected] = useSelectedAddon(Object.keys(panels)[0]);\n const context = useStoryContext();\n const id = context?.id;\n if (!id) {\n return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.View, { style: { alignItems: \"center\", justifyContent: \"center\" }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text3, { children: \"No Story Selected\" }) });\n }\n if (Object.keys(panels).length === 0) {\n return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.View, { style: { alignItems: \"center\", justifyContent: \"center\" }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text3, { children: \"No addons loaded.\" }) });\n }\n return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native7.View, { style: { flex: 1 }, children: [\n /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(\n List_default,\n {\n onPressAddon: setAddonSelected,\n panels,\n addonSelected: active ? addonSelected : null\n }\n ),\n /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Wrapper_default, { addonSelected: active ? addonSelected : null, panels })\n ] });\n};\nvar Addons_default = import_react8.default.memo(Addons);\n\n// src/preview/components/OnDeviceUI/addons/AddonsSkeleton.tsx\nvar import_react9 = __toESM(require(\"react\"));\nvar import_react_native_theming7 = require(\"@storybook/react-native-theming\");\nvar import_react_native8 = require(\"react-native\");\nvar import_jsx_runtime9 = require(\"react/jsx-runtime\");\nvar AddonsSkeleton = import_react9.default.memo(function AddonsSkeleton2({ visible }) {\n const progress = import_react9.default.useRef(new import_react_native8.Animated.Value(visible ? 1 : 0));\n import_react9.default.useEffect(() => {\n import_react_native8.Animated.timing(progress.current, {\n toValue: visible ? 1 : 0,\n duration: ANIMATION_DURATION_TRANSITION,\n useNativeDriver: true,\n easing: import_react_native8.Easing.inOut(import_react_native8.Easing.cubic)\n }).start();\n }, [visible]);\n return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(AddonsSkeletonContainer, { pointerEvents: \"none\", style: { opacity: progress.current }, children: [\n /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TabsSkeleton, {}),\n /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AddonsContentSkeleton, {})\n ] });\n});\nvar TabSkeleton = import_react_native_theming7.styled.View(({ theme: theme3, active }) => ({\n opacity: active ? 1 : 0.5,\n backgroundColor: active ? theme3.tabs.activeBackgroundColor : theme3.tokens.color.grey200,\n borderRadius: theme3.tokens.borderRadius.round,\n width: active ? 100 : 70,\n height: 30,\n marginRight: 12\n}));\nvar BoxSkeleton = import_react_native_theming7.styled.View(\n ({ theme: theme3, width, height, marginBottom }) => ({\n backgroundColor: theme3.tokens.color.blue200,\n borderRadius: theme3.tokens.borderRadius.large,\n height,\n marginBottom,\n width\n })\n);\nfunction AddonsFieldSkeleton({ long = false }) {\n return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native8.View, { style: { marginBottom: 32 }, children: [\n /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(BoxSkeleton, { width: 75, height: 10, marginBottom: 12 }),\n /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(BoxSkeleton, { width: long ? 200 : 120, height: 15 })\n ] });\n}\nfunction AddonsContentSkeleton() {\n return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [\n /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AddonsFieldSkeleton, { long: true }),\n /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AddonsFieldSkeleton, { long: true }),\n /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AddonsFieldSkeleton, {}),\n /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AddonsFieldSkeleton, {})\n ] });\n}\nfunction TabsSkeleton() {\n return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native8.View, { style: { flexDirection: \"row\", marginBottom: 16 }, children: [\n /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TabSkeleton, {}),\n /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TabSkeleton, { active: true }),\n /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TabSkeleton, {})\n ] });\n}\nvar AddonsSkeletonContainer = (0, import_react_native_theming7.styled)(import_react_native8.Animated.View)(\n ({ theme: theme3 }) => ({\n ...import_react_native8.StyleSheet.absoluteFillObject,\n flex: 1,\n backgroundColor: theme3.panel.backgroundColor,\n borderTopWidth: theme3.panel.borderWidth,\n borderColor: theme3.panel.borderColor,\n padding: theme3.panel.paddingHorizontal,\n overflow: \"hidden\"\n })\n);\n\n// src/preview/components/OnDeviceUI/animation.ts\nvar import_react_native9 = require(\"react-native\");\n\n// src/preview/components/OnDeviceUI/navigation/constants.ts\nvar SIDEBAR = -1;\nvar CANVAS = 0;\nvar ADDONS = 1;\n\n// src/preview/components/OnDeviceUI/animation.ts\nvar RTL_SCALE = import_react_native9.I18nManager.isRTL ? -1 : 1;\nvar PREVIEW_SCALE = 0.3;\nvar PREVIEW_SCALE_WIDE = 0.7;\nvar PREVIEW_SCALE_SHRINK = 0.9;\nvar SCALE_OFFSET = 0.025;\nvar TRANSLATE_Y_OFFSET = 12;\nvar panelWidth = (width, wide) => {\n const scale = wide ? PREVIEW_SCALE_WIDE : PREVIEW_SCALE;\n return width * (1 - scale - SCALE_OFFSET);\n};\nvar getSidebarPanelPosition = (animatedValue, previewWidth, wide) => {\n return [\n {\n transform: [\n {\n translateX: animatedValue.interpolate({\n inputRange: [SIDEBAR, CANVAS],\n outputRange: [0, (-panelWidth(previewWidth, wide) - 1) * RTL_SCALE]\n })\n }\n ],\n width: panelWidth(previewWidth, wide)\n }\n ];\n};\nvar getAddonPanelPosition = (animatedValue, previewWidth, wide) => {\n return [\n {\n transform: [\n {\n translateX: animatedValue.interpolate({\n inputRange: [CANVAS, ADDONS],\n outputRange: [\n previewWidth * RTL_SCALE,\n (previewWidth - panelWidth(previewWidth, wide)) * RTL_SCALE\n ]\n })\n }\n ],\n width: panelWidth(previewWidth, wide)\n }\n ];\n};\nvar getPreviewStyle = ({\n animatedValue,\n previewDimensions: { width: previewWidth, height: previewHeight },\n wide,\n insets,\n tabOpen,\n lastTabOpen\n}) => {\n const scale = (wide ? PREVIEW_SCALE_WIDE : PREVIEW_SCALE) * PREVIEW_SCALE_SHRINK;\n const scaledPreviewWidth = previewWidth * scale;\n const scaledPreviewHeight = previewHeight * scale;\n const nonPanelWidth = previewWidth - panelWidth(previewWidth, wide);\n const translateXOffset = (nonPanelWidth - scaledPreviewWidth) / 2;\n const translateX = (previewWidth / 2 - previewWidth * scale / 2 - translateXOffset) * RTL_SCALE;\n const translateY = -(previewHeight / 2 - scaledPreviewHeight / 2) + insets.top + TRANSLATE_Y_OFFSET;\n const skipPreview = lastTabOpen !== CANVAS && tabOpen !== CANVAS;\n return {\n transform: [\n {\n translateX: animatedValue.interpolate({\n inputRange: [SIDEBAR, CANVAS, ADDONS],\n outputRange: [translateX, 0, -translateX]\n })\n },\n {\n translateY: animatedValue.interpolate({\n inputRange: [SIDEBAR, CANVAS, ADDONS],\n outputRange: [translateY, skipPreview ? translateY : 0, translateY]\n })\n },\n {\n scale: animatedValue.interpolate({\n inputRange: [SIDEBAR, CANVAS, ADDONS],\n outputRange: [scale, skipPreview ? scale : 1, scale]\n })\n }\n ]\n };\n};\nvar getPreviewShadowStyle = (animatedValue) => ({\n elevation: 8,\n shadowColor: \"#000\",\n shadowOpacity: animatedValue.interpolate({\n inputRange: [SIDEBAR, CANVAS, ADDONS],\n outputRange: [0.25, 0, 0.25]\n }),\n shadowRadius: 8,\n shadowOffset: { width: 0, height: 0 },\n overflow: \"visible\"\n});\n\n// src/preview/components/OnDeviceUI/navigation/Navigation.tsx\nvar import_react11 = __toESM(require(\"react\"));\nvar import_react_native11 = require(\"react-native\");\nvar import_react_native_safe_area_context = require(\"react-native-safe-area-context\");\nvar import_react_native_swipe_gestures = __toESM(require(\"react-native-swipe-gestures\"));\n\n// src/preview/components/OnDeviceUI/navigation/NavigationBar.tsx\nvar import_react10 = __toESM(require(\"react\"));\nvar import_react_native_theming8 = require(\"@storybook/react-native-theming\");\nvar import_jsx_runtime10 = require(\"react/jsx-runtime\");\nvar NavigationTabBar = (0, import_react_native_theming8.styled)(TabBar)(({ theme: theme3 }) => ({\n paddingHorizontal: theme3.tokens.spacing2,\n backgroundColor: theme3.navigation.backgroundColor,\n borderColor: theme3.navigation.borderColor,\n borderTopWidth: theme3.navigation.borderWidth\n}));\nvar NavigationBar = import_react10.default.memo(({ index, onPress, style }) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(NavigationTabBar, { style, children: [\n /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(\n TabButton,\n {\n onPress,\n testID: \"BottomMenu.Sidebar\",\n id: SIDEBAR,\n active: index === SIDEBAR,\n children: \"SIDEBAR\"\n }\n ),\n /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TabButton, { onPress, testID: \"BottomMenu.Canvas\", id: CANVAS, active: index === CANVAS, children: \"CANVAS\" }),\n /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TabButton, { onPress, testID: \"BottomMenu.Addons\", id: ADDONS, active: index === ADDONS, children: \"ADDONS\" })\n] }));\n\n// src/preview/components/OnDeviceUI/navigation/NavigationButton.tsx\nvar import_react_native10 = require(\"react-native\");\nvar import_jsx_runtime11 = require(\"react/jsx-runtime\");\nvar hitSlop2 = { top: 5, left: 5, right: 5, bottom: 5 };\nfunction NavigationButton({ iconName, inverseIconName, active, toggle }) {\n return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native10.TouchableWithoutFeedback, { onPress: toggle, hitSlop: hitSlop2, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native10.View, { style: { marginHorizontal: 8 }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(BackgroundIcon, { style: { flex: 1, opacity: 0.8 }, name: inverseIconName, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { name: iconName, style: { opacity: active ? 0.6 : 0.25 } }) }) }) });\n}\nfunction VisibilityButton() {\n const [active, toggle] = useIsUIVisible();\n return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(\n NavigationButton,\n {\n iconName: \"layout-bottom\",\n inverseIconName: \"layout-bottom-inverse\",\n active,\n toggle: () => toggle()\n }\n );\n}\nfunction AddonsSplitButton() {\n const [active, toggle] = useIsSplitPanelVisible();\n return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(\n NavigationButton,\n {\n iconName: \"layout-split\",\n inverseIconName: \"layout-split-inverse\",\n active,\n toggle: () => toggle()\n }\n );\n}\n\n// src/preview/components/OnDeviceUI/navigation/Navigation.tsx\nvar import_jsx_runtime12 = require(\"react/jsx-runtime\");\nvar SWIPE_CONFIG = {\n velocityThreshold: 0.2,\n directionalOffsetThreshold: 80\n};\nvar navStyle = {\n position: \"absolute\",\n left: 0,\n right: 0,\n bottom: 0\n};\nvar Navigation = ({ tabOpen, onChangeTab, onLayout }) => {\n const insets = (0, import_react_native_safe_area_context.useSafeAreaInsets)();\n const handleSwipeLeft = () => {\n if (tabOpen < 1) {\n onChangeTab(tabOpen + 1);\n }\n };\n const handleSwipeRight = () => {\n if (tabOpen > -1) {\n onChangeTab(tabOpen - 1);\n }\n };\n const [isUIVisible] = useIsUIVisible();\n return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native11.View, { style: navStyle, onLayout, children: [\n /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native11.View, { children: isUIVisible && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(\n import_react_native_swipe_gestures.default,\n {\n onSwipeLeft: handleSwipeLeft,\n onSwipeRight: handleSwipeRight,\n config: SWIPE_CONFIG,\n children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(\n NavigationBar,\n {\n index: tabOpen,\n onPress: onChangeTab,\n style: { paddingBottom: insets.bottom }\n }\n )\n }\n ) }),\n /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(NavigationShortcuts, { children: [\n /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(VisibilityButton, {}),\n /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AddonsSplitButton, {})\n ] })\n ] });\n};\nvar Navigation_default = import_react11.default.memo(Navigation);\nfunction NavigationShortcuts({ children }) {\n const insets = (0, import_react_native_safe_area_context.useSafeAreaInsets)();\n return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(\n import_react_native11.View,\n {\n style: {\n zIndex: 100,\n alignSelf: \"center\",\n justifyContent: \"center\",\n alignItems: \"center\",\n flexDirection: \"row-reverse\",\n position: \"absolute\",\n bottom: insets.bottom + 14,\n right: 8\n },\n children\n }\n );\n}\n\n// src/preview/components/OnDeviceUI/Panel.tsx\nvar import_react12 = __toESM(require(\"react\"));\nvar import_react_native12 = require(\"react-native\");\nvar import_react_native_theming9 = require(\"@storybook/react-native-theming\");\nvar import_jsx_runtime13 = require(\"react/jsx-runtime\");\nvar Container2 = (0, import_react_native_theming9.styled)(import_react_native12.Animated.View)(({ theme: theme3, edge }) => ({\n backgroundColor: theme3.panel.backgroundColor,\n borderTopWidth: edge === \"top\" ? theme3.panel.borderWidth : void 0,\n borderStartWidth: edge === \"left\" ? theme3.panel.borderWidth : void 0,\n borderEndWidth: edge === \"right\" ? theme3.panel.borderWidth : void 0,\n borderColor: theme3.panel.borderColor\n}));\nvar Panel = ({ edge, children, style }) => {\n const containerStyle = import_react_native12.StyleSheet.flatten([\n edge === \"top\" ? void 0 : import_react_native12.StyleSheet.absoluteFillObject,\n style\n ]);\n return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Container2, { edge, style: containerStyle, children });\n};\nvar Panel_default = import_react12.default.memo(Panel);\n\n// src/preview/components/OnDeviceUI/OnDeviceUI.tsx\nvar import_react_native14 = require(\"react-native\");\nvar import_react_native_safe_area_context2 = require(\"react-native-safe-area-context\");\nvar import_react_native_theming11 = require(\"@storybook/react-native-theming\");\nvar import_jsx_runtime14 = require(\"react/jsx-runtime\");\nvar IS_IOS = import_react_native13.Platform.OS === \"ios\";\nvar getExpoRoot = () => global.Expo || global.__expo || global.__exponent;\nvar IS_EXPO = getExpoRoot() !== void 0;\nvar IS_ANDROID = import_react_native13.Platform.OS === \"android\";\nvar BREAKPOINT = 1024;\nvar flex = { flex: 1 };\nfunction Preview({ animatedValue, style, children }) {\n const theme3 = (0, import_react_native_theming11.useTheme)();\n const containerStyle = {\n backgroundColor: theme3.preview.backgroundColor,\n ...getPreviewShadowStyle(animatedValue)\n };\n return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native13.Animated.View, { style: [flex, containerStyle], children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native13.View, { style: [flex, style], children }) });\n}\nvar styles3 = import_react_native13.StyleSheet.create({\n expoAndroidContainer: { paddingTop: import_react_native13.StatusBar.currentHeight }\n});\nvar Container3 = import_react_native_theming10.styled.View(({ theme: theme3 }) => ({\n flex: 1,\n backgroundColor: theme3.preview.containerBackgroundColor,\n ...IS_ANDROID && IS_EXPO ? styles3.expoAndroidContainer : void 0,\n ...import_react_native13.Platform.select({ web: { overflow: \"hidden\" } })\n}));\nvar OnDeviceUI = ({\n storyIndex,\n shouldDisableKeyboardAvoidingView,\n keyboardAvoidingViewVerticalOffset,\n tabOpen: initialTabOpen\n}) => {\n const [tabOpen, setTabOpen] = (0, import_react13.useState)(initialTabOpen || CANVAS);\n const lastTabOpen = import_react13.default.useRef(tabOpen);\n const [previewDimensions, setPreviewDimensions] = (0, import_react13.useState)(() => ({\n width: import_react_native13.Dimensions.get(\"window\").width,\n height: import_react_native13.Dimensions.get(\"window\").height\n }));\n const animatedValue = (0, import_react13.useRef)(new import_react_native13.Animated.Value(tabOpen));\n const wide = (0, import_react_native14.useWindowDimensions)().width >= BREAKPOINT;\n const insets = (0, import_react_native_safe_area_context2.useSafeAreaInsets)();\n const handleToggleTab = import_react13.default.useCallback(\n (newTabOpen) => {\n if (newTabOpen === tabOpen) {\n return;\n }\n lastTabOpen.current = tabOpen;\n import_react_native13.Animated.timing(animatedValue.current, {\n toValue: newTabOpen,\n duration: ANIMATION_DURATION_TRANSITION,\n easing: import_react_native13.Easing.inOut(import_react_native13.Easing.cubic),\n useNativeDriver: true\n }).start();\n setTabOpen(newTabOpen);\n if (newTabOpen === CANVAS) {\n import_react_native13.Keyboard.dismiss();\n }\n },\n [tabOpen]\n );\n const noSafeArea = useStoryContextParam(\"noSafeArea\", false);\n const previewWrapperStyles = [\n flex,\n getPreviewStyle({\n animatedValue: animatedValue.current,\n previewDimensions,\n wide,\n insets,\n tabOpen,\n lastTabOpen: lastTabOpen.current\n })\n ];\n const [isUIVisible] = useIsUIVisible();\n const [navBarHeight, setNavBarHeight] = import_react13.default.useState(insets.bottom + 40);\n const measureNavigation = import_react13.default.useCallback(\n ({ nativeEvent }) => {\n const inset = insets.bottom;\n setNavBarHeight(isUIVisible ? nativeEvent.layout.height - inset : 0);\n },\n [isUIVisible, insets]\n );\n const safeAreaMargins = {\n paddingBottom: isUIVisible ? insets.bottom + navBarHeight : noSafeArea ? 0 : insets.bottom,\n paddingTop: !noSafeArea ? insets.top : 0,\n overflow: \"hidden\"\n };\n const panelSafeAreaMargins = {\n paddingBottom: insets.bottom + navBarHeight,\n paddingTop: insets.top\n };\n const keyboardVerticalOffset = -panelSafeAreaMargins.paddingBottom + (keyboardAvoidingViewVerticalOffset ?? 0);\n const [isSplitPanelVisible] = useIsSplitPanelVisible();\n const isPreviewInactive = tabOpen !== CANVAS;\n return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_jsx_runtime14.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Container3, { children: [\n /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(\n import_react_native13.KeyboardAvoidingView,\n {\n enabled: !shouldDisableKeyboardAvoidingView || isPreviewInactive,\n behavior: IS_IOS ? \"padding\" : null,\n keyboardVerticalOffset,\n style: flex,\n children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(\n absolute_positioned_keyboard_aware_view_default,\n {\n onLayout: setPreviewDimensions,\n previewDimensions,\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native13.Animated.View, { style: previewWrapperStyles, children: [\n /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Preview, { style: safeAreaMargins, animatedValue: animatedValue.current, children: [\n /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(StoryView_default, {}),\n isSplitPanelVisible ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Panel_default, { edge: \"top\", style: { flex: 1 }, children: [\n /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Addons_default, { active: true }),\n /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AddonsSkeleton, { visible: isPreviewInactive })\n ] }) : null\n ] }),\n isPreviewInactive ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(\n import_react_native13.TouchableOpacity,\n {\n style: import_react_native13.StyleSheet.absoluteFillObject,\n onPress: () => handleToggleTab(CANVAS)\n }\n ) : null\n ] }),\n /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(\n Panel_default,\n {\n edge: \"right\",\n style: [\n getSidebarPanelPosition(animatedValue.current, previewDimensions.width, wide),\n panelSafeAreaMargins\n ],\n children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(StoryListView_default, { storyIndex })\n }\n ),\n /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(\n Panel_default,\n {\n edge: \"left\",\n style: [\n getAddonPanelPosition(animatedValue.current, previewDimensions.width, wide),\n panelSafeAreaMargins\n ],\n children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Addons_default, { active: tabOpen === ADDONS })\n }\n )\n ]\n }\n )\n }\n ),\n /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Navigation_default, { onLayout: measureNavigation, tabOpen, onChangeTab: handleToggleTab })\n ] }) });\n};\nvar OnDeviceUI_default = import_react13.default.memo(OnDeviceUI);\n\n// src/preview/View.tsx\nvar import_react_native_theming13 = require(\"@storybook/react-native-theming\");\nvar import_channel_websocket = __toESM(require(\"@storybook/channel-websocket\"));\n\n// src/preview/rn-host-detect.js\nfunction getByRemoteConfig(hostname) {\n var remoteModuleConfig = window?.__fbBatchedBridgeConfig?.remoteModuleConfig;\n if (!Array.isArray(remoteModuleConfig) || hostname !== \"localhost\" && hostname !== \"127.0.0.1\") {\n return { hostname, passed: false };\n }\n var constants = (remoteModuleConfig.find(getConstants) || [])[1];\n if (constants) {\n var serverHost = constants.ServerHost || hostname;\n return { hostname: serverHost.split(\":\")[0], passed: true };\n }\n return { hostname, passed: false };\n}\nfunction getConstants(config) {\n return config && (config[0] === \"AndroidConstants\" || config[0] === \"PlatformConstants\");\n}\nfunction getByRNRequirePolyfill(hostname) {\n var NativeModules;\n var PlatformConstants;\n var AndroidConstants;\n if (typeof window === \"undefined\" || !window.__DEV__ || typeof window.require !== \"function\" || // RN >= 0.56\n // TODO: Get NativeModules for RN >= 0.56\n window.require.name === \"metroRequire\") {\n return hostname;\n }\n NativeModules = window.require(\"NativeModules\");\n if (!NativeModules || !NativeModules.PlatformConstants && !NativeModules.AndroidConstants) {\n return hostname;\n }\n PlatformConstants = NativeModules.PlatformConstants;\n AndroidConstants = NativeModules.AndroidConstants;\n var serverHost = (PlatformConstants ? PlatformConstants.ServerHost : AndroidConstants.ServerHost) || hostname;\n return serverHost.split(\":\")[0];\n}\nfunction getHost(hostname) {\n if (typeof __fbBatchedBridge !== \"object\" || hostname !== \"localhost\" && hostname !== \"127.0.0.1\") {\n return hostname;\n }\n var result = getByRemoteConfig(hostname);\n if (result.passed) {\n return result.hostname;\n }\n return getByRNRequirePolyfill(hostname);\n}\n\n// src/preview/View.tsx\nvar import_core_events2 = __toESM(require(\"@storybook/core-events\"));\nvar import_react_native15 = require(\"react-native\");\nvar import_deepmerge = __toESM(require(\"deepmerge\"));\nvar import_jsx_runtime15 = require(\"react/jsx-runtime\");\nvar STORAGE_KEY = \"lastOpenedStory\";\nvar View10 = class {\n _storyIndex;\n _setStory = () => {\n };\n _forceRerender;\n _ready = false;\n _preview;\n _asyncStorageStoryId;\n _webUrl;\n constructor(preview) {\n this._preview = preview;\n }\n _getInitialStory = async ({\n initialSelection,\n shouldPersistSelection = true\n } = {}) => {\n if (initialSelection) {\n if (typeof initialSelection === \"string\") {\n return { storySpecifier: initialSelection, viewMode: \"story\" };\n } else {\n return {\n storySpecifier: (0, import_csf.toId)(initialSelection.kind, initialSelection.name),\n viewMode: \"story\"\n };\n }\n }\n if (shouldPersistSelection) {\n try {\n let value = this._asyncStorageStoryId;\n if (!value) {\n value = await import_async_storage.default.getItem(STORAGE_KEY);\n this._asyncStorageStoryId = value;\n }\n return { storySpecifier: value ?? \"*\", viewMode: \"story\" };\n } catch (e) {\n console.warn(\"storybook-log: error reading from async storage\", e);\n }\n }\n return { storySpecifier: \"*\", viewMode: \"story\" };\n };\n _getServerChannel = (params = {}) => {\n const host = getHost(params.host || \"localhost\");\n const port = `:${params.port || 7007}`;\n const query = params.query || \"\";\n const websocketType = params.secured ? \"wss\" : \"ws\";\n const url = `${websocketType}://${host}${port}/${query}`;\n return (0, import_channel_websocket.default)({\n url,\n async: true,\n onError: async () => {\n }\n });\n };\n getStorybookUI = (params = {}) => {\n const { shouldPersistSelection = true, onDeviceUI = true, enableWebsockets = false } = params;\n const initialStory = this._getInitialStory(params);\n if (enableWebsockets) {\n const channel = this._getServerChannel(params);\n import_addons3.addons.setChannel(channel);\n this._preview.channel = channel;\n this._preview.setupListeners();\n channel.emit(import_core_events2.default.CHANNEL_CREATED);\n this._preview.initializeWithStoryIndex(this._storyIndex);\n }\n import_addons3.addons.loadAddons({\n store: () => ({\n fromId: (id) => this._preview.storyStore.getStoryContext(this._preview.storyStore.fromId(id)),\n getSelection: () => {\n return this._preview.currentSelection;\n },\n _channel: this._preview.channel\n })\n });\n const self = this;\n syncExternalUI({\n isUIVisible: params.isUIHidden !== void 0 ? !params.isUIHidden : void 0,\n isSplitPanelVisible: params.isSplitPanelVisible\n });\n return () => {\n const setContext = useSetStoryContext();\n const colorScheme = (0, import_react_native15.useColorScheme)();\n const [, forceUpdate] = (0, import_react14.useReducer)((x) => x + 1, 0);\n const appliedTheme = (0, import_react14.useMemo)(\n () => (0, import_deepmerge.default)(colorScheme === \"dark\" ? import_react_native_theming13.darkTheme : import_react_native_theming13.theme, params.theme ?? {}),\n [colorScheme]\n );\n (0, import_react14.useEffect)(() => {\n self._setStory = (newStory) => {\n setContext(newStory);\n if (shouldPersistSelection) {\n import_async_storage.default.setItem(STORAGE_KEY, newStory.id).catch((e) => {\n console.warn(\"storybook-log: error writing to async storage\", e);\n });\n }\n };\n self._forceRerender = () => forceUpdate();\n initialStory.then((story) => {\n self._preview.urlStore.selectionSpecifier = story;\n self._preview.selectSpecifiedStory();\n });\n }, []);\n if (onDeviceUI) {\n return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native_safe_area_context3.SafeAreaProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native_theming12.ThemeProvider, { theme: appliedTheme, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(\n OnDeviceUI_default,\n {\n storyIndex: self._storyIndex,\n tabOpen: params.tabOpen,\n shouldDisableKeyboardAvoidingView: params.shouldDisableKeyboardAvoidingView,\n keyboardAvoidingViewVerticalOffset: params.keyboardAvoidingViewVerticalOffset\n }\n ) }) });\n } else {\n return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(StoryView_default, {});\n }\n };\n };\n};\n\n// src/preview/start.tsx\nvar import_jsx_runtime16 = require(\"react/jsx-runtime\");\nvar render = (args, context) => {\n const { id, component: Component } = context;\n if (!Component) {\n throw new Error(\n `Unable to render story ${id} as the component annotation is missing from the default export`\n );\n }\n return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Component, { ...args });\n};\nfunction start() {\n const channel = new import_channels.default({ async: true });\n import_addons4.addons.setChannel(channel);\n const clientApi2 = new import_client_api.ClientApi();\n const previewView = {\n prepareForStory: () => null,\n showNoPreview: () => {\n },\n showPreparingStory: () => {\n },\n applyLayout: () => {\n },\n showErrorDisplay: (e) => {\n console.log(e);\n },\n showStoryDuringRender: () => {\n },\n showMain: () => {\n },\n checkIfLayoutExists: () => {\n },\n showStory: () => {\n },\n docsRoot: null,\n prepareForDocs: () => null,\n showDocs: () => {\n },\n preparingTimeout: setTimeout(() => {\n }, 0),\n showMode: () => {\n },\n showPreparingDocs: () => {\n },\n storyRoot: null,\n testing: false\n };\n const urlStore = {\n selection: null,\n selectionSpecifier: null,\n setQueryParams: () => {\n },\n setSelection: (selection) => {\n preview.urlStore.selection = selection;\n }\n };\n const preview = new import_preview_web.PreviewWeb(urlStore, previewView);\n clientApi2.storyStore = preview.storyStore;\n (0, import_client_api.setGlobalRender)(render);\n let initialized = false;\n function onStoriesChanged() {\n const storyIndex = clientApi2.getStoryIndex();\n preview.onStoriesChanged({ storyIndex });\n view2._storyIndex = storyIndex;\n }\n const view2 = new View10(preview);\n return {\n view: view2,\n forceReRender: () => channel.emit(import_core_events3.default.FORCE_RE_RENDER),\n clientApi: clientApi2,\n preview,\n // This gets called each time the user calls configure (i.e. once per HMR)\n // The first time, it constructs thecurrentSelection preview, subsequently it updates it\n configure(loadable, m) {\n clientApi2.addParameters({ framework: \"react-native\" });\n const getProjectAnnotations = () => {\n const { added, removed } = executeLoadableForChanges(loadable, m);\n Array.from(added.entries()).forEach(\n ([fileName, fileExports]) => clientApi2.facade.addStoriesFromExports(fileName, fileExports)\n );\n Array.from(removed.entries()).forEach(\n ([fileName]) => clientApi2.facade.clearFilenameExports(fileName)\n );\n return {\n ...clientApi2.facade.projectAnnotations,\n renderToDOM: (context) => {\n view2._setStory(context.storyContext);\n }\n };\n };\n const importFn = (path) => clientApi2.importFn(path);\n if (!initialized) {\n preview.initialize({\n getStoryIndex: () => {\n const index = clientApi2.getStoryIndex();\n view2._storyIndex = index;\n return index;\n },\n importFn,\n getProjectAnnotations\n });\n initialized = true;\n } else {\n getProjectAnnotations();\n onStoriesChanged();\n }\n }\n };\n}\n\n// src/index.ts\nvar import_react_native_theming14 = require(\"@storybook/react-native-theming\");\nvar { clientApi, configure, view } = start();\nvar rawStoriesOf = clientApi.storiesOf.bind(clientApi);\nvar setAddon = clientApi.setAddon.bind(clientApi);\nvar addDecorator = clientApi.addDecorator.bind(clientApi);\nvar addParameters = clientApi.addParameters.bind(clientApi);\nvar addArgsEnhancer = clientApi.addArgsEnhancer.bind(clientApi);\nvar addArgTypesEnhancer = clientApi.addArgTypesEnhancer.bind(clientApi);\nvar clearDecorators = clientApi.clearDecorators.bind(clientApi);\nvar getStorybook = clientApi.getStorybook.bind(clientApi);\nvar raw = clientApi.raw.bind(clientApi);\nvar storiesOf = (kind, _module) => rawStoriesOf(kind, { hot: () => {\n} }).addParameters({\n framework: \"react-native\"\n});\nvar getStorybookUI = view.getStorybookUI;\nglobal.__STORYBOOK_STORY_STORE__ = {\n initializationPromise: clientApi.storyStore?.initializationPromise\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n addArgTypesEnhancer,\n addArgsEnhancer,\n addDecorator,\n addParameters,\n clearDecorators,\n configure,\n darkTheme,\n getStorybook,\n getStorybookUI,\n raw,\n setAddon,\n storiesOf,\n theme\n});\n","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.object.assign.js\";\nimport { combineArgs, mapArgsToTypes, validateOptions, deepDiff, DEEPLY_EQUAL } from './args';\n\nfunction deleteUndefined(obj) {\n // eslint-disable-next-line no-param-reassign\n Object.keys(obj).forEach(function (key) {\n return obj[key] === undefined && delete obj[key];\n });\n return obj;\n}\n\nexport var ArgsStore = /*#__PURE__*/function () {\n function ArgsStore() {\n _classCallCheck(this, ArgsStore);\n\n this.initialArgsByStoryId = {};\n this.argsByStoryId = {};\n }\n\n _createClass(ArgsStore, [{\n key: \"get\",\n value: function get(storyId) {\n if (!(storyId in this.argsByStoryId)) {\n throw new Error(\"No args known for \".concat(storyId, \" -- has it been rendered yet?\"));\n }\n\n return this.argsByStoryId[storyId];\n }\n }, {\n key: \"setInitial\",\n value: function setInitial(story) {\n if (!this.initialArgsByStoryId[story.id]) {\n this.initialArgsByStoryId[story.id] = story.initialArgs;\n this.argsByStoryId[story.id] = story.initialArgs;\n } else if (this.initialArgsByStoryId[story.id] !== story.initialArgs) {\n // When we get a new version of a story (with new initialArgs), we re-apply the same diff\n // that we had previously applied to the old version of the story\n var delta = deepDiff(this.initialArgsByStoryId[story.id], this.argsByStoryId[story.id]);\n this.initialArgsByStoryId[story.id] = story.initialArgs;\n this.argsByStoryId[story.id] = story.initialArgs;\n\n if (delta !== DEEPLY_EQUAL) {\n this.updateFromDelta(story, delta);\n }\n }\n }\n }, {\n key: \"updateFromDelta\",\n value: function updateFromDelta(story, delta) {\n // Use the argType to ensure we setting a type with defined options to something outside of that\n var validatedDelta = validateOptions(delta, story.argTypes); // NOTE: we use `combineArgs` here rather than `combineParameters` because changes to arg\n // array values are persisted in the URL as sparse arrays, and we have to take that into\n // account when overriding the initialArgs (e.g. we patch [,'changed'] over ['initial', 'val'])\n\n this.argsByStoryId[story.id] = combineArgs(this.argsByStoryId[story.id], validatedDelta);\n }\n }, {\n key: \"updateFromPersisted\",\n value: function updateFromPersisted(story, persisted) {\n // Use the argType to ensure we aren't persisting the wrong type of value to the type.\n // For instance you could try and set a string-valued arg to a number by changing the URL\n var mappedPersisted = mapArgsToTypes(persisted, story.argTypes);\n return this.updateFromDelta(story, mappedPersisted);\n }\n }, {\n key: \"update\",\n value: function update(storyId, argsUpdate) {\n if (!(storyId in this.argsByStoryId)) {\n throw new Error(\"No args known for \".concat(storyId, \" -- has it been rendered yet?\"));\n }\n\n this.argsByStoryId[storyId] = deleteUndefined(Object.assign({}, this.argsByStoryId[storyId], argsUpdate));\n }\n }]);\n\n return ArgsStore;\n}();","import \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.object.freeze.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\n\nvar _templateObject;\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.object.assign.js\";\nimport \"core-js/modules/es.object.entries.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\n\nimport deprecate from 'util-deprecate';\nimport dedent from 'ts-dedent';\nimport { deepDiff, DEEPLY_EQUAL } from './args';\nimport { getValuesFromArgTypes } from './csf/getValuesFromArgTypes';\nvar setUndeclaredWarning = deprecate(function () {}, dedent(_templateObject || (_templateObject = _taggedTemplateLiteral([\"\\n Setting a global value that is undeclared (i.e. not in the user's initial set of globals\\n or globalTypes) is deprecated and will have no effect in 7.0.\\n \"]))));\nexport var GlobalsStore = /*#__PURE__*/function () {\n function GlobalsStore() {\n _classCallCheck(this, GlobalsStore);\n\n this.allowedGlobalNames = void 0;\n this.initialGlobals = void 0;\n this.globals = {};\n }\n\n _createClass(GlobalsStore, [{\n key: \"set\",\n value: function set(_ref) {\n var _ref$globals = _ref.globals,\n globals = _ref$globals === void 0 ? {} : _ref$globals,\n _ref$globalTypes = _ref.globalTypes,\n globalTypes = _ref$globalTypes === void 0 ? {} : _ref$globalTypes;\n var delta = this.initialGlobals && deepDiff(this.initialGlobals, this.globals);\n this.allowedGlobalNames = new Set([].concat(_toConsumableArray(Object.keys(globals)), _toConsumableArray(Object.keys(globalTypes))));\n var defaultGlobals = getValuesFromArgTypes(globalTypes);\n this.initialGlobals = Object.assign({}, defaultGlobals, globals);\n this.globals = this.initialGlobals;\n\n if (delta && delta !== DEEPLY_EQUAL) {\n this.updateFromPersisted(delta);\n }\n }\n }, {\n key: \"filterAllowedGlobals\",\n value: function filterAllowedGlobals(globals) {\n var _this = this;\n\n return Object.entries(globals).reduce(function (acc, _ref2) {\n var _ref3 = _slicedToArray(_ref2, 2),\n key = _ref3[0],\n value = _ref3[1];\n\n if (_this.allowedGlobalNames.has(key)) acc[key] = value;\n return acc;\n }, {});\n }\n }, {\n key: \"updateFromPersisted\",\n value: function updateFromPersisted(persisted) {\n var allowedUrlGlobals = this.filterAllowedGlobals(persisted); // Note that unlike args, we do not have the same type information for globals to allow us\n // to type check them here, so we just set them naively\n\n this.globals = Object.assign({}, this.globals, allowedUrlGlobals);\n }\n }, {\n key: \"get\",\n value: function get() {\n return this.globals;\n }\n }, {\n key: \"update\",\n value: function update(newGlobals) {\n var _this2 = this;\n\n Object.keys(newGlobals).forEach(function (key) {\n if (!_this2.allowedGlobalNames.has(key)) {\n setUndeclaredWarning();\n }\n });\n this.globals = Object.assign({}, this.globals, newGlobals);\n }\n }]);\n\n return GlobalsStore;\n}();","var _templateObject;\n\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.array.find.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.starts-with.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.object.entries.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.object.freeze.js\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport dedent from 'ts-dedent';\nexport var StoryIndexStore = /*#__PURE__*/function () {\n function StoryIndexStore() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n v: 3,\n stories: {}\n },\n stories = _ref.stories;\n\n _classCallCheck(this, StoryIndexStore);\n\n this.channel = void 0;\n this.stories = void 0;\n this.stories = stories;\n }\n\n _createClass(StoryIndexStore, [{\n key: \"storyIdFromSpecifier\",\n value: function storyIdFromSpecifier(specifier) {\n var storyIds = Object.keys(this.stories);\n\n if (specifier === '*') {\n // '*' means select the first story. If there is none, we have no selection.\n return storyIds[0];\n }\n\n if (typeof specifier === 'string') {\n // Find the story with the exact id that matches the specifier (see #11571)\n if (storyIds.indexOf(specifier) >= 0) {\n return specifier;\n } // Fallback to the first story that starts with the specifier\n\n\n return storyIds.find(function (storyId) {\n return storyId.startsWith(specifier);\n });\n } // Try and find a story matching the name/kind, setting no selection if they don't exist.\n\n\n var name = specifier.name,\n title = specifier.title;\n var match = Object.entries(this.stories).find(function (_ref2) {\n var _ref3 = _slicedToArray(_ref2, 2),\n id = _ref3[0],\n story = _ref3[1];\n\n return story.name === name && story.title === title;\n });\n return match && match[0];\n }\n }, {\n key: \"storyIdToEntry\",\n value: function storyIdToEntry(storyId) {\n var storyEntry = this.stories[storyId];\n\n if (!storyEntry) {\n throw new Error(dedent(_templateObject || (_templateObject = _taggedTemplateLiteral([\"Couldn't find story matching '\", \"' after HMR.\\n - Did you remove it from your CSF file?\\n - Are you sure a story with that id exists?\\n - Please check your stories field of your main.js config.\\n - Also check the browser console and terminal for error messages.\"])), storyId));\n }\n\n return storyEntry;\n }\n }]);\n\n return StoryIndexStore;\n}();","function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport \"regenerator-runtime/runtime.js\";\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nimport \"core-js/modules/es.object.assign.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.object.entries.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.array.sort.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.object.values.js\";\nimport \"core-js/modules/es.promise.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport memoize from 'memoizerific';\nimport mapValues from 'lodash/mapValues';\nimport pick from 'lodash/pick';\nimport global from 'global';\nimport { SynchronousPromise } from 'synchronous-promise';\nimport { StoryIndexStore } from './StoryIndexStore';\nimport { ArgsStore } from './ArgsStore';\nimport { GlobalsStore } from './GlobalsStore';\nimport { processCSFFile, prepareStory, normalizeProjectAnnotations } from './csf';\nimport { HooksContext } from './hooks'; // TODO -- what are reasonable values for these?\n\nvar CSF_CACHE_SIZE = 1000;\nvar STORY_CACHE_SIZE = 10000;\nexport var StoryStore = /*#__PURE__*/function () {\n function StoryStore() {\n var _this = this;\n\n _classCallCheck(this, StoryStore);\n\n this.storyIndex = void 0;\n this.importFn = void 0;\n this.projectAnnotations = void 0;\n this.globals = void 0;\n this.args = void 0;\n this.hooks = void 0;\n this.cachedCSFFiles = void 0;\n this.processCSFFileWithCache = void 0;\n this.prepareStoryWithCache = void 0;\n this.initializationPromise = void 0;\n this.resolveInitializationPromise = void 0;\n\n this.getStoriesJsonData = function () {\n var value = _this.getSetStoriesPayload();\n\n var allowedParameters = ['fileName', 'docsOnly', 'framework', '__id', '__isArgsStory'];\n var stories = mapValues(value.stories, function (story) {\n var _global$FEATURES;\n\n return Object.assign({}, pick(story, ['id', 'name', 'title']), {\n importPath: _this.storyIndex.stories[story.id].importPath\n }, !((_global$FEATURES = global.FEATURES) !== null && _global$FEATURES !== void 0 && _global$FEATURES.breakingChangesV7) && {\n kind: story.title,\n story: story.name,\n parameters: Object.assign({}, pick(story.parameters, allowedParameters), {\n fileName: _this.storyIndex.stories[story.id].importPath\n })\n });\n });\n return {\n v: 3,\n stories: stories\n };\n };\n\n this.globals = new GlobalsStore();\n this.args = new ArgsStore();\n this.hooks = {}; // We use a cache for these two functions for two reasons:\n // 1. For performance\n // 2. To ensure that when the same story is prepared with the same inputs you get the same output\n\n this.processCSFFileWithCache = memoize(CSF_CACHE_SIZE)(processCSFFile);\n this.prepareStoryWithCache = memoize(STORY_CACHE_SIZE)(prepareStory); // We cannot call `loadStory()` until we've been initialized properly. But we can wait for it.\n\n this.initializationPromise = new SynchronousPromise(function (resolve) {\n _this.resolveInitializationPromise = resolve;\n });\n }\n\n _createClass(StoryStore, [{\n key: \"setProjectAnnotations\",\n value: function setProjectAnnotations(projectAnnotations) {\n // By changing `this.projectAnnotations, we implicitly invalidate the `prepareStoryWithCache`\n this.projectAnnotations = normalizeProjectAnnotations(projectAnnotations);\n var globals = projectAnnotations.globals,\n globalTypes = projectAnnotations.globalTypes;\n this.globals.set({\n globals: globals,\n globalTypes: globalTypes\n });\n }\n }, {\n key: \"initialize\",\n value: function initialize(_ref) {\n var storyIndex = _ref.storyIndex,\n importFn = _ref.importFn,\n _ref$cache = _ref.cache,\n cache = _ref$cache === void 0 ? false : _ref$cache;\n this.storyIndex = new StoryIndexStore(storyIndex);\n this.importFn = importFn; // We don't need the cache to be loaded to call `loadStory`, we just need the index ready\n\n this.resolveInitializationPromise();\n return cache ? this.cacheAllCSFFiles() : SynchronousPromise.resolve();\n } // This means that one of the CSF files has changed.\n // If the `importFn` has changed, we will invalidate both caches.\n // If the `storyIndex` data has changed, we may or may not invalidate the caches, depending\n // on whether we've loaded the relevant files yet.\n\n }, {\n key: \"onStoriesChanged\",\n value: function () {\n var _onStoriesChanged = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(_ref2) {\n var importFn, storyIndex;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n importFn = _ref2.importFn, storyIndex = _ref2.storyIndex;\n if (importFn) this.importFn = importFn;\n if (storyIndex) this.storyIndex.stories = storyIndex.stories;\n\n if (!this.cachedCSFFiles) {\n _context.next = 6;\n break;\n }\n\n _context.next = 6;\n return this.cacheAllCSFFiles();\n\n case 6:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function onStoriesChanged(_x) {\n return _onStoriesChanged.apply(this, arguments);\n }\n\n return onStoriesChanged;\n }() // To load a single CSF file to service a story we need to look up the importPath in the index\n\n }, {\n key: \"loadCSFFileByStoryId\",\n value: function loadCSFFileByStoryId(storyId) {\n var _this2 = this;\n\n var _this$storyIndex$stor = this.storyIndex.storyIdToEntry(storyId),\n importPath = _this$storyIndex$stor.importPath,\n title = _this$storyIndex$stor.title;\n\n return this.importFn(importPath).then(function (moduleExports) {\n return (// We pass the title in here as it may have been generated by autoTitle on the server.\n _this2.processCSFFileWithCache(moduleExports, importPath, title)\n );\n });\n }\n }, {\n key: \"loadAllCSFFiles\",\n value: function loadAllCSFFiles() {\n var _this3 = this;\n\n var importPaths = {};\n Object.entries(this.storyIndex.stories).forEach(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n storyId = _ref4[0],\n importPath = _ref4[1].importPath;\n\n importPaths[importPath] = storyId;\n });\n var csfFilePromiseList = Object.entries(importPaths).map(function (_ref5) {\n var _ref6 = _slicedToArray(_ref5, 2),\n importPath = _ref6[0],\n storyId = _ref6[1];\n\n return _this3.loadCSFFileByStoryId(storyId).then(function (csfFile) {\n return {\n importPath: importPath,\n csfFile: csfFile\n };\n });\n });\n return SynchronousPromise.all(csfFilePromiseList).then(function (list) {\n return list.reduce(function (acc, _ref7) {\n var importPath = _ref7.importPath,\n csfFile = _ref7.csfFile;\n acc[importPath] = csfFile;\n return acc;\n }, {});\n });\n }\n }, {\n key: \"cacheAllCSFFiles\",\n value: function cacheAllCSFFiles() {\n var _this4 = this;\n\n return this.initializationPromise.then(function () {\n return _this4.loadAllCSFFiles().then(function (csfFiles) {\n _this4.cachedCSFFiles = csfFiles;\n });\n });\n } // Load the CSF file for a story and prepare the story from it and the project annotations.\n\n }, {\n key: \"loadStory\",\n value: function () {\n var _loadStory = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(_ref8) {\n var storyId, csfFile;\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n storyId = _ref8.storyId;\n _context2.next = 3;\n return this.initializationPromise;\n\n case 3:\n _context2.next = 5;\n return this.loadCSFFileByStoryId(storyId);\n\n case 5:\n csfFile = _context2.sent;\n return _context2.abrupt(\"return\", this.storyFromCSFFile({\n storyId: storyId,\n csfFile: csfFile\n }));\n\n case 7:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function loadStory(_x2) {\n return _loadStory.apply(this, arguments);\n }\n\n return loadStory;\n }() // This function is synchronous for convenience -- often times if you have a CSF file already\n // it is easier not to have to await `loadStory`.\n\n }, {\n key: \"storyFromCSFFile\",\n value: function storyFromCSFFile(_ref9) {\n var storyId = _ref9.storyId,\n csfFile = _ref9.csfFile;\n var storyAnnotations = csfFile.stories[storyId];\n\n if (!storyAnnotations) {\n throw new Error(\"Didn't find '\".concat(storyId, \"' in CSF file, this is unexpected\"));\n }\n\n var componentAnnotations = csfFile.meta;\n var story = this.prepareStoryWithCache(storyAnnotations, componentAnnotations, this.projectAnnotations);\n this.args.setInitial(story);\n this.hooks[story.id] = this.hooks[story.id] || new HooksContext();\n return story;\n } // If we have a CSF file we can get all the stories from it synchronously\n\n }, {\n key: \"componentStoriesFromCSFFile\",\n value: function componentStoriesFromCSFFile(_ref10) {\n var _this5 = this;\n\n var csfFile = _ref10.csfFile;\n return Object.keys(this.storyIndex.stories).filter(function (storyId) {\n return !!csfFile.stories[storyId];\n }).map(function (storyId) {\n return _this5.storyFromCSFFile({\n storyId: storyId,\n csfFile: csfFile\n });\n });\n } // A prepared story does not include args, globals or hooks. These are stored in the story store\n // and updated separtely to the (immutable) story.\n\n }, {\n key: \"getStoryContext\",\n value: function getStoryContext(story) {\n return Object.assign({}, story, {\n args: this.args.get(story.id),\n globals: this.globals.get(),\n hooks: this.hooks[story.id]\n });\n }\n }, {\n key: \"cleanupStory\",\n value: function cleanupStory(story) {\n this.hooks[story.id].clean();\n }\n }, {\n key: \"extract\",\n value: function extract() {\n var _this6 = this;\n\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n includeDocsOnly: false\n };\n\n if (!this.cachedCSFFiles) {\n throw new Error('Cannot call extract() unless you call cacheAllCSFFiles() first.');\n }\n\n return Object.entries(this.storyIndex.stories).reduce(function (acc, _ref11) {\n var _ref12 = _slicedToArray(_ref11, 2),\n storyId = _ref12[0],\n importPath = _ref12[1].importPath;\n\n var csfFile = _this6.cachedCSFFiles[importPath];\n\n var story = _this6.storyFromCSFFile({\n storyId: storyId,\n csfFile: csfFile\n });\n\n if (!options.includeDocsOnly && story.parameters.docsOnly) {\n return acc;\n }\n\n acc[storyId] = Object.entries(story).reduce(function (storyAcc, _ref13) {\n var _ref14 = _slicedToArray(_ref13, 2),\n key = _ref14[0],\n value = _ref14[1];\n\n if (typeof value === 'function') {\n return storyAcc;\n }\n\n if (Array.isArray(value)) {\n return Object.assign(storyAcc, _defineProperty({}, key, value.slice().sort()));\n }\n\n return Object.assign(storyAcc, _defineProperty({}, key, value));\n }, {\n args: story.initialArgs\n });\n return acc;\n }, {});\n }\n }, {\n key: \"getSetStoriesPayload\",\n value: function getSetStoriesPayload() {\n var stories = this.extract({\n includeDocsOnly: true\n });\n var kindParameters = Object.values(stories).reduce(function (acc, _ref15) {\n var title = _ref15.title;\n acc[title] = {};\n return acc;\n }, {});\n return {\n v: 2,\n globals: this.globals.get(),\n globalParameters: {},\n kindParameters: kindParameters,\n stories: stories\n };\n }\n }, {\n key: \"raw\",\n value: function raw() {\n var _this7 = this;\n\n return Object.values(this.extract()).map(function (_ref16) {\n var id = _ref16.id;\n return _this7.fromId(id);\n });\n }\n }, {\n key: \"fromId\",\n value: function fromId(storyId) {\n var _this8 = this;\n\n if (!this.cachedCSFFiles) {\n throw new Error('Cannot call fromId/raw() unless you call cacheAllCSFFiles() first.');\n }\n\n var importPath;\n\n try {\n var _this$storyIndex$stor2 = this.storyIndex.storyIdToEntry(storyId);\n\n importPath = _this$storyIndex$stor2.importPath;\n } catch (err) {\n return null;\n }\n\n var csfFile = this.cachedCSFFiles[importPath];\n var story = this.storyFromCSFFile({\n storyId: storyId,\n csfFile: csfFile\n });\n return Object.assign({}, story, {\n storyFn: function storyFn(update) {\n var context = Object.assign({}, _this8.getStoryContext(story), {\n viewMode: 'story'\n });\n return story.unboundStoryFn(Object.assign({}, context, update));\n }\n });\n }\n }]);\n\n return StoryStore;\n}();","import \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.object.freeze.js\";\n\nvar _templateObject, _templateObject2;\n\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _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\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.object.entries.js\";\nimport \"core-js/modules/es.object.assign.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.array.find-index.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.join.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.array.fill.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport deepEqual from 'fast-deep-equal';\nimport { once } from '@storybook/client-logger';\nimport isPlainObject from 'lodash/isPlainObject';\nimport dedent from 'ts-dedent';\nvar INCOMPATIBLE = Symbol('incompatible');\n\nvar map = function map(arg, argType) {\n var type = argType.type;\n if (arg === undefined || arg === null || !type) return arg;\n\n if (argType.mapping) {\n return arg;\n }\n\n switch (type.name) {\n case 'string':\n return String(arg);\n\n case 'enum':\n return arg;\n\n case 'number':\n return Number(arg);\n\n case 'boolean':\n return arg === 'true';\n\n case 'array':\n if (!type.value || !Array.isArray(arg)) return INCOMPATIBLE;\n return arg.reduce(function (acc, item, index) {\n var mapped = map(item, {\n type: type.value\n });\n if (mapped !== INCOMPATIBLE) acc[index] = mapped;\n return acc;\n }, new Array(arg.length));\n\n case 'object':\n if (typeof arg === 'string' || typeof arg === 'number') return arg;\n if (!type.value || _typeof(arg) !== 'object') return INCOMPATIBLE;\n return Object.entries(arg).reduce(function (acc, _ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n key = _ref2[0],\n val = _ref2[1];\n\n var mapped = map(val, {\n type: type.value[key]\n });\n return mapped === INCOMPATIBLE ? acc : Object.assign(acc, _defineProperty({}, key, mapped));\n }, {});\n\n default:\n return INCOMPATIBLE;\n }\n};\n\nexport var mapArgsToTypes = function mapArgsToTypes(args, argTypes) {\n return Object.entries(args).reduce(function (acc, _ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n key = _ref4[0],\n value = _ref4[1];\n\n if (!argTypes[key]) return acc;\n var mapped = map(value, argTypes[key]);\n return mapped === INCOMPATIBLE ? acc : Object.assign(acc, _defineProperty({}, key, mapped));\n }, {});\n};\nexport var combineArgs = function combineArgs(value, update) {\n if (Array.isArray(value) && Array.isArray(update)) {\n return update.reduce(function (acc, upd, index) {\n acc[index] = combineArgs(value[index], update[index]);\n return acc;\n }, _toConsumableArray(value)).filter(function (v) {\n return v !== undefined;\n });\n }\n\n if (!isPlainObject(value) || !isPlainObject(update)) return update;\n return Object.keys(Object.assign({}, value, update)).reduce(function (acc, key) {\n if (key in update) {\n var combined = combineArgs(value[key], update[key]);\n if (combined !== undefined) acc[key] = combined;\n } else {\n acc[key] = value[key];\n }\n\n return acc;\n }, {});\n};\nexport var validateOptions = function validateOptions(args, argTypes) {\n return Object.entries(argTypes).reduce(function (acc, _ref5) {\n var _ref6 = _slicedToArray(_ref5, 2),\n key = _ref6[0],\n options = _ref6[1].options;\n\n // Don't set args that are not defined in `args` (they can be undefined in there)\n // see https://github.com/storybookjs/storybook/issues/15630 and\n // https://github.com/storybookjs/storybook/issues/17063\n function allowArg() {\n if (key in args) {\n acc[key] = args[key];\n }\n\n return acc;\n }\n\n if (!options) return allowArg();\n\n if (!Array.isArray(options)) {\n once.error(dedent(_templateObject || (_templateObject = _taggedTemplateLiteral([\"\\n Invalid argType: '\", \".options' should be an array.\\n\\n More info: https://storybook.js.org/docs/react/api/argtypes\\n \"])), key));\n return allowArg();\n }\n\n if (options.some(function (opt) {\n return opt && ['object', 'function'].includes(_typeof(opt));\n })) {\n once.error(dedent(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral([\"\\n Invalid argType: '\", \".options' should only contain primitives. Use a 'mapping' for complex values.\\n\\n More info: https://storybook.js.org/docs/react/writing-stories/args#mapping-to-complex-arg-values\\n \"])), key));\n return allowArg();\n }\n\n var isArray = Array.isArray(args[key]);\n var invalidIndex = isArray && args[key].findIndex(function (val) {\n return !options.includes(val);\n });\n var isValidArray = isArray && invalidIndex === -1;\n\n if (args[key] === undefined || options.includes(args[key]) || isValidArray) {\n return allowArg();\n }\n\n var field = isArray ? \"\".concat(key, \"[\").concat(invalidIndex, \"]\") : key;\n var supportedOptions = options.map(function (opt) {\n return typeof opt === 'string' ? \"'\".concat(opt, \"'\") : String(opt);\n }).join(', ');\n once.warn(\"Received illegal value for '\".concat(field, \"'. Supported options: \").concat(supportedOptions));\n return acc;\n }, {});\n}; // TODO -- copied from router, needs to be in a shared location\n\nexport var DEEPLY_EQUAL = Symbol('Deeply equal');\nexport var deepDiff = function deepDiff(value, update) {\n if (_typeof(value) !== _typeof(update)) return update;\n if (deepEqual(value, update)) return DEEPLY_EQUAL;\n\n if (Array.isArray(value) && Array.isArray(update)) {\n var res = update.reduce(function (acc, upd, index) {\n var diff = deepDiff(value[index], upd);\n if (diff !== DEEPLY_EQUAL) acc[index] = diff;\n return acc;\n }, new Array(update.length));\n if (update.length >= value.length) return res;\n return res.concat(new Array(value.length - update.length).fill(undefined));\n }\n\n if (isPlainObject(value) && isPlainObject(update)) {\n return Object.keys(Object.assign({}, value, update)).reduce(function (acc, key) {\n var diff = deepDiff(value === null || value === void 0 ? void 0 : value[key], update === null || update === void 0 ? void 0 : update[key]);\n return diff === DEEPLY_EQUAL ? acc : Object.assign(acc, _defineProperty({}, key, diff));\n }, {});\n }\n\n return update;\n};\nexport var NO_TARGET_NAME = '';\nexport function groupArgsByTarget(_ref7) {\n var args = _ref7.args,\n argTypes = _ref7.argTypes;\n var groupedArgs = {};\n Object.entries(args).forEach(function (_ref8) {\n var _ref9 = _slicedToArray(_ref8, 2),\n name = _ref9[0],\n value = _ref9[1];\n\n var _ref10 = argTypes[name] || {},\n _ref10$target = _ref10.target,\n target = _ref10$target === void 0 ? NO_TARGET_NAME : _ref10$target;\n\n groupedArgs[target] = groupedArgs[target] || {};\n groupedArgs[target][name] = value;\n });\n return groupedArgs;\n}\nexport function noTargetArgs(context) {\n return groupArgsByTarget(context)[NO_TARGET_NAME];\n}","import \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.object.freeze.js\";\n\nvar _templateObject;\n\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\n\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.regexp.constructor.js\";\nimport \"core-js/modules/es.regexp.to-string.js\";\nimport \"core-js/modules/es.string.replace.js\";\nimport \"core-js/modules/es.array.join.js\";\nimport \"core-js/modules/es.string.split.js\";\n\nfunction _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport slash from 'slash';\nimport dedent from 'ts-dedent';\nimport { once } from '@storybook/client-logger'; // FIXME: types duplicated type from `core-common', to be\n// removed when we remove v6 back-compat.\n\nvar stripExtension = function stripExtension(path) {\n var parts = _toConsumableArray(path);\n\n var last = parts[parts.length - 1];\n var dotIndex = last.indexOf('.');\n var stripped = dotIndex > 0 ? last.substr(0, dotIndex) : last;\n parts[parts.length - 1] = stripped;\n\n var _parts = parts,\n _parts2 = _toArray(_parts),\n first = _parts2[0],\n rest = _parts2.slice(1);\n\n if (first === '') {\n parts = rest;\n }\n\n return parts;\n};\n\nvar indexRe = /^index$/i; // deal with files like \"atoms/button/{button,index}.stories.js\"\n\nvar removeRedundantFilename = function removeRedundantFilename(paths) {\n var prevVal;\n return paths.filter(function (val, index) {\n if (index === paths.length - 1 && (val === prevVal || indexRe.test(val))) {\n return false;\n }\n\n prevVal = val;\n return true;\n });\n};\n/**\n * Combines path parts together, without duplicating separators (slashes). Used instead of `path.join`\n * because this code runs in the browser.\n *\n * @param paths array of paths to join together.\n * @returns joined path string, with single '/' between parts\n */\n\n\nfunction pathJoin(paths) {\n var slashes = new RegExp('/{1,}', 'g');\n return paths.join('/').replace(slashes, '/');\n}\n\nexport var userOrAutoTitleFromSpecifier = function userOrAutoTitleFromSpecifier(fileName, entry, userTitle) {\n var _ref = entry || {},\n directory = _ref.directory,\n importPathMatcher = _ref.importPathMatcher,\n _ref$titlePrefix = _ref.titlePrefix,\n titlePrefix = _ref$titlePrefix === void 0 ? '' : _ref$titlePrefix; // On Windows, backslashes are used in paths, which can cause problems here\n // slash makes sure we always handle paths with unix-style forward slash\n\n\n if (typeof fileName === 'number') {\n once.warn(dedent(_templateObject || (_templateObject = _taggedTemplateLiteral([\"\\n CSF Auto-title received a numeric fileName. This typically happens when\\n webpack is mis-configured in production mode. To force webpack to produce\\n filenames, set optimization.moduleIds = \\\"named\\\" in your webpack config.\\n \"]))));\n }\n\n var normalizedFileName = slash(String(fileName));\n\n if (importPathMatcher.exec(normalizedFileName)) {\n if (!userTitle) {\n var suffix = normalizedFileName.replace(directory, '');\n var titleAndSuffix = slash(pathJoin([titlePrefix, suffix]));\n var path = titleAndSuffix.split('/');\n path = stripExtension(path);\n path = removeRedundantFilename(path);\n return path.join('/');\n }\n\n if (!titlePrefix) {\n return userTitle;\n }\n\n return slash(pathJoin([titlePrefix, userTitle]));\n }\n\n return undefined;\n};\nexport var userOrAutoTitle = function userOrAutoTitle(fileName, storiesEntries, userTitle) {\n for (var i = 0; i < storiesEntries.length; i += 1) {\n var title = userOrAutoTitleFromSpecifier(fileName, storiesEntries[i], userTitle);\n if (title) return title;\n }\n\n return userTitle || undefined;\n};","function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.object.assign.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport { combineParameters } from '../parameters';\nexport function getField(moduleExportList, field) {\n return moduleExportList.map(function (xs) {\n return xs[field];\n }).filter(Boolean);\n}\nexport function getArrayField(moduleExportList, field) {\n return getField(moduleExportList, field).reduce(function (a, b) {\n return [].concat(_toConsumableArray(a), _toConsumableArray(b));\n }, []);\n}\nexport function getObjectField(moduleExportList, field) {\n return Object.assign.apply(Object, [{}].concat(_toConsumableArray(getField(moduleExportList, field))));\n}\nexport function getSingletonField(moduleExportList, field) {\n return getField(moduleExportList, field).pop();\n}\nexport function composeConfigs(moduleExportList) {\n var allArgTypeEnhancers = getArrayField(moduleExportList, 'argTypesEnhancers');\n return {\n parameters: combineParameters.apply(void 0, _toConsumableArray(getField(moduleExportList, 'parameters'))),\n decorators: getArrayField(moduleExportList, 'decorators'),\n args: getObjectField(moduleExportList, 'args'),\n argsEnhancers: getArrayField(moduleExportList, 'argsEnhancers'),\n argTypes: getObjectField(moduleExportList, 'argTypes'),\n argTypesEnhancers: [].concat(_toConsumableArray(allArgTypeEnhancers.filter(function (e) {\n return !e.secondPass;\n })), _toConsumableArray(allArgTypeEnhancers.filter(function (e) {\n return e.secondPass;\n }))),\n globals: getObjectField(moduleExportList, 'globals'),\n globalTypes: getObjectField(moduleExportList, 'globalTypes'),\n loaders: getArrayField(moduleExportList, 'loaders'),\n render: getSingletonField(moduleExportList, 'render'),\n renderToDOM: getSingletonField(moduleExportList, 'renderToDOM'),\n applyDecorators: getSingletonField(moduleExportList, 'applyDecorators')\n };\n}","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.object.entries.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nexport var getValuesFromArgTypes = function getValuesFromArgTypes() {\n var argTypes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return Object.entries(argTypes).reduce(function (acc, _ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n arg = _ref2[0],\n defaultValue = _ref2[1].defaultValue;\n\n if (typeof defaultValue !== 'undefined') {\n acc[arg] = defaultValue;\n }\n\n return acc;\n }, {});\n};","export * from './normalizeInputTypes';\nexport * from './normalizeStory';\nexport * from './processCSFFile';\nexport * from './prepareStory';\nexport * from './normalizeComponentAnnotations';\nexport * from './normalizeProjectAnnotations';\nexport * from './getValuesFromArgTypes';\nexport * from './composeConfigs';\nexport * from './testing-utils';","import \"core-js/modules/es.object.assign.js\";\nimport { sanitize } from '@storybook/csf';\nimport { normalizeInputTypes } from './normalizeInputTypes';\nexport function normalizeComponentAnnotations(defaultExport) {\n var title = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultExport.title;\n var importPath = arguments.length > 2 ? arguments[2] : undefined;\n var id = defaultExport.id,\n argTypes = defaultExport.argTypes;\n return Object.assign({\n id: sanitize(id || title)\n }, defaultExport, {\n title: title\n }, argTypes && {\n argTypes: normalizeInputTypes(argTypes)\n }, {\n parameters: Object.assign({\n fileName: importPath\n }, defaultExport.parameters)\n });\n}","import \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.symbol.js\";\nvar _excluded = [\"type\", \"control\"];\nimport \"core-js/modules/es.object.assign.js\";\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport mapValues from 'lodash/mapValues';\n\nvar normalizeType = function normalizeType(type) {\n return typeof type === 'string' ? {\n name: type\n } : type;\n};\n\nvar normalizeControl = function normalizeControl(control) {\n return typeof control === 'string' ? {\n type: control\n } : control;\n};\n\nexport var normalizeInputType = function normalizeInputType(inputType, key) {\n var type = inputType.type,\n control = inputType.control,\n rest = _objectWithoutProperties(inputType, _excluded);\n\n var normalized = Object.assign({\n name: key\n }, rest);\n if (type) normalized.type = normalizeType(type);\n\n if (control) {\n normalized.control = normalizeControl(control);\n } else if (control === false) {\n normalized.control = {\n disable: true\n };\n }\n\n return normalized;\n};\nexport var normalizeInputTypes = function normalizeInputTypes(inputTypes) {\n return mapValues(inputTypes, normalizeInputType);\n};","import \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nvar _excluded = [\"argTypes\", \"globalTypes\", \"argTypesEnhancers\"];\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport \"core-js/modules/es.object.assign.js\";\nimport \"core-js/modules/es.array.concat.js\";\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport { inferArgTypes } from '../inferArgTypes';\nimport { inferControls } from '../inferControls';\nimport { normalizeInputTypes } from './normalizeInputTypes';\nexport function normalizeProjectAnnotations(_ref) {\n var argTypes = _ref.argTypes,\n globalTypes = _ref.globalTypes,\n argTypesEnhancers = _ref.argTypesEnhancers,\n annotations = _objectWithoutProperties(_ref, _excluded);\n\n return Object.assign({}, argTypes && {\n argTypes: normalizeInputTypes(argTypes)\n }, globalTypes && {\n globalTypes: normalizeInputTypes(globalTypes)\n }, {\n argTypesEnhancers: [].concat(_toConsumableArray(argTypesEnhancers || []), [inferArgTypes, // inferControls technically should only run if the user is using the controls addon,\n // and so should be added by a preset there. However, as it seems some code relies on controls\n // annotations (in particular the angular implementation's `cleanArgsDecorator`), for backwards\n // compatibility reasons, we will leave this in the store until 7.0\n inferControls])\n }, annotations);\n}","import \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.object.freeze.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\n\nvar _templateObject;\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.object.assign.js\";\n\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\n\nimport { storyNameFromExport, toId } from '@storybook/csf';\nimport dedent from 'ts-dedent';\nimport { logger } from '@storybook/client-logger';\nimport deprecate from 'util-deprecate';\nimport { normalizeInputTypes } from './normalizeInputTypes';\nvar deprecatedStoryAnnotation = dedent(_templateObject || (_templateObject = _taggedTemplateLiteral([\"\\nCSF .story annotations deprecated; annotate story functions directly:\\n- StoryFn.story.name => StoryFn.storyName\\n- StoryFn.story.(parameters|decorators) => StoryFn.(parameters|decorators)\\nSee https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations for details and codemod.\\n\"])));\nvar deprecatedStoryAnnotationWarning = deprecate(function () {}, deprecatedStoryAnnotation);\nexport function normalizeStory(key, storyAnnotations, meta) {\n var userStoryFn;\n var storyObject;\n\n if (typeof storyAnnotations === 'function') {\n userStoryFn = storyAnnotations;\n storyObject = storyAnnotations;\n } else {\n storyObject = storyAnnotations;\n }\n\n var _storyObject = storyObject,\n story = _storyObject.story;\n\n if (story) {\n logger.debug('deprecated story', story);\n deprecatedStoryAnnotationWarning();\n }\n\n var exportName = storyNameFromExport(key);\n var name = typeof storyObject !== 'function' && storyObject.name || storyObject.storyName || (story === null || story === void 0 ? void 0 : story.name) || exportName;\n var decorators = [].concat(_toConsumableArray(storyObject.decorators || []), _toConsumableArray((story === null || story === void 0 ? void 0 : story.decorators) || []));\n var parameters = Object.assign({}, story === null || story === void 0 ? void 0 : story.parameters, storyObject.parameters);\n var args = Object.assign({}, story === null || story === void 0 ? void 0 : story.args, storyObject.args);\n var argTypes = Object.assign({}, story === null || story === void 0 ? void 0 : story.argTypes, storyObject.argTypes);\n var loaders = [].concat(_toConsumableArray(storyObject.loaders || []), _toConsumableArray((story === null || story === void 0 ? void 0 : story.loaders) || []));\n var _storyObject2 = storyObject,\n render = _storyObject2.render,\n play = _storyObject2.play; // eslint-disable-next-line no-underscore-dangle\n\n var id = parameters.__id || toId(meta.id || meta.title, exportName);\n return Object.assign({\n id: id,\n name: name,\n decorators: decorators,\n parameters: parameters,\n args: args,\n argTypes: normalizeInputTypes(argTypes),\n loaders: loaders\n }, render && {\n render: render\n }, userStoryFn && {\n userStoryFn: userStoryFn\n }, play && {\n play: play\n });\n}","import \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\n\nvar _templateObject;\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport \"regenerator-runtime/runtime.js\";\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.object.assign.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.promise.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.object.entries.js\";\nimport \"core-js/modules/es.object.freeze.js\";\n\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\n\nimport dedent from 'ts-dedent';\nimport deprecate from 'util-deprecate';\nimport global from 'global';\nimport { includeConditionalArg } from '@storybook/csf';\nimport { combineParameters } from '../parameters';\nimport { applyHooks } from '../hooks';\nimport { defaultDecorateStory } from '../decorators';\nimport { groupArgsByTarget, NO_TARGET_NAME } from '../args';\nimport { getValuesFromArgTypes } from './getValuesFromArgTypes';\nvar argTypeDefaultValueWarning = deprecate(function () {}, dedent(_templateObject || (_templateObject = _taggedTemplateLiteral([\"\\n `argType.defaultValue` is deprecated and will be removed in Storybook 7.0.\\n\\n https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#no-longer-inferring-default-values-of-args\"], [\"\\n \\\\`argType.defaultValue\\\\` is deprecated and will be removed in Storybook 7.0.\\n\\n https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#no-longer-inferring-default-values-of-args\"])))); // Combine all the metadata about a story (both direct and inherited from the component/global scope)\n// into a \"renderable\" story function, with all decorators applied, parameters passed as context etc\n//\n// Note that this story function is *stateless* in the sense that it does not track args or globals\n// Instead, it is expected these are tracked separately (if necessary) and are passed into each invocation.\n\nexport function prepareStory(storyAnnotations, componentAnnotations, projectAnnotations) {\n var _global$FEATURES;\n\n // NOTE: in the current implementation we are doing everything once, up front, rather than doing\n // anything at render time. The assumption is that as we don't load all the stories at once, this\n // will have a limited cost. If this proves misguided, we can refactor it.\n var id = storyAnnotations.id,\n name = storyAnnotations.name;\n var title = componentAnnotations.title;\n var parameters = combineParameters(projectAnnotations.parameters, componentAnnotations.parameters, storyAnnotations.parameters);\n var decorators = [].concat(_toConsumableArray(storyAnnotations.decorators || []), _toConsumableArray(componentAnnotations.decorators || []), _toConsumableArray(projectAnnotations.decorators || [])); // Currently it is only possible to set these globally\n\n var _projectAnnotations$a = projectAnnotations.applyDecorators,\n applyDecorators = _projectAnnotations$a === void 0 ? defaultDecorateStory : _projectAnnotations$a,\n _projectAnnotations$a2 = projectAnnotations.argTypesEnhancers,\n argTypesEnhancers = _projectAnnotations$a2 === void 0 ? [] : _projectAnnotations$a2,\n _projectAnnotations$a3 = projectAnnotations.argsEnhancers,\n argsEnhancers = _projectAnnotations$a3 === void 0 ? [] : _projectAnnotations$a3;\n var loaders = [].concat(_toConsumableArray(projectAnnotations.loaders || []), _toConsumableArray(componentAnnotations.loaders || []), _toConsumableArray(storyAnnotations.loaders || [])); // The render function on annotations *has* to be an `ArgsStoryFn`, so when we normalize\n // CSFv1/2, we use a new field called `userStoryFn` so we know that it can be a LegacyStoryFn\n\n var render = storyAnnotations.userStoryFn || storyAnnotations.render || componentAnnotations.render || projectAnnotations.render;\n var passedArgTypes = combineParameters(projectAnnotations.argTypes, componentAnnotations.argTypes, storyAnnotations.argTypes);\n var _parameters$passArgsF = parameters.passArgsFirst,\n passArgsFirst = _parameters$passArgsF === void 0 ? true : _parameters$passArgsF; // eslint-disable-next-line no-underscore-dangle\n\n parameters.__isArgsStory = passArgsFirst && render.length > 0; // Pull out args[X] into initialArgs for argTypes enhancers\n\n var passedArgs = Object.assign({}, projectAnnotations.args, componentAnnotations.args, storyAnnotations.args);\n var contextForEnhancers = {\n componentId: componentAnnotations.id,\n title: title,\n kind: title,\n // Back compat\n id: id,\n name: name,\n story: name,\n // Back compat\n component: componentAnnotations.component,\n subcomponents: componentAnnotations.subcomponents,\n parameters: parameters,\n initialArgs: passedArgs,\n argTypes: passedArgTypes\n };\n contextForEnhancers.argTypes = argTypesEnhancers.reduce(function (accumulatedArgTypes, enhancer) {\n return enhancer(Object.assign({}, contextForEnhancers, {\n argTypes: accumulatedArgTypes\n }));\n }, contextForEnhancers.argTypes); // Add argTypes[X].defaultValue to initial args (note this deprecated)\n // We need to do this *after* the argTypesEnhancers as they may add defaultValues\n\n var defaultArgs = getValuesFromArgTypes(contextForEnhancers.argTypes);\n\n if (Object.keys(defaultArgs).length > 0) {\n argTypeDefaultValueWarning();\n }\n\n var initialArgsBeforeEnhancers = Object.assign({}, defaultArgs, passedArgs);\n contextForEnhancers.initialArgs = argsEnhancers.reduce(function (accumulatedArgs, enhancer) {\n return Object.assign({}, accumulatedArgs, enhancer(Object.assign({}, contextForEnhancers, {\n initialArgs: accumulatedArgs\n })));\n }, initialArgsBeforeEnhancers); // Add some of our metadata into parameters as we used to do this in 6.x and users may be relying on it\n\n if (!((_global$FEATURES = global.FEATURES) !== null && _global$FEATURES !== void 0 && _global$FEATURES.breakingChangesV7)) {\n contextForEnhancers.parameters = Object.assign({}, contextForEnhancers.parameters, {\n __id: id,\n globals: projectAnnotations.globals,\n globalTypes: projectAnnotations.globalTypes,\n args: contextForEnhancers.initialArgs,\n argTypes: contextForEnhancers.argTypes\n });\n }\n\n var applyLoaders = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(context) {\n var loadResults, loaded;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Promise.all(loaders.map(function (loader) {\n return loader(context);\n }));\n\n case 2:\n loadResults = _context.sent;\n loaded = Object.assign.apply(Object, [{}].concat(_toConsumableArray(loadResults)));\n return _context.abrupt(\"return\", Object.assign({}, context, {\n loaded: loaded\n }));\n\n case 5:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n\n return function applyLoaders(_x) {\n return _ref.apply(this, arguments);\n };\n }();\n\n var undecoratedStoryFn = function undecoratedStoryFn(context) {\n var mappedArgs = Object.entries(context.args).reduce(function (acc, _ref2) {\n var _context$argTypes$key;\n\n var _ref3 = _slicedToArray(_ref2, 2),\n key = _ref3[0],\n val = _ref3[1];\n\n var mapping = (_context$argTypes$key = context.argTypes[key]) === null || _context$argTypes$key === void 0 ? void 0 : _context$argTypes$key.mapping;\n acc[key] = mapping && val in mapping ? mapping[val] : val;\n return acc;\n }, {});\n var includedArgs = Object.entries(mappedArgs).reduce(function (acc, _ref4) {\n var _ref5 = _slicedToArray(_ref4, 2),\n key = _ref5[0],\n val = _ref5[1];\n\n var argType = context.argTypes[key] || {};\n if (includeConditionalArg(argType, mappedArgs, context.globals)) acc[key] = val;\n return acc;\n }, {});\n var includedContext = Object.assign({}, context, {\n args: includedArgs\n });\n var _context$parameters$p = context.parameters.passArgsFirst,\n renderTimePassArgsFirst = _context$parameters$p === void 0 ? true : _context$parameters$p;\n return renderTimePassArgsFirst ? render(includedContext.args, includedContext) : render(includedContext);\n };\n\n var decoratedStoryFn = applyHooks(applyDecorators)(undecoratedStoryFn, decorators);\n\n var unboundStoryFn = function unboundStoryFn(context) {\n var _global$FEATURES2;\n\n var finalContext = context;\n\n if ((_global$FEATURES2 = global.FEATURES) !== null && _global$FEATURES2 !== void 0 && _global$FEATURES2.argTypeTargetsV7) {\n var argsByTarget = groupArgsByTarget(Object.assign({\n args: context.args\n }, context));\n finalContext = Object.assign({}, context, {\n allArgs: context.args,\n argsByTarget: argsByTarget,\n args: argsByTarget[NO_TARGET_NAME] || {}\n });\n }\n\n return decoratedStoryFn(finalContext);\n };\n\n var playFunction = storyAnnotations.play;\n return Object.freeze(Object.assign({}, contextForEnhancers, {\n originalStoryFn: render,\n undecoratedStoryFn: undecoratedStoryFn,\n unboundStoryFn: unboundStoryFn,\n applyLoaders: applyLoaders,\n playFunction: playFunction\n }));\n}","import \"core-js/modules/es.symbol.js\";\nvar _excluded = [\"default\", \"__namedExportsOrder\"];\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.object.keys.js\";\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport { isExportStory } from '@storybook/csf';\nimport { logger } from '@storybook/client-logger';\nimport { normalizeStory } from './normalizeStory';\nimport { normalizeComponentAnnotations } from './normalizeComponentAnnotations';\n\nvar checkGlobals = function checkGlobals(parameters) {\n var globals = parameters.globals,\n globalTypes = parameters.globalTypes;\n\n if (globals || globalTypes) {\n logger.error('Global args/argTypes can only be set globally', JSON.stringify({\n globals: globals,\n globalTypes: globalTypes\n }));\n }\n};\n\nvar checkStorySort = function checkStorySort(parameters) {\n var options = parameters.options;\n if (options !== null && options !== void 0 && options.storySort) logger.error('The storySort option parameter can only be set globally');\n};\n\nvar checkDisallowedParameters = function checkDisallowedParameters(parameters) {\n if (!parameters) {\n return;\n }\n\n checkGlobals(parameters);\n checkStorySort(parameters);\n}; // Given the raw exports of a CSF file, check and normalize it.\n\n\nexport function processCSFFile(moduleExports, importPath, title) {\n var defaultExport = moduleExports.default,\n __namedExportsOrder = moduleExports.__namedExportsOrder,\n namedExports = _objectWithoutProperties(moduleExports, _excluded);\n\n var meta = normalizeComponentAnnotations(defaultExport, title, importPath);\n checkDisallowedParameters(meta.parameters);\n var csfFile = {\n meta: meta,\n stories: {}\n };\n Object.keys(namedExports).forEach(function (key) {\n if (isExportStory(key, meta)) {\n var storyMeta = normalizeStory(key, namedExports[key], meta);\n checkDisallowedParameters(storyMeta.parameters);\n csfFile.stories[storyMeta.id] = storyMeta;\n }\n });\n return csfFile;\n}","import \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nvar _excluded = [\"default\", \"__esModule\", \"__namedExportsOrder\"];\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.object.assign.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.object.entries.js\";\nimport { isExportStory } from '@storybook/csf';\nimport { composeConfigs } from '../composeConfigs';\nimport { prepareStory } from '../prepareStory';\nimport { normalizeStory } from '../normalizeStory';\nimport { HooksContext } from '../../hooks';\nimport { normalizeComponentAnnotations } from '../normalizeComponentAnnotations';\nimport { getValuesFromArgTypes } from '../getValuesFromArgTypes';\nimport { normalizeProjectAnnotations } from '../normalizeProjectAnnotations';\nexport * from './types';\nvar GLOBAL_STORYBOOK_PROJECT_ANNOTATIONS = {};\nexport function setProjectAnnotations(projectAnnotations) {\n var annotations = Array.isArray(projectAnnotations) ? projectAnnotations : [projectAnnotations];\n GLOBAL_STORYBOOK_PROJECT_ANNOTATIONS = composeConfigs(annotations);\n}\nexport function composeStory(storyAnnotations, componentAnnotations) {\n var _componentAnnotations, _storyAnnotations$sto;\n\n var projectAnnotations = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : GLOBAL_STORYBOOK_PROJECT_ANNOTATIONS;\n var defaultConfig = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var exportsName = arguments.length > 4 ? arguments[4] : undefined;\n\n if (storyAnnotations === undefined) {\n throw new Error('Expected a story but received undefined.');\n } // @TODO: Support auto title\n // eslint-disable-next-line no-param-reassign\n\n\n componentAnnotations.title = (_componentAnnotations = componentAnnotations.title) !== null && _componentAnnotations !== void 0 ? _componentAnnotations : 'ComposedStory';\n var normalizedComponentAnnotations = normalizeComponentAnnotations(componentAnnotations);\n var storyName = exportsName || storyAnnotations.storyName || ((_storyAnnotations$sto = storyAnnotations.story) === null || _storyAnnotations$sto === void 0 ? void 0 : _storyAnnotations$sto.name) || storyAnnotations.name;\n var normalizedStory = normalizeStory(storyName, storyAnnotations, normalizedComponentAnnotations);\n var normalizedProjectAnnotations = normalizeProjectAnnotations(Object.assign({}, projectAnnotations, defaultConfig));\n var story = prepareStory(normalizedStory, normalizedComponentAnnotations, normalizedProjectAnnotations);\n var defaultGlobals = getValuesFromArgTypes(projectAnnotations.globalTypes);\n\n var composedStory = function composedStory(extraArgs) {\n var context = Object.assign({}, story, {\n hooks: new HooksContext(),\n globals: defaultGlobals,\n args: Object.assign({}, story.initialArgs, extraArgs)\n });\n return story.unboundStoryFn(context);\n };\n\n composedStory.storyName = storyName;\n composedStory.args = story.initialArgs;\n composedStory.play = story.playFunction;\n composedStory.parameters = story.parameters;\n return composedStory;\n}\nexport function composeStories(storiesImport, globalConfig, composeStoryFn) {\n var meta = storiesImport.default,\n __esModule = storiesImport.__esModule,\n __namedExportsOrder = storiesImport.__namedExportsOrder,\n stories = _objectWithoutProperties(storiesImport, _excluded);\n\n var composedStories = Object.entries(stories).reduce(function (storiesMap, _ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n exportsName = _ref2[0],\n story = _ref2[1];\n\n if (!isExportStory(exportsName, meta)) {\n return storiesMap;\n }\n\n var result = Object.assign(storiesMap, _defineProperty({}, exportsName, composeStoryFn(story, meta, globalConfig, exportsName)));\n return result;\n }, {});\n return composedStories;\n}","import \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.symbol.js\";\nvar _excluded = [\"componentId\", \"title\", \"kind\", \"id\", \"name\", \"story\", \"parameters\", \"initialArgs\", \"argTypes\"];\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.object.assign.js\";\nimport \"core-js/modules/es.object.to-string.js\";\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nexport function decorateStory(storyFn, decorator, bindWithContext) {\n // Bind the partially decorated storyFn so that when it is called it always knows about the story context,\n // no matter what it is passed directly. This is because we cannot guarantee a decorator will\n // pass the context down to the next decorated story in the chain.\n var boundStoryFunction = bindWithContext(storyFn);\n return function (context) {\n return decorator(boundStoryFunction, context);\n };\n}\n\n/**\n * Currently StoryContextUpdates are allowed to have any key in the type.\n * However, you cannot overwrite any of the build-it \"static\" keys.\n *\n * @param inputContextUpdate StoryContextUpdate\n * @returns StoryContextUpdate\n */\nexport function sanitizeStoryContextUpdate() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var componentId = _ref.componentId,\n title = _ref.title,\n kind = _ref.kind,\n id = _ref.id,\n name = _ref.name,\n story = _ref.story,\n parameters = _ref.parameters,\n initialArgs = _ref.initialArgs,\n argTypes = _ref.argTypes,\n update = _objectWithoutProperties(_ref, _excluded);\n\n return update;\n}\nexport function defaultDecorateStory(storyFn, decorators) {\n // We use a trick to avoid recreating the bound story function inside `decorateStory`.\n // Instead we pass it a context \"getter\", which is defined once (at \"decoration time\")\n // The getter reads a variable which is scoped to this call of `decorateStory`\n // (ie to this story), so there is no possibility of overlap.\n // This will break if you call the same story twice interleaved\n // (React might do it if you rendered the same story twice in the one ReactDom.render call, for instance)\n var contextStore = {};\n /**\n * When you call the story function inside a decorator, e.g.:\n *\n * ```jsx\n *
{storyFn({ foo: 'bar' })}
\n * ```\n *\n * This will override the `foo` property on the `innerContext`, which gets\n * merged in with the default context\n */\n\n var bindWithContext = function bindWithContext(decoratedStoryFn) {\n return function (update) {\n contextStore.value = Object.assign({}, contextStore.value, sanitizeStoryContextUpdate(update));\n return decoratedStoryFn(contextStore.value);\n };\n };\n\n var decoratedWithContextStore = decorators.reduce(function (story, decorator) {\n return decorateStory(story, decorator, bindWithContext);\n }, storyFn);\n return function (context) {\n contextStore.value = context;\n return decoratedWithContextStore(context); // Pass the context directly into the first decorator\n };\n}","import \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.match.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport pickBy from 'lodash/pickBy';\n\nvar matches = function matches(name, descriptor) {\n return Array.isArray(descriptor) ? descriptor.includes(name) : name.match(descriptor);\n};\n\nexport var filterArgTypes = function filterArgTypes(argTypes, include, exclude) {\n if (!include && !exclude) {\n return argTypes;\n }\n\n return argTypes && pickBy(argTypes, function (argType, key) {\n var name = argType.name || key;\n return (!include || matches(name, include)) && (!exclude || !matches(name, exclude));\n });\n};","function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport { SHARED_STATE_CHANGED, SHARED_STATE_SET } from '@storybook/core-events';\nimport { addons, HooksContext, applyHooks, useMemo, useCallback, useRef, useState, useReducer, useEffect, useChannel, useStoryContext, useParameter, useArgs, useGlobals } from '@storybook/addons';\nexport { HooksContext, applyHooks, useMemo, useCallback, useRef, useState, useReducer, useEffect, useChannel, useStoryContext, useParameter, useArgs, useGlobals };\nexport function useSharedState(sharedId, defaultState) {\n var channel = addons.getChannel();\n\n var _ref = channel.last(\"\".concat(SHARED_STATE_CHANGED, \"-manager-\").concat(sharedId)) || channel.last(\"\".concat(SHARED_STATE_SET, \"-manager-\").concat(sharedId)) || [],\n _ref2 = _slicedToArray(_ref, 1),\n lastValue = _ref2[0];\n\n var _useState = useState(lastValue || defaultState),\n _useState2 = _slicedToArray(_useState, 2),\n state = _useState2[0],\n setState = _useState2[1];\n\n var allListeners = useMemo(function () {\n var _ref3;\n\n return _ref3 = {}, _defineProperty(_ref3, \"\".concat(SHARED_STATE_CHANGED, \"-manager-\").concat(sharedId), function manager(s) {\n return setState(s);\n }), _defineProperty(_ref3, \"\".concat(SHARED_STATE_SET, \"-manager-\").concat(sharedId), function manager(s) {\n return setState(s);\n }), _ref3;\n }, [sharedId]);\n var emit = useChannel(allListeners, [sharedId]);\n useEffect(function () {\n // init\n if (defaultState !== undefined && !lastValue) {\n emit(\"\".concat(SHARED_STATE_SET, \"-client-\").concat(sharedId), defaultState);\n }\n }, [sharedId]);\n return [state, function (s) {\n setState(s);\n emit(\"\".concat(SHARED_STATE_CHANGED, \"-client-\").concat(sharedId), s);\n }];\n}\nexport function useAddonState(addonId, defaultState) {\n return useSharedState(addonId, defaultState);\n}","export { StoryStore } from './StoryStore';\nexport { combineParameters } from './parameters';\nexport { filterArgTypes } from './filterArgTypes';\nexport { inferControls } from './inferControls';\nexport * from './types';\nexport * from './csf';\nexport * from './hooks';\nexport * from './decorators';\nexport * from './args';\nexport * from './autoTitle';\nexport * from './sortStories';","import \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.object.freeze.js\";\n\nvar _templateObject;\n\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\n\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\n\nfunction _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\nimport mapValues from 'lodash/mapValues';\nimport dedent from 'ts-dedent';\nimport { logger } from '@storybook/client-logger';\nimport { combineParameters } from './parameters';\n\nvar inferType = function inferType(value, name, visited) {\n var type = _typeof(value);\n\n switch (type) {\n case 'boolean':\n case 'string':\n case 'number':\n case 'function':\n case 'symbol':\n return {\n name: type\n };\n\n default:\n break;\n }\n\n if (value) {\n if (visited.has(value)) {\n logger.warn(dedent(_templateObject || (_templateObject = _taggedTemplateLiteral([\"\\n We've detected a cycle in arg '\", \"'. Args should be JSON-serializable.\\n\\n Consider using the mapping feature or fully custom args:\\n - Mapping: https://storybook.js.org/docs/react/writing-stories/args#mapping-to-complex-arg-values\\n - Custom args: https://storybook.js.org/docs/react/essentials/controls#fully-custom-args\\n \"])), name));\n return {\n name: 'other',\n value: 'cyclic object'\n };\n }\n\n visited.add(value);\n\n if (Array.isArray(value)) {\n var childType = value.length > 0 ? inferType(value[0], name, new Set(visited)) : {\n name: 'other',\n value: 'unknown'\n };\n return {\n name: 'array',\n value: childType\n };\n }\n\n var fieldTypes = mapValues(value, function (field) {\n return inferType(field, name, new Set(visited));\n });\n return {\n name: 'object',\n value: fieldTypes\n };\n }\n\n return {\n name: 'object',\n value: {}\n };\n};\n\nexport var inferArgTypes = function inferArgTypes(context) {\n var id = context.id,\n _context$argTypes = context.argTypes,\n userArgTypes = _context$argTypes === void 0 ? {} : _context$argTypes,\n _context$initialArgs = context.initialArgs,\n initialArgs = _context$initialArgs === void 0 ? {} : _context$initialArgs;\n var argTypes = mapValues(initialArgs, function (arg, key) {\n return {\n name: key,\n type: inferType(arg, \"\".concat(id, \".\").concat(key), new Set())\n };\n });\n var userArgTypesNames = mapValues(userArgTypes, function (argType, key) {\n return {\n name: key\n };\n });\n return combineParameters(argTypes, userArgTypesNames, userArgTypes);\n};\ninferArgTypes.secondPass = true;","import \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport mapValues from 'lodash/mapValues';\nimport { logger } from '@storybook/client-logger';\nimport { filterArgTypes } from './filterArgTypes';\nimport { combineParameters } from './parameters';\n\nvar inferControl = function inferControl(argType, name, matchers) {\n var type = argType.type,\n options = argType.options;\n\n if (!type && !options) {\n return undefined;\n } // args that end with background or color e.g. iconColor\n\n\n if (matchers.color && matchers.color.test(name)) {\n var controlType = argType.type.name;\n\n if (controlType === 'string') {\n return {\n control: {\n type: 'color'\n }\n };\n }\n\n logger.warn(\"Addon controls: Control of type color only supports string, received \\\"\".concat(controlType, \"\\\" instead\"));\n } // args that end with date e.g. purchaseDate\n\n\n if (matchers.date && matchers.date.test(name)) {\n return {\n control: {\n type: 'date'\n }\n };\n }\n\n switch (type.name) {\n case 'array':\n return {\n control: {\n type: 'object'\n }\n };\n\n case 'boolean':\n return {\n control: {\n type: 'boolean'\n }\n };\n\n case 'string':\n return {\n control: {\n type: 'text'\n }\n };\n\n case 'number':\n return {\n control: {\n type: 'number'\n }\n };\n\n case 'enum':\n {\n var _ref = type,\n value = _ref.value;\n return {\n control: {\n type: (value === null || value === void 0 ? void 0 : value.length) <= 5 ? 'radio' : 'select'\n },\n options: value\n };\n }\n\n case 'function':\n case 'symbol':\n return null;\n\n default:\n return {\n control: {\n type: options ? 'select' : 'object'\n }\n };\n }\n};\n\nexport var inferControls = function inferControls(context) {\n var argTypes = context.argTypes,\n _context$parameters = context.parameters,\n __isArgsStory = _context$parameters.__isArgsStory,\n _context$parameters$c = _context$parameters.controls;\n _context$parameters$c = _context$parameters$c === void 0 ? {} : _context$parameters$c;\n var _context$parameters$c2 = _context$parameters$c.include,\n include = _context$parameters$c2 === void 0 ? null : _context$parameters$c2,\n _context$parameters$c3 = _context$parameters$c.exclude,\n exclude = _context$parameters$c3 === void 0 ? null : _context$parameters$c3,\n _context$parameters$c4 = _context$parameters$c.matchers,\n matchers = _context$parameters$c4 === void 0 ? {} : _context$parameters$c4;\n if (!__isArgsStory) return argTypes;\n var filteredArgTypes = filterArgTypes(argTypes, include, exclude);\n var withControls = mapValues(filteredArgTypes, function (argType, name) {\n return (argType === null || argType === void 0 ? void 0 : argType.type) && inferControl(argType, name, matchers);\n });\n return combineParameters(withControls, filteredArgTypes);\n};\ninferControls.secondPass = true;\nexport var argTypesEnhancers = [inferControls];","function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.object.entries.js\";\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\n// Utilities for handling parameters\nimport isPlainObject from 'lodash/isPlainObject';\n/**\n * Safely combine parameters recursively. Only copy objects when needed.\n * Algorithm = always overwrite the existing value UNLESS both values\n * are plain objects. In this case flag the key as \"special\" and handle\n * it with a heuristic.\n */\n\nexport var combineParameters = function combineParameters() {\n for (var _len = arguments.length, parameterSets = new Array(_len), _key = 0; _key < _len; _key++) {\n parameterSets[_key] = arguments[_key];\n }\n\n var mergeKeys = {};\n var combined = parameterSets.filter(Boolean).reduce(function (acc, p) {\n Object.entries(p).forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n key = _ref2[0],\n value = _ref2[1];\n\n var existing = acc[key];\n\n if (Array.isArray(value) || typeof existing === 'undefined') {\n acc[key] = value;\n } else if (isPlainObject(value) && isPlainObject(existing)) {\n // do nothing, we'll handle this later\n mergeKeys[key] = true;\n } else if (typeof value !== 'undefined') {\n acc[key] = value;\n }\n });\n return acc;\n }, {});\n Object.keys(mergeKeys).forEach(function (key) {\n var mergeValues = parameterSets.filter(Boolean).map(function (p) {\n return p[key];\n }).filter(function (value) {\n return typeof value !== 'undefined';\n });\n\n if (mergeValues.every(function (value) {\n return isPlainObject(value);\n })) {\n combined[key] = combineParameters.apply(void 0, _toConsumableArray(mergeValues));\n } else {\n combined[key] = mergeValues[mergeValues.length - 1];\n }\n });\n return combined;\n};","import \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.object.freeze.js\";\n\nvar _templateObject;\n\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.array.map.js\";\n\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\n\nimport stable from 'stable';\nimport dedent from 'ts-dedent';\nimport { storySort } from './storySort';\n\nvar sortStoriesCommon = function sortStoriesCommon(stories, storySortParameter, fileNameOrder) {\n if (storySortParameter) {\n var sortFn;\n\n if (typeof storySortParameter === 'function') {\n sortFn = storySortParameter;\n } else {\n sortFn = storySort(storySortParameter);\n }\n\n stable.inplace(stories, sortFn);\n } else {\n stable.inplace(stories, function (s1, s2) {\n return fileNameOrder.indexOf(s1.importPath) - fileNameOrder.indexOf(s2.importPath);\n });\n }\n\n return stories;\n};\n\nexport var sortStoriesV7 = function sortStoriesV7(stories, storySortParameter, fileNameOrder) {\n try {\n return sortStoriesCommon(stories, storySortParameter, fileNameOrder);\n } catch (err) {\n throw new Error(dedent(_templateObject || (_templateObject = _taggedTemplateLiteral([\"\\n Error sorting stories with sort parameter \", \":\\n\\n > \", \"\\n \\n Are you using a V6-style sort function in V7 mode?\\n\\n More info: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#v7-style-story-sort\\n \"])), storySortParameter, err.message));\n }\n};\n\nvar toIndexEntry = function toIndexEntry(story) {\n var id = story.id,\n title = story.title,\n name = story.name,\n parameters = story.parameters;\n return {\n id: id,\n title: title,\n name: name,\n importPath: parameters.fileName\n };\n};\n\nexport var sortStoriesV6 = function sortStoriesV6(stories, storySortParameter, fileNameOrder) {\n if (storySortParameter && typeof storySortParameter === 'function') {\n stable.inplace(stories, storySortParameter);\n return stories.map(function (s) {\n return toIndexEntry(s[1]);\n });\n }\n\n var storiesV7 = stories.map(function (s) {\n return toIndexEntry(s[1]);\n });\n return sortStoriesCommon(storiesV7, storySortParameter, fileNameOrder);\n};","import \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.split.js\";\nimport \"core-js/modules/es.string.trim.js\";\nimport \"core-js/modules/es.function.name.js\";\nvar STORY_KIND_PATH_SEPARATOR = /\\s*\\/\\s*/;\nexport var storySort = function storySort() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return function (a, b) {\n // If the two stories have the same story kind, then use the default\n // ordering, which is the order they are defined in the story file.\n // only when includeNames is falsy\n if (a.title === b.title && !options.includeNames) {\n return 0;\n } // Get the StorySortParameter options.\n\n\n var method = options.method || 'configure';\n var order = options.order || []; // Examine each part of the story title in turn.\n\n var storyTitleA = a.title.trim().split(STORY_KIND_PATH_SEPARATOR);\n var storyTitleB = b.title.trim().split(STORY_KIND_PATH_SEPARATOR);\n\n if (options.includeNames) {\n storyTitleA.push(a.name);\n storyTitleB.push(b.name);\n }\n\n var depth = 0;\n\n while (storyTitleA[depth] || storyTitleB[depth]) {\n // Stories with a shorter depth should go first.\n if (!storyTitleA[depth]) {\n return -1;\n }\n\n if (!storyTitleB[depth]) {\n return 1;\n } // Compare the next part of the story title.\n\n\n var nameA = storyTitleA[depth];\n var nameB = storyTitleB[depth];\n\n if (nameA !== nameB) {\n // Look for the names in the given `order` array.\n var indexA = order.indexOf(nameA);\n var indexB = order.indexOf(nameB);\n var indexWildcard = order.indexOf('*'); // If at least one of the names is found, sort by the `order` array.\n\n if (indexA !== -1 || indexB !== -1) {\n // If one of the names is not found and there is a wildcard, insert it at the wildcard position.\n // Otherwise, list it last.\n if (indexA === -1) {\n if (indexWildcard !== -1) {\n indexA = indexWildcard;\n } else {\n indexA = order.length;\n }\n }\n\n if (indexB === -1) {\n if (indexWildcard !== -1) {\n indexB = indexWildcard;\n } else {\n indexB = order.length;\n }\n }\n\n return indexA - indexB;\n } // Use the default configure() order.\n\n\n if (method === 'configure') {\n return 0;\n } // Otherwise, use alphabetical order.\n\n\n return nameA.localeCompare(nameB, options.locales ? options.locales : undefined, {\n numeric: true,\n sensitivity: 'accent'\n });\n } // If a nested array is provided for a name, use it for ordering.\n\n\n var index = order.indexOf(nameA);\n order = index !== -1 && Array.isArray(order[index + 1]) ? order[index + 1] : []; // We'll need to look at the next part of the name.\n\n depth += 1;\n } // Identical story titles. The shortcut at the start of this function prevents\n // this from ever being used.\n\n /* istanbul ignore next */\n\n\n return 0;\n };\n};","'use strict';\nconst entities = require('entities');\nconst defaults = {\n fg: '#FFF',\n bg: '#000',\n newline: false,\n escapeXML: false,\n stream: false,\n colors: getDefaultColors()\n};\n\nfunction getDefaultColors() {\n const colors = {\n 0: '#000',\n 1: '#A00',\n 2: '#0A0',\n 3: '#A50',\n 4: '#00A',\n 5: '#A0A',\n 6: '#0AA',\n 7: '#AAA',\n 8: '#555',\n 9: '#F55',\n 10: '#5F5',\n 11: '#FF5',\n 12: '#55F',\n 13: '#F5F',\n 14: '#5FF',\n 15: '#FFF'\n };\n\n range(0, 5).forEach(red => {\n range(0, 5).forEach(green => {\n range(0, 5).forEach(blue => setStyleColor(red, green, blue, colors));\n });\n });\n\n range(0, 23).forEach(function (gray) {\n const c = gray + 232;\n const l = toHexString(gray * 10 + 8);\n\n colors[c] = '#' + l + l + l;\n });\n\n return colors;\n}\n\n/**\n * @param {number} red\n * @param {number} green\n * @param {number} blue\n * @param {object} colors\n */\nfunction setStyleColor(red, green, blue, colors) {\n const c = 16 + (red * 36) + (green * 6) + blue;\n const r = red > 0 ? red * 40 + 55 : 0;\n const g = green > 0 ? green * 40 + 55 : 0;\n const b = blue > 0 ? blue * 40 + 55 : 0;\n\n colors[c] = toColorHexString([r, g, b]);\n}\n\n/**\n * Converts from a number like 15 to a hex string like 'F'\n * @param {number} num\n * @returns {string}\n */\nfunction toHexString(num) {\n let str = num.toString(16);\n\n while (str.length < 2) {\n str = '0' + str;\n }\n\n return str;\n}\n\n/**\n * Converts from an array of numbers like [15, 15, 15] to a hex string like 'FFF'\n * @param {[red, green, blue]} ref\n * @returns {string}\n */\nfunction toColorHexString(ref) {\n const results = [];\n\n for (const r of ref) {\n results.push(toHexString(r));\n }\n\n return '#' + results.join('');\n}\n\n/**\n * @param {Array} stack\n * @param {string} token\n * @param {*} data\n * @param {object} options\n */\nfunction generateOutput(stack, token, data, options) {\n let result;\n\n if (token === 'text') {\n result = pushText(data, options);\n } else if (token === 'display') {\n result = handleDisplay(stack, data, options);\n } else if (token === 'xterm256') {\n result = pushForegroundColor(stack, options.colors[data]);\n } else if (token === 'rgb') {\n result = handleRgb(stack, data);\n }\n\n return result;\n}\n\n/**\n * @param {Array} stack\n * @param {string} data\n * @returns {*}\n */\nfunction handleRgb(stack, data) {\n data = data.substring(2).slice(0, -1);\n const operation = +data.substr(0,2);\n\n const color = data.substring(5).split(';');\n const rgb = color.map(function(value) {\n return ('0' + Number(value).toString(16)).substr(-2);\n }).join('');\n\n return pushStyle(stack, (operation === 38 ? 'color:#' : 'background-color:#') + rgb);\n}\n\n/**\n * @param {Array} stack\n * @param {number} code\n * @param {object} options\n * @returns {*}\n */\nfunction handleDisplay(stack, code, options) {\n code = parseInt(code, 10);\n\n const codeMap = {\n '-1': () => '
',\n 0: () => stack.length && resetStyles(stack),\n 1: () => pushTag(stack, 'b'),\n 3: () => pushTag(stack, 'i'),\n 4: () => pushTag(stack, 'u'),\n 8: () => pushStyle(stack, 'display:none'),\n 9: () => pushTag(stack, 'strike'),\n 22: () => pushStyle(stack, 'font-weight:normal;text-decoration:none;font-style:normal'),\n 23: () => closeTag(stack, 'i'),\n 24: () => closeTag(stack, 'u'),\n 39: () => pushForegroundColor(stack, options.fg),\n 49: () => pushBackgroundColor(stack, options.bg),\n 53: () => pushStyle(stack, 'text-decoration:overline')\n };\n\n let result;\n if (codeMap[code]) {\n result = codeMap[code]();\n } else if (4 < code && code < 7) {\n result = pushTag(stack, 'blink');\n } else if (29 < code && code < 38) {\n result = pushForegroundColor(stack, options.colors[code - 30]);\n } else if ((39 < code && code < 48)) {\n result = pushBackgroundColor(stack, options.colors[code - 40]);\n } else if ((89 < code && code < 98)) {\n result = pushForegroundColor(stack, options.colors[8 + (code - 90)]);\n } else if ((99 < code && code < 108)) {\n result = pushBackgroundColor(stack, options.colors[8 + (code - 100)]);\n }\n\n return result;\n}\n\n/**\n * Clear all the styles\n * @returns {string}\n */\nfunction resetStyles(stack) {\n const stackClone = stack.slice(0);\n\n stack.length = 0;\n\n return stackClone.reverse().map(function (tag) {\n return '';\n }).join('');\n}\n\n/**\n * Creates an array of numbers ranging from low to high\n * @param {number} low\n * @param {number} high\n * @returns {Array}\n * @example range(3, 7); // creates [3, 4, 5, 6, 7]\n */\nfunction range(low, high) {\n const results = [];\n\n for (let j = low; j <= high; j++) {\n results.push(j);\n }\n\n return results;\n}\n\n\n\n/**\n * Returns a new function that is true if value is NOT the same category\n * @param {string} category\n * @returns {function}\n */\nfunction notCategory(category) {\n return function (e) {\n return (category === null || e.category !== category) && category !== 'all';\n };\n}\n\n/**\n * Converts a code into an ansi token type\n * @param {number} code\n * @returns {string}\n */\nfunction categoryForCode(code) {\n code = parseInt(code, 10);\n let result = null;\n\n if (code === 0) {\n result = 'all';\n } else if (code === 1) {\n result = 'bold';\n } else if ((2 < code && code < 5)) {\n result = 'underline';\n } else if ((4 < code && code < 7)) {\n result = 'blink';\n } else if (code === 8) {\n result = 'hide';\n } else if (code === 9) {\n result = 'strike';\n } else if ((29 < code && code < 38) || code === 39 || (89 < code && code < 98)) {\n result = 'foreground-color';\n } else if ((39 < code && code < 48) || code === 49 || (99 < code && code < 108)) {\n result = 'background-color';\n }\n\n return result;\n}\n\n/**\n * @param {string} text\n * @param {object} options\n * @returns {string}\n */\nfunction pushText(text, options) {\n if (options.escapeXML) {\n return entities.encodeXML(text);\n }\n\n return text;\n}\n\n/**\n * @param {Array} stack\n * @param {string} tag\n * @param {string} [style='']\n * @returns {string}\n */\nfunction pushTag(stack, tag, style) {\n if (!style) {\n style = '';\n }\n\n stack.push(tag);\n\n return `<${tag}${style ? ` style=\"${style}\"` : ''}>`;\n}\n\n/**\n * @param {Array} stack\n * @param {string} style\n * @returns {string}\n */\nfunction pushStyle (stack, style) {\n return pushTag(stack, 'span', style);\n}\n\nfunction pushForegroundColor(stack, color) {\n return pushTag(stack, 'span', 'color:' + color);\n}\n\nfunction pushBackgroundColor(stack, color) {\n return pushTag(stack, 'span', 'background-color:' + color);\n}\n\n/**\n * @param {Array} stack\n * @param {string} style\n * @returns {string}\n */\nfunction closeTag(stack, style) {\n let last;\n\n if (stack.slice(-1)[0] === style) {\n last = stack.pop();\n }\n\n if (last) {\n return '';\n }\n}\n\n/**\n * @param {string} text\n * @param {object} options\n * @param {function} callback\n * @returns {Array}\n */\nfunction tokenize(text, options, callback) {\n let ansiMatch = false;\n const ansiHandler = 3;\n\n function remove() {\n return '';\n }\n\n function removeXterm256(m, g1) {\n callback('xterm256', g1);\n return '';\n }\n\n function newline(m) {\n if (options.newline) {\n callback('display', -1);\n } else {\n callback('text', m);\n }\n\n return '';\n }\n\n function ansiMess(m, g1) {\n ansiMatch = true;\n if (g1.trim().length === 0) {\n g1 = '0';\n }\n\n g1 = g1.trimRight(';').split(';');\n\n for (const g of g1) {\n callback('display', g);\n }\n\n return '';\n }\n\n function realText(m) {\n callback('text', m);\n\n return '';\n }\n\n function rgb(m) {\n callback('rgb', m);\n\n return '';\n }\n\n /* eslint no-control-regex:0 */\n const tokens = [{\n pattern: /^\\x08+/,\n sub: remove\n }, {\n pattern: /^\\x1b\\[[012]?K/,\n sub: remove\n }, {\n pattern: /^\\x1b\\[\\(B/,\n sub: remove\n }, {\n pattern: /^\\x1b\\[[34]8;2;\\d+;\\d+;\\d+m/,\n sub: rgb\n }, {\n pattern: /^\\x1b\\[38;5;(\\d+)m/,\n sub: removeXterm256\n }, {\n pattern: /^\\n/,\n sub: newline\n },{\n pattern: /^\\r+\\n/,\n sub: newline\n }, {\n pattern: /^\\x1b\\[((?:\\d{1,3};?)+|)m/,\n sub: ansiMess\n }, {\n // CSI n J\n // ED - Erase in Display Clears part of the screen.\n // If n is 0 (or missing), clear from cursor to end of screen.\n // If n is 1, clear from cursor to beginning of the screen.\n // If n is 2, clear entire screen (and moves cursor to upper left on DOS ANSI.SYS).\n // If n is 3, clear entire screen and delete all lines saved in the scrollback buffer\n // (this feature was added for xterm and is supported by other terminal applications).\n pattern: /^\\x1b\\[\\d?J/,\n sub: remove\n }, {\n // CSI n ; m f\n // HVP - Horizontal Vertical Position Same as CUP\n pattern: /^\\x1b\\[\\d{0,3};\\d{0,3}f/,\n sub: remove\n }, {\n // catch-all for CSI sequences?\n pattern: /^\\x1b\\[?[\\d;]{0,3}/,\n sub: remove\n }, {\n /**\n * extracts real text - not containing:\n * - `\\x1b' - ESC - escape (Ascii 27)\n * - '\\x08' - BS - backspace (Ascii 8)\n * - `\\n` - Newline - linefeed (LF) (ascii 10)\n * - `\\r` - Windows Carriage Return (CR)\n */\n pattern: /^(([^\\x1b\\x08\\r\\n])+)/,\n sub: realText\n }];\n\n function process(handler, i) {\n if (i > ansiHandler && ansiMatch) {\n return;\n }\n\n ansiMatch = false;\n\n text = text.replace(handler.pattern, handler.sub);\n }\n\n const results1 = [];\n let {length} = text;\n\n outer:\n while (length > 0) {\n for (let i = 0, o = 0, len = tokens.length; o < len; i = ++o) {\n const handler = tokens[i];\n process(handler, i);\n\n if (text.length !== length) {\n // We matched a token and removed it from the text. We need to\n // start matching *all* tokens against the new text.\n length = text.length;\n continue outer;\n }\n }\n\n if (text.length === length) {\n break;\n }\n results1.push(0);\n\n length = text.length;\n }\n\n return results1;\n}\n\n/**\n * If streaming, then the stack is \"sticky\"\n *\n * @param {Array} stickyStack\n * @param {string} token\n * @param {*} data\n * @returns {Array}\n */\nfunction updateStickyStack(stickyStack, token, data) {\n if (token !== 'text') {\n stickyStack = stickyStack.filter(notCategory(categoryForCode(data)));\n stickyStack.push({token, data, category: categoryForCode(data)});\n }\n\n return stickyStack;\n}\n\nclass Filter {\n /**\n * @param {object} options\n * @param {string=} options.fg The default foreground color used when reset color codes are encountered.\n * @param {string=} options.bg The default background color used when reset color codes are encountered.\n * @param {boolean=} options.newline Convert newline characters to `
`.\n * @param {boolean=} options.escapeXML Generate HTML/XML entities.\n * @param {boolean=} options.stream Save style state across invocations of `toHtml()`.\n * @param {(string[] | {[code: number]: string})=} options.colors Can override specific colors or the entire ANSI palette.\n */\n constructor (options) {\n options = options || {};\n\n if (options.colors) {\n options.colors = Object.assign({}, defaults.colors, options.colors);\n }\n\n this.options = Object.assign({}, defaults, options);\n this.stack = [];\n this.stickyStack = [];\n }\n /**\n * @param {string | string[]} input\n * @returns {string}\n */\n toHtml (input) {\n input = typeof input === 'string' ? [input] : input;\n const {stack, options} = this;\n const buf = [];\n\n this.stickyStack.forEach(element => {\n const output = generateOutput(stack, element.token, element.data, options);\n\n if (output) {\n buf.push(output);\n }\n });\n\n tokenize(input.join(''), options, (token, data) => {\n const output = generateOutput(stack, token, data, options);\n\n if (output) {\n buf.push(output);\n }\n\n if (options.stream) {\n this.stickyStack = updateStickyStack(this.stickyStack, token, data);\n }\n });\n\n if (stack.length) {\n buf.push(resetStyles(stack));\n }\n\n return buf.join('');\n }\n}\n\nmodule.exports = Filter;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nmodule.exports = function (obj) {\n\tif (typeof obj === 'string') { return camelCase(obj); }\n\treturn walk(obj);\n};\n\nfunction walk(obj) {\n\tif (!obj || typeof obj !== 'object') { return obj; }\n\tif (isDate(obj) || isRegex(obj)) { return obj; }\n\tif (isArray(obj)) { return map(obj, walk); }\n\treturn reduce(objectKeys(obj), function (acc, key) {\n\t\tvar camel = camelCase(key);\n\t\tacc[camel] = walk(obj[key]);\n\t\treturn acc;\n\t}, {});\n}\n\nfunction camelCase(str) {\n\treturn str.replace(/[_.-](\\w|$)/g, function (_, x) {\n\t\treturn x.toUpperCase();\n\t});\n}\n\nvar isArray = Array.isArray || function (obj) {\n\treturn Object.prototype.toString.call(obj) === '[object Array]';\n};\n\nvar isDate = function (obj) {\n\treturn Object.prototype.toString.call(obj) === '[object Date]';\n};\n\nvar isRegex = function (obj) {\n\treturn Object.prototype.toString.call(obj) === '[object RegExp]';\n};\n\nvar has = Object.prototype.hasOwnProperty;\nvar objectKeys = Object.keys || function (obj) {\n\tvar keys = [];\n\tfor (var key in obj) {\n\t\tif (has.call(obj, key)) { keys.push(key); }\n\t}\n\treturn keys;\n};\n\nfunction map(xs, f) {\n\tif (xs.map) { return xs.map(f); }\n\tvar res = [];\n\tfor (var i = 0; i < xs.length; i++) {\n\t\tres.push(f(xs[i], i));\n\t}\n\treturn res;\n}\n\nfunction reduce(xs, f, acc) {\n\tif (xs.reduce) { return xs.reduce(f, acc); }\n\tfor (var i = 0; i < xs.length; i++) {\n\t\tacc = f(acc, xs[i], i);\n\t}\n\treturn acc;\n}\n","/* global define */\n(function (root, factory) {\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define([], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.compareVersions = factory();\n }\n}(this, function () {\n\n var semver = /^v?(?:\\d+)(\\.(?:[x*]|\\d+)(\\.(?:[x*]|\\d+)(\\.(?:[x*]|\\d+))?(?:-[\\da-z\\-]+(?:\\.[\\da-z\\-]+)*)?(?:\\+[\\da-z\\-]+(?:\\.[\\da-z\\-]+)*)?)?)?$/i;\n\n function indexOrEnd(str, q) {\n return str.indexOf(q) === -1 ? str.length : str.indexOf(q);\n }\n\n function split(v) {\n var c = v.replace(/^v/, '').replace(/\\+.*$/, '');\n var patchIndex = indexOrEnd(c, '-');\n var arr = c.substring(0, patchIndex).split('.');\n arr.push(c.substring(patchIndex + 1));\n return arr;\n }\n\n function tryParse(v) {\n return isNaN(Number(v)) ? v : Number(v);\n }\n\n function validate(version) {\n if (typeof version !== 'string') {\n throw new TypeError('Invalid argument expected string');\n }\n if (!semver.test(version)) {\n throw new Error('Invalid argument not valid semver (\\''+version+'\\' received)');\n }\n }\n\n function compareVersions(v1, v2) {\n [v1, v2].forEach(validate);\n\n var s1 = split(v1);\n var s2 = split(v2);\n\n for (var i = 0; i < Math.max(s1.length - 1, s2.length - 1); i++) {\n var n1 = parseInt(s1[i] || 0, 10);\n var n2 = parseInt(s2[i] || 0, 10);\n\n if (n1 > n2) return 1;\n if (n2 > n1) return -1;\n }\n\n var sp1 = s1[s1.length - 1];\n var sp2 = s2[s2.length - 1];\n\n if (sp1 && sp2) {\n var p1 = sp1.split('.').map(tryParse);\n var p2 = sp2.split('.').map(tryParse);\n\n for (i = 0; i < Math.max(p1.length, p2.length); i++) {\n if (p1[i] === undefined || typeof p2[i] === 'string' && typeof p1[i] === 'number') return -1;\n if (p2[i] === undefined || typeof p1[i] === 'string' && typeof p2[i] === 'number') return 1;\n\n if (p1[i] > p2[i]) return 1;\n if (p2[i] > p1[i]) return -1;\n }\n } else if (sp1 || sp2) {\n return sp1 ? -1 : 1;\n }\n\n return 0;\n };\n\n var allowedOperators = [\n '>',\n '>=',\n '=',\n '<',\n '<='\n ];\n\n var operatorResMap = {\n '>': [1],\n '>=': [0, 1],\n '=': [0],\n '<=': [-1, 0],\n '<': [-1]\n };\n\n function validateOperator(op) {\n if (typeof op !== 'string') {\n throw new TypeError('Invalid operator type, expected string but got ' + typeof op);\n }\n if (allowedOperators.indexOf(op) === -1) {\n throw new TypeError('Invalid operator, expected one of ' + allowedOperators.join('|'));\n }\n }\n\n compareVersions.validate = function(version) {\n return typeof version === 'string' && semver.test(version);\n }\n\n compareVersions.compare = function (v1, v2, operator) {\n // Validate operator\n validateOperator(operator);\n\n // since result of compareVersions can only be -1 or 0 or 1\n // a simple map can be used to replace switch\n var res = compareVersions(v1, v2);\n return operatorResMap[operator].indexOf(res) > -1;\n }\n\n return compareVersions;\n}));\n","'use strict';\nvar isCallable = require('../internals/is-callable');\nvar tryToString = require('../internals/try-to-string');\n\nvar $TypeError = TypeError;\n\n// `Assert: IsCallable(argument) is true`\nmodule.exports = function (argument) {\n if (isCallable(argument)) return argument;\n throw $TypeError(tryToString(argument) + ' is not a function');\n};\n","'use strict';\nvar isConstructor = require('../internals/is-constructor');\nvar tryToString = require('../internals/try-to-string');\n\nvar $TypeError = TypeError;\n\n// `Assert: IsConstructor(argument) is true`\nmodule.exports = function (argument) {\n if (isConstructor(argument)) return argument;\n throw $TypeError(tryToString(argument) + ' is not a constructor');\n};\n","'use strict';\nvar isCallable = require('../internals/is-callable');\n\nvar $String = String;\nvar $TypeError = TypeError;\n\nmodule.exports = function (argument) {\n if (typeof argument == 'object' || isCallable(argument)) return argument;\n throw $TypeError(\"Can't set \" + $String(argument) + ' as a prototype');\n};\n","'use strict';\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar create = require('../internals/object-create');\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] === undefined) {\n defineProperty(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: create(null)\n });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\n\n// `AdvanceStringIndex` abstract operation\n// https://tc39.es/ecma262/#sec-advancestringindex\nmodule.exports = function (S, index, unicode) {\n return index + (unicode ? charAt(S, index).length : 1);\n};\n","'use strict';\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\n\nvar $TypeError = TypeError;\n\nmodule.exports = function (it, Prototype) {\n if (isPrototypeOf(Prototype, it)) return it;\n throw $TypeError('Incorrect invocation');\n};\n","'use strict';\nvar isObject = require('../internals/is-object');\n\nvar $String = String;\nvar $TypeError = TypeError;\n\n// `Assert: Type(argument) is Object`\nmodule.exports = function (argument) {\n if (isObject(argument)) return argument;\n throw $TypeError($String(argument) + ' is not an object');\n};\n","'use strict';\n// FF26- bug: ArrayBuffers are non-extensible, but Object.isExtensible does not report it\nvar fails = require('../internals/fails');\n\nmodule.exports = fails(function () {\n if (typeof ArrayBuffer == 'function') {\n var buffer = new ArrayBuffer(8);\n // eslint-disable-next-line es/no-object-isextensible, es/no-object-defineproperty -- safe\n if (Object.isExtensible(buffer)) Object.defineProperty(buffer, 'a', { value: 8 });\n }\n});\n","'use strict';\nvar toObject = require('../internals/to-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\n// `Array.prototype.fill` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.fill\nmodule.exports = function fill(value /* , start = 0, end = @length */) {\n var O = toObject(this);\n var length = lengthOfArrayLike(O);\n var argumentsLength = arguments.length;\n var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);\n var end = argumentsLength > 2 ? arguments[2] : undefined;\n var endPos = end === undefined ? length : toAbsoluteIndex(end, length);\n while (endPos > index) O[index++] = value;\n return O;\n};\n","'use strict';\nvar $forEach = require('../internals/array-iteration').forEach;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar STRICT_METHOD = arrayMethodIsStrict('forEach');\n\n// `Array.prototype.forEach` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.foreach\nmodule.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {\n return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n// eslint-disable-next-line es/no-array-prototype-foreach -- safe\n} : [].forEach;\n","'use strict';\nvar bind = require('../internals/function-bind-context');\nvar call = require('../internals/function-call');\nvar toObject = require('../internals/to-object');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar isConstructor = require('../internals/is-constructor');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar createProperty = require('../internals/create-property');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\nvar $Array = Array;\n\n// `Array.from` method implementation\n// https://tc39.es/ecma262/#sec-array.from\nmodule.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var IS_CONSTRUCTOR = isConstructor(this);\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined);\n var iteratorMethod = getIteratorMethod(O);\n var index = 0;\n var length, result, step, iterator, next, value;\n // if the target is not iterable or it's an array with the default iterator - use a simple case\n if (iteratorMethod && !(this === $Array && isArrayIteratorMethod(iteratorMethod))) {\n iterator = getIterator(O, iteratorMethod);\n next = iterator.next;\n result = IS_CONSTRUCTOR ? new this() : [];\n for (;!(step = call(next, iterator)).done; index++) {\n value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;\n createProperty(result, index, value);\n }\n } else {\n length = lengthOfArrayLike(O);\n result = IS_CONSTRUCTOR ? new this(length) : $Array(length);\n for (;length > index; index++) {\n value = mapping ? mapfn(O[index], index) : O[index];\n createProperty(result, index, value);\n }\n }\n result.length = index;\n return result;\n};\n","'use strict';\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = lengthOfArrayLike(O);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el !== el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value !== value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","'use strict';\nvar bind = require('../internals/function-bind-context');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar IndexedObject = require('../internals/indexed-object');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\nvar push = uncurryThis([].push);\n\n// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation\nvar createMethod = function (TYPE) {\n var IS_MAP = TYPE === 1;\n var IS_FILTER = TYPE === 2;\n var IS_SOME = TYPE === 3;\n var IS_EVERY = TYPE === 4;\n var IS_FIND_INDEX = TYPE === 6;\n var IS_FILTER_REJECT = TYPE === 7;\n var NO_HOLES = TYPE === 5 || IS_FIND_INDEX;\n return function ($this, callbackfn, that, specificCreate) {\n var O = toObject($this);\n var self = IndexedObject(O);\n var boundFunction = bind(callbackfn, that);\n var length = lengthOfArrayLike(self);\n var index = 0;\n var create = specificCreate || arraySpeciesCreate;\n var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;\n var value, result;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n value = self[index];\n result = boundFunction(value, index, O);\n if (TYPE) {\n if (IS_MAP) target[index] = result; // map\n else if (result) switch (TYPE) {\n case 3: return true; // some\n case 5: return value; // find\n case 6: return index; // findIndex\n case 2: push(target, value); // filter\n } else switch (TYPE) {\n case 4: return false; // every\n case 7: push(target, value); // filterReject\n }\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.forEach` method\n // https://tc39.es/ecma262/#sec-array.prototype.foreach\n forEach: createMethod(0),\n // `Array.prototype.map` method\n // https://tc39.es/ecma262/#sec-array.prototype.map\n map: createMethod(1),\n // `Array.prototype.filter` method\n // https://tc39.es/ecma262/#sec-array.prototype.filter\n filter: createMethod(2),\n // `Array.prototype.some` method\n // https://tc39.es/ecma262/#sec-array.prototype.some\n some: createMethod(3),\n // `Array.prototype.every` method\n // https://tc39.es/ecma262/#sec-array.prototype.every\n every: createMethod(4),\n // `Array.prototype.find` method\n // https://tc39.es/ecma262/#sec-array.prototype.find\n find: createMethod(5),\n // `Array.prototype.findIndex` method\n // https://tc39.es/ecma262/#sec-array.prototype.findIndex\n findIndex: createMethod(6),\n // `Array.prototype.filterReject` method\n // https://github.com/tc39/proposal-array-filtering\n filterReject: createMethod(7)\n};\n","'use strict';\nvar fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (METHOD_NAME) {\n // We can't use this feature detection in V8 since it causes\n // deoptimization and serious performance degradation\n // https://github.com/zloirock/core-js/issues/677\n return V8_VERSION >= 51 || !fails(function () {\n var array = [];\n var constructor = array.constructor = {};\n constructor[SPECIES] = function () {\n return { foo: 1 };\n };\n return array[METHOD_NAME](Boolean).foo !== 1;\n });\n};\n","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = function (METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call -- required for testing\n method.call(null, argument || function () { return 1; }, 1);\n });\n};\n","'use strict';\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar createProperty = require('../internals/create-property');\n\nvar $Array = Array;\nvar max = Math.max;\n\nmodule.exports = function (O, start, end) {\n var length = lengthOfArrayLike(O);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n var result = $Array(max(fin - k, 0));\n var n = 0;\n for (; k < fin; k++, n++) createProperty(result, n, O[k]);\n result.length = n;\n return result;\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nmodule.exports = uncurryThis([].slice);\n","'use strict';\nvar arraySlice = require('../internals/array-slice-simple');\n\nvar floor = Math.floor;\n\nvar mergeSort = function (array, comparefn) {\n var length = array.length;\n var middle = floor(length / 2);\n return length < 8 ? insertionSort(array, comparefn) : merge(\n array,\n mergeSort(arraySlice(array, 0, middle), comparefn),\n mergeSort(arraySlice(array, middle), comparefn),\n comparefn\n );\n};\n\nvar insertionSort = function (array, comparefn) {\n var length = array.length;\n var i = 1;\n var element, j;\n\n while (i < length) {\n j = i;\n element = array[i];\n while (j && comparefn(array[j - 1], element) > 0) {\n array[j] = array[--j];\n }\n if (j !== i++) array[j] = element;\n } return array;\n};\n\nvar merge = function (array, left, right, comparefn) {\n var llength = left.length;\n var rlength = right.length;\n var lindex = 0;\n var rindex = 0;\n\n while (lindex < llength || rindex < rlength) {\n array[lindex + rindex] = (lindex < llength && rindex < rlength)\n ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]\n : lindex < llength ? left[lindex++] : right[rindex++];\n } return array;\n};\n\nmodule.exports = mergeSort;\n","'use strict';\nvar isArray = require('../internals/is-array');\nvar isConstructor = require('../internals/is-constructor');\nvar isObject = require('../internals/is-object');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\nvar $Array = Array;\n\n// a part of `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? $Array : C;\n};\n","'use strict';\nvar arraySpeciesConstructor = require('../internals/array-species-constructor');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);\n};\n","'use strict';\nvar anObject = require('../internals/an-object');\nvar iteratorClose = require('../internals/iterator-close');\n\n// call something on iterator step with safe closing on error\nmodule.exports = function (iterator, fn, value, ENTRIES) {\n try {\n return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);\n } catch (error) {\n iteratorClose(iterator, 'throw', error);\n }\n};\n","'use strict';\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n try {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n } catch (error) { return false; } // workaround of old WebKit + `eval` bug\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar toString = uncurryThis({}.toString);\nvar stringSlice = uncurryThis(''.slice);\n\nmodule.exports = function (it) {\n return stringSlice(toString(it), 8, -1);\n};\n","'use strict';\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar isCallable = require('../internals/is-callable');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar $Object = Object;\n\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;\n};\n","'use strict';\nvar create = require('../internals/object-create');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar defineBuiltIns = require('../internals/define-built-ins');\nvar bind = require('../internals/function-bind-context');\nvar anInstance = require('../internals/an-instance');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar iterate = require('../internals/iterate');\nvar defineIterator = require('../internals/iterator-define');\nvar createIterResultObject = require('../internals/create-iter-result-object');\nvar setSpecies = require('../internals/set-species');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fastKey = require('../internals/internal-metadata').fastKey;\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\n\nmodule.exports = {\n getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n var Constructor = wrapper(function (that, iterable) {\n anInstance(that, Prototype);\n setInternalState(that, {\n type: CONSTRUCTOR_NAME,\n index: create(null),\n first: undefined,\n last: undefined,\n size: 0\n });\n if (!DESCRIPTORS) that.size = 0;\n if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n });\n\n var Prototype = Constructor.prototype;\n\n var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n var define = function (that, key, value) {\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n var previous, index;\n // change existing entry\n if (entry) {\n entry.value = value;\n // create new entry\n } else {\n state.last = entry = {\n index: index = fastKey(key, true),\n key: key,\n value: value,\n previous: previous = state.last,\n next: undefined,\n removed: false\n };\n if (!state.first) state.first = entry;\n if (previous) previous.next = entry;\n if (DESCRIPTORS) state.size++;\n else that.size++;\n // add to index\n if (index !== 'F') state.index[index] = entry;\n } return that;\n };\n\n var getEntry = function (that, key) {\n var state = getInternalState(that);\n // fast case\n var index = fastKey(key);\n var entry;\n if (index !== 'F') return state.index[index];\n // frozen object case\n for (entry = state.first; entry; entry = entry.next) {\n if (entry.key === key) return entry;\n }\n };\n\n defineBuiltIns(Prototype, {\n // `{ Map, Set }.prototype.clear()` methods\n // https://tc39.es/ecma262/#sec-map.prototype.clear\n // https://tc39.es/ecma262/#sec-set.prototype.clear\n clear: function clear() {\n var that = this;\n var state = getInternalState(that);\n var data = state.index;\n var entry = state.first;\n while (entry) {\n entry.removed = true;\n if (entry.previous) entry.previous = entry.previous.next = undefined;\n delete data[entry.index];\n entry = entry.next;\n }\n state.first = state.last = undefined;\n if (DESCRIPTORS) state.size = 0;\n else that.size = 0;\n },\n // `{ Map, Set }.prototype.delete(key)` methods\n // https://tc39.es/ecma262/#sec-map.prototype.delete\n // https://tc39.es/ecma262/#sec-set.prototype.delete\n 'delete': function (key) {\n var that = this;\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n if (entry) {\n var next = entry.next;\n var prev = entry.previous;\n delete state.index[entry.index];\n entry.removed = true;\n if (prev) prev.next = next;\n if (next) next.previous = prev;\n if (state.first === entry) state.first = next;\n if (state.last === entry) state.last = prev;\n if (DESCRIPTORS) state.size--;\n else that.size--;\n } return !!entry;\n },\n // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods\n // https://tc39.es/ecma262/#sec-map.prototype.foreach\n // https://tc39.es/ecma262/#sec-set.prototype.foreach\n forEach: function forEach(callbackfn /* , that = undefined */) {\n var state = getInternalState(this);\n var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n var entry;\n while (entry = entry ? entry.next : state.first) {\n boundFunction(entry.value, entry.key, this);\n // revert to the last existing entry\n while (entry && entry.removed) entry = entry.previous;\n }\n },\n // `{ Map, Set}.prototype.has(key)` methods\n // https://tc39.es/ecma262/#sec-map.prototype.has\n // https://tc39.es/ecma262/#sec-set.prototype.has\n has: function has(key) {\n return !!getEntry(this, key);\n }\n });\n\n defineBuiltIns(Prototype, IS_MAP ? {\n // `Map.prototype.get(key)` method\n // https://tc39.es/ecma262/#sec-map.prototype.get\n get: function get(key) {\n var entry = getEntry(this, key);\n return entry && entry.value;\n },\n // `Map.prototype.set(key, value)` method\n // https://tc39.es/ecma262/#sec-map.prototype.set\n set: function set(key, value) {\n return define(this, key === 0 ? 0 : key, value);\n }\n } : {\n // `Set.prototype.add(value)` method\n // https://tc39.es/ecma262/#sec-set.prototype.add\n add: function add(value) {\n return define(this, value = value === 0 ? 0 : value, value);\n }\n });\n if (DESCRIPTORS) defineBuiltInAccessor(Prototype, 'size', {\n configurable: true,\n get: function () {\n return getInternalState(this).size;\n }\n });\n return Constructor;\n },\n setStrong: function (Constructor, CONSTRUCTOR_NAME, IS_MAP) {\n var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';\n var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);\n var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);\n // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods\n // https://tc39.es/ecma262/#sec-map.prototype.entries\n // https://tc39.es/ecma262/#sec-map.prototype.keys\n // https://tc39.es/ecma262/#sec-map.prototype.values\n // https://tc39.es/ecma262/#sec-map.prototype-@@iterator\n // https://tc39.es/ecma262/#sec-set.prototype.entries\n // https://tc39.es/ecma262/#sec-set.prototype.keys\n // https://tc39.es/ecma262/#sec-set.prototype.values\n // https://tc39.es/ecma262/#sec-set.prototype-@@iterator\n defineIterator(Constructor, CONSTRUCTOR_NAME, function (iterated, kind) {\n setInternalState(this, {\n type: ITERATOR_NAME,\n target: iterated,\n state: getInternalCollectionState(iterated),\n kind: kind,\n last: undefined\n });\n }, function () {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var entry = state.last;\n // revert to the last existing entry\n while (entry && entry.removed) entry = entry.previous;\n // get next entry\n if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {\n // or finish the iteration\n state.target = undefined;\n return createIterResultObject(undefined, true);\n }\n // return step by kind\n if (kind === 'keys') return createIterResultObject(entry.key, false);\n if (kind === 'values') return createIterResultObject(entry.value, false);\n return createIterResultObject([entry.key, entry.value], false);\n }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n // `{ Map, Set }.prototype[@@species]` accessors\n // https://tc39.es/ecma262/#sec-get-map-@@species\n // https://tc39.es/ecma262/#sec-get-set-@@species\n setSpecies(CONSTRUCTOR_NAME);\n }\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar defineBuiltIns = require('../internals/define-built-ins');\nvar getWeakData = require('../internals/internal-metadata').getWeakData;\nvar anInstance = require('../internals/an-instance');\nvar anObject = require('../internals/an-object');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar isObject = require('../internals/is-object');\nvar iterate = require('../internals/iterate');\nvar ArrayIterationModule = require('../internals/array-iteration');\nvar hasOwn = require('../internals/has-own-property');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\nvar find = ArrayIterationModule.find;\nvar findIndex = ArrayIterationModule.findIndex;\nvar splice = uncurryThis([].splice);\nvar id = 0;\n\n// fallback for uncaught frozen keys\nvar uncaughtFrozenStore = function (state) {\n return state.frozen || (state.frozen = new UncaughtFrozenStore());\n};\n\nvar UncaughtFrozenStore = function () {\n this.entries = [];\n};\n\nvar findUncaughtFrozen = function (store, key) {\n return find(store.entries, function (it) {\n return it[0] === key;\n });\n};\n\nUncaughtFrozenStore.prototype = {\n get: function (key) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) return entry[1];\n },\n has: function (key) {\n return !!findUncaughtFrozen(this, key);\n },\n set: function (key, value) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) entry[1] = value;\n else this.entries.push([key, value]);\n },\n 'delete': function (key) {\n var index = findIndex(this.entries, function (it) {\n return it[0] === key;\n });\n if (~index) splice(this.entries, index, 1);\n return !!~index;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n var Constructor = wrapper(function (that, iterable) {\n anInstance(that, Prototype);\n setInternalState(that, {\n type: CONSTRUCTOR_NAME,\n id: id++,\n frozen: undefined\n });\n if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n });\n\n var Prototype = Constructor.prototype;\n\n var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n var define = function (that, key, value) {\n var state = getInternalState(that);\n var data = getWeakData(anObject(key), true);\n if (data === true) uncaughtFrozenStore(state).set(key, value);\n else data[state.id] = value;\n return that;\n };\n\n defineBuiltIns(Prototype, {\n // `{ WeakMap, WeakSet }.prototype.delete(key)` methods\n // https://tc39.es/ecma262/#sec-weakmap.prototype.delete\n // https://tc39.es/ecma262/#sec-weakset.prototype.delete\n 'delete': function (key) {\n var state = getInternalState(this);\n if (!isObject(key)) return false;\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state)['delete'](key);\n return data && hasOwn(data, state.id) && delete data[state.id];\n },\n // `{ WeakMap, WeakSet }.prototype.has(key)` methods\n // https://tc39.es/ecma262/#sec-weakmap.prototype.has\n // https://tc39.es/ecma262/#sec-weakset.prototype.has\n has: function has(key) {\n var state = getInternalState(this);\n if (!isObject(key)) return false;\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state).has(key);\n return data && hasOwn(data, state.id);\n }\n });\n\n defineBuiltIns(Prototype, IS_MAP ? {\n // `WeakMap.prototype.get(key)` method\n // https://tc39.es/ecma262/#sec-weakmap.prototype.get\n get: function get(key) {\n var state = getInternalState(this);\n if (isObject(key)) {\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state).get(key);\n return data ? data[state.id] : undefined;\n }\n },\n // `WeakMap.prototype.set(key, value)` method\n // https://tc39.es/ecma262/#sec-weakmap.prototype.set\n set: function set(key, value) {\n return define(this, key, value);\n }\n } : {\n // `WeakSet.prototype.add(value)` method\n // https://tc39.es/ecma262/#sec-weakset.prototype.add\n add: function add(value) {\n return define(this, value, true);\n }\n });\n\n return Constructor;\n }\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar isForced = require('../internals/is-forced');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar InternalMetadataModule = require('../internals/internal-metadata');\nvar iterate = require('../internals/iterate');\nvar anInstance = require('../internals/an-instance');\nvar isCallable = require('../internals/is-callable');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar isObject = require('../internals/is-object');\nvar fails = require('../internals/fails');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nmodule.exports = function (CONSTRUCTOR_NAME, wrapper, common) {\n var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;\n var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;\n var ADDER = IS_MAP ? 'set' : 'add';\n var NativeConstructor = global[CONSTRUCTOR_NAME];\n var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n var Constructor = NativeConstructor;\n var exported = {};\n\n var fixMethod = function (KEY) {\n var uncurriedNativeMethod = uncurryThis(NativePrototype[KEY]);\n defineBuiltIn(NativePrototype, KEY,\n KEY === 'add' ? function add(value) {\n uncurriedNativeMethod(this, value === 0 ? 0 : value);\n return this;\n } : KEY === 'delete' ? function (key) {\n return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);\n } : KEY === 'get' ? function get(key) {\n return IS_WEAK && !isObject(key) ? undefined : uncurriedNativeMethod(this, key === 0 ? 0 : key);\n } : KEY === 'has' ? function has(key) {\n return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);\n } : function set(key, value) {\n uncurriedNativeMethod(this, key === 0 ? 0 : key, value);\n return this;\n }\n );\n };\n\n var REPLACE = isForced(\n CONSTRUCTOR_NAME,\n !isCallable(NativeConstructor) || !(IS_WEAK || NativePrototype.forEach && !fails(function () {\n new NativeConstructor().entries().next();\n }))\n );\n\n if (REPLACE) {\n // create collection constructor\n Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);\n InternalMetadataModule.enable();\n } else if (isForced(CONSTRUCTOR_NAME, true)) {\n var instance = new Constructor();\n // early implementations not supports chaining\n var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) !== instance;\n // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });\n // most early implementations doesn't supports iterables, most modern - not close it correctly\n // eslint-disable-next-line no-new -- required for testing\n var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });\n // for early implementations -0 and +0 not the same\n var BUGGY_ZERO = !IS_WEAK && fails(function () {\n // V8 ~ Chromium 42- fails only with 5+ elements\n var $instance = new NativeConstructor();\n var index = 5;\n while (index--) $instance[ADDER](index, index);\n return !$instance.has(-0);\n });\n\n if (!ACCEPT_ITERABLES) {\n Constructor = wrapper(function (dummy, iterable) {\n anInstance(dummy, NativePrototype);\n var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);\n if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n return that;\n });\n Constructor.prototype = NativePrototype;\n NativePrototype.constructor = Constructor;\n }\n\n if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n\n if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);\n\n // weak collections should not contains .clear method\n if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;\n }\n\n exported[CONSTRUCTOR_NAME] = Constructor;\n $({ global: true, constructor: true, forced: Constructor !== NativeConstructor }, exported);\n\n setToStringTag(Constructor, CONSTRUCTOR_NAME);\n\n if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);\n\n return Constructor;\n};\n","'use strict';\nvar hasOwn = require('../internals/has-own-property');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source, exceptions) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {\n defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n }\n};\n","'use strict';\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\nmodule.exports = function (METHOD_NAME) {\n var regexp = /./;\n try {\n '/./'[METHOD_NAME](regexp);\n } catch (error1) {\n try {\n regexp[MATCH] = false;\n return '/./'[METHOD_NAME](regexp);\n } catch (error2) { /* empty */ }\n } return false;\n};\n","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n function F() { /* empty */ }\n F.prototype.constructor = null;\n // eslint-disable-next-line es/no-object-getprototypeof -- required for testing\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n","'use strict';\n// `CreateIterResultObject` abstract operation\n// https://tc39.es/ecma262/#sec-createiterresultobject\nmodule.exports = function (value, done) {\n return { value: value, done: done };\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","'use strict';\nmodule.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","'use strict';\nvar toPropertyKey = require('../internals/to-property-key');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = function (object, key, value) {\n var propertyKey = toPropertyKey(key);\n if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));\n else object[propertyKey] = value;\n};\n","'use strict';\nvar makeBuiltIn = require('../internals/make-built-in');\nvar defineProperty = require('../internals/object-define-property');\n\nmodule.exports = function (target, name, descriptor) {\n if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });\n if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });\n return defineProperty.f(target, name, descriptor);\n};\n","'use strict';\nvar isCallable = require('../internals/is-callable');\nvar definePropertyModule = require('../internals/object-define-property');\nvar makeBuiltIn = require('../internals/make-built-in');\nvar defineGlobalProperty = require('../internals/define-global-property');\n\nmodule.exports = function (O, key, value, options) {\n if (!options) options = {};\n var simple = options.enumerable;\n var name = options.name !== undefined ? options.name : key;\n if (isCallable(value)) makeBuiltIn(value, name, options);\n if (options.global) {\n if (simple) O[key] = value;\n else defineGlobalProperty(key, value);\n } else {\n try {\n if (!options.unsafe) delete O[key];\n else if (O[key]) simple = true;\n } catch (error) { /* empty */ }\n if (simple) O[key] = value;\n else definePropertyModule.f(O, key, {\n value: value,\n enumerable: false,\n configurable: !options.nonConfigurable,\n writable: !options.nonWritable\n });\n } return O;\n};\n","'use strict';\nvar defineBuiltIn = require('../internals/define-built-in');\n\nmodule.exports = function (target, src, options) {\n for (var key in src) defineBuiltIn(target, key, src[key], options);\n return target;\n};\n","'use strict';\nvar global = require('../internals/global');\n\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\n\nmodule.exports = function (key, value) {\n try {\n defineProperty(global, key, { value: value, configurable: true, writable: true });\n } catch (error) {\n global[key] = value;\n } return value;\n};\n","'use strict';\nvar tryToString = require('../internals/try-to-string');\n\nvar $TypeError = TypeError;\n\nmodule.exports = function (O, P) {\n if (!delete O[P]) throw $TypeError('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));\n};\n","'use strict';\nvar fails = require('../internals/fails');\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;\n});\n","'use strict';\nvar documentAll = typeof document == 'object' && document.all;\n\n// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot\n// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing\nvar IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;\n\nmodule.exports = {\n all: documentAll,\n IS_HTMLDDA: IS_HTMLDDA\n};\n","'use strict';\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","'use strict';\nvar $TypeError = TypeError;\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991\n\nmodule.exports = function (it) {\n if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');\n return it;\n};\n","'use strict';\n// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n};\n","'use strict';\n// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`\nvar documentCreateElement = require('../internals/document-create-element');\n\nvar classList = documentCreateElement('span').classList;\nvar DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;\n\nmodule.exports = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;\n","'use strict';\nvar userAgent = require('../internals/engine-user-agent');\n\nvar firefox = userAgent.match(/firefox\\/(\\d+)/i);\n\nmodule.exports = !!firefox && +firefox[1];\n","'use strict';\nvar IS_DENO = require('../internals/engine-is-deno');\nvar IS_NODE = require('../internals/engine-is-node');\n\nmodule.exports = !IS_DENO && !IS_NODE\n && typeof window == 'object'\n && typeof document == 'object';\n","'use strict';\n/* global Bun -- Deno case */\nmodule.exports = typeof Bun == 'function' && Bun && typeof Bun.version == 'string';\n","'use strict';\n/* global Deno -- Deno case */\nmodule.exports = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';\n","'use strict';\nvar UA = require('../internals/engine-user-agent');\n\nmodule.exports = /MSIE|Trident/.test(UA);\n","'use strict';\nvar userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /ipad|iphone|ipod/i.test(userAgent) && typeof Pebble != 'undefined';\n","'use strict';\nvar userAgent = require('../internals/engine-user-agent');\n\n// eslint-disable-next-line redos/no-vulnerable -- safe\nmodule.exports = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent);\n","'use strict';\nvar global = require('../internals/global');\nvar classof = require('../internals/classof-raw');\n\nmodule.exports = classof(global.process) === 'process';\n","'use strict';\nvar userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /web0s(?!.*chrome)/i.test(userAgent);\n","'use strict';\nmodule.exports = typeof navigator != 'undefined' && String(navigator.userAgent) || '';\n","'use strict';\nvar global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar Deno = global.Deno;\nvar versions = process && process.versions || Deno && Deno.version;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n // in old Chrome, versions of V8 isn't V8 = Chrome / 10\n // but their correct versions are not interesting for us\n version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);\n}\n\n// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`\n// so check `userAgent` even if `.v8` exists, but 0\nif (!version && userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = +match[1];\n }\n}\n\nmodule.exports = version;\n","'use strict';\nvar userAgent = require('../internals/engine-user-agent');\n\nvar webkit = userAgent.match(/AppleWebKit\\/(\\d+)\\./);\n\nmodule.exports = !!webkit && +webkit[1];\n","'use strict';\n// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","'use strict';\nvar global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar defineGlobalProperty = require('../internals/define-global-property');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.dontCallGetSet - prevent calling a getter on target\n options.name - the .name of the function if it does not match the key\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || defineGlobalProperty(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.dontCallGetSet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty == typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n defineBuiltIn(target, key, sourceProperty, options);\n }\n};\n","'use strict';\nmodule.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","'use strict';\n// TODO: Remove from `core-js@4` since it's moved to entry points\nrequire('../modules/es.regexp.exec');\nvar uncurryThis = require('../internals/function-uncurry-this-clause');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar regexpExec = require('../internals/regexp-exec');\nvar fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar SPECIES = wellKnownSymbol('species');\nvar RegExpPrototype = RegExp.prototype;\n\nmodule.exports = function (KEY, exec, FORCED, SHAM) {\n var SYMBOL = wellKnownSymbol(KEY);\n\n var DELEGATES_TO_SYMBOL = !fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) !== 7;\n });\n\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n\n if (KEY === 'split') {\n // We can't use real regex here since it causes deoptimization\n // and serious performance degradation in V8\n // https://github.com/zloirock/core-js/issues/306\n re = {};\n // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n re.constructor = {};\n re.constructor[SPECIES] = function () { return re; };\n re.flags = '';\n re[SYMBOL] = /./[SYMBOL];\n }\n\n re.exec = function () {\n execCalled = true;\n return null;\n };\n\n re[SYMBOL]('');\n return !execCalled;\n });\n\n if (\n !DELEGATES_TO_SYMBOL ||\n !DELEGATES_TO_EXEC ||\n FORCED\n ) {\n var uncurriedNativeRegExpMethod = uncurryThis(/./[SYMBOL]);\n var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {\n var uncurriedNativeMethod = uncurryThis(nativeMethod);\n var $exec = regexp.exec;\n if ($exec === regexpExec || $exec === RegExpPrototype.exec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };\n }\n return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };\n }\n return { done: false };\n });\n\n defineBuiltIn(String.prototype, KEY, methods[0]);\n defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);\n }\n\n if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);\n};\n","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing\n return Object.isExtensible(Object.preventExtensions({}));\n});\n","'use strict';\nvar NATIVE_BIND = require('../internals/function-bind-native');\n\nvar FunctionPrototype = Function.prototype;\nvar apply = FunctionPrototype.apply;\nvar call = FunctionPrototype.call;\n\n// eslint-disable-next-line es/no-reflect -- safe\nmodule.exports = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {\n return call.apply(apply, arguments);\n});\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this-clause');\nvar aCallable = require('../internals/a-callable');\nvar NATIVE_BIND = require('../internals/function-bind-native');\n\nvar bind = uncurryThis(uncurryThis.bind);\n\n// optional / simple context binding\nmodule.exports = function (fn, that) {\n aCallable(fn);\n return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-function-prototype-bind -- safe\n var test = (function () { /* empty */ }).bind();\n // eslint-disable-next-line no-prototype-builtins -- safe\n return typeof test != 'function' || test.hasOwnProperty('prototype');\n});\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar aCallable = require('../internals/a-callable');\nvar isObject = require('../internals/is-object');\nvar hasOwn = require('../internals/has-own-property');\nvar arraySlice = require('../internals/array-slice');\nvar NATIVE_BIND = require('../internals/function-bind-native');\n\nvar $Function = Function;\nvar concat = uncurryThis([].concat);\nvar join = uncurryThis([].join);\nvar factories = {};\n\nvar construct = function (C, argsLength, args) {\n if (!hasOwn(factories, argsLength)) {\n var list = [];\n var i = 0;\n for (; i < argsLength; i++) list[i] = 'a[' + i + ']';\n factories[argsLength] = $Function('C,a', 'return new C(' + join(list, ',') + ')');\n } return factories[argsLength](C, args);\n};\n\n// `Function.prototype.bind` method implementation\n// https://tc39.es/ecma262/#sec-function.prototype.bind\n// eslint-disable-next-line es/no-function-prototype-bind -- detection\nmodule.exports = NATIVE_BIND ? $Function.bind : function bind(that /* , ...args */) {\n var F = aCallable(this);\n var Prototype = F.prototype;\n var partArgs = arraySlice(arguments, 1);\n var boundFunction = function bound(/* args... */) {\n var args = concat(partArgs, arraySlice(arguments));\n return this instanceof boundFunction ? construct(F, args.length, args) : F.apply(that, args);\n };\n if (isObject(Prototype)) boundFunction.prototype = Prototype;\n return boundFunction;\n};\n","'use strict';\nvar NATIVE_BIND = require('../internals/function-bind-native');\n\nvar call = Function.prototype.call;\n\nmodule.exports = NATIVE_BIND ? call.bind(call) : function () {\n return call.apply(call, arguments);\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar hasOwn = require('../internals/has-own-property');\n\nvar FunctionPrototype = Function.prototype;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;\n\nvar EXISTS = hasOwn(FunctionPrototype, 'name');\n// additional protection from minified / mangled / dropped function names\nvar PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';\nvar CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));\n\nmodule.exports = {\n EXISTS: EXISTS,\n PROPER: PROPER,\n CONFIGURABLE: CONFIGURABLE\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar aCallable = require('../internals/a-callable');\n\nmodule.exports = function (object, key, method) {\n try {\n // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));\n } catch (error) { /* empty */ }\n};\n","'use strict';\nvar classofRaw = require('../internals/classof-raw');\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nmodule.exports = function (fn) {\n // Nashorn bug:\n // https://github.com/zloirock/core-js/issues/1128\n // https://github.com/zloirock/core-js/issues/1130\n if (classofRaw(fn) === 'Function') return uncurryThis(fn);\n};\n","'use strict';\nvar NATIVE_BIND = require('../internals/function-bind-native');\n\nvar FunctionPrototype = Function.prototype;\nvar call = FunctionPrototype.call;\nvar uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);\n\nmodule.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) {\n return function () {\n return call.apply(fn, arguments);\n };\n};\n","'use strict';\nvar global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\n\nvar aFunction = function (argument) {\n return isCallable(argument) ? argument : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];\n};\n","'use strict';\nvar classof = require('../internals/classof');\nvar getMethod = require('../internals/get-method');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar Iterators = require('../internals/iterators');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n if (!isNullOrUndefined(it)) return getMethod(it, ITERATOR)\n || getMethod(it, '@@iterator')\n || Iterators[classof(it)];\n};\n","'use strict';\nvar call = require('../internals/function-call');\nvar aCallable = require('../internals/a-callable');\nvar anObject = require('../internals/an-object');\nvar tryToString = require('../internals/try-to-string');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\nvar $TypeError = TypeError;\n\nmodule.exports = function (argument, usingIterator) {\n var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;\n if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument));\n throw $TypeError(tryToString(argument) + ' is not iterable');\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar isArray = require('../internals/is-array');\nvar isCallable = require('../internals/is-callable');\nvar classof = require('../internals/classof-raw');\nvar toString = require('../internals/to-string');\n\nvar push = uncurryThis([].push);\n\nmodule.exports = function (replacer) {\n if (isCallable(replacer)) return replacer;\n if (!isArray(replacer)) return;\n var rawLength = replacer.length;\n var keys = [];\n for (var i = 0; i < rawLength; i++) {\n var element = replacer[i];\n if (typeof element == 'string') push(keys, element);\n else if (typeof element == 'number' || classof(element) === 'Number' || classof(element) === 'String') push(keys, toString(element));\n }\n var keysLength = keys.length;\n var root = true;\n return function (key, value) {\n if (root) {\n root = false;\n return value;\n }\n if (isArray(this)) return value;\n for (var j = 0; j < keysLength; j++) if (keys[j] === key) return value;\n };\n};\n","'use strict';\nvar aCallable = require('../internals/a-callable');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\n\n// `GetMethod` abstract operation\n// https://tc39.es/ecma262/#sec-getmethod\nmodule.exports = function (V, P) {\n var func = V[P];\n return isNullOrUndefined(func) ? undefined : aCallable(func);\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toObject = require('../internals/to-object');\n\nvar floor = Math.floor;\nvar charAt = uncurryThis(''.charAt);\nvar replace = uncurryThis(''.replace);\nvar stringSlice = uncurryThis(''.slice);\n// eslint-disable-next-line redos/no-vulnerable -- safe\nvar SUBSTITUTION_SYMBOLS = /\\$([$&'`]|\\d{1,2}|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&'`]|\\d{1,2})/g;\n\n// `GetSubstitution` abstract operation\n// https://tc39.es/ecma262/#sec-getsubstitution\nmodule.exports = function (matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n if (namedCaptures !== undefined) {\n namedCaptures = toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n return replace(replacement, symbols, function (match, ch) {\n var capture;\n switch (charAt(ch, 0)) {\n case '$': return '$';\n case '&': return matched;\n case '`': return stringSlice(str, 0, position);\n case \"'\": return stringSlice(str, tailPos);\n case '<':\n capture = namedCaptures[stringSlice(ch, 1, -1)];\n break;\n default: // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n if (n > m) {\n var f = floor(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);\n return match;\n }\n capture = captures[n - 1];\n }\n return capture === undefined ? '' : capture;\n });\n};\n","'use strict';\nvar check = function (it) {\n return it && it.Math === Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line es/no-global-this -- safe\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n // eslint-disable-next-line no-restricted-globals -- safe\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func -- fallback\n (function () { return this; })() || this || Function('return this')();\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toObject = require('../internals/to-object');\n\nvar hasOwnProperty = uncurryThis({}.hasOwnProperty);\n\n// `HasOwnProperty` abstract operation\n// https://tc39.es/ecma262/#sec-hasownproperty\n// eslint-disable-next-line es/no-object-hasown -- safe\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n return hasOwnProperty(toObject(it), key);\n};\n","'use strict';\nmodule.exports = {};\n","'use strict';\nmodule.exports = function (a, b) {\n try {\n // eslint-disable-next-line no-console -- safe\n arguments.length === 1 ? console.error(a) : console.error(a, b);\n } catch (error) { /* empty */ }\n};\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thanks to IE8 for its funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a !== 7;\n});\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar $Object = Object;\nvar split = uncurryThis(''.split);\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !$Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) === 'String' ? split(it, '') : $Object(it);\n} : $Object;\n","'use strict';\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\n\n// makes subclassing work correct for wrapped built-ins\nmodule.exports = function ($this, dummy, Wrapper) {\n var NewTarget, NewTargetPrototype;\n if (\n // it can work only with native `setPrototypeOf`\n setPrototypeOf &&\n // we haven't completely correct pre-ES6 way for getting `new.target`, so use this\n isCallable(NewTarget = dummy.constructor) &&\n NewTarget !== Wrapper &&\n isObject(NewTargetPrototype = NewTarget.prototype) &&\n NewTargetPrototype !== Wrapper.prototype\n ) setPrototypeOf($this, NewTargetPrototype);\n return $this;\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar isCallable = require('../internals/is-callable');\nvar store = require('../internals/shared-store');\n\nvar functionToString = uncurryThis(Function.toString);\n\n// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper\nif (!isCallable(store.inspectSource)) {\n store.inspectSource = function (it) {\n return functionToString(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar isObject = require('../internals/is-object');\nvar hasOwn = require('../internals/has-own-property');\nvar defineProperty = require('../internals/object-define-property').f;\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertyNamesExternalModule = require('../internals/object-get-own-property-names-external');\nvar isExtensible = require('../internals/object-is-extensible');\nvar uid = require('../internals/uid');\nvar FREEZING = require('../internals/freezing');\n\nvar REQUIRED = false;\nvar METADATA = uid('meta');\nvar id = 0;\n\nvar setMetadata = function (it) {\n defineProperty(it, METADATA, { value: {\n objectID: 'O' + id++, // object ID\n weakData: {} // weak collections IDs\n } });\n};\n\nvar fastKey = function (it, create) {\n // return a primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!hasOwn(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMetadata(it);\n // return object ID\n } return it[METADATA].objectID;\n};\n\nvar getWeakData = function (it, create) {\n if (!hasOwn(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMetadata(it);\n // return the store of weak collections IDs\n } return it[METADATA].weakData;\n};\n\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZING && REQUIRED && isExtensible(it) && !hasOwn(it, METADATA)) setMetadata(it);\n return it;\n};\n\nvar enable = function () {\n meta.enable = function () { /* empty */ };\n REQUIRED = true;\n var getOwnPropertyNames = getOwnPropertyNamesModule.f;\n var splice = uncurryThis([].splice);\n var test = {};\n test[METADATA] = 1;\n\n // prevent exposing of metadata key\n if (getOwnPropertyNames(test).length) {\n getOwnPropertyNamesModule.f = function (it) {\n var result = getOwnPropertyNames(it);\n for (var i = 0, length = result.length; i < length; i++) {\n if (result[i] === METADATA) {\n splice(result, i, 1);\n break;\n }\n } return result;\n };\n\n $({ target: 'Object', stat: true, forced: true }, {\n getOwnPropertyNames: getOwnPropertyNamesExternalModule.f\n });\n }\n};\n\nvar meta = module.exports = {\n enable: enable,\n fastKey: fastKey,\n getWeakData: getWeakData,\n onFreeze: onFreeze\n};\n\nhiddenKeys[METADATA] = true;\n","'use strict';\nvar NATIVE_WEAK_MAP = require('../internals/weak-map-basic-detection');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar hasOwn = require('../internals/has-own-property');\nvar shared = require('../internals/shared-store');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar TypeError = global.TypeError;\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n /* eslint-disable no-self-assign -- prototype methods protection */\n store.get = store.get;\n store.has = store.has;\n store.set = store.set;\n /* eslint-enable no-self-assign -- prototype methods protection */\n set = function (it, metadata) {\n if (store.has(it)) throw TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n store.set(it, metadata);\n return metadata;\n };\n get = function (it) {\n return store.get(it) || {};\n };\n has = function (it) {\n return store.has(it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (hasOwn(it, STATE)) throw TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return hasOwn(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return hasOwn(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","'use strict';\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n","'use strict';\nvar classof = require('../internals/classof-raw');\n\n// `IsArray` abstract operation\n// https://tc39.es/ecma262/#sec-isarray\n// eslint-disable-next-line es/no-array-isarray -- safe\nmodule.exports = Array.isArray || function isArray(argument) {\n return classof(argument) === 'Array';\n};\n","'use strict';\nvar $documentAll = require('../internals/document-all');\n\nvar documentAll = $documentAll.all;\n\n// `IsCallable` abstract operation\n// https://tc39.es/ecma262/#sec-iscallable\nmodule.exports = $documentAll.IS_HTMLDDA ? function (argument) {\n return typeof argument == 'function' || argument === documentAll;\n} : function (argument) {\n return typeof argument == 'function';\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar classof = require('../internals/classof');\nvar getBuiltIn = require('../internals/get-built-in');\nvar inspectSource = require('../internals/inspect-source');\n\nvar noop = function () { /* empty */ };\nvar empty = [];\nvar construct = getBuiltIn('Reflect', 'construct');\nvar constructorRegExp = /^\\s*(?:class|function)\\b/;\nvar exec = uncurryThis(constructorRegExp.exec);\nvar INCORRECT_TO_STRING = !constructorRegExp.exec(noop);\n\nvar isConstructorModern = function isConstructor(argument) {\n if (!isCallable(argument)) return false;\n try {\n construct(noop, empty, argument);\n return true;\n } catch (error) {\n return false;\n }\n};\n\nvar isConstructorLegacy = function isConstructor(argument) {\n if (!isCallable(argument)) return false;\n switch (classof(argument)) {\n case 'AsyncFunction':\n case 'GeneratorFunction':\n case 'AsyncGeneratorFunction': return false;\n }\n try {\n // we can't check .prototype since constructors produced by .bind haven't it\n // `Function#toString` throws on some built-it function in some legacy engines\n // (for example, `DOMQuad` and similar in FF41-)\n return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));\n } catch (error) {\n return true;\n }\n};\n\nisConstructorLegacy.sham = true;\n\n// `IsConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-isconstructor\nmodule.exports = !construct || fails(function () {\n var called;\n return isConstructorModern(isConstructorModern.call)\n || !isConstructorModern(Object)\n || !isConstructorModern(function () { called = true; })\n || called;\n}) ? isConstructorLegacy : isConstructorModern;\n","'use strict';\nvar hasOwn = require('../internals/has-own-property');\n\nmodule.exports = function (descriptor) {\n return descriptor !== undefined && (hasOwn(descriptor, 'value') || hasOwn(descriptor, 'writable'));\n};\n","'use strict';\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value === POLYFILL ? true\n : value === NATIVE ? false\n : isCallable(detection) ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","'use strict';\n// we can't use just `it == null` since of `document.all` special case\n// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec\nmodule.exports = function (it) {\n return it === null || it === undefined;\n};\n","'use strict';\nvar isCallable = require('../internals/is-callable');\nvar $documentAll = require('../internals/document-all');\n\nvar documentAll = $documentAll.all;\n\nmodule.exports = $documentAll.IS_HTMLDDA ? function (it) {\n return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll;\n} : function (it) {\n return typeof it == 'object' ? it !== null : isCallable(it);\n};\n","'use strict';\nmodule.exports = false;\n","'use strict';\nvar isObject = require('../internals/is-object');\nvar classof = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\n// `IsRegExp` abstract operation\n// https://tc39.es/ecma262/#sec-isregexp\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) === 'RegExp');\n};\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar isCallable = require('../internals/is-callable');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar $Object = Object;\n\nmodule.exports = USE_SYMBOL_AS_UID ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n var $Symbol = getBuiltIn('Symbol');\n return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));\n};\n","'use strict';\nvar bind = require('../internals/function-bind-context');\nvar call = require('../internals/function-call');\nvar anObject = require('../internals/an-object');\nvar tryToString = require('../internals/try-to-string');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar iteratorClose = require('../internals/iterator-close');\n\nvar $TypeError = TypeError;\n\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\n\nvar ResultPrototype = Result.prototype;\n\nmodule.exports = function (iterable, unboundFunction, options) {\n var that = options && options.that;\n var AS_ENTRIES = !!(options && options.AS_ENTRIES);\n var IS_RECORD = !!(options && options.IS_RECORD);\n var IS_ITERATOR = !!(options && options.IS_ITERATOR);\n var INTERRUPTED = !!(options && options.INTERRUPTED);\n var fn = bind(unboundFunction, that);\n var iterator, iterFn, index, length, result, next, step;\n\n var stop = function (condition) {\n if (iterator) iteratorClose(iterator, 'normal', condition);\n return new Result(true, condition);\n };\n\n var callFn = function (value) {\n if (AS_ENTRIES) {\n anObject(value);\n return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);\n } return INTERRUPTED ? fn(value, stop) : fn(value);\n };\n\n if (IS_RECORD) {\n iterator = iterable.iterator;\n } else if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (!iterFn) throw $TypeError(tryToString(iterable) + ' is not iterable');\n // optimisation for array iterators\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {\n result = callFn(iterable[index]);\n if (result && isPrototypeOf(ResultPrototype, result)) return result;\n } return new Result(false);\n }\n iterator = getIterator(iterable, iterFn);\n }\n\n next = IS_RECORD ? iterable.next : iterator.next;\n while (!(step = call(next, iterator)).done) {\n try {\n result = callFn(step.value);\n } catch (error) {\n iteratorClose(iterator, 'throw', error);\n }\n if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;\n } return new Result(false);\n};\n","'use strict';\nvar call = require('../internals/function-call');\nvar anObject = require('../internals/an-object');\nvar getMethod = require('../internals/get-method');\n\nmodule.exports = function (iterator, kind, value) {\n var innerResult, innerError;\n anObject(iterator);\n try {\n innerResult = getMethod(iterator, 'return');\n if (!innerResult) {\n if (kind === 'throw') throw value;\n return value;\n }\n innerResult = call(innerResult, iterator);\n } catch (error) {\n innerError = true;\n innerResult = error;\n }\n if (kind === 'throw') throw value;\n if (innerError) throw innerResult;\n anObject(innerResult);\n return value;\n};\n","'use strict';\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar Iterators = require('../internals/iterators');\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n Iterators[TO_STRING_TAG] = returnThis;\n return IteratorConstructor;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar IS_PURE = require('../internals/is-pure');\nvar FunctionName = require('../internals/function-name');\nvar isCallable = require('../internals/is-callable');\nvar createIteratorConstructor = require('../internals/iterator-create-constructor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar PROPER_FUNCTION_NAME = FunctionName.PROPER;\nvar CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];\n\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n }\n\n return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) {\n defineBuiltIn(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array.prototype.{ values, @@iterator }.name in V8 / FF\n if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) {\n createNonEnumerableProperty(IterablePrototype, 'name', VALUES);\n } else {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return call(nativeIterator, this); };\n }\n }\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n defineBuiltIn(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n defineBuiltIn(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT });\n }\n Iterators[NAME] = defaultIterator;\n\n return methods;\n};\n","'use strict';\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar create = require('../internals/object-create');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\n// `%IteratorPrototype%` object\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\n/* eslint-disable es/no-array-prototype-keys -- safe */\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nvar NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype) || fails(function () {\n var test = {};\n // FF44- legacy iterators case\n return IteratorPrototype[ITERATOR].call(test) !== test;\n});\n\nif (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};\nelse if (IS_PURE) IteratorPrototype = create(IteratorPrototype);\n\n// `%IteratorPrototype%[@@iterator]()` method\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator\nif (!isCallable(IteratorPrototype[ITERATOR])) {\n defineBuiltIn(IteratorPrototype, ITERATOR, function () {\n return this;\n });\n}\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n","'use strict';\nmodule.exports = {};\n","'use strict';\nvar toLength = require('../internals/to-length');\n\n// `LengthOfArrayLike` abstract operation\n// https://tc39.es/ecma262/#sec-lengthofarraylike\nmodule.exports = function (obj) {\n return toLength(obj.length);\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar hasOwn = require('../internals/has-own-property');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar CONFIGURABLE_FUNCTION_NAME = require('../internals/function-name').CONFIGURABLE;\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar enforceInternalState = InternalStateModule.enforce;\nvar getInternalState = InternalStateModule.get;\nvar $String = String;\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\nvar stringSlice = uncurryThis(''.slice);\nvar replace = uncurryThis(''.replace);\nvar join = uncurryThis([].join);\n\nvar CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {\n return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;\n});\n\nvar TEMPLATE = String(String).split('String');\n\nvar makeBuiltIn = module.exports = function (value, name, options) {\n if (stringSlice($String(name), 0, 7) === 'Symbol(') {\n name = '[' + replace($String(name), /^Symbol\\(([^)]*)\\)/, '$1') + ']';\n }\n if (options && options.getter) name = 'get ' + name;\n if (options && options.setter) name = 'set ' + name;\n if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {\n if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });\n else value.name = name;\n }\n if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {\n defineProperty(value, 'length', { value: options.arity });\n }\n try {\n if (options && hasOwn(options, 'constructor') && options.constructor) {\n if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });\n // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable\n } else if (value.prototype) value.prototype = undefined;\n } catch (error) { /* empty */ }\n var state = enforceInternalState(value);\n if (!hasOwn(state, 'source')) {\n state.source = join(TEMPLATE, typeof name == 'string' ? name : '');\n } return value;\n};\n\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n// eslint-disable-next-line no-extend-native -- required\nFunction.prototype.toString = makeBuiltIn(function toString() {\n return isCallable(this) && getInternalState(this).source || inspectSource(this);\n}, 'toString');\n","'use strict';\nvar ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `Math.trunc` method\n// https://tc39.es/ecma262/#sec-math.trunc\n// eslint-disable-next-line es/no-math-trunc -- safe\nmodule.exports = Math.trunc || function trunc(x) {\n var n = +x;\n return (n > 0 ? floor : ceil)(n);\n};\n","'use strict';\nvar global = require('../internals/global');\nvar bind = require('../internals/function-bind-context');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar macrotask = require('../internals/task').set;\nvar Queue = require('../internals/queue');\nvar IS_IOS = require('../internals/engine-is-ios');\nvar IS_IOS_PEBBLE = require('../internals/engine-is-ios-pebble');\nvar IS_WEBOS_WEBKIT = require('../internals/engine-is-webos-webkit');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar MutationObserver = global.MutationObserver || global.WebKitMutationObserver;\nvar document = global.document;\nvar process = global.process;\nvar Promise = global.Promise;\n// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`\nvar queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');\nvar microtask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;\nvar notify, toggle, node, promise, then;\n\n// modern engines have queueMicrotask method\nif (!microtask) {\n var queue = new Queue();\n\n var flush = function () {\n var parent, fn;\n if (IS_NODE && (parent = process.domain)) parent.exit();\n while (fn = queue.get()) try {\n fn();\n } catch (error) {\n if (queue.head) notify();\n throw error;\n }\n if (parent) parent.enter();\n };\n\n // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339\n // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898\n if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {\n toggle = true;\n node = document.createTextNode('');\n new MutationObserver(flush).observe(node, { characterData: true });\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (!IS_IOS_PEBBLE && Promise && Promise.resolve) {\n // Promise.resolve without an argument throws an error in LG WebOS 2\n promise = Promise.resolve(undefined);\n // workaround of WebKit ~ iOS Safari 10.1 bug\n promise.constructor = Promise;\n then = bind(promise.then, promise);\n notify = function () {\n then(flush);\n };\n // Node.js without promises\n } else if (IS_NODE) {\n notify = function () {\n process.nextTick(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessage\n // - onreadystatechange\n // - setTimeout\n } else {\n // `webpack` dev server bug on IE global methods - use bind(fn, global)\n macrotask = bind(macrotask, global);\n notify = function () {\n macrotask(flush);\n };\n }\n\n microtask = function (fn) {\n if (!queue.head) notify();\n queue.add(fn);\n };\n}\n\nmodule.exports = microtask;\n","'use strict';\nvar aCallable = require('../internals/a-callable');\n\nvar $TypeError = TypeError;\n\nvar PromiseCapability = function (C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw $TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aCallable(resolve);\n this.reject = aCallable(reject);\n};\n\n// `NewPromiseCapability` abstract operation\n// https://tc39.es/ecma262/#sec-newpromisecapability\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n","'use strict';\nvar isRegExp = require('../internals/is-regexp');\n\nvar $TypeError = TypeError;\n\nmodule.exports = function (it) {\n if (isRegExp(it)) {\n throw $TypeError(\"The method doesn't accept regular expressions\");\n } return it;\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar call = require('../internals/function-call');\nvar fails = require('../internals/fails');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\n\n// eslint-disable-next-line es/no-object-assign -- safe\nvar $assign = Object.assign;\n// eslint-disable-next-line es/no-object-defineproperty -- required for testing\nvar defineProperty = Object.defineProperty;\nvar concat = uncurryThis([].concat);\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\nmodule.exports = !$assign || fails(function () {\n // should have correct order of operations (Edge bug)\n if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {\n enumerable: true,\n get: function () {\n defineProperty(this, 'b', {\n value: 3,\n enumerable: false\n });\n }\n }), { b: 2 })).b !== 1) return true;\n // should work with symbols and should have deterministic property order (V8 bug)\n var A = {};\n var B = {};\n // eslint-disable-next-line es/no-symbol -- safe\n var symbol = Symbol('assign detection');\n var alphabet = 'abcdefghijklmnopqrst';\n A[symbol] = 7;\n alphabet.split('').forEach(function (chr) { B[chr] = chr; });\n return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`\n var T = toObject(target);\n var argumentsLength = arguments.length;\n var index = 1;\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n var propertyIsEnumerable = propertyIsEnumerableModule.f;\n while (argumentsLength > index) {\n var S = IndexedObject(arguments[index++]);\n var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];\n }\n } return T;\n} : $assign;\n","'use strict';\n/* global ActiveXObject -- old IE, WSH */\nvar anObject = require('../internals/an-object');\nvar definePropertiesModule = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n activeXDocument = new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = typeof document != 'undefined'\n ? document.domain && activeXDocument\n ? NullProtoObjectViaActiveX(activeXDocument) // old IE\n : NullProtoObjectViaIFrame()\n : NullProtoObjectViaActiveX(activeXDocument); // WSH\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\n// eslint-disable-next-line es/no-object-create -- safe\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : definePropertiesModule.f(result, Properties);\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar V8_PROTOTYPE_DEFINE_BUG = require('../internals/v8-prototype-define-bug');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar objectKeys = require('../internals/object-keys');\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\n// eslint-disable-next-line es/no-object-defineproperties -- safe\nexports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var props = toIndexedObject(Properties);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);\n return O;\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar V8_PROTOTYPE_DEFINE_BUG = require('../internals/v8-prototype-define-bug');\nvar anObject = require('../internals/an-object');\nvar toPropertyKey = require('../internals/to-property-key');\n\nvar $TypeError = TypeError;\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar ENUMERABLE = 'enumerable';\nvar CONFIGURABLE = 'configurable';\nvar WRITABLE = 'writable';\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {\n var current = $getOwnPropertyDescriptor(O, P);\n if (current && current[WRITABLE]) {\n O[P] = Attributes.value;\n Attributes = {\n configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],\n enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],\n writable: false\n };\n }\n } return $defineProperty(O, P, Attributes);\n} : $defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return $defineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw $TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar call = require('../internals/function-call');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPropertyKey = require('../internals/to-property-key');\nvar hasOwn = require('../internals/has-own-property');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPropertyKey(P);\n if (IE8_DOM_DEFINE) try {\n return $getOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);\n};\n","'use strict';\n/* eslint-disable es/no-object-getownpropertynames -- safe */\nvar classof = require('../internals/classof-raw');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar $getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar arraySlice = require('../internals/array-slice-simple');\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return $getOwnPropertyNames(it);\n } catch (error) {\n return arraySlice(windowNames);\n }\n};\n\n// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && classof(it) === 'Window'\n ? getWindowNames(it)\n : $getOwnPropertyNames(toIndexedObject(it));\n};\n","'use strict';\nvar internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n// eslint-disable-next-line es/no-object-getownpropertynames -- safe\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","'use strict';\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n","'use strict';\nvar hasOwn = require('../internals/has-own-property');\nvar isCallable = require('../internals/is-callable');\nvar toObject = require('../internals/to-object');\nvar sharedKey = require('../internals/shared-key');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar $Object = Object;\nvar ObjectPrototype = $Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n// eslint-disable-next-line es/no-object-getprototypeof -- safe\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {\n var object = toObject(O);\n if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];\n var constructor = object.constructor;\n if (isCallable(constructor) && object instanceof constructor) {\n return constructor.prototype;\n } return object instanceof $Object ? ObjectPrototype : null;\n};\n","'use strict';\nvar fails = require('../internals/fails');\nvar isObject = require('../internals/is-object');\nvar classof = require('../internals/classof-raw');\nvar ARRAY_BUFFER_NON_EXTENSIBLE = require('../internals/array-buffer-non-extensible');\n\n// eslint-disable-next-line es/no-object-isextensible -- safe\nvar $isExtensible = Object.isExtensible;\nvar FAILS_ON_PRIMITIVES = fails(function () { $isExtensible(1); });\n\n// `Object.isExtensible` method\n// https://tc39.es/ecma262/#sec-object.isextensible\nmodule.exports = (FAILS_ON_PRIMITIVES || ARRAY_BUFFER_NON_EXTENSIBLE) ? function isExtensible(it) {\n if (!isObject(it)) return false;\n if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) === 'ArrayBuffer') return false;\n return $isExtensible ? $isExtensible(it) : true;\n} : $isExtensible;\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nmodule.exports = uncurryThis({}.isPrototypeOf);\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar hasOwn = require('../internals/has-own-property');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar push = uncurryThis([].push);\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (hasOwn(O, key = names[i++])) {\n ~indexOf(result, key) || push(result, key);\n }\n return result;\n};\n","'use strict';\nvar internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n// eslint-disable-next-line es/no-object-keys -- safe\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n","'use strict';\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n","'use strict';\n/* eslint-disable no-proto -- safe */\nvar uncurryThisAccessor = require('../internals/function-uncurry-this-accessor');\nvar anObject = require('../internals/an-object');\nvar aPossiblePrototype = require('../internals/a-possible-prototype');\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n// eslint-disable-next-line es/no-object-setprototypeof -- safe\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');\n setter(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar objectGetPrototypeOf = require('../internals/object-get-prototype-of');\nvar objectKeys = require('../internals/object-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar $propertyIsEnumerable = require('../internals/object-property-is-enumerable').f;\n\nvar propertyIsEnumerable = uncurryThis($propertyIsEnumerable);\nvar push = uncurryThis([].push);\n\n// in some IE versions, `propertyIsEnumerable` returns incorrect result on integer keys\n// of `null` prototype objects\nvar IE_BUG = DESCRIPTORS && fails(function () {\n // eslint-disable-next-line es/no-object-create -- safe\n var O = Object.create(null);\n O[2] = 2;\n return !propertyIsEnumerable(O, 2);\n});\n\n// `Object.{ entries, values }` methods implementation\nvar createMethod = function (TO_ENTRIES) {\n return function (it) {\n var O = toIndexedObject(it);\n var keys = objectKeys(O);\n var IE_WORKAROUND = IE_BUG && objectGetPrototypeOf(O) === null;\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) {\n key = keys[i++];\n if (!DESCRIPTORS || (IE_WORKAROUND ? key in O : propertyIsEnumerable(O, key))) {\n push(result, TO_ENTRIES ? [key, O[key]] : O[key]);\n }\n }\n return result;\n };\n};\n\nmodule.exports = {\n // `Object.entries` method\n // https://tc39.es/ecma262/#sec-object.entries\n entries: createMethod(true),\n // `Object.values` method\n // https://tc39.es/ecma262/#sec-object.values\n values: createMethod(false)\n};\n","'use strict';\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classof = require('../internals/classof');\n\n// `Object.prototype.toString` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.tostring\nmodule.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {\n return '[object ' + classof(this) + ']';\n};\n","'use strict';\nvar call = require('../internals/function-call');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\n\nvar $TypeError = TypeError;\n\n// `OrdinaryToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-ordinarytoprimitive\nmodule.exports = function (input, pref) {\n var fn, val;\n if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;\n if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n throw $TypeError(\"Can't convert object to primitive value\");\n};\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\nvar concat = uncurryThis([].concat);\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;\n};\n","'use strict';\nvar global = require('../internals/global');\n\nmodule.exports = global;\n","'use strict';\nmodule.exports = function (exec) {\n try {\n return { error: false, value: exec() };\n } catch (error) {\n return { error: true, value: error };\n }\n};\n","'use strict';\nvar global = require('../internals/global');\nvar NativePromiseConstructor = require('../internals/promise-native-constructor');\nvar isCallable = require('../internals/is-callable');\nvar isForced = require('../internals/is-forced');\nvar inspectSource = require('../internals/inspect-source');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_BROWSER = require('../internals/engine-is-browser');\nvar IS_DENO = require('../internals/engine-is-deno');\nvar IS_PURE = require('../internals/is-pure');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;\nvar SPECIES = wellKnownSymbol('species');\nvar SUBCLASSING = false;\nvar NATIVE_PROMISE_REJECTION_EVENT = isCallable(global.PromiseRejectionEvent);\n\nvar FORCED_PROMISE_CONSTRUCTOR = isForced('Promise', function () {\n var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor);\n var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor);\n // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // We can't detect it synchronously, so just check versions\n if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;\n // We need Promise#{ catch, finally } in the pure version for preventing prototype pollution\n if (IS_PURE && !(NativePromisePrototype['catch'] && NativePromisePrototype['finally'])) return true;\n // We can't use @@species feature detection in V8 since it causes\n // deoptimization and performance degradation\n // https://github.com/zloirock/core-js/issues/679\n if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {\n // Detect correctness of subclassing with @@species support\n var promise = new NativePromiseConstructor(function (resolve) { resolve(1); });\n var FakePromise = function (exec) {\n exec(function () { /* empty */ }, function () { /* empty */ });\n };\n var constructor = promise.constructor = {};\n constructor[SPECIES] = FakePromise;\n SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;\n if (!SUBCLASSING) return true;\n // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n } return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT;\n});\n\nmodule.exports = {\n CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR,\n REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT,\n SUBCLASSING: SUBCLASSING\n};\n","'use strict';\nvar global = require('../internals/global');\n\nmodule.exports = global.Promise;\n","'use strict';\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar newPromiseCapability = require('../internals/new-promise-capability');\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n","'use strict';\nvar NativePromiseConstructor = require('../internals/promise-native-constructor');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar FORCED_PROMISE_CONSTRUCTOR = require('../internals/promise-constructor-detection').CONSTRUCTOR;\n\nmodule.exports = FORCED_PROMISE_CONSTRUCTOR || !checkCorrectnessOfIteration(function (iterable) {\n NativePromiseConstructor.all(iterable).then(undefined, function () { /* empty */ });\n});\n","'use strict';\nvar defineProperty = require('../internals/object-define-property').f;\n\nmodule.exports = function (Target, Source, key) {\n key in Target || defineProperty(Target, key, {\n configurable: true,\n get: function () { return Source[key]; },\n set: function (it) { Source[key] = it; }\n });\n};\n","'use strict';\nvar Queue = function () {\n this.head = null;\n this.tail = null;\n};\n\nQueue.prototype = {\n add: function (item) {\n var entry = { item: item, next: null };\n var tail = this.tail;\n if (tail) tail.next = entry;\n else this.head = entry;\n this.tail = entry;\n },\n get: function () {\n var entry = this.head;\n if (entry) {\n var next = this.head = entry.next;\n if (next === null) this.tail = null;\n return entry.item;\n }\n }\n};\n\nmodule.exports = Queue;\n","'use strict';\nvar call = require('../internals/function-call');\nvar anObject = require('../internals/an-object');\nvar isCallable = require('../internals/is-callable');\nvar classof = require('../internals/classof-raw');\nvar regexpExec = require('../internals/regexp-exec');\n\nvar $TypeError = TypeError;\n\n// `RegExpExec` abstract operation\n// https://tc39.es/ecma262/#sec-regexpexec\nmodule.exports = function (R, S) {\n var exec = R.exec;\n if (isCallable(exec)) {\n var result = call(exec, R, S);\n if (result !== null) anObject(result);\n return result;\n }\n if (classof(R) === 'RegExp') return call(regexpExec, R, S);\n throw $TypeError('RegExp#exec called on incompatible receiver');\n};\n","'use strict';\n/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */\n/* eslint-disable regexp/no-useless-quantifier -- testing */\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toString = require('../internals/to-string');\nvar regexpFlags = require('../internals/regexp-flags');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar shared = require('../internals/shared');\nvar create = require('../internals/object-create');\nvar getInternalState = require('../internals/internal-state').get;\nvar UNSUPPORTED_DOT_ALL = require('../internals/regexp-unsupported-dot-all');\nvar UNSUPPORTED_NCG = require('../internals/regexp-unsupported-ncg');\n\nvar nativeReplace = shared('native-string-replace', String.prototype.replace);\nvar nativeExec = RegExp.prototype.exec;\nvar patchedExec = nativeExec;\nvar charAt = uncurryThis(''.charAt);\nvar indexOf = uncurryThis(''.indexOf);\nvar replace = uncurryThis(''.replace);\nvar stringSlice = uncurryThis(''.slice);\n\nvar UPDATES_LAST_INDEX_WRONG = (function () {\n var re1 = /a/;\n var re2 = /b*/g;\n call(nativeExec, re1, 'a');\n call(nativeExec, re2, 'a');\n return re1.lastIndex !== 0 || re2.lastIndex !== 0;\n})();\n\nvar UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;\n\n// nonparticipating capturing group, copied from es5-shim's String#split patch.\nvar NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\n\nvar PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;\n\nif (PATCH) {\n patchedExec = function exec(string) {\n var re = this;\n var state = getInternalState(re);\n var str = toString(string);\n var raw = state.raw;\n var result, reCopy, lastIndex, match, i, object, group;\n\n if (raw) {\n raw.lastIndex = re.lastIndex;\n result = call(patchedExec, raw, str);\n re.lastIndex = raw.lastIndex;\n return result;\n }\n\n var groups = state.groups;\n var sticky = UNSUPPORTED_Y && re.sticky;\n var flags = call(regexpFlags, re);\n var source = re.source;\n var charsAdded = 0;\n var strCopy = str;\n\n if (sticky) {\n flags = replace(flags, 'y', '');\n if (indexOf(flags, 'g') === -1) {\n flags += 'g';\n }\n\n strCopy = stringSlice(str, re.lastIndex);\n // Support anchored sticky behavior.\n if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\\n')) {\n source = '(?: ' + source + ')';\n strCopy = ' ' + strCopy;\n charsAdded++;\n }\n // ^(? + rx + ) is needed, in combination with some str slicing, to\n // simulate the 'y' flag.\n reCopy = new RegExp('^(?:' + source + ')', flags);\n }\n\n if (NPCG_INCLUDED) {\n reCopy = new RegExp('^' + source + '$(?!\\\\s)', flags);\n }\n if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;\n\n match = call(nativeExec, sticky ? reCopy : re, strCopy);\n\n if (sticky) {\n if (match) {\n match.input = stringSlice(match.input, charsAdded);\n match[0] = stringSlice(match[0], charsAdded);\n match.index = re.lastIndex;\n re.lastIndex += match[0].length;\n } else re.lastIndex = 0;\n } else if (UPDATES_LAST_INDEX_WRONG && match) {\n re.lastIndex = re.global ? match.index + match[0].length : lastIndex;\n }\n if (NPCG_INCLUDED && match && match.length > 1) {\n // Fix browsers whose `exec` methods don't consistently return `undefined`\n // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/\n call(nativeReplace, match[0], reCopy, function () {\n for (i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined) match[i] = undefined;\n }\n });\n }\n\n if (match && groups) {\n match.groups = object = create(null);\n for (i = 0; i < groups.length; i++) {\n group = groups[i];\n object[group[0]] = match[group[1]];\n }\n }\n\n return match;\n };\n}\n\nmodule.exports = patchedExec;\n","'use strict';\nvar anObject = require('../internals/an-object');\n\n// `RegExp.prototype.flags` getter implementation\n// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags\nmodule.exports = function () {\n var that = anObject(this);\n var result = '';\n if (that.hasIndices) result += 'd';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.dotAll) result += 's';\n if (that.unicode) result += 'u';\n if (that.unicodeSets) result += 'v';\n if (that.sticky) result += 'y';\n return result;\n};\n","'use strict';\nvar call = require('../internals/function-call');\nvar hasOwn = require('../internals/has-own-property');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar regExpFlags = require('../internals/regexp-flags');\n\nvar RegExpPrototype = RegExp.prototype;\n\nmodule.exports = function (R) {\n var flags = R.flags;\n return flags === undefined && !('flags' in RegExpPrototype) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype, R)\n ? call(regExpFlags, R) : flags;\n};\n","'use strict';\nvar fails = require('../internals/fails');\nvar global = require('../internals/global');\n\n// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError\nvar $RegExp = global.RegExp;\n\nvar UNSUPPORTED_Y = fails(function () {\n var re = $RegExp('a', 'y');\n re.lastIndex = 2;\n return re.exec('abcd') !== null;\n});\n\n// UC Browser bug\n// https://github.com/zloirock/core-js/issues/1008\nvar MISSED_STICKY = UNSUPPORTED_Y || fails(function () {\n return !$RegExp('a', 'y').sticky;\n});\n\nvar BROKEN_CARET = UNSUPPORTED_Y || fails(function () {\n // https://bugzilla.mozilla.org/show_bug.cgi?id=773687\n var re = $RegExp('^r', 'gy');\n re.lastIndex = 2;\n return re.exec('str') !== null;\n});\n\nmodule.exports = {\n BROKEN_CARET: BROKEN_CARET,\n MISSED_STICKY: MISSED_STICKY,\n UNSUPPORTED_Y: UNSUPPORTED_Y\n};\n","'use strict';\nvar fails = require('../internals/fails');\nvar global = require('../internals/global');\n\n// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError\nvar $RegExp = global.RegExp;\n\nmodule.exports = fails(function () {\n var re = $RegExp('.', 's');\n return !(re.dotAll && re.exec('\\n') && re.flags === 's');\n});\n","'use strict';\nvar fails = require('../internals/fails');\nvar global = require('../internals/global');\n\n// babel-minify and Closure Compiler transpiles RegExp('(?
b)', 'g') -> /(?b)/g and it causes SyntaxError\nvar $RegExp = global.RegExp;\n\nmodule.exports = fails(function () {\n var re = $RegExp('(?b)', 'g');\n return re.exec('b').groups.a !== 'b' ||\n 'b'.replace(re, '$c') !== 'bc';\n});\n","'use strict';\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\n\nvar $TypeError = TypeError;\n\n// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (isNullOrUndefined(it)) throw $TypeError(\"Can't call method on \" + it);\n return it;\n};\n","'use strict';\n// `SameValue` abstract operation\n// https://tc39.es/ecma262/#sec-samevalue\n// eslint-disable-next-line es/no-object-is -- safe\nmodule.exports = Object.is || function is(x, y) {\n // eslint-disable-next-line no-self-compare -- NaN check\n return x === y ? x !== 0 || 1 / x === 1 / y : x !== x && y !== y;\n};\n","'use strict';\nvar global = require('../internals/global');\nvar apply = require('../internals/function-apply');\nvar isCallable = require('../internals/is-callable');\nvar ENGINE_IS_BUN = require('../internals/engine-is-bun');\nvar USER_AGENT = require('../internals/engine-user-agent');\nvar arraySlice = require('../internals/array-slice');\nvar validateArgumentsLength = require('../internals/validate-arguments-length');\n\nvar Function = global.Function;\n// dirty IE9- and Bun 0.3.0- checks\nvar WRAP = /MSIE .\\./.test(USER_AGENT) || ENGINE_IS_BUN && (function () {\n var version = global.Bun.version.split('.');\n return version.length < 3 || version[0] === '0' && (version[1] < 3 || version[1] === '3' && version[2] === '0');\n})();\n\n// IE9- / Bun 0.3.0- setTimeout / setInterval / setImmediate additional parameters fix\n// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers\n// https://github.com/oven-sh/bun/issues/1633\nmodule.exports = function (scheduler, hasTimeArg) {\n var firstParamIndex = hasTimeArg ? 2 : 1;\n return WRAP ? function (handler, timeout /* , ...arguments */) {\n var boundArgs = validateArgumentsLength(arguments.length, 1) > firstParamIndex;\n var fn = isCallable(handler) ? handler : Function(handler);\n var params = boundArgs ? arraySlice(arguments, firstParamIndex) : [];\n var callback = boundArgs ? function () {\n apply(fn, this, params);\n } : fn;\n return hasTimeArg ? scheduler(callback, timeout) : scheduler(callback);\n } : scheduler;\n};\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n\n if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n defineBuiltInAccessor(Constructor, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n }\n};\n","'use strict';\nvar defineProperty = require('../internals/object-define-property').f;\nvar hasOwn = require('../internals/has-own-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (target, TAG, STATIC) {\n if (target && !STATIC) target = target.prototype;\n if (target && !hasOwn(target, TO_STRING_TAG)) {\n defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });\n }\n};\n","'use strict';\nvar shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n","'use strict';\nvar global = require('../internals/global');\nvar defineGlobalProperty = require('../internals/define-global-property');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || defineGlobalProperty(SHARED, {});\n\nmodule.exports = store;\n","'use strict';\nvar IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.32.2',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',\n license: 'https://github.com/zloirock/core-js/blob/v3.32.2/LICENSE',\n source: 'https://github.com/zloirock/core-js'\n});\n","'use strict';\nvar anObject = require('../internals/an-object');\nvar aConstructor = require('../internals/a-constructor');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `SpeciesConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-speciesconstructor\nmodule.exports = function (O, defaultConstructor) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || isNullOrUndefined(S = anObject(C)[SPECIES]) ? defaultConstructor : aConstructor(S);\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar charAt = uncurryThis(''.charAt);\nvar charCodeAt = uncurryThis(''.charCodeAt);\nvar stringSlice = uncurryThis(''.slice);\n\nvar createMethod = function (CONVERT_TO_STRING) {\n return function ($this, pos) {\n var S = toString(requireObjectCoercible($this));\n var position = toIntegerOrInfinity(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = charCodeAt(S, position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size\n || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF\n ? CONVERT_TO_STRING\n ? charAt(S, position)\n : first\n : CONVERT_TO_STRING\n ? stringSlice(S, position, position + 2)\n : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n };\n};\n\nmodule.exports = {\n // `String.prototype.codePointAt` method\n // https://tc39.es/ecma262/#sec-string.prototype.codepointat\n codeAt: createMethod(false),\n // `String.prototype.at` method\n // https://github.com/mathiasbynens/String.prototype.at\n charAt: createMethod(true)\n};\n","'use strict';\nvar PROPER_FUNCTION_NAME = require('../internals/function-name').PROPER;\nvar fails = require('../internals/fails');\nvar whitespaces = require('../internals/whitespaces');\n\nvar non = '\\u200B\\u0085\\u180E';\n\n// check that a method works with the correct list\n// of whitespaces and has a correct name\nmodule.exports = function (METHOD_NAME) {\n return fails(function () {\n return !!whitespaces[METHOD_NAME]()\n || non[METHOD_NAME]() !== non\n || (PROPER_FUNCTION_NAME && whitespaces[METHOD_NAME].name !== METHOD_NAME);\n });\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar toString = require('../internals/to-string');\nvar whitespaces = require('../internals/whitespaces');\n\nvar replace = uncurryThis(''.replace);\nvar ltrim = RegExp('^[' + whitespaces + ']+');\nvar rtrim = RegExp('(^|[^' + whitespaces + '])[' + whitespaces + ']+$');\n\n// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\nvar createMethod = function (TYPE) {\n return function ($this) {\n var string = toString(requireObjectCoercible($this));\n if (TYPE & 1) string = replace(string, ltrim, '');\n if (TYPE & 2) string = replace(string, rtrim, '$1');\n return string;\n };\n};\n\nmodule.exports = {\n // `String.prototype.{ trimLeft, trimStart }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimstart\n start: createMethod(1),\n // `String.prototype.{ trimRight, trimEnd }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimend\n end: createMethod(2),\n // `String.prototype.trim` method\n // https://tc39.es/ecma262/#sec-string.prototype.trim\n trim: createMethod(3)\n};\n","'use strict';\n/* eslint-disable es/no-symbol -- required for testing */\nvar V8_VERSION = require('../internals/engine-v8-version');\nvar fails = require('../internals/fails');\nvar global = require('../internals/global');\n\nvar $String = global.String;\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n var symbol = Symbol('symbol detection');\n // Chrome 38 Symbol has incorrect toString conversion\n // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,\n // of course, fail.\n return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||\n // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});\n","'use strict';\nvar call = require('../internals/function-call');\nvar getBuiltIn = require('../internals/get-built-in');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar defineBuiltIn = require('../internals/define-built-in');\n\nmodule.exports = function () {\n var Symbol = getBuiltIn('Symbol');\n var SymbolPrototype = Symbol && Symbol.prototype;\n var valueOf = SymbolPrototype && SymbolPrototype.valueOf;\n var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n if (SymbolPrototype && !SymbolPrototype[TO_PRIMITIVE]) {\n // `Symbol.prototype[@@toPrimitive]` method\n // https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive\n // eslint-disable-next-line no-unused-vars -- required for .length\n defineBuiltIn(SymbolPrototype, TO_PRIMITIVE, function (hint) {\n return call(valueOf, this);\n }, { arity: 1 });\n }\n};\n","'use strict';\nvar NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');\n\n/* eslint-disable es/no-symbol -- safe */\nmodule.exports = NATIVE_SYMBOL && !!Symbol['for'] && !!Symbol.keyFor;\n","'use strict';\nvar global = require('../internals/global');\nvar apply = require('../internals/function-apply');\nvar bind = require('../internals/function-bind-context');\nvar isCallable = require('../internals/is-callable');\nvar hasOwn = require('../internals/has-own-property');\nvar fails = require('../internals/fails');\nvar html = require('../internals/html');\nvar arraySlice = require('../internals/array-slice');\nvar createElement = require('../internals/document-create-element');\nvar validateArgumentsLength = require('../internals/validate-arguments-length');\nvar IS_IOS = require('../internals/engine-is-ios');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar set = global.setImmediate;\nvar clear = global.clearImmediate;\nvar process = global.process;\nvar Dispatch = global.Dispatch;\nvar Function = global.Function;\nvar MessageChannel = global.MessageChannel;\nvar String = global.String;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar $location, defer, channel, port;\n\nfails(function () {\n // Deno throws a ReferenceError on `location` access without `--location` flag\n $location = global.location;\n});\n\nvar run = function (id) {\n if (hasOwn(queue, id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\n\nvar runner = function (id) {\n return function () {\n run(id);\n };\n};\n\nvar eventListener = function (event) {\n run(event.data);\n};\n\nvar globalPostMessageDefer = function (id) {\n // old engines have not location.origin\n global.postMessage(String(id), $location.protocol + '//' + $location.host);\n};\n\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!set || !clear) {\n set = function setImmediate(handler) {\n validateArgumentsLength(arguments.length, 1);\n var fn = isCallable(handler) ? handler : Function(handler);\n var args = arraySlice(arguments, 1);\n queue[++counter] = function () {\n apply(fn, undefined, args);\n };\n defer(counter);\n return counter;\n };\n clear = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (IS_NODE) {\n defer = function (id) {\n process.nextTick(runner(id));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(runner(id));\n };\n // Browsers with MessageChannel, includes WebWorkers\n // except iOS - https://github.com/zloirock/core-js/issues/624\n } else if (MessageChannel && !IS_IOS) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = eventListener;\n defer = bind(port.postMessage, port);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (\n global.addEventListener &&\n isCallable(global.postMessage) &&\n !global.importScripts &&\n $location && $location.protocol !== 'file:' &&\n !fails(globalPostMessageDefer)\n ) {\n defer = globalPostMessageDefer;\n global.addEventListener('message', eventListener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in createElement('script')) {\n defer = function (id) {\n html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(runner(id), 0);\n };\n }\n}\n\nmodule.exports = {\n set: set,\n clear: clear\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\n// `thisNumberValue` abstract operation\n// https://tc39.es/ecma262/#sec-thisnumbervalue\nmodule.exports = uncurryThis(1.0.valueOf);\n","'use strict';\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toIntegerOrInfinity(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","'use strict';\n// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","'use strict';\nvar trunc = require('../internals/math-trunc');\n\n// `ToIntegerOrInfinity` abstract operation\n// https://tc39.es/ecma262/#sec-tointegerorinfinity\nmodule.exports = function (argument) {\n var number = +argument;\n // eslint-disable-next-line no-self-compare -- NaN check\n return number !== number || number === 0 ? 0 : trunc(number);\n};\n","'use strict';\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.es/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","'use strict';\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar $Object = Object;\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return $Object(requireObjectCoercible(argument));\n};\n","'use strict';\nvar call = require('../internals/function-call');\nvar isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar getMethod = require('../internals/get-method');\nvar ordinaryToPrimitive = require('../internals/ordinary-to-primitive');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar $TypeError = TypeError;\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\nmodule.exports = function (input, pref) {\n if (!isObject(input) || isSymbol(input)) return input;\n var exoticToPrim = getMethod(input, TO_PRIMITIVE);\n var result;\n if (exoticToPrim) {\n if (pref === undefined) pref = 'default';\n result = call(exoticToPrim, input, pref);\n if (!isObject(result) || isSymbol(result)) return result;\n throw $TypeError(\"Can't convert object to primitive value\");\n }\n if (pref === undefined) pref = 'number';\n return ordinaryToPrimitive(input, pref);\n};\n","'use strict';\nvar toPrimitive = require('../internals/to-primitive');\nvar isSymbol = require('../internals/is-symbol');\n\n// `ToPropertyKey` abstract operation\n// https://tc39.es/ecma262/#sec-topropertykey\nmodule.exports = function (argument) {\n var key = toPrimitive(argument, 'string');\n return isSymbol(key) ? key : key + '';\n};\n","'use strict';\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n","'use strict';\nvar classof = require('../internals/classof');\n\nvar $String = String;\n\nmodule.exports = function (argument) {\n if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');\n return $String(argument);\n};\n","'use strict';\nvar $String = String;\n\nmodule.exports = function (argument) {\n try {\n return $String(argument);\n } catch (error) {\n return 'Object';\n }\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar id = 0;\nvar postfix = Math.random();\nvar toString = uncurryThis(1.0.toString);\n\nmodule.exports = function (key) {\n return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);\n};\n","'use strict';\n/* eslint-disable es/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');\n\nmodule.exports = NATIVE_SYMBOL\n && !Symbol.sham\n && typeof Symbol.iterator == 'symbol';\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\n\n// V8 ~ Chrome 36-\n// https://bugs.chromium.org/p/v8/issues/detail?id=3334\nmodule.exports = DESCRIPTORS && fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty(function () { /* empty */ }, 'prototype', {\n value: 42,\n writable: false\n }).prototype !== 42;\n});\n","'use strict';\nvar $TypeError = TypeError;\n\nmodule.exports = function (passed, required) {\n if (passed < required) throw $TypeError('Not enough arguments');\n return passed;\n};\n","'use strict';\nvar global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));\n","'use strict';\nvar path = require('../internals/path');\nvar hasOwn = require('../internals/has-own-property');\nvar wrappedWellKnownSymbolModule = require('../internals/well-known-symbol-wrapped');\nvar defineProperty = require('../internals/object-define-property').f;\n\nmodule.exports = function (NAME) {\n var Symbol = path.Symbol || (path.Symbol = {});\n if (!hasOwn(Symbol, NAME)) defineProperty(Symbol, NAME, {\n value: wrappedWellKnownSymbolModule.f(NAME)\n });\n};\n","'use strict';\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nexports.f = wellKnownSymbol;\n","'use strict';\nvar global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar hasOwn = require('../internals/has-own-property');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar Symbol = global.Symbol;\nvar WellKnownSymbolsStore = shared('wks');\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!hasOwn(WellKnownSymbolsStore, name)) {\n WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name)\n ? Symbol[name]\n : createWellKnownSymbol('Symbol.' + name);\n } return WellKnownSymbolsStore[name];\n};\n","'use strict';\n// a string of all valid unicode whitespaces\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002' +\n '\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n","'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar isArray = require('../internals/is-array');\nvar isObject = require('../internals/is-object');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer');\nvar createProperty = require('../internals/create-property');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');\n\n// We can't use this feature detection in V8 since it causes\n// deoptimization and serious performance degradation\n// https://github.com/zloirock/core-js/issues/679\nvar IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {\n var array = [];\n array[IS_CONCAT_SPREADABLE] = false;\n return array.concat()[0] !== array;\n});\n\nvar isConcatSpreadable = function (O) {\n if (!isObject(O)) return false;\n var spreadable = O[IS_CONCAT_SPREADABLE];\n return spreadable !== undefined ? !!spreadable : isArray(O);\n};\n\nvar FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !arrayMethodHasSpeciesSupport('concat');\n\n// `Array.prototype.concat` method\n// https://tc39.es/ecma262/#sec-array.prototype.concat\n// with adding support of @@isConcatSpreadable and @@species\n$({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n concat: function concat(arg) {\n var O = toObject(this);\n var A = arraySpeciesCreate(O, 0);\n var n = 0;\n var i, k, length, len, E;\n for (i = -1, length = arguments.length; i < length; i++) {\n E = i === -1 ? O : arguments[i];\n if (isConcatSpreadable(E)) {\n len = lengthOfArrayLike(E);\n doesNotExceedSafeInteger(n + len);\n for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);\n } else {\n doesNotExceedSafeInteger(n + 1);\n createProperty(A, n++, E);\n }\n }\n A.length = n;\n return A;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar fill = require('../internals/array-fill');\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// `Array.prototype.fill` method\n// https://tc39.es/ecma262/#sec-array.prototype.fill\n$({ target: 'Array', proto: true }, {\n fill: fill\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('fill');\n","'use strict';\nvar $ = require('../internals/export');\nvar $filter = require('../internals/array-iteration').filter;\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');\n\n// `Array.prototype.filter` method\n// https://tc39.es/ecma262/#sec-array.prototype.filter\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n filter: function filter(callbackfn /* , thisArg */) {\n return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $findIndex = require('../internals/array-iteration').findIndex;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\nvar FIND_INDEX = 'findIndex';\nvar SKIPS_HOLES = true;\n\n// Shouldn't skip holes\n// eslint-disable-next-line es/no-array-prototype-findindex -- testing\nif (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES = false; });\n\n// `Array.prototype.findIndex` method\n// https://tc39.es/ecma262/#sec-array.prototype.findindex\n$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {\n findIndex: function findIndex(callbackfn /* , that = undefined */) {\n return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables(FIND_INDEX);\n","'use strict';\nvar $ = require('../internals/export');\nvar $find = require('../internals/array-iteration').find;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\nvar FIND = 'find';\nvar SKIPS_HOLES = true;\n\n// Shouldn't skip holes\n// eslint-disable-next-line es/no-array-prototype-find -- testing\nif (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });\n\n// `Array.prototype.find` method\n// https://tc39.es/ecma262/#sec-array.prototype.find\n$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {\n find: function find(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables(FIND);\n","'use strict';\nvar $ = require('../internals/export');\nvar from = require('../internals/array-from');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\n\nvar INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {\n // eslint-disable-next-line es/no-array-from -- required for testing\n Array.from(iterable);\n});\n\n// `Array.from` method\n// https://tc39.es/ecma262/#sec-array.from\n$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {\n from: from\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $includes = require('../internals/array-includes').includes;\nvar fails = require('../internals/fails');\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// FF99+ bug\nvar BROKEN_ON_SPARSE = fails(function () {\n // eslint-disable-next-line es/no-array-prototype-includes -- detection\n return !Array(1).includes();\n});\n\n// `Array.prototype.includes` method\n// https://tc39.es/ecma262/#sec-array.prototype.includes\n$({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {\n includes: function includes(el /* , fromIndex = 0 */) {\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('includes');\n","'use strict';\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar addToUnscopables = require('../internals/add-to-unscopables');\nvar Iterators = require('../internals/iterators');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineProperty = require('../internals/object-define-property').f;\nvar defineIterator = require('../internals/iterator-define');\nvar createIterResultObject = require('../internals/create-iter-result-object');\nvar IS_PURE = require('../internals/is-pure');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);\n\n// `Array.prototype.entries` method\n// https://tc39.es/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.es/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.es/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.es/ecma262/#sec-createarrayiterator\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n setInternalState(this, {\n type: ARRAY_ITERATOR,\n target: toIndexedObject(iterated), // target\n index: 0, // next index\n kind: kind // kind\n });\n// `%ArrayIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n var state = getInternalState(this);\n var target = state.target;\n var kind = state.kind;\n var index = state.index++;\n if (!target || index >= target.length) {\n state.target = undefined;\n return createIterResultObject(undefined, true);\n }\n switch (kind) {\n case 'keys': return createIterResultObject(index, false);\n case 'values': return createIterResultObject(target[index], false);\n } return createIterResultObject([index, target[index]], false);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.es/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.es/ecma262/#sec-createmappedargumentsobject\nvar values = Iterators.Arguments = Iterators.Array;\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n// V8 ~ Chrome 45- bug\nif (!IS_PURE && DESCRIPTORS && values.name !== 'values') try {\n defineProperty(values, 'name', { value: 'values' });\n} catch (error) { /* empty */ }\n","'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar IndexedObject = require('../internals/indexed-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar nativeJoin = uncurryThis([].join);\n\nvar ES3_STRINGS = IndexedObject !== Object;\nvar FORCED = ES3_STRINGS || !arrayMethodIsStrict('join', ',');\n\n// `Array.prototype.join` method\n// https://tc39.es/ecma262/#sec-array.prototype.join\n$({ target: 'Array', proto: true, forced: FORCED }, {\n join: function join(separator) {\n return nativeJoin(toIndexedObject(this), separator === undefined ? ',' : separator);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $map = require('../internals/array-iteration').map;\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');\n\n// `Array.prototype.map` method\n// https://tc39.es/ecma262/#sec-array.prototype.map\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n map: function map(callbackfn /* , thisArg */) {\n return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar isArray = require('../internals/is-array');\nvar isConstructor = require('../internals/is-constructor');\nvar isObject = require('../internals/is-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar createProperty = require('../internals/create-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar nativeSlice = require('../internals/array-slice');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');\n\nvar SPECIES = wellKnownSymbol('species');\nvar $Array = Array;\nvar max = Math.max;\n\n// `Array.prototype.slice` method\n// https://tc39.es/ecma262/#sec-array.prototype.slice\n// fallback for not array-like ES3 strings and DOM objects\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n slice: function slice(start, end) {\n var O = toIndexedObject(this);\n var length = lengthOfArrayLike(O);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n var Constructor, result, n;\n if (isArray(O)) {\n Constructor = O.constructor;\n // cross-realm fallback\n if (isConstructor(Constructor) && (Constructor === $Array || isArray(Constructor.prototype))) {\n Constructor = undefined;\n } else if (isObject(Constructor)) {\n Constructor = Constructor[SPECIES];\n if (Constructor === null) Constructor = undefined;\n }\n if (Constructor === $Array || Constructor === undefined) {\n return nativeSlice(O, k, fin);\n }\n }\n result = new (Constructor === undefined ? $Array : Constructor)(max(fin - k, 0));\n for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n result.length = n;\n return result;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar aCallable = require('../internals/a-callable');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar deletePropertyOrThrow = require('../internals/delete-property-or-throw');\nvar toString = require('../internals/to-string');\nvar fails = require('../internals/fails');\nvar internalSort = require('../internals/array-sort');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar FF = require('../internals/engine-ff-version');\nvar IE_OR_EDGE = require('../internals/engine-is-ie-or-edge');\nvar V8 = require('../internals/engine-v8-version');\nvar WEBKIT = require('../internals/engine-webkit-version');\n\nvar test = [];\nvar nativeSort = uncurryThis(test.sort);\nvar push = uncurryThis(test.push);\n\n// IE8-\nvar FAILS_ON_UNDEFINED = fails(function () {\n test.sort(undefined);\n});\n// V8 bug\nvar FAILS_ON_NULL = fails(function () {\n test.sort(null);\n});\n// Old WebKit\nvar STRICT_METHOD = arrayMethodIsStrict('sort');\n\nvar STABLE_SORT = !fails(function () {\n // feature detection can be too slow, so check engines versions\n if (V8) return V8 < 70;\n if (FF && FF > 3) return;\n if (IE_OR_EDGE) return true;\n if (WEBKIT) return WEBKIT < 603;\n\n var result = '';\n var code, chr, value, index;\n\n // generate an array with more 512 elements (Chakra and old V8 fails only in this case)\n for (code = 65; code < 76; code++) {\n chr = String.fromCharCode(code);\n\n switch (code) {\n case 66: case 69: case 70: case 72: value = 3; break;\n case 68: case 71: value = 4; break;\n default: value = 2;\n }\n\n for (index = 0; index < 47; index++) {\n test.push({ k: chr + index, v: value });\n }\n }\n\n test.sort(function (a, b) { return b.v - a.v; });\n\n for (index = 0; index < test.length; index++) {\n chr = test[index].k.charAt(0);\n if (result.charAt(result.length - 1) !== chr) result += chr;\n }\n\n return result !== 'DGBEFHACIJK';\n});\n\nvar FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;\n\nvar getSortCompare = function (comparefn) {\n return function (x, y) {\n if (y === undefined) return -1;\n if (x === undefined) return 1;\n if (comparefn !== undefined) return +comparefn(x, y) || 0;\n return toString(x) > toString(y) ? 1 : -1;\n };\n};\n\n// `Array.prototype.sort` method\n// https://tc39.es/ecma262/#sec-array.prototype.sort\n$({ target: 'Array', proto: true, forced: FORCED }, {\n sort: function sort(comparefn) {\n if (comparefn !== undefined) aCallable(comparefn);\n\n var array = toObject(this);\n\n if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);\n\n var items = [];\n var arrayLength = lengthOfArrayLike(array);\n var itemsLength, index;\n\n for (index = 0; index < arrayLength; index++) {\n if (index in array) push(items, array[index]);\n }\n\n internalSort(items, getSortCompare(comparefn));\n\n itemsLength = lengthOfArrayLike(items);\n index = 0;\n\n while (index < itemsLength) array[index] = items[index++];\n while (index < arrayLength) deletePropertyOrThrow(array, index++);\n\n return array;\n }\n});\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar FUNCTION_NAME_EXISTS = require('../internals/function-name').EXISTS;\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\n\nvar FunctionPrototype = Function.prototype;\nvar functionToString = uncurryThis(FunctionPrototype.toString);\nvar nameRE = /function\\b(?:\\s|\\/\\*[\\S\\s]*?\\*\\/|\\/\\/[^\\n\\r]*[\\n\\r]+)*([^\\s(/]*)/;\nvar regExpExec = uncurryThis(nameRE.exec);\nvar NAME = 'name';\n\n// Function instances `.name` property\n// https://tc39.es/ecma262/#sec-function-instances-name\nif (DESCRIPTORS && !FUNCTION_NAME_EXISTS) {\n defineBuiltInAccessor(FunctionPrototype, NAME, {\n configurable: true,\n get: function () {\n try {\n return regExpExec(nameRE, functionToString(this))[1];\n } catch (error) {\n return '';\n }\n }\n });\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar apply = require('../internals/function-apply');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar isSymbol = require('../internals/is-symbol');\nvar arraySlice = require('../internals/array-slice');\nvar getReplacerFunction = require('../internals/get-json-replacer-function');\nvar NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');\n\nvar $String = String;\nvar $stringify = getBuiltIn('JSON', 'stringify');\nvar exec = uncurryThis(/./.exec);\nvar charAt = uncurryThis(''.charAt);\nvar charCodeAt = uncurryThis(''.charCodeAt);\nvar replace = uncurryThis(''.replace);\nvar numberToString = uncurryThis(1.0.toString);\n\nvar tester = /[\\uD800-\\uDFFF]/g;\nvar low = /^[\\uD800-\\uDBFF]$/;\nvar hi = /^[\\uDC00-\\uDFFF]$/;\n\nvar WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails(function () {\n var symbol = getBuiltIn('Symbol')('stringify detection');\n // MS Edge converts symbol values to JSON as {}\n return $stringify([symbol]) !== '[null]'\n // WebKit converts symbol values to JSON as null\n || $stringify({ a: symbol }) !== '{}'\n // V8 throws on boxed symbols\n || $stringify(Object(symbol)) !== '{}';\n});\n\n// https://github.com/tc39/proposal-well-formed-stringify\nvar ILL_FORMED_UNICODE = fails(function () {\n return $stringify('\\uDF06\\uD834') !== '\"\\\\udf06\\\\ud834\"'\n || $stringify('\\uDEAD') !== '\"\\\\udead\"';\n});\n\nvar stringifyWithSymbolsFix = function (it, replacer) {\n var args = arraySlice(arguments);\n var $replacer = getReplacerFunction(replacer);\n if (!isCallable($replacer) && (it === undefined || isSymbol(it))) return; // IE8 returns string on undefined\n args[1] = function (key, value) {\n // some old implementations (like WebKit) could pass numbers as keys\n if (isCallable($replacer)) value = call($replacer, this, $String(key), value);\n if (!isSymbol(value)) return value;\n };\n return apply($stringify, null, args);\n};\n\nvar fixIllFormed = function (match, offset, string) {\n var prev = charAt(string, offset - 1);\n var next = charAt(string, offset + 1);\n if ((exec(low, match) && !exec(hi, next)) || (exec(hi, match) && !exec(low, prev))) {\n return '\\\\u' + numberToString(charCodeAt(match, 0), 16);\n } return match;\n};\n\nif ($stringify) {\n // `JSON.stringify` method\n // https://tc39.es/ecma262/#sec-json.stringify\n $({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n stringify: function stringify(it, replacer, space) {\n var args = arraySlice(arguments);\n var result = apply(WRONG_SYMBOLS_CONVERSION ? stringifyWithSymbolsFix : $stringify, null, args);\n return ILL_FORMED_UNICODE && typeof result == 'string' ? replace(result, tester, fixIllFormed) : result;\n }\n });\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar path = require('../internals/path');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar isForced = require('../internals/is-forced');\nvar hasOwn = require('../internals/has-own-property');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar isSymbol = require('../internals/is-symbol');\nvar toPrimitive = require('../internals/to-primitive');\nvar fails = require('../internals/fails');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar thisNumberValue = require('../internals/this-number-value');\nvar trim = require('../internals/string-trim').trim;\n\nvar NUMBER = 'Number';\nvar NativeNumber = global[NUMBER];\nvar PureNumberNamespace = path[NUMBER];\nvar NumberPrototype = NativeNumber.prototype;\nvar TypeError = global.TypeError;\nvar stringSlice = uncurryThis(''.slice);\nvar charCodeAt = uncurryThis(''.charCodeAt);\n\n// `ToNumeric` abstract operation\n// https://tc39.es/ecma262/#sec-tonumeric\nvar toNumeric = function (value) {\n var primValue = toPrimitive(value, 'number');\n return typeof primValue == 'bigint' ? primValue : toNumber(primValue);\n};\n\n// `ToNumber` abstract operation\n// https://tc39.es/ecma262/#sec-tonumber\nvar toNumber = function (argument) {\n var it = toPrimitive(argument, 'number');\n var first, third, radix, maxCode, digits, length, index, code;\n if (isSymbol(it)) throw TypeError('Cannot convert a Symbol value to a number');\n if (typeof it == 'string' && it.length > 2) {\n it = trim(it);\n first = charCodeAt(it, 0);\n if (first === 43 || first === 45) {\n third = charCodeAt(it, 2);\n if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n } else if (first === 48) {\n switch (charCodeAt(it, 1)) {\n // fast equal of /^0b[01]+$/i\n case 66:\n case 98:\n radix = 2;\n maxCode = 49;\n break;\n // fast equal of /^0o[0-7]+$/i\n case 79:\n case 111:\n radix = 8;\n maxCode = 55;\n break;\n default:\n return +it;\n }\n digits = stringSlice(it, 2);\n length = digits.length;\n for (index = 0; index < length; index++) {\n code = charCodeAt(digits, index);\n // parseInt parses a string to a first unavailable symbol\n // but ToNumber should return NaN if a string contains unavailable symbols\n if (code < 48 || code > maxCode) return NaN;\n } return parseInt(digits, radix);\n }\n } return +it;\n};\n\nvar FORCED = isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'));\n\nvar calledWithNew = function (dummy) {\n // includes check on 1..constructor(foo) case\n return isPrototypeOf(NumberPrototype, dummy) && fails(function () { thisNumberValue(dummy); });\n};\n\n// `Number` constructor\n// https://tc39.es/ecma262/#sec-number-constructor\nvar NumberWrapper = function Number(value) {\n var n = arguments.length < 1 ? 0 : NativeNumber(toNumeric(value));\n return calledWithNew(this) ? inheritIfRequired(Object(n), this, NumberWrapper) : n;\n};\n\nNumberWrapper.prototype = NumberPrototype;\nif (FORCED && !IS_PURE) NumberPrototype.constructor = NumberWrapper;\n\n$({ global: true, constructor: true, wrap: true, forced: FORCED }, {\n Number: NumberWrapper\n});\n\n// Use `internal/copy-constructor-properties` helper in `core-js@4`\nvar copyConstructorProperties = function (target, source) {\n for (var keys = DESCRIPTORS ? getOwnPropertyNames(source) : (\n // ES3:\n 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +\n // ES2015 (in case, if modules with ES2015 Number statics required before):\n 'EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,' +\n // ESNext\n 'fromString,range'\n ).split(','), j = 0, key; keys.length > j; j++) {\n if (hasOwn(source, key = keys[j]) && !hasOwn(target, key)) {\n defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n }\n};\n\nif (IS_PURE && PureNumberNamespace) copyConstructorProperties(path[NUMBER], PureNumberNamespace);\nif (FORCED || IS_PURE) copyConstructorProperties(path[NUMBER], NativeNumber);\n","'use strict';\nvar $ = require('../internals/export');\nvar assign = require('../internals/object-assign');\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\n// eslint-disable-next-line es/no-object-assign -- required for testing\n$({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {\n assign: assign\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $entries = require('../internals/object-to-array').entries;\n\n// `Object.entries` method\n// https://tc39.es/ecma262/#sec-object.entries\n$({ target: 'Object', stat: true }, {\n entries: function entries(O) {\n return $entries(O);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar FREEZING = require('../internals/freezing');\nvar fails = require('../internals/fails');\nvar isObject = require('../internals/is-object');\nvar onFreeze = require('../internals/internal-metadata').onFreeze;\n\n// eslint-disable-next-line es/no-object-freeze -- safe\nvar $freeze = Object.freeze;\nvar FAILS_ON_PRIMITIVES = fails(function () { $freeze(1); });\n\n// `Object.freeze` method\n// https://tc39.es/ecma262/#sec-object.freeze\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {\n freeze: function freeze(it) {\n return $freeze && isObject(it) ? $freeze(onFreeze(it)) : it;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar nativeGetOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar FORCED = !DESCRIPTORS || fails(function () { nativeGetOwnPropertyDescriptor(1); });\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\n$({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {\n getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {\n return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar ownKeys = require('../internals/own-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar createProperty = require('../internals/create-property');\n\n// `Object.getOwnPropertyDescriptors` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptors\n$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {\n getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {\n var O = toIndexedObject(object);\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n var keys = ownKeys(O);\n var result = {};\n var index = 0;\n var key, descriptor;\n while (keys.length > index) {\n descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);\n if (descriptor !== undefined) createProperty(result, key, descriptor);\n }\n return result;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');\nvar fails = require('../internals/fails');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar toObject = require('../internals/to-object');\n\n// V8 ~ Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n// https://bugs.chromium.org/p/v8/issues/detail?id=3443\nvar FORCED = !NATIVE_SYMBOL || fails(function () { getOwnPropertySymbolsModule.f(1); });\n\n// `Object.getOwnPropertySymbols` method\n// https://tc39.es/ecma262/#sec-object.getownpropertysymbols\n$({ target: 'Object', stat: true, forced: FORCED }, {\n getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n var $getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return $getOwnPropertySymbols ? $getOwnPropertySymbols(toObject(it)) : [];\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar toObject = require('../internals/to-object');\nvar nativeGetPrototypeOf = require('../internals/object-get-prototype-of');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); });\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, {\n getPrototypeOf: function getPrototypeOf(it) {\n return nativeGetPrototypeOf(toObject(it));\n }\n});\n\n","'use strict';\nvar $ = require('../internals/export');\nvar toObject = require('../internals/to-object');\nvar nativeKeys = require('../internals/object-keys');\nvar fails = require('../internals/fails');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n keys: function keys(it) {\n return nativeKeys(toObject(it));\n }\n});\n","'use strict';\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar toString = require('../internals/object-to-string');\n\n// `Object.prototype.toString` method\n// https://tc39.es/ecma262/#sec-object.prototype.tostring\nif (!TO_STRING_TAG_SUPPORT) {\n defineBuiltIn(Object.prototype, 'toString', toString, { unsafe: true });\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar $values = require('../internals/object-to-array').values;\n\n// `Object.values` method\n// https://tc39.es/ecma262/#sec-object.values\n$({ target: 'Object', stat: true }, {\n values: function values(O) {\n return $values(O);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar aCallable = require('../internals/a-callable');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar iterate = require('../internals/iterate');\nvar PROMISE_STATICS_INCORRECT_ITERATION = require('../internals/promise-statics-incorrect-iteration');\n\n// `Promise.all` method\n// https://tc39.es/ecma262/#sec-promise.all\n$({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapabilityModule.f(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aCallable(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n remaining++;\n call($promiseResolve, C, promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar FORCED_PROMISE_CONSTRUCTOR = require('../internals/promise-constructor-detection').CONSTRUCTOR;\nvar NativePromiseConstructor = require('../internals/promise-native-constructor');\nvar getBuiltIn = require('../internals/get-built-in');\nvar isCallable = require('../internals/is-callable');\nvar defineBuiltIn = require('../internals/define-built-in');\n\nvar NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;\n\n// `Promise.prototype.catch` method\n// https://tc39.es/ecma262/#sec-promise.prototype.catch\n$({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR, real: true }, {\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n});\n\n// makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`\nif (!IS_PURE && isCallable(NativePromiseConstructor)) {\n var method = getBuiltIn('Promise').prototype['catch'];\n if (NativePromisePrototype['catch'] !== method) {\n defineBuiltIn(NativePromisePrototype, 'catch', method, { unsafe: true });\n }\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar IS_NODE = require('../internals/engine-is-node');\nvar global = require('../internals/global');\nvar call = require('../internals/function-call');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar setSpecies = require('../internals/set-species');\nvar aCallable = require('../internals/a-callable');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar anInstance = require('../internals/an-instance');\nvar speciesConstructor = require('../internals/species-constructor');\nvar task = require('../internals/task').set;\nvar microtask = require('../internals/microtask');\nvar hostReportErrors = require('../internals/host-report-errors');\nvar perform = require('../internals/perform');\nvar Queue = require('../internals/queue');\nvar InternalStateModule = require('../internals/internal-state');\nvar NativePromiseConstructor = require('../internals/promise-native-constructor');\nvar PromiseConstructorDetection = require('../internals/promise-constructor-detection');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\n\nvar PROMISE = 'Promise';\nvar FORCED_PROMISE_CONSTRUCTOR = PromiseConstructorDetection.CONSTRUCTOR;\nvar NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;\nvar NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;\nvar getInternalPromiseState = InternalStateModule.getterFor(PROMISE);\nvar setInternalState = InternalStateModule.set;\nvar NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;\nvar PromiseConstructor = NativePromiseConstructor;\nvar PromisePrototype = NativePromisePrototype;\nvar TypeError = global.TypeError;\nvar document = global.document;\nvar process = global.process;\nvar newPromiseCapability = newPromiseCapabilityModule.f;\nvar newGenericPromiseCapability = newPromiseCapability;\n\nvar DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);\nvar UNHANDLED_REJECTION = 'unhandledrejection';\nvar REJECTION_HANDLED = 'rejectionhandled';\nvar PENDING = 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\nvar HANDLED = 1;\nvar UNHANDLED = 2;\n\nvar Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && isCallable(then = it.then) ? then : false;\n};\n\nvar callReaction = function (reaction, state) {\n var value = state.value;\n var ok = state.state === FULFILLED;\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (state.rejection === UNHANDLED) onHandleUnhandled(state);\n state.rejection = HANDLED;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // can throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n call(then, result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (error) {\n if (domain && !exited) domain.exit();\n reject(error);\n }\n};\n\nvar notify = function (state, isReject) {\n if (state.notified) return;\n state.notified = true;\n microtask(function () {\n var reactions = state.reactions;\n var reaction;\n while (reaction = reactions.get()) {\n callReaction(reaction, state);\n }\n state.notified = false;\n if (isReject && !state.rejection) onUnhandled(state);\n });\n};\n\nvar dispatchEvent = function (name, promise, reason) {\n var event, handler;\n if (DISPATCH_EVENT) {\n event = document.createEvent('Event');\n event.promise = promise;\n event.reason = reason;\n event.initEvent(name, false, true);\n global.dispatchEvent(event);\n } else event = { promise: promise, reason: reason };\n if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);\n else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);\n};\n\nvar onUnhandled = function (state) {\n call(task, global, function () {\n var promise = state.facade;\n var value = state.value;\n var IS_UNHANDLED = isUnhandled(state);\n var result;\n if (IS_UNHANDLED) {\n result = perform(function () {\n if (IS_NODE) {\n process.emit('unhandledRejection', value, promise);\n } else dispatchEvent(UNHANDLED_REJECTION, promise, value);\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;\n if (result.error) throw result.value;\n }\n });\n};\n\nvar isUnhandled = function (state) {\n return state.rejection !== HANDLED && !state.parent;\n};\n\nvar onHandleUnhandled = function (state) {\n call(task, global, function () {\n var promise = state.facade;\n if (IS_NODE) {\n process.emit('rejectionHandled', promise);\n } else dispatchEvent(REJECTION_HANDLED, promise, state.value);\n });\n};\n\nvar bind = function (fn, state, unwrap) {\n return function (value) {\n fn(state, value, unwrap);\n };\n};\n\nvar internalReject = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n state.value = value;\n state.state = REJECTED;\n notify(state, true);\n};\n\nvar internalResolve = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n try {\n if (state.facade === value) throw TypeError(\"Promise can't be resolved itself\");\n var then = isThenable(value);\n if (then) {\n microtask(function () {\n var wrapper = { done: false };\n try {\n call(then, value,\n bind(internalResolve, wrapper, state),\n bind(internalReject, wrapper, state)\n );\n } catch (error) {\n internalReject(wrapper, error, state);\n }\n });\n } else {\n state.value = value;\n state.state = FULFILLED;\n notify(state, false);\n }\n } catch (error) {\n internalReject({ done: false }, error, state);\n }\n};\n\n// constructor polyfill\nif (FORCED_PROMISE_CONSTRUCTOR) {\n // 25.4.3.1 Promise(executor)\n PromiseConstructor = function Promise(executor) {\n anInstance(this, PromisePrototype);\n aCallable(executor);\n call(Internal, this);\n var state = getInternalPromiseState(this);\n try {\n executor(bind(internalResolve, state), bind(internalReject, state));\n } catch (error) {\n internalReject(state, error);\n }\n };\n\n PromisePrototype = PromiseConstructor.prototype;\n\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n Internal = function Promise(executor) {\n setInternalState(this, {\n type: PROMISE,\n done: false,\n notified: false,\n parent: false,\n reactions: new Queue(),\n rejection: false,\n state: PENDING,\n value: undefined\n });\n };\n\n // `Promise.prototype.then` method\n // https://tc39.es/ecma262/#sec-promise.prototype.then\n Internal.prototype = defineBuiltIn(PromisePrototype, 'then', function then(onFulfilled, onRejected) {\n var state = getInternalPromiseState(this);\n var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));\n state.parent = true;\n reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;\n reaction.fail = isCallable(onRejected) && onRejected;\n reaction.domain = IS_NODE ? process.domain : undefined;\n if (state.state === PENDING) state.reactions.add(reaction);\n else microtask(function () {\n callReaction(reaction, state);\n });\n return reaction.promise;\n });\n\n OwnPromiseCapability = function () {\n var promise = new Internal();\n var state = getInternalPromiseState(promise);\n this.promise = promise;\n this.resolve = bind(internalResolve, state);\n this.reject = bind(internalReject, state);\n };\n\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === PromiseConstructor || C === PromiseWrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n\n if (!IS_PURE && isCallable(NativePromiseConstructor) && NativePromisePrototype !== Object.prototype) {\n nativeThen = NativePromisePrototype.then;\n\n if (!NATIVE_PROMISE_SUBCLASSING) {\n // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs\n defineBuiltIn(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {\n var that = this;\n return new PromiseConstructor(function (resolve, reject) {\n call(nativeThen, that, resolve, reject);\n }).then(onFulfilled, onRejected);\n // https://github.com/zloirock/core-js/issues/640\n }, { unsafe: true });\n }\n\n // make `.constructor === Promise` work for native promise-based APIs\n try {\n delete NativePromisePrototype.constructor;\n } catch (error) { /* empty */ }\n\n // make `instanceof Promise` work for native promise-based APIs\n if (setPrototypeOf) {\n setPrototypeOf(NativePromisePrototype, PromisePrototype);\n }\n }\n}\n\n$({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {\n Promise: PromiseConstructor\n});\n\nsetToStringTag(PromiseConstructor, PROMISE, false, true);\nsetSpecies(PROMISE);\n","'use strict';\n// TODO: Remove this module from `core-js@4` since it's split to modules listed below\nrequire('../modules/es.promise.constructor');\nrequire('../modules/es.promise.all');\nrequire('../modules/es.promise.catch');\nrequire('../modules/es.promise.race');\nrequire('../modules/es.promise.reject');\nrequire('../modules/es.promise.resolve');\n","'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar aCallable = require('../internals/a-callable');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar iterate = require('../internals/iterate');\nvar PROMISE_STATICS_INCORRECT_ITERATION = require('../internals/promise-statics-incorrect-iteration');\n\n// `Promise.race` method\n// https://tc39.es/ecma262/#sec-promise.race\n$({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapabilityModule.f(C);\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aCallable(C.resolve);\n iterate(iterable, function (promise) {\n call($promiseResolve, C, promise).then(capability.resolve, reject);\n });\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar FORCED_PROMISE_CONSTRUCTOR = require('../internals/promise-constructor-detection').CONSTRUCTOR;\n\n// `Promise.reject` method\n// https://tc39.es/ecma262/#sec-promise.reject\n$({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {\n reject: function reject(r) {\n var capability = newPromiseCapabilityModule.f(this);\n call(capability.reject, undefined, r);\n return capability.promise;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar IS_PURE = require('../internals/is-pure');\nvar NativePromiseConstructor = require('../internals/promise-native-constructor');\nvar FORCED_PROMISE_CONSTRUCTOR = require('../internals/promise-constructor-detection').CONSTRUCTOR;\nvar promiseResolve = require('../internals/promise-resolve');\n\nvar PromiseConstructorWrapper = getBuiltIn('Promise');\nvar CHECK_WRAPPER = IS_PURE && !FORCED_PROMISE_CONSTRUCTOR;\n\n// `Promise.resolve` method\n// https://tc39.es/ecma262/#sec-promise.resolve\n$({ target: 'Promise', stat: true, forced: IS_PURE || FORCED_PROMISE_CONSTRUCTOR }, {\n resolve: function resolve(x) {\n return promiseResolve(CHECK_WRAPPER && this === PromiseConstructorWrapper ? NativePromiseConstructor : this, x);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar apply = require('../internals/function-apply');\nvar bind = require('../internals/function-bind');\nvar aConstructor = require('../internals/a-constructor');\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar create = require('../internals/object-create');\nvar fails = require('../internals/fails');\n\nvar nativeConstruct = getBuiltIn('Reflect', 'construct');\nvar ObjectPrototype = Object.prototype;\nvar push = [].push;\n\n// `Reflect.construct` method\n// https://tc39.es/ecma262/#sec-reflect.construct\n// MS Edge supports only 2 arguments and argumentsList argument is optional\n// FF Nightly sets third argument as `new.target`, but does not create `this` from it\nvar NEW_TARGET_BUG = fails(function () {\n function F() { /* empty */ }\n return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F);\n});\n\nvar ARGS_BUG = !fails(function () {\n nativeConstruct(function () { /* empty */ });\n});\n\nvar FORCED = NEW_TARGET_BUG || ARGS_BUG;\n\n$({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, {\n construct: function construct(Target, args /* , newTarget */) {\n aConstructor(Target);\n anObject(args);\n var newTarget = arguments.length < 3 ? Target : aConstructor(arguments[2]);\n if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);\n if (Target === newTarget) {\n // w/o altered newTarget, optimization for 0-4 arguments\n switch (args.length) {\n case 0: return new Target();\n case 1: return new Target(args[0]);\n case 2: return new Target(args[0], args[1]);\n case 3: return new Target(args[0], args[1], args[2]);\n case 4: return new Target(args[0], args[1], args[2], args[3]);\n }\n // w/o altered newTarget, lot of arguments case\n var $args = [null];\n apply(push, $args, args);\n return new (apply(bind, Target, $args))();\n }\n // with altered newTarget, not support built-in constructors\n var proto = newTarget.prototype;\n var instance = create(isObject(proto) ? proto : ObjectPrototype);\n var result = apply(Target, instance, args);\n return isObject(result) ? result : instance;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar isObject = require('../internals/is-object');\nvar anObject = require('../internals/an-object');\nvar isDataDescriptor = require('../internals/is-data-descriptor');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\n\n// `Reflect.get` method\n// https://tc39.es/ecma262/#sec-reflect.get\nfunction get(target, propertyKey /* , receiver */) {\n var receiver = arguments.length < 3 ? target : arguments[2];\n var descriptor, prototype;\n if (anObject(target) === receiver) return target[propertyKey];\n descriptor = getOwnPropertyDescriptorModule.f(target, propertyKey);\n if (descriptor) return isDataDescriptor(descriptor)\n ? descriptor.value\n : descriptor.get === undefined ? undefined : call(descriptor.get, receiver);\n if (isObject(prototype = getPrototypeOf(target))) return get(prototype, propertyKey, receiver);\n}\n\n$({ target: 'Reflect', stat: true }, {\n get: get\n});\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar isForced = require('../internals/is-forced');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar isRegExp = require('../internals/is-regexp');\nvar toString = require('../internals/to-string');\nvar getRegExpFlags = require('../internals/regexp-get-flags');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar proxyAccessor = require('../internals/proxy-accessor');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar fails = require('../internals/fails');\nvar hasOwn = require('../internals/has-own-property');\nvar enforceInternalState = require('../internals/internal-state').enforce;\nvar setSpecies = require('../internals/set-species');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar UNSUPPORTED_DOT_ALL = require('../internals/regexp-unsupported-dot-all');\nvar UNSUPPORTED_NCG = require('../internals/regexp-unsupported-ncg');\n\nvar MATCH = wellKnownSymbol('match');\nvar NativeRegExp = global.RegExp;\nvar RegExpPrototype = NativeRegExp.prototype;\nvar SyntaxError = global.SyntaxError;\nvar exec = uncurryThis(RegExpPrototype.exec);\nvar charAt = uncurryThis(''.charAt);\nvar replace = uncurryThis(''.replace);\nvar stringIndexOf = uncurryThis(''.indexOf);\nvar stringSlice = uncurryThis(''.slice);\n// TODO: Use only proper RegExpIdentifierName\nvar IS_NCG = /^\\?<[^\\s\\d!#%&*+<=>@^][^\\s!#%&*+<=>@^]*>/;\nvar re1 = /a/g;\nvar re2 = /a/g;\n\n// \"new\" should create a new object, old webkit bug\nvar CORRECT_NEW = new NativeRegExp(re1) !== re1;\n\nvar MISSED_STICKY = stickyHelpers.MISSED_STICKY;\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;\n\nvar BASE_FORCED = DESCRIPTORS &&\n (!CORRECT_NEW || MISSED_STICKY || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG || fails(function () {\n re2[MATCH] = false;\n // RegExp constructor can alter flags and IsRegExp works correct with @@match\n return NativeRegExp(re1) !== re1 || NativeRegExp(re2) === re2 || String(NativeRegExp(re1, 'i')) !== '/a/i';\n }));\n\nvar handleDotAll = function (string) {\n var length = string.length;\n var index = 0;\n var result = '';\n var brackets = false;\n var chr;\n for (; index <= length; index++) {\n chr = charAt(string, index);\n if (chr === '\\\\') {\n result += chr + charAt(string, ++index);\n continue;\n }\n if (!brackets && chr === '.') {\n result += '[\\\\s\\\\S]';\n } else {\n if (chr === '[') {\n brackets = true;\n } else if (chr === ']') {\n brackets = false;\n } result += chr;\n }\n } return result;\n};\n\nvar handleNCG = function (string) {\n var length = string.length;\n var index = 0;\n var result = '';\n var named = [];\n var names = {};\n var brackets = false;\n var ncg = false;\n var groupid = 0;\n var groupname = '';\n var chr;\n for (; index <= length; index++) {\n chr = charAt(string, index);\n if (chr === '\\\\') {\n chr += charAt(string, ++index);\n } else if (chr === ']') {\n brackets = false;\n } else if (!brackets) switch (true) {\n case chr === '[':\n brackets = true;\n break;\n case chr === '(':\n if (exec(IS_NCG, stringSlice(string, index + 1))) {\n index += 2;\n ncg = true;\n }\n result += chr;\n groupid++;\n continue;\n case chr === '>' && ncg:\n if (groupname === '' || hasOwn(names, groupname)) {\n throw new SyntaxError('Invalid capture group name');\n }\n names[groupname] = true;\n named[named.length] = [groupname, groupid];\n ncg = false;\n groupname = '';\n continue;\n }\n if (ncg) groupname += chr;\n else result += chr;\n } return [result, named];\n};\n\n// `RegExp` constructor\n// https://tc39.es/ecma262/#sec-regexp-constructor\nif (isForced('RegExp', BASE_FORCED)) {\n var RegExpWrapper = function RegExp(pattern, flags) {\n var thisIsRegExp = isPrototypeOf(RegExpPrototype, this);\n var patternIsRegExp = isRegExp(pattern);\n var flagsAreUndefined = flags === undefined;\n var groups = [];\n var rawPattern = pattern;\n var rawFlags, dotAll, sticky, handled, result, state;\n\n if (!thisIsRegExp && patternIsRegExp && flagsAreUndefined && pattern.constructor === RegExpWrapper) {\n return pattern;\n }\n\n if (patternIsRegExp || isPrototypeOf(RegExpPrototype, pattern)) {\n pattern = pattern.source;\n if (flagsAreUndefined) flags = getRegExpFlags(rawPattern);\n }\n\n pattern = pattern === undefined ? '' : toString(pattern);\n flags = flags === undefined ? '' : toString(flags);\n rawPattern = pattern;\n\n if (UNSUPPORTED_DOT_ALL && 'dotAll' in re1) {\n dotAll = !!flags && stringIndexOf(flags, 's') > -1;\n if (dotAll) flags = replace(flags, /s/g, '');\n }\n\n rawFlags = flags;\n\n if (MISSED_STICKY && 'sticky' in re1) {\n sticky = !!flags && stringIndexOf(flags, 'y') > -1;\n if (sticky && UNSUPPORTED_Y) flags = replace(flags, /y/g, '');\n }\n\n if (UNSUPPORTED_NCG) {\n handled = handleNCG(pattern);\n pattern = handled[0];\n groups = handled[1];\n }\n\n result = inheritIfRequired(NativeRegExp(pattern, flags), thisIsRegExp ? this : RegExpPrototype, RegExpWrapper);\n\n if (dotAll || sticky || groups.length) {\n state = enforceInternalState(result);\n if (dotAll) {\n state.dotAll = true;\n state.raw = RegExpWrapper(handleDotAll(pattern), rawFlags);\n }\n if (sticky) state.sticky = true;\n if (groups.length) state.groups = groups;\n }\n\n if (pattern !== rawPattern) try {\n // fails in old engines, but we have no alternatives for unsupported regex syntax\n createNonEnumerableProperty(result, 'source', rawPattern === '' ? '(?:)' : rawPattern);\n } catch (error) { /* empty */ }\n\n return result;\n };\n\n for (var keys = getOwnPropertyNames(NativeRegExp), index = 0; keys.length > index;) {\n proxyAccessor(RegExpWrapper, NativeRegExp, keys[index++]);\n }\n\n RegExpPrototype.constructor = RegExpWrapper;\n RegExpWrapper.prototype = RegExpPrototype;\n defineBuiltIn(global, 'RegExp', RegExpWrapper, { constructor: true });\n}\n\n// https://tc39.es/ecma262/#sec-get-regexp-@@species\nsetSpecies('RegExp');\n","'use strict';\nvar $ = require('../internals/export');\nvar exec = require('../internals/regexp-exec');\n\n// `RegExp.prototype.exec` method\n// https://tc39.es/ecma262/#sec-regexp.prototype.exec\n$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {\n exec: exec\n});\n","'use strict';\nvar PROPER_FUNCTION_NAME = require('../internals/function-name').PROPER;\nvar defineBuiltIn = require('../internals/define-built-in');\nvar anObject = require('../internals/an-object');\nvar $toString = require('../internals/to-string');\nvar fails = require('../internals/fails');\nvar getRegExpFlags = require('../internals/regexp-get-flags');\n\nvar TO_STRING = 'toString';\nvar RegExpPrototype = RegExp.prototype;\nvar nativeToString = RegExpPrototype[TO_STRING];\n\nvar NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });\n// FF44- RegExp#toString has a wrong name\nvar INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;\n\n// `RegExp.prototype.toString` method\n// https://tc39.es/ecma262/#sec-regexp.prototype.tostring\nif (NOT_GENERIC || INCORRECT_NAME) {\n defineBuiltIn(RegExp.prototype, TO_STRING, function toString() {\n var R = anObject(this);\n var pattern = $toString(R.source);\n var flags = $toString(getRegExpFlags(R));\n return '/' + pattern + '/' + flags;\n }, { unsafe: true });\n}\n","'use strict';\nvar collection = require('../internals/collection');\nvar collectionStrong = require('../internals/collection-strong');\n\n// `Set` constructor\n// https://tc39.es/ecma262/#sec-set-objects\ncollection('Set', function (init) {\n return function Set() { return init(this, arguments.length ? arguments[0] : undefined); };\n}, collectionStrong);\n","'use strict';\n// TODO: Remove this module from `core-js@4` since it's replaced to module below\nrequire('../modules/es.set.constructor');\n","'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this-clause');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\nvar IS_PURE = require('../internals/is-pure');\n\n// eslint-disable-next-line es/no-string-prototype-endswith -- safe\nvar nativeEndsWith = uncurryThis(''.endsWith);\nvar slice = uncurryThis(''.slice);\nvar min = Math.min;\n\nvar CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('endsWith');\n// https://github.com/zloirock/core-js/pull/702\nvar MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {\n var descriptor = getOwnPropertyDescriptor(String.prototype, 'endsWith');\n return descriptor && !descriptor.writable;\n}();\n\n// `String.prototype.endsWith` method\n// https://tc39.es/ecma262/#sec-string.prototype.endswith\n$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {\n endsWith: function endsWith(searchString /* , endPosition = @length */) {\n var that = toString(requireObjectCoercible(this));\n notARegExp(searchString);\n var endPosition = arguments.length > 1 ? arguments[1] : undefined;\n var len = that.length;\n var end = endPosition === undefined ? len : min(toLength(endPosition), len);\n var search = toString(searchString);\n return nativeEndsWith\n ? nativeEndsWith(that, search, end)\n : slice(that, end - search.length, end) === search;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar toString = require('../internals/to-string');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\n\nvar stringIndexOf = uncurryThis(''.indexOf);\n\n// `String.prototype.includes` method\n// https://tc39.es/ecma262/#sec-string.prototype.includes\n$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {\n includes: function includes(searchString /* , position = 0 */) {\n return !!~stringIndexOf(\n toString(requireObjectCoercible(this)),\n toString(notARegExp(searchString)),\n arguments.length > 1 ? arguments[1] : undefined\n );\n }\n});\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\nvar toString = require('../internals/to-string');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/iterator-define');\nvar createIterResultObject = require('../internals/create-iter-result-object');\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n// `String.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-string.prototype-@@iterator\ndefineIterator(String, 'String', function (iterated) {\n setInternalState(this, {\n type: STRING_ITERATOR,\n string: toString(iterated),\n index: 0\n });\n// `%StringIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n var state = getInternalState(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return createIterResultObject(undefined, true);\n point = charAt(string, index);\n state.index += point.length;\n return createIterResultObject(point, false);\n});\n","'use strict';\nvar call = require('../internals/function-call');\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar getMethod = require('../internals/get-method');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@match logic\nfixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {\n return [\n // `String.prototype.match` method\n // https://tc39.es/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = requireObjectCoercible(this);\n var matcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, MATCH);\n return matcher ? call(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString(O));\n },\n // `RegExp.prototype[@@match]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@match\n function (string) {\n var rx = anObject(this);\n var S = toString(string);\n var res = maybeCallNative(nativeMatch, rx, S);\n\n if (res.done) return res.value;\n\n if (!rx.global) return regExpExec(rx, S);\n\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n while ((result = regExpExec(rx, S)) !== null) {\n var matchStr = toString(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n return n === 0 ? null : A;\n }\n ];\n});\n","'use strict';\nvar apply = require('../internals/function-apply');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar fails = require('../internals/fails');\nvar anObject = require('../internals/an-object');\nvar isCallable = require('../internals/is-callable');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar getMethod = require('../internals/get-method');\nvar getSubstitution = require('../internals/get-substitution');\nvar regExpExec = require('../internals/regexp-exec-abstract');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar REPLACE = wellKnownSymbol('replace');\nvar max = Math.max;\nvar min = Math.min;\nvar concat = uncurryThis([].concat);\nvar push = uncurryThis([].push);\nvar stringIndexOf = uncurryThis(''.indexOf);\nvar stringSlice = uncurryThis(''.slice);\n\nvar maybeToString = function (it) {\n return it === undefined ? it : String(it);\n};\n\n// IE <= 11 replaces $0 with the whole match, as if it was $&\n// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0\nvar REPLACE_KEEPS_$0 = (function () {\n // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing\n return 'a'.replace(/./, '$0') === '$0';\n})();\n\n// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string\nvar REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {\n if (/./[REPLACE]) {\n return /./[REPLACE]('a', '$0') === '';\n }\n return false;\n})();\n\nvar REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {\n var re = /./;\n re.exec = function () {\n var result = [];\n result.groups = { a: '7' };\n return result;\n };\n // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive\n return ''.replace(re, '$') !== '7';\n});\n\n// @@replace logic\nfixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {\n var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';\n\n return [\n // `String.prototype.replace` method\n // https://tc39.es/ecma262/#sec-string.prototype.replace\n function replace(searchValue, replaceValue) {\n var O = requireObjectCoercible(this);\n var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod(searchValue, REPLACE);\n return replacer\n ? call(replacer, searchValue, O, replaceValue)\n : call(nativeReplace, toString(O), searchValue, replaceValue);\n },\n // `RegExp.prototype[@@replace]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace\n function (string, replaceValue) {\n var rx = anObject(this);\n var S = toString(string);\n\n if (\n typeof replaceValue == 'string' &&\n stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&\n stringIndexOf(replaceValue, '$<') === -1\n ) {\n var res = maybeCallNative(nativeReplace, rx, S, replaceValue);\n if (res.done) return res.value;\n }\n\n var functionalReplace = isCallable(replaceValue);\n if (!functionalReplace) replaceValue = toString(replaceValue);\n\n var global = rx.global;\n var fullUnicode;\n if (global) {\n fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n }\n\n var results = [];\n var result;\n while (true) {\n result = regExpExec(rx, S);\n if (result === null) break;\n\n push(results, result);\n if (!global) break;\n\n var matchStr = toString(result[0]);\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n }\n\n var accumulatedResult = '';\n var nextSourcePosition = 0;\n for (var i = 0; i < results.length; i++) {\n result = results[i];\n\n var matched = toString(result[0]);\n var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);\n var captures = [];\n var replacement;\n // NOTE: This is equivalent to\n // captures = result.slice(1).map(maybeToString)\n // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));\n var namedCaptures = result.groups;\n if (functionalReplace) {\n var replacerArgs = concat([matched], captures, position, S);\n if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);\n replacement = toString(apply(replaceValue, undefined, replacerArgs));\n } else {\n replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n }\n if (position >= nextSourcePosition) {\n accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;\n nextSourcePosition = position + matched.length;\n }\n }\n\n return accumulatedResult + stringSlice(S, nextSourcePosition);\n }\n ];\n}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);\n","'use strict';\nvar call = require('../internals/function-call');\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar sameValue = require('../internals/same-value');\nvar toString = require('../internals/to-string');\nvar getMethod = require('../internals/get-method');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@search logic\nfixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {\n return [\n // `String.prototype.search` method\n // https://tc39.es/ecma262/#sec-string.prototype.search\n function search(regexp) {\n var O = requireObjectCoercible(this);\n var searcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, SEARCH);\n return searcher ? call(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString(O));\n },\n // `RegExp.prototype[@@search]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@search\n function (string) {\n var rx = anObject(this);\n var S = toString(string);\n var res = maybeCallNative(nativeSearch, rx, S);\n\n if (res.done) return res.value;\n\n var previousLastIndex = rx.lastIndex;\n if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;\n var result = regExpExec(rx, S);\n if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;\n return result === null ? -1 : result.index;\n }\n ];\n});\n","'use strict';\nvar apply = require('../internals/function-apply');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar isRegExp = require('../internals/is-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar speciesConstructor = require('../internals/species-constructor');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar getMethod = require('../internals/get-method');\nvar arraySlice = require('../internals/array-slice-simple');\nvar callRegExpExec = require('../internals/regexp-exec-abstract');\nvar regexpExec = require('../internals/regexp-exec');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar fails = require('../internals/fails');\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;\nvar MAX_UINT32 = 0xFFFFFFFF;\nvar min = Math.min;\nvar $push = [].push;\nvar exec = uncurryThis(/./.exec);\nvar push = uncurryThis($push);\nvar stringSlice = uncurryThis(''.slice);\n\n// Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n// Weex JS has frozen built-in prototypes, so use try / catch wrapper\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n var re = /(?:)/;\n var originalExec = re.exec;\n re.exec = function () { return originalExec.apply(this, arguments); };\n var result = 'ab'.split(re);\n return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';\n});\n\n// @@split logic\nfixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {\n var internalSplit;\n if (\n 'abbc'.split(/(b)*/)[1] === 'c' ||\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n 'test'.split(/(?:)/, -1).length !== 4 ||\n 'ab'.split(/(?:ab)*/).length !== 2 ||\n '.'.split(/(.?)(.?)/).length !== 4 ||\n // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing\n '.'.split(/()()/).length > 1 ||\n ''.split(/.?/).length\n ) {\n // based on es5-shim implementation, need to rework it\n internalSplit = function (separator, limit) {\n var string = toString(requireObjectCoercible(this));\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (separator === undefined) return [string];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) {\n return call(nativeSplit, string, separator, lim);\n }\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var match, lastIndex, lastLength;\n while (match = call(regexpExec, separatorCopy, string)) {\n lastIndex = separatorCopy.lastIndex;\n if (lastIndex > lastLastIndex) {\n push(output, stringSlice(string, lastLastIndex, match.index));\n if (match.length > 1 && match.index < string.length) apply($push, output, arraySlice(match, 1));\n lastLength = match[0].length;\n lastLastIndex = lastIndex;\n if (output.length >= lim) break;\n }\n if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop\n }\n if (lastLastIndex === string.length) {\n if (lastLength || !exec(separatorCopy, '')) push(output, '');\n } else push(output, stringSlice(string, lastLastIndex));\n return output.length > lim ? arraySlice(output, 0, lim) : output;\n };\n // Chakra, V8\n } else if ('0'.split(undefined, 0).length) {\n internalSplit = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : call(nativeSplit, this, separator, limit);\n };\n } else internalSplit = nativeSplit;\n\n return [\n // `String.prototype.split` method\n // https://tc39.es/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = requireObjectCoercible(this);\n var splitter = isNullOrUndefined(separator) ? undefined : getMethod(separator, SPLIT);\n return splitter\n ? call(splitter, separator, O, limit)\n : call(internalSplit, toString(O), separator, limit);\n },\n // `RegExp.prototype[@@split]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (string, limit) {\n var rx = anObject(this);\n var S = toString(string);\n var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);\n\n if (res.done) return res.value;\n\n var C = speciesConstructor(rx, RegExp);\n\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') +\n (rx.multiline ? 'm' : '') +\n (rx.unicode ? 'u' : '') +\n (UNSUPPORTED_Y ? 'g' : 'y');\n\n // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n while (q < S.length) {\n splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;\n var z = callRegExpExec(splitter, UNSUPPORTED_Y ? stringSlice(S, q) : S);\n var e;\n if (\n z === null ||\n (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p\n ) {\n q = advanceStringIndex(S, q, unicodeMatching);\n } else {\n push(A, stringSlice(S, p, q));\n if (A.length === lim) return A;\n for (var i = 1; i <= z.length - 1; i++) {\n push(A, z[i]);\n if (A.length === lim) return A;\n }\n q = p = e;\n }\n }\n push(A, stringSlice(S, p));\n return A;\n }\n ];\n}, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);\n","'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this-clause');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\nvar IS_PURE = require('../internals/is-pure');\n\n// eslint-disable-next-line es/no-string-prototype-startswith -- safe\nvar nativeStartsWith = uncurryThis(''.startsWith);\nvar stringSlice = uncurryThis(''.slice);\nvar min = Math.min;\n\nvar CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');\n// https://github.com/zloirock/core-js/pull/702\nvar MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {\n var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');\n return descriptor && !descriptor.writable;\n}();\n\n// `String.prototype.startsWith` method\n// https://tc39.es/ecma262/#sec-string.prototype.startswith\n$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {\n startsWith: function startsWith(searchString /* , position = 0 */) {\n var that = toString(requireObjectCoercible(this));\n notARegExp(searchString);\n var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));\n var search = toString(searchString);\n return nativeStartsWith\n ? nativeStartsWith(that, search, index)\n : stringSlice(that, index, index + search.length) === search;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $trim = require('../internals/string-trim').trim;\nvar forcedStringTrimMethod = require('../internals/string-trim-forced');\n\n// `String.prototype.trim` method\n// https://tc39.es/ecma262/#sec-string.prototype.trim\n$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {\n trim: function trim() {\n return $trim(this);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar IS_PURE = require('../internals/is-pure');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');\nvar fails = require('../internals/fails');\nvar hasOwn = require('../internals/has-own-property');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar anObject = require('../internals/an-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPropertyKey = require('../internals/to-property-key');\nvar $toString = require('../internals/to-string');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar nativeObjectCreate = require('../internals/object-create');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertyNamesExternal = require('../internals/object-get-own-property-names-external');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\nvar definePropertiesModule = require('../internals/object-define-properties');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar shared = require('../internals/shared');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar uid = require('../internals/uid');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar wrappedWellKnownSymbolModule = require('../internals/well-known-symbol-wrapped');\nvar defineWellKnownSymbol = require('../internals/well-known-symbol-define');\nvar defineSymbolToPrimitive = require('../internals/symbol-define-to-primitive');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar InternalStateModule = require('../internals/internal-state');\nvar $forEach = require('../internals/array-iteration').forEach;\n\nvar HIDDEN = sharedKey('hidden');\nvar SYMBOL = 'Symbol';\nvar PROTOTYPE = 'prototype';\n\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(SYMBOL);\n\nvar ObjectPrototype = Object[PROTOTYPE];\nvar $Symbol = global.Symbol;\nvar SymbolPrototype = $Symbol && $Symbol[PROTOTYPE];\nvar TypeError = global.TypeError;\nvar QObject = global.QObject;\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;\nvar nativePropertyIsEnumerable = propertyIsEnumerableModule.f;\nvar push = uncurryThis([].push);\n\nvar AllSymbols = shared('symbols');\nvar ObjectPrototypeSymbols = shared('op-symbols');\nvar WellKnownSymbolsStore = shared('wks');\n\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDescriptor = DESCRIPTORS && fails(function () {\n return nativeObjectCreate(nativeDefineProperty({}, 'a', {\n get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }\n })).a !== 7;\n}) ? function (O, P, Attributes) {\n var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);\n if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];\n nativeDefineProperty(O, P, Attributes);\n if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {\n nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);\n }\n} : nativeDefineProperty;\n\nvar wrap = function (tag, description) {\n var symbol = AllSymbols[tag] = nativeObjectCreate(SymbolPrototype);\n setInternalState(symbol, {\n type: SYMBOL,\n tag: tag,\n description: description\n });\n if (!DESCRIPTORS) symbol.description = description;\n return symbol;\n};\n\nvar $defineProperty = function defineProperty(O, P, Attributes) {\n if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);\n anObject(O);\n var key = toPropertyKey(P);\n anObject(Attributes);\n if (hasOwn(AllSymbols, key)) {\n if (!Attributes.enumerable) {\n if (!hasOwn(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));\n O[HIDDEN][key] = true;\n } else {\n if (hasOwn(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;\n Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });\n } return setSymbolDescriptor(O, key, Attributes);\n } return nativeDefineProperty(O, key, Attributes);\n};\n\nvar $defineProperties = function defineProperties(O, Properties) {\n anObject(O);\n var properties = toIndexedObject(Properties);\n var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));\n $forEach(keys, function (key) {\n if (!DESCRIPTORS || call($propertyIsEnumerable, properties, key)) $defineProperty(O, key, properties[key]);\n });\n return O;\n};\n\nvar $create = function create(O, Properties) {\n return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);\n};\n\nvar $propertyIsEnumerable = function propertyIsEnumerable(V) {\n var P = toPropertyKey(V);\n var enumerable = call(nativePropertyIsEnumerable, this, P);\n if (this === ObjectPrototype && hasOwn(AllSymbols, P) && !hasOwn(ObjectPrototypeSymbols, P)) return false;\n return enumerable || !hasOwn(this, P) || !hasOwn(AllSymbols, P) || hasOwn(this, HIDDEN) && this[HIDDEN][P]\n ? enumerable : true;\n};\n\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {\n var it = toIndexedObject(O);\n var key = toPropertyKey(P);\n if (it === ObjectPrototype && hasOwn(AllSymbols, key) && !hasOwn(ObjectPrototypeSymbols, key)) return;\n var descriptor = nativeGetOwnPropertyDescriptor(it, key);\n if (descriptor && hasOwn(AllSymbols, key) && !(hasOwn(it, HIDDEN) && it[HIDDEN][key])) {\n descriptor.enumerable = true;\n }\n return descriptor;\n};\n\nvar $getOwnPropertyNames = function getOwnPropertyNames(O) {\n var names = nativeGetOwnPropertyNames(toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (!hasOwn(AllSymbols, key) && !hasOwn(hiddenKeys, key)) push(result, key);\n });\n return result;\n};\n\nvar $getOwnPropertySymbols = function (O) {\n var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;\n var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (hasOwn(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || hasOwn(ObjectPrototype, key))) {\n push(result, AllSymbols[key]);\n }\n });\n return result;\n};\n\n// `Symbol` constructor\n// https://tc39.es/ecma262/#sec-symbol-constructor\nif (!NATIVE_SYMBOL) {\n $Symbol = function Symbol() {\n if (isPrototypeOf(SymbolPrototype, this)) throw TypeError('Symbol is not a constructor');\n var description = !arguments.length || arguments[0] === undefined ? undefined : $toString(arguments[0]);\n var tag = uid(description);\n var setter = function (value) {\n if (this === ObjectPrototype) call(setter, ObjectPrototypeSymbols, value);\n if (hasOwn(this, HIDDEN) && hasOwn(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));\n };\n if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });\n return wrap(tag, description);\n };\n\n SymbolPrototype = $Symbol[PROTOTYPE];\n\n defineBuiltIn(SymbolPrototype, 'toString', function toString() {\n return getInternalState(this).tag;\n });\n\n defineBuiltIn($Symbol, 'withoutSetter', function (description) {\n return wrap(uid(description), description);\n });\n\n propertyIsEnumerableModule.f = $propertyIsEnumerable;\n definePropertyModule.f = $defineProperty;\n definePropertiesModule.f = $defineProperties;\n getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;\n getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;\n getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;\n\n wrappedWellKnownSymbolModule.f = function (name) {\n return wrap(wellKnownSymbol(name), name);\n };\n\n if (DESCRIPTORS) {\n // https://github.com/tc39/proposal-Symbol-description\n defineBuiltInAccessor(SymbolPrototype, 'description', {\n configurable: true,\n get: function description() {\n return getInternalState(this).description;\n }\n });\n if (!IS_PURE) {\n defineBuiltIn(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });\n }\n }\n}\n\n$({ global: true, constructor: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {\n Symbol: $Symbol\n});\n\n$forEach(objectKeys(WellKnownSymbolsStore), function (name) {\n defineWellKnownSymbol(name);\n});\n\n$({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {\n useSetter: function () { USE_SETTER = true; },\n useSimple: function () { USE_SETTER = false; }\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {\n // `Object.create` method\n // https://tc39.es/ecma262/#sec-object.create\n create: $create,\n // `Object.defineProperty` method\n // https://tc39.es/ecma262/#sec-object.defineproperty\n defineProperty: $defineProperty,\n // `Object.defineProperties` method\n // https://tc39.es/ecma262/#sec-object.defineproperties\n defineProperties: $defineProperties,\n // `Object.getOwnPropertyDescriptor` method\n // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {\n // `Object.getOwnPropertyNames` method\n // https://tc39.es/ecma262/#sec-object.getownpropertynames\n getOwnPropertyNames: $getOwnPropertyNames\n});\n\n// `Symbol.prototype[@@toPrimitive]` method\n// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive\ndefineSymbolToPrimitive();\n\n// `Symbol.prototype[@@toStringTag]` property\n// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag\nsetToStringTag($Symbol, SYMBOL);\n\nhiddenKeys[HIDDEN] = true;\n","// `Symbol.prototype.description` getter\n// https://tc39.es/ecma262/#sec-symbol.prototype.description\n'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar hasOwn = require('../internals/has-own-property');\nvar isCallable = require('../internals/is-callable');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar toString = require('../internals/to-string');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\n\nvar NativeSymbol = global.Symbol;\nvar SymbolPrototype = NativeSymbol && NativeSymbol.prototype;\n\nif (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototype) ||\n // Safari 12 bug\n NativeSymbol().description !== undefined\n)) {\n var EmptyStringDescriptionStore = {};\n // wrap Symbol constructor for correct work with undefined description\n var SymbolWrapper = function Symbol() {\n var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString(arguments[0]);\n var result = isPrototypeOf(SymbolPrototype, this)\n ? new NativeSymbol(description)\n // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'\n : description === undefined ? NativeSymbol() : NativeSymbol(description);\n if (description === '') EmptyStringDescriptionStore[result] = true;\n return result;\n };\n\n copyConstructorProperties(SymbolWrapper, NativeSymbol);\n SymbolWrapper.prototype = SymbolPrototype;\n SymbolPrototype.constructor = SymbolWrapper;\n\n var NATIVE_SYMBOL = String(NativeSymbol('description detection')) === 'Symbol(description detection)';\n var thisSymbolValue = uncurryThis(SymbolPrototype.valueOf);\n var symbolDescriptiveString = uncurryThis(SymbolPrototype.toString);\n var regexp = /^Symbol\\((.*)\\)[^)]+$/;\n var replace = uncurryThis(''.replace);\n var stringSlice = uncurryThis(''.slice);\n\n defineBuiltInAccessor(SymbolPrototype, 'description', {\n configurable: true,\n get: function description() {\n var symbol = thisSymbolValue(this);\n if (hasOwn(EmptyStringDescriptionStore, symbol)) return '';\n var string = symbolDescriptiveString(symbol);\n var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1');\n return desc === '' ? undefined : desc;\n }\n });\n\n $({ global: true, constructor: true, forced: true }, {\n Symbol: SymbolWrapper\n });\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar hasOwn = require('../internals/has-own-property');\nvar toString = require('../internals/to-string');\nvar shared = require('../internals/shared');\nvar NATIVE_SYMBOL_REGISTRY = require('../internals/symbol-registry-detection');\n\nvar StringToSymbolRegistry = shared('string-to-symbol-registry');\nvar SymbolToStringRegistry = shared('symbol-to-string-registry');\n\n// `Symbol.for` method\n// https://tc39.es/ecma262/#sec-symbol.for\n$({ target: 'Symbol', stat: true, forced: !NATIVE_SYMBOL_REGISTRY }, {\n 'for': function (key) {\n var string = toString(key);\n if (hasOwn(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];\n var symbol = getBuiltIn('Symbol')(string);\n StringToSymbolRegistry[string] = symbol;\n SymbolToStringRegistry[symbol] = string;\n return symbol;\n }\n});\n","'use strict';\nvar defineWellKnownSymbol = require('../internals/well-known-symbol-define');\n\n// `Symbol.iterator` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.iterator\ndefineWellKnownSymbol('iterator');\n","'use strict';\n// TODO: Remove this module from `core-js@4` since it's split to modules listed below\nrequire('../modules/es.symbol.constructor');\nrequire('../modules/es.symbol.for');\nrequire('../modules/es.symbol.key-for');\nrequire('../modules/es.json.stringify');\nrequire('../modules/es.object.get-own-property-symbols');\n","'use strict';\nvar $ = require('../internals/export');\nvar hasOwn = require('../internals/has-own-property');\nvar isSymbol = require('../internals/is-symbol');\nvar tryToString = require('../internals/try-to-string');\nvar shared = require('../internals/shared');\nvar NATIVE_SYMBOL_REGISTRY = require('../internals/symbol-registry-detection');\n\nvar SymbolToStringRegistry = shared('symbol-to-string-registry');\n\n// `Symbol.keyFor` method\n// https://tc39.es/ecma262/#sec-symbol.keyfor\n$({ target: 'Symbol', stat: true, forced: !NATIVE_SYMBOL_REGISTRY }, {\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(tryToString(sym) + ' is not a symbol');\n if (hasOwn(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];\n }\n});\n","'use strict';\nvar FREEZING = require('../internals/freezing');\nvar global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar defineBuiltIns = require('../internals/define-built-ins');\nvar InternalMetadataModule = require('../internals/internal-metadata');\nvar collection = require('../internals/collection');\nvar collectionWeak = require('../internals/collection-weak');\nvar isObject = require('../internals/is-object');\nvar enforceInternalState = require('../internals/internal-state').enforce;\nvar fails = require('../internals/fails');\nvar NATIVE_WEAK_MAP = require('../internals/weak-map-basic-detection');\n\nvar $Object = Object;\n// eslint-disable-next-line es/no-array-isarray -- safe\nvar isArray = Array.isArray;\n// eslint-disable-next-line es/no-object-isextensible -- safe\nvar isExtensible = $Object.isExtensible;\n// eslint-disable-next-line es/no-object-isfrozen -- safe\nvar isFrozen = $Object.isFrozen;\n// eslint-disable-next-line es/no-object-issealed -- safe\nvar isSealed = $Object.isSealed;\n// eslint-disable-next-line es/no-object-freeze -- safe\nvar freeze = $Object.freeze;\n// eslint-disable-next-line es/no-object-seal -- safe\nvar seal = $Object.seal;\n\nvar FROZEN = {};\nvar SEALED = {};\nvar IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;\nvar InternalWeakMap;\n\nvar wrapper = function (init) {\n return function WeakMap() {\n return init(this, arguments.length ? arguments[0] : undefined);\n };\n};\n\n// `WeakMap` constructor\n// https://tc39.es/ecma262/#sec-weakmap-constructor\nvar $WeakMap = collection('WeakMap', wrapper, collectionWeak);\nvar WeakMapPrototype = $WeakMap.prototype;\nvar nativeSet = uncurryThis(WeakMapPrototype.set);\n\n// Chakra Edge bug: adding frozen arrays to WeakMap unfreeze them\nvar hasMSEdgeFreezingBug = function () {\n return FREEZING && fails(function () {\n var frozenArray = freeze([]);\n nativeSet(new $WeakMap(), frozenArray, 1);\n return !isFrozen(frozenArray);\n });\n};\n\n// IE11 WeakMap frozen keys fix\n// We can't use feature detection because it crash some old IE builds\n// https://github.com/zloirock/core-js/issues/485\nif (NATIVE_WEAK_MAP) if (IS_IE11) {\n InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true);\n InternalMetadataModule.enable();\n var nativeDelete = uncurryThis(WeakMapPrototype['delete']);\n var nativeHas = uncurryThis(WeakMapPrototype.has);\n var nativeGet = uncurryThis(WeakMapPrototype.get);\n defineBuiltIns(WeakMapPrototype, {\n 'delete': function (key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceInternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeDelete(this, key) || state.frozen['delete'](key);\n } return nativeDelete(this, key);\n },\n has: function has(key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceInternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeHas(this, key) || state.frozen.has(key);\n } return nativeHas(this, key);\n },\n get: function get(key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceInternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeHas(this, key) ? nativeGet(this, key) : state.frozen.get(key);\n } return nativeGet(this, key);\n },\n set: function set(key, value) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceInternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n nativeHas(this, key) ? nativeSet(this, key, value) : state.frozen.set(key, value);\n } else nativeSet(this, key, value);\n return this;\n }\n });\n// Chakra Edge frozen keys fix\n} else if (hasMSEdgeFreezingBug()) {\n defineBuiltIns(WeakMapPrototype, {\n set: function set(key, value) {\n var arrayIntegrityLevel;\n if (isArray(key)) {\n if (isFrozen(key)) arrayIntegrityLevel = FROZEN;\n else if (isSealed(key)) arrayIntegrityLevel = SEALED;\n }\n nativeSet(this, key, value);\n if (arrayIntegrityLevel === FROZEN) freeze(key);\n if (arrayIntegrityLevel === SEALED) seal(key);\n return this;\n }\n });\n}\n","'use strict';\n// TODO: Remove this module from `core-js@4` since it's replaced to module below\nrequire('../modules/es.weak-map.constructor');\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar clearImmediate = require('../internals/task').clear;\n\n// `clearImmediate` method\n// http://w3c.github.io/setImmediate/#si-clearImmediate\n$({ global: true, bind: true, enumerable: true, forced: global.clearImmediate !== clearImmediate }, {\n clearImmediate: clearImmediate\n});\n","'use strict';\nvar global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar DOMTokenListPrototype = require('../internals/dom-token-list-prototype');\nvar forEach = require('../internals/array-for-each');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar handlePrototype = function (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {\n createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);\n } catch (error) {\n CollectionPrototype.forEach = forEach;\n }\n};\n\nfor (var COLLECTION_NAME in DOMIterables) {\n if (DOMIterables[COLLECTION_NAME]) {\n handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype);\n }\n}\n\nhandlePrototype(DOMTokenListPrototype);\n","'use strict';\nvar global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar DOMTokenListPrototype = require('../internals/dom-token-list-prototype');\nvar ArrayIteratorMethods = require('../modules/es.array.iterator');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar ArrayValues = ArrayIteratorMethods.values;\n\nvar handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {\n if (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[ITERATOR] !== ArrayValues) try {\n createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);\n } catch (error) {\n CollectionPrototype[ITERATOR] = ArrayValues;\n }\n if (!CollectionPrototype[TO_STRING_TAG]) {\n createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);\n }\n if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {\n createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);\n } catch (error) {\n CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];\n }\n }\n }\n};\n\nfor (var COLLECTION_NAME in DOMIterables) {\n handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype, COLLECTION_NAME);\n}\n\nhandlePrototype(DOMTokenListPrototype, 'DOMTokenList');\n","'use strict';\n// TODO: Remove this module from `core-js@4` since it's split to modules listed below\nrequire('../modules/web.clear-immediate');\nrequire('../modules/web.set-immediate');\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar setTask = require('../internals/task').set;\nvar schedulersFix = require('../internals/schedulers-fix');\n\n// https://github.com/oven-sh/bun/issues/1633\nvar setImmediate = global.setImmediate ? schedulersFix(setTask, false) : setTask;\n\n// `setImmediate` method\n// http://w3c.github.io/setImmediate/#si-setImmediate\n$({ global: true, bind: true, enumerable: true, forced: global.setImmediate !== setImmediate }, {\n setImmediate: setImmediate\n});\n","'use strict'\n\nmodule.exports = require('./colors.json')\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(n); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction filterUniqueArray(arr) {\n return arr.filter(function (val, index) {\n return arr.lastIndexOf(val) === index;\n });\n}\n\nexport default function assignStyle(base) {\n for (var i = 0, len = arguments.length <= 1 ? 0 : arguments.length - 1; i < len; ++i) {\n var style = i + 1 < 1 || arguments.length <= i + 1 ? undefined : arguments[i + 1];\n\n for (var property in style) {\n var value = style[property];\n var baseValue = base[property];\n\n if (baseValue && value) {\n if (Array.isArray(baseValue)) {\n base[property] = filterUniqueArray(baseValue.concat(value));\n continue;\n }\n\n if (Array.isArray(value)) {\n base[property] = filterUniqueArray([baseValue].concat(_toConsumableArray(value)));\n continue;\n }\n\n if (_typeof(value) === 'object') {\n base[property] = assignStyle({}, baseValue, value);\n continue;\n }\n }\n\n base[property] = value;\n }\n }\n\n return base;\n}","var DASH = /-([a-z])/g;\nvar MS = /^Ms/g;\nvar cache = {};\n\nfunction toUpper(match) {\n return match[1].toUpperCase();\n}\n\nexport default function camelCaseProperty(property) {\n if (cache.hasOwnProperty(property)) {\n return cache[property];\n }\n\n var camelProp = property.replace(DASH, toUpper).replace(MS, 'ms');\n cache[property] = camelProp;\n return camelProp;\n}","import hyphenateProperty from './hyphenateProperty';\nexport default function cssifyDeclaration(property, value) {\n return hyphenateProperty(property) + ':' + value;\n}","import cssifyDeclaration from './cssifyDeclaration';\nexport default function cssifyObject(style) {\n var css = '';\n\n for (var property in style) {\n var value = style[property];\n\n if (typeof value !== 'string' && typeof value !== 'number') {\n continue;\n } // prevents the semicolon after\n // the last rule declaration\n\n\n if (css) {\n css += ';';\n }\n\n css += cssifyDeclaration(property, value);\n }\n\n return css;\n}","import hyphenateStyleName from 'hyphenate-style-name';\nexport default function hyphenateProperty(property) {\n return hyphenateStyleName(property);\n}","import assignStyle from './assignStyle';\nimport camelCaseProperty from './camelCaseProperty';\nimport cssifyDeclaration from './cssifyDeclaration';\nimport cssifyObject from './cssifyObject';\nimport hyphenateProperty from './hyphenateProperty';\nimport isPrefixedProperty from './isPrefixedProperty';\nimport isPrefixedValue from './isPrefixedValue';\nimport isUnitlessProperty from './isUnitlessProperty';\nimport normalizeProperty from './normalizeProperty';\nimport resolveArrayValue from './resolveArrayValue';\nimport unprefixProperty from './unprefixProperty';\nimport unprefixValue from './unprefixValue';\nexport { assignStyle, camelCaseProperty, cssifyDeclaration, cssifyObject, hyphenateProperty, isPrefixedProperty, isPrefixedValue, isUnitlessProperty, normalizeProperty, resolveArrayValue, unprefixProperty, unprefixValue };","var RE = /^(Webkit|Moz|O|ms)/;\nexport default function isPrefixedProperty(property) {\n return RE.test(property);\n}","var RE = /-webkit-|-moz-|-ms-/;\nexport default function isPrefixedValue(value) {\n return typeof value === 'string' && RE.test(value);\n}","import hyphenateProperty from './hyphenateProperty';\nvar unitlessProperties = {\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n fontWeight: true,\n lineHeight: true,\n opacity: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zIndex: true,\n zoom: true,\n // SVG-related properties\n fillOpacity: true,\n floodOpacity: true,\n stopOpacity: true,\n strokeDasharray: true,\n strokeDashoffset: true,\n strokeMiterlimit: true,\n strokeOpacity: true,\n strokeWidth: true\n};\nvar prefixedUnitlessProperties = ['animationIterationCount', 'boxFlex', 'boxFlexGroup', 'boxOrdinalGroup', 'columnCount', 'flex', 'flexGrow', 'flexPositive', 'flexShrink', 'flexNegative', 'flexOrder', 'gridColumn', 'gridColumnEnd', 'gridColumnStart', 'gridRow', 'gridRowEnd', 'gridRowStart', 'lineClamp', 'order'];\nvar prefixes = ['Webkit', 'ms', 'Moz', 'O'];\n\nfunction getPrefixedProperty(prefix, property) {\n return prefix + property.charAt(0).toUpperCase() + property.slice(1);\n} // add all prefixed properties to the unitless properties\n\n\nfor (var i = 0, len = prefixedUnitlessProperties.length; i < len; ++i) {\n var property = prefixedUnitlessProperties[i];\n unitlessProperties[property] = true;\n\n for (var j = 0, jLen = prefixes.length; j < jLen; ++j) {\n unitlessProperties[getPrefixedProperty(prefixes[j], property)] = true;\n }\n} // add all hypenated properties as well\n\n\nfor (var _property in unitlessProperties) {\n unitlessProperties[hyphenateProperty(_property)] = true;\n}\n\nexport default function isUnitlessProperty(property) {\n return unitlessProperties.hasOwnProperty(property);\n}","import camelCaseProperty from './camelCaseProperty';\nimport unprefixProperty from './unprefixProperty';\nexport default function normalizeProperty(property) {\n return unprefixProperty(camelCaseProperty(property));\n}","import hyphenateProperty from './hyphenateProperty';\nexport default function resolveArrayValue(property, value) {\n return value.join(';' + hyphenateProperty(property) + ':');\n}","var RE = /^(ms|Webkit|Moz|O)/;\nexport default function unprefixProperty(property) {\n var propertyWithoutPrefix = property.replace(RE, '');\n return propertyWithoutPrefix.charAt(0).toLowerCase() + propertyWithoutPrefix.slice(1);\n}","var RE = /(-ms-|-webkit-|-moz-|-o-)/g;\nexport default function unprefixValue(value) {\n if (typeof value === 'string') {\n return value.replace(RE, '');\n }\n\n return value;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = hyphenateProperty;\n\nvar _hyphenateStyleName = require(\"hyphenate-style-name\");\n\nvar _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction hyphenateProperty(property) {\n return (0, _hyphenateStyleName2[\"default\"])(property);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = isPrefixedValue;\nvar RE = /-webkit-|-moz-|-ms-/;\n\nfunction isPrefixedValue(value) {\n return typeof value === 'string' && RE.test(value);\n}","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopDefault(ex) {\n return ex && typeof ex === 'object' && 'default' in ex ? ex['default'] : ex;\n}\n\nvar parse = require('postcss-value-parser');\n\nvar parse__default = _interopDefault(parse);\n\nvar camelizeStyleName = _interopDefault(require('camelize'));\n\nvar cssColorKeywords = _interopDefault(require('css-color-keywords'));\n\nvar matchString = function matchString(node) {\n if (node.type !== 'string') return null;\n return node.value.replace(/\\\\([0-9a-f]{1,6})(?:\\s|$)/gi, function (match, charCode) {\n return String.fromCharCode(parseInt(charCode, 16));\n }).replace(/\\\\/g, '');\n};\n\nvar hexColorRe = /^(#(?:[0-9a-f]{3,4}){1,2})$/i;\nvar cssFunctionNameRe = /^(rgba?|hsla?|hwb|lab|lch|gray|color)$/;\n\nvar matchColor = function matchColor(node) {\n if (node.type === 'word' && (hexColorRe.test(node.value) || node.value in cssColorKeywords || node.value === 'transparent')) {\n return node.value;\n } else if (node.type === 'function' && cssFunctionNameRe.test(node.value)) {\n return parse.stringify(node);\n }\n\n return null;\n};\n\nvar noneRe = /^(none)$/i;\nvar autoRe = /^(auto)$/i;\nvar identRe = /(^-?[_a-z][_a-z0-9-]*$)/i; // Note if these are wrong, you'll need to change index.js too\n\nvar numberRe = /^([+-]?(?:\\d*\\.)?\\d+(?:e[+-]?\\d+)?)$/i; // Note lengthRe is sneaky: you can omit units for 0\n\nvar lengthRe = /^(0$|(?:[+-]?(?:\\d*\\.)?\\d+(?:e[+-]?\\d+)?)(?=px$))/i;\nvar unsupportedUnitRe = /^([+-]?(?:\\d*\\.)?\\d+(?:e[+-]?\\d+)?(ch|em|ex|rem|vh|vw|vmin|vmax|cm|mm|in|pc|pt))$/i;\nvar angleRe = /^([+-]?(?:\\d*\\.)?\\d+(?:e[+-]?\\d+)?(?:deg|rad))$/i;\nvar percentRe = /^([+-]?(?:\\d*\\.)?\\d+(?:e[+-]?\\d+)?%)$/i;\n\nvar noopToken = function noopToken(predicate) {\n return function (node) {\n return predicate(node) ? '' : null;\n };\n};\n\nvar valueForTypeToken = function valueForTypeToken(type) {\n return function (node) {\n return node.type === type ? node.value : null;\n };\n};\n\nvar regExpToken = function regExpToken(regExp, transform) {\n if (transform === void 0) {\n transform = String;\n }\n\n return function (node) {\n if (node.type !== 'word') return null;\n var match = node.value.match(regExp);\n if (match === null) return null;\n var value = transform(match[1]);\n return value;\n };\n};\n\nvar SPACE = noopToken(function (node) {\n return node.type === 'space';\n});\nvar SLASH = noopToken(function (node) {\n return node.type === 'div' && node.value === '/';\n});\nvar COMMA = noopToken(function (node) {\n return node.type === 'div' && node.value === ',';\n});\nvar WORD = valueForTypeToken('word');\nvar NONE = regExpToken(noneRe);\nvar AUTO = regExpToken(autoRe);\nvar NUMBER = regExpToken(numberRe, Number);\nvar LENGTH = regExpToken(lengthRe, Number);\nvar UNSUPPORTED_LENGTH_UNIT = regExpToken(unsupportedUnitRe);\nvar ANGLE = regExpToken(angleRe, function (angle) {\n return angle.toLowerCase();\n});\nvar PERCENT = regExpToken(percentRe);\nvar IDENT = regExpToken(identRe);\nvar STRING = matchString;\nvar COLOR = matchColor;\nvar LINE = regExpToken(/^(none|underline|line-through)$/i);\n\nvar aspectRatio = function aspectRatio(tokenStream) {\n var aspectRatio = tokenStream.expect(NUMBER);\n\n if (tokenStream.hasTokens()) {\n tokenStream.expect(SLASH);\n aspectRatio /= tokenStream.expect(NUMBER);\n }\n\n return {\n aspectRatio: aspectRatio\n };\n};\n\nvar BORDER_STYLE = regExpToken(/^(solid|dashed|dotted)$/);\nvar defaultBorderWidth = 1;\nvar defaultBorderColor = 'black';\nvar defaultBorderStyle = 'solid';\n\nvar border = function border(tokenStream) {\n var borderWidth;\n var borderColor;\n var borderStyle;\n\n if (tokenStream.matches(NONE)) {\n tokenStream.expectEmpty();\n return {\n borderWidth: 0,\n borderColor: 'black',\n borderStyle: 'solid'\n };\n }\n\n var partsParsed = 0;\n\n while (partsParsed < 3 && tokenStream.hasTokens()) {\n if (partsParsed !== 0) tokenStream.expect(SPACE);\n\n if (borderWidth === undefined && tokenStream.matches(LENGTH, UNSUPPORTED_LENGTH_UNIT)) {\n borderWidth = tokenStream.lastValue;\n } else if (borderColor === undefined && tokenStream.matches(COLOR)) {\n borderColor = tokenStream.lastValue;\n } else if (borderStyle === undefined && tokenStream.matches(BORDER_STYLE)) {\n borderStyle = tokenStream.lastValue;\n } else {\n tokenStream[\"throw\"]();\n }\n\n partsParsed += 1;\n }\n\n tokenStream.expectEmpty();\n if (borderWidth === undefined) borderWidth = defaultBorderWidth;\n if (borderColor === undefined) borderColor = defaultBorderColor;\n if (borderStyle === undefined) borderStyle = defaultBorderStyle;\n return {\n borderWidth: borderWidth,\n borderColor: borderColor,\n borderStyle: borderStyle\n };\n};\n\nvar directionFactory = function directionFactory(_ref) {\n var _ref$types = _ref.types,\n types = _ref$types === void 0 ? [LENGTH, UNSUPPORTED_LENGTH_UNIT, PERCENT] : _ref$types,\n _ref$directions = _ref.directions,\n directions = _ref$directions === void 0 ? ['Top', 'Right', 'Bottom', 'Left'] : _ref$directions,\n _ref$prefix = _ref.prefix,\n prefix = _ref$prefix === void 0 ? '' : _ref$prefix,\n _ref$suffix = _ref.suffix,\n suffix = _ref$suffix === void 0 ? '' : _ref$suffix;\n return function (tokenStream) {\n var _ref2;\n\n var values = []; // borderWidth doesn't currently allow a percent value, but may do in the future\n\n values.push(tokenStream.expect.apply(tokenStream, types));\n\n while (values.length < 4 && tokenStream.hasTokens()) {\n tokenStream.expect(SPACE);\n values.push(tokenStream.expect.apply(tokenStream, types));\n }\n\n tokenStream.expectEmpty();\n var top = values[0],\n _values$ = values[1],\n right = _values$ === void 0 ? top : _values$,\n _values$2 = values[2],\n bottom = _values$2 === void 0 ? top : _values$2,\n _values$3 = values[3],\n left = _values$3 === void 0 ? right : _values$3;\n\n var keyFor = function keyFor(n) {\n return \"\" + prefix + directions[n] + suffix;\n };\n\n return _ref2 = {}, _ref2[keyFor(0)] = top, _ref2[keyFor(1)] = right, _ref2[keyFor(2)] = bottom, _ref2[keyFor(3)] = left, _ref2;\n };\n};\n\nvar parseShadowOffset = function parseShadowOffset(tokenStream) {\n var width = tokenStream.expect(LENGTH);\n var height = tokenStream.matches(SPACE) ? tokenStream.expect(LENGTH) : width;\n tokenStream.expectEmpty();\n return {\n width: width,\n height: height\n };\n};\n\nvar parseShadow = function parseShadow(tokenStream) {\n var offsetX;\n var offsetY;\n var radius;\n var color;\n\n if (tokenStream.matches(NONE)) {\n tokenStream.expectEmpty();\n return {\n offset: {\n width: 0,\n height: 0\n },\n radius: 0,\n color: 'black'\n };\n }\n\n var didParseFirst = false;\n\n while (tokenStream.hasTokens()) {\n if (didParseFirst) tokenStream.expect(SPACE);\n\n if (offsetX === undefined && tokenStream.matches(LENGTH, UNSUPPORTED_LENGTH_UNIT)) {\n offsetX = tokenStream.lastValue;\n tokenStream.expect(SPACE);\n offsetY = tokenStream.expect(LENGTH, UNSUPPORTED_LENGTH_UNIT);\n tokenStream.saveRewindPoint();\n\n if (tokenStream.matches(SPACE) && tokenStream.matches(LENGTH, UNSUPPORTED_LENGTH_UNIT)) {\n radius = tokenStream.lastValue;\n } else {\n tokenStream.rewind();\n }\n } else if (color === undefined && tokenStream.matches(COLOR)) {\n color = tokenStream.lastValue;\n } else {\n tokenStream[\"throw\"]();\n }\n\n didParseFirst = true;\n }\n\n if (offsetX === undefined) tokenStream[\"throw\"]();\n return {\n offset: {\n width: offsetX,\n height: offsetY\n },\n radius: radius !== undefined ? radius : 0,\n color: color !== undefined ? color : 'black'\n };\n};\n\nvar boxShadow = function boxShadow(tokenStream) {\n var _parseShadow = parseShadow(tokenStream),\n offset = _parseShadow.offset,\n radius = _parseShadow.radius,\n color = _parseShadow.color;\n\n return {\n shadowOffset: offset,\n shadowRadius: radius,\n shadowColor: color,\n shadowOpacity: 1\n };\n};\n\nvar defaultFlexGrow = 1;\nvar defaultFlexShrink = 1;\nvar defaultFlexBasis = 0;\n\nvar flex = function flex(tokenStream) {\n var flexGrow;\n var flexShrink;\n var flexBasis;\n\n if (tokenStream.matches(NONE)) {\n tokenStream.expectEmpty();\n return {\n flexGrow: 0,\n flexShrink: 0,\n flexBasis: 'auto'\n };\n }\n\n tokenStream.saveRewindPoint();\n\n if (tokenStream.matches(AUTO) && !tokenStream.hasTokens()) {\n return {\n flexGrow: 1,\n flexShrink: 1,\n flexBasis: 'auto'\n };\n }\n\n tokenStream.rewind();\n var partsParsed = 0;\n\n while (partsParsed < 2 && tokenStream.hasTokens()) {\n if (partsParsed !== 0) tokenStream.expect(SPACE);\n\n if (flexGrow === undefined && tokenStream.matches(NUMBER)) {\n flexGrow = tokenStream.lastValue;\n tokenStream.saveRewindPoint();\n\n if (tokenStream.matches(SPACE) && tokenStream.matches(NUMBER)) {\n flexShrink = tokenStream.lastValue;\n } else {\n tokenStream.rewind();\n }\n } else if (flexBasis === undefined && tokenStream.matches(LENGTH, UNSUPPORTED_LENGTH_UNIT, PERCENT)) {\n flexBasis = tokenStream.lastValue;\n } else if (flexBasis === undefined && tokenStream.matches(AUTO)) {\n flexBasis = 'auto';\n } else {\n tokenStream[\"throw\"]();\n }\n\n partsParsed += 1;\n }\n\n tokenStream.expectEmpty();\n if (flexGrow === undefined) flexGrow = defaultFlexGrow;\n if (flexShrink === undefined) flexShrink = defaultFlexShrink;\n if (flexBasis === undefined) flexBasis = defaultFlexBasis;\n return {\n flexGrow: flexGrow,\n flexShrink: flexShrink,\n flexBasis: flexBasis\n };\n};\n\nvar FLEX_WRAP = regExpToken(/(nowrap|wrap|wrap-reverse)/);\nvar FLEX_DIRECTION = regExpToken(/(row|row-reverse|column|column-reverse)/);\nvar defaultFlexWrap = 'nowrap';\nvar defaultFlexDirection = 'row';\n\nvar flexFlow = function flexFlow(tokenStream) {\n var flexWrap;\n var flexDirection;\n var partsParsed = 0;\n\n while (partsParsed < 2 && tokenStream.hasTokens()) {\n if (partsParsed !== 0) tokenStream.expect(SPACE);\n\n if (flexWrap === undefined && tokenStream.matches(FLEX_WRAP)) {\n flexWrap = tokenStream.lastValue;\n } else if (flexDirection === undefined && tokenStream.matches(FLEX_DIRECTION)) {\n flexDirection = tokenStream.lastValue;\n } else {\n tokenStream[\"throw\"]();\n }\n\n partsParsed += 1;\n }\n\n tokenStream.expectEmpty();\n if (flexWrap === undefined) flexWrap = defaultFlexWrap;\n if (flexDirection === undefined) flexDirection = defaultFlexDirection;\n return {\n flexWrap: flexWrap,\n flexDirection: flexDirection\n };\n};\n\nvar fontFamily = function fontFamily(tokenStream) {\n var fontFamily;\n\n if (tokenStream.matches(STRING)) {\n fontFamily = tokenStream.lastValue;\n } else {\n fontFamily = tokenStream.expect(IDENT);\n\n while (tokenStream.hasTokens()) {\n tokenStream.expect(SPACE);\n var nextIdent = tokenStream.expect(IDENT);\n fontFamily += \" \" + nextIdent;\n }\n }\n\n tokenStream.expectEmpty();\n return {\n fontFamily: fontFamily\n };\n};\n\nvar NORMAL = regExpToken(/^(normal)$/);\nvar STYLE = regExpToken(/^(italic)$/);\nvar WEIGHT = regExpToken(/^([1-9]00|bold)$/);\nvar VARIANT = regExpToken(/^(small-caps)$/);\nvar defaultFontStyle = 'normal';\nvar defaultFontWeight = 'normal';\nvar defaultFontVariant = [];\n\nvar font = function font(tokenStream) {\n var fontStyle;\n var fontWeight;\n var fontVariant; // let fontSize;\n\n var lineHeight; // let fontFamily;\n\n var numStyleWeightVariantMatched = 0;\n\n while (numStyleWeightVariantMatched < 3 && tokenStream.hasTokens()) {\n if (tokenStream.matches(NORMAL)) ;else if (fontStyle === undefined && tokenStream.matches(STYLE)) {\n fontStyle = tokenStream.lastValue;\n } else if (fontWeight === undefined && tokenStream.matches(WEIGHT)) {\n fontWeight = tokenStream.lastValue;\n } else if (fontVariant === undefined && tokenStream.matches(VARIANT)) {\n fontVariant = [tokenStream.lastValue];\n } else {\n break;\n }\n tokenStream.expect(SPACE);\n numStyleWeightVariantMatched += 1;\n }\n\n var fontSize = tokenStream.expect(LENGTH, UNSUPPORTED_LENGTH_UNIT);\n\n if (tokenStream.matches(SLASH)) {\n lineHeight = tokenStream.expect(LENGTH, UNSUPPORTED_LENGTH_UNIT);\n }\n\n tokenStream.expect(SPACE);\n\n var _fontFamily = fontFamily(tokenStream),\n fontFamily$1 = _fontFamily.fontFamily;\n\n if (fontStyle === undefined) fontStyle = defaultFontStyle;\n if (fontWeight === undefined) fontWeight = defaultFontWeight;\n if (fontVariant === undefined) fontVariant = defaultFontVariant;\n var out = {\n fontStyle: fontStyle,\n fontWeight: fontWeight,\n fontVariant: fontVariant,\n fontSize: fontSize,\n fontFamily: fontFamily$1\n };\n if (lineHeight !== undefined) out.lineHeight = lineHeight;\n return out;\n};\n\nvar fontVariant = function fontVariant(tokenStream) {\n var values = [tokenStream.expect(IDENT)];\n\n while (tokenStream.hasTokens()) {\n tokenStream.expect(SPACE);\n values.push(tokenStream.expect(IDENT));\n }\n\n return {\n fontVariant: values\n };\n};\n\nvar ALIGN_CONTENT = regExpToken(/(flex-(?:start|end)|center|stretch|space-(?:between|around))/);\nvar JUSTIFY_CONTENT = regExpToken(/(flex-(?:start|end)|center|space-(?:between|around|evenly))/);\n\nvar placeContent = function placeContent(tokenStream) {\n var alignContent = tokenStream.expect(ALIGN_CONTENT);\n var justifyContent;\n\n if (tokenStream.hasTokens()) {\n tokenStream.expect(SPACE);\n justifyContent = tokenStream.expect(JUSTIFY_CONTENT);\n } else {\n justifyContent = 'stretch';\n }\n\n tokenStream.expectEmpty();\n return {\n alignContent: alignContent,\n justifyContent: justifyContent\n };\n};\n\nvar STYLE$1 = regExpToken(/^(solid|double|dotted|dashed)$/);\nvar defaultTextDecorationLine = 'none';\nvar defaultTextDecorationStyle = 'solid';\nvar defaultTextDecorationColor = 'black';\n\nvar textDecoration = function textDecoration(tokenStream) {\n var line;\n var style;\n var color;\n var didParseFirst = false;\n\n while (tokenStream.hasTokens()) {\n if (didParseFirst) tokenStream.expect(SPACE);\n\n if (line === undefined && tokenStream.matches(LINE)) {\n var lines = [tokenStream.lastValue.toLowerCase()];\n tokenStream.saveRewindPoint();\n\n if (lines[0] !== 'none' && tokenStream.matches(SPACE) && tokenStream.matches(LINE)) {\n lines.push(tokenStream.lastValue.toLowerCase()); // Underline comes before line-through\n\n lines.sort().reverse();\n } else {\n tokenStream.rewind();\n }\n\n line = lines.join(' ');\n } else if (style === undefined && tokenStream.matches(STYLE$1)) {\n style = tokenStream.lastValue;\n } else if (color === undefined && tokenStream.matches(COLOR)) {\n color = tokenStream.lastValue;\n } else {\n tokenStream[\"throw\"]();\n }\n\n didParseFirst = true;\n }\n\n return {\n textDecorationLine: line !== undefined ? line : defaultTextDecorationLine,\n textDecorationColor: color !== undefined ? color : defaultTextDecorationColor,\n textDecorationStyle: style !== undefined ? style : defaultTextDecorationStyle\n };\n};\n\nvar textDecorationLine = function textDecorationLine(tokenStream) {\n var lines = [];\n var didParseFirst = false;\n\n while (tokenStream.hasTokens()) {\n if (didParseFirst) tokenStream.expect(SPACE);\n lines.push(tokenStream.expect(LINE).toLowerCase());\n didParseFirst = true;\n }\n\n lines.sort().reverse();\n return {\n textDecorationLine: lines.join(' ')\n };\n};\n\nvar textShadow = function textShadow(tokenStream) {\n var _parseShadow2 = parseShadow(tokenStream),\n offset = _parseShadow2.offset,\n radius = _parseShadow2.radius,\n color = _parseShadow2.color;\n\n return {\n textShadowOffset: offset,\n textShadowRadius: radius,\n textShadowColor: color\n };\n};\n\nvar oneOfType = function oneOfType(tokenType) {\n return function (functionStream) {\n var value = functionStream.expect(tokenType);\n functionStream.expectEmpty();\n return value;\n };\n};\n\nvar singleNumber = oneOfType(NUMBER);\nvar singleLength = oneOfType(LENGTH);\nvar singleAngle = oneOfType(ANGLE);\n\nvar xyTransformFactory = function xyTransformFactory(tokenType) {\n return function (key, valueIfOmitted) {\n return function (functionStream) {\n var _ref3, _ref4;\n\n var x = functionStream.expect(tokenType);\n var y;\n\n if (functionStream.hasTokens()) {\n functionStream.expect(COMMA);\n y = functionStream.expect(tokenType);\n } else if (valueIfOmitted !== undefined) {\n y = valueIfOmitted;\n } else {\n // Assumption, if x === y, then we can omit XY\n // I.e. scale(5) => [{ scale: 5 }] rather than [{ scaleX: 5 }, { scaleY: 5 }]\n return x;\n }\n\n functionStream.expectEmpty();\n return [(_ref3 = {}, _ref3[key + \"Y\"] = y, _ref3), (_ref4 = {}, _ref4[key + \"X\"] = x, _ref4)];\n };\n };\n};\n\nvar xyNumber = xyTransformFactory(NUMBER);\nvar xyLength = xyTransformFactory(LENGTH);\nvar xyAngle = xyTransformFactory(ANGLE);\nvar partTransforms = {\n perspective: singleNumber,\n scale: xyNumber('scale'),\n scaleX: singleNumber,\n scaleY: singleNumber,\n translate: xyLength('translate', 0),\n translateX: singleLength,\n translateY: singleLength,\n rotate: singleAngle,\n rotateX: singleAngle,\n rotateY: singleAngle,\n rotateZ: singleAngle,\n skewX: singleAngle,\n skewY: singleAngle,\n skew: xyAngle('skew', '0deg')\n};\n\nvar transform = function transform(tokenStream) {\n var transforms = [];\n var didParseFirst = false;\n\n while (tokenStream.hasTokens()) {\n if (didParseFirst) tokenStream.expect(SPACE);\n var functionStream = tokenStream.expectFunction();\n var functionName = functionStream.functionName;\n var transformedValues = partTransforms[functionName](functionStream);\n\n if (!Array.isArray(transformedValues)) {\n var _ref5;\n\n transformedValues = [(_ref5 = {}, _ref5[functionName] = transformedValues, _ref5)];\n }\n\n transforms = transformedValues.concat(transforms);\n didParseFirst = true;\n }\n\n return {\n transform: transforms\n };\n};\n\nvar background = function background(tokenStream) {\n return {\n backgroundColor: tokenStream.expect(COLOR)\n };\n};\n\nvar borderColor = directionFactory({\n types: [COLOR],\n prefix: 'border',\n suffix: 'Color'\n});\nvar borderRadius = directionFactory({\n directions: ['TopLeft', 'TopRight', 'BottomRight', 'BottomLeft'],\n prefix: 'border',\n suffix: 'Radius'\n});\nvar borderWidth = directionFactory({\n prefix: 'border',\n suffix: 'Width'\n});\nvar margin = directionFactory({\n types: [LENGTH, UNSUPPORTED_LENGTH_UNIT, PERCENT, AUTO],\n prefix: 'margin'\n});\nvar padding = directionFactory({\n prefix: 'padding'\n});\n\nvar fontWeight = function fontWeight(tokenStream) {\n return {\n fontWeight: tokenStream.expect(WORD) // Also match numbers as strings\n\n };\n};\n\nvar shadowOffset = function shadowOffset(tokenStream) {\n return {\n shadowOffset: parseShadowOffset(tokenStream)\n };\n};\n\nvar textShadowOffset = function textShadowOffset(tokenStream) {\n return {\n textShadowOffset: parseShadowOffset(tokenStream)\n };\n};\n\nvar transforms = {\n aspectRatio: aspectRatio,\n background: background,\n border: border,\n borderColor: borderColor,\n borderRadius: borderRadius,\n borderWidth: borderWidth,\n boxShadow: boxShadow,\n flex: flex,\n flexFlow: flexFlow,\n font: font,\n fontFamily: fontFamily,\n fontVariant: fontVariant,\n fontWeight: fontWeight,\n margin: margin,\n padding: padding,\n placeContent: placeContent,\n shadowOffset: shadowOffset,\n textShadow: textShadow,\n textShadowOffset: textShadowOffset,\n textDecoration: textDecoration,\n textDecorationLine: textDecorationLine,\n transform: transform\n};\nvar propertiesWithoutUnits;\n\nif (process.env.NODE_ENV !== 'production') {\n propertiesWithoutUnits = ['aspectRatio', 'elevation', 'flexGrow', 'flexShrink', 'opacity', 'shadowOpacity', 'zIndex'];\n}\n\nvar devPropertiesWithUnitsRegExp = propertiesWithoutUnits != null ? new RegExp(propertiesWithoutUnits.join('|')) : null;\nvar SYMBOL_MATCH = 'SYMBOL_MATCH';\n\nvar TokenStream =\n/*#__PURE__*/\nfunction () {\n function TokenStream(nodes, parent) {\n this.index = 0;\n this.nodes = nodes;\n this.functionName = parent != null ? parent.value : null;\n this.lastValue = null;\n this.rewindIndex = -1;\n }\n\n var _proto = TokenStream.prototype;\n\n _proto.hasTokens = function hasTokens() {\n return this.index <= this.nodes.length - 1;\n };\n\n _proto[SYMBOL_MATCH] = function () {\n if (!this.hasTokens()) return null;\n var node = this.nodes[this.index];\n\n for (var i = 0; i < arguments.length; i += 1) {\n var tokenDescriptor = i < 0 || arguments.length <= i ? undefined : arguments[i];\n var value = tokenDescriptor(node);\n\n if (value !== null) {\n this.index += 1;\n this.lastValue = value;\n return value;\n }\n }\n\n return null;\n };\n\n _proto.matches = function matches() {\n return this[SYMBOL_MATCH].apply(this, arguments) !== null;\n };\n\n _proto.expect = function expect() {\n var value = this[SYMBOL_MATCH].apply(this, arguments);\n return value !== null ? value : this[\"throw\"]();\n };\n\n _proto.matchesFunction = function matchesFunction() {\n var node = this.nodes[this.index];\n if (node.type !== 'function') return null;\n var value = new TokenStream(node.nodes, node);\n this.index += 1;\n this.lastValue = null;\n return value;\n };\n\n _proto.expectFunction = function expectFunction() {\n var value = this.matchesFunction();\n return value !== null ? value : this[\"throw\"]();\n };\n\n _proto.expectEmpty = function expectEmpty() {\n if (this.hasTokens()) this[\"throw\"]();\n };\n\n _proto[\"throw\"] = function _throw() {\n throw new Error(\"Unexpected token type: \" + this.nodes[this.index].type);\n };\n\n _proto.saveRewindPoint = function saveRewindPoint() {\n this.rewindIndex = this.index;\n };\n\n _proto.rewind = function rewind() {\n if (this.rewindIndex === -1) throw new Error('Internal error');\n this.index = this.rewindIndex;\n this.lastValue = null;\n };\n\n return TokenStream;\n}();\n/* eslint-disable no-param-reassign */\n// Note if this is wrong, you'll need to change tokenTypes.js too\n\n\nvar numberOrLengthRe = /^([+-]?(?:\\d*\\.)?\\d+(?:e[+-]?\\d+)?)(?:px)?$/i;\nvar numberOnlyRe = /^[+-]?(?:\\d*\\.\\d*|[1-9]\\d*)(?:e[+-]?\\d+)?$/i;\nvar boolRe = /^true|false$/i;\nvar nullRe = /^null$/i;\nvar undefinedRe = /^undefined$/i; // Undocumented export\n\nvar transformRawValue = function transformRawValue(propName, value) {\n if (process.env.NODE_ENV !== 'production') {\n var needsUnit = !devPropertiesWithUnitsRegExp.test(propName);\n var isNumberWithoutUnit = numberOnlyRe.test(value);\n\n if (needsUnit && isNumberWithoutUnit) {\n // eslint-disable-next-line no-console\n console.warn(\"Expected style \\\"\" + propName + \": \" + value + \"\\\" to contain units\");\n }\n\n if (!needsUnit && value !== '0' && !isNumberWithoutUnit) {\n // eslint-disable-next-line no-console\n console.warn(\"Expected style \\\"\" + propName + \": \" + value + \"\\\" to be unitless\");\n }\n }\n\n var numberMatch = value.match(numberOrLengthRe);\n if (numberMatch !== null) return Number(numberMatch[1]);\n var boolMatch = value.match(boolRe);\n if (boolMatch !== null) return boolMatch[0].toLowerCase() === 'true';\n var nullMatch = value.match(nullRe);\n if (nullMatch !== null) return null;\n var undefinedMatch = value.match(undefinedRe);\n if (undefinedMatch !== null) return undefined;\n return value;\n};\n\nvar baseTransformShorthandValue = function baseTransformShorthandValue(propName, value) {\n var ast = parse__default(value);\n var tokenStream = new TokenStream(ast.nodes);\n return transforms[propName](tokenStream);\n};\n\nvar transformShorthandValue = process.env.NODE_ENV === 'production' ? baseTransformShorthandValue : function (propName, value) {\n try {\n return baseTransformShorthandValue(propName, value);\n } catch (e) {\n throw new Error(\"Failed to parse declaration \\\"\" + propName + \": \" + value + \"\\\"\");\n }\n};\n\nvar getStylesForProperty = function getStylesForProperty(propName, inputValue, allowShorthand) {\n var _ref6;\n\n var isRawValue = allowShorthand === false || !(propName in transforms);\n var value = inputValue.trim();\n var propValues = isRawValue ? (_ref6 = {}, _ref6[propName] = transformRawValue(propName, value), _ref6) : transformShorthandValue(propName, value);\n return propValues;\n};\n\nvar getPropertyName = function getPropertyName(propName) {\n var isCustomProp = /^--\\w+/.test(propName);\n\n if (isCustomProp) {\n return propName;\n }\n\n return camelizeStyleName(propName);\n};\n\nvar index = function index(rules, shorthandBlacklist) {\n if (shorthandBlacklist === void 0) {\n shorthandBlacklist = [];\n }\n\n return rules.reduce(function (accum, rule) {\n var propertyName = getPropertyName(rule[0]);\n var value = rule[1];\n var allowShorthand = shorthandBlacklist.indexOf(propertyName) === -1;\n return Object.assign(accum, getStylesForProperty(propertyName, value, allowShorthand));\n }, {});\n};\n\nexports[\"default\"] = index;\nexports.getPropertyName = getPropertyName;\nexports.getStylesForProperty = getStylesForProperty;\nexports.transformRawValue = transformRawValue;\n","var objectKeys = require('object-keys');\nvar isArguments = require('is-arguments');\nvar is = require('object-is');\nvar isRegex = require('is-regex');\nvar flags = require('regexp.prototype.flags');\nvar isDate = require('is-date-object');\n\nvar getTime = Date.prototype.getTime;\n\nfunction deepEqual(actual, expected, options) {\n var opts = options || {};\n\n // 7.1. All identical values are equivalent, as determined by ===.\n if (opts.strict ? is(actual, expected) : actual === expected) {\n return true;\n }\n\n // 7.3. Other pairs that do not both pass typeof value == 'object', equivalence is determined by ==.\n if (!actual || !expected || (typeof actual !== 'object' && typeof expected !== 'object')) {\n return opts.strict ? is(actual, expected) : actual == expected;\n }\n\n /*\n * 7.4. For all other Object pairs, including Array objects, equivalence is\n * determined by having the same number of owned properties (as verified\n * with Object.prototype.hasOwnProperty.call), the same set of keys\n * (although not necessarily the same order), equivalent values for every\n * corresponding key, and an identical 'prototype' property. Note: this\n * accounts for both named and indexed properties on Arrays.\n */\n // eslint-disable-next-line no-use-before-define\n return objEquiv(actual, expected, opts);\n}\n\nfunction isUndefinedOrNull(value) {\n return value === null || value === undefined;\n}\n\nfunction isBuffer(x) {\n if (!x || typeof x !== 'object' || typeof x.length !== 'number') {\n return false;\n }\n if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {\n return false;\n }\n if (x.length > 0 && typeof x[0] !== 'number') {\n return false;\n }\n return true;\n}\n\nfunction objEquiv(a, b, opts) {\n /* eslint max-statements: [2, 50] */\n var i, key;\n if (typeof a !== typeof b) { return false; }\n if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) { return false; }\n\n // an identical 'prototype' property.\n if (a.prototype !== b.prototype) { return false; }\n\n if (isArguments(a) !== isArguments(b)) { return false; }\n\n var aIsRegex = isRegex(a);\n var bIsRegex = isRegex(b);\n if (aIsRegex !== bIsRegex) { return false; }\n if (aIsRegex || bIsRegex) {\n return a.source === b.source && flags(a) === flags(b);\n }\n\n if (isDate(a) && isDate(b)) {\n return getTime.call(a) === getTime.call(b);\n }\n\n var aIsBuffer = isBuffer(a);\n var bIsBuffer = isBuffer(b);\n if (aIsBuffer !== bIsBuffer) { return false; }\n if (aIsBuffer || bIsBuffer) { // && would work too, because both are true or both false here\n if (a.length !== b.length) { return false; }\n for (i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) { return false; }\n }\n return true;\n }\n\n if (typeof a !== typeof b) { return false; }\n\n try {\n var ka = objectKeys(a);\n var kb = objectKeys(b);\n } catch (e) { // happens when one is a string literal and the other isn't\n return false;\n }\n // having the same number of owned properties (keys incorporates hasOwnProperty)\n if (ka.length !== kb.length) { return false; }\n\n // the same set of keys (although not necessarily the same order),\n ka.sort();\n kb.sort();\n // ~~~cheap key test\n for (i = ka.length - 1; i >= 0; i--) {\n if (ka[i] != kb[i]) { return false; }\n }\n // equivalent values for every corresponding key, and ~~~possibly expensive deep test\n for (i = ka.length - 1; i >= 0; i--) {\n key = ka[i];\n if (!deepEqual(a[key], b[key], opts)) { return false; }\n }\n\n return true;\n}\n\nmodule.exports = deepEqual;\n","'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn Object.propertyIsEnumerable.call(target, symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeHTML = exports.decodeHTMLStrict = exports.decodeXML = void 0;\nvar entities_json_1 = __importDefault(require(\"./maps/entities.json\"));\nvar legacy_json_1 = __importDefault(require(\"./maps/legacy.json\"));\nvar xml_json_1 = __importDefault(require(\"./maps/xml.json\"));\nvar decode_codepoint_1 = __importDefault(require(\"./decode_codepoint\"));\nvar strictEntityRe = /&(?:[a-zA-Z0-9]+|#[xX][\\da-fA-F]+|#\\d+);/g;\nexports.decodeXML = getStrictDecoder(xml_json_1.default);\nexports.decodeHTMLStrict = getStrictDecoder(entities_json_1.default);\nfunction getStrictDecoder(map) {\n var replace = getReplacer(map);\n return function (str) { return String(str).replace(strictEntityRe, replace); };\n}\nvar sorter = function (a, b) { return (a < b ? 1 : -1); };\nexports.decodeHTML = (function () {\n var legacy = Object.keys(legacy_json_1.default).sort(sorter);\n var keys = Object.keys(entities_json_1.default).sort(sorter);\n for (var i = 0, j = 0; i < keys.length; i++) {\n if (legacy[j] === keys[i]) {\n keys[i] += \";?\";\n j++;\n }\n else {\n keys[i] += \";\";\n }\n }\n var re = new RegExp(\"&(?:\" + keys.join(\"|\") + \"|#[xX][\\\\da-fA-F]+;?|#\\\\d+;?)\", \"g\");\n var replace = getReplacer(entities_json_1.default);\n function replacer(str) {\n if (str.substr(-1) !== \";\")\n str += \";\";\n return replace(str);\n }\n // TODO consider creating a merged map\n return function (str) { return String(str).replace(re, replacer); };\n})();\nfunction getReplacer(map) {\n return function replace(str) {\n if (str.charAt(1) === \"#\") {\n var secondChar = str.charAt(2);\n if (secondChar === \"X\" || secondChar === \"x\") {\n return decode_codepoint_1.default(parseInt(str.substr(3), 16));\n }\n return decode_codepoint_1.default(parseInt(str.substr(2), 10));\n }\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n return map[str.slice(1, -1)] || str;\n };\n}\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar decode_json_1 = __importDefault(require(\"./maps/decode.json\"));\n// Adapted from https://github.com/mathiasbynens/he/blob/master/src/he.js#L94-L119\nvar fromCodePoint = \n// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\nString.fromCodePoint ||\n function (codePoint) {\n var output = \"\";\n if (codePoint > 0xffff) {\n codePoint -= 0x10000;\n output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800);\n codePoint = 0xdc00 | (codePoint & 0x3ff);\n }\n output += String.fromCharCode(codePoint);\n return output;\n };\nfunction decodeCodePoint(codePoint) {\n if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) {\n return \"\\uFFFD\";\n }\n if (codePoint in decode_json_1.default) {\n codePoint = decode_json_1.default[codePoint];\n }\n return fromCodePoint(codePoint);\n}\nexports.default = decodeCodePoint;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = void 0;\nvar xml_json_1 = __importDefault(require(\"./maps/xml.json\"));\nvar inverseXML = getInverseObj(xml_json_1.default);\nvar xmlReplacer = getInverseReplacer(inverseXML);\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in XML\n * documents using XML entities.\n *\n * If a character has no equivalent entity, a\n * numeric hexadecimal reference (eg. `ü`) will be used.\n */\nexports.encodeXML = getASCIIEncoder(inverseXML);\nvar entities_json_1 = __importDefault(require(\"./maps/entities.json\"));\nvar inverseHTML = getInverseObj(entities_json_1.default);\nvar htmlReplacer = getInverseReplacer(inverseHTML);\n/**\n * Encodes all entities and non-ASCII characters in the input.\n *\n * This includes characters that are valid ASCII characters in HTML documents.\n * For example `#` will be encoded as `#`. To get a more compact output,\n * consider using the `encodeNonAsciiHTML` function.\n *\n * If a character has no equivalent entity, a\n * numeric hexadecimal reference (eg. `ü`) will be used.\n */\nexports.encodeHTML = getInverse(inverseHTML, htmlReplacer);\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in HTML\n * documents using HTML entities.\n *\n * If a character has no equivalent entity, a\n * numeric hexadecimal reference (eg. `ü`) will be used.\n */\nexports.encodeNonAsciiHTML = getASCIIEncoder(inverseHTML);\nfunction getInverseObj(obj) {\n return Object.keys(obj)\n .sort()\n .reduce(function (inverse, name) {\n inverse[obj[name]] = \"&\" + name + \";\";\n return inverse;\n }, {});\n}\nfunction getInverseReplacer(inverse) {\n var single = [];\n var multiple = [];\n for (var _i = 0, _a = Object.keys(inverse); _i < _a.length; _i++) {\n var k = _a[_i];\n if (k.length === 1) {\n // Add value to single array\n single.push(\"\\\\\" + k);\n }\n else {\n // Add value to multiple array\n multiple.push(k);\n }\n }\n // Add ranges to single characters.\n single.sort();\n for (var start = 0; start < single.length - 1; start++) {\n // Find the end of a run of characters\n var end = start;\n while (end < single.length - 1 &&\n single[end].charCodeAt(1) + 1 === single[end + 1].charCodeAt(1)) {\n end += 1;\n }\n var count = 1 + end - start;\n // We want to replace at least three characters\n if (count < 3)\n continue;\n single.splice(start, count, single[start] + \"-\" + single[end]);\n }\n multiple.unshift(\"[\" + single.join(\"\") + \"]\");\n return new RegExp(multiple.join(\"|\"), \"g\");\n}\n// /[^\\0-\\x7F]/gu\nvar reNonASCII = /(?:[\\x80-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])/g;\nvar getCodePoint = \n// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\nString.prototype.codePointAt != null\n ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n function (str) { return str.codePointAt(0); }\n : // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n function (c) {\n return (c.charCodeAt(0) - 0xd800) * 0x400 +\n c.charCodeAt(1) -\n 0xdc00 +\n 0x10000;\n };\nfunction singleCharReplacer(c) {\n return \"&#x\" + (c.length > 1 ? getCodePoint(c) : c.charCodeAt(0))\n .toString(16)\n .toUpperCase() + \";\";\n}\nfunction getInverse(inverse, re) {\n return function (data) {\n return data\n .replace(re, function (name) { return inverse[name]; })\n .replace(reNonASCII, singleCharReplacer);\n };\n}\nvar reEscapeChars = new RegExp(xmlReplacer.source + \"|\" + reNonASCII.source, \"g\");\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in XML\n * documents using numeric hexadecimal reference (eg. `ü`).\n *\n * Have a look at `escapeUTF8` if you want a more concise output at the expense\n * of reduced transportability.\n *\n * @param data String to escape.\n */\nfunction escape(data) {\n return data.replace(reEscapeChars, singleCharReplacer);\n}\nexports.escape = escape;\n/**\n * Encodes all characters not valid in XML documents using numeric hexadecimal\n * reference (eg. `ü`).\n *\n * Note that the output will be character-set dependent.\n *\n * @param data String to escape.\n */\nfunction escapeUTF8(data) {\n return data.replace(xmlReplacer, singleCharReplacer);\n}\nexports.escapeUTF8 = escapeUTF8;\nfunction getASCIIEncoder(obj) {\n return function (data) {\n return data.replace(reEscapeChars, function (c) { return obj[c] || singleCharReplacer(c); });\n };\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.encodeHTML5 = exports.encodeHTML4 = exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = void 0;\nvar decode_1 = require(\"./decode\");\nvar encode_1 = require(\"./encode\");\n/**\n * Decodes a string with entities.\n *\n * @param data String to decode.\n * @param level Optional level to decode at. 0 = XML, 1 = HTML. Default is 0.\n * @deprecated Use `decodeXML` or `decodeHTML` directly.\n */\nfunction decode(data, level) {\n return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTML)(data);\n}\nexports.decode = decode;\n/**\n * Decodes a string with entities. Does not allow missing trailing semicolons for entities.\n *\n * @param data String to decode.\n * @param level Optional level to decode at. 0 = XML, 1 = HTML. Default is 0.\n * @deprecated Use `decodeHTMLStrict` or `decodeXML` directly.\n */\nfunction decodeStrict(data, level) {\n return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTMLStrict)(data);\n}\nexports.decodeStrict = decodeStrict;\n/**\n * Encodes a string with entities.\n *\n * @param data String to encode.\n * @param level Optional level to encode at. 0 = XML, 1 = HTML. Default is 0.\n * @deprecated Use `encodeHTML`, `encodeXML` or `encodeNonAsciiHTML` directly.\n */\nfunction encode(data, level) {\n return (!level || level <= 0 ? encode_1.encodeXML : encode_1.encodeHTML)(data);\n}\nexports.encode = encode;\nvar encode_2 = require(\"./encode\");\nObject.defineProperty(exports, \"encodeXML\", { enumerable: true, get: function () { return encode_2.encodeXML; } });\nObject.defineProperty(exports, \"encodeHTML\", { enumerable: true, get: function () { return encode_2.encodeHTML; } });\nObject.defineProperty(exports, \"encodeNonAsciiHTML\", { enumerable: true, get: function () { return encode_2.encodeNonAsciiHTML; } });\nObject.defineProperty(exports, \"escape\", { enumerable: true, get: function () { return encode_2.escape; } });\nObject.defineProperty(exports, \"escapeUTF8\", { enumerable: true, get: function () { return encode_2.escapeUTF8; } });\n// Legacy aliases (deprecated)\nObject.defineProperty(exports, \"encodeHTML4\", { enumerable: true, get: function () { return encode_2.encodeHTML; } });\nObject.defineProperty(exports, \"encodeHTML5\", { enumerable: true, get: function () { return encode_2.encodeHTML; } });\nvar decode_2 = require(\"./decode\");\nObject.defineProperty(exports, \"decodeXML\", { enumerable: true, get: function () { return decode_2.decodeXML; } });\nObject.defineProperty(exports, \"decodeHTML\", { enumerable: true, get: function () { return decode_2.decodeHTML; } });\nObject.defineProperty(exports, \"decodeHTMLStrict\", { enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } });\n// Legacy aliases (deprecated)\nObject.defineProperty(exports, \"decodeHTML4\", { enumerable: true, get: function () { return decode_2.decodeHTML; } });\nObject.defineProperty(exports, \"decodeHTML5\", { enumerable: true, get: function () { return decode_2.decodeHTML; } });\nObject.defineProperty(exports, \"decodeHTML4Strict\", { enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } });\nObject.defineProperty(exports, \"decodeHTML5Strict\", { enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } });\nObject.defineProperty(exports, \"decodeXMLStrict\", { enumerable: true, get: function () { return decode_2.decodeXML; } });\n","/*!\n * escape-html\n * Copyright(c) 2012-2013 TJ Holowaychuk\n * Copyright(c) 2015 Andreas Lubbe\n * Copyright(c) 2015 Tiancheng \"Timothy\" Gu\n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module variables.\n * @private\n */\n\nvar matchHtmlRegExp = /[\"'&<>]/;\n\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = escapeHtml;\n\n/**\n * Escape special characters in the given string of html.\n *\n * @param {string} string The string to escape for inserting into HTML\n * @return {string}\n * @public\n */\n\nfunction escapeHtml(string) {\n var str = '' + string;\n var match = matchHtmlRegExp.exec(str);\n\n if (!match) {\n return str;\n }\n\n var escape;\n var html = '';\n var index = 0;\n var lastIndex = 0;\n\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34: // \"\n escape = '"';\n break;\n case 38: // &\n escape = '&';\n break;\n case 39: // '\n escape = ''';\n break;\n case 60: // <\n escape = '<';\n break;\n case 62: // >\n escape = '>';\n break;\n default:\n continue;\n }\n\n if (lastIndex !== index) {\n html += str.substring(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n\n return lastIndex !== index\n ? html + str.substring(lastIndex, index)\n : html;\n}\n","import { Asset } from './Asset';\nimport { IS_ENV_WITH_UPDATES_ENABLED } from './PlatformUtils';\nimport { setCustomSourceTransformer } from './resolveAssetSource';\n\n// Override React Native's asset resolution for `Image` components in contexts where it matters\nif (IS_ENV_WITH_UPDATES_ENABLED) {\n setCustomSourceTransformer((resolver) => {\n try {\n // Bundler is using the hashAssetFiles plugin if and only if the fileHashes property exists\n if (resolver.asset.fileHashes) {\n const asset = Asset.fromMetadata(resolver.asset);\n return resolver.fromSource(asset.downloaded ? asset.localUri! : asset.uri);\n } else {\n return resolver.defaultAsset();\n }\n } catch {\n return resolver.defaultAsset();\n }\n });\n}\n","import { Platform } from 'expo-modules-core';\nimport { getAssetByID } from 'react-native/Libraries/Image/AssetRegistry';\n\nimport { AssetMetadata, selectAssetSource } from './AssetSources';\nimport * as AssetUris from './AssetUris';\nimport * as ImageAssets from './ImageAssets';\nimport { getLocalAssetUri } from './LocalAssets';\nimport { downloadAsync, IS_ENV_WITH_UPDATES_ENABLED } from './PlatformUtils';\nimport resolveAssetSource from './resolveAssetSource';\n\n// @docsMissing\nexport type AssetDescriptor = {\n name: string;\n type: string;\n hash?: string | null;\n uri: string;\n width?: number | null;\n height?: number | null;\n};\n\ntype DownloadPromiseCallbacks = {\n resolve: () => void;\n reject: (error: Error) => void;\n};\n\nexport { AssetMetadata };\n\n// @needsAudit\n/**\n * The `Asset` class represents an asset in your app. It gives metadata about the asset (such as its\n * name and type) and provides facilities to load the asset data.\n */\nexport class Asset {\n /**\n * @private\n */\n static byHash = {};\n /**\n * @private\n */\n static byUri = {};\n\n /**\n * The name of the asset file without the extension. Also without the part from `@` onward in the\n * filename (used to specify scale factor for images).\n */\n name: string;\n /**\n * The extension of the asset filename.\n */\n type: string;\n /**\n * The MD5 hash of the asset's data.\n */\n hash: string | null = null;\n /**\n * A URI that points to the asset's data on the remote server. When running the published version\n * of your app, this refers to the location on Expo's asset server where Expo has stored your\n * asset. When running the app from Expo CLI during development, this URI points to Expo CLI's\n * server running on your computer and the asset is served directly from your computer. If you\n * are not using Classic Updates (legacy), this field should be ignored as we ensure your assets\n * are on device before before running your application logic.\n */\n uri: string;\n /**\n * If the asset has been downloaded (by calling [`downloadAsync()`](#downloadasync)), the\n * `file://` URI pointing to the local file on the device that contains the asset data.\n */\n localUri: string | null = null;\n /**\n * If the asset is an image, the width of the image data divided by the scale factor. The scale\n * factor is the number after `@` in the filename, or `1` if not present.\n */\n width: number | null = null;\n /**\n * If the asset is an image, the height of the image data divided by the scale factor. The scale factor is the number after `@` in the filename, or `1` if not present.\n */\n height: number | null = null;\n // @docsMissing\n downloading: boolean = false;\n // @docsMissing\n downloaded: boolean = false;\n\n /**\n * @private\n */\n _downloadCallbacks: DownloadPromiseCallbacks[] = [];\n\n constructor({ name, type, hash = null, uri, width, height }: AssetDescriptor) {\n this.name = name;\n this.type = type;\n this.hash = hash;\n this.uri = uri;\n\n if (typeof width === 'number') {\n this.width = width;\n }\n if (typeof height === 'number') {\n this.height = height;\n }\n\n if (hash) {\n this.localUri = getLocalAssetUri(hash, type);\n if (this.localUri) {\n this.downloaded = true;\n }\n }\n\n if (Platform.OS === 'web') {\n if (!name) {\n this.name = AssetUris.getFilename(uri);\n }\n if (!type) {\n this.type = AssetUris.getFileExtension(uri);\n }\n }\n }\n\n // @needsAudit\n /**\n * A helper that wraps `Asset.fromModule(module).downloadAsync` for convenience.\n * @param moduleId An array of `require('path/to/file')` or external network URLs. Can also be\n * just one module or URL without an Array.\n * @return Returns a Promise that fulfills with an array of `Asset`s when the asset(s) has been\n * saved to disk.\n * @example\n * ```ts\n * const [{ localUri }] = await Asset.loadAsync(require('./assets/snack-icon.png'));\n * ```\n */\n static loadAsync(moduleId: number | number[] | string | string[]): Promise {\n const moduleIds = Array.isArray(moduleId) ? moduleId : [moduleId];\n return Promise.all(moduleIds.map((moduleId) => Asset.fromModule(moduleId).downloadAsync()));\n }\n\n // @needsAudit\n /**\n * Returns the [`Asset`](#asset) instance representing an asset given its module or URL.\n * @param virtualAssetModule The value of `require('path/to/file')` for the asset or external\n * network URL\n * @return The [`Asset`](#asset) instance for the asset.\n */\n static fromModule(virtualAssetModule: number | string): Asset {\n if (typeof virtualAssetModule === 'string') {\n return Asset.fromURI(virtualAssetModule);\n }\n\n const meta = getAssetByID(virtualAssetModule);\n if (!meta) {\n throw new Error(`Module \"${virtualAssetModule}\" is missing from the asset registry`);\n }\n\n // Outside of the managed env we need the moduleId to initialize the asset\n // because resolveAssetSource depends on it\n if (!IS_ENV_WITH_UPDATES_ENABLED) {\n const { uri } = resolveAssetSource(virtualAssetModule);\n const asset = new Asset({\n name: meta.name,\n type: meta.type,\n hash: meta.hash,\n uri,\n width: meta.width,\n height: meta.height,\n });\n\n // TODO: FileSystem should probably support 'downloading' from drawable\n // resources But for now it doesn't (it only supports raw resources) and\n // React Native's Image works fine with drawable resource names for\n // images.\n if (Platform.OS === 'android' && !uri.includes(':') && (meta.width || meta.height)) {\n asset.localUri = asset.uri;\n asset.downloaded = true;\n }\n\n Asset.byHash[meta.hash] = asset;\n return asset;\n }\n\n return Asset.fromMetadata(meta);\n }\n\n // @docsMissing\n static fromMetadata(meta: AssetMetadata): Asset {\n // The hash of the whole asset, not to be confused with the hash of a specific file returned\n // from `selectAssetSource`\n const metaHash = meta.hash;\n if (Asset.byHash[metaHash]) {\n return Asset.byHash[metaHash];\n }\n\n const { uri, hash } = selectAssetSource(meta);\n const asset = new Asset({\n name: meta.name,\n type: meta.type,\n hash,\n uri,\n width: meta.width,\n height: meta.height,\n });\n Asset.byHash[metaHash] = asset;\n return asset;\n }\n\n // @docsMissing\n static fromURI(uri: string): Asset {\n if (Asset.byUri[uri]) {\n return Asset.byUri[uri];\n }\n\n // Possibly a Base64-encoded URI\n let type = '';\n if (uri.indexOf(';base64') > -1) {\n type = uri.split(';')[0].split('/')[1];\n } else {\n const extension = AssetUris.getFileExtension(uri);\n type = extension.startsWith('.') ? extension.substring(1) : extension;\n }\n\n const asset = new Asset({\n name: '',\n type,\n hash: null,\n uri,\n });\n\n Asset.byUri[uri] = asset;\n\n return asset;\n }\n\n // @needsAudit\n /**\n * Downloads the asset data to a local file in the device's cache directory. Once the returned\n * promise is fulfilled without error, the [`localUri`](#assetlocaluri) field of this asset points\n * to a local file containing the asset data. The asset is only downloaded if an up-to-date local\n * file for the asset isn't already present due to an earlier download. The downloaded `Asset`\n * will be returned when the promise is resolved.\n * @return Returns a Promise which fulfills with an `Asset` instance.\n */\n async downloadAsync(): Promise {\n if (this.downloaded) {\n return this;\n }\n if (this.downloading) {\n await new Promise((resolve, reject) => {\n this._downloadCallbacks.push({ resolve, reject });\n });\n return this;\n }\n this.downloading = true;\n\n try {\n if (Platform.OS === 'web') {\n if (ImageAssets.isImageType(this.type)) {\n const { width, height, name } = await ImageAssets.getImageInfoAsync(this.uri);\n this.width = width;\n this.height = height;\n this.name = name;\n } else {\n this.name = AssetUris.getFilename(this.uri);\n }\n }\n this.localUri = await downloadAsync(this.uri, this.hash, this.type, this.name);\n\n this.downloaded = true;\n this._downloadCallbacks.forEach(({ resolve }) => resolve());\n } catch (e) {\n this._downloadCallbacks.forEach(({ reject }) => reject(e));\n throw e;\n } finally {\n this.downloading = false;\n this._downloadCallbacks = [];\n }\n return this;\n }\n}\n","import { useEffect, useState } from 'react';\n\nimport { Asset } from './Asset';\n\n// @needsAudit\n/**\n * Downloads and stores one or more assets locally.\n * After the assets are loaded, this hook returns a list of asset instances.\n * If something went wrong when loading the assets, an error is returned.\n *\n * > Note, the assets are not \"reloaded\" when you dynamically change the asset list.\n *\n * @return Returns an array containing:\n * - on the first position, a list of all loaded assets. If they aren't loaded yet, this value is\n * `undefined`.\n * - on the second position, an error which encountered when loading the assets. If there was no\n * error, this value is `undefined`.\n *\n * @example\n * ```tsx\n * const [assets, error] = useAssets([require('path/to/asset.jpg'), require('path/to/other.png')]);\n *\n * return assets ? : null;\n * ```\n */\nexport function useAssets(moduleIds: number | number[]): [Asset[] | undefined, Error | undefined] {\n const [assets, setAssets] = useState();\n const [error, setError] = useState();\n\n useEffect(() => {\n Asset.loadAsync(moduleIds).then(setAssets).catch(setError);\n }, []);\n\n return [assets, error];\n}\n","import { Platform } from 'expo-modules-core';\nimport { PixelRatio } from 'react-native';\nimport { PackagerAsset } from 'react-native/Libraries/Image/AssetRegistry';\n\nexport type ResolvedAssetSource = {\n __packager_asset: boolean;\n width?: number;\n height?: number;\n uri: string;\n scale: number;\n};\n\n// Returns the Metro dev server-specific asset location.\nfunction getScaledAssetPath(asset): string {\n const scale = AssetSourceResolver.pickScale(asset.scales, PixelRatio.get());\n const scaleSuffix = scale === 1 ? '' : '@' + scale + 'x';\n const type = !asset.type ? '' : `.${asset.type}`;\n if (__DEV__) {\n return asset.httpServerLocation + '/' + asset.name + scaleSuffix + type;\n } else {\n return asset.httpServerLocation.replace(/\\.\\.\\//g, '_') + '/' + asset.name + scaleSuffix + type;\n }\n}\n\nexport default class AssetSourceResolver {\n serverUrl: string;\n // where the jsbundle is being run from\n // NOTE(EvanBacon): Never defined on web.\n jsbundleUrl?: string | null;\n // the asset to resolve\n asset: PackagerAsset;\n\n constructor(\n serverUrl: string | undefined | null,\n jsbundleUrl: string | undefined | null,\n asset: PackagerAsset\n ) {\n this.serverUrl = serverUrl || 'https://expo.dev';\n this.jsbundleUrl = null;\n this.asset = asset;\n }\n\n // Always true for web runtimes\n isLoadedFromServer(): boolean {\n return true;\n }\n\n // Always false for web runtimes\n isLoadedFromFileSystem(): boolean {\n return false;\n }\n\n defaultAsset(): ResolvedAssetSource {\n return this.assetServerURL();\n }\n\n /**\n * @returns absolute remote URL for the hosted asset.\n */\n assetServerURL(): ResolvedAssetSource {\n const fromUrl = new URL(getScaledAssetPath(this.asset), this.serverUrl);\n fromUrl.searchParams.set('platform', Platform.OS);\n fromUrl.searchParams.set('hash', this.asset.hash);\n return this.fromSource(\n // Relative on web\n fromUrl.toString().replace(fromUrl.origin, '')\n );\n }\n\n fromSource(source: string): ResolvedAssetSource {\n return {\n __packager_asset: true,\n width: this.asset.width ?? undefined,\n height: this.asset.height ?? undefined,\n uri: source,\n scale: AssetSourceResolver.pickScale(this.asset.scales, PixelRatio.get()),\n };\n }\n\n static pickScale(scales: number[], deviceScale: number): number {\n for (let i = 0; i < scales.length; i++) {\n if (scales[i] >= deviceScale) {\n return scales[i];\n }\n }\n return scales[scales.length - 1] || 1;\n }\n}\n","import { Platform } from 'expo-modules-core';\nimport path from 'path-browserify';\nimport { PixelRatio } from 'react-native';\nimport { PackagerAsset } from 'react-native/Libraries/Image/AssetRegistry';\nimport URL from 'url-parse';\n\nimport AssetSourceResolver from './AssetSourceResolver';\nimport { getManifest, getManifest2, manifestBaseUrl } from './PlatformUtils';\n\n// @docsMissing\nexport type AssetMetadata = Pick<\n PackagerAsset,\n 'httpServerLocation' | 'name' | 'hash' | 'type' | 'scales' | 'width' | 'height'\n> & {\n uri?: string;\n fileHashes?: string[];\n fileUris?: string[];\n};\n\nexport type AssetSource = {\n uri: string;\n hash: string;\n};\n\n// Fast lookup check if asset map has any overrides in the manifest\nconst assetMapOverride = getManifest().assetMapOverride;\n\n/**\n * Selects the best file for the given asset (ex: choosing the best scale for images) and returns\n * a { uri, hash } pair for the specific asset file.\n *\n * If the asset isn't an image with multiple scales, the first file is selected.\n */\nexport function selectAssetSource(meta: AssetMetadata): AssetSource {\n // Override with the asset map in manifest if available\n if (assetMapOverride && assetMapOverride.hasOwnProperty(meta.hash)) {\n meta = { ...meta, ...assetMapOverride[meta.hash] };\n }\n\n // This logic is based on that of AssetSourceResolver, with additional support for file hashes and\n // explicitly provided URIs\n const scale = AssetSourceResolver.pickScale(meta.scales, PixelRatio.get());\n const index = meta.scales.findIndex((s) => s === scale);\n const hash = meta.fileHashes ? meta.fileHashes[index] || meta.fileHashes[0] : meta.hash;\n\n // Allow asset processors to directly provide the URL to load\n const uri = meta.fileUris ? meta.fileUris[index] || meta.fileUris[0] : meta.uri;\n if (uri) {\n return { uri: resolveUri(uri), hash };\n }\n\n // Check if the assetUrl was overridden in the manifest\n const assetUrlOverride = getManifest().assetUrlOverride;\n if (assetUrlOverride) {\n const uri = path.join(assetUrlOverride, hash);\n return { uri: resolveUri(uri), hash };\n }\n\n const fileScale = scale === 1 ? '' : `@${scale}x`;\n const fileExtension = meta.type ? `.${encodeURIComponent(meta.type)}` : '';\n const suffix = `/${encodeURIComponent(\n meta.name\n )}${fileScale}${fileExtension}?platform=${encodeURIComponent(\n Platform.OS\n )}&hash=${encodeURIComponent(meta.hash)}`;\n\n // For assets with a specified absolute URL, we use the existing origin instead of prepending the\n // development server or production CDN URL origin\n if (/^https?:\\/\\//.test(meta.httpServerLocation)) {\n const uri = meta.httpServerLocation + suffix;\n return { uri, hash };\n }\n\n // For assets during development using manifest2, we use the development server's URL origin\n const manifest2 = getManifest2();\n\n if (manifest2?.extra?.expoGo?.developer) {\n const baseUrl = new URL(`http://${manifest2.extra.expoGo.debuggerHost}`);\n baseUrl.set('pathname', meta.httpServerLocation + suffix);\n\n return {\n uri: baseUrl.href,\n hash,\n };\n }\n\n // For assets during development, we use the development server's URL origin\n if (getManifest().developer) {\n const baseUrl = new URL(getManifest().bundleUrl);\n baseUrl.set('pathname', meta.httpServerLocation + suffix);\n return { uri: baseUrl.href, hash };\n }\n\n // Production CDN URIs are based on each asset file hash\n return {\n uri: `https://classic-assets.eascdn.net/~assets/${encodeURIComponent(hash)}`,\n hash,\n };\n}\n\n/**\n * Resolves the given URI to an absolute URI. If the given URI is already an absolute URI, it is\n * simply returned. Otherwise, if it is a relative URI, it is resolved relative to the manifest's\n * base URI.\n */\nexport function resolveUri(uri: string): string {\n if (!manifestBaseUrl) {\n return uri;\n }\n\n const { protocol } = new URL(uri);\n if (protocol !== '') {\n return uri;\n }\n\n const baseUrl = new URL(manifestBaseUrl);\n const resolvedPath = uri.startsWith('/') ? uri : path.join(baseUrl.pathname, uri);\n baseUrl.set('pathname', resolvedPath);\n return baseUrl.href;\n}\n","import URL from 'url-parse';\n\nexport function getFilename(url: string): string {\n const { pathname } = new URL(url, {});\n return pathname.substring(pathname.lastIndexOf('/') + 1);\n}\n\nexport function getFileExtension(url: string): string {\n const filename = getFilename(url);\n const dotIndex = filename.lastIndexOf('.');\n // Ignore leading dots for hidden files\n return dotIndex > 0 ? filename.substring(dotIndex) : '';\n}\n\n/**\n * Returns the base URL from a manifest's URL. For example, given a manifest hosted at\n * https://example.com/app/manifest.json, the base URL would be https://example.com/app/. Query\n * parameters and fragments also are removed.\n *\n * For an Expo-hosted project with a manifest hosted at https://exp.host/@user/project/index.exp, the\n * base URL would be https://exp.host/@user/project.\n *\n * We also normalize the \"exp\" protocol to \"http\" to handle internal URLs with the Expo schemes used\n * to tell the OS to open the URLs in the the Expo client.\n */\nexport function getManifestBaseUrl(manifestUrl: string): string {\n const urlObject = new URL(manifestUrl, {});\n\n // Change the scheme to http(s) if it is exp(s)\n if (urlObject.protocol === 'exp:') {\n urlObject.set('protocol', 'http:');\n } else if (urlObject.protocol === 'exps:') {\n urlObject.set('protocol', 'https:');\n }\n\n // Trim filename, query parameters, and fragment, if any\n const directory = urlObject.pathname.substring(0, urlObject.pathname.lastIndexOf('/') + 1);\n urlObject.set('pathname', directory);\n urlObject.set('query', '');\n urlObject.set('hash', '');\n\n return urlObject.href;\n}\n","/* eslint-env browser */\nimport { Platform } from 'expo-modules-core';\n\nimport { getFilename } from './AssetUris';\n\ntype ImageInfo = {\n name: string;\n width: number;\n height: number;\n};\n\nexport function isImageType(type: string): boolean {\n return /^(jpeg|jpg|gif|png|bmp|webp|heic)$/i.test(type);\n}\n\nexport function getImageInfoAsync(url: string): Promise {\n if (!Platform.isDOMAvailable) {\n return Promise.resolve({ name: getFilename(url), width: 0, height: 0 });\n }\n return new Promise((resolve, reject) => {\n const img = new Image();\n img.onerror = reject;\n img.onload = () => {\n resolve({\n name: getFilename(url),\n width: img.naturalWidth,\n height: img.naturalHeight,\n });\n };\n img.src = url;\n });\n}\n","export function getLocalAssetUri(hash: string, type: string | null): string | null {\n // noop on web\n return null;\n}\n","export const IS_MANAGED_ENV = false;\nexport const IS_ENV_WITH_UPDATES_ENABLED = false;\nexport const IS_ENV_WITHOUT_UPDATES_ENABLED = false;\n\n// Compute manifest base URL if available\nexport const manifestBaseUrl = null;\n\nexport async function downloadAsync(uri, hash, type, name): Promise {\n return uri;\n}\n\nexport function getManifest() {\n return {};\n}\n\nexport function getManifest2() {\n return {};\n}\n","import './Asset.fx';\n\nexport * from './Asset';\nexport * from './AssetHooks';\n","import { getAssetByID } from 'react-native/Libraries/Image/AssetRegistry';\n\nimport AssetSourceResolver, { ResolvedAssetSource } from './AssetSourceResolver';\n\nlet _customSourceTransformer;\n\nexport function setCustomSourceTransformer(\n transformer: (resolver: AssetSourceResolver) => ResolvedAssetSource\n): void {\n _customSourceTransformer = transformer;\n}\n\n/**\n * `source` is either a number (opaque type returned by require('./foo.png'))\n * or an `ImageSource` like { uri: '' }\n */\nexport default function resolveAssetSource(source: any): ResolvedAssetSource | undefined {\n if (typeof source === 'object') {\n return source;\n }\n\n const asset = getAssetByID(source);\n if (!asset) {\n return undefined;\n }\n\n const resolver = new AssetSourceResolver(\n // Doesn't matter since this is removed on web\n 'https://expo.dev',\n null,\n asset\n );\n if (_customSourceTransformer) {\n return _customSourceTransformer(resolver);\n }\n return resolver.defaultAsset();\n}\n\nObject.defineProperty(resolveAssetSource, 'setCustomSourceTransformer', {\n get() {\n return setCustomSourceTransformer;\n },\n});\n\nexport const { pickScale } = AssetSourceResolver;\n","import { CodedError, Platform } from 'expo-modules-core';\nimport FontObserver from 'fontfaceobserver';\n\nimport { UnloadFontOptions } from './Font';\nimport { FontDisplay, FontResource } from './Font.types';\n\nfunction getFontFaceStyleSheet(): CSSStyleSheet | null {\n if (!Platform.isDOMAvailable) {\n return null;\n }\n const styleSheet = getStyleElement();\n return styleSheet.sheet ? (styleSheet.sheet as CSSStyleSheet) : null;\n}\n\ntype RuleItem = { rule: CSSFontFaceRule; index: number };\n\nfunction getFontFaceRules(): RuleItem[] {\n const sheet = getFontFaceStyleSheet();\n if (sheet) {\n // @ts-ignore: rule iterator\n const rules = [...sheet.cssRules];\n\n const items: RuleItem[] = [];\n\n for (let i = 0; i < rules.length; i++) {\n const rule = rules[i];\n if (rule instanceof CSSFontFaceRule) {\n items.push({ rule, index: i });\n }\n }\n return items;\n }\n return [];\n}\n\nfunction getFontFaceRulesMatchingResource(\n fontFamilyName: string,\n options?: UnloadFontOptions\n): RuleItem[] {\n const rules = getFontFaceRules();\n return rules.filter(({ rule }) => {\n return (\n rule.style.fontFamily === fontFamilyName &&\n (options && options.display ? options.display === (rule.style as any).fontDisplay : true)\n );\n });\n}\n\nexport default {\n get name(): string {\n return 'ExpoFontLoader';\n },\n\n async unloadAllAsync(): Promise {\n if (!Platform.isDOMAvailable) return;\n\n const element = document.getElementById(ID);\n if (element && element instanceof HTMLStyleElement) {\n document.removeChild(element);\n }\n },\n\n async unloadAsync(fontFamilyName: string, options?: UnloadFontOptions): Promise {\n const sheet = getFontFaceStyleSheet();\n if (!sheet) return;\n const items = getFontFaceRulesMatchingResource(fontFamilyName, options);\n for (const item of items) {\n sheet.deleteRule(item.index);\n }\n },\n\n async loadAsync(fontFamilyName: string, resource: FontResource): Promise {\n if (!Platform.isDOMAvailable) {\n return;\n }\n\n const canInjectStyle = document.head && typeof document.head.appendChild === 'function';\n if (!canInjectStyle) {\n throw new CodedError(\n 'ERR_WEB_ENVIRONMENT',\n `The browser's \\`document.head\\` element doesn't support injecting fonts.`\n );\n }\n\n const style = _createWebStyle(fontFamilyName, resource);\n document.head!.appendChild(style);\n\n if (!isFontLoadingListenerSupported()) {\n return;\n }\n\n return new FontObserver(fontFamilyName, { display: resource.display }).load();\n },\n};\n\nconst ID = 'expo-generated-fonts';\n\nfunction getStyleElement(): HTMLStyleElement {\n const element = document.getElementById(ID);\n if (element && element instanceof HTMLStyleElement) {\n return element;\n }\n const styleElement = document.createElement('style');\n styleElement.id = ID;\n styleElement.type = 'text/css';\n return styleElement;\n}\n\nfunction _createWebStyle(fontFamily: string, resource: FontResource): HTMLStyleElement {\n const fontStyle = `@font-face {\n font-family: ${fontFamily};\n src: url(${resource.uri});\n font-display: ${resource.display || FontDisplay.AUTO};\n }`;\n\n const styleElement = getStyleElement();\n // @ts-ignore: TypeScript does not define HTMLStyleElement::styleSheet. This is just for IE and\n // possibly can be removed if it's unnecessary on IE 11.\n if (styleElement.styleSheet) {\n const styleElementIE = styleElement as any;\n styleElementIE.styleSheet.cssText = styleElementIE.styleSheet.cssText\n ? styleElementIE.styleSheet.cssText + fontStyle\n : fontStyle;\n } else {\n const textNode = document.createTextNode(fontStyle);\n styleElement.appendChild(textNode);\n }\n return styleElement;\n}\n\nfunction isFontLoadingListenerSupported(): boolean {\n const { userAgent } = window.navigator;\n // WebKit is broken https://github.com/bramstein/fontfaceobserver/issues/95\n const isIOS = !!userAgent.match(/iPad|iPhone/i);\n const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n // Edge is broken https://github.com/bramstein/fontfaceobserver/issues/109#issuecomment-333356795\n const isEdge = userAgent.includes('Edge');\n // Internet Explorer\n const isIE = userAgent.includes('Trident');\n // Firefox\n const isFirefox = userAgent.includes('Firefox');\n return !isSafari && !isIOS && !isEdge && !isIE && !isFirefox;\n}\n","import { CodedError, UnavailabilityError } from 'expo-modules-core';\n\nimport ExpoFontLoader from './ExpoFontLoader';\nimport { FontDisplay, FontSource, FontResource, UnloadFontOptions } from './Font.types';\nimport {\n getAssetForSource,\n loadSingleFontAsync,\n fontFamilyNeedsScoping,\n getNativeFontName,\n} from './FontLoader';\n\nconst loaded: { [name: string]: boolean } = {};\nconst loadPromises: { [name: string]: Promise } = {};\n\n// @needsAudit\n// note(brentvatne): at some point we may want to warn if this is called outside of a managed app.\n/**\n * Used to transform font family names to the scoped name. This does not need to\n * be called in standalone or bare apps but it will return unscoped font family\n * names if it is called in those contexts.\n *\n * @param fontFamily Name of font to process.\n * @returns Returns a name processed for use with the [current workflow](https://docs.expo.dev/archive/managed-vs-bare/).\n */\nexport function processFontFamily(fontFamily: string | null): string | null {\n if (!fontFamily || !fontFamilyNeedsScoping(fontFamily)) {\n return fontFamily;\n }\n\n if (!isLoaded(fontFamily)) {\n if (__DEV__) {\n if (isLoading(fontFamily)) {\n console.error(\n `You started loading the font \"${fontFamily}\", but used it before it finished loading. You need to wait for Font.loadAsync to complete before using the font.`\n );\n } else {\n console.error(\n `fontFamily \"${fontFamily}\" is not a system font and has not been loaded through Font.loadAsync.\\n\n- If you intended to use a system font, make sure you typed the name correctly and that it is supported by your device operating system.\\n\n- If this is a custom font, be sure to load it with Font.loadAsync.`\n );\n }\n }\n\n return 'System';\n }\n\n return `ExpoFont-${getNativeFontName(fontFamily)}`;\n}\n\n// @needsAudit\n/**\n * Synchronously detect if the font for `fontFamily` has finished loading.\n *\n * @param fontFamily The name used to load the `FontResource`.\n * @return Returns `true` if the font has fully loaded.\n */\nexport function isLoaded(fontFamily: string): boolean {\n return fontFamily in loaded;\n}\n\n// @needsAudit\n/**\n * Synchronously detect if the font for `fontFamily` is still being loaded.\n *\n * @param fontFamily The name used to load the `FontResource`.\n * @returns Returns `true` if the font is still loading.\n */\nexport function isLoading(fontFamily: string): boolean {\n return fontFamily in loadPromises;\n}\n\n// @needsAudit\n/**\n * Highly efficient method for loading fonts from static or remote resources which can then be used\n * with the platform's native text elements. In the browser this generates a `@font-face` block in\n * a shared style sheet for fonts. No CSS is needed to use this method.\n *\n * @param fontFamilyOrFontMap string or map of values that can be used as the [`fontFamily`](https://reactnative.dev/docs/text#style)\n * style prop with React Native Text elements.\n * @param source the font asset that should be loaded into the `fontFamily` namespace.\n *\n * @return Returns a promise that fulfils when the font has loaded. Often you may want to wrap the\n * method in a `try/catch/finally` to ensure the app continues if the font fails to load.\n */\nexport async function loadAsync(\n fontFamilyOrFontMap: string | Record,\n source?: FontSource\n): Promise {\n if (typeof fontFamilyOrFontMap === 'object') {\n if (source) {\n throw new CodedError(\n `ERR_FONT_API`,\n `No fontFamily can be used for the provided source: ${source}. The second argument of \\`loadAsync()\\` can only be used with a \\`string\\` value as the first argument.`\n );\n }\n const fontMap = fontFamilyOrFontMap;\n const names = Object.keys(fontMap);\n await Promise.all(names.map((name) => loadFontInNamespaceAsync(name, fontMap[name])));\n return;\n }\n\n return await loadFontInNamespaceAsync(fontFamilyOrFontMap, source);\n}\n\nasync function loadFontInNamespaceAsync(\n fontFamily: string,\n source?: FontSource | null\n): Promise {\n if (!source) {\n throw new CodedError(\n `ERR_FONT_SOURCE`,\n `Cannot load null or undefined font source: { \"${fontFamily}\": ${source} }. Expected asset of type \\`FontSource\\` for fontFamily of name: \"${fontFamily}\"`\n );\n }\n\n if (loaded[fontFamily]) {\n return;\n }\n\n if (loadPromises.hasOwnProperty(fontFamily)) {\n return loadPromises[fontFamily];\n }\n\n // Important: we want all callers that concurrently try to load the same font to await the same\n // promise. If we're here, we haven't created the promise yet. To ensure we create only one\n // promise in the program, we need to create the promise synchronously without yielding the event\n // loop from this point.\n\n const asset = getAssetForSource(source);\n loadPromises[fontFamily] = (async () => {\n try {\n await loadSingleFontAsync(fontFamily, asset);\n loaded[fontFamily] = true;\n } finally {\n delete loadPromises[fontFamily];\n }\n })();\n\n await loadPromises[fontFamily];\n}\n\n// @needsAudit\n/**\n * Unloads all the custom fonts. This is used for testing.\n */\nexport async function unloadAllAsync(): Promise {\n if (!ExpoFontLoader.unloadAllAsync) {\n throw new UnavailabilityError('expo-font', 'unloadAllAsync');\n }\n\n if (Object.keys(loadPromises).length) {\n throw new CodedError(\n `ERR_UNLOAD`,\n `Cannot unload fonts while they're still loading: ${Object.keys(loadPromises).join(', ')}`\n );\n }\n\n for (const fontFamily of Object.keys(loaded)) {\n delete loaded[fontFamily];\n }\n\n await ExpoFontLoader.unloadAllAsync();\n}\n\n// @needsAudit\n/**\n * Unload custom fonts matching the `fontFamily`s and display values provided.\n * Because fonts are automatically unloaded on every platform this is mostly used for testing.\n *\n * @param fontFamilyOrFontMap The name or names of the custom fonts that will be unloaded.\n * @param options When `fontFamilyOrFontMap` is a string, this should be the font source used to load\n * the custom font originally.\n */\nexport async function unloadAsync(\n fontFamilyOrFontMap: string | Record,\n options?: UnloadFontOptions\n): Promise {\n if (!ExpoFontLoader.unloadAsync) {\n throw new UnavailabilityError('expo-font', 'unloadAsync');\n }\n if (typeof fontFamilyOrFontMap === 'object') {\n if (options) {\n throw new CodedError(\n `ERR_FONT_API`,\n `No fontFamily can be used for the provided options: ${options}. The second argument of \\`unloadAsync()\\` can only be used with a \\`string\\` value as the first argument.`\n );\n }\n const fontMap = fontFamilyOrFontMap;\n const names = Object.keys(fontMap);\n await Promise.all(names.map((name) => unloadFontInNamespaceAsync(name, fontMap[name])));\n return;\n }\n\n return await unloadFontInNamespaceAsync(fontFamilyOrFontMap, options);\n}\n\nasync function unloadFontInNamespaceAsync(\n fontFamily: string,\n options?: UnloadFontOptions | null\n): Promise {\n if (!loaded[fontFamily]) {\n return;\n } else {\n delete loaded[fontFamily];\n }\n\n // Important: we want all callers that concurrently try to load the same font to await the same\n // promise. If we're here, we haven't created the promise yet. To ensure we create only one\n // promise in the program, we need to create the promise synchronously without yielding the event\n // loop from this point.\n\n const nativeFontName = getNativeFontName(fontFamily);\n\n if (!nativeFontName) {\n throw new CodedError(`ERR_FONT_FAMILY`, `Cannot unload an empty name`);\n }\n\n await ExpoFontLoader.unloadAsync(nativeFontName, options);\n}\n\nexport { FontDisplay, FontSource, FontResource, UnloadFontOptions };\n","import { Asset } from 'expo-asset';\n\n// @needsAudit\n/**\n * The different types of assets you can provide to the [`loadAsync()`](#loadAsync) function.\n * A font source can be a URI, a module ID, or an Expo Asset.\n */\nexport type FontSource = string | number | Asset | FontResource;\n\n// @needsAudit\n/**\n * An object used to dictate the resource that is loaded into the provided font namespace when used\n * with [`loadAsync`](#loadasync).\n */\nexport type FontResource = {\n uri?: string | number;\n /**\n * Sets the [`font-display`](#fontdisplay) property for a given typeface in the browser.\n * @platform web\n */\n display?: FontDisplay;\n default?: string;\n};\n\n// @needsAudit\n/**\n * Sets the [font-display](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display)\n * for a given typeface. The default font value on web is `FontDisplay.AUTO`.\n * Even though setting the `fontDisplay` does nothing on native platforms, the default behavior\n * emulates `FontDisplay.SWAP` on flagship devices like iOS, Samsung, Pixel, etc. Default\n * functionality varies on One Plus devices. In the browser this value is set in the generated\n * `@font-face` CSS block and not as a style property meaning you cannot dynamically change this\n * value based on the element it's used in.\n * @platform web\n */\nexport enum FontDisplay {\n /**\n * __(Default)__ The font display strategy is defined by the user agent or platform.\n * This generally defaults to the text being invisible until the font is loaded.\n * Good for buttons or banners that require a specific treatment.\n */\n AUTO = 'auto',\n /**\n * Fallback text is rendered immediately with a default font while the desired font is loaded.\n * This is good for making the content appear to load instantly and is usually preferred.\n */\n SWAP = 'swap',\n /**\n * The text will be invisible until the font has loaded. If the font fails to load then nothing\n * will appear - it's best to turn this off when debugging missing text.\n */\n BLOCK = 'block',\n /**\n * Splits the behavior between `SWAP` and `BLOCK`.\n * There will be a [100ms timeout](https://developers.google.com/web/updates/2016/02/font-display?hl=en)\n * where the text with a custom font is invisible, after that the text will either swap to the\n * styled text or it'll show the unstyled text and continue to load the custom font. This is good\n * for buttons that need a custom font but should also be quickly available to screen-readers.\n */\n FALLBACK = 'fallback',\n /**\n * This works almost identically to `FALLBACK`, the only difference is that the browser will\n * decide to load the font based on slow connection speed or critical resource demand.\n */\n OPTIONAL = 'optional',\n}\n\n// @needsAudit\n/**\n * Object used to query fonts for unloading.\n */\nexport type UnloadFontOptions = Pick;\n","import { useEffect, useState } from 'react';\n\nimport { loadAsync } from './Font';\nimport { FontSource } from './Font.types';\n\n// @needsAudit\n/**\n * ```ts\n * const [loaded, error] = useFonts({ ... });\n * ```\n * Load a map of fonts with [`loadAsync`](#loadasync). This returns a `boolean` if the fonts are\n * loaded and ready to use. It also returns an error if something went wrong, to use in development.\n *\n * > Note, the fonts are not \"reloaded\" when you dynamically change the font map.\n *\n * @param map A map of `fontFamily`s to [`FontSource`](#fontsource)s. After loading the font you can\n * use the key in the `fontFamily` style prop of a `Text` element.\n *\n * @return\n * - __loaded__ (`boolean`) - A boolean to detect if the font for `fontFamily` has finished\n * loading.\n * - __error__ (`Error | null`) - An error encountered when loading the fonts.\n */\nexport function useFonts(map: string | Record): [boolean, Error | null] {\n const [loaded, setLoaded] = useState(false);\n const [error, setError] = useState(null);\n\n useEffect(() => {\n loadAsync(map)\n .then(() => setLoaded(true))\n .catch(setError);\n }, []);\n\n return [loaded, error];\n}\n","import { Asset } from 'expo-asset';\nimport { CodedError } from 'expo-modules-core';\n\nimport ExpoFontLoader from './ExpoFontLoader';\nimport { FontResource, FontSource, FontDisplay } from './Font.types';\n\nfunction uriFromFontSource(asset: any): string | null {\n if (typeof asset === 'string') {\n return asset || null;\n } else if (typeof asset === 'object') {\n return asset.uri || asset.localUri || asset.default || null;\n } else if (typeof asset === 'number') {\n return uriFromFontSource(Asset.fromModule(asset));\n }\n return null;\n}\n\nfunction displayFromFontSource(asset: any): FontDisplay | undefined {\n return asset.display || FontDisplay.AUTO;\n}\n\nexport function fontFamilyNeedsScoping(name: string): boolean {\n return false;\n}\n\nexport function getAssetForSource(source: FontSource): Asset | FontResource {\n const uri = uriFromFontSource(source);\n const display = displayFromFontSource(source);\n\n if (!uri || typeof uri !== 'string') {\n throwInvalidSourceError(uri);\n }\n\n return {\n uri: uri!,\n display,\n };\n}\n\nfunction throwInvalidSourceError(source: any): never {\n let type: string = typeof source;\n if (type === 'object') type = JSON.stringify(source, null, 2);\n throw new CodedError(\n `ERR_FONT_SOURCE`,\n `Expected font asset of type \\`string | FontResource | Asset\\` instead got: ${type}`\n );\n}\n\nexport async function loadSingleFontAsync(\n name: string,\n input: Asset | FontResource\n): Promise {\n if (typeof input !== 'object' || typeof input.uri !== 'string' || (input as any).downloadAsync) {\n throwInvalidSourceError(input);\n }\n\n await ExpoFontLoader.loadAsync(name, input);\n}\n\nexport function getNativeFontName(name: string): string {\n return name;\n}\n","export * from './Font';\nexport { useFonts } from './FontHooks';\n","import invariant from 'invariant';\nimport { NativeEventEmitter, NativeModules, Platform } from 'react-native';\n\nconst nativeEmitterSubscriptionKey = '@@nativeEmitterSubscription@@';\n\ntype NativeModule = {\n __expo_module_name__?: string;\n startObserving?: () => void;\n stopObserving?: () => void;\n addListener: (eventName: string) => void;\n removeListeners: (count: number) => void;\n};\n\n// @needsAudit\nexport type Subscription = {\n /**\n * A method to unsubscribe the listener.\n */\n remove: () => void;\n};\n\nexport class EventEmitter {\n _listenerCount = 0;\n _nativeModule: NativeModule;\n _eventEmitter: NativeEventEmitter;\n\n constructor(nativeModule: NativeModule) {\n // Expo modules installed through the JSI don't have `addListener` and `removeListeners` set,\n // so if someone wants to use them with `EventEmitter`, make sure to provide these functions\n // as they are required by `NativeEventEmitter`. This is only temporary — in the future\n // JSI modules will have event emitter built in.\n if (nativeModule.__expo_module_name__ && NativeModules.EXReactNativeEventEmitter) {\n nativeModule.addListener = (...args) =>\n NativeModules.EXReactNativeEventEmitter.addProxiedListener(\n nativeModule.__expo_module_name__,\n ...args\n );\n nativeModule.removeListeners = (...args) =>\n NativeModules.EXReactNativeEventEmitter.removeProxiedListeners(\n nativeModule.__expo_module_name__,\n ...args\n );\n }\n this._nativeModule = nativeModule;\n this._eventEmitter = new NativeEventEmitter(nativeModule as any);\n }\n\n addListener(eventName: string, listener: (event: T) => void): Subscription {\n if (!this._listenerCount && Platform.OS !== 'ios' && this._nativeModule.startObserving) {\n this._nativeModule.startObserving();\n }\n\n this._listenerCount++;\n const nativeEmitterSubscription = this._eventEmitter.addListener(eventName, listener);\n const subscription = {\n [nativeEmitterSubscriptionKey]: nativeEmitterSubscription,\n remove: () => {\n this.removeSubscription(subscription);\n },\n };\n return subscription;\n }\n\n removeAllListeners(eventName: string): void {\n // @ts-ignore: the EventEmitter interface has been changed in react-native@0.64.0\n const removedListenerCount = this._eventEmitter.listenerCount\n ? // @ts-ignore: this is available since 0.64\n this._eventEmitter.listenerCount(eventName)\n : // @ts-ignore: this is available in older versions\n this._eventEmitter.listeners(eventName).length;\n this._eventEmitter.removeAllListeners(eventName);\n this._listenerCount -= removedListenerCount;\n invariant(\n this._listenerCount >= 0,\n `EventEmitter must have a non-negative number of listeners`\n );\n\n if (!this._listenerCount && Platform.OS !== 'ios' && this._nativeModule.stopObserving) {\n this._nativeModule.stopObserving();\n }\n }\n\n removeSubscription(subscription: Subscription): void {\n const nativeEmitterSubscription = subscription[nativeEmitterSubscriptionKey];\n if (!nativeEmitterSubscription) {\n return;\n }\n\n if ('remove' in nativeEmitterSubscription) {\n // `react-native-web@0.17.1` doesn't support `removeSubscription`\n nativeEmitterSubscription.remove();\n } else if ('removeSubscription' in this._eventEmitter) {\n this._eventEmitter.removeSubscription(nativeEmitterSubscription!);\n }\n this._listenerCount--;\n\n // Ensure that the emitter's internal state remains correct even if `removeSubscription` is\n // called again with the same subscription\n delete subscription[nativeEmitterSubscriptionKey];\n\n // Release closed-over references to the emitter\n subscription.remove = () => {};\n\n if (!this._listenerCount && Platform.OS !== 'ios' && this._nativeModule.stopObserving) {\n this._nativeModule.stopObserving();\n }\n }\n\n emit(eventName: string, ...params: any[]): void {\n this._eventEmitter.emit(eventName, ...params);\n }\n}\n","import { ProxyNativeModule } from './NativeModulesProxy.types';\n\n// We default to an empty object shim wherever we don't have an environment-specific implementation\nexport default {} as { [moduleName: string]: ProxyNativeModule };\n","import React from 'react';\n\nimport { UnavailabilityError } from './errors/UnavailabilityError';\n\nexport function requireNativeViewManager

(viewName: string): React.ComponentType

{\n throw new UnavailabilityError('expo-modules-core', 'requireNativeViewManager');\n}\n","import { useCallback, useEffect, useRef, useState } from 'react';\n\nimport { PermissionResponse } from './PermissionsInterface';\n\n// These types are identical, but improves the readability for suggestions in editors\ntype RequestPermissionMethod = () => Promise;\ntype GetPermissionMethod = () => Promise;\n\ninterface PermissionHookMethods {\n /** The permission method that requests the user to grant permission. */\n requestMethod: (options?: Options) => Promise;\n /** The permission method that only fetches the current permission status. */\n getMethod: (options?: Options) => Promise;\n}\n\ninterface PermissionHookBehavior {\n /** If the hook should automatically fetch the current permission status, without asking the user. */\n get?: boolean;\n /** If the hook should automatically request the user to grant permission. */\n request?: boolean;\n}\n\nexport type PermissionHookOptions = PermissionHookBehavior & Options;\n\n/**\n * Get or request permission for protected functionality within the app.\n * It uses separate permission requesters to interact with a single permission.\n * By default, the hook will only retrieve the permission status.\n */\nfunction usePermission(\n methods: PermissionHookMethods,\n options?: PermissionHookOptions\n): [Permission | null, RequestPermissionMethod, GetPermissionMethod] {\n const isMounted = useRef(true);\n const [status, setStatus] = useState(null);\n const { get = true, request = false, ...permissionOptions } = options || {};\n\n const getPermission = useCallback(async () => {\n const response = await methods.getMethod(\n Object.keys(permissionOptions).length > 0 ? (permissionOptions as Options) : undefined\n );\n if (isMounted.current) setStatus(response);\n return response;\n }, [methods.getMethod]);\n\n const requestPermission = useCallback(async () => {\n const response = await methods.requestMethod(\n Object.keys(permissionOptions).length > 0 ? (permissionOptions as Options) : undefined\n );\n if (isMounted.current) setStatus(response);\n return response;\n }, [methods.requestMethod]);\n\n useEffect(\n function runMethods() {\n if (request) requestPermission();\n if (!request && get) getPermission();\n },\n [get, request, requestPermission, getPermission]\n );\n\n // Workaround for unmounting components receiving state updates\n useEffect(function didMount() {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n\n return [status, requestPermission, getPermission];\n}\n\n/**\n * Create a new permission hook with the permission methods built-in.\n * This can be used to quickly create specific permission hooks in every module.\n */\nexport function createPermissionHook(\n methods: PermissionHookMethods\n) {\n return (options?: PermissionHookOptions) =>\n usePermission(methods, options);\n}\n","export enum PermissionStatus {\n /**\n * User has granted the permission.\n */\n GRANTED = 'granted',\n /**\n * User hasn't granted or denied the permission yet.\n */\n UNDETERMINED = 'undetermined',\n /**\n * User has denied the permission.\n */\n DENIED = 'denied',\n}\n\n/**\n * Permission expiration time. Currently, all permissions are granted permanently.\n */\nexport type PermissionExpiration = 'never' | number;\n\n/**\n * An object obtained by permissions get and request functions.\n */\nexport interface PermissionResponse {\n /**\n * Determines the status of the permission.\n */\n status: PermissionStatus;\n /**\n * Determines time when the permission expires.\n */\n expires: PermissionExpiration;\n /**\n * A convenience boolean that indicates if the permission is granted.\n */\n granted: boolean;\n /**\n * Indicates if user can be asked again for specific permission.\n * If not, one should be directed to the Settings app\n * in order to enable/disable the permission.\n */\n canAskAgain: boolean;\n}\n","import { Platform as ReactNativePlatform, PlatformOSType } from 'react-native';\n\nimport {\n isDOMAvailable,\n canUseEventListeners,\n canUseViewport,\n isAsyncDebugging,\n} from './environment/browser';\n\nexport type PlatformSelectOSType = PlatformOSType | 'native' | 'electron' | 'default';\n\nexport type PlatformSelect = (specifics: { [platform in PlatformSelectOSType]?: T }) => T;\n\nconst Platform = {\n /**\n * Denotes the currently running platform.\n * Can be one of ios, android, web.\n */\n OS: ReactNativePlatform.OS,\n /**\n * Returns the value with the matching platform.\n * Object keys can be any of ios, android, native, web, default.\n *\n * @ios ios, native, default\n * @android android, native, default\n * @web web, default\n */\n select: ReactNativePlatform.select as PlatformSelect,\n /**\n * Denotes if the DOM API is available in the current environment.\n * The DOM is not available in native React runtimes and Node.js.\n */\n isDOMAvailable,\n /**\n * Denotes if the current environment can attach event listeners\n * to the window. This will return false in native React\n * runtimes and Node.js.\n */\n canUseEventListeners,\n /**\n * Denotes if the current environment can inspect properties of the\n * screen on which the current window is being rendered. This will\n * return false in native React runtimes and Node.js.\n */\n canUseViewport,\n /**\n * If the JavaScript is being executed in a remote JavaScript environment.\n * When `true`, synchronous native invocations cannot be executed.\n */\n isAsyncDebugging,\n};\n\nexport default Platform;\n","import compareVersions from 'compare-versions';\n\nimport { CodedError } from './errors/CodedError';\n\nconst postedWarnings: { [key: string]: boolean } = {};\n\n/**\n * Used for deprecating values and throwing an error if a given version of Expo has passed.\n */\nexport default function deprecate(\n library: string,\n deprecatedAPI: string,\n options: {\n replacement?: string;\n currentVersion?: string;\n versionToRemove?: string;\n } = {}\n): void {\n const { currentVersion, versionToRemove, replacement } = options;\n const code = codeFromLibrary(library);\n const key = `${code}:${deprecatedAPI}:${replacement}`;\n if (!postedWarnings[key]) {\n postedWarnings[key] = true;\n }\n\n if (\n !currentVersion ||\n !versionToRemove ||\n compareVersions(currentVersion, versionToRemove) >= 0\n ) {\n let message = `\\`${deprecatedAPI}\\` has been removed`;\n if (versionToRemove) {\n message = `${message} as of version \"${versionToRemove}\"`;\n }\n if (replacement && replacement.length) {\n message = `${message} please migrate to: \\`${replacement}\\``;\n }\n\n throw new CodedError(`ERR_DEPRECATED_API`, prependLibrary(library, message));\n }\n\n let message = `\\`${deprecatedAPI}\\` has been deprecated`;\n if (replacement && replacement.length) {\n message = `${message} in favor of \\`${replacement}\\``;\n }\n if (versionToRemove && versionToRemove.length) {\n message = `${message} and will be removed in version \"${versionToRemove}\"`;\n }\n console.warn(prependLibrary(library, message));\n}\n\nfunction prependLibrary(library: string, message: string): string {\n return `${library}: ${message}`;\n}\n\n/**\n * Transform format:\n * Expo.AR -> EXPO_AR\n * expo-ar -> EXPO_AR\n */\nfunction codeFromLibrary(library: string): string {\n const code = library.replace(/[-.]/g, '_').toUpperCase();\n return code;\n}\n","declare global {\n // Add IE-specific interface to Window\n interface Window {\n attachEvent(event: string, listener: EventListener): boolean;\n }\n}\n\n// Used for delegating node actions when browser APIs aren't available\n// like in SSR websites.\nexport const isDOMAvailable = typeof window !== 'undefined' && !!window.document?.createElement;\nexport const canUseEventListeners =\n isDOMAvailable && !!(window.addEventListener || window.attachEvent);\nexport const canUseViewport = isDOMAvailable && !!window.screen;\nexport const isAsyncDebugging = false;\n","/**\n * A general error class that should be used for all errors in Expo modules.\n * Guarantees a `code` field that can be used to differentiate between different\n * types of errors without further subclassing Error.\n */\nexport class CodedError extends Error {\n code: string;\n info?: any;\n\n constructor(code: string, message: string) {\n super(message);\n this.code = code;\n }\n}\n","import Platform from '../Platform';\nimport { CodedError } from './CodedError';\n\n/**\n * A class for errors to be thrown when a property is accessed which is\n * unavailable, unsupported, or not currently implemented on the running\n * platform.\n */\nexport class UnavailabilityError extends CodedError {\n constructor(moduleName: string, propertyName: string) {\n super(\n 'ERR_UNAVAILABLE',\n `The method or property ${moduleName}.${propertyName} is not available on ${Platform.OS}, are you sure you've linked all the native dependencies properly?`\n );\n }\n}\n","import { DeviceEventEmitter } from 'react-native';\n\nimport { EventEmitter, Subscription } from './EventEmitter';\nimport NativeModulesProxy from './NativeModulesProxy';\nimport { ProxyNativeModule } from './NativeModulesProxy.types';\nimport { requireNativeViewManager } from './NativeViewManagerAdapter';\nimport Platform from './Platform';\nimport SyntheticPlatformEmitter from './SyntheticPlatformEmitter';\nimport { CodedError } from './errors/CodedError';\nimport { UnavailabilityError } from './errors/UnavailabilityError';\n\nimport './sweet/setUpErrorManager.fx';\n\nexport { default as deprecate } from './deprecate';\n\nexport {\n DeviceEventEmitter,\n EventEmitter,\n NativeModulesProxy,\n ProxyNativeModule,\n Platform,\n Subscription,\n SyntheticPlatformEmitter,\n requireNativeViewManager,\n // Errors\n CodedError,\n UnavailabilityError,\n};\n\nexport * from './requireNativeModule';\nexport * from './TypedArrays.types';\n\n/**\n * @deprecated renamed to `DeviceEventEmitter`\n */\nexport const RCTDeviceEventEmitter = DeviceEventEmitter;\n\nexport * from './PermissionsInterface';\nexport * from './PermissionsHook';\n","import NativeModulesProxy from './NativeModulesProxy';\n\ntype ExpoObject = {\n modules:\n | undefined\n | {\n [key: string]: any;\n };\n};\n\ndeclare global {\n // eslint-disable-next-line no-var\n var expo: ExpoObject | undefined;\n\n /**\n * @deprecated `global.ExpoModules` is deprecated, use `global.expo.modules` instead.\n */\n // eslint-disable-next-line no-var\n var ExpoModules:\n | undefined\n | {\n [key: string]: any;\n };\n}\n\n/**\n * Imports the native module registered with given name. In the first place it tries to load\n * the module installed through the JSI host object and then falls back to the bridge proxy module.\n * Notice that the modules loaded from the proxy may not support some features like synchronous functions.\n *\n * @param moduleName Name of the requested native module.\n * @returns Object representing the native module.\n * @throws Error when there is no native module with given name.\n */\nexport function requireNativeModule(moduleName: string): ModuleType {\n const nativeModule: ModuleType =\n globalThis.expo?.modules?.[moduleName] ??\n globalThis.ExpoModules?.[moduleName] ??\n NativeModulesProxy[moduleName];\n\n if (!nativeModule) {\n throw new Error(`Cannot find native module '${moduleName}'`);\n }\n return nativeModule;\n}\n","import NativeModulesProxy from '../NativeModulesProxy';\nexport default NativeModulesProxy.ExpoModulesCoreErrorManager;\n","import { EventEmitter } from '../EventEmitter';\nimport Platform from '../Platform';\nimport { CodedError } from '../errors/CodedError';\nimport NativeErrorManager from './NativeErrorManager';\n\nif (__DEV__ && Platform.OS === 'android' && NativeErrorManager) {\n const onNewException = 'ExpoModulesCoreErrorManager.onNewException';\n const eventEmitter = new EventEmitter(NativeErrorManager);\n\n eventEmitter.addListener(onNewException, ({ message }: { message: string }) => {\n console.error(message);\n });\n}\n\n// We have to export `CodedError` via global object to use in later in the C++ code.\nglobalThis.ExpoModulesCore_CodedError = CodedError;\n","import registerRootComponent from 'expo/build/launch/registerRootComponent';\n\nimport App from '../../App';\n\nregisterRootComponent(App);\n","// When users dangerously import a file inside of react-native, it breaks the web alias.\n// This is one of the most common, and cryptic web errors that users encounter.\n// This conditional side-effect provides a more helpful error message for debugging.\n// Use a wrapper `__DEV__` to remove this entire block in production.\nif (__DEV__) {\n if (\n // Skip mocking if someone is shimming this value out.\n !('__fbBatchedBridgeConfig' in global)\n ) {\n Object.defineProperty(global, '__fbBatchedBridgeConfig', {\n get() {\n throw new Error(\n \"Your web project is importing a module from 'react-native' instead of 'react-native-web'. Learn more: https://expo.fyi/fb-batched-bridge-config-web\"\n );\n },\n });\n }\n}\n","export { createRoot } from 'react-dom/client';\n","import 'expo/build/Expo.fx';\n\nimport * as React from 'react';\nimport { AppRegistry, Platform } from 'react-native';\n\nimport { createRoot } from './createRoot';\n\ntype InitialProps = {\n exp: {\n notification?: any;\n manifestString?: string;\n [key: string]: any;\n };\n shell?: boolean;\n shellManifestUrl?: string;\n [key: string]: any;\n};\n\nexport default function registerRootComponent

(\n component: React.ComponentType

\n): void {\n let qualifiedComponent = component;\n\n if (process.env.NODE_ENV !== 'production') {\n const { withDevTools } = require('./withDevTools') as typeof import('./withDevTools');\n qualifiedComponent = withDevTools(component);\n }\n\n if (Platform.OS !== 'web') {\n AppRegistry.registerComponent('main', () => qualifiedComponent);\n } else if (\n // Skip querying the DOM if we're in a Node.js environment.\n typeof document !== 'undefined'\n ) {\n let tag = document.getElementById('root');\n\n if (!tag) {\n tag = document.getElementById('main');\n if (process.env.NODE_ENV !== 'production') {\n // This block will be removed in production\n if (tag) {\n console.warn(\n 'Mounting the root React component to an HTML element with id \"main\" is deprecated. Use id \"root\" instead.'\n );\n }\n }\n }\n\n if (!tag) {\n throw new Error(\n 'Required HTML element with id \"root\" was not found in the document HTML. This is required for mounting the root React component.'\n );\n }\n\n const rootTag = createRoot(tag);\n rootTag.render(React.createElement(qualifiedComponent));\n }\n}\n","'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict';\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n/**\n * Simple, lightweight module assisting with the detection and context of\n * Worker. Helps avoid circular dependencies and allows code to reason about\n * whether or not they are in a Worker, even if they never include the main\n * `ReactWorker` dependency.\n */\n\nvar ExecutionEnvironment = {\n canUseDOM: canUseDOM,\n canUseWorkers: typeof Worker !== 'undefined',\n canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),\n canUseViewport: canUseDOM && !!window.screen,\n isInWorker: !canUseDOM // For now, this is true - might change in the future.\n\n};\nmodule.exports = ExecutionEnvironment;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\n\n\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\n\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\n\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n'use strict';\n\nvar validateFormat = process.env.NODE_ENV !== \"production\" ? function (format) {\n if (format === undefined) {\n throw new Error('invariant(...): Second argument must be a string.');\n }\n} : function (format) {};\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments to provide\n * information about what broke and what you were expecting.\n *\n * The invariant message will be stripped in production, but the invariant will\n * remain to ensure logic does not differ in production.\n */\n\nfunction invariant(condition, format) {\n for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n validateFormat(format);\n\n if (!condition) {\n var error;\n\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return String(args[argIndex++]);\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // Skip invariant's own stack frame.\n\n throw error;\n }\n}\n\nmodule.exports = invariant;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict';\n\nvar emptyFunction = require(\"./emptyFunction\");\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\n\nfunction printWarning(format) {\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\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n}\n\nvar warning = process.env.NODE_ENV !== \"production\" ? function (condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(void 0, [format].concat(args));\n }\n} : emptyFunction;\nmodule.exports = warning;","/* Font Face Observer v2.3.0 - © Bram Stein. License: BSD-3-Clause */(function(){function p(a,c){document.addEventListener?a.addEventListener(\"scroll\",c,!1):a.attachEvent(\"scroll\",c)}function u(a){document.body?a():document.addEventListener?document.addEventListener(\"DOMContentLoaded\",function b(){document.removeEventListener(\"DOMContentLoaded\",b);a()}):document.attachEvent(\"onreadystatechange\",function g(){if(\"interactive\"==document.readyState||\"complete\"==document.readyState)document.detachEvent(\"onreadystatechange\",g),a()})};function w(a){this.g=document.createElement(\"div\");this.g.setAttribute(\"aria-hidden\",\"true\");this.g.appendChild(document.createTextNode(a));this.h=document.createElement(\"span\");this.i=document.createElement(\"span\");this.m=document.createElement(\"span\");this.j=document.createElement(\"span\");this.l=-1;this.h.style.cssText=\"max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;\";this.i.style.cssText=\"max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;\";\nthis.j.style.cssText=\"max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;\";this.m.style.cssText=\"display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;\";this.h.appendChild(this.m);this.i.appendChild(this.j);this.g.appendChild(this.h);this.g.appendChild(this.i)}\nfunction x(a,c){a.g.style.cssText=\"max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:\"+c+\";\"}function B(a){var c=a.g.offsetWidth,b=c+100;a.j.style.width=b+\"px\";a.i.scrollLeft=b;a.h.scrollLeft=a.h.scrollWidth+100;return a.l!==c?(a.l=c,!0):!1}function C(a,c){function b(){var e=g;B(e)&&null!==e.g.parentNode&&c(e.l)}var g=a;p(a.h,b);p(a.i,b);B(a)};function D(a,c,b){c=c||{};b=b||window;this.family=a;this.style=c.style||\"normal\";this.weight=c.weight||\"normal\";this.stretch=c.stretch||\"normal\";this.context=b}var E=null,F=null,G=null,H=null;function I(a){null===F&&(M(a)&&/Apple/.test(window.navigator.vendor)?(a=/AppleWebKit\\/([0-9]+)(?:\\.([0-9]+))(?:\\.([0-9]+))/.exec(window.navigator.userAgent),F=!!a&&603>parseInt(a[1],10)):F=!1);return F}function M(a){null===H&&(H=!!a.document.fonts);return H}\nfunction N(a,c){var b=a.style,g=a.weight;if(null===G){var e=document.createElement(\"div\");try{e.style.font=\"condensed 100px sans-serif\"}catch(q){}G=\"\"!==e.style.font}return[b,g,G?a.stretch:\"\",\"100px\",c].join(\" \")}\nD.prototype.load=function(a,c){var b=this,g=a||\"BESbswy\",e=0,q=c||3E3,J=(new Date).getTime();return new Promise(function(K,L){if(M(b.context)&&!I(b.context)){var O=new Promise(function(r,t){function h(){(new Date).getTime()-J>=q?t(Error(\"\"+q+\"ms timeout exceeded\")):b.context.document.fonts.load(N(b,'\"'+b.family+'\"'),g).then(function(n){1<=n.length?r():setTimeout(h,25)},t)}h()}),P=new Promise(function(r,t){e=setTimeout(function(){t(Error(\"\"+q+\"ms timeout exceeded\"))},q)});Promise.race([P,O]).then(function(){clearTimeout(e);\nK(b)},L)}else u(function(){function r(){var d;if(d=-1!=k&&-1!=l||-1!=k&&-1!=m||-1!=l&&-1!=m)(d=k!=l&&k!=m&&l!=m)||(null===E&&(d=/AppleWebKit\\/([0-9]+)(?:\\.([0-9]+))/.exec(window.navigator.userAgent),E=!!d&&(536>parseInt(d[1],10)||536===parseInt(d[1],10)&&11>=parseInt(d[2],10))),d=E&&(k==y&&l==y&&m==y||k==z&&l==z&&m==z||k==A&&l==A&&m==A)),d=!d;d&&(null!==f.parentNode&&f.parentNode.removeChild(f),clearTimeout(e),K(b))}function t(){if((new Date).getTime()-J>=q)null!==f.parentNode&&f.parentNode.removeChild(f),\nL(Error(\"\"+q+\"ms timeout exceeded\"));else{var d=b.context.document.hidden;if(!0===d||void 0===d)k=h.g.offsetWidth,l=n.g.offsetWidth,m=v.g.offsetWidth,r();e=setTimeout(t,50)}}var h=new w(g),n=new w(g),v=new w(g),k=-1,l=-1,m=-1,y=-1,z=-1,A=-1,f=document.createElement(\"div\");f.dir=\"ltr\";x(h,N(b,\"sans-serif\"));x(n,N(b,\"serif\"));x(v,N(b,\"monospace\"));f.appendChild(h.g);f.appendChild(n.g);f.appendChild(v.g);b.context.document.body.appendChild(f);y=h.g.offsetWidth;z=n.g.offsetWidth;A=v.g.offsetWidth;t();\nC(h,function(d){k=d;r()});x(h,N(b,'\"'+b.family+'\",sans-serif'));C(n,function(d){l=d;r()});x(n,N(b,'\"'+b.family+'\",serif'));C(v,function(d){m=d;r()});x(v,N(b,'\"'+b.family+'\",monospace'))})})};\"object\"===typeof module?module.exports=D:(window.FontFaceObserver=D,window.FontFaceObserver.prototype.load=D.prototype.load);}());\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","var win;\n\nif (typeof window !== \"undefined\") {\n win = window;\n} else if (typeof global !== \"undefined\") {\n win = global;\n} else if (typeof self !== \"undefined\"){\n win = self;\n} else {\n win = {};\n}\n\nmodule.exports = win;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar bind = require('function-bind');\n\nmodule.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);\n","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/* eslint-disable no-var, prefer-template */\nvar uppercasePattern = /[A-Z]/g\nvar msPattern = /^ms-/\nvar cache = {}\n\nfunction toHyphenLower(match) {\n return '-' + match.toLowerCase()\n}\n\nfunction hyphenateStyleName(name) {\n if (cache.hasOwnProperty(name)) {\n return cache[name]\n }\n\n var hName = name.replace(uppercasePattern, toHyphenLower)\n return (cache[name] = msPattern.test(hName) ? '-' + hName : hName)\n}\n\nexport default hyphenateStyleName\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createPrefixer;\n\nvar _prefixProperty = require('./utils/prefixProperty');\n\nvar _prefixProperty2 = _interopRequireDefault(_prefixProperty);\n\nvar _prefixValue = require('./utils/prefixValue');\n\nvar _prefixValue2 = _interopRequireDefault(_prefixValue);\n\nvar _addNewValuesOnly = require('./utils/addNewValuesOnly');\n\nvar _addNewValuesOnly2 = _interopRequireDefault(_addNewValuesOnly);\n\nvar _isObject = require('./utils/isObject');\n\nvar _isObject2 = _interopRequireDefault(_isObject);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction createPrefixer(_ref) {\n var prefixMap = _ref.prefixMap,\n plugins = _ref.plugins;\n\n return function prefix(style) {\n for (var property in style) {\n var value = style[property];\n\n // handle nested objects\n if ((0, _isObject2.default)(value)) {\n style[property] = prefix(value);\n // handle array values\n } else if (Array.isArray(value)) {\n var combinedValue = [];\n\n for (var i = 0, len = value.length; i < len; ++i) {\n var processedValue = (0, _prefixValue2.default)(plugins, property, value[i], style, prefixMap);\n\n (0, _addNewValuesOnly2.default)(combinedValue, processedValue || value[i]);\n }\n\n // only modify the value if it was touched\n // by any plugin to prevent unnecessary mutations\n if (combinedValue.length > 0) {\n style[property] = combinedValue;\n }\n } else {\n var _processedValue = (0, _prefixValue2.default)(plugins, property, value, style, prefixMap);\n\n // only modify the value if it was touched\n // by any plugin to prevent unnecessary mutations\n if (_processedValue) {\n style[property] = _processedValue;\n }\n\n style = (0, _prefixProperty2.default)(prefixMap, property, style);\n }\n }\n\n return style;\n };\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = backgroundClip;\nfunction backgroundClip() {\n return null;\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = crossFade;\n\nvar _cssInJsUtils = require('css-in-js-utils');\n\nvar CROSS_FADE_REGEX = /cross-fade\\(/g;\n// http://caniuse.com/#search=cross-fade\nvar prefixes = ['-webkit-', ''];\n\nfunction crossFade(property, value) {\n if (typeof value === 'string' && !(0, _cssInJsUtils.isPrefixedValue)(value) && value.indexOf('cross-fade(') !== -1) {\n return prefixes.map(function (prefix) {\n return value.replace(CROSS_FADE_REGEX, prefix + 'cross-fade(');\n });\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = cursor;\nvar prefixes = ['-webkit-', '-moz-', ''];\n\nvar values = {\n 'zoom-in': true,\n 'zoom-out': true,\n grab: true,\n grabbing: true\n};\n\nfunction cursor(property, value) {\n if (property === 'cursor' && values.hasOwnProperty(value)) {\n return prefixes.map(function (prefix) {\n return prefix + value;\n });\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = filter;\n\nvar _cssInJsUtils = require('css-in-js-utils');\n\nvar FILTER_REGEX = /filter\\(/g;\n// http://caniuse.com/#feat=css-filter-function\nvar prefixes = ['-webkit-', ''];\n\nfunction filter(property, value) {\n if (typeof value === 'string' && !(0, _cssInJsUtils.isPrefixedValue)(value) && value.indexOf('filter(') !== -1) {\n return prefixes.map(function (prefix) {\n return value.replace(FILTER_REGEX, prefix + 'filter(');\n });\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = imageSet;\n\nvar _isPrefixedValue = require('css-in-js-utils/lib/isPrefixedValue');\n\nvar _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// http://caniuse.com/#feat=css-image-set\nvar prefixes = ['-webkit-', ''];\n\nfunction imageSet(property, value) {\n if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.indexOf('image-set(') > -1) {\n return prefixes.map(function (prefix) {\n return value.replace(/image-set\\(/g, prefix + 'image-set(');\n });\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = logical;\nvar alternativeProps = {\n marginBlockStart: ['WebkitMarginBefore'],\n marginBlockEnd: ['WebkitMarginAfter'],\n marginInlineStart: ['WebkitMarginStart', 'MozMarginStart'],\n marginInlineEnd: ['WebkitMarginEnd', 'MozMarginEnd'],\n paddingBlockStart: ['WebkitPaddingBefore'],\n paddingBlockEnd: ['WebkitPaddingAfter'],\n paddingInlineStart: ['WebkitPaddingStart', 'MozPaddingStart'],\n paddingInlineEnd: ['WebkitPaddingEnd', 'MozPaddingEnd'],\n borderBlockStart: ['WebkitBorderBefore'],\n borderBlockStartColor: ['WebkitBorderBeforeColor'],\n borderBlockStartStyle: ['WebkitBorderBeforeStyle'],\n borderBlockStartWidth: ['WebkitBorderBeforeWidth'],\n borderBlockEnd: ['WebkitBorderAfter'],\n borderBlockEndColor: ['WebkitBorderAfterColor'],\n borderBlockEndStyle: ['WebkitBorderAfterStyle'],\n borderBlockEndWidth: ['WebkitBorderAfterWidth'],\n borderInlineStart: ['WebkitBorderStart', 'MozBorderStart'],\n borderInlineStartColor: ['WebkitBorderStartColor', 'MozBorderStartColor'],\n borderInlineStartStyle: ['WebkitBorderStartStyle', 'MozBorderStartStyle'],\n borderInlineStartWidth: ['WebkitBorderStartWidth', 'MozBorderStartWidth'],\n borderInlineEnd: ['WebkitBorderEnd', 'MozBorderEnd'],\n borderInlineEndColor: ['WebkitBorderEndColor', 'MozBorderEndColor'],\n borderInlineEndStyle: ['WebkitBorderEndStyle', 'MozBorderEndStyle'],\n borderInlineEndWidth: ['WebkitBorderEndWidth', 'MozBorderEndWidth']\n};\n\nfunction logical(property, value, style) {\n if (Object.prototype.hasOwnProperty.call(alternativeProps, property)) {\n var alternativePropList = alternativeProps[property];\n for (var i = 0, len = alternativePropList.length; i < len; ++i) {\n style[alternativePropList[i]] = value;\n }\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = position;\nfunction position(property, value) {\n if (property === 'position' && value === 'sticky') {\n return ['-webkit-sticky', 'sticky'];\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = sizing;\nvar prefixes = ['-webkit-', '-moz-', ''];\n\nvar properties = {\n maxHeight: true,\n maxWidth: true,\n width: true,\n height: true,\n columnWidth: true,\n minWidth: true,\n minHeight: true\n};\nvar values = {\n 'min-content': true,\n 'max-content': true,\n 'fill-available': true,\n 'fit-content': true,\n 'contain-floats': true\n};\n\nfunction sizing(property, value) {\n if (properties.hasOwnProperty(property) && values.hasOwnProperty(value)) {\n return prefixes.map(function (prefix) {\n return prefix + value;\n });\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = transition;\n\nvar _hyphenateProperty = require('css-in-js-utils/lib/hyphenateProperty');\n\nvar _hyphenateProperty2 = _interopRequireDefault(_hyphenateProperty);\n\nvar _isPrefixedValue = require('css-in-js-utils/lib/isPrefixedValue');\n\nvar _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);\n\nvar _capitalizeString = require('../utils/capitalizeString');\n\nvar _capitalizeString2 = _interopRequireDefault(_capitalizeString);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar properties = {\n transition: true,\n transitionProperty: true,\n WebkitTransition: true,\n WebkitTransitionProperty: true,\n MozTransition: true,\n MozTransitionProperty: true\n};\n\nvar prefixMapping = {\n Webkit: '-webkit-',\n Moz: '-moz-',\n ms: '-ms-'\n};\n\nfunction prefixValue(value, propertyPrefixMap) {\n if ((0, _isPrefixedValue2.default)(value)) {\n return value;\n }\n\n // only split multi values, not cubic beziers\n var multipleValues = value.split(/,(?![^()]*(?:\\([^()]*\\))?\\))/g);\n\n for (var i = 0, len = multipleValues.length; i < len; ++i) {\n var singleValue = multipleValues[i];\n var values = [singleValue];\n for (var property in propertyPrefixMap) {\n var dashCaseProperty = (0, _hyphenateProperty2.default)(property);\n\n if (singleValue.indexOf(dashCaseProperty) > -1 && dashCaseProperty !== 'order') {\n var prefixes = propertyPrefixMap[property];\n for (var j = 0, pLen = prefixes.length; j < pLen; ++j) {\n // join all prefixes and create a new value\n values.unshift(singleValue.replace(dashCaseProperty, prefixMapping[prefixes[j]] + dashCaseProperty));\n }\n }\n }\n\n multipleValues[i] = values.join(',');\n }\n\n return multipleValues.join(',');\n}\n\nfunction transition(property, value, style, propertyPrefixMap) {\n // also check for already prefixed transitions\n if (typeof value === 'string' && properties.hasOwnProperty(property)) {\n var outputValue = prefixValue(value, propertyPrefixMap);\n // if the property is already prefixed\n var webkitOutput = outputValue.split(/,(?![^()]*(?:\\([^()]*\\))?\\))/g).filter(function (val) {\n return !/-moz-|-ms-/.test(val);\n }).join(',');\n\n if (property.indexOf('Webkit') > -1) {\n return webkitOutput;\n }\n\n var mozOutput = outputValue.split(/,(?![^()]*(?:\\([^()]*\\))?\\))/g).filter(function (val) {\n return !/-webkit-|-ms-/.test(val);\n }).join(',');\n\n if (property.indexOf('Moz') > -1) {\n return mozOutput;\n }\n\n style['Webkit' + (0, _capitalizeString2.default)(property)] = webkitOutput;\n style['Moz' + (0, _capitalizeString2.default)(property)] = mozOutput;\n return outputValue;\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = addNewValuesOnly;\nfunction addIfNew(list, value) {\n if (list.indexOf(value) === -1) {\n list.push(value);\n }\n}\n\nfunction addNewValuesOnly(list, values) {\n if (Array.isArray(values)) {\n for (var i = 0, len = values.length; i < len; ++i) {\n addIfNew(list, values[i]);\n }\n } else {\n addIfNew(list, values);\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = capitalizeString;\nfunction capitalizeString(str) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isObject;\nfunction isObject(value) {\n return value instanceof Object && !Array.isArray(value);\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = prefixProperty;\n\nvar _capitalizeString = require('./capitalizeString');\n\nvar _capitalizeString2 = _interopRequireDefault(_capitalizeString);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction prefixProperty(prefixProperties, property, style) {\n var requiredPrefixes = prefixProperties[property];\n\n if (requiredPrefixes && style.hasOwnProperty(property)) {\n var capitalizedProperty = (0, _capitalizeString2.default)(property);\n\n for (var i = 0; i < requiredPrefixes.length; ++i) {\n var prefixedProperty = requiredPrefixes[i] + capitalizedProperty;\n\n if (!style[prefixedProperty]) {\n style[prefixedProperty] = style[property];\n }\n }\n }\n\n return style;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = prefixValue;\nfunction prefixValue(plugins, property, value, style, metaData) {\n for (var i = 0, len = plugins.length; i < len; ++i) {\n var processedValue = plugins[i](property, value, style, metaData);\n\n // we can stop processing if a value is returned\n // as all plugin criteria are unique\n if (processedValue) {\n return processedValue;\n }\n }\n}","// Expose `IntlPolyfill` as global to add locale data into runtime later on.\nglobal.IntlPolyfill = require('./lib/core.js');\n\n// Require all locale data for `Intl`. This module will be\n// ignored when bundling for the browser with Browserify/Webpack.\nrequire('./locale-data/complete.js');\n\n// hack to export the polyfill as global Intl if needed\nif (!global.Intl) {\n global.Intl = global.IntlPolyfill;\n global.IntlPolyfill.__applyLocaleSensitivePrototypes();\n}\n\n// providing an idiomatic api for the nodejs version of this module\nmodule.exports = global.IntlPolyfill;\n","'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n};\n\nvar jsx = function () {\n var REACT_ELEMENT_TYPE = typeof Symbol === \"function\" && Symbol.for && Symbol.for(\"react.element\") || 0xeac7;\n return function createRawReactElement(type, props, key, children) {\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n props = {};\n }\n\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n\n props.children = childArray;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : '' + key,\n ref: null,\n props: props,\n _owner: null\n };\n };\n}();\n\nvar asyncToGenerator = function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n return new Promise(function (resolve, reject) {\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n return Promise.resolve(value).then(function (value) {\n return step(\"next\", value);\n }, function (err) {\n return step(\"throw\", err);\n });\n }\n }\n\n return step(\"next\");\n });\n };\n};\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar defineEnumerableProperties = function (obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if (\"value\" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n\n return obj;\n};\n\nvar defaults = function (obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n\n return obj;\n};\n\nvar defineProperty$1 = function (obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nvar get = function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if (\"value\" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n};\n\nvar inherits = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\nvar _instanceof = function (left, right) {\n if (right != null && typeof Symbol !== \"undefined\" && right[Symbol.hasInstance]) {\n return right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n};\n\nvar interopRequireDefault = function (obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n};\n\nvar interopRequireWildcard = function (obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n\n newObj.default = obj;\n return newObj;\n }\n};\n\nvar newArrowCheck = function (innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError(\"Cannot instantiate an arrow function\");\n }\n};\n\nvar objectDestructuringEmpty = function (obj) {\n if (obj == null) throw new TypeError(\"Cannot destructure undefined\");\n};\n\nvar objectWithoutProperties = function (obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n};\n\nvar possibleConstructorReturn = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n\nvar selfGlobal = typeof global === \"undefined\" ? self : global;\n\nvar set = function set(object, property, value, receiver) {\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent !== null) {\n set(parent, property, value, receiver);\n }\n } else if (\"value\" in desc && desc.writable) {\n desc.value = value;\n } else {\n var setter = desc.set;\n\n if (setter !== undefined) {\n setter.call(receiver, value);\n }\n }\n\n return value;\n};\n\nvar slicedToArray = function () {\n function sliceIterator(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"]) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n };\n}();\n\nvar slicedToArrayLoose = function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n var _arr = [];\n\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {\n _arr.push(_step.value);\n\n if (i && _arr.length === i) break;\n }\n\n return _arr;\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n};\n\nvar taggedTemplateLiteral = function (strings, raw) {\n return Object.freeze(Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n }));\n};\n\nvar taggedTemplateLiteralLoose = function (strings, raw) {\n strings.raw = raw;\n return strings;\n};\n\nvar temporalRef = function (val, name, undef) {\n if (val === undef) {\n throw new ReferenceError(name + \" is not defined - temporal dead zone\");\n } else {\n return val;\n }\n};\n\nvar temporalUndefined = {};\n\nvar toArray = function (arr) {\n return Array.isArray(arr) ? arr : Array.from(arr);\n};\n\nvar toConsumableArray = function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n } else {\n return Array.from(arr);\n }\n};\n\n\n\nvar babelHelpers$1 = Object.freeze({\n jsx: jsx,\n asyncToGenerator: asyncToGenerator,\n classCallCheck: classCallCheck,\n createClass: createClass,\n defineEnumerableProperties: defineEnumerableProperties,\n defaults: defaults,\n defineProperty: defineProperty$1,\n get: get,\n inherits: inherits,\n interopRequireDefault: interopRequireDefault,\n interopRequireWildcard: interopRequireWildcard,\n newArrowCheck: newArrowCheck,\n objectDestructuringEmpty: objectDestructuringEmpty,\n objectWithoutProperties: objectWithoutProperties,\n possibleConstructorReturn: possibleConstructorReturn,\n selfGlobal: selfGlobal,\n set: set,\n slicedToArray: slicedToArray,\n slicedToArrayLoose: slicedToArrayLoose,\n taggedTemplateLiteral: taggedTemplateLiteral,\n taggedTemplateLiteralLoose: taggedTemplateLiteralLoose,\n temporalRef: temporalRef,\n temporalUndefined: temporalUndefined,\n toArray: toArray,\n toConsumableArray: toConsumableArray,\n typeof: _typeof,\n extends: _extends,\n instanceof: _instanceof\n});\n\nvar realDefineProp = function () {\n var sentinel = function sentinel() {};\n try {\n Object.defineProperty(sentinel, 'a', {\n get: function get() {\n return 1;\n }\n });\n Object.defineProperty(sentinel, 'prototype', { writable: false });\n return sentinel.a === 1 && sentinel.prototype instanceof Object;\n } catch (e) {\n return false;\n }\n}();\n\n// Need a workaround for getters in ES3\nvar es3 = !realDefineProp && !Object.prototype.__defineGetter__;\n\n// We use this a lot (and need it for proto-less objects)\nvar hop = Object.prototype.hasOwnProperty;\n\n// Naive defineProperty for compatibility\nvar defineProperty = realDefineProp ? Object.defineProperty : function (obj, name, desc) {\n if ('get' in desc && obj.__defineGetter__) obj.__defineGetter__(name, desc.get);else if (!hop.call(obj, name) || 'value' in desc) obj[name] = desc.value;\n};\n\n// Array.prototype.indexOf, as good as we need it to be\nvar arrIndexOf = Array.prototype.indexOf || function (search) {\n /*jshint validthis:true */\n var t = this;\n if (!t.length) return -1;\n\n for (var i = arguments[1] || 0, max = t.length; i < max; i++) {\n if (t[i] === search) return i;\n }\n\n return -1;\n};\n\n// Create an object with the specified prototype (2nd arg required for Record)\nvar objCreate = Object.create || function (proto, props) {\n var obj = void 0;\n\n function F() {}\n F.prototype = proto;\n obj = new F();\n\n for (var k in props) {\n if (hop.call(props, k)) defineProperty(obj, k, props[k]);\n }\n\n return obj;\n};\n\n// Snapshot some (hopefully still) native built-ins\nvar arrSlice = Array.prototype.slice;\nvar arrConcat = Array.prototype.concat;\nvar arrPush = Array.prototype.push;\nvar arrJoin = Array.prototype.join;\nvar arrShift = Array.prototype.shift;\n\n// Naive Function.prototype.bind for compatibility\nvar fnBind = Function.prototype.bind || function (thisObj) {\n var fn = this,\n args = arrSlice.call(arguments, 1);\n\n // All our (presently) bound functions have either 1 or 0 arguments. By returning\n // different function signatures, we can pass some tests in ES3 environments\n if (fn.length === 1) {\n return function () {\n return fn.apply(thisObj, arrConcat.call(args, arrSlice.call(arguments)));\n };\n }\n return function () {\n return fn.apply(thisObj, arrConcat.call(args, arrSlice.call(arguments)));\n };\n};\n\n// Object housing internal properties for constructors\nvar internals = objCreate(null);\n\n// Keep internal properties internal\nvar secret = Math.random();\n\n// Helper functions\n// ================\n\n/**\n * A function to deal with the inaccuracy of calculating log10 in pre-ES6\n * JavaScript environments. Math.log(num) / Math.LN10 was responsible for\n * causing issue #62.\n */\nfunction log10Floor(n) {\n // ES6 provides the more accurate Math.log10\n if (typeof Math.log10 === 'function') return Math.floor(Math.log10(n));\n\n var x = Math.round(Math.log(n) * Math.LOG10E);\n return x - (Number('1e' + x) > n);\n}\n\n/**\n * A map that doesn't contain Object in its prototype chain\n */\nfunction Record(obj) {\n // Copy only own properties over unless this object is already a Record instance\n for (var k in obj) {\n if (obj instanceof Record || hop.call(obj, k)) defineProperty(this, k, { value: obj[k], enumerable: true, writable: true, configurable: true });\n }\n}\nRecord.prototype = objCreate(null);\n\n/**\n * An ordered list\n */\nfunction List() {\n defineProperty(this, 'length', { writable: true, value: 0 });\n\n if (arguments.length) arrPush.apply(this, arrSlice.call(arguments));\n}\nList.prototype = objCreate(null);\n\n/**\n * Constructs a regular expression to restore tainted RegExp properties\n */\nfunction createRegExpRestore() {\n if (internals.disableRegExpRestore) {\n return function () {/* no-op */};\n }\n\n var regExpCache = {\n lastMatch: RegExp.lastMatch || '',\n leftContext: RegExp.leftContext,\n multiline: RegExp.multiline,\n input: RegExp.input\n },\n has = false;\n\n // Create a snapshot of all the 'captured' properties\n for (var i = 1; i <= 9; i++) {\n has = (regExpCache['$' + i] = RegExp['$' + i]) || has;\n }return function () {\n // Now we've snapshotted some properties, escape the lastMatch string\n var esc = /[.?*+^$[\\]\\\\(){}|-]/g,\n lm = regExpCache.lastMatch.replace(esc, '\\\\$&'),\n reg = new List();\n\n // If any of the captured strings were non-empty, iterate over them all\n if (has) {\n for (var _i = 1; _i <= 9; _i++) {\n var m = regExpCache['$' + _i];\n\n // If it's empty, add an empty capturing group\n if (!m) lm = '()' + lm;\n\n // Else find the string in lm and escape & wrap it to capture it\n else {\n m = m.replace(esc, '\\\\$&');\n lm = lm.replace(m, '(' + m + ')');\n }\n\n // Push it to the reg and chop lm to make sure further groups come after\n arrPush.call(reg, lm.slice(0, lm.indexOf('(') + 1));\n lm = lm.slice(lm.indexOf('(') + 1);\n }\n }\n\n var exprStr = arrJoin.call(reg, '') + lm;\n\n // Shorten the regex by replacing each part of the expression with a match\n // for a string of that exact length. This is safe for the type of\n // expressions generated above, because the expression matches the whole\n // match string, so we know each group and each segment between capturing\n // groups can be matched by its length alone.\n exprStr = exprStr.replace(/(\\\\\\(|\\\\\\)|[^()])+/g, function (match) {\n return '[\\\\s\\\\S]{' + match.replace('\\\\', '').length + '}';\n });\n\n // Create the regular expression that will reconstruct the RegExp properties\n var expr = new RegExp(exprStr, regExpCache.multiline ? 'gm' : 'g');\n\n // Set the lastIndex of the generated expression to ensure that the match\n // is found in the correct index.\n expr.lastIndex = regExpCache.leftContext.length;\n\n expr.exec(regExpCache.input);\n };\n}\n\n/**\n * Mimics ES5's abstract ToObject() function\n */\nfunction toObject(arg) {\n if (arg === null) throw new TypeError('Cannot convert null or undefined to object');\n\n if ((typeof arg === 'undefined' ? 'undefined' : babelHelpers$1['typeof'](arg)) === 'object') return arg;\n return Object(arg);\n}\n\nfunction toNumber(arg) {\n if (typeof arg === 'number') return arg;\n return Number(arg);\n}\n\nfunction toInteger(arg) {\n var number = toNumber(arg);\n if (isNaN(number)) return 0;\n if (number === +0 || number === -0 || number === +Infinity || number === -Infinity) return number;\n if (number < 0) return Math.floor(Math.abs(number)) * -1;\n return Math.floor(Math.abs(number));\n}\n\nfunction toLength(arg) {\n var len = toInteger(arg);\n if (len <= 0) return 0;\n if (len === Infinity) return Math.pow(2, 53) - 1;\n return Math.min(len, Math.pow(2, 53) - 1);\n}\n\n/**\n * Returns \"internal\" properties for an object\n */\nfunction getInternalProperties(obj) {\n if (hop.call(obj, '__getInternalProperties')) return obj.__getInternalProperties(secret);\n\n return objCreate(null);\n}\n\n/**\n* Defines regular expressions for various operations related to the BCP 47 syntax,\n* as defined at http://tools.ietf.org/html/bcp47#section-2.1\n*/\n\n// extlang = 3ALPHA ; selected ISO 639 codes\n// *2(\"-\" 3ALPHA) ; permanently reserved\nvar extlang = '[a-z]{3}(?:-[a-z]{3}){0,2}';\n\n// language = 2*3ALPHA ; shortest ISO 639 code\n// [\"-\" extlang] ; sometimes followed by\n// ; extended language subtags\n// / 4ALPHA ; or reserved for future use\n// / 5*8ALPHA ; or registered language subtag\nvar language = '(?:[a-z]{2,3}(?:-' + extlang + ')?|[a-z]{4}|[a-z]{5,8})';\n\n// script = 4ALPHA ; ISO 15924 code\nvar script = '[a-z]{4}';\n\n// region = 2ALPHA ; ISO 3166-1 code\n// / 3DIGIT ; UN M.49 code\nvar region = '(?:[a-z]{2}|\\\\d{3})';\n\n// variant = 5*8alphanum ; registered variants\n// / (DIGIT 3alphanum)\nvar variant = '(?:[a-z0-9]{5,8}|\\\\d[a-z0-9]{3})';\n\n// ; Single alphanumerics\n// ; \"x\" reserved for private use\n// singleton = DIGIT ; 0 - 9\n// / %x41-57 ; A - W\n// / %x59-5A ; Y - Z\n// / %x61-77 ; a - w\n// / %x79-7A ; y - z\nvar singleton = '[0-9a-wy-z]';\n\n// extension = singleton 1*(\"-\" (2*8alphanum))\nvar extension = singleton + '(?:-[a-z0-9]{2,8})+';\n\n// privateuse = \"x\" 1*(\"-\" (1*8alphanum))\nvar privateuse = 'x(?:-[a-z0-9]{1,8})+';\n\n// irregular = \"en-GB-oed\" ; irregular tags do not match\n// / \"i-ami\" ; the 'langtag' production and\n// / \"i-bnn\" ; would not otherwise be\n// / \"i-default\" ; considered 'well-formed'\n// / \"i-enochian\" ; These tags are all valid,\n// / \"i-hak\" ; but most are deprecated\n// / \"i-klingon\" ; in favor of more modern\n// / \"i-lux\" ; subtags or subtag\n// / \"i-mingo\" ; combination\n// / \"i-navajo\"\n// / \"i-pwn\"\n// / \"i-tao\"\n// / \"i-tay\"\n// / \"i-tsu\"\n// / \"sgn-BE-FR\"\n// / \"sgn-BE-NL\"\n// / \"sgn-CH-DE\"\nvar irregular = '(?:en-GB-oed' + '|i-(?:ami|bnn|default|enochian|hak|klingon|lux|mingo|navajo|pwn|tao|tay|tsu)' + '|sgn-(?:BE-FR|BE-NL|CH-DE))';\n\n// regular = \"art-lojban\" ; these tags match the 'langtag'\n// / \"cel-gaulish\" ; production, but their subtags\n// / \"no-bok\" ; are not extended language\n// / \"no-nyn\" ; or variant subtags: their meaning\n// / \"zh-guoyu\" ; is defined by their registration\n// / \"zh-hakka\" ; and all of these are deprecated\n// / \"zh-min\" ; in favor of a more modern\n// / \"zh-min-nan\" ; subtag or sequence of subtags\n// / \"zh-xiang\"\nvar regular = '(?:art-lojban|cel-gaulish|no-bok|no-nyn' + '|zh-(?:guoyu|hakka|min|min-nan|xiang))';\n\n// grandfathered = irregular ; non-redundant tags registered\n// / regular ; during the RFC 3066 era\nvar grandfathered = '(?:' + irregular + '|' + regular + ')';\n\n// langtag = language\n// [\"-\" script]\n// [\"-\" region]\n// *(\"-\" variant)\n// *(\"-\" extension)\n// [\"-\" privateuse]\nvar langtag = language + '(?:-' + script + ')?(?:-' + region + ')?(?:-' + variant + ')*(?:-' + extension + ')*(?:-' + privateuse + ')?';\n\n// Language-Tag = langtag ; normal language tags\n// / privateuse ; private use tag\n// / grandfathered ; grandfathered tags\nvar expBCP47Syntax = RegExp('^(?:' + langtag + '|' + privateuse + '|' + grandfathered + ')$', 'i');\n\n// Match duplicate variants in a language tag\nvar expVariantDupes = RegExp('^(?!x).*?-(' + variant + ')-(?:\\\\w{4,8}-(?!x-))*\\\\1\\\\b', 'i');\n\n// Match duplicate singletons in a language tag (except in private use)\nvar expSingletonDupes = RegExp('^(?!x).*?-(' + singleton + ')-(?:\\\\w+-(?!x-))*\\\\1\\\\b', 'i');\n\n// Match all extension sequences\nvar expExtSequences = RegExp('-' + extension, 'ig');\n\n// Default locale is the first-added locale data for us\nvar defaultLocale = void 0;\nfunction setDefaultLocale(locale) {\n defaultLocale = locale;\n}\n\n// IANA Subtag Registry redundant tag and subtag maps\nvar redundantTags = {\n tags: {\n \"art-lojban\": \"jbo\",\n \"i-ami\": \"ami\",\n \"i-bnn\": \"bnn\",\n \"i-hak\": \"hak\",\n \"i-klingon\": \"tlh\",\n \"i-lux\": \"lb\",\n \"i-navajo\": \"nv\",\n \"i-pwn\": \"pwn\",\n \"i-tao\": \"tao\",\n \"i-tay\": \"tay\",\n \"i-tsu\": \"tsu\",\n \"no-bok\": \"nb\",\n \"no-nyn\": \"nn\",\n \"sgn-BE-FR\": \"sfb\",\n \"sgn-BE-NL\": \"vgt\",\n \"sgn-CH-DE\": \"sgg\",\n \"zh-guoyu\": \"cmn\",\n \"zh-hakka\": \"hak\",\n \"zh-min-nan\": \"nan\",\n \"zh-xiang\": \"hsn\",\n \"sgn-BR\": \"bzs\",\n \"sgn-CO\": \"csn\",\n \"sgn-DE\": \"gsg\",\n \"sgn-DK\": \"dsl\",\n \"sgn-ES\": \"ssp\",\n \"sgn-FR\": \"fsl\",\n \"sgn-GB\": \"bfi\",\n \"sgn-GR\": \"gss\",\n \"sgn-IE\": \"isg\",\n \"sgn-IT\": \"ise\",\n \"sgn-JP\": \"jsl\",\n \"sgn-MX\": \"mfs\",\n \"sgn-NI\": \"ncs\",\n \"sgn-NL\": \"dse\",\n \"sgn-NO\": \"nsl\",\n \"sgn-PT\": \"psr\",\n \"sgn-SE\": \"swl\",\n \"sgn-US\": \"ase\",\n \"sgn-ZA\": \"sfs\",\n \"zh-cmn\": \"cmn\",\n \"zh-cmn-Hans\": \"cmn-Hans\",\n \"zh-cmn-Hant\": \"cmn-Hant\",\n \"zh-gan\": \"gan\",\n \"zh-wuu\": \"wuu\",\n \"zh-yue\": \"yue\"\n },\n subtags: {\n BU: \"MM\",\n DD: \"DE\",\n FX: \"FR\",\n TP: \"TL\",\n YD: \"YE\",\n ZR: \"CD\",\n heploc: \"alalc97\",\n 'in': \"id\",\n iw: \"he\",\n ji: \"yi\",\n jw: \"jv\",\n mo: \"ro\",\n ayx: \"nun\",\n bjd: \"drl\",\n ccq: \"rki\",\n cjr: \"mom\",\n cka: \"cmr\",\n cmk: \"xch\",\n drh: \"khk\",\n drw: \"prs\",\n gav: \"dev\",\n hrr: \"jal\",\n ibi: \"opa\",\n kgh: \"kml\",\n lcq: \"ppr\",\n mst: \"mry\",\n myt: \"mry\",\n sca: \"hle\",\n tie: \"ras\",\n tkk: \"twm\",\n tlw: \"weo\",\n tnf: \"prs\",\n ybd: \"rki\",\n yma: \"lrr\"\n },\n extLang: {\n aao: [\"aao\", \"ar\"],\n abh: [\"abh\", \"ar\"],\n abv: [\"abv\", \"ar\"],\n acm: [\"acm\", \"ar\"],\n acq: [\"acq\", \"ar\"],\n acw: [\"acw\", \"ar\"],\n acx: [\"acx\", \"ar\"],\n acy: [\"acy\", \"ar\"],\n adf: [\"adf\", \"ar\"],\n ads: [\"ads\", \"sgn\"],\n aeb: [\"aeb\", \"ar\"],\n aec: [\"aec\", \"ar\"],\n aed: [\"aed\", \"sgn\"],\n aen: [\"aen\", \"sgn\"],\n afb: [\"afb\", \"ar\"],\n afg: [\"afg\", \"sgn\"],\n ajp: [\"ajp\", \"ar\"],\n apc: [\"apc\", \"ar\"],\n apd: [\"apd\", \"ar\"],\n arb: [\"arb\", \"ar\"],\n arq: [\"arq\", \"ar\"],\n ars: [\"ars\", \"ar\"],\n ary: [\"ary\", \"ar\"],\n arz: [\"arz\", \"ar\"],\n ase: [\"ase\", \"sgn\"],\n asf: [\"asf\", \"sgn\"],\n asp: [\"asp\", \"sgn\"],\n asq: [\"asq\", \"sgn\"],\n asw: [\"asw\", \"sgn\"],\n auz: [\"auz\", \"ar\"],\n avl: [\"avl\", \"ar\"],\n ayh: [\"ayh\", \"ar\"],\n ayl: [\"ayl\", \"ar\"],\n ayn: [\"ayn\", \"ar\"],\n ayp: [\"ayp\", \"ar\"],\n bbz: [\"bbz\", \"ar\"],\n bfi: [\"bfi\", \"sgn\"],\n bfk: [\"bfk\", \"sgn\"],\n bjn: [\"bjn\", \"ms\"],\n bog: [\"bog\", \"sgn\"],\n bqn: [\"bqn\", \"sgn\"],\n bqy: [\"bqy\", \"sgn\"],\n btj: [\"btj\", \"ms\"],\n bve: [\"bve\", \"ms\"],\n bvl: [\"bvl\", \"sgn\"],\n bvu: [\"bvu\", \"ms\"],\n bzs: [\"bzs\", \"sgn\"],\n cdo: [\"cdo\", \"zh\"],\n cds: [\"cds\", \"sgn\"],\n cjy: [\"cjy\", \"zh\"],\n cmn: [\"cmn\", \"zh\"],\n coa: [\"coa\", \"ms\"],\n cpx: [\"cpx\", \"zh\"],\n csc: [\"csc\", \"sgn\"],\n csd: [\"csd\", \"sgn\"],\n cse: [\"cse\", \"sgn\"],\n csf: [\"csf\", \"sgn\"],\n csg: [\"csg\", \"sgn\"],\n csl: [\"csl\", \"sgn\"],\n csn: [\"csn\", \"sgn\"],\n csq: [\"csq\", \"sgn\"],\n csr: [\"csr\", \"sgn\"],\n czh: [\"czh\", \"zh\"],\n czo: [\"czo\", \"zh\"],\n doq: [\"doq\", \"sgn\"],\n dse: [\"dse\", \"sgn\"],\n dsl: [\"dsl\", \"sgn\"],\n dup: [\"dup\", \"ms\"],\n ecs: [\"ecs\", \"sgn\"],\n esl: [\"esl\", \"sgn\"],\n esn: [\"esn\", \"sgn\"],\n eso: [\"eso\", \"sgn\"],\n eth: [\"eth\", \"sgn\"],\n fcs: [\"fcs\", \"sgn\"],\n fse: [\"fse\", \"sgn\"],\n fsl: [\"fsl\", \"sgn\"],\n fss: [\"fss\", \"sgn\"],\n gan: [\"gan\", \"zh\"],\n gds: [\"gds\", \"sgn\"],\n gom: [\"gom\", \"kok\"],\n gse: [\"gse\", \"sgn\"],\n gsg: [\"gsg\", \"sgn\"],\n gsm: [\"gsm\", \"sgn\"],\n gss: [\"gss\", \"sgn\"],\n gus: [\"gus\", \"sgn\"],\n hab: [\"hab\", \"sgn\"],\n haf: [\"haf\", \"sgn\"],\n hak: [\"hak\", \"zh\"],\n hds: [\"hds\", \"sgn\"],\n hji: [\"hji\", \"ms\"],\n hks: [\"hks\", \"sgn\"],\n hos: [\"hos\", \"sgn\"],\n hps: [\"hps\", \"sgn\"],\n hsh: [\"hsh\", \"sgn\"],\n hsl: [\"hsl\", \"sgn\"],\n hsn: [\"hsn\", \"zh\"],\n icl: [\"icl\", \"sgn\"],\n ils: [\"ils\", \"sgn\"],\n inl: [\"inl\", \"sgn\"],\n ins: [\"ins\", \"sgn\"],\n ise: [\"ise\", \"sgn\"],\n isg: [\"isg\", \"sgn\"],\n isr: [\"isr\", \"sgn\"],\n jak: [\"jak\", \"ms\"],\n jax: [\"jax\", \"ms\"],\n jcs: [\"jcs\", \"sgn\"],\n jhs: [\"jhs\", \"sgn\"],\n jls: [\"jls\", \"sgn\"],\n jos: [\"jos\", \"sgn\"],\n jsl: [\"jsl\", \"sgn\"],\n jus: [\"jus\", \"sgn\"],\n kgi: [\"kgi\", \"sgn\"],\n knn: [\"knn\", \"kok\"],\n kvb: [\"kvb\", \"ms\"],\n kvk: [\"kvk\", \"sgn\"],\n kvr: [\"kvr\", \"ms\"],\n kxd: [\"kxd\", \"ms\"],\n lbs: [\"lbs\", \"sgn\"],\n lce: [\"lce\", \"ms\"],\n lcf: [\"lcf\", \"ms\"],\n liw: [\"liw\", \"ms\"],\n lls: [\"lls\", \"sgn\"],\n lsg: [\"lsg\", \"sgn\"],\n lsl: [\"lsl\", \"sgn\"],\n lso: [\"lso\", \"sgn\"],\n lsp: [\"lsp\", \"sgn\"],\n lst: [\"lst\", \"sgn\"],\n lsy: [\"lsy\", \"sgn\"],\n ltg: [\"ltg\", \"lv\"],\n lvs: [\"lvs\", \"lv\"],\n lzh: [\"lzh\", \"zh\"],\n max: [\"max\", \"ms\"],\n mdl: [\"mdl\", \"sgn\"],\n meo: [\"meo\", \"ms\"],\n mfa: [\"mfa\", \"ms\"],\n mfb: [\"mfb\", \"ms\"],\n mfs: [\"mfs\", \"sgn\"],\n min: [\"min\", \"ms\"],\n mnp: [\"mnp\", \"zh\"],\n mqg: [\"mqg\", \"ms\"],\n mre: [\"mre\", \"sgn\"],\n msd: [\"msd\", \"sgn\"],\n msi: [\"msi\", \"ms\"],\n msr: [\"msr\", \"sgn\"],\n mui: [\"mui\", \"ms\"],\n mzc: [\"mzc\", \"sgn\"],\n mzg: [\"mzg\", \"sgn\"],\n mzy: [\"mzy\", \"sgn\"],\n nan: [\"nan\", \"zh\"],\n nbs: [\"nbs\", \"sgn\"],\n ncs: [\"ncs\", \"sgn\"],\n nsi: [\"nsi\", \"sgn\"],\n nsl: [\"nsl\", \"sgn\"],\n nsp: [\"nsp\", \"sgn\"],\n nsr: [\"nsr\", \"sgn\"],\n nzs: [\"nzs\", \"sgn\"],\n okl: [\"okl\", \"sgn\"],\n orn: [\"orn\", \"ms\"],\n ors: [\"ors\", \"ms\"],\n pel: [\"pel\", \"ms\"],\n pga: [\"pga\", \"ar\"],\n pks: [\"pks\", \"sgn\"],\n prl: [\"prl\", \"sgn\"],\n prz: [\"prz\", \"sgn\"],\n psc: [\"psc\", \"sgn\"],\n psd: [\"psd\", \"sgn\"],\n pse: [\"pse\", \"ms\"],\n psg: [\"psg\", \"sgn\"],\n psl: [\"psl\", \"sgn\"],\n pso: [\"pso\", \"sgn\"],\n psp: [\"psp\", \"sgn\"],\n psr: [\"psr\", \"sgn\"],\n pys: [\"pys\", \"sgn\"],\n rms: [\"rms\", \"sgn\"],\n rsi: [\"rsi\", \"sgn\"],\n rsl: [\"rsl\", \"sgn\"],\n sdl: [\"sdl\", \"sgn\"],\n sfb: [\"sfb\", \"sgn\"],\n sfs: [\"sfs\", \"sgn\"],\n sgg: [\"sgg\", \"sgn\"],\n sgx: [\"sgx\", \"sgn\"],\n shu: [\"shu\", \"ar\"],\n slf: [\"slf\", \"sgn\"],\n sls: [\"sls\", \"sgn\"],\n sqk: [\"sqk\", \"sgn\"],\n sqs: [\"sqs\", \"sgn\"],\n ssh: [\"ssh\", \"ar\"],\n ssp: [\"ssp\", \"sgn\"],\n ssr: [\"ssr\", \"sgn\"],\n svk: [\"svk\", \"sgn\"],\n swc: [\"swc\", \"sw\"],\n swh: [\"swh\", \"sw\"],\n swl: [\"swl\", \"sgn\"],\n syy: [\"syy\", \"sgn\"],\n tmw: [\"tmw\", \"ms\"],\n tse: [\"tse\", \"sgn\"],\n tsm: [\"tsm\", \"sgn\"],\n tsq: [\"tsq\", \"sgn\"],\n tss: [\"tss\", \"sgn\"],\n tsy: [\"tsy\", \"sgn\"],\n tza: [\"tza\", \"sgn\"],\n ugn: [\"ugn\", \"sgn\"],\n ugy: [\"ugy\", \"sgn\"],\n ukl: [\"ukl\", \"sgn\"],\n uks: [\"uks\", \"sgn\"],\n urk: [\"urk\", \"ms\"],\n uzn: [\"uzn\", \"uz\"],\n uzs: [\"uzs\", \"uz\"],\n vgt: [\"vgt\", \"sgn\"],\n vkk: [\"vkk\", \"ms\"],\n vkt: [\"vkt\", \"ms\"],\n vsi: [\"vsi\", \"sgn\"],\n vsl: [\"vsl\", \"sgn\"],\n vsv: [\"vsv\", \"sgn\"],\n wuu: [\"wuu\", \"zh\"],\n xki: [\"xki\", \"sgn\"],\n xml: [\"xml\", \"sgn\"],\n xmm: [\"xmm\", \"ms\"],\n xms: [\"xms\", \"sgn\"],\n yds: [\"yds\", \"sgn\"],\n ysl: [\"ysl\", \"sgn\"],\n yue: [\"yue\", \"zh\"],\n zib: [\"zib\", \"sgn\"],\n zlm: [\"zlm\", \"ms\"],\n zmi: [\"zmi\", \"ms\"],\n zsl: [\"zsl\", \"sgn\"],\n zsm: [\"zsm\", \"ms\"]\n }\n};\n\n/**\n * Convert only a-z to uppercase as per section 6.1 of the spec\n */\nfunction toLatinUpperCase(str) {\n var i = str.length;\n\n while (i--) {\n var ch = str.charAt(i);\n\n if (ch >= \"a\" && ch <= \"z\") str = str.slice(0, i) + ch.toUpperCase() + str.slice(i + 1);\n }\n\n return str;\n}\n\n/**\n * The IsStructurallyValidLanguageTag abstract operation verifies that the locale\n * argument (which must be a String value)\n *\n * - represents a well-formed BCP 47 language tag as specified in RFC 5646 section\n * 2.1, or successor,\n * - does not include duplicate variant subtags, and\n * - does not include duplicate singleton subtags.\n *\n * The abstract operation returns true if locale can be generated from the ABNF\n * grammar in section 2.1 of the RFC, starting with Language-Tag, and does not\n * contain duplicate variant or singleton subtags (other than as a private use\n * subtag). It returns false otherwise. Terminal value characters in the grammar are\n * interpreted as the Unicode equivalents of the ASCII octet values given.\n */\nfunction /* 6.2.2 */IsStructurallyValidLanguageTag(locale) {\n // represents a well-formed BCP 47 language tag as specified in RFC 5646\n if (!expBCP47Syntax.test(locale)) return false;\n\n // does not include duplicate variant subtags, and\n if (expVariantDupes.test(locale)) return false;\n\n // does not include duplicate singleton subtags.\n if (expSingletonDupes.test(locale)) return false;\n\n return true;\n}\n\n/**\n * The CanonicalizeLanguageTag abstract operation returns the canonical and case-\n * regularized form of the locale argument (which must be a String value that is\n * a structurally valid BCP 47 language tag as verified by the\n * IsStructurallyValidLanguageTag abstract operation). It takes the steps\n * specified in RFC 5646 section 4.5, or successor, to bring the language tag\n * into canonical form, and to regularize the case of the subtags, but does not\n * take the steps to bring a language tag into “extlang form” and to reorder\n * variant subtags.\n\n * The specifications for extensions to BCP 47 language tags, such as RFC 6067,\n * may include canonicalization rules for the extension subtag sequences they\n * define that go beyond the canonicalization rules of RFC 5646 section 4.5.\n * Implementations are allowed, but not required, to apply these additional rules.\n */\nfunction /* 6.2.3 */CanonicalizeLanguageTag(locale) {\n var match = void 0,\n parts = void 0;\n\n // A language tag is in 'canonical form' when the tag is well-formed\n // according to the rules in Sections 2.1 and 2.2\n\n // Section 2.1 says all subtags use lowercase...\n locale = locale.toLowerCase();\n\n // ...with 2 exceptions: 'two-letter and four-letter subtags that neither\n // appear at the start of the tag nor occur after singletons. Such two-letter\n // subtags are all uppercase (as in the tags \"en-CA-x-ca\" or \"sgn-BE-FR\") and\n // four-letter subtags are titlecase (as in the tag \"az-Latn-x-latn\").\n parts = locale.split('-');\n for (var i = 1, max = parts.length; i < max; i++) {\n // Two-letter subtags are all uppercase\n if (parts[i].length === 2) parts[i] = parts[i].toUpperCase();\n\n // Four-letter subtags are titlecase\n else if (parts[i].length === 4) parts[i] = parts[i].charAt(0).toUpperCase() + parts[i].slice(1);\n\n // Is it a singleton?\n else if (parts[i].length === 1 && parts[i] !== 'x') break;\n }\n locale = arrJoin.call(parts, '-');\n\n // The steps laid out in RFC 5646 section 4.5 are as follows:\n\n // 1. Extension sequences are ordered into case-insensitive ASCII order\n // by singleton subtag.\n if ((match = locale.match(expExtSequences)) && match.length > 1) {\n // The built-in sort() sorts by ASCII order, so use that\n match.sort();\n\n // Replace all extensions with the joined, sorted array\n locale = locale.replace(RegExp('(?:' + expExtSequences.source + ')+', 'i'), arrJoin.call(match, ''));\n }\n\n // 2. Redundant or grandfathered tags are replaced by their 'Preferred-\n // Value', if there is one.\n if (hop.call(redundantTags.tags, locale)) locale = redundantTags.tags[locale];\n\n // 3. Subtags are replaced by their 'Preferred-Value', if there is one.\n // For extlangs, the original primary language subtag is also\n // replaced if there is a primary language subtag in the 'Preferred-\n // Value'.\n parts = locale.split('-');\n\n for (var _i = 1, _max = parts.length; _i < _max; _i++) {\n if (hop.call(redundantTags.subtags, parts[_i])) parts[_i] = redundantTags.subtags[parts[_i]];else if (hop.call(redundantTags.extLang, parts[_i])) {\n parts[_i] = redundantTags.extLang[parts[_i]][0];\n\n // For extlang tags, the prefix needs to be removed if it is redundant\n if (_i === 1 && redundantTags.extLang[parts[1]][1] === parts[0]) {\n parts = arrSlice.call(parts, _i++);\n _max -= 1;\n }\n }\n }\n\n return arrJoin.call(parts, '-');\n}\n\n/**\n * The DefaultLocale abstract operation returns a String value representing the\n * structurally valid (6.2.2) and canonicalized (6.2.3) BCP 47 language tag for the\n * host environment’s current locale.\n */\nfunction /* 6.2.4 */DefaultLocale() {\n return defaultLocale;\n}\n\n// Sect 6.3 Currency Codes\n// =======================\n\nvar expCurrencyCode = /^[A-Z]{3}$/;\n\n/**\n * The IsWellFormedCurrencyCode abstract operation verifies that the currency argument\n * (after conversion to a String value) represents a well-formed 3-letter ISO currency\n * code. The following steps are taken:\n */\nfunction /* 6.3.1 */IsWellFormedCurrencyCode(currency) {\n // 1. Let `c` be ToString(currency)\n var c = String(currency);\n\n // 2. Let `normalized` be the result of mapping c to upper case as described\n // in 6.1.\n var normalized = toLatinUpperCase(c);\n\n // 3. If the string length of normalized is not 3, return false.\n // 4. If normalized contains any character that is not in the range \"A\" to \"Z\"\n // (U+0041 to U+005A), return false.\n if (expCurrencyCode.test(normalized) === false) return false;\n\n // 5. Return true\n return true;\n}\n\nvar expUnicodeExSeq = /-u(?:-[0-9a-z]{2,8})+/gi; // See `extension` below\n\nfunction /* 9.2.1 */CanonicalizeLocaleList(locales) {\n // The abstract operation CanonicalizeLocaleList takes the following steps:\n\n // 1. If locales is undefined, then a. Return a new empty List\n if (locales === undefined) return new List();\n\n // 2. Let seen be a new empty List.\n var seen = new List();\n\n // 3. If locales is a String value, then\n // a. Let locales be a new array created as if by the expression new\n // Array(locales) where Array is the standard built-in constructor with\n // that name and locales is the value of locales.\n locales = typeof locales === 'string' ? [locales] : locales;\n\n // 4. Let O be ToObject(locales).\n var O = toObject(locales);\n\n // 5. Let lenValue be the result of calling the [[Get]] internal method of\n // O with the argument \"length\".\n // 6. Let len be ToUint32(lenValue).\n var len = toLength(O.length);\n\n // 7. Let k be 0.\n var k = 0;\n\n // 8. Repeat, while k < len\n while (k < len) {\n // a. Let Pk be ToString(k).\n var Pk = String(k);\n\n // b. Let kPresent be the result of calling the [[HasProperty]] internal\n // method of O with argument Pk.\n var kPresent = Pk in O;\n\n // c. If kPresent is true, then\n if (kPresent) {\n // i. Let kValue be the result of calling the [[Get]] internal\n // method of O with argument Pk.\n var kValue = O[Pk];\n\n // ii. If the type of kValue is not String or Object, then throw a\n // TypeError exception.\n if (kValue === null || typeof kValue !== 'string' && (typeof kValue === \"undefined\" ? \"undefined\" : babelHelpers$1[\"typeof\"](kValue)) !== 'object') throw new TypeError('String or Object type expected');\n\n // iii. Let tag be ToString(kValue).\n var tag = String(kValue);\n\n // iv. If the result of calling the abstract operation\n // IsStructurallyValidLanguageTag (defined in 6.2.2), passing tag as\n // the argument, is false, then throw a RangeError exception.\n if (!IsStructurallyValidLanguageTag(tag)) throw new RangeError(\"'\" + tag + \"' is not a structurally valid language tag\");\n\n // v. Let tag be the result of calling the abstract operation\n // CanonicalizeLanguageTag (defined in 6.2.3), passing tag as the\n // argument.\n tag = CanonicalizeLanguageTag(tag);\n\n // vi. If tag is not an element of seen, then append tag as the last\n // element of seen.\n if (arrIndexOf.call(seen, tag) === -1) arrPush.call(seen, tag);\n }\n\n // d. Increase k by 1.\n k++;\n }\n\n // 9. Return seen.\n return seen;\n}\n\n/**\n * The BestAvailableLocale abstract operation compares the provided argument\n * locale, which must be a String value with a structurally valid and\n * canonicalized BCP 47 language tag, against the locales in availableLocales and\n * returns either the longest non-empty prefix of locale that is an element of\n * availableLocales, or undefined if there is no such element. It uses the\n * fallback mechanism of RFC 4647, section 3.4. The following steps are taken:\n */\nfunction /* 9.2.2 */BestAvailableLocale(availableLocales, locale) {\n // 1. Let candidate be locale\n var candidate = locale;\n\n // 2. Repeat\n while (candidate) {\n // a. If availableLocales contains an element equal to candidate, then return\n // candidate.\n if (arrIndexOf.call(availableLocales, candidate) > -1) return candidate;\n\n // b. Let pos be the character index of the last occurrence of \"-\"\n // (U+002D) within candidate. If that character does not occur, return\n // undefined.\n var pos = candidate.lastIndexOf('-');\n\n if (pos < 0) return;\n\n // c. If pos ≥ 2 and the character \"-\" occurs at index pos-2 of candidate,\n // then decrease pos by 2.\n if (pos >= 2 && candidate.charAt(pos - 2) === '-') pos -= 2;\n\n // d. Let candidate be the substring of candidate from position 0, inclusive,\n // to position pos, exclusive.\n candidate = candidate.substring(0, pos);\n }\n}\n\n/**\n * The LookupMatcher abstract operation compares requestedLocales, which must be\n * a List as returned by CanonicalizeLocaleList, against the locales in\n * availableLocales and determines the best available language to meet the\n * request. The following steps are taken:\n */\nfunction /* 9.2.3 */LookupMatcher(availableLocales, requestedLocales) {\n // 1. Let i be 0.\n var i = 0;\n\n // 2. Let len be the number of elements in requestedLocales.\n var len = requestedLocales.length;\n\n // 3. Let availableLocale be undefined.\n var availableLocale = void 0;\n\n var locale = void 0,\n noExtensionsLocale = void 0;\n\n // 4. Repeat while i < len and availableLocale is undefined:\n while (i < len && !availableLocale) {\n // a. Let locale be the element of requestedLocales at 0-origined list\n // position i.\n locale = requestedLocales[i];\n\n // b. Let noExtensionsLocale be the String value that is locale with all\n // Unicode locale extension sequences removed.\n noExtensionsLocale = String(locale).replace(expUnicodeExSeq, '');\n\n // c. Let availableLocale be the result of calling the\n // BestAvailableLocale abstract operation (defined in 9.2.2) with\n // arguments availableLocales and noExtensionsLocale.\n availableLocale = BestAvailableLocale(availableLocales, noExtensionsLocale);\n\n // d. Increase i by 1.\n i++;\n }\n\n // 5. Let result be a new Record.\n var result = new Record();\n\n // 6. If availableLocale is not undefined, then\n if (availableLocale !== undefined) {\n // a. Set result.[[locale]] to availableLocale.\n result['[[locale]]'] = availableLocale;\n\n // b. If locale and noExtensionsLocale are not the same String value, then\n if (String(locale) !== String(noExtensionsLocale)) {\n // i. Let extension be the String value consisting of the first\n // substring of locale that is a Unicode locale extension sequence.\n var extension = locale.match(expUnicodeExSeq)[0];\n\n // ii. Let extensionIndex be the character position of the initial\n // \"-\" of the first Unicode locale extension sequence within locale.\n var extensionIndex = locale.indexOf('-u-');\n\n // iii. Set result.[[extension]] to extension.\n result['[[extension]]'] = extension;\n\n // iv. Set result.[[extensionIndex]] to extensionIndex.\n result['[[extensionIndex]]'] = extensionIndex;\n }\n }\n // 7. Else\n else\n // a. Set result.[[locale]] to the value returned by the DefaultLocale abstract\n // operation (defined in 6.2.4).\n result['[[locale]]'] = DefaultLocale();\n\n // 8. Return result\n return result;\n}\n\n/**\n * The BestFitMatcher abstract operation compares requestedLocales, which must be\n * a List as returned by CanonicalizeLocaleList, against the locales in\n * availableLocales and determines the best available language to meet the\n * request. The algorithm is implementation dependent, but should produce results\n * that a typical user of the requested locales would perceive as at least as\n * good as those produced by the LookupMatcher abstract operation. Options\n * specified through Unicode locale extension sequences must be ignored by the\n * algorithm. Information about such subsequences is returned separately.\n * The abstract operation returns a record with a [[locale]] field, whose value\n * is the language tag of the selected locale, which must be an element of\n * availableLocales. If the language tag of the request locale that led to the\n * selected locale contained a Unicode locale extension sequence, then the\n * returned record also contains an [[extension]] field whose value is the first\n * Unicode locale extension sequence, and an [[extensionIndex]] field whose value\n * is the index of the first Unicode locale extension sequence within the request\n * locale language tag.\n */\nfunction /* 9.2.4 */BestFitMatcher(availableLocales, requestedLocales) {\n return LookupMatcher(availableLocales, requestedLocales);\n}\n\n/**\n * The ResolveLocale abstract operation compares a BCP 47 language priority list\n * requestedLocales against the locales in availableLocales and determines the\n * best available language to meet the request. availableLocales and\n * requestedLocales must be provided as List values, options as a Record.\n */\nfunction /* 9.2.5 */ResolveLocale(availableLocales, requestedLocales, options, relevantExtensionKeys, localeData) {\n if (availableLocales.length === 0) {\n throw new ReferenceError('No locale data has been provided for this object yet.');\n }\n\n // The following steps are taken:\n // 1. Let matcher be the value of options.[[localeMatcher]].\n var matcher = options['[[localeMatcher]]'];\n\n var r = void 0;\n\n // 2. If matcher is \"lookup\", then\n if (matcher === 'lookup')\n // a. Let r be the result of calling the LookupMatcher abstract operation\n // (defined in 9.2.3) with arguments availableLocales and\n // requestedLocales.\n r = LookupMatcher(availableLocales, requestedLocales);\n\n // 3. Else\n else\n // a. Let r be the result of calling the BestFitMatcher abstract\n // operation (defined in 9.2.4) with arguments availableLocales and\n // requestedLocales.\n r = BestFitMatcher(availableLocales, requestedLocales);\n\n // 4. Let foundLocale be the value of r.[[locale]].\n var foundLocale = r['[[locale]]'];\n\n var extensionSubtags = void 0,\n extensionSubtagsLength = void 0;\n\n // 5. If r has an [[extension]] field, then\n if (hop.call(r, '[[extension]]')) {\n // a. Let extension be the value of r.[[extension]].\n var extension = r['[[extension]]'];\n // b. Let split be the standard built-in function object defined in ES5,\n // 15.5.4.14.\n var split = String.prototype.split;\n // c. Let extensionSubtags be the result of calling the [[Call]] internal\n // method of split with extension as the this value and an argument\n // list containing the single item \"-\".\n extensionSubtags = split.call(extension, '-');\n // d. Let extensionSubtagsLength be the result of calling the [[Get]]\n // internal method of extensionSubtags with argument \"length\".\n extensionSubtagsLength = extensionSubtags.length;\n }\n\n // 6. Let result be a new Record.\n var result = new Record();\n\n // 7. Set result.[[dataLocale]] to foundLocale.\n result['[[dataLocale]]'] = foundLocale;\n\n // 8. Let supportedExtension be \"-u\".\n var supportedExtension = '-u';\n // 9. Let i be 0.\n var i = 0;\n // 10. Let len be the result of calling the [[Get]] internal method of\n // relevantExtensionKeys with argument \"length\".\n var len = relevantExtensionKeys.length;\n\n // 11 Repeat while i < len:\n while (i < len) {\n // a. Let key be the result of calling the [[Get]] internal method of\n // relevantExtensionKeys with argument ToString(i).\n var key = relevantExtensionKeys[i];\n // b. Let foundLocaleData be the result of calling the [[Get]] internal\n // method of localeData with the argument foundLocale.\n var foundLocaleData = localeData[foundLocale];\n // c. Let keyLocaleData be the result of calling the [[Get]] internal\n // method of foundLocaleData with the argument key.\n var keyLocaleData = foundLocaleData[key];\n // d. Let value be the result of calling the [[Get]] internal method of\n // keyLocaleData with argument \"0\".\n var value = keyLocaleData['0'];\n // e. Let supportedExtensionAddition be \"\".\n var supportedExtensionAddition = '';\n // f. Let indexOf be the standard built-in function object defined in\n // ES5, 15.4.4.14.\n var indexOf = arrIndexOf;\n\n // g. If extensionSubtags is not undefined, then\n if (extensionSubtags !== undefined) {\n // i. Let keyPos be the result of calling the [[Call]] internal\n // method of indexOf with extensionSubtags as the this value and\n // an argument list containing the single item key.\n var keyPos = indexOf.call(extensionSubtags, key);\n\n // ii. If keyPos ≠ -1, then\n if (keyPos !== -1) {\n // 1. If keyPos + 1 < extensionSubtagsLength and the length of the\n // result of calling the [[Get]] internal method of\n // extensionSubtags with argument ToString(keyPos +1) is greater\n // than 2, then\n if (keyPos + 1 < extensionSubtagsLength && extensionSubtags[keyPos + 1].length > 2) {\n // a. Let requestedValue be the result of calling the [[Get]]\n // internal method of extensionSubtags with argument\n // ToString(keyPos + 1).\n var requestedValue = extensionSubtags[keyPos + 1];\n // b. Let valuePos be the result of calling the [[Call]]\n // internal method of indexOf with keyLocaleData as the\n // this value and an argument list containing the single\n // item requestedValue.\n var valuePos = indexOf.call(keyLocaleData, requestedValue);\n\n // c. If valuePos ≠ -1, then\n if (valuePos !== -1) {\n // i. Let value be requestedValue.\n value = requestedValue,\n // ii. Let supportedExtensionAddition be the\n // concatenation of \"-\", key, \"-\", and value.\n supportedExtensionAddition = '-' + key + '-' + value;\n }\n }\n // 2. Else\n else {\n // a. Let valuePos be the result of calling the [[Call]]\n // internal method of indexOf with keyLocaleData as the this\n // value and an argument list containing the single item\n // \"true\".\n var _valuePos = indexOf(keyLocaleData, 'true');\n\n // b. If valuePos ≠ -1, then\n if (_valuePos !== -1)\n // i. Let value be \"true\".\n value = 'true';\n }\n }\n }\n // h. If options has a field [[]], then\n if (hop.call(options, '[[' + key + ']]')) {\n // i. Let optionsValue be the value of options.[[]].\n var optionsValue = options['[[' + key + ']]'];\n\n // ii. If the result of calling the [[Call]] internal method of indexOf\n // with keyLocaleData as the this value and an argument list\n // containing the single item optionsValue is not -1, then\n if (indexOf.call(keyLocaleData, optionsValue) !== -1) {\n // 1. If optionsValue is not equal to value, then\n if (optionsValue !== value) {\n // a. Let value be optionsValue.\n value = optionsValue;\n // b. Let supportedExtensionAddition be \"\".\n supportedExtensionAddition = '';\n }\n }\n }\n // i. Set result.[[]] to value.\n result['[[' + key + ']]'] = value;\n\n // j. Append supportedExtensionAddition to supportedExtension.\n supportedExtension += supportedExtensionAddition;\n\n // k. Increase i by 1.\n i++;\n }\n // 12. If the length of supportedExtension is greater than 2, then\n if (supportedExtension.length > 2) {\n // a.\n var privateIndex = foundLocale.indexOf(\"-x-\");\n // b.\n if (privateIndex === -1) {\n // i.\n foundLocale = foundLocale + supportedExtension;\n }\n // c.\n else {\n // i.\n var preExtension = foundLocale.substring(0, privateIndex);\n // ii.\n var postExtension = foundLocale.substring(privateIndex);\n // iii.\n foundLocale = preExtension + supportedExtension + postExtension;\n }\n // d. asserting - skipping\n // e.\n foundLocale = CanonicalizeLanguageTag(foundLocale);\n }\n // 13. Set result.[[locale]] to foundLocale.\n result['[[locale]]'] = foundLocale;\n\n // 14. Return result.\n return result;\n}\n\n/**\n * The LookupSupportedLocales abstract operation returns the subset of the\n * provided BCP 47 language priority list requestedLocales for which\n * availableLocales has a matching locale when using the BCP 47 Lookup algorithm.\n * Locales appear in the same order in the returned list as in requestedLocales.\n * The following steps are taken:\n */\nfunction /* 9.2.6 */LookupSupportedLocales(availableLocales, requestedLocales) {\n // 1. Let len be the number of elements in requestedLocales.\n var len = requestedLocales.length;\n // 2. Let subset be a new empty List.\n var subset = new List();\n // 3. Let k be 0.\n var k = 0;\n\n // 4. Repeat while k < len\n while (k < len) {\n // a. Let locale be the element of requestedLocales at 0-origined list\n // position k.\n var locale = requestedLocales[k];\n // b. Let noExtensionsLocale be the String value that is locale with all\n // Unicode locale extension sequences removed.\n var noExtensionsLocale = String(locale).replace(expUnicodeExSeq, '');\n // c. Let availableLocale be the result of calling the\n // BestAvailableLocale abstract operation (defined in 9.2.2) with\n // arguments availableLocales and noExtensionsLocale.\n var availableLocale = BestAvailableLocale(availableLocales, noExtensionsLocale);\n\n // d. If availableLocale is not undefined, then append locale to the end of\n // subset.\n if (availableLocale !== undefined) arrPush.call(subset, locale);\n\n // e. Increment k by 1.\n k++;\n }\n\n // 5. Let subsetArray be a new Array object whose elements are the same\n // values in the same order as the elements of subset.\n var subsetArray = arrSlice.call(subset);\n\n // 6. Return subsetArray.\n return subsetArray;\n}\n\n/**\n * The BestFitSupportedLocales abstract operation returns the subset of the\n * provided BCP 47 language priority list requestedLocales for which\n * availableLocales has a matching locale when using the Best Fit Matcher\n * algorithm. Locales appear in the same order in the returned list as in\n * requestedLocales. The steps taken are implementation dependent.\n */\nfunction /*9.2.7 */BestFitSupportedLocales(availableLocales, requestedLocales) {\n // ###TODO: implement this function as described by the specification###\n return LookupSupportedLocales(availableLocales, requestedLocales);\n}\n\n/**\n * The SupportedLocales abstract operation returns the subset of the provided BCP\n * 47 language priority list requestedLocales for which availableLocales has a\n * matching locale. Two algorithms are available to match the locales: the Lookup\n * algorithm described in RFC 4647 section 3.4, and an implementation dependent\n * best-fit algorithm. Locales appear in the same order in the returned list as\n * in requestedLocales. The following steps are taken:\n */\nfunction /*9.2.8 */SupportedLocales(availableLocales, requestedLocales, options) {\n var matcher = void 0,\n subset = void 0;\n\n // 1. If options is not undefined, then\n if (options !== undefined) {\n // a. Let options be ToObject(options).\n options = new Record(toObject(options));\n // b. Let matcher be the result of calling the [[Get]] internal method of\n // options with argument \"localeMatcher\".\n matcher = options.localeMatcher;\n\n // c. If matcher is not undefined, then\n if (matcher !== undefined) {\n // i. Let matcher be ToString(matcher).\n matcher = String(matcher);\n\n // ii. If matcher is not \"lookup\" or \"best fit\", then throw a RangeError\n // exception.\n if (matcher !== 'lookup' && matcher !== 'best fit') throw new RangeError('matcher should be \"lookup\" or \"best fit\"');\n }\n }\n // 2. If matcher is undefined or \"best fit\", then\n if (matcher === undefined || matcher === 'best fit')\n // a. Let subset be the result of calling the BestFitSupportedLocales\n // abstract operation (defined in 9.2.7) with arguments\n // availableLocales and requestedLocales.\n subset = BestFitSupportedLocales(availableLocales, requestedLocales);\n // 3. Else\n else\n // a. Let subset be the result of calling the LookupSupportedLocales\n // abstract operation (defined in 9.2.6) with arguments\n // availableLocales and requestedLocales.\n subset = LookupSupportedLocales(availableLocales, requestedLocales);\n\n // 4. For each named own property name P of subset,\n for (var P in subset) {\n if (!hop.call(subset, P)) continue;\n\n // a. Let desc be the result of calling the [[GetOwnProperty]] internal\n // method of subset with P.\n // b. Set desc.[[Writable]] to false.\n // c. Set desc.[[Configurable]] to false.\n // d. Call the [[DefineOwnProperty]] internal method of subset with P, desc,\n // and true as arguments.\n defineProperty(subset, P, {\n writable: false, configurable: false, value: subset[P]\n });\n }\n // \"Freeze\" the array so no new elements can be added\n defineProperty(subset, 'length', { writable: false });\n\n // 5. Return subset\n return subset;\n}\n\n/**\n * The GetOption abstract operation extracts the value of the property named\n * property from the provided options object, converts it to the required type,\n * checks whether it is one of a List of allowed values, and fills in a fallback\n * value if necessary.\n */\nfunction /*9.2.9 */GetOption(options, property, type, values, fallback) {\n // 1. Let value be the result of calling the [[Get]] internal method of\n // options with argument property.\n var value = options[property];\n\n // 2. If value is not undefined, then\n if (value !== undefined) {\n // a. Assert: type is \"boolean\" or \"string\".\n // b. If type is \"boolean\", then let value be ToBoolean(value).\n // c. If type is \"string\", then let value be ToString(value).\n value = type === 'boolean' ? Boolean(value) : type === 'string' ? String(value) : value;\n\n // d. If values is not undefined, then\n if (values !== undefined) {\n // i. If values does not contain an element equal to value, then throw a\n // RangeError exception.\n if (arrIndexOf.call(values, value) === -1) throw new RangeError(\"'\" + value + \"' is not an allowed value for `\" + property + '`');\n }\n\n // e. Return value.\n return value;\n }\n // Else return fallback.\n return fallback;\n}\n\n/**\n * The GetNumberOption abstract operation extracts a property value from the\n * provided options object, converts it to a Number value, checks whether it is\n * in the allowed range, and fills in a fallback value if necessary.\n */\nfunction /* 9.2.10 */GetNumberOption(options, property, minimum, maximum, fallback) {\n // 1. Let value be the result of calling the [[Get]] internal method of\n // options with argument property.\n var value = options[property];\n\n // 2. If value is not undefined, then\n if (value !== undefined) {\n // a. Let value be ToNumber(value).\n value = Number(value);\n\n // b. If value is NaN or less than minimum or greater than maximum, throw a\n // RangeError exception.\n if (isNaN(value) || value < minimum || value > maximum) throw new RangeError('Value is not a number or outside accepted range');\n\n // c. Return floor(value).\n return Math.floor(value);\n }\n // 3. Else return fallback.\n return fallback;\n}\n\n// 8 The Intl Object\nvar Intl = {};\n\n// 8.2 Function Properties of the Intl Object\n\n// 8.2.1\n// @spec[tc39/ecma402/master/spec/intl.html]\n// @clause[sec-intl.getcanonicallocales]\nfunction getCanonicalLocales(locales) {\n // 1. Let ll be ? CanonicalizeLocaleList(locales).\n var ll = CanonicalizeLocaleList(locales);\n // 2. Return CreateArrayFromList(ll).\n {\n var result = [];\n\n var len = ll.length;\n var k = 0;\n\n while (k < len) {\n result[k] = ll[k];\n k++;\n }\n return result;\n }\n}\n\nObject.defineProperty(Intl, 'getCanonicalLocales', {\n enumerable: false,\n configurable: true,\n writable: true,\n value: getCanonicalLocales\n});\n\n// Currency minor units output from get-4217 grunt task, formatted\nvar currencyMinorUnits = {\n BHD: 3, BYR: 0, XOF: 0, BIF: 0, XAF: 0, CLF: 4, CLP: 0, KMF: 0, DJF: 0,\n XPF: 0, GNF: 0, ISK: 0, IQD: 3, JPY: 0, JOD: 3, KRW: 0, KWD: 3, LYD: 3,\n OMR: 3, PYG: 0, RWF: 0, TND: 3, UGX: 0, UYI: 0, VUV: 0, VND: 0\n};\n\n// Define the NumberFormat constructor internally so it cannot be tainted\nfunction NumberFormatConstructor() {\n var locales = arguments[0];\n var options = arguments[1];\n\n if (!this || this === Intl) {\n return new Intl.NumberFormat(locales, options);\n }\n\n return InitializeNumberFormat(toObject(this), locales, options);\n}\n\ndefineProperty(Intl, 'NumberFormat', {\n configurable: true,\n writable: true,\n value: NumberFormatConstructor\n});\n\n// Must explicitly set prototypes as unwritable\ndefineProperty(Intl.NumberFormat, 'prototype', {\n writable: false\n});\n\n/**\n * The abstract operation InitializeNumberFormat accepts the arguments\n * numberFormat (which must be an object), locales, and options. It initializes\n * numberFormat as a NumberFormat object.\n */\nfunction /*11.1.1.1 */InitializeNumberFormat(numberFormat, locales, options) {\n // This will be a internal properties object if we're not already initialized\n var internal = getInternalProperties(numberFormat);\n\n // Create an object whose props can be used to restore the values of RegExp props\n var regexpRestore = createRegExpRestore();\n\n // 1. If numberFormat has an [[initializedIntlObject]] internal property with\n // value true, throw a TypeError exception.\n if (internal['[[initializedIntlObject]]'] === true) throw new TypeError('`this` object has already been initialized as an Intl object');\n\n // Need this to access the `internal` object\n defineProperty(numberFormat, '__getInternalProperties', {\n value: function value() {\n // NOTE: Non-standard, for internal use only\n if (arguments[0] === secret) return internal;\n }\n });\n\n // 2. Set the [[initializedIntlObject]] internal property of numberFormat to true.\n internal['[[initializedIntlObject]]'] = true;\n\n // 3. Let requestedLocales be the result of calling the CanonicalizeLocaleList\n // abstract operation (defined in 9.2.1) with argument locales.\n var requestedLocales = CanonicalizeLocaleList(locales);\n\n // 4. If options is undefined, then\n if (options === undefined)\n // a. Let options be the result of creating a new object as if by the\n // expression new Object() where Object is the standard built-in constructor\n // with that name.\n options = {};\n\n // 5. Else\n else\n // a. Let options be ToObject(options).\n options = toObject(options);\n\n // 6. Let opt be a new Record.\n var opt = new Record(),\n\n\n // 7. Let matcher be the result of calling the GetOption abstract operation\n // (defined in 9.2.9) with the arguments options, \"localeMatcher\", \"string\",\n // a List containing the two String values \"lookup\" and \"best fit\", and\n // \"best fit\".\n matcher = GetOption(options, 'localeMatcher', 'string', new List('lookup', 'best fit'), 'best fit');\n\n // 8. Set opt.[[localeMatcher]] to matcher.\n opt['[[localeMatcher]]'] = matcher;\n\n // 9. Let NumberFormat be the standard built-in object that is the initial value\n // of Intl.NumberFormat.\n // 10. Let localeData be the value of the [[localeData]] internal property of\n // NumberFormat.\n var localeData = internals.NumberFormat['[[localeData]]'];\n\n // 11. Let r be the result of calling the ResolveLocale abstract operation\n // (defined in 9.2.5) with the [[availableLocales]] internal property of\n // NumberFormat, requestedLocales, opt, the [[relevantExtensionKeys]]\n // internal property of NumberFormat, and localeData.\n var r = ResolveLocale(internals.NumberFormat['[[availableLocales]]'], requestedLocales, opt, internals.NumberFormat['[[relevantExtensionKeys]]'], localeData);\n\n // 12. Set the [[locale]] internal property of numberFormat to the value of\n // r.[[locale]].\n internal['[[locale]]'] = r['[[locale]]'];\n\n // 13. Set the [[numberingSystem]] internal property of numberFormat to the value\n // of r.[[nu]].\n internal['[[numberingSystem]]'] = r['[[nu]]'];\n\n // The specification doesn't tell us to do this, but it's helpful later on\n internal['[[dataLocale]]'] = r['[[dataLocale]]'];\n\n // 14. Let dataLocale be the value of r.[[dataLocale]].\n var dataLocale = r['[[dataLocale]]'];\n\n // 15. Let s be the result of calling the GetOption abstract operation with the\n // arguments options, \"style\", \"string\", a List containing the three String\n // values \"decimal\", \"percent\", and \"currency\", and \"decimal\".\n var s = GetOption(options, 'style', 'string', new List('decimal', 'percent', 'currency'), 'decimal');\n\n // 16. Set the [[style]] internal property of numberFormat to s.\n internal['[[style]]'] = s;\n\n // 17. Let c be the result of calling the GetOption abstract operation with the\n // arguments options, \"currency\", \"string\", undefined, and undefined.\n var c = GetOption(options, 'currency', 'string');\n\n // 18. If c is not undefined and the result of calling the\n // IsWellFormedCurrencyCode abstract operation (defined in 6.3.1) with\n // argument c is false, then throw a RangeError exception.\n if (c !== undefined && !IsWellFormedCurrencyCode(c)) throw new RangeError(\"'\" + c + \"' is not a valid currency code\");\n\n // 19. If s is \"currency\" and c is undefined, throw a TypeError exception.\n if (s === 'currency' && c === undefined) throw new TypeError('Currency code is required when style is currency');\n\n var cDigits = void 0;\n\n // 20. If s is \"currency\", then\n if (s === 'currency') {\n // a. Let c be the result of converting c to upper case as specified in 6.1.\n c = c.toUpperCase();\n\n // b. Set the [[currency]] internal property of numberFormat to c.\n internal['[[currency]]'] = c;\n\n // c. Let cDigits be the result of calling the CurrencyDigits abstract\n // operation (defined below) with argument c.\n cDigits = CurrencyDigits(c);\n }\n\n // 21. Let cd be the result of calling the GetOption abstract operation with the\n // arguments options, \"currencyDisplay\", \"string\", a List containing the\n // three String values \"code\", \"symbol\", and \"name\", and \"symbol\".\n var cd = GetOption(options, 'currencyDisplay', 'string', new List('code', 'symbol', 'name'), 'symbol');\n\n // 22. If s is \"currency\", then set the [[currencyDisplay]] internal property of\n // numberFormat to cd.\n if (s === 'currency') internal['[[currencyDisplay]]'] = cd;\n\n // 23. Let mnid be the result of calling the GetNumberOption abstract operation\n // (defined in 9.2.10) with arguments options, \"minimumIntegerDigits\", 1, 21,\n // and 1.\n var mnid = GetNumberOption(options, 'minimumIntegerDigits', 1, 21, 1);\n\n // 24. Set the [[minimumIntegerDigits]] internal property of numberFormat to mnid.\n internal['[[minimumIntegerDigits]]'] = mnid;\n\n // 25. If s is \"currency\", then let mnfdDefault be cDigits; else let mnfdDefault\n // be 0.\n var mnfdDefault = s === 'currency' ? cDigits : 0;\n\n // 26. Let mnfd be the result of calling the GetNumberOption abstract operation\n // with arguments options, \"minimumFractionDigits\", 0, 20, and mnfdDefault.\n var mnfd = GetNumberOption(options, 'minimumFractionDigits', 0, 20, mnfdDefault);\n\n // 27. Set the [[minimumFractionDigits]] internal property of numberFormat to mnfd.\n internal['[[minimumFractionDigits]]'] = mnfd;\n\n // 28. If s is \"currency\", then let mxfdDefault be max(mnfd, cDigits); else if s\n // is \"percent\", then let mxfdDefault be max(mnfd, 0); else let mxfdDefault\n // be max(mnfd, 3).\n var mxfdDefault = s === 'currency' ? Math.max(mnfd, cDigits) : s === 'percent' ? Math.max(mnfd, 0) : Math.max(mnfd, 3);\n\n // 29. Let mxfd be the result of calling the GetNumberOption abstract operation\n // with arguments options, \"maximumFractionDigits\", mnfd, 20, and mxfdDefault.\n var mxfd = GetNumberOption(options, 'maximumFractionDigits', mnfd, 20, mxfdDefault);\n\n // 30. Set the [[maximumFractionDigits]] internal property of numberFormat to mxfd.\n internal['[[maximumFractionDigits]]'] = mxfd;\n\n // 31. Let mnsd be the result of calling the [[Get]] internal method of options\n // with argument \"minimumSignificantDigits\".\n var mnsd = options.minimumSignificantDigits;\n\n // 32. Let mxsd be the result of calling the [[Get]] internal method of options\n // with argument \"maximumSignificantDigits\".\n var mxsd = options.maximumSignificantDigits;\n\n // 33. If mnsd is not undefined or mxsd is not undefined, then:\n if (mnsd !== undefined || mxsd !== undefined) {\n // a. Let mnsd be the result of calling the GetNumberOption abstract\n // operation with arguments options, \"minimumSignificantDigits\", 1, 21,\n // and 1.\n mnsd = GetNumberOption(options, 'minimumSignificantDigits', 1, 21, 1);\n\n // b. Let mxsd be the result of calling the GetNumberOption abstract\n // operation with arguments options, \"maximumSignificantDigits\", mnsd,\n // 21, and 21.\n mxsd = GetNumberOption(options, 'maximumSignificantDigits', mnsd, 21, 21);\n\n // c. Set the [[minimumSignificantDigits]] internal property of numberFormat\n // to mnsd, and the [[maximumSignificantDigits]] internal property of\n // numberFormat to mxsd.\n internal['[[minimumSignificantDigits]]'] = mnsd;\n internal['[[maximumSignificantDigits]]'] = mxsd;\n }\n // 34. Let g be the result of calling the GetOption abstract operation with the\n // arguments options, \"useGrouping\", \"boolean\", undefined, and true.\n var g = GetOption(options, 'useGrouping', 'boolean', undefined, true);\n\n // 35. Set the [[useGrouping]] internal property of numberFormat to g.\n internal['[[useGrouping]]'] = g;\n\n // 36. Let dataLocaleData be the result of calling the [[Get]] internal method of\n // localeData with argument dataLocale.\n var dataLocaleData = localeData[dataLocale];\n\n // 37. Let patterns be the result of calling the [[Get]] internal method of\n // dataLocaleData with argument \"patterns\".\n var patterns = dataLocaleData.patterns;\n\n // 38. Assert: patterns is an object (see 11.2.3)\n\n // 39. Let stylePatterns be the result of calling the [[Get]] internal method of\n // patterns with argument s.\n var stylePatterns = patterns[s];\n\n // 40. Set the [[positivePattern]] internal property of numberFormat to the\n // result of calling the [[Get]] internal method of stylePatterns with the\n // argument \"positivePattern\".\n internal['[[positivePattern]]'] = stylePatterns.positivePattern;\n\n // 41. Set the [[negativePattern]] internal property of numberFormat to the\n // result of calling the [[Get]] internal method of stylePatterns with the\n // argument \"negativePattern\".\n internal['[[negativePattern]]'] = stylePatterns.negativePattern;\n\n // 42. Set the [[boundFormat]] internal property of numberFormat to undefined.\n internal['[[boundFormat]]'] = undefined;\n\n // 43. Set the [[initializedNumberFormat]] internal property of numberFormat to\n // true.\n internal['[[initializedNumberFormat]]'] = true;\n\n // In ES3, we need to pre-bind the format() function\n if (es3) numberFormat.format = GetFormatNumber.call(numberFormat);\n\n // Restore the RegExp properties\n regexpRestore();\n\n // Return the newly initialised object\n return numberFormat;\n}\n\nfunction CurrencyDigits(currency) {\n // When the CurrencyDigits abstract operation is called with an argument currency\n // (which must be an upper case String value), the following steps are taken:\n\n // 1. If the ISO 4217 currency and funds code list contains currency as an\n // alphabetic code, then return the minor unit value corresponding to the\n // currency from the list; else return 2.\n return currencyMinorUnits[currency] !== undefined ? currencyMinorUnits[currency] : 2;\n}\n\n/* 11.2.3 */internals.NumberFormat = {\n '[[availableLocales]]': [],\n '[[relevantExtensionKeys]]': ['nu'],\n '[[localeData]]': {}\n};\n\n/**\n * When the supportedLocalesOf method of Intl.NumberFormat is called, the\n * following steps are taken:\n */\n/* 11.2.2 */\ndefineProperty(Intl.NumberFormat, 'supportedLocalesOf', {\n configurable: true,\n writable: true,\n value: fnBind.call(function (locales) {\n // Bound functions only have the `this` value altered if being used as a constructor,\n // this lets us imitate a native function that has no constructor\n if (!hop.call(this, '[[availableLocales]]')) throw new TypeError('supportedLocalesOf() is not a constructor');\n\n // Create an object whose props can be used to restore the values of RegExp props\n var regexpRestore = createRegExpRestore(),\n\n\n // 1. If options is not provided, then let options be undefined.\n options = arguments[1],\n\n\n // 2. Let availableLocales be the value of the [[availableLocales]] internal\n // property of the standard built-in object that is the initial value of\n // Intl.NumberFormat.\n\n availableLocales = this['[[availableLocales]]'],\n\n\n // 3. Let requestedLocales be the result of calling the CanonicalizeLocaleList\n // abstract operation (defined in 9.2.1) with argument locales.\n requestedLocales = CanonicalizeLocaleList(locales);\n\n // Restore the RegExp properties\n regexpRestore();\n\n // 4. Return the result of calling the SupportedLocales abstract operation\n // (defined in 9.2.8) with arguments availableLocales, requestedLocales,\n // and options.\n return SupportedLocales(availableLocales, requestedLocales, options);\n }, internals.NumberFormat)\n});\n\n/**\n * This named accessor property returns a function that formats a number\n * according to the effective locale and the formatting options of this\n * NumberFormat object.\n */\n/* 11.3.2 */defineProperty(Intl.NumberFormat.prototype, 'format', {\n configurable: true,\n get: GetFormatNumber\n});\n\nfunction GetFormatNumber() {\n var internal = this !== null && babelHelpers$1[\"typeof\"](this) === 'object' && getInternalProperties(this);\n\n // Satisfy test 11.3_b\n if (!internal || !internal['[[initializedNumberFormat]]']) throw new TypeError('`this` value for format() is not an initialized Intl.NumberFormat object.');\n\n // The value of the [[Get]] attribute is a function that takes the following\n // steps:\n\n // 1. If the [[boundFormat]] internal property of this NumberFormat object\n // is undefined, then:\n if (internal['[[boundFormat]]'] === undefined) {\n // a. Let F be a Function object, with internal properties set as\n // specified for built-in functions in ES5, 15, or successor, and the\n // length property set to 1, that takes the argument value and\n // performs the following steps:\n var F = function F(value) {\n // i. If value is not provided, then let value be undefined.\n // ii. Let x be ToNumber(value).\n // iii. Return the result of calling the FormatNumber abstract\n // operation (defined below) with arguments this and x.\n return FormatNumber(this, /* x = */Number(value));\n };\n\n // b. Let bind be the standard built-in function object defined in ES5,\n // 15.3.4.5.\n // c. Let bf be the result of calling the [[Call]] internal method of\n // bind with F as the this value and an argument list containing\n // the single item this.\n var bf = fnBind.call(F, this);\n\n // d. Set the [[boundFormat]] internal property of this NumberFormat\n // object to bf.\n internal['[[boundFormat]]'] = bf;\n }\n // Return the value of the [[boundFormat]] internal property of this\n // NumberFormat object.\n return internal['[[boundFormat]]'];\n}\n\nfunction formatToParts() {\n var value = arguments.length <= 0 || arguments[0] === undefined ? undefined : arguments[0];\n\n var internal = this !== null && babelHelpers$1[\"typeof\"](this) === 'object' && getInternalProperties(this);\n if (!internal || !internal['[[initializedNumberFormat]]']) throw new TypeError('`this` value for formatToParts() is not an initialized Intl.NumberFormat object.');\n\n var x = Number(value);\n return FormatNumberToParts(this, x);\n}\n\nObject.defineProperty(Intl.NumberFormat.prototype, 'formatToParts', {\n configurable: true,\n enumerable: false,\n writable: true,\n value: formatToParts\n});\n\n/*\n * @spec[stasm/ecma402/number-format-to-parts/spec/numberformat.html]\n * @clause[sec-formatnumbertoparts]\n */\nfunction FormatNumberToParts(numberFormat, x) {\n // 1. Let parts be ? PartitionNumberPattern(numberFormat, x).\n var parts = PartitionNumberPattern(numberFormat, x);\n // 2. Let result be ArrayCreate(0).\n var result = [];\n // 3. Let n be 0.\n var n = 0;\n // 4. For each part in parts, do:\n for (var i = 0; parts.length > i; i++) {\n var part = parts[i];\n // a. Let O be ObjectCreate(%ObjectPrototype%).\n var O = {};\n // a. Perform ? CreateDataPropertyOrThrow(O, \"type\", part.[[type]]).\n O.type = part['[[type]]'];\n // a. Perform ? CreateDataPropertyOrThrow(O, \"value\", part.[[value]]).\n O.value = part['[[value]]'];\n // a. Perform ? CreateDataPropertyOrThrow(result, ? ToString(n), O).\n result[n] = O;\n // a. Increment n by 1.\n n += 1;\n }\n // 5. Return result.\n return result;\n}\n\n/*\n * @spec[stasm/ecma402/number-format-to-parts/spec/numberformat.html]\n * @clause[sec-partitionnumberpattern]\n */\nfunction PartitionNumberPattern(numberFormat, x) {\n\n var internal = getInternalProperties(numberFormat),\n locale = internal['[[dataLocale]]'],\n nums = internal['[[numberingSystem]]'],\n data = internals.NumberFormat['[[localeData]]'][locale],\n ild = data.symbols[nums] || data.symbols.latn,\n pattern = void 0;\n\n // 1. If x is not NaN and x < 0, then:\n if (!isNaN(x) && x < 0) {\n // a. Let x be -x.\n x = -x;\n // a. Let pattern be the value of numberFormat.[[negativePattern]].\n pattern = internal['[[negativePattern]]'];\n }\n // 2. Else,\n else {\n // a. Let pattern be the value of numberFormat.[[positivePattern]].\n pattern = internal['[[positivePattern]]'];\n }\n // 3. Let result be a new empty List.\n var result = new List();\n // 4. Let beginIndex be Call(%StringProto_indexOf%, pattern, \"{\", 0).\n var beginIndex = pattern.indexOf('{', 0);\n // 5. Let endIndex be 0.\n var endIndex = 0;\n // 6. Let nextIndex be 0.\n var nextIndex = 0;\n // 7. Let length be the number of code units in pattern.\n var length = pattern.length;\n // 8. Repeat while beginIndex is an integer index into pattern:\n while (beginIndex > -1 && beginIndex < length) {\n // a. Set endIndex to Call(%StringProto_indexOf%, pattern, \"}\", beginIndex)\n endIndex = pattern.indexOf('}', beginIndex);\n // a. If endIndex = -1, throw new Error exception.\n if (endIndex === -1) throw new Error();\n // a. If beginIndex is greater than nextIndex, then:\n if (beginIndex > nextIndex) {\n // i. Let literal be a substring of pattern from position nextIndex, inclusive, to position beginIndex, exclusive.\n var literal = pattern.substring(nextIndex, beginIndex);\n // ii. Add new part record { [[type]]: \"literal\", [[value]]: literal } as a new element of the list result.\n arrPush.call(result, { '[[type]]': 'literal', '[[value]]': literal });\n }\n // a. Let p be the substring of pattern from position beginIndex, exclusive, to position endIndex, exclusive.\n var p = pattern.substring(beginIndex + 1, endIndex);\n // a. If p is equal \"number\", then:\n if (p === \"number\") {\n // i. If x is NaN,\n if (isNaN(x)) {\n // 1. Let n be an ILD String value indicating the NaN value.\n var n = ild.nan;\n // 2. Add new part record { [[type]]: \"nan\", [[value]]: n } as a new element of the list result.\n arrPush.call(result, { '[[type]]': 'nan', '[[value]]': n });\n }\n // ii. Else if isFinite(x) is false,\n else if (!isFinite(x)) {\n // 1. Let n be an ILD String value indicating infinity.\n var _n = ild.infinity;\n // 2. Add new part record { [[type]]: \"infinity\", [[value]]: n } as a new element of the list result.\n arrPush.call(result, { '[[type]]': 'infinity', '[[value]]': _n });\n }\n // iii. Else,\n else {\n // 1. If the value of numberFormat.[[style]] is \"percent\" and isFinite(x), let x be 100 × x.\n if (internal['[[style]]'] === 'percent' && isFinite(x)) x *= 100;\n\n var _n2 = void 0;\n // 2. If the numberFormat.[[minimumSignificantDigits]] and numberFormat.[[maximumSignificantDigits]] are present, then\n if (hop.call(internal, '[[minimumSignificantDigits]]') && hop.call(internal, '[[maximumSignificantDigits]]')) {\n // a. Let n be ToRawPrecision(x, numberFormat.[[minimumSignificantDigits]], numberFormat.[[maximumSignificantDigits]]).\n _n2 = ToRawPrecision(x, internal['[[minimumSignificantDigits]]'], internal['[[maximumSignificantDigits]]']);\n }\n // 3. Else,\n else {\n // a. Let n be ToRawFixed(x, numberFormat.[[minimumIntegerDigits]], numberFormat.[[minimumFractionDigits]], numberFormat.[[maximumFractionDigits]]).\n _n2 = ToRawFixed(x, internal['[[minimumIntegerDigits]]'], internal['[[minimumFractionDigits]]'], internal['[[maximumFractionDigits]]']);\n }\n // 4. If the value of the numberFormat.[[numberingSystem]] matches one of the values in the \"Numbering System\" column of Table 2 below, then\n if (numSys[nums]) {\n (function () {\n // a. Let digits be an array whose 10 String valued elements are the UTF-16 string representations of the 10 digits specified in the \"Digits\" column of the matching row in Table 2.\n var digits = numSys[nums];\n // a. Replace each digit in n with the value of digits[digit].\n _n2 = String(_n2).replace(/\\d/g, function (digit) {\n return digits[digit];\n });\n })();\n }\n // 5. Else use an implementation dependent algorithm to map n to the appropriate representation of n in the given numbering system.\n else _n2 = String(_n2); // ###TODO###\n\n var integer = void 0;\n var fraction = void 0;\n // 6. Let decimalSepIndex be Call(%StringProto_indexOf%, n, \".\", 0).\n var decimalSepIndex = _n2.indexOf('.', 0);\n // 7. If decimalSepIndex > 0, then:\n if (decimalSepIndex > 0) {\n // a. Let integer be the substring of n from position 0, inclusive, to position decimalSepIndex, exclusive.\n integer = _n2.substring(0, decimalSepIndex);\n // a. Let fraction be the substring of n from position decimalSepIndex, exclusive, to the end of n.\n fraction = _n2.substring(decimalSepIndex + 1, decimalSepIndex.length);\n }\n // 8. Else:\n else {\n // a. Let integer be n.\n integer = _n2;\n // a. Let fraction be undefined.\n fraction = undefined;\n }\n // 9. If the value of the numberFormat.[[useGrouping]] is true,\n if (internal['[[useGrouping]]'] === true) {\n // a. Let groupSepSymbol be the ILND String representing the grouping separator.\n var groupSepSymbol = ild.group;\n // a. Let groups be a List whose elements are, in left to right order, the substrings defined by ILND set of locations within the integer.\n var groups = [];\n // ----> implementation:\n // Primary group represents the group closest to the decimal\n var pgSize = data.patterns.primaryGroupSize || 3;\n // Secondary group is every other group\n var sgSize = data.patterns.secondaryGroupSize || pgSize;\n // Group only if necessary\n if (integer.length > pgSize) {\n // Index of the primary grouping separator\n var end = integer.length - pgSize;\n // Starting index for our loop\n var idx = end % sgSize;\n var start = integer.slice(0, idx);\n if (start.length) arrPush.call(groups, start);\n // Loop to separate into secondary grouping digits\n while (idx < end) {\n arrPush.call(groups, integer.slice(idx, idx + sgSize));\n idx += sgSize;\n }\n // Add the primary grouping digits\n arrPush.call(groups, integer.slice(end));\n } else {\n arrPush.call(groups, integer);\n }\n // a. Assert: The number of elements in groups List is greater than 0.\n if (groups.length === 0) throw new Error();\n // a. Repeat, while groups List is not empty:\n while (groups.length) {\n // i. Remove the first element from groups and let integerGroup be the value of that element.\n var integerGroup = arrShift.call(groups);\n // ii. Add new part record { [[type]]: \"integer\", [[value]]: integerGroup } as a new element of the list result.\n arrPush.call(result, { '[[type]]': 'integer', '[[value]]': integerGroup });\n // iii. If groups List is not empty, then:\n if (groups.length) {\n // 1. Add new part record { [[type]]: \"group\", [[value]]: groupSepSymbol } as a new element of the list result.\n arrPush.call(result, { '[[type]]': 'group', '[[value]]': groupSepSymbol });\n }\n }\n }\n // 10. Else,\n else {\n // a. Add new part record { [[type]]: \"integer\", [[value]]: integer } as a new element of the list result.\n arrPush.call(result, { '[[type]]': 'integer', '[[value]]': integer });\n }\n // 11. If fraction is not undefined, then:\n if (fraction !== undefined) {\n // a. Let decimalSepSymbol be the ILND String representing the decimal separator.\n var decimalSepSymbol = ild.decimal;\n // a. Add new part record { [[type]]: \"decimal\", [[value]]: decimalSepSymbol } as a new element of the list result.\n arrPush.call(result, { '[[type]]': 'decimal', '[[value]]': decimalSepSymbol });\n // a. Add new part record { [[type]]: \"fraction\", [[value]]: fraction } as a new element of the list result.\n arrPush.call(result, { '[[type]]': 'fraction', '[[value]]': fraction });\n }\n }\n }\n // a. Else if p is equal \"plusSign\", then:\n else if (p === \"plusSign\") {\n // i. Let plusSignSymbol be the ILND String representing the plus sign.\n var plusSignSymbol = ild.plusSign;\n // ii. Add new part record { [[type]]: \"plusSign\", [[value]]: plusSignSymbol } as a new element of the list result.\n arrPush.call(result, { '[[type]]': 'plusSign', '[[value]]': plusSignSymbol });\n }\n // a. Else if p is equal \"minusSign\", then:\n else if (p === \"minusSign\") {\n // i. Let minusSignSymbol be the ILND String representing the minus sign.\n var minusSignSymbol = ild.minusSign;\n // ii. Add new part record { [[type]]: \"minusSign\", [[value]]: minusSignSymbol } as a new element of the list result.\n arrPush.call(result, { '[[type]]': 'minusSign', '[[value]]': minusSignSymbol });\n }\n // a. Else if p is equal \"percentSign\" and numberFormat.[[style]] is \"percent\", then:\n else if (p === \"percentSign\" && internal['[[style]]'] === \"percent\") {\n // i. Let percentSignSymbol be the ILND String representing the percent sign.\n var percentSignSymbol = ild.percentSign;\n // ii. Add new part record { [[type]]: \"percentSign\", [[value]]: percentSignSymbol } as a new element of the list result.\n arrPush.call(result, { '[[type]]': 'literal', '[[value]]': percentSignSymbol });\n }\n // a. Else if p is equal \"currency\" and numberFormat.[[style]] is \"currency\", then:\n else if (p === \"currency\" && internal['[[style]]'] === \"currency\") {\n // i. Let currency be the value of numberFormat.[[currency]].\n var currency = internal['[[currency]]'];\n\n var cd = void 0;\n\n // ii. If numberFormat.[[currencyDisplay]] is \"code\", then\n if (internal['[[currencyDisplay]]'] === \"code\") {\n // 1. Let cd be currency.\n cd = currency;\n }\n // iii. Else if numberFormat.[[currencyDisplay]] is \"symbol\", then\n else if (internal['[[currencyDisplay]]'] === \"symbol\") {\n // 1. Let cd be an ILD string representing currency in short form. If the implementation does not have such a representation of currency, use currency itself.\n cd = data.currencies[currency] || currency;\n }\n // iv. Else if numberFormat.[[currencyDisplay]] is \"name\", then\n else if (internal['[[currencyDisplay]]'] === \"name\") {\n // 1. Let cd be an ILD string representing currency in long form. If the implementation does not have such a representation of currency, then use currency itself.\n cd = currency;\n }\n // v. Add new part record { [[type]]: \"currency\", [[value]]: cd } as a new element of the list result.\n arrPush.call(result, { '[[type]]': 'currency', '[[value]]': cd });\n }\n // a. Else,\n else {\n // i. Let literal be the substring of pattern from position beginIndex, inclusive, to position endIndex, inclusive.\n var _literal = pattern.substring(beginIndex, endIndex);\n // ii. Add new part record { [[type]]: \"literal\", [[value]]: literal } as a new element of the list result.\n arrPush.call(result, { '[[type]]': 'literal', '[[value]]': _literal });\n }\n // a. Set nextIndex to endIndex + 1.\n nextIndex = endIndex + 1;\n // a. Set beginIndex to Call(%StringProto_indexOf%, pattern, \"{\", nextIndex)\n beginIndex = pattern.indexOf('{', nextIndex);\n }\n // 9. If nextIndex is less than length, then:\n if (nextIndex < length) {\n // a. Let literal be the substring of pattern from position nextIndex, inclusive, to position length, exclusive.\n var _literal2 = pattern.substring(nextIndex, length);\n // a. Add new part record { [[type]]: \"literal\", [[value]]: literal } as a new element of the list result.\n arrPush.call(result, { '[[type]]': 'literal', '[[value]]': _literal2 });\n }\n // 10. Return result.\n return result;\n}\n\n/*\n * @spec[stasm/ecma402/number-format-to-parts/spec/numberformat.html]\n * @clause[sec-formatnumber]\n */\nfunction FormatNumber(numberFormat, x) {\n // 1. Let parts be ? PartitionNumberPattern(numberFormat, x).\n var parts = PartitionNumberPattern(numberFormat, x);\n // 2. Let result be an empty String.\n var result = '';\n // 3. For each part in parts, do:\n for (var i = 0; parts.length > i; i++) {\n var part = parts[i];\n // a. Set result to a String value produced by concatenating result and part.[[value]].\n result += part['[[value]]'];\n }\n // 4. Return result.\n return result;\n}\n\n/**\n * When the ToRawPrecision abstract operation is called with arguments x (which\n * must be a finite non-negative number), minPrecision, and maxPrecision (both\n * must be integers between 1 and 21) the following steps are taken:\n */\nfunction ToRawPrecision(x, minPrecision, maxPrecision) {\n // 1. Let p be maxPrecision.\n var p = maxPrecision;\n\n var m = void 0,\n e = void 0;\n\n // 2. If x = 0, then\n if (x === 0) {\n // a. Let m be the String consisting of p occurrences of the character \"0\".\n m = arrJoin.call(Array(p + 1), '0');\n // b. Let e be 0.\n e = 0;\n }\n // 3. Else\n else {\n // a. Let e and n be integers such that 10ᵖ⁻¹ ≤ n < 10ᵖ and for which the\n // exact mathematical value of n × 10ᵉ⁻ᵖ⁺¹ – x is as close to zero as\n // possible. If there are two such sets of e and n, pick the e and n for\n // which n × 10ᵉ⁻ᵖ⁺¹ is larger.\n e = log10Floor(Math.abs(x));\n\n // Easier to get to m from here\n var f = Math.round(Math.exp(Math.abs(e - p + 1) * Math.LN10));\n\n // b. Let m be the String consisting of the digits of the decimal\n // representation of n (in order, with no leading zeroes)\n m = String(Math.round(e - p + 1 < 0 ? x * f : x / f));\n }\n\n // 4. If e ≥ p, then\n if (e >= p)\n // a. Return the concatenation of m and e-p+1 occurrences of the character \"0\".\n return m + arrJoin.call(Array(e - p + 1 + 1), '0');\n\n // 5. If e = p-1, then\n else if (e === p - 1)\n // a. Return m.\n return m;\n\n // 6. If e ≥ 0, then\n else if (e >= 0)\n // a. Let m be the concatenation of the first e+1 characters of m, the character\n // \".\", and the remaining p–(e+1) characters of m.\n m = m.slice(0, e + 1) + '.' + m.slice(e + 1);\n\n // 7. If e < 0, then\n else if (e < 0)\n // a. Let m be the concatenation of the String \"0.\", –(e+1) occurrences of the\n // character \"0\", and the string m.\n m = '0.' + arrJoin.call(Array(-(e + 1) + 1), '0') + m;\n\n // 8. If m contains the character \".\", and maxPrecision > minPrecision, then\n if (m.indexOf(\".\") >= 0 && maxPrecision > minPrecision) {\n // a. Let cut be maxPrecision – minPrecision.\n var cut = maxPrecision - minPrecision;\n\n // b. Repeat while cut > 0 and the last character of m is \"0\":\n while (cut > 0 && m.charAt(m.length - 1) === '0') {\n // i. Remove the last character from m.\n m = m.slice(0, -1);\n\n // ii. Decrease cut by 1.\n cut--;\n }\n\n // c. If the last character of m is \".\", then\n if (m.charAt(m.length - 1) === '.')\n // i. Remove the last character from m.\n m = m.slice(0, -1);\n }\n // 9. Return m.\n return m;\n}\n\n/**\n * @spec[tc39/ecma402/master/spec/numberformat.html]\n * @clause[sec-torawfixed]\n * When the ToRawFixed abstract operation is called with arguments x (which must\n * be a finite non-negative number), minInteger (which must be an integer between\n * 1 and 21), minFraction, and maxFraction (which must be integers between 0 and\n * 20) the following steps are taken:\n */\nfunction ToRawFixed(x, minInteger, minFraction, maxFraction) {\n // 1. Let f be maxFraction.\n var f = maxFraction;\n // 2. Let n be an integer for which the exact mathematical value of n ÷ 10f – x is as close to zero as possible. If there are two such n, pick the larger n.\n var n = Math.pow(10, f) * x; // diverging...\n // 3. If n = 0, let m be the String \"0\". Otherwise, let m be the String consisting of the digits of the decimal representation of n (in order, with no leading zeroes).\n var m = n === 0 ? \"0\" : n.toFixed(0); // divering...\n\n {\n // this diversion is needed to take into consideration big numbers, e.g.:\n // 1.2344501e+37 -> 12344501000000000000000000000000000000\n var idx = void 0;\n var exp = (idx = m.indexOf('e')) > -1 ? m.slice(idx + 1) : 0;\n if (exp) {\n m = m.slice(0, idx).replace('.', '');\n m += arrJoin.call(Array(exp - (m.length - 1) + 1), '0');\n }\n }\n\n var int = void 0;\n // 4. If f ≠ 0, then\n if (f !== 0) {\n // a. Let k be the number of characters in m.\n var k = m.length;\n // a. If k ≤ f, then\n if (k <= f) {\n // i. Let z be the String consisting of f+1–k occurrences of the character \"0\".\n var z = arrJoin.call(Array(f + 1 - k + 1), '0');\n // ii. Let m be the concatenation of Strings z and m.\n m = z + m;\n // iii. Let k be f+1.\n k = f + 1;\n }\n // a. Let a be the first k–f characters of m, and let b be the remaining f characters of m.\n var a = m.substring(0, k - f),\n b = m.substring(k - f, m.length);\n // a. Let m be the concatenation of the three Strings a, \".\", and b.\n m = a + \".\" + b;\n // a. Let int be the number of characters in a.\n int = a.length;\n }\n // 5. Else, let int be the number of characters in m.\n else int = m.length;\n // 6. Let cut be maxFraction – minFraction.\n var cut = maxFraction - minFraction;\n // 7. Repeat while cut > 0 and the last character of m is \"0\":\n while (cut > 0 && m.slice(-1) === \"0\") {\n // a. Remove the last character from m.\n m = m.slice(0, -1);\n // a. Decrease cut by 1.\n cut--;\n }\n // 8. If the last character of m is \".\", then\n if (m.slice(-1) === \".\") {\n // a. Remove the last character from m.\n m = m.slice(0, -1);\n }\n // 9. If int < minInteger, then\n if (int < minInteger) {\n // a. Let z be the String consisting of minInteger–int occurrences of the character \"0\".\n var _z = arrJoin.call(Array(minInteger - int + 1), '0');\n // a. Let m be the concatenation of Strings z and m.\n m = _z + m;\n }\n // 10. Return m.\n return m;\n}\n\n// Sect 11.3.2 Table 2, Numbering systems\n// ======================================\nvar numSys = {\n arab: [\"٠\", \"١\", \"٢\", \"٣\", \"٤\", \"٥\", \"٦\", \"٧\", \"٨\", \"٩\"],\n arabext: [\"۰\", \"۱\", \"۲\", \"۳\", \"۴\", \"۵\", \"۶\", \"۷\", \"۸\", \"۹\"],\n bali: [\"᭐\", \"᭑\", \"᭒\", \"᭓\", \"᭔\", \"᭕\", \"᭖\", \"᭗\", \"᭘\", \"᭙\"],\n beng: [\"০\", \"১\", \"২\", \"৩\", \"৪\", \"৫\", \"৬\", \"৭\", \"৮\", \"৯\"],\n deva: [\"०\", \"१\", \"२\", \"३\", \"४\", \"५\", \"६\", \"७\", \"८\", \"९\"],\n fullwide: [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\"],\n gujr: [\"૦\", \"૧\", \"૨\", \"૩\", \"૪\", \"૫\", \"૬\", \"૭\", \"૮\", \"૯\"],\n guru: [\"੦\", \"੧\", \"੨\", \"੩\", \"੪\", \"੫\", \"੬\", \"੭\", \"੮\", \"੯\"],\n hanidec: [\"〇\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\", \"七\", \"八\", \"九\"],\n khmr: [\"០\", \"១\", \"២\", \"៣\", \"៤\", \"៥\", \"៦\", \"៧\", \"៨\", \"៩\"],\n knda: [\"೦\", \"೧\", \"೨\", \"೩\", \"೪\", \"೫\", \"೬\", \"೭\", \"೮\", \"೯\"],\n laoo: [\"໐\", \"໑\", \"໒\", \"໓\", \"໔\", \"໕\", \"໖\", \"໗\", \"໘\", \"໙\"],\n latn: [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\"],\n limb: [\"᥆\", \"᥇\", \"᥈\", \"᥉\", \"᥊\", \"᥋\", \"᥌\", \"᥍\", \"᥎\", \"᥏\"],\n mlym: [\"൦\", \"൧\", \"൨\", \"൩\", \"൪\", \"൫\", \"൬\", \"൭\", \"൮\", \"൯\"],\n mong: [\"᠐\", \"᠑\", \"᠒\", \"᠓\", \"᠔\", \"᠕\", \"᠖\", \"᠗\", \"᠘\", \"᠙\"],\n mymr: [\"၀\", \"၁\", \"၂\", \"၃\", \"၄\", \"၅\", \"၆\", \"၇\", \"၈\", \"၉\"],\n orya: [\"୦\", \"୧\", \"୨\", \"୩\", \"୪\", \"୫\", \"୬\", \"୭\", \"୮\", \"୯\"],\n tamldec: [\"௦\", \"௧\", \"௨\", \"௩\", \"௪\", \"௫\", \"௬\", \"௭\", \"௮\", \"௯\"],\n telu: [\"౦\", \"౧\", \"౨\", \"౩\", \"౪\", \"౫\", \"౬\", \"౭\", \"౮\", \"౯\"],\n thai: [\"๐\", \"๑\", \"๒\", \"๓\", \"๔\", \"๕\", \"๖\", \"๗\", \"๘\", \"๙\"],\n tibt: [\"༠\", \"༡\", \"༢\", \"༣\", \"༤\", \"༥\", \"༦\", \"༧\", \"༨\", \"༩\"]\n};\n\n/**\n * This function provides access to the locale and formatting options computed\n * during initialization of the object.\n *\n * The function returns a new object whose properties and attributes are set as\n * if constructed by an object literal assigning to each of the following\n * properties the value of the corresponding internal property of this\n * NumberFormat object (see 11.4): locale, numberingSystem, style, currency,\n * currencyDisplay, minimumIntegerDigits, minimumFractionDigits,\n * maximumFractionDigits, minimumSignificantDigits, maximumSignificantDigits, and\n * useGrouping. Properties whose corresponding internal properties are not present\n * are not assigned.\n */\n/* 11.3.3 */defineProperty(Intl.NumberFormat.prototype, 'resolvedOptions', {\n configurable: true,\n writable: true,\n value: function value() {\n var prop = void 0,\n descs = new Record(),\n props = ['locale', 'numberingSystem', 'style', 'currency', 'currencyDisplay', 'minimumIntegerDigits', 'minimumFractionDigits', 'maximumFractionDigits', 'minimumSignificantDigits', 'maximumSignificantDigits', 'useGrouping'],\n internal = this !== null && babelHelpers$1[\"typeof\"](this) === 'object' && getInternalProperties(this);\n\n // Satisfy test 11.3_b\n if (!internal || !internal['[[initializedNumberFormat]]']) throw new TypeError('`this` value for resolvedOptions() is not an initialized Intl.NumberFormat object.');\n\n for (var i = 0, max = props.length; i < max; i++) {\n if (hop.call(internal, prop = '[[' + props[i] + ']]')) descs[props[i]] = { value: internal[prop], writable: true, configurable: true, enumerable: true };\n }\n\n return objCreate({}, descs);\n }\n});\n\n/* jslint esnext: true */\n\n// Match these datetime components in a CLDR pattern, except those in single quotes\nvar expDTComponents = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;\n// trim patterns after transformations\nvar expPatternTrimmer = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g;\n// Skip over patterns with these datetime components because we don't have data\n// to back them up:\n// timezone, weekday, amoung others\nvar unwantedDTCs = /[rqQASjJgwWIQq]/; // xXVO were removed from this list in favor of computing matches with timeZoneName values but printing as empty string\n\nvar dtKeys = [\"era\", \"year\", \"month\", \"day\", \"weekday\", \"quarter\"];\nvar tmKeys = [\"hour\", \"minute\", \"second\", \"hour12\", \"timeZoneName\"];\n\nfunction isDateFormatOnly(obj) {\n for (var i = 0; i < tmKeys.length; i += 1) {\n if (obj.hasOwnProperty(tmKeys[i])) {\n return false;\n }\n }\n return true;\n}\n\nfunction isTimeFormatOnly(obj) {\n for (var i = 0; i < dtKeys.length; i += 1) {\n if (obj.hasOwnProperty(dtKeys[i])) {\n return false;\n }\n }\n return true;\n}\n\nfunction joinDateAndTimeFormats(dateFormatObj, timeFormatObj) {\n var o = { _: {} };\n for (var i = 0; i < dtKeys.length; i += 1) {\n if (dateFormatObj[dtKeys[i]]) {\n o[dtKeys[i]] = dateFormatObj[dtKeys[i]];\n }\n if (dateFormatObj._[dtKeys[i]]) {\n o._[dtKeys[i]] = dateFormatObj._[dtKeys[i]];\n }\n }\n for (var j = 0; j < tmKeys.length; j += 1) {\n if (timeFormatObj[tmKeys[j]]) {\n o[tmKeys[j]] = timeFormatObj[tmKeys[j]];\n }\n if (timeFormatObj._[tmKeys[j]]) {\n o._[tmKeys[j]] = timeFormatObj._[tmKeys[j]];\n }\n }\n return o;\n}\n\nfunction computeFinalPatterns(formatObj) {\n // From http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns:\n // 'In patterns, two single quotes represents a literal single quote, either\n // inside or outside single quotes. Text within single quotes is not\n // interpreted in any way (except for two adjacent single quotes).'\n formatObj.pattern12 = formatObj.extendedPattern.replace(/'([^']*)'/g, function ($0, literal) {\n return literal ? literal : \"'\";\n });\n\n // pattern 12 is always the default. we can produce the 24 by removing {ampm}\n formatObj.pattern = formatObj.pattern12.replace('{ampm}', '').replace(expPatternTrimmer, '');\n return formatObj;\n}\n\nfunction expDTComponentsMeta($0, formatObj) {\n switch ($0.charAt(0)) {\n // --- Era\n case 'G':\n formatObj.era = ['short', 'short', 'short', 'long', 'narrow'][$0.length - 1];\n return '{era}';\n\n // --- Year\n case 'y':\n case 'Y':\n case 'u':\n case 'U':\n case 'r':\n formatObj.year = $0.length === 2 ? '2-digit' : 'numeric';\n return '{year}';\n\n // --- Quarter (not supported in this polyfill)\n case 'Q':\n case 'q':\n formatObj.quarter = ['numeric', '2-digit', 'short', 'long', 'narrow'][$0.length - 1];\n return '{quarter}';\n\n // --- Month\n case 'M':\n case 'L':\n formatObj.month = ['numeric', '2-digit', 'short', 'long', 'narrow'][$0.length - 1];\n return '{month}';\n\n // --- Week (not supported in this polyfill)\n case 'w':\n // week of the year\n formatObj.week = $0.length === 2 ? '2-digit' : 'numeric';\n return '{weekday}';\n case 'W':\n // week of the month\n formatObj.week = 'numeric';\n return '{weekday}';\n\n // --- Day\n case 'd':\n // day of the month\n formatObj.day = $0.length === 2 ? '2-digit' : 'numeric';\n return '{day}';\n case 'D': // day of the year\n case 'F': // day of the week\n case 'g':\n // 1..n: Modified Julian day\n formatObj.day = 'numeric';\n return '{day}';\n\n // --- Week Day\n case 'E':\n // day of the week\n formatObj.weekday = ['short', 'short', 'short', 'long', 'narrow', 'short'][$0.length - 1];\n return '{weekday}';\n case 'e':\n // local day of the week\n formatObj.weekday = ['numeric', '2-digit', 'short', 'long', 'narrow', 'short'][$0.length - 1];\n return '{weekday}';\n case 'c':\n // stand alone local day of the week\n formatObj.weekday = ['numeric', undefined, 'short', 'long', 'narrow', 'short'][$0.length - 1];\n return '{weekday}';\n\n // --- Period\n case 'a': // AM, PM\n case 'b': // am, pm, noon, midnight\n case 'B':\n // flexible day periods\n formatObj.hour12 = true;\n return '{ampm}';\n\n // --- Hour\n case 'h':\n case 'H':\n formatObj.hour = $0.length === 2 ? '2-digit' : 'numeric';\n return '{hour}';\n case 'k':\n case 'K':\n formatObj.hour12 = true; // 12-hour-cycle time formats (using h or K)\n formatObj.hour = $0.length === 2 ? '2-digit' : 'numeric';\n return '{hour}';\n\n // --- Minute\n case 'm':\n formatObj.minute = $0.length === 2 ? '2-digit' : 'numeric';\n return '{minute}';\n\n // --- Second\n case 's':\n formatObj.second = $0.length === 2 ? '2-digit' : 'numeric';\n return '{second}';\n case 'S':\n case 'A':\n formatObj.second = 'numeric';\n return '{second}';\n\n // --- Timezone\n case 'z': // 1..3, 4: specific non-location format\n case 'Z': // 1..3, 4, 5: The ISO8601 varios formats\n case 'O': // 1, 4: miliseconds in day short, long\n case 'v': // 1, 4: generic non-location format\n case 'V': // 1, 2, 3, 4: time zone ID or city\n case 'X': // 1, 2, 3, 4: The ISO8601 varios formats\n case 'x':\n // 1, 2, 3, 4: The ISO8601 varios formats\n // this polyfill only supports much, for now, we are just doing something dummy\n formatObj.timeZoneName = $0.length < 4 ? 'short' : 'long';\n return '{timeZoneName}';\n }\n}\n\n/**\n * Converts the CLDR availableFormats into the objects and patterns required by\n * the ECMAScript Internationalization API specification.\n */\nfunction createDateTimeFormat(skeleton, pattern) {\n // we ignore certain patterns that are unsupported to avoid this expensive op.\n if (unwantedDTCs.test(pattern)) return undefined;\n\n var formatObj = {\n originalPattern: pattern,\n _: {}\n };\n\n // Replace the pattern string with the one required by the specification, whilst\n // at the same time evaluating it for the subsets and formats\n formatObj.extendedPattern = pattern.replace(expDTComponents, function ($0) {\n // See which symbol we're dealing with\n return expDTComponentsMeta($0, formatObj._);\n });\n\n // Match the skeleton string with the one required by the specification\n // this implementation is based on the Date Field Symbol Table:\n // http://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n // Note: we are adding extra data to the formatObject even though this polyfill\n // might not support it.\n skeleton.replace(expDTComponents, function ($0) {\n // See which symbol we're dealing with\n return expDTComponentsMeta($0, formatObj);\n });\n\n return computeFinalPatterns(formatObj);\n}\n\n/**\n * Processes DateTime formats from CLDR to an easier-to-parse format.\n * the result of this operation should be cached the first time a particular\n * calendar is analyzed.\n *\n * The specification requires we support at least the following subsets of\n * date/time components:\n *\n * - 'weekday', 'year', 'month', 'day', 'hour', 'minute', 'second'\n * - 'weekday', 'year', 'month', 'day'\n * - 'year', 'month', 'day'\n * - 'year', 'month'\n * - 'month', 'day'\n * - 'hour', 'minute', 'second'\n * - 'hour', 'minute'\n *\n * We need to cherry pick at least these subsets from the CLDR data and convert\n * them into the pattern objects used in the ECMA-402 API.\n */\nfunction createDateTimeFormats(formats) {\n var availableFormats = formats.availableFormats;\n var timeFormats = formats.timeFormats;\n var dateFormats = formats.dateFormats;\n var result = [];\n var skeleton = void 0,\n pattern = void 0,\n computed = void 0,\n i = void 0,\n j = void 0;\n var timeRelatedFormats = [];\n var dateRelatedFormats = [];\n\n // Map available (custom) formats into a pattern for createDateTimeFormats\n for (skeleton in availableFormats) {\n if (availableFormats.hasOwnProperty(skeleton)) {\n pattern = availableFormats[skeleton];\n computed = createDateTimeFormat(skeleton, pattern);\n if (computed) {\n result.push(computed);\n // in some cases, the format is only displaying date specific props\n // or time specific props, in which case we need to also produce the\n // combined formats.\n if (isDateFormatOnly(computed)) {\n dateRelatedFormats.push(computed);\n } else if (isTimeFormatOnly(computed)) {\n timeRelatedFormats.push(computed);\n }\n }\n }\n }\n\n // Map time formats into a pattern for createDateTimeFormats\n for (skeleton in timeFormats) {\n if (timeFormats.hasOwnProperty(skeleton)) {\n pattern = timeFormats[skeleton];\n computed = createDateTimeFormat(skeleton, pattern);\n if (computed) {\n result.push(computed);\n timeRelatedFormats.push(computed);\n }\n }\n }\n\n // Map date formats into a pattern for createDateTimeFormats\n for (skeleton in dateFormats) {\n if (dateFormats.hasOwnProperty(skeleton)) {\n pattern = dateFormats[skeleton];\n computed = createDateTimeFormat(skeleton, pattern);\n if (computed) {\n result.push(computed);\n dateRelatedFormats.push(computed);\n }\n }\n }\n\n // combine custom time and custom date formats when they are orthogonals to complete the\n // formats supported by CLDR.\n // This Algo is based on section \"Missing Skeleton Fields\" from:\n // http://unicode.org/reports/tr35/tr35-dates.html#availableFormats_appendItems\n for (i = 0; i < timeRelatedFormats.length; i += 1) {\n for (j = 0; j < dateRelatedFormats.length; j += 1) {\n if (dateRelatedFormats[j].month === 'long') {\n pattern = dateRelatedFormats[j].weekday ? formats.full : formats.long;\n } else if (dateRelatedFormats[j].month === 'short') {\n pattern = formats.medium;\n } else {\n pattern = formats.short;\n }\n computed = joinDateAndTimeFormats(dateRelatedFormats[j], timeRelatedFormats[i]);\n computed.originalPattern = pattern;\n computed.extendedPattern = pattern.replace('{0}', timeRelatedFormats[i].extendedPattern).replace('{1}', dateRelatedFormats[j].extendedPattern).replace(/^[,\\s]+|[,\\s]+$/gi, '');\n result.push(computeFinalPatterns(computed));\n }\n }\n\n return result;\n}\n\n// this represents the exceptions of the rule that are not covered by CLDR availableFormats\n// for single property configurations, they play no role when using multiple properties, and\n// those that are not in this table, are not exceptions or are not covered by the data we\n// provide.\nvar validSyntheticProps = {\n second: {\n numeric: 's',\n '2-digit': 'ss'\n },\n minute: {\n numeric: 'm',\n '2-digit': 'mm'\n },\n year: {\n numeric: 'y',\n '2-digit': 'yy'\n },\n day: {\n numeric: 'd',\n '2-digit': 'dd'\n },\n month: {\n numeric: 'L',\n '2-digit': 'LL',\n narrow: 'LLLLL',\n short: 'LLL',\n long: 'LLLL'\n },\n weekday: {\n narrow: 'ccccc',\n short: 'ccc',\n long: 'cccc'\n }\n};\n\nfunction generateSyntheticFormat(propName, propValue) {\n if (validSyntheticProps[propName] && validSyntheticProps[propName][propValue]) {\n var _ref2;\n\n return _ref2 = {\n originalPattern: validSyntheticProps[propName][propValue],\n _: defineProperty$1({}, propName, propValue),\n extendedPattern: \"{\" + propName + \"}\"\n }, defineProperty$1(_ref2, propName, propValue), defineProperty$1(_ref2, \"pattern12\", \"{\" + propName + \"}\"), defineProperty$1(_ref2, \"pattern\", \"{\" + propName + \"}\"), _ref2;\n }\n}\n\n// An object map of date component keys, saves using a regex later\nvar dateWidths = objCreate(null, { narrow: {}, short: {}, long: {} });\n\n/**\n * Returns a string for a date component, resolved using multiple inheritance as specified\n * as specified in the Unicode Technical Standard 35.\n */\nfunction resolveDateString(data, ca, component, width, key) {\n // From http://www.unicode.org/reports/tr35/tr35.html#Multiple_Inheritance:\n // 'In clearly specified instances, resources may inherit from within the same locale.\n // For example, ... the Buddhist calendar inherits from the Gregorian calendar.'\n var obj = data[ca] && data[ca][component] ? data[ca][component] : data.gregory[component],\n\n\n // \"sideways\" inheritance resolves strings when a key doesn't exist\n alts = {\n narrow: ['short', 'long'],\n short: ['long', 'narrow'],\n long: ['short', 'narrow']\n },\n\n\n //\n resolved = hop.call(obj, width) ? obj[width] : hop.call(obj, alts[width][0]) ? obj[alts[width][0]] : obj[alts[width][1]];\n\n // `key` wouldn't be specified for components 'dayPeriods'\n return key !== null ? resolved[key] : resolved;\n}\n\n// Define the DateTimeFormat constructor internally so it cannot be tainted\nfunction DateTimeFormatConstructor() {\n var locales = arguments[0];\n var options = arguments[1];\n\n if (!this || this === Intl) {\n return new Intl.DateTimeFormat(locales, options);\n }\n return InitializeDateTimeFormat(toObject(this), locales, options);\n}\n\ndefineProperty(Intl, 'DateTimeFormat', {\n configurable: true,\n writable: true,\n value: DateTimeFormatConstructor\n});\n\n// Must explicitly set prototypes as unwritable\ndefineProperty(DateTimeFormatConstructor, 'prototype', {\n writable: false\n});\n\n/**\n * The abstract operation InitializeDateTimeFormat accepts the arguments dateTimeFormat\n * (which must be an object), locales, and options. It initializes dateTimeFormat as a\n * DateTimeFormat object.\n */\nfunction /* 12.1.1.1 */InitializeDateTimeFormat(dateTimeFormat, locales, options) {\n // This will be a internal properties object if we're not already initialized\n var internal = getInternalProperties(dateTimeFormat);\n\n // Create an object whose props can be used to restore the values of RegExp props\n var regexpRestore = createRegExpRestore();\n\n // 1. If dateTimeFormat has an [[initializedIntlObject]] internal property with\n // value true, throw a TypeError exception.\n if (internal['[[initializedIntlObject]]'] === true) throw new TypeError('`this` object has already been initialized as an Intl object');\n\n // Need this to access the `internal` object\n defineProperty(dateTimeFormat, '__getInternalProperties', {\n value: function value() {\n // NOTE: Non-standard, for internal use only\n if (arguments[0] === secret) return internal;\n }\n });\n\n // 2. Set the [[initializedIntlObject]] internal property of numberFormat to true.\n internal['[[initializedIntlObject]]'] = true;\n\n // 3. Let requestedLocales be the result of calling the CanonicalizeLocaleList\n // abstract operation (defined in 9.2.1) with argument locales.\n var requestedLocales = CanonicalizeLocaleList(locales);\n\n // 4. Let options be the result of calling the ToDateTimeOptions abstract\n // operation (defined below) with arguments options, \"any\", and \"date\".\n options = ToDateTimeOptions(options, 'any', 'date');\n\n // 5. Let opt be a new Record.\n var opt = new Record();\n\n // 6. Let matcher be the result of calling the GetOption abstract operation\n // (defined in 9.2.9) with arguments options, \"localeMatcher\", \"string\", a List\n // containing the two String values \"lookup\" and \"best fit\", and \"best fit\".\n var matcher = GetOption(options, 'localeMatcher', 'string', new List('lookup', 'best fit'), 'best fit');\n\n // 7. Set opt.[[localeMatcher]] to matcher.\n opt['[[localeMatcher]]'] = matcher;\n\n // 8. Let DateTimeFormat be the standard built-in object that is the initial\n // value of Intl.DateTimeFormat.\n var DateTimeFormat = internals.DateTimeFormat; // This is what we *really* need\n\n // 9. Let localeData be the value of the [[localeData]] internal property of\n // DateTimeFormat.\n var localeData = DateTimeFormat['[[localeData]]'];\n\n // 10. Let r be the result of calling the ResolveLocale abstract operation\n // (defined in 9.2.5) with the [[availableLocales]] internal property of\n // DateTimeFormat, requestedLocales, opt, the [[relevantExtensionKeys]]\n // internal property of DateTimeFormat, and localeData.\n var r = ResolveLocale(DateTimeFormat['[[availableLocales]]'], requestedLocales, opt, DateTimeFormat['[[relevantExtensionKeys]]'], localeData);\n\n // 11. Set the [[locale]] internal property of dateTimeFormat to the value of\n // r.[[locale]].\n internal['[[locale]]'] = r['[[locale]]'];\n\n // 12. Set the [[calendar]] internal property of dateTimeFormat to the value of\n // r.[[ca]].\n internal['[[calendar]]'] = r['[[ca]]'];\n\n // 13. Set the [[numberingSystem]] internal property of dateTimeFormat to the value of\n // r.[[nu]].\n internal['[[numberingSystem]]'] = r['[[nu]]'];\n\n // The specification doesn't tell us to do this, but it's helpful later on\n internal['[[dataLocale]]'] = r['[[dataLocale]]'];\n\n // 14. Let dataLocale be the value of r.[[dataLocale]].\n var dataLocale = r['[[dataLocale]]'];\n\n // 15. Let tz be the result of calling the [[Get]] internal method of options with\n // argument \"timeZone\".\n var tz = options.timeZone;\n\n // 16. If tz is not undefined, then\n if (tz !== undefined) {\n // a. Let tz be ToString(tz).\n // b. Convert tz to upper case as described in 6.1.\n // NOTE: If an implementation accepts additional time zone values, as permitted\n // under certain conditions by the Conformance clause, different casing\n // rules apply.\n tz = toLatinUpperCase(tz);\n\n // c. If tz is not \"UTC\", then throw a RangeError exception.\n // ###TODO: accept more time zones###\n if (tz !== 'UTC') throw new RangeError('timeZone is not supported.');\n }\n\n // 17. Set the [[timeZone]] internal property of dateTimeFormat to tz.\n internal['[[timeZone]]'] = tz;\n\n // 18. Let opt be a new Record.\n opt = new Record();\n\n // 19. For each row of Table 3, except the header row, do:\n for (var prop in dateTimeComponents) {\n if (!hop.call(dateTimeComponents, prop)) continue;\n\n // 20. Let prop be the name given in the Property column of the row.\n // 21. Let value be the result of calling the GetOption abstract operation,\n // passing as argument options, the name given in the Property column of the\n // row, \"string\", a List containing the strings given in the Values column of\n // the row, and undefined.\n var value = GetOption(options, prop, 'string', dateTimeComponents[prop]);\n\n // 22. Set opt.[[]] to value.\n opt['[[' + prop + ']]'] = value;\n }\n\n // Assigned a value below\n var bestFormat = void 0;\n\n // 23. Let dataLocaleData be the result of calling the [[Get]] internal method of\n // localeData with argument dataLocale.\n var dataLocaleData = localeData[dataLocale];\n\n // 24. Let formats be the result of calling the [[Get]] internal method of\n // dataLocaleData with argument \"formats\".\n // Note: we process the CLDR formats into the spec'd structure\n var formats = ToDateTimeFormats(dataLocaleData.formats);\n\n // 25. Let matcher be the result of calling the GetOption abstract operation with\n // arguments options, \"formatMatcher\", \"string\", a List containing the two String\n // values \"basic\" and \"best fit\", and \"best fit\".\n matcher = GetOption(options, 'formatMatcher', 'string', new List('basic', 'best fit'), 'best fit');\n\n // Optimization: caching the processed formats as a one time operation by\n // replacing the initial structure from localeData\n dataLocaleData.formats = formats;\n\n // 26. If matcher is \"basic\", then\n if (matcher === 'basic') {\n // 27. Let bestFormat be the result of calling the BasicFormatMatcher abstract\n // operation (defined below) with opt and formats.\n bestFormat = BasicFormatMatcher(opt, formats);\n\n // 28. Else\n } else {\n {\n // diverging\n var _hr = GetOption(options, 'hour12', 'boolean' /*, undefined, undefined*/);\n opt.hour12 = _hr === undefined ? dataLocaleData.hour12 : _hr;\n }\n // 29. Let bestFormat be the result of calling the BestFitFormatMatcher\n // abstract operation (defined below) with opt and formats.\n bestFormat = BestFitFormatMatcher(opt, formats);\n }\n\n // 30. For each row in Table 3, except the header row, do\n for (var _prop in dateTimeComponents) {\n if (!hop.call(dateTimeComponents, _prop)) continue;\n\n // a. Let prop be the name given in the Property column of the row.\n // b. Let pDesc be the result of calling the [[GetOwnProperty]] internal method of\n // bestFormat with argument prop.\n // c. If pDesc is not undefined, then\n if (hop.call(bestFormat, _prop)) {\n // i. Let p be the result of calling the [[Get]] internal method of bestFormat\n // with argument prop.\n var p = bestFormat[_prop];\n {\n // diverging\n p = bestFormat._ && hop.call(bestFormat._, _prop) ? bestFormat._[_prop] : p;\n }\n\n // ii. Set the [[]] internal property of dateTimeFormat to p.\n internal['[[' + _prop + ']]'] = p;\n }\n }\n\n var pattern = void 0; // Assigned a value below\n\n // 31. Let hr12 be the result of calling the GetOption abstract operation with\n // arguments options, \"hour12\", \"boolean\", undefined, and undefined.\n var hr12 = GetOption(options, 'hour12', 'boolean' /*, undefined, undefined*/);\n\n // 32. If dateTimeFormat has an internal property [[hour]], then\n if (internal['[[hour]]']) {\n // a. If hr12 is undefined, then let hr12 be the result of calling the [[Get]]\n // internal method of dataLocaleData with argument \"hour12\".\n hr12 = hr12 === undefined ? dataLocaleData.hour12 : hr12;\n\n // b. Set the [[hour12]] internal property of dateTimeFormat to hr12.\n internal['[[hour12]]'] = hr12;\n\n // c. If hr12 is true, then\n if (hr12 === true) {\n // i. Let hourNo0 be the result of calling the [[Get]] internal method of\n // dataLocaleData with argument \"hourNo0\".\n var hourNo0 = dataLocaleData.hourNo0;\n\n // ii. Set the [[hourNo0]] internal property of dateTimeFormat to hourNo0.\n internal['[[hourNo0]]'] = hourNo0;\n\n // iii. Let pattern be the result of calling the [[Get]] internal method of\n // bestFormat with argument \"pattern12\".\n pattern = bestFormat.pattern12;\n }\n\n // d. Else\n else\n // i. Let pattern be the result of calling the [[Get]] internal method of\n // bestFormat with argument \"pattern\".\n pattern = bestFormat.pattern;\n }\n\n // 33. Else\n else\n // a. Let pattern be the result of calling the [[Get]] internal method of\n // bestFormat with argument \"pattern\".\n pattern = bestFormat.pattern;\n\n // 34. Set the [[pattern]] internal property of dateTimeFormat to pattern.\n internal['[[pattern]]'] = pattern;\n\n // 35. Set the [[boundFormat]] internal property of dateTimeFormat to undefined.\n internal['[[boundFormat]]'] = undefined;\n\n // 36. Set the [[initializedDateTimeFormat]] internal property of dateTimeFormat to\n // true.\n internal['[[initializedDateTimeFormat]]'] = true;\n\n // In ES3, we need to pre-bind the format() function\n if (es3) dateTimeFormat.format = GetFormatDateTime.call(dateTimeFormat);\n\n // Restore the RegExp properties\n regexpRestore();\n\n // Return the newly initialised object\n return dateTimeFormat;\n}\n\n/**\n * Several DateTimeFormat algorithms use values from the following table, which provides\n * property names and allowable values for the components of date and time formats:\n */\nvar dateTimeComponents = {\n weekday: [\"narrow\", \"short\", \"long\"],\n era: [\"narrow\", \"short\", \"long\"],\n year: [\"2-digit\", \"numeric\"],\n month: [\"2-digit\", \"numeric\", \"narrow\", \"short\", \"long\"],\n day: [\"2-digit\", \"numeric\"],\n hour: [\"2-digit\", \"numeric\"],\n minute: [\"2-digit\", \"numeric\"],\n second: [\"2-digit\", \"numeric\"],\n timeZoneName: [\"short\", \"long\"]\n};\n\n/**\n * When the ToDateTimeOptions abstract operation is called with arguments options,\n * required, and defaults, the following steps are taken:\n */\nfunction ToDateTimeFormats(formats) {\n if (Object.prototype.toString.call(formats) === '[object Array]') {\n return formats;\n }\n return createDateTimeFormats(formats);\n}\n\n/**\n * When the ToDateTimeOptions abstract operation is called with arguments options,\n * required, and defaults, the following steps are taken:\n */\nfunction ToDateTimeOptions(options, required, defaults) {\n // 1. If options is undefined, then let options be null, else let options be\n // ToObject(options).\n if (options === undefined) options = null;else {\n // (#12) options needs to be a Record, but it also needs to inherit properties\n var opt2 = toObject(options);\n options = new Record();\n\n for (var k in opt2) {\n options[k] = opt2[k];\n }\n }\n\n // 2. Let create be the standard built-in function object defined in ES5, 15.2.3.5.\n var create = objCreate;\n\n // 3. Let options be the result of calling the [[Call]] internal method of create with\n // undefined as the this value and an argument list containing the single item\n // options.\n options = create(options);\n\n // 4. Let needDefaults be true.\n var needDefaults = true;\n\n // 5. If required is \"date\" or \"any\", then\n if (required === 'date' || required === 'any') {\n // a. For each of the property names \"weekday\", \"year\", \"month\", \"day\":\n // i. If the result of calling the [[Get]] internal method of options with the\n // property name is not undefined, then let needDefaults be false.\n if (options.weekday !== undefined || options.year !== undefined || options.month !== undefined || options.day !== undefined) needDefaults = false;\n }\n\n // 6. If required is \"time\" or \"any\", then\n if (required === 'time' || required === 'any') {\n // a. For each of the property names \"hour\", \"minute\", \"second\":\n // i. If the result of calling the [[Get]] internal method of options with the\n // property name is not undefined, then let needDefaults be false.\n if (options.hour !== undefined || options.minute !== undefined || options.second !== undefined) needDefaults = false;\n }\n\n // 7. If needDefaults is true and defaults is either \"date\" or \"all\", then\n if (needDefaults && (defaults === 'date' || defaults === 'all'))\n // a. For each of the property names \"year\", \"month\", \"day\":\n // i. Call the [[DefineOwnProperty]] internal method of options with the\n // property name, Property Descriptor {[[Value]]: \"numeric\", [[Writable]]:\n // true, [[Enumerable]]: true, [[Configurable]]: true}, and false.\n options.year = options.month = options.day = 'numeric';\n\n // 8. If needDefaults is true and defaults is either \"time\" or \"all\", then\n if (needDefaults && (defaults === 'time' || defaults === 'all'))\n // a. For each of the property names \"hour\", \"minute\", \"second\":\n // i. Call the [[DefineOwnProperty]] internal method of options with the\n // property name, Property Descriptor {[[Value]]: \"numeric\", [[Writable]]:\n // true, [[Enumerable]]: true, [[Configurable]]: true}, and false.\n options.hour = options.minute = options.second = 'numeric';\n\n // 9. Return options.\n return options;\n}\n\n/**\n * When the BasicFormatMatcher abstract operation is called with two arguments options and\n * formats, the following steps are taken:\n */\nfunction BasicFormatMatcher(options, formats) {\n // 1. Let removalPenalty be 120.\n var removalPenalty = 120;\n\n // 2. Let additionPenalty be 20.\n var additionPenalty = 20;\n\n // 3. Let longLessPenalty be 8.\n var longLessPenalty = 8;\n\n // 4. Let longMorePenalty be 6.\n var longMorePenalty = 6;\n\n // 5. Let shortLessPenalty be 6.\n var shortLessPenalty = 6;\n\n // 6. Let shortMorePenalty be 3.\n var shortMorePenalty = 3;\n\n // 7. Let bestScore be -Infinity.\n var bestScore = -Infinity;\n\n // 8. Let bestFormat be undefined.\n var bestFormat = void 0;\n\n // 9. Let i be 0.\n var i = 0;\n\n // 10. Assert: formats is an Array object.\n\n // 11. Let len be the result of calling the [[Get]] internal method of formats with argument \"length\".\n var len = formats.length;\n\n // 12. Repeat while i < len:\n while (i < len) {\n // a. Let format be the result of calling the [[Get]] internal method of formats with argument ToString(i).\n var format = formats[i];\n\n // b. Let score be 0.\n var score = 0;\n\n // c. For each property shown in Table 3:\n for (var property in dateTimeComponents) {\n if (!hop.call(dateTimeComponents, property)) continue;\n\n // i. Let optionsProp be options.[[]].\n var optionsProp = options['[[' + property + ']]'];\n\n // ii. Let formatPropDesc be the result of calling the [[GetOwnProperty]] internal method of format\n // with argument property.\n // iii. If formatPropDesc is not undefined, then\n // 1. Let formatProp be the result of calling the [[Get]] internal method of format with argument property.\n var formatProp = hop.call(format, property) ? format[property] : undefined;\n\n // iv. If optionsProp is undefined and formatProp is not undefined, then decrease score by\n // additionPenalty.\n if (optionsProp === undefined && formatProp !== undefined) score -= additionPenalty;\n\n // v. Else if optionsProp is not undefined and formatProp is undefined, then decrease score by\n // removalPenalty.\n else if (optionsProp !== undefined && formatProp === undefined) score -= removalPenalty;\n\n // vi. Else\n else {\n // 1. Let values be the array [\"2-digit\", \"numeric\", \"narrow\", \"short\",\n // \"long\"].\n var values = ['2-digit', 'numeric', 'narrow', 'short', 'long'];\n\n // 2. Let optionsPropIndex be the index of optionsProp within values.\n var optionsPropIndex = arrIndexOf.call(values, optionsProp);\n\n // 3. Let formatPropIndex be the index of formatProp within values.\n var formatPropIndex = arrIndexOf.call(values, formatProp);\n\n // 4. Let delta be max(min(formatPropIndex - optionsPropIndex, 2), -2).\n var delta = Math.max(Math.min(formatPropIndex - optionsPropIndex, 2), -2);\n\n // 5. If delta = 2, decrease score by longMorePenalty.\n if (delta === 2) score -= longMorePenalty;\n\n // 6. Else if delta = 1, decrease score by shortMorePenalty.\n else if (delta === 1) score -= shortMorePenalty;\n\n // 7. Else if delta = -1, decrease score by shortLessPenalty.\n else if (delta === -1) score -= shortLessPenalty;\n\n // 8. Else if delta = -2, decrease score by longLessPenalty.\n else if (delta === -2) score -= longLessPenalty;\n }\n }\n\n // d. If score > bestScore, then\n if (score > bestScore) {\n // i. Let bestScore be score.\n bestScore = score;\n\n // ii. Let bestFormat be format.\n bestFormat = format;\n }\n\n // e. Increase i by 1.\n i++;\n }\n\n // 13. Return bestFormat.\n return bestFormat;\n}\n\n/**\n * When the BestFitFormatMatcher abstract operation is called with two arguments options\n * and formats, it performs implementation dependent steps, which should return a set of\n * component representations that a typical user of the selected locale would perceive as\n * at least as good as the one returned by BasicFormatMatcher.\n *\n * This polyfill defines the algorithm to be the same as BasicFormatMatcher,\n * with the addition of bonus points awarded where the requested format is of\n * the same data type as the potentially matching format.\n *\n * This algo relies on the concept of closest distance matching described here:\n * http://unicode.org/reports/tr35/tr35-dates.html#Matching_Skeletons\n * Typically a “best match” is found using a closest distance match, such as:\n *\n * Symbols requesting a best choice for the locale are replaced.\n * j → one of {H, k, h, K}; C → one of {a, b, B}\n * -> Covered by cldr.js matching process\n *\n * For fields with symbols representing the same type (year, month, day, etc):\n * Most symbols have a small distance from each other.\n * M ≅ L; E ≅ c; a ≅ b ≅ B; H ≅ k ≅ h ≅ K; ...\n * -> Covered by cldr.js matching process\n *\n * Width differences among fields, other than those marking text vs numeric, are given small distance from each other.\n * MMM ≅ MMMM\n * MM ≅ M\n * Numeric and text fields are given a larger distance from each other.\n * MMM ≈ MM\n * Symbols representing substantial differences (week of year vs week of month) are given much larger a distances from each other.\n * d ≋ D; ...\n * Missing or extra fields cause a match to fail. (But see Missing Skeleton Fields).\n *\n *\n * For example,\n *\n * { month: 'numeric', day: 'numeric' }\n *\n * should match\n *\n * { month: '2-digit', day: '2-digit' }\n *\n * rather than\n *\n * { month: 'short', day: 'numeric' }\n *\n * This makes sense because a user requesting a formatted date with numeric parts would\n * not expect to see the returned format containing narrow, short or long part names\n */\nfunction BestFitFormatMatcher(options, formats) {\n /** Diverging: this block implements the hack for single property configuration, eg.:\n *\n * `new Intl.DateTimeFormat('en', {day: 'numeric'})`\n *\n * should produce a single digit with the day of the month. This is needed because\n * CLDR `availableFormats` data structure doesn't cover these cases.\n */\n {\n var optionsPropNames = [];\n for (var property in dateTimeComponents) {\n if (!hop.call(dateTimeComponents, property)) continue;\n\n if (options['[[' + property + ']]'] !== undefined) {\n optionsPropNames.push(property);\n }\n }\n if (optionsPropNames.length === 1) {\n var _bestFormat = generateSyntheticFormat(optionsPropNames[0], options['[[' + optionsPropNames[0] + ']]']);\n if (_bestFormat) {\n return _bestFormat;\n }\n }\n }\n\n // 1. Let removalPenalty be 120.\n var removalPenalty = 120;\n\n // 2. Let additionPenalty be 20.\n var additionPenalty = 20;\n\n // 3. Let longLessPenalty be 8.\n var longLessPenalty = 8;\n\n // 4. Let longMorePenalty be 6.\n var longMorePenalty = 6;\n\n // 5. Let shortLessPenalty be 6.\n var shortLessPenalty = 6;\n\n // 6. Let shortMorePenalty be 3.\n var shortMorePenalty = 3;\n\n var patternPenalty = 2;\n\n var hour12Penalty = 1;\n\n // 7. Let bestScore be -Infinity.\n var bestScore = -Infinity;\n\n // 8. Let bestFormat be undefined.\n var bestFormat = void 0;\n\n // 9. Let i be 0.\n var i = 0;\n\n // 10. Assert: formats is an Array object.\n\n // 11. Let len be the result of calling the [[Get]] internal method of formats with argument \"length\".\n var len = formats.length;\n\n // 12. Repeat while i < len:\n while (i < len) {\n // a. Let format be the result of calling the [[Get]] internal method of formats with argument ToString(i).\n var format = formats[i];\n\n // b. Let score be 0.\n var score = 0;\n\n // c. For each property shown in Table 3:\n for (var _property in dateTimeComponents) {\n if (!hop.call(dateTimeComponents, _property)) continue;\n\n // i. Let optionsProp be options.[[]].\n var optionsProp = options['[[' + _property + ']]'];\n\n // ii. Let formatPropDesc be the result of calling the [[GetOwnProperty]] internal method of format\n // with argument property.\n // iii. If formatPropDesc is not undefined, then\n // 1. Let formatProp be the result of calling the [[Get]] internal method of format with argument property.\n var formatProp = hop.call(format, _property) ? format[_property] : undefined;\n\n // Diverging: using the default properties produced by the pattern/skeleton\n // to match it with user options, and apply a penalty\n var patternProp = hop.call(format._, _property) ? format._[_property] : undefined;\n if (optionsProp !== patternProp) {\n score -= patternPenalty;\n }\n\n // iv. If optionsProp is undefined and formatProp is not undefined, then decrease score by\n // additionPenalty.\n if (optionsProp === undefined && formatProp !== undefined) score -= additionPenalty;\n\n // v. Else if optionsProp is not undefined and formatProp is undefined, then decrease score by\n // removalPenalty.\n else if (optionsProp !== undefined && formatProp === undefined) score -= removalPenalty;\n\n // vi. Else\n else {\n // 1. Let values be the array [\"2-digit\", \"numeric\", \"narrow\", \"short\",\n // \"long\"].\n var values = ['2-digit', 'numeric', 'narrow', 'short', 'long'];\n\n // 2. Let optionsPropIndex be the index of optionsProp within values.\n var optionsPropIndex = arrIndexOf.call(values, optionsProp);\n\n // 3. Let formatPropIndex be the index of formatProp within values.\n var formatPropIndex = arrIndexOf.call(values, formatProp);\n\n // 4. Let delta be max(min(formatPropIndex - optionsPropIndex, 2), -2).\n var delta = Math.max(Math.min(formatPropIndex - optionsPropIndex, 2), -2);\n\n {\n // diverging from spec\n // When the bestFit argument is true, subtract additional penalty where data types are not the same\n if (formatPropIndex <= 1 && optionsPropIndex >= 2 || formatPropIndex >= 2 && optionsPropIndex <= 1) {\n // 5. If delta = 2, decrease score by longMorePenalty.\n if (delta > 0) score -= longMorePenalty;else if (delta < 0) score -= longLessPenalty;\n } else {\n // 5. If delta = 2, decrease score by longMorePenalty.\n if (delta > 1) score -= shortMorePenalty;else if (delta < -1) score -= shortLessPenalty;\n }\n }\n }\n }\n\n {\n // diverging to also take into consideration differences between 12 or 24 hours\n // which is special for the best fit only.\n if (format._.hour12 !== options.hour12) {\n score -= hour12Penalty;\n }\n }\n\n // d. If score > bestScore, then\n if (score > bestScore) {\n // i. Let bestScore be score.\n bestScore = score;\n // ii. Let bestFormat be format.\n bestFormat = format;\n }\n\n // e. Increase i by 1.\n i++;\n }\n\n // 13. Return bestFormat.\n return bestFormat;\n}\n\n/* 12.2.3 */internals.DateTimeFormat = {\n '[[availableLocales]]': [],\n '[[relevantExtensionKeys]]': ['ca', 'nu'],\n '[[localeData]]': {}\n};\n\n/**\n * When the supportedLocalesOf method of Intl.DateTimeFormat is called, the\n * following steps are taken:\n */\n/* 12.2.2 */\ndefineProperty(Intl.DateTimeFormat, 'supportedLocalesOf', {\n configurable: true,\n writable: true,\n value: fnBind.call(function (locales) {\n // Bound functions only have the `this` value altered if being used as a constructor,\n // this lets us imitate a native function that has no constructor\n if (!hop.call(this, '[[availableLocales]]')) throw new TypeError('supportedLocalesOf() is not a constructor');\n\n // Create an object whose props can be used to restore the values of RegExp props\n var regexpRestore = createRegExpRestore(),\n\n\n // 1. If options is not provided, then let options be undefined.\n options = arguments[1],\n\n\n // 2. Let availableLocales be the value of the [[availableLocales]] internal\n // property of the standard built-in object that is the initial value of\n // Intl.NumberFormat.\n\n availableLocales = this['[[availableLocales]]'],\n\n\n // 3. Let requestedLocales be the result of calling the CanonicalizeLocaleList\n // abstract operation (defined in 9.2.1) with argument locales.\n requestedLocales = CanonicalizeLocaleList(locales);\n\n // Restore the RegExp properties\n regexpRestore();\n\n // 4. Return the result of calling the SupportedLocales abstract operation\n // (defined in 9.2.8) with arguments availableLocales, requestedLocales,\n // and options.\n return SupportedLocales(availableLocales, requestedLocales, options);\n }, internals.NumberFormat)\n});\n\n/**\n * This named accessor property returns a function that formats a number\n * according to the effective locale and the formatting options of this\n * DateTimeFormat object.\n */\n/* 12.3.2 */defineProperty(Intl.DateTimeFormat.prototype, 'format', {\n configurable: true,\n get: GetFormatDateTime\n});\n\nfunction GetFormatDateTime() {\n var internal = this !== null && babelHelpers$1[\"typeof\"](this) === 'object' && getInternalProperties(this);\n\n // Satisfy test 12.3_b\n if (!internal || !internal['[[initializedDateTimeFormat]]']) throw new TypeError('`this` value for format() is not an initialized Intl.DateTimeFormat object.');\n\n // The value of the [[Get]] attribute is a function that takes the following\n // steps:\n\n // 1. If the [[boundFormat]] internal property of this DateTimeFormat object\n // is undefined, then:\n if (internal['[[boundFormat]]'] === undefined) {\n // a. Let F be a Function object, with internal properties set as\n // specified for built-in functions in ES5, 15, or successor, and the\n // length property set to 0, that takes the argument date and\n // performs the following steps:\n var F = function F() {\n var date = arguments.length <= 0 || arguments[0] === undefined ? undefined : arguments[0];\n\n // i. If date is not provided or is undefined, then let x be the\n // result as if by the expression Date.now() where Date.now is\n // the standard built-in function defined in ES5, 15.9.4.4.\n // ii. Else let x be ToNumber(date).\n // iii. Return the result of calling the FormatDateTime abstract\n // operation (defined below) with arguments this and x.\n var x = date === undefined ? Date.now() : toNumber(date);\n return FormatDateTime(this, x);\n };\n // b. Let bind be the standard built-in function object defined in ES5,\n // 15.3.4.5.\n // c. Let bf be the result of calling the [[Call]] internal method of\n // bind with F as the this value and an argument list containing\n // the single item this.\n var bf = fnBind.call(F, this);\n // d. Set the [[boundFormat]] internal property of this NumberFormat\n // object to bf.\n internal['[[boundFormat]]'] = bf;\n }\n // Return the value of the [[boundFormat]] internal property of this\n // NumberFormat object.\n return internal['[[boundFormat]]'];\n}\n\nfunction formatToParts$1() {\n var date = arguments.length <= 0 || arguments[0] === undefined ? undefined : arguments[0];\n\n var internal = this !== null && babelHelpers$1[\"typeof\"](this) === 'object' && getInternalProperties(this);\n\n if (!internal || !internal['[[initializedDateTimeFormat]]']) throw new TypeError('`this` value for formatToParts() is not an initialized Intl.DateTimeFormat object.');\n\n var x = date === undefined ? Date.now() : toNumber(date);\n return FormatToPartsDateTime(this, x);\n}\n\nObject.defineProperty(Intl.DateTimeFormat.prototype, 'formatToParts', {\n enumerable: false,\n writable: true,\n configurable: true,\n value: formatToParts$1\n});\n\nfunction CreateDateTimeParts(dateTimeFormat, x) {\n // 1. If x is not a finite Number, then throw a RangeError exception.\n if (!isFinite(x)) throw new RangeError('Invalid valid date passed to format');\n\n var internal = dateTimeFormat.__getInternalProperties(secret);\n\n // Creating restore point for properties on the RegExp object... please wait\n /* let regexpRestore = */createRegExpRestore(); // ###TODO: review this\n\n // 2. Let locale be the value of the [[locale]] internal property of dateTimeFormat.\n var locale = internal['[[locale]]'];\n\n // 3. Let nf be the result of creating a new NumberFormat object as if by the\n // expression new Intl.NumberFormat([locale], {useGrouping: false}) where\n // Intl.NumberFormat is the standard built-in constructor defined in 11.1.3.\n var nf = new Intl.NumberFormat([locale], { useGrouping: false });\n\n // 4. Let nf2 be the result of creating a new NumberFormat object as if by the\n // expression new Intl.NumberFormat([locale], {minimumIntegerDigits: 2, useGrouping:\n // false}) where Intl.NumberFormat is the standard built-in constructor defined in\n // 11.1.3.\n var nf2 = new Intl.NumberFormat([locale], { minimumIntegerDigits: 2, useGrouping: false });\n\n // 5. Let tm be the result of calling the ToLocalTime abstract operation (defined\n // below) with x, the value of the [[calendar]] internal property of dateTimeFormat,\n // and the value of the [[timeZone]] internal property of dateTimeFormat.\n var tm = ToLocalTime(x, internal['[[calendar]]'], internal['[[timeZone]]']);\n\n // 6. Let result be the value of the [[pattern]] internal property of dateTimeFormat.\n var pattern = internal['[[pattern]]'];\n\n // 7.\n var result = new List();\n\n // 8.\n var index = 0;\n\n // 9.\n var beginIndex = pattern.indexOf('{');\n\n // 10.\n var endIndex = 0;\n\n // Need the locale minus any extensions\n var dataLocale = internal['[[dataLocale]]'];\n\n // Need the calendar data from CLDR\n var localeData = internals.DateTimeFormat['[[localeData]]'][dataLocale].calendars;\n var ca = internal['[[calendar]]'];\n\n // 11.\n while (beginIndex !== -1) {\n var fv = void 0;\n // a.\n endIndex = pattern.indexOf('}', beginIndex);\n // b.\n if (endIndex === -1) {\n throw new Error('Unclosed pattern');\n }\n // c.\n if (beginIndex > index) {\n arrPush.call(result, {\n type: 'literal',\n value: pattern.substring(index, beginIndex)\n });\n }\n // d.\n var p = pattern.substring(beginIndex + 1, endIndex);\n // e.\n if (dateTimeComponents.hasOwnProperty(p)) {\n // i. Let f be the value of the [[

]] internal property of dateTimeFormat.\n var f = internal['[[' + p + ']]'];\n // ii. Let v be the value of tm.[[

]].\n var v = tm['[[' + p + ']]'];\n // iii. If p is \"year\" and v ≤ 0, then let v be 1 - v.\n if (p === 'year' && v <= 0) {\n v = 1 - v;\n }\n // iv. If p is \"month\", then increase v by 1.\n else if (p === 'month') {\n v++;\n }\n // v. If p is \"hour\" and the value of the [[hour12]] internal property of\n // dateTimeFormat is true, then\n else if (p === 'hour' && internal['[[hour12]]'] === true) {\n // 1. Let v be v modulo 12.\n v = v % 12;\n // 2. If v is 0 and the value of the [[hourNo0]] internal property of\n // dateTimeFormat is true, then let v be 12.\n if (v === 0 && internal['[[hourNo0]]'] === true) {\n v = 12;\n }\n }\n\n // vi. If f is \"numeric\", then\n if (f === 'numeric') {\n // 1. Let fv be the result of calling the FormatNumber abstract operation\n // (defined in 11.3.2) with arguments nf and v.\n fv = FormatNumber(nf, v);\n }\n // vii. Else if f is \"2-digit\", then\n else if (f === '2-digit') {\n // 1. Let fv be the result of calling the FormatNumber abstract operation\n // with arguments nf2 and v.\n fv = FormatNumber(nf2, v);\n // 2. If the length of fv is greater than 2, let fv be the substring of fv\n // containing the last two characters.\n if (fv.length > 2) {\n fv = fv.slice(-2);\n }\n }\n // viii. Else if f is \"narrow\", \"short\", or \"long\", then let fv be a String\n // value representing f in the desired form; the String value depends upon\n // the implementation and the effective locale and calendar of\n // dateTimeFormat. If p is \"month\", then the String value may also depend\n // on whether dateTimeFormat has a [[day]] internal property. If p is\n // \"timeZoneName\", then the String value may also depend on the value of\n // the [[inDST]] field of tm.\n else if (f in dateWidths) {\n switch (p) {\n case 'month':\n fv = resolveDateString(localeData, ca, 'months', f, tm['[[' + p + ']]']);\n break;\n\n case 'weekday':\n try {\n fv = resolveDateString(localeData, ca, 'days', f, tm['[[' + p + ']]']);\n // fv = resolveDateString(ca.days, f)[tm['[['+ p +']]']];\n } catch (e) {\n throw new Error('Could not find weekday data for locale ' + locale);\n }\n break;\n\n case 'timeZoneName':\n fv = ''; // ###TODO\n break;\n\n case 'era':\n try {\n fv = resolveDateString(localeData, ca, 'eras', f, tm['[[' + p + ']]']);\n } catch (e) {\n throw new Error('Could not find era data for locale ' + locale);\n }\n break;\n\n default:\n fv = tm['[[' + p + ']]'];\n }\n }\n // ix\n arrPush.call(result, {\n type: p,\n value: fv\n });\n // f.\n } else if (p === 'ampm') {\n // i.\n var _v = tm['[[hour]]'];\n // ii./iii.\n fv = resolveDateString(localeData, ca, 'dayPeriods', _v > 11 ? 'pm' : 'am', null);\n // iv.\n arrPush.call(result, {\n type: 'dayPeriod',\n value: fv\n });\n // g.\n } else {\n arrPush.call(result, {\n type: 'literal',\n value: pattern.substring(beginIndex, endIndex + 1)\n });\n }\n // h.\n index = endIndex + 1;\n // i.\n beginIndex = pattern.indexOf('{', index);\n }\n // 12.\n if (endIndex < pattern.length - 1) {\n arrPush.call(result, {\n type: 'literal',\n value: pattern.substr(endIndex + 1)\n });\n }\n // 13.\n return result;\n}\n\n/**\n * When the FormatDateTime abstract operation is called with arguments dateTimeFormat\n * (which must be an object initialized as a DateTimeFormat) and x (which must be a Number\n * value), it returns a String value representing x (interpreted as a time value as\n * specified in ES5, 15.9.1.1) according to the effective locale and the formatting\n * options of dateTimeFormat.\n */\nfunction FormatDateTime(dateTimeFormat, x) {\n var parts = CreateDateTimeParts(dateTimeFormat, x);\n var result = '';\n\n for (var i = 0; parts.length > i; i++) {\n var part = parts[i];\n result += part.value;\n }\n return result;\n}\n\nfunction FormatToPartsDateTime(dateTimeFormat, x) {\n var parts = CreateDateTimeParts(dateTimeFormat, x);\n var result = [];\n for (var i = 0; parts.length > i; i++) {\n var part = parts[i];\n result.push({\n type: part.type,\n value: part.value\n });\n }\n return result;\n}\n\n/**\n * When the ToLocalTime abstract operation is called with arguments date, calendar, and\n * timeZone, the following steps are taken:\n */\nfunction ToLocalTime(date, calendar, timeZone) {\n // 1. Apply calendrical calculations on date for the given calendar and time zone to\n // produce weekday, era, year, month, day, hour, minute, second, and inDST values.\n // The calculations should use best available information about the specified\n // calendar and time zone. If the calendar is \"gregory\", then the calculations must\n // match the algorithms specified in ES5, 15.9.1, except that calculations are not\n // bound by the restrictions on the use of best available information on time zones\n // for local time zone adjustment and daylight saving time adjustment imposed by\n // ES5, 15.9.1.7 and 15.9.1.8.\n // ###TODO###\n var d = new Date(date),\n m = 'get' + (timeZone || '');\n\n // 2. Return a Record with fields [[weekday]], [[era]], [[year]], [[month]], [[day]],\n // [[hour]], [[minute]], [[second]], and [[inDST]], each with the corresponding\n // calculated value.\n return new Record({\n '[[weekday]]': d[m + 'Day'](),\n '[[era]]': +(d[m + 'FullYear']() >= 0),\n '[[year]]': d[m + 'FullYear'](),\n '[[month]]': d[m + 'Month'](),\n '[[day]]': d[m + 'Date'](),\n '[[hour]]': d[m + 'Hours'](),\n '[[minute]]': d[m + 'Minutes'](),\n '[[second]]': d[m + 'Seconds'](),\n '[[inDST]]': false // ###TODO###\n });\n}\n\n/**\n * The function returns a new object whose properties and attributes are set as if\n * constructed by an object literal assigning to each of the following properties the\n * value of the corresponding internal property of this DateTimeFormat object (see 12.4):\n * locale, calendar, numberingSystem, timeZone, hour12, weekday, era, year, month, day,\n * hour, minute, second, and timeZoneName. Properties whose corresponding internal\n * properties are not present are not assigned.\n */\n/* 12.3.3 */defineProperty(Intl.DateTimeFormat.prototype, 'resolvedOptions', {\n writable: true,\n configurable: true,\n value: function value() {\n var prop = void 0,\n descs = new Record(),\n props = ['locale', 'calendar', 'numberingSystem', 'timeZone', 'hour12', 'weekday', 'era', 'year', 'month', 'day', 'hour', 'minute', 'second', 'timeZoneName'],\n internal = this !== null && babelHelpers$1[\"typeof\"](this) === 'object' && getInternalProperties(this);\n\n // Satisfy test 12.3_b\n if (!internal || !internal['[[initializedDateTimeFormat]]']) throw new TypeError('`this` value for resolvedOptions() is not an initialized Intl.DateTimeFormat object.');\n\n for (var i = 0, max = props.length; i < max; i++) {\n if (hop.call(internal, prop = '[[' + props[i] + ']]')) descs[props[i]] = { value: internal[prop], writable: true, configurable: true, enumerable: true };\n }\n\n return objCreate({}, descs);\n }\n});\n\nvar ls = Intl.__localeSensitiveProtos = {\n Number: {},\n Date: {}\n};\n\n/**\n * When the toLocaleString method is called with optional arguments locales and options,\n * the following steps are taken:\n */\n/* 13.2.1 */ls.Number.toLocaleString = function () {\n // Satisfy test 13.2.1_1\n if (Object.prototype.toString.call(this) !== '[object Number]') throw new TypeError('`this` value must be a number for Number.prototype.toLocaleString()');\n\n // 1. Let x be this Number value (as defined in ES5, 15.7.4).\n // 2. If locales is not provided, then let locales be undefined.\n // 3. If options is not provided, then let options be undefined.\n // 4. Let numberFormat be the result of creating a new object as if by the\n // expression new Intl.NumberFormat(locales, options) where\n // Intl.NumberFormat is the standard built-in constructor defined in 11.1.3.\n // 5. Return the result of calling the FormatNumber abstract operation\n // (defined in 11.3.2) with arguments numberFormat and x.\n return FormatNumber(new NumberFormatConstructor(arguments[0], arguments[1]), this);\n};\n\n/**\n * When the toLocaleString method is called with optional arguments locales and options,\n * the following steps are taken:\n */\n/* 13.3.1 */ls.Date.toLocaleString = function () {\n // Satisfy test 13.3.0_1\n if (Object.prototype.toString.call(this) !== '[object Date]') throw new TypeError('`this` value must be a Date instance for Date.prototype.toLocaleString()');\n\n // 1. Let x be this time value (as defined in ES5, 15.9.5).\n var x = +this;\n\n // 2. If x is NaN, then return \"Invalid Date\".\n if (isNaN(x)) return 'Invalid Date';\n\n // 3. If locales is not provided, then let locales be undefined.\n var locales = arguments[0];\n\n // 4. If options is not provided, then let options be undefined.\n var options = arguments[1];\n\n // 5. Let options be the result of calling the ToDateTimeOptions abstract\n // operation (defined in 12.1.1) with arguments options, \"any\", and \"all\".\n options = ToDateTimeOptions(options, 'any', 'all');\n\n // 6. Let dateTimeFormat be the result of creating a new object as if by the\n // expression new Intl.DateTimeFormat(locales, options) where\n // Intl.DateTimeFormat is the standard built-in constructor defined in 12.1.3.\n var dateTimeFormat = new DateTimeFormatConstructor(locales, options);\n\n // 7. Return the result of calling the FormatDateTime abstract operation (defined\n // in 12.3.2) with arguments dateTimeFormat and x.\n return FormatDateTime(dateTimeFormat, x);\n};\n\n/**\n * When the toLocaleDateString method is called with optional arguments locales and\n * options, the following steps are taken:\n */\n/* 13.3.2 */ls.Date.toLocaleDateString = function () {\n // Satisfy test 13.3.0_1\n if (Object.prototype.toString.call(this) !== '[object Date]') throw new TypeError('`this` value must be a Date instance for Date.prototype.toLocaleDateString()');\n\n // 1. Let x be this time value (as defined in ES5, 15.9.5).\n var x = +this;\n\n // 2. If x is NaN, then return \"Invalid Date\".\n if (isNaN(x)) return 'Invalid Date';\n\n // 3. If locales is not provided, then let locales be undefined.\n var locales = arguments[0],\n\n\n // 4. If options is not provided, then let options be undefined.\n options = arguments[1];\n\n // 5. Let options be the result of calling the ToDateTimeOptions abstract\n // operation (defined in 12.1.1) with arguments options, \"date\", and \"date\".\n options = ToDateTimeOptions(options, 'date', 'date');\n\n // 6. Let dateTimeFormat be the result of creating a new object as if by the\n // expression new Intl.DateTimeFormat(locales, options) where\n // Intl.DateTimeFormat is the standard built-in constructor defined in 12.1.3.\n var dateTimeFormat = new DateTimeFormatConstructor(locales, options);\n\n // 7. Return the result of calling the FormatDateTime abstract operation (defined\n // in 12.3.2) with arguments dateTimeFormat and x.\n return FormatDateTime(dateTimeFormat, x);\n};\n\n/**\n * When the toLocaleTimeString method is called with optional arguments locales and\n * options, the following steps are taken:\n */\n/* 13.3.3 */ls.Date.toLocaleTimeString = function () {\n // Satisfy test 13.3.0_1\n if (Object.prototype.toString.call(this) !== '[object Date]') throw new TypeError('`this` value must be a Date instance for Date.prototype.toLocaleTimeString()');\n\n // 1. Let x be this time value (as defined in ES5, 15.9.5).\n var x = +this;\n\n // 2. If x is NaN, then return \"Invalid Date\".\n if (isNaN(x)) return 'Invalid Date';\n\n // 3. If locales is not provided, then let locales be undefined.\n var locales = arguments[0];\n\n // 4. If options is not provided, then let options be undefined.\n var options = arguments[1];\n\n // 5. Let options be the result of calling the ToDateTimeOptions abstract\n // operation (defined in 12.1.1) with arguments options, \"time\", and \"time\".\n options = ToDateTimeOptions(options, 'time', 'time');\n\n // 6. Let dateTimeFormat be the result of creating a new object as if by the\n // expression new Intl.DateTimeFormat(locales, options) where\n // Intl.DateTimeFormat is the standard built-in constructor defined in 12.1.3.\n var dateTimeFormat = new DateTimeFormatConstructor(locales, options);\n\n // 7. Return the result of calling the FormatDateTime abstract operation (defined\n // in 12.3.2) with arguments dateTimeFormat and x.\n return FormatDateTime(dateTimeFormat, x);\n};\n\ndefineProperty(Intl, '__applyLocaleSensitivePrototypes', {\n writable: true,\n configurable: true,\n value: function value() {\n defineProperty(Number.prototype, 'toLocaleString', { writable: true, configurable: true, value: ls.Number.toLocaleString });\n // Need this here for IE 8, to avoid the _DontEnum_ bug\n defineProperty(Date.prototype, 'toLocaleString', { writable: true, configurable: true, value: ls.Date.toLocaleString });\n\n for (var k in ls.Date) {\n if (hop.call(ls.Date, k)) defineProperty(Date.prototype, k, { writable: true, configurable: true, value: ls.Date[k] });\n }\n }\n});\n\n/**\n * Can't really ship a single script with data for hundreds of locales, so we provide\n * this __addLocaleData method as a means for the developer to add the data on an\n * as-needed basis\n */\ndefineProperty(Intl, '__addLocaleData', {\n value: function value(data) {\n if (!IsStructurallyValidLanguageTag(data.locale)) throw new Error(\"Object passed doesn't identify itself with a valid language tag\");\n\n addLocaleData(data, data.locale);\n }\n});\n\nfunction addLocaleData(data, tag) {\n // Both NumberFormat and DateTimeFormat require number data, so throw if it isn't present\n if (!data.number) throw new Error(\"Object passed doesn't contain locale data for Intl.NumberFormat\");\n\n var locale = void 0,\n locales = [tag],\n parts = tag.split('-');\n\n // Create fallbacks for locale data with scripts, e.g. Latn, Hans, Vaii, etc\n if (parts.length > 2 && parts[1].length === 4) arrPush.call(locales, parts[0] + '-' + parts[2]);\n\n while (locale = arrShift.call(locales)) {\n // Add to NumberFormat internal properties as per 11.2.3\n arrPush.call(internals.NumberFormat['[[availableLocales]]'], locale);\n internals.NumberFormat['[[localeData]]'][locale] = data.number;\n\n // ...and DateTimeFormat internal properties as per 12.2.3\n if (data.date) {\n data.date.nu = data.number.nu;\n arrPush.call(internals.DateTimeFormat['[[availableLocales]]'], locale);\n internals.DateTimeFormat['[[localeData]]'][locale] = data.date;\n }\n }\n\n // If this is the first set of locale data added, make it the default\n if (defaultLocale === undefined) setDefaultLocale(tag);\n}\n\ndefineProperty(Intl, '__disableRegExpRestore', {\n value: function value() {\n internals.disableRegExpRestore = true;\n }\n});\n\nmodule.exports = Intl;","IntlPolyfill.__addLocaleData({locale:\"en\",date:{ca:[\"gregory\",\"buddhist\",\"chinese\",\"coptic\",\"dangi\",\"ethioaa\",\"ethiopic\",\"generic\",\"hebrew\",\"indian\",\"islamic\",\"islamicc\",\"japanese\",\"persian\",\"roc\"],hourNo0:true,hour12:true,formats:{short:\"{1}, {0}\",medium:\"{1}, {0}\",full:\"{1} 'at' {0}\",long:\"{1} 'at' {0}\",availableFormats:{\"d\":\"d\",\"E\":\"ccc\",Ed:\"d E\",Ehm:\"E h:mm a\",EHm:\"E HH:mm\",Ehms:\"E h:mm:ss a\",EHms:\"E HH:mm:ss\",Gy:\"y G\",GyMMM:\"MMM y G\",GyMMMd:\"MMM d, y G\",GyMMMEd:\"E, MMM d, y G\",\"h\":\"h a\",\"H\":\"HH\",hm:\"h:mm a\",Hm:\"HH:mm\",hms:\"h:mm:ss a\",Hms:\"HH:mm:ss\",hmsv:\"h:mm:ss a v\",Hmsv:\"HH:mm:ss v\",hmv:\"h:mm a v\",Hmv:\"HH:mm v\",\"M\":\"L\",Md:\"M/d\",MEd:\"E, M/d\",MMM:\"LLL\",MMMd:\"MMM d\",MMMEd:\"E, MMM d\",MMMMd:\"MMMM d\",ms:\"mm:ss\",\"y\":\"y\",yM:\"M/y\",yMd:\"M/d/y\",yMEd:\"E, M/d/y\",yMMM:\"MMM y\",yMMMd:\"MMM d, y\",yMMMEd:\"E, MMM d, y\",yMMMM:\"MMMM y\",yQQQ:\"QQQ y\",yQQQQ:\"QQQQ y\"},dateFormats:{yMMMMEEEEd:\"EEEE, MMMM d, y\",yMMMMd:\"MMMM d, y\",yMMMd:\"MMM d, y\",yMd:\"M/d/yy\"},timeFormats:{hmmsszzzz:\"h:mm:ss a zzzz\",hmsz:\"h:mm:ss a z\",hms:\"h:mm:ss a\",hm:\"h:mm a\"}},calendars:{buddhist:{months:{narrow:[\"J\",\"F\",\"M\",\"A\",\"M\",\"J\",\"J\",\"A\",\"S\",\"O\",\"N\",\"D\"],short:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],long:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"]},days:{narrow:[\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\"],short:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],long:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"]},eras:{narrow:[\"BE\"],short:[\"BE\"],long:[\"BE\"]},dayPeriods:{am:\"AM\",pm:\"PM\"}},chinese:{months:{narrow:[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\"],short:[\"Mo1\",\"Mo2\",\"Mo3\",\"Mo4\",\"Mo5\",\"Mo6\",\"Mo7\",\"Mo8\",\"Mo9\",\"Mo10\",\"Mo11\",\"Mo12\"],long:[\"Month1\",\"Month2\",\"Month3\",\"Month4\",\"Month5\",\"Month6\",\"Month7\",\"Month8\",\"Month9\",\"Month10\",\"Month11\",\"Month12\"]},days:{narrow:[\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\"],short:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],long:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"]},dayPeriods:{am:\"AM\",pm:\"PM\"}},coptic:{months:{narrow:[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\"],short:[\"Tout\",\"Baba\",\"Hator\",\"Kiahk\",\"Toba\",\"Amshir\",\"Baramhat\",\"Baramouda\",\"Bashans\",\"Paona\",\"Epep\",\"Mesra\",\"Nasie\"],long:[\"Tout\",\"Baba\",\"Hator\",\"Kiahk\",\"Toba\",\"Amshir\",\"Baramhat\",\"Baramouda\",\"Bashans\",\"Paona\",\"Epep\",\"Mesra\",\"Nasie\"]},days:{narrow:[\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\"],short:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],long:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"]},eras:{narrow:[\"ERA0\",\"ERA1\"],short:[\"ERA0\",\"ERA1\"],long:[\"ERA0\",\"ERA1\"]},dayPeriods:{am:\"AM\",pm:\"PM\"}},dangi:{months:{narrow:[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\"],short:[\"Mo1\",\"Mo2\",\"Mo3\",\"Mo4\",\"Mo5\",\"Mo6\",\"Mo7\",\"Mo8\",\"Mo9\",\"Mo10\",\"Mo11\",\"Mo12\"],long:[\"Month1\",\"Month2\",\"Month3\",\"Month4\",\"Month5\",\"Month6\",\"Month7\",\"Month8\",\"Month9\",\"Month10\",\"Month11\",\"Month12\"]},days:{narrow:[\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\"],short:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],long:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"]},dayPeriods:{am:\"AM\",pm:\"PM\"}},ethiopic:{months:{narrow:[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\"],short:[\"Meskerem\",\"Tekemt\",\"Hedar\",\"Tahsas\",\"Ter\",\"Yekatit\",\"Megabit\",\"Miazia\",\"Genbot\",\"Sene\",\"Hamle\",\"Nehasse\",\"Pagumen\"],long:[\"Meskerem\",\"Tekemt\",\"Hedar\",\"Tahsas\",\"Ter\",\"Yekatit\",\"Megabit\",\"Miazia\",\"Genbot\",\"Sene\",\"Hamle\",\"Nehasse\",\"Pagumen\"]},days:{narrow:[\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\"],short:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],long:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"]},eras:{narrow:[\"ERA0\",\"ERA1\"],short:[\"ERA0\",\"ERA1\"],long:[\"ERA0\",\"ERA1\"]},dayPeriods:{am:\"AM\",pm:\"PM\"}},ethioaa:{months:{narrow:[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\"],short:[\"Meskerem\",\"Tekemt\",\"Hedar\",\"Tahsas\",\"Ter\",\"Yekatit\",\"Megabit\",\"Miazia\",\"Genbot\",\"Sene\",\"Hamle\",\"Nehasse\",\"Pagumen\"],long:[\"Meskerem\",\"Tekemt\",\"Hedar\",\"Tahsas\",\"Ter\",\"Yekatit\",\"Megabit\",\"Miazia\",\"Genbot\",\"Sene\",\"Hamle\",\"Nehasse\",\"Pagumen\"]},days:{narrow:[\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\"],short:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],long:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"]},eras:{narrow:[\"ERA0\"],short:[\"ERA0\"],long:[\"ERA0\"]},dayPeriods:{am:\"AM\",pm:\"PM\"}},generic:{months:{narrow:[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\"],short:[\"M01\",\"M02\",\"M03\",\"M04\",\"M05\",\"M06\",\"M07\",\"M08\",\"M09\",\"M10\",\"M11\",\"M12\"],long:[\"M01\",\"M02\",\"M03\",\"M04\",\"M05\",\"M06\",\"M07\",\"M08\",\"M09\",\"M10\",\"M11\",\"M12\"]},days:{narrow:[\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\"],short:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],long:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"]},eras:{narrow:[\"ERA0\",\"ERA1\"],short:[\"ERA0\",\"ERA1\"],long:[\"ERA0\",\"ERA1\"]},dayPeriods:{am:\"AM\",pm:\"PM\"}},gregory:{months:{narrow:[\"J\",\"F\",\"M\",\"A\",\"M\",\"J\",\"J\",\"A\",\"S\",\"O\",\"N\",\"D\"],short:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],long:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"]},days:{narrow:[\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\"],short:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],long:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"]},eras:{narrow:[\"B\",\"A\",\"BCE\",\"CE\"],short:[\"BC\",\"AD\",\"BCE\",\"CE\"],long:[\"Before Christ\",\"Anno Domini\",\"Before Common Era\",\"Common Era\"]},dayPeriods:{am:\"AM\",pm:\"PM\"}},hebrew:{months:{narrow:[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"7\"],short:[\"Tishri\",\"Heshvan\",\"Kislev\",\"Tevet\",\"Shevat\",\"Adar I\",\"Adar\",\"Nisan\",\"Iyar\",\"Sivan\",\"Tamuz\",\"Av\",\"Elul\",\"Adar II\"],long:[\"Tishri\",\"Heshvan\",\"Kislev\",\"Tevet\",\"Shevat\",\"Adar I\",\"Adar\",\"Nisan\",\"Iyar\",\"Sivan\",\"Tamuz\",\"Av\",\"Elul\",\"Adar II\"]},days:{narrow:[\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\"],short:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],long:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"]},eras:{narrow:[\"AM\"],short:[\"AM\"],long:[\"AM\"]},dayPeriods:{am:\"AM\",pm:\"PM\"}},indian:{months:{narrow:[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\"],short:[\"Chaitra\",\"Vaisakha\",\"Jyaistha\",\"Asadha\",\"Sravana\",\"Bhadra\",\"Asvina\",\"Kartika\",\"Agrahayana\",\"Pausa\",\"Magha\",\"Phalguna\"],long:[\"Chaitra\",\"Vaisakha\",\"Jyaistha\",\"Asadha\",\"Sravana\",\"Bhadra\",\"Asvina\",\"Kartika\",\"Agrahayana\",\"Pausa\",\"Magha\",\"Phalguna\"]},days:{narrow:[\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\"],short:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],long:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"]},eras:{narrow:[\"Saka\"],short:[\"Saka\"],long:[\"Saka\"]},dayPeriods:{am:\"AM\",pm:\"PM\"}},islamic:{months:{narrow:[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\"],short:[\"Muh.\",\"Saf.\",\"Rab. I\",\"Rab. II\",\"Jum. I\",\"Jum. II\",\"Raj.\",\"Sha.\",\"Ram.\",\"Shaw.\",\"Dhuʻl-Q.\",\"Dhuʻl-H.\"],long:[\"Muharram\",\"Safar\",\"Rabiʻ I\",\"Rabiʻ II\",\"Jumada I\",\"Jumada II\",\"Rajab\",\"Shaʻban\",\"Ramadan\",\"Shawwal\",\"Dhuʻl-Qiʻdah\",\"Dhuʻl-Hijjah\"]},days:{narrow:[\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\"],short:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],long:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"]},eras:{narrow:[\"AH\"],short:[\"AH\"],long:[\"AH\"]},dayPeriods:{am:\"AM\",pm:\"PM\"}},islamicc:{months:{narrow:[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\"],short:[\"Muh.\",\"Saf.\",\"Rab. I\",\"Rab. II\",\"Jum. I\",\"Jum. II\",\"Raj.\",\"Sha.\",\"Ram.\",\"Shaw.\",\"Dhuʻl-Q.\",\"Dhuʻl-H.\"],long:[\"Muharram\",\"Safar\",\"Rabiʻ I\",\"Rabiʻ II\",\"Jumada I\",\"Jumada II\",\"Rajab\",\"Shaʻban\",\"Ramadan\",\"Shawwal\",\"Dhuʻl-Qiʻdah\",\"Dhuʻl-Hijjah\"]},days:{narrow:[\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\"],short:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],long:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"]},eras:{narrow:[\"AH\"],short:[\"AH\"],long:[\"AH\"]},dayPeriods:{am:\"AM\",pm:\"PM\"}},japanese:{months:{narrow:[\"J\",\"F\",\"M\",\"A\",\"M\",\"J\",\"J\",\"A\",\"S\",\"O\",\"N\",\"D\"],short:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],long:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"]},days:{narrow:[\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\"],short:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],long:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"]},eras:{narrow:[\"Taika (645–650)\",\"Hakuchi (650–671)\",\"Hakuhō (672–686)\",\"Shuchō (686–701)\",\"Taihō (701–704)\",\"Keiun (704–708)\",\"Wadō (708–715)\",\"Reiki (715–717)\",\"Yōrō (717–724)\",\"Jinki (724–729)\",\"Tenpyō (729–749)\",\"Tenpyō-kampō (749-749)\",\"Tenpyō-shōhō (749-757)\",\"Tenpyō-hōji (757-765)\",\"Tenpyō-jingo (765-767)\",\"Jingo-keiun (767-770)\",\"Hōki (770–780)\",\"Ten-ō (781-782)\",\"Enryaku (782–806)\",\"Daidō (806–810)\",\"Kōnin (810–824)\",\"Tenchō (824–834)\",\"Jōwa (834–848)\",\"Kajō (848–851)\",\"Ninju (851–854)\",\"Saikō (854–857)\",\"Ten-an (857-859)\",\"Jōgan (859–877)\",\"Gangyō (877–885)\",\"Ninna (885–889)\",\"Kanpyō (889–898)\",\"Shōtai (898–901)\",\"Engi (901–923)\",\"Enchō (923–931)\",\"Jōhei (931–938)\",\"Tengyō (938–947)\",\"Tenryaku (947–957)\",\"Tentoku (957–961)\",\"Ōwa (961–964)\",\"Kōhō (964–968)\",\"Anna (968–970)\",\"Tenroku (970–973)\",\"Ten’en (973–976)\",\"Jōgen (976–978)\",\"Tengen (978–983)\",\"Eikan (983–985)\",\"Kanna (985–987)\",\"Eien (987–989)\",\"Eiso (989–990)\",\"Shōryaku (990–995)\",\"Chōtoku (995–999)\",\"Chōhō (999–1004)\",\"Kankō (1004–1012)\",\"Chōwa (1012–1017)\",\"Kannin (1017–1021)\",\"Jian (1021–1024)\",\"Manju (1024–1028)\",\"Chōgen (1028–1037)\",\"Chōryaku (1037–1040)\",\"Chōkyū (1040–1044)\",\"Kantoku (1044–1046)\",\"Eishō (1046–1053)\",\"Tengi (1053–1058)\",\"Kōhei (1058–1065)\",\"Jiryaku (1065–1069)\",\"Enkyū (1069–1074)\",\"Shōho (1074–1077)\",\"Shōryaku (1077–1081)\",\"Eihō (1081–1084)\",\"Ōtoku (1084–1087)\",\"Kanji (1087–1094)\",\"Kahō (1094–1096)\",\"Eichō (1096–1097)\",\"Jōtoku (1097–1099)\",\"Kōwa (1099–1104)\",\"Chōji (1104–1106)\",\"Kashō (1106–1108)\",\"Tennin (1108–1110)\",\"Ten-ei (1110-1113)\",\"Eikyū (1113–1118)\",\"Gen’ei (1118–1120)\",\"Hōan (1120–1124)\",\"Tenji (1124–1126)\",\"Daiji (1126–1131)\",\"Tenshō (1131–1132)\",\"Chōshō (1132–1135)\",\"Hōen (1135–1141)\",\"Eiji (1141–1142)\",\"Kōji (1142–1144)\",\"Ten’yō (1144–1145)\",\"Kyūan (1145–1151)\",\"Ninpei (1151–1154)\",\"Kyūju (1154–1156)\",\"Hōgen (1156–1159)\",\"Heiji (1159–1160)\",\"Eiryaku (1160–1161)\",\"Ōho (1161–1163)\",\"Chōkan (1163–1165)\",\"Eiman (1165–1166)\",\"Nin’an (1166–1169)\",\"Kaō (1169–1171)\",\"Shōan (1171–1175)\",\"Angen (1175–1177)\",\"Jishō (1177–1181)\",\"Yōwa (1181–1182)\",\"Juei (1182–1184)\",\"Genryaku (1184–1185)\",\"Bunji (1185–1190)\",\"Kenkyū (1190–1199)\",\"Shōji (1199–1201)\",\"Kennin (1201–1204)\",\"Genkyū (1204–1206)\",\"Ken’ei (1206–1207)\",\"Jōgen (1207–1211)\",\"Kenryaku (1211–1213)\",\"Kenpō (1213–1219)\",\"Jōkyū (1219–1222)\",\"Jōō (1222–1224)\",\"Gennin (1224–1225)\",\"Karoku (1225–1227)\",\"Antei (1227–1229)\",\"Kanki (1229–1232)\",\"Jōei (1232–1233)\",\"Tenpuku (1233–1234)\",\"Bunryaku (1234–1235)\",\"Katei (1235–1238)\",\"Ryakunin (1238–1239)\",\"En’ō (1239–1240)\",\"Ninji (1240–1243)\",\"Kangen (1243–1247)\",\"Hōji (1247–1249)\",\"Kenchō (1249–1256)\",\"Kōgen (1256–1257)\",\"Shōka (1257–1259)\",\"Shōgen (1259–1260)\",\"Bun’ō (1260–1261)\",\"Kōchō (1261–1264)\",\"Bun’ei (1264–1275)\",\"Kenji (1275–1278)\",\"Kōan (1278–1288)\",\"Shōō (1288–1293)\",\"Einin (1293–1299)\",\"Shōan (1299–1302)\",\"Kengen (1302–1303)\",\"Kagen (1303–1306)\",\"Tokuji (1306–1308)\",\"Enkyō (1308–1311)\",\"Ōchō (1311–1312)\",\"Shōwa (1312–1317)\",\"Bunpō (1317–1319)\",\"Genō (1319–1321)\",\"Genkō (1321–1324)\",\"Shōchū (1324–1326)\",\"Karyaku (1326–1329)\",\"Gentoku (1329–1331)\",\"Genkō (1331–1334)\",\"Kenmu (1334–1336)\",\"Engen (1336–1340)\",\"Kōkoku (1340–1346)\",\"Shōhei (1346–1370)\",\"Kentoku (1370–1372)\",\"Bunchū (1372–1375)\",\"Tenju (1375–1379)\",\"Kōryaku (1379–1381)\",\"Kōwa (1381–1384)\",\"Genchū (1384–1392)\",\"Meitoku (1384–1387)\",\"Kakei (1387–1389)\",\"Kōō (1389–1390)\",\"Meitoku (1390–1394)\",\"Ōei (1394–1428)\",\"Shōchō (1428–1429)\",\"Eikyō (1429–1441)\",\"Kakitsu (1441–1444)\",\"Bun’an (1444–1449)\",\"Hōtoku (1449–1452)\",\"Kyōtoku (1452–1455)\",\"Kōshō (1455–1457)\",\"Chōroku (1457–1460)\",\"Kanshō (1460–1466)\",\"Bunshō (1466–1467)\",\"Ōnin (1467–1469)\",\"Bunmei (1469–1487)\",\"Chōkyō (1487–1489)\",\"Entoku (1489–1492)\",\"Meiō (1492–1501)\",\"Bunki (1501–1504)\",\"Eishō (1504–1521)\",\"Taiei (1521–1528)\",\"Kyōroku (1528–1532)\",\"Tenbun (1532–1555)\",\"Kōji (1555–1558)\",\"Eiroku (1558–1570)\",\"Genki (1570–1573)\",\"Tenshō (1573–1592)\",\"Bunroku (1592–1596)\",\"Keichō (1596–1615)\",\"Genna (1615–1624)\",\"Kan’ei (1624–1644)\",\"Shōho (1644–1648)\",\"Keian (1648–1652)\",\"Jōō (1652–1655)\",\"Meireki (1655–1658)\",\"Manji (1658–1661)\",\"Kanbun (1661–1673)\",\"Enpō (1673–1681)\",\"Tenna (1681–1684)\",\"Jōkyō (1684–1688)\",\"Genroku (1688–1704)\",\"Hōei (1704–1711)\",\"Shōtoku (1711–1716)\",\"Kyōhō (1716–1736)\",\"Genbun (1736–1741)\",\"Kanpō (1741–1744)\",\"Enkyō (1744–1748)\",\"Kan’en (1748–1751)\",\"Hōreki (1751–1764)\",\"Meiwa (1764–1772)\",\"An’ei (1772–1781)\",\"Tenmei (1781–1789)\",\"Kansei (1789–1801)\",\"Kyōwa (1801–1804)\",\"Bunka (1804–1818)\",\"Bunsei (1818–1830)\",\"Tenpō (1830–1844)\",\"Kōka (1844–1848)\",\"Kaei (1848–1854)\",\"Ansei (1854–1860)\",\"Man’en (1860–1861)\",\"Bunkyū (1861–1864)\",\"Genji (1864–1865)\",\"Keiō (1865–1868)\",\"M\",\"T\",\"S\",\"H\"],short:[\"Taika (645–650)\",\"Hakuchi (650–671)\",\"Hakuhō (672–686)\",\"Shuchō (686–701)\",\"Taihō (701–704)\",\"Keiun (704–708)\",\"Wadō (708–715)\",\"Reiki (715–717)\",\"Yōrō (717–724)\",\"Jinki (724–729)\",\"Tenpyō (729–749)\",\"Tenpyō-kampō (749-749)\",\"Tenpyō-shōhō (749-757)\",\"Tenpyō-hōji (757-765)\",\"Tenpyō-jingo (765-767)\",\"Jingo-keiun (767-770)\",\"Hōki (770–780)\",\"Ten-ō (781-782)\",\"Enryaku (782–806)\",\"Daidō (806–810)\",\"Kōnin (810–824)\",\"Tenchō (824–834)\",\"Jōwa (834–848)\",\"Kajō (848–851)\",\"Ninju (851–854)\",\"Saikō (854–857)\",\"Ten-an (857-859)\",\"Jōgan (859–877)\",\"Gangyō (877–885)\",\"Ninna (885–889)\",\"Kanpyō (889–898)\",\"Shōtai (898–901)\",\"Engi (901–923)\",\"Enchō (923–931)\",\"Jōhei (931–938)\",\"Tengyō (938–947)\",\"Tenryaku (947–957)\",\"Tentoku (957–961)\",\"Ōwa (961–964)\",\"Kōhō (964–968)\",\"Anna (968–970)\",\"Tenroku (970–973)\",\"Ten’en (973–976)\",\"Jōgen (976–978)\",\"Tengen (978–983)\",\"Eikan (983–985)\",\"Kanna (985–987)\",\"Eien (987–989)\",\"Eiso (989–990)\",\"Shōryaku (990–995)\",\"Chōtoku (995–999)\",\"Chōhō (999–1004)\",\"Kankō (1004–1012)\",\"Chōwa (1012–1017)\",\"Kannin (1017–1021)\",\"Jian (1021–1024)\",\"Manju (1024–1028)\",\"Chōgen (1028–1037)\",\"Chōryaku (1037–1040)\",\"Chōkyū (1040–1044)\",\"Kantoku (1044–1046)\",\"Eishō (1046–1053)\",\"Tengi (1053–1058)\",\"Kōhei (1058–1065)\",\"Jiryaku (1065–1069)\",\"Enkyū (1069–1074)\",\"Shōho (1074–1077)\",\"Shōryaku (1077–1081)\",\"Eihō (1081–1084)\",\"Ōtoku (1084–1087)\",\"Kanji (1087–1094)\",\"Kahō (1094–1096)\",\"Eichō (1096–1097)\",\"Jōtoku (1097–1099)\",\"Kōwa (1099–1104)\",\"Chōji (1104–1106)\",\"Kashō (1106–1108)\",\"Tennin (1108–1110)\",\"Ten-ei (1110-1113)\",\"Eikyū (1113–1118)\",\"Gen’ei (1118–1120)\",\"Hōan (1120–1124)\",\"Tenji (1124–1126)\",\"Daiji (1126–1131)\",\"Tenshō (1131–1132)\",\"Chōshō (1132–1135)\",\"Hōen (1135–1141)\",\"Eiji (1141–1142)\",\"Kōji (1142–1144)\",\"Ten’yō (1144–1145)\",\"Kyūan (1145–1151)\",\"Ninpei (1151–1154)\",\"Kyūju (1154–1156)\",\"Hōgen (1156–1159)\",\"Heiji (1159–1160)\",\"Eiryaku (1160–1161)\",\"Ōho (1161–1163)\",\"Chōkan (1163–1165)\",\"Eiman (1165–1166)\",\"Nin’an (1166–1169)\",\"Kaō (1169–1171)\",\"Shōan (1171–1175)\",\"Angen (1175–1177)\",\"Jishō (1177–1181)\",\"Yōwa (1181–1182)\",\"Juei (1182–1184)\",\"Genryaku (1184–1185)\",\"Bunji (1185–1190)\",\"Kenkyū (1190–1199)\",\"Shōji (1199–1201)\",\"Kennin (1201–1204)\",\"Genkyū (1204–1206)\",\"Ken’ei (1206–1207)\",\"Jōgen (1207–1211)\",\"Kenryaku (1211–1213)\",\"Kenpō (1213–1219)\",\"Jōkyū (1219–1222)\",\"Jōō (1222–1224)\",\"Gennin (1224–1225)\",\"Karoku (1225–1227)\",\"Antei (1227–1229)\",\"Kanki (1229–1232)\",\"Jōei (1232–1233)\",\"Tenpuku (1233–1234)\",\"Bunryaku (1234–1235)\",\"Katei (1235–1238)\",\"Ryakunin (1238–1239)\",\"En’ō (1239–1240)\",\"Ninji (1240–1243)\",\"Kangen (1243–1247)\",\"Hōji (1247–1249)\",\"Kenchō (1249–1256)\",\"Kōgen (1256–1257)\",\"Shōka (1257–1259)\",\"Shōgen (1259–1260)\",\"Bun’ō (1260–1261)\",\"Kōchō (1261–1264)\",\"Bun’ei (1264–1275)\",\"Kenji (1275–1278)\",\"Kōan (1278–1288)\",\"Shōō (1288–1293)\",\"Einin (1293–1299)\",\"Shōan (1299–1302)\",\"Kengen (1302–1303)\",\"Kagen (1303–1306)\",\"Tokuji (1306–1308)\",\"Enkyō (1308–1311)\",\"Ōchō (1311–1312)\",\"Shōwa (1312–1317)\",\"Bunpō (1317–1319)\",\"Genō (1319–1321)\",\"Genkō (1321–1324)\",\"Shōchū (1324–1326)\",\"Karyaku (1326–1329)\",\"Gentoku (1329–1331)\",\"Genkō (1331–1334)\",\"Kenmu (1334–1336)\",\"Engen (1336–1340)\",\"Kōkoku (1340–1346)\",\"Shōhei (1346–1370)\",\"Kentoku (1370–1372)\",\"Bunchū (1372–1375)\",\"Tenju (1375–1379)\",\"Kōryaku (1379–1381)\",\"Kōwa (1381–1384)\",\"Genchū (1384–1392)\",\"Meitoku (1384–1387)\",\"Kakei (1387–1389)\",\"Kōō (1389–1390)\",\"Meitoku (1390–1394)\",\"Ōei (1394–1428)\",\"Shōchō (1428–1429)\",\"Eikyō (1429–1441)\",\"Kakitsu (1441–1444)\",\"Bun’an (1444–1449)\",\"Hōtoku (1449–1452)\",\"Kyōtoku (1452–1455)\",\"Kōshō (1455–1457)\",\"Chōroku (1457–1460)\",\"Kanshō (1460–1466)\",\"Bunshō (1466–1467)\",\"Ōnin (1467–1469)\",\"Bunmei (1469–1487)\",\"Chōkyō (1487–1489)\",\"Entoku (1489–1492)\",\"Meiō (1492–1501)\",\"Bunki (1501–1504)\",\"Eishō (1504–1521)\",\"Taiei (1521–1528)\",\"Kyōroku (1528–1532)\",\"Tenbun (1532–1555)\",\"Kōji (1555–1558)\",\"Eiroku (1558–1570)\",\"Genki (1570–1573)\",\"Tenshō (1573–1592)\",\"Bunroku (1592–1596)\",\"Keichō (1596–1615)\",\"Genna (1615–1624)\",\"Kan’ei (1624–1644)\",\"Shōho (1644–1648)\",\"Keian (1648–1652)\",\"Jōō (1652–1655)\",\"Meireki (1655–1658)\",\"Manji (1658–1661)\",\"Kanbun (1661–1673)\",\"Enpō (1673–1681)\",\"Tenna (1681–1684)\",\"Jōkyō (1684–1688)\",\"Genroku (1688–1704)\",\"Hōei (1704–1711)\",\"Shōtoku (1711–1716)\",\"Kyōhō (1716–1736)\",\"Genbun (1736–1741)\",\"Kanpō (1741–1744)\",\"Enkyō (1744–1748)\",\"Kan’en (1748–1751)\",\"Hōreki (1751–1764)\",\"Meiwa (1764–1772)\",\"An’ei (1772–1781)\",\"Tenmei (1781–1789)\",\"Kansei (1789–1801)\",\"Kyōwa (1801–1804)\",\"Bunka (1804–1818)\",\"Bunsei (1818–1830)\",\"Tenpō (1830–1844)\",\"Kōka (1844–1848)\",\"Kaei (1848–1854)\",\"Ansei (1854–1860)\",\"Man’en (1860–1861)\",\"Bunkyū (1861–1864)\",\"Genji (1864–1865)\",\"Keiō (1865–1868)\",\"Meiji\",\"Taishō\",\"Shōwa\",\"Heisei\"],long:[\"Taika (645–650)\",\"Hakuchi (650–671)\",\"Hakuhō (672–686)\",\"Shuchō (686–701)\",\"Taihō (701–704)\",\"Keiun (704–708)\",\"Wadō (708–715)\",\"Reiki (715–717)\",\"Yōrō (717–724)\",\"Jinki (724–729)\",\"Tenpyō (729–749)\",\"Tenpyō-kampō (749-749)\",\"Tenpyō-shōhō (749-757)\",\"Tenpyō-hōji (757-765)\",\"Tenpyō-jingo (765-767)\",\"Jingo-keiun (767-770)\",\"Hōki (770–780)\",\"Ten-ō (781-782)\",\"Enryaku (782–806)\",\"Daidō (806–810)\",\"Kōnin (810–824)\",\"Tenchō (824–834)\",\"Jōwa (834–848)\",\"Kajō (848–851)\",\"Ninju (851–854)\",\"Saikō (854–857)\",\"Ten-an (857-859)\",\"Jōgan (859–877)\",\"Gangyō (877–885)\",\"Ninna (885–889)\",\"Kanpyō (889–898)\",\"Shōtai (898–901)\",\"Engi (901–923)\",\"Enchō (923–931)\",\"Jōhei (931–938)\",\"Tengyō (938–947)\",\"Tenryaku (947–957)\",\"Tentoku (957–961)\",\"Ōwa (961–964)\",\"Kōhō (964–968)\",\"Anna (968–970)\",\"Tenroku (970–973)\",\"Ten’en (973–976)\",\"Jōgen (976–978)\",\"Tengen (978–983)\",\"Eikan (983–985)\",\"Kanna (985–987)\",\"Eien (987–989)\",\"Eiso (989–990)\",\"Shōryaku (990–995)\",\"Chōtoku (995–999)\",\"Chōhō (999–1004)\",\"Kankō (1004–1012)\",\"Chōwa (1012–1017)\",\"Kannin (1017–1021)\",\"Jian (1021–1024)\",\"Manju (1024–1028)\",\"Chōgen (1028–1037)\",\"Chōryaku (1037–1040)\",\"Chōkyū (1040–1044)\",\"Kantoku (1044–1046)\",\"Eishō (1046–1053)\",\"Tengi (1053–1058)\",\"Kōhei (1058–1065)\",\"Jiryaku (1065–1069)\",\"Enkyū (1069–1074)\",\"Shōho (1074–1077)\",\"Shōryaku (1077–1081)\",\"Eihō (1081–1084)\",\"Ōtoku (1084–1087)\",\"Kanji (1087–1094)\",\"Kahō (1094–1096)\",\"Eichō (1096–1097)\",\"Jōtoku (1097–1099)\",\"Kōwa (1099–1104)\",\"Chōji (1104–1106)\",\"Kashō (1106–1108)\",\"Tennin (1108–1110)\",\"Ten-ei (1110-1113)\",\"Eikyū (1113–1118)\",\"Gen’ei (1118–1120)\",\"Hōan (1120–1124)\",\"Tenji (1124–1126)\",\"Daiji (1126–1131)\",\"Tenshō (1131–1132)\",\"Chōshō (1132–1135)\",\"Hōen (1135–1141)\",\"Eiji (1141–1142)\",\"Kōji (1142–1144)\",\"Ten’yō (1144–1145)\",\"Kyūan (1145–1151)\",\"Ninpei (1151–1154)\",\"Kyūju (1154–1156)\",\"Hōgen (1156–1159)\",\"Heiji (1159–1160)\",\"Eiryaku (1160–1161)\",\"Ōho (1161–1163)\",\"Chōkan (1163–1165)\",\"Eiman (1165–1166)\",\"Nin’an (1166–1169)\",\"Kaō (1169–1171)\",\"Shōan (1171–1175)\",\"Angen (1175–1177)\",\"Jishō (1177–1181)\",\"Yōwa (1181–1182)\",\"Juei (1182–1184)\",\"Genryaku (1184–1185)\",\"Bunji (1185–1190)\",\"Kenkyū (1190–1199)\",\"Shōji (1199–1201)\",\"Kennin (1201–1204)\",\"Genkyū (1204–1206)\",\"Ken’ei (1206–1207)\",\"Jōgen (1207–1211)\",\"Kenryaku (1211–1213)\",\"Kenpō (1213–1219)\",\"Jōkyū (1219–1222)\",\"Jōō (1222–1224)\",\"Gennin (1224–1225)\",\"Karoku (1225–1227)\",\"Antei (1227–1229)\",\"Kanki (1229–1232)\",\"Jōei (1232–1233)\",\"Tenpuku (1233–1234)\",\"Bunryaku (1234–1235)\",\"Katei (1235–1238)\",\"Ryakunin (1238–1239)\",\"En’ō (1239–1240)\",\"Ninji (1240–1243)\",\"Kangen (1243–1247)\",\"Hōji (1247–1249)\",\"Kenchō (1249–1256)\",\"Kōgen (1256–1257)\",\"Shōka (1257–1259)\",\"Shōgen (1259–1260)\",\"Bun’ō (1260–1261)\",\"Kōchō (1261–1264)\",\"Bun’ei (1264–1275)\",\"Kenji (1275–1278)\",\"Kōan (1278–1288)\",\"Shōō (1288–1293)\",\"Einin (1293–1299)\",\"Shōan (1299–1302)\",\"Kengen (1302–1303)\",\"Kagen (1303–1306)\",\"Tokuji (1306–1308)\",\"Enkyō (1308–1311)\",\"Ōchō (1311–1312)\",\"Shōwa (1312–1317)\",\"Bunpō (1317–1319)\",\"Genō (1319–1321)\",\"Genkō (1321–1324)\",\"Shōchū (1324–1326)\",\"Karyaku (1326–1329)\",\"Gentoku (1329–1331)\",\"Genkō (1331–1334)\",\"Kenmu (1334–1336)\",\"Engen (1336–1340)\",\"Kōkoku (1340–1346)\",\"Shōhei (1346–1370)\",\"Kentoku (1370–1372)\",\"Bunchū (1372–1375)\",\"Tenju (1375–1379)\",\"Kōryaku (1379–1381)\",\"Kōwa (1381–1384)\",\"Genchū (1384–1392)\",\"Meitoku (1384–1387)\",\"Kakei (1387–1389)\",\"Kōō (1389–1390)\",\"Meitoku (1390–1394)\",\"Ōei (1394–1428)\",\"Shōchō (1428–1429)\",\"Eikyō (1429–1441)\",\"Kakitsu (1441–1444)\",\"Bun’an (1444–1449)\",\"Hōtoku (1449–1452)\",\"Kyōtoku (1452–1455)\",\"Kōshō (1455–1457)\",\"Chōroku (1457–1460)\",\"Kanshō (1460–1466)\",\"Bunshō (1466–1467)\",\"Ōnin (1467–1469)\",\"Bunmei (1469–1487)\",\"Chōkyō (1487–1489)\",\"Entoku (1489–1492)\",\"Meiō (1492–1501)\",\"Bunki (1501–1504)\",\"Eishō (1504–1521)\",\"Taiei (1521–1528)\",\"Kyōroku (1528–1532)\",\"Tenbun (1532–1555)\",\"Kōji (1555–1558)\",\"Eiroku (1558–1570)\",\"Genki (1570–1573)\",\"Tenshō (1573–1592)\",\"Bunroku (1592–1596)\",\"Keichō (1596–1615)\",\"Genna (1615–1624)\",\"Kan’ei (1624–1644)\",\"Shōho (1644–1648)\",\"Keian (1648–1652)\",\"Jōō (1652–1655)\",\"Meireki (1655–1658)\",\"Manji (1658–1661)\",\"Kanbun (1661–1673)\",\"Enpō (1673–1681)\",\"Tenna (1681–1684)\",\"Jōkyō (1684–1688)\",\"Genroku (1688–1704)\",\"Hōei (1704–1711)\",\"Shōtoku (1711–1716)\",\"Kyōhō (1716–1736)\",\"Genbun (1736–1741)\",\"Kanpō (1741–1744)\",\"Enkyō (1744–1748)\",\"Kan’en (1748–1751)\",\"Hōreki (1751–1764)\",\"Meiwa (1764–1772)\",\"An’ei (1772–1781)\",\"Tenmei (1781–1789)\",\"Kansei (1789–1801)\",\"Kyōwa (1801–1804)\",\"Bunka (1804–1818)\",\"Bunsei (1818–1830)\",\"Tenpō (1830–1844)\",\"Kōka (1844–1848)\",\"Kaei (1848–1854)\",\"Ansei (1854–1860)\",\"Man’en (1860–1861)\",\"Bunkyū (1861–1864)\",\"Genji (1864–1865)\",\"Keiō (1865–1868)\",\"Meiji\",\"Taishō\",\"Shōwa\",\"Heisei\"]},dayPeriods:{am:\"AM\",pm:\"PM\"}},persian:{months:{narrow:[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\"],short:[\"Farvardin\",\"Ordibehesht\",\"Khordad\",\"Tir\",\"Mordad\",\"Shahrivar\",\"Mehr\",\"Aban\",\"Azar\",\"Dey\",\"Bahman\",\"Esfand\"],long:[\"Farvardin\",\"Ordibehesht\",\"Khordad\",\"Tir\",\"Mordad\",\"Shahrivar\",\"Mehr\",\"Aban\",\"Azar\",\"Dey\",\"Bahman\",\"Esfand\"]},days:{narrow:[\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\"],short:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],long:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"]},eras:{narrow:[\"AP\"],short:[\"AP\"],long:[\"AP\"]},dayPeriods:{am:\"AM\",pm:\"PM\"}},roc:{months:{narrow:[\"J\",\"F\",\"M\",\"A\",\"M\",\"J\",\"J\",\"A\",\"S\",\"O\",\"N\",\"D\"],short:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],long:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"]},days:{narrow:[\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\"],short:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],long:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"]},eras:{narrow:[\"Before R.O.C.\",\"Minguo\"],short:[\"Before R.O.C.\",\"Minguo\"],long:[\"Before R.O.C.\",\"Minguo\"]},dayPeriods:{am:\"AM\",pm:\"PM\"}}}},number:{nu:[\"latn\"],patterns:{decimal:{positivePattern:\"{number}\",negativePattern:\"{minusSign}{number}\"},currency:{positivePattern:\"{currency}{number}\",negativePattern:\"{minusSign}{currency}{number}\"},percent:{positivePattern:\"{number}{percentSign}\",negativePattern:\"{minusSign}{number}{percentSign}\"}},symbols:{latn:{decimal:\".\",group:\",\",nan:\"NaN\",plusSign:\"+\",minusSign:\"-\",percentSign:\"%\",infinity:\"∞\"}},currencies:{AUD:\"A$\",BRL:\"R$\",CAD:\"CA$\",CNY:\"CN¥\",EUR:\"€\",GBP:\"£\",HKD:\"HK$\",ILS:\"₪\",INR:\"₹\",JPY:\"¥\",KRW:\"₩\",MXN:\"MX$\",NZD:\"NZ$\",TWD:\"NT$\",USD:\"$\",VND:\"₫\",XAF:\"FCFA\",XCD:\"EC$\",XOF:\"CFA\",XPF:\"CFPF\"}}});","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n","'use strict';\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar callBound = require('call-bind/callBound');\n\nvar $toString = callBound('Object.prototype.toString');\n\nvar isStandardArguments = function isArguments(value) {\n\tif (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {\n\t\treturn false;\n\t}\n\treturn $toString(value) === '[object Arguments]';\n};\n\nvar isLegacyArguments = function isArguments(value) {\n\tif (isStandardArguments(value)) {\n\t\treturn true;\n\t}\n\treturn value !== null &&\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.length === 'number' &&\n\t\tvalue.length >= 0 &&\n\t\t$toString(value) !== '[object Array]' &&\n\t\t$toString(value.callee) === '[object Function]';\n};\n\nvar supportsStandardArguments = (function () {\n\treturn isStandardArguments(arguments);\n}());\n\nisStandardArguments.isLegacyArguments = isLegacyArguments; // for tests\n\nmodule.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","module.exports = isFunction\n\nvar toString = Object.prototype.toString\n\nfunction isFunction (fn) {\n if (!fn) {\n return false\n }\n var string = toString.call(fn)\n return string === '[object Function]' ||\n (typeof fn === 'function' && string !== '[object RegExp]') ||\n (typeof window !== 'undefined' &&\n // IE8 and below\n (fn === window.setTimeout ||\n fn === window.alert ||\n fn === window.confirm ||\n fn === window.prompt))\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","'use strict';\n\nvar vanilla = require('jotai/vanilla');\nvar react = require('jotai/react');\n\n\n\nObject.keys(vanilla).forEach(function (k) {\n\tif (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {\n\t\tenumerable: true,\n\t\tget: function () { return vanilla[k]; }\n\t});\n});\nObject.keys(react).forEach(function (k) {\n\tif (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {\n\t\tenumerable: true,\n\t\tget: function () { return react[k]; }\n\t});\n});\n","'use strict';\n\nvar ReactExports = require('react');\nvar vanilla = require('jotai/vanilla');\n\nvar StoreContext = ReactExports.createContext(undefined);\nvar useStore = function useStore(options) {\n var store = ReactExports.useContext(StoreContext);\n return (options == null ? void 0 : options.store) || store || vanilla.getDefaultStore();\n};\nvar Provider = function Provider(_ref) {\n var children = _ref.children,\n store = _ref.store;\n var storeRef = ReactExports.useRef();\n if (!store && !storeRef.current) {\n storeRef.current = vanilla.createStore();\n }\n return ReactExports.createElement(StoreContext.Provider, {\n value: store || storeRef.current\n }, children);\n};\n\nvar isPromiseLike = function isPromiseLike(x) {\n return typeof (x == null ? void 0 : x.then) === 'function';\n};\nvar use = ReactExports.use || function (promise) {\n if (promise.status === 'pending') {\n throw promise;\n } else if (promise.status === 'fulfilled') {\n return promise.value;\n } else if (promise.status === 'rejected') {\n throw promise.reason;\n } else {\n promise.status = 'pending';\n promise.then(function (v) {\n promise.status = 'fulfilled';\n promise.value = v;\n }, function (e) {\n promise.status = 'rejected';\n promise.reason = e;\n });\n throw promise;\n }\n};\nfunction useAtomValue(atom, options) {\n var store = useStore(options);\n var _useReducer = ReactExports.useReducer(function (prev) {\n var nextValue = store.get(atom);\n if (Object.is(prev[0], nextValue) && prev[1] === store && prev[2] === atom) {\n return prev;\n }\n return [nextValue, store, atom];\n }, undefined, function () {\n return [store.get(atom), store, atom];\n }),\n _useReducer$ = _useReducer[0],\n valueFromReducer = _useReducer$[0],\n storeFromReducer = _useReducer$[1],\n atomFromReducer = _useReducer$[2],\n rerender = _useReducer[1];\n var value = valueFromReducer;\n if (storeFromReducer !== store || atomFromReducer !== atom) {\n rerender();\n value = store.get(atom);\n }\n var delay = options == null ? void 0 : options.delay;\n ReactExports.useEffect(function () {\n var unsub = store.sub(atom, function () {\n if (typeof delay === 'number') {\n setTimeout(rerender, delay);\n return;\n }\n rerender();\n });\n rerender();\n return unsub;\n }, [store, atom, delay]);\n ReactExports.useDebugValue(value);\n return isPromiseLike(value) ? use(value) : value;\n}\n\nfunction useSetAtom(atom, options) {\n var store = useStore(options);\n var setAtom = ReactExports.useCallback(function () {\n if (process.env.NODE_ENV !== 'production' && !('write' in atom)) {\n throw new Error('not writable atom');\n }\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return store.set.apply(store, [atom].concat(args));\n }, [store, atom]);\n return setAtom;\n}\n\nfunction useAtom(atom, options) {\n return [useAtomValue(atom, options), useSetAtom(atom, options)];\n}\n\nexports.Provider = Provider;\nexports.useAtom = useAtom;\nexports.useAtomValue = useAtomValue;\nexports.useSetAtom = useSetAtom;\nexports.useStore = useStore;\n","'use strict';\n\nvar keyCount = 0;\nfunction atom(read, write) {\n var key = \"atom\" + ++keyCount;\n var config = {\n toString: function toString() {\n return key;\n }\n };\n if (typeof read === 'function') {\n config.read = read;\n } else {\n config.init = read;\n config.read = function (get) {\n return get(config);\n };\n config.write = function (get, set, arg) {\n return set(config, typeof arg === 'function' ? arg(get(config)) : arg);\n };\n }\n if (write) {\n config.write = write;\n }\n return config;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n if (it) return (it = it.call(o)).next.bind(it);\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n return function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n };\n }\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar hasInitialValue = function hasInitialValue(atom) {\n return 'init' in atom;\n};\nvar isActuallyWritableAtom = function isActuallyWritableAtom(atom) {\n return !!atom.write;\n};\nvar cancelPromiseMap = new WeakMap();\nvar registerCancelPromise = function registerCancelPromise(promise, cancel) {\n cancelPromiseMap.set(promise, cancel);\n promise.catch(function () {}).finally(function () {\n return cancelPromiseMap.delete(promise);\n });\n};\nvar cancelPromise = function cancelPromise(promise, next) {\n var cancel = cancelPromiseMap.get(promise);\n if (cancel) {\n cancelPromiseMap.delete(promise);\n cancel(next);\n }\n};\nvar resolvePromise = function resolvePromise(promise, value) {\n promise.status = 'fulfilled';\n promise.value = value;\n};\nvar rejectPromise = function rejectPromise(promise, e) {\n promise.status = 'rejected';\n promise.reason = e;\n};\nvar isPromiseLike = function isPromiseLike(x) {\n return typeof (x == null ? void 0 : x.then) === 'function';\n};\nvar isEqualAtomValue = function isEqualAtomValue(a, b) {\n return 'v' in a && 'v' in b && Object.is(a.v, b.v);\n};\nvar isEqualAtomError = function isEqualAtomError(a, b) {\n return 'e' in a && 'e' in b && Object.is(a.e, b.e);\n};\nvar hasPromiseAtomValue = function hasPromiseAtomValue(a) {\n return 'v' in a && a.v instanceof Promise;\n};\nvar isEqualPromiseAtomValue = function isEqualPromiseAtomValue(a, b) {\n return 'v' in a && 'v' in b && a.v.orig && a.v.orig === b.v.orig;\n};\nvar returnAtomValue = function returnAtomValue(atomState) {\n if ('e' in atomState) {\n throw atomState.e;\n }\n return atomState.v;\n};\nvar createStore = function createStore() {\n var atomStateMap = new WeakMap();\n var mountedMap = new WeakMap();\n var pendingMap = new Map();\n var storeListenersRev2;\n var mountedAtoms;\n if (process.env.NODE_ENV !== 'production') {\n storeListenersRev2 = new Set();\n mountedAtoms = new Set();\n }\n var getAtomState = function getAtomState(atom) {\n return atomStateMap.get(atom);\n };\n var setAtomState = function setAtomState(atom, atomState) {\n if (process.env.NODE_ENV !== 'production') {\n Object.freeze(atomState);\n }\n var prevAtomState = atomStateMap.get(atom);\n atomStateMap.set(atom, atomState);\n if (!pendingMap.has(atom)) {\n pendingMap.set(atom, prevAtomState);\n }\n if (prevAtomState && hasPromiseAtomValue(prevAtomState)) {\n var _next = 'v' in atomState ? atomState.v instanceof Promise ? atomState.v : Promise.resolve(atomState.v) : Promise.reject(atomState.e);\n cancelPromise(prevAtomState.v, _next);\n }\n };\n var updateDependencies = function updateDependencies(atom, nextAtomState, nextDependencies) {\n var dependencies = new Map();\n var changed = false;\n nextDependencies.forEach(function (aState, a) {\n if (!aState && a === atom) {\n aState = nextAtomState;\n }\n if (aState) {\n dependencies.set(a, aState);\n if (nextAtomState.d.get(a) !== aState) {\n changed = true;\n }\n } else if (process.env.NODE_ENV !== 'production') {\n console.warn('[Bug] atom state not found');\n }\n });\n if (changed || nextAtomState.d.size !== dependencies.size) {\n nextAtomState.d = dependencies;\n }\n };\n var setAtomValue = function setAtomValue(atom, value, nextDependencies) {\n var prevAtomState = getAtomState(atom);\n var nextAtomState = {\n d: (prevAtomState == null ? void 0 : prevAtomState.d) || new Map(),\n v: value\n };\n if (nextDependencies) {\n updateDependencies(atom, nextAtomState, nextDependencies);\n }\n if (prevAtomState && isEqualAtomValue(prevAtomState, nextAtomState) && prevAtomState.d === nextAtomState.d) {\n return prevAtomState;\n }\n if (prevAtomState && hasPromiseAtomValue(prevAtomState) && hasPromiseAtomValue(nextAtomState) && isEqualPromiseAtomValue(prevAtomState, nextAtomState)) {\n if (prevAtomState.d === nextAtomState.d) {\n return prevAtomState;\n } else {\n nextAtomState.v = prevAtomState.v;\n }\n }\n setAtomState(atom, nextAtomState);\n return nextAtomState;\n };\n var setAtomValueOrPromise = function setAtomValueOrPromise(atom, valueOrPromise, nextDependencies, abortPromise) {\n if (isPromiseLike(valueOrPromise)) {\n var continuePromise;\n var promise = new Promise(function (resolve, reject) {\n var settled = false;\n valueOrPromise.then(function (v) {\n if (!settled) {\n settled = true;\n var prevAtomState = getAtomState(atom);\n var nextAtomState = setAtomValue(atom, promise, nextDependencies);\n resolvePromise(promise, v);\n resolve(v);\n if (mountedMap.has(atom) && (prevAtomState == null ? void 0 : prevAtomState.d) !== nextAtomState.d) {\n mountDependencies(atom, nextAtomState, prevAtomState == null ? void 0 : prevAtomState.d);\n }\n }\n }, function (e) {\n if (!settled) {\n settled = true;\n var prevAtomState = getAtomState(atom);\n var nextAtomState = setAtomValue(atom, promise, nextDependencies);\n rejectPromise(promise, e);\n reject(e);\n if (mountedMap.has(atom) && (prevAtomState == null ? void 0 : prevAtomState.d) !== nextAtomState.d) {\n mountDependencies(atom, nextAtomState, prevAtomState == null ? void 0 : prevAtomState.d);\n }\n }\n });\n continuePromise = function continuePromise(next) {\n if (!settled) {\n settled = true;\n next.then(function (v) {\n return resolvePromise(promise, v);\n }, function (e) {\n return rejectPromise(promise, e);\n });\n resolve(next);\n }\n };\n });\n promise.orig = valueOrPromise;\n promise.status = 'pending';\n registerCancelPromise(promise, function (next) {\n if (next) {\n continuePromise(next);\n }\n abortPromise == null || abortPromise();\n });\n return setAtomValue(atom, promise, nextDependencies);\n }\n return setAtomValue(atom, valueOrPromise, nextDependencies);\n };\n var setAtomError = function setAtomError(atom, error, nextDependencies) {\n var prevAtomState = getAtomState(atom);\n var nextAtomState = {\n d: (prevAtomState == null ? void 0 : prevAtomState.d) || new Map(),\n e: error\n };\n if (nextDependencies) {\n updateDependencies(atom, nextAtomState, nextDependencies);\n }\n if (prevAtomState && isEqualAtomError(prevAtomState, nextAtomState) && prevAtomState.d === nextAtomState.d) {\n return prevAtomState;\n }\n setAtomState(atom, nextAtomState);\n return nextAtomState;\n };\n var readAtomState = function readAtomState(atom, force) {\n var atomState = getAtomState(atom);\n if (!force && atomState) {\n if (mountedMap.has(atom)) {\n return atomState;\n }\n if (Array.from(atomState.d).every(function (_ref) {\n var a = _ref[0],\n s = _ref[1];\n return a === atom || readAtomState(a) === s;\n })) {\n return atomState;\n }\n }\n var nextDependencies = new Map();\n var isSync = true;\n var getter = function getter(a) {\n if (a === atom) {\n var _aState = getAtomState(a);\n if (_aState) {\n nextDependencies.set(a, _aState);\n return returnAtomValue(_aState);\n }\n if (hasInitialValue(a)) {\n nextDependencies.set(a, undefined);\n return a.init;\n }\n throw new Error('no atom init');\n }\n var aState = readAtomState(a);\n nextDependencies.set(a, aState);\n return returnAtomValue(aState);\n };\n var controller;\n var setSelf;\n var options = {\n get signal() {\n if (!controller) {\n controller = new AbortController();\n }\n return controller.signal;\n },\n get setSelf() {\n if (process.env.NODE_ENV !== 'production' && !isActuallyWritableAtom(atom)) {\n console.warn('setSelf function cannot be used with read-only atom');\n }\n if (!setSelf && isActuallyWritableAtom(atom)) {\n setSelf = function setSelf() {\n if (process.env.NODE_ENV !== 'production' && isSync) {\n console.warn('setSelf function cannot be called in sync');\n }\n if (!isSync) {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return writeAtom.apply(void 0, [atom].concat(args));\n }\n };\n }\n return setSelf;\n }\n };\n try {\n var valueOrPromise = atom.read(getter, options);\n return setAtomValueOrPromise(atom, valueOrPromise, nextDependencies, function () {\n var _controller;\n return (_controller = controller) == null ? void 0 : _controller.abort();\n });\n } catch (error) {\n return setAtomError(atom, error, nextDependencies);\n } finally {\n isSync = false;\n }\n };\n var readAtom = function readAtom(atom) {\n return returnAtomValue(readAtomState(atom));\n };\n var addAtom = function addAtom(atom) {\n var mounted = mountedMap.get(atom);\n if (!mounted) {\n mounted = mountAtom(atom);\n }\n return mounted;\n };\n var canUnmountAtom = function canUnmountAtom(atom, mounted) {\n return !mounted.l.size && (!mounted.t.size || mounted.t.size === 1 && mounted.t.has(atom));\n };\n var delAtom = function delAtom(atom) {\n var mounted = mountedMap.get(atom);\n if (mounted && canUnmountAtom(atom, mounted)) {\n unmountAtom(atom);\n }\n };\n var recomputeDependents = function recomputeDependents(atom) {\n var dependencyMap = new Map();\n var dirtyMap = new WeakMap();\n var getDependents = function getDependents(a) {\n var _mountedMap$get;\n var dependents = new Set((_mountedMap$get = mountedMap.get(a)) == null ? void 0 : _mountedMap$get.t);\n pendingMap.forEach(function (_, pendingAtom) {\n var _getAtomState;\n if ((_getAtomState = getAtomState(pendingAtom)) != null && _getAtomState.d.has(a)) {\n dependents.add(pendingAtom);\n }\n });\n return dependents;\n };\n var loop1 = function loop1(a) {\n getDependents(a).forEach(function (dependent) {\n if (dependent !== a) {\n dependencyMap.set(dependent, (dependencyMap.get(dependent) || new Set()).add(a));\n dirtyMap.set(dependent, (dirtyMap.get(dependent) || 0) + 1);\n loop1(dependent);\n }\n });\n };\n loop1(atom);\n var loop2 = function loop2(a) {\n getDependents(a).forEach(function (dependent) {\n if (dependent !== a) {\n var dirtyCount = dirtyMap.get(dependent);\n if (dirtyCount) {\n dirtyMap.set(dependent, --dirtyCount);\n }\n if (!dirtyCount) {\n var _dependencyMap$get;\n var isChanged = !!((_dependencyMap$get = dependencyMap.get(dependent)) != null && _dependencyMap$get.size);\n if (isChanged) {\n var prevAtomState = getAtomState(dependent);\n var nextAtomState = readAtomState(dependent, true);\n isChanged = !prevAtomState || !isEqualAtomValue(prevAtomState, nextAtomState);\n }\n if (!isChanged) {\n dependencyMap.forEach(function (s) {\n return s.delete(dependent);\n });\n }\n }\n loop2(dependent);\n }\n });\n };\n loop2(atom);\n };\n var writeAtomState = function writeAtomState(atom) {\n var isSync = true;\n var getter = function getter(a) {\n return returnAtomValue(readAtomState(a));\n };\n var setter = function setter(a) {\n var r;\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 if (a === atom) {\n if (!hasInitialValue(a)) {\n throw new Error('atom not writable');\n }\n var prevAtomState = getAtomState(a);\n var nextAtomState = setAtomValueOrPromise(a, args[0]);\n if (!prevAtomState || !isEqualAtomValue(prevAtomState, nextAtomState)) {\n recomputeDependents(a);\n }\n } else {\n r = writeAtomState.apply(void 0, [a].concat(args));\n }\n if (!isSync) {\n var flushed = flushPending();\n if (process.env.NODE_ENV !== 'production') {\n storeListenersRev2.forEach(function (l) {\n return l({\n type: 'async-write',\n flushed: flushed\n });\n });\n }\n }\n return r;\n };\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 var result = atom.write.apply(atom, [getter, setter].concat(args));\n isSync = false;\n return result;\n };\n var writeAtom = function writeAtom(atom) {\n for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n args[_key4 - 1] = arguments[_key4];\n }\n var result = writeAtomState.apply(void 0, [atom].concat(args));\n var flushed = flushPending();\n if (process.env.NODE_ENV !== 'production') {\n storeListenersRev2.forEach(function (l) {\n return l({\n type: 'write',\n flushed: flushed\n });\n });\n }\n return result;\n };\n var mountAtom = function mountAtom(atom, initialDependent, onMountQueue) {\n var _getAtomState2;\n var queue = onMountQueue || [];\n (_getAtomState2 = getAtomState(atom)) == null || _getAtomState2.d.forEach(function (_, a) {\n var aMounted = mountedMap.get(a);\n if (aMounted) {\n aMounted.t.add(atom);\n } else {\n if (a !== atom) {\n mountAtom(a, atom, queue);\n }\n }\n });\n readAtomState(atom);\n var mounted = {\n t: new Set(initialDependent && [initialDependent]),\n l: new Set()\n };\n mountedMap.set(atom, mounted);\n if (process.env.NODE_ENV !== 'production') {\n mountedAtoms.add(atom);\n }\n if (isActuallyWritableAtom(atom) && atom.onMount) {\n var onMount = atom.onMount;\n queue.push(function () {\n var onUnmount = onMount(function () {\n for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n args[_key5] = arguments[_key5];\n }\n return writeAtom.apply(void 0, [atom].concat(args));\n });\n if (onUnmount) {\n mounted.u = onUnmount;\n }\n });\n }\n if (!onMountQueue) {\n queue.forEach(function (f) {\n return f();\n });\n }\n return mounted;\n };\n var unmountAtom = function unmountAtom(atom) {\n var _mountedMap$get2;\n var onUnmount = (_mountedMap$get2 = mountedMap.get(atom)) == null ? void 0 : _mountedMap$get2.u;\n if (onUnmount) {\n onUnmount();\n }\n mountedMap.delete(atom);\n if (process.env.NODE_ENV !== 'production') {\n mountedAtoms.delete(atom);\n }\n var atomState = getAtomState(atom);\n if (atomState) {\n if (hasPromiseAtomValue(atomState)) {\n cancelPromise(atomState.v);\n }\n atomState.d.forEach(function (_, a) {\n if (a !== atom) {\n var mounted = mountedMap.get(a);\n if (mounted) {\n mounted.t.delete(atom);\n if (canUnmountAtom(a, mounted)) {\n unmountAtom(a);\n }\n }\n }\n });\n } else if (process.env.NODE_ENV !== 'production') {\n console.warn('[Bug] could not find atom state to unmount', atom);\n }\n };\n var mountDependencies = function mountDependencies(atom, atomState, prevDependencies) {\n var depSet = new Set(atomState.d.keys());\n prevDependencies == null || prevDependencies.forEach(function (_, a) {\n if (depSet.has(a)) {\n depSet.delete(a);\n return;\n }\n var mounted = mountedMap.get(a);\n if (mounted) {\n mounted.t.delete(atom);\n if (canUnmountAtom(a, mounted)) {\n unmountAtom(a);\n }\n }\n });\n depSet.forEach(function (a) {\n var mounted = mountedMap.get(a);\n if (mounted) {\n mounted.t.add(atom);\n } else if (mountedMap.has(atom)) {\n mountAtom(a, atom);\n }\n });\n };\n var flushPending = function flushPending() {\n var flushed;\n if (process.env.NODE_ENV !== 'production') {\n flushed = new Set();\n }\n while (pendingMap.size) {\n var pending = Array.from(pendingMap);\n pendingMap.clear();\n pending.forEach(function (_ref2) {\n var atom = _ref2[0],\n prevAtomState = _ref2[1];\n var atomState = getAtomState(atom);\n if (atomState) {\n var mounted = mountedMap.get(atom);\n if (mounted && atomState.d !== (prevAtomState == null ? void 0 : prevAtomState.d)) {\n mountDependencies(atom, atomState, prevAtomState == null ? void 0 : prevAtomState.d);\n }\n if (mounted && !(prevAtomState && !hasPromiseAtomValue(prevAtomState) && (isEqualAtomValue(prevAtomState, atomState) || isEqualAtomError(prevAtomState, atomState)))) {\n mounted.l.forEach(function (listener) {\n return listener();\n });\n if (process.env.NODE_ENV !== 'production') {\n flushed.add(atom);\n }\n }\n } else if (process.env.NODE_ENV !== 'production') {\n console.warn('[Bug] no atom state to flush');\n }\n });\n }\n if (process.env.NODE_ENV !== 'production') {\n return flushed;\n }\n };\n var subscribeAtom = function subscribeAtom(atom, listener) {\n var mounted = addAtom(atom);\n var flushed = flushPending();\n var listeners = mounted.l;\n listeners.add(listener);\n if (process.env.NODE_ENV !== 'production') {\n storeListenersRev2.forEach(function (l) {\n return l({\n type: 'sub',\n flushed: flushed\n });\n });\n }\n return function () {\n listeners.delete(listener);\n delAtom(atom);\n if (process.env.NODE_ENV !== 'production') {\n storeListenersRev2.forEach(function (l) {\n return l({\n type: 'unsub'\n });\n });\n }\n };\n };\n if (process.env.NODE_ENV !== 'production') {\n return {\n get: readAtom,\n set: writeAtom,\n sub: subscribeAtom,\n dev_subscribe_store: function dev_subscribe_store(l, rev) {\n if (rev !== 2) {\n throw new Error('The current StoreListener revision is 2.');\n }\n storeListenersRev2.add(l);\n return function () {\n storeListenersRev2.delete(l);\n };\n },\n dev_get_mounted_atoms: function dev_get_mounted_atoms() {\n return mountedAtoms.values();\n },\n dev_get_atom_state: function dev_get_atom_state(a) {\n return atomStateMap.get(a);\n },\n dev_get_mounted: function dev_get_mounted(a) {\n return mountedMap.get(a);\n },\n dev_restore_atoms: function dev_restore_atoms(values) {\n for (var _iterator = _createForOfIteratorHelperLoose(values), _step; !(_step = _iterator()).done;) {\n var _step$value = _step.value,\n atom = _step$value[0],\n valueOrPromise = _step$value[1];\n if (hasInitialValue(atom)) {\n setAtomValueOrPromise(atom, valueOrPromise);\n recomputeDependents(atom);\n }\n }\n var flushed = flushPending();\n storeListenersRev2.forEach(function (l) {\n return l({\n type: 'restore',\n flushed: flushed\n });\n });\n }\n };\n }\n return {\n get: readAtom,\n set: writeAtom,\n sub: subscribeAtom\n };\n};\nvar defaultStore;\nif (process.env.NODE_ENV !== 'production') {\n if (typeof globalThis.__NUMBER_OF_JOTAI_INSTANCES__ === 'number') {\n ++globalThis.__NUMBER_OF_JOTAI_INSTANCES__;\n } else {\n globalThis.__NUMBER_OF_JOTAI_INSTANCES__ = 1;\n }\n}\nvar getDefaultStore = function getDefaultStore() {\n if (!defaultStore) {\n if (process.env.NODE_ENV !== 'production' && globalThis.__NUMBER_OF_JOTAI_INSTANCES__ !== 1) {\n console.warn('Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044');\n }\n defaultStore = createStore();\n }\n return defaultStore;\n};\n\nexports.atom = atom;\nexports.createStore = createStore;\nexports.getDefaultStore = getDefaultStore;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction 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// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction 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// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\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 */\nfunction 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// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\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 */\nfunction 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// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\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 */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\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 */\nfunction 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\nmodule.exports = apply;\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 */\nfunction 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\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\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 * 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 */\nfunction 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\nmodule.exports = arrayLikeKeys;\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 */\nfunction 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\nmodule.exports = arrayMap;\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 */\nfunction 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\nmodule.exports = arrayPush;\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 */\nfunction 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\nmodule.exports = arrayReduce;\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 */\nfunction 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\nmodule.exports = arraySome;\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 */\nfunction asciiToArray(string) {\n return string.split('');\n}\n\nmodule.exports = asciiToArray;\n","/** Used to match words composed of alphanumeric characters. */\nvar reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\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 */\nfunction asciiWords(string) {\n return string.match(reAsciiWord) || [];\n}\n\nmodule.exports = asciiWords;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\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 * 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 */\nfunction 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\nmodule.exports = assignValue;\n","var eq = require('./eq');\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 */\nfunction 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\nmodule.exports = assocIndexOf;\n","var defineProperty = require('./_defineProperty');\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 */\nfunction 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\nmodule.exports = baseAssignValue;\n","var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\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 */\nfunction 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\nmodule.exports = baseFlatten;\n","var createBaseFor = require('./_createBaseFor');\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 */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n","var baseFor = require('./_baseFor'),\n keys = require('./keys');\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 */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\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 */\nfunction 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\nmodule.exports = baseGet;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\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 */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\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 */\nfunction 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\nmodule.exports = baseGetTag;\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 */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\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 */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\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 */\nfunction 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\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\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 `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 */\nfunction 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\nmodule.exports = baseIsEqualDeep;\n","var Stack = require('./_Stack'),\n baseIsEqual = require('./_baseIsEqual');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\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 */\nfunction 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\nmodule.exports = baseIsMatch;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\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 detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\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 */\nfunction 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\nmodule.exports = baseIsNative;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\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/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\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 */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var baseMatches = require('./_baseMatches'),\n baseMatchesProperty = require('./_baseMatchesProperty'),\n identity = require('./identity'),\n isArray = require('./isArray'),\n property = require('./property');\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 */\nfunction 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\nmodule.exports = baseIteratee;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\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 * 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 */\nfunction 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\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\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 * 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 */\nfunction 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\nmodule.exports = baseKeysIn;\n","var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData'),\n matchesStrictComparable = require('./_matchesStrictComparable');\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 */\nfunction 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\nmodule.exports = baseMatches;\n","var baseIsEqual = require('./_baseIsEqual'),\n get = require('./get'),\n hasIn = require('./hasIn'),\n isKey = require('./_isKey'),\n isStrictComparable = require('./_isStrictComparable'),\n matchesStrictComparable = require('./_matchesStrictComparable'),\n toKey = require('./_toKey');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\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 */\nfunction 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\nmodule.exports = baseMatchesProperty;\n","var basePickBy = require('./_basePickBy'),\n hasIn = require('./hasIn');\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 */\nfunction basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n}\n\nmodule.exports = basePick;\n","var baseGet = require('./_baseGet'),\n baseSet = require('./_baseSet'),\n castPath = require('./_castPath');\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 */\nfunction 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\nmodule.exports = basePickBy;\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 */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = baseProperty;\n","var baseGet = require('./_baseGet');\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 */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nmodule.exports = basePropertyDeep;\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 */\nfunction basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = basePropertyOf;\n","var assignValue = require('./_assignValue'),\n castPath = require('./_castPath'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject'),\n toKey = require('./_toKey');\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 */\nfunction 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\nmodule.exports = baseSet;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\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 */\nvar 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\nmodule.exports = baseSetToString;\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 */\nfunction 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\nmodule.exports = baseSlice;\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 */\nfunction 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\nmodule.exports = baseTimes;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\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 */\nfunction 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\nmodule.exports = baseToString;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\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 */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\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 */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\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 */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\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 */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","var baseSlice = require('./_baseSlice');\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 */\nfunction 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\nmodule.exports = castSlice;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\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 castSlice = require('./_castSlice'),\n hasUnicode = require('./_hasUnicode'),\n stringToArray = require('./_stringToArray'),\n toString = require('./toString');\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 */\nfunction 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\nmodule.exports = createCaseFirst;\n","var arrayReduce = require('./_arrayReduce'),\n deburr = require('./deburr'),\n words = require('./words');\n\n/** Used to compose unicode capture groups. */\nvar rsApos = \"['\\u2019]\";\n\n/** Used to match apostrophes. */\nvar reApos = RegExp(rsApos, 'g');\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 */\nfunction createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n}\n\nmodule.exports = createCompounder;\n","var basePropertyOf = require('./_basePropertyOf');\n\n/** Used to map Latin Unicode letters to basic Latin letters. */\nvar 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/**\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 */\nvar deburrLetter = basePropertyOf(deburredLetters);\n\nmodule.exports = deburrLetter;\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","var flatten = require('./flatten'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\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 */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nmodule.exports = flatRest;\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","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsZWJ = '\\\\u200d';\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/). */\nvar reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\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 */\nfunction hasUnicode(string) {\n return reHasUnicode.test(string);\n}\n\nmodule.exports = hasUnicode;\n","/** Used to detect strings that need a more robust regexp to match words. */\nvar 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/**\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 */\nfunction hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n}\n\nmodule.exports = hasUnicodeWord;\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","var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\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 */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\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 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","/** 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 asciiToArray = require('./_asciiToArray'),\n hasUnicode = require('./_hasUnicode'),\n unicodeToArray = require('./_unicodeToArray');\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 */\nfunction stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n}\n\nmodule.exports = stringToArray;\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","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsAstral = '[' + rsAstralRange + ']',\n rsCombo = '[' + rsComboRange + ']',\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 rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\nvar reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\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 */\nfunction unicodeToArray(string) {\n return string.match(reUnicode) || [];\n}\n\nmodule.exports = unicodeToArray;\n","/** Used to compose unicode character classes. */\nvar 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. */\nvar rsApos = \"['\\u2019]\",\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. */\nvar 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\n/** Used to match complex or compound words. */\nvar 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/**\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 */\nfunction unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n}\n\nmodule.exports = unicodeWords;\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","var deburrLetter = require('./_deburrLetter'),\n toString = require('./toString');\n\n/** Used to match Latin Unicode letters (excluding mathematical operators). */\nvar reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n/** Used to compose unicode character classes. */\nvar rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;\n\n/** Used to compose unicode capture groups. */\nvar rsCombo = '[' + rsComboRange + ']';\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 */\nvar reComboMark = RegExp(rsCombo, 'g');\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 */\nfunction deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n}\n\nmodule.exports = deburr;\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 baseFlatten = require('./_baseFlatten');\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 */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\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 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 baseIsEqual = require('./_baseIsEqual');\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 */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\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","/**\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 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","var baseAssignValue = require('./_baseAssignValue'),\n baseForOwn = require('./_baseForOwn'),\n baseIteratee = require('./_baseIteratee');\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 */\nfunction mapValues(object, iteratee) {\n var result = {};\n iteratee = baseIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n}\n\nmodule.exports = mapValues;\n","var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\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 */\nfunction 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`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n","var root = require('./_root');\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 */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","var basePick = require('./_basePick'),\n flatRest = require('./_flatRest');\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 */\nvar pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n});\n\nmodule.exports = pick;\n","var arrayMap = require('./_arrayMap'),\n baseIteratee = require('./_baseIteratee'),\n basePickBy = require('./_basePickBy'),\n getAllKeysIn = require('./_getAllKeysIn');\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 */\nfunction pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = baseIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n}\n\nmodule.exports = pickBy;\n","var baseProperty = require('./_baseProperty'),\n basePropertyDeep = require('./_basePropertyDeep'),\n isKey = require('./_isKey'),\n toKey = require('./_toKey');\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n","var createCompounder = require('./_createCompounder'),\n upperFirst = require('./upperFirst');\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 */\nvar startCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + upperFirst(word);\n});\n\nmodule.exports = startCase;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\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 */\nfunction 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\nmodule.exports = toNumber;\n","var baseToString = require('./_baseToString');\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 */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","var createCaseFirst = require('./_createCaseFirst');\n\n/**\n * Converts the first character of `string` to upper 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 * _.upperFirst('fred');\n * // => 'Fred'\n *\n * _.upperFirst('FRED');\n * // => 'FRED'\n */\nvar upperFirst = createCaseFirst('toUpperCase');\n\nmodule.exports = upperFirst;\n","var asciiWords = require('./_asciiWords'),\n hasUnicodeWord = require('./_hasUnicodeWord'),\n toString = require('./toString'),\n unicodeWords = require('./_unicodeWords');\n\n/**\n * Splits `string` into an array of its words.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {RegExp|string} [pattern] The pattern to match words.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the words of `string`.\n * @example\n *\n * _.words('fred, barney, & pebbles');\n * // => ['fred', 'barney', 'pebbles']\n *\n * _.words('fred, barney, & pebbles', /[^, ]+/g);\n * // => ['fred', 'barney', '&', 'pebbles']\n */\nfunction words(string, pattern, guard) {\n string = toString(string);\n pattern = guard ? undefined : pattern;\n\n if (pattern === undefined) {\n return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n }\n return string.match(pattern) || [];\n}\n\nmodule.exports = words;\n","(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.memoizerific = f()}})(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);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o= 0) {\n\t\tthis.lastItem = this.list[index];\n\t\treturn this.list[index].val;\n\t}\n\n\treturn undefined;\n};\n\nSimilar.prototype.set = function(key, val) {\n\tvar index;\n\n\tif (this.lastItem && this.isEqual(this.lastItem.key, key)) {\n\t\tthis.lastItem.val = val;\n\t\treturn this;\n\t}\n\n\tindex = this.indexOf(key);\n\tif (index >= 0) {\n\t\tthis.lastItem = this.list[index];\n\t\tthis.list[index].val = val;\n\t\treturn this;\n\t}\n\n\tthis.lastItem = { key: key, val: val };\n\tthis.list.push(this.lastItem);\n\tthis.size++;\n\n\treturn this;\n};\n\nSimilar.prototype.delete = function(key) {\n\tvar index;\n\n\tif (this.lastItem && this.isEqual(this.lastItem.key, key)) {\n\t\tthis.lastItem = undefined;\n\t}\n\n\tindex = this.indexOf(key);\n\tif (index >= 0) {\n\t\tthis.size--;\n\t\treturn this.list.splice(index, 1)[0];\n\t}\n\n\treturn undefined;\n};\n\n\n// important that has() doesn't use get() in case an existing key has a falsy value, in which case has() would return false\nSimilar.prototype.has = function(key) {\n\tvar index;\n\n\tif (this.lastItem && this.isEqual(this.lastItem.key, key)) {\n\t\treturn true;\n\t}\n\n\tindex = this.indexOf(key);\n\tif (index >= 0) {\n\t\tthis.lastItem = this.list[index];\n\t\treturn true;\n\t}\n\n\treturn false;\n};\n\nSimilar.prototype.forEach = function(callback, thisArg) {\n\tvar i;\n\tfor (i = 0; i < this.size; i++) {\n\t\tcallback.call(thisArg || this, this.list[i].val, this.list[i].key, this);\n\t}\n};\n\nSimilar.prototype.indexOf = function(key) {\n\tvar i;\n\tfor (i = 0; i < this.size; i++) {\n\t\tif (this.isEqual(this.list[i].key, key)) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n};\n\n// check if the numbers are equal, or whether they are both precisely NaN (isNaN returns true for all non-numbers)\nSimilar.prototype.isEqual = function(val1, val2) {\n\treturn val1 === val2 || (val1 !== val1 && val2 !== val2);\n};\n\nmodule.exports = Similar;\n},{}],3:[function(_dereq_,module,exports){\nvar MapOrSimilar = _dereq_('map-or-similar');\n\nmodule.exports = function (limit) {\n\tvar cache = new MapOrSimilar(undefined === 'true'),\n\t\tlru = [];\n\n\treturn function (fn) {\n\t\tvar memoizerific = function () {\n\t\t\tvar currentCache = cache,\n\t\t\t\tnewMap,\n\t\t\t\tfnResult,\n\t\t\t\targsLengthMinusOne = arguments.length - 1,\n\t\t\t\tlruPath = Array(argsLengthMinusOne + 1),\n\t\t\t\tisMemoized = true,\n\t\t\t\ti;\n\n\t\t\tif ((memoizerific.numArgs || memoizerific.numArgs === 0) && memoizerific.numArgs !== argsLengthMinusOne + 1) {\n\t\t\t\tthrow new Error('Memoizerific functions should always be called with the same number of arguments');\n\t\t\t}\n\n\t\t\t// loop through each argument to traverse the map tree\n\t\t\tfor (i = 0; i < argsLengthMinusOne; i++) {\n\t\t\t\tlruPath[i] = {\n\t\t\t\t\tcacheItem: currentCache,\n\t\t\t\t\targ: arguments[i]\n\t\t\t\t};\n\n\t\t\t\t// climb through the hierarchical map tree until the second-last argument has been found, or an argument is missing.\n\t\t\t\t// if all arguments up to the second-last have been found, this will potentially be a cache hit (determined later)\n\t\t\t\tif (currentCache.has(arguments[i])) {\n\t\t\t\t\tcurrentCache = currentCache.get(arguments[i]);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tisMemoized = false;\n\n\t\t\t\t// make maps until last value\n\t\t\t\tnewMap = new MapOrSimilar(undefined === 'true');\n\t\t\t\tcurrentCache.set(arguments[i], newMap);\n\t\t\t\tcurrentCache = newMap;\n\t\t\t}\n\n\t\t\t// we are at the last arg, check if it is really memoized\n\t\t\tif (isMemoized) {\n\t\t\t\tif (currentCache.has(arguments[argsLengthMinusOne])) {\n\t\t\t\t\tfnResult = currentCache.get(arguments[argsLengthMinusOne]);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tisMemoized = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!isMemoized) {\n\t\t\t\tfnResult = fn.apply(null, arguments);\n\t\t\t\tcurrentCache.set(arguments[argsLengthMinusOne], fnResult);\n\t\t\t}\n\n\t\t\tif (limit > 0) {\n\t\t\t\tlruPath[argsLengthMinusOne] = {\n\t\t\t\t\tcacheItem: currentCache,\n\t\t\t\t\targ: arguments[argsLengthMinusOne]\n\t\t\t\t};\n\n\t\t\t\tif (isMemoized) {\n\t\t\t\t\tmoveToMostRecentLru(lru, lruPath);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tlru.push(lruPath);\n\t\t\t\t}\n\n\t\t\t\tif (lru.length > limit) {\n\t\t\t\t\tremoveCachedResult(lru.shift());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tmemoizerific.wasMemoized = isMemoized;\n\t\t\tmemoizerific.numArgs = argsLengthMinusOne + 1;\n\n\t\t\treturn fnResult;\n\t\t};\n\n\t\tmemoizerific.limit = limit;\n\t\tmemoizerific.wasMemoized = false;\n\t\tmemoizerific.cache = cache;\n\t\tmemoizerific.lru = lru;\n\n\t\treturn memoizerific;\n\t};\n};\n\n// move current args to most recent position\nfunction moveToMostRecentLru(lru, lruPath) {\n\tvar lruLen = lru.length,\n\t\tlruPathLen = lruPath.length,\n\t\tisMatch,\n\t\ti, ii;\n\n\tfor (i = 0; i < lruLen; i++) {\n\t\tisMatch = true;\n\t\tfor (ii = 0; ii < lruPathLen; ii++) {\n\t\t\tif (!isEqual(lru[i][ii].arg, lruPath[ii].arg)) {\n\t\t\t\tisMatch = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (isMatch) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tlru.push(lru.splice(i, 1)[0]);\n}\n\n// remove least recently used cache item and all dead branches\nfunction removeCachedResult(removedLru) {\n\tvar removedLruLen = removedLru.length,\n\t\tcurrentLru = removedLru[removedLruLen - 1],\n\t\ttmp,\n\t\ti;\n\n\tcurrentLru.cacheItem.delete(currentLru.arg);\n\n\t// walk down the tree removing dead branches (size 0) along the way\n\tfor (i = removedLruLen - 2; i >= 0; i--) {\n\t\tcurrentLru = removedLru[i];\n\t\ttmp = currentLru.cacheItem.get(currentLru.arg);\n\n\t\tif (!tmp || !tmp.size) {\n\t\t\tcurrentLru.cacheItem.delete(currentLru.arg);\n\t\t} else {\n\t\t\tbreak;\n\t\t}\n\t}\n}\n\n// check if the numbers are equal, or whether they are both precisely NaN (isNaN returns true for all non-numbers)\nfunction isEqual(val1, val2) {\n\treturn val1 === val2 || (val1 !== val1 && val2 !== val2);\n}\n},{\"map-or-similar\":1}]},{},[3])(3)\n});","'use strict';\nconst isOptionObject = require('is-plain-obj');\n\nconst {hasOwnProperty} = Object.prototype;\nconst {propertyIsEnumerable} = Object;\nconst defineProperty = (object, name, value) => Object.defineProperty(object, name, {\n\tvalue,\n\twritable: true,\n\tenumerable: true,\n\tconfigurable: true\n});\n\nconst globalThis = this;\nconst defaultMergeOptions = {\n\tconcatArrays: false,\n\tignoreUndefined: false\n};\n\nconst getEnumerableOwnPropertyKeys = value => {\n\tconst keys = [];\n\n\tfor (const key in value) {\n\t\tif (hasOwnProperty.call(value, key)) {\n\t\t\tkeys.push(key);\n\t\t}\n\t}\n\n\t/* istanbul ignore else */\n\tif (Object.getOwnPropertySymbols) {\n\t\tconst symbols = Object.getOwnPropertySymbols(value);\n\n\t\tfor (const symbol of symbols) {\n\t\t\tif (propertyIsEnumerable.call(value, symbol)) {\n\t\t\t\tkeys.push(symbol);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn keys;\n};\n\nfunction clone(value) {\n\tif (Array.isArray(value)) {\n\t\treturn cloneArray(value);\n\t}\n\n\tif (isOptionObject(value)) {\n\t\treturn cloneOptionObject(value);\n\t}\n\n\treturn value;\n}\n\nfunction cloneArray(array) {\n\tconst result = array.slice(0, 0);\n\n\tgetEnumerableOwnPropertyKeys(array).forEach(key => {\n\t\tdefineProperty(result, key, clone(array[key]));\n\t});\n\n\treturn result;\n}\n\nfunction cloneOptionObject(object) {\n\tconst result = Object.getPrototypeOf(object) === null ? Object.create(null) : {};\n\n\tgetEnumerableOwnPropertyKeys(object).forEach(key => {\n\t\tdefineProperty(result, key, clone(object[key]));\n\t});\n\n\treturn result;\n}\n\n/**\n * @param {*} merged already cloned\n * @param {*} source something to merge\n * @param {string[]} keys keys to merge\n * @param {Object} config Config Object\n * @returns {*} cloned Object\n */\nconst mergeKeys = (merged, source, keys, config) => {\n\tkeys.forEach(key => {\n\t\tif (typeof source[key] === 'undefined' && config.ignoreUndefined) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Do not recurse into prototype chain of merged\n\t\tif (key in merged && merged[key] !== Object.getPrototypeOf(merged)) {\n\t\t\tdefineProperty(merged, key, merge(merged[key], source[key], config));\n\t\t} else {\n\t\t\tdefineProperty(merged, key, clone(source[key]));\n\t\t}\n\t});\n\n\treturn merged;\n};\n\n/**\n * @param {*} merged already cloned\n * @param {*} source something to merge\n * @param {Object} config Config Object\n * @returns {*} cloned Object\n *\n * see [Array.prototype.concat ( ...arguments )](http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.concat)\n */\nconst concatArrays = (merged, source, config) => {\n\tlet result = merged.slice(0, 0);\n\tlet resultIndex = 0;\n\n\t[merged, source].forEach(array => {\n\t\tconst indices = [];\n\n\t\t// `result.concat(array)` with cloning\n\t\tfor (let k = 0; k < array.length; k++) {\n\t\t\tif (!hasOwnProperty.call(array, k)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tindices.push(String(k));\n\n\t\t\tif (array === merged) {\n\t\t\t\t// Already cloned\n\t\t\t\tdefineProperty(result, resultIndex++, array[k]);\n\t\t\t} else {\n\t\t\t\tdefineProperty(result, resultIndex++, clone(array[k]));\n\t\t\t}\n\t\t}\n\n\t\t// Merge non-index keys\n\t\tresult = mergeKeys(result, array, getEnumerableOwnPropertyKeys(array).filter(key => !indices.includes(key)), config);\n\t});\n\n\treturn result;\n};\n\n/**\n * @param {*} merged already cloned\n * @param {*} source something to merge\n * @param {Object} config Config Object\n * @returns {*} cloned Object\n */\nfunction merge(merged, source, config) {\n\tif (config.concatArrays && Array.isArray(merged) && Array.isArray(source)) {\n\t\treturn concatArrays(merged, source, config);\n\t}\n\n\tif (!isOptionObject(source) || !isOptionObject(merged)) {\n\t\treturn clone(source);\n\t}\n\n\treturn mergeKeys(merged, source, getEnumerableOwnPropertyKeys(source), config);\n}\n\nmodule.exports = function (...options) {\n\tconst config = merge(clone(defaultMergeOptions), (this !== globalThis && this) || {}, defaultMergeOptions);\n\tlet merged = {_: {}};\n\n\tfor (const option of options) {\n\t\tif (option === undefined) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!isOptionObject(option)) {\n\t\t\tthrow new TypeError('`' + option + '` is not an Option Object');\n\t\t}\n\n\t\tmerged = merge(merged, {_: option}, config);\n\t}\n\n\treturn merged._;\n};\n","'use strict';\n\nmodule.exports = value => {\n\tif (Object.prototype.toString.call(value) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype === null || prototype === Object.prototype;\n};\n","'use strict';\n\nfunction nullthrows(x, message) {\n if (x != null) {\n return x;\n }\n var error = new Error(message !== undefined ? message : 'Got unexpected ' + x);\n error.framesToPop = 1; // Skip nullthrows's own stack frame.\n throw error;\n}\n\nmodule.exports = nullthrows;\nmodule.exports.default = nullthrows;\n\nObject.defineProperty(module.exports, '__esModule', {value: true});\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar numberIsNaN = function (value) {\n\treturn value !== value;\n};\n\nmodule.exports = function is(a, b) {\n\tif (a === 0 && b === 0) {\n\t\treturn 1 / a === 1 / b;\n\t}\n\tif (a === b) {\n\t\treturn true;\n\t}\n\tif (numberIsNaN(a) && numberIsNaN(b)) {\n\t\treturn true;\n\t}\n\treturn false;\n};\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar polyfill = callBind(getPolyfill(), Object);\n\ndefine(polyfill, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = polyfill;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\treturn typeof Object.is === 'function' ? Object.is : implementation;\n};\n","'use strict';\n\nvar getPolyfill = require('./polyfill');\nvar define = require('define-properties');\n\nmodule.exports = function shimObjectIs() {\n\tvar polyfill = getPolyfill();\n\tdefine(Object, { is: polyfill }, {\n\t\tis: function testObjectIs() {\n\t\t\treturn Object.is !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","// 'path' module extracted from Node.js v8.11.1 (only the posix part)\n// transplited with Babel\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nfunction assertPath(path) {\n if (typeof path !== 'string') {\n throw new TypeError('Path must be a string. Received ' + JSON.stringify(path));\n }\n}\n\n// Resolves . and .. elements in a path with directory names\nfunction normalizeStringPosix(path, allowAboveRoot) {\n var res = '';\n var lastSegmentLength = 0;\n var lastSlash = -1;\n var dots = 0;\n var code;\n for (var i = 0; i <= path.length; ++i) {\n if (i < path.length)\n code = path.charCodeAt(i);\n else if (code === 47 /*/*/)\n break;\n else\n code = 47 /*/*/;\n if (code === 47 /*/*/) {\n if (lastSlash === i - 1 || dots === 1) {\n // NOOP\n } else if (lastSlash !== i - 1 && dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 /*.*/ || res.charCodeAt(res.length - 2) !== 46 /*.*/) {\n if (res.length > 2) {\n var lastSlashIndex = res.lastIndexOf('/');\n if (lastSlashIndex !== res.length - 1) {\n if (lastSlashIndex === -1) {\n res = '';\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf('/');\n }\n lastSlash = i;\n dots = 0;\n continue;\n }\n } else if (res.length === 2 || res.length === 1) {\n res = '';\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n if (res.length > 0)\n res += '/..';\n else\n res = '..';\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0)\n res += '/' + path.slice(lastSlash + 1, i);\n else\n res = path.slice(lastSlash + 1, i);\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n } else if (code === 46 /*.*/ && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\n\nfunction _format(sep, pathObject) {\n var dir = pathObject.dir || pathObject.root;\n var base = pathObject.base || (pathObject.name || '') + (pathObject.ext || '');\n if (!dir) {\n return base;\n }\n if (dir === pathObject.root) {\n return dir + base;\n }\n return dir + sep + base;\n}\n\nvar posix = {\n // path.resolve([from ...], to)\n resolve: function resolve() {\n var resolvedPath = '';\n var resolvedAbsolute = false;\n var cwd;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path;\n if (i >= 0)\n path = arguments[i];\n else {\n if (cwd === undefined)\n cwd = process.cwd();\n path = cwd;\n }\n\n assertPath(path);\n\n // Skip empty entries\n if (path.length === 0) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charCodeAt(0) === 47 /*/*/;\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);\n\n if (resolvedAbsolute) {\n if (resolvedPath.length > 0)\n return '/' + resolvedPath;\n else\n return '/';\n } else if (resolvedPath.length > 0) {\n return resolvedPath;\n } else {\n return '.';\n }\n },\n\n normalize: function normalize(path) {\n assertPath(path);\n\n if (path.length === 0) return '.';\n\n var isAbsolute = path.charCodeAt(0) === 47 /*/*/;\n var trailingSeparator = path.charCodeAt(path.length - 1) === 47 /*/*/;\n\n // Normalize the path\n path = normalizeStringPosix(path, !isAbsolute);\n\n if (path.length === 0 && !isAbsolute) path = '.';\n if (path.length > 0 && trailingSeparator) path += '/';\n\n if (isAbsolute) return '/' + path;\n return path;\n },\n\n isAbsolute: function isAbsolute(path) {\n assertPath(path);\n return path.length > 0 && path.charCodeAt(0) === 47 /*/*/;\n },\n\n join: function join() {\n if (arguments.length === 0)\n return '.';\n var joined;\n for (var i = 0; i < arguments.length; ++i) {\n var arg = arguments[i];\n assertPath(arg);\n if (arg.length > 0) {\n if (joined === undefined)\n joined = arg;\n else\n joined += '/' + arg;\n }\n }\n if (joined === undefined)\n return '.';\n return posix.normalize(joined);\n },\n\n relative: function relative(from, to) {\n assertPath(from);\n assertPath(to);\n\n if (from === to) return '';\n\n from = posix.resolve(from);\n to = posix.resolve(to);\n\n if (from === to) return '';\n\n // Trim any leading backslashes\n var fromStart = 1;\n for (; fromStart < from.length; ++fromStart) {\n if (from.charCodeAt(fromStart) !== 47 /*/*/)\n break;\n }\n var fromEnd = from.length;\n var fromLen = fromEnd - fromStart;\n\n // Trim any leading backslashes\n var toStart = 1;\n for (; toStart < to.length; ++toStart) {\n if (to.charCodeAt(toStart) !== 47 /*/*/)\n break;\n }\n var toEnd = to.length;\n var toLen = toEnd - toStart;\n\n // Compare paths to find the longest common path from root\n var length = fromLen < toLen ? fromLen : toLen;\n var lastCommonSep = -1;\n var i = 0;\n for (; i <= length; ++i) {\n if (i === length) {\n if (toLen > length) {\n if (to.charCodeAt(toStart + i) === 47 /*/*/) {\n // We get here if `from` is the exact base path for `to`.\n // For example: from='/foo/bar'; to='/foo/bar/baz'\n return to.slice(toStart + i + 1);\n } else if (i === 0) {\n // We get here if `from` is the root\n // For example: from='/'; to='/foo'\n return to.slice(toStart + i);\n }\n } else if (fromLen > length) {\n if (from.charCodeAt(fromStart + i) === 47 /*/*/) {\n // We get here if `to` is the exact base path for `from`.\n // For example: from='/foo/bar/baz'; to='/foo/bar'\n lastCommonSep = i;\n } else if (i === 0) {\n // We get here if `to` is the root.\n // For example: from='/foo'; to='/'\n lastCommonSep = 0;\n }\n }\n break;\n }\n var fromCode = from.charCodeAt(fromStart + i);\n var toCode = to.charCodeAt(toStart + i);\n if (fromCode !== toCode)\n break;\n else if (fromCode === 47 /*/*/)\n lastCommonSep = i;\n }\n\n var out = '';\n // Generate the relative path based on the path difference between `to`\n // and `from`\n for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\n if (i === fromEnd || from.charCodeAt(i) === 47 /*/*/) {\n if (out.length === 0)\n out += '..';\n else\n out += '/..';\n }\n }\n\n // Lastly, append the rest of the destination (`to`) path that comes after\n // the common path parts\n if (out.length > 0)\n return out + to.slice(toStart + lastCommonSep);\n else {\n toStart += lastCommonSep;\n if (to.charCodeAt(toStart) === 47 /*/*/)\n ++toStart;\n return to.slice(toStart);\n }\n },\n\n _makeLong: function _makeLong(path) {\n return path;\n },\n\n dirname: function dirname(path) {\n assertPath(path);\n if (path.length === 0) return '.';\n var code = path.charCodeAt(0);\n var hasRoot = code === 47 /*/*/;\n var end = -1;\n var matchedSlash = true;\n for (var i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n\n if (end === -1) return hasRoot ? '/' : '.';\n if (hasRoot && end === 1) return '//';\n return path.slice(0, end);\n },\n\n basename: function basename(path, ext) {\n if (ext !== undefined && typeof ext !== 'string') throw new TypeError('\"ext\" argument must be a string');\n assertPath(path);\n\n var start = 0;\n var end = -1;\n var matchedSlash = true;\n var i;\n\n if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {\n if (ext.length === path.length && ext === path) return '';\n var extIdx = ext.length - 1;\n var firstNonSlashEnd = -1;\n for (i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else {\n if (firstNonSlashEnd === -1) {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching\n matchedSlash = false;\n firstNonSlashEnd = i + 1;\n }\n if (extIdx >= 0) {\n // Try to match the explicit extension\n if (code === ext.charCodeAt(extIdx)) {\n if (--extIdx === -1) {\n // We matched the extension, so mark this as the end of our path\n // component\n end = i;\n }\n } else {\n // Extension does not match, so our result is the entire path\n // component\n extIdx = -1;\n end = firstNonSlashEnd;\n }\n }\n }\n }\n\n if (start === end) end = firstNonSlashEnd;else if (end === -1) end = path.length;\n return path.slice(start, end);\n } else {\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n\n if (end === -1) return '';\n return path.slice(start, end);\n }\n },\n\n extname: function extname(path) {\n assertPath(path);\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n for (var i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1)\n startDot = i;\n else if (preDotState !== 1)\n preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return '';\n }\n return path.slice(startDot, end);\n },\n\n format: function format(pathObject) {\n if (pathObject === null || typeof pathObject !== 'object') {\n throw new TypeError('The \"pathObject\" argument must be of type Object. Received type ' + typeof pathObject);\n }\n return _format('/', pathObject);\n },\n\n parse: function parse(path) {\n assertPath(path);\n\n var ret = { root: '', dir: '', base: '', ext: '', name: '' };\n if (path.length === 0) return ret;\n var code = path.charCodeAt(0);\n var isAbsolute = code === 47 /*/*/;\n var start;\n if (isAbsolute) {\n ret.root = '/';\n start = 1;\n } else {\n start = 0;\n }\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n var i = path.length - 1;\n\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n\n // Get non-dir info\n for (; i >= start; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n if (end !== -1) {\n if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);else ret.base = ret.name = path.slice(startPart, end);\n }\n } else {\n if (startPart === 0 && isAbsolute) {\n ret.name = path.slice(1, startDot);\n ret.base = path.slice(1, end);\n } else {\n ret.name = path.slice(startPart, startDot);\n ret.base = path.slice(startPart, end);\n }\n ret.ext = path.slice(startDot, end);\n }\n\n if (startPart > 0) ret.dir = path.slice(0, startPart - 1);else if (isAbsolute) ret.dir = '/';\n\n return ret;\n },\n\n sep: '/',\n delimiter: ':',\n win32: null,\n posix: null\n};\n\nposix.posix = posix;\n\nmodule.exports = posix;\n","var parse = require(\"./parse\");\nvar walk = require(\"./walk\");\nvar stringify = require(\"./stringify\");\n\nfunction ValueParser(value) {\n if (this instanceof ValueParser) {\n this.nodes = parse(value);\n return this;\n }\n return new ValueParser(value);\n}\n\nValueParser.prototype.toString = function() {\n return Array.isArray(this.nodes) ? stringify(this.nodes) : \"\";\n};\n\nValueParser.prototype.walk = function(cb, bubble) {\n walk(this.nodes, cb, bubble);\n return this;\n};\n\nValueParser.unit = require(\"./unit\");\n\nValueParser.walk = walk;\n\nValueParser.stringify = stringify;\n\nmodule.exports = ValueParser;\n","var openParentheses = \"(\".charCodeAt(0);\nvar closeParentheses = \")\".charCodeAt(0);\nvar singleQuote = \"'\".charCodeAt(0);\nvar doubleQuote = '\"'.charCodeAt(0);\nvar backslash = \"\\\\\".charCodeAt(0);\nvar slash = \"/\".charCodeAt(0);\nvar comma = \",\".charCodeAt(0);\nvar colon = \":\".charCodeAt(0);\nvar star = \"*\".charCodeAt(0);\nvar uLower = \"u\".charCodeAt(0);\nvar uUpper = \"U\".charCodeAt(0);\nvar plus = \"+\".charCodeAt(0);\nvar isUnicodeRange = /^[a-f0-9?-]+$/i;\n\nmodule.exports = function(input) {\n var tokens = [];\n var value = input;\n\n var next,\n quote,\n prev,\n token,\n escape,\n escapePos,\n whitespacePos,\n parenthesesOpenPos;\n var pos = 0;\n var code = value.charCodeAt(pos);\n var max = value.length;\n var stack = [{ nodes: tokens }];\n var balanced = 0;\n var parent;\n\n var name = \"\";\n var before = \"\";\n var after = \"\";\n\n while (pos < max) {\n // Whitespaces\n if (code <= 32) {\n next = pos;\n do {\n next += 1;\n code = value.charCodeAt(next);\n } while (code <= 32);\n token = value.slice(pos, next);\n\n prev = tokens[tokens.length - 1];\n if (code === closeParentheses && balanced) {\n after = token;\n } else if (prev && prev.type === \"div\") {\n prev.after = token;\n prev.sourceEndIndex += token.length;\n } else if (\n code === comma ||\n code === colon ||\n (code === slash &&\n value.charCodeAt(next + 1) !== star &&\n (!parent ||\n (parent && parent.type === \"function\" && parent.value !== \"calc\")))\n ) {\n before = token;\n } else {\n tokens.push({\n type: \"space\",\n sourceIndex: pos,\n sourceEndIndex: next,\n value: token\n });\n }\n\n pos = next;\n\n // Quotes\n } else if (code === singleQuote || code === doubleQuote) {\n next = pos;\n quote = code === singleQuote ? \"'\" : '\"';\n token = {\n type: \"string\",\n sourceIndex: pos,\n quote: quote\n };\n do {\n escape = false;\n next = value.indexOf(quote, next + 1);\n if (~next) {\n escapePos = next;\n while (value.charCodeAt(escapePos - 1) === backslash) {\n escapePos -= 1;\n escape = !escape;\n }\n } else {\n value += quote;\n next = value.length - 1;\n token.unclosed = true;\n }\n } while (escape);\n token.value = value.slice(pos + 1, next);\n token.sourceEndIndex = token.unclosed ? next : next + 1;\n tokens.push(token);\n pos = next + 1;\n code = value.charCodeAt(pos);\n\n // Comments\n } else if (code === slash && value.charCodeAt(pos + 1) === star) {\n next = value.indexOf(\"*/\", pos);\n\n token = {\n type: \"comment\",\n sourceIndex: pos,\n sourceEndIndex: next + 2\n };\n\n if (next === -1) {\n token.unclosed = true;\n next = value.length;\n token.sourceEndIndex = next;\n }\n\n token.value = value.slice(pos + 2, next);\n tokens.push(token);\n\n pos = next + 2;\n code = value.charCodeAt(pos);\n\n // Operation within calc\n } else if (\n (code === slash || code === star) &&\n parent &&\n parent.type === \"function\" &&\n parent.value === \"calc\"\n ) {\n token = value[pos];\n tokens.push({\n type: \"word\",\n sourceIndex: pos - before.length,\n sourceEndIndex: pos + token.length,\n value: token\n });\n pos += 1;\n code = value.charCodeAt(pos);\n\n // Dividers\n } else if (code === slash || code === comma || code === colon) {\n token = value[pos];\n\n tokens.push({\n type: \"div\",\n sourceIndex: pos - before.length,\n sourceEndIndex: pos + token.length,\n value: token,\n before: before,\n after: \"\"\n });\n before = \"\";\n\n pos += 1;\n code = value.charCodeAt(pos);\n\n // Open parentheses\n } else if (openParentheses === code) {\n // Whitespaces after open parentheses\n next = pos;\n do {\n next += 1;\n code = value.charCodeAt(next);\n } while (code <= 32);\n parenthesesOpenPos = pos;\n token = {\n type: \"function\",\n sourceIndex: pos - name.length,\n value: name,\n before: value.slice(parenthesesOpenPos + 1, next)\n };\n pos = next;\n\n if (name === \"url\" && code !== singleQuote && code !== doubleQuote) {\n next -= 1;\n do {\n escape = false;\n next = value.indexOf(\")\", next + 1);\n if (~next) {\n escapePos = next;\n while (value.charCodeAt(escapePos - 1) === backslash) {\n escapePos -= 1;\n escape = !escape;\n }\n } else {\n value += \")\";\n next = value.length - 1;\n token.unclosed = true;\n }\n } while (escape);\n // Whitespaces before closed\n whitespacePos = next;\n do {\n whitespacePos -= 1;\n code = value.charCodeAt(whitespacePos);\n } while (code <= 32);\n if (parenthesesOpenPos < whitespacePos) {\n if (pos !== whitespacePos + 1) {\n token.nodes = [\n {\n type: \"word\",\n sourceIndex: pos,\n sourceEndIndex: whitespacePos + 1,\n value: value.slice(pos, whitespacePos + 1)\n }\n ];\n } else {\n token.nodes = [];\n }\n if (token.unclosed && whitespacePos + 1 !== next) {\n token.after = \"\";\n token.nodes.push({\n type: \"space\",\n sourceIndex: whitespacePos + 1,\n sourceEndIndex: next,\n value: value.slice(whitespacePos + 1, next)\n });\n } else {\n token.after = value.slice(whitespacePos + 1, next);\n token.sourceEndIndex = next;\n }\n } else {\n token.after = \"\";\n token.nodes = [];\n }\n pos = next + 1;\n token.sourceEndIndex = token.unclosed ? next : pos;\n code = value.charCodeAt(pos);\n tokens.push(token);\n } else {\n balanced += 1;\n token.after = \"\";\n token.sourceEndIndex = pos + 1;\n tokens.push(token);\n stack.push(token);\n tokens = token.nodes = [];\n parent = token;\n }\n name = \"\";\n\n // Close parentheses\n } else if (closeParentheses === code && balanced) {\n pos += 1;\n code = value.charCodeAt(pos);\n\n parent.after = after;\n parent.sourceEndIndex += after.length;\n after = \"\";\n balanced -= 1;\n stack[stack.length - 1].sourceEndIndex = pos;\n stack.pop();\n parent = stack[balanced];\n tokens = parent.nodes;\n\n // Words\n } else {\n next = pos;\n do {\n if (code === backslash) {\n next += 1;\n }\n next += 1;\n code = value.charCodeAt(next);\n } while (\n next < max &&\n !(\n code <= 32 ||\n code === singleQuote ||\n code === doubleQuote ||\n code === comma ||\n code === colon ||\n code === slash ||\n code === openParentheses ||\n (code === star &&\n parent &&\n parent.type === \"function\" &&\n parent.value === \"calc\") ||\n (code === slash &&\n parent.type === \"function\" &&\n parent.value === \"calc\") ||\n (code === closeParentheses && balanced)\n )\n );\n token = value.slice(pos, next);\n\n if (openParentheses === code) {\n name = token;\n } else if (\n (uLower === token.charCodeAt(0) || uUpper === token.charCodeAt(0)) &&\n plus === token.charCodeAt(1) &&\n isUnicodeRange.test(token.slice(2))\n ) {\n tokens.push({\n type: \"unicode-range\",\n sourceIndex: pos,\n sourceEndIndex: next,\n value: token\n });\n } else {\n tokens.push({\n type: \"word\",\n sourceIndex: pos,\n sourceEndIndex: next,\n value: token\n });\n }\n\n pos = next;\n }\n }\n\n for (pos = stack.length - 1; pos; pos -= 1) {\n stack[pos].unclosed = true;\n stack[pos].sourceEndIndex = value.length;\n }\n\n return stack[0].nodes;\n};\n","function stringifyNode(node, custom) {\n var type = node.type;\n var value = node.value;\n var buf;\n var customResult;\n\n if (custom && (customResult = custom(node)) !== undefined) {\n return customResult;\n } else if (type === \"word\" || type === \"space\") {\n return value;\n } else if (type === \"string\") {\n buf = node.quote || \"\";\n return buf + value + (node.unclosed ? \"\" : buf);\n } else if (type === \"comment\") {\n return \"/*\" + value + (node.unclosed ? \"\" : \"*/\");\n } else if (type === \"div\") {\n return (node.before || \"\") + value + (node.after || \"\");\n } else if (Array.isArray(node.nodes)) {\n buf = stringify(node.nodes, custom);\n if (type !== \"function\") {\n return buf;\n }\n return (\n value +\n \"(\" +\n (node.before || \"\") +\n buf +\n (node.after || \"\") +\n (node.unclosed ? \"\" : \")\")\n );\n }\n return value;\n}\n\nfunction stringify(nodes, custom) {\n var result, i;\n\n if (Array.isArray(nodes)) {\n result = \"\";\n for (i = nodes.length - 1; ~i; i -= 1) {\n result = stringifyNode(nodes[i], custom) + result;\n }\n return result;\n }\n return stringifyNode(nodes, custom);\n}\n\nmodule.exports = stringify;\n","var minus = \"-\".charCodeAt(0);\nvar plus = \"+\".charCodeAt(0);\nvar dot = \".\".charCodeAt(0);\nvar exp = \"e\".charCodeAt(0);\nvar EXP = \"E\".charCodeAt(0);\n\n// Check if three code points would start a number\n// https://www.w3.org/TR/css-syntax-3/#starts-with-a-number\nfunction likeNumber(value) {\n var code = value.charCodeAt(0);\n var nextCode;\n\n if (code === plus || code === minus) {\n nextCode = value.charCodeAt(1);\n\n if (nextCode >= 48 && nextCode <= 57) {\n return true;\n }\n\n var nextNextCode = value.charCodeAt(2);\n\n if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) {\n return true;\n }\n\n return false;\n }\n\n if (code === dot) {\n nextCode = value.charCodeAt(1);\n\n if (nextCode >= 48 && nextCode <= 57) {\n return true;\n }\n\n return false;\n }\n\n if (code >= 48 && code <= 57) {\n return true;\n }\n\n return false;\n}\n\n// Consume a number\n// https://www.w3.org/TR/css-syntax-3/#consume-number\nmodule.exports = function(value) {\n var pos = 0;\n var length = value.length;\n var code;\n var nextCode;\n var nextNextCode;\n\n if (length === 0 || !likeNumber(value)) {\n return false;\n }\n\n code = value.charCodeAt(pos);\n\n if (code === plus || code === minus) {\n pos++;\n }\n\n while (pos < length) {\n code = value.charCodeAt(pos);\n\n if (code < 48 || code > 57) {\n break;\n }\n\n pos += 1;\n }\n\n code = value.charCodeAt(pos);\n nextCode = value.charCodeAt(pos + 1);\n\n if (code === dot && nextCode >= 48 && nextCode <= 57) {\n pos += 2;\n\n while (pos < length) {\n code = value.charCodeAt(pos);\n\n if (code < 48 || code > 57) {\n break;\n }\n\n pos += 1;\n }\n }\n\n code = value.charCodeAt(pos);\n nextCode = value.charCodeAt(pos + 1);\n nextNextCode = value.charCodeAt(pos + 2);\n\n if (\n (code === exp || code === EXP) &&\n ((nextCode >= 48 && nextCode <= 57) ||\n ((nextCode === plus || nextCode === minus) &&\n nextNextCode >= 48 &&\n nextNextCode <= 57))\n ) {\n pos += nextCode === plus || nextCode === minus ? 3 : 2;\n\n while (pos < length) {\n code = value.charCodeAt(pos);\n\n if (code < 48 || code > 57) {\n break;\n }\n\n pos += 1;\n }\n }\n\n return {\n number: value.slice(0, pos),\n unit: value.slice(pos)\n };\n};\n","module.exports = function walk(nodes, cb, bubble) {\n var i, max, node, result;\n\n for (i = 0, max = nodes.length; i < max; i += 1) {\n node = nodes[i];\n if (!bubble) {\n result = cb(node, i, nodes);\n }\n\n if (\n result !== false &&\n node.type === \"function\" &&\n Array.isArray(node.nodes)\n ) {\n walk(node.nodes, cb, bubble);\n }\n\n if (bubble) {\n cb(node, i, nodes);\n }\n }\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","'use strict';\n\nvar replace = String.prototype.replace;\nvar percentTwenties = /%20/g;\n\nvar Format = {\n RFC1738: 'RFC1738',\n RFC3986: 'RFC3986'\n};\n\nmodule.exports = {\n 'default': Format.RFC3986,\n formatters: {\n RFC1738: function (value) {\n return replace.call(value, percentTwenties, '+');\n },\n RFC3986: function (value) {\n return String(value);\n }\n },\n RFC1738: Format.RFC1738,\n RFC3986: Format.RFC3986\n};\n","'use strict';\n\nvar stringify = require('./stringify');\nvar parse = require('./parse');\nvar formats = require('./formats');\n\nmodule.exports = {\n formats: formats,\n parse: parse,\n stringify: stringify\n};\n","'use strict';\n\nvar utils = require('./utils');\n\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\n\nvar defaults = {\n allowDots: false,\n allowPrototypes: false,\n allowSparse: false,\n arrayLimit: 20,\n charset: 'utf-8',\n charsetSentinel: false,\n comma: false,\n decoder: utils.decode,\n delimiter: '&',\n depth: 5,\n ignoreQueryPrefix: false,\n interpretNumericEntities: false,\n parameterLimit: 1000,\n parseArrays: true,\n plainObjects: false,\n strictNullHandling: false\n};\n\nvar interpretNumericEntities = function (str) {\n return str.replace(/&#(\\d+);/g, function ($0, numberStr) {\n return String.fromCharCode(parseInt(numberStr, 10));\n });\n};\n\nvar parseArrayValue = function (val, options) {\n if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {\n return val.split(',');\n }\n\n return val;\n};\n\n// This is what browsers will submit when the ✓ character occurs in an\n// application/x-www-form-urlencoded body and the encoding of the page containing\n// the form is iso-8859-1, or when the submitted form has an accept-charset\n// attribute of iso-8859-1. Presumably also with other charsets that do not contain\n// the ✓ character, such as us-ascii.\nvar isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓')\n\n// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.\nvar charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')\n\nvar parseValues = function parseQueryStringValues(str, options) {\n var obj = { __proto__: null };\n\n var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\\?/, '') : str;\n var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;\n var parts = cleanStr.split(options.delimiter, limit);\n var skipIndex = -1; // Keep track of where the utf8 sentinel was found\n var i;\n\n var charset = options.charset;\n if (options.charsetSentinel) {\n for (i = 0; i < parts.length; ++i) {\n if (parts[i].indexOf('utf8=') === 0) {\n if (parts[i] === charsetSentinel) {\n charset = 'utf-8';\n } else if (parts[i] === isoSentinel) {\n charset = 'iso-8859-1';\n }\n skipIndex = i;\n i = parts.length; // The eslint settings do not allow break;\n }\n }\n }\n\n for (i = 0; i < parts.length; ++i) {\n if (i === skipIndex) {\n continue;\n }\n var part = parts[i];\n\n var bracketEqualsPos = part.indexOf(']=');\n var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;\n\n var key, val;\n if (pos === -1) {\n key = options.decoder(part, defaults.decoder, charset, 'key');\n val = options.strictNullHandling ? null : '';\n } else {\n key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');\n val = utils.maybeMap(\n parseArrayValue(part.slice(pos + 1), options),\n function (encodedVal) {\n return options.decoder(encodedVal, defaults.decoder, charset, 'value');\n }\n );\n }\n\n if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {\n val = interpretNumericEntities(val);\n }\n\n if (part.indexOf('[]=') > -1) {\n val = isArray(val) ? [val] : val;\n }\n\n if (has.call(obj, key)) {\n obj[key] = utils.combine(obj[key], val);\n } else {\n obj[key] = val;\n }\n }\n\n return obj;\n};\n\nvar parseObject = function (chain, val, options, valuesParsed) {\n var leaf = valuesParsed ? val : parseArrayValue(val, options);\n\n for (var i = chain.length - 1; i >= 0; --i) {\n var obj;\n var root = chain[i];\n\n if (root === '[]' && options.parseArrays) {\n obj = [].concat(leaf);\n } else {\n obj = options.plainObjects ? Object.create(null) : {};\n var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;\n var index = parseInt(cleanRoot, 10);\n if (!options.parseArrays && cleanRoot === '') {\n obj = { 0: leaf };\n } else if (\n !isNaN(index)\n && root !== cleanRoot\n && String(index) === cleanRoot\n && index >= 0\n && (options.parseArrays && index <= options.arrayLimit)\n ) {\n obj = [];\n obj[index] = leaf;\n } else if (cleanRoot !== '__proto__') {\n obj[cleanRoot] = leaf;\n }\n }\n\n leaf = obj;\n }\n\n return leaf;\n};\n\nvar parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {\n if (!givenKey) {\n return;\n }\n\n // Transform dot notation to bracket notation\n var key = options.allowDots ? givenKey.replace(/\\.([^.[]+)/g, '[$1]') : givenKey;\n\n // The regex chunks\n\n var brackets = /(\\[[^[\\]]*])/;\n var child = /(\\[[^[\\]]*])/g;\n\n // Get the parent\n\n var segment = options.depth > 0 && brackets.exec(key);\n var parent = segment ? key.slice(0, segment.index) : key;\n\n // Stash the parent if it exists\n\n var keys = [];\n if (parent) {\n // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties\n if (!options.plainObjects && has.call(Object.prototype, parent)) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n\n keys.push(parent);\n }\n\n // Loop through children appending to the array until we hit depth\n\n var i = 0;\n while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {\n i += 1;\n if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n keys.push(segment[1]);\n }\n\n // If there's a remainder, just add whatever is left\n\n if (segment) {\n keys.push('[' + key.slice(segment.index) + ']');\n }\n\n return parseObject(keys, val, options, valuesParsed);\n};\n\nvar normalizeParseOptions = function normalizeParseOptions(opts) {\n if (!opts) {\n return defaults;\n }\n\n if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {\n throw new TypeError('Decoder has to be a function.');\n }\n\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;\n\n return {\n allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,\n allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,\n allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,\n arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,\n decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,\n delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,\n // eslint-disable-next-line no-implicit-coercion, no-extra-parens\n depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,\n ignoreQueryPrefix: opts.ignoreQueryPrefix === true,\n interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,\n parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,\n parseArrays: opts.parseArrays !== false,\n plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n };\n};\n\nmodule.exports = function (str, opts) {\n var options = normalizeParseOptions(opts);\n\n if (str === '' || str === null || typeof str === 'undefined') {\n return options.plainObjects ? Object.create(null) : {};\n }\n\n var tempObj = typeof str === 'string' ? parseValues(str, options) : str;\n var obj = options.plainObjects ? Object.create(null) : {};\n\n // Iterate over the keys and setup the new object\n\n var keys = Object.keys(tempObj);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');\n obj = utils.merge(obj, newObj, options);\n }\n\n if (options.allowSparse === true) {\n return obj;\n }\n\n return utils.compact(obj);\n};\n","'use strict';\n\nvar getSideChannel = require('side-channel');\nvar utils = require('./utils');\nvar formats = require('./formats');\nvar has = Object.prototype.hasOwnProperty;\n\nvar arrayPrefixGenerators = {\n brackets: function brackets(prefix) {\n return prefix + '[]';\n },\n comma: 'comma',\n indices: function indices(prefix, key) {\n return prefix + '[' + key + ']';\n },\n repeat: function repeat(prefix) {\n return prefix;\n }\n};\n\nvar isArray = Array.isArray;\nvar push = Array.prototype.push;\nvar pushToArray = function (arr, valueOrArray) {\n push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);\n};\n\nvar toISO = Date.prototype.toISOString;\n\nvar defaultFormat = formats['default'];\nvar defaults = {\n addQueryPrefix: false,\n allowDots: false,\n charset: 'utf-8',\n charsetSentinel: false,\n delimiter: '&',\n encode: true,\n encoder: utils.encode,\n encodeValuesOnly: false,\n format: defaultFormat,\n formatter: formats.formatters[defaultFormat],\n // deprecated\n indices: false,\n serializeDate: function serializeDate(date) {\n return toISO.call(date);\n },\n skipNulls: false,\n strictNullHandling: false\n};\n\nvar isNonNullishPrimitive = function isNonNullishPrimitive(v) {\n return typeof v === 'string'\n || typeof v === 'number'\n || typeof v === 'boolean'\n || typeof v === 'symbol'\n || typeof v === 'bigint';\n};\n\nvar sentinel = {};\n\nvar stringify = function stringify(\n object,\n prefix,\n generateArrayPrefix,\n commaRoundTrip,\n strictNullHandling,\n skipNulls,\n encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n format,\n formatter,\n encodeValuesOnly,\n charset,\n sideChannel\n) {\n var obj = object;\n\n var tmpSc = sideChannel;\n var step = 0;\n var findFlag = false;\n while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {\n // Where object last appeared in the ref tree\n var pos = tmpSc.get(object);\n step += 1;\n if (typeof pos !== 'undefined') {\n if (pos === step) {\n throw new RangeError('Cyclic object value');\n } else {\n findFlag = true; // Break while\n }\n }\n if (typeof tmpSc.get(sentinel) === 'undefined') {\n step = 0;\n }\n }\n\n if (typeof filter === 'function') {\n obj = filter(prefix, obj);\n } else if (obj instanceof Date) {\n obj = serializeDate(obj);\n } else if (generateArrayPrefix === 'comma' && isArray(obj)) {\n obj = utils.maybeMap(obj, function (value) {\n if (value instanceof Date) {\n return serializeDate(value);\n }\n return value;\n });\n }\n\n if (obj === null) {\n if (strictNullHandling) {\n return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;\n }\n\n obj = '';\n }\n\n if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {\n if (encoder) {\n var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);\n return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];\n }\n return [formatter(prefix) + '=' + formatter(String(obj))];\n }\n\n var values = [];\n\n if (typeof obj === 'undefined') {\n return values;\n }\n\n var objKeys;\n if (generateArrayPrefix === 'comma' && isArray(obj)) {\n // we need to join elements in\n if (encodeValuesOnly && encoder) {\n obj = utils.maybeMap(obj, encoder);\n }\n objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];\n } else if (isArray(filter)) {\n objKeys = filter;\n } else {\n var keys = Object.keys(obj);\n objKeys = sort ? keys.sort(sort) : keys;\n }\n\n var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + '[]' : prefix;\n\n for (var j = 0; j < objKeys.length; ++j) {\n var key = objKeys[j];\n var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];\n\n if (skipNulls && value === null) {\n continue;\n }\n\n var keyPrefix = isArray(obj)\n ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix\n : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');\n\n sideChannel.set(object, step);\n var valueSideChannel = getSideChannel();\n valueSideChannel.set(sentinel, sideChannel);\n pushToArray(values, stringify(\n value,\n keyPrefix,\n generateArrayPrefix,\n commaRoundTrip,\n strictNullHandling,\n skipNulls,\n generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n format,\n formatter,\n encodeValuesOnly,\n charset,\n valueSideChannel\n ));\n }\n\n return values;\n};\n\nvar normalizeStringifyOptions = function normalizeStringifyOptions(opts) {\n if (!opts) {\n return defaults;\n }\n\n if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {\n throw new TypeError('Encoder has to be a function.');\n }\n\n var charset = opts.charset || defaults.charset;\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n\n var format = formats['default'];\n if (typeof opts.format !== 'undefined') {\n if (!has.call(formats.formatters, opts.format)) {\n throw new TypeError('Unknown format option provided.');\n }\n format = opts.format;\n }\n var formatter = formats.formatters[format];\n\n var filter = defaults.filter;\n if (typeof opts.filter === 'function' || isArray(opts.filter)) {\n filter = opts.filter;\n }\n\n return {\n addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,\n allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,\n encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,\n encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,\n encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,\n filter: filter,\n format: format,\n formatter: formatter,\n serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,\n skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,\n sort: typeof opts.sort === 'function' ? opts.sort : null,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n };\n};\n\nmodule.exports = function (object, opts) {\n var obj = object;\n var options = normalizeStringifyOptions(opts);\n\n var objKeys;\n var filter;\n\n if (typeof options.filter === 'function') {\n filter = options.filter;\n obj = filter('', obj);\n } else if (isArray(options.filter)) {\n filter = options.filter;\n objKeys = filter;\n }\n\n var keys = [];\n\n if (typeof obj !== 'object' || obj === null) {\n return '';\n }\n\n var arrayFormat;\n if (opts && opts.arrayFormat in arrayPrefixGenerators) {\n arrayFormat = opts.arrayFormat;\n } else if (opts && 'indices' in opts) {\n arrayFormat = opts.indices ? 'indices' : 'repeat';\n } else {\n arrayFormat = 'indices';\n }\n\n var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];\n if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {\n throw new TypeError('`commaRoundTrip` must be a boolean, or absent');\n }\n var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;\n\n if (!objKeys) {\n objKeys = Object.keys(obj);\n }\n\n if (options.sort) {\n objKeys.sort(options.sort);\n }\n\n var sideChannel = getSideChannel();\n for (var i = 0; i < objKeys.length; ++i) {\n var key = objKeys[i];\n\n if (options.skipNulls && obj[key] === null) {\n continue;\n }\n pushToArray(keys, stringify(\n obj[key],\n key,\n generateArrayPrefix,\n commaRoundTrip,\n options.strictNullHandling,\n options.skipNulls,\n options.encode ? options.encoder : null,\n options.filter,\n options.sort,\n options.allowDots,\n options.serializeDate,\n options.format,\n options.formatter,\n options.encodeValuesOnly,\n options.charset,\n sideChannel\n ));\n }\n\n var joined = keys.join(options.delimiter);\n var prefix = options.addQueryPrefix === true ? '?' : '';\n\n if (options.charsetSentinel) {\n if (options.charset === 'iso-8859-1') {\n // encodeURIComponent('✓'), the \"numeric entity\" representation of a checkmark\n prefix += 'utf8=%26%2310003%3B&';\n } else {\n // encodeURIComponent('✓')\n prefix += 'utf8=%E2%9C%93&';\n }\n }\n\n return joined.length > 0 ? prefix + joined : '';\n};\n","'use strict';\n\nvar formats = require('./formats');\n\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\n\nvar hexTable = (function () {\n var array = [];\n for (var i = 0; i < 256; ++i) {\n array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());\n }\n\n return array;\n}());\n\nvar compactQueue = function compactQueue(queue) {\n while (queue.length > 1) {\n var item = queue.pop();\n var obj = item.obj[item.prop];\n\n if (isArray(obj)) {\n var compacted = [];\n\n for (var j = 0; j < obj.length; ++j) {\n if (typeof obj[j] !== 'undefined') {\n compacted.push(obj[j]);\n }\n }\n\n item.obj[item.prop] = compacted;\n }\n }\n};\n\nvar arrayToObject = function arrayToObject(source, options) {\n var obj = options && options.plainObjects ? Object.create(null) : {};\n for (var i = 0; i < source.length; ++i) {\n if (typeof source[i] !== 'undefined') {\n obj[i] = source[i];\n }\n }\n\n return obj;\n};\n\nvar merge = function merge(target, source, options) {\n /* eslint no-param-reassign: 0 */\n if (!source) {\n return target;\n }\n\n if (typeof source !== 'object') {\n if (isArray(target)) {\n target.push(source);\n } else if (target && typeof target === 'object') {\n if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {\n target[source] = true;\n }\n } else {\n return [target, source];\n }\n\n return target;\n }\n\n if (!target || typeof target !== 'object') {\n return [target].concat(source);\n }\n\n var mergeTarget = target;\n if (isArray(target) && !isArray(source)) {\n mergeTarget = arrayToObject(target, options);\n }\n\n if (isArray(target) && isArray(source)) {\n source.forEach(function (item, i) {\n if (has.call(target, i)) {\n var targetItem = target[i];\n if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {\n target[i] = merge(targetItem, item, options);\n } else {\n target.push(item);\n }\n } else {\n target[i] = item;\n }\n });\n return target;\n }\n\n return Object.keys(source).reduce(function (acc, key) {\n var value = source[key];\n\n if (has.call(acc, key)) {\n acc[key] = merge(acc[key], value, options);\n } else {\n acc[key] = value;\n }\n return acc;\n }, mergeTarget);\n};\n\nvar assign = function assignSingleSource(target, source) {\n return Object.keys(source).reduce(function (acc, key) {\n acc[key] = source[key];\n return acc;\n }, target);\n};\n\nvar decode = function (str, decoder, charset) {\n var strWithoutPlus = str.replace(/\\+/g, ' ');\n if (charset === 'iso-8859-1') {\n // unescape never throws, no try...catch needed:\n return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);\n }\n // utf-8\n try {\n return decodeURIComponent(strWithoutPlus);\n } catch (e) {\n return strWithoutPlus;\n }\n};\n\nvar encode = function encode(str, defaultEncoder, charset, kind, format) {\n // This code was originally written by Brian White (mscdex) for the io.js core querystring library.\n // It has been adapted here for stricter adherence to RFC 3986\n if (str.length === 0) {\n return str;\n }\n\n var string = str;\n if (typeof str === 'symbol') {\n string = Symbol.prototype.toString.call(str);\n } else if (typeof str !== 'string') {\n string = String(str);\n }\n\n if (charset === 'iso-8859-1') {\n return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {\n return '%26%23' + parseInt($0.slice(2), 16) + '%3B';\n });\n }\n\n var out = '';\n for (var i = 0; i < string.length; ++i) {\n var c = string.charCodeAt(i);\n\n if (\n c === 0x2D // -\n || c === 0x2E // .\n || c === 0x5F // _\n || c === 0x7E // ~\n || (c >= 0x30 && c <= 0x39) // 0-9\n || (c >= 0x41 && c <= 0x5A) // a-z\n || (c >= 0x61 && c <= 0x7A) // A-Z\n || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )\n ) {\n out += string.charAt(i);\n continue;\n }\n\n if (c < 0x80) {\n out = out + hexTable[c];\n continue;\n }\n\n if (c < 0x800) {\n out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);\n continue;\n }\n\n if (c < 0xD800 || c >= 0xE000) {\n out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);\n continue;\n }\n\n i += 1;\n c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));\n /* eslint operator-linebreak: [2, \"before\"] */\n out += hexTable[0xF0 | (c >> 18)]\n + hexTable[0x80 | ((c >> 12) & 0x3F)]\n + hexTable[0x80 | ((c >> 6) & 0x3F)]\n + hexTable[0x80 | (c & 0x3F)];\n }\n\n return out;\n};\n\nvar compact = function compact(value) {\n var queue = [{ obj: { o: value }, prop: 'o' }];\n var refs = [];\n\n for (var i = 0; i < queue.length; ++i) {\n var item = queue[i];\n var obj = item.obj[item.prop];\n\n var keys = Object.keys(obj);\n for (var j = 0; j < keys.length; ++j) {\n var key = keys[j];\n var val = obj[key];\n if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {\n queue.push({ obj: obj, prop: key });\n refs.push(val);\n }\n }\n }\n\n compactQueue(queue);\n\n return value;\n};\n\nvar isRegExp = function isRegExp(obj) {\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n};\n\nvar isBuffer = function isBuffer(obj) {\n if (!obj || typeof obj !== 'object') {\n return false;\n }\n\n return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));\n};\n\nvar combine = function combine(a, b) {\n return [].concat(a, b);\n};\n\nvar maybeMap = function maybeMap(val, fn) {\n if (isArray(val)) {\n var mapped = [];\n for (var i = 0; i < val.length; i += 1) {\n mapped.push(fn(val[i]));\n }\n return mapped;\n }\n return fn(val);\n};\n\nmodule.exports = {\n arrayToObject: arrayToObject,\n assign: assign,\n combine: combine,\n compact: compact,\n decode: decode,\n encode: encode,\n isBuffer: isBuffer,\n isRegExp: isRegExp,\n maybeMap: maybeMap,\n merge: merge\n};\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , undef;\n\n/**\n * Decode a URI encoded string.\n *\n * @param {String} input The URI encoded string.\n * @returns {String|Null} The decoded string.\n * @api private\n */\nfunction decode(input) {\n try {\n return decodeURIComponent(input.replace(/\\+/g, ' '));\n } catch (e) {\n return null;\n }\n}\n\n/**\n * Attempts to encode a given input.\n *\n * @param {String} input The string that needs to be encoded.\n * @returns {String|Null} The encoded string.\n * @api private\n */\nfunction encode(input) {\n try {\n return encodeURIComponent(input);\n } catch (e) {\n return null;\n }\n}\n\n/**\n * Simple query string parser.\n *\n * @param {String} query The query string that needs to be parsed.\n * @returns {Object}\n * @api public\n */\nfunction querystring(query) {\n var parser = /([^=?#&]+)=?([^&]*)/g\n , result = {}\n , part;\n\n while (part = parser.exec(query)) {\n var key = decode(part[1])\n , value = decode(part[2]);\n\n //\n // Prevent overriding of existing properties. This ensures that build-in\n // methods like `toString` or __proto__ are not overriden by malicious\n // querystrings.\n //\n // In the case if failed decoding, we want to omit the key/value pairs\n // from the result.\n //\n if (key === null || value === null || key in result) continue;\n result[key] = value;\n }\n\n return result;\n}\n\n/**\n * Transform a query string to an object.\n *\n * @param {Object} obj Object that should be transformed.\n * @param {String} prefix Optional prefix.\n * @returns {String}\n * @api public\n */\nfunction querystringify(obj, prefix) {\n prefix = prefix || '';\n\n var pairs = []\n , value\n , key;\n\n //\n // Optionally prefix with a '?' if needed\n //\n if ('string' !== typeof prefix) prefix = '?';\n\n for (key in obj) {\n if (has.call(obj, key)) {\n value = obj[key];\n\n //\n // Edge cases where we actually want to encode the value to an empty\n // string instead of the stringified value.\n //\n if (!value && (value === null || value === undef || isNaN(value))) {\n value = '';\n }\n\n key = encode(key);\n value = encode(value);\n\n //\n // If we failed to encode the strings, we should bail out as we don't\n // want to add invalid strings to the query.\n //\n if (key === null || value === null) continue;\n pairs.push(key +'='+ value);\n }\n }\n\n return pairs.length ? prefix + pairs.join('&') : '';\n}\n\n//\n// Expose the module.\n//\nexports.stringify = querystringify;\nexports.parse = querystring;\n","/**\n * @license React\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n'use strict';var aa=require(\"react\"),ca=require(\"scheduler\");function p(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cb}return!1}function v(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var z={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){z[a]=new v(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];z[b]=new v(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){z[a]=new v(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){z[a]=new v(a,2,!1,a,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){z[a]=new v(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){z[a]=new v(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){z[a]=new v(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){z[a]=new v(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){z[a]=new v(a,5,!1,a.toLowerCase(),null,!1,!1)});var ra=/[\\-:]([a-z])/g;function sa(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(ra,\nsa);z[b]=new v(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!1,!1)});\nz.xlinkHref=new v(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction ta(a,b,c,d){var e=z.hasOwnProperty(b)?z[b]:null;if(null!==e?0!==e.type:d||!(2h||e[g]!==f[h]){var k=\"\\n\"+e[g].replace(\" at new \",\" at \");a.displayName&&k.includes(\"\")&&(k=k.replace(\"\",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{Na=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?Ma(a):\"\"}\nfunction Pa(a){switch(a.tag){case 5:return Ma(a.type);case 16:return Ma(\"Lazy\");case 13:return Ma(\"Suspense\");case 19:return Ma(\"SuspenseList\");case 0:case 2:case 15:return a=Oa(a.type,!1),a;case 11:return a=Oa(a.type.render,!1),a;case 1:return a=Oa(a.type,!0),a;default:return\"\"}}\nfunction Qa(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ya:return\"Fragment\";case wa:return\"Portal\";case Aa:return\"Profiler\";case za:return\"StrictMode\";case Ea:return\"Suspense\";case Fa:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case Ca:return(a.displayName||\"Context\")+\".Consumer\";case Ba:return(a._context.displayName||\"Context\")+\".Provider\";case Da:var b=a.render;a=a.displayName;a||(a=b.displayName||\nb.name||\"\",a=\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");return a;case Ga:return b=a.displayName||null,null!==b?b:Qa(a.type)||\"Memo\";case Ha:b=a._payload;a=a._init;try{return Qa(a(b))}catch(c){}}return null}\nfunction Ra(a){var b=a.type;switch(a.tag){case 24:return\"Cache\";case 9:return(b.displayName||\"Context\")+\".Consumer\";case 10:return(b._context.displayName||\"Context\")+\".Provider\";case 18:return\"DehydratedFragment\";case 11:return a=b.render,a=a.displayName||a.name||\"\",b.displayName||(\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");case 7:return\"Fragment\";case 5:return b;case 4:return\"Portal\";case 3:return\"Root\";case 6:return\"Text\";case 16:return Qa(b);case 8:return b===za?\"StrictMode\":\"Mode\";case 22:return\"Offscreen\";\ncase 12:return\"Profiler\";case 21:return\"Scope\";case 13:return\"Suspense\";case 19:return\"SuspenseList\";case 25:return\"TracingMarker\";case 1:case 0:case 17:case 2:case 14:case 15:if(\"function\"===typeof b)return b.displayName||b.name||null;if(\"string\"===typeof b)return b}return null}function Sa(a){switch(typeof a){case \"boolean\":case \"number\":case \"string\":case \"undefined\":return a;case \"object\":return a;default:return\"\"}}\nfunction Ta(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction Ua(a){var b=Ta(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=Ta(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return A({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function ab(a,b){b=b.checked;null!=b&&ta(a,\"checked\",b,!1)}\nfunction bb(a,b){ab(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?cb(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&cb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction db(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction cb(a,b,c){if(\"number\"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}var eb=Array.isArray;\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e\"+b.valueOf().toString()+\"\";for(b=mb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction ob(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar pb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,\nzoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(pb).forEach(function(a){qb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);pb[b]=pb[a]})});function rb(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||pb.hasOwnProperty(a)&&pb[a]?(\"\"+b).trim():b+\"px\"}\nfunction sb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=rb(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var tb=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction ub(a,b){if(b){if(tb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(p(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(p(60));if(\"object\"!==typeof b.dangerouslySetInnerHTML||!(\"__html\"in b.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(p(62));}}\nfunction vb(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}var wb=null;function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if(\"function\"!==typeof yb)throw Error(p(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a>>=0;return 0===a?32:31-(pc(a)/qc|0)|0}var rc=64,sc=4194304;\nfunction tc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;\ndefault:return a}}function uc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=tc(h):(f&=g,0!==f&&(d=tc(f)))}else g=c&~e,0!==g?d=tc(g):0!==f&&(d=tc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0c;c++)b.push(a);return b}\nfunction Ac(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-oc(b);a[b]=c}function Bc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case \"keyup\":return-1!==$d.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case \"compositionend\":return he(b);case \"keypress\":if(32!==b.which)return null;fe=!0;return ee;case \"textInput\":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return\"compositionend\"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Je(c)}}function Le(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Le(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Me(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nfunction Oe(a){var b=Me(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Le(c.ownerDocument.documentElement,c)){if(null!==d&&Ne(c))if(b=d.start,a=d.end,void 0===a&&(a=b),\"selectionStart\"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Ke(c,f);var g=Ke(c,\nd);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});\"function\"===typeof c.focus&&c.focus();for(c=0;c=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,\"selectionStart\"in d&&Ne(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Ie(Se,d)||(Se=d,d=oe(Re,\"onSelect\"),0Tf||(a.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G(a,b){Tf++;Sf[Tf]=a.current;a.current=b}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(a,b){var c=a.type.contextTypes;if(!c)return Vf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}\nfunction Zf(a){a=a.childContextTypes;return null!==a&&void 0!==a}function $f(){E(Wf);E(H)}function ag(a,b,c){if(H.current!==Vf)throw Error(p(168));G(H,b);G(Wf,c)}function bg(a,b,c){var d=a.stateNode;b=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(p(108,Ra(a)||\"Unknown\",e));return A({},c,d)}\nfunction cg(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Vf;Xf=H.current;G(H,a);G(Wf,Wf.current);return!0}function dg(a,b,c){var d=a.stateNode;if(!d)throw Error(p(169));c?(a=bg(a,b,Xf),d.__reactInternalMemoizedMergedChildContext=a,E(Wf),E(H),G(H,a)):E(Wf);G(Wf,c)}var eg=null,fg=!1,gg=!1;function hg(a){null===eg?eg=[a]:eg.push(a)}function ig(a){fg=!0;hg(a)}\nfunction jg(){if(!gg&&null!==eg){gg=!0;var a=0,b=C;try{var c=eg;for(C=1;a>=g;e-=g;rg=1<<32-oc(b)+e|c<w?(x=u,u=null):x=u.sibling;var n=r(e,u,h[w],k);if(null===n){null===u&&(u=x);break}a&&u&&null===n.alternate&&b(e,u);g=f(n,g,w);null===m?l=n:m.sibling=n;m=n;u=x}if(w===h.length)return c(e,u),I&&tg(e,w),l;if(null===u){for(;ww?(x=m,m=null):x=m.sibling;var t=r(e,m,n.value,k);if(null===t){null===m&&(m=x);break}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,w);null===u?l=t:u.sibling=t;u=t;m=x}if(n.done)return c(e,\nm),I&&tg(e,w),l;if(null===m){for(;!n.done;w++,n=h.next())n=q(e,n.value,k),null!==n&&(g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);I&&tg(e,w);return l}for(m=d(e,m);!n.done;w++,n=h.next())n=y(m,e,w,n.value,k),null!==n&&(a&&null!==n.alternate&&m.delete(null===n.key?w:n.key),g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);a&&m.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function J(a,d,f,h){\"object\"===typeof f&&null!==f&&f.type===ya&&null===f.key&&(f=f.props.children);if(\"object\"===typeof f&&null!==f){switch(f.$$typeof){case va:a:{for(var k=\nf.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ya){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||\"object\"===typeof k&&null!==k&&k.$$typeof===Ha&&uh(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=sh(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===ya?(d=Ah(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=yh(f.type,f.key,f.props,null,a.mode,h),h.ref=sh(a,d,f),h.return=a,a=h)}return g(a);case wa:a:{for(l=f.key;null!==\nd;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=zh(f,a.mode,h);d.return=a;a=d}return g(a);case Ha:return l=f._init,J(a,d,l(f._payload),h)}if(eb(f))return n(a,d,f,h);if(Ka(f))return t(a,d,f,h);th(a,f)}return\"string\"===typeof f&&\"\"!==f||\"number\"===typeof f?(f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):\n(c(a,d),d=xh(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return J}var Bh=vh(!0),Ch=vh(!1),Dh={},Eh=Uf(Dh),Fh=Uf(Dh),Gh=Uf(Dh);function Hh(a){if(a===Dh)throw Error(p(174));return a}function Ih(a,b){G(Gh,b);G(Fh,a);G(Eh,Dh);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:lb(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=lb(b,a)}E(Eh);G(Eh,b)}function Jh(){E(Eh);E(Fh);E(Gh)}\nfunction Kh(a){Hh(Gh.current);var b=Hh(Eh.current);var c=lb(b,a.type);b!==c&&(G(Fh,a),G(Eh,c))}function Lh(a){Fh.current===a&&(E(Eh),E(Fh))}var M=Uf(0);\nfunction Mh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||\"$?\"===c.data||\"$!\"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var Nh=[];\nfunction Oh(){for(var a=0;ac?c:4;a(!0);var d=Qh.transition;Qh.transition={};try{a(!1),b()}finally{C=c,Qh.transition=d}}function Fi(){return di().memoizedState}\nfunction Gi(a,b,c){var d=lh(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,c);else if(c=Yg(a,b,c,d),null!==c){var e=L();mh(c,a,d,e);Ji(c,b,d)}}\nfunction ri(a,b,c){var d=lh(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(He(h,g)){var k=b.interleaved;null===k?(e.next=e,Xg(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=Yg(a,b,e,d);null!==c&&(e=L(),mh(c,a,d,e),Ji(c,b,d))}}\nfunction Hi(a){var b=a.alternate;return a===N||null!==b&&b===N}function Ii(a,b){Th=Sh=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Ji(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}}\nvar ai={readContext:Vg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useInsertionEffect:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useDeferredValue:Q,useTransition:Q,useMutableSource:Q,useSyncExternalStore:Q,useId:Q,unstable_isNewReconciler:!1},Yh={readContext:Vg,useCallback:function(a,b){ci().memoizedState=[a,void 0===b?null:b];return a},useContext:Vg,useEffect:vi,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ti(4194308,\n4,yi.bind(null,b,a),c)},useLayoutEffect:function(a,b){return ti(4194308,4,a,b)},useInsertionEffect:function(a,b){return ti(4,2,a,b)},useMemo:function(a,b){var c=ci();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=ci();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=Gi.bind(null,N,a);return[d.memoizedState,a]},useRef:function(a){var b=\nci();a={current:a};return b.memoizedState=a},useState:qi,useDebugValue:Ai,useDeferredValue:function(a){return ci().memoizedState=a},useTransition:function(){var a=qi(!1),b=a[0];a=Ei.bind(null,a[1]);ci().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=N,e=ci();if(I){if(void 0===c)throw Error(p(407));c=c()}else{c=b();if(null===R)throw Error(p(349));0!==(Rh&30)||ni(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;vi(ki.bind(null,d,\nf,a),[a]);d.flags|=2048;li(9,mi.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=ci(),b=R.identifierPrefix;if(I){var c=sg;var d=rg;c=(d&~(1<<32-oc(d)-1)).toString(32)+c;b=\":\"+b+\"R\"+c;c=Uh++;0\\x3c/script>\",a=a.removeChild(a.firstChild)):\n\"string\"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),\"select\"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Of]=b;a[Pf]=d;Aj(a,b,!1,!1);b.stateNode=a;a:{g=vb(c,d);switch(c){case \"dialog\":D(\"cancel\",a);D(\"close\",a);e=d;break;case \"iframe\":case \"object\":case \"embed\":D(\"load\",a);e=d;break;case \"video\":case \"audio\":for(e=0;eHj&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304)}else{if(!d)if(a=Mh(g),null!==a){if(b.flags|=128,d=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Ej(f,!0),null===f.tail&&\"hidden\"===f.tailMode&&!g.alternate&&!I)return S(b),null}else 2*B()-f.renderingStartTime>Hj&&1073741824!==c&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304);f.isBackwards?(g.sibling=b.child,b.child=g):(c=f.last,null!==c?c.sibling=g:b.child=g,f.last=g)}if(null!==f.tail)return b=f.tail,f.rendering=\nb,f.tail=b.sibling,f.renderingStartTime=B(),b.sibling=null,c=M.current,G(M,d?c&1|2:c&1),b;S(b);return null;case 22:case 23:return Ij(),d=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(gj&1073741824)&&(S(b),b.subtreeFlags&6&&(b.flags|=8192)):S(b),null;case 24:return null;case 25:return null}throw Error(p(156,b.tag));}\nfunction Jj(a,b){wg(b);switch(b.tag){case 1:return Zf(b.type)&&$f(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return Jh(),E(Wf),E(H),Oh(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Lh(b),null;case 13:E(M);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(p(340));Ig()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return E(M),null;case 4:return Jh(),null;case 10:return Rg(b.type._context),null;case 22:case 23:return Ij(),\nnull;case 24:return null;default:return null}}var Kj=!1,U=!1,Lj=\"function\"===typeof WeakSet?WeakSet:Set,V=null;function Mj(a,b){var c=a.ref;if(null!==c)if(\"function\"===typeof c)try{c(null)}catch(d){W(a,b,d)}else c.current=null}function Nj(a,b,c){try{c()}catch(d){W(a,b,d)}}var Oj=!1;\nfunction Pj(a,b){Cf=dd;a=Me();if(Ne(a)){if(\"selectionStart\"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(F){c=null;break a}var g=0,h=-1,k=-1,l=0,m=0,q=a,r=null;b:for(;;){for(var y;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+=\nq.nodeValue.length);if(null===(y=q.firstChild))break;r=q;q=y}for(;;){if(q===a)break b;r===c&&++l===e&&(h=g);r===f&&++m===d&&(k=g);if(null!==(y=q.nextSibling))break;q=r;r=q.parentNode}q=y}c=-1===h||-1===k?null:{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Df={focusedElem:a,selectionRange:c};dd=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var n=b.alternate;if(0!==(b.flags&1024))switch(b.tag){case 0:case 11:case 15:break;\ncase 1:if(null!==n){var t=n.memoizedProps,J=n.memoizedState,x=b.stateNode,w=x.getSnapshotBeforeUpdate(b.elementType===b.type?t:Lg(b.type,t),J);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var u=b.stateNode.containerInfo;1===u.nodeType?u.textContent=\"\":9===u.nodeType&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163));}}catch(F){W(b,b.return,F)}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return}n=Oj;Oj=!1;return n}\nfunction Qj(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Nj(b,c,f)}e=e.next}while(e!==d)}}function Rj(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function Sj(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c}\"function\"===typeof b?b(a):b.current=a}}\nfunction Tj(a){var b=a.alternate;null!==b&&(a.alternate=null,Tj(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&(delete b[Of],delete b[Pf],delete b[of],delete b[Qf],delete b[Rf]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function Uj(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction Vj(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Uj(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}\nfunction Wj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Bf));else if(4!==d&&(a=a.child,null!==a))for(Wj(a,b,c),a=a.sibling;null!==a;)Wj(a,b,c),a=a.sibling}\nfunction Xj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Xj(a,b,c),a=a.sibling;null!==a;)Xj(a,b,c),a=a.sibling}var X=null,Yj=!1;function Zj(a,b,c){for(c=c.child;null!==c;)ak(a,b,c),c=c.sibling}\nfunction ak(a,b,c){if(lc&&\"function\"===typeof lc.onCommitFiberUnmount)try{lc.onCommitFiberUnmount(kc,c)}catch(h){}switch(c.tag){case 5:U||Mj(c,b);case 6:var d=X,e=Yj;X=null;Zj(a,b,c);X=d;Yj=e;null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):X.removeChild(c.stateNode));break;case 18:null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?Kf(a.parentNode,c):1===a.nodeType&&Kf(a,c),bd(a)):Kf(X,c.stateNode));break;case 4:d=X;e=Yj;X=c.stateNode.containerInfo;Yj=!0;\nZj(a,b,c);X=d;Yj=e;break;case 0:case 11:case 14:case 15:if(!U&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Nj(c,b,g):0!==(f&4)&&Nj(c,b,g));e=e.next}while(e!==d)}Zj(a,b,c);break;case 1:if(!U&&(Mj(c,b),d=c.stateNode,\"function\"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){W(c,b,h)}Zj(a,b,c);break;case 21:Zj(a,b,c);break;case 22:c.mode&1?(U=(d=U)||null!==\nc.memoizedState,Zj(a,b,c),U=d):Zj(a,b,c);break;default:Zj(a,b,c)}}function bk(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Lj);b.forEach(function(b){var d=ck.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nfunction dk(a,b){var c=b.deletions;if(null!==c)for(var d=0;de&&(e=g);d&=~f}d=e;d=B()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*mk(d/1960))-d;if(10a?16:a;if(null===xk)var d=!1;else{a=xk;xk=null;yk=0;if(0!==(K&6))throw Error(p(331));var e=K;K|=4;for(V=a.current;null!==V;){var f=V,g=f.child;if(0!==(V.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;kB()-gk?Lk(a,0):sk|=c);Ek(a,b)}function Zk(a,b){0===b&&(0===(a.mode&1)?b=1:(b=sc,sc<<=1,0===(sc&130023424)&&(sc=4194304)));var c=L();a=Zg(a,b);null!==a&&(Ac(a,b,c),Ek(a,c))}function vj(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Zk(a,c)}\nfunction ck(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(p(314));}null!==d&&d.delete(b);Zk(a,c)}var Wk;\nWk=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||Wf.current)Ug=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return Ug=!1,zj(a,b,c);Ug=0!==(a.flags&131072)?!0:!1}else Ug=!1,I&&0!==(b.flags&1048576)&&ug(b,ng,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;jj(a,b);a=b.pendingProps;var e=Yf(b,H.current);Tg(b,c);e=Xh(null,b,d,a,e,c);var f=bi();b.flags|=1;\"object\"===typeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue=\nnull,Zf(d)?(f=!0,cg(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,ah(b),e.updater=nh,b.stateNode=e,e._reactInternals=b,rh(b,d,a,c),b=kj(null,b,d,!0,f,c)):(b.tag=0,I&&f&&vg(b),Yi(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{jj(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=$k(d);a=Lg(d,a);switch(e){case 0:b=dj(null,b,d,a,c);break a;case 1:b=ij(null,b,d,a,c);break a;case 11:b=Zi(null,b,d,a,c);break a;case 14:b=aj(null,b,d,Lg(d.type,a),c);break a}throw Error(p(306,\nd,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),dj(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),ij(a,b,d,e,c);case 3:a:{lj(b);if(null===a)throw Error(p(387));d=b.pendingProps;f=b.memoizedState;e=f.element;bh(a,b);gh(b,d,null,c);var g=b.memoizedState;d=g.element;if(f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState=\nf,b.memoizedState=f,b.flags&256){e=Ki(Error(p(423)),b);b=mj(a,b,d,c,e);break a}else if(d!==e){e=Ki(Error(p(424)),b);b=mj(a,b,d,c,e);break a}else for(yg=Lf(b.stateNode.containerInfo.firstChild),xg=b,I=!0,zg=null,c=Ch(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Ig();if(d===e){b=$i(a,b,c);break a}Yi(a,b,d,c)}b=b.child}return b;case 5:return Kh(b),null===a&&Eg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ef(d,e)?g=null:null!==f&&Ef(d,f)&&(b.flags|=32),\nhj(a,b),Yi(a,b,g,c),b.child;case 6:return null===a&&Eg(b),null;case 13:return pj(a,b,c);case 4:return Ih(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Bh(b,null,d,c):Yi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),Zi(a,b,d,e,c);case 7:return Yi(a,b,b.pendingProps,c),b.child;case 8:return Yi(a,b,b.pendingProps.children,c),b.child;case 12:return Yi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;\ng=e.value;G(Mg,d._currentValue);d._currentValue=g;if(null!==f)if(He(f.value,g)){if(f.children===e.children&&!Wf.current){b=$i(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=ch(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var m=l.pending;null===m?k.next=k:(k.next=m.next,m.next=k);l.pending=k}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);Sg(f.return,\nc,b);h.lanes|=c;break}k=k.next}}else if(10===f.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(p(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);Sg(g,c,b);g=f.sibling}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return}f=g}Yi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,Tg(b,c),e=Vg(e),d=d(e),b.flags|=1,Yi(a,b,d,c),\nb.child;case 14:return d=b.type,e=Lg(d,b.pendingProps),e=Lg(d.type,e),aj(a,b,d,e,c);case 15:return cj(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),jj(a,b),b.tag=1,Zf(d)?(a=!0,cg(b)):a=!1,Tg(b,c),ph(b,d,e),rh(b,d,e,c),kj(null,b,d,!0,a,c);case 19:return yj(a,b,c);case 22:return ej(a,b,c)}throw Error(p(156,b.tag));};function Gk(a,b){return ac(a,b)}\nfunction al(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function Bg(a,b,c,d){return new al(a,b,c,d)}function bj(a){a=a.prototype;return!(!a||!a.isReactComponent)}\nfunction $k(a){if(\"function\"===typeof a)return bj(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Da)return 11;if(a===Ga)return 14}return 2}\nfunction wh(a,b){var c=a.alternate;null===c?(c=Bg(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};\nc.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}\nfunction yh(a,b,c,d,e,f){var g=2;d=a;if(\"function\"===typeof a)bj(a)&&(g=1);else if(\"string\"===typeof a)g=5;else a:switch(a){case ya:return Ah(c.children,e,f,b);case za:g=8;e|=8;break;case Aa:return a=Bg(12,c,b,e|2),a.elementType=Aa,a.lanes=f,a;case Ea:return a=Bg(13,c,b,e),a.elementType=Ea,a.lanes=f,a;case Fa:return a=Bg(19,c,b,e),a.elementType=Fa,a.lanes=f,a;case Ia:return qj(c,e,f,b);default:if(\"object\"===typeof a&&null!==a)switch(a.$$typeof){case Ba:g=10;break a;case Ca:g=9;break a;case Da:g=11;\nbreak a;case Ga:g=14;break a;case Ha:g=16;d=null;break a}throw Error(p(130,null==a?a:typeof a,\"\"));}b=Bg(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Ah(a,b,c,d){a=Bg(7,a,d,b);a.lanes=c;return a}function qj(a,b,c,d){a=Bg(22,a,d,b);a.elementType=Ia;a.lanes=c;a.stateNode={isHidden:!1};return a}function xh(a,b,c){a=Bg(6,a,null,b);a.lanes=c;return a}\nfunction zh(a,b,c){b=Bg(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction bl(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=zc(0);this.expirationTimes=zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=zc(0);this.identifierPrefix=d;this.onRecoverableError=e;this.mutableSourceEagerHydrationData=\nnull}function cl(a,b,c,d,e,f,g,h,k){a=new bl(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=Bg(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null};ah(f);return a}function dl(a,b,c){var d=3(\n handlerName: keyof typeof Gestures,\n handlerTag: number,\n config: T\n ) {\n if (isNewWebImplementationEnabled()) {\n if (!(handlerName in Gestures)) {\n throw new Error(\n `react-native-gesture-handler: ${handlerName} is not supported on web.`\n );\n }\n\n const GestureClass = Gestures[handlerName];\n NodeManager.createGestureHandler(handlerTag, new GestureClass());\n InteractionManager.getInstance().configureInteractions(\n NodeManager.getHandler(handlerTag),\n config as unknown as Config\n );\n } else {\n if (!(handlerName in HammerGestures)) {\n throw new Error(\n `react-native-gesture-handler: ${handlerName} is not supported on web.`\n );\n }\n\n // @ts-ignore If it doesn't exist, the error is thrown\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const GestureClass = HammerGestures[handlerName];\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n HammerNodeManager.createGestureHandler(handlerTag, new GestureClass());\n }\n\n this.updateGestureHandler(handlerTag, config as unknown as Config);\n },\n attachGestureHandler(\n handlerTag: number,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n newView: any,\n _actionType: ActionType,\n propsRef: React.RefObject\n ) {\n if (\n !(newView instanceof HTMLElement || newView instanceof React.Component)\n ) {\n return;\n }\n\n if (isNewWebImplementationEnabled()) {\n //@ts-ignore Types should be HTMLElement or React.Component\n NodeManager.getHandler(handlerTag).init(newView, propsRef);\n } else {\n //@ts-ignore Types should be HTMLElement or React.Component\n HammerNodeManager.getHandler(handlerTag).setView(newView, propsRef);\n }\n },\n updateGestureHandler(handlerTag: number, newConfig: Config) {\n if (isNewWebImplementationEnabled()) {\n NodeManager.getHandler(handlerTag).updateGestureConfig(newConfig);\n\n InteractionManager.getInstance().configureInteractions(\n NodeManager.getHandler(handlerTag),\n newConfig\n );\n } else {\n HammerNodeManager.getHandler(handlerTag).updateGestureConfig(newConfig);\n }\n },\n getGestureHandlerNode(handlerTag: number) {\n if (isNewWebImplementationEnabled()) {\n return NodeManager.getHandler(handlerTag);\n } else {\n return HammerNodeManager.getHandler(handlerTag);\n }\n },\n dropGestureHandler(handlerTag: number) {\n if (isNewWebImplementationEnabled()) {\n NodeManager.dropGestureHandler(handlerTag);\n } else {\n HammerNodeManager.dropGestureHandler(handlerTag);\n }\n },\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushOperations() {},\n};\n","export const RNRenderer = {\n findHostInstance_DEPRECATED: (_ref: any) => null,\n};\n","// TODO use State from RNModule\n\nexport const State = {\n UNDETERMINED: 0,\n FAILED: 1,\n BEGAN: 2,\n CANCELLED: 3,\n ACTIVE: 4,\n END: 5,\n} as const;\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; it can be used as a type and as a value\nexport type State = typeof State[keyof typeof State];\n","export const TouchEventType = {\n UNDETERMINED: 0,\n TOUCHES_DOWN: 1,\n TOUCHES_MOVE: 2,\n TOUCHES_UP: 3,\n TOUCHES_CANCELLED: 4,\n} as const;\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; it can be used as a type and as a value\nexport type TouchEventType = typeof TouchEventType[keyof typeof TouchEventType];\n","// This component is based on RN's DrawerLayoutAndroid API\n//\n// It perhaps deserves to be put in a separate repo, but since it relies on\n// react-native-gesture-handler library which isn't very popular at the moment I\n// decided to keep it here for the time being. It will allow us to move faster\n// and fix issues that may arise in gesture handler library that could be found\n// when using the drawer component\n\nimport * as React from 'react';\nimport { Component } from 'react';\nimport invariant from 'invariant';\nimport {\n Animated,\n StyleSheet,\n View,\n Keyboard,\n StatusBar,\n I18nManager,\n StatusBarAnimation,\n StyleProp,\n ViewStyle,\n LayoutChangeEvent,\n NativeSyntheticEvent,\n} from 'react-native';\n\nimport {\n GestureEvent,\n HandlerStateChangeEvent,\n UserSelect,\n} from '../handlers/gestureHandlerCommon';\nimport {\n PanGestureHandler,\n PanGestureHandlerEventPayload,\n} from '../handlers/PanGestureHandler';\nimport {\n TapGestureHandler,\n TapGestureHandlerEventPayload,\n} from '../handlers/TapGestureHandler';\nimport { State } from '../State';\n\nconst DRAG_TOSS = 0.05;\n\nconst IDLE: DrawerState = 'Idle';\nconst DRAGGING: DrawerState = 'Dragging';\nconst SETTLING: DrawerState = 'Settling';\n\nexport type DrawerPosition = 'left' | 'right';\n\nexport type DrawerState = 'Idle' | 'Dragging' | 'Settling';\n\nexport type DrawerType = 'front' | 'back' | 'slide';\n\nexport type DrawerLockMode = 'unlocked' | 'locked-closed' | 'locked-open';\n\nexport type DrawerKeyboardDismissMode = 'none' | 'on-drag';\n\n// Animated.AnimatedInterpolation has been converted to a generic type\n// in @types/react-native 0.70. This way we can maintain compatibility\n// with all versions of @types/react-native`\ntype AnimatedInterpolation = ReturnType;\nexport interface DrawerLayoutProps {\n /**\n * This attribute is present in the standard implementation already and is one\n * of the required params. Gesture handler version of DrawerLayout make it\n * possible for the function passed as `renderNavigationView` to take an\n * Animated value as a parameter that indicates the progress of drawer\n * opening/closing animation (progress value is 0 when closed and 1 when\n * opened). This can be used by the drawer component to animated its children\n * while the drawer is opening or closing.\n */\n renderNavigationView: (\n progressAnimatedValue: Animated.Value\n ) => React.ReactNode;\n\n drawerPosition?: DrawerPosition;\n\n drawerWidth?: number;\n\n drawerBackgroundColor?: string;\n\n drawerLockMode?: DrawerLockMode;\n\n keyboardDismissMode?: DrawerKeyboardDismissMode;\n\n /**\n * Called when the drawer is closed.\n */\n onDrawerClose?: () => void;\n\n /**\n * Called when the drawer is opened.\n */\n onDrawerOpen?: () => void;\n\n /**\n * Called when the status of the drawer changes.\n */\n onDrawerStateChanged?: (\n newState: DrawerState,\n drawerWillShow: boolean\n ) => void;\n useNativeAnimations?: boolean;\n\n drawerType?: DrawerType;\n\n /**\n * Defines how far from the edge of the content view the gesture should\n * activate.\n */\n edgeWidth?: number;\n\n minSwipeDistance?: number;\n\n /**\n * When set to true Drawer component will use\n * {@link https://reactnative.dev/docs/statusbar StatusBar} API to hide the OS\n * status bar whenever the drawer is pulled or when its in an \"open\" state.\n */\n hideStatusBar?: boolean;\n\n /**\n * @default 'slide'\n *\n * Can be used when hideStatusBar is set to true and will select the animation\n * used for hiding/showing the status bar. See\n * {@link https://reactnative.dev/docs/statusbar StatusBar} documentation for\n * more details\n */\n statusBarAnimation?: StatusBarAnimation;\n\n /**\n * @default black\n *\n * Color of a semi-transparent overlay to be displayed on top of the content\n * view when drawer gets open. A solid color should be used as the opacity is\n * added by the Drawer itself and the opacity of the overlay is animated (from\n * 0% to 70%).\n */\n overlayColor?: string;\n\n contentContainerStyle?: StyleProp;\n\n drawerContainerStyle?: StyleProp;\n\n /**\n * Enables two-finger gestures on supported devices, for example iPads with\n * trackpads. If not enabled the gesture will require click + drag, with\n * `enableTrackpadTwoFingerGesture` swiping with two fingers will also trigger\n * the gesture.\n */\n enableTrackpadTwoFingerGesture?: boolean;\n\n onDrawerSlide?: (position: number) => void;\n\n onGestureRef?: (ref: PanGestureHandler) => void;\n\n // implicit `children` prop has been removed in @types/react^18.0.0\n children?:\n | React.ReactNode\n | ((openValue?: AnimatedInterpolation) => React.ReactNode);\n\n /**\n * @default 'none'\n * Defines which userSelect property should be used.\n * Values: 'none'|'text'|'auto'\n */\n userSelect?: UserSelect;\n}\n\nexport type DrawerLayoutState = {\n dragX: Animated.Value;\n touchX: Animated.Value;\n drawerTranslation: Animated.Value;\n containerWidth: number;\n drawerState: DrawerState;\n drawerOpened: boolean;\n};\n\nexport type DrawerMovementOption = {\n velocity?: number;\n speed?: number;\n};\nexport default class DrawerLayout extends Component<\n DrawerLayoutProps,\n DrawerLayoutState\n> {\n static defaultProps = {\n drawerWidth: 200,\n drawerPosition: 'left',\n useNativeAnimations: true,\n drawerType: 'front',\n edgeWidth: 20,\n minSwipeDistance: 3,\n overlayColor: 'rgba(0, 0, 0, 0.7)',\n drawerLockMode: 'unlocked',\n enableTrackpadTwoFingerGesture: false,\n };\n\n constructor(props: DrawerLayoutProps) {\n super(props);\n\n const dragX = new Animated.Value(0);\n const touchX = new Animated.Value(0);\n const drawerTranslation = new Animated.Value(0);\n\n this.state = {\n dragX,\n touchX,\n drawerTranslation,\n containerWidth: 0,\n drawerState: IDLE,\n drawerOpened: false,\n };\n\n this.updateAnimatedEvent(props, this.state);\n }\n\n shouldComponentUpdate(props: DrawerLayoutProps, state: DrawerLayoutState) {\n if (\n this.props.drawerPosition !== props.drawerPosition ||\n this.props.drawerWidth !== props.drawerWidth ||\n this.props.drawerType !== props.drawerType ||\n this.state.containerWidth !== state.containerWidth\n ) {\n this.updateAnimatedEvent(props, state);\n }\n\n return true;\n }\n\n private openValue?: AnimatedInterpolation;\n private onGestureEvent?: (\n event: GestureEvent\n ) => void;\n private accessibilityIsModalView = React.createRef();\n private pointerEventsView = React.createRef();\n private panGestureHandler = React.createRef();\n private drawerShown = false;\n\n static positions = {\n Left: 'left',\n Right: 'right',\n };\n\n private updateAnimatedEvent = (\n props: DrawerLayoutProps,\n state: DrawerLayoutState\n ) => {\n // Event definition is based on\n const { drawerPosition, drawerWidth, drawerType } = props;\n const {\n dragX: dragXValue,\n touchX: touchXValue,\n drawerTranslation,\n containerWidth,\n } = state;\n\n let dragX = dragXValue;\n let touchX = touchXValue;\n\n if (drawerPosition !== 'left') {\n // Most of the code is written in a way to handle left-side drawer. In\n // order to handle right-side drawer the only thing we need to do is to\n // reverse events coming from gesture handler in a way they emulate\n // left-side drawer gestures. E.g. dragX is simply -dragX, and touchX is\n // calulcated by subtracing real touchX from the width of the container\n // (such that when touch happens at the right edge the value is simply 0)\n dragX = Animated.multiply(\n new Animated.Value(-1),\n dragXValue\n ) as Animated.Value; // TODO(TS): (for all \"as\" in this file) make sure we can map this\n touchX = Animated.add(\n new Animated.Value(containerWidth),\n Animated.multiply(new Animated.Value(-1), touchXValue)\n ) as Animated.Value; // TODO(TS): make sure we can map this;\n touchXValue.setValue(containerWidth);\n } else {\n touchXValue.setValue(0);\n }\n\n // While closing the drawer when user starts gesture outside of its area (in greyed\n // out part of the window), we want the drawer to follow only once finger reaches the\n // edge of the drawer.\n // E.g. on the diagram below drawer is illustrate by X signs and the greyed out area by\n // dots. The touch gesture starts at '*' and moves left, touch path is indicated by\n // an arrow pointing left\n // 1) +---------------+ 2) +---------------+ 3) +---------------+ 4) +---------------+\n // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|\n // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|\n // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|\n // |XXXXXXXX|......| |XXXXXXXX|.<-*..| |XXXXXXXX|<--*..| |XXXXX|<-----*..|\n // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|\n // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|\n // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|\n // +---------------+ +---------------+ +---------------+ +---------------+\n //\n // For the above to work properly we define animated value that will keep\n // start position of the gesture. Then we use that value to calculate how\n // much we need to subtract from the dragX. If the gesture started on the\n // greyed out area we take the distance from the edge of the drawer to the\n // start position. Otherwise we don't subtract at all and the drawer be\n // pulled back as soon as you start the pan.\n //\n // This is used only when drawerType is \"front\"\n //\n let translationX = dragX;\n if (drawerType === 'front') {\n const startPositionX = Animated.add(\n touchX,\n Animated.multiply(new Animated.Value(-1), dragX)\n );\n\n const dragOffsetFromOnStartPosition = startPositionX.interpolate({\n inputRange: [drawerWidth! - 1, drawerWidth!, drawerWidth! + 1],\n outputRange: [0, 0, 1],\n });\n translationX = Animated.add(\n dragX,\n dragOffsetFromOnStartPosition\n ) as Animated.Value; // TODO: as above\n }\n\n this.openValue = Animated.add(translationX, drawerTranslation).interpolate({\n inputRange: [0, drawerWidth!],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n });\n\n const gestureOptions: {\n useNativeDriver: boolean;\n // TODO: make sure it is correct\n listener?: (\n ev: NativeSyntheticEvent\n ) => void;\n } = {\n useNativeDriver: props.useNativeAnimations!,\n };\n\n if (this.props.onDrawerSlide) {\n gestureOptions.listener = (ev) => {\n const translationX = Math.floor(Math.abs(ev.nativeEvent.translationX));\n const position = translationX / this.state.containerWidth;\n\n this.props.onDrawerSlide?.(position);\n };\n }\n\n this.onGestureEvent = Animated.event(\n [{ nativeEvent: { translationX: dragXValue, x: touchXValue } }],\n gestureOptions\n );\n };\n\n private handleContainerLayout = ({ nativeEvent }: LayoutChangeEvent) => {\n this.setState({ containerWidth: nativeEvent.layout.width });\n };\n\n private emitStateChanged = (\n newState: DrawerState,\n drawerWillShow: boolean\n ) => {\n this.props.onDrawerStateChanged?.(newState, drawerWillShow);\n };\n\n private openingHandlerStateChange = ({\n nativeEvent,\n }: HandlerStateChangeEvent) => {\n if (nativeEvent.oldState === State.ACTIVE) {\n this.handleRelease({ nativeEvent });\n } else if (nativeEvent.state === State.ACTIVE) {\n this.emitStateChanged(DRAGGING, false);\n this.setState({ drawerState: DRAGGING });\n if (this.props.keyboardDismissMode === 'on-drag') {\n Keyboard.dismiss();\n }\n if (this.props.hideStatusBar) {\n StatusBar.setHidden(true, this.props.statusBarAnimation || 'slide');\n }\n }\n };\n\n private onTapHandlerStateChange = ({\n nativeEvent,\n }: HandlerStateChangeEvent) => {\n if (\n this.drawerShown &&\n nativeEvent.oldState === State.ACTIVE &&\n this.props.drawerLockMode !== 'locked-open'\n ) {\n this.closeDrawer();\n }\n };\n\n private handleRelease = ({\n nativeEvent,\n }: HandlerStateChangeEvent) => {\n const { drawerWidth, drawerPosition, drawerType } = this.props;\n const { containerWidth } = this.state;\n let { translationX: dragX, velocityX, x: touchX } = nativeEvent;\n\n if (drawerPosition !== 'left') {\n // See description in _updateAnimatedEvent about why events are flipped\n // for right-side drawer\n dragX = -dragX;\n touchX = containerWidth - touchX;\n velocityX = -velocityX;\n }\n\n const gestureStartX = touchX - dragX;\n let dragOffsetBasedOnStart = 0;\n\n if (drawerType === 'front') {\n dragOffsetBasedOnStart =\n gestureStartX > drawerWidth! ? gestureStartX - drawerWidth! : 0;\n }\n\n const startOffsetX =\n dragX + dragOffsetBasedOnStart + (this.drawerShown ? drawerWidth! : 0);\n const projOffsetX = startOffsetX + DRAG_TOSS * velocityX;\n\n const shouldOpen = projOffsetX > drawerWidth! / 2;\n\n if (shouldOpen) {\n this.animateDrawer(startOffsetX, drawerWidth!, velocityX);\n } else {\n this.animateDrawer(startOffsetX, 0, velocityX);\n }\n };\n\n private updateShowing = (showing: boolean) => {\n this.drawerShown = showing;\n this.accessibilityIsModalView.current?.setNativeProps({\n accessibilityViewIsModal: showing,\n });\n this.pointerEventsView.current?.setNativeProps({\n pointerEvents: showing ? 'auto' : 'none',\n });\n const { drawerPosition, minSwipeDistance, edgeWidth } = this.props;\n const fromLeft = drawerPosition === 'left';\n // gestureOrientation is 1 if the expected gesture is from left to right and\n // -1 otherwise e.g. when drawer is on the left and is closed we expect left\n // to right gesture, thus orientation will be 1.\n const gestureOrientation =\n (fromLeft ? 1 : -1) * (this.drawerShown ? -1 : 1);\n // When drawer is closed we want the hitSlop to be horizontally shorter than\n // the container size by the value of SLOP. This will make it only activate\n // when gesture happens not further than SLOP away from the edge\n const hitSlop = fromLeft\n ? { left: 0, width: showing ? undefined : edgeWidth }\n : { right: 0, width: showing ? undefined : edgeWidth };\n // @ts-ignore internal API, maybe could be fixed in handler types\n this.panGestureHandler.current?.setNativeProps({\n hitSlop,\n activeOffsetX: gestureOrientation * minSwipeDistance!,\n });\n };\n\n private animateDrawer = (\n fromValue: number | null | undefined,\n toValue: number,\n velocity: number,\n speed?: number\n ) => {\n this.state.dragX.setValue(0);\n this.state.touchX.setValue(\n this.props.drawerPosition === 'left' ? 0 : this.state.containerWidth\n );\n\n if (fromValue != null) {\n let nextFramePosition = fromValue;\n if (this.props.useNativeAnimations) {\n // When using native driver, we predict the next position of the\n // animation because it takes one frame of a roundtrip to pass RELEASE\n // event from native driver to JS before we can start animating. Without\n // it, it is more noticable that the frame is dropped.\n if (fromValue < toValue && velocity > 0) {\n nextFramePosition = Math.min(fromValue + velocity / 60.0, toValue);\n } else if (fromValue > toValue && velocity < 0) {\n nextFramePosition = Math.max(fromValue + velocity / 60.0, toValue);\n }\n }\n this.state.drawerTranslation.setValue(nextFramePosition);\n }\n\n const willShow = toValue !== 0;\n this.updateShowing(willShow);\n this.emitStateChanged(SETTLING, willShow);\n this.setState({ drawerState: SETTLING });\n if (this.props.hideStatusBar) {\n StatusBar.setHidden(willShow, this.props.statusBarAnimation || 'slide');\n }\n Animated.spring(this.state.drawerTranslation, {\n velocity,\n bounciness: 0,\n toValue,\n useNativeDriver: this.props.useNativeAnimations!,\n speed: speed ?? undefined,\n }).start(({ finished }) => {\n if (finished) {\n this.emitStateChanged(IDLE, willShow);\n this.setState({ drawerOpened: willShow });\n if (this.state.drawerState !== DRAGGING) {\n // it's possilbe that user started drag while the drawer\n // was settling, don't override state in this case\n this.setState({ drawerState: IDLE });\n }\n if (willShow) {\n this.props.onDrawerOpen?.();\n } else {\n this.props.onDrawerClose?.();\n }\n }\n });\n };\n\n openDrawer = (options: DrawerMovementOption = {}) => {\n this.animateDrawer(\n // TODO: decide if it should be null or undefined is the proper value\n undefined,\n this.props.drawerWidth!,\n options.velocity ? options.velocity : 0,\n options.speed\n );\n\n // We need to force the update, otherwise the overlay is not rerendered and\n // it would not be clickable\n this.forceUpdate();\n };\n\n closeDrawer = (options: DrawerMovementOption = {}) => {\n // TODO: decide if it should be null or undefined is the proper value\n this.animateDrawer(\n undefined,\n 0,\n options.velocity ? options.velocity : 0,\n options.speed\n );\n\n // We need to force the update, otherwise the overlay is not rerendered and\n // it would be still clickable\n this.forceUpdate();\n };\n\n private renderOverlay = () => {\n /* Overlay styles */\n invariant(this.openValue, 'should be set');\n let overlayOpacity;\n\n if (this.state.drawerState !== IDLE) {\n overlayOpacity = this.openValue;\n } else {\n overlayOpacity = this.state.drawerOpened ? 1 : 0;\n }\n\n const dynamicOverlayStyles = {\n opacity: overlayOpacity,\n backgroundColor: this.props.overlayColor,\n };\n\n return (\n \n \n \n );\n };\n\n private renderDrawer = () => {\n const {\n drawerBackgroundColor,\n drawerWidth,\n drawerPosition,\n drawerType,\n drawerContainerStyle,\n contentContainerStyle,\n } = this.props;\n\n const fromLeft = drawerPosition === 'left';\n const drawerSlide = drawerType !== 'back';\n const containerSlide = drawerType !== 'front';\n\n // we rely on row and row-reverse flex directions to position the drawer\n // properly. Apparently for RTL these are flipped which requires us to use\n // the opposite setting for the drawer to appear from left or right\n // according to the drawerPosition prop\n const reverseContentDirection = I18nManager.isRTL ? fromLeft : !fromLeft;\n\n const dynamicDrawerStyles = {\n backgroundColor: drawerBackgroundColor,\n width: drawerWidth,\n };\n const openValue = this.openValue;\n invariant(openValue, 'should be set');\n\n let containerStyles;\n if (containerSlide) {\n const containerTranslateX = openValue.interpolate({\n inputRange: [0, 1],\n outputRange: fromLeft ? [0, drawerWidth!] : [0, -drawerWidth!],\n extrapolate: 'clamp',\n });\n containerStyles = {\n transform: [{ translateX: containerTranslateX }],\n };\n }\n\n let drawerTranslateX: number | AnimatedInterpolation = 0;\n if (drawerSlide) {\n const closedDrawerOffset = fromLeft ? -drawerWidth! : drawerWidth!;\n if (this.state.drawerState !== IDLE) {\n drawerTranslateX = openValue.interpolate({\n inputRange: [0, 1],\n outputRange: [closedDrawerOffset, 0],\n extrapolate: 'clamp',\n });\n } else {\n drawerTranslateX = this.state.drawerOpened ? 0 : closedDrawerOffset;\n }\n }\n const drawerStyles: {\n transform: { translateX: number | AnimatedInterpolation }[];\n flexDirection: 'row-reverse' | 'row';\n } = {\n transform: [{ translateX: drawerTranslateX }],\n flexDirection: reverseContentDirection ? 'row-reverse' : 'row',\n };\n\n return (\n \n \n {typeof this.props.children === 'function'\n ? this.props.children(this.openValue)\n : this.props.children}\n {this.renderOverlay()}\n \n \n \n {this.props.renderNavigationView(this.openValue as Animated.Value)}\n \n \n \n );\n };\n\n private setPanGestureRef = (ref: PanGestureHandler) => {\n // TODO(TS): make sure it is OK taken from\n // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/31065#issuecomment-596081842\n (\n this.panGestureHandler as React.MutableRefObject\n ).current = ref;\n this.props.onGestureRef?.(ref);\n };\n\n render() {\n const { drawerPosition, drawerLockMode, edgeWidth, minSwipeDistance } =\n this.props;\n\n const fromLeft = drawerPosition === 'left';\n\n // gestureOrientation is 1 if the expected gesture is from left to right and\n // -1 otherwise e.g. when drawer is on the left and is closed we expect left\n // to right gesture, thus orientation will be 1.\n const gestureOrientation =\n (fromLeft ? 1 : -1) * (this.drawerShown ? -1 : 1);\n\n // When drawer is closed we want the hitSlop to be horizontally shorter than\n // the container size by the value of SLOP. This will make it only activate\n // when gesture happens not further than SLOP away from the edge\n const hitSlop = fromLeft\n ? { left: 0, width: this.drawerShown ? undefined : edgeWidth }\n : { right: 0, width: this.drawerShown ? undefined : edgeWidth };\n\n return (\n \n {this.renderDrawer()}\n \n );\n }\n}\n\nconst styles = StyleSheet.create({\n drawerContainer: {\n ...StyleSheet.absoluteFillObject,\n zIndex: 1001,\n flexDirection: 'row',\n },\n containerInFront: {\n ...StyleSheet.absoluteFillObject,\n zIndex: 1002,\n },\n containerOnBack: {\n ...StyleSheet.absoluteFillObject,\n },\n main: {\n flex: 1,\n zIndex: 0,\n overflow: 'hidden',\n },\n overlay: {\n ...StyleSheet.absoluteFillObject,\n zIndex: 1000,\n },\n});\n","import * as React from 'react';\nimport {\n Animated,\n Platform,\n processColor,\n StyleSheet,\n StyleProp,\n ViewStyle,\n} from 'react-native';\n\nimport createNativeWrapper from '../handlers/createNativeWrapper';\nimport GestureHandlerButton from './GestureHandlerButton';\nimport { State } from '../State';\n\nimport {\n GestureEvent,\n HandlerStateChangeEvent,\n} from '../handlers/gestureHandlerCommon';\nimport {\n NativeViewGestureHandlerPayload,\n NativeViewGestureHandlerProps,\n} from '../handlers/NativeViewGestureHandler';\n\nexport interface RawButtonProps extends NativeViewGestureHandlerProps {\n /**\n * Defines if more than one button could be pressed simultaneously. By default\n * set true.\n */\n exclusive?: boolean;\n // TODO: we should transform props in `createNativeWrapper`\n\n /**\n * Android only.\n *\n * Defines color of native ripple animation used since API level 21.\n */\n rippleColor?: any; // it was present in BaseButtonProps before but is used here in code\n\n /**\n * Android only.\n *\n * Defines radius of native ripple animation used since API level 21.\n */\n rippleRadius?: number | null;\n\n /**\n * Android only.\n *\n * Set this to true if you want the ripple animation to render outside the view bounds.\n */\n borderless?: boolean;\n\n /**\n * Android only.\n *\n * Defines whether the ripple animation should be drawn on the foreground of the view.\n */\n foreground?: boolean;\n\n /**\n * Android only.\n *\n * Set this to true if you don't want the system to play sound when the button is pressed.\n */\n touchSoundDisabled?: boolean;\n}\n\nexport interface BaseButtonProps extends RawButtonProps {\n /**\n * Called when the button gets pressed (analogous to `onPress` in\n * `TouchableHighlight` from RN core).\n */\n onPress?: (pointerInside: boolean) => void;\n\n /**\n * Called when the button gets pressed and is held for `delayLongPress`\n * milliseconds.\n */\n onLongPress?: () => void;\n\n /**\n * Called when button changes from inactive to active and vice versa. It\n * passes active state as a boolean variable as a first parameter for that\n * method.\n */\n onActiveStateChange?: (active: boolean) => void;\n style?: StyleProp;\n testID?: string;\n\n /**\n * Delay, in milliseconds, after which the `onLongPress` callback gets called.\n * Defaults to 600.\n */\n delayLongPress?: number;\n}\n\nexport interface RectButtonProps extends BaseButtonProps {\n /**\n * Background color that will be dimmed when button is in active state.\n */\n underlayColor?: string;\n\n /**\n * iOS only.\n *\n * Opacity applied to the underlay when button is in active state.\n */\n activeOpacity?: number;\n}\n\nexport interface BorderlessButtonProps extends BaseButtonProps {\n /**\n * iOS only.\n *\n * Opacity applied to the button when it is in an active state.\n */\n activeOpacity?: number;\n}\n\nexport const RawButton = createNativeWrapper(GestureHandlerButton, {\n shouldCancelWhenOutside: false,\n shouldActivateOnStart: false,\n});\n\nexport class BaseButton extends React.Component {\n static defaultProps = {\n delayLongPress: 600,\n };\n\n private lastActive: boolean;\n private longPressTimeout: ReturnType | undefined;\n private longPressDetected: boolean;\n\n constructor(props: BaseButtonProps) {\n super(props);\n this.lastActive = false;\n this.longPressDetected = false;\n }\n\n private handleEvent = ({\n nativeEvent,\n }: HandlerStateChangeEvent) => {\n const { state, oldState, pointerInside } = nativeEvent;\n const active = pointerInside && state === State.ACTIVE;\n\n if (active !== this.lastActive && this.props.onActiveStateChange) {\n this.props.onActiveStateChange(active);\n }\n\n if (\n !this.longPressDetected &&\n oldState === State.ACTIVE &&\n state !== State.CANCELLED &&\n this.lastActive &&\n this.props.onPress\n ) {\n this.props.onPress(active);\n }\n\n if (\n !this.lastActive &&\n // NativeViewGestureHandler sends different events based on platform\n state === (Platform.OS !== 'android' ? State.ACTIVE : State.BEGAN) &&\n pointerInside\n ) {\n this.longPressDetected = false;\n if (this.props.onLongPress) {\n this.longPressTimeout = setTimeout(\n this.onLongPress,\n this.props.delayLongPress\n );\n }\n } else if (\n // cancel longpress timeout if it's set and the finger moved out of the view\n state === State.ACTIVE &&\n !pointerInside &&\n this.longPressTimeout !== undefined\n ) {\n clearTimeout(this.longPressTimeout);\n this.longPressTimeout = undefined;\n } else if (\n // cancel longpress timeout if it's set and the gesture has finished\n this.longPressTimeout !== undefined &&\n (state === State.END ||\n state === State.CANCELLED ||\n state === State.FAILED)\n ) {\n clearTimeout(this.longPressTimeout);\n this.longPressTimeout = undefined;\n }\n\n this.lastActive = active;\n };\n\n private onLongPress = () => {\n this.longPressDetected = true;\n this.props.onLongPress?.();\n };\n\n // Normally, the parent would execute it's handler first, then forward the\n // event to listeners. However, here our handler is virtually only forwarding\n // events to listeners, so we reverse the order to keep the proper order of\n // the callbacks (from \"raw\" ones to \"processed\").\n private onHandlerStateChange = (\n e: HandlerStateChangeEvent\n ) => {\n this.props.onHandlerStateChange?.(e);\n this.handleEvent(e);\n };\n\n private onGestureEvent = (\n e: GestureEvent\n ) => {\n this.props.onGestureEvent?.(e);\n this.handleEvent(\n e as HandlerStateChangeEvent\n ); // TODO: maybe it is not correct\n };\n\n render() {\n const { rippleColor, ...rest } = this.props;\n\n return (\n \n );\n }\n}\n\nconst AnimatedBaseButton = Animated.createAnimatedComponent(BaseButton);\n\nconst btnStyles = StyleSheet.create({\n underlay: {\n position: 'absolute',\n left: 0,\n right: 0,\n bottom: 0,\n top: 0,\n },\n});\n\nexport class RectButton extends React.Component {\n static defaultProps = {\n activeOpacity: 0.105,\n underlayColor: 'black',\n };\n\n private opacity: Animated.Value;\n\n constructor(props: RectButtonProps) {\n super(props);\n this.opacity = new Animated.Value(0);\n }\n\n private onActiveStateChange = (active: boolean) => {\n if (Platform.OS !== 'android') {\n this.opacity.setValue(active ? this.props.activeOpacity! : 0);\n }\n\n this.props.onActiveStateChange?.(active);\n };\n\n render() {\n const { children, style, ...rest } = this.props;\n\n const resolvedStyle = StyleSheet.flatten(style ?? {});\n\n return (\n \n \n {children}\n \n );\n }\n}\n\nexport class BorderlessButton extends React.Component {\n static defaultProps = {\n activeOpacity: 0.3,\n borderless: true,\n };\n\n private opacity: Animated.Value;\n\n constructor(props: BorderlessButtonProps) {\n super(props);\n this.opacity = new Animated.Value(1);\n }\n\n private onActiveStateChange = (active: boolean) => {\n if (Platform.OS !== 'android') {\n this.opacity.setValue(active ? this.props.activeOpacity! : 1);\n }\n\n this.props.onActiveStateChange?.(active);\n };\n\n render() {\n const { children, style, ...rest } = this.props;\n\n return (\n \n {children}\n \n );\n }\n}\n\nexport { default as PureNativeButton } from './GestureHandlerButton';\n","import * as React from 'react';\nimport {\n FlatList as RNFlatList,\n Switch as RNSwitch,\n TextInput as RNTextInput,\n ScrollView as RNScrollView,\n FlatListProps,\n View,\n} from 'react-native';\n\nimport createNativeWrapper from '../handlers/createNativeWrapper';\n\nexport const ScrollView = createNativeWrapper(RNScrollView, {\n disallowInterruption: false,\n});\n\nexport const Switch = createNativeWrapper(RNSwitch, {\n shouldCancelWhenOutside: false,\n shouldActivateOnStart: true,\n disallowInterruption: true,\n});\nexport const TextInput = createNativeWrapper(RNTextInput);\nexport const DrawerLayoutAndroid = () => {\n console.warn('DrawerLayoutAndroid is not supported on web!');\n return ;\n};\n\n// RefreshControl is implemented as a functional component, rendering a View\n// NativeViewGestureHandler needs to set a ref on its child, which cannot be done\n// on functional components\nexport const RefreshControl = createNativeWrapper(View);\n\nexport const FlatList = React.forwardRef(\n (props: FlatListProps, ref: any) => (\n }\n />\n )\n);\n","import * as React from 'react';\nimport { View } from 'react-native';\n\nexport default React.forwardRef((props, ref) => (\n \n));\n","import * as React from 'react';\nimport { PropsWithChildren } from 'react';\nimport { View, ViewProps } from 'react-native';\nimport GestureHandlerRootViewContext from '../GestureHandlerRootViewContext';\n\nexport interface GestureHandlerRootViewProps\n extends PropsWithChildren {}\n\nexport default function GestureHandlerRootView(\n props: GestureHandlerRootViewProps\n) {\n return (\n \n \n \n );\n}\n","// Similarily to the DrawerLayout component this deserves to be put in a\n// separate repo. Although, keeping it here for the time being will allow us to\n// move faster and fix possible issues quicker\n\nimport * as React from 'react';\nimport { Component } from 'react';\nimport {\n Animated,\n StyleSheet,\n View,\n I18nManager,\n LayoutChangeEvent,\n StyleProp,\n ViewStyle,\n} from 'react-native';\n\nimport {\n GestureEvent,\n HandlerStateChangeEvent,\n} from '../handlers/gestureHandlerCommon';\nimport {\n PanGestureHandler,\n PanGestureHandlerEventPayload,\n PanGestureHandlerProps,\n} from '../handlers/PanGestureHandler';\nimport {\n TapGestureHandler,\n TapGestureHandlerEventPayload,\n} from '../handlers/TapGestureHandler';\nimport { State } from '../State';\n\nconst DRAG_TOSS = 0.05;\n\ntype SwipeableExcludes = Exclude<\n keyof PanGestureHandlerProps,\n 'onGestureEvent' | 'onHandlerStateChange'\n>;\n\n// Animated.AnimatedInterpolation has been converted to a generic type\n// in @types/react-native 0.70. This way we can maintain compatibility\n// with all versions of @types/react-native\ntype AnimatedInterpolation = ReturnType;\n\nexport interface SwipeableProps\n extends Pick {\n /**\n * Enables two-finger gestures on supported devices, for example iPads with\n * trackpads. If not enabled the gesture will require click + drag, with\n * `enableTrackpadTwoFingerGesture` swiping with two fingers will also trigger\n * the gesture.\n */\n enableTrackpadTwoFingerGesture?: boolean;\n\n /**\n * Specifies how much the visual interaction will be delayed compared to the\n * gesture distance. e.g. value of 1 will indicate that the swipeable panel\n * should exactly follow the gesture, 2 means it is going to be two times\n * \"slower\".\n */\n friction?: number;\n\n /**\n * Distance from the left edge at which released panel will animate to the\n * open state (or the open panel will animate into the closed state). By\n * default it's a half of the panel's width.\n */\n leftThreshold?: number;\n\n /**\n * Distance from the right edge at which released panel will animate to the\n * open state (or the open panel will animate into the closed state). By\n * default it's a half of the panel's width.\n */\n rightThreshold?: number;\n\n /**\n * Distance that the panel must be dragged from the left edge to be considered\n * a swipe. The default value is 10.\n */\n dragOffsetFromLeftEdge?: number;\n\n /**\n * Distance that the panel must be dragged from the right edge to be considered\n * a swipe. The default value is 10.\n */\n dragOffsetFromRightEdge?: number;\n\n /**\n * Value indicating if the swipeable panel can be pulled further than the left\n * actions panel's width. It is set to true by default as long as the left\n * panel render method is present.\n */\n overshootLeft?: boolean;\n\n /**\n * Value indicating if the swipeable panel can be pulled further than the\n * right actions panel's width. It is set to true by default as long as the\n * right panel render method is present.\n */\n overshootRight?: boolean;\n\n /**\n * Specifies how much the visual interaction will be delayed compared to the\n * gesture distance at overshoot. Default value is 1, it mean no friction, for\n * a native feel, try 8 or above.\n */\n overshootFriction?: number;\n\n /**\n * @deprecated Use `direction` argument of onSwipeableOpen()\n *\n * Called when left action panel gets open.\n */\n onSwipeableLeftOpen?: () => void;\n\n /**\n * @deprecated Use `direction` argument of onSwipeableOpen()\n *\n * Called when right action panel gets open.\n */\n onSwipeableRightOpen?: () => void;\n\n /**\n * Called when action panel gets open (either right or left).\n */\n onSwipeableOpen?: (direction: 'left' | 'right', swipeable: Swipeable) => void;\n\n /**\n * Called when action panel is closed.\n */\n onSwipeableClose?: (\n direction: 'left' | 'right',\n swipeable: Swipeable\n ) => void;\n\n /**\n * @deprecated Use `direction` argument of onSwipeableWillOpen()\n *\n * Called when left action panel starts animating on open.\n */\n onSwipeableLeftWillOpen?: () => void;\n\n /**\n * @deprecated Use `direction` argument of onSwipeableWillOpen()\n *\n * Called when right action panel starts animating on open.\n */\n onSwipeableRightWillOpen?: () => void;\n\n /**\n * Called when action panel starts animating on open (either right or left).\n */\n onSwipeableWillOpen?: (direction: 'left' | 'right') => void;\n\n /**\n * Called when action panel starts animating on close.\n */\n onSwipeableWillClose?: (direction: 'left' | 'right') => void;\n\n /**\n *\n * This map describes the values to use as inputRange for extra interpolation:\n * AnimatedValue: [startValue, endValue]\n *\n * progressAnimatedValue: [0, 1] dragAnimatedValue: [0, +]\n *\n * To support `rtl` flexbox layouts use `flexDirection` styling.\n * */\n renderLeftActions?: (\n progressAnimatedValue: AnimatedInterpolation,\n dragAnimatedValue: AnimatedInterpolation,\n swipeable: Swipeable\n ) => React.ReactNode;\n /**\n *\n * This map describes the values to use as inputRange for extra interpolation:\n * AnimatedValue: [startValue, endValue]\n *\n * progressAnimatedValue: [0, 1] dragAnimatedValue: [0, -]\n *\n * To support `rtl` flexbox layouts use `flexDirection` styling.\n * */\n renderRightActions?: (\n progressAnimatedValue: AnimatedInterpolation,\n dragAnimatedValue: AnimatedInterpolation,\n swipeable: Swipeable\n ) => React.ReactNode;\n\n useNativeAnimations?: boolean;\n\n animationOptions?: Record;\n\n /**\n * Style object for the container (`Animated.View`), for example to override\n * `overflow: 'hidden'`.\n */\n containerStyle?: StyleProp;\n\n /**\n * Style object for the children container (`Animated.View`), for example to\n * apply `flex: 1`\n */\n childrenContainerStyle?: StyleProp;\n}\n\ntype SwipeableState = {\n dragX: Animated.Value;\n rowTranslation: Animated.Value;\n rowState: number;\n leftWidth?: number;\n rightOffset?: number;\n rowWidth?: number;\n};\n\nexport default class Swipeable extends Component<\n SwipeableProps,\n SwipeableState\n> {\n static defaultProps = {\n friction: 1,\n overshootFriction: 1,\n useNativeAnimations: true,\n };\n\n constructor(props: SwipeableProps) {\n super(props);\n const dragX = new Animated.Value(0);\n this.state = {\n dragX,\n rowTranslation: new Animated.Value(0),\n rowState: 0,\n leftWidth: undefined,\n rightOffset: undefined,\n rowWidth: undefined,\n };\n this.updateAnimatedEvent(props, this.state);\n\n this.onGestureEvent = Animated.event(\n [{ nativeEvent: { translationX: dragX } }],\n { useNativeDriver: props.useNativeAnimations! }\n );\n }\n\n shouldComponentUpdate(props: SwipeableProps, state: SwipeableState) {\n if (\n this.props.friction !== props.friction ||\n this.props.overshootLeft !== props.overshootLeft ||\n this.props.overshootRight !== props.overshootRight ||\n this.props.overshootFriction !== props.overshootFriction ||\n this.state.leftWidth !== state.leftWidth ||\n this.state.rightOffset !== state.rightOffset ||\n this.state.rowWidth !== state.rowWidth\n ) {\n this.updateAnimatedEvent(props, state);\n }\n\n return true;\n }\n\n private onGestureEvent?: (\n event: GestureEvent\n ) => void;\n private transX?: AnimatedInterpolation;\n private showLeftAction?: AnimatedInterpolation | Animated.Value;\n private leftActionTranslate?: AnimatedInterpolation;\n private showRightAction?: AnimatedInterpolation | Animated.Value;\n private rightActionTranslate?: AnimatedInterpolation;\n\n private updateAnimatedEvent = (\n props: SwipeableProps,\n state: SwipeableState\n ) => {\n const { friction, overshootFriction } = props;\n const { dragX, rowTranslation, leftWidth = 0, rowWidth = 0 } = state;\n const { rightOffset = rowWidth } = state;\n const rightWidth = Math.max(0, rowWidth - rightOffset);\n\n const { overshootLeft = leftWidth > 0, overshootRight = rightWidth > 0 } =\n props;\n\n const transX = Animated.add(\n rowTranslation,\n dragX.interpolate({\n inputRange: [0, friction!],\n outputRange: [0, 1],\n })\n ).interpolate({\n inputRange: [-rightWidth - 1, -rightWidth, leftWidth, leftWidth + 1],\n outputRange: [\n -rightWidth - (overshootRight ? 1 / overshootFriction! : 0),\n -rightWidth,\n leftWidth,\n leftWidth + (overshootLeft ? 1 / overshootFriction! : 0),\n ],\n });\n this.transX = transX;\n this.showLeftAction =\n leftWidth > 0\n ? transX.interpolate({\n inputRange: [-1, 0, leftWidth],\n outputRange: [0, 0, 1],\n })\n : new Animated.Value(0);\n this.leftActionTranslate = this.showLeftAction.interpolate({\n inputRange: [0, Number.MIN_VALUE],\n outputRange: [-10000, 0],\n extrapolate: 'clamp',\n });\n this.showRightAction =\n rightWidth > 0\n ? transX.interpolate({\n inputRange: [-rightWidth, 0, 1],\n outputRange: [1, 0, 0],\n })\n : new Animated.Value(0);\n this.rightActionTranslate = this.showRightAction.interpolate({\n inputRange: [0, Number.MIN_VALUE],\n outputRange: [-10000, 0],\n extrapolate: 'clamp',\n });\n };\n\n private onTapHandlerStateChange = ({\n nativeEvent,\n }: HandlerStateChangeEvent) => {\n if (nativeEvent.oldState === State.ACTIVE) {\n this.close();\n }\n };\n\n private onHandlerStateChange = (\n ev: HandlerStateChangeEvent\n ) => {\n if (ev.nativeEvent.oldState === State.ACTIVE) {\n this.handleRelease(ev);\n }\n };\n\n private handleRelease = (\n ev: HandlerStateChangeEvent\n ) => {\n const { velocityX, translationX: dragX } = ev.nativeEvent;\n const { leftWidth = 0, rowWidth = 0, rowState } = this.state;\n const { rightOffset = rowWidth } = this.state;\n const rightWidth = rowWidth - rightOffset;\n const {\n friction,\n leftThreshold = leftWidth / 2,\n rightThreshold = rightWidth / 2,\n } = this.props;\n\n const startOffsetX = this.currentOffset() + dragX / friction!;\n const translationX = (dragX + DRAG_TOSS * velocityX) / friction!;\n\n let toValue = 0;\n if (rowState === 0) {\n if (translationX > leftThreshold) {\n toValue = leftWidth;\n } else if (translationX < -rightThreshold) {\n toValue = -rightWidth;\n }\n } else if (rowState === 1) {\n // swiped to left\n if (translationX > -leftThreshold) {\n toValue = leftWidth;\n }\n } else {\n // swiped to right\n if (translationX < rightThreshold) {\n toValue = -rightWidth;\n }\n }\n\n this.animateRow(startOffsetX, toValue, velocityX / friction!);\n };\n\n private animateRow = (\n fromValue: number,\n toValue: number,\n velocityX?:\n | number\n | {\n x: number;\n y: number;\n }\n ) => {\n const { dragX, rowTranslation } = this.state;\n dragX.setValue(0);\n rowTranslation.setValue(fromValue);\n\n this.setState({ rowState: Math.sign(toValue) });\n Animated.spring(rowTranslation, {\n restSpeedThreshold: 1.7,\n restDisplacementThreshold: 0.4,\n velocity: velocityX,\n bounciness: 0,\n toValue,\n useNativeDriver: this.props.useNativeAnimations!,\n ...this.props.animationOptions,\n }).start(({ finished }) => {\n if (finished) {\n if (toValue > 0) {\n this.props.onSwipeableLeftOpen?.();\n this.props.onSwipeableOpen?.('left', this);\n } else if (toValue < 0) {\n this.props.onSwipeableRightOpen?.();\n this.props.onSwipeableOpen?.('right', this);\n } else {\n const closingDirection = fromValue > 0 ? 'left' : 'right';\n this.props.onSwipeableClose?.(closingDirection, this);\n }\n }\n });\n if (toValue > 0) {\n this.props.onSwipeableLeftWillOpen?.();\n this.props.onSwipeableWillOpen?.('left');\n } else if (toValue < 0) {\n this.props.onSwipeableRightWillOpen?.();\n this.props.onSwipeableWillOpen?.('right');\n } else {\n const closingDirection = fromValue > 0 ? 'left' : 'right';\n this.props.onSwipeableWillClose?.(closingDirection);\n }\n };\n\n private onRowLayout = ({ nativeEvent }: LayoutChangeEvent) => {\n this.setState({ rowWidth: nativeEvent.layout.width });\n };\n\n private currentOffset = () => {\n const { leftWidth = 0, rowWidth = 0, rowState } = this.state;\n const { rightOffset = rowWidth } = this.state;\n const rightWidth = rowWidth - rightOffset;\n if (rowState === 1) {\n return leftWidth;\n } else if (rowState === -1) {\n return -rightWidth;\n }\n return 0;\n };\n\n close = () => {\n this.animateRow(this.currentOffset(), 0);\n };\n\n openLeft = () => {\n const { leftWidth = 0 } = this.state;\n this.animateRow(this.currentOffset(), leftWidth);\n };\n\n openRight = () => {\n const { rowWidth = 0 } = this.state;\n const { rightOffset = rowWidth } = this.state;\n const rightWidth = rowWidth - rightOffset;\n this.animateRow(this.currentOffset(), -rightWidth);\n };\n\n reset = () => {\n const { dragX, rowTranslation } = this.state;\n dragX.setValue(0);\n rowTranslation.setValue(0);\n this.setState({ rowState: 0 });\n };\n\n render() {\n const { rowState } = this.state;\n const {\n children,\n renderLeftActions,\n renderRightActions,\n dragOffsetFromLeftEdge = 10,\n dragOffsetFromRightEdge = 10,\n } = this.props;\n\n const left = renderLeftActions && (\n \n {renderLeftActions(this.showLeftAction!, this.transX!, this)}\n \n this.setState({ leftWidth: nativeEvent.layout.x })\n }\n />\n \n );\n\n const right = renderRightActions && (\n \n {renderRightActions(this.showRightAction!, this.transX!, this)}\n \n this.setState({ rightOffset: nativeEvent.layout.x })\n }\n />\n \n );\n\n return (\n \n \n {left}\n {right}\n \n \n {children}\n \n \n \n \n );\n }\n}\n\nconst styles = StyleSheet.create({\n container: {\n overflow: 'hidden',\n },\n leftActions: {\n ...StyleSheet.absoluteFillObject,\n flexDirection: I18nManager.isRTL ? 'row-reverse' : 'row',\n },\n rightActions: {\n ...StyleSheet.absoluteFillObject,\n flexDirection: I18nManager.isRTL ? 'row' : 'row-reverse',\n },\n});\n","import * as React from 'react';\nimport { StyleSheet, StyleProp, ViewStyle } from 'react-native';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport GestureHandlerRootView from './GestureHandlerRootView';\n\nexport default function gestureHandlerRootHOC<\n P extends Record\n>(\n Component: React.ComponentType

,\n containerStyles?: StyleProp\n): React.ComponentType

{\n function Wrapper(props: P) {\n return (\n \n \n \n );\n }\n\n Wrapper.displayName = `gestureHandlerRootHOC(${\n Component.displayName || Component.name\n })`;\n\n // @ts-ignore - hoistNonReactStatics uses old version of @types/react\n hoistNonReactStatics(Wrapper, Component);\n\n return Wrapper;\n}\n\nconst styles = StyleSheet.create({\n container: { flex: 1 },\n});\n","import * as React from 'react';\nimport { Component } from 'react';\nimport {\n Animated,\n Platform,\n StyleProp,\n ViewStyle,\n TouchableWithoutFeedbackProps,\n} from 'react-native';\n\nimport { State } from '../../State';\nimport { BaseButton } from '../GestureButtons';\n\nimport {\n GestureEvent,\n HandlerStateChangeEvent,\n} from '../../handlers/gestureHandlerCommon';\nimport { NativeViewGestureHandlerPayload } from '../../handlers/NativeViewGestureHandler';\nimport { TouchableNativeFeedbackExtraProps } from './TouchableNativeFeedback.android';\n\n/**\n * Each touchable is a states' machine which preforms transitions.\n * On very beginning (and on the very end or recognition) touchable is\n * UNDETERMINED. Then it moves to BEGAN. If touchable recognizes that finger\n * travel outside it transits to special MOVED_OUTSIDE state. Gesture recognition\n * finishes in UNDETERMINED state.\n */\nexport const TOUCHABLE_STATE = {\n UNDETERMINED: 0,\n BEGAN: 1,\n MOVED_OUTSIDE: 2,\n} as const;\n\ntype TouchableState = typeof TOUCHABLE_STATE[keyof typeof TOUCHABLE_STATE];\n\nexport interface GenericTouchableProps extends TouchableWithoutFeedbackProps {\n // Decided to drop not used fields from RN's implementation.\n // e.g. onBlur and onFocus as well as deprecated props. - TODO: this comment may be unuseful in this moment\n\n // TODO: in RN these events get native event parameter, which prolly could be used in our implementation too\n onPress?: () => void;\n onPressIn?: () => void;\n onPressOut?: () => void;\n onLongPress?: () => void;\n\n nativeID?: string;\n shouldActivateOnStart?: boolean;\n disallowInterruption?: boolean;\n\n containerStyle?: StyleProp;\n}\n\ninterface InternalProps {\n extraButtonProps: TouchableNativeFeedbackExtraProps;\n onStateChange?: (oldState: TouchableState, newState: TouchableState) => void;\n}\n\n// TODO: maybe can be better\n// TODO: all clearTimeout have ! added, maybe they shouldn't ?\ntype Timeout = ReturnType | null | undefined;\n\n/**\n * GenericTouchable is not intented to be used as it is.\n * Should be treated as a source for the rest of touchables\n */\n\nexport default class GenericTouchable extends Component<\n GenericTouchableProps & InternalProps\n> {\n static defaultProps = {\n delayLongPress: 600,\n extraButtonProps: {\n rippleColor: 'transparent',\n exclusive: true,\n },\n };\n\n // timeout handlers\n pressInTimeout: Timeout;\n pressOutTimeout: Timeout;\n longPressTimeout: Timeout;\n\n // This flag is required since recognition of longPress implies not-invoking onPress\n longPressDetected = false;\n\n pointerInside = true;\n\n // State of touchable\n STATE: TouchableState = TOUCHABLE_STATE.UNDETERMINED;\n\n // handlePressIn in called on first touch on traveling inside component.\n // Handles state transition with delay.\n handlePressIn() {\n if (this.props.delayPressIn) {\n this.pressInTimeout = setTimeout(() => {\n this.moveToState(TOUCHABLE_STATE.BEGAN);\n this.pressInTimeout = null;\n }, this.props.delayPressIn);\n } else {\n this.moveToState(TOUCHABLE_STATE.BEGAN);\n }\n if (this.props.onLongPress) {\n const time =\n (this.props.delayPressIn || 0) + (this.props.delayLongPress || 0);\n this.longPressTimeout = setTimeout(this.onLongPressDetected, time);\n }\n }\n // handleMoveOutside in called on traveling outside component.\n // Handles state transition with delay.\n handleMoveOutside() {\n if (this.props.delayPressOut) {\n this.pressOutTimeout =\n this.pressOutTimeout ||\n setTimeout(() => {\n this.moveToState(TOUCHABLE_STATE.MOVED_OUTSIDE);\n this.pressOutTimeout = null;\n }, this.props.delayPressOut);\n } else {\n this.moveToState(TOUCHABLE_STATE.MOVED_OUTSIDE);\n }\n }\n\n // handleGoToUndetermined transits to UNDETERMINED state with proper delay\n handleGoToUndetermined() {\n clearTimeout(this.pressOutTimeout!); // TODO: maybe it can be undefined\n if (this.props.delayPressOut) {\n this.pressOutTimeout = setTimeout(() => {\n if (this.STATE === TOUCHABLE_STATE.UNDETERMINED) {\n this.moveToState(TOUCHABLE_STATE.BEGAN);\n }\n this.moveToState(TOUCHABLE_STATE.UNDETERMINED);\n this.pressOutTimeout = null;\n }, this.props.delayPressOut);\n } else {\n if (this.STATE === TOUCHABLE_STATE.UNDETERMINED) {\n this.moveToState(TOUCHABLE_STATE.BEGAN);\n }\n this.moveToState(TOUCHABLE_STATE.UNDETERMINED);\n }\n }\n\n componentDidMount() {\n this.reset();\n }\n // reset timeout to prevent memory leaks.\n reset() {\n this.longPressDetected = false;\n this.pointerInside = true;\n clearTimeout(this.pressInTimeout!);\n clearTimeout(this.pressOutTimeout!);\n clearTimeout(this.longPressTimeout!);\n this.pressOutTimeout = null;\n this.longPressTimeout = null;\n this.pressInTimeout = null;\n }\n\n // All states' transitions are defined here.\n moveToState(newState: TouchableState) {\n if (newState === this.STATE) {\n // Ignore dummy transitions\n return;\n }\n if (newState === TOUCHABLE_STATE.BEGAN) {\n // First touch and moving inside\n this.props.onPressIn?.();\n } else if (newState === TOUCHABLE_STATE.MOVED_OUTSIDE) {\n // Moving outside\n this.props.onPressOut?.();\n } else if (newState === TOUCHABLE_STATE.UNDETERMINED) {\n // Need to reset each time on transition to UNDETERMINED\n this.reset();\n if (this.STATE === TOUCHABLE_STATE.BEGAN) {\n // ... and if it happens inside button.\n this.props.onPressOut?.();\n }\n }\n // Finally call lister (used by subclasses)\n this.props.onStateChange?.(this.STATE, newState);\n // ... and make transition.\n this.STATE = newState;\n }\n\n onGestureEvent = ({\n nativeEvent: { pointerInside },\n }: GestureEvent) => {\n if (this.pointerInside !== pointerInside) {\n if (pointerInside) {\n this.onMoveIn();\n } else {\n this.onMoveOut();\n }\n }\n this.pointerInside = pointerInside;\n };\n\n onHandlerStateChange = ({\n nativeEvent,\n }: HandlerStateChangeEvent) => {\n const { state } = nativeEvent;\n if (state === State.CANCELLED || state === State.FAILED) {\n // Need to handle case with external cancellation (e.g. by ScrollView)\n this.moveToState(TOUCHABLE_STATE.UNDETERMINED);\n } else if (\n // This platform check is an implication of slightly different behavior of handlers on different platform.\n // And Android \"Active\" state is achieving on first move of a finger, not on press in.\n // On iOS event on \"Began\" is not delivered.\n state === (Platform.OS !== 'android' ? State.ACTIVE : State.BEGAN) &&\n this.STATE === TOUCHABLE_STATE.UNDETERMINED\n ) {\n // Moving inside requires\n this.handlePressIn();\n } else if (state === State.END) {\n const shouldCallOnPress =\n !this.longPressDetected &&\n this.STATE !== TOUCHABLE_STATE.MOVED_OUTSIDE &&\n this.pressOutTimeout === null;\n this.handleGoToUndetermined();\n if (shouldCallOnPress) {\n // Calls only inside component whether no long press was called previously\n this.props.onPress?.();\n }\n }\n };\n\n onLongPressDetected = () => {\n this.longPressDetected = true;\n // checked for in the caller of `onLongPressDetected`, but better to check twice\n this.props.onLongPress?.();\n };\n\n componentWillUnmount() {\n // to prevent memory leaks\n this.reset();\n }\n\n onMoveIn() {\n if (this.STATE === TOUCHABLE_STATE.MOVED_OUTSIDE) {\n // This call is not throttled with delays (like in RN's implementation).\n this.moveToState(TOUCHABLE_STATE.BEGAN);\n }\n }\n\n onMoveOut() {\n // long press should no longer be detected\n clearTimeout(this.longPressTimeout!);\n this.longPressTimeout = null;\n if (this.STATE === TOUCHABLE_STATE.BEGAN) {\n this.handleMoveOutside();\n }\n }\n\n render() {\n const hitSlop =\n (typeof this.props.hitSlop === 'number'\n ? {\n top: this.props.hitSlop,\n left: this.props.hitSlop,\n bottom: this.props.hitSlop,\n right: this.props.hitSlop,\n }\n : this.props.hitSlop) ?? undefined;\n\n const coreProps = {\n accessible: this.props.accessible !== false,\n accessibilityLabel: this.props.accessibilityLabel,\n accessibilityHint: this.props.accessibilityHint,\n accessibilityRole: this.props.accessibilityRole,\n // TODO: check if changed to no 's' correctly, also removed 2 props that are no longer available: `accessibilityComponentType` and `accessibilityTraits`,\n // would be good to check if it is ok for sure, see: https://github.com/facebook/react-native/issues/24016\n accessibilityState: this.props.accessibilityState,\n accessibilityActions: this.props.accessibilityActions,\n onAccessibilityAction: this.props.onAccessibilityAction,\n nativeID: this.props.nativeID,\n onLayout: this.props.onLayout,\n hitSlop: hitSlop as\n | Animated.WithAnimatedObject\n | undefined,\n };\n\n return (\n \n \n {this.props.children}\n \n \n );\n }\n}\n","import * as React from 'react';\nimport { Component } from 'react';\nimport GenericTouchable, {\n GenericTouchableProps,\n TOUCHABLE_STATE,\n} from './GenericTouchable';\nimport {\n StyleSheet,\n View,\n TouchableHighlightProps,\n ColorValue,\n ViewProps,\n} from 'react-native';\n\ninterface State {\n extraChildStyle: null | {\n opacity?: number;\n };\n extraUnderlayStyle: null | {\n backgroundColor?: ColorValue;\n };\n}\n\n/**\n * TouchableHighlight follows RN's implementation\n */\nexport default class TouchableHighlight extends Component<\n TouchableHighlightProps & GenericTouchableProps,\n State\n> {\n static defaultProps = {\n ...GenericTouchable.defaultProps,\n activeOpacity: 0.85,\n delayPressOut: 100,\n underlayColor: 'black',\n };\n\n constructor(props: TouchableHighlightProps & GenericTouchableProps) {\n super(props);\n this.state = {\n extraChildStyle: null,\n extraUnderlayStyle: null,\n };\n }\n\n // Copied from RN\n showUnderlay = () => {\n if (!this.hasPressHandler()) {\n return;\n }\n this.setState({\n extraChildStyle: {\n opacity: this.props.activeOpacity,\n },\n extraUnderlayStyle: {\n backgroundColor: this.props.underlayColor,\n },\n });\n this.props.onShowUnderlay?.();\n };\n\n hasPressHandler = () =>\n this.props.onPress ||\n this.props.onPressIn ||\n this.props.onPressOut ||\n this.props.onLongPress;\n\n hideUnderlay = () => {\n this.setState({\n extraChildStyle: null,\n extraUnderlayStyle: null,\n });\n this.props.onHideUnderlay?.();\n };\n\n renderChildren() {\n if (!this.props.children) {\n return ;\n }\n\n const child = React.Children.only(\n this.props.children\n ) as React.ReactElement; // TODO: not sure if OK but fixes error\n return React.cloneElement(child, {\n style: StyleSheet.compose(child.props.style, this.state.extraChildStyle),\n });\n }\n\n onStateChange = (_from: number, to: number) => {\n if (to === TOUCHABLE_STATE.BEGAN) {\n this.showUnderlay();\n } else if (\n to === TOUCHABLE_STATE.UNDETERMINED ||\n to === TOUCHABLE_STATE.MOVED_OUTSIDE\n ) {\n this.hideUnderlay();\n }\n };\n\n render() {\n const { style = {}, ...rest } = this.props;\n const { extraUnderlayStyle } = this.state;\n return (\n \n {this.renderChildren()}\n \n );\n }\n}\n","import { TouchableNativeFeedback } from 'react-native';\n\nexport default TouchableNativeFeedback;\n","import {\n Animated,\n Easing,\n StyleSheet,\n View,\n TouchableOpacityProps,\n} from 'react-native';\nimport GenericTouchable, {\n TOUCHABLE_STATE,\n GenericTouchableProps,\n} from './GenericTouchable';\nimport * as React from 'react';\nimport { Component } from 'react';\n\ninterface GHTouchableOpacityProps {\n useNativeAnimations?: boolean;\n}\n\n/**\n * TouchableOpacity bases on timing animation which has been used in RN's core\n */\nexport default class TouchableOpacity extends Component<\n TouchableOpacityProps & GenericTouchableProps & GHTouchableOpacityProps\n> {\n static defaultProps = {\n ...GenericTouchable.defaultProps,\n activeOpacity: 0.2,\n };\n\n // opacity is 1 one by default but could be overwritten\n getChildStyleOpacityWithDefault = () => {\n const childStyle = StyleSheet.flatten(this.props.style) || {};\n return childStyle.opacity == null\n ? 1\n : (childStyle.opacity.valueOf() as number);\n };\n\n opacity = new Animated.Value(this.getChildStyleOpacityWithDefault());\n\n setOpacityTo = (value: number, duration: number) => {\n Animated.timing(this.opacity, {\n toValue: value,\n duration: duration,\n easing: Easing.inOut(Easing.quad),\n useNativeDriver: this.props.useNativeAnimations ?? true,\n }).start();\n };\n\n onStateChange = (_from: number, to: number) => {\n if (to === TOUCHABLE_STATE.BEGAN) {\n this.setOpacityTo(this.props.activeOpacity!, 0);\n } else if (\n to === TOUCHABLE_STATE.UNDETERMINED ||\n to === TOUCHABLE_STATE.MOVED_OUTSIDE\n ) {\n this.setOpacityTo(this.getChildStyleOpacityWithDefault(), 150);\n }\n };\n\n render() {\n const { style = {}, ...rest } = this.props;\n return (\n \n {this.props.children ? this.props.children : }\n \n );\n }\n}\n","import * as React from 'react';\nimport { PropsWithChildren } from 'react';\nimport GenericTouchable, { GenericTouchableProps } from './GenericTouchable';\n\nconst TouchableWithoutFeedback = React.forwardRef<\n GenericTouchable,\n PropsWithChildren\n>((props, ref) => );\n\nTouchableWithoutFeedback.defaultProps = GenericTouchable.defaultProps;\n\nexport default TouchableWithoutFeedback;\n","export { default as TouchableNativeFeedback } from './TouchableNativeFeedback';\nexport { default as TouchableWithoutFeedback } from './TouchableWithoutFeedback';\nexport { default as TouchableOpacity } from './TouchableOpacity';\nexport { default as TouchableHighlight } from './TouchableHighlight';\n","// Used by GestureDetector (unsupported on web at the moment) to check whether the\n// attached view may get flattened on Fabric. Original implementation causes errors\n// on web due to the static resolution of `require` statements by webpack breaking\n// the conditional importing.\nexport function getShadowNodeFromRef(_ref: any) {\n return null;\n}\n","import createHandler from './createHandler';\nimport {\n BaseGestureHandlerProps,\n baseGestureHandlerProps,\n} from './gestureHandlerCommon';\n\nexport const flingGestureHandlerProps = [\n 'numberOfPointers',\n 'direction',\n] as const;\n\nexport type FlingGestureHandlerEventPayload = {\n x: number;\n y: number;\n absoluteX: number;\n absoluteY: number;\n};\nexport interface FlingGestureConfig {\n /**\n * Expressed allowed direction of movement. It's possible to pass one or many\n * directions in one parameter:\n *\n * ```js\n * direction={Directions.RIGHT | Directions.LEFT}\n * ```\n *\n * or\n *\n * ```js\n * direction={Directions.DOWN}\n * ```\n */\n direction?: number;\n\n /**\n * Determine exact number of points required to handle the fling gesture.\n */\n numberOfPointers?: number;\n}\n\nexport interface FlingGestureHandlerProps\n extends BaseGestureHandlerProps,\n FlingGestureConfig {}\n\nexport const flingHandlerName = 'FlingGestureHandler';\n\nexport type FlingGestureHandler = typeof FlingGestureHandler;\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file\nexport const FlingGestureHandler = createHandler<\n FlingGestureHandlerProps,\n FlingGestureHandlerEventPayload\n>({\n name: flingHandlerName,\n allowedProps: [\n ...baseGestureHandlerProps,\n ...flingGestureHandlerProps,\n ] as const,\n config: {},\n});\n","import React, { PropsWithChildren } from 'react';\nimport { tagMessage } from '../utils';\nimport PlatformConstants from '../PlatformConstants';\nimport createHandler from './createHandler';\nimport {\n BaseGestureHandlerProps,\n baseGestureHandlerProps,\n} from './gestureHandlerCommon';\n\nexport const forceTouchGestureHandlerProps = [\n 'minForce',\n 'maxForce',\n 'feedbackOnActivation',\n] as const;\n\n// implicit `children` prop has been removed in @types/react^18.0.0\nclass ForceTouchFallback extends React.Component> {\n static forceTouchAvailable = false;\n componentDidMount() {\n console.warn(\n tagMessage(\n 'ForceTouchGestureHandler is not available on this platform. Please use ForceTouchGestureHandler.forceTouchAvailable to conditionally render other components that would provide a fallback behavior specific to your usecase'\n )\n );\n }\n render() {\n return this.props.children;\n }\n}\n\nexport type ForceTouchGestureHandlerEventPayload = {\n x: number;\n y: number;\n absoluteX: number;\n absoluteY: number;\n\n /**\n * The pressure of a touch.\n */\n force: number;\n};\n\nexport interface ForceTouchGestureConfig {\n /**\n *\n * A minimal pressure that is required before handler can activate. Should be a\n * value from range `[0.0, 1.0]`. Default is `0.2`.\n */\n minForce?: number;\n\n /**\n * A maximal pressure that could be applied for handler. If the pressure is\n * greater, handler fails. Should be a value from range `[0.0, 1.0]`.\n */\n maxForce?: number;\n\n /**\n * Boolean value defining if haptic feedback has to be performed on\n * activation.\n */\n feedbackOnActivation?: boolean;\n}\n\nexport interface ForceTouchGestureHandlerProps\n extends BaseGestureHandlerProps,\n ForceTouchGestureConfig {}\n\nexport type ForceTouchGestureHandler = typeof ForceTouchGestureHandler & {\n forceTouchAvailable: boolean;\n};\n\nexport const forceTouchHandlerName = 'ForceTouchGestureHandler';\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file\nexport const ForceTouchGestureHandler = PlatformConstants?.forceTouchAvailable\n ? createHandler<\n ForceTouchGestureHandlerProps,\n ForceTouchGestureHandlerEventPayload\n >({\n name: forceTouchHandlerName,\n allowedProps: [\n ...baseGestureHandlerProps,\n ...forceTouchGestureHandlerProps,\n ] as const,\n config: {},\n })\n : ForceTouchFallback;\n\n(ForceTouchGestureHandler as ForceTouchGestureHandler).forceTouchAvailable =\n PlatformConstants?.forceTouchAvailable || false;\n","import createHandler from './createHandler';\nimport {\n BaseGestureHandlerProps,\n baseGestureHandlerProps,\n} from './gestureHandlerCommon';\n\nexport const longPressGestureHandlerProps = [\n 'minDurationMs',\n 'maxDist',\n] as const;\n\nexport type LongPressGestureHandlerEventPayload = {\n /**\n * X coordinate, expressed in points, of the current position of the pointer\n * (finger or a leading pointer when there are multiple fingers placed)\n * relative to the view attached to the handler.\n */\n x: number;\n\n /**\n * Y coordinate, expressed in points, of the current position of the pointer\n * (finger or a leading pointer when there are multiple fingers placed)\n * relative to the view attached to the handler.\n */\n y: number;\n\n /**\n * X coordinate, expressed in points, of the current position of the pointer\n * (finger or a leading pointer when there are multiple fingers placed)\n * relative to the window. It is recommended to use `absoluteX` instead of\n * `x` in cases when the view attached to the handler can be transformed as an\n * effect of the gesture.\n */\n absoluteX: number;\n\n /**\n * Y coordinate, expressed in points, of the current position of the pointer\n * (finger or a leading pointer when there are multiple fingers placed)\n * relative to the window. It is recommended to use `absoluteY` instead of\n * `y` in cases when the view attached to the handler can be transformed as an\n * effect of the gesture.\n */\n absoluteY: number;\n\n /**\n * Duration of the long press (time since the start of the event), expressed\n * in milliseconds.\n */\n duration: number;\n};\n\nexport interface LongPressGestureConfig {\n /**\n * Minimum time, expressed in milliseconds, that a finger must remain pressed on\n * the corresponding view. The default value is 500.\n */\n minDurationMs?: number;\n\n /**\n * Maximum distance, expressed in points, that defines how far the finger is\n * allowed to travel during a long press gesture. If the finger travels\n * further than the defined distance and the handler hasn't yet activated, it\n * will fail to recognize the gesture. The default value is 10.\n */\n maxDist?: number;\n}\n\nexport interface LongPressGestureHandlerProps\n extends BaseGestureHandlerProps,\n LongPressGestureConfig {}\n\nexport const longPressHandlerName = 'LongPressGestureHandler';\n\nexport type LongPressGestureHandler = typeof LongPressGestureHandler;\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file\nexport const LongPressGestureHandler = createHandler<\n LongPressGestureHandlerProps,\n LongPressGestureHandlerEventPayload\n>({\n name: longPressHandlerName,\n allowedProps: [\n ...baseGestureHandlerProps,\n ...longPressGestureHandlerProps,\n ] as const,\n config: {\n shouldCancelWhenOutside: true,\n },\n});\n","import createHandler from './createHandler';\nimport {\n BaseGestureHandlerProps,\n baseGestureHandlerProps,\n} from './gestureHandlerCommon';\n\nexport const nativeViewGestureHandlerProps = [\n 'shouldActivateOnStart',\n 'disallowInterruption',\n] as const;\n\nexport interface NativeViewGestureConfig {\n /**\n * Android only.\n *\n * Determines whether the handler should check for an existing touch event on\n * instantiation.\n */\n shouldActivateOnStart?: boolean;\n\n /**\n * When `true`, cancels all other gesture handlers when this\n * `NativeViewGestureHandler` receives an `ACTIVE` state event.\n */\n disallowInterruption?: boolean;\n}\n\nexport interface NativeViewGestureHandlerProps\n extends BaseGestureHandlerProps,\n NativeViewGestureConfig {}\n\nexport type NativeViewGestureHandlerPayload = {\n /**\n * True if gesture was performed inside of containing view, false otherwise.\n */\n pointerInside: boolean;\n};\n\nexport const nativeViewProps = [\n ...baseGestureHandlerProps,\n ...nativeViewGestureHandlerProps,\n] as const;\n\nexport const nativeViewHandlerName = 'NativeViewGestureHandler';\n\nexport type NativeViewGestureHandler = typeof NativeViewGestureHandler;\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file\nexport const NativeViewGestureHandler = createHandler<\n NativeViewGestureHandlerProps,\n NativeViewGestureHandlerPayload\n>({\n name: nativeViewHandlerName,\n allowedProps: nativeViewProps,\n config: {},\n});\n","import createHandler from './createHandler';\nimport {\n BaseGestureHandlerProps,\n baseGestureHandlerProps,\n} from './gestureHandlerCommon';\n\nexport const panGestureHandlerProps = [\n 'activeOffsetY',\n 'activeOffsetX',\n 'failOffsetY',\n 'failOffsetX',\n 'minDist',\n 'minVelocity',\n 'minVelocityX',\n 'minVelocityY',\n 'minPointers',\n 'maxPointers',\n 'avgTouches',\n 'enableTrackpadTwoFingerGesture',\n 'activateAfterLongPress',\n] as const;\n\nexport const panGestureHandlerCustomNativeProps = [\n 'activeOffsetYStart',\n 'activeOffsetYEnd',\n 'activeOffsetXStart',\n 'activeOffsetXEnd',\n 'failOffsetYStart',\n 'failOffsetYEnd',\n 'failOffsetXStart',\n 'failOffsetXEnd',\n] as const;\n\nexport type PanGestureHandlerEventPayload = {\n /**\n * X coordinate of the current position of the pointer (finger or a leading\n * pointer when there are multiple fingers placed) relative to the view\n * attached to the handler. Expressed in point units.\n */\n x: number;\n\n /**\n * Y coordinate of the current position of the pointer (finger or a leading\n * pointer when there are multiple fingers placed) relative to the view\n * attached to the handler. Expressed in point units.\n */\n y: number;\n\n /**\n * X coordinate of the current position of the pointer (finger or a leading\n * pointer when there are multiple fingers placed) relative to the window.\n * The value is expressed in point units. It is recommended to use it instead\n * of `x` in cases when the original view can be transformed as an effect of\n * the gesture.\n */\n absoluteX: number;\n\n /**\n * Y coordinate of the current position of the pointer (finger or a leading\n * pointer when there are multiple fingers placed) relative to the window.\n * The value is expressed in point units. It is recommended to use it instead\n * of `y` in cases when the original view can be transformed as an\n * effect of the gesture.\n */\n absoluteY: number;\n\n /**\n * Translation of the pan gesture along X axis accumulated over the time of\n * the gesture. The value is expressed in the point units.\n */\n translationX: number;\n\n /**\n * Translation of the pan gesture along Y axis accumulated over the time of\n * the gesture. The value is expressed in the point units.\n */\n translationY: number;\n\n /**\n * Velocity of the pan gesture along the X axis in the current moment. The\n * value is expressed in point units per second.\n */\n velocityX: number;\n\n /**\n * Velocity of the pan gesture along the Y axis in the current moment. The\n * value is expressed in point units per second.\n */\n velocityY: number;\n};\n\ninterface CommonPanProperties {\n /**\n * Minimum distance the finger (or multiple finger) need to travel before the\n * handler activates. Expressed in points.\n */\n minDist?: number;\n\n /**\n * Android only.\n */\n avgTouches?: boolean;\n\n /**\n * Enables two-finger gestures on supported devices, for example iPads with\n * trackpads. If not enabled the gesture will require click + drag, with\n * enableTrackpadTwoFingerGesture swiping with two fingers will also trigger\n * the gesture.\n */\n enableTrackpadTwoFingerGesture?: boolean;\n\n /**\n * A number of fingers that is required to be placed before handler can\n * activate. Should be a higher or equal to 0 integer.\n */\n minPointers?: number;\n\n /**\n * When the given number of fingers is placed on the screen and handler hasn't\n * yet activated it will fail recognizing the gesture. Should be a higher or\n * equal to 0 integer.\n */\n maxPointers?: number;\n\n minVelocity?: number;\n minVelocityX?: number;\n minVelocityY?: number;\n activateAfterLongPress?: number;\n}\n\nexport interface PanGestureConfig extends CommonPanProperties {\n activeOffsetYStart?: number;\n activeOffsetYEnd?: number;\n activeOffsetXStart?: number;\n activeOffsetXEnd?: number;\n failOffsetYStart?: number;\n failOffsetYEnd?: number;\n failOffsetXStart?: number;\n failOffsetXEnd?: number;\n}\n\nexport interface PanGestureHandlerProps\n extends BaseGestureHandlerProps,\n CommonPanProperties {\n /**\n * Range along X axis (in points) where fingers travels without activation of\n * handler. Moving outside of this range implies activation of handler. Range\n * can be given as an array or a single number. If range is set as an array,\n * first value must be lower or equal to 0, a the second one higher or equal\n * to 0. If only one number `p` is given a range of `(-inf, p)` will be used\n * if `p` is higher or equal to 0 and `(-p, inf)` otherwise.\n */\n activeOffsetY?: number | number[];\n\n /**\n * Range along X axis (in points) where fingers travels without activation of\n * handler. Moving outside of this range implies activation of handler. Range\n * can be given as an array or a single number. If range is set as an array,\n * first value must be lower or equal to 0, a the second one higher or equal\n * to 0. If only one number `p` is given a range of `(-inf, p)` will be used\n * if `p` is higher or equal to 0 and `(-p, inf)` otherwise.\n */\n activeOffsetX?: number | number[];\n\n /**\n * When the finger moves outside this range (in points) along Y axis and\n * handler hasn't yet activated it will fail recognizing the gesture. Range\n * can be given as an array or a single number. If range is set as an array,\n * first value must be lower or equal to 0, a the second one higher or equal\n * to 0. If only one number `p` is given a range of `(-inf, p)` will be used\n * if `p` is higher or equal to 0 and `(-p, inf)` otherwise.\n */\n failOffsetY?: number | number[];\n\n /**\n * When the finger moves outside this range (in points) along X axis and\n * handler hasn't yet activated it will fail recognizing the gesture. Range\n * can be given as an array or a single number. If range is set as an array,\n * first value must be lower or equal to 0, a the second one higher or equal\n * to 0. If only one number `p` is given a range of `(-inf, p)` will be used\n * if `p` is higher or equal to 0 and `(-p, inf)` otherwise.\n */\n failOffsetX?: number | number[];\n}\n\nexport const panHandlerName = 'PanGestureHandler';\n\nexport type PanGestureHandler = typeof PanGestureHandler;\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file\nexport const PanGestureHandler = createHandler<\n PanGestureHandlerProps,\n PanGestureHandlerEventPayload\n>({\n name: panHandlerName,\n allowedProps: [\n ...baseGestureHandlerProps,\n ...panGestureHandlerProps,\n ] as const,\n config: {},\n transformProps: managePanProps,\n customNativeProps: panGestureHandlerCustomNativeProps,\n});\n\nfunction validatePanGestureHandlerProps(props: PanGestureHandlerProps) {\n if (\n Array.isArray(props.activeOffsetX) &&\n (props.activeOffsetX[0] > 0 || props.activeOffsetX[1] < 0)\n ) {\n throw new Error(\n `First element of activeOffsetX should be negative, a the second one should be positive`\n );\n }\n\n if (\n Array.isArray(props.activeOffsetY) &&\n (props.activeOffsetY[0] > 0 || props.activeOffsetY[1] < 0)\n ) {\n throw new Error(\n `First element of activeOffsetY should be negative, a the second one should be positive`\n );\n }\n\n if (\n Array.isArray(props.failOffsetX) &&\n (props.failOffsetX[0] > 0 || props.failOffsetX[1] < 0)\n ) {\n throw new Error(\n `First element of failOffsetX should be negative, a the second one should be positive`\n );\n }\n\n if (\n Array.isArray(props.failOffsetY) &&\n (props.failOffsetY[0] > 0 || props.failOffsetY[1] < 0)\n ) {\n throw new Error(\n `First element of failOffsetY should be negative, a the second one should be positive`\n );\n }\n\n if (props.minDist && (props.failOffsetX || props.failOffsetY)) {\n throw new Error(\n `It is not supported to use minDist with failOffsetX or failOffsetY, use activeOffsetX and activeOffsetY instead`\n );\n }\n\n if (props.minDist && (props.activeOffsetX || props.activeOffsetY)) {\n throw new Error(\n `It is not supported to use minDist with activeOffsetX or activeOffsetY`\n );\n }\n}\n\nfunction transformPanGestureHandlerProps(props: PanGestureHandlerProps) {\n type InternalPanGHKeys =\n | 'activeOffsetXStart'\n | 'activeOffsetXEnd'\n | 'failOffsetXStart'\n | 'failOffsetXEnd'\n | 'activeOffsetYStart'\n | 'activeOffsetYEnd'\n | 'failOffsetYStart'\n | 'failOffsetYEnd';\n type PanGestureHandlerInternalProps = PanGestureHandlerProps &\n Partial>;\n\n const res: PanGestureHandlerInternalProps = { ...props };\n\n if (props.activeOffsetX !== undefined) {\n delete res.activeOffsetX;\n if (Array.isArray(props.activeOffsetX)) {\n res.activeOffsetXStart = props.activeOffsetX[0];\n res.activeOffsetXEnd = props.activeOffsetX[1];\n } else if (props.activeOffsetX < 0) {\n res.activeOffsetXStart = props.activeOffsetX;\n } else {\n res.activeOffsetXEnd = props.activeOffsetX;\n }\n }\n\n if (props.activeOffsetY !== undefined) {\n delete res.activeOffsetY;\n if (Array.isArray(props.activeOffsetY)) {\n res.activeOffsetYStart = props.activeOffsetY[0];\n res.activeOffsetYEnd = props.activeOffsetY[1];\n } else if (props.activeOffsetY < 0) {\n res.activeOffsetYStart = props.activeOffsetY;\n } else {\n res.activeOffsetYEnd = props.activeOffsetY;\n }\n }\n\n if (props.failOffsetX !== undefined) {\n delete res.failOffsetX;\n if (Array.isArray(props.failOffsetX)) {\n res.failOffsetXStart = props.failOffsetX[0];\n res.failOffsetXEnd = props.failOffsetX[1];\n } else if (props.failOffsetX < 0) {\n res.failOffsetXStart = props.failOffsetX;\n } else {\n res.failOffsetXEnd = props.failOffsetX;\n }\n }\n\n if (props.failOffsetY !== undefined) {\n delete res.failOffsetY;\n if (Array.isArray(props.failOffsetY)) {\n res.failOffsetYStart = props.failOffsetY[0];\n res.failOffsetYEnd = props.failOffsetY[1];\n } else if (props.failOffsetY < 0) {\n res.failOffsetYStart = props.failOffsetY;\n } else {\n res.failOffsetYEnd = props.failOffsetY;\n }\n }\n\n return res;\n}\n\nexport function managePanProps(props: PanGestureHandlerProps) {\n if (__DEV__) {\n validatePanGestureHandlerProps(props);\n }\n return transformPanGestureHandlerProps(props);\n}\n","import createHandler from './createHandler';\nimport {\n BaseGestureHandlerProps,\n baseGestureHandlerProps,\n} from './gestureHandlerCommon';\n\nexport type PinchGestureHandlerEventPayload = {\n /**\n * The scale factor relative to the points of the two touches in screen\n * coordinates.\n */\n scale: number;\n\n /**\n * Position expressed in points along X axis of center anchor point of\n * gesture.\n */\n focalX: number;\n\n /**\n * Position expressed in points along Y axis of center anchor point of\n * gesture.\n */\n focalY: number;\n\n /**\n *\n * Velocity of the pan gesture the current moment. The value is expressed in\n * point units per second.\n */\n velocity: number;\n};\n\nexport interface PinchGestureHandlerProps\n extends BaseGestureHandlerProps {}\n\nexport const pinchHandlerName = 'PinchGestureHandler';\n\nexport type PinchGestureHandler = typeof PinchGestureHandler;\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file\nexport const PinchGestureHandler = createHandler<\n PinchGestureHandlerProps,\n PinchGestureHandlerEventPayload\n>({\n name: pinchHandlerName,\n allowedProps: baseGestureHandlerProps,\n config: {},\n});\n","// PressabilityDebugView is not implemented in react-native-web\nexport function PressabilityDebugView() {\n return null;\n}\n","import createHandler from './createHandler';\nimport {\n BaseGestureHandlerProps,\n baseGestureHandlerProps,\n} from './gestureHandlerCommon';\n\nexport type RotationGestureHandlerEventPayload = {\n /**\n * Amount rotated, expressed in radians, from the gesture's focal point\n * (anchor).\n */\n rotation: number;\n\n /**\n * X coordinate, expressed in points, of the gesture's central focal point\n * (anchor).\n */\n anchorX: number;\n\n /**\n * Y coordinate, expressed in points, of the gesture's central focal point\n * (anchor).\n */\n anchorY: number;\n\n /**\n *\n * Instantaneous velocity, expressed in point units per second, of the\n * gesture.\n */\n velocity: number;\n};\n\nexport interface RotationGestureHandlerProps\n extends BaseGestureHandlerProps {}\n\nexport const rotationHandlerName = 'RotationGestureHandler';\n\nexport type RotationGestureHandler = typeof RotationGestureHandler;\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file\nexport const RotationGestureHandler = createHandler<\n RotationGestureHandlerProps,\n RotationGestureHandlerEventPayload\n>({\n name: rotationHandlerName,\n allowedProps: baseGestureHandlerProps,\n config: {},\n});\n","import createHandler from './createHandler';\nimport {\n BaseGestureHandlerProps,\n baseGestureHandlerProps,\n} from './gestureHandlerCommon';\n\nexport const tapGestureHandlerProps = [\n 'maxDurationMs',\n 'maxDelayMs',\n 'numberOfTaps',\n 'maxDeltaX',\n 'maxDeltaY',\n 'maxDist',\n 'minPointers',\n] as const;\n\nexport type TapGestureHandlerEventPayload = {\n x: number;\n y: number;\n absoluteX: number;\n absoluteY: number;\n};\nexport interface TapGestureConfig {\n /**\n * Minimum number of pointers (fingers) required to be placed before the\n * handler activates. Should be a positive integer.\n * The default value is 1.\n */\n minPointers?: number;\n\n /**\n * Maximum time, expressed in milliseconds, that defines how fast a finger\n * must be released after a touch. The default value is 500.\n */\n maxDurationMs?: number;\n\n /**\n * Maximum time, expressed in milliseconds, that can pass before the next tap\n * if many taps are required. The default value is 500.\n */\n maxDelayMs?: number;\n\n /**\n * Number of tap gestures required to activate the handler. The default value\n * is 1.\n */\n numberOfTaps?: number;\n\n /**\n * Maximum distance, expressed in points, that defines how far the finger is\n * allowed to travel along the X axis during a tap gesture. If the finger\n * travels further than the defined distance along the X axis and the handler\n * hasn't yet activated, it will fail to recognize the gesture.\n */\n maxDeltaX?: number;\n\n /**\n * Maximum distance, expressed in points, that defines how far the finger is\n * allowed to travel along the Y axis during a tap gesture. If the finger\n * travels further than the defined distance along the Y axis and the handler\n * hasn't yet activated, it will fail to recognize the gesture.\n */\n maxDeltaY?: number;\n\n /**\n * Maximum distance, expressed in points, that defines how far the finger is\n * allowed to travel during a tap gesture. If the finger travels further than\n * the defined distance and the handler hasn't yet\n * activated, it will fail to recognize the gesture.\n */\n maxDist?: number;\n}\n\nexport interface TapGestureHandlerProps\n extends BaseGestureHandlerProps,\n TapGestureConfig {}\n\nexport const tapHandlerName = 'TapGestureHandler';\n\nexport type TapGestureHandler = typeof TapGestureHandler;\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file\nexport const TapGestureHandler = createHandler<\n TapGestureHandlerProps,\n TapGestureHandlerEventPayload\n>({\n name: tapHandlerName,\n allowedProps: [\n ...baseGestureHandlerProps,\n ...tapGestureHandlerProps,\n ] as const,\n config: {\n shouldCancelWhenOutside: true,\n },\n});\n","import * as React from 'react';\nimport {\n Platform,\n UIManager,\n DeviceEventEmitter,\n EmitterSubscription,\n} from 'react-native';\n// @ts-ignore - it isn't typed by TS & don't have definitelyTyped types\nimport deepEqual from 'lodash/isEqual';\nimport RNGestureHandlerModule from '../RNGestureHandlerModule';\nimport type RNGestureHandlerModuleWeb from '../RNGestureHandlerModule.web';\nimport { State } from '../State';\nimport {\n handlerIDToTag,\n getNextHandlerTag,\n registerOldGestureHandler,\n} from './handlersRegistry';\n\nimport {\n BaseGestureHandlerProps,\n filterConfig,\n GestureEvent,\n HandlerStateChangeEvent,\n findNodeHandle,\n scheduleFlushOperations,\n} from './gestureHandlerCommon';\nimport { ValueOf } from '../typeUtils';\nimport { isFabric, isJestEnv, tagMessage } from '../utils';\nimport { ActionType } from '../ActionType';\nimport { PressabilityDebugView } from './PressabilityDebugView';\nimport GestureHandlerRootViewContext from '../GestureHandlerRootViewContext';\n\nconst UIManagerAny = UIManager as any;\n\nconst customGHEventsConfigFabricAndroid = {\n topOnGestureHandlerEvent: { registrationName: 'onGestureHandlerEvent' },\n topOnGestureHandlerStateChange: {\n registrationName: 'onGestureHandlerStateChange',\n },\n};\n\nconst customGHEventsConfig = {\n onGestureHandlerEvent: { registrationName: 'onGestureHandlerEvent' },\n onGestureHandlerStateChange: {\n registrationName: 'onGestureHandlerStateChange',\n },\n\n // When using React Native Gesture Handler for Animated.event with useNativeDriver: true\n // on Android with Fabric enabled, the native part still sends the native events to JS\n // but prefixed with \"top\". We cannot simply rename the events above so they are prefixed\n // with \"top\" instead of \"on\" because in such case Animated.events would not be registered.\n // That's why we need to register another pair of event names.\n // The incoming events will be queued but never handled.\n // Without this piece of code below, you'll get the following JS error:\n // Unsupported top level event type \"topOnGestureHandlerEvent\" dispatched\n ...(isFabric() &&\n Platform.OS === 'android' &&\n customGHEventsConfigFabricAndroid),\n};\n\n// Add gesture specific events to genericDirectEventTypes object exported from UIManager\n// native module.\n// Once new event types are registered with react it is possible to dispatch these\n// events to all kind of native views.\nUIManagerAny.genericDirectEventTypes = {\n ...UIManagerAny.genericDirectEventTypes,\n ...customGHEventsConfig,\n};\n// In newer versions of RN the `genericDirectEventTypes` is located in the object\n// returned by UIManager.getViewManagerConfig('getConstants') or in older RN UIManager.getConstants(), we need to add it there as well to make\n// it compatible with RN 61+\nconst UIManagerConstants =\n UIManagerAny.getViewManagerConfig?.('getConstants') ??\n UIManagerAny.getConstants?.();\n\nif (UIManagerConstants) {\n UIManagerConstants.genericDirectEventTypes = {\n ...UIManagerConstants.genericDirectEventTypes,\n ...customGHEventsConfig,\n };\n}\n\n// Wrap JS responder calls and notify gesture handler manager\nconst {\n setJSResponder: oldSetJSResponder = () => {\n //no operation\n },\n clearJSResponder: oldClearJSResponder = () => {\n //no operation\n },\n} = UIManagerAny;\nUIManagerAny.setJSResponder = (tag: number, blockNativeResponder: boolean) => {\n RNGestureHandlerModule.handleSetJSResponder(tag, blockNativeResponder);\n oldSetJSResponder(tag, blockNativeResponder);\n};\nUIManagerAny.clearJSResponder = () => {\n RNGestureHandlerModule.handleClearJSResponder();\n oldClearJSResponder();\n};\n\nlet allowTouches = true;\nconst DEV_ON_ANDROID = __DEV__ && Platform.OS === 'android';\n// Toggled inspector blocks touch events in order to allow inspecting on Android\n// This needs to be a global variable in order to set initial state for `allowTouches` property in Handler component\nif (DEV_ON_ANDROID) {\n DeviceEventEmitter.addListener('toggleElementInspector', () => {\n allowTouches = !allowTouches;\n });\n}\n\ntype HandlerProps> = Readonly<\n React.PropsWithChildren>\n>;\nfunction hasUnresolvedRefs>(\n props: HandlerProps\n) {\n // TODO(TS) - add type for extract arg\n const extract = (refs: any | any[]) => {\n if (!Array.isArray(refs)) {\n return refs && refs.current === null;\n }\n return refs.some((r) => r && r.current === null);\n };\n return extract(props['simultaneousHandlers']) || extract(props['waitFor']);\n}\n\nconst stateToPropMappings = {\n [State.UNDETERMINED]: undefined,\n [State.BEGAN]: 'onBegan',\n [State.FAILED]: 'onFailed',\n [State.CANCELLED]: 'onCancelled',\n [State.ACTIVE]: 'onActivated',\n [State.END]: 'onEnded',\n} as const;\n\ntype CreateHandlerArgs> =\n Readonly<{\n name: string;\n allowedProps: Readonly[]>;\n config: Readonly>;\n transformProps?: (props: HandlerPropsT) => HandlerPropsT;\n customNativeProps?: Readonly;\n }>;\n\n// TODO(TS) fix event types\ntype InternalEventHandlers = {\n onGestureHandlerEvent?: (event: any) => void;\n onGestureHandlerStateChange?: (event: any) => void;\n};\n\nconst UNRESOLVED_REFS_RETRY_LIMIT = 1;\n\n// TODO(TS) - make sure that BaseGestureHandlerProps doesn't need other generic parameter to work with custom properties.\nexport default function createHandler<\n T extends BaseGestureHandlerProps,\n U extends Record\n>({\n name,\n allowedProps = [],\n config = {},\n transformProps,\n customNativeProps = [],\n}: CreateHandlerArgs): React.ComponentType> {\n interface HandlerState {\n allowTouches: boolean;\n }\n class Handler extends React.Component<\n T & InternalEventHandlers,\n HandlerState\n > {\n static displayName = name;\n static contextType = GestureHandlerRootViewContext;\n\n private handlerTag: number;\n private config: Record;\n private propsRef: React.MutableRefObject;\n private isMountedRef: React.MutableRefObject;\n private viewNode: any;\n private viewTag?: number;\n private inspectorToggleListener?: EmitterSubscription;\n\n constructor(props: T & InternalEventHandlers) {\n super(props);\n this.handlerTag = getNextHandlerTag();\n this.config = {};\n this.propsRef = React.createRef();\n this.isMountedRef = React.createRef();\n this.state = { allowTouches };\n if (props.id) {\n if (handlerIDToTag[props.id] !== undefined) {\n throw new Error(`Handler with ID \"${props.id}\" already registered`);\n }\n handlerIDToTag[props.id] = this.handlerTag;\n }\n }\n\n componentDidMount() {\n const props: HandlerProps = this.props;\n this.isMountedRef.current = true;\n\n if (DEV_ON_ANDROID) {\n this.inspectorToggleListener = DeviceEventEmitter.addListener(\n 'toggleElementInspector',\n () => {\n this.setState((_) => ({ allowTouches }));\n this.update(UNRESOLVED_REFS_RETRY_LIMIT);\n }\n );\n }\n if (hasUnresolvedRefs(props)) {\n // If there are unresolved refs (e.g. \".current\" has not yet been set)\n // passed as `simultaneousHandlers` or `waitFor`, we enqueue a call to\n // _update method that will try to update native handler props using\n // queueMicrotask. This makes it so update() function gets called after all\n // react components are mounted and we expect the missing ref object to\n // be resolved by then.\n queueMicrotask(() => {\n this.update(UNRESOLVED_REFS_RETRY_LIMIT);\n });\n }\n\n this.createGestureHandler(\n filterConfig(\n transformProps ? transformProps(this.props) : this.props,\n [...allowedProps, ...customNativeProps],\n config\n )\n );\n\n this.attachGestureHandler(findNodeHandle(this.viewNode) as number); // TODO(TS) - check if this can be null\n }\n\n componentDidUpdate() {\n const viewTag = findNodeHandle(this.viewNode);\n if (this.viewTag !== viewTag) {\n this.attachGestureHandler(viewTag as number); // TODO(TS) - check interaction between _viewTag & findNodeHandle\n }\n this.update(UNRESOLVED_REFS_RETRY_LIMIT);\n }\n\n componentWillUnmount() {\n this.inspectorToggleListener?.remove();\n this.isMountedRef.current = false;\n RNGestureHandlerModule.dropGestureHandler(this.handlerTag);\n scheduleFlushOperations();\n // We can't use this.props.id directly due to TS generic type narrowing bug, see https://github.com/microsoft/TypeScript/issues/13995 for more context\n const handlerID: string | undefined = this.props.id;\n if (handlerID) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete handlerIDToTag[handlerID];\n }\n }\n\n private onGestureHandlerEvent = (event: GestureEvent) => {\n if (event.nativeEvent.handlerTag === this.handlerTag) {\n if (typeof this.props.onGestureEvent === 'function') {\n this.props.onGestureEvent?.(event);\n }\n } else {\n this.props.onGestureHandlerEvent?.(event);\n }\n };\n\n // TODO(TS) - make sure this is right type for event\n private onGestureHandlerStateChange = (\n event: HandlerStateChangeEvent\n ) => {\n if (event.nativeEvent.handlerTag === this.handlerTag) {\n if (typeof this.props.onHandlerStateChange === 'function') {\n this.props.onHandlerStateChange?.(event);\n }\n\n const state: ValueOf = event.nativeEvent.state;\n const stateEventName = stateToPropMappings[state];\n const eventHandler = stateEventName && this.props[stateEventName];\n if (eventHandler && typeof eventHandler === 'function') {\n eventHandler(event);\n }\n } else {\n this.props.onGestureHandlerStateChange?.(event);\n }\n };\n\n private refHandler = (node: any) => {\n this.viewNode = node;\n\n const child = React.Children.only(this.props.children);\n // TODO(TS) fix ref type\n const { ref }: any = child;\n if (ref !== null) {\n if (typeof ref === 'function') {\n ref(node);\n } else {\n ref.current = node;\n }\n }\n };\n\n private createGestureHandler = (\n newConfig: Readonly>\n ) => {\n this.config = newConfig;\n\n RNGestureHandlerModule.createGestureHandler(\n name,\n this.handlerTag,\n newConfig\n );\n };\n\n private attachGestureHandler = (newViewTag: number) => {\n this.viewTag = newViewTag;\n\n if (Platform.OS === 'web') {\n // typecast due to dynamic resolution, attachGestureHandler should have web version signature in this branch\n (\n RNGestureHandlerModule.attachGestureHandler as typeof RNGestureHandlerModuleWeb.attachGestureHandler\n )(\n this.handlerTag,\n newViewTag,\n ActionType.JS_FUNCTION_OLD_API, // ignored on web\n this.propsRef\n );\n } else {\n registerOldGestureHandler(this.handlerTag, {\n onGestureEvent: this.onGestureHandlerEvent,\n onGestureStateChange: this.onGestureHandlerStateChange,\n });\n\n const actionType = (() => {\n if (\n this.props?.onGestureEvent &&\n 'current' in this.props.onGestureEvent\n ) {\n // Reanimated worklet\n return ActionType.REANIMATED_WORKLET;\n } else if (\n this.props?.onGestureEvent &&\n '__isNative' in this.props.onGestureEvent\n ) {\n // Animated.event with useNativeDriver: true\n return ActionType.NATIVE_ANIMATED_EVENT;\n } else {\n // JS callback or Animated.event with useNativeDriver: false\n return ActionType.JS_FUNCTION_OLD_API;\n }\n })();\n\n RNGestureHandlerModule.attachGestureHandler(\n this.handlerTag,\n newViewTag,\n actionType\n );\n }\n\n scheduleFlushOperations();\n };\n\n private updateGestureHandler = (\n newConfig: Readonly>\n ) => {\n this.config = newConfig;\n\n RNGestureHandlerModule.updateGestureHandler(this.handlerTag, newConfig);\n scheduleFlushOperations();\n };\n\n private update(remainingTries: number) {\n if (!this.isMountedRef.current) {\n return;\n }\n\n const props: HandlerProps = this.props;\n\n // When ref is set via a function i.e. `ref={(r) => refObject.current = r}` instead of\n // `ref={refObject}` it's possible that it won't be resolved in time. Seems like trying\n // again is easy enough fix.\n if (hasUnresolvedRefs(props) && remainingTries > 0) {\n queueMicrotask(() => {\n this.update(remainingTries - 1);\n });\n } else {\n const newConfig = filterConfig(\n transformProps ? transformProps(this.props) : this.props,\n [...allowedProps, ...customNativeProps],\n config\n );\n if (!deepEqual(this.config, newConfig)) {\n this.updateGestureHandler(newConfig);\n }\n }\n }\n\n setNativeProps(updates: any) {\n const mergedProps = { ...this.props, ...updates };\n const newConfig = filterConfig(\n transformProps ? transformProps(mergedProps) : mergedProps,\n [...allowedProps, ...customNativeProps],\n config\n );\n this.updateGestureHandler(newConfig);\n }\n\n render() {\n if (__DEV__ && !this.context && !isJestEnv() && Platform.OS !== 'web') {\n throw new Error(\n name +\n ' must be used as a descendant of GestureHandlerRootView. Otherwise the gestures will not be recognized. See https://docs.swmansion.com/react-native-gesture-handler/docs/installation for more details.'\n );\n }\n\n let gestureEventHandler = this.onGestureHandlerEvent;\n // Another instance of https://github.com/microsoft/TypeScript/issues/13995\n type OnGestureEventHandlers = {\n onGestureEvent?: BaseGestureHandlerProps['onGestureEvent'];\n onGestureHandlerEvent?: InternalEventHandlers['onGestureHandlerEvent'];\n };\n const { onGestureEvent, onGestureHandlerEvent }: OnGestureEventHandlers =\n this.props;\n if (onGestureEvent && typeof onGestureEvent !== 'function') {\n // If it's not a method it should be an native Animated.event\n // object. We set it directly as the handler for the view\n // In this case nested handlers are not going to be supported\n if (onGestureHandlerEvent) {\n throw new Error(\n 'Nesting touch handlers with native animated driver is not supported yet'\n );\n }\n gestureEventHandler = onGestureEvent;\n } else {\n if (\n onGestureHandlerEvent &&\n typeof onGestureHandlerEvent !== 'function'\n ) {\n throw new Error(\n 'Nesting touch handlers with native animated driver is not supported yet'\n );\n }\n }\n\n let gestureStateEventHandler = this.onGestureHandlerStateChange;\n // Another instance of https://github.com/microsoft/TypeScript/issues/13995\n type OnGestureStateChangeHandlers = {\n onHandlerStateChange?: BaseGestureHandlerProps['onHandlerStateChange'];\n onGestureHandlerStateChange?: InternalEventHandlers['onGestureHandlerStateChange'];\n };\n const {\n onHandlerStateChange,\n onGestureHandlerStateChange,\n }: OnGestureStateChangeHandlers = this.props;\n if (onHandlerStateChange && typeof onHandlerStateChange !== 'function') {\n // If it's not a method it should be an native Animated.event\n // object. We set it directly as the handler for the view\n // In this case nested handlers are not going to be supported\n if (onGestureHandlerStateChange) {\n throw new Error(\n 'Nesting touch handlers with native animated driver is not supported yet'\n );\n }\n gestureStateEventHandler = onHandlerStateChange;\n } else {\n if (\n onGestureHandlerStateChange &&\n typeof onGestureHandlerStateChange !== 'function'\n ) {\n throw new Error(\n 'Nesting touch handlers with native animated driver is not supported yet'\n );\n }\n }\n const events = {\n onGestureHandlerEvent: this.state.allowTouches\n ? gestureEventHandler\n : undefined,\n onGestureHandlerStateChange: this.state.allowTouches\n ? gestureStateEventHandler\n : undefined,\n };\n\n this.propsRef.current = events;\n\n let child: any = null;\n try {\n child = React.Children.only(this.props.children);\n } catch (e) {\n throw new Error(\n tagMessage(\n `${name} got more than one view as a child. If you want the gesture to work on multiple views, wrap them with a common parent and attach the gesture to that view.`\n )\n );\n }\n\n let grandChildren = child.props.children;\n if (\n __DEV__ &&\n child.type &&\n (child.type === 'RNGestureHandlerButton' ||\n child.type.name === 'View' ||\n child.type.displayName === 'View')\n ) {\n grandChildren = React.Children.toArray(grandChildren);\n grandChildren.push(\n \n );\n }\n\n return React.cloneElement(\n child,\n {\n ref: this.refHandler,\n collapsable: false,\n ...(isJestEnv()\n ? {\n handlerType: name,\n handlerTag: this.handlerTag,\n }\n : {}),\n testID: this.props.testID ?? child.props.testID,\n ...events,\n },\n grandChildren\n );\n }\n }\n return Handler;\n}\n","import * as React from 'react';\nimport { useImperativeHandle, useRef } from 'react';\n\nimport {\n NativeViewGestureHandler,\n NativeViewGestureHandlerProps,\n nativeViewProps,\n} from './NativeViewGestureHandler';\n\n/*\n * This array should consist of:\n * - All keys in propTypes from NativeGestureHandler\n * (and all keys in GestureHandlerPropTypes)\n * - 'onGestureHandlerEvent'\n * - 'onGestureHandlerStateChange'\n */\nconst NATIVE_WRAPPER_PROPS_FILTER = [\n ...nativeViewProps,\n 'onGestureHandlerEvent',\n 'onGestureHandlerStateChange',\n] as const;\n\nexport default function createNativeWrapper

(\n Component: React.ComponentType

,\n config: Readonly = {}\n) {\n const ComponentWrapper = React.forwardRef<\n React.ComponentType,\n P & NativeViewGestureHandlerProps\n >((props, ref) => {\n // filter out props that should be passed to gesture handler wrapper\n const gestureHandlerProps = Object.keys(props).reduce(\n (res, key) => {\n // TS being overly protective with it's types, see https://github.com/microsoft/TypeScript/issues/26255#issuecomment-458013731 for more info\n const allowedKeys: readonly string[] = NATIVE_WRAPPER_PROPS_FILTER;\n if (allowedKeys.includes(key)) {\n // @ts-ignore FIXME(TS)\n res[key] = props[key];\n }\n return res;\n },\n { ...config } // watch out not to modify config\n );\n const _ref = useRef>();\n const _gestureHandlerRef = useRef>();\n useImperativeHandle(\n ref,\n // @ts-ignore TODO(TS) decide how nulls work in this context\n () => {\n const node = _gestureHandlerRef.current;\n // add handlerTag for relations config\n if (_ref.current && node) {\n // @ts-ignore FIXME(TS) think about createHandler return type\n _ref.current.handlerTag = node.handlerTag;\n return _ref.current;\n }\n return null;\n },\n [_ref, _gestureHandlerRef]\n );\n return (\n \n \n \n );\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n ComponentWrapper.displayName =\n Component?.displayName ||\n // @ts-ignore if render doesn't exist it will return undefined and go further\n Component?.render?.name ||\n (typeof Component === 'string' && Component) ||\n 'ComponentWrapper';\n\n return ComponentWrapper;\n}\n","// Previous types exported gesture handlers as classes which creates an interface and variable, both named the same as class.\n// Without those types, we'd introduce breaking change, forcing users to prefix every handler type specification with typeof\n// e.g. React.createRef -> React.createRef.\n// See https://www.typescriptlang.org/docs/handbook/classes.html#constructor-functions for reference.\nimport * as React from 'react';\nimport { Platform, findNodeHandle as findNodeHandleRN } from 'react-native';\n\nimport { State } from '../State';\nimport { TouchEventType } from '../TouchEventType';\nimport { ValueOf } from '../typeUtils';\nimport { handlerIDToTag } from './handlersRegistry';\nimport { toArray } from '../utils';\nimport RNGestureHandlerModule from '../RNGestureHandlerModule';\n\nconst commonProps = [\n 'id',\n 'enabled',\n 'shouldCancelWhenOutside',\n 'hitSlop',\n 'cancelsTouchesInView',\n 'userSelect',\n] as const;\n\nconst componentInteractionProps = ['waitFor', 'simultaneousHandlers'] as const;\n\nexport const baseGestureHandlerProps = [\n ...commonProps,\n ...componentInteractionProps,\n 'onBegan',\n 'onFailed',\n 'onCancelled',\n 'onActivated',\n 'onEnded',\n 'onGestureEvent',\n 'onHandlerStateChange',\n] as const;\n\nexport const baseGestureHandlerWithMonitorProps = [\n ...commonProps,\n 'needsPointerData',\n 'manualActivation',\n];\n\nexport interface GestureEventPayload {\n handlerTag: number;\n numberOfPointers: number;\n state: ValueOf;\n}\nexport interface HandlerStateChangeEventPayload extends GestureEventPayload {\n oldState: ValueOf;\n}\n\nexport type HitSlop =\n | number\n | Partial<\n Record<\n 'left' | 'right' | 'top' | 'bottom' | 'vertical' | 'horizontal',\n number\n >\n >\n | Record<'width' | 'left', number>\n | Record<'width' | 'right', number>\n | Record<'height' | 'top', number>\n | Record<'height' | 'bottom', number>;\n\nexport type UserSelect = 'none' | 'auto' | 'text';\n\n//TODO(TS) events in handlers\n\nexport interface GestureEvent> {\n nativeEvent: Readonly;\n}\nexport interface HandlerStateChangeEvent<\n ExtraEventPayloadT = Record\n> {\n nativeEvent: Readonly;\n}\n\nexport type TouchData = {\n id: number;\n x: number;\n y: number;\n absoluteX: number;\n absoluteY: number;\n};\n\nexport type GestureTouchEvent = {\n handlerTag: number;\n numberOfTouches: number;\n state: ValueOf;\n eventType: TouchEventType;\n allTouches: TouchData[];\n changedTouches: TouchData[];\n};\n\nexport type GestureUpdateEvent> =\n GestureEventPayload & GestureEventPayloadT;\n\nexport type GestureStateChangeEvent<\n GestureStateChangeEventPayloadT = Record\n> = HandlerStateChangeEventPayload & GestureStateChangeEventPayloadT;\n\nexport type CommonGestureConfig = {\n enabled?: boolean;\n shouldCancelWhenOutside?: boolean;\n hitSlop?: HitSlop;\n userSelect?: UserSelect;\n};\n\n// Events payloads are types instead of interfaces due to TS limitation.\n// See https://github.com/microsoft/TypeScript/issues/15300 for more info.\nexport type BaseGestureHandlerProps<\n ExtraEventPayloadT extends Record = Record\n> = CommonGestureConfig & {\n id?: string;\n waitFor?: React.Ref | React.Ref[];\n simultaneousHandlers?: React.Ref | React.Ref[];\n testID?: string;\n cancelsTouchesInView?: boolean;\n // TODO(TS) - fix event types\n onBegan?: (event: HandlerStateChangeEvent) => void;\n onFailed?: (event: HandlerStateChangeEvent) => void;\n onCancelled?: (event: HandlerStateChangeEvent) => void;\n onActivated?: (event: HandlerStateChangeEvent) => void;\n onEnded?: (event: HandlerStateChangeEvent) => void;\n\n //TODO(TS) consider using NativeSyntheticEvent\n onGestureEvent?: (event: GestureEvent) => void;\n onHandlerStateChange?: (\n event: HandlerStateChangeEvent\n ) => void;\n // implicit `children` prop has been removed in @types/react^18.0.0\n children?: React.ReactNode;\n};\n\nfunction isConfigParam(param: unknown, name: string) {\n // param !== Object(param) returns false if `param` is a function\n // or an object and returns true if `param` is null\n return (\n param !== undefined &&\n (param !== Object(param) ||\n !('__isNative' in (param as Record))) &&\n name !== 'onHandlerStateChange' &&\n name !== 'onGestureEvent'\n );\n}\n\nexport function filterConfig(\n props: Record,\n validProps: string[],\n defaults: Record = {}\n) {\n const filteredConfig = { ...defaults };\n for (const key of validProps) {\n let value = props[key];\n if (isConfigParam(value, key)) {\n if (key === 'simultaneousHandlers' || key === 'waitFor') {\n value = transformIntoHandlerTags(props[key]);\n } else if (key === 'hitSlop' && typeof value !== 'object') {\n value = { top: value, left: value, bottom: value, right: value };\n }\n filteredConfig[key] = value;\n }\n }\n return filteredConfig;\n}\n\nfunction transformIntoHandlerTags(handlerIDs: any) {\n handlerIDs = toArray(handlerIDs);\n\n if (Platform.OS === 'web') {\n return handlerIDs\n .map(({ current }: { current: any }) => current)\n .filter((handle: any) => handle);\n }\n // converts handler string IDs into their numeric tags\n return handlerIDs\n .map(\n (handlerID: any) =>\n handlerIDToTag[handlerID] || handlerID.current?.handlerTag || -1\n )\n .filter((handlerTag: number) => handlerTag > 0);\n}\n\nexport function findNodeHandle(\n node: null | number | React.Component | React.ComponentClass\n): null | number | React.Component | React.ComponentClass {\n if (Platform.OS === 'web') {\n return node;\n }\n return findNodeHandleRN(node);\n}\n\nlet flushOperationsScheduled = false;\n\nexport function scheduleFlushOperations() {\n if (!flushOperationsScheduled) {\n flushOperationsScheduled = true;\n queueMicrotask(() => {\n RNGestureHandlerModule.flushOperations();\n\n flushOperationsScheduled = false;\n });\n }\n}\n","import React, { useContext, useEffect, useRef, useState } from 'react';\nimport {\n GestureType,\n HandlerCallbacks,\n BaseGesture,\n GestureRef,\n CALLBACK_TYPE,\n} from './gesture';\nimport { Reanimated, SharedValue } from './reanimatedWrapper';\nimport { registerHandler, unregisterHandler } from '../handlersRegistry';\nimport RNGestureHandlerModule from '../../RNGestureHandlerModule';\nimport {\n baseGestureHandlerWithMonitorProps,\n filterConfig,\n findNodeHandle,\n GestureTouchEvent,\n GestureUpdateEvent,\n GestureStateChangeEvent,\n HandlerStateChangeEvent,\n scheduleFlushOperations,\n UserSelect,\n} from '../gestureHandlerCommon';\nimport {\n GestureStateManager,\n GestureStateManagerType,\n} from './gestureStateManager';\nimport { flingGestureHandlerProps } from '../FlingGestureHandler';\nimport { forceTouchGestureHandlerProps } from '../ForceTouchGestureHandler';\nimport { longPressGestureHandlerProps } from '../LongPressGestureHandler';\nimport {\n panGestureHandlerProps,\n panGestureHandlerCustomNativeProps,\n} from '../PanGestureHandler';\nimport { tapGestureHandlerProps } from '../TapGestureHandler';\nimport { State } from '../../State';\nimport { TouchEventType } from '../../TouchEventType';\nimport { ComposedGesture } from './gestureComposition';\nimport { ActionType } from '../../ActionType';\nimport {\n isFabric,\n isJestEnv,\n REACT_NATIVE_VERSION,\n tagMessage,\n} from '../../utils';\nimport { getShadowNodeFromRef } from '../../getShadowNodeFromRef';\nimport { Platform } from 'react-native';\nimport type RNGestureHandlerModuleWeb from '../../RNGestureHandlerModule.web';\nimport { onGestureHandlerEvent } from './eventReceiver';\nimport { RNRenderer } from '../../RNRenderer';\nimport { isNewWebImplementationEnabled } from '../../EnableNewWebImplementation';\nimport { nativeViewGestureHandlerProps } from '../NativeViewGestureHandler';\nimport GestureHandlerRootViewContext from '../../GestureHandlerRootViewContext';\n\ndeclare const global: {\n isFormsStackingContext: (node: unknown) => boolean | null; // JSI function\n};\n\nconst ALLOWED_PROPS = [\n ...baseGestureHandlerWithMonitorProps,\n ...tapGestureHandlerProps,\n ...panGestureHandlerProps,\n ...panGestureHandlerCustomNativeProps,\n ...longPressGestureHandlerProps,\n ...forceTouchGestureHandlerProps,\n ...flingGestureHandlerProps,\n ...nativeViewGestureHandlerProps,\n];\n\nexport type GestureConfigReference = {\n config: GestureType[];\n animatedEventHandler: unknown;\n animatedHandlers: SharedValue<\n HandlerCallbacks>[] | null\n > | null;\n firstExecution: boolean;\n useReanimatedHook: boolean;\n};\n\nfunction convertToHandlerTag(ref: GestureRef): number {\n if (typeof ref === 'number') {\n return ref;\n } else if (ref instanceof BaseGesture) {\n return ref.handlerTag;\n } else {\n // @ts-ignore in this case it should be a ref either to gesture object or\n // a gesture handler component, in both cases handlerTag property exists\n return ref.current?.handlerTag ?? -1;\n }\n}\n\nfunction extractValidHandlerTags(interactionGroup: GestureRef[] | undefined) {\n return (\n interactionGroup?.map(convertToHandlerTag)?.filter((tag) => tag > 0) ?? []\n );\n}\n\nfunction dropHandlers(preparedGesture: GestureConfigReference) {\n for (const handler of preparedGesture.config) {\n RNGestureHandlerModule.dropGestureHandler(handler.handlerTag);\n\n unregisterHandler(handler.handlerTag, handler.config.testId);\n }\n\n scheduleFlushOperations();\n}\n\nfunction checkGestureCallbacksForWorklets(gesture: GestureType) {\n // if a gesture is explicitly marked to run on the JS thread there is no need to check\n // if callbacks are worklets as the user is aware they will be ran on the JS thread\n if (gesture.config.runOnJS) {\n return;\n }\n\n const areSomeNotWorklets = gesture.handlers.isWorklet.includes(false);\n const areSomeWorklets = gesture.handlers.isWorklet.includes(true);\n\n // if some of the callbacks are worklets and some are not, and the gesture is not\n // explicitly marked with `.runOnJS(true)` show an error\n if (areSomeNotWorklets && areSomeWorklets) {\n console.error(\n tagMessage(\n `Some of the callbacks in the gesture are worklets and some are not. Either make sure that all calbacks are marked as 'worklet' if you wish to run them on the UI thread or use '.runOnJS(true)' modifier on the gesture explicitly to run all callbacks on the JS thread.`\n )\n );\n }\n}\n\ninterface WebEventHandler {\n onGestureHandlerEvent: (event: HandlerStateChangeEvent) => void;\n onGestureHandlerStateChange?: (\n event: HandlerStateChangeEvent\n ) => void;\n}\n\ninterface AttachHandlersConfig {\n preparedGesture: GestureConfigReference;\n gestureConfig: ComposedGesture | GestureType;\n gesture: GestureType[];\n viewTag: number;\n webEventHandlersRef: React.RefObject;\n mountedRef: React.RefObject;\n}\n\nfunction attachHandlers({\n preparedGesture,\n gestureConfig,\n gesture,\n viewTag,\n webEventHandlersRef,\n mountedRef,\n}: AttachHandlersConfig) {\n if (!preparedGesture.firstExecution) {\n gestureConfig.initialize();\n } else {\n preparedGesture.firstExecution = false;\n }\n\n // use queueMicrotask to extract handlerTags, because all refs should be initialized\n // when it's ran\n queueMicrotask(() => {\n if (!mountedRef.current) {\n return;\n }\n gestureConfig.prepare();\n });\n\n for (const handler of gesture) {\n checkGestureCallbacksForWorklets(handler);\n RNGestureHandlerModule.createGestureHandler(\n handler.handlerName,\n handler.handlerTag,\n filterConfig(handler.config, ALLOWED_PROPS)\n );\n\n registerHandler(handler.handlerTag, handler, handler.config.testId);\n }\n\n // use queueMicrotask to extract handlerTags, because all refs should be initialized\n // when it's ran\n queueMicrotask(() => {\n if (!mountedRef.current) {\n return;\n }\n for (const handler of gesture) {\n let requireToFail: number[] = [];\n if (handler.config.requireToFail) {\n requireToFail = extractValidHandlerTags(handler.config.requireToFail);\n }\n\n let simultaneousWith: number[] = [];\n if (handler.config.simultaneousWith) {\n simultaneousWith = extractValidHandlerTags(\n handler.config.simultaneousWith\n );\n }\n\n RNGestureHandlerModule.updateGestureHandler(\n handler.handlerTag,\n filterConfig(handler.config, ALLOWED_PROPS, {\n simultaneousHandlers: simultaneousWith,\n waitFor: requireToFail,\n })\n );\n }\n\n scheduleFlushOperations();\n });\n\n preparedGesture.config = gesture;\n\n for (const gesture of preparedGesture.config) {\n const actionType = gesture.shouldUseReanimated\n ? ActionType.REANIMATED_WORKLET\n : ActionType.JS_FUNCTION_NEW_API;\n\n if (Platform.OS === 'web') {\n (\n RNGestureHandlerModule.attachGestureHandler as typeof RNGestureHandlerModuleWeb.attachGestureHandler\n )(\n gesture.handlerTag,\n viewTag,\n ActionType.JS_FUNCTION_OLD_API, // ignored on web\n webEventHandlersRef\n );\n } else {\n RNGestureHandlerModule.attachGestureHandler(\n gesture.handlerTag,\n viewTag,\n actionType\n );\n }\n }\n\n if (preparedGesture.animatedHandlers) {\n const isAnimatedGesture = (g: GestureType) => g.shouldUseReanimated;\n\n preparedGesture.animatedHandlers.value = gesture\n .filter(isAnimatedGesture)\n .map((g) => g.handlers) as unknown as HandlerCallbacks<\n Record\n >[];\n }\n}\n\nfunction updateHandlers(\n preparedGesture: GestureConfigReference,\n gestureConfig: ComposedGesture | GestureType,\n gesture: GestureType[],\n mountedRef: React.RefObject\n) {\n gestureConfig.prepare();\n\n for (let i = 0; i < gesture.length; i++) {\n const handler = preparedGesture.config[i];\n checkGestureCallbacksForWorklets(handler);\n\n // only update handlerTag when it's actually different, it may be the same\n // if gesture config object is wrapped with useMemo\n if (gesture[i].handlerTag !== handler.handlerTag) {\n gesture[i].handlerTag = handler.handlerTag;\n gesture[i].handlers.handlerTag = handler.handlerTag;\n }\n }\n\n // use queueMicrotask to extract handlerTags, because when it's ran, all refs should be updated\n // and handlerTags in BaseGesture references should be updated in the loop above (we need to wait\n // in case of external relations)\n queueMicrotask(() => {\n if (!mountedRef.current) {\n return;\n }\n for (let i = 0; i < gesture.length; i++) {\n const handler = preparedGesture.config[i];\n\n handler.config = gesture[i].config;\n handler.handlers = gesture[i].handlers;\n\n const requireToFail = extractValidHandlerTags(\n handler.config.requireToFail\n );\n\n const simultaneousWith = extractValidHandlerTags(\n handler.config.simultaneousWith\n );\n\n RNGestureHandlerModule.updateGestureHandler(\n handler.handlerTag,\n filterConfig(handler.config, ALLOWED_PROPS, {\n simultaneousHandlers: simultaneousWith,\n waitFor: requireToFail,\n })\n );\n\n registerHandler(handler.handlerTag, handler, handler.config.testId);\n }\n\n if (preparedGesture.animatedHandlers) {\n const previousHandlersValue =\n preparedGesture.animatedHandlers.value ?? [];\n const newHandlersValue = preparedGesture.config\n .filter((g) => g.shouldUseReanimated) // ignore gestures that shouldn't run on UI\n .map((g) => g.handlers) as unknown as HandlerCallbacks<\n Record\n >[];\n\n // if amount of gesture configs changes, we need to update the callbacks in shared value\n let shouldUpdateSharedValue =\n previousHandlersValue.length !== newHandlersValue.length;\n\n if (!shouldUpdateSharedValue) {\n // if the amount is the same, we need to check if any of the configs inside has changed\n for (let i = 0; i < newHandlersValue.length; i++) {\n if (\n // we can use the `gestureId` prop as it's unique for every config instance\n newHandlersValue[i].gestureId !== previousHandlersValue[i].gestureId\n ) {\n shouldUpdateSharedValue = true;\n break;\n }\n }\n }\n\n if (shouldUpdateSharedValue) {\n preparedGesture.animatedHandlers.value = newHandlersValue;\n }\n }\n\n scheduleFlushOperations();\n });\n}\n\nfunction needsToReattach(\n preparedGesture: GestureConfigReference,\n gesture: GestureType[]\n) {\n if (gesture.length !== preparedGesture.config.length) {\n return true;\n }\n for (let i = 0; i < gesture.length; i++) {\n if (\n gesture[i].handlerName !== preparedGesture.config[i].handlerName ||\n gesture[i].shouldUseReanimated !==\n preparedGesture.config[i].shouldUseReanimated\n ) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction isStateChangeEvent(\n event: GestureUpdateEvent | GestureStateChangeEvent | GestureTouchEvent\n): event is GestureStateChangeEvent {\n 'worklet';\n // @ts-ignore Yes, the oldState prop is missing on GestureTouchEvent, that's the point\n return event.oldState != null;\n}\n\nfunction isTouchEvent(\n event: GestureUpdateEvent | GestureStateChangeEvent | GestureTouchEvent\n): event is GestureTouchEvent {\n 'worklet';\n return event.eventType != null;\n}\n\nfunction getHandler(\n type: CALLBACK_TYPE,\n gesture: HandlerCallbacks>\n) {\n 'worklet';\n switch (type) {\n case CALLBACK_TYPE.BEGAN:\n return gesture.onBegin;\n case CALLBACK_TYPE.START:\n return gesture.onStart;\n case CALLBACK_TYPE.UPDATE:\n return gesture.onUpdate;\n case CALLBACK_TYPE.CHANGE:\n return gesture.onChange;\n case CALLBACK_TYPE.END:\n return gesture.onEnd;\n case CALLBACK_TYPE.FINALIZE:\n return gesture.onFinalize;\n case CALLBACK_TYPE.TOUCHES_DOWN:\n return gesture.onTouchesDown;\n case CALLBACK_TYPE.TOUCHES_MOVE:\n return gesture.onTouchesMove;\n case CALLBACK_TYPE.TOUCHES_UP:\n return gesture.onTouchesUp;\n case CALLBACK_TYPE.TOUCHES_CANCELLED:\n return gesture.onTouchesCancelled;\n }\n}\n\nfunction touchEventTypeToCallbackType(\n eventType: TouchEventType\n): CALLBACK_TYPE {\n 'worklet';\n switch (eventType) {\n case TouchEventType.TOUCHES_DOWN:\n return CALLBACK_TYPE.TOUCHES_DOWN;\n case TouchEventType.TOUCHES_MOVE:\n return CALLBACK_TYPE.TOUCHES_MOVE;\n case TouchEventType.TOUCHES_UP:\n return CALLBACK_TYPE.TOUCHES_UP;\n case TouchEventType.TOUCHES_CANCELLED:\n return CALLBACK_TYPE.TOUCHES_CANCELLED;\n }\n return CALLBACK_TYPE.UNDEFINED;\n}\n\nfunction runWorklet(\n type: CALLBACK_TYPE,\n gesture: HandlerCallbacks>,\n event: GestureStateChangeEvent | GestureUpdateEvent | GestureTouchEvent,\n ...args: any[]\n) {\n 'worklet';\n const handler = getHandler(type, gesture);\n if (gesture.isWorklet[type]) {\n // @ts-ignore Logic below makes sure the correct event is send to the\n // correct handler.\n handler?.(event, ...args);\n } else if (handler) {\n console.warn(tagMessage('Animated gesture callback must be a worklet'));\n }\n}\n\nfunction useAnimatedGesture(\n preparedGesture: GestureConfigReference,\n needsRebuild: boolean\n) {\n if (!Reanimated) {\n return;\n }\n\n // Hooks are called conditionally, but the condition is whether the\n // react-native-reanimated is installed, which shouldn't change while running\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const sharedHandlersCallbacks = Reanimated.useSharedValue<\n HandlerCallbacks>[] | null\n >(null);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const lastUpdateEvent = Reanimated.useSharedValue<\n (GestureUpdateEvent | undefined)[]\n >([]);\n\n // not every gesture needs a state controller, init them lazily\n const stateControllers: GestureStateManagerType[] = [];\n\n const callback = (\n event: GestureStateChangeEvent | GestureUpdateEvent | GestureTouchEvent\n ) => {\n 'worklet';\n\n const currentCallback = sharedHandlersCallbacks.value;\n if (!currentCallback) {\n return;\n }\n\n for (let i = 0; i < currentCallback.length; i++) {\n const gesture = currentCallback[i];\n\n if (event.handlerTag === gesture.handlerTag) {\n if (isStateChangeEvent(event)) {\n if (\n event.oldState === State.UNDETERMINED &&\n event.state === State.BEGAN\n ) {\n runWorklet(CALLBACK_TYPE.BEGAN, gesture, event);\n } else if (\n (event.oldState === State.BEGAN ||\n event.oldState === State.UNDETERMINED) &&\n event.state === State.ACTIVE\n ) {\n runWorklet(CALLBACK_TYPE.START, gesture, event);\n lastUpdateEvent.value[gesture.handlerTag] = undefined;\n } else if (\n event.oldState !== event.state &&\n event.state === State.END\n ) {\n if (event.oldState === State.ACTIVE) {\n runWorklet(CALLBACK_TYPE.END, gesture, event, true);\n }\n runWorklet(CALLBACK_TYPE.FINALIZE, gesture, event, true);\n } else if (\n (event.state === State.FAILED || event.state === State.CANCELLED) &&\n event.state !== event.oldState\n ) {\n if (event.oldState === State.ACTIVE) {\n runWorklet(CALLBACK_TYPE.END, gesture, event, false);\n }\n runWorklet(CALLBACK_TYPE.FINALIZE, gesture, event, false);\n }\n } else if (isTouchEvent(event)) {\n if (!stateControllers[i]) {\n stateControllers[i] = GestureStateManager.create(event.handlerTag);\n }\n\n if (event.eventType !== TouchEventType.UNDETERMINED) {\n runWorklet(\n touchEventTypeToCallbackType(event.eventType),\n gesture,\n event,\n stateControllers[i]\n );\n }\n } else {\n runWorklet(CALLBACK_TYPE.UPDATE, gesture, event);\n\n if (gesture.onChange && gesture.changeEventCalculator) {\n runWorklet(\n CALLBACK_TYPE.CHANGE,\n gesture,\n gesture.changeEventCalculator?.(\n event,\n lastUpdateEvent.value[gesture.handlerTag]\n )\n );\n\n lastUpdateEvent.value[gesture.handlerTag] = event;\n }\n }\n }\n }\n };\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const event = Reanimated.useEvent(\n callback,\n ['onGestureHandlerStateChange', 'onGestureHandlerEvent'],\n needsRebuild\n );\n\n preparedGesture.animatedEventHandler = event;\n preparedGesture.animatedHandlers = sharedHandlersCallbacks;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction validateDetectorChildren(ref: any) {\n // finds the first native view under the Wrap component and traverses the fiber tree upwards\n // to check whether there is more than one native view as a pseudo-direct child of GestureDetector\n // i.e. this is not ok:\n // Wrap\n // |\n // / \\\n // / \\\n // / \\\n // / \\\n // NativeView NativeView\n //\n // but this is fine:\n // Wrap\n // |\n // NativeView\n // |\n // / \\\n // / \\\n // / \\\n // / \\\n // NativeView NativeView\n if (__DEV__ && Platform.OS !== 'web') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const wrapType =\n REACT_NATIVE_VERSION.minor > 63 || REACT_NATIVE_VERSION.major > 0\n ? // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n ref._reactInternals.elementType\n : // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n ref._reactInternalFiber.elementType;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n let instance =\n RNRenderer.findHostInstance_DEPRECATED(\n ref\n )._internalFiberInstanceHandleDEV;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n while (instance && instance.elementType !== wrapType) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (instance.sibling) {\n throw new Error(\n 'GestureDetector has more than one native view as its children. This can happen if you are using a custom component that renders multiple views, like React.Fragment. You should wrap content of GestureDetector with a or .'\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n instance = instance.return;\n }\n }\n}\n\nconst applyUserSelectProp = (\n userSelect: UserSelect,\n gesture: ComposedGesture | GestureType\n): void => {\n for (const g of gesture.toGestureArray()) {\n g.config.userSelect = userSelect;\n }\n};\n\ninterface GestureDetectorProps {\n gesture: ComposedGesture | GestureType;\n userSelect?: UserSelect;\n children?: React.ReactNode;\n}\ninterface GestureDetectorState {\n firstRender: boolean;\n viewRef: React.Component | null;\n previousViewTag: number;\n forceReattach: boolean;\n}\nexport const GestureDetector = (props: GestureDetectorProps) => {\n const rootViewContext = useContext(GestureHandlerRootViewContext);\n if (__DEV__ && !rootViewContext && !isJestEnv() && Platform.OS !== 'web') {\n throw new Error(\n 'GestureDetector must be used as a descendant of GestureHandlerRootView. Otherwise the gestures will not be recognized. See https://docs.swmansion.com/react-native-gesture-handler/docs/installation for more details.'\n );\n }\n\n const gestureConfig = props.gesture;\n\n if (props.userSelect) {\n applyUserSelectProp(props.userSelect, gestureConfig);\n }\n\n const gesture = gestureConfig.toGestureArray();\n const useReanimatedHook = gesture.some((g) => g.shouldUseReanimated);\n\n // store state in ref to prevent unnecessary renders\n const state = useRef({\n firstRender: true,\n viewRef: null,\n previousViewTag: -1,\n forceReattach: false,\n }).current;\n const mountedRef = useRef(false);\n const webEventHandlersRef = useRef({\n onGestureHandlerEvent: (e: HandlerStateChangeEvent) => {\n onGestureHandlerEvent(e.nativeEvent);\n },\n onGestureHandlerStateChange: isNewWebImplementationEnabled()\n ? (e: HandlerStateChangeEvent) => {\n onGestureHandlerEvent(e.nativeEvent);\n }\n : undefined,\n });\n\n const [renderState, setRenderState] = useState(false);\n function forceRender() {\n setRenderState(!renderState);\n }\n\n const preparedGesture = React.useRef({\n config: gesture,\n animatedEventHandler: null,\n animatedHandlers: null,\n firstExecution: true,\n useReanimatedHook: useReanimatedHook,\n }).current;\n\n if (useReanimatedHook !== preparedGesture.useReanimatedHook) {\n throw new Error(\n tagMessage(\n 'You cannot change the thread the callbacks are ran on while the app is running'\n )\n );\n }\n\n function onHandlersUpdate(skipConfigUpdate?: boolean) {\n // if the underlying view has changed we need to reattach handlers to the new view\n const viewTag = findNodeHandle(state.viewRef) as number;\n const forceReattach = viewTag !== state.previousViewTag;\n\n if (forceReattach || needsToReattach(preparedGesture, gesture)) {\n validateDetectorChildren(state.viewRef);\n dropHandlers(preparedGesture);\n attachHandlers({\n preparedGesture,\n gestureConfig,\n gesture,\n webEventHandlersRef,\n viewTag,\n mountedRef,\n });\n\n state.previousViewTag = viewTag;\n state.forceReattach = forceReattach;\n if (forceReattach) {\n forceRender();\n }\n } else if (!skipConfigUpdate) {\n updateHandlers(preparedGesture, gestureConfig, gesture, mountedRef);\n }\n }\n\n // Reanimated event should be rebuilt only when gestures are reattached, otherwise\n // config update will be enough as all necessary items are stored in shared values anyway\n const needsToRebuildReanimatedEvent =\n preparedGesture.firstExecution ||\n needsToReattach(preparedGesture, gesture) ||\n state.forceReattach;\n\n state.forceReattach = false;\n\n if (preparedGesture.firstExecution) {\n gestureConfig.initialize();\n }\n\n if (useReanimatedHook) {\n // Whether animatedGesture or gesture is used shouldn't change while the app is running\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useAnimatedGesture(preparedGesture, needsToRebuildReanimatedEvent);\n }\n\n useEffect(() => {\n const viewTag = findNodeHandle(state.viewRef) as number;\n state.firstRender = true;\n mountedRef.current = true;\n\n validateDetectorChildren(state.viewRef);\n\n attachHandlers({\n preparedGesture,\n gestureConfig,\n gesture,\n webEventHandlersRef,\n viewTag,\n mountedRef,\n });\n\n return () => {\n mountedRef.current = false;\n dropHandlers(preparedGesture);\n };\n }, []);\n\n useEffect(() => {\n if (!state.firstRender) {\n onHandlersUpdate();\n } else {\n state.firstRender = false;\n }\n }, [props]);\n\n const refFunction = (ref: unknown) => {\n if (ref !== null) {\n // @ts-ignore Just setting the view ref\n state.viewRef = ref;\n\n // if it's the first render, also set the previousViewTag to prevent reattaching gestures when not needed\n if (state.previousViewTag === -1) {\n state.previousViewTag = findNodeHandle(state.viewRef) as number;\n }\n\n // pass true as `skipConfigUpdate`, here we only want to trigger the eventual reattaching of handlers\n // in case the view has changed, while config update would be handled be the `useEffect` above\n onHandlersUpdate(true);\n\n if (isFabric()) {\n const node = getShadowNodeFromRef(ref);\n if (global.isFormsStackingContext(node) === false) {\n console.error(\n tagMessage(\n 'GestureDetector has received a child that may get view-flattened. ' +\n '\\nTo prevent it from misbehaving you need to wrap the child with a ``.'\n )\n );\n }\n }\n }\n };\n\n if (useReanimatedHook) {\n return (\n \n {props.children}\n \n );\n } else {\n return {props.children};\n }\n};\n\nclass Wrap extends React.Component<{\n onGestureHandlerEvent?: unknown;\n // implicit `children` prop has been removed in @types/react^18.0.0\n children?: React.ReactNode;\n}> {\n render() {\n try {\n // I don't think that fighting with types over such a simple function is worth it\n // The only thing it does is add 'collapsable: false' to the child component\n // to make sure it is in the native view hierarchy so the detector can find\n // correct viewTag to attach to.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const child: any = React.Children.only(this.props.children);\n return React.cloneElement(\n child,\n { collapsable: false },\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n child.props.children\n );\n } catch (e) {\n throw new Error(\n tagMessage(\n `GestureDetector got more than one view as a child. If you want the gesture to work on multiple views, wrap them with a common parent and attach the gesture to that view.`\n )\n );\n }\n }\n}\n\nconst AnimatedWrap = Reanimated?.default?.createAnimatedComponent(Wrap) ?? Wrap;\n","import { DeviceEventEmitter, EmitterSubscription } from 'react-native';\nimport { State } from '../../State';\nimport { TouchEventType } from '../../TouchEventType';\nimport {\n GestureTouchEvent,\n GestureUpdateEvent,\n GestureStateChangeEvent,\n} from '../gestureHandlerCommon';\nimport { findHandler, findOldGestureHandler } from '../handlersRegistry';\nimport { BaseGesture } from './gesture';\nimport {\n GestureStateManager,\n GestureStateManagerType,\n} from './gestureStateManager';\n\nlet gestureHandlerEventSubscription: EmitterSubscription | null = null;\nlet gestureHandlerStateChangeEventSubscription: EmitterSubscription | null =\n null;\n\nconst gestureStateManagers: Map = new Map<\n number,\n GestureStateManagerType\n>();\n\nconst lastUpdateEvent: (GestureUpdateEvent | undefined)[] = [];\n\nfunction isStateChangeEvent(\n event: GestureUpdateEvent | GestureStateChangeEvent | GestureTouchEvent\n): event is GestureStateChangeEvent {\n // @ts-ignore oldState doesn't exist on GestureTouchEvent and that's the point\n return event.oldState != null;\n}\n\nfunction isTouchEvent(\n event: GestureUpdateEvent | GestureStateChangeEvent | GestureTouchEvent\n): event is GestureTouchEvent {\n return event.eventType != null;\n}\n\nexport function onGestureHandlerEvent(\n event: GestureUpdateEvent | GestureStateChangeEvent | GestureTouchEvent\n) {\n const handler = findHandler(event.handlerTag) as BaseGesture<\n Record\n >;\n\n if (handler) {\n if (isStateChangeEvent(event)) {\n if (\n event.oldState === State.UNDETERMINED &&\n event.state === State.BEGAN\n ) {\n handler.handlers.onBegin?.(event);\n } else if (\n (event.oldState === State.BEGAN ||\n event.oldState === State.UNDETERMINED) &&\n event.state === State.ACTIVE\n ) {\n handler.handlers.onStart?.(event);\n lastUpdateEvent[handler.handlers.handlerTag] = event;\n } else if (event.oldState !== event.state && event.state === State.END) {\n if (event.oldState === State.ACTIVE) {\n handler.handlers.onEnd?.(event, true);\n }\n handler.handlers.onFinalize?.(event, true);\n lastUpdateEvent[handler.handlers.handlerTag] = undefined;\n } else if (\n (event.state === State.FAILED || event.state === State.CANCELLED) &&\n event.oldState !== event.state\n ) {\n if (event.oldState === State.ACTIVE) {\n handler.handlers.onEnd?.(event, false);\n }\n handler.handlers.onFinalize?.(event, false);\n gestureStateManagers.delete(event.handlerTag);\n lastUpdateEvent[handler.handlers.handlerTag] = undefined;\n }\n } else if (isTouchEvent(event)) {\n if (!gestureStateManagers.has(event.handlerTag)) {\n gestureStateManagers.set(\n event.handlerTag,\n GestureStateManager.create(event.handlerTag)\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const manager = gestureStateManagers.get(event.handlerTag)!;\n\n switch (event.eventType) {\n case TouchEventType.TOUCHES_DOWN:\n handler.handlers?.onTouchesDown?.(event, manager);\n break;\n case TouchEventType.TOUCHES_MOVE:\n handler.handlers?.onTouchesMove?.(event, manager);\n break;\n case TouchEventType.TOUCHES_UP:\n handler.handlers?.onTouchesUp?.(event, manager);\n break;\n case TouchEventType.TOUCHES_CANCELLED:\n handler.handlers?.onTouchesCancelled?.(event, manager);\n break;\n }\n } else {\n handler.handlers.onUpdate?.(event);\n\n if (handler.handlers.onChange && handler.handlers.changeEventCalculator) {\n handler.handlers.onChange?.(\n handler.handlers.changeEventCalculator?.(\n event,\n lastUpdateEvent[handler.handlers.handlerTag]\n )\n );\n\n lastUpdateEvent[handler.handlers.handlerTag] = event;\n }\n }\n } else {\n const oldHandler = findOldGestureHandler(event.handlerTag);\n if (oldHandler) {\n const nativeEvent = { nativeEvent: event };\n if (isStateChangeEvent(event)) {\n oldHandler.onGestureStateChange(nativeEvent);\n } else {\n oldHandler.onGestureEvent(nativeEvent);\n }\n return;\n }\n }\n}\n\nexport function startListening() {\n stopListening();\n\n gestureHandlerEventSubscription = DeviceEventEmitter.addListener(\n 'onGestureHandlerEvent',\n onGestureHandlerEvent\n );\n\n gestureHandlerStateChangeEventSubscription = DeviceEventEmitter.addListener(\n 'onGestureHandlerStateChange',\n onGestureHandlerEvent\n );\n}\n\nexport function stopListening() {\n if (gestureHandlerEventSubscription) {\n gestureHandlerEventSubscription.remove();\n gestureHandlerEventSubscription = null;\n }\n\n if (gestureHandlerStateChangeEventSubscription) {\n gestureHandlerStateChangeEventSubscription.remove();\n gestureHandlerStateChangeEventSubscription = null;\n }\n}\n","import { BaseGesture, BaseGestureConfig } from './gesture';\nimport {\n FlingGestureConfig,\n FlingGestureHandlerEventPayload,\n} from '../FlingGestureHandler';\n\nexport class FlingGesture extends BaseGesture {\n public config: BaseGestureConfig & FlingGestureConfig = {};\n\n constructor() {\n super();\n\n this.handlerName = 'FlingGestureHandler';\n }\n\n numberOfPointers(pointers: number) {\n this.config.numberOfPointers = pointers;\n return this;\n }\n\n direction(direction: number) {\n this.config.direction = direction;\n return this;\n }\n}\n\nexport type FlingGestureType = InstanceType;\n","import { BaseGestureConfig, ContinousBaseGesture } from './gesture';\nimport {\n ForceTouchGestureConfig,\n ForceTouchGestureHandlerEventPayload,\n} from '../ForceTouchGestureHandler';\nimport { GestureUpdateEvent } from '../gestureHandlerCommon';\n\nexport type ForceTouchGestureChangeEventPayload = {\n forceChange: number;\n};\n\nfunction changeEventCalculator(\n current: GestureUpdateEvent,\n previous?: GestureUpdateEvent\n) {\n 'worklet';\n let changePayload: ForceTouchGestureChangeEventPayload;\n if (previous === undefined) {\n changePayload = {\n forceChange: current.force,\n };\n } else {\n changePayload = {\n forceChange: current.force - previous.force,\n };\n }\n\n return { ...current, ...changePayload };\n}\n\nexport class ForceTouchGesture extends ContinousBaseGesture<\n ForceTouchGestureHandlerEventPayload,\n ForceTouchGestureChangeEventPayload\n> {\n public config: BaseGestureConfig & ForceTouchGestureConfig = {};\n\n constructor() {\n super();\n\n this.handlerName = 'ForceTouchGestureHandler';\n }\n\n minForce(force: number) {\n this.config.minForce = force;\n return this;\n }\n\n maxForce(force: number) {\n this.config.maxForce = force;\n return this;\n }\n\n feedbackOnActivation(value: boolean) {\n this.config.feedbackOnActivation = value;\n return this;\n }\n\n onChange(\n callback: (\n event: GestureUpdateEvent<\n GestureUpdateEvent<\n ForceTouchGestureHandlerEventPayload &\n ForceTouchGestureChangeEventPayload\n >\n >\n ) => void\n ) {\n // @ts-ignore TS being overprotective, ForceTouchGestureHandlerEventPayload is Record\n this.handlers.changeEventCalculator = changeEventCalculator;\n return super.onChange(callback);\n }\n}\n\nexport type ForceTouchGestureType = InstanceType;\n","import { FlingGestureHandlerEventPayload } from '../FlingGestureHandler';\nimport { ForceTouchGestureHandlerEventPayload } from '../ForceTouchGestureHandler';\nimport {\n HitSlop,\n CommonGestureConfig,\n GestureTouchEvent,\n GestureStateChangeEvent,\n GestureUpdateEvent,\n} from '../gestureHandlerCommon';\nimport { getNextHandlerTag } from '../handlersRegistry';\nimport { GestureStateManagerType } from './gestureStateManager';\nimport { LongPressGestureHandlerEventPayload } from '../LongPressGestureHandler';\nimport { PanGestureHandlerEventPayload } from '../PanGestureHandler';\nimport { PinchGestureHandlerEventPayload } from '../PinchGestureHandler';\nimport { RotationGestureHandlerEventPayload } from '../RotationGestureHandler';\nimport { TapGestureHandlerEventPayload } from '../TapGestureHandler';\nimport { NativeViewGestureHandlerPayload } from '../NativeViewGestureHandler';\nimport { isRemoteDebuggingEnabled } from '../../utils';\n\nexport type GestureType =\n | BaseGesture>\n | BaseGesture>\n | BaseGesture\n | BaseGesture\n | BaseGesture\n | BaseGesture\n | BaseGesture\n | BaseGesture\n | BaseGesture\n | BaseGesture;\n\nexport type GestureRef =\n | number\n | GestureType\n | React.RefObject\n | React.RefObject; // allow adding a ref to a gesture handler\nexport interface BaseGestureConfig\n extends CommonGestureConfig,\n Record {\n ref?: React.MutableRefObject;\n requireToFail?: GestureRef[];\n simultaneousWith?: GestureRef[];\n needsPointerData?: boolean;\n manualActivation?: boolean;\n runOnJS?: boolean;\n testId?: string;\n cancelsTouchesInView?: boolean;\n}\n\ntype TouchEventHandlerType = (\n event: GestureTouchEvent,\n stateManager: GestureStateManagerType\n) => void;\n\nexport type HandlerCallbacks> = {\n gestureId: number;\n handlerTag: number;\n onBegin?: (event: GestureStateChangeEvent) => void;\n onStart?: (event: GestureStateChangeEvent) => void;\n onEnd?: (\n event: GestureStateChangeEvent,\n success: boolean\n ) => void;\n onFinalize?: (\n event: GestureStateChangeEvent,\n success: boolean\n ) => void;\n onUpdate?: (event: GestureUpdateEvent) => void;\n onChange?: (event: any) => void;\n onTouchesDown?: TouchEventHandlerType;\n onTouchesMove?: TouchEventHandlerType;\n onTouchesUp?: TouchEventHandlerType;\n onTouchesCancelled?: TouchEventHandlerType;\n changeEventCalculator?: (\n current: GestureUpdateEvent>,\n previous?: GestureUpdateEvent>\n ) => GestureUpdateEvent>;\n isWorklet: boolean[];\n};\n\nexport const CALLBACK_TYPE = {\n UNDEFINED: 0,\n BEGAN: 1,\n START: 2,\n UPDATE: 3,\n CHANGE: 4,\n END: 5,\n FINALIZE: 6,\n TOUCHES_DOWN: 7,\n TOUCHES_MOVE: 8,\n TOUCHES_UP: 9,\n TOUCHES_CANCELLED: 10,\n} as const;\n\n// Allow using CALLBACK_TYPE as object and type\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type CALLBACK_TYPE = typeof CALLBACK_TYPE[keyof typeof CALLBACK_TYPE];\n\nexport abstract class Gesture {\n /**\n * Return array of gestures, providing the same interface for creating and updating\n * handlers, no matter which object was used to create gesture instance.\n */\n abstract toGestureArray(): GestureType[];\n\n /**\n * Assign handlerTag to the gesture instance and set ref.current (if a ref is set)\n */\n abstract initialize(): void;\n\n /**\n * Make sure that values of properties defining relations are arrays. Do any necessary\n * preprocessing required to configure relations between handlers. Called just before\n * updating the handler on the native side.\n */\n abstract prepare(): void;\n}\n\nlet nextGestureId = 0;\nexport abstract class BaseGesture<\n EventPayloadT extends Record\n> extends Gesture {\n private gestureId = -1;\n public handlerTag = -1;\n public handlerName = '';\n public config: BaseGestureConfig = {};\n public handlers: HandlerCallbacks = {\n gestureId: -1,\n handlerTag: -1,\n isWorklet: [],\n };\n\n constructor() {\n super();\n\n // Used to check whether the gesture config has been updated when wrapping it\n // with `useMemo`. Since every config will have a unique id, when the dependencies\n // don't change, the config won't be recreated and the id will stay the same.\n // If the id is different, it means that the config has changed and the gesture\n // needs to be updated.\n this.gestureId = nextGestureId++;\n this.handlers.gestureId = this.gestureId;\n }\n\n private addDependency(\n key: 'simultaneousWith' | 'requireToFail',\n gesture: Exclude\n ) {\n const value = this.config[key];\n this.config[key] = value\n ? Array().concat(value, gesture)\n : [gesture];\n }\n\n withRef(ref: React.MutableRefObject) {\n this.config.ref = ref;\n return this;\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n protected isWorklet(callback: Function) {\n //@ts-ignore if callback is a worklet, the property will be available, if not then the check will return false\n return callback.__workletHash !== undefined;\n }\n\n onBegin(callback: (event: GestureStateChangeEvent) => void) {\n this.handlers.onBegin = callback;\n this.handlers.isWorklet[CALLBACK_TYPE.BEGAN] = this.isWorklet(callback);\n return this;\n }\n\n onStart(callback: (event: GestureStateChangeEvent) => void) {\n this.handlers.onStart = callback;\n this.handlers.isWorklet[CALLBACK_TYPE.START] = this.isWorklet(callback);\n return this;\n }\n\n onEnd(\n callback: (\n event: GestureStateChangeEvent,\n success: boolean\n ) => void\n ) {\n this.handlers.onEnd = callback;\n //@ts-ignore if callback is a worklet, the property will be available, if not then the check will return false\n this.handlers.isWorklet[CALLBACK_TYPE.END] = this.isWorklet(callback);\n return this;\n }\n\n onFinalize(\n callback: (\n event: GestureStateChangeEvent,\n success: boolean\n ) => void\n ) {\n this.handlers.onFinalize = callback;\n //@ts-ignore if callback is a worklet, the property will be available, if not then the check will return false\n this.handlers.isWorklet[CALLBACK_TYPE.FINALIZE] = this.isWorklet(callback);\n return this;\n }\n\n onTouchesDown(callback: TouchEventHandlerType) {\n this.config.needsPointerData = true;\n this.handlers.onTouchesDown = callback;\n this.handlers.isWorklet[CALLBACK_TYPE.TOUCHES_DOWN] =\n this.isWorklet(callback);\n\n return this;\n }\n\n onTouchesMove(callback: TouchEventHandlerType) {\n this.config.needsPointerData = true;\n this.handlers.onTouchesMove = callback;\n this.handlers.isWorklet[CALLBACK_TYPE.TOUCHES_MOVE] =\n this.isWorklet(callback);\n\n return this;\n }\n\n onTouchesUp(callback: TouchEventHandlerType) {\n this.config.needsPointerData = true;\n this.handlers.onTouchesUp = callback;\n this.handlers.isWorklet[CALLBACK_TYPE.TOUCHES_UP] =\n this.isWorklet(callback);\n\n return this;\n }\n\n onTouchesCancelled(callback: TouchEventHandlerType) {\n this.config.needsPointerData = true;\n this.handlers.onTouchesCancelled = callback;\n this.handlers.isWorklet[CALLBACK_TYPE.TOUCHES_CANCELLED] =\n this.isWorklet(callback);\n\n return this;\n }\n\n enabled(enabled: boolean) {\n this.config.enabled = enabled;\n return this;\n }\n\n shouldCancelWhenOutside(value: boolean) {\n this.config.shouldCancelWhenOutside = value;\n return this;\n }\n\n hitSlop(hitSlop: HitSlop) {\n this.config.hitSlop = hitSlop;\n return this;\n }\n\n runOnJS(runOnJS: boolean) {\n this.config.runOnJS = runOnJS;\n return this;\n }\n\n simultaneousWithExternalGesture(...gestures: Exclude[]) {\n for (const gesture of gestures) {\n this.addDependency('simultaneousWith', gesture);\n }\n return this;\n }\n\n requireExternalGestureToFail(...gestures: Exclude[]) {\n for (const gesture of gestures) {\n this.addDependency('requireToFail', gesture);\n }\n return this;\n }\n\n withTestId(id: string) {\n this.config.testId = id;\n return this;\n }\n\n cancelsTouchesInView(value: boolean) {\n this.config.cancelsTouchesInView = value;\n return this;\n }\n\n initialize() {\n this.handlerTag = getNextHandlerTag();\n\n this.handlers = { ...this.handlers, handlerTag: this.handlerTag };\n\n if (this.config.ref) {\n this.config.ref.current = this as GestureType;\n }\n }\n\n toGestureArray(): GestureType[] {\n return [this as GestureType];\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n prepare() {}\n\n get shouldUseReanimated(): boolean {\n // use Reanimated when runOnJS isn't set explicitly,\n // and all defined callbacks are worklets,\n // and remote debugging is disabled\n return (\n this.config.runOnJS !== true &&\n !this.handlers.isWorklet.includes(false) &&\n !isRemoteDebuggingEnabled()\n );\n }\n}\n\nexport abstract class ContinousBaseGesture<\n EventPayloadT extends Record,\n EventChangePayloadT extends Record\n> extends BaseGesture {\n onUpdate(callback: (event: GestureUpdateEvent) => void) {\n this.handlers.onUpdate = callback;\n this.handlers.isWorklet[CALLBACK_TYPE.UPDATE] = this.isWorklet(callback);\n return this;\n }\n\n onChange(\n callback: (\n event: GestureUpdateEvent\n ) => void\n ) {\n this.handlers.onChange = callback;\n this.handlers.isWorklet[CALLBACK_TYPE.CHANGE] = this.isWorklet(callback);\n return this;\n }\n\n manualActivation(manualActivation: boolean) {\n this.config.manualActivation = manualActivation;\n return this;\n }\n}\n","import { BaseGesture, Gesture, GestureRef, GestureType } from './gesture';\n\nfunction extendRelation(\n currentRelation: GestureRef[] | undefined,\n extendWith: GestureType[]\n) {\n if (currentRelation === undefined) {\n return [...extendWith];\n } else {\n return [...currentRelation, ...extendWith];\n }\n}\n\nexport class ComposedGesture extends Gesture {\n protected gestures: Gesture[] = [];\n protected simultaneousGestures: GestureType[] = [];\n protected requireGesturesToFail: GestureType[] = [];\n\n constructor(...gestures: Gesture[]) {\n super();\n this.gestures = gestures;\n }\n\n protected prepareSingleGesture(\n gesture: Gesture,\n simultaneousGestures: GestureType[],\n requireGesturesToFail: GestureType[]\n ) {\n if (gesture instanceof BaseGesture) {\n const newConfig = { ...gesture.config };\n\n newConfig.simultaneousWith = extendRelation(\n newConfig.simultaneousWith,\n simultaneousGestures\n );\n newConfig.requireToFail = extendRelation(\n newConfig.requireToFail,\n requireGesturesToFail\n );\n\n gesture.config = newConfig;\n } else if (gesture instanceof ComposedGesture) {\n gesture.simultaneousGestures = simultaneousGestures;\n gesture.requireGesturesToFail = requireGesturesToFail;\n gesture.prepare();\n }\n }\n\n prepare() {\n for (const gesture of this.gestures) {\n this.prepareSingleGesture(\n gesture,\n this.simultaneousGestures,\n this.requireGesturesToFail\n );\n }\n }\n\n initialize() {\n for (const gesture of this.gestures) {\n gesture.initialize();\n }\n }\n\n toGestureArray(): GestureType[] {\n return this.gestures.flatMap((gesture) => gesture.toGestureArray());\n }\n}\n\nexport class SimultaneousGesture extends ComposedGesture {\n prepare() {\n // this piece of magic works something like this:\n // for every gesture in the array\n const simultaneousArrays = this.gestures.map((gesture) =>\n // we take the array it's in\n this.gestures\n // and make a copy without it\n .filter((x) => x !== gesture)\n // then we flatmap the result to get list of raw (not composed) gestures\n // this way we don't make the gestures simultaneous with themselves, which is\n // important when the gesture is `ExclusiveGesture` - we don't want to make\n // exclusive gestures simultaneous\n .flatMap((x) => x.toGestureArray())\n );\n\n for (let i = 0; i < this.gestures.length; i++) {\n this.prepareSingleGesture(\n this.gestures[i],\n simultaneousArrays[i],\n this.requireGesturesToFail\n );\n }\n }\n}\n\nexport class ExclusiveGesture extends ComposedGesture {\n prepare() {\n // transforms the array of gestures into array of grouped raw (not composed) gestures\n // i.e. [gesture1, gesture2, ComposedGesture(gesture3, gesture4)] -> [[gesture1], [gesture2], [gesture3, gesture4]]\n const gestureArrays = this.gestures.map((gesture) =>\n gesture.toGestureArray()\n );\n\n let requireToFail: GestureType[] = [];\n\n for (let i = 0; i < this.gestures.length; i++) {\n this.prepareSingleGesture(\n this.gestures[i],\n this.simultaneousGestures,\n this.requireGesturesToFail.concat(requireToFail)\n );\n\n // every group gets to wait for all groups before it\n requireToFail = requireToFail.concat(gestureArrays[i]);\n }\n }\n}\n\nexport type ComposedGestureType = InstanceType;\nexport type RaceGestureType = ComposedGestureType;\nexport type SimultaneousGestureType = InstanceType;\nexport type ExclusiveGestureType = InstanceType;\n","import { FlingGesture } from './flingGesture';\nimport { ForceTouchGesture } from './forceTouchGesture';\nimport { Gesture } from './gesture';\nimport {\n ComposedGesture,\n ExclusiveGesture,\n SimultaneousGesture,\n} from './gestureComposition';\nimport { LongPressGesture } from './longPressGesture';\nimport { PanGesture } from './panGesture';\nimport { PinchGesture } from './pinchGesture';\nimport { RotationGesture } from './rotationGesture';\nimport { TapGesture } from './tapGesture';\nimport { NativeGesture } from './nativeGesture';\nimport { ManualGesture } from './manualGesture';\n\nexport const GestureObjects = {\n Tap: () => {\n return new TapGesture();\n },\n\n Pan: () => {\n return new PanGesture();\n },\n\n Pinch: () => {\n return new PinchGesture();\n },\n\n Rotation: () => {\n return new RotationGesture();\n },\n\n Fling: () => {\n return new FlingGesture();\n },\n\n LongPress: () => {\n return new LongPressGesture();\n },\n\n ForceTouch: () => {\n return new ForceTouchGesture();\n },\n\n Native: () => {\n return new NativeGesture();\n },\n\n Manual: () => {\n return new ManualGesture();\n },\n\n /**\n * Builds a composed gesture consisting of gestures provided as parameters.\n * The first one that becomes active cancels the rest of gestures.\n */\n Race: (...gestures: Gesture[]) => {\n return new ComposedGesture(...gestures);\n },\n\n /**\n * Builds a composed gesture that allows all base gestures to run simultaneously.\n */\n Simultaneous(...gestures: Gesture[]) {\n return new SimultaneousGesture(...gestures);\n },\n\n /**\n * Builds a composed gesture where only one of the provided gestures can become active.\n * Priority is decided through the order of gestures: the first one has higher priority\n * than the second one, second one has higher priority than the third one, and so on.\n * For example, to make a gesture that recognizes both single and double tap you need\n * to call Exclusive(doubleTap, singleTap).\n */\n Exclusive(...gestures: Gesture[]) {\n return new ExclusiveGesture(...gestures);\n },\n};\n","import NodeManager from '../../web/tools/NodeManager';\nimport { GestureStateManagerType } from './gestureStateManager';\n\nexport const GestureStateManager = {\n create(handlerTag: number): GestureStateManagerType {\n return {\n begin: () => {\n NodeManager.getHandler(handlerTag).begin();\n },\n\n activate: () => {\n NodeManager.getHandler(handlerTag).activate();\n },\n\n fail: () => {\n NodeManager.getHandler(handlerTag).fail();\n },\n\n end: () => {\n NodeManager.getHandler(handlerTag).end();\n },\n };\n },\n};\n","import { BaseGesture, BaseGestureConfig } from './gesture';\nimport {\n LongPressGestureConfig,\n LongPressGestureHandlerEventPayload,\n} from '../LongPressGestureHandler';\n\nexport class LongPressGesture extends BaseGesture {\n public config: BaseGestureConfig & LongPressGestureConfig = {};\n\n constructor() {\n super();\n\n this.handlerName = 'LongPressGestureHandler';\n this.shouldCancelWhenOutside(true);\n }\n\n minDuration(duration: number) {\n this.config.minDurationMs = duration;\n return this;\n }\n\n maxDistance(distance: number) {\n this.config.maxDist = distance;\n return this;\n }\n}\n\nexport type LongPressGestureType = InstanceType;\n","import { GestureUpdateEvent } from '../gestureHandlerCommon';\nimport { ContinousBaseGesture } from './gesture';\n\nfunction changeEventCalculator(\n current: GestureUpdateEvent>,\n _previous?: GestureUpdateEvent>\n) {\n 'worklet';\n return current;\n}\n\nexport class ManualGesture extends ContinousBaseGesture<\n Record,\n Record\n> {\n constructor() {\n super();\n\n this.handlerName = 'ManualGestureHandler';\n }\n\n onChange(\n callback: (event: GestureUpdateEvent>) => void\n ) {\n // @ts-ignore TS being overprotective, Record is Record\n this.handlers.changeEventCalculator = changeEventCalculator;\n return super.onChange(callback);\n }\n}\n\nexport type ManualGestureType = InstanceType;\n","import { BaseGestureConfig, BaseGesture } from './gesture';\nimport {\n NativeViewGestureConfig,\n NativeViewGestureHandlerPayload,\n} from '../NativeViewGestureHandler';\n\nexport class NativeGesture extends BaseGesture {\n public config: BaseGestureConfig & NativeViewGestureConfig = {};\n\n constructor() {\n super();\n\n this.handlerName = 'NativeViewGestureHandler';\n }\n\n shouldActivateOnStart(value: boolean) {\n this.config.shouldActivateOnStart = value;\n return this;\n }\n\n disallowInterruption(value: boolean) {\n this.config.disallowInterruption = value;\n return this;\n }\n}\n\nexport type NativeGestureType = InstanceType;\n","import { BaseGestureConfig, ContinousBaseGesture } from './gesture';\nimport { GestureUpdateEvent } from '../gestureHandlerCommon';\nimport {\n PanGestureConfig,\n PanGestureHandlerEventPayload,\n} from '../PanGestureHandler';\n\nexport type PanGestureChangeEventPayload = {\n changeX: number;\n changeY: number;\n};\n\nfunction changeEventCalculator(\n current: GestureUpdateEvent,\n previous?: GestureUpdateEvent\n) {\n 'worklet';\n let changePayload: PanGestureChangeEventPayload;\n if (previous === undefined) {\n changePayload = {\n changeX: current.translationX,\n changeY: current.translationY,\n };\n } else {\n changePayload = {\n changeX: current.translationX - previous.translationX,\n changeY: current.translationY - previous.translationY,\n };\n }\n\n return { ...current, ...changePayload };\n}\n\nexport class PanGesture extends ContinousBaseGesture<\n PanGestureHandlerEventPayload,\n PanGestureChangeEventPayload\n> {\n public config: BaseGestureConfig & PanGestureConfig = {};\n\n constructor() {\n super();\n\n this.handlerName = 'PanGestureHandler';\n }\n\n activeOffsetY(offset: number | number[]) {\n if (Array.isArray(offset)) {\n this.config.activeOffsetYStart = offset[0];\n this.config.activeOffsetYEnd = offset[1];\n } else if (offset < 0) {\n this.config.activeOffsetYStart = offset;\n } else {\n this.config.activeOffsetYEnd = offset;\n }\n return this;\n }\n\n activeOffsetX(offset: number | number[]) {\n if (Array.isArray(offset)) {\n this.config.activeOffsetXStart = offset[0];\n this.config.activeOffsetXEnd = offset[1];\n } else if (offset < 0) {\n this.config.activeOffsetXStart = offset;\n } else {\n this.config.activeOffsetXEnd = offset;\n }\n return this;\n }\n\n failOffsetY(offset: number | number[]) {\n if (Array.isArray(offset)) {\n this.config.failOffsetYStart = offset[0];\n this.config.failOffsetYEnd = offset[1];\n } else if (offset < 0) {\n this.config.failOffsetYStart = offset;\n } else {\n this.config.failOffsetYEnd = offset;\n }\n return this;\n }\n\n failOffsetX(offset: number | number[]) {\n if (Array.isArray(offset)) {\n this.config.failOffsetXStart = offset[0];\n this.config.failOffsetXEnd = offset[1];\n } else if (offset < 0) {\n this.config.failOffsetXStart = offset;\n } else {\n this.config.failOffsetXEnd = offset;\n }\n return this;\n }\n\n minPointers(minPointers: number) {\n this.config.minPointers = minPointers;\n return this;\n }\n\n maxPointers(maxPointers: number) {\n this.config.maxPointers = maxPointers;\n return this;\n }\n\n minDistance(distance: number) {\n this.config.minDist = distance;\n return this;\n }\n\n minVelocity(velocity: number) {\n this.config.minVelocity = velocity;\n return this;\n }\n\n minVelocityX(velocity: number) {\n this.config.minVelocityX = velocity;\n return this;\n }\n\n minVelocityY(velocity: number) {\n this.config.minVelocityY = velocity;\n return this;\n }\n\n averageTouches(value: boolean) {\n this.config.avgTouches = value;\n return this;\n }\n\n enableTrackpadTwoFingerGesture(value: boolean) {\n this.config.enableTrackpadTwoFingerGesture = value;\n return this;\n }\n\n activateAfterLongPress(duration: number) {\n this.config.activateAfterLongPress = duration;\n return this;\n }\n\n onChange(\n callback: (\n event: GestureUpdateEvent<\n PanGestureHandlerEventPayload & PanGestureChangeEventPayload\n >\n ) => void\n ) {\n // @ts-ignore TS being overprotective, PanGestureHandlerEventPayload is Record\n this.handlers.changeEventCalculator = changeEventCalculator;\n return super.onChange(callback);\n }\n}\n\nexport type PanGestureType = InstanceType;\n","import { ContinousBaseGesture } from './gesture';\nimport { PinchGestureHandlerEventPayload } from '../PinchGestureHandler';\nimport { GestureUpdateEvent } from '../gestureHandlerCommon';\n\nexport type PinchGestureChangeEventPayload = {\n scaleChange: number;\n};\n\nfunction changeEventCalculator(\n current: GestureUpdateEvent,\n previous?: GestureUpdateEvent\n) {\n 'worklet';\n let changePayload: PinchGestureChangeEventPayload;\n if (previous === undefined) {\n changePayload = {\n scaleChange: current.scale,\n };\n } else {\n changePayload = {\n scaleChange: current.scale / previous.scale,\n };\n }\n\n return { ...current, ...changePayload };\n}\n\nexport class PinchGesture extends ContinousBaseGesture<\n PinchGestureHandlerEventPayload,\n PinchGestureChangeEventPayload\n> {\n constructor() {\n super();\n\n this.handlerName = 'PinchGestureHandler';\n }\n\n onChange(\n callback: (\n event: GestureUpdateEvent<\n PinchGestureHandlerEventPayload & PinchGestureChangeEventPayload\n >\n ) => void\n ) {\n // @ts-ignore TS being overprotective, PinchGestureHandlerEventPayload is Record\n this.handlers.changeEventCalculator = changeEventCalculator;\n return super.onChange(callback);\n }\n}\n\nexport type PinchGestureType = InstanceType;\n","import { ComponentClass } from 'react';\nimport {\n GestureUpdateEvent,\n GestureStateChangeEvent,\n} from '../gestureHandlerCommon';\nimport { tagMessage } from '../../utils';\n\nexport interface SharedValue {\n value: T;\n}\n\nlet Reanimated: {\n default: {\n // Slightly modified definition copied from 'react-native-reanimated'\n // eslint-disable-next-line @typescript-eslint/ban-types\n createAnimatedComponent

(\n component: ComponentClass

,\n options?: unknown\n ): ComponentClass

;\n };\n useEvent: (\n callback: (event: GestureUpdateEvent | GestureStateChangeEvent) => void,\n events: string[],\n rebuild: boolean\n ) => unknown;\n useSharedValue: (value: T) => SharedValue;\n setGestureState: (handlerTag: number, newState: number) => void;\n};\n\ntry {\n Reanimated = require('react-native-reanimated');\n} catch (e) {\n // When 'react-native-reanimated' is not available we want to quietly continue\n // @ts-ignore TS demands the variable to be initialized\n Reanimated = undefined;\n}\n\nif (!Reanimated?.useSharedValue) {\n // @ts-ignore Make sure the loaded module is actually Reanimated, if it's not\n // reset the module to undefined so we can fallback to the default implementation\n Reanimated = undefined;\n}\n\nif (Reanimated !== undefined && !Reanimated.setGestureState) {\n // The loaded module is Reanimated but it doesn't have the setGestureState defined\n Reanimated.setGestureState = () => {\n 'worklet';\n console.warn(\n tagMessage(\n 'Please use newer version of react-native-reanimated in order to control state of the gestures.'\n )\n );\n };\n}\n\nexport { Reanimated };\n","import { ContinousBaseGesture } from './gesture';\nimport { RotationGestureHandlerEventPayload } from '../RotationGestureHandler';\nimport { GestureUpdateEvent } from '../gestureHandlerCommon';\n\ntype RotationGestureChangeEventPayload = {\n rotationChange: number;\n};\n\nfunction changeEventCalculator(\n current: GestureUpdateEvent,\n previous?: GestureUpdateEvent\n) {\n 'worklet';\n let changePayload: RotationGestureChangeEventPayload;\n if (previous === undefined) {\n changePayload = {\n rotationChange: current.rotation,\n };\n } else {\n changePayload = {\n rotationChange: current.rotation - previous.rotation,\n };\n }\n\n return { ...current, ...changePayload };\n}\n\nexport class RotationGesture extends ContinousBaseGesture<\n RotationGestureHandlerEventPayload,\n RotationGestureChangeEventPayload\n> {\n constructor() {\n super();\n\n this.handlerName = 'RotationGestureHandler';\n }\n\n onChange(\n callback: (\n event: GestureUpdateEvent<\n RotationGestureHandlerEventPayload & RotationGestureChangeEventPayload\n >\n ) => void\n ) {\n // @ts-ignore TS being overprotective, RotationGestureHandlerEventPayload is Record\n this.handlers.changeEventCalculator = changeEventCalculator;\n return super.onChange(callback);\n }\n}\n\nexport type RotationGestureType = InstanceType;\n","import { BaseGestureConfig, BaseGesture } from './gesture';\nimport {\n TapGestureConfig,\n TapGestureHandlerEventPayload,\n} from '../TapGestureHandler';\n\nexport class TapGesture extends BaseGesture {\n public config: BaseGestureConfig & TapGestureConfig = {};\n\n constructor() {\n super();\n\n this.handlerName = 'TapGestureHandler';\n this.shouldCancelWhenOutside(true);\n }\n\n minPointers(minPointers: number) {\n this.config.minPointers = minPointers;\n return this;\n }\n\n numberOfTaps(count: number) {\n this.config.numberOfTaps = count;\n return this;\n }\n\n maxDistance(maxDist: number) {\n this.config.maxDist = maxDist;\n return this;\n }\n\n maxDuration(duration: number) {\n this.config.maxDurationMs = duration;\n return this;\n }\n\n maxDelay(delay: number) {\n this.config.maxDelayMs = delay;\n return this;\n }\n\n maxDeltaX(delta: number) {\n this.config.maxDeltaX = delta;\n return this;\n }\n\n maxDeltaY(delta: number) {\n this.config.maxDeltaY = delta;\n return this;\n }\n}\n\nexport type TapGestureType = InstanceType;\n","import { isJestEnv } from '../utils';\nimport { GestureType } from './gestures/gesture';\nimport { GestureEvent, HandlerStateChangeEvent } from './gestureHandlerCommon';\n\nexport const handlerIDToTag: Record = {};\nconst gestures = new Map();\nconst oldHandlers = new Map();\nconst testIDs = new Map();\n\nlet handlerTag = 1;\n\nexport function getNextHandlerTag(): number {\n return handlerTag++;\n}\n\nexport function registerHandler(\n handlerTag: number,\n handler: GestureType,\n testID?: string\n) {\n gestures.set(handlerTag, handler);\n if (isJestEnv() && testID) {\n testIDs.set(testID, handlerTag);\n }\n}\n\nexport function registerOldGestureHandler(\n handlerTag: number,\n handler: GestureHandlerCallbacks\n) {\n oldHandlers.set(handlerTag, handler);\n}\n\nexport function unregisterHandler(handlerTag: number, testID?: string) {\n gestures.delete(handlerTag);\n if (isJestEnv() && testID) {\n testIDs.delete(testID);\n }\n}\n\nexport function findHandler(handlerTag: number) {\n return gestures.get(handlerTag);\n}\n\nexport function findOldGestureHandler(handlerTag: number) {\n return oldHandlers.get(handlerTag);\n}\n\nexport function findHandlerByTestID(testID: string) {\n const handlerTag = testIDs.get(testID);\n if (handlerTag !== undefined) {\n return findHandler(handlerTag) ?? null;\n }\n return null;\n}\n\nexport interface GestureHandlerCallbacks {\n onGestureEvent: (event: GestureEvent) => void;\n onGestureStateChange: (event: HandlerStateChangeEvent) => void;\n}\n","import { initialize } from './init';\n\nexport { Directions } from './Directions';\nexport { State } from './State';\nexport { default as gestureHandlerRootHOC } from './components/gestureHandlerRootHOC';\nexport { default as GestureHandlerRootView } from './components/GestureHandlerRootView';\nexport type {\n // event types\n GestureEvent,\n HandlerStateChangeEvent,\n // event payloads types\n GestureEventPayload,\n HandlerStateChangeEventPayload,\n // pointer events\n GestureTouchEvent,\n TouchData,\n // new api event types\n GestureUpdateEvent,\n GestureStateChangeEvent,\n} from './handlers/gestureHandlerCommon';\nexport type { GestureType } from './handlers/gestures/gesture';\nexport type {\n TapGestureHandlerEventPayload,\n TapGestureHandlerProps,\n} from './handlers/TapGestureHandler';\nexport type {\n ForceTouchGestureHandlerEventPayload,\n ForceTouchGestureHandlerProps,\n} from './handlers/ForceTouchGestureHandler';\nexport type { ForceTouchGestureChangeEventPayload } from './handlers/gestures/forceTouchGesture';\nexport type {\n LongPressGestureHandlerEventPayload,\n LongPressGestureHandlerProps,\n} from './handlers/LongPressGestureHandler';\nexport type {\n PanGestureHandlerEventPayload,\n PanGestureHandlerProps,\n} from './handlers/PanGestureHandler';\nexport type { PanGestureChangeEventPayload } from './handlers/gestures/panGesture';\nexport type {\n PinchGestureHandlerEventPayload,\n PinchGestureHandlerProps,\n} from './handlers/PinchGestureHandler';\nexport type { PinchGestureChangeEventPayload } from './handlers/gestures/pinchGesture';\nexport type {\n RotationGestureHandlerEventPayload,\n RotationGestureHandlerProps,\n} from './handlers/RotationGestureHandler';\nexport type {\n FlingGestureHandlerEventPayload,\n FlingGestureHandlerProps,\n} from './handlers/FlingGestureHandler';\nexport { TapGestureHandler } from './handlers/TapGestureHandler';\nexport { ForceTouchGestureHandler } from './handlers/ForceTouchGestureHandler';\nexport { LongPressGestureHandler } from './handlers/LongPressGestureHandler';\nexport { PanGestureHandler } from './handlers/PanGestureHandler';\nexport { PinchGestureHandler } from './handlers/PinchGestureHandler';\nexport { RotationGestureHandler } from './handlers/RotationGestureHandler';\nexport { FlingGestureHandler } from './handlers/FlingGestureHandler';\nexport { default as createNativeWrapper } from './handlers/createNativeWrapper';\nexport type {\n NativeViewGestureHandlerPayload,\n NativeViewGestureHandlerProps,\n} from './handlers/NativeViewGestureHandler';\nexport { GestureDetector } from './handlers/gestures/GestureDetector';\nexport { GestureObjects as Gesture } from './handlers/gestures/gestureObjects';\nexport type { TapGestureType as TapGesture } from './handlers/gestures/tapGesture';\nexport type { PanGestureType as PanGesture } from './handlers/gestures/panGesture';\nexport type { FlingGestureType as FlingGesture } from './handlers/gestures/flingGesture';\nexport type { LongPressGestureType as LongPressGesture } from './handlers/gestures/longPressGesture';\nexport type { PinchGestureType as PinchGesture } from './handlers/gestures/pinchGesture';\nexport type { RotationGestureType as RotationGesture } from './handlers/gestures/rotationGesture';\nexport type { ForceTouchGestureType as ForceTouchGesture } from './handlers/gestures/forceTouchGesture';\nexport type { NativeGestureType as NativeGesture } from './handlers/gestures/nativeGesture';\nexport type { ManualGestureType as ManualGesture } from './handlers/gestures/manualGesture';\nexport type {\n ComposedGestureType as ComposedGesture,\n RaceGestureType as RaceGesture,\n SimultaneousGestureType as SimultaneousGesture,\n ExclusiveGestureType as ExclusiveGesture,\n} from './handlers/gestures/gestureComposition';\nexport type { GestureStateManagerType as GestureStateManager } from './handlers/gestures/gestureStateManager';\nexport { NativeViewGestureHandler } from './handlers/NativeViewGestureHandler';\nexport type {\n RawButtonProps,\n BaseButtonProps,\n RectButtonProps,\n BorderlessButtonProps,\n} from './components/GestureButtons';\nexport {\n RawButton,\n BaseButton,\n RectButton,\n BorderlessButton,\n PureNativeButton,\n} from './components/GestureButtons';\nexport {\n TouchableHighlight,\n TouchableNativeFeedback,\n TouchableOpacity,\n TouchableWithoutFeedback,\n} from './components/touchables';\nexport {\n ScrollView,\n Switch,\n TextInput,\n DrawerLayoutAndroid,\n FlatList,\n RefreshControl,\n} from './components/GestureComponents';\nexport type {\n //events\n GestureHandlerGestureEvent,\n GestureHandlerStateChangeEvent,\n //event payloads\n GestureHandlerGestureEventNativeEvent,\n GestureHandlerStateChangeNativeEvent,\n NativeViewGestureHandlerGestureEvent,\n NativeViewGestureHandlerStateChangeEvent,\n TapGestureHandlerGestureEvent,\n TapGestureHandlerStateChangeEvent,\n ForceTouchGestureHandlerGestureEvent,\n ForceTouchGestureHandlerStateChangeEvent,\n LongPressGestureHandlerGestureEvent,\n LongPressGestureHandlerStateChangeEvent,\n PanGestureHandlerGestureEvent,\n PanGestureHandlerStateChangeEvent,\n PinchGestureHandlerGestureEvent,\n PinchGestureHandlerStateChangeEvent,\n RotationGestureHandlerGestureEvent,\n RotationGestureHandlerStateChangeEvent,\n FlingGestureHandlerGestureEvent,\n FlingGestureHandlerStateChangeEvent,\n // handlers props\n NativeViewGestureHandlerProperties,\n TapGestureHandlerProperties,\n LongPressGestureHandlerProperties,\n PanGestureHandlerProperties,\n PinchGestureHandlerProperties,\n RotationGestureHandlerProperties,\n FlingGestureHandlerProperties,\n ForceTouchGestureHandlerProperties,\n // buttons props\n RawButtonProperties,\n BaseButtonProperties,\n RectButtonProperties,\n BorderlessButtonProperties,\n} from './handlers/gestureHandlerTypesCompat';\n\nexport { default as Swipeable } from './components/Swipeable';\nexport type {\n DrawerLayoutProps,\n DrawerPosition,\n DrawerState,\n DrawerType,\n DrawerLockMode,\n DrawerKeyboardDismissMode,\n} from './components/DrawerLayout';\nexport { default as DrawerLayout } from './components/DrawerLayout';\n\nexport {\n enableExperimentalWebImplementation,\n enableLegacyWebImplementation,\n} from './EnableNewWebImplementation';\n\ninitialize();\n","import { startListening } from './handlers/gestures/eventReceiver';\nimport RNGestureHandlerModule from './RNGestureHandlerModule';\nimport { isFabric } from './utils';\n\nlet fabricInitialized = false;\n\nexport function initialize() {\n startListening();\n}\n\n// since isFabric() may give wrong results before the first render, we call this\n// method during render of GestureHandlerRootView\nexport function maybeInitializeFabric() {\n if (isFabric() && !fabricInitialized) {\n RNGestureHandlerModule.install();\n fabricInitialized = true;\n }\n}\n","import pack from 'react-native/package.json';\n\nconst [majorStr, minorStr] = pack.version.split('.');\nexport const REACT_NATIVE_VERSION = {\n major: parseInt(majorStr, 10),\n minor: parseInt(minorStr, 10),\n};\n\nexport function toArray(object: T | T[]): T[] {\n if (!Array.isArray(object)) {\n return [object];\n }\n\n return object;\n}\n\nexport type withPrevAndCurrentMapFn = (\n previous: Transformed | null,\n current: T\n) => Transformed;\nexport function withPrevAndCurrent(\n array: T[],\n mapFn: withPrevAndCurrentMapFn\n): Transformed[] {\n const previousArr: (null | Transformed)[] = [null];\n const currentArr = [...array];\n const transformedArr: Transformed[] = [];\n currentArr.forEach((current, i) => {\n const previous = previousArr[i];\n const transformed = mapFn(previous, current);\n previousArr.push(transformed);\n transformedArr.push(transformed);\n });\n return transformedArr;\n}\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function hasProperty(object: object, key: string) {\n return Object.prototype.hasOwnProperty.call(object, key);\n}\n\nexport function isJestEnv(): boolean {\n // @ts-ignore Do not use `@types/node` because it will prioritise Node types over RN types which breaks the types (ex. setTimeout) in React Native projects.\n return hasProperty(global, 'process') && !!process.env.JEST_WORKER_ID;\n}\n\nexport function tagMessage(msg: string) {\n return `[react-native-gesture-handler] ${msg}`;\n}\n\n// helper method to check whether Fabric is enabled, however global.nativeFabricUIManager\n// may not be initialized before the first render\nexport function isFabric(): boolean {\n // @ts-expect-error nativeFabricUIManager is not yet included in the RN types\n return !!global?.nativeFabricUIManager;\n}\n\nexport function isRemoteDebuggingEnabled(): boolean {\n // react-native-reanimated checks if in remote debugging in the same way\n // @ts-ignore global is available but node types are not included\n return !(global as any).nativeCallSyncHook || (global as any).__REMOTEDEV__;\n}\n","export const DEFAULT_TOUCH_SLOP = 15;\n\nexport const Direction = {\n RIGHT: 1,\n LEFT: 2,\n UP: 4,\n DOWN: 8,\n};\n","import { AdaptedEvent, EventTypes } from '../interfaces';\nimport PointerTracker from '../tools/PointerTracker';\n\nexport interface RotationGestureListener {\n onRotationBegin: (detector: RotationGestureDetector) => boolean;\n onRotation: (detector: RotationGestureDetector) => boolean;\n onRotationEnd: (detector: RotationGestureDetector) => void;\n}\n\nexport default class RotationGestureDetector\n implements RotationGestureListener\n{\n onRotationBegin: (detector: RotationGestureDetector) => boolean;\n onRotation: (detector: RotationGestureDetector) => boolean;\n onRotationEnd: (detector: RotationGestureDetector) => void;\n\n private currentTime = 0;\n private previousTime = 0;\n\n private previousAngle = 0;\n private rotation = 0;\n\n private anchorX = 0;\n private anchorY = 0;\n\n private isInProgress = false;\n\n private keyPointers: number[] = [NaN, NaN];\n\n constructor(callbacks: RotationGestureListener) {\n this.onRotationBegin = callbacks.onRotationBegin;\n this.onRotation = callbacks.onRotation;\n this.onRotationEnd = callbacks.onRotationEnd;\n }\n\n private updateCurrent(event: AdaptedEvent, tracker: PointerTracker): void {\n this.previousTime = this.currentTime;\n this.currentTime = event.time;\n\n const [firstPointerID, secondPointerID] = this.keyPointers;\n\n const firstPointerX: number = tracker.getLastX(firstPointerID);\n const firstPointerY: number = tracker.getLastY(firstPointerID);\n const secondPointerX: number = tracker.getLastX(secondPointerID);\n const secondPointerY: number = tracker.getLastY(secondPointerID);\n\n const vectorX: number = secondPointerX - firstPointerX;\n const vectorY: number = secondPointerY - firstPointerY;\n\n this.anchorX = (firstPointerX + secondPointerX) / 2;\n this.anchorY = (firstPointerY + secondPointerY) / 2;\n\n //Angle diff should be positive when rotating in clockwise direction\n const angle: number = -Math.atan2(vectorY, vectorX);\n\n this.rotation = Number.isNaN(this.previousAngle)\n ? 0\n : this.previousAngle - angle;\n\n this.previousAngle = angle;\n\n if (this.rotation > Math.PI) {\n this.rotation -= Math.PI;\n } else if (this.rotation < -Math.PI) {\n this.rotation += Math.PI;\n }\n\n if (this.rotation > Math.PI / 2) {\n this.rotation -= Math.PI;\n } else if (this.rotation < -Math.PI / 2) {\n this.rotation += Math.PI;\n }\n }\n\n private finish(): void {\n if (!this.isInProgress) {\n return;\n }\n\n this.isInProgress = false;\n this.keyPointers = [NaN, NaN];\n this.onRotationEnd(this);\n }\n\n private setKeyPointers(tracker: PointerTracker): void {\n if (this.keyPointers[0] && this.keyPointers[1]) {\n return;\n }\n\n const pointerIDs: IterableIterator = tracker.getData().keys();\n\n this.keyPointers[0] = pointerIDs.next().value as number;\n this.keyPointers[1] = pointerIDs.next().value as number;\n }\n\n public onTouchEvent(event: AdaptedEvent, tracker: PointerTracker): boolean {\n switch (event.eventType) {\n case EventTypes.DOWN:\n this.isInProgress = false;\n break;\n\n case EventTypes.ADDITIONAL_POINTER_DOWN:\n if (this.isInProgress) {\n break;\n }\n this.isInProgress = true;\n\n this.previousTime = event.time;\n this.previousAngle = NaN;\n\n this.setKeyPointers(tracker);\n\n this.updateCurrent(event, tracker);\n this.onRotationBegin(this);\n break;\n\n case EventTypes.MOVE:\n if (!this.isInProgress) {\n break;\n }\n\n this.updateCurrent(event, tracker);\n this.onRotation(this);\n\n break;\n\n case EventTypes.ADDITIONAL_POINTER_UP:\n if (!this.isInProgress) {\n break;\n }\n\n if (this.keyPointers.indexOf(event.pointerId) >= 0) {\n this.finish();\n }\n\n break;\n\n case EventTypes.UP:\n if (this.isInProgress) {\n this.finish();\n }\n break;\n }\n\n return true;\n }\n\n public getTimeDelta(): number {\n return this.currentTime + this.previousTime;\n }\n\n public getAnchorX(): number {\n return this.anchorX;\n }\n\n public getAnchorY(): number {\n return this.anchorY;\n }\n\n public getRotation(): number {\n return this.rotation;\n }\n\n public reset(): void {\n this.keyPointers = [NaN, NaN];\n this.isInProgress = false;\n }\n}\n","import { DEFAULT_TOUCH_SLOP } from '../constants';\nimport { AdaptedEvent, EventTypes } from '../interfaces';\n\nimport PointerTracker from '../tools/PointerTracker';\n\nexport interface ScaleGestureListener {\n onScaleBegin: (detector: ScaleGestureDetector) => boolean;\n onScale: (detector: ScaleGestureDetector) => boolean;\n onScaleEnd: (detector: ScaleGestureDetector) => void;\n}\n\nexport default class ScaleGestureDetector implements ScaleGestureListener {\n public onScaleBegin: (detector: ScaleGestureDetector) => boolean;\n public onScale: (detector: ScaleGestureDetector) => boolean;\n public onScaleEnd: (detector: ScaleGestureDetector) => void;\n\n private focusX!: number;\n private focusY!: number;\n\n private currentSpan!: number;\n private prevSpan!: number;\n private initialSpan!: number;\n\n private currentTime!: number;\n private prevTime!: number;\n\n private inProgress = false;\n\n private spanSlop: number;\n private minSpan: number;\n\n public constructor(callbacks: ScaleGestureListener) {\n this.onScaleBegin = callbacks.onScaleBegin;\n this.onScale = callbacks.onScale;\n this.onScaleEnd = callbacks.onScaleEnd;\n\n this.spanSlop = DEFAULT_TOUCH_SLOP * 2;\n this.minSpan = 0;\n }\n\n public onTouchEvent(event: AdaptedEvent, tracker: PointerTracker): boolean {\n this.currentTime = event.time;\n\n const action: EventTypes = event.eventType;\n const numOfPointers = tracker.getTrackedPointersCount();\n\n const streamComplete: boolean =\n action === EventTypes.UP ||\n action === EventTypes.ADDITIONAL_POINTER_UP ||\n action === EventTypes.CANCEL;\n\n if (action === EventTypes.DOWN || streamComplete) {\n if (this.inProgress) {\n this.onScaleEnd(this);\n this.inProgress = false;\n this.initialSpan = 0;\n }\n\n if (streamComplete) {\n return true;\n }\n }\n\n const configChanged: boolean =\n action === EventTypes.DOWN ||\n action === EventTypes.ADDITIONAL_POINTER_UP ||\n action === EventTypes.ADDITIONAL_POINTER_DOWN;\n\n const pointerUp = action === EventTypes.ADDITIONAL_POINTER_UP;\n\n const ignoredPointer: number | undefined = pointerUp\n ? event.pointerId\n : undefined;\n\n //Determine focal point\n\n const div: number = pointerUp ? numOfPointers - 1 : numOfPointers;\n\n const sumX = tracker.getSumX(ignoredPointer);\n const sumY = tracker.getSumY(ignoredPointer);\n\n const focusX = sumX / div;\n const focusY = sumY / div;\n\n //Determine average deviation from focal point\n\n let devSumX = 0;\n let devSumY = 0;\n\n tracker.getData().forEach((value, key) => {\n if (key === ignoredPointer) {\n return;\n }\n\n devSumX += Math.abs(value.lastX - focusX);\n devSumY += Math.abs(value.lastY - focusY);\n });\n\n const devX: number = devSumX / div;\n const devY: number = devSumY / div;\n\n const spanX: number = devX * 2;\n const spanY: number = devY * 2;\n\n const span = Math.hypot(spanX, spanY);\n\n //Begin/end events\n const wasInProgress: boolean = this.inProgress;\n this.focusX = focusX;\n this.focusY = focusY;\n\n if (this.inProgress && (span < this.minSpan || configChanged)) {\n this.onScaleEnd(this);\n this.inProgress = false;\n this.initialSpan = span;\n }\n\n if (configChanged) {\n this.initialSpan = this.prevSpan = this.currentSpan = span;\n }\n\n if (\n !this.inProgress &&\n span >= this.minSpan &&\n (wasInProgress || Math.abs(span - this.initialSpan) > this.spanSlop)\n ) {\n this.prevSpan = this.currentSpan = span;\n this.prevTime = this.currentTime;\n this.inProgress = this.onScaleBegin(this);\n }\n\n //Handle motion\n if (action !== EventTypes.MOVE) {\n return true;\n }\n\n this.currentSpan = span;\n\n if (this.inProgress && !this.onScale(this)) {\n return true;\n }\n\n this.prevSpan = this.currentSpan;\n this.prevTime = this.currentTime;\n\n return true;\n }\n\n public getCurrentSpan(): number {\n return this.currentSpan;\n }\n\n public getFocusX(): number {\n return this.focusX;\n }\n\n public getFocusY(): number {\n return this.focusY;\n }\n\n public getTimeDelta(): number {\n return this.currentTime - this.prevTime;\n }\n\n public getScaleFactor(numOfPointers: number): number {\n if (numOfPointers < 2) {\n return 1;\n }\n\n return this.prevSpan > 0 ? this.currentSpan / this.prevSpan : 1;\n }\n}\n","import { State } from '../../State';\nimport { Direction } from '../constants';\nimport { AdaptedEvent, Config } from '../interfaces';\n\nimport GestureHandler from './GestureHandler';\n\nconst DEFAULT_MAX_DURATION_MS = 800;\nconst DEFAULT_MIN_ACCEPTABLE_DELTA = 160;\nconst DEFAULT_DIRECTION = Direction.RIGHT;\nconst DEFAULT_NUMBER_OF_TOUCHES_REQUIRED = 1;\n\nexport default class FlingGestureHandler extends GestureHandler {\n private numberOfPointersRequired = DEFAULT_NUMBER_OF_TOUCHES_REQUIRED;\n private direction = DEFAULT_DIRECTION;\n\n private maxDurationMs = DEFAULT_MAX_DURATION_MS;\n private minAcceptableDelta = DEFAULT_MIN_ACCEPTABLE_DELTA;\n private delayTimeout!: number;\n\n private startX = 0;\n private startY = 0;\n\n private maxNumberOfPointersSimultaneously = 0;\n private keyPointer = NaN;\n\n public init(ref: number, propsRef: React.RefObject): void {\n super.init(ref, propsRef);\n }\n\n public updateGestureConfig({ enabled = true, ...props }: Config): void {\n super.updateGestureConfig({ enabled: enabled, ...props });\n\n if (this.config.direction) {\n this.direction = this.config.direction;\n }\n\n if (this.config.numberOfPointers) {\n this.numberOfPointersRequired = this.config.numberOfPointers;\n }\n }\n\n protected transformNativeEvent() {\n const rect: DOMRect = this.view.getBoundingClientRect();\n\n return {\n x: this.tracker.getLastAvgX() - rect.left,\n y: this.tracker.getLastAvgY() - rect.top,\n absoluteX: this.tracker.getLastAvgX(),\n absoluteY: this.tracker.getLastAvgY(),\n };\n }\n\n private startFling(): void {\n this.startX = this.tracker.getLastX(this.keyPointer);\n this.startY = this.tracker.getLastY(this.keyPointer);\n\n this.begin();\n\n this.maxNumberOfPointersSimultaneously = 1;\n\n this.delayTimeout = setTimeout(() => this.fail(), this.maxDurationMs);\n }\n\n private tryEndFling(): boolean {\n if (\n this.maxNumberOfPointersSimultaneously ===\n this.numberOfPointersRequired &&\n ((this.direction & Direction.RIGHT &&\n this.tracker.getLastX(this.keyPointer) - this.startX >\n this.minAcceptableDelta) ||\n (this.direction & Direction.LEFT &&\n this.startX - this.tracker.getLastX(this.keyPointer) >\n this.minAcceptableDelta) ||\n (this.direction & Direction.UP &&\n this.startY - this.tracker.getLastY(this.keyPointer) >\n this.minAcceptableDelta) ||\n (this.direction & Direction.DOWN &&\n this.tracker.getLastY(this.keyPointer) - this.startY >\n this.minAcceptableDelta))\n ) {\n clearTimeout(this.delayTimeout);\n this.activate();\n\n return true;\n }\n\n return false;\n }\n\n private endFling() {\n if (!this.tryEndFling()) {\n this.fail();\n }\n }\n\n protected onPointerDown(event: AdaptedEvent): void {\n this.tracker.addToTracker(event);\n this.keyPointer = event.pointerId;\n\n super.onPointerDown(event);\n this.newPointerAction();\n }\n\n protected onPointerAdd(event: AdaptedEvent): void {\n this.tracker.addToTracker(event);\n super.onPointerAdd(event);\n this.newPointerAction();\n }\n\n private newPointerAction(): void {\n if (this.currentState === State.UNDETERMINED) {\n this.startFling();\n }\n\n if (this.currentState !== State.BEGAN) {\n return;\n }\n\n this.tryEndFling();\n\n if (\n this.tracker.getTrackedPointersCount() >\n this.maxNumberOfPointersSimultaneously\n ) {\n this.maxNumberOfPointersSimultaneously =\n this.tracker.getTrackedPointersCount();\n }\n }\n\n protected onPointerMove(event: AdaptedEvent): void {\n this.tracker.track(event);\n\n if (this.currentState !== State.BEGAN) {\n return;\n }\n\n this.tryEndFling();\n\n super.onPointerMove(event);\n }\n\n protected onPointerUp(event: AdaptedEvent): void {\n super.onPointerUp(event);\n this.onUp(event);\n\n this.keyPointer = NaN;\n }\n\n protected onPointerRemove(event: AdaptedEvent): void {\n super.onPointerRemove(event);\n this.onUp(event);\n }\n\n private onUp(event: AdaptedEvent): void {\n this.tracker.removeFromTracker(event.pointerId);\n if (this.currentState !== State.BEGAN) {\n return;\n }\n this.endFling();\n }\n\n public activate(force?: boolean): void {\n super.activate(force);\n this.end();\n }\n\n protected resetConfig(): void {\n super.resetConfig();\n this.numberOfPointersRequired = DEFAULT_NUMBER_OF_TOUCHES_REQUIRED;\n this.direction = DEFAULT_DIRECTION;\n }\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { findNodeHandle } from 'react-native';\nimport { State } from '../../State';\nimport {\n Config,\n AdaptedEvent,\n PropsRef,\n ResultEvent,\n PointerData,\n ResultTouchEvent,\n PointerType,\n TouchEventType,\n EventTypes,\n} from '../interfaces';\nimport EventManager from '../tools/EventManager';\nimport GestureHandlerOrchestrator from '../tools/GestureHandlerOrchestrator';\nimport InteractionManager from '../tools/InteractionManager';\nimport PointerEventManager from '../tools/PointerEventManager';\nimport PointerTracker, { TrackerElement } from '../tools/PointerTracker';\nimport TouchEventManager from '../tools/TouchEventManager';\nimport { isPointerInBounds } from '../utils';\n\nexport default abstract class GestureHandler {\n private lastSentState: State | null = null;\n protected currentState: State = State.UNDETERMINED;\n\n protected shouldCancellWhenOutside = false;\n protected hasCustomActivationCriteria: boolean;\n protected enabled = false;\n\n private ref!: number;\n private propsRef!: React.RefObject;\n private handlerTag!: number;\n protected config: Config = { enabled: false };\n protected view!: HTMLElement;\n\n protected eventManagers: EventManager[] = [];\n protected tracker: PointerTracker = new PointerTracker();\n\n // Orchestrator properties\n protected activationIndex = 0;\n protected awaiting = false;\n protected active = false;\n protected shouldResetProgress = false;\n protected pointerType: PointerType = PointerType.NONE;\n\n public constructor() {\n this.hasCustomActivationCriteria = false;\n }\n\n //\n // Initializing handler\n //\n\n protected init(ref: number, propsRef: React.RefObject) {\n this.propsRef = propsRef;\n this.ref = ref;\n\n this.currentState = State.UNDETERMINED;\n\n this.setView();\n this.addEventManager(new PointerEventManager(this.view));\n this.addEventManager(new TouchEventManager(this.view));\n }\n\n private setView() {\n if (!this.ref) {\n throw new Error(\n `Cannot find HTML Element for handler ${this.handlerTag}`\n );\n }\n\n this.view = findNodeHandle(this.ref) as unknown as HTMLElement;\n this.view.style['touchAction'] = 'none';\n //@ts-ignore This one disables default events on Safari\n this.view.style['WebkitTouchCallout'] = 'none';\n\n if (!this.config.userSelect) {\n this.view.style['webkitUserSelect'] = 'none';\n this.view.style['userSelect'] = 'none';\n } else {\n this.view.style['webkitUserSelect'] = this.config.userSelect;\n this.view.style['userSelect'] = this.config.userSelect;\n }\n }\n\n private addEventManager(manager: EventManager): void {\n manager.setOnPointerDown(this.onPointerDown.bind(this));\n manager.setOnPointerAdd(this.onPointerAdd.bind(this));\n manager.setOnPointerUp(this.onPointerUp.bind(this));\n manager.setOnPointerRemove(this.onPointerRemove.bind(this));\n manager.setOnPointerMove(this.onPointerMove.bind(this));\n manager.setOnPointerEnter(this.onPointerEnter.bind(this));\n manager.setOnPointerOut(this.onPointerOut.bind(this));\n manager.setOnPointerCancel(this.onPointerCancel.bind(this));\n manager.setOnPointerOutOfBounds(this.onPointerOutOfBounds.bind(this));\n manager.setListeners();\n\n this.eventManagers.push(manager);\n }\n\n //\n // Resetting handler\n //\n\n protected onCancel(): void {}\n protected onReset(): void {}\n protected resetProgress(): void {}\n\n public reset(): void {\n this.tracker.resetTracker();\n this.onReset();\n this.resetProgress();\n this.eventManagers.forEach((manager: EventManager) =>\n manager.resetManager()\n );\n this.currentState = State.UNDETERMINED;\n }\n\n //\n // State logic\n //\n\n public moveToState(newState: State, sendIfDisabled?: boolean) {\n if (this.currentState === newState) {\n return;\n }\n\n const oldState = this.currentState;\n this.currentState = newState;\n\n if (\n this.tracker.getTrackedPointersCount() > 0 &&\n this.config.needsPointerData &&\n this.isFinished()\n ) {\n this.cancelTouches();\n }\n\n GestureHandlerOrchestrator.getInstance().onHandlerStateChange(\n this,\n newState,\n oldState,\n sendIfDisabled\n );\n\n this.onStateChange(newState, oldState);\n }\n\n protected onStateChange(_newState: State, _oldState: State): void {}\n\n public begin(): void {\n if (!this.checkHitSlop()) {\n return;\n }\n\n if (this.currentState === State.UNDETERMINED) {\n this.moveToState(State.BEGAN);\n }\n }\n\n /**\n * @param {boolean} sendIfDisabled - Used when handler becomes disabled. With this flag orchestrator will be forced to send fail event\n */\n public fail(sendIfDisabled?: boolean): void {\n if (\n this.currentState === State.ACTIVE ||\n this.currentState === State.BEGAN\n ) {\n this.moveToState(State.FAILED, sendIfDisabled);\n this.view.style.cursor = 'auto';\n }\n\n this.resetProgress();\n }\n\n /**\n * @param {boolean} sendIfDisabled - Used when handler becomes disabled. With this flag orchestrator will be forced to send cancel event\n */\n public cancel(sendIfDisabled?: boolean): void {\n if (\n this.currentState === State.ACTIVE ||\n this.currentState === State.UNDETERMINED ||\n this.currentState === State.BEGAN\n ) {\n this.onCancel();\n this.moveToState(State.CANCELLED, sendIfDisabled);\n this.view.style.cursor = 'auto';\n }\n }\n\n public activate(_force = false) {\n if (\n this.currentState === State.UNDETERMINED ||\n this.currentState === State.BEGAN\n ) {\n this.moveToState(State.ACTIVE);\n this.view.style.cursor = 'grab';\n }\n }\n\n public end() {\n if (\n this.currentState === State.BEGAN ||\n this.currentState === State.ACTIVE\n ) {\n this.moveToState(State.END);\n this.view.style.cursor = 'auto';\n }\n\n this.resetProgress();\n }\n\n //\n // Methods for orchestrator\n //\n\n public isAwaiting(): boolean {\n return this.awaiting;\n }\n public setAwaiting(value: boolean): void {\n this.awaiting = value;\n }\n\n public isActive(): boolean {\n return this.active;\n }\n public setActive(value: boolean): void {\n this.active = value;\n }\n\n public getShouldResetProgress(): boolean {\n return this.shouldResetProgress;\n }\n public setShouldResetProgress(value: boolean): void {\n this.shouldResetProgress = value;\n }\n\n public getActivationIndex(): number {\n return this.activationIndex;\n }\n public setActivationIndex(value: number): void {\n this.activationIndex = value;\n }\n\n public shouldWaitForHandlerFailure(handler: GestureHandler): boolean {\n if (handler === this) {\n return false;\n }\n\n return InteractionManager.getInstance().shouldWaitForHandlerFailure(\n this,\n handler\n );\n }\n\n public shouldRequireToWaitForFailure(handler: GestureHandler): boolean {\n if (handler === this) {\n return false;\n }\n\n return InteractionManager.getInstance().shouldRequireHandlerToWaitForFailure(\n this,\n handler\n );\n }\n\n public shouldRecognizeSimultaneously(handler: GestureHandler): boolean {\n if (handler === this) {\n return true;\n }\n\n return InteractionManager.getInstance().shouldRecognizeSimultaneously(\n this,\n handler\n );\n }\n\n public shouldBeCancelledByOther(handler: GestureHandler): boolean {\n if (handler === this) {\n return false;\n }\n\n return InteractionManager.getInstance().shouldHandlerBeCancelledBy(\n this,\n handler\n );\n }\n\n //\n // Event actions\n //\n\n protected onPointerDown(event: AdaptedEvent): void {\n GestureHandlerOrchestrator.getInstance().recordHandlerIfNotPresent(this);\n this.pointerType = event.pointerType;\n\n if (this.pointerType === PointerType.TOUCH) {\n GestureHandlerOrchestrator.getInstance().cancelMouseAndPenGestures(this);\n }\n\n if (this.config.needsPointerData) {\n this.sendTouchEvent(event);\n }\n }\n // Adding another pointer to existing ones\n protected onPointerAdd(event: AdaptedEvent): void {\n if (this.config.needsPointerData) {\n this.sendTouchEvent(event);\n }\n }\n protected onPointerUp(event: AdaptedEvent): void {\n if (this.config.needsPointerData) {\n this.sendTouchEvent(event);\n }\n }\n // Removing pointer, when there is more than one pointers\n protected onPointerRemove(event: AdaptedEvent): void {\n if (this.config.needsPointerData) {\n this.sendTouchEvent(event);\n }\n }\n protected onPointerMove(event: AdaptedEvent): void {\n this.tryToSendMoveEvent(false);\n if (this.config.needsPointerData) {\n this.sendTouchEvent(event);\n }\n }\n protected onPointerOut(event: AdaptedEvent): void {\n if (this.shouldCancellWhenOutside) {\n switch (this.currentState) {\n case State.ACTIVE:\n this.cancel();\n break;\n case State.BEGAN:\n this.fail();\n break;\n }\n return;\n }\n\n if (this.config.needsPointerData) {\n this.sendTouchEvent(event);\n }\n }\n protected onPointerEnter(event: AdaptedEvent): void {\n if (this.config.needsPointerData) {\n this.sendTouchEvent(event);\n }\n }\n protected onPointerCancel(event: AdaptedEvent): void {\n if (this.config.needsPointerData) {\n this.sendTouchEvent(event);\n }\n\n this.cancel();\n this.reset();\n }\n protected onPointerOutOfBounds(event: AdaptedEvent): void {\n this.tryToSendMoveEvent(true);\n if (this.config.needsPointerData) {\n this.sendTouchEvent(event);\n }\n }\n private tryToSendMoveEvent(out: boolean): void {\n if (\n this.enabled &&\n this.active &&\n (!out || (out && !this.shouldCancellWhenOutside))\n ) {\n this.sendEvent(this.currentState, this.currentState);\n }\n }\n\n public sendTouchEvent(event: AdaptedEvent): void {\n if (!this.enabled) {\n return;\n }\n\n const { onGestureHandlerEvent }: PropsRef = this.propsRef\n .current as PropsRef;\n\n const touchEvent: ResultTouchEvent | undefined =\n this.transformTouchEvent(event);\n\n if (touchEvent) {\n invokeNullableMethod(onGestureHandlerEvent, touchEvent);\n }\n }\n\n //\n // Events Sending\n //\n\n public sendEvent = (newState: State, oldState: State): void => {\n const { onGestureHandlerEvent, onGestureHandlerStateChange }: PropsRef =\n this.propsRef.current as PropsRef;\n\n const resultEvent: ResultEvent = this.transformEventData(\n newState,\n oldState\n );\n\n // In the new API oldState field has to be undefined, unless we send event state changed\n // Here the order is flipped to avoid workarounds such as making backup of the state and setting it to undefined first, then changing it back\n // Flipping order with setting oldState to undefined solves issue, when events were being sent twice instead of once\n // However, this may cause trouble in the future (but for now we don't know that)\n\n if (this.lastSentState !== newState) {\n this.lastSentState = newState;\n invokeNullableMethod(onGestureHandlerStateChange, resultEvent);\n }\n if (this.currentState === State.ACTIVE) {\n resultEvent.nativeEvent.oldState = undefined;\n invokeNullableMethod(onGestureHandlerEvent, resultEvent);\n }\n };\n\n private transformEventData(newState: State, oldState: State): ResultEvent {\n return {\n nativeEvent: {\n numberOfPointers: this.tracker.getTrackedPointersCount(),\n state: newState,\n pointerInside: isPointerInBounds(this.view, {\n x: this.tracker.getLastAvgX(),\n y: this.tracker.getLastAvgY(),\n }),\n ...this.transformNativeEvent(),\n handlerTag: this.handlerTag,\n target: this.ref,\n oldState: newState !== oldState ? oldState : undefined,\n },\n timeStamp: Date.now(),\n };\n }\n\n private transformTouchEvent(\n event: AdaptedEvent\n ): ResultTouchEvent | undefined {\n const rect = this.view.getBoundingClientRect();\n\n const all: PointerData[] = [];\n const changed: PointerData[] = [];\n\n const trackerData = this.tracker.getData();\n\n // This if handles edge case where all pointers have been cancelled\n // When pointercancel is triggered, reset method is called. This means that tracker will be reset after first pointer being cancelled\n // The problem is, that handler will receive another pointercancel event from the rest of the pointers\n // To avoid crashing, we don't send event if tracker tracks no pointers, i.e. has been reset\n if (trackerData.size === 0 || !trackerData.has(event.pointerId)) {\n return;\n }\n\n trackerData.forEach((element: TrackerElement, key: number): void => {\n const id: number = this.tracker.getMappedTouchEventId(key);\n\n all.push({\n id: id,\n x: element.lastX - rect.left,\n y: element.lastY - rect.top,\n absoluteX: element.lastX,\n absoluteY: element.lastY,\n });\n });\n\n // Each pointer sends its own event, so we want changed touches to contain only the pointer that has changed.\n // However, if the event is cancel, we want to cancel all pointers to avoid crashes\n if (event.eventType !== EventTypes.CANCEL) {\n changed.push({\n id: this.tracker.getMappedTouchEventId(event.pointerId),\n x: event.x - rect.left,\n y: event.y - rect.top,\n absoluteX: event.x,\n absoluteY: event.y,\n });\n } else {\n trackerData.forEach((element: TrackerElement, key: number): void => {\n const id: number = this.tracker.getMappedTouchEventId(key);\n\n changed.push({\n id: id,\n x: element.lastX - rect.left,\n y: element.lastY - rect.top,\n absoluteX: element.lastX,\n absoluteY: element.lastY,\n });\n });\n }\n\n let eventType: TouchEventType = TouchEventType.UNDETERMINED;\n\n switch (event.eventType) {\n case EventTypes.DOWN:\n case EventTypes.ADDITIONAL_POINTER_DOWN:\n eventType = TouchEventType.DOWN;\n break;\n case EventTypes.UP:\n case EventTypes.ADDITIONAL_POINTER_UP:\n eventType = TouchEventType.UP;\n break;\n case EventTypes.MOVE:\n eventType = TouchEventType.MOVE;\n break;\n case EventTypes.CANCEL:\n eventType = TouchEventType.CANCELLED;\n break;\n }\n\n // Here, when we receive up event, we want to decrease number of touches\n // That's because we want handler to send information that there's one pointer less\n // However, we still want this pointer to be present in allTouches array, so that its data can be accessed\n let numberOfTouches: number = all.length;\n\n if (\n event.eventType === EventTypes.UP ||\n event.eventType === EventTypes.ADDITIONAL_POINTER_UP\n ) {\n --numberOfTouches;\n }\n\n return {\n nativeEvent: {\n handlerTag: this.handlerTag,\n state: this.currentState,\n eventType: event.touchEventType ?? eventType,\n changedTouches: changed,\n allTouches: all,\n numberOfTouches: numberOfTouches,\n },\n timeStamp: Date.now(),\n };\n }\n\n private cancelTouches(): void {\n const rect = this.view.getBoundingClientRect();\n\n const all: PointerData[] = [];\n const changed: PointerData[] = [];\n\n const trackerData = this.tracker.getData();\n\n if (trackerData.size === 0) {\n return;\n }\n\n trackerData.forEach((element: TrackerElement, key: number): void => {\n const id: number = this.tracker.getMappedTouchEventId(key);\n\n all.push({\n id: id,\n x: element.lastX - rect.left,\n y: element.lastY - rect.top,\n absoluteX: element.lastX,\n absoluteY: element.lastY,\n });\n\n changed.push({\n id: id,\n x: element.lastX - rect.left,\n y: element.lastY - rect.top,\n absoluteX: element.lastX,\n absoluteY: element.lastY,\n });\n });\n\n const cancelEvent: ResultTouchEvent = {\n nativeEvent: {\n handlerTag: this.handlerTag,\n state: this.currentState,\n eventType: TouchEventType.CANCELLED,\n changedTouches: changed,\n allTouches: all,\n numberOfTouches: all.length,\n },\n timeStamp: Date.now(),\n };\n\n const { onGestureHandlerEvent }: PropsRef = this.propsRef\n .current as PropsRef;\n\n invokeNullableMethod(onGestureHandlerEvent, cancelEvent);\n }\n\n protected transformNativeEvent() {\n return {};\n }\n\n //\n // Handling config\n //\n\n public updateGestureConfig({ enabled = true, ...props }: Config): void {\n this.config = { enabled: enabled, ...props };\n this.enabled = enabled;\n\n if (this.config.shouldCancelWhenOutside !== undefined) {\n this.setShouldCancelWhenOutside(this.config.shouldCancelWhenOutside);\n }\n\n this.validateHitSlops();\n\n if (this.enabled) {\n return;\n }\n\n switch (this.currentState) {\n case State.ACTIVE:\n this.fail(true);\n break;\n case State.UNDETERMINED:\n GestureHandlerOrchestrator.getInstance().removeHandlerFromOrchestrator(\n this\n );\n break;\n default:\n this.cancel(true);\n break;\n }\n }\n\n protected checkCustomActivationCriteria(criterias: string[]): void {\n for (const key in this.config) {\n if (criterias.indexOf(key) >= 0) {\n this.hasCustomActivationCriteria = true;\n }\n }\n }\n\n private validateHitSlops(): void {\n if (!this.config.hitSlop) {\n return;\n }\n\n if (\n this.config.hitSlop.left !== undefined &&\n this.config.hitSlop.right !== undefined &&\n this.config.hitSlop.width !== undefined\n ) {\n throw new Error(\n 'HitSlop Error: Cannot define left, right and width at the same time'\n );\n }\n\n if (\n this.config.hitSlop.width !== undefined &&\n this.config.hitSlop.left === undefined &&\n this.config.hitSlop.right === undefined\n ) {\n throw new Error(\n 'HitSlop Error: When width is defined, either left or right has to be defined'\n );\n }\n\n if (\n this.config.hitSlop.height !== undefined &&\n this.config.hitSlop.top !== undefined &&\n this.config.hitSlop.bottom !== undefined\n ) {\n throw new Error(\n 'HitSlop Error: Cannot define top, bottom and height at the same time'\n );\n }\n\n if (\n this.config.hitSlop.height !== undefined &&\n this.config.hitSlop.top === undefined &&\n this.config.hitSlop.bottom === undefined\n ) {\n throw new Error(\n 'HitSlop Error: When height is defined, either top or bottom has to be defined'\n );\n }\n }\n\n private checkHitSlop(): boolean {\n if (!this.config.hitSlop) {\n return true;\n }\n\n const width = this.view.getBoundingClientRect().width;\n const height = this.view.getBoundingClientRect().height;\n\n let left = 0;\n let top = 0;\n let right: number = width;\n let bottom: number = height;\n\n if (this.config.hitSlop.horizontal !== undefined) {\n left -= this.config.hitSlop.horizontal;\n right += this.config.hitSlop.horizontal;\n }\n\n if (this.config.hitSlop.vertical !== undefined) {\n top -= this.config.hitSlop.vertical;\n bottom += this.config.hitSlop.vertical;\n }\n\n if (this.config.hitSlop.left !== undefined) {\n left = -this.config.hitSlop.left;\n }\n\n if (this.config.hitSlop.right !== undefined) {\n right = width + this.config.hitSlop.right;\n }\n\n if (this.config.hitSlop.top !== undefined) {\n top = -this.config.hitSlop.top;\n }\n\n if (this.config.hitSlop.bottom !== undefined) {\n bottom = width + this.config.hitSlop.bottom;\n }\n if (this.config.hitSlop.width !== undefined) {\n if (this.config.hitSlop.left !== undefined) {\n right = left + this.config.hitSlop.width;\n } else if (this.config.hitSlop.right !== undefined) {\n left = right - this.config.hitSlop.width;\n }\n }\n\n if (this.config.hitSlop.height !== undefined) {\n if (this.config.hitSlop.top !== undefined) {\n bottom = top + this.config.hitSlop.height;\n } else if (this.config.hitSlop.bottom !== undefined) {\n top = bottom - this.config.hitSlop.height;\n }\n }\n\n const rect: DOMRect = this.view.getBoundingClientRect();\n const offsetX: number = this.tracker.getLastX() - rect.left;\n const offsetY: number = this.tracker.getLastY() - rect.top;\n\n if (\n offsetX >= left &&\n offsetX <= right &&\n offsetY >= top &&\n offsetY <= bottom\n ) {\n return true;\n }\n return false;\n }\n\n public isPointerInBounds({ x, y }: { x: number; y: number }): boolean {\n const rect: DOMRect = this.view.getBoundingClientRect();\n\n return (\n x >= rect.left && x <= rect.right && y >= rect.top && y <= rect.bottom\n );\n }\n\n protected resetConfig(): void {}\n\n //\n // Getters and setters\n //\n\n public getTag(): number {\n return this.handlerTag;\n }\n public setTag(tag: number): void {\n this.handlerTag = tag;\n }\n\n protected getConfig() {\n return this.config;\n }\n\n public getShouldEnableGestureOnSetup(): boolean {\n throw new Error('Must override GestureHandler.shouldEnableGestureOnSetup');\n }\n\n public getView(): HTMLElement {\n return this.view;\n }\n\n public getEventManagers(): EventManager[] {\n return this.eventManagers;\n }\n\n public getTracker(): PointerTracker {\n return this.tracker;\n }\n\n public getTrackedPointersID(): number[] {\n return this.tracker.getTrackedPointersID();\n }\n\n public getState(): State {\n return this.currentState;\n }\n\n public isEnabled(): boolean {\n return this.enabled;\n }\n\n private isFinished(): boolean {\n return (\n this.currentState === State.END ||\n this.currentState === State.FAILED ||\n this.currentState === State.CANCELLED\n );\n }\n\n protected setShouldCancelWhenOutside(shouldCancel: boolean) {\n this.shouldCancellWhenOutside = shouldCancel;\n }\n protected getShouldCancelWhenOutside(): boolean {\n return this.shouldCancellWhenOutside;\n }\n\n public getPointerType(): PointerType {\n return this.pointerType;\n }\n}\n\nfunction invokeNullableMethod(\n method:\n | ((event: ResultEvent | ResultTouchEvent) => void)\n | { __getHandler: () => (event: ResultEvent | ResultTouchEvent) => void }\n | { __nodeConfig: { argMapping: unknown[] } },\n event: ResultEvent | ResultTouchEvent\n): void {\n if (!method) {\n return;\n }\n\n if (typeof method === 'function') {\n method(event);\n return;\n }\n\n if ('__getHandler' in method && typeof method.__getHandler === 'function') {\n const handler = method.__getHandler();\n invokeNullableMethod(handler, event);\n return;\n }\n\n if (!('__nodeConfig' in method)) {\n return;\n }\n\n const { argMapping } = method.__nodeConfig;\n if (!Array.isArray(argMapping)) {\n return;\n }\n\n for (const [index, [key, value]] of argMapping.entries()) {\n if (!(key in event.nativeEvent)) {\n continue;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const nativeValue = event.nativeEvent[key];\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (value?.setValue) {\n //Reanimated API\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\n value.setValue(nativeValue);\n } else {\n //RN Animated API\n method.__nodeConfig.argMapping[index] = [key, nativeValue];\n }\n }\n\n return;\n}\n","import { State } from '../../State';\nimport { AdaptedEvent, Config } from '../interfaces';\n\nimport GestureHandler from './GestureHandler';\n\nconst DEFAULT_MIN_DURATION_MS = 500;\nconst DEFAULT_MAX_DIST_DP = 10;\nconst SCALING_FACTOR = 10;\n\nexport default class LongPressGestureHandler extends GestureHandler {\n private minDurationMs = DEFAULT_MIN_DURATION_MS;\n private defaultMaxDistSq = DEFAULT_MAX_DIST_DP * SCALING_FACTOR;\n\n private maxDistSq = this.defaultMaxDistSq;\n private startX = 0;\n private startY = 0;\n\n private startTime = 0;\n private previousTime = 0;\n\n private activationTimeout: number | undefined;\n\n public init(ref: number, propsRef: React.RefObject) {\n super.init(ref, propsRef);\n\n this.view.oncontextmenu = () => false;\n }\n\n protected transformNativeEvent() {\n const rect: DOMRect = this.view.getBoundingClientRect();\n\n return {\n x: this.tracker.getLastAvgX() - rect.left,\n y: this.tracker.getLastAvgY() - rect.top,\n absoluteX: this.tracker.getLastAvgX(),\n absoluteY: this.tracker.getLastAvgY(),\n duration: Date.now() - this.startTime,\n };\n }\n\n public updateGestureConfig({ enabled = true, ...props }: Config): void {\n super.updateGestureConfig({ enabled: enabled, ...props });\n\n if (this.config.minDurationMs !== undefined) {\n this.minDurationMs = this.config.minDurationMs;\n }\n\n if (this.config.maxDist !== undefined) {\n this.maxDistSq = this.config.maxDist * this.config.maxDist;\n }\n }\n\n protected resetConfig(): void {\n super.resetConfig();\n this.minDurationMs = DEFAULT_MIN_DURATION_MS;\n this.maxDistSq = this.defaultMaxDistSq;\n }\n\n protected onStateChange(_newState: State, _oldState: State): void {\n clearTimeout(this.activationTimeout);\n }\n\n protected onPointerDown(event: AdaptedEvent): void {\n this.tracker.addToTracker(event);\n super.onPointerDown(event);\n this.tryBegin(event);\n this.tryActivate();\n this.checkDistanceFail(event);\n }\n\n protected onPointerMove(event: AdaptedEvent): void {\n super.onPointerMove(event);\n this.tracker.track(event);\n this.checkDistanceFail(event);\n }\n\n protected onPointerUp(event: AdaptedEvent): void {\n super.onPointerUp(event);\n this.tracker.removeFromTracker(event.pointerId);\n\n if (this.currentState === State.ACTIVE) {\n this.end();\n } else {\n this.fail();\n }\n }\n\n private tryBegin(event: AdaptedEvent): void {\n if (this.currentState !== State.UNDETERMINED) {\n return;\n }\n\n this.previousTime = Date.now();\n this.startTime = this.previousTime;\n\n this.begin();\n\n this.startX = event.x;\n this.startY = event.y;\n }\n\n private tryActivate(): void {\n if (this.minDurationMs > 0) {\n this.activationTimeout = setTimeout(() => {\n this.activate();\n }, this.minDurationMs);\n } else if (this.minDurationMs === 0) {\n this.activate();\n }\n }\n\n private checkDistanceFail(event: AdaptedEvent): void {\n const dx = event.x - this.startX;\n const dy = event.y - this.startY;\n const distSq = dx * dx + dy * dy;\n\n if (distSq <= this.maxDistSq) {\n return;\n }\n\n if (this.currentState === State.ACTIVE) {\n this.cancel();\n } else {\n this.fail();\n }\n }\n}\n","import { AdaptedEvent, Config } from '../interfaces';\nimport GestureHandler from './GestureHandler';\n\nexport default class ManualGestureHandler extends GestureHandler {\n public init(ref: number, propsRef: React.RefObject) {\n super.init(ref, propsRef);\n }\n\n public updateGestureConfig({ enabled = true, ...props }: Config): void {\n super.updateGestureConfig({ enabled: enabled, ...props });\n }\n\n protected onPointerDown(event: AdaptedEvent): void {\n this.tracker.addToTracker(event);\n super.onPointerDown(event);\n this.begin();\n }\n\n protected onPointerAdd(event: AdaptedEvent): void {\n this.tracker.addToTracker(event);\n super.onPointerAdd(event);\n }\n\n protected onPointerMove(event: AdaptedEvent): void {\n this.tracker.track(event);\n super.onPointerMove(event);\n }\n\n protected onPointerOutOfBounds(event: AdaptedEvent): void {\n this.tracker.track(event);\n super.onPointerOutOfBounds(event);\n }\n\n protected onPointerUp(event: AdaptedEvent): void {\n super.onPointerUp(event);\n this.tracker.removeFromTracker(event.pointerId);\n }\n\n protected onPointerRemove(event: AdaptedEvent): void {\n super.onPointerRemove(event);\n this.tracker.removeFromTracker(event.pointerId);\n }\n}\n","import { State } from '../../State';\nimport { DEFAULT_TOUCH_SLOP } from '../constants';\nimport { AdaptedEvent, Config } from '../interfaces';\n\nimport GestureHandler from './GestureHandler';\nexport default class NativeViewGestureHandler extends GestureHandler {\n private buttonRole!: boolean;\n\n //TODO: Implement logic for activation on start\n //@ts-ignore Logic yet to be implemented\n private shouldActivateOnStart = false;\n private disallowInterruption = false;\n\n private startX = 0;\n private startY = 0;\n private minDistSq = DEFAULT_TOUCH_SLOP * DEFAULT_TOUCH_SLOP;\n\n public init(ref: number, propsRef: React.RefObject): void {\n super.init(ref, propsRef);\n\n this.setShouldCancelWhenOutside(true);\n\n this.view.style['touchAction'] = 'auto';\n\n //@ts-ignore Turns on defualt touch behavior on Safari\n this.view.style['WebkitTouchCallout'] = 'auto';\n\n if (this.view.hasAttribute('role')) {\n this.buttonRole = true;\n } else {\n this.buttonRole = false;\n }\n }\n\n public updateGestureConfig({ enabled = true, ...props }: Config): void {\n super.updateGestureConfig({ enabled: enabled, ...props });\n\n if (this.config.shouldActivateOnStart !== undefined) {\n this.shouldActivateOnStart = this.config.shouldActivateOnStart;\n }\n if (this.config.disallowInterruption !== undefined) {\n this.disallowInterruption = this.config.disallowInterruption;\n }\n }\n\n protected resetConfig(): void {\n super.resetConfig();\n }\n\n protected onPointerDown(event: AdaptedEvent): void {\n this.tracker.addToTracker(event);\n super.onPointerDown(event);\n this.newPointerAction();\n }\n\n protected onPointerAdd(event: AdaptedEvent): void {\n this.tracker.addToTracker(event);\n super.onPointerAdd(event);\n this.newPointerAction();\n }\n\n private newPointerAction(): void {\n this.startX = this.tracker.getLastAvgX();\n this.startY = this.tracker.getLastAvgY();\n\n if (this.currentState !== State.UNDETERMINED) {\n return;\n }\n\n this.begin();\n if (this.buttonRole) {\n this.activate();\n }\n }\n\n protected onPointerMove(event: AdaptedEvent): void {\n this.tracker.track(event);\n\n const dx = this.startX - this.tracker.getLastAvgX();\n const dy = this.startY - this.tracker.getLastAvgY();\n const distSq = dx * dx + dy * dy;\n\n if (distSq >= this.minDistSq) {\n if (this.buttonRole && this.currentState === State.ACTIVE) {\n this.cancel();\n } else if (!this.buttonRole && this.currentState === State.BEGAN) {\n this.activate();\n }\n }\n }\n\n protected onPointerOut(): void {\n if (\n this.currentState === State.BEGAN ||\n this.currentState === State.ACTIVE\n ) {\n this.cancel();\n }\n }\n\n protected onPointerUp(event: AdaptedEvent): void {\n super.onPointerUp(event);\n this.onUp(event);\n }\n\n protected onPointerRemove(event: AdaptedEvent): void {\n super.onPointerRemove(event);\n this.onUp(event);\n }\n\n private onUp(event: AdaptedEvent): void {\n this.tracker.removeFromTracker(event.pointerId);\n\n if (this.tracker.getTrackedPointersCount() === 0) {\n if (this.currentState === State.ACTIVE) {\n this.end();\n } else {\n this.fail();\n }\n }\n }\n\n public shouldRecognizeSimultaneously(handler: GestureHandler): boolean {\n if (super.shouldRecognizeSimultaneously(handler)) {\n return true;\n }\n\n if (\n handler instanceof NativeViewGestureHandler &&\n handler.getState() === State.ACTIVE &&\n handler.disallowsInterruption()\n ) {\n return false;\n }\n\n const canBeInterrupted = !this.disallowInterruption;\n\n if (\n this.currentState === State.ACTIVE &&\n handler.getState() === State.ACTIVE &&\n canBeInterrupted\n ) {\n return false;\n }\n\n return (\n this.currentState === State.ACTIVE &&\n canBeInterrupted &&\n handler.getTag() > 0\n );\n }\n\n public shouldBeCancelledByOther(_handler: GestureHandler): boolean {\n return !this.disallowInterruption;\n }\n\n public disallowsInterruption(): boolean {\n return this.disallowInterruption;\n }\n}\n","import { State } from '../../State';\nimport { DEFAULT_TOUCH_SLOP } from '../constants';\nimport { AdaptedEvent, Config } from '../interfaces';\n\nimport GestureHandler from './GestureHandler';\n\nconst DEFAULT_MIN_POINTERS = 1;\nconst DEFAULT_MAX_POINTERS = 10;\nconst DEFAULT_MIN_DIST_SQ = DEFAULT_TOUCH_SLOP * DEFAULT_TOUCH_SLOP;\n\nexport default class PanGestureHandler extends GestureHandler {\n private readonly customActivationProperties: string[] = [\n 'activeOffsetXStart',\n 'activeOffsetXEnd',\n 'failOffsetXStart',\n 'failOffsetXEnd',\n 'activeOffsetYStart',\n 'activeOffsetYEnd',\n 'failOffsetYStart',\n 'failOffsetYEnd',\n 'minVelocityX',\n 'minVelocityY',\n ];\n\n public velocityX = 0;\n public velocityY = 0;\n\n private minDistSq = DEFAULT_MIN_DIST_SQ;\n\n private activeOffsetXStart = -Number.MAX_SAFE_INTEGER;\n private activeOffsetXEnd = Number.MIN_SAFE_INTEGER;\n private failOffsetXStart = Number.MIN_SAFE_INTEGER;\n private failOffsetXEnd = Number.MAX_SAFE_INTEGER;\n\n private activeOffsetYStart = Number.MAX_SAFE_INTEGER;\n private activeOffsetYEnd = Number.MIN_SAFE_INTEGER;\n private failOffsetYStart = Number.MIN_SAFE_INTEGER;\n private failOffsetYEnd = Number.MAX_SAFE_INTEGER;\n\n private minVelocityX = Number.MAX_SAFE_INTEGER;\n private minVelocityY = Number.MAX_SAFE_INTEGER;\n private minVelocitySq = Number.MAX_SAFE_INTEGER;\n\n private minPointers = DEFAULT_MIN_POINTERS;\n private maxPointers = DEFAULT_MAX_POINTERS;\n\n private startX = 0;\n private startY = 0;\n private offsetX = 0;\n private offsetY = 0;\n private lastX = 0;\n private lastY = 0;\n\n private activateAfterLongPress = 0;\n private activationTimeout = 0;\n\n public init(ref: number, propsRef: React.RefObject): void {\n super.init(ref, propsRef);\n }\n\n public updateGestureConfig({ enabled = true, ...props }: Config): void {\n this.resetConfig();\n\n super.updateGestureConfig({ enabled: enabled, ...props });\n this.checkCustomActivationCriteria(this.customActivationProperties);\n\n if (this.config.minDist !== undefined) {\n this.minDistSq = this.config.minDist * this.config.minDist;\n } else if (this.hasCustomActivationCriteria) {\n this.minDistSq = Number.MAX_SAFE_INTEGER;\n }\n\n if (this.config.minPointers !== undefined) {\n this.minPointers = this.config.minPointers;\n }\n\n if (this.config.maxPointers !== undefined) {\n this.maxPointers = this.config.maxPointers;\n }\n\n if (this.config.minVelocity !== undefined) {\n this.minVelocityX = this.config.minVelocity;\n this.minVelocityY = this.config.minVelocity;\n }\n\n if (this.config.minVelocityX !== undefined) {\n this.minVelocityX = this.config.minVelocityX;\n }\n\n if (this.config.minVelocityY !== undefined) {\n this.minVelocityY = this.config.minVelocityY;\n }\n\n if (this.config.activateAfterLongPress !== undefined) {\n this.activateAfterLongPress = this.config.activateAfterLongPress;\n }\n\n if (this.config.activeOffsetXStart !== undefined) {\n this.activeOffsetXStart = this.config.activeOffsetXStart;\n\n if (this.config.activeOffsetXEnd === undefined) {\n this.activeOffsetXEnd = Number.MAX_SAFE_INTEGER;\n }\n }\n\n if (this.config.activeOffsetXEnd !== undefined) {\n this.activeOffsetXEnd = this.config.activeOffsetXEnd;\n\n if (this.config.activeOffsetXStart === undefined) {\n this.activeOffsetXStart = Number.MIN_SAFE_INTEGER;\n }\n }\n\n if (this.config.failOffsetXStart !== undefined) {\n this.failOffsetXStart = this.config.failOffsetXStart;\n\n if (this.config.failOffsetXEnd === undefined) {\n this.failOffsetXEnd = Number.MAX_SAFE_INTEGER;\n }\n }\n\n if (this.config.failOffsetXEnd !== undefined) {\n this.failOffsetXEnd = this.config.failOffsetXEnd;\n\n if (this.config.failOffsetXStart === undefined) {\n this.failOffsetXStart = Number.MIN_SAFE_INTEGER;\n }\n }\n\n if (this.config.activeOffsetYStart !== undefined) {\n this.activeOffsetYStart = this.config.activeOffsetYStart;\n\n if (this.config.activeOffsetYEnd === undefined) {\n this.activeOffsetYEnd = Number.MAX_SAFE_INTEGER;\n }\n }\n\n if (this.config.activeOffsetYEnd !== undefined) {\n this.activeOffsetYEnd = this.config.activeOffsetYEnd;\n\n if (this.config.activeOffsetYStart === undefined) {\n this.activeOffsetYStart = Number.MIN_SAFE_INTEGER;\n }\n }\n\n if (this.config.failOffsetYStart !== undefined) {\n this.failOffsetYStart = this.config.failOffsetYStart;\n\n if (this.config.failOffsetYEnd === undefined) {\n this.failOffsetYEnd = Number.MAX_SAFE_INTEGER;\n }\n }\n\n if (this.config.failOffsetYEnd !== undefined) {\n this.failOffsetYEnd = this.config.failOffsetYEnd;\n\n if (this.config.failOffsetYStart === undefined) {\n this.failOffsetYStart = Number.MIN_SAFE_INTEGER;\n }\n }\n }\n\n protected resetConfig(): void {\n super.resetConfig();\n\n this.activeOffsetXStart = -Number.MAX_SAFE_INTEGER;\n this.activeOffsetXEnd = Number.MIN_SAFE_INTEGER;\n this.failOffsetXStart = Number.MIN_SAFE_INTEGER;\n this.failOffsetXEnd = Number.MAX_SAFE_INTEGER;\n\n this.activeOffsetYStart = Number.MAX_SAFE_INTEGER;\n this.activeOffsetYEnd = Number.MIN_SAFE_INTEGER;\n this.failOffsetYStart = Number.MIN_SAFE_INTEGER;\n this.failOffsetYEnd = Number.MAX_SAFE_INTEGER;\n\n this.minVelocityX = Number.MAX_SAFE_INTEGER;\n this.minVelocityY = Number.MAX_SAFE_INTEGER;\n this.minVelocitySq = Number.MAX_SAFE_INTEGER;\n\n this.minDistSq = DEFAULT_MIN_DIST_SQ;\n\n this.minPointers = DEFAULT_MIN_POINTERS;\n this.maxPointers = DEFAULT_MAX_POINTERS;\n\n this.activateAfterLongPress = 0;\n }\n\n protected transformNativeEvent() {\n const rect: DOMRect = this.view.getBoundingClientRect();\n\n const translationX: number = this.getTranslationX();\n const translationY: number = this.getTranslationY();\n\n return {\n translationX: isNaN(translationX) ? 0 : translationX,\n translationY: isNaN(translationY) ? 0 : translationY,\n absoluteX: this.tracker.getLastAvgX(),\n absoluteY: this.tracker.getLastAvgY(),\n velocityX: this.velocityX,\n velocityY: this.velocityY,\n x: this.tracker.getLastAvgX() - rect.left,\n y: this.tracker.getLastAvgY() - rect.top,\n };\n }\n\n private getTranslationX(): number {\n return this.lastX - this.startX + this.offsetX;\n }\n private getTranslationY(): number {\n return this.lastY - this.startY + this.offsetY;\n }\n\n private clearActivationTimeout(): void {\n clearTimeout(this.activationTimeout);\n }\n\n //EventsHandling\n protected onPointerDown(event: AdaptedEvent): void {\n this.tracker.addToTracker(event);\n super.onPointerDown(event);\n\n this.lastX = this.tracker.getLastAvgX();\n this.lastY = this.tracker.getLastAvgY();\n\n this.tryBegin(event);\n this.checkBegan();\n }\n\n protected onPointerAdd(event: AdaptedEvent): void {\n this.tracker.addToTracker(event);\n super.onPointerAdd(event);\n this.tryBegin(event);\n\n this.offsetX += this.lastX - this.startX;\n this.offsetY += this.lastY - this.startY;\n\n this.lastX = this.tracker.getLastAvgX();\n this.lastY = this.tracker.getLastAvgY();\n\n this.startX = this.lastX;\n this.startY = this.lastY;\n\n if (this.tracker.getTrackedPointersCount() > this.maxPointers) {\n if (this.currentState === State.ACTIVE) {\n this.cancel();\n } else {\n this.fail();\n }\n } else {\n this.checkBegan();\n }\n }\n\n protected onPointerUp(event: AdaptedEvent): void {\n super.onPointerUp(event);\n\n if (this.currentState === State.ACTIVE) {\n this.lastX = this.tracker.getLastAvgX();\n this.lastY = this.tracker.getLastAvgY();\n }\n\n this.tracker.removeFromTracker(event.pointerId);\n\n if (this.currentState === State.ACTIVE) {\n this.end();\n } else {\n this.resetProgress();\n this.fail();\n }\n }\n protected onPointerRemove(event: AdaptedEvent): void {\n super.onPointerRemove(event);\n this.tracker.removeFromTracker(event.pointerId);\n\n this.offsetX += this.lastX - this.startX;\n this.offsetY += this.lastY - this.startY;\n\n this.lastX = this.tracker.getLastAvgX();\n this.lastY = this.tracker.getLastAvgY();\n\n this.startX = this.lastX;\n this.startY = this.lastY;\n\n if (\n !(\n this.currentState === State.ACTIVE &&\n this.tracker.getTrackedPointersCount() < this.minPointers\n )\n ) {\n this.checkBegan();\n }\n }\n\n protected onPointerMove(event: AdaptedEvent): void {\n this.tracker.track(event);\n\n this.lastX = this.tracker.getLastAvgX();\n this.lastY = this.tracker.getLastAvgY();\n this.velocityX = this.tracker.getVelocityX(event.pointerId);\n this.velocityY = this.tracker.getVelocityY(event.pointerId);\n\n this.checkBegan();\n\n super.onPointerMove(event);\n }\n\n protected onPointerOutOfBounds(event: AdaptedEvent): void {\n if (this.getShouldCancelWhenOutside()) {\n return;\n }\n\n this.tracker.track(event);\n\n this.lastX = this.tracker.getLastAvgX();\n this.lastY = this.tracker.getLastAvgY();\n this.velocityX = this.tracker.getVelocityX(event.pointerId);\n this.velocityY = this.tracker.getVelocityY(event.pointerId);\n\n this.checkBegan();\n\n if (this.currentState === State.ACTIVE) {\n super.onPointerOutOfBounds(event);\n }\n }\n\n private shouldActivate(): boolean {\n const dx: number = this.getTranslationX();\n\n if (\n this.activeOffsetXStart !== Number.MAX_SAFE_INTEGER &&\n dx < this.activeOffsetXStart\n ) {\n return true;\n }\n\n if (\n this.activeOffsetXEnd !== Number.MIN_SAFE_INTEGER &&\n dx > this.activeOffsetXEnd\n ) {\n return true;\n }\n\n const dy: number = this.getTranslationY();\n\n if (\n this.activeOffsetYStart !== Number.MAX_SAFE_INTEGER &&\n dy < this.activeOffsetYStart\n ) {\n return true;\n }\n\n if (\n this.activeOffsetYEnd !== Number.MIN_SAFE_INTEGER &&\n dy > this.activeOffsetYEnd\n ) {\n return true;\n }\n\n const distanceSq: number = dx * dx + dy * dy;\n\n if (\n this.minDistSq !== Number.MAX_SAFE_INTEGER &&\n distanceSq >= this.minDistSq\n ) {\n return true;\n }\n\n const vx: number = this.velocityX;\n\n if (\n this.minVelocityX !== Number.MAX_SAFE_INTEGER &&\n ((this.minVelocityX < 0 && vx <= this.minVelocityX) ||\n (this.minVelocityX >= 0 && this.minVelocityX <= vx))\n ) {\n return true;\n }\n\n const vy: number = this.velocityY;\n if (\n this.minVelocityY !== Number.MAX_SAFE_INTEGER &&\n ((this.minVelocityY < 0 && vy <= this.minVelocityY) ||\n (this.minVelocityY >= 0 && this.minVelocityY <= vy))\n ) {\n return true;\n }\n\n const velocitySq: number = vx * vx + vy * vy;\n\n return (\n this.minVelocitySq !== Number.MAX_SAFE_INTEGER &&\n velocitySq >= this.minVelocitySq\n );\n }\n\n private shouldFail(): boolean {\n const dx: number = this.getTranslationX();\n const dy: number = this.getTranslationY();\n const distanceSq = dx * dx + dy * dy;\n\n if (this.activateAfterLongPress > 0 && distanceSq > DEFAULT_MIN_DIST_SQ) {\n this.clearActivationTimeout();\n return true;\n }\n\n if (\n this.failOffsetXStart !== Number.MIN_SAFE_INTEGER &&\n dx < this.failOffsetXStart\n ) {\n return true;\n }\n\n if (\n this.failOffsetXEnd !== Number.MAX_SAFE_INTEGER &&\n dx > this.failOffsetXEnd\n ) {\n return true;\n }\n\n if (\n this.failOffsetYStart !== Number.MIN_SAFE_INTEGER &&\n dy < this.failOffsetYStart\n ) {\n return true;\n }\n\n return (\n this.failOffsetYEnd !== Number.MAX_SAFE_INTEGER &&\n dy > this.failOffsetYEnd\n );\n }\n\n private tryBegin(event: AdaptedEvent): void {\n if (\n this.currentState === State.UNDETERMINED &&\n this.tracker.getTrackedPointersCount() >= this.minPointers\n ) {\n this.resetProgress();\n this.offsetX = 0;\n this.offsetY = 0;\n this.velocityX = 0;\n this.velocityY = 0;\n\n this.begin();\n\n if (this.activateAfterLongPress > 0) {\n this.activationTimeout = setTimeout(() => {\n this.activate();\n }, this.activateAfterLongPress);\n }\n } else {\n this.velocityX = this.tracker.getVelocityX(event.pointerId);\n this.velocityY = this.tracker.getVelocityY(event.pointerId);\n }\n }\n\n private checkBegan(): void {\n if (this.currentState === State.BEGAN) {\n if (this.shouldFail()) {\n this.fail();\n } else if (this.shouldActivate()) {\n this.activate();\n }\n }\n }\n\n public activate(force = false): void {\n if (this.currentState !== State.ACTIVE) {\n this.resetProgress();\n }\n\n super.activate(force);\n }\n\n protected onCancel(): void {\n this.clearActivationTimeout();\n }\n\n protected onReset(): void {\n this.clearActivationTimeout();\n }\n\n protected resetProgress(): void {\n if (this.currentState === State.ACTIVE) {\n return;\n }\n\n this.startX = this.lastX;\n this.startY = this.lastY;\n }\n}\n","import { State } from '../../State';\nimport { DEFAULT_TOUCH_SLOP } from '../constants';\nimport { AdaptedEvent, Config } from '../interfaces';\n\nimport GestureHandler from './GestureHandler';\nimport ScaleGestureDetector, {\n ScaleGestureListener,\n} from '../detectors/ScaleGestureDetector';\n\nexport default class PinchGestureHandler extends GestureHandler {\n private scale = 1;\n private velocity = 0;\n\n private startingSpan = 0;\n private spanSlop = DEFAULT_TOUCH_SLOP;\n\n private scaleDetectorListener: ScaleGestureListener = {\n onScaleBegin: (detector: ScaleGestureDetector): boolean => {\n this.startingSpan = detector.getCurrentSpan();\n return true;\n },\n onScale: (detector: ScaleGestureDetector): boolean => {\n const prevScaleFactor: number = this.scale;\n this.scale *= detector.getScaleFactor(\n this.tracker.getTrackedPointersCount()\n );\n\n const delta = detector.getTimeDelta();\n if (delta > 0) {\n this.velocity = (this.scale - prevScaleFactor) / delta;\n }\n\n if (\n Math.abs(this.startingSpan - detector.getCurrentSpan()) >=\n this.spanSlop &&\n this.currentState === State.BEGAN\n ) {\n this.activate();\n }\n return true;\n },\n onScaleEnd: (\n _detector: ScaleGestureDetector\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n ): void => {},\n };\n\n private scaleGestureDetector: ScaleGestureDetector = new ScaleGestureDetector(\n this.scaleDetectorListener\n );\n\n public init(ref: number, propsRef: React.RefObject) {\n super.init(ref, propsRef);\n\n this.setShouldCancelWhenOutside(false);\n }\n\n public updateGestureConfig({ enabled = true, ...props }: Config): void {\n super.updateGestureConfig({ enabled: enabled, ...props });\n }\n\n protected transformNativeEvent() {\n return {\n focalX: this.scaleGestureDetector.getFocusX(),\n focalY: this.scaleGestureDetector.getFocusY(),\n velocity: this.velocity,\n scale: this.scale,\n };\n }\n\n protected onPointerDown(event: AdaptedEvent): void {\n this.tracker.addToTracker(event);\n super.onPointerDown(event);\n }\n\n protected onPointerAdd(event: AdaptedEvent): void {\n this.tracker.addToTracker(event);\n super.onPointerAdd(event);\n this.tryBegin();\n this.scaleGestureDetector.onTouchEvent(event, this.tracker);\n }\n\n protected onPointerUp(event: AdaptedEvent): void {\n super.onPointerUp(event);\n this.tracker.removeFromTracker(event.pointerId);\n if (this.currentState !== State.ACTIVE) {\n return;\n }\n this.scaleGestureDetector.onTouchEvent(event, this.tracker);\n\n if (this.currentState === State.ACTIVE) {\n this.end();\n } else {\n this.fail();\n }\n }\n\n protected onPointerRemove(event: AdaptedEvent): void {\n super.onPointerRemove(event);\n this.scaleGestureDetector.onTouchEvent(event, this.tracker);\n this.tracker.removeFromTracker(event.pointerId);\n\n if (\n this.currentState === State.ACTIVE &&\n this.tracker.getTrackedPointersCount() < 2\n ) {\n this.end();\n }\n }\n\n protected onPointerMove(event: AdaptedEvent): void {\n if (this.tracker.getTrackedPointersCount() < 2) {\n return;\n }\n this.tracker.track(event);\n\n this.scaleGestureDetector.onTouchEvent(event, this.tracker);\n super.onPointerMove(event);\n }\n protected onPointerOutOfBounds(event: AdaptedEvent): void {\n if (this.tracker.getTrackedPointersCount() < 2) {\n return;\n }\n this.tracker.track(event);\n\n this.scaleGestureDetector.onTouchEvent(event, this.tracker);\n super.onPointerOutOfBounds(event);\n }\n\n private tryBegin(): void {\n if (this.currentState !== State.UNDETERMINED) {\n return;\n }\n\n this.resetProgress();\n this.begin();\n }\n\n public activate(force?: boolean): void {\n if (this.currentState !== State.ACTIVE) {\n this.resetProgress();\n }\n\n super.activate(force);\n }\n\n protected onReset(): void {\n this.resetProgress();\n }\n\n protected resetProgress(): void {\n if (this.currentState === State.ACTIVE) {\n return;\n }\n this.velocity = 0;\n this.scale = 1;\n }\n}\n","import { State } from '../../State';\nimport { AdaptedEvent, Config } from '../interfaces';\n\nimport GestureHandler from './GestureHandler';\nimport RotationGestureDetector, {\n RotationGestureListener,\n} from '../detectors/RotationGestureDetector';\n\nconst ROTATION_RECOGNITION_THRESHOLD = Math.PI / 36;\n\nexport default class RotationGestureHandler extends GestureHandler {\n private rotation = 0;\n private velocity = 0;\n\n private cachedAnchorX = 0;\n private cachedAnchorY = 0;\n\n private rotationGestureListener: RotationGestureListener = {\n onRotationBegin: (_detector: RotationGestureDetector): boolean => true,\n onRotation: (detector: RotationGestureDetector): boolean => {\n const previousRotation: number = this.rotation;\n this.rotation += detector.getRotation();\n\n const delta = detector.getTimeDelta();\n\n if (delta > 0) {\n this.velocity = (this.rotation - previousRotation) / delta;\n }\n\n if (\n Math.abs(this.rotation) >= ROTATION_RECOGNITION_THRESHOLD &&\n this.currentState === State.BEGAN\n ) {\n this.activate();\n }\n\n return true;\n },\n onRotationEnd: (_detector: RotationGestureDetector): void => {\n this.end();\n },\n };\n\n private rotationGestureDetector: RotationGestureDetector =\n new RotationGestureDetector(this.rotationGestureListener);\n\n public init(ref: number, propsRef: React.RefObject): void {\n super.init(ref, propsRef);\n\n this.setShouldCancelWhenOutside(false);\n }\n\n public updateGestureConfig({ enabled = true, ...props }: Config): void {\n super.updateGestureConfig({ enabled: enabled, ...props });\n }\n\n protected transformNativeEvent() {\n return {\n rotation: this.rotation ? this.rotation : 0,\n anchorX: this.getAnchorX(),\n anchorY: this.getAnchorY(),\n velocity: this.velocity ? this.velocity : 0,\n };\n }\n\n public getAnchorX(): number {\n const anchorX = this.rotationGestureDetector.getAnchorX();\n\n return anchorX ? anchorX : this.cachedAnchorX;\n }\n\n public getAnchorY(): number {\n const anchorY = this.rotationGestureDetector.getAnchorY();\n\n return anchorY ? anchorY : this.cachedAnchorY;\n }\n\n protected onPointerDown(event: AdaptedEvent): void {\n this.tracker.addToTracker(event);\n super.onPointerDown(event);\n }\n\n protected onPointerAdd(event: AdaptedEvent): void {\n this.tracker.addToTracker(event);\n super.onPointerAdd(event);\n\n this.tryBegin();\n this.rotationGestureDetector.onTouchEvent(event, this.tracker);\n }\n\n protected onPointerMove(event: AdaptedEvent): void {\n if (this.tracker.getTrackedPointersCount() < 2) {\n return;\n }\n\n if (this.getAnchorX()) {\n this.cachedAnchorX = this.getAnchorX();\n }\n if (this.getAnchorY()) {\n this.cachedAnchorY = this.getAnchorY();\n }\n\n this.tracker.track(event);\n\n this.rotationGestureDetector.onTouchEvent(event, this.tracker);\n\n super.onPointerMove(event);\n }\n\n protected onPointerOutOfBounds(event: AdaptedEvent): void {\n if (this.tracker.getTrackedPointersCount() < 2) {\n return;\n }\n\n if (this.getAnchorX()) {\n this.cachedAnchorX = this.getAnchorX();\n }\n if (this.getAnchorY()) {\n this.cachedAnchorY = this.getAnchorY();\n }\n\n this.tracker.track(event);\n\n this.rotationGestureDetector.onTouchEvent(event, this.tracker);\n\n super.onPointerOutOfBounds(event);\n }\n\n protected onPointerUp(event: AdaptedEvent): void {\n super.onPointerUp(event);\n this.tracker.removeFromTracker(event.pointerId);\n this.rotationGestureDetector.onTouchEvent(event, this.tracker);\n\n if (this.currentState !== State.ACTIVE) {\n return;\n }\n\n if (this.currentState === State.ACTIVE) {\n this.end();\n } else {\n this.fail();\n }\n }\n\n protected onPointerRemove(event: AdaptedEvent): void {\n super.onPointerRemove(event);\n this.rotationGestureDetector.onTouchEvent(event, this.tracker);\n this.tracker.removeFromTracker(event.pointerId);\n }\n\n protected tryBegin(): void {\n if (this.currentState !== State.UNDETERMINED) {\n return;\n }\n\n this.begin();\n }\n\n public activate(_force?: boolean): void {\n super.activate();\n }\n\n protected onReset(): void {\n if (this.currentState === State.ACTIVE) {\n return;\n }\n\n this.rotation = 0;\n this.velocity = 0;\n this.rotationGestureDetector.reset();\n }\n}\n","import { State } from '../../State';\nimport { AdaptedEvent, Config, EventTypes } from '../interfaces';\n\nimport GestureHandler from './GestureHandler';\n\nconst DEFAULT_MAX_DURATION_MS = 500;\nconst DEFAULT_MAX_DELAY_MS = 500;\nconst DEFAULT_NUMBER_OF_TAPS = 1;\nconst DEFAULT_MIN_NUMBER_OF_POINTERS = 1;\n\nexport default class TapGestureHandler extends GestureHandler {\n private maxDeltaX = Number.MIN_SAFE_INTEGER;\n private maxDeltaY = Number.MIN_SAFE_INTEGER;\n private maxDistSq = Number.MIN_SAFE_INTEGER;\n private maxDurationMs = DEFAULT_MAX_DURATION_MS;\n private maxDelayMs = DEFAULT_MAX_DELAY_MS;\n\n private numberOfTaps = DEFAULT_NUMBER_OF_TAPS;\n private minNumberOfPointers = DEFAULT_MIN_NUMBER_OF_POINTERS;\n private currentMaxNumberOfPointers = 1;\n\n private startX = 0;\n private startY = 0;\n private offsetX = 0;\n private offsetY = 0;\n private lastX = 0;\n private lastY = 0;\n\n private waitTimeout: number | undefined;\n private delayTimeout: number | undefined;\n\n private tapsSoFar = 0;\n\n public init(ref: number, propsRef: React.RefObject): void {\n super.init(ref, propsRef);\n }\n\n public updateGestureConfig({ enabled = true, ...props }: Config): void {\n super.updateGestureConfig({ enabled: enabled, ...props });\n\n if (this.config.numberOfTaps !== undefined) {\n this.numberOfTaps = this.config.numberOfTaps;\n }\n\n if (this.config.maxDurationMs !== undefined) {\n this.maxDurationMs = this.config.maxDurationMs;\n }\n\n if (this.config.maxDelayMs !== undefined) {\n this.maxDelayMs = this.config.maxDelayMs;\n }\n\n if (this.config.maxDeltaX !== undefined) {\n this.maxDeltaX = this.config.maxDeltaX;\n }\n\n if (this.config.maxDeltaY !== undefined) {\n this.maxDeltaY = this.config.maxDeltaY;\n }\n\n if (this.config.maxDist !== undefined) {\n this.maxDistSq = this.config.maxDist * this.config.maxDist;\n }\n\n if (this.config.minPointers !== undefined) {\n this.minNumberOfPointers = this.config.minPointers;\n }\n }\n\n protected resetConfig(): void {\n super.resetConfig();\n\n this.maxDeltaX = Number.MIN_SAFE_INTEGER;\n this.maxDeltaY = Number.MIN_SAFE_INTEGER;\n this.maxDistSq = Number.MIN_SAFE_INTEGER;\n this.maxDurationMs = DEFAULT_MAX_DURATION_MS;\n this.maxDelayMs = DEFAULT_MAX_DELAY_MS;\n this.numberOfTaps = DEFAULT_NUMBER_OF_TAPS;\n this.minNumberOfPointers = DEFAULT_MIN_NUMBER_OF_POINTERS;\n }\n\n protected transformNativeEvent() {\n const rect: DOMRect = this.view.getBoundingClientRect();\n\n return {\n x: this.tracker.getLastAvgX() - rect.left,\n y: this.tracker.getLastAvgY() - rect.top,\n absoluteX: this.tracker.getLastAvgX(),\n absoluteY: this.tracker.getLastAvgY(),\n };\n }\n\n private clearTimeouts(): void {\n clearTimeout(this.waitTimeout);\n clearTimeout(this.delayTimeout);\n }\n\n private startTap(): void {\n this.clearTimeouts();\n\n this.waitTimeout = setTimeout(() => this.fail(), this.maxDurationMs);\n }\n\n private endTap(): void {\n this.clearTimeouts();\n\n if (\n ++this.tapsSoFar === this.numberOfTaps &&\n this.currentMaxNumberOfPointers >= this.minNumberOfPointers\n ) {\n this.activate();\n } else {\n this.delayTimeout = setTimeout(() => this.fail(), this.maxDelayMs);\n }\n }\n\n //Handling Events\n protected onPointerDown(event: AdaptedEvent): void {\n this.tracker.addToTracker(event);\n super.onPointerDown(event);\n\n this.trySettingPosition(event);\n\n this.startX = event.x;\n this.startY = event.y;\n\n this.lastX = event.x;\n this.lastY = event.y;\n\n this.updateState(event);\n }\n\n protected onPointerAdd(event: AdaptedEvent): void {\n super.onPointerAdd(event);\n this.tracker.addToTracker(event);\n this.trySettingPosition(event);\n\n this.offsetX += this.lastX - this.startX;\n this.offsetY += this.lastY - this.startY;\n\n this.lastX = this.tracker.getLastAvgX();\n this.lastY = this.tracker.getLastAvgY();\n\n this.startX = this.tracker.getLastAvgX();\n this.startY = this.tracker.getLastAvgY();\n\n this.updateState(event);\n }\n\n protected onPointerUp(event: AdaptedEvent): void {\n super.onPointerUp(event);\n this.lastX = this.tracker.getLastAvgX();\n this.lastY = this.tracker.getLastAvgY();\n\n this.tracker.removeFromTracker(event.pointerId);\n\n this.updateState(event);\n }\n\n protected onPointerRemove(event: AdaptedEvent): void {\n super.onPointerRemove(event);\n this.tracker.removeFromTracker(event.pointerId);\n\n this.offsetX += this.lastX - this.startX;\n this.offsetY += this.lastY = this.startY;\n\n this.lastX = this.tracker.getLastAvgX();\n this.lastY = this.tracker.getLastAvgY();\n\n this.startX = this.lastX;\n this.startY = this.lastY;\n\n this.updateState(event);\n }\n\n protected onPointerMove(event: AdaptedEvent): void {\n this.trySettingPosition(event);\n this.tracker.track(event);\n\n this.lastX = this.tracker.getLastAvgX();\n this.lastY = this.tracker.getLastAvgY();\n\n this.updateState(event);\n\n super.onPointerMove(event);\n }\n\n protected onPointerOutOfBounds(event: AdaptedEvent): void {\n this.trySettingPosition(event);\n this.tracker.track(event);\n\n this.lastX = this.tracker.getLastAvgX();\n this.lastY = this.tracker.getLastAvgY();\n\n this.updateState(event);\n\n super.onPointerOutOfBounds(event);\n }\n\n private updateState(event: AdaptedEvent): void {\n if (\n this.currentMaxNumberOfPointers < this.tracker.getTrackedPointersCount()\n ) {\n this.currentMaxNumberOfPointers = this.tracker.getTrackedPointersCount();\n }\n\n if (this.shouldFail()) {\n this.fail();\n return;\n }\n\n switch (this.currentState) {\n case State.UNDETERMINED:\n if (event.eventType === EventTypes.DOWN) {\n this.begin();\n }\n this.startTap();\n break;\n case State.BEGAN:\n if (event.eventType === EventTypes.UP) {\n this.endTap();\n }\n if (event.eventType === EventTypes.DOWN) {\n this.startTap();\n }\n break;\n default:\n break;\n }\n }\n\n private trySettingPosition(event: AdaptedEvent): void {\n if (this.currentState !== State.UNDETERMINED) {\n return;\n }\n\n this.offsetX = 0;\n this.offsetY = 0;\n this.startX = event.x;\n this.startY = event.y;\n }\n\n private shouldFail(): boolean {\n const dx = this.lastX - this.startX + this.offsetX;\n\n if (\n this.maxDeltaX !== Number.MIN_SAFE_INTEGER &&\n Math.abs(dx) > this.maxDeltaX\n ) {\n return true;\n }\n\n const dy = this.lastY - this.startY + this.offsetY;\n if (\n this.maxDeltaY !== Number.MIN_SAFE_INTEGER &&\n Math.abs(dy) > this.maxDeltaY\n ) {\n return true;\n }\n\n const distSq = dy * dy + dx * dx;\n\n return (\n this.maxDistSq !== Number.MIN_SAFE_INTEGER && distSq > this.maxDistSq\n );\n }\n\n public activate(): void {\n super.activate();\n\n this.end();\n }\n\n protected onCancel(): void {\n this.resetProgress();\n this.clearTimeouts();\n }\n\n protected resetProgress(): void {\n this.clearTimeouts();\n this.tapsSoFar = 0;\n this.currentMaxNumberOfPointers = 0;\n }\n}\n","import { UserSelect } from '../handlers/gestureHandlerCommon';\nimport { Directions } from '../Directions';\nimport { State } from '../State';\n\nexport interface HitSlop {\n left?: number;\n right?: number;\n top?: number;\n bottom?: number;\n horizontal?: number;\n vertical?: number;\n width?: number;\n height?: number;\n}\n\nexport interface Handler {\n handlerTag: number;\n}\n\ntype ConfigArgs =\n | number\n | boolean\n | HitSlop\n | UserSelect\n | Directions\n | Handler[]\n | null\n | undefined;\n\nexport interface Config extends Record {\n enabled?: boolean;\n simultaneousHandlers?: Handler[] | null;\n waitFor?: Handler[] | null;\n hitSlop?: HitSlop;\n shouldCancelWhenOutside?: boolean;\n userSelect?: UserSelect;\n\n activateAfterLongPress?: number;\n failOffsetXStart?: number;\n failOffsetYStart?: number;\n failOffsetXEnd?: number;\n failOffsetYEnd?: number;\n activeOffsetXStart?: number;\n activeOffsetXEnd?: number;\n activeOffsetYStart?: number;\n activeOffsetYEnd?: number;\n minPointers?: number;\n maxPointers?: number;\n minDist?: number;\n minDistSq?: number;\n minVelocity?: number;\n minVelocityX?: number;\n minVelocityY?: number;\n minVelocitySq?: number;\n maxDist?: number;\n maxDistSq?: number;\n numberOfPointers?: number;\n minDurationMs?: number;\n numberOfTaps?: number;\n maxDurationMs?: number;\n maxDelayMs?: number;\n maxDeltaX?: number;\n maxDeltaY?: number;\n shouldActivateOnStart?: boolean;\n disallowInterruption?: boolean;\n direction?: Directions;\n}\n\ntype NativeEventArgs = number | State | boolean | undefined;\ninterface NativeEvent extends Record {\n numberOfPointers: number;\n state: State;\n pointerInside: boolean | undefined;\n handlerTag: number;\n target: number;\n oldState?: State;\n}\n\nexport interface PointerData {\n id: number;\n x: number;\n y: number;\n absoluteX: number;\n absoluteY: number;\n}\n\ntype TouchNativeArgs = number | State | TouchEventType | PointerData[];\n\ninterface NativeTouchEvent extends Record {\n handlerTag: number;\n state: State;\n eventType: TouchEventType;\n changedTouches: PointerData[];\n allTouches: PointerData[];\n numberOfTouches: number;\n}\n\nexport interface ResultEvent extends Record {\n nativeEvent: NativeEvent;\n timeStamp: number;\n}\n\nexport interface ResultTouchEvent\n extends Record {\n nativeEvent: NativeTouchEvent;\n timeStamp: number;\n}\n\nexport interface PropsRef {\n onGestureHandlerEvent: () => void;\n onGestureHandlerStateChange: () => void;\n}\n\nexport interface AdaptedEvent {\n x: number;\n y: number;\n offsetX: number;\n offsetY: number;\n pointerId: number;\n eventType: EventTypes;\n pointerType: PointerType;\n buttons: number;\n time: number;\n allTouches?: TouchList;\n changedTouches?: TouchList;\n touchEventType?: TouchEventType;\n}\n\nexport enum MouseButtons {\n NONE,\n LEFT,\n RIGHT,\n LEFT_RIGHT,\n SCROLL,\n SCROLL_LEFT,\n SCROLL_RIGHT,\n SCROLL_LEFT_RIGHT,\n}\n\nexport enum EventTypes {\n DOWN,\n ADDITIONAL_POINTER_DOWN,\n UP,\n ADDITIONAL_POINTER_UP,\n MOVE,\n ENTER,\n OUT,\n CANCEL,\n}\n\nexport enum TouchEventType {\n UNDETERMINED,\n DOWN,\n MOVE,\n UP,\n CANCELLED,\n}\n\nexport enum PointerType {\n NONE = 'none',\n MOUSE = 'mouse',\n TOUCH = 'touch',\n PEN = 'pen',\n}\n","export default class CircularBuffer {\n private bufferSize: number;\n private buffer: T[];\n private index: number;\n private actualSize: number;\n\n constructor(size: number) {\n this.bufferSize = size;\n this.buffer = new Array(size);\n this.index = 0;\n this.actualSize = 0;\n }\n\n public get size(): number {\n return this.actualSize;\n }\n\n public push(element: T): void {\n this.buffer[this.index] = element;\n this.index = (this.index + 1) % this.bufferSize;\n this.actualSize = Math.min(this.actualSize + 1, this.bufferSize);\n }\n\n public get(at: number): T {\n if (this.actualSize === this.bufferSize) {\n let index = (this.index + at) % this.bufferSize;\n if (index < 0) {\n index += this.bufferSize;\n }\n\n return this.buffer[index];\n } else {\n return this.buffer[at];\n }\n }\n\n public clear(): void {\n this.buffer = new Array(this.bufferSize);\n this.index = 0;\n this.actualSize = 0;\n }\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { AdaptedEvent, EventTypes, TouchEventType } from '../interfaces';\n\nexport default abstract class EventManager {\n protected readonly view: HTMLElement;\n protected pointersInBounds: number[] = [];\n protected activePointersCounter: number;\n\n constructor(view: HTMLElement) {\n this.view = view;\n this.activePointersCounter = 0;\n }\n\n public abstract setListeners(): void;\n protected abstract mapEvent(\n event: Event,\n eventType: EventTypes,\n index?: number,\n touchEventType?: TouchEventType\n ): AdaptedEvent;\n\n protected onPointerDown(_event: AdaptedEvent): void {}\n protected onPointerAdd(_event: AdaptedEvent): void {}\n protected onPointerUp(_event: AdaptedEvent): void {}\n protected onPointerRemove(_event: AdaptedEvent): void {}\n protected onPointerMove(_event: AdaptedEvent): void {}\n protected onPointerOut(_event: AdaptedEvent): void {}\n protected onPointerEnter(_event: AdaptedEvent): void {}\n protected onPointerCancel(_event: AdaptedEvent): void {\n // When pointer cancel is triggered and there are more pointers on the view, only one pointer is cancelled\n // Because we want all pointers to be cancelled by that event, we are doing it manually by reseting handler and changing activePointersCounter to 0\n // Events that correspond to removing the pointer (pointerup, touchend) have condition, that they don't perform any action when activePointersCounter\n // is equal to 0. This prevents counter from going to negative values, when pointers are removed from view after one of them has been cancelled\n }\n protected onPointerOutOfBounds(_event: AdaptedEvent): void {}\n\n public setOnPointerDown(callback: (event: AdaptedEvent) => void): void {\n this.onPointerDown = callback;\n }\n public setOnPointerAdd(callback: (event: AdaptedEvent) => void): void {\n this.onPointerAdd = callback;\n }\n public setOnPointerUp(callback: (event: AdaptedEvent) => void): void {\n this.onPointerUp = callback;\n }\n public setOnPointerRemove(callback: (event: AdaptedEvent) => void): void {\n this.onPointerRemove = callback;\n }\n public setOnPointerMove(callback: (event: AdaptedEvent) => void): void {\n this.onPointerMove = callback;\n }\n public setOnPointerOut(callback: (event: AdaptedEvent) => void): void {\n this.onPointerOut = callback;\n }\n public setOnPointerEnter(callback: (event: AdaptedEvent) => void): void {\n this.onPointerEnter = callback;\n }\n public setOnPointerCancel(callback: (event: AdaptedEvent) => void): void {\n this.onPointerCancel = callback;\n }\n public setOnPointerOutOfBounds(\n callback: (event: AdaptedEvent) => void\n ): void {\n this.onPointerOutOfBounds = callback;\n }\n\n protected markAsInBounds(pointerId: number): void {\n if (this.pointersInBounds.indexOf(pointerId) >= 0) {\n return;\n }\n\n this.pointersInBounds.push(pointerId);\n }\n\n protected markAsOutOfBounds(pointerId: number): void {\n const index: number = this.pointersInBounds.indexOf(pointerId);\n\n if (index < 0) {\n return;\n }\n\n this.pointersInBounds.splice(index, 1);\n }\n\n public resetManager(): void {\n // Reseting activePointersCounter is necessary to make gestures such as pinch work properly\n // There are gestures that end when there is still one active pointer (like pinch/rotation)\n // When these gestures end, they are reset, but they still receive events from pointer that is active\n // This causes trouble, since only onPointerDown registers gesture in orchestrator, and while gestures receive\n // Events from active pointer after they finished, next pointerdown event will be registered as additional pointer, not the first one\n // This casues trouble like gestures getting stuck in END state, even though they should have gone to UNDETERMINED\n\n this.activePointersCounter = 0;\n this.pointersInBounds = [];\n }\n}\n","import { State } from '../../State';\nimport { PointerType } from '../interfaces';\n\nimport GestureHandler from '../handlers/GestureHandler';\nimport PointerTracker from './PointerTracker';\nimport { isPointerInBounds } from '../utils';\n\nexport default class GestureHandlerOrchestrator {\n private static instance: GestureHandlerOrchestrator;\n\n private gestureHandlers: GestureHandler[] = [];\n private awaitingHandlers: GestureHandler[] = [];\n private handlersToCancel: GestureHandler[] = [];\n\n private handlingChangeSemaphore = 0;\n private activationIndex = 0;\n\n // Private beacuse of Singleton\n // eslint-disable-next-line no-useless-constructor, @typescript-eslint/no-empty-function\n private constructor() {}\n\n private scheduleFinishedHandlersCleanup(): void {\n if (this.handlingChangeSemaphore === 0) {\n this.cleanupFinishedHandlers();\n }\n }\n\n private cleanHandler(handler: GestureHandler): void {\n handler.reset();\n handler.setActive(false);\n handler.setAwaiting(false);\n handler.setActivationIndex(Number.MAX_VALUE);\n }\n\n public removeHandlerFromOrchestrator(handler: GestureHandler): void {\n this.gestureHandlers.splice(this.gestureHandlers.indexOf(handler), 1);\n this.awaitingHandlers.splice(this.awaitingHandlers.indexOf(handler), 1);\n this.handlersToCancel.splice(this.handlersToCancel.indexOf(handler), 1);\n }\n\n private cleanupFinishedHandlers(): void {\n for (let i = this.gestureHandlers.length - 1; i >= 0; --i) {\n const handler = this.gestureHandlers[i];\n\n if (!handler) {\n continue;\n }\n if (this.isFinished(handler.getState()) && !handler.isAwaiting()) {\n this.gestureHandlers.splice(i, 1);\n\n this.cleanHandler(handler);\n }\n }\n }\n\n private hasOtherHandlerToWaitFor(handler: GestureHandler): boolean {\n let hasToWait = false;\n this.gestureHandlers.forEach((otherHandler) => {\n if (\n otherHandler &&\n !this.isFinished(otherHandler.getState()) &&\n this.shouldHandlerWaitForOther(handler, otherHandler)\n ) {\n hasToWait = true;\n return;\n }\n });\n\n return hasToWait;\n }\n\n private tryActivate(handler: GestureHandler): void {\n if (this.hasOtherHandlerToWaitFor(handler)) {\n this.addAwaitingHandler(handler);\n } else if (\n handler.getState() !== State.CANCELLED &&\n handler.getState() !== State.FAILED\n ) {\n if (this.shouldActivate(handler)) {\n this.makeActive(handler);\n } else {\n switch (handler.getState()) {\n case State.ACTIVE:\n handler.fail();\n break;\n case State.BEGAN:\n handler.cancel();\n }\n }\n }\n }\n\n private shouldActivate(handler: GestureHandler): boolean {\n for (const otherHandler of this.gestureHandlers) {\n if (this.shouldHandlerBeCancelledBy(handler, otherHandler)) {\n return false;\n }\n }\n\n return true;\n }\n\n private cleanupAwaitingHandlers(handler: GestureHandler): void {\n for (let i = 0; i < this.awaitingHandlers.length; ++i) {\n if (\n !this.awaitingHandlers[i].isAwaiting() &&\n this.shouldHandlerWaitForOther(this.awaitingHandlers[i], handler)\n ) {\n this.cleanHandler(this.awaitingHandlers[i]);\n this.awaitingHandlers.splice(i, 1);\n }\n }\n }\n\n public onHandlerStateChange(\n handler: GestureHandler,\n newState: State,\n oldState: State,\n sendIfDisabled?: boolean\n ): void {\n if (!handler.isEnabled() && !sendIfDisabled) {\n return;\n }\n\n this.handlingChangeSemaphore += 1;\n\n if (this.isFinished(newState)) {\n this.awaitingHandlers.forEach((otherHandler) => {\n if (this.shouldHandlerWaitForOther(otherHandler, handler)) {\n if (newState === State.END) {\n otherHandler?.cancel();\n if (otherHandler.getState() === State.END) {\n // Handle edge case, where discrete gestures end immediately after activation thus\n // their state is set to END and when the gesture they are waiting for activates they\n // should be cancelled, however `cancel` was never sent as gestures were already in the END state.\n // Send synthetic BEGAN -> CANCELLED to properly handle JS logic\n otherHandler.sendEvent(State.CANCELLED, State.BEGAN);\n }\n otherHandler?.setAwaiting(false);\n } else {\n this.tryActivate(otherHandler);\n }\n }\n });\n }\n\n if (newState === State.ACTIVE) {\n this.tryActivate(handler);\n } else if (oldState === State.ACTIVE || oldState === State.END) {\n if (handler.isActive()) {\n handler.sendEvent(newState, oldState);\n } else if (\n oldState === State.ACTIVE &&\n (newState === State.CANCELLED || newState === State.FAILED)\n ) {\n handler.sendEvent(newState, State.BEGAN);\n }\n } else if (\n oldState !== State.UNDETERMINED ||\n newState !== State.CANCELLED\n ) {\n handler.sendEvent(newState, oldState);\n }\n\n this.handlingChangeSemaphore -= 1;\n\n this.scheduleFinishedHandlersCleanup();\n\n if (this.awaitingHandlers.indexOf(handler) < 0) {\n this.cleanupAwaitingHandlers(handler);\n }\n }\n\n private makeActive(handler: GestureHandler): void {\n const currentState = handler.getState();\n\n handler.setActive(true);\n handler.setShouldResetProgress(true);\n handler.setActivationIndex(this.activationIndex++);\n\n this.gestureHandlers.forEach((otherHandler) => {\n // Order of arguments is correct - we check whether current handler should cancel existing handlers\n\n if (this.shouldHandlerBeCancelledBy(otherHandler, handler)) {\n this.handlersToCancel.push(otherHandler);\n }\n });\n\n for (let i = this.handlersToCancel.length - 1; i >= 0; --i) {\n this.handlersToCancel[i]?.cancel();\n }\n this.awaitingHandlers.forEach((otherHandler) => {\n if (this.shouldHandlerBeCancelledBy(otherHandler, handler)) {\n otherHandler?.cancel();\n otherHandler?.setAwaiting(true);\n }\n });\n\n handler.sendEvent(State.ACTIVE, State.BEGAN);\n\n if (currentState !== State.ACTIVE) {\n handler.sendEvent(State.END, State.ACTIVE);\n if (currentState !== State.END) {\n handler.sendEvent(State.UNDETERMINED, State.END);\n }\n }\n\n if (handler.isAwaiting()) {\n handler.setAwaiting(false);\n for (let i = 0; i < this.awaitingHandlers.length; ++i) {\n if (this.awaitingHandlers[i] === handler) {\n this.awaitingHandlers.splice(i, 1);\n }\n }\n }\n\n this.handlersToCancel = [];\n }\n\n private addAwaitingHandler(handler: GestureHandler): void {\n let alreadyExists = false;\n\n this.awaitingHandlers.forEach((otherHandler) => {\n if (otherHandler === handler) {\n alreadyExists = true;\n return;\n }\n });\n\n if (alreadyExists) {\n return;\n }\n\n this.awaitingHandlers.push(handler);\n\n handler.setAwaiting(true);\n handler.setActivationIndex(this.activationIndex++);\n }\n\n public recordHandlerIfNotPresent(handler: GestureHandler): void {\n let alreadyExists = false;\n\n this.gestureHandlers.forEach((otherHandler) => {\n if (otherHandler === handler) {\n alreadyExists = true;\n return;\n }\n });\n\n if (alreadyExists) {\n return;\n }\n\n this.gestureHandlers.push(handler);\n\n handler.setActive(false);\n handler.setAwaiting(false);\n handler.setActivationIndex(Number.MAX_SAFE_INTEGER);\n }\n\n private shouldHandlerWaitForOther(\n handler: GestureHandler,\n otherHandler: GestureHandler\n ): boolean {\n return (\n handler !== otherHandler &&\n (handler.shouldWaitForHandlerFailure(otherHandler) ||\n otherHandler.shouldRequireToWaitForFailure(handler))\n );\n }\n\n private canRunSimultaneously(\n gh1: GestureHandler,\n gh2: GestureHandler\n ): boolean {\n return (\n gh1 === gh2 ||\n gh1.shouldRecognizeSimultaneously(gh2) ||\n gh2.shouldRecognizeSimultaneously(gh1)\n );\n }\n\n private shouldHandlerBeCancelledBy(\n handler: GestureHandler,\n otherHandler: GestureHandler\n ): boolean {\n if (this.canRunSimultaneously(handler, otherHandler)) {\n return false;\n }\n\n if (\n handler !== otherHandler &&\n (handler.isAwaiting() || handler.getState() === State.ACTIVE)\n ) {\n // For now it always returns false\n return handler.shouldBeCancelledByOther(otherHandler);\n }\n\n const handlerPointers: number[] = handler.getTrackedPointersID();\n const otherPointers: number[] = otherHandler.getTrackedPointersID();\n\n if (\n !PointerTracker.shareCommonPointers(handlerPointers, otherPointers) &&\n handler.getView() !== otherHandler.getView()\n ) {\n return this.checkOverlap(handler, otherHandler);\n }\n\n return true;\n }\n\n private checkOverlap(\n handler: GestureHandler,\n otherHandler: GestureHandler\n ): boolean {\n // If handlers don't have common pointers, default return value is false.\n // However, if at least on pointer overlaps with both handlers, we return true\n // This solves issue in overlapping parents example\n\n // TODO: Find better way to handle that issue, for example by activation order and handler cancelling\n\n const handlerPointers: number[] = handler.getTrackedPointersID();\n const otherPointers: number[] = otherHandler.getTrackedPointersID();\n\n let overlap = false;\n\n handlerPointers.forEach((pointer: number) => {\n const handlerX: number = handler.getTracker().getLastX(pointer);\n const handlerY: number = handler.getTracker().getLastY(pointer);\n\n if (\n isPointerInBounds(handler.getView(), { x: handlerX, y: handlerY }) &&\n isPointerInBounds(otherHandler.getView(), { x: handlerX, y: handlerY })\n ) {\n overlap = true;\n }\n });\n\n otherPointers.forEach((pointer: number) => {\n const otherX: number = otherHandler.getTracker().getLastX(pointer);\n const otherY: number = otherHandler.getTracker().getLastY(pointer);\n\n if (\n isPointerInBounds(handler.getView(), { x: otherX, y: otherY }) &&\n isPointerInBounds(otherHandler.getView(), { x: otherX, y: otherY })\n ) {\n overlap = true;\n }\n });\n\n return overlap;\n }\n\n private isFinished(state: State): boolean {\n return (\n state === State.END || state === State.FAILED || state === State.CANCELLED\n );\n }\n\n // This function is called when handler receives touchdown event\n // If handler is using mouse or pen as a pointer and any handler receives touch event,\n // mouse/pen event dissappears - it doesn't send onPointerCancel nor onPointerUp (and others)\n // This became a problem because handler was left at active state without any signal to end or fail\n // To handle this, when new touch event is received, we loop through active handlers and check which type of\n // pointer they're using. If there are any handler with mouse/pen as a pointer, we cancel them\n public cancelMouseAndPenGestures(currentHandler: GestureHandler): void {\n this.gestureHandlers.forEach((handler: GestureHandler) => {\n if (\n handler.getPointerType() !== PointerType.MOUSE &&\n handler.getPointerType() !== PointerType.PEN\n ) {\n return;\n }\n\n if (handler !== currentHandler) {\n handler.cancel();\n } else {\n // Handler that received touch event should have its pointer tracker reset\n // This allows handler to smoothly change from mouse/pen to touch\n // The drawback is, that when we try to use mouse/pen one more time, it doesn't send onPointerDown at the first time\n // so it is required to click two times to get handler to work\n //\n // However, handler will receive manually created onPointerEnter that is triggered in EventManager in onPointerMove method.\n // There may be possibility to use that fact to make handler respond properly to first mouse click\n handler.getTracker().resetTracker();\n }\n });\n }\n\n public static getInstance(): GestureHandlerOrchestrator {\n if (!GestureHandlerOrchestrator.instance) {\n GestureHandlerOrchestrator.instance = new GestureHandlerOrchestrator();\n }\n\n return GestureHandlerOrchestrator.instance;\n }\n}\n","import GestureHandler from '../handlers/GestureHandler';\nimport { Config, Handler } from '../interfaces';\n\nexport default class InteractionManager {\n private static instance: InteractionManager;\n private readonly waitForRelations: Map = new Map();\n private readonly simultaneousRelations: Map = new Map();\n\n // Private becaues of singleton\n // eslint-disable-next-line no-useless-constructor, @typescript-eslint/no-empty-function\n private constructor() {}\n\n public configureInteractions(handler: GestureHandler, config: Config) {\n this.dropRelationsForHandlerWithTag(handler.getTag());\n\n if (config.waitFor) {\n const waitFor: number[] = [];\n config.waitFor.forEach((otherHandler: Handler): void => {\n // New API reference\n if (typeof otherHandler === 'number') {\n waitFor.push(otherHandler);\n } else {\n // Old API reference\n waitFor.push(otherHandler.handlerTag);\n }\n });\n\n this.waitForRelations.set(handler.getTag(), waitFor);\n }\n\n if (config.simultaneousHandlers) {\n const simultaneousHandlers: number[] = [];\n config.simultaneousHandlers.forEach((otherHandler: Handler): void => {\n if (typeof otherHandler === 'number') {\n simultaneousHandlers.push(otherHandler);\n } else {\n simultaneousHandlers.push(otherHandler.handlerTag);\n }\n });\n\n this.simultaneousRelations.set(handler.getTag(), simultaneousHandlers);\n }\n }\n\n public shouldWaitForHandlerFailure(\n handler: GestureHandler,\n otherHandler: GestureHandler\n ): boolean {\n const waitFor: number[] | undefined = this.waitForRelations.get(\n handler.getTag()\n );\n if (!waitFor) {\n return false;\n }\n\n let shouldWait = false;\n\n waitFor.forEach((tag: number): void => {\n if (tag === otherHandler.getTag()) {\n shouldWait = true;\n return; //Returns from callback\n }\n });\n\n return shouldWait;\n }\n\n public shouldRecognizeSimultaneously(\n handler: GestureHandler,\n otherHandler: GestureHandler\n ): boolean {\n const simultaneousHandlers: number[] | undefined =\n this.simultaneousRelations.get(handler.getTag());\n if (!simultaneousHandlers) {\n return false;\n }\n\n let shouldRecognizeSimultaneously = false;\n\n simultaneousHandlers.forEach((tag: number): void => {\n if (tag === otherHandler.getTag()) {\n shouldRecognizeSimultaneously = true;\n return;\n }\n });\n\n return shouldRecognizeSimultaneously;\n }\n\n public shouldRequireHandlerToWaitForFailure(\n _handler: GestureHandler,\n _otherHandler: GestureHandler\n ): boolean {\n //TODO: Implement logic\n return false;\n }\n\n public shouldHandlerBeCancelledBy(\n _handler: GestureHandler,\n _otherHandler: GestureHandler\n ): boolean {\n //TODO: Implement logic\n return false;\n }\n\n public dropRelationsForHandlerWithTag(handlerTag: number): void {\n this.waitForRelations.delete(handlerTag);\n this.simultaneousRelations.delete(handlerTag);\n }\n\n public reset() {\n this.waitForRelations.clear();\n this.simultaneousRelations.clear();\n }\n\n public static getInstance(): InteractionManager {\n if (!this.instance) {\n this.instance = new InteractionManager();\n }\n\n return this.instance;\n }\n}\n","// Implementation taken from Flutter's LeastSquareSolver\n// https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/gestures/lsq_solver.dart\n\nclass Vector {\n private offset: number;\n private length: number;\n private elements: number[];\n\n constructor(length: number) {\n this.offset = 0;\n this.length = length;\n this.elements = new Array(length);\n }\n\n public static fromVOL(\n values: number[],\n offset: number,\n length: number\n ): Vector {\n const result = new Vector(0);\n\n result.offset = offset;\n result.length = length;\n result.elements = values;\n\n return result;\n }\n\n public get(index: number): number {\n return this.elements[this.offset + index];\n }\n\n public set(index: number, value: number): void {\n this.elements[this.offset + index] = value;\n }\n\n public dot(other: Vector): number {\n let result = 0;\n for (let i = 0; i < this.length; i++) {\n result += this.get(i) * other.get(i);\n }\n return result;\n }\n\n public norm() {\n return Math.sqrt(this.dot(this));\n }\n}\n\nclass Matrix {\n private columns: number;\n private elements: number[];\n\n constructor(rows: number, columns: number) {\n this.columns = columns;\n this.elements = new Array(rows * columns);\n }\n\n public get(row: number, column: number): number {\n return this.elements[row * this.columns + column];\n }\n\n public set(row: number, column: number, value: number): void {\n this.elements[row * this.columns + column] = value;\n }\n\n public getRow(row: number): Vector {\n return Vector.fromVOL(this.elements, row * this.columns, this.columns);\n }\n}\n\n/// An nth degree polynomial fit to a dataset.\nclass PolynomialFit {\n /// The polynomial coefficients of the fit.\n ///\n /// For each `i`, the element `coefficients[i]` is the coefficient of\n /// the `i`-th power of the variable.\n public coefficients: number[];\n\n /// Creates a polynomial fit of the given degree.\n ///\n /// There are n + 1 coefficients in a fit of degree n.\n constructor(degree: number) {\n this.coefficients = new Array(degree + 1);\n }\n}\n\nconst precisionErrorTolerance = 1e-10;\n\n/// Uses the least-squares algorithm to fit a polynomial to a set of data.\nexport default class LeastSquareSolver {\n /// The x-coordinates of each data point.\n private x: number[];\n /// The y-coordinates of each data point.\n private y: number[];\n /// The weight to use for each data point.\n private w: number[];\n\n /// Creates a least-squares solver.\n ///\n /// The [x], [y], and [w] arguments must not be null.\n constructor(x: number[], y: number[], w: number[]) {\n this.x = x;\n this.y = y;\n this.w = w;\n }\n\n /// Fits a polynomial of the given degree to the data points.\n ///\n /// When there is not enough data to fit a curve null is returned.\n public solve(degree: number): PolynomialFit | null {\n if (degree > this.x.length) {\n // Not enough data to fit a curve.\n return null;\n }\n\n const result = new PolynomialFit(degree);\n\n // Shorthands for the purpose of notation equivalence to original C++ code.\n const m = this.x.length;\n const n = degree + 1;\n\n // Expand the X vector to a matrix A, pre-multiplied by the weights.\n const a = new Matrix(n, m);\n for (let h = 0; h < m; h++) {\n a.set(0, h, this.w[h]);\n\n for (let i = 1; i < n; i++) {\n a.set(i, h, a.get(i - 1, h) * this.x[h]);\n }\n }\n\n // Apply the Gram-Schmidt process to A to obtain its QR decomposition.\n\n // Orthonormal basis, column-major ordVectorer.\n const q = new Matrix(n, m);\n // Upper triangular matrix, row-major order.\n const r = new Matrix(n, m);\n\n for (let j = 0; j < n; j += 1) {\n for (let h = 0; h < m; h += 1) {\n q.set(j, h, a.get(j, h));\n }\n for (let i = 0; i < j; i += 1) {\n const dot = q.getRow(j).dot(q.getRow(i));\n for (let h = 0; h < m; h += 1) {\n q.set(j, h, q.get(j, h) - dot * q.get(i, h));\n }\n }\n\n const norm = q.getRow(j).norm();\n if (norm < precisionErrorTolerance) {\n // Vectors are linearly dependent or zero so no solution.\n return null;\n }\n\n const inverseNorm = 1.0 / norm;\n for (let h = 0; h < m; h += 1) {\n q.set(j, h, q.get(j, h) * inverseNorm);\n }\n for (let i = 0; i < n; i += 1) {\n r.set(j, i, i < j ? 0.0 : q.getRow(j).dot(a.getRow(i)));\n }\n }\n\n // Solve R B = Qt W Y to find B. This is easy because R is upper triangular.\n // We just work from bottom-right to top-left calculating B's coefficients.\n const wy = new Vector(m);\n for (let h = 0; h < m; h += 1) {\n wy.set(h, this.y[h] * this.w[h]);\n }\n for (let i = n - 1; i >= 0; i -= 1) {\n result.coefficients[i] = q.getRow(i).dot(wy);\n for (let j = n - 1; j > i; j -= 1) {\n result.coefficients[i] -= r.get(i, j) * result.coefficients[j];\n }\n result.coefficients[i] /= r.get(i, i);\n }\n\n return result;\n }\n}\n","import { ValueOf } from '../../typeUtils';\nimport { Gestures } from '../../RNGestureHandlerModule.web';\n\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\nexport default abstract class NodeManager {\n private static gestures: Record<\n number,\n InstanceType>\n > = {};\n\n public static getHandler(tag: number) {\n if (tag in this.gestures) {\n return this.gestures[tag];\n }\n\n throw new Error(`No handler for tag ${tag}`);\n }\n\n public static createGestureHandler(\n handlerTag: number,\n handler: InstanceType>\n ): void {\n if (handlerTag in this.gestures) {\n throw new Error(`Handler with tag ${handlerTag} already exists`);\n }\n\n this.gestures[handlerTag] = handler;\n this.gestures[handlerTag].setTag(handlerTag);\n }\n\n public static dropGestureHandler(handlerTag: number): void {\n if (!(handlerTag in this.gestures)) {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this.gestures[handlerTag];\n }\n\n public static getNodes() {\n return { ...this.gestures };\n }\n}\n","import {\n AdaptedEvent,\n EventTypes,\n MouseButtons,\n PointerType,\n} from '../interfaces';\nimport EventManager from './EventManager';\nimport { isPointerInBounds } from '../utils';\n\nexport default class PointerEventManager extends EventManager {\n private trackedPointers = new Set();\n\n public setListeners(): void {\n this.view.addEventListener('pointerdown', (event: PointerEvent): void => {\n if (event.pointerType === PointerType.TOUCH) {\n return;\n }\n if (\n !isPointerInBounds(this.view, { x: event.clientX, y: event.clientY })\n ) {\n return;\n }\n\n const adaptedEvent: AdaptedEvent = this.mapEvent(event, EventTypes.DOWN);\n const target = event.target as HTMLElement;\n\n target.setPointerCapture(adaptedEvent.pointerId);\n this.markAsInBounds(adaptedEvent.pointerId);\n this.trackedPointers.add(adaptedEvent.pointerId);\n\n if (++this.activePointersCounter > 1) {\n adaptedEvent.eventType = EventTypes.ADDITIONAL_POINTER_DOWN;\n this.onPointerAdd(adaptedEvent);\n } else {\n this.onPointerDown(adaptedEvent);\n }\n });\n\n this.view.addEventListener('pointerup', (event: PointerEvent): void => {\n if (event.pointerType === PointerType.TOUCH) {\n return;\n }\n\n // When we call reset on gesture handlers, it also resets their event managers\n // In some handlers (like RotationGestureHandler) reset is called before all pointers leave view\n // This means, that activePointersCounter will be set to 0, while there are still remaining pointers on view\n // Removing them will end in activePointersCounter going below 0, therefore handlers won't behave properly\n if (this.activePointersCounter === 0) {\n return;\n }\n\n const adaptedEvent: AdaptedEvent = this.mapEvent(event, EventTypes.UP);\n const target = event.target as HTMLElement;\n\n target.releasePointerCapture(adaptedEvent.pointerId);\n this.markAsOutOfBounds(adaptedEvent.pointerId);\n this.trackedPointers.delete(adaptedEvent.pointerId);\n\n if (--this.activePointersCounter > 0) {\n adaptedEvent.eventType = EventTypes.ADDITIONAL_POINTER_UP;\n this.onPointerRemove(adaptedEvent);\n } else {\n this.onPointerUp(adaptedEvent);\n }\n });\n\n this.view.addEventListener('pointermove', (event: PointerEvent): void => {\n if (event.pointerType === PointerType.TOUCH) {\n return;\n }\n\n if (\n event.pointerType === PointerType.MOUSE &&\n event.buttons !== MouseButtons.LEFT\n ) {\n return;\n }\n\n const adaptedEvent: AdaptedEvent = this.mapEvent(event, EventTypes.MOVE);\n\n const inBounds: boolean = isPointerInBounds(this.view, {\n x: adaptedEvent.x,\n y: adaptedEvent.y,\n });\n\n const pointerIndex: number = this.pointersInBounds.indexOf(\n adaptedEvent.pointerId\n );\n\n if (inBounds) {\n if (pointerIndex < 0) {\n adaptedEvent.eventType = EventTypes.ENTER;\n this.onPointerEnter(adaptedEvent);\n this.markAsInBounds(adaptedEvent.pointerId);\n } else {\n this.onPointerMove(adaptedEvent);\n }\n } else {\n if (pointerIndex >= 0) {\n adaptedEvent.eventType = EventTypes.OUT;\n this.onPointerOut(adaptedEvent);\n this.markAsOutOfBounds(adaptedEvent.pointerId);\n } else {\n this.onPointerOutOfBounds(adaptedEvent);\n }\n }\n });\n\n this.view.addEventListener('pointercancel', (event: PointerEvent): void => {\n if (event.pointerType === PointerType.TOUCH) {\n return;\n }\n\n const adaptedEvent: AdaptedEvent = this.mapEvent(\n event,\n EventTypes.CANCEL\n );\n\n this.onPointerCancel(adaptedEvent);\n this.markAsOutOfBounds(adaptedEvent.pointerId);\n this.activePointersCounter = 0;\n this.trackedPointers.clear();\n });\n\n this.view.addEventListener(\n 'lostpointercapture',\n (event: PointerEvent): void => {\n const adaptedEvent: AdaptedEvent = this.mapEvent(\n event,\n EventTypes.CANCEL\n );\n\n if (this.trackedPointers.has(adaptedEvent.pointerId)) {\n // in some cases the `pointerup` event is not fired, but `lostpointercapture` is\n // we simulate the `pointercancel` event here to make sure the gesture handler stops tracking it\n this.onPointerCancel(adaptedEvent);\n\n this.activePointersCounter = 0;\n this.trackedPointers.clear();\n }\n }\n );\n }\n\n protected mapEvent(event: PointerEvent, eventType: EventTypes): AdaptedEvent {\n return {\n x: event.clientX,\n y: event.clientY,\n offsetX: event.offsetX,\n offsetY: event.offsetY,\n pointerId: event.pointerId,\n eventType: eventType,\n pointerType: event.pointerType as PointerType,\n buttons: event.buttons,\n time: event.timeStamp,\n };\n }\n\n public resetManager(): void {\n super.resetManager();\n this.trackedPointers.clear();\n }\n}\n","import { AdaptedEvent } from '../interfaces';\nimport VelocityTracker from './VelocityTracker';\n\nexport interface TrackerElement {\n lastX: number;\n lastY: number;\n\n timeStamp: number;\n\n velocityX: number;\n velocityY: number;\n}\n\nconst MAX_POINTERS = 20;\n\nexport default class PointerTracker {\n private velocityTracker = new VelocityTracker();\n private trackedPointers: Map = new Map<\n number,\n TrackerElement\n >();\n\n private touchEventsIds: Map = new Map();\n\n private lastMovedPointerId: number;\n\n private cachedAverages: { x: number; y: number } = { x: 0, y: 0 };\n\n public constructor() {\n this.lastMovedPointerId = NaN;\n\n for (let i = 0; i < MAX_POINTERS; ++i) {\n this.touchEventsIds.set(i, NaN);\n }\n }\n\n public addToTracker(event: AdaptedEvent): void {\n if (this.trackedPointers.has(event.pointerId)) {\n return;\n }\n\n this.lastMovedPointerId = event.pointerId;\n\n const newElement: TrackerElement = {\n lastX: event.x,\n lastY: event.y,\n timeStamp: event.time,\n velocityX: 0,\n velocityY: 0,\n };\n\n this.trackedPointers.set(event.pointerId, newElement);\n this.mapTouchEventId(event.pointerId);\n\n this.cachedAverages = {\n x: this.getLastAvgX(),\n y: this.getLastAvgY(),\n };\n }\n\n public removeFromTracker(pointerId: number): void {\n this.trackedPointers.delete(pointerId);\n this.removeMappedTouchId(pointerId);\n }\n\n public track(event: AdaptedEvent): void {\n const element: TrackerElement = this.trackedPointers.get(\n event.pointerId\n ) as TrackerElement;\n\n if (!element) {\n return;\n }\n\n this.lastMovedPointerId = event.pointerId;\n\n this.velocityTracker.add(event);\n const [velocityX, velocityY] = this.velocityTracker.getVelocity();\n\n element.velocityX = velocityX;\n element.velocityY = velocityY;\n\n element.lastX = event.x;\n element.lastY = event.y;\n\n this.trackedPointers.set(event.pointerId, element);\n\n const avgX: number = this.getLastAvgX();\n const avgY: number = this.getLastAvgY();\n\n this.cachedAverages = {\n x: avgX,\n y: avgY,\n };\n }\n\n //Mapping TouchEvents ID\n private mapTouchEventId(id: number): void {\n for (const [mappedId, touchId] of this.touchEventsIds) {\n if (isNaN(touchId)) {\n this.touchEventsIds.set(mappedId, id);\n break;\n }\n }\n }\n\n private removeMappedTouchId(id: number): void {\n const mappedId: number = this.getMappedTouchEventId(id);\n if (!isNaN(mappedId)) {\n this.touchEventsIds.set(mappedId, NaN);\n }\n }\n\n public getMappedTouchEventId(touchEventId: number): number {\n for (const [key, value] of this.touchEventsIds.entries()) {\n if (value === touchEventId) {\n return key;\n }\n }\n\n return NaN;\n }\n\n public getVelocityX(pointerId: number): number {\n return this.trackedPointers.get(pointerId)?.velocityX as number;\n }\n public getVelocityY(pointerId: number): number {\n return this.trackedPointers.get(pointerId)?.velocityY as number;\n }\n\n /**\n * Returns X coordinate of last moved pointer\n */\n public getLastX(): number;\n\n /**\n *\n * @param pointerId\n * Returns X coordinate of given pointer\n */\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n public getLastX(pointerId: number): number;\n\n public getLastX(pointerId?: number): number {\n if (pointerId !== undefined) {\n return this.trackedPointers.get(pointerId)?.lastX as number;\n } else {\n return this.trackedPointers.get(this.lastMovedPointerId)?.lastX as number;\n }\n }\n\n /**\n * Returns Y coordinate of last moved pointer\n */\n public getLastY(): number;\n\n /**\n *\n * @param pointerId\n * Returns Y coordinate of given pointer\n */\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n public getLastY(pointerId: number): number;\n\n public getLastY(pointerId?: number): number {\n if (pointerId !== undefined) {\n return this.trackedPointers.get(pointerId)?.lastY as number;\n } else {\n return this.trackedPointers.get(this.lastMovedPointerId)?.lastY as number;\n }\n }\n\n // Some handlers use these methods to send average values in native event.\n // This may happen when pointers have already been removed from tracker (i.e. pointerup event).\n // In situation when NaN would be sent as a response, we return cached value.\n // That prevents handlers from crashing\n public getLastAvgX(): number {\n const avgX: number = this.getSumX() / this.trackedPointers.size;\n return isNaN(avgX) ? this.cachedAverages.x : avgX;\n }\n public getLastAvgY(): number {\n const avgY: number = this.getSumY() / this.trackedPointers.size;\n return isNaN(avgY) ? this.cachedAverages.y : avgY;\n }\n public getSumX(ignoredPointer?: number): number {\n let sumX = 0;\n\n this.trackedPointers.forEach((value, key) => {\n if (key !== ignoredPointer) {\n sumX += value.lastX;\n }\n });\n\n return sumX;\n }\n public getSumY(ignoredPointer?: number): number {\n let sumY = 0;\n\n this.trackedPointers.forEach((value, key) => {\n if (key !== ignoredPointer) {\n sumY += value.lastY;\n }\n });\n\n return sumY;\n }\n public getTrackedPointersCount(): number {\n return this.trackedPointers.size;\n }\n public getTrackedPointersID(): number[] {\n const keys: number[] = [];\n\n this.trackedPointers.forEach((_value, key) => {\n keys.push(key);\n });\n\n return keys;\n }\n\n public getData(): Map {\n return this.trackedPointers;\n }\n\n public resetTracker(): void {\n this.velocityTracker.reset();\n this.trackedPointers.clear();\n this.lastMovedPointerId = NaN;\n\n for (let i = 0; i < MAX_POINTERS; ++i) {\n this.touchEventsIds.set(i, NaN);\n }\n }\n\n public static shareCommonPointers(\n stPointers: number[],\n ndPointers: number[]\n ): boolean {\n return stPointers.some((pointerId) => ndPointers.includes(pointerId));\n }\n}\n","import {\n AdaptedEvent,\n EventTypes,\n MouseButtons,\n PointerType,\n TouchEventType,\n} from '../interfaces';\nimport EventManager from './EventManager';\nimport { isPointerInBounds } from '../utils';\n\nexport default class TouchEventManager extends EventManager {\n public setListeners(): void {\n this.view.addEventListener('touchstart', (event: TouchEvent) => {\n for (let i = 0; i < event.changedTouches.length; ++i) {\n const adaptedEvent: AdaptedEvent = this.mapEvent(\n event,\n EventTypes.DOWN,\n i,\n TouchEventType.DOWN\n );\n\n // Here we skip stylus, because in case of anything different than touch we want to handle it by using PointerEvents\n // If we leave stylus to send touch events, handlers will receive every action twice\n if (\n !isPointerInBounds(this.view, {\n x: adaptedEvent.x,\n y: adaptedEvent.y,\n }) ||\n //@ts-ignore touchType field does exist\n event.changedTouches[i].touchType === 'stylus'\n ) {\n continue;\n }\n\n this.markAsInBounds(adaptedEvent.pointerId);\n\n if (++this.activePointersCounter > 1) {\n adaptedEvent.eventType = EventTypes.ADDITIONAL_POINTER_DOWN;\n this.onPointerAdd(adaptedEvent);\n } else {\n this.onPointerDown(adaptedEvent);\n }\n }\n });\n\n this.view.addEventListener('touchmove', (event: TouchEvent) => {\n for (let i = 0; i < event.changedTouches.length; ++i) {\n const adaptedEvent: AdaptedEvent = this.mapEvent(\n event,\n EventTypes.MOVE,\n i,\n TouchEventType.MOVE\n );\n //@ts-ignore touchType field does exist\n if (event.changedTouches[i].touchType === 'stylus') {\n continue;\n }\n\n const inBounds: boolean = isPointerInBounds(this.view, {\n x: adaptedEvent.x,\n y: adaptedEvent.y,\n });\n\n const pointerIndex: number = this.pointersInBounds.indexOf(\n adaptedEvent.pointerId\n );\n\n if (inBounds) {\n if (pointerIndex < 0) {\n adaptedEvent.eventType = EventTypes.ENTER;\n this.onPointerEnter(adaptedEvent);\n this.markAsInBounds(adaptedEvent.pointerId);\n } else {\n this.onPointerMove(adaptedEvent);\n }\n } else {\n if (pointerIndex >= 0) {\n adaptedEvent.eventType = EventTypes.OUT;\n this.onPointerOut(adaptedEvent);\n this.markAsOutOfBounds(adaptedEvent.pointerId);\n } else {\n this.onPointerOutOfBounds(adaptedEvent);\n }\n }\n }\n });\n\n this.view.addEventListener('touchend', (event: TouchEvent) => {\n for (let i = 0; i < event.changedTouches.length; ++i) {\n // When we call reset on gesture handlers, it also resets their event managers\n // In some handlers (like RotationGestureHandler) reset is called before all pointers leave view\n // This means, that activePointersCounter will be set to 0, while there are still remaining pointers on view\n // Removing them will end in activePointersCounter going below 0, therefore handlers won't behave properly\n if (this.activePointersCounter === 0) {\n break;\n }\n\n //@ts-ignore touchType field does exist\n if (event.changedTouches[i].touchType === 'stylus') {\n continue;\n }\n\n const adaptedEvent: AdaptedEvent = this.mapEvent(\n event,\n EventTypes.UP,\n i,\n TouchEventType.UP\n );\n\n this.markAsOutOfBounds(adaptedEvent.pointerId);\n\n if (--this.activePointersCounter > 0) {\n adaptedEvent.eventType = EventTypes.ADDITIONAL_POINTER_UP;\n this.onPointerRemove(adaptedEvent);\n } else {\n this.onPointerUp(adaptedEvent);\n }\n }\n });\n\n this.view.addEventListener('touchcancel', (event: TouchEvent) => {\n for (let i = 0; i < event.changedTouches.length; ++i) {\n const adaptedEvent: AdaptedEvent = this.mapEvent(\n event,\n EventTypes.CANCEL,\n i,\n TouchEventType.CANCELLED\n );\n\n //@ts-ignore touchType field does exist\n if (event.changedTouches[i].touchType === 'stylus') {\n continue;\n }\n\n this.onPointerCancel(adaptedEvent);\n this.markAsOutOfBounds(adaptedEvent.pointerId);\n this.activePointersCounter = 0;\n }\n });\n }\n\n protected mapEvent(\n event: TouchEvent,\n eventType: EventTypes,\n index: number,\n touchEventType: TouchEventType\n ): AdaptedEvent {\n const rect = this.view.getBoundingClientRect();\n const clientX = event.changedTouches[index].clientX;\n const clientY = event.changedTouches[index].clientY;\n\n return {\n x: clientX,\n y: clientY,\n offsetX: clientX - rect.left,\n offsetY: clientY - rect.top,\n pointerId: event.changedTouches[index].identifier,\n eventType: eventType,\n pointerType: PointerType.TOUCH,\n buttons: MouseButtons.NONE,\n time: event.timeStamp,\n allTouches: event.touches,\n changedTouches: event.changedTouches,\n touchEventType: touchEventType,\n };\n }\n}\n","import { AdaptedEvent } from '../interfaces';\nimport CircularBuffer from './CircularBuffer';\nimport LeastSquareSolver from './LeastSquareSolver';\n\nexport default class VelocityTracker {\n private assumePointerMoveStoppedMilliseconds = 40;\n private historySize = 20;\n private horizonMilliseconds = 300;\n private minSampleSize = 3;\n\n private samples: CircularBuffer;\n\n constructor() {\n this.samples = new CircularBuffer(this.historySize);\n }\n\n public add(event: AdaptedEvent): void {\n this.samples.push(event);\n }\n\n /// Returns an estimate of the velocity of the object being tracked by the\n /// tracker given the current information available to the tracker.\n ///\n /// Information is added using [addPosition].\n ///\n /// Returns null if there is no data on which to base an estimate.\n private getVelocityEstimate(): [number, number] | null {\n const x = [];\n const y = [];\n const w = [];\n const time = [];\n\n let sampleCount = 0;\n let index = this.samples.size - 1;\n const newestSample = this.samples.get(index);\n if (!newestSample) {\n return null;\n }\n\n let previousSample = newestSample;\n\n // Starting with the most recent PointAtTime sample, iterate backwards while\n // the samples represent continuous motion.\n while (sampleCount < this.samples.size) {\n const sample = this.samples.get(index);\n\n const age = newestSample.time - sample.time;\n const delta = Math.abs(sample.time - previousSample.time);\n previousSample = sample;\n\n if (\n age > this.horizonMilliseconds ||\n delta > this.assumePointerMoveStoppedMilliseconds\n ) {\n break;\n }\n\n x.push(sample.x);\n y.push(sample.y);\n w.push(1);\n time.push(-age);\n\n sampleCount++;\n index--;\n }\n\n if (sampleCount >= this.minSampleSize) {\n const xSolver = new LeastSquareSolver(time, x, w);\n const xFit = xSolver.solve(2);\n\n if (xFit !== null) {\n const ySolver = new LeastSquareSolver(time, y, w);\n const yFit = ySolver.solve(2);\n\n if (yFit !== null) {\n const xVelocity = xFit.coefficients[1] * 1000;\n const yVelocity = yFit.coefficients[1] * 1000;\n\n return [xVelocity, yVelocity];\n }\n }\n }\n\n return null;\n }\n\n public getVelocity(): [number, number] {\n const estimate = this.getVelocityEstimate();\n if (estimate !== null) {\n return estimate;\n }\n return [0, 0];\n }\n\n public reset(): void {\n this.samples.clear();\n }\n}\n","export function isPointerInBounds(\n view: HTMLElement,\n { x, y }: { x: number; y: number }\n): boolean {\n const rect: DOMRect = view.getBoundingClientRect();\n\n return x >= rect.left && x <= rect.right && y >= rect.top && y <= rect.bottom;\n}\n","/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\nimport GestureHandler from './GestureHandler';\nimport { TEST_MAX_IF_NOT_NAN } from './utils';\n\nabstract class DiscreteGestureHandler extends GestureHandler {\n get isDiscrete() {\n return true;\n }\n\n get shouldEnableGestureOnSetup() {\n return true;\n }\n\n shouldFailUnderCustomCriteria(\n { x, y, deltaX, deltaY }: any,\n { maxDeltaX, maxDeltaY, maxDistSq, shouldCancelWhenOutside }: any\n ) {\n if (shouldCancelWhenOutside) {\n if (!this.isPointInView({ x, y })) {\n return true;\n }\n }\n return (\n TEST_MAX_IF_NOT_NAN(Math.abs(deltaX), maxDeltaX) ||\n TEST_MAX_IF_NOT_NAN(Math.abs(deltaY), maxDeltaY) ||\n TEST_MAX_IF_NOT_NAN(\n Math.abs(deltaY * deltaY + deltaX * deltaX),\n maxDistSq\n )\n );\n }\n\n transformNativeEvent({ center: { x, y } }: any) {\n // @ts-ignore FIXME(TS)\n const rect = this.view!.getBoundingClientRect();\n\n return {\n absoluteX: x,\n absoluteY: y,\n x: x - rect.left,\n y: y - rect.top,\n };\n }\n\n isGestureEnabledForEvent(\n {\n minPointers,\n maxPointers,\n maxDeltaX,\n maxDeltaY,\n maxDistSq,\n shouldCancelWhenOutside,\n }: any,\n _recognizer: any,\n { maxPointers: pointerLength, center, deltaX, deltaY }: any\n ) {\n const validPointerCount =\n pointerLength >= minPointers && pointerLength <= maxPointers;\n\n if (\n this.shouldFailUnderCustomCriteria(\n { ...center, deltaX, deltaY },\n {\n maxDeltaX,\n maxDeltaY,\n maxDistSq,\n shouldCancelWhenOutside,\n }\n ) ||\n // A user probably won't land a multi-pointer tap on the first tick (so we cannot just cancel each time)\n // but if the gesture is running and the user adds or subtracts another pointer then it should fail.\n (!validPointerCount && this.isGestureRunning)\n ) {\n return { failed: true };\n }\n\n return { success: validPointerCount };\n }\n}\n\nexport default DiscreteGestureHandler;\n","/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\nimport GestureHandler, { HammerInputExt } from './GestureHandler';\nimport { PixelRatio } from 'react-native';\n\nabstract class DraggingGestureHandler extends GestureHandler {\n get shouldEnableGestureOnSetup() {\n return true;\n }\n\n transformNativeEvent({\n deltaX,\n deltaY,\n velocityX,\n velocityY,\n center: { x, y },\n }: HammerInputExt) {\n // @ts-ignore FIXME(TS)\n const rect = this.view!.getBoundingClientRect();\n const ratio = PixelRatio.get();\n return {\n translationX: deltaX - (this.__initialX || 0),\n translationY: deltaY - (this.__initialY || 0),\n absoluteX: x,\n absoluteY: y,\n velocityX: velocityX * ratio,\n velocityY: velocityY * ratio,\n x: x - rect.left,\n y: y - rect.top,\n };\n }\n}\n\nexport default DraggingGestureHandler;\n","export class GesturePropError extends Error {\n constructor(name: string, value: unknown, expectedType: string) {\n super(\n `Invalid property \\`${name}: ${value}\\` expected \\`${expectedType}\\``\n );\n }\n}\n","/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\nimport Hammer from '@egjs/hammerjs';\n\nimport { Direction } from './constants';\nimport { GesturePropError } from './Errors';\nimport DraggingGestureHandler from './DraggingGestureHandler';\nimport { isnan } from './utils';\nimport { HammerInputExt } from './GestureHandler';\n\nclass FlingGestureHandler extends DraggingGestureHandler {\n get name() {\n return 'swipe';\n }\n\n get NativeGestureClass() {\n return Hammer.Swipe;\n }\n\n onGestureActivated(event: HammerInputExt) {\n this.sendEvent({\n ...event,\n eventType: Hammer.INPUT_MOVE,\n isFinal: false,\n isFirst: true,\n });\n this.isGestureRunning = false;\n this.hasGestureFailed = false;\n this.sendEvent({\n ...event,\n eventType: Hammer.INPUT_END,\n isFinal: true,\n });\n }\n\n onRawEvent(ev: HammerInputExt) {\n super.onRawEvent(ev);\n if (this.hasGestureFailed) {\n return;\n }\n // Hammer doesn't send a `cancel` event for taps.\n // Manually fail the event.\n if (ev.isFinal) {\n setTimeout(() => {\n if (this.isGestureRunning) {\n this.cancelEvent(ev);\n }\n });\n } else if (!this.hasGestureFailed && !this.isGestureRunning) {\n // Tap Gesture start event\n const gesture = this.hammer!.get(this.name);\n // @ts-ignore FIXME(TS)\n if (gesture.options.enable(gesture, ev)) {\n this.onStart(ev);\n this.sendEvent(ev);\n }\n }\n }\n\n getHammerConfig() {\n return {\n // @ts-ignore FIXME(TS)\n pointers: this.config.numberOfPointers,\n direction: this.getDirection(),\n };\n }\n\n getTargetDirections(direction: number) {\n const directions = [];\n if (direction & Direction.RIGHT) {\n directions.push(Hammer.DIRECTION_RIGHT);\n }\n if (direction & Direction.LEFT) {\n directions.push(Hammer.DIRECTION_LEFT);\n }\n if (direction & Direction.UP) {\n directions.push(Hammer.DIRECTION_UP);\n }\n if (direction & Direction.DOWN) {\n directions.push(Hammer.DIRECTION_DOWN);\n }\n // const hammerDirection = directions.reduce((a, b) => a | b, 0);\n return directions;\n }\n\n getDirection() {\n // @ts-ignore FIXME(TS)\n const { direction } = this.getConfig();\n\n let directions = [];\n if (direction & Direction.RIGHT) {\n directions.push(Hammer.DIRECTION_HORIZONTAL);\n }\n if (direction & Direction.LEFT) {\n directions.push(Hammer.DIRECTION_HORIZONTAL);\n }\n if (direction & Direction.UP) {\n directions.push(Hammer.DIRECTION_VERTICAL);\n }\n if (direction & Direction.DOWN) {\n directions.push(Hammer.DIRECTION_VERTICAL);\n }\n directions = [...new Set(directions)];\n\n if (directions.length === 0) return Hammer.DIRECTION_NONE;\n if (directions.length === 1) return directions[0];\n return Hammer.DIRECTION_ALL;\n }\n\n isGestureEnabledForEvent(\n { numberOfPointers }: any,\n _recognizer: any,\n { maxPointers: pointerLength }: any\n ) {\n const validPointerCount = pointerLength === numberOfPointers;\n if (!validPointerCount && this.isGestureRunning) {\n return { failed: true };\n }\n return { success: validPointerCount };\n }\n\n updateGestureConfig({ numberOfPointers = 1, direction, ...props }: any) {\n if (isnan(direction) || typeof direction !== 'number') {\n throw new GesturePropError('direction', direction, 'number');\n }\n return super.updateGestureConfig({\n numberOfPointers,\n direction,\n ...props,\n });\n }\n}\n\nexport default FlingGestureHandler;\n","/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\nimport Hammer from '@egjs/hammerjs';\nimport { findNodeHandle } from 'react-native';\n\nimport { State } from '../State';\nimport { EventMap } from './constants';\nimport * as NodeManager from './NodeManager';\n\n// TODO(TS) Replace with HammerInput if https://github.com/DefinitelyTyped/DefinitelyTyped/pull/50438/files is merged\nexport type HammerInputExt = Omit;\n\nexport type Config = Partial<{\n enabled: boolean;\n minPointers: number;\n maxPointers: number;\n minDist: number;\n minDistSq: number;\n minVelocity: number;\n minVelocitySq: number;\n maxDist: number;\n maxDistSq: number;\n failOffsetXStart: number;\n failOffsetYStart: number;\n failOffsetXEnd: number;\n failOffsetYEnd: number;\n activeOffsetXStart: number;\n activeOffsetXEnd: number;\n activeOffsetYStart: number;\n activeOffsetYEnd: number;\n waitFor: any[] | null;\n simultaneousHandlers: any[] | null;\n}>;\n\ntype NativeEvent = ReturnType;\n\nlet gestureInstances = 0;\n\nabstract class GestureHandler {\n public handlerTag: any;\n public isGestureRunning = false;\n public view: number | null = null;\n protected hasCustomActivationCriteria: boolean;\n protected hasGestureFailed = false;\n protected hammer: HammerManager | null = null;\n protected initialRotation: number | null = null;\n protected __initialX: any;\n protected __initialY: any;\n protected config: Config = {};\n protected previousState: State = State.UNDETERMINED;\n private pendingGestures: Record = {};\n private oldState: State = State.UNDETERMINED;\n private lastSentState: State | null = null;\n private gestureInstance: number;\n private _stillWaiting: any;\n private propsRef: any;\n private ref: any;\n\n abstract get name(): string;\n\n get id() {\n return `${this.name}${this.gestureInstance}`;\n }\n\n // a simple way to check if GestureHandler is NativeViewGestureHandler, since importing it\n // here to use instanceof would cause import cycle\n get isNative() {\n return false;\n }\n\n get isDiscrete() {\n return false;\n }\n\n get shouldEnableGestureOnSetup(): boolean {\n throw new Error('Must override GestureHandler.shouldEnableGestureOnSetup');\n }\n\n constructor() {\n this.gestureInstance = gestureInstances++;\n this.hasCustomActivationCriteria = false;\n }\n\n getConfig() {\n return this.config;\n }\n\n onWaitingEnded(_gesture: this) {}\n\n removePendingGesture(id: string) {\n delete this.pendingGestures[id];\n }\n\n addPendingGesture(gesture: this) {\n this.pendingGestures[gesture.id] = gesture;\n }\n\n isGestureEnabledForEvent(\n _config: any,\n _recognizer: any,\n _event: any\n ): { failed?: boolean; success?: boolean } {\n return { success: true };\n }\n\n get NativeGestureClass(): RecognizerStatic {\n throw new Error('Must override GestureHandler.NativeGestureClass');\n }\n\n updateHasCustomActivationCriteria(_config: Config) {\n return true;\n }\n\n clearSelfAsPending = () => {\n if (Array.isArray(this.config.waitFor)) {\n for (const gesture of this.config.waitFor) {\n gesture.removePendingGesture(this.id);\n }\n }\n };\n\n updateGestureConfig({ enabled = true, ...props }) {\n this.clearSelfAsPending();\n\n this.config = this.ensureConfig({ enabled, ...props });\n this.hasCustomActivationCriteria = this.updateHasCustomActivationCriteria(\n this.config\n );\n if (Array.isArray(this.config.waitFor)) {\n for (const gesture of this.config.waitFor) {\n gesture.addPendingGesture(this);\n }\n }\n\n if (this.hammer) {\n this.sync();\n }\n return this.config;\n }\n\n destroy = () => {\n this.clearSelfAsPending();\n\n if (this.hammer) {\n this.hammer.stop(false);\n this.hammer.destroy();\n }\n this.hammer = null;\n };\n\n isPointInView = ({ x, y }: { x: number; y: number }) => {\n // @ts-ignore FIXME(TS)\n const rect = this.view!.getBoundingClientRect();\n const pointerInside =\n x >= rect.left && x <= rect.right && y >= rect.top && y <= rect.bottom;\n return pointerInside;\n };\n\n getState(type: keyof typeof EventMap): State {\n // @ts-ignore TODO(TS) check if this is needed\n if (type == 0) {\n return 0;\n }\n return EventMap[type];\n }\n\n transformEventData(event: HammerInputExt) {\n const { eventType, maxPointers: numberOfPointers } = event;\n // const direction = DirectionMap[ev.direction];\n const changedTouch = event.changedPointers[0];\n const pointerInside = this.isPointInView({\n x: changedTouch.clientX,\n y: changedTouch.clientY,\n });\n\n // TODO(TS) Remove cast after https://github.com/DefinitelyTyped/DefinitelyTyped/pull/50966 is merged.\n const state = this.getState(eventType as 1 | 2 | 4 | 8);\n if (state !== this.previousState) {\n this.oldState = this.previousState;\n this.previousState = state;\n }\n\n return {\n nativeEvent: {\n numberOfPointers,\n state,\n pointerInside,\n ...this.transformNativeEvent(event),\n // onHandlerStateChange only\n handlerTag: this.handlerTag,\n target: this.ref,\n // send oldState only when the state was changed, or is different than ACTIVE\n // GestureDetector relies on the presence of `oldState` to differentiate between\n // update events and state change events\n oldState:\n state !== this.previousState || state != 4\n ? this.oldState\n : undefined,\n },\n timeStamp: Date.now(),\n };\n }\n\n transformNativeEvent(_event: HammerInputExt) {\n return {};\n }\n\n sendEvent = (nativeEvent: HammerInputExt) => {\n const { onGestureHandlerEvent, onGestureHandlerStateChange } =\n this.propsRef.current;\n\n const event = this.transformEventData(nativeEvent);\n\n invokeNullableMethod(onGestureHandlerEvent, event);\n if (this.lastSentState !== event.nativeEvent.state) {\n this.lastSentState = event.nativeEvent.state as State;\n invokeNullableMethod(onGestureHandlerStateChange, event);\n }\n };\n\n cancelPendingGestures(event: HammerInputExt) {\n for (const gesture of Object.values(this.pendingGestures)) {\n if (gesture && gesture.isGestureRunning) {\n gesture.hasGestureFailed = true;\n gesture.cancelEvent(event);\n }\n }\n }\n\n notifyPendingGestures() {\n for (const gesture of Object.values(this.pendingGestures)) {\n if (gesture) {\n gesture.onWaitingEnded(this);\n }\n }\n }\n\n // FIXME event is undefined in runtime when firstly invoked (see Draggable example), check other functions taking event as input\n onGestureEnded(event: HammerInputExt) {\n this.isGestureRunning = false;\n this.cancelPendingGestures(event);\n }\n\n forceInvalidate(event: HammerInputExt) {\n if (this.isGestureRunning) {\n this.hasGestureFailed = true;\n this.cancelEvent(event);\n }\n }\n\n cancelEvent(event: HammerInputExt) {\n this.notifyPendingGestures();\n this.sendEvent({\n ...event,\n eventType: Hammer.INPUT_CANCEL,\n isFinal: true,\n });\n this.onGestureEnded(event);\n }\n\n onRawEvent({ isFirst }: HammerInputExt) {\n if (isFirst) {\n this.hasGestureFailed = false;\n }\n }\n\n shouldUseTouchEvents(config: Config) {\n return (\n config.simultaneousHandlers?.some((handler) => handler.isNative) ?? false\n );\n }\n\n setView(ref: Parameters['0'], propsRef: any) {\n if (ref == null) {\n this.destroy();\n this.view = null;\n return;\n }\n\n // @ts-ignore window doesn't exist on global type as we don't want to use Node types\n const SUPPORTS_TOUCH = 'ontouchstart' in window;\n this.propsRef = propsRef;\n this.ref = ref;\n\n this.view = findNodeHandle(ref);\n\n // When the browser starts handling the gesture (e.g. scrolling), it sends a pointercancel event and stops\n // sending additional pointer events. This is not the case with touch events, so if the gesture is simultaneous\n // with a NativeGestureHandler, we need to check if touch events are supported and use them if possible.\n this.hammer =\n SUPPORTS_TOUCH && this.shouldUseTouchEvents(this.config)\n ? new Hammer.Manager(this.view as any, {\n inputClass: Hammer.TouchInput,\n })\n : new Hammer.Manager(this.view as any);\n\n this.oldState = State.UNDETERMINED;\n this.previousState = State.UNDETERMINED;\n this.lastSentState = null;\n\n const { NativeGestureClass } = this;\n // @ts-ignore TODO(TS)\n const gesture = new NativeGestureClass(this.getHammerConfig());\n this.hammer.add(gesture);\n\n this.hammer.on('hammer.input', (ev: HammerInput) => {\n if (!this.config.enabled) {\n this.hasGestureFailed = false;\n this.isGestureRunning = false;\n return;\n }\n\n this.onRawEvent(ev as unknown as HammerInputExt);\n\n // TODO: Bacon: Check against something other than null\n // The isFirst value is not called when the first rotation is calculated.\n if (this.initialRotation === null && ev.rotation !== 0) {\n this.initialRotation = ev.rotation;\n }\n if (ev.isFinal) {\n // in favor of a willFail otherwise the last frame of the gesture will be captured.\n setTimeout(() => {\n this.initialRotation = null;\n this.hasGestureFailed = false;\n });\n }\n });\n\n this.setupEvents();\n this.sync();\n }\n\n setupEvents() {\n // TODO(TS) Hammer types aren't exactly that what we get in runtime\n if (!this.isDiscrete) {\n this.hammer!.on(`${this.name}start`, (event: HammerInput) =>\n this.onStart(event as unknown as HammerInputExt)\n );\n this.hammer!.on(\n `${this.name}end ${this.name}cancel`,\n (event: HammerInput) => {\n this.onGestureEnded(event as unknown as HammerInputExt);\n }\n );\n }\n this.hammer!.on(this.name, (ev: HammerInput) =>\n this.onGestureActivated(ev as unknown as HammerInputExt)\n ); // TODO(TS) remove cast after https://github.com/DefinitelyTyped/DefinitelyTyped/pull/50438 is merged\n }\n\n onStart({ deltaX, deltaY, rotation }: HammerInputExt) {\n // Reset the state for the next gesture\n this.oldState = State.UNDETERMINED;\n this.previousState = State.UNDETERMINED;\n this.lastSentState = null;\n\n this.isGestureRunning = true;\n this.__initialX = deltaX;\n this.__initialY = deltaY;\n this.initialRotation = rotation;\n }\n\n onGestureActivated(ev: HammerInputExt) {\n this.sendEvent(ev);\n }\n\n onSuccess() {}\n\n _getPendingGestures() {\n if (Array.isArray(this.config.waitFor) && this.config.waitFor.length) {\n // Get the list of gestures that this gesture is still waiting for.\n // Use `=== false` in case a ref that isn't a gesture handler is used.\n const stillWaiting = this.config.waitFor.filter(\n ({ hasGestureFailed }) => hasGestureFailed === false\n );\n return stillWaiting;\n }\n return [];\n }\n\n getHammerConfig() {\n const pointers =\n this.config.minPointers === this.config.maxPointers\n ? this.config.minPointers\n : 0;\n return {\n pointers,\n };\n }\n\n sync = () => {\n const gesture = this.hammer!.get(this.name);\n if (!gesture) return;\n\n const enable = (recognizer: any, inputData: any) => {\n if (!this.config.enabled) {\n this.isGestureRunning = false;\n this.hasGestureFailed = false;\n return false;\n }\n\n // Prevent events before the system is ready.\n if (\n !inputData ||\n !recognizer.options ||\n typeof inputData.maxPointers === 'undefined'\n ) {\n return this.shouldEnableGestureOnSetup;\n }\n\n if (this.hasGestureFailed) {\n return false;\n }\n\n if (!this.isDiscrete) {\n if (this.isGestureRunning) {\n return true;\n }\n // The built-in hammer.js \"waitFor\" doesn't work across multiple views.\n // Only process if there are views to wait for.\n this._stillWaiting = this._getPendingGestures();\n // This gesture should continue waiting.\n if (this._stillWaiting.length) {\n // Check to see if one of the gestures you're waiting for has started.\n // If it has then the gesture should fail.\n for (const gesture of this._stillWaiting) {\n // When the target gesture has started, this gesture must force fail.\n if (!gesture.isDiscrete && gesture.isGestureRunning) {\n this.hasGestureFailed = true;\n this.isGestureRunning = false;\n return false;\n }\n }\n // This gesture shouldn't start until the others have finished.\n return false;\n }\n }\n\n // Use default behaviour\n if (!this.hasCustomActivationCriteria) {\n return true;\n }\n\n const deltaRotation =\n this.initialRotation == null\n ? 0\n : inputData.rotation - this.initialRotation;\n // @ts-ignore FIXME(TS)\n const { success, failed } = this.isGestureEnabledForEvent(\n this.getConfig(),\n recognizer,\n {\n ...inputData,\n deltaRotation,\n }\n );\n\n if (failed) {\n this.simulateCancelEvent(inputData);\n this.hasGestureFailed = true;\n }\n return success;\n };\n\n const params = this.getHammerConfig();\n // @ts-ignore FIXME(TS)\n gesture.set({ ...params, enable });\n };\n\n simulateCancelEvent(_inputData: any) {}\n\n // Validate the props\n ensureConfig(config: Config): Required {\n const props = { ...config };\n\n // TODO(TS) We use ! to assert that if property is present then value is not empty (null, undefined)\n if ('minDist' in config) {\n props.minDist = config.minDist;\n props.minDistSq = props.minDist! * props.minDist!;\n }\n if ('minVelocity' in config) {\n props.minVelocity = config.minVelocity;\n props.minVelocitySq = props.minVelocity! * props.minVelocity!;\n }\n if ('maxDist' in config) {\n props.maxDist = config.maxDist;\n props.maxDistSq = config.maxDist! * config.maxDist!;\n }\n if ('waitFor' in config) {\n props.waitFor = asArray(config.waitFor)\n .map(({ handlerTag }: { handlerTag: number }) =>\n NodeManager.getHandler(handlerTag)\n )\n .filter((v) => v);\n } else {\n props.waitFor = null;\n }\n if ('simultaneousHandlers' in config) {\n const shouldUseTouchEvents = this.shouldUseTouchEvents(this.config);\n props.simultaneousHandlers = asArray(config.simultaneousHandlers)\n .map((handler: number | GestureHandler) => {\n if (typeof handler === 'number') {\n return NodeManager.getHandler(handler);\n } else {\n return NodeManager.getHandler(handler.handlerTag);\n }\n })\n .filter((v) => v);\n\n if (shouldUseTouchEvents !== this.shouldUseTouchEvents(props)) {\n queueMicrotask(() => {\n // if the undelying event API needs to be changed, we need to unmount and mount\n // the hammer instance again.\n this.destroy();\n this.setView(this.ref, this.propsRef);\n });\n }\n } else {\n props.simultaneousHandlers = null;\n }\n\n const configProps = [\n 'minPointers',\n 'maxPointers',\n 'minDist',\n 'maxDist',\n 'maxDistSq',\n 'minVelocitySq',\n 'minDistSq',\n 'minVelocity',\n 'failOffsetXStart',\n 'failOffsetYStart',\n 'failOffsetXEnd',\n 'failOffsetYEnd',\n 'activeOffsetXStart',\n 'activeOffsetXEnd',\n 'activeOffsetYStart',\n 'activeOffsetYEnd',\n ] as const;\n configProps.forEach((prop: typeof configProps[number]) => {\n if (typeof props[prop] === 'undefined') {\n props[prop] = Number.NaN;\n }\n });\n return props as Required; // TODO(TS) how to convince TS that props are filled?\n }\n}\n\n// TODO(TS) investigate this method\n// Used for sending data to a callback or AnimatedEvent\nfunction invokeNullableMethod(\n method:\n | ((event: NativeEvent) => void)\n | { __getHandler: () => (event: NativeEvent) => void }\n | { __nodeConfig: { argMapping: any } },\n event: NativeEvent\n) {\n if (method) {\n if (typeof method === 'function') {\n method(event);\n } else {\n // For use with reanimated's AnimatedEvent\n if (\n '__getHandler' in method &&\n typeof method.__getHandler === 'function'\n ) {\n const handler = method.__getHandler();\n invokeNullableMethod(handler, event);\n } else {\n if ('__nodeConfig' in method) {\n const { argMapping } = method.__nodeConfig;\n if (Array.isArray(argMapping)) {\n for (const [index, [key, value]] of argMapping.entries()) {\n if (key in event.nativeEvent) {\n // @ts-ignore fix method type\n const nativeValue = event.nativeEvent[key];\n if (value && value.setValue) {\n // Reanimated API\n value.setValue(nativeValue);\n } else {\n // RN Animated API\n method.__nodeConfig.argMapping[index] = [key, nativeValue];\n }\n }\n }\n }\n }\n }\n }\n }\n}\n\nfunction asArray(value: T | T[]) {\n // TODO(TS) use config.waitFor type\n return value == null ? [] : Array.isArray(value) ? value : [value];\n}\n\nexport default GestureHandler;\n","import GestureHandler from './GestureHandler';\n\n/**\n * The base class for **Rotation** and **Pinch** gesture handlers.\n */\nabstract class IndiscreteGestureHandler extends GestureHandler {\n get shouldEnableGestureOnSetup() {\n return false;\n }\n\n updateGestureConfig({ minPointers = 2, maxPointers = 2, ...props }) {\n return super.updateGestureConfig({\n minPointers,\n maxPointers,\n ...props,\n });\n }\n\n isGestureEnabledForEvent(\n { minPointers, maxPointers }: any,\n _recognizer: any,\n { maxPointers: pointerLength }: any\n ) {\n if (pointerLength > maxPointers) {\n return { failed: true };\n }\n const validPointerCount = pointerLength >= minPointers;\n return {\n success: validPointerCount,\n };\n }\n}\nexport default IndiscreteGestureHandler;\n","/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\nimport Hammer from '@egjs/hammerjs';\n\nimport { State } from '../State';\nimport PressGestureHandler from './PressGestureHandler';\nimport { isnan, isValidNumber } from './utils';\nimport { Config } from './GestureHandler';\nimport { HammerInputNames } from './constants';\n\nclass LongPressGestureHandler extends PressGestureHandler {\n get minDurationMs(): number {\n // @ts-ignore FIXNE(TS)\n return isnan(this.config.minDurationMs) ? 251 : this.config.minDurationMs;\n }\n\n get maxDist() {\n // @ts-ignore FIXNE(TS)\n return isnan(this.config.maxDist) ? 9 : this.config.maxDist;\n }\n\n updateHasCustomActivationCriteria({ maxDistSq }: Config) {\n return !isValidNumber(maxDistSq);\n }\n\n getConfig() {\n if (!this.hasCustomActivationCriteria) {\n // Default config\n // If no params have been defined then this config should emulate the native gesture as closely as possible.\n return {\n shouldCancelWhenOutside: true,\n maxDistSq: 10,\n };\n }\n return this.config;\n }\n\n getHammerConfig() {\n return {\n ...super.getHammerConfig(),\n // threshold: this.maxDist,\n time: this.minDurationMs,\n };\n }\n\n getState(type: keyof typeof HammerInputNames) {\n return {\n [Hammer.INPUT_START]: State.ACTIVE,\n [Hammer.INPUT_MOVE]: State.ACTIVE,\n [Hammer.INPUT_END]: State.END,\n [Hammer.INPUT_CANCEL]: State.FAILED,\n }[type];\n }\n}\n\nexport default LongPressGestureHandler;\n","import DiscreteGestureHandler from './DiscreteGestureHandler';\nimport { HammerInputExt } from './GestureHandler';\nimport * as NodeManager from './NodeManager';\nimport PressGestureHandler from './PressGestureHandler';\nimport { TEST_MIN_IF_NOT_NAN, VEC_LEN_SQ } from './utils';\n\nclass NativeViewGestureHandler extends PressGestureHandler {\n get isNative() {\n return true;\n }\n\n onRawEvent(ev: HammerInputExt) {\n super.onRawEvent(ev);\n if (!ev.isFinal) {\n // if (this.ref instanceof ScrollView) {\n if (TEST_MIN_IF_NOT_NAN(VEC_LEN_SQ({ x: ev.deltaX, y: ev.deltaY }), 10)) {\n // @ts-ignore FIXME(TS) config type\n if (this.config.disallowInterruption) {\n const gestures = Object.values(NodeManager.getNodes()).filter(\n (gesture) => {\n const { handlerTag, view, isGestureRunning } = gesture;\n return (\n // Check if this gesture isn't self\n handlerTag !== this.handlerTag &&\n // Ensure the gesture needs to be cancelled\n isGestureRunning &&\n // ScrollView can cancel discrete gestures like taps and presses\n gesture instanceof DiscreteGestureHandler &&\n // Ensure a view exists and is a child of the current view\n view &&\n // @ts-ignore FIXME(TS) view type\n this.view.contains(view)\n );\n }\n );\n // Cancel all of the gestures that passed the filter\n for (const gesture of gestures) {\n // TODO: Bacon: Send some cached event.\n gesture.forceInvalidate(ev);\n }\n }\n }\n }\n }\n}\n\nexport default NativeViewGestureHandler;\n","import { ValueOf } from '../typeUtils';\nimport { HammerGestures } from '../RNGestureHandlerModule.web';\n\nconst gestures: Record<\n number,\n InstanceType>\n> = {};\n\nexport function getHandler(tag: number) {\n if (tag in gestures) {\n return gestures[tag];\n }\n\n throw new Error(`No handler for tag ${tag}`);\n}\n\nexport function createGestureHandler(\n handlerTag: number,\n handler: InstanceType>\n) {\n if (handlerTag in gestures) {\n throw new Error(`Handler with tag ${handlerTag} already exists`);\n }\n gestures[handlerTag] = handler;\n // @ts-ignore no types for web handlers yet\n gestures[handlerTag].handlerTag = handlerTag;\n}\n\nexport function dropGestureHandler(handlerTag: number) {\n // Since React 18, there are cases where componentWillUnmount gets called twice in a row\n // so skip this if the tag was already removed.\n if (!(handlerTag in gestures)) {\n return;\n }\n getHandler(handlerTag).destroy();\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete gestures[handlerTag];\n}\n\nexport function getNodes() {\n return { ...gestures };\n}\n","import Hammer from '@egjs/hammerjs';\n\nimport {\n EventMap,\n MULTI_FINGER_PAN_MAX_PINCH_THRESHOLD,\n MULTI_FINGER_PAN_MAX_ROTATION_THRESHOLD,\n} from './constants';\nimport DraggingGestureHandler from './DraggingGestureHandler';\nimport { isValidNumber, isnan, TEST_MIN_IF_NOT_NAN, VEC_LEN_SQ } from './utils';\nimport { State } from '../State';\n\nimport { Config, HammerInputExt } from './GestureHandler';\nclass PanGestureHandler extends DraggingGestureHandler {\n get name() {\n return 'pan';\n }\n\n get NativeGestureClass() {\n return Hammer.Pan;\n }\n\n getHammerConfig() {\n return {\n ...super.getHammerConfig(),\n direction: this.getDirection(),\n };\n }\n\n getState(type: keyof typeof EventMap) {\n const nextState = super.getState(type);\n // Ensure that the first state sent is `BEGAN` and not `ACTIVE`\n if (\n this.previousState === State.UNDETERMINED &&\n nextState === State.ACTIVE\n ) {\n return State.BEGAN;\n }\n return nextState;\n }\n\n getDirection() {\n const config = this.getConfig();\n const {\n activeOffsetXStart,\n activeOffsetXEnd,\n activeOffsetYStart,\n activeOffsetYEnd,\n minDist,\n } = config;\n let directions: number[] = [];\n let horizontalDirections = [];\n\n if (!isnan(minDist)) {\n return Hammer.DIRECTION_ALL;\n }\n\n if (!isnan(activeOffsetXStart)) {\n horizontalDirections.push(Hammer.DIRECTION_LEFT);\n }\n if (!isnan(activeOffsetXEnd)) {\n horizontalDirections.push(Hammer.DIRECTION_RIGHT);\n }\n if (horizontalDirections.length === 2) {\n horizontalDirections = [Hammer.DIRECTION_HORIZONTAL];\n }\n\n directions = directions.concat(horizontalDirections);\n let verticalDirections = [];\n\n if (!isnan(activeOffsetYStart)) {\n verticalDirections.push(Hammer.DIRECTION_UP);\n }\n if (!isnan(activeOffsetYEnd)) {\n verticalDirections.push(Hammer.DIRECTION_DOWN);\n }\n\n if (verticalDirections.length === 2) {\n verticalDirections = [Hammer.DIRECTION_VERTICAL];\n }\n\n directions = directions.concat(verticalDirections);\n\n if (!directions.length) {\n return Hammer.DIRECTION_NONE;\n }\n if (\n directions[0] === Hammer.DIRECTION_HORIZONTAL &&\n directions[1] === Hammer.DIRECTION_VERTICAL\n ) {\n return Hammer.DIRECTION_ALL;\n }\n if (horizontalDirections.length && verticalDirections.length) {\n return Hammer.DIRECTION_ALL;\n }\n\n return directions[0];\n }\n\n getConfig() {\n if (!this.hasCustomActivationCriteria) {\n // Default config\n // If no params have been defined then this config should emulate the native gesture as closely as possible.\n return {\n minDistSq: 10,\n };\n }\n return this.config;\n }\n\n shouldFailUnderCustomCriteria(\n { deltaX, deltaY }: HammerInputExt,\n criteria: any\n ) {\n return (\n (!isnan(criteria.failOffsetXStart) &&\n deltaX < criteria.failOffsetXStart) ||\n (!isnan(criteria.failOffsetXEnd) && deltaX > criteria.failOffsetXEnd) ||\n (!isnan(criteria.failOffsetYStart) &&\n deltaY < criteria.failOffsetYStart) ||\n (!isnan(criteria.failOffsetYEnd) && deltaY > criteria.failOffsetYEnd)\n );\n }\n\n shouldActivateUnderCustomCriteria(\n { deltaX, deltaY, velocity }: any,\n criteria: any\n ) {\n return (\n (!isnan(criteria.activeOffsetXStart) &&\n deltaX < criteria.activeOffsetXStart) ||\n (!isnan(criteria.activeOffsetXEnd) &&\n deltaX > criteria.activeOffsetXEnd) ||\n (!isnan(criteria.activeOffsetYStart) &&\n deltaY < criteria.activeOffsetYStart) ||\n (!isnan(criteria.activeOffsetYEnd) &&\n deltaY > criteria.activeOffsetYEnd) ||\n TEST_MIN_IF_NOT_NAN(\n VEC_LEN_SQ({ x: deltaX, y: deltaY }),\n criteria.minDistSq\n ) ||\n TEST_MIN_IF_NOT_NAN(velocity.x, criteria.minVelocityX) ||\n TEST_MIN_IF_NOT_NAN(velocity.y, criteria.minVelocityY) ||\n TEST_MIN_IF_NOT_NAN(VEC_LEN_SQ(velocity), criteria.minVelocitySq)\n );\n }\n\n shouldMultiFingerPanFail({\n pointerLength,\n scale,\n deltaRotation,\n }: {\n deltaRotation: number;\n pointerLength: number;\n scale: number;\n }) {\n if (pointerLength <= 1) {\n return false;\n }\n\n // Test if the pan had too much pinching or rotating.\n const deltaScale = Math.abs(scale - 1);\n const absDeltaRotation = Math.abs(deltaRotation);\n if (deltaScale > MULTI_FINGER_PAN_MAX_PINCH_THRESHOLD) {\n // > If the threshold doesn't seem right.\n // You can log the value which it failed at here:\n return true;\n }\n if (absDeltaRotation > MULTI_FINGER_PAN_MAX_ROTATION_THRESHOLD) {\n // > If the threshold doesn't seem right.\n // You can log the value which it failed at here:\n return true;\n }\n\n return false;\n }\n\n updateHasCustomActivationCriteria(\n criteria: Config & { minVelocityX?: number; minVelocityY?: number }\n ) {\n return (\n isValidNumber(criteria.minDistSq) ||\n isValidNumber(criteria.minVelocityX) ||\n isValidNumber(criteria.minVelocityY) ||\n isValidNumber(criteria.minVelocitySq) ||\n isValidNumber(criteria.activeOffsetXStart) ||\n isValidNumber(criteria.activeOffsetXEnd) ||\n isValidNumber(criteria.activeOffsetYStart) ||\n isValidNumber(criteria.activeOffsetYEnd)\n );\n }\n\n isGestureEnabledForEvent(\n props: any,\n _recognizer: any,\n inputData: HammerInputExt & { deltaRotation: number }\n ) {\n if (this.shouldFailUnderCustomCriteria(inputData, props)) {\n return { failed: true };\n }\n\n const velocity = { x: inputData.velocityX, y: inputData.velocityY };\n if (\n this.hasCustomActivationCriteria &&\n this.shouldActivateUnderCustomCriteria(\n { deltaX: inputData.deltaX, deltaY: inputData.deltaY, velocity },\n props\n )\n ) {\n if (\n this.shouldMultiFingerPanFail({\n pointerLength: inputData.maxPointers,\n scale: inputData.scale,\n deltaRotation: inputData.deltaRotation,\n })\n ) {\n return {\n failed: true,\n };\n }\n return { success: true };\n }\n return { success: false };\n }\n}\n\nexport default PanGestureHandler;\n","import Hammer from '@egjs/hammerjs';\nimport { HammerInputExt } from './GestureHandler';\n\nimport IndiscreteGestureHandler from './IndiscreteGestureHandler';\n\nclass PinchGestureHandler extends IndiscreteGestureHandler {\n get name() {\n return 'pinch';\n }\n\n get NativeGestureClass() {\n return Hammer.Pinch;\n }\n\n transformNativeEvent({ scale, velocity, center }: HammerInputExt) {\n return {\n focalX: center.x,\n focalY: center.y,\n velocity,\n scale,\n };\n }\n}\n\nexport default PinchGestureHandler;\n","import Hammer from '@egjs/hammerjs';\n\nimport { State } from '../State';\nimport {\n CONTENT_TOUCHES_DELAY,\n CONTENT_TOUCHES_QUICK_TAP_END_DELAY,\n HammerInputNames,\n} from './constants';\nimport DiscreteGestureHandler from './DiscreteGestureHandler';\nimport { Config, HammerInputExt } from './GestureHandler';\nimport { fireAfterInterval, isValidNumber, isnan } from './utils';\n\nclass PressGestureHandler extends DiscreteGestureHandler {\n private visualFeedbackTimer: any;\n private initialEvent: HammerInputExt | null = null;\n get name() {\n return 'press';\n }\n\n get minDurationMs() {\n // @ts-ignore FIXME(TS)\n return isnan(this.config.minDurationMs) ? 5 : this.config.minDurationMs;\n }\n\n get maxDist() {\n return isnan(this.config.maxDist) ? 9 : this.config.maxDist;\n }\n\n get NativeGestureClass() {\n return Hammer.Press;\n }\n\n shouldDelayTouches = true;\n\n simulateCancelEvent(inputData: HammerInputExt) {\n // Long press never starts so we can't rely on the running event boolean.\n this.hasGestureFailed = true;\n this.cancelEvent(inputData);\n }\n\n updateHasCustomActivationCriteria({\n shouldCancelWhenOutside,\n maxDistSq,\n }: Config & { shouldCancelWhenOutside: boolean }) {\n return shouldCancelWhenOutside || !isValidNumber(maxDistSq);\n }\n\n getState(type: keyof typeof HammerInputNames): State {\n return {\n [Hammer.INPUT_START]: State.BEGAN,\n [Hammer.INPUT_MOVE]: State.ACTIVE,\n [Hammer.INPUT_END]: State.END,\n [Hammer.INPUT_CANCEL]: State.CANCELLED,\n }[type];\n }\n\n getConfig() {\n if (!this.hasCustomActivationCriteria) {\n // Default config\n // If no params have been defined then this config should emulate the native gesture as closely as possible.\n return {\n shouldCancelWhenOutside: true,\n maxDistSq: 10,\n };\n }\n return this.config;\n }\n\n getHammerConfig() {\n return {\n ...super.getHammerConfig(),\n // threshold: this.maxDist,\n time: this.minDurationMs,\n };\n }\n\n onGestureActivated(ev: HammerInputExt) {\n this.onGestureStart(ev);\n }\n\n shouldDelayTouchForEvent({ pointerType }: HammerInputExt) {\n // Don't disable event for mouse input\n return this.shouldDelayTouches && pointerType === 'touch';\n }\n\n onGestureStart(ev: HammerInputExt) {\n this.isGestureRunning = true;\n clearTimeout(this.visualFeedbackTimer);\n this.initialEvent = ev;\n this.visualFeedbackTimer = fireAfterInterval(() => {\n this.sendGestureStartedEvent(this.initialEvent as HammerInputExt);\n this.initialEvent = null;\n }, this.shouldDelayTouchForEvent(ev) && CONTENT_TOUCHES_DELAY);\n }\n\n sendGestureStartedEvent(ev: HammerInputExt) {\n clearTimeout(this.visualFeedbackTimer);\n this.visualFeedbackTimer = null;\n this.sendEvent({\n ...ev,\n eventType: Hammer.INPUT_MOVE,\n isFirst: true,\n });\n }\n\n forceInvalidate(event: HammerInputExt) {\n super.forceInvalidate(event);\n clearTimeout(this.visualFeedbackTimer);\n this.visualFeedbackTimer = null;\n this.initialEvent = null;\n }\n\n onRawEvent(ev: HammerInputExt) {\n super.onRawEvent(ev);\n if (this.isGestureRunning) {\n if (ev.isFinal) {\n let timeout;\n if (this.visualFeedbackTimer) {\n // Aesthetic timing for a quick tap.\n // We haven't activated the tap right away to emulate iOS `delaysContentTouches`\n // Now we must send the initial activation event and wait a set amount of time before firing the end event.\n timeout = CONTENT_TOUCHES_QUICK_TAP_END_DELAY;\n this.sendGestureStartedEvent(this.initialEvent as HammerInputExt);\n this.initialEvent = null;\n }\n fireAfterInterval(() => {\n this.sendEvent({\n ...ev,\n eventType: Hammer.INPUT_END,\n isFinal: true,\n });\n // @ts-ignore -- this should explicitly support undefined\n this.onGestureEnded();\n }, timeout);\n } else {\n this.sendEvent({\n ...ev,\n eventType: Hammer.INPUT_MOVE,\n isFinal: false,\n });\n }\n }\n }\n\n updateGestureConfig({\n shouldActivateOnStart = false,\n disallowInterruption = false,\n shouldCancelWhenOutside = true,\n minDurationMs = Number.NaN,\n maxDist = Number.NaN,\n minPointers = 1,\n maxPointers = 1,\n ...props\n }) {\n return super.updateGestureConfig({\n shouldActivateOnStart,\n disallowInterruption,\n shouldCancelWhenOutside,\n minDurationMs,\n maxDist,\n minPointers,\n maxPointers,\n ...props,\n });\n }\n}\nexport default PressGestureHandler;\n","import Hammer from '@egjs/hammerjs';\n\nimport { DEG_RAD } from './constants';\nimport { HammerInputExt } from './GestureHandler';\nimport IndiscreteGestureHandler from './IndiscreteGestureHandler';\n\nclass RotationGestureHandler extends IndiscreteGestureHandler {\n get name() {\n return 'rotate';\n }\n\n get NativeGestureClass() {\n return Hammer.Rotate;\n }\n\n transformNativeEvent({ rotation, velocity, center }: HammerInputExt) {\n return {\n rotation: (rotation - (this.initialRotation ?? 0)) * DEG_RAD,\n anchorX: center.x,\n anchorY: center.y,\n velocity,\n };\n }\n}\nexport default RotationGestureHandler;\n","import Hammer from '@egjs/hammerjs';\n\nimport DiscreteGestureHandler from './DiscreteGestureHandler';\nimport { HammerInputExt } from './GestureHandler';\nimport { isnan } from './utils';\n\nclass TapGestureHandler extends DiscreteGestureHandler {\n private _shouldFireEndEvent: HammerInputExt | null = null;\n private _timer: any;\n private _multiTapTimer: any; // TODO unused?\n get name() {\n return 'tap';\n }\n\n get NativeGestureClass() {\n return Hammer.Tap;\n }\n\n get maxDelayMs() {\n // @ts-ignore TODO(TS) trace down config\n return isnan(this.config.maxDelayMs) ? 300 : this.config.maxDelayMs;\n }\n\n simulateCancelEvent(inputData: HammerInputExt) {\n if (this.isGestureRunning) {\n this.cancelEvent(inputData);\n }\n }\n\n onGestureActivated(ev: HammerInputExt) {\n if (this.isGestureRunning) {\n this.onSuccessfulTap(ev);\n }\n }\n\n onSuccessfulTap = (ev: HammerInputExt) => {\n if (this._getPendingGestures().length) {\n this._shouldFireEndEvent = ev;\n return;\n }\n if (ev.eventType === Hammer.INPUT_END) {\n this.sendEvent({ ...ev, eventType: Hammer.INPUT_MOVE });\n }\n // When handler gets activated it will turn into State.END immediately.\n this.sendEvent({ ...ev, isFinal: true });\n this.onGestureEnded(ev);\n };\n\n onRawEvent(ev: HammerInput) {\n super.onRawEvent(ev);\n\n // Attempt to create a touch-down event by checking if a valid tap hasn't started yet, then validating the input.\n if (\n !this.hasGestureFailed &&\n !this.isGestureRunning &&\n // Prevent multi-pointer events from misfiring.\n !ev.isFinal\n ) {\n // Tap Gesture start event\n const gesture = this.hammer!.get(this.name);\n // @ts-ignore TODO(TS) trace down config\n if (gesture.options.enable(gesture, ev)) {\n clearTimeout(this._multiTapTimer);\n\n this.onStart(ev);\n this.sendEvent(ev);\n }\n }\n if (ev.isFinal && ev.maxPointers > 1) {\n setTimeout(() => {\n // Handle case where one finger presses slightly\n // after the first finger on a multi-tap event\n if (this.isGestureRunning) {\n this.cancelEvent(ev);\n }\n });\n }\n\n if (this.hasGestureFailed) {\n return;\n }\n // Hammer doesn't send a `cancel` event for taps.\n // Manually fail the event.\n if (ev.isFinal) {\n // Handle case where one finger presses slightly\n // after the first finger on a multi-tap event\n if (ev.maxPointers > 1) {\n setTimeout(() => {\n if (this.isGestureRunning) {\n this.cancelEvent(ev);\n }\n });\n }\n\n // Clear last timer\n clearTimeout(this._timer);\n // Create time out for multi-taps.\n this._timer = setTimeout(() => {\n this.hasGestureFailed = true;\n this.cancelEvent(ev);\n }, this.maxDelayMs);\n } else if (!this.hasGestureFailed && !this.isGestureRunning) {\n // Tap Gesture start event\n const gesture = this.hammer!.get(this.name);\n // @ts-ignore TODO(TS) trace down config\n if (gesture.options.enable(gesture, ev)) {\n clearTimeout(this._multiTapTimer);\n\n this.onStart(ev);\n this.sendEvent(ev);\n }\n }\n }\n\n getHammerConfig() {\n return {\n ...super.getHammerConfig(),\n event: this.name,\n // @ts-ignore TODO(TS) trace down config\n taps: isnan(this.config.numberOfTaps) ? 1 : this.config.numberOfTaps,\n interval: this.maxDelayMs,\n time:\n // @ts-ignore TODO(TS) trace down config\n isnan(this.config.maxDurationMs) || this.config.maxDurationMs == null\n ? 250\n : // @ts-ignore TODO(TS) trace down config\n this.config.maxDurationMs,\n };\n }\n\n updateGestureConfig({\n shouldCancelWhenOutside = true,\n maxDeltaX = Number.NaN,\n maxDeltaY = Number.NaN,\n numberOfTaps = 1,\n minDurationMs = 525,\n maxDelayMs = Number.NaN,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars -- TODO possibly forgotten to use in updateGestureConfig?\n maxDurationMs = Number.NaN,\n maxDist = 2,\n minPointers = 1,\n maxPointers = 1,\n ...props\n }) {\n return super.updateGestureConfig({\n shouldCancelWhenOutside,\n numberOfTaps,\n maxDeltaX,\n maxDeltaY,\n minDurationMs,\n maxDelayMs,\n maxDist,\n minPointers,\n maxPointers,\n ...props,\n });\n }\n\n onGestureEnded(...props: any) {\n clearTimeout(this._timer);\n // @ts-ignore TODO(TS) check how onGestureEnded works\n super.onGestureEnded(...props);\n }\n\n onWaitingEnded(_gesture: any) {\n if (this._shouldFireEndEvent) {\n this.onSuccessfulTap(this._shouldFireEndEvent);\n this._shouldFireEndEvent = null;\n }\n }\n}\nexport default TapGestureHandler;\n","import Hammer from '@egjs/hammerjs';\n\nimport { State } from '../State';\n\nexport const CONTENT_TOUCHES_DELAY = 240;\nexport const CONTENT_TOUCHES_QUICK_TAP_END_DELAY = 50;\nexport const MULTI_FINGER_PAN_MAX_PINCH_THRESHOLD = 0.1;\nexport const MULTI_FINGER_PAN_MAX_ROTATION_THRESHOLD = 7;\nexport const DEG_RAD = Math.PI / 180;\n\n// Map Hammer values to RNGH\nexport const EventMap = {\n [Hammer.INPUT_START]: State.BEGAN,\n [Hammer.INPUT_MOVE]: State.ACTIVE,\n [Hammer.INPUT_END]: State.END,\n [Hammer.INPUT_CANCEL]: State.FAILED,\n} as const;\n\nexport const Direction = {\n RIGHT: 1,\n LEFT: 2,\n UP: 4,\n DOWN: 8,\n};\n\nexport const DirectionMap = {\n [Hammer.DIRECTION_RIGHT]: Direction.RIGHT,\n [Hammer.DIRECTION_LEFT]: Direction.LEFT,\n [Hammer.DIRECTION_UP]: Direction.UP,\n [Hammer.DIRECTION_DOWN]: Direction.DOWN,\n};\n\nexport const HammerInputNames = {\n [Hammer.INPUT_START]: 'START',\n [Hammer.INPUT_MOVE]: 'MOVE',\n [Hammer.INPUT_END]: 'END',\n [Hammer.INPUT_CANCEL]: 'CANCEL',\n};\nexport const HammerDirectionNames = {\n [Hammer.DIRECTION_HORIZONTAL]: 'HORIZONTAL',\n [Hammer.DIRECTION_UP]: 'UP',\n [Hammer.DIRECTION_DOWN]: 'DOWN',\n [Hammer.DIRECTION_VERTICAL]: 'VERTICAL',\n [Hammer.DIRECTION_NONE]: 'NONE',\n [Hammer.DIRECTION_ALL]: 'ALL',\n [Hammer.DIRECTION_RIGHT]: 'RIGHT',\n [Hammer.DIRECTION_LEFT]: 'LEFT',\n};\n","// TODO(TS) remove if not necessary after rewrite\nexport const isnan = (v: unknown) => Number.isNaN(v);\n\n// TODO(TS) remove if not necessary after rewrite\nexport const isValidNumber = (v: unknown) =>\n typeof v === 'number' && !Number.isNaN(v);\n\nexport const TEST_MIN_IF_NOT_NAN = (value: number, limit: number): boolean =>\n !isnan(limit) &&\n ((limit < 0 && value <= limit) || (limit >= 0 && value >= limit));\nexport const VEC_LEN_SQ = ({ x = 0, y = 0 } = {}) => x * x + y * y;\nexport const TEST_MAX_IF_NOT_NAN = (value: number, max: number) =>\n !isnan(max) && ((max < 0 && value < max) || (max >= 0 && value > max));\n\nexport function fireAfterInterval(\n method: () => void,\n interval?: number | boolean\n) {\n if (!interval) {\n method();\n return null;\n }\n return setTimeout(() => method(), interval as number);\n}\n","import React from \"react\";\nimport { Platform } from \"react-native\";\n\nexport function DateTimePickerModal() {\n React.useEffect(() => {\n console.warn(`DateTimePicker is not supported on: ${Platform.OS}`);\n }, []);\n return null;\n}\n","import { DateTimePickerModal } from \"./DateTimePickerModal\";\n\nexport default DateTimePickerModal;\n\nexport * from \"./DateTimePickerModal\";\n","'use strict';\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport {\n View,\n Modal,\n Text,\n FlatList,\n ScrollView,\n TouchableOpacity,\n TouchableWithoutFeedback,\n} from 'react-native';\n\nimport styles from './style';\n\nlet componentIndex = 0;\n\nconst propTypes = {\n data: PropTypes.array,\n onChange: PropTypes.func,\n onModalOpen: PropTypes.func,\n onModalClose: PropTypes.func,\n keyExtractor: PropTypes.func,\n labelExtractor: PropTypes.func,\n visible: PropTypes.bool,\n closeOnChange: PropTypes.bool,\n initValue: PropTypes.string,\n listType: PropTypes.oneOf(['SCROLLVIEW', 'FLATLIST']),\n animationType: PropTypes.oneOf(['none', 'slide', 'fade']),\n style: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),\n selectStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),\n selectTextStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),\n optionStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),\n optionTextStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),\n optionContainerStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),\n sectionStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),\n childrenContainerStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),\n touchableStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),\n touchableActiveOpacity: PropTypes.number,\n sectionTextStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),\n selectedItemTextStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),\n cancelContainerStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),\n cancelStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),\n cancelTextStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),\n overlayStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),\n initValueTextStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),\n cancelText: PropTypes.string,\n disabled: PropTypes.bool,\n supportedOrientations: PropTypes.arrayOf(\n PropTypes.oneOf([\n 'portrait',\n 'portrait-upside-down',\n 'landscape',\n 'landscape-left',\n 'landscape-right',\n ]),\n ),\n keyboardShouldPersistTaps: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),\n backdropPressToClose: PropTypes.bool,\n openButtonContainerAccessible: PropTypes.bool,\n listItemAccessible: PropTypes.bool,\n cancelButtonAccessible: PropTypes.bool,\n scrollViewAccessible: PropTypes.bool,\n scrollViewAccessibilityLabel: PropTypes.string,\n cancelButtonAccessibilityLabel: PropTypes.string,\n passThruProps: PropTypes.object,\n selectTextPassThruProps: PropTypes.object,\n optionTextPassThruProps: PropTypes.object,\n cancelTextPassThruProps: PropTypes.object,\n scrollViewPassThruProps: PropTypes.object,\n modalOpenerHitSlop: PropTypes.object,\n customSelector: PropTypes.node,\n selectedKey: PropTypes.any,\n enableShortPress: PropTypes.bool,\n enableLongPress: PropTypes.bool,\n optionsTestIDPrefix: PropTypes.string,\n header: PropTypes.node,\n onEndReached: PropTypes.func,\n};\n\nconst defaultProps = {\n data: [],\n onChange: () => {},\n onModalOpen: () => {},\n onModalClose: () => {},\n keyExtractor: (item) => item && item.key,\n labelExtractor: (item) => item && item.label,\n componentExtractor: (item) => item && item.component,\n listType: 'SCROLLVIEW',\n visible: false,\n closeOnChange: true,\n initValue: 'Select me!',\n animationType: 'slide',\n style: {},\n selectStyle: {},\n selectTextStyle: {},\n optionStyle: {},\n optionTextStyle: {},\n optionContainerStyle: {},\n sectionStyle: {},\n childrenContainerStyle: {},\n touchableStyle: {},\n touchableActiveOpacity: 0.2,\n sectionTextStyle: {},\n selectedItemTextStyle: {},\n cancelContainerStyle: {},\n cancelStyle: {},\n cancelTextStyle: {},\n overlayStyle: {},\n initValueTextStyle: {},\n cancelText: 'cancel',\n disabled: false,\n supportedOrientations: ['portrait', 'landscape'],\n keyboardShouldPersistTaps: 'always',\n backdropPressToClose: false,\n openButtonContainerAccessible: false,\n listItemAccessible: false,\n cancelButtonAccessible: false,\n scrollViewAccessible: false,\n scrollViewAccessibilityLabel: \"\",\n cancelButtonAccessibilityLabel: \"\",\n passThruProps: {},\n selectTextPassThruProps: {},\n optionTextPassThruProps: {},\n cancelTextPassThruProps: {},\n scrollViewPassThruProps: {},\n modalOpenerHitSlop: {top: 0, bottom: 0, left: 0, right: 0},\n customSelector: undefined,\n selectedKey: '',\n enableShortPress: true,\n enableLongPress: false,\n optionsTestIDPrefix: 'default',\n header: undefined,\n onEndReached: undefined,\n};\n\nexport default class ModalSelector extends React.Component {\n\n constructor(props) {\n super(props);\n let selectedItem = this.validateSelectedKey(props.selectedKey);\n this.state = {\n modalVisible: props.visible,\n selected: selectedItem.label,\n cancelText: props.cancelText,\n changedItem: selectedItem.key,\n };\n }\n\n componentDidUpdate(prevProps, prevState) {\n let newState = {};\n let doUpdate = false;\n if (prevProps.initValue !== this.props.initValue) {\n newState.selected = this.props.initValue;\n doUpdate = true;\n }\n if (prevProps.visible !== this.props.visible) {\n newState.modalVisible = this.props.visible;\n doUpdate = true;\n }\n if (prevProps.selectedKey !== this.props.selectedKey || prevProps.data !== this.props.data) {\n let selectedItem = this.validateSelectedKey(this.props.selectedKey);\n newState.selected = selectedItem.label;\n newState.changedItem = selectedItem.key;\n doUpdate = true;\n }\n if (doUpdate) {\n this.setState(newState);\n }\n }\n\n validateSelectedKey = (key) => {\n let selectedItem = this.props.data.filter((item) => this.props.keyExtractor(item) === key);\n let selectedLabel = selectedItem.length > 0 ? this.props.labelExtractor(selectedItem[0]) : this.props.initValue;\n let selectedKey = selectedItem.length > 0 ? key : undefined;\n return {label: selectedLabel, key: selectedKey}\n }\n\n onChange = (item) => {\n const key = this.props.keyExtractor(item);\n if (!item || key == null) { // == coercion\n return;\n }\n this.props.onChange(item);\n this.setState({ selected: this.props.labelExtractor(item), changedItem: item }, () => {\n if (this.props.closeOnChange)\n this.close(item);\n });\n }\n\n getSelectedItem() {\n return this.state.changedItem;\n }\n\n close = (item) => {\n this.props.onModalClose(item);\n this.setState({\n modalVisible: false,\n });\n }\n\n open = (params = {}) => {\n if (!params.longPress && !this.props.enableShortPress) {\n return;\n }\n if (params.longPress && !this.props.enableLongPress) {\n return;\n }\n this.props.onModalOpen(params);\n this.setState({\n modalVisible: true,\n changedItem: undefined,\n });\n }\n\n renderSection = (section) => {\n const optionComponent = this.props.componentExtractor(section);\n let component = optionComponent || (\n {this.props.labelExtractor(section)}\n );\n\n return (\n \n {component}\n \n );\n }\n\n renderOption = (option, isLastItem, isFirstItem) => {\n const optionComponent = this.props.componentExtractor(option);\n const optionLabel = this.props.labelExtractor(option);\n const isSelectedItem = optionLabel === this.state.selected;\n\n let component = optionComponent || (\n \n {optionLabel}\n \n );\n\n return (\n this.onChange(option)}\n activeOpacity={this.props.touchableActiveOpacity}\n accessible={this.props.listItemAccessible}\n accessibilityLabel={option.accessibilityLabel || undefined}\n importantForAccessibility={isFirstItem ? 'yes' : 'no'}\n {...this.props.passThruProps}\n >\n \n {component}\n \n );\n }\n\n renderFlatlistOption = ({ item, index, separators }) => {\n if (item.section) {\n return this.renderSection(item);\n }\n const numItems = this.props.data.length;\n return this.renderOption(item, index === (numItems - 1), index === 0);\n }\n\n renderOptionList = () => {\n const {\n data,\n listType,\n backdropPressToClose,\n scrollViewPassThruProps,\n overlayStyle,\n optionContainerStyle,\n keyboardShouldPersistTaps,\n scrollViewAccessible,\n scrollViewAccessibilityLabel,\n cancelContainerStyle,\n touchableActiveOpacity,\n cancelButtonAccessible,\n cancelButtonAccessibilityLabel,\n cancelStyle,\n cancelTextStyle,\n cancelText,\n header,\n } = this.props;\n\n let options = data.map((item, index) => {\n if (item.section) {\n return this.renderSection(item);\n }\n return this.renderOption(item, index === data.length - 1, index === 0);\n });\n\n let Overlay = View;\n let overlayProps = {\n style: {flex: 1},\n };\n // Some RN versions have a bug here, so making the property opt-in works around this problem\n if (backdropPressToClose) {\n Overlay = TouchableWithoutFeedback;\n overlayProps = {\n key: `modalSelector${componentIndex++}`,\n accessible: false,\n onPress: this.close,\n };\n }\n\n const optionsContainerStyle = {paddingHorizontal: 10};\n if (scrollViewPassThruProps && scrollViewPassThruProps.horizontal) {\n optionsContainerStyle.flexDirection = 'row';\n }\n\n return (\n \n \n \n {header}\n {listType === 'FLATLIST'?\n \n :\n \n \n {options}\n \n \n }\n \n \n \n \n {cancelText}\n \n \n \n \n \n );\n }\n\n renderChildren = () => {\n\n if(this.props.children) {\n return this.props.children;\n }\n let initSelectStyle = this.props.initValue === this.state.selected ?\n [styles.initValueTextStyle, this.props.initValueTextStyle] : [styles.selectTextStyle, this.props.selectTextStyle];\n return (\n \n {this.state.selected}\n \n );\n }\n\n render() {\n\n const dp = (\n this.model = element}\n supportedOrientations={this.props.supportedOrientations}\n visible={this.state.modalVisible}\n onRequestClose={this.close}\n animationType={this.props.animationType}\n onDismiss={() => this.state.changedItem && this.props.onChange(this.state.changedItem)}\n >\n {this.renderOptionList()}\n \n );\n\n return (\n \n {dp}\n {this.props.customSelector ?\n this.props.customSelector\n :\n this.open({longPress: true})}\n disabled={this.props.disabled}\n accessible={this.props.openButtonContainerAccessible}\n >\n \n {this.renderChildren()}\n \n \n }\n \n );\n }\n}\n\nModalSelector.propTypes = propTypes;\nModalSelector.defaultProps = defaultProps;\n","'use strict';\n\nimport { StyleSheet } from 'react-native';\n\nconst PADDING = 8;\nconst BORDER_RADIUS = 5;\nconst FONT_SIZE = 16;\nconst HIGHLIGHT_COLOR = 'rgba(0,118,255,0.9)';\n\nexport default StyleSheet.create({\n\n overlayStyle: {\n flex: 1,\n padding: '5%',\n justifyContent: 'center',\n backgroundColor: 'rgba(0,0,0,0.7)',\n },\n\n optionContainer: {\n borderRadius: BORDER_RADIUS,\n flexShrink: 1,\n marginBottom: 8,\n padding: PADDING,\n backgroundColor: 'rgba(255,255,255,0.8)',\n },\n\n cancelContainer: {\n alignSelf: 'stretch',\n },\n\n selectStyle: {\n borderColor: '#ccc',\n borderWidth: 1,\n padding: PADDING,\n borderRadius: BORDER_RADIUS,\n },\n\n selectTextStyle: {\n textAlign: 'center',\n color: '#333',\n fontSize: FONT_SIZE,\n },\n\n cancelStyle: {\n borderRadius: BORDER_RADIUS,\n backgroundColor: 'rgba(255,255,255,0.8)',\n padding: PADDING,\n },\n\n cancelTextStyle: {\n textAlign: 'center',\n color: '#333',\n fontSize: FONT_SIZE,\n },\n\n optionStyle: {\n padding: PADDING,\n borderBottomWidth: 1,\n borderBottomColor: '#ccc',\n },\n\n optionTextStyle: {\n textAlign: 'center',\n fontSize: FONT_SIZE,\n color: HIGHLIGHT_COLOR,\n },\n\n sectionStyle: {\n padding: PADDING * 2,\n borderBottomWidth: 1,\n borderBottomColor: '#ccc',\n },\n\n sectionTextStyle: {\n textAlign: 'center',\n fontSize: FONT_SIZE,\n },\n\n initValueTextStyle: {\n textAlign: 'center',\n fontSize: FONT_SIZE,\n color: '#d3d3d3',\n },\n});\n","import type { Extrapolate as _Extrapolate } from './reanimated2/interpolateColor';\nimport type { SharedValue as _SharedValue } from './reanimated2/commonTypes';\nimport type { DerivedValue as _DerivedValue } from './reanimated2/hook/useDerivedValue';\nimport type {\n TransformStyleTypes as _TransformStyleTypes,\n Adaptable as _Adaptable,\n AdaptTransforms as _AdaptTransforms,\n AnimatedTransform as _AnimatedTransform,\n AnimateStyle as _AnimateStyle,\n StylesOrDefault as _StylesOrDefault,\n AnimateProps as _AnimateProps,\n} from './reanimated2/helperTypes';\nimport type { EasingFunction as _EasingFunction } from './reanimated2/Easing';\n\nimport type { AnimatedScrollViewProps as _AnimatedScrollViewProps } from './reanimated2/component/ScrollView';\nimport type { FlatListPropsWithLayout as _FlatListPropsWithLayout } from './reanimated2/component/FlatList';\n\nexport { default as createAnimatedComponent } from './createAnimatedComponent/createAnimatedComponent';\nexport { AnimatedText as Text } from './reanimated2/component/Text';\nexport { AnimatedView as View } from './reanimated2/component/View';\nexport { AnimatedScrollView as ScrollView } from './reanimated2/component/ScrollView';\nexport { AnimatedImage as Image } from './reanimated2/component/Image';\nexport { ReanimatedFlatList as FlatList } from './reanimated2/component/FlatList';\nexport {\n addWhitelistedNativeProps,\n addWhitelistedUIProps,\n} from './ConfigHelper';\n/**\n * @deprecated Please import `Extrapolate` directly from `react-native-reanimated` instead of `Animated` namespace.\n */\nexport type Extrapolate = typeof _Extrapolate;\n/**\n * @deprecated Please import `SharedValue` directly from `react-native-reanimated` instead of `Animated` namespace.\n */\n\nexport type SharedValue = _SharedValue;\n/**\n * @deprecated Please import `DerivedValue` directly from `react-native-reanimated` instead of `Animated` namespace.\n */\nexport type DerivedValue = _DerivedValue;\n/**\n * @deprecated Please import `Adaptable` directly from `react-native-reanimated` instead of `Animated` namespace.\n */\nexport type Adaptable = _Adaptable;\n/**\n * @deprecated Please import `TransformStyleTypes` directly from `react-native-reanimated` instead of `Animated` namespace.\n * */\nexport type TransformStyleTypes = _TransformStyleTypes;\n/**\n * @deprecated Please import `AdaptTransforms` directly from `react-native-reanimated` instead of `Animated` namespace.\n * */\nexport type AdaptTransforms = _AdaptTransforms;\n/**\n * @deprecated Please import `AnimatedTransform` directly from `react-native-reanimated` instead of `Animated` namespace.\n */\nexport type AnimatedTransform = _AnimatedTransform;\n/**\n * @deprecated Please import `AnimateStyle` directly from `react-native-reanimated` instead of `Animated` namespace.\n * */\nexport type AnimateStyle = _AnimateStyle;\n/**\n * @deprecated Please import `StylesOrDefault` directly from `react-native-reanimated` instead of `Animated` namespace.\n * */\nexport type StylesOrDefault = _StylesOrDefault;\n/**\n * @deprecated Please import `AnimateProps` directly from `react-native-reanimated` instead of `Animated` namespace.\n * */\nexport type AnimateProps

= _AnimateProps

;\n/**\n * @deprecated Please import `EasingFunction` directly from `react-native-reanimated` instead of `Animated` namespace.\n * */\nexport type EasingFunction = _EasingFunction;\n/**\n * @deprecated Please import `AnimatedScrollViewProps` directly from `react-native-reanimated` instead of `Animated` namespace.\n * */\nexport type AnimatedScrollViewProps = _AnimatedScrollViewProps;\n/**\n * @deprecated Please import `FlatListPropsWithLayout` directly from `react-native-reanimated` instead of `Animated` namespace.\n * */\nexport type FlatListPropsWithLayout = _FlatListPropsWithLayout;\n","import { configureProps as jsiConfigureProps } from './reanimated2/core';\n\n/**\n * Styles allowed to be direcly updated in UI thread\n */\nlet UI_THREAD_PROPS_WHITELIST: Record = {\n opacity: true,\n transform: true,\n /* colors */\n backgroundColor: true,\n borderRightColor: true,\n borderBottomColor: true,\n borderColor: true,\n borderEndColor: true,\n borderLeftColor: true,\n borderStartColor: true,\n borderTopColor: true,\n /* ios styles */\n shadowOpacity: true,\n shadowRadius: true,\n /* legacy android transform properties */\n scaleX: true,\n scaleY: true,\n translateX: true,\n translateY: true,\n};\n\n/**\n * Whitelist of view props that can be updated in native thread via UIManagerModule\n */\nlet NATIVE_THREAD_PROPS_WHITELIST: Record = {\n borderBottomWidth: true,\n borderEndWidth: true,\n borderLeftWidth: true,\n borderRightWidth: true,\n borderStartWidth: true,\n borderTopWidth: true,\n borderWidth: true,\n bottom: true,\n flex: true,\n flexGrow: true,\n flexShrink: true,\n height: true,\n left: true,\n margin: true,\n marginBottom: true,\n marginEnd: true,\n marginHorizontal: true,\n marginLeft: true,\n marginRight: true,\n marginStart: true,\n marginTop: true,\n marginVertical: true,\n maxHeight: true,\n maxWidth: true,\n minHeight: true,\n minWidth: true,\n padding: true,\n paddingBottom: true,\n paddingEnd: true,\n paddingHorizontal: true,\n paddingLeft: true,\n paddingRight: true,\n paddingStart: true,\n paddingTop: true,\n paddingVertical: true,\n right: true,\n start: true,\n top: true,\n width: true,\n zIndex: true,\n borderBottomEndRadius: true,\n borderBottomLeftRadius: true,\n borderBottomRightRadius: true,\n borderBottomStartRadius: true,\n borderRadius: true,\n borderTopEndRadius: true,\n borderTopLeftRadius: true,\n borderTopRightRadius: true,\n borderTopStartRadius: true,\n elevation: true,\n fontSize: true,\n lineHeight: true,\n textShadowRadius: true,\n letterSpacing: true,\n aspectRatio: true,\n columnGap: true, // iOS only\n end: true, // number or string\n flexBasis: true, // number or string\n gap: true,\n rowGap: true,\n /* strings */\n display: true,\n backfaceVisibility: true,\n overflow: true,\n resizeMode: true,\n fontStyle: true,\n fontWeight: true,\n textAlign: true,\n textDecorationLine: true,\n fontFamily: true,\n textAlignVertical: true,\n fontVariant: true,\n textDecorationStyle: true,\n textTransform: true,\n writingDirection: true,\n alignContent: true,\n alignItems: true,\n alignSelf: true,\n direction: true, // iOS only\n flexDirection: true,\n flexWrap: true,\n justifyContent: true,\n position: true,\n /* text color */\n color: true,\n tintColor: true,\n shadowColor: true,\n placeholderTextColor: true,\n};\n\nfunction configureProps(): void {\n jsiConfigureProps(\n Object.keys(UI_THREAD_PROPS_WHITELIST),\n Object.keys(NATIVE_THREAD_PROPS_WHITELIST)\n );\n}\n\nexport function addWhitelistedNativeProps(\n props: Record\n): void {\n const oldSize = Object.keys(NATIVE_THREAD_PROPS_WHITELIST).length;\n NATIVE_THREAD_PROPS_WHITELIST = {\n ...NATIVE_THREAD_PROPS_WHITELIST,\n ...props,\n };\n if (oldSize !== Object.keys(NATIVE_THREAD_PROPS_WHITELIST).length) {\n configureProps();\n }\n}\n\nexport function addWhitelistedUIProps(props: Record): void {\n const oldSize = Object.keys(UI_THREAD_PROPS_WHITELIST).length;\n UI_THREAD_PROPS_WHITELIST = { ...UI_THREAD_PROPS_WHITELIST, ...props };\n if (oldSize !== Object.keys(UI_THREAD_PROPS_WHITELIST).length) {\n configureProps();\n }\n}\n\nconst PROCESSED_VIEW_NAMES = new Set();\n\ninterface ViewConfig {\n uiViewClassName: string;\n validAttributes: Record;\n}\n/**\n * updates UI props whitelist for given view host instance\n * this will work just once for every view name\n */\n\nexport function adaptViewConfig(viewConfig: ViewConfig): void {\n const viewName = viewConfig.uiViewClassName;\n const props = viewConfig.validAttributes;\n\n // update whitelist of UI props for this view name only once\n if (!PROCESSED_VIEW_NAMES.has(viewName)) {\n const propsToAdd: Record = {};\n Object.keys(props).forEach((key) => {\n // we don't want to add native props as they affect layout\n // we also skip props which repeat here\n if (\n !(key in NATIVE_THREAD_PROPS_WHITELIST) &&\n !(key in UI_THREAD_PROPS_WHITELIST)\n ) {\n propsToAdd[key] = true;\n }\n });\n addWhitelistedUIProps(propsToAdd);\n\n PROCESSED_VIEW_NAMES.add(viewName);\n }\n}\n\nconfigureProps();\n","import type {\n ILayoutAnimationBuilder,\n LayoutAnimationFunction,\n LayoutAnimationsValues,\n} from './reanimated2/layoutReanimation';\nimport type { StyleProps } from './reanimated2/commonTypes';\n\nconst mockTargetValues: LayoutAnimationsValues = {\n targetOriginX: 0,\n targetOriginY: 0,\n targetWidth: 0,\n targetHeight: 0,\n targetGlobalOriginX: 0,\n targetGlobalOriginY: 0,\n targetBorderRadius: 0,\n windowWidth: 0,\n windowHeight: 0,\n currentOriginX: 0,\n currentOriginY: 0,\n currentWidth: 0,\n currentHeight: 0,\n currentGlobalOriginX: 0,\n currentGlobalOriginY: 0,\n currentBorderRadius: 0,\n};\n\nexport function maybeBuild(\n layoutAnimationOrBuilder:\n | ILayoutAnimationBuilder\n | LayoutAnimationFunction\n | Keyframe,\n style: StyleProps | undefined,\n displayName: string\n): LayoutAnimationFunction | Keyframe {\n const isAnimationBuilder = (\n value: ILayoutAnimationBuilder | LayoutAnimationFunction | Keyframe\n ): value is ILayoutAnimationBuilder =>\n 'build' in layoutAnimationOrBuilder &&\n typeof layoutAnimationOrBuilder.build === 'function';\n\n if (isAnimationBuilder(layoutAnimationOrBuilder)) {\n const animationFactory = layoutAnimationOrBuilder.build();\n const layoutAnimation = animationFactory(mockTargetValues);\n const animatedStyle = layoutAnimation.animations;\n\n const getCommonProperties = (obj1: object, obj2: object) =>\n Object.keys(obj1).filter((key) =>\n Object.prototype.hasOwnProperty.call(obj2, key)\n );\n\n const commonProperties = getCommonProperties(animatedStyle, style || {});\n if (commonProperties.length > 0) {\n console.warn(\n `[Reanimated] ${\n commonProperties.length === 1 ? 'Property' : 'Properties: '\n } \"${commonProperties}\" of ${displayName} may be overwritten with layout animation. Please create a wrapper with the layout animation you want to apply.`\n );\n }\n\n return layoutAnimationOrBuilder.build();\n } else {\n return layoutAnimationOrBuilder;\n }\n}\n","import {\n NativeEventEmitter,\n NativeModules,\n findNodeHandle,\n} from 'react-native';\nimport { nativeShouldBeMock } from '../reanimated2/PlatformChecker';\nimport type { StyleProps } from '../reanimated2';\n\ninterface ListenerData {\n viewTag: number;\n props: StyleProps;\n}\n\nexport class JSPropUpdater {\n private static _tagToComponentMapping = new Map();\n private _reanimatedEventEmitter: NativeEventEmitter;\n private static _reanimatedModuleMock = {\n async addListener(): Promise {\n // noop\n },\n async removeListeners(): Promise {\n // noop\n },\n };\n\n private static _listener(data: ListenerData) {\n const component = JSPropUpdater._tagToComponentMapping.get(data.viewTag);\n component && component._updateFromNative(data.props);\n }\n\n constructor() {\n let reanimatedModule: typeof JSPropUpdater._reanimatedModuleMock;\n if (nativeShouldBeMock()) {\n reanimatedModule = JSPropUpdater._reanimatedModuleMock;\n } else {\n reanimatedModule = NativeModules.ReanimatedModule;\n }\n this._reanimatedEventEmitter = new NativeEventEmitter(reanimatedModule);\n }\n\n public addOnJSPropsChangeListener(\n animatedComponent: React.Component\n ) {\n const viewTag = findNodeHandle(animatedComponent);\n JSPropUpdater._tagToComponentMapping.set(viewTag, animatedComponent);\n if (JSPropUpdater._tagToComponentMapping.size === 1) {\n this._reanimatedEventEmitter.addListener(\n 'onReanimatedPropsChange',\n JSPropUpdater._listener\n );\n }\n }\n\n public removeOnJSPropsChangeListener(\n animatedComponent: React.Component\n ) {\n const viewTag = findNodeHandle(animatedComponent);\n JSPropUpdater._tagToComponentMapping.delete(viewTag);\n if (JSPropUpdater._tagToComponentMapping.size === 0) {\n this._reanimatedEventEmitter.removeAllListeners(\n 'onReanimatedPropsChange'\n );\n }\n }\n}\n","import type {\n Component,\n ComponentClass,\n ComponentType,\n FunctionComponent,\n MutableRefObject,\n Ref,\n} from 'react';\nimport React from 'react';\nimport { findNodeHandle, Platform, StyleSheet } from 'react-native';\nimport WorkletEventHandler from '../reanimated2/WorkletEventHandler';\nimport setAndForwardRef from './setAndForwardRef';\nimport '../reanimated2/layoutReanimation/animationsManager';\nimport invariant from 'invariant';\nimport { adaptViewConfig } from '../ConfigHelper';\nimport { RNRenderer } from '../reanimated2/platform-specific/RNRenderer';\nimport {\n configureLayoutAnimations,\n enableLayoutAnimations,\n startMapper,\n stopMapper,\n} from '../reanimated2/core';\nimport {\n isJest,\n isChromeDebugger,\n shouldBeUseWeb,\n isWeb,\n} from '../reanimated2/PlatformChecker';\nimport { initialUpdaterRun } from '../reanimated2/animation';\nimport {\n SharedTransition,\n LayoutAnimationType,\n} from '../reanimated2/layoutReanimation';\nimport type {\n SharedValue,\n StyleProps,\n ShadowNodeWrapper,\n} from '../reanimated2/commonTypes';\nimport type {\n ViewDescriptorsSet,\n ViewRefSet,\n} from '../reanimated2/ViewDescriptorsSet';\nimport { makeViewDescriptorsSet } from '../reanimated2/ViewDescriptorsSet';\nimport { getShadowNodeWrapperFromRef } from '../reanimated2/fabricUtils';\nimport updateProps from '../reanimated2/UpdateProps';\nimport NativeReanimatedModule from '../reanimated2/NativeReanimated';\nimport { isSharedValue } from '../reanimated2/utils';\nimport type { AnimateProps } from '../reanimated2/helperTypes';\nimport { removeFromPropsRegistry } from '../reanimated2/PropsRegistry';\nimport { JSPropUpdater } from './JSPropUpdater';\nimport { getReduceMotionFromConfig } from '../reanimated2/animation/util';\nimport { maybeBuild } from '../animationBuilder';\nimport type { AnimatedComponentProps, AnimatedProps } from './utils';\nimport { flattenArray, has } from './utils';\n\nconst IS_WEB = isWeb();\n\nfunction dummyListener() {\n // empty listener we use to assign to listener properties for which animated\n // event is used.\n}\n\nfunction onlyAnimatedStyles(styles: StyleProps[]) {\n return styles.filter((style) => style?.viewDescriptors);\n}\n\nfunction isSameAnimatedStyle(\n style1?: StyleProps,\n style2?: StyleProps\n): boolean {\n // We cannot use equality check to compare useAnimatedStyle outputs directly.\n // Instead, we can compare its viewsRefs.\n return style1?.viewsRef === style2?.viewsRef;\n}\n\nconst isSameAnimatedProps = isSameAnimatedStyle;\n\nfunction isInlineStyleTransform(transform: any): boolean {\n if (!transform) {\n return false;\n }\n return transform.some((t: Record) => hasInlineStyles(t));\n}\n\nfunction hasInlineStyles(style: StyleProps): boolean {\n if (!style) {\n return false;\n }\n return Object.keys(style).some((key) => {\n const styleValue = style[key];\n return (\n isSharedValue(styleValue) ||\n (key === 'transform' && isInlineStyleTransform(styleValue))\n );\n });\n}\n\nfunction extractSharedValuesMapFromProps(\n props: AnimatedComponentProps\n): Record {\n const inlineProps: Record = {};\n\n for (const key in props) {\n const value = props[key];\n if (key === 'style') {\n const styles = flattenArray(props.style ?? []);\n styles.forEach((style) => {\n if (!style) {\n return;\n }\n for (const [key, styleValue] of Object.entries(style)) {\n if (isSharedValue(styleValue)) {\n inlineProps[key] = styleValue;\n } else if (\n key === 'transform' &&\n isInlineStyleTransform(styleValue)\n ) {\n inlineProps[key] = styleValue;\n }\n }\n });\n } else if (isSharedValue(value)) {\n inlineProps[key] = value;\n }\n }\n\n return inlineProps;\n}\n\nfunction inlinePropsHasChanged(styles1: StyleProps, styles2: StyleProps) {\n if (Object.keys(styles1).length !== Object.keys(styles2).length) {\n return true;\n }\n\n for (const key of Object.keys(styles1)) {\n if (styles1[key] !== styles2[key]) return true;\n }\n\n return false;\n}\n\nfunction getInlinePropsUpdate(inlineProps: Record) {\n 'worklet';\n const update: Record = {};\n for (const [key, styleValue] of Object.entries(inlineProps)) {\n if (key === 'transform') {\n update[key] = styleValue.map((transform: Record) => {\n return getInlinePropsUpdate(transform);\n });\n } else if (isSharedValue(styleValue)) {\n update[key] = styleValue.value;\n } else {\n update[key] = styleValue;\n }\n }\n return update;\n}\n\ntype Options

= {\n setNativeProps: (ref: ComponentRef, props: P) => void;\n};\n\ninterface ComponentRef extends Component {\n setNativeProps?: (props: Record) => void;\n getScrollableNode?: () => ComponentRef;\n getAnimatableRef?: () => ComponentRef;\n}\n\ninterface InitialComponentProps extends Record {\n ref?: Ref;\n collapsable?: boolean;\n}\n\nexport default function createAnimatedComponent

(\n component: FunctionComponent

,\n options?: Options

\n): FunctionComponent>;\n\nexport default function createAnimatedComponent

(\n component: ComponentClass

,\n options?: Options

\n): ComponentClass>;\n\nexport default function createAnimatedComponent(\n Component: ComponentType,\n options?: Options\n): any {\n invariant(\n typeof Component !== 'function' ||\n (Component.prototype && Component.prototype.isReactComponent),\n `Looks like you're passing a function component \\`${Component.name}\\` to \\`createAnimatedComponent\\` function which supports only class components. Please wrap your function component with \\`React.forwardRef()\\` or use a class component instead.`\n );\n\n class AnimatedComponent extends React.Component<\n AnimatedComponentProps\n > {\n _styles: StyleProps[] | null = null;\n _animatedProps?: Partial>;\n _viewTag = -1;\n _isFirstRender = true;\n animatedStyle: { value: StyleProps } = { value: {} };\n initialStyle = {};\n _component: ComponentRef | HTMLElement | null = null;\n _inlinePropsViewDescriptors: ViewDescriptorsSet | null = null;\n _inlinePropsMapperId: number | null = null;\n _inlineProps: StyleProps = {};\n _sharedElementTransition: SharedTransition | null = null;\n _JSPropUpdater = new JSPropUpdater();\n static displayName: string;\n\n constructor(props: AnimatedComponentProps) {\n super(props);\n if (isJest()) {\n this.animatedStyle = { value: {} };\n }\n }\n\n componentWillUnmount() {\n this._detachNativeEvents();\n this._JSPropUpdater.removeOnJSPropsChangeListener(this);\n this._detachStyles();\n this._detachInlineProps();\n this._sharedElementTransition?.unregisterTransition(this._viewTag);\n }\n\n componentDidMount() {\n this._attachNativeEvents();\n this._JSPropUpdater.addOnJSPropsChangeListener(this);\n this._attachAnimatedStyles();\n this._attachInlineProps();\n }\n\n _getEventViewRef() {\n // Make sure to get the scrollable node for components that implement\n // `ScrollResponder.Mixin`.\n return (this._component as ComponentRef)?.getScrollableNode\n ? (this._component as ComponentRef).getScrollableNode?.()\n : this._component;\n }\n\n _attachNativeEvents() {\n const node = this._getEventViewRef() as ComponentRef;\n let viewTag = null; // We set it only if needed\n\n for (const key in this.props) {\n const prop = this.props[key];\n if (\n has('current', prop) &&\n prop.current instanceof WorkletEventHandler\n ) {\n if (viewTag === null) {\n viewTag = findNodeHandle(options?.setNativeProps ? this : node);\n }\n prop.current.registerForEvents(viewTag as number, key);\n }\n }\n }\n\n _detachNativeEvents() {\n for (const key in this.props) {\n const prop = this.props[key];\n if (\n has('current', prop) &&\n prop.current instanceof WorkletEventHandler\n ) {\n prop.current.unregisterFromEvents();\n }\n }\n }\n\n _detachStyles() {\n if (IS_WEB && this._styles !== null) {\n for (const style of this._styles) {\n if (style?.viewsRef) {\n style.viewsRef.remove(this);\n }\n }\n } else if (this._viewTag !== -1 && this._styles !== null) {\n for (const style of this._styles) {\n style.viewDescriptors.remove(this._viewTag);\n }\n if (this.props.animatedProps?.viewDescriptors) {\n this.props.animatedProps.viewDescriptors.remove(this._viewTag);\n }\n if (global._IS_FABRIC) {\n removeFromPropsRegistry(this._viewTag);\n }\n }\n }\n\n _reattachNativeEvents(\n prevProps: AnimatedComponentProps\n ) {\n for (const key in prevProps) {\n const prop = this.props[key];\n if (\n has('current', prop) &&\n prop.current instanceof WorkletEventHandler &&\n prop.current.reattachNeeded\n ) {\n prop.current.unregisterFromEvents();\n }\n }\n\n let viewTag = null;\n\n for (const key in this.props) {\n const prop = this.props[key];\n if (\n has('current', prop) &&\n prop.current instanceof WorkletEventHandler &&\n prop.current.reattachNeeded\n ) {\n if (viewTag === null) {\n const node = this._getEventViewRef() as ComponentRef;\n viewTag = findNodeHandle(options?.setNativeProps ? this : node);\n }\n prop.current.registerForEvents(viewTag as number, key);\n prop.current.reattachNeeded = false;\n }\n }\n }\n\n _updateFromNative(props: StyleProps) {\n if (options?.setNativeProps) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n options.setNativeProps(this._component as ComponentRef, props);\n } else {\n // eslint-disable-next-line no-unused-expressions\n (this._component as ComponentRef)?.setNativeProps?.(props);\n }\n }\n\n _getViewInfo() {\n let viewTag: number | HTMLElement | null;\n let viewName: string | null;\n let shadowNodeWrapper: ShadowNodeWrapper | null = null;\n let viewConfig;\n // Component can specify ref which should be animated when animated version of the component is created.\n // Otherwise, we animate the component itself.\n const component = (this._component as ComponentRef)?.getAnimatableRef\n ? (this._component as ComponentRef).getAnimatableRef?.()\n : this;\n\n if (IS_WEB) {\n // At this point I assume that `_setComponentRef` was already called and `_component` is set.\n // `this._component` on web represents HTMLElement of our component, that's why we use casting\n viewTag = this._component as HTMLElement;\n viewName = null;\n shadowNodeWrapper = null;\n viewConfig = null;\n } else {\n // hostInstance can be null for a component that doesn't render anything (render function returns null). Example: svg Stop: https://github.com/react-native-svg/react-native-svg/blob/develop/src/elements/Stop.tsx\n const hostInstance = RNRenderer.findHostInstance_DEPRECATED(component);\n if (!hostInstance) {\n throw new Error(\n '[Reanimated] Cannot find host instance for this component. Maybe it renders nothing?'\n );\n }\n // we can access view tag in the same way it's accessed here https://github.com/facebook/react/blob/e3f4eb7272d4ca0ee49f27577156b57eeb07cf73/packages/react-native-renderer/src/ReactFabric.js#L146\n viewTag = hostInstance?._nativeTag;\n /**\n * RN uses viewConfig for components for storing different properties of the component(example: https://github.com/facebook/react-native/blob/master/packages/react-native/Libraries/Components/ScrollView/ScrollViewViewConfig.js#L16).\n * The name we're looking for is in the field named uiViewClassName.\n */\n viewName = hostInstance?.viewConfig?.uiViewClassName;\n\n viewConfig = hostInstance?.viewConfig;\n\n if (global._IS_FABRIC) {\n shadowNodeWrapper = getShadowNodeWrapperFromRef(this);\n }\n }\n return { viewTag, viewName, shadowNodeWrapper, viewConfig };\n }\n\n _attachAnimatedStyles() {\n const styles = this.props.style\n ? onlyAnimatedStyles(flattenArray(this.props.style))\n : [];\n const prevStyles = this._styles;\n this._styles = styles;\n\n const prevAnimatedProps = this._animatedProps;\n this._animatedProps = this.props.animatedProps;\n\n const { viewTag, viewName, shadowNodeWrapper, viewConfig } =\n this._getViewInfo();\n\n // update UI props whitelist for this view\n const hasReanimated2Props =\n this.props.animatedProps?.viewDescriptors || styles.length;\n if (hasReanimated2Props && viewConfig) {\n adaptViewConfig(viewConfig);\n }\n\n this._viewTag = viewTag as number;\n\n // remove old styles\n if (prevStyles) {\n // in most of the cases, views have only a single animated style and it remains unchanged\n const hasOneSameStyle =\n styles.length === 1 &&\n prevStyles.length === 1 &&\n isSameAnimatedStyle(styles[0], prevStyles[0]);\n\n if (!hasOneSameStyle) {\n // otherwise, remove each style that is not present in new styles\n for (const prevStyle of prevStyles) {\n const isPresent = styles.some((style) =>\n isSameAnimatedStyle(style, prevStyle)\n );\n if (!isPresent) {\n prevStyle.viewDescriptors.remove(viewTag);\n }\n }\n }\n }\n\n styles.forEach((style) => {\n style.viewDescriptors.add({\n tag: viewTag,\n name: viewName,\n shadowNodeWrapper,\n });\n if (isJest()) {\n /**\n * We need to connect Jest's TestObject instance whose contains just props object\n * with the updateProps() function where we update the properties of the component.\n * We can't update props object directly because TestObject contains a copy of props - look at render function:\n * const props = this._filterNonAnimatedProps(this.props);\n */\n this.animatedStyle.value = {\n ...this.animatedStyle.value,\n ...style.initial.value,\n };\n style.animatedStyle.current = this.animatedStyle;\n }\n });\n\n // detach old animatedProps\n if (\n prevAnimatedProps &&\n !isSameAnimatedProps(prevAnimatedProps, this.props.animatedProps)\n ) {\n prevAnimatedProps.viewDescriptors!.remove(viewTag as number);\n }\n\n // attach animatedProps property\n if (this.props.animatedProps?.viewDescriptors) {\n this.props.animatedProps.viewDescriptors.add({\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n tag: viewTag as number,\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n name: viewName!,\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n shadowNodeWrapper: shadowNodeWrapper!,\n });\n }\n }\n\n _attachInlineProps() {\n const newInlineProps: Record =\n extractSharedValuesMapFromProps(this.props);\n const hasChanged = inlinePropsHasChanged(\n newInlineProps,\n this._inlineProps\n );\n\n if (hasChanged) {\n if (!this._inlinePropsViewDescriptors) {\n this._inlinePropsViewDescriptors = makeViewDescriptorsSet();\n\n const { viewTag, viewName, shadowNodeWrapper, viewConfig } =\n this._getViewInfo();\n\n if (Object.keys(newInlineProps).length && viewConfig) {\n adaptViewConfig(viewConfig);\n }\n\n this._inlinePropsViewDescriptors.add({\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n tag: viewTag as number,\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n name: viewName!,\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n shadowNodeWrapper: shadowNodeWrapper!,\n });\n }\n const sharableViewDescriptors =\n this._inlinePropsViewDescriptors.sharableViewDescriptors;\n\n const maybeViewRef = NativeReanimatedModule.native\n ? undefined\n : ({ items: new Set([this]) } as ViewRefSet); // see makeViewsRefSet\n\n const updaterFunction = () => {\n 'worklet';\n const update = getInlinePropsUpdate(newInlineProps);\n updateProps(sharableViewDescriptors, update, maybeViewRef);\n };\n this._inlineProps = newInlineProps;\n if (this._inlinePropsMapperId) {\n stopMapper(this._inlinePropsMapperId);\n }\n this._inlinePropsMapperId = null;\n if (Object.keys(newInlineProps).length) {\n this._inlinePropsMapperId = startMapper(\n updaterFunction,\n Object.values(newInlineProps)\n );\n }\n }\n }\n\n _detachInlineProps() {\n if (this._inlinePropsMapperId) {\n stopMapper(this._inlinePropsMapperId);\n }\n }\n\n componentDidUpdate(\n prevProps: AnimatedComponentProps\n ) {\n this._reattachNativeEvents(prevProps);\n this._attachAnimatedStyles();\n this._attachInlineProps();\n }\n\n _setComponentRef = setAndForwardRef({\n getForwardedRef: () =>\n this.props.forwardedRef as MutableRefObject<\n Component, Record, unknown>\n >,\n setLocalRef: (ref) => {\n // TODO update config\n\n const tag = IS_WEB\n ? (ref as HTMLElement)\n : findNodeHandle(ref as Component);\n\n const { layout, entering, exiting, sharedTransitionTag } = this.props;\n if (\n (layout || entering || exiting || sharedTransitionTag) &&\n tag != null\n ) {\n if (!shouldBeUseWeb()) {\n enableLayoutAnimations(true, false);\n }\n if (layout) {\n configureLayoutAnimations(\n tag,\n LayoutAnimationType.LAYOUT,\n maybeBuild(\n layout,\n undefined /* We don't have to warn user if style has common properties with animation for LAYOUT */,\n AnimatedComponent.displayName\n )\n );\n }\n if (entering) {\n configureLayoutAnimations(\n tag,\n LayoutAnimationType.ENTERING,\n maybeBuild(\n entering,\n this.props?.style,\n AnimatedComponent.displayName\n )\n );\n }\n if (exiting) {\n const reduceMotionInExiting =\n 'getReduceMotion' in exiting &&\n typeof exiting.getReduceMotion === 'function'\n ? getReduceMotionFromConfig(exiting.getReduceMotion())\n : getReduceMotionFromConfig();\n if (!reduceMotionInExiting) {\n configureLayoutAnimations(\n tag,\n LayoutAnimationType.EXITING,\n maybeBuild(\n exiting,\n this.props?.style,\n AnimatedComponent.displayName\n )\n );\n }\n }\n if (sharedTransitionTag && !IS_WEB) {\n const sharedElementTransition =\n this.props.sharedTransitionStyle ?? new SharedTransition();\n const reduceMotionInTransition = getReduceMotionFromConfig(\n sharedElementTransition.getReduceMotion()\n );\n if (!reduceMotionInTransition) {\n sharedElementTransition.registerTransition(\n tag as number,\n sharedTransitionTag\n );\n this._sharedElementTransition = sharedElementTransition;\n }\n }\n }\n\n if (ref !== this._component) {\n this._component = ref;\n }\n },\n });\n\n _filterNonAnimatedProps(\n inputProps: AnimatedComponentProps\n ): Record {\n const props: Record = {};\n for (const key in inputProps) {\n const value = inputProps[key];\n if (key === 'style') {\n const styleProp = inputProps.style;\n const styles = flattenArray(styleProp ?? []);\n const processedStyle: StyleProps = styles.map((style) => {\n if (style && style.viewDescriptors) {\n // this is how we recognize styles returned by useAnimatedStyle\n style.viewsRef.add(this);\n if (this._isFirstRender) {\n this.initialStyle = {\n ...style.initial.value,\n ...this.initialStyle,\n ...initialUpdaterRun(style.initial.updater),\n };\n }\n return this.initialStyle;\n } else if (hasInlineStyles(style)) {\n if (this._isFirstRender) {\n return getInlinePropsUpdate(style);\n }\n const newStyle: StyleProps = {};\n for (const [key, styleValue] of Object.entries(style)) {\n if (\n !isSharedValue(styleValue) &&\n !(key === 'transform' && isInlineStyleTransform(styleValue))\n ) {\n newStyle[key] = styleValue;\n }\n }\n return newStyle;\n } else {\n return style;\n }\n });\n props[key] = StyleSheet.flatten(processedStyle);\n } else if (key === 'animatedProps') {\n const animatedProp = inputProps.animatedProps as Partial<\n AnimatedComponentProps\n >;\n if (animatedProp.initial !== undefined) {\n Object.keys(animatedProp.initial.value).forEach((key) => {\n props[key] = animatedProp.initial?.value[key];\n animatedProp.viewsRef?.add(this);\n });\n }\n } else if (\n has('current', value) &&\n value.current instanceof WorkletEventHandler\n ) {\n if (value.current.eventNames.length > 0) {\n value.current.eventNames.forEach((eventName) => {\n props[eventName] = has('listeners', value.current)\n ? (value.current.listeners as Record)[\n eventName\n ]\n : dummyListener;\n });\n } else {\n props[key] = dummyListener;\n }\n } else if (isSharedValue(value)) {\n if (this._isFirstRender) {\n props[key] = (value as SharedValue).value;\n }\n } else if (\n key !== 'onGestureHandlerStateChange' ||\n !isChromeDebugger()\n ) {\n props[key] = value;\n }\n }\n return props;\n }\n\n render() {\n const props = this._filterNonAnimatedProps(this.props);\n if (isJest()) {\n props.animatedStyle = this.animatedStyle;\n }\n\n if (this._isFirstRender) {\n this._isFirstRender = false;\n }\n\n const platformProps = Platform.select({\n web: {},\n default: { collapsable: false },\n });\n\n return (\n void}\n {...platformProps}\n />\n );\n }\n }\n\n AnimatedComponent.displayName = `AnimatedComponent(${\n Component.displayName || Component.name || 'Component'\n })`;\n\n return React.forwardRef((props, ref) => {\n return (\n \n );\n });\n}\n","/**\n * imported from react-native\n */\n\nimport type { MutableRefObject } from 'react';\n\n/**\n * This is a helper function for when a component needs to be able to forward a ref\n * to a child component, but still needs to have access to that component as part of\n * its implementation.\n *\n * Its main use case is in wrappers for native components.\n *\n * Usage:\n *\n * class MyView extends React.Component {\n * _nativeRef = null;\n *\n * _setNativeRef = setAndForwardRef({\n * getForwardedRef: () => this.props.forwardedRef,\n * setLocalRef: ref => {\n * this._nativeRef = ref;\n * },\n * });\n *\n * render() {\n * return ;\n * }\n * }\n *\n * const MyViewWithRef = React.forwardRef((props, ref) => (\n * \n * ));\n *\n * module.exports = MyViewWithRef;\n */\n\ntype ForwardedRef = () => MutableRefObject | ((ref: T) => void);\n\nfunction setAndForwardRef({\n getForwardedRef,\n setLocalRef,\n}: {\n getForwardedRef: ForwardedRef;\n setLocalRef: (ref: T) => void;\n}): (ref: T) => void {\n return function forwardRef(ref: T) {\n const forwardedRef = getForwardedRef();\n\n setLocalRef(ref);\n\n // Forward to user ref prop (if one has been specified)\n if (typeof forwardedRef === 'function') {\n // Handle function-based refs. String-based refs are handled as functions.\n forwardedRef(ref);\n } else if (typeof forwardedRef === 'object' && forwardedRef != null) {\n // Handle createRef-based refs\n forwardedRef.current = ref;\n }\n };\n}\n\nexport default setAndForwardRef;\n","import type { Ref, Component } from 'react';\nimport type {\n StyleProps,\n BaseAnimationBuilder,\n ILayoutAnimationBuilder,\n EntryExitAnimationFunction,\n SharedTransition,\n SharedValue,\n} from '../reanimated2';\nimport type {\n ViewDescriptorsSet,\n ViewRefSet,\n} from '../reanimated2/ViewDescriptorsSet';\n\nexport interface AnimatedProps extends Record {\n viewDescriptors?: ViewDescriptorsSet;\n viewsRef?: ViewRefSet;\n initial?: SharedValue;\n}\n\nexport type AnimatedComponentProps

> = P & {\n forwardedRef?: Ref;\n style?: NestedArray;\n animatedProps?: Partial>;\n animatedStyle?: StyleProps;\n layout?:\n | BaseAnimationBuilder\n | ILayoutAnimationBuilder\n | typeof BaseAnimationBuilder;\n entering?:\n | BaseAnimationBuilder\n | typeof BaseAnimationBuilder\n | EntryExitAnimationFunction\n | Keyframe;\n exiting?:\n | BaseAnimationBuilder\n | typeof BaseAnimationBuilder\n | EntryExitAnimationFunction\n | Keyframe;\n sharedTransitionTag?: string;\n sharedTransitionStyle?: SharedTransition;\n};\n\ntype NestedArray = T | NestedArray[];\n\nexport function flattenArray(array: NestedArray): T[] {\n if (!Array.isArray(array)) {\n return [array];\n }\n const resultArr: T[] = [];\n\n const _flattenArray = (arr: NestedArray[]): void => {\n arr.forEach((item) => {\n if (Array.isArray(item)) {\n _flattenArray(item);\n } else {\n resultArr.push(item);\n }\n });\n };\n _flattenArray(array);\n return resultArr;\n}\n\nexport const has = (\n key: K,\n x: unknown\n): x is typeof x & { [key in K]: unknown } => {\n if (typeof x === 'function' || typeof x === 'object') {\n if (x === null || x === undefined) {\n return false;\n } else {\n return key in x;\n }\n }\n return false;\n};\n","export * from './reanimated2';\nexport * as default from './Animated'; // If this line fails, you probably forgot some installation steps. Check out the installation guide here: https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started#installation 1) Make sure reanimated's babel plugin is installed in your babel.config.js (you should have 'react-native-reanimated/plugin' listed there - also see the above link for details) 2) Make sure you reset build cache after updating the config, run: yarn start --reset-cache\n","/**\n * https://github.com/gre/bezier-easing\n * BezierEasing - use bezier curve for transition easing function\n * by Gaëtan Renaudeau 2014 - 2015 – MIT License\n */\n\n// These values are established by empiricism with tests (tradeoff: performance VS precision)\n\nexport function Bezier(\n mX1: number,\n mY1: number,\n mX2: number,\n mY2: number\n): (x: number) => number {\n 'worklet';\n\n const NEWTON_ITERATIONS = 4;\n const NEWTON_MIN_SLOPE = 0.001;\n const SUBDIVISION_PRECISION = 0.0000001;\n const SUBDIVISION_MAX_ITERATIONS = 10;\n\n const kSplineTableSize = 11;\n const kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\n\n function A(aA1: number, aA2: number): number {\n 'worklet';\n return 1.0 - 3.0 * aA2 + 3.0 * aA1;\n }\n function B(aA1: number, aA2: number): number {\n 'worklet';\n return 3.0 * aA2 - 6.0 * aA1;\n }\n function C(aA1: number) {\n 'worklet';\n return 3.0 * aA1;\n }\n\n // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\n function calcBezier(aT: number, aA1: number, aA2: number): number {\n 'worklet';\n return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\n }\n\n // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\n function getSlope(aT: number, aA1: number, aA2: number): number {\n 'worklet';\n return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n }\n\n function binarySubdivide(\n aX: number,\n aA: number,\n aB: number,\n mX1: number,\n mX2: number\n ): number {\n 'worklet';\n let currentX;\n let currentT;\n let i = 0;\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n if (currentX > 0.0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while (\n Math.abs(currentX) > SUBDIVISION_PRECISION &&\n ++i < SUBDIVISION_MAX_ITERATIONS\n );\n return currentT;\n }\n\n function newtonRaphsonIterate(\n aX: number,\n aGuessT: number,\n mX1: number,\n mX2: number\n ): number {\n 'worklet';\n for (let i = 0; i < NEWTON_ITERATIONS; ++i) {\n const currentSlope = getSlope(aGuessT, mX1, mX2);\n if (currentSlope === 0.0) {\n return aGuessT;\n }\n const currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n }\n\n function LinearEasing(x: number): number {\n 'worklet';\n return x;\n }\n\n if (!(mX1 >= 0 && mX1 <= 1 && mX2 >= 0 && mX2 <= 1)) {\n throw new Error('[Reanimated] Bezier x values must be in [0, 1] range.');\n }\n\n if (mX1 === mY1 && mX2 === mY2) {\n return LinearEasing;\n }\n\n // FIXME: Float32Array is not available in Hermes right now\n //\n // var float32ArraySupported = typeof Float32Array === 'function';\n // const sampleValues = float32ArraySupported\n // ? new Float32Array(kSplineTableSize)\n // : new Array(kSplineTableSize);\n\n // Precompute samples table\n const sampleValues = new Array(kSplineTableSize);\n\n for (let i = 0; i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n\n function getTForX(aX: number): number {\n 'worklet';\n let intervalStart = 0.0;\n let currentSample = 1;\n const lastSample = kSplineTableSize - 1;\n\n for (\n ;\n currentSample !== lastSample && sampleValues[currentSample] <= aX;\n ++currentSample\n ) {\n intervalStart += kSampleStepSize;\n }\n --currentSample;\n\n // Interpolate to provide an initial guess for t\n const dist =\n (aX - sampleValues[currentSample]) /\n (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n const guessForT = intervalStart + dist * kSampleStepSize;\n\n const initialSlope = getSlope(guessForT, mX1, mX2);\n if (initialSlope >= NEWTON_MIN_SLOPE) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n } else if (initialSlope === 0.0) {\n return guessForT;\n } else {\n return binarySubdivide(\n aX,\n intervalStart,\n intervalStart + kSampleStepSize,\n mX1,\n mX2\n );\n }\n }\n\n return function BezierEasing(x) {\n 'worklet';\n if (mX1 === mY1 && mX2 === mY2) {\n return x; // linear\n }\n // Because JavaScript number are imprecise, we should guarantee the extremes are right.\n if (x === 0) {\n return 0;\n }\n if (x === 1) {\n return 1;\n }\n return calcBezier(getTForX(x), mY1, mY2);\n };\n}\n","/**\n * Copied from:\n * react-native/Libraries/StyleSheet/normalizeColor.js\n * react-native/Libraries/StyleSheet/processColor.js\n * https://github.com/wcandillon/react-native-redash/blob/master/src/Colors.ts\n */\n\n/* eslint no-bitwise: 0 */\nimport type { StyleProps } from './commonTypes';\nimport { makeShareable } from './core';\nimport { isAndroid, isWeb } from './PlatformChecker';\n\ninterface RGB {\n r: number;\n g: number;\n b: number;\n}\n\ninterface HSV {\n h: number;\n s: number;\n v: number;\n}\n\n// var INTEGER = '[-+]?\\\\d+';\nconst NUMBER = '[-+]?(?:\\\\d+(?:\\\\.\\\\d*)?|\\\\.\\\\d+)';\nconst PERCENTAGE = NUMBER + '%';\n\nfunction call(...args: unknown[]): string {\n 'worklet';\n return '\\\\(\\\\s*(' + args.join(')\\\\s*,\\\\s*(') + ')\\\\s*\\\\)';\n}\n\nconst MATCHERS = {\n rgb: new RegExp('rgb' + call(NUMBER, NUMBER, NUMBER)),\n rgba: new RegExp('rgba' + call(NUMBER, NUMBER, NUMBER, NUMBER)),\n hsl: new RegExp('hsl' + call(NUMBER, PERCENTAGE, PERCENTAGE)),\n hsla: new RegExp('hsla' + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER)),\n hex3: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex4: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#([0-9a-fA-F]{6})$/,\n hex8: /^#([0-9a-fA-F]{8})$/,\n};\n\nfunction hue2rgb(p: number, q: number, t: number): number {\n 'worklet';\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\nfunction hslToRgb(h: number, s: number, l: number): number {\n 'worklet';\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n const r = hue2rgb(p, q, h + 1 / 3);\n const g = hue2rgb(p, q, h);\n const b = hue2rgb(p, q, h - 1 / 3);\n\n return (\n (Math.round(r * 255) << 24) |\n (Math.round(g * 255) << 16) |\n (Math.round(b * 255) << 8)\n );\n}\n\nfunction parse255(str: string): number {\n 'worklet';\n const int = Number.parseInt(str, 10);\n if (int < 0) {\n return 0;\n }\n if (int > 255) {\n return 255;\n }\n return int;\n}\n\nfunction parse360(str: string): number {\n 'worklet';\n const int = Number.parseFloat(str);\n return (((int % 360) + 360) % 360) / 360;\n}\n\nfunction parse1(str: string): number {\n 'worklet';\n const num = Number.parseFloat(str);\n if (num < 0) {\n return 0;\n }\n if (num > 1) {\n return 255;\n }\n return Math.round(num * 255);\n}\n\nfunction parsePercentage(str: string): number {\n 'worklet';\n // parseFloat conveniently ignores the final %\n const int = Number.parseFloat(str);\n if (int < 0) {\n return 0;\n }\n if (int > 100) {\n return 1;\n }\n return int / 100;\n}\n\nconst names: any = makeShareable({\n transparent: 0x00000000,\n\n // http://www.w3.org/TR/css3-color/#svg-color\n aliceblue: 0xf0f8ffff,\n antiquewhite: 0xfaebd7ff,\n aqua: 0x00ffffff,\n aquamarine: 0x7fffd4ff,\n azure: 0xf0ffffff,\n beige: 0xf5f5dcff,\n bisque: 0xffe4c4ff,\n black: 0x000000ff,\n blanchedalmond: 0xffebcdff,\n blue: 0x0000ffff,\n blueviolet: 0x8a2be2ff,\n brown: 0xa52a2aff,\n burlywood: 0xdeb887ff,\n burntsienna: 0xea7e5dff,\n cadetblue: 0x5f9ea0ff,\n chartreuse: 0x7fff00ff,\n chocolate: 0xd2691eff,\n coral: 0xff7f50ff,\n cornflowerblue: 0x6495edff,\n cornsilk: 0xfff8dcff,\n crimson: 0xdc143cff,\n cyan: 0x00ffffff,\n darkblue: 0x00008bff,\n darkcyan: 0x008b8bff,\n darkgoldenrod: 0xb8860bff,\n darkgray: 0xa9a9a9ff,\n darkgreen: 0x006400ff,\n darkgrey: 0xa9a9a9ff,\n darkkhaki: 0xbdb76bff,\n darkmagenta: 0x8b008bff,\n darkolivegreen: 0x556b2fff,\n darkorange: 0xff8c00ff,\n darkorchid: 0x9932ccff,\n darkred: 0x8b0000ff,\n darksalmon: 0xe9967aff,\n darkseagreen: 0x8fbc8fff,\n darkslateblue: 0x483d8bff,\n darkslategray: 0x2f4f4fff,\n darkslategrey: 0x2f4f4fff,\n darkturquoise: 0x00ced1ff,\n darkviolet: 0x9400d3ff,\n deeppink: 0xff1493ff,\n deepskyblue: 0x00bfffff,\n dimgray: 0x696969ff,\n dimgrey: 0x696969ff,\n dodgerblue: 0x1e90ffff,\n firebrick: 0xb22222ff,\n floralwhite: 0xfffaf0ff,\n forestgreen: 0x228b22ff,\n fuchsia: 0xff00ffff,\n gainsboro: 0xdcdcdcff,\n ghostwhite: 0xf8f8ffff,\n gold: 0xffd700ff,\n goldenrod: 0xdaa520ff,\n gray: 0x808080ff,\n green: 0x008000ff,\n greenyellow: 0xadff2fff,\n grey: 0x808080ff,\n honeydew: 0xf0fff0ff,\n hotpink: 0xff69b4ff,\n indianred: 0xcd5c5cff,\n indigo: 0x4b0082ff,\n ivory: 0xfffff0ff,\n khaki: 0xf0e68cff,\n lavender: 0xe6e6faff,\n lavenderblush: 0xfff0f5ff,\n lawngreen: 0x7cfc00ff,\n lemonchiffon: 0xfffacdff,\n lightblue: 0xadd8e6ff,\n lightcoral: 0xf08080ff,\n lightcyan: 0xe0ffffff,\n lightgoldenrodyellow: 0xfafad2ff,\n lightgray: 0xd3d3d3ff,\n lightgreen: 0x90ee90ff,\n lightgrey: 0xd3d3d3ff,\n lightpink: 0xffb6c1ff,\n lightsalmon: 0xffa07aff,\n lightseagreen: 0x20b2aaff,\n lightskyblue: 0x87cefaff,\n lightslategray: 0x778899ff,\n lightslategrey: 0x778899ff,\n lightsteelblue: 0xb0c4deff,\n lightyellow: 0xffffe0ff,\n lime: 0x00ff00ff,\n limegreen: 0x32cd32ff,\n linen: 0xfaf0e6ff,\n magenta: 0xff00ffff,\n maroon: 0x800000ff,\n mediumaquamarine: 0x66cdaaff,\n mediumblue: 0x0000cdff,\n mediumorchid: 0xba55d3ff,\n mediumpurple: 0x9370dbff,\n mediumseagreen: 0x3cb371ff,\n mediumslateblue: 0x7b68eeff,\n mediumspringgreen: 0x00fa9aff,\n mediumturquoise: 0x48d1ccff,\n mediumvioletred: 0xc71585ff,\n midnightblue: 0x191970ff,\n mintcream: 0xf5fffaff,\n mistyrose: 0xffe4e1ff,\n moccasin: 0xffe4b5ff,\n navajowhite: 0xffdeadff,\n navy: 0x000080ff,\n oldlace: 0xfdf5e6ff,\n olive: 0x808000ff,\n olivedrab: 0x6b8e23ff,\n orange: 0xffa500ff,\n orangered: 0xff4500ff,\n orchid: 0xda70d6ff,\n palegoldenrod: 0xeee8aaff,\n palegreen: 0x98fb98ff,\n paleturquoise: 0xafeeeeff,\n palevioletred: 0xdb7093ff,\n papayawhip: 0xffefd5ff,\n peachpuff: 0xffdab9ff,\n peru: 0xcd853fff,\n pink: 0xffc0cbff,\n plum: 0xdda0ddff,\n powderblue: 0xb0e0e6ff,\n purple: 0x800080ff,\n rebeccapurple: 0x663399ff,\n red: 0xff0000ff,\n rosybrown: 0xbc8f8fff,\n royalblue: 0x4169e1ff,\n saddlebrown: 0x8b4513ff,\n salmon: 0xfa8072ff,\n sandybrown: 0xf4a460ff,\n seagreen: 0x2e8b57ff,\n seashell: 0xfff5eeff,\n sienna: 0xa0522dff,\n silver: 0xc0c0c0ff,\n skyblue: 0x87ceebff,\n slateblue: 0x6a5acdff,\n slategray: 0x708090ff,\n slategrey: 0x708090ff,\n snow: 0xfffafaff,\n springgreen: 0x00ff7fff,\n steelblue: 0x4682b4ff,\n tan: 0xd2b48cff,\n teal: 0x008080ff,\n thistle: 0xd8bfd8ff,\n tomato: 0xff6347ff,\n turquoise: 0x40e0d0ff,\n violet: 0xee82eeff,\n wheat: 0xf5deb3ff,\n white: 0xffffffff,\n whitesmoke: 0xf5f5f5ff,\n yellow: 0xffff00ff,\n yellowgreen: 0x9acd32ff,\n});\n\n// copied from react-native/Libraries/Components/View/ReactNativeStyleAttributes\nexport const ColorProperties = makeShareable([\n 'backgroundColor',\n 'borderBottomColor',\n 'borderColor',\n 'borderLeftColor',\n 'borderRightColor',\n 'borderTopColor',\n 'borderStartColor',\n 'borderEndColor',\n 'borderBlockColor',\n 'borderBlockEndColor',\n 'borderBlockStartColor',\n 'color',\n 'shadowColor',\n 'textDecorationColor',\n 'tintColor',\n 'textShadowColor',\n 'overlayColor',\n]);\n\nfunction normalizeColor(color: unknown): number | null {\n 'worklet';\n\n if (typeof color === 'number') {\n if (color >>> 0 === color && color >= 0 && color <= 0xffffffff) {\n return color;\n }\n return null;\n }\n\n if (typeof color !== 'string') {\n return null;\n }\n\n let match: RegExpExecArray | null | undefined;\n\n // Ordered based on occurrences on Facebook codebase\n if ((match = MATCHERS.hex6.exec(color))) {\n return Number.parseInt(match[1] + 'ff', 16) >>> 0;\n }\n\n if (names[color] !== undefined) {\n return names[color];\n }\n\n if ((match = MATCHERS.rgb.exec(color))) {\n return (\n // b\n ((parse255(match[1]) << 24) | // r\n (parse255(match[2]) << 16) | // g\n (parse255(match[3]) << 8) |\n 0x000000ff) >>> // a\n 0\n );\n }\n\n if ((match = MATCHERS.rgba.exec(color))) {\n return (\n // b\n ((parse255(match[1]) << 24) | // r\n (parse255(match[2]) << 16) | // g\n (parse255(match[3]) << 8) |\n parse1(match[4])) >>> // a\n 0\n );\n }\n\n if ((match = MATCHERS.hex3.exec(color))) {\n return (\n Number.parseInt(\n match[1] +\n match[1] + // r\n match[2] +\n match[2] + // g\n match[3] +\n match[3] + // b\n 'ff', // a\n 16\n ) >>> 0\n );\n }\n\n // https://drafts.csswg.org/css-color-4/#hex-notation\n if ((match = MATCHERS.hex8.exec(color))) {\n return Number.parseInt(match[1], 16) >>> 0;\n }\n\n if ((match = MATCHERS.hex4.exec(color))) {\n return (\n Number.parseInt(\n match[1] +\n match[1] + // r\n match[2] +\n match[2] + // g\n match[3] +\n match[3] + // b\n match[4] +\n match[4], // a\n 16\n ) >>> 0\n );\n }\n\n if ((match = MATCHERS.hsl.exec(color))) {\n return (\n (hslToRgb(\n parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]) // l\n ) |\n 0x000000ff) >>> // a\n 0\n );\n }\n\n if ((match = MATCHERS.hsla.exec(color))) {\n return (\n (hslToRgb(\n parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]) // l\n ) |\n parse1(match[4])) >>> // a\n 0\n );\n }\n\n return null;\n}\n\nexport const opacity = (c: number): number => {\n 'worklet';\n return ((c >> 24) & 255) / 255;\n};\n\nexport const red = (c: number): number => {\n 'worklet';\n return (c >> 16) & 255;\n};\n\nexport const green = (c: number): number => {\n 'worklet';\n return (c >> 8) & 255;\n};\n\nexport const blue = (c: number): number => {\n 'worklet';\n return c & 255;\n};\n\nconst IS_WEB = isWeb();\nconst IS_ANDROID = isAndroid();\n\nexport const rgbaColor = (\n r: number,\n g: number,\n b: number,\n alpha = 1\n): number | string => {\n 'worklet';\n if (IS_WEB || !_WORKLET) {\n return `rgba(${r}, ${g}, ${b}, ${alpha})`;\n }\n\n const c =\n Math.round(alpha * 255) * (1 << 24) +\n Math.round(r) * (1 << 16) +\n Math.round(g) * (1 << 8) +\n Math.round(b);\n if (IS_ANDROID) {\n // on Android color is represented as signed 32 bit int\n return c < (1 << 31) >>> 0 ? c : c - 4294967296; // 4294967296 == Math.pow(2, 32);\n }\n return c;\n};\n\n/* accepts parameters\n * r Object = {r:x, g:y, b:z}\n * OR\n * r, g, b\n * 0 <= r, g, b <= 255\n * returns 0 <= h, s, v <= 1\n */\nexport function RGBtoHSV(rgb: RGB): HSV;\nexport function RGBtoHSV(r: number, g: number, b: number): HSV;\nexport function RGBtoHSV(r: any, g?: any, b?: any): HSV {\n 'worklet';\n /* eslint-disable */\n if (arguments.length === 1) {\n g = r.g;\n b = r.b;\n r = r.r;\n }\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const d = max - min;\n const s = max === 0 ? 0 : d / max;\n const v = max / 255;\n\n let h;\n\n switch (max) {\n default:\n /* fallthrough */\n case min:\n h = 0;\n break;\n case r:\n h = g - b + d * (g < b ? 6 : 0);\n h /= 6 * d;\n break;\n case g:\n h = b - r + d * 2;\n h /= 6 * d;\n break;\n case b:\n h = r - g + d * 4;\n h /= 6 * d;\n break;\n }\n\n return {\n h: h,\n s: s,\n v: v,\n };\n /* eslint-enable */\n}\n\n/* accepts parameters\n * h Object = {h:x, s:y, v:z}\n * OR\n * h, s, v\n * 0 <= h, s, v <= 1\n * returns 0 <= r, g, b <= 255\n */\nfunction HSVtoRGB(hsv: HSV): RGB;\nfunction HSVtoRGB(h: number, s: number, v: number): RGB;\nfunction HSVtoRGB(h: any, s?: any, v?: any) {\n 'worklet';\n /* eslint-disable */\n var r, g, b, i, f, p, q, t;\n if (arguments.length === 1) {\n s = h.s;\n v = h.v;\n h = h.h;\n }\n i = Math.floor(h * 6);\n f = h * 6 - i;\n p = v * (1 - s);\n q = v * (1 - f * s);\n t = v * (1 - (1 - f) * s);\n switch (i % 6) {\n case 0:\n (r = v), (g = t), (b = p);\n break;\n case 1:\n (r = q), (g = v), (b = p);\n break;\n case 2:\n (r = p), (g = v), (b = t);\n break;\n case 3:\n (r = p), (g = q), (b = v);\n break;\n case 4:\n (r = t), (g = p), (b = v);\n break;\n case 5:\n (r = v), (g = p), (b = q);\n break;\n }\n return {\n r: Math.round(r * 255),\n g: Math.round(g * 255),\n b: Math.round(b * 255),\n };\n /* eslint-enable */\n}\n\nexport const hsvToColor = (\n h: number,\n s: number,\n v: number,\n a: number\n): number | string => {\n 'worklet';\n const { r, g, b } = HSVtoRGB(h, s, v);\n return rgbaColor(r, g, b, a);\n};\n\nfunction processColorInitially(color: unknown): number | null | undefined {\n 'worklet';\n if (color === null || color === undefined || typeof color === 'number') {\n return color;\n }\n\n let normalizedColor = normalizeColor(color);\n\n if (normalizedColor === null || normalizedColor === undefined) {\n return undefined;\n }\n\n if (typeof normalizedColor !== 'number') {\n return null;\n }\n\n normalizedColor = ((normalizedColor << 24) | (normalizedColor >>> 8)) >>> 0; // argb\n return normalizedColor;\n}\n\nexport function isColor(value: unknown): boolean {\n 'worklet';\n if (typeof value !== 'string') {\n return false;\n }\n return processColorInitially(value) != null;\n}\n\nexport function processColor(color: unknown): number | null | undefined {\n 'worklet';\n let normalizedColor = processColorInitially(color);\n if (normalizedColor === null || normalizedColor === undefined) {\n return undefined;\n }\n\n if (typeof normalizedColor !== 'number') {\n return null;\n }\n\n if (IS_ANDROID) {\n // Android use 32 bit *signed* integer to represent the color\n // We utilize the fact that bitwise operations in JS also operates on\n // signed 32 bit integers, so that we can use those to convert from\n // *unsigned* to *signed* 32bit int that way.\n normalizedColor = normalizedColor | 0x0;\n }\n\n return normalizedColor;\n}\n\nexport function processColorsInProps(props: StyleProps) {\n 'worklet';\n for (const key in props) {\n if (ColorProperties.includes(key)) {\n props[key] = processColor(props[key]);\n }\n }\n}\n\nexport type ParsedColorArray = [number, number, number, number];\n\nexport function convertToRGBA(color: unknown): ParsedColorArray {\n 'worklet';\n const processedColor = processColorInitially(color)!; // argb;\n const a = (processedColor >>> 24) / 255;\n const r = ((processedColor << 8) >>> 24) / 255;\n const g = ((processedColor << 16) >>> 24) / 255;\n const b = ((processedColor << 24) >>> 24) / 255;\n return [r, g, b, a];\n}\n\nexport function rgbaArrayToRGBAColor(RGBA: ParsedColorArray): string {\n 'worklet';\n return `rgba(${Math.round(RGBA[0] * 255)}, ${Math.round(\n RGBA[1] * 255\n )}, ${Math.round(RGBA[2] * 255)}, ${RGBA[3]})`;\n}\n\nexport function toLinearSpace(\n RGBA: ParsedColorArray,\n gamma = 2.2\n): ParsedColorArray {\n 'worklet';\n const res = [];\n for (let i = 0; i < 3; ++i) {\n res.push(Math.pow(RGBA[i], gamma));\n }\n res.push(RGBA[3]);\n return res as ParsedColorArray;\n}\n\nexport function toGammaSpace(\n RGBA: ParsedColorArray,\n gamma = 2.2\n): ParsedColorArray {\n 'worklet';\n const res = [];\n for (let i = 0; i < 3; ++i) {\n res.push(Math.pow(RGBA[i], 1 / gamma));\n }\n res.push(RGBA[3]);\n return res as ParsedColorArray;\n}\n","import { Bezier } from './Bezier';\n\n/**\n * The `Easing` module implements common easing functions. This module is used\n * by [Animate.timing()](docs/animate.html#timing) to convey physically\n * believable motion in animations.\n *\n * You can find a visualization of some common easing functions at\n * http://easings.net/\n *\n * ### Predefined animations\n *\n * The `Easing` module provides several predefined animations through the\n * following methods:\n *\n * - [`back`](docs/easing.html#back) provides a simple animation where the\n * object goes slightly back before moving forward\n * - [`bounce`](docs/easing.html#bounce) provides a bouncing animation\n * - [`ease`](docs/easing.html#ease) provides a simple inertial animation\n * - [`elastic`](docs/easing.html#elastic) provides a simple spring interaction\n *\n * ### Standard functions\n *\n * Three standard easing functions are provided:\n *\n * - [`linear`](docs/easing.html#linear)\n * - [`quad`](docs/easing.html#quad)\n * - [`cubic`](docs/easing.html#cubic)\n *\n * The [`poly`](docs/easing.html#poly) function can be used to implement\n * quartic, quintic, and other higher power functions.\n *\n * ### Additional functions\n *\n * Additional mathematical functions are provided by the following methods:\n *\n * - [`bezier`](docs/easing.html#bezier) provides a cubic bezier curve\n * - [`circle`](docs/easing.html#circle) provides a circular function\n * - [`sin`](docs/easing.html#sin) provides a sinusoidal function\n * - [`exp`](docs/easing.html#exp) provides an exponential function\n *\n * The following helpers are used to modify other easing functions.\n *\n * - [`in`](docs/easing.html#in) runs an easing function forwards\n * - [`inOut`](docs/easing.html#inout) makes any easing function symmetrical\n * - [`out`](docs/easing.html#out) runs an easing function backwards\n */\n\nexport type EasingFunction = (t: number) => number;\n\n/**\n * @deprecated Please use `EasingFunction` type instead.\n */\nexport type EasingFn = EasingFunction;\n\nexport type EasingFunctionFactory = { factory: () => EasingFunction };\n\n/**\n * @deprecated Please use `EasingFunctionFactory` type instead.\n */\nexport type EasingFactoryFn = EasingFunctionFactory;\n/**\n * A linear function, `f(t) = t`. Position correlates to elapsed time one to\n * one.\n *\n * http://cubic-bezier.com/#0,0,1,1\n */\nfunction linear(t: number): number {\n 'worklet';\n return t;\n}\n\n/**\n * A simple inertial interaction, similar to an object slowly accelerating to\n * speed.\n *\n * http://cubic-bezier.com/#.42,0,1,1\n */\nfunction ease(t: number): number {\n 'worklet';\n return Bezier(0.42, 0, 1, 1)(t);\n}\n\n/**\n * A quadratic function, `f(t) = t * t`. Position equals the square of elapsed\n * time.\n *\n * http://easings.net/#easeInQuad\n */\nfunction quad(t: number): number {\n 'worklet';\n return t * t;\n}\n\n/**\n * A cubic function, `f(t) = t * t * t`. Position equals the cube of elapsed\n * time.\n *\n * http://easings.net/#easeInCubic\n */\nfunction cubic(t: number): number {\n 'worklet';\n return t * t * t;\n}\n\n/**\n * A power function. Position is equal to the Nth power of elapsed time.\n *\n * n = 4: http://easings.net/#easeInQuart\n * n = 5: http://easings.net/#easeInQuint\n */\nfunction poly(n: number): EasingFunction {\n 'worklet';\n return (t) => {\n 'worklet';\n return Math.pow(t, n);\n };\n}\n\n/**\n * A sinusoidal function.\n *\n * http://easings.net/#easeInSine\n */\nfunction sin(t: number): number {\n 'worklet';\n return 1 - Math.cos((t * Math.PI) / 2);\n}\n\n/**\n * A circular function.\n *\n * http://easings.net/#easeInCirc\n */\nfunction circle(t: number): number {\n 'worklet';\n return 1 - Math.sqrt(1 - t * t);\n}\n\n/**\n * An exponential function.\n *\n * http://easings.net/#easeInExpo\n */\nfunction exp(t: number): number {\n 'worklet';\n return Math.pow(2, 10 * (t - 1));\n}\n\n/**\n * A simple elastic interaction, similar to a spring oscillating back and\n * forth.\n *\n * Default bounciness is 1, which overshoots a little bit once. 0 bounciness\n * doesn't overshoot at all, and bounciness of N > 1 will overshoot about N\n * times.\n *\n * http://easings.net/#easeInElastic\n */\nfunction elastic(bounciness = 1): EasingFunction {\n 'worklet';\n const p = bounciness * Math.PI;\n return (t) => {\n 'worklet';\n return 1 - Math.pow(Math.cos((t * Math.PI) / 2), 3) * Math.cos(t * p);\n };\n}\n\n/**\n * Use with `Animated.parallel()` to create a simple effect where the object\n * animates back slightly as the animation starts.\n *\n * Wolfram Plot:\n *\n * - http://tiny.cc/back_default (s = 1.70158, default)\n */\nfunction back(s = 1.70158): (t: number) => number {\n 'worklet';\n return (t) => {\n 'worklet';\n return t * t * ((s + 1) * t - s);\n };\n}\n\n/**\n * Provides a simple bouncing effect.\n *\n * http://easings.net/#easeInBounce\n */\nfunction bounce(t: number): number {\n 'worklet';\n if (t < 1 / 2.75) {\n return 7.5625 * t * t;\n }\n\n if (t < 2 / 2.75) {\n const t2 = t - 1.5 / 2.75;\n return 7.5625 * t2 * t2 + 0.75;\n }\n\n if (t < 2.5 / 2.75) {\n const t2 = t - 2.25 / 2.75;\n return 7.5625 * t2 * t2 + 0.9375;\n }\n\n const t2 = t - 2.625 / 2.75;\n return 7.5625 * t2 * t2 + 0.984375;\n}\n\n/**\n * Provides a cubic bezier curve, equivalent to CSS Transitions'\n * `transition-timing-function`.\n *\n * A useful tool to visualize cubic bezier curves can be found at\n * http://cubic-bezier.com/\n */\nfunction bezier(\n x1: number,\n y1: number,\n x2: number,\n y2: number\n): { factory: () => (x: number) => number } {\n 'worklet';\n return {\n factory: () => {\n 'worklet';\n return Bezier(x1, y1, x2, y2);\n },\n };\n}\n\nfunction bezierFn(\n x1: number,\n y1: number,\n x2: number,\n y2: number\n): (x: number) => number {\n 'worklet';\n return Bezier(x1, y1, x2, y2);\n}\n\n/**\n * Runs an easing function forwards.\n */\nfunction in_(easing: EasingFunction): EasingFunction {\n 'worklet';\n return easing;\n}\n\n/**\n * Runs an easing function backwards.\n */\nfunction out(easing: EasingFunction): EasingFunction {\n 'worklet';\n return (t) => {\n 'worklet';\n return 1 - easing(1 - t);\n };\n}\n\n/**\n * Makes any easing function symmetrical. The easing function will run\n * forwards for half of the duration, then backwards for the rest of the\n * duration.\n */\nfunction inOut(easing: EasingFunction): EasingFunction {\n 'worklet';\n return (t) => {\n 'worklet';\n if (t < 0.5) {\n return easing(t * 2) / 2;\n }\n return 1 - easing((1 - t) * 2) / 2;\n };\n}\n\n/**\n * The `steps` easing function jumps between discrete values at regular intervals,\n * creating a stepped animation effect. The `n` parameter determines the number of\n * steps in the animation, and the `roundToNextStep` parameter determines whether the animation\n * should start at the beginning or end of each step.\n */\nfunction steps(n = 10, roundToNextStep = true): EasingFunction {\n 'worklet';\n return (t) => {\n 'worklet';\n const value = Math.min(Math.max(t, 0), 1) * n;\n if (roundToNextStep) {\n return Math.ceil(value) / n;\n }\n return Math.floor(value) / n;\n };\n}\n\nconst EasingObject = {\n linear,\n ease,\n quad,\n cubic,\n poly,\n sin,\n circle,\n exp,\n elastic,\n back,\n bounce,\n bezier,\n bezierFn,\n steps,\n in: in_,\n out,\n inOut,\n};\n\nexport const Easing = EasingObject;\n","import type { MeasuredDimensions, ShadowNodeWrapper } from './commonTypes';\nimport {\n isChromeDebugger,\n isJest,\n isWeb,\n shouldBeUseWeb,\n} from './PlatformChecker';\n\nimport type { AnimatedRef } from './hook/commonTypes';\nimport type { Component } from 'react';\nimport type { ScrollView } from 'react-native';\n\nconst IS_NATIVE = !shouldBeUseWeb();\n\nexport let measure: (\n animatedRef: AnimatedRef\n) => MeasuredDimensions | null;\n\nif (isWeb()) {\n measure = (animatedRef) => {\n const element = (animatedRef as any)();\n\n if (element === -1) {\n console.warn(\n `[Reanimated] The view with tag ${element} is not a valid argument for measure(). This may be because the view is not currently rendered, which may not be a bug (e.g. an off-screen FlatList item).`\n );\n return null;\n }\n\n const viewportOffset = (element as HTMLElement).getBoundingClientRect();\n return {\n width: element.offsetWidth,\n height: element.offsetHeight,\n x: element.offsetLeft,\n y: element.offsetTop,\n pageX: viewportOffset.left,\n pageY: viewportOffset.top,\n };\n };\n} else if (isChromeDebugger()) {\n measure = () => {\n console.warn('[Reanimated] measure() cannot be used with Chrome Debugger.');\n return null;\n };\n} else if (isJest()) {\n measure = () => {\n console.warn('[Reanimated] measure() cannot be used with Jest.');\n return null;\n };\n} else if (IS_NATIVE) {\n measure = (animatedRef) => {\n 'worklet';\n if (!_WORKLET) {\n return null;\n }\n\n const viewTag = (animatedRef as any)();\n if (viewTag === -1) {\n console.warn(\n `[Reanimated] The view with tag ${viewTag} is not a valid argument for measure(). This may be because the view is not currently rendered, which may not be a bug (e.g. an off-screen FlatList item).`\n );\n return null;\n }\n\n const measured = global._IS_FABRIC\n ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n _measureFabric!(viewTag as ShadowNodeWrapper)\n : // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n _measurePaper!(viewTag as number);\n if (measured === null) {\n console.warn(\n `[Reanimated] The view with tag ${viewTag} has some undefined, not-yet-computed or meaningless value of \\`LayoutMetrics\\` type. This may be because the view is not currently rendered, which may not be a bug (e.g. an off-screen FlatList item).`\n );\n return null;\n } else if (measured.x === -1234567) {\n console.warn(\n `[Reanimated] The view with tag ${viewTag} returned an invalid measurement response.`\n );\n return null;\n } else if (isNaN(measured.x)) {\n console.warn(\n `[Reanimated] The view with tag ${viewTag} gets view-flattened on Android. To disable view-flattening, set \\`collapsable={false}\\` on this component.`\n );\n return null;\n } else {\n return measured;\n }\n };\n} else {\n measure = () => {\n console.warn(\n '[Reanimated] measure() is not supported on this configuration.'\n );\n return null;\n };\n}\n\nexport let dispatchCommand: (\n animatedRef: AnimatedRef,\n commandName: string,\n args?: Array\n) => void;\n\nif (IS_NATIVE && global._IS_FABRIC) {\n dispatchCommand = (animatedRef, commandName, args = []) => {\n 'worklet';\n if (!_WORKLET) {\n return;\n }\n\n const shadowNodeWrapper = animatedRef() as ShadowNodeWrapper;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n _dispatchCommandFabric!(shadowNodeWrapper, commandName, args);\n };\n} else if (IS_NATIVE) {\n dispatchCommand = (animatedRef, commandName, args = []) => {\n 'worklet';\n if (!_WORKLET) {\n return;\n }\n\n const viewTag = animatedRef() as number;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n _dispatchCommandPaper!(viewTag, commandName, args);\n };\n} else if (isWeb()) {\n dispatchCommand = () => {\n console.warn('[Reanimated] dispatchCommand() is not supported on web.');\n };\n} else if (isChromeDebugger()) {\n dispatchCommand = () => {\n console.warn(\n '[Reanimated] dispatchCommand() is not supported with Chrome Debugger.'\n );\n };\n} else if (isJest()) {\n dispatchCommand = () => {\n console.warn('[Reanimated] dispatchCommand() is not supported with Jest.');\n };\n} else {\n dispatchCommand = () => {\n console.warn(\n '[Reanimated] dispatchCommand() is not supported on this configuration.'\n );\n };\n}\n\nexport let scrollTo: (\n animatedRef: AnimatedRef,\n x: number,\n y: number,\n animated: boolean\n) => void;\n\nif (isWeb()) {\n scrollTo = (animatedRef, x, y, animated) => {\n const element = animatedRef();\n\n // This prevents crashes if ref has not been set yet\n if (element !== -1) {\n // By ScrollView we mean any scrollable component\n (element as ScrollView)?.scrollTo({ x, y, animated });\n }\n };\n} else if (IS_NATIVE && global._IS_FABRIC) {\n scrollTo = (animatedRef, x, y, animated) => {\n 'worklet';\n dispatchCommand(animatedRef as any, 'scrollTo', [x, y, animated]);\n };\n} else if (IS_NATIVE) {\n scrollTo = (animatedRef, x, y, animated) => {\n 'worklet';\n if (!_WORKLET) {\n return;\n }\n\n // Calling animatedRef on Paper returns a number (nativeTag)\n const viewTag = (animatedRef as any)() as number;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n _scrollToPaper!(viewTag, x, y, animated);\n };\n} else if (isChromeDebugger()) {\n scrollTo = () => {\n console.warn(\n '[Reanimated] scrollTo() is not supported with Chrome Debugger.'\n );\n };\n} else if (isJest()) {\n scrollTo = () => {\n console.warn('[Reanimated] scrollTo() is not supported with Jest.');\n };\n} else {\n scrollTo = () => {\n console.warn(\n '[Reanimated] scrollTo() is not supported on this configuration.'\n );\n };\n}\n\nexport let setGestureState: (handlerTag: number, newState: number) => void;\n\nif (IS_NATIVE) {\n setGestureState = (handlerTag, newState) => {\n 'worklet';\n if (!_WORKLET) {\n console.warn(\n '[Reanimated] You can not use setGestureState in non-worklet function.'\n );\n return;\n }\n _setGestureState(handlerTag, newState);\n };\n} else if (isWeb()) {\n setGestureState = () => {\n console.warn('[Reanimated] setGestureState() is not available on web.');\n };\n} else if (isChromeDebugger()) {\n setGestureState = () => {\n console.warn(\n '[Reanimated] setGestureState() cannot be used with Chrome Debugger.'\n );\n };\n} else if (isJest()) {\n setGestureState = () => {\n console.warn('[Reanimated] setGestureState() cannot be used with Jest.');\n };\n} else {\n setGestureState = () => {\n console.warn(\n '[Reanimated] setGestureState() is not supported on this configuration.'\n );\n };\n}\n","import { NativeModules } from 'react-native';\nimport type {\n ShareableRef,\n ShareableSyncDataHolderRef,\n Value3D,\n ValueRotation,\n} from '../commonTypes';\nimport type {\n LayoutAnimationFunction,\n LayoutAnimationType,\n} from '../layoutReanimation';\nimport { checkCppVersion } from '../platform-specific/checkCppVersion';\nimport type { WorkletRuntime } from '../runtimes';\nimport { getValueUnpackerCode } from '../valueUnpacker';\n\n// this is the type of `__reanimatedModuleProxy` which is injected using JSI\nexport interface NativeReanimatedModule {\n installValueUnpacker(valueUnpackerCode: string): void;\n makeShareableClone(\n value: T,\n shouldPersistRemote: boolean\n ): ShareableRef;\n makeSynchronizedDataHolder(\n valueRef: ShareableRef\n ): ShareableSyncDataHolderRef;\n getDataSynchronously(ref: ShareableSyncDataHolderRef): T;\n scheduleOnUI(shareable: ShareableRef): void;\n createWorkletRuntime(\n name: string,\n initializer: ShareableRef<() => void>\n ): WorkletRuntime;\n registerEventHandler(\n eventHandler: ShareableRef,\n eventName: string,\n emitterReactTag: number\n ): number;\n unregisterEventHandler(id: number): void;\n getViewProp(\n viewTag: number,\n propName: string,\n callback?: (result: T) => void\n ): Promise;\n enableLayoutAnimations(flag: boolean): void;\n registerSensor(\n sensorType: number,\n interval: number,\n iosReferenceFrame: number,\n handler: ShareableRef<(data: Value3D | ValueRotation) => void>\n ): number;\n unregisterSensor(sensorId: number): void;\n configureProps(uiProps: string[], nativeProps: string[]): void;\n subscribeForKeyboardEvents(\n handler: ShareableRef,\n isStatusBarTranslucent: boolean\n ): number;\n unsubscribeFromKeyboardEvents(listenerId: number): void;\n configureLayoutAnimation(\n viewTag: number,\n type: LayoutAnimationType,\n sharedTransitionTag: string,\n config: ShareableRef\n ): void;\n}\n\nexport class NativeReanimated {\n native = true;\n private InnerNativeModule: NativeReanimatedModule;\n\n constructor() {\n if (global.__reanimatedModuleProxy === undefined) {\n const { ReanimatedModule } = NativeModules;\n ReanimatedModule?.installTurboModule();\n }\n if (global.__reanimatedModuleProxy === undefined) {\n throw new Error(\n `[Reanimated] Native part of Reanimated doesn't seem to be initialized.\nSee https://docs.swmansion.com/react-native-reanimated/docs/guides/troubleshooting#Native-part-of-reanimated-doesnt-seem-to-be-initialized for more details.`\n );\n }\n checkCppVersion();\n this.InnerNativeModule = global.__reanimatedModuleProxy;\n this.InnerNativeModule.installValueUnpacker(getValueUnpackerCode());\n }\n\n makeShareableClone(value: T, shouldPersistRemote: boolean) {\n return this.InnerNativeModule.makeShareableClone(\n value,\n shouldPersistRemote\n );\n }\n\n makeSynchronizedDataHolder(valueRef: ShareableRef) {\n return this.InnerNativeModule.makeSynchronizedDataHolder(valueRef);\n }\n\n getDataSynchronously(ref: ShareableSyncDataHolderRef) {\n return this.InnerNativeModule.getDataSynchronously(ref);\n }\n\n scheduleOnUI(shareable: ShareableRef) {\n return this.InnerNativeModule.scheduleOnUI(shareable);\n }\n\n createWorkletRuntime(name: string, initializer: ShareableRef<() => void>) {\n return this.InnerNativeModule.createWorkletRuntime(name, initializer);\n }\n\n registerSensor(\n sensorType: number,\n interval: number,\n iosReferenceFrame: number,\n handler: ShareableRef<(data: Value3D | ValueRotation) => void>\n ) {\n return this.InnerNativeModule.registerSensor(\n sensorType,\n interval,\n iosReferenceFrame,\n handler\n );\n }\n\n unregisterSensor(sensorId: number) {\n return this.InnerNativeModule.unregisterSensor(sensorId);\n }\n\n registerEventHandler(\n eventHandler: ShareableRef,\n eventName: string,\n emitterReactTag: number\n ) {\n return this.InnerNativeModule.registerEventHandler(\n eventHandler,\n eventName,\n emitterReactTag\n );\n }\n\n unregisterEventHandler(id: number) {\n return this.InnerNativeModule.unregisterEventHandler(id);\n }\n\n getViewProp(\n viewTag: number,\n propName: string,\n callback?: (result: T) => void\n ) {\n return this.InnerNativeModule.getViewProp(viewTag, propName, callback);\n }\n\n configureLayoutAnimation(\n viewTag: number,\n type: LayoutAnimationType,\n sharedTransitionTag: string,\n config: ShareableRef\n ) {\n this.InnerNativeModule.configureLayoutAnimation(\n viewTag,\n type,\n sharedTransitionTag,\n config\n );\n }\n\n enableLayoutAnimations(flag: boolean) {\n this.InnerNativeModule.enableLayoutAnimations(flag);\n }\n\n configureProps(uiProps: string[], nativeProps: string[]) {\n this.InnerNativeModule.configureProps(uiProps, nativeProps);\n }\n\n subscribeForKeyboardEvents(\n handler: ShareableRef,\n isStatusBarTranslucent: boolean\n ) {\n return this.InnerNativeModule.subscribeForKeyboardEvents(\n handler,\n isStatusBarTranslucent\n );\n }\n\n unsubscribeFromKeyboardEvents(listenerId: number) {\n this.InnerNativeModule.unsubscribeFromKeyboardEvents(listenerId);\n }\n}\n","import reanimatedJS from '../js-reanimated';\nimport { shouldBeUseWeb } from '../PlatformChecker';\nimport { NativeReanimated } from './NativeReanimated';\n\nexport default shouldBeUseWeb() ? reanimatedJS : new NativeReanimated();\n","import { Platform } from 'react-native';\n\nexport function isJest(): boolean {\n return !!process.env.JEST_WORKER_ID;\n}\n\nexport function isChromeDebugger(): boolean {\n return !(global as any).nativeCallSyncHook || (global as any).__REMOTEDEV__;\n}\n\nexport function isWeb(): boolean {\n return Platform.OS === 'web';\n}\n\nexport function isAndroid(): boolean {\n return Platform.OS === 'android';\n}\n\nfunction isWindows(): boolean {\n return Platform.OS === 'windows';\n}\n\nexport function shouldBeUseWeb() {\n return isJest() || isChromeDebugger() || isWeb() || isWindows();\n}\n\nexport function nativeShouldBeMock() {\n return isJest() || isChromeDebugger() || isWindows();\n}\n\nexport function isWindowAvailable() {\n // the window object is unavailable when building the server portion of a site that uses SSG\n // this function shouldn't be used to conditionally render components\n // https://www.joshwcomeau.com/react/the-perils-of-rehydration/\n return typeof window !== 'undefined';\n}\n\nexport function isReducedMotion() {\n return isWeb()\n ? isWindowAvailable()\n ? !window.matchMedia('(prefers-reduced-motion: no-preference)').matches\n : false\n : global._REANIMATED_IS_REDUCED_MOTION ?? false;\n}\n","import { addWhitelistedNativeProps } from '../ConfigHelper';\nimport type { __AdapterWorkletFunction } from './commonTypes';\nimport type { AnimatedPropsAdapterFunction } from './helperTypes';\n\n// TODO TYPESCRIPT This is a temporary type to get rid of .d.ts file.\ntype createAnimatedPropAdapterType = (\n adapter: AnimatedPropsAdapterFunction,\n nativeProps?: string[]\n) => AnimatedPropsAdapterFunction;\n\nexport const createAnimatedPropAdapter = ((\n adapter: __AdapterWorkletFunction,\n nativeProps?: string[]\n): __AdapterWorkletFunction => {\n const nativePropsToAdd: { [key: string]: boolean } = {};\n // eslint-disable-next-line no-unused-expressions\n nativeProps?.forEach((prop) => {\n nativePropsToAdd[prop] = true;\n });\n addWhitelistedNativeProps(nativePropsToAdd);\n return adapter;\n}) as createAnimatedPropAdapterType;\n","import { runOnUI } from './threads';\n\nlet viewTags: number[] = [];\n\nexport function removeFromPropsRegistry(viewTag: number) {\n viewTags.push(viewTag);\n if (viewTags.length === 1) {\n queueMicrotask(flush);\n }\n}\n\nfunction flush() {\n if (__DEV__ && !global._IS_FABRIC) {\n throw new Error('[Reanimated] PropsRegistry is only available on Fabric.');\n }\n runOnUI(removeFromPropsRegistryOnUI)(viewTags);\n viewTags = [];\n}\n\nfunction removeFromPropsRegistryOnUI(viewTags: number[]) {\n 'worklet';\n _removeFromPropsRegistry(viewTags);\n}\n","import NativeReanimatedModule from './NativeReanimated';\nimport type {\n SensorConfig,\n SharedValue,\n Value3D,\n ValueRotation,\n ShareableRef,\n} from './commonTypes';\nimport { SensorType } from './commonTypes';\nimport { makeMutable } from './mutables';\n\nfunction initSensorData(\n sensorType: SensorType\n): SharedValue {\n if (sensorType === SensorType.ROTATION) {\n return makeMutable({\n qw: 0,\n qx: 0,\n qy: 0,\n qz: 0,\n yaw: 0,\n pitch: 0,\n roll: 0,\n interfaceOrientation: 0,\n });\n } else {\n return makeMutable({\n x: 0,\n y: 0,\n z: 0,\n interfaceOrientation: 0,\n });\n }\n}\n\nexport default class Sensor {\n public listenersNumber = 0;\n private sensorId: number | null = null;\n private sensorType: SensorType;\n private data: SharedValue;\n private config: SensorConfig;\n\n constructor(sensorType: SensorType, config: SensorConfig) {\n this.sensorType = sensorType;\n this.config = config;\n this.data = initSensorData(sensorType);\n }\n\n register(\n eventHandler: ShareableRef<(data: Value3D | ValueRotation) => void>\n ) {\n const config = this.config;\n const sensorType = this.sensorType;\n this.sensorId = NativeReanimatedModule.registerSensor(\n sensorType,\n config.interval === 'auto' ? -1 : config.interval,\n config.iosReferenceFrame,\n eventHandler\n );\n return this.sensorId !== -1;\n }\n\n isRunning() {\n return this.sensorId !== -1 && this.sensorId !== null;\n }\n\n isAvailable() {\n return this.sensorId !== -1;\n }\n\n getSharedValue() {\n return this.data;\n }\n\n unregister() {\n if (this.sensorId !== null && this.sensorId !== -1) {\n NativeReanimatedModule.unregisterSensor(this.sensorId);\n }\n this.sensorId = null;\n }\n}\n","import type {\n SensorType,\n SensorConfig,\n Value3D,\n ValueRotation,\n ShareableRef,\n SharedValue,\n} from './commonTypes';\nimport Sensor from './Sensor';\n\nexport class SensorContainer {\n private nativeSensors: Map = new Map();\n\n getSensorId(sensorType: SensorType, config: SensorConfig) {\n return (\n sensorType * 100 +\n config.iosReferenceFrame * 10 +\n Number(config.adjustToInterfaceOrientation)\n );\n }\n\n initializeSensor(\n sensorType: SensorType,\n config: SensorConfig\n ): SharedValue {\n const sensorId = this.getSensorId(sensorType, config);\n\n if (!this.nativeSensors.has(sensorId)) {\n const newSensor = new Sensor(sensorType, config);\n this.nativeSensors.set(sensorId, newSensor);\n }\n\n const sensor = this.nativeSensors.get(sensorId);\n return sensor!.getSharedValue();\n }\n\n registerSensor(\n sensorType: SensorType,\n config: SensorConfig,\n handler: ShareableRef<(data: Value3D | ValueRotation) => void>\n ): number {\n const sensorId = this.getSensorId(sensorType, config);\n\n if (!this.nativeSensors.has(sensorId)) {\n return -1;\n }\n\n const sensor = this.nativeSensors.get(sensorId);\n if (\n sensor &&\n sensor.isAvailable() &&\n (sensor.isRunning() || sensor.register(handler))\n ) {\n sensor.listenersNumber++;\n return sensorId;\n }\n return -1;\n }\n\n unregisterSensor(sensorId: number) {\n if (this.nativeSensors.has(sensorId)) {\n const sensor = this.nativeSensors.get(sensorId);\n if (sensor && sensor.isRunning()) {\n sensor.listenersNumber--;\n if (sensor.listenersNumber === 0) {\n sensor.unregister();\n }\n }\n }\n }\n}\n","import type { ShadowNodeWrapper, StyleProps } from './commonTypes';\nimport {\n isChromeDebugger,\n isJest,\n isWeb,\n shouldBeUseWeb,\n} from './PlatformChecker';\n\nimport type { AnimatedRef } from './hook/commonTypes';\nimport type { Component } from 'react';\nimport { _updatePropsJS } from './js-reanimated';\nimport { processColorsInProps } from './Colors';\n\nconst IS_NATIVE = !shouldBeUseWeb();\n\nexport let setNativeProps: (\n animatedRef: AnimatedRef,\n updates: StyleProps\n) => void;\n\nif (isWeb()) {\n setNativeProps = (_animatedRef, _updates) => {\n const component = (_animatedRef as any)();\n _updatePropsJS(_updates, { _component: component });\n };\n} else if (IS_NATIVE && global._IS_FABRIC) {\n setNativeProps = (animatedRef, updates) => {\n 'worklet';\n if (!_WORKLET) {\n console.warn(\n '[Reanimated] setNativeProps() can only be used on the UI runtime.'\n );\n return;\n }\n const shadowNodeWrapper = (animatedRef as any)() as ShadowNodeWrapper;\n processColorsInProps(updates);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n _updatePropsFabric!([{ shadowNodeWrapper, updates }]);\n };\n} else if (IS_NATIVE) {\n setNativeProps = (animatedRef, updates) => {\n 'worklet';\n if (!_WORKLET) {\n console.warn(\n '[Reanimated] setNativeProps() can only be used on the UI runtime.'\n );\n return;\n }\n const tag = (animatedRef as any)() as number;\n const name = (animatedRef as any).viewName.value;\n processColorsInProps(updates);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n _updatePropsPaper!([{ tag, name, updates }]);\n };\n} else if (isChromeDebugger()) {\n setNativeProps = () => {\n console.warn(\n '[Reanimated] setNativeProps() is not supported with Chrome Debugger.'\n );\n };\n} else if (isJest()) {\n setNativeProps = () => {\n console.warn('[Reanimated] setNativeProps() is not supported with Jest.');\n };\n} else {\n setNativeProps = () => {\n console.warn(\n '[Reanimated] setNativeProps() is not supported on this configuration.'\n );\n };\n}\n","import type { MutableRefObject } from 'react';\nimport { processColorsInProps } from './Colors';\nimport type { ShadowNodeWrapper, SharedValue, StyleProps } from './commonTypes';\nimport type { AnimatedStyle } from './helperTypes';\nimport type { Descriptor } from './hook/commonTypes';\nimport { _updatePropsJS } from './js-reanimated';\nimport { shouldBeUseWeb } from './PlatformChecker';\nimport type { ViewRefSet } from './ViewDescriptorsSet';\nimport { runOnUIImmediately } from './threads';\n\nlet updateProps: (\n viewDescriptor: SharedValue,\n updates: StyleProps | AnimatedStyle,\n maybeViewRef: ViewRefSet | undefined,\n isAnimatedProps?: boolean\n) => void;\n\nif (shouldBeUseWeb()) {\n updateProps = (_, updates, maybeViewRef, isAnimatedProps) => {\n 'worklet';\n if (maybeViewRef) {\n maybeViewRef.items.forEach((item, _) => {\n _updatePropsJS(updates, item, isAnimatedProps);\n });\n }\n };\n} else {\n updateProps = (viewDescriptors, updates) => {\n 'worklet';\n processColorsInProps(updates);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n global.UpdatePropsManager!.update(viewDescriptors, updates);\n };\n}\n\nexport const updatePropsJestWrapper = (\n viewDescriptors: SharedValue,\n updates: AnimatedStyle,\n maybeViewRef: ViewRefSet | undefined,\n animatedStyle: MutableRefObject>,\n adapters: ((updates: AnimatedStyle) => void)[]\n): void => {\n adapters.forEach((adapter) => {\n adapter(updates);\n });\n animatedStyle.current.value = {\n ...animatedStyle.current.value,\n ...updates,\n };\n\n updateProps(viewDescriptors, updates, maybeViewRef);\n};\n\nexport default updateProps;\n\nconst createUpdatePropsManager = global._IS_FABRIC\n ? () => {\n 'worklet';\n // Fabric\n const operations: {\n shadowNodeWrapper: ShadowNodeWrapper;\n updates: StyleProps | AnimatedStyle;\n }[] = [];\n return {\n update(\n viewDescriptors: SharedValue,\n updates: StyleProps | AnimatedStyle\n ) {\n viewDescriptors.value.forEach((viewDescriptor) => {\n operations.push({\n shadowNodeWrapper: viewDescriptor.shadowNodeWrapper,\n updates,\n });\n if (operations.length === 1) {\n queueMicrotask(this.flush);\n }\n });\n },\n flush() {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n _updatePropsFabric!(operations);\n operations.length = 0;\n },\n };\n }\n : () => {\n 'worklet';\n // Paper\n const operations: {\n tag: number;\n name: string;\n updates: StyleProps | AnimatedStyle;\n }[] = [];\n return {\n update(\n viewDescriptors: SharedValue,\n updates: StyleProps | AnimatedStyle\n ) {\n viewDescriptors.value.forEach((viewDescriptor) => {\n operations.push({\n tag: viewDescriptor.tag,\n name: viewDescriptor.name || 'RCTView',\n updates,\n });\n if (operations.length === 1) {\n queueMicrotask(this.flush);\n }\n });\n },\n flush() {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n _updatePropsPaper!(operations);\n operations.length = 0;\n },\n };\n };\n\nrunOnUIImmediately(() => {\n 'worklet';\n global.UpdatePropsManager = createUpdatePropsManager();\n})();\n\nexport interface UpdatePropsManager {\n update(\n viewDescriptors: SharedValue,\n updates: StyleProps | AnimatedStyle\n ): void;\n flush(): void;\n}\n","import { useRef } from 'react';\nimport { makeMutable } from './core';\nimport type { SharedValue } from './commonTypes';\nimport type { Descriptor } from './hook/commonTypes';\n\nexport interface ViewRefSet {\n items: Set;\n add: (item: T) => void;\n remove: (item: T) => void;\n}\n\nexport interface ViewDescriptorsSet {\n sharableViewDescriptors: SharedValue;\n add: (item: Descriptor) => void;\n remove: (viewTag: number) => void;\n}\n\nexport function makeViewDescriptorsSet(): ViewDescriptorsSet {\n const sharableViewDescriptors = makeMutable([]);\n const data: ViewDescriptorsSet = {\n sharableViewDescriptors,\n add: (item: Descriptor) => {\n sharableViewDescriptors.modify((descriptors: Descriptor[]) => {\n 'worklet';\n const index = descriptors.findIndex(\n (descriptor) => descriptor.tag === item.tag\n );\n if (index !== -1) {\n descriptors[index] = item;\n } else {\n descriptors.push(item);\n }\n return descriptors;\n });\n },\n\n remove: (viewTag: number) => {\n sharableViewDescriptors.modify((descriptors: Descriptor[]) => {\n 'worklet';\n const index = descriptors.findIndex(\n (descriptor) => descriptor.tag === viewTag\n );\n if (index !== -1) {\n descriptors.splice(index, 1);\n }\n return descriptors;\n });\n },\n };\n return data;\n}\n\nexport function makeViewsRefSet(): ViewRefSet {\n const ref = useRef | null>(null);\n if (ref.current === null) {\n const data: ViewRefSet = {\n items: new Set(),\n\n add: (item: T) => {\n if (data.items.has(item)) return;\n data.items.add(item);\n },\n\n remove: (item: T) => {\n data.items.delete(item);\n },\n };\n ref.current = data;\n }\n\n return ref.current;\n}\n","import type { NativeEvent } from './commonTypes';\nimport NativeReanimatedModule from './NativeReanimated';\nimport { registerEventHandler, unregisterEventHandler } from './core';\n\nfunction jsListener>(\n eventName: string,\n handler: (event: T) => void\n) {\n return (evt: T) => {\n handler({ ...evt.nativeEvent, eventName });\n };\n}\n\nexport default class WorkletEventHandler> {\n worklet: (event: T) => void;\n eventNames: string[];\n reattachNeeded: boolean;\n listeners: Record void>;\n viewTag: number | undefined;\n registrations: number[];\n constructor(worklet: (event: T) => void, eventNames: string[] = []) {\n this.worklet = worklet;\n this.eventNames = eventNames;\n this.reattachNeeded = false;\n this.listeners = {};\n this.viewTag = undefined;\n this.registrations = [];\n\n if (!NativeReanimatedModule.native) {\n this.listeners = eventNames.reduce(\n (acc: Record void>, eventName: string) => {\n acc[eventName] = jsListener(eventName, worklet);\n return acc;\n },\n {}\n );\n }\n }\n\n updateWorklet(newWorklet: (event: T) => void): void {\n this.worklet = newWorklet;\n this.reattachNeeded = true;\n }\n\n registerForEvents(viewTag: number, fallbackEventName?: string): void {\n this.viewTag = viewTag;\n this.registrations = this.eventNames.map((eventName) =>\n registerEventHandler(this.worklet, eventName, viewTag)\n );\n if (this.registrations.length === 0 && fallbackEventName) {\n this.registrations.push(\n registerEventHandler(this.worklet, fallbackEventName, viewTag)\n );\n }\n }\n\n registerForEventByName(eventName: string) {\n this.registrations.push(registerEventHandler(this.worklet, eventName));\n }\n\n unregisterFromEvents(): void {\n this.registrations.forEach((id) => unregisterEventHandler(id));\n this.registrations = [];\n }\n}\n","import { defineAnimation, getReduceMotionForAnimation } from './util';\nimport type {\n Animation,\n AnimationCallback,\n AnimationObject,\n AnimatableValue,\n Timestamp,\n ReduceMotion,\n} from '../commonTypes';\nimport { isWeb } from '../PlatformChecker';\n\ninterface DecayConfig {\n deceleration?: number;\n velocityFactor?: number;\n rubberBandEffect?: boolean;\n clamp?: number[];\n velocity?: number;\n reduceMotion?: ReduceMotion;\n}\n\nexport type WithDecayConfig = DecayConfig;\n\ninterface DefaultDecayConfig {\n deceleration: number;\n velocityFactor: number;\n clamp?: number[];\n velocity: number;\n reduceMotion?: ReduceMotion;\n rubberBandEffect?: boolean;\n rubberBandFactor: number;\n}\n\nexport interface DecayAnimation extends Animation {\n lastTimestamp: Timestamp;\n startTimestamp: Timestamp;\n initialVelocity: number;\n velocity: number;\n current: AnimatableValue;\n}\n\ninterface InnerDecayAnimation\n extends Omit,\n AnimationObject {\n current: number;\n}\n\nconst IS_WEB = isWeb();\n\n// TODO TYPESCRIPT This is a temporary type to get rid of .d.ts file.\ntype withDecayType = (\n userConfig: DecayConfig,\n callback?: AnimationCallback\n) => number;\n\nexport const withDecay = function (\n userConfig: DecayConfig,\n callback?: AnimationCallback\n): Animation {\n 'worklet';\n\n return defineAnimation(0, () => {\n 'worklet';\n const config: DefaultDecayConfig = {\n deceleration: 0.998,\n velocityFactor: 1,\n velocity: 0,\n rubberBandFactor: 0.6,\n };\n if (userConfig) {\n Object.keys(userConfig).forEach(\n (key) =>\n ((config as any)[key] = userConfig[key as keyof typeof userConfig])\n );\n }\n\n const VELOCITY_EPS = IS_WEB ? 1 / 20 : 1;\n const DERIVATIVE_EPS = 0.1;\n const SLOPE_FACTOR = 0.1;\n\n let decay: (animation: InnerDecayAnimation, now: number) => boolean;\n\n if (config.rubberBandEffect) {\n decay = (animation: InnerDecayAnimation, now: number): boolean => {\n const { lastTimestamp, startTimestamp, current, velocity } = animation;\n\n const deltaTime = Math.min(now - lastTimestamp, 64);\n const clampIndex =\n Math.abs(current - config.clamp![0]) <\n Math.abs(current - config.clamp![1])\n ? 0\n : 1;\n\n let derivative = 0;\n if (current < config.clamp![0] || current > config.clamp![1]) {\n derivative = current - config.clamp![clampIndex];\n }\n\n const v =\n velocity *\n Math.exp(\n -(1 - config.deceleration) * (now - startTimestamp) * SLOPE_FACTOR\n ) -\n derivative * config.rubberBandFactor;\n\n if (Math.abs(derivative) > DERIVATIVE_EPS) {\n animation.springActive = true;\n } else if (animation.springActive) {\n animation.current = config.clamp![clampIndex];\n return true;\n } else if (Math.abs(v) < VELOCITY_EPS) {\n return true;\n }\n\n animation.current =\n current + (v * config.velocityFactor * deltaTime) / 1000;\n animation.velocity = v;\n animation.lastTimestamp = now;\n return false;\n };\n } else {\n decay = (animation: InnerDecayAnimation, now: number): boolean => {\n const {\n lastTimestamp,\n startTimestamp,\n initialVelocity,\n current,\n velocity,\n } = animation;\n\n const deltaTime = Math.min(now - lastTimestamp, 64);\n const v =\n velocity *\n Math.exp(\n -(1 - config.deceleration) * (now - startTimestamp) * SLOPE_FACTOR\n );\n animation.current =\n current + (v * config.velocityFactor * deltaTime) / 1000;\n animation.velocity = v;\n animation.lastTimestamp = now;\n\n if (config.clamp) {\n if (initialVelocity < 0 && animation.current <= config.clamp[0]) {\n animation.current = config.clamp[0];\n return true;\n } else if (\n initialVelocity > 0 &&\n animation.current >= config.clamp[1]\n ) {\n animation.current = config.clamp[1];\n return true;\n }\n }\n\n return Math.abs(v) < VELOCITY_EPS;\n };\n }\n\n function validateConfig(): void {\n if (config.clamp) {\n if (!Array.isArray(config.clamp)) {\n throw new Error(\n `[Reanimated] \\`config.clamp\\` must be an array but is ${typeof config.clamp}.`\n );\n }\n if (config.clamp.length !== 2) {\n throw new Error(\n `[Reanimated] \\`clamp array\\` must contain 2 items but is given ${config.clamp.length}.`\n );\n }\n }\n if (config.velocityFactor <= 0) {\n throw new Error(\n `[Reanimated] \\`config.velocityFactor\\` must be greather then 0 but is ${config.velocityFactor}.`\n );\n }\n if (config.rubberBandEffect && !config.clamp) {\n throw new Error(\n '[Reanimated] You need to set `clamp` property when using `rubberBandEffect`.'\n );\n }\n }\n\n function onStart(\n animation: DecayAnimation,\n value: number,\n now: Timestamp\n ): void {\n animation.current = value;\n animation.lastTimestamp = now;\n animation.startTimestamp = now;\n animation.initialVelocity = config.velocity;\n validateConfig();\n\n if (animation.reduceMotion && config.clamp) {\n if (value < config.clamp[0]) {\n animation.current = config.clamp[0];\n } else if (value > config.clamp[1]) {\n animation.current = config.clamp[1];\n }\n }\n }\n\n return {\n onFrame: decay,\n onStart,\n callback,\n velocity: config.velocity ?? 0,\n initialVelocity: 0,\n current: 0,\n lastTimestamp: 0,\n startTimestamp: 0,\n reduceMotion: getReduceMotionForAnimation(config.reduceMotion),\n } as DecayAnimation;\n });\n} as unknown as withDecayType;\n","import { defineAnimation, getReduceMotionForAnimation } from './util';\nimport type {\n Animation,\n Timestamp,\n AnimatableValue,\n AnimationObject,\n ReduceMotion,\n} from '../commonTypes';\nimport type { DelayAnimation } from './commonTypes';\n\n// TODO TYPESCRIPT This is a temporary type to get rid of .d.ts file.\ntype withDelayType = (\n delayMs: number,\n delayedAnimation: T,\n reduceMotion?: ReduceMotion\n) => T;\n\nexport const withDelay = function (\n delayMs: number,\n _nextAnimation: T | (() => T),\n reduceMotion?: ReduceMotion\n): Animation {\n 'worklet';\n return defineAnimation(\n _nextAnimation,\n (): DelayAnimation => {\n 'worklet';\n const nextAnimation =\n typeof _nextAnimation === 'function'\n ? _nextAnimation()\n : _nextAnimation;\n\n function delay(animation: DelayAnimation, now: Timestamp): boolean {\n const { startTime, started, previousAnimation } = animation;\n const current: AnimatableValue = animation.current;\n\n if (now - startTime > delayMs || animation.reduceMotion) {\n if (!started) {\n nextAnimation.onStart(\n nextAnimation,\n current,\n now,\n previousAnimation!\n );\n animation.previousAnimation = null;\n animation.started = true;\n }\n const finished = nextAnimation.onFrame(nextAnimation, now);\n animation.current = nextAnimation.current!;\n return finished;\n } else if (previousAnimation) {\n const finished =\n previousAnimation.finished ||\n previousAnimation.onFrame(previousAnimation, now);\n animation.current = previousAnimation.current;\n if (finished) {\n animation.previousAnimation = null;\n }\n }\n return false;\n }\n\n function onStart(\n animation: Animation,\n value: AnimatableValue,\n now: Timestamp,\n previousAnimation: Animation | null\n ): void {\n animation.startTime = now;\n animation.started = false;\n animation.current = value;\n if (previousAnimation === animation) {\n animation.previousAnimation = previousAnimation.previousAnimation;\n } else {\n animation.previousAnimation = previousAnimation;\n }\n\n // child animations inherit the setting, unless they already have it defined\n // they will have it defined only if the user used the `reduceMotion` prop\n if (nextAnimation.reduceMotion === undefined) {\n nextAnimation.reduceMotion = animation.reduceMotion;\n }\n }\n\n const callback = (finished?: boolean): void => {\n if (nextAnimation.callback) {\n nextAnimation.callback(finished);\n }\n };\n\n return {\n isHigherOrder: true,\n onFrame: delay,\n onStart,\n current: nextAnimation.current!,\n callback,\n previousAnimation: null,\n startTime: 0,\n started: false,\n reduceMotion: getReduceMotionForAnimation(reduceMotion),\n };\n }\n );\n} as withDelayType;\n","export type {\n HigherOrderAnimation,\n NextAnimation,\n DelayAnimation,\n RepeatAnimation,\n SequenceAnimation,\n StyleLayoutAnimation,\n} from './commonTypes';\nexport { cancelAnimation, defineAnimation, initialUpdaterRun } from './util';\nexport { withTiming } from './timing';\nexport type { TimingAnimation, WithTimingConfig } from './timing';\nexport { withSpring } from './spring';\nexport type { SpringAnimation, WithSpringConfig } from './springUtils';\nexport { withDecay } from './decay';\nexport type { DecayAnimation, WithDecayConfig } from './decay';\nexport { withDelay } from './delay';\nexport { withRepeat } from './repeat';\nexport { withSequence } from './sequence';\nexport { withStyleAnimation } from './styleAnimation';\n","import { defineAnimation, getReduceMotionForAnimation } from './util';\nimport type {\n Animation,\n AnimationCallback,\n AnimatableValue,\n Timestamp,\n AnimationObject,\n ReduceMotion,\n} from '../commonTypes';\nimport type { RepeatAnimation } from './commonTypes';\n\n// TODO TYPESCRIPT This is a temporary type to get rid of .d.ts file.\ntype withRepeatType = (\n animation: T,\n numberOfReps?: number,\n reverse?: boolean,\n callback?: AnimationCallback,\n reduceMotion?: ReduceMotion\n) => T;\n\nexport const withRepeat = function (\n _nextAnimation: T | (() => T),\n numberOfReps = 2,\n reverse = false,\n callback?: AnimationCallback,\n reduceMotion?: ReduceMotion\n): Animation {\n 'worklet';\n\n return defineAnimation(\n _nextAnimation,\n (): RepeatAnimation => {\n 'worklet';\n\n const nextAnimation =\n typeof _nextAnimation === 'function'\n ? _nextAnimation()\n : _nextAnimation;\n\n function repeat(animation: RepeatAnimation, now: Timestamp): boolean {\n const finished = nextAnimation.onFrame(nextAnimation, now);\n animation.current = nextAnimation.current;\n if (finished) {\n animation.reps += 1;\n // call inner animation's callback on every repetition\n // as the second argument the animation's current value is passed\n if (nextAnimation.callback) {\n nextAnimation.callback(true /* finished */, animation.current);\n }\n if (\n animation.reduceMotion ||\n (numberOfReps > 0 && animation.reps >= numberOfReps)\n ) {\n return true;\n }\n\n const startValue = reverse\n ? (nextAnimation.current as number)\n : animation.startValue;\n if (reverse) {\n nextAnimation.toValue = animation.startValue;\n animation.startValue = startValue;\n }\n nextAnimation.onStart(\n nextAnimation,\n startValue,\n now,\n nextAnimation.previousAnimation as RepeatAnimation\n );\n return false;\n }\n return false;\n }\n\n const repCallback = (finished?: boolean): void => {\n if (callback) {\n callback(finished);\n }\n // when cancelled call inner animation's callback\n if (!finished && nextAnimation.callback) {\n nextAnimation.callback(false /* finished */);\n }\n };\n\n function onStart(\n animation: RepeatAnimation,\n value: AnimatableValue,\n now: Timestamp,\n previousAnimation: Animation | null\n ): void {\n animation.startValue = value;\n animation.reps = 0;\n\n // child animations inherit the setting, unless they already have it defined\n // they will have it defined only if the user used the `reduceMotion` prop\n if (nextAnimation.reduceMotion === undefined) {\n nextAnimation.reduceMotion = animation.reduceMotion;\n }\n\n // don't start the animation if reduced motion is enabled and\n // the animation would end at its starting point\n if (\n animation.reduceMotion &&\n reverse &&\n (numberOfReps <= 0 || numberOfReps % 2 === 0)\n ) {\n animation.current = animation.startValue;\n animation.onFrame = () => true;\n } else {\n nextAnimation.onStart(nextAnimation, value, now, previousAnimation);\n }\n }\n\n return {\n isHigherOrder: true,\n onFrame: repeat,\n onStart,\n reps: 0,\n current: nextAnimation.current,\n callback: repCallback,\n startValue: 0,\n reduceMotion: getReduceMotionForAnimation(reduceMotion),\n };\n }\n );\n} as withRepeatType;\n","import { defineAnimation, getReduceMotionForAnimation } from './util';\nimport type { NextAnimation, SequenceAnimation } from './commonTypes';\nimport type {\n Animation,\n AnimatableValue,\n AnimationObject,\n ReduceMotion,\n Timestamp,\n} from '../commonTypes';\n\nexport function withSequence(\n _reduceMotion: ReduceMotion,\n ...animations: T[]\n): T;\n\nexport function withSequence(...animations: T[]): T;\n\nexport function withSequence(\n _reduceMotionOrFirstAnimation?: ReduceMotion | NextAnimation,\n ..._animations: NextAnimation[]\n): Animation {\n 'worklet';\n let reduceMotion: ReduceMotion | undefined;\n\n // the first argument is either a config or an animation\n // this is done to allow the reduce motion config prop to be optional\n if (_reduceMotionOrFirstAnimation) {\n if (typeof _reduceMotionOrFirstAnimation === 'string') {\n reduceMotion = _reduceMotionOrFirstAnimation as ReduceMotion;\n } else {\n _animations.unshift(\n _reduceMotionOrFirstAnimation as NextAnimation\n );\n }\n }\n\n if (_animations.length === 0) {\n console.warn('[Reanimated] No animation was provided for the sequence');\n\n return defineAnimation(0, () => {\n 'worklet';\n return {\n onStart: (animation, value) => (animation.current = value),\n onFrame: () => true,\n current: 0,\n animationIndex: 0,\n reduceMotion: getReduceMotionForAnimation(reduceMotion),\n } as SequenceAnimation;\n });\n }\n\n return defineAnimation(\n _animations[0] as SequenceAnimation,\n () => {\n 'worklet';\n\n const animations = _animations.map((a) => {\n const result = typeof a === 'function' ? a() : a;\n result.finished = false;\n return result;\n });\n\n function findNextNonReducedMotionAnimationIndex(index: number) {\n // the last animation is returned even if reduced motion is enabled,\n // because we want the sequence to finish at the right spot\n while (\n index < animations.length - 1 &&\n animations[index].reduceMotion\n ) {\n index++;\n }\n\n return index;\n }\n\n const callback = (finished: boolean): void => {\n if (finished) {\n // we want to call the callback after every single animation\n // not after all of them\n return;\n }\n // this is going to be called only if sequence has been cancelled\n animations.forEach((animation) => {\n if (typeof animation.callback === 'function' && !animation.finished) {\n animation.callback(finished);\n }\n });\n };\n\n function sequence(animation: SequenceAnimation, now: Timestamp): boolean {\n const currentAnim = animations[animation.animationIndex];\n const finished = currentAnim.onFrame(currentAnim, now);\n animation.current = currentAnim.current;\n if (finished) {\n // we want to call the callback after every single animation\n if (currentAnim.callback) {\n currentAnim.callback(true /* finished */);\n }\n currentAnim.finished = true;\n animation.animationIndex = findNextNonReducedMotionAnimationIndex(\n animation.animationIndex + 1\n );\n if (animation.animationIndex < animations.length) {\n const nextAnim = animations[animation.animationIndex];\n nextAnim.onStart(nextAnim, currentAnim.current, now, currentAnim);\n return false;\n }\n return true;\n }\n return false;\n }\n\n function onStart(\n animation: SequenceAnimation,\n value: AnimatableValue,\n now: Timestamp,\n previousAnimation: SequenceAnimation\n ): void {\n // child animations inherit the setting, unless they already have it defined\n // they will have it defined only if the user used the `reduceMotion` prop\n animations.forEach((anim) => {\n if (anim.reduceMotion === undefined) {\n anim.reduceMotion = animation.reduceMotion;\n }\n });\n animation.animationIndex = findNextNonReducedMotionAnimationIndex(0);\n\n if (previousAnimation === undefined) {\n previousAnimation = animations[\n animations.length - 1\n ] as SequenceAnimation;\n }\n\n const currentAnimation = animations[animation.animationIndex];\n currentAnimation.onStart(\n currentAnimation,\n value,\n now,\n previousAnimation\n );\n }\n\n return {\n isHigherOrder: true,\n onFrame: sequence,\n onStart,\n animationIndex: 0,\n current: animations[0].current,\n callback,\n reduceMotion: getReduceMotionForAnimation(reduceMotion),\n } as SequenceAnimation;\n }\n );\n}\n","import { defineAnimation, getReduceMotionForAnimation } from './util';\nimport type {\n Animation,\n AnimationCallback,\n AnimatableValue,\n Timestamp,\n} from '../commonTypes';\nimport type {\n SpringConfig,\n SpringAnimation,\n InnerSpringAnimation,\n SpringConfigInner,\n} from './springUtils';\nimport {\n initialCalculations,\n calculateNewMassToMatchDuration,\n underDampedSpringCalculations,\n criticallyDampedSpringCalculations,\n isAnimationTerminatingCalculation,\n} from './springUtils';\n\n// TODO TYPESCRIPT This is a temporary type to get rid of .d.ts file.\ntype withSpringType = (\n toValue: T,\n userConfig?: SpringConfig,\n callback?: AnimationCallback\n) => T;\n\nexport const withSpring = ((\n toValue: AnimatableValue,\n userConfig?: SpringConfig,\n callback?: AnimationCallback\n): Animation => {\n 'worklet';\n\n return defineAnimation(toValue, () => {\n 'worklet';\n const defaultConfig: Record = {\n damping: 10,\n mass: 1,\n stiffness: 100,\n overshootClamping: false,\n restDisplacementThreshold: 0.01,\n restSpeedThreshold: 2,\n velocity: 0,\n duration: 2000,\n dampingRatio: 0.5,\n reduceMotion: undefined,\n } as const;\n\n const config: Record & SpringConfigInner = {\n ...defaultConfig,\n ...userConfig,\n useDuration: !!(userConfig?.duration || userConfig?.dampingRatio),\n configIsInvalid: false,\n };\n\n if (\n [\n config.stiffness,\n config.damping,\n config.duration,\n config.dampingRatio,\n config.restDisplacementThreshold,\n config.restSpeedThreshold,\n ].some((x) => x <= 0) ||\n config.mass === 0\n ) {\n config.configIsInvalid = true;\n console.warn(\n \"You have provided invalid spring animation configuration! \\n Value of stiffness, damping, duration and damping ratio must be greater than zero, and mass can't equal zero.\"\n );\n }\n\n function springOnFrame(\n animation: InnerSpringAnimation,\n now: Timestamp\n ): boolean {\n const { toValue, startTimestamp, current } = animation;\n\n const timeFromStart = now - startTimestamp;\n\n if (config.useDuration && timeFromStart >= config.duration) {\n animation.current = toValue;\n\n // clear lastTimestamp to avoid using stale value by the next spring animation that starts after this one\n animation.lastTimestamp = 0;\n return true;\n }\n\n if (config.configIsInvalid) {\n // We don't animate wrong config\n if (config.useDuration) return false;\n else {\n animation.current = toValue;\n animation.lastTimestamp = 0;\n return true;\n }\n }\n const { lastTimestamp, velocity } = animation;\n\n const deltaTime = Math.min(now - lastTimestamp, 64);\n animation.lastTimestamp = now;\n\n const t = deltaTime / 1000;\n const v0 = -velocity;\n const x0 = toValue - current;\n\n const { zeta, omega0, omega1 } = animation;\n\n const { position: newPosition, velocity: newVelocity } =\n zeta < 1\n ? underDampedSpringCalculations(animation, {\n zeta,\n v0,\n x0,\n omega0,\n omega1,\n t,\n })\n : criticallyDampedSpringCalculations(animation, {\n v0,\n x0,\n omega0,\n t,\n });\n\n animation.current = newPosition;\n animation.velocity = newVelocity;\n\n const { isOvershooting, isVelocity, isDisplacement } =\n isAnimationTerminatingCalculation(animation, config);\n\n const springIsNotInMove =\n isOvershooting || (isVelocity && isDisplacement);\n\n if (!config.useDuration && springIsNotInMove) {\n animation.velocity = 0;\n animation.current = toValue;\n // clear lastTimestamp to avoid using stale value by the next spring animation that starts after this one\n animation.lastTimestamp = 0;\n return true;\n }\n\n return false;\n }\n\n function isTriggeredTwice(\n previousAnimation: SpringAnimation | undefined,\n animation: SpringAnimation\n ) {\n return (\n previousAnimation?.lastTimestamp &&\n previousAnimation?.startTimestamp &&\n previousAnimation?.toValue === animation.toValue &&\n previousAnimation?.duration === animation.duration &&\n previousAnimation?.dampingRatio === animation.dampingRatio\n );\n }\n\n function onStart(\n animation: SpringAnimation,\n value: number,\n now: Timestamp,\n previousAnimation: SpringAnimation | undefined\n ): void {\n animation.current = value;\n animation.startValue = value;\n\n let mass = config.mass;\n const triggeredTwice = isTriggeredTwice(previousAnimation, animation);\n\n const duration = config.duration;\n\n const x0 = triggeredTwice\n ? // If animation is triggered twice we want to continue the previous animation\n // form the previous starting point\n previousAnimation?.startValue\n : Number(animation.toValue) - value;\n\n if (previousAnimation) {\n animation.velocity =\n (triggeredTwice\n ? previousAnimation?.velocity\n : previousAnimation?.velocity + config.velocity) || 0;\n } else {\n animation.velocity = config.velocity || 0;\n }\n\n if (triggeredTwice) {\n animation.zeta = previousAnimation?.zeta || 0;\n animation.omega0 = previousAnimation?.omega0 || 0;\n animation.omega1 = previousAnimation?.omega1 || 0;\n } else {\n if (config.useDuration) {\n const actualDuration = triggeredTwice\n ? // If animation is triggered twice we want to continue the previous animation\n // so we need to include the time that already elapsed\n duration -\n ((previousAnimation?.lastTimestamp || 0) -\n (previousAnimation?.startTimestamp || 0))\n : duration;\n\n config.duration = actualDuration;\n mass = calculateNewMassToMatchDuration(\n x0 as number,\n config,\n animation.velocity\n );\n }\n\n const { zeta, omega0, omega1 } = initialCalculations(mass, config);\n animation.zeta = zeta;\n animation.omega0 = omega0;\n animation.omega1 = omega1;\n }\n\n animation.lastTimestamp = previousAnimation?.lastTimestamp || now;\n\n animation.startTimestamp = triggeredTwice\n ? previousAnimation?.startTimestamp || now\n : now;\n }\n\n return {\n onFrame: springOnFrame,\n onStart,\n toValue,\n velocity: config.velocity || 0,\n current: toValue,\n startValue: 0,\n callback,\n lastTimestamp: 0,\n startTimestamp: 0,\n zeta: 0,\n omega0: 0,\n omega1: 0,\n reduceMotion: getReduceMotionForAnimation(config.reduceMotion),\n } as SpringAnimation;\n });\n}) as withSpringType;\n","import type {\n Animation,\n AnimatableValue,\n Timestamp,\n ReduceMotion,\n} from '../commonTypes';\n\nexport type SpringConfig = {\n stiffness?: number;\n overshootClamping?: boolean;\n restDisplacementThreshold?: number;\n restSpeedThreshold?: number;\n velocity?: number;\n reduceMotion?: ReduceMotion;\n} & (\n | {\n mass?: number;\n damping?: number;\n duration?: never;\n dampingRatio?: never;\n }\n | {\n mass?: never;\n damping?: never;\n duration?: number;\n dampingRatio?: number;\n }\n);\n\nexport type WithSpringConfig = SpringConfig;\n\nexport interface SpringConfigInner {\n useDuration: boolean;\n configIsInvalid: boolean;\n}\n\nexport interface SpringAnimation extends Animation {\n current: AnimatableValue;\n toValue: AnimatableValue;\n velocity: number;\n lastTimestamp: Timestamp;\n startTimestamp: Timestamp;\n startValue: number;\n zeta: number;\n omega0: number;\n omega1: number;\n}\n\nexport interface InnerSpringAnimation\n extends Omit {\n toValue: number;\n current: number;\n}\n\nfunction bisectRoot({\n min,\n max,\n func,\n maxIterations = 20,\n}: {\n min: number;\n max: number;\n func: (x: number) => number;\n maxIterations?: number;\n}) {\n 'worklet';\n const ACCURACY = 0.00005;\n let idx = maxIterations;\n let current = (max + min) / 2;\n while (Math.abs(func(current)) > ACCURACY && idx > 0) {\n idx -= 1;\n\n if (func(current) < 0) {\n min = current;\n } else {\n max = current;\n }\n current = (min + max) / 2;\n }\n return current;\n}\n\nexport function initialCalculations(\n mass = 0,\n config: Record & SpringConfigInner\n): {\n zeta: number;\n omega0: number;\n omega1: number;\n} {\n 'worklet';\n\n if (config.configIsInvalid) {\n return { zeta: 0, omega0: 0, omega1: 0 };\n }\n\n if (config.useDuration) {\n const { stiffness: k, dampingRatio: zeta } = config;\n\n /** omega0 and omega1 denote angular frequency and natural angular frequency, see this link for formulas:\n * https://courses.lumenlearning.com/suny-osuniversityphysics/chapter/15-5-damped-oscillations/\n */\n const omega0 = Math.sqrt(k / mass);\n const omega1 = omega0 * Math.sqrt(1 - zeta ** 2);\n\n return { zeta, omega0, omega1 };\n } else {\n const { damping: c, mass: m, stiffness: k } = config;\n\n const zeta = c / (2 * Math.sqrt(k * m)); // damping ratio\n const omega0 = Math.sqrt(k / m); // undamped angular frequency of the oscillator (rad/ms)\n const omega1 = omega0 * Math.sqrt(1 - zeta ** 2); // exponential decay\n\n return { zeta, omega0, omega1 };\n }\n}\n\nexport function calculateNewMassToMatchDuration(\n x0: number,\n config: Record & SpringConfigInner,\n v0: number\n) {\n 'worklet';\n if (config.configIsInvalid) {\n return 0;\n }\n\n /** Use this formula: https://phys.libretexts.org/Bookshelves/University_Physics/Book%3A_University_Physics_(OpenStax)/Book%3A_University_Physics_I_-_Mechanics_Sound_Oscillations_and_Waves_(OpenStax)/15%3A_Oscillations/15.06%3A_Damped_Oscillations\n * to find the asymptote and estimate the damping that gives us the expected duration \n\n ⎛ ⎛ c⎞ ⎞ \n ⎜-⎜──⎟ ⋅ duration⎟ \n ⎝ ⎝2m⎠ ⎠ \n A ⋅ e = threshold\n\n \n Amplitude calculated using \"Conservation of energy\"\n _________________\n ╱ 2 2\n ╱ m ⋅ v0 + k ⋅ x0 \n amplitude = ╱ ─────────────────\n ╲╱ k \n\n And replace mass with damping ratio which is provided: m = (c^2)/(4 * k * zeta^2) \n */\n const {\n stiffness: k,\n dampingRatio: zeta,\n restSpeedThreshold: threshold,\n duration,\n } = config;\n\n const durationForMass = (mass: number) => {\n 'worklet';\n const amplitude =\n (mass * v0 * v0 + k * x0 * x0) / (Math.exp(1 - 0.5 * zeta) * k);\n const c = zeta * 2 * Math.sqrt(k * mass);\n return (\n 1000 * ((-2 * mass) / c) * Math.log((threshold * 0.01) / amplitude) -\n duration\n );\n };\n\n // Bisection turns out to be much faster than Newton's method in our case\n return bisectRoot({ min: 0, max: 100, func: durationForMass });\n}\n\nexport function criticallyDampedSpringCalculations(\n animation: InnerSpringAnimation,\n precalculatedValues: {\n v0: number;\n x0: number;\n omega0: number;\n t: number;\n }\n): { position: number; velocity: number } {\n 'worklet';\n const { toValue } = animation;\n\n const { v0, x0, omega0, t } = precalculatedValues;\n\n const criticallyDampedEnvelope = Math.exp(-omega0 * t);\n const criticallyDampedPosition =\n toValue - criticallyDampedEnvelope * (x0 + (v0 + omega0 * x0) * t);\n\n const criticallyDampedVelocity =\n criticallyDampedEnvelope *\n (v0 * (t * omega0 - 1) + t * x0 * omega0 * omega0);\n\n return {\n position: criticallyDampedPosition,\n velocity: criticallyDampedVelocity,\n };\n}\n\nexport function underDampedSpringCalculations(\n animation: InnerSpringAnimation,\n precalculatedValues: {\n zeta: number;\n v0: number;\n x0: number;\n omega0: number;\n omega1: number;\n t: number;\n }\n): { position: number; velocity: number } {\n 'worklet';\n const { toValue, current, velocity } = animation;\n\n const { zeta, t, omega0, omega1 } = precalculatedValues;\n\n const v0 = -velocity;\n const x0 = toValue - current;\n\n const sin1 = Math.sin(omega1 * t);\n const cos1 = Math.cos(omega1 * t);\n\n // under damped\n const underDampedEnvelope = Math.exp(-zeta * omega0 * t);\n const underDampedFrag1 =\n underDampedEnvelope *\n (sin1 * ((v0 + zeta * omega0 * x0) / omega1) + x0 * cos1);\n\n const underDampedPosition = toValue - underDampedFrag1;\n // This looks crazy -- it's actually just the derivative of the oscillation function\n const underDampedVelocity =\n zeta * omega0 * underDampedFrag1 -\n underDampedEnvelope *\n (cos1 * (v0 + zeta * omega0 * x0) - omega1 * x0 * sin1);\n\n return { position: underDampedPosition, velocity: underDampedVelocity };\n}\n\nexport function isAnimationTerminatingCalculation(\n animation: InnerSpringAnimation,\n config: Partial &\n Required<\n Pick\n >\n): {\n isOvershooting: boolean;\n isVelocity: boolean;\n isDisplacement: boolean;\n} {\n 'worklet';\n const { toValue, velocity, startValue, current } = animation;\n\n const isOvershooting = config.overshootClamping\n ? (current > toValue && startValue < toValue) ||\n (current < toValue && startValue > toValue)\n : false;\n\n const isVelocity = Math.abs(velocity) < config.restSpeedThreshold;\n const isDisplacement =\n Math.abs(toValue - current) < config.restDisplacementThreshold;\n\n return { isOvershooting, isVelocity, isDisplacement };\n}\n","import { defineAnimation } from './util';\nimport type {\n Timestamp,\n AnimatableValue,\n AnimationObject,\n Animation,\n NestedObject,\n NestedObjectValues,\n} from '../commonTypes';\nimport type { AnimatedStyle } from '../helperTypes';\nimport type { StyleLayoutAnimation } from './commonTypes';\nimport { withTiming } from './timing';\nimport { ColorProperties, processColor } from '../Colors';\n\n// resolves path to value for nested objects\n// if path cannot be resolved returns undefined\nfunction resolvePath(\n obj: NestedObject,\n path: AnimatableValue[] | AnimatableValue\n): NestedObjectValues | undefined {\n 'worklet';\n const keys: AnimatableValue[] = Array.isArray(path) ? path : [path];\n return keys.reduce | undefined>((acc, current) => {\n if (Array.isArray(acc) && typeof current === 'number') {\n return acc[current];\n } else if (\n acc !== null &&\n typeof acc === 'object' &&\n (current as number | string) in acc\n ) {\n return (acc as { [key: string]: NestedObjectValues })[\n current as number | string\n ];\n }\n return undefined;\n }, obj);\n}\n\n// set value at given path\ntype Path = Array | string | number;\nfunction setPath(\n obj: NestedObject,\n path: Path,\n value: NestedObjectValues\n): void {\n 'worklet';\n const keys: Path = Array.isArray(path) ? path : [path];\n let currObj: NestedObjectValues = obj;\n for (let i = 0; i < keys.length - 1; i++) {\n // creates entry if there isn't one\n currObj = currObj as { [key: string]: NestedObjectValues };\n if (!(keys[i] in currObj)) {\n // if next key is a number create an array\n if (typeof keys[i + 1] === 'number') {\n currObj[keys[i]] = [];\n } else {\n currObj[keys[i]] = {};\n }\n }\n currObj = currObj[keys[i]];\n }\n\n (currObj as { [key: string]: NestedObjectValues })[keys[keys.length - 1]] =\n value;\n}\n\ninterface NestedObjectEntry {\n value: NestedObjectValues;\n path: (string | number)[];\n}\n\nexport function withStyleAnimation(\n styleAnimations: AnimatedStyle\n): StyleLayoutAnimation {\n 'worklet';\n return defineAnimation({}, () => {\n 'worklet';\n\n const onFrame = (\n animation: StyleLayoutAnimation,\n now: Timestamp\n ): boolean => {\n let stillGoing = false;\n const entriesToCheck: NestedObjectEntry[] = [\n { value: animation.styleAnimations, path: [] },\n ];\n while (entriesToCheck.length > 0) {\n const currentEntry: NestedObjectEntry =\n entriesToCheck.pop() as NestedObjectEntry;\n if (Array.isArray(currentEntry.value)) {\n for (let index = 0; index < currentEntry.value.length; index++) {\n entriesToCheck.push({\n value: currentEntry.value[index],\n path: currentEntry.path.concat(index),\n });\n }\n } else if (\n typeof currentEntry.value === 'object' &&\n currentEntry.value.onFrame === undefined\n ) {\n // nested object\n for (const key of Object.keys(currentEntry.value)) {\n entriesToCheck.push({\n value: currentEntry.value[key],\n path: currentEntry.path.concat(key),\n });\n }\n } else {\n const currentStyleAnimation: AnimationObject =\n currentEntry.value as AnimationObject;\n if (currentStyleAnimation.finished) {\n continue;\n }\n const finished = currentStyleAnimation.onFrame(\n currentStyleAnimation,\n now\n );\n if (finished) {\n currentStyleAnimation.finished = true;\n if (currentStyleAnimation.callback) {\n currentStyleAnimation.callback(true);\n }\n } else {\n stillGoing = true;\n }\n\n if (ColorProperties.includes(currentEntry.path[0] as string)) {\n currentStyleAnimation.current = processColor(\n currentStyleAnimation.current\n ) as number;\n }\n\n setPath(\n animation.current,\n currentEntry.path,\n currentStyleAnimation.current\n );\n }\n }\n return !stillGoing;\n };\n\n const onStart = (\n animation: StyleLayoutAnimation,\n value: AnimatedStyle,\n now: Timestamp,\n previousAnimation: StyleLayoutAnimation\n ): void => {\n const entriesToCheck: NestedObjectEntry<\n AnimationObject | AnimatableValue\n >[] = [{ value: styleAnimations, path: [] }];\n while (entriesToCheck.length > 0) {\n const currentEntry: NestedObjectEntry<\n AnimationObject | AnimatableValue\n > = entriesToCheck.pop() as NestedObjectEntry<\n AnimationObject | AnimatableValue\n >;\n if (Array.isArray(currentEntry.value)) {\n for (let index = 0; index < currentEntry.value.length; index++) {\n entriesToCheck.push({\n value: currentEntry.value[index],\n path: currentEntry.path.concat(index),\n });\n }\n } else if (\n typeof currentEntry.value === 'object' &&\n currentEntry.value.onStart === undefined\n ) {\n for (const key of Object.keys(currentEntry.value)) {\n entriesToCheck.push({\n value: currentEntry.value[key],\n path: currentEntry.path.concat(key),\n });\n }\n } else {\n const prevAnimation = resolvePath(\n previousAnimation?.styleAnimations,\n currentEntry.path\n );\n let prevVal = resolvePath(value, currentEntry.path);\n if (prevAnimation && !prevVal) {\n prevVal = (prevAnimation as any).current;\n }\n if (prevVal === undefined) {\n console.warn(\n `Initial values for animation are missing for property ${currentEntry.path.join(\n '.'\n )}`\n );\n }\n setPath(animation.current, currentEntry.path, prevVal);\n let currentAnimation: AnimationObject;\n if (\n typeof currentEntry.value !== 'object' ||\n !currentEntry.value.onStart\n ) {\n currentAnimation = withTiming(\n currentEntry.value as AnimatableValue,\n { duration: 0 }\n ) as AnimationObject; // TODO TYPESCRIPT this temporary cast is to get rid of .d.ts file.\n setPath(\n animation.styleAnimations,\n currentEntry.path,\n currentAnimation\n );\n } else {\n currentAnimation = currentEntry.value as Animation;\n }\n currentAnimation.onStart(\n currentAnimation,\n prevVal,\n now,\n prevAnimation\n );\n }\n }\n };\n\n const callback = (finished: boolean): void => {\n if (!finished) {\n const animationsToCheck: NestedObjectValues[] = [\n styleAnimations,\n ];\n while (animationsToCheck.length > 0) {\n const currentAnimation: NestedObjectValues =\n animationsToCheck.pop() as NestedObjectValues;\n if (Array.isArray(currentAnimation)) {\n for (const element of currentAnimation) {\n animationsToCheck.push(element);\n }\n } else if (\n typeof currentAnimation === 'object' &&\n currentAnimation.onStart === undefined\n ) {\n for (const value of Object.values(currentAnimation)) {\n animationsToCheck.push(value);\n }\n } else {\n const currentStyleAnimation: AnimationObject =\n currentAnimation as AnimationObject;\n if (\n !currentStyleAnimation.finished &&\n currentStyleAnimation.callback\n ) {\n currentStyleAnimation.callback(false);\n }\n }\n }\n }\n };\n\n return {\n isHigherOrder: true,\n onFrame,\n onStart,\n current: {},\n styleAnimations,\n callback,\n } as StyleLayoutAnimation;\n });\n}\n","import type { EasingFunction, EasingFunctionFactory } from '../Easing';\nimport { Easing } from '../Easing';\nimport { defineAnimation, getReduceMotionForAnimation } from './util';\nimport type {\n Animation,\n AnimationCallback,\n Timestamp,\n AnimatableValue,\n ReduceMotion,\n} from '../commonTypes';\n\ninterface TimingConfig {\n duration?: number;\n reduceMotion?: ReduceMotion;\n easing?: EasingFunction | EasingFunctionFactory;\n}\n\nexport type WithTimingConfig = TimingConfig;\n\nexport interface TimingAnimation extends Animation {\n type: string;\n easing: EasingFunction;\n startValue: AnimatableValue;\n startTime: Timestamp;\n progress: number;\n toValue: AnimatableValue;\n current: AnimatableValue;\n}\n\ninterface InnerTimingAnimation\n extends Omit {\n toValue: number;\n current: number;\n}\n\n// TODO TYPESCRIPT This is temporary type put in here to get rid of our .d.ts file\ntype withTimingType = (\n toValue: T,\n userConfig?: TimingConfig,\n callback?: AnimationCallback\n) => T;\n\nexport const withTiming = function (\n toValue: AnimatableValue,\n userConfig?: TimingConfig,\n callback?: AnimationCallback\n): Animation {\n 'worklet';\n\n return defineAnimation(toValue, () => {\n 'worklet';\n const config: Required> = {\n duration: 300,\n easing: Easing.inOut(Easing.quad),\n };\n if (userConfig) {\n Object.keys(userConfig).forEach(\n (key) =>\n ((config as any)[key] = userConfig[key as keyof typeof userConfig])\n );\n }\n\n function timing(animation: InnerTimingAnimation, now: Timestamp): boolean {\n const { toValue, startTime, startValue } = animation;\n const runtime = now - startTime;\n\n if (runtime >= config.duration) {\n // reset startTime to avoid reusing finished animation config in `start` method\n animation.startTime = 0;\n animation.current = toValue;\n return true;\n }\n const progress = animation.easing(runtime / config.duration);\n animation.current =\n (startValue as number) + (toValue - (startValue as number)) * progress;\n return false;\n }\n\n function onStart(\n animation: TimingAnimation,\n value: number,\n now: Timestamp,\n previousAnimation: Animation\n ): void {\n if (\n previousAnimation &&\n (previousAnimation as TimingAnimation).type === 'timing' &&\n (previousAnimation as TimingAnimation).toValue === toValue &&\n (previousAnimation as TimingAnimation).startTime\n ) {\n // to maintain continuity of timing animations we check if we are starting\n // new timing over the old one with the same parameters. If so, we want\n // to copy animation timeline properties\n animation.startTime = (previousAnimation as TimingAnimation).startTime;\n animation.startValue = (\n previousAnimation as TimingAnimation\n ).startValue;\n } else {\n animation.startTime = now;\n animation.startValue = value;\n }\n animation.current = value;\n if (typeof config.easing === 'object') {\n animation.easing = config.easing.factory();\n } else {\n animation.easing = config.easing;\n }\n }\n\n return {\n type: 'timing',\n onFrame: timing,\n onStart: onStart as (animation: TimingAnimation, now: number) => boolean,\n progress: 0,\n toValue,\n startValue: 0,\n startTime: 0,\n easing: () => 0,\n current: toValue,\n callback,\n reduceMotion: getReduceMotionForAnimation(userConfig?.reduceMotion),\n } as TimingAnimation;\n });\n} as withTimingType;\n","type FixedLengthArray<\n T,\n L extends number,\n PassedObject = [T, ...Array]\n> = PassedObject & {\n readonly length: L;\n [I: number]: T;\n};\n\nexport type AffineMatrix = FixedLengthArray, 4>;\n\nexport type AffineMatrixFlat = FixedLengthArray;\n\ntype TransformMatrixDecomposition = Record<\n 'translationMatrix' | 'scaleMatrix' | 'rotationMatrix' | 'skewMatrix',\n AffineMatrix\n>;\n\ntype Axis = 'x' | 'y' | 'z';\n\ninterface TansformMatrixDecompositionWithAngles\n extends TransformMatrixDecomposition {\n rx: number;\n ry: number;\n rz: number;\n}\n\nexport function isAffineMatrixFlat(x: unknown): x is AffineMatrixFlat {\n 'worklet';\n return (\n Array.isArray(x) &&\n x.length === 16 &&\n x.every((element) => typeof element === 'number' && !isNaN(element))\n );\n}\n\n// ts-prune-ignore-next This function is exported to be tested\nexport function isAffineMatrix(x: unknown): x is AffineMatrix {\n 'worklet';\n return (\n Array.isArray(x) &&\n x.length === 4 &&\n x.every(\n (row) =>\n Array.isArray(row) &&\n row.length === 4 &&\n row.every((element) => typeof element === 'number' && !isNaN(element))\n )\n );\n}\n\nexport function flatten(matrix: AffineMatrix): AffineMatrixFlat {\n 'worklet';\n return matrix.flat() as AffineMatrixFlat;\n}\n\n// ts-prune-ignore-next This function is exported to be tested\nexport function unflatten(m: AffineMatrixFlat): AffineMatrix {\n 'worklet';\n return [\n [m[0], m[1], m[2], m[3]],\n [m[4], m[5], m[6], m[7]],\n [m[8], m[9], m[10], m[11]],\n [m[12], m[13], m[14], m[15]],\n ] as AffineMatrix;\n}\n\nfunction maybeFlattenMatrix(\n matrix: AffineMatrix | AffineMatrixFlat\n): AffineMatrixFlat {\n 'worklet';\n return isAffineMatrix(matrix) ? flatten(matrix) : matrix;\n}\n\nexport function multiplyMatrices(\n a: AffineMatrix,\n b: AffineMatrix\n): AffineMatrix {\n 'worklet';\n return [\n [\n a[0][0] * b[0][0] +\n a[0][1] * b[1][0] +\n a[0][2] * b[2][0] +\n a[0][3] * b[3][0],\n\n a[0][0] * b[0][1] +\n a[0][1] * b[1][1] +\n a[0][2] * b[2][1] +\n a[0][3] * b[3][1],\n\n a[0][0] * b[0][2] +\n a[0][1] * b[1][2] +\n a[0][2] * b[2][2] +\n a[0][3] * b[3][2],\n\n a[0][0] * b[0][3] +\n a[0][1] * b[1][3] +\n a[0][2] * b[2][3] +\n a[0][3] * b[3][3],\n ],\n [\n a[1][0] * b[0][0] +\n a[1][1] * b[1][0] +\n a[1][2] * b[2][0] +\n a[1][3] * b[3][0],\n\n a[1][0] * b[0][1] +\n a[1][1] * b[1][1] +\n a[1][2] * b[2][1] +\n a[1][3] * b[3][1],\n\n a[1][0] * b[0][2] +\n a[1][1] * b[1][2] +\n a[1][2] * b[2][2] +\n a[1][3] * b[3][2],\n\n a[1][0] * b[0][3] +\n a[1][1] * b[1][3] +\n a[1][2] * b[2][3] +\n a[1][3] * b[3][3],\n ],\n [\n a[2][0] * b[0][0] +\n a[2][1] * b[1][0] +\n a[2][2] * b[2][0] +\n a[2][3] * b[3][0],\n\n a[2][0] * b[0][1] +\n a[2][1] * b[1][1] +\n a[2][2] * b[2][1] +\n a[2][3] * b[3][1],\n\n a[2][0] * b[0][2] +\n a[2][1] * b[1][2] +\n a[2][2] * b[2][2] +\n a[2][3] * b[3][2],\n\n a[2][0] * b[0][3] +\n a[2][1] * b[1][3] +\n a[2][2] * b[2][3] +\n a[2][3] * b[3][3],\n ],\n [\n a[3][0] * b[0][0] +\n a[3][1] * b[1][0] +\n a[3][2] * b[2][0] +\n a[3][3] * b[3][0],\n\n a[3][0] * b[0][1] +\n a[3][1] * b[1][1] +\n a[3][2] * b[2][1] +\n a[3][3] * b[3][1],\n\n a[3][0] * b[0][2] +\n a[3][1] * b[1][2] +\n a[3][2] * b[2][2] +\n a[3][3] * b[3][2],\n\n a[3][0] * b[0][3] +\n a[3][1] * b[1][3] +\n a[3][2] * b[2][3] +\n a[3][3] * b[3][3],\n ],\n ];\n}\n\nexport function subtractMatrices(\n maybeFlatA: T,\n maybeFlatB: T\n): T {\n 'worklet';\n const isFlatOnStart = isAffineMatrixFlat(maybeFlatA);\n const a: AffineMatrixFlat = maybeFlattenMatrix(maybeFlatA);\n const b: AffineMatrixFlat = maybeFlattenMatrix(maybeFlatB);\n\n const c = a.map((_, i) => a[i] - b[i]) as AffineMatrixFlat;\n return isFlatOnStart ? (c as T) : (unflatten(c) as T);\n}\n\nexport function addMatrices(\n maybeFlatA: T,\n maybeFlatB: T\n): T {\n 'worklet';\n const isFlatOnStart = isAffineMatrixFlat(maybeFlatA);\n const a = maybeFlattenMatrix(maybeFlatA);\n const b = maybeFlattenMatrix(maybeFlatB);\n\n const c = a.map((_, i) => a[i] + b[i]) as AffineMatrixFlat;\n return isFlatOnStart ? (c as T) : (unflatten(c) as T);\n}\n\nexport function scaleMatrix(\n maybeFlatA: T,\n scalar: number\n): T {\n 'worklet';\n const isFlatOnStart = isAffineMatrixFlat(maybeFlatA);\n const a = maybeFlattenMatrix(maybeFlatA);\n\n const b = a.map((x) => x * scalar) as AffineMatrixFlat;\n return isFlatOnStart ? (b as T) : (unflatten(b) as T);\n}\n\nexport function getRotationMatrix(\n angle: number,\n axis: Axis = 'z'\n): AffineMatrix {\n 'worklet';\n const cos = Math.cos(angle);\n const sin = Math.sin(angle);\n switch (axis) {\n case 'z':\n return [\n [cos, sin, 0, 0],\n [-sin, cos, 0, 0],\n [0, 0, 1, 0],\n [0, 0, 0, 1],\n ];\n case 'y':\n return [\n [cos, 0, -sin, 0],\n [0, 1, 0, 0],\n [sin, 0, cos, 0],\n [0, 0, 0, 1],\n ];\n case 'x':\n return [\n [1, 0, 0, 0],\n [0, cos, sin, 0],\n [0, -sin, cos, 0],\n [0, 0, 0, 1],\n ];\n }\n}\n\nfunction norm3d(x: number, y: number, z: number) {\n 'worklet';\n return Math.sqrt(x * x + y * y + z * z);\n}\n\nfunction transposeMatrix(matrix: AffineMatrix): AffineMatrix {\n 'worklet';\n const m = flatten(matrix);\n return [\n [m[0], m[4], m[8], m[12]],\n [m[1], m[5], m[9], m[13]],\n [m[2], m[6], m[10], m[14]],\n [m[3], m[7], m[11], m[15]],\n ];\n}\n\nfunction assertVectorsHaveEqualLengths(a: number[], b: number[]) {\n 'worklet';\n if (__DEV__ && a.length !== b.length) {\n throw new Error(\n `[Reanimated] Cannot calculate inner product of two vectors of different lengths. Length of ${a} is ${a.length} and length of ${b} is ${b.length}.`\n );\n }\n}\n\nfunction innerProduct(a: number[], b: number[]) {\n 'worklet';\n assertVectorsHaveEqualLengths(a, b);\n return a.reduce((acc, _, i) => acc + a[i] * b[i], 0);\n}\n\nfunction projection(u: number[], a: number[]) {\n 'worklet';\n assertVectorsHaveEqualLengths(u, a);\n const s = innerProduct(u, a) / innerProduct(u, u);\n return u.map((e) => e * s);\n}\n\nfunction subtractVectors(a: number[], b: number[]) {\n 'worklet';\n assertVectorsHaveEqualLengths(a, b);\n return a.map((_, i) => a[i] - b[i]);\n}\n\nfunction scaleVector(u: number[], a: number) {\n 'worklet';\n return u.map((e) => e * a);\n}\n\nfunction gramSchmidtAlgorithm(matrix: AffineMatrix): {\n rotationMatrix: AffineMatrix;\n skewMatrix: AffineMatrix;\n} {\n // Gram-Schmidt orthogonalization decomposes any matrix with non-zero determinant into an orthogonal and a triangular matrix\n // These matrices are equal to rotation and skew matrices respectively, because we apply it to transformation matrix\n // That is expected to already have extracted the remaining transforms (scale & translation)\n 'worklet';\n const [a0, a1, a2, a3] = matrix;\n\n const u0 = a0;\n const u1 = subtractVectors(a1, projection(u0, a1));\n const u2 = subtractVectors(\n subtractVectors(a2, projection(u0, a2)),\n projection(u1, a2)\n );\n const u3 = subtractVectors(\n subtractVectors(\n subtractVectors(a3, projection(u0, a3)),\n projection(u1, a3)\n ),\n projection(u2, a3)\n );\n\n const [e0, e1, e2, e3] = [u0, u1, u2, u3].map((u) =>\n scaleVector(u, 1 / Math.sqrt(innerProduct(u, u)))\n );\n\n const rotationMatrix: AffineMatrix = [\n [e0[0], e1[0], e2[0], e3[0]],\n [e0[1], e1[1], e2[1], e3[1]],\n [e0[2], e1[2], e2[2], e3[2]],\n [e0[3], e1[3], e2[3], e3[3]],\n ];\n\n const skewMatrix: AffineMatrix = [\n [\n innerProduct(e0, a0),\n innerProduct(e0, a1),\n innerProduct(e0, a2),\n innerProduct(e0, a3),\n ],\n [0, innerProduct(e1, a1), innerProduct(e1, a2), innerProduct(e1, a3)],\n [0, 0, innerProduct(e2, a2), innerProduct(e2, a3)],\n [0, 0, 0, innerProduct(e3, a3)],\n ];\n return {\n rotationMatrix: transposeMatrix(rotationMatrix),\n skewMatrix: transposeMatrix(skewMatrix),\n };\n}\n\n// ts-prune-ignore-next This function is exported to be tested\nexport function decomposeMatrix(\n unknownTypeMatrix: AffineMatrixFlat | AffineMatrix\n): TransformMatrixDecomposition {\n 'worklet';\n const matrix = maybeFlattenMatrix(unknownTypeMatrix);\n\n // normalize matrix\n if (matrix[15] === 0) {\n throw new Error('[Reanimated] Invalid transform matrix.');\n }\n matrix.forEach((_, i) => (matrix[i] /= matrix[15]));\n\n const translationMatrix: AffineMatrix = [\n [1, 0, 0, 0],\n [0, 1, 0, 0],\n [0, 0, 1, 0],\n [matrix[12], matrix[13], matrix[14], 1],\n ];\n const sx = matrix[15] * norm3d(matrix[0], matrix[4], matrix[8]);\n const sy = matrix[15] * norm3d(matrix[1], matrix[5], matrix[9]);\n const sz = matrix[15] * norm3d(matrix[2], matrix[6], matrix[10]);\n\n const scaleMatrix: AffineMatrix = [\n [sx, 0, 0, 0],\n [0, sy, 0, 0],\n [0, 0, sz, 0],\n [0, 0, 0, 1],\n ];\n\n const rotationAndSkewMatrix: AffineMatrix = [\n [matrix[0] / sx, matrix[1] / sx, matrix[2] / sx, 0],\n [matrix[4] / sy, matrix[5] / sy, matrix[6] / sy, 0],\n [matrix[8] / sz, matrix[9] / sz, matrix[10] / sz, 0],\n [0, 0, 0, 1],\n ];\n\n const { rotationMatrix, skewMatrix } = gramSchmidtAlgorithm(\n rotationAndSkewMatrix\n );\n\n return {\n translationMatrix,\n scaleMatrix,\n rotationMatrix,\n skewMatrix,\n };\n}\n\nexport function decomposeMatrixIntoMatricesAndAngles(\n matrix: AffineMatrixFlat | AffineMatrix\n): TansformMatrixDecompositionWithAngles {\n 'worklet';\n const { scaleMatrix, rotationMatrix, translationMatrix, skewMatrix } =\n decomposeMatrix(matrix);\n\n const sinRy = -rotationMatrix[0][2];\n\n const ry = Math.asin(sinRy);\n let rx;\n let rz;\n if (sinRy === 1 || sinRy === -1) {\n rz = 0;\n rx = Math.atan2(sinRy * rotationMatrix[0][1], sinRy * rotationMatrix[0][2]);\n } else {\n rz = Math.atan2(rotationMatrix[0][1], rotationMatrix[0][0]);\n rx = Math.atan2(rotationMatrix[1][2], rotationMatrix[2][2]);\n }\n\n return {\n scaleMatrix,\n rotationMatrix,\n translationMatrix,\n skewMatrix,\n rx: rx || 0,\n ry: ry || 0,\n rz: rz || 0,\n };\n}\n","import type { HigherOrderAnimation, StyleLayoutAnimation } from './commonTypes';\nimport type { ParsedColorArray } from '../Colors';\nimport {\n isColor,\n convertToRGBA,\n rgbaArrayToRGBAColor,\n toGammaSpace,\n toLinearSpace,\n} from '../Colors';\nimport { ReduceMotion } from '../commonTypes';\nimport type {\n SharedValue,\n AnimatableValue,\n Animation,\n AnimationObject,\n Timestamp,\n AnimatableValueObject,\n} from '../commonTypes';\nimport NativeReanimatedModule from '../NativeReanimated';\nimport type {\n AffineMatrixFlat,\n AffineMatrix,\n} from './transformationMatrix/matrixUtils';\nimport {\n flatten,\n multiplyMatrices,\n scaleMatrix,\n addMatrices,\n decomposeMatrixIntoMatricesAndAngles,\n isAffineMatrixFlat,\n subtractMatrices,\n getRotationMatrix,\n} from './transformationMatrix/matrixUtils';\nimport { isReducedMotion } from '../PlatformChecker';\n\nlet IN_STYLE_UPDATER = false;\nconst IS_REDUCED_MOTION = isReducedMotion();\n\nexport function initialUpdaterRun(updater: () => T) {\n IN_STYLE_UPDATER = true;\n const result = updater();\n IN_STYLE_UPDATER = false;\n return result;\n}\n\ninterface RecognizedPrefixSuffix {\n prefix?: string;\n suffix?: string;\n strippedValue: number;\n}\n\nfunction recognizePrefixSuffix(value: string | number): RecognizedPrefixSuffix {\n 'worklet';\n if (typeof value === 'string') {\n const match = value.match(\n /([A-Za-z]*)(-?\\d*\\.?\\d*)([eE][-+]?[0-9]+)?([A-Za-z%]*)/\n );\n if (!match) {\n throw new Error(\"[Reanimated] Couldn't parse animation value.\");\n }\n const prefix = match[1];\n const suffix = match[4];\n // number with scientific notation\n const number = match[2] + (match[3] ?? '');\n return { prefix, suffix, strippedValue: parseFloat(number) };\n } else {\n return { strippedValue: value };\n }\n}\n\n/**\n * Returns whether the motion should be reduced for a specified config.\n * By default returns the system setting.\n */\nexport function getReduceMotionFromConfig(config?: ReduceMotion) {\n 'worklet';\n return !config || config === ReduceMotion.System\n ? IS_REDUCED_MOTION\n : config === ReduceMotion.Always;\n}\n\n/**\n * Returns the value that should be assigned to `animation.reduceMotion`\n * for a given config. If the config is not defined, `undefined` is returned.\n */\nexport function getReduceMotionForAnimation(config?: ReduceMotion) {\n 'worklet';\n // if the config is not defined, we want `reduceMotion` to be undefined,\n // so the parent animation knows if it should overwrite it\n if (!config) {\n return undefined;\n }\n\n return getReduceMotionFromConfig(config);\n}\n\nfunction applyProgressToMatrix(\n progress: number,\n a: AffineMatrix,\n b: AffineMatrix\n) {\n 'worklet';\n return addMatrices(a, scaleMatrix(subtractMatrices(b, a), progress));\n}\n\nfunction applyProgressToNumber(progress: number, a: number, b: number) {\n 'worklet';\n return a + progress * (b - a);\n}\n\nfunction decorateAnimation(\n animation: T\n): void {\n 'worklet';\n const baseOnStart = (animation as Animation).onStart;\n const baseOnFrame = (animation as Animation).onFrame;\n\n if ((animation as HigherOrderAnimation).isHigherOrder) {\n animation.onStart = (\n animation: Animation,\n value: number,\n timestamp: Timestamp,\n previousAnimation: Animation\n ) => {\n if (animation.reduceMotion === undefined) {\n animation.reduceMotion = getReduceMotionFromConfig();\n }\n return baseOnStart(animation, value, timestamp, previousAnimation);\n };\n return;\n }\n\n const animationCopy = Object.assign({}, animation);\n delete animationCopy.callback;\n\n const prefNumberSuffOnStart = (\n animation: Animation,\n value: string | number,\n timestamp: number,\n previousAnimation: Animation\n ) => {\n // recognize prefix, suffix, and updates stripped value on animation start\n const { prefix, suffix, strippedValue } = recognizePrefixSuffix(value);\n animation.__prefix = prefix;\n animation.__suffix = suffix;\n animation.strippedCurrent = strippedValue;\n const { strippedValue: strippedToValue } = recognizePrefixSuffix(\n animation.toValue as string | number\n );\n animation.current = strippedValue;\n animation.startValue = strippedValue;\n animation.toValue = strippedToValue;\n if (previousAnimation && previousAnimation !== animation) {\n const {\n prefix: paPrefix,\n suffix: paSuffix,\n strippedValue: paStrippedValue,\n } = recognizePrefixSuffix(previousAnimation.current as string | number);\n previousAnimation.current = paStrippedValue;\n previousAnimation.__prefix = paPrefix;\n previousAnimation.__suffix = paSuffix;\n }\n\n baseOnStart(animation, strippedValue, timestamp, previousAnimation);\n\n animation.current =\n (animation.__prefix ?? '') +\n animation.current +\n (animation.__suffix ?? '');\n\n if (previousAnimation && previousAnimation !== animation) {\n previousAnimation.current =\n (previousAnimation.__prefix ?? '') +\n previousAnimation.current +\n (previousAnimation.__suffix ?? '');\n }\n };\n const prefNumberSuffOnFrame = (\n animation: Animation,\n timestamp: number\n ) => {\n animation.current = animation.strippedCurrent;\n const res = baseOnFrame(animation, timestamp);\n animation.strippedCurrent = animation.current;\n animation.current =\n (animation.__prefix ?? '') +\n animation.current +\n (animation.__suffix ?? '');\n return res;\n };\n\n const tab = ['R', 'G', 'B', 'A'];\n const colorOnStart = (\n animation: Animation,\n value: string | number,\n timestamp: Timestamp,\n previousAnimation: Animation\n ): void => {\n let RGBAValue: ParsedColorArray;\n let RGBACurrent: ParsedColorArray;\n let RGBAToValue: ParsedColorArray;\n const res: Array = [];\n if (isColor(value)) {\n RGBACurrent = toLinearSpace(convertToRGBA(animation.current));\n RGBAValue = toLinearSpace(convertToRGBA(value));\n if (animation.toValue) {\n RGBAToValue = toLinearSpace(convertToRGBA(animation.toValue));\n }\n }\n tab.forEach((i, index) => {\n animation[i] = Object.assign({}, animationCopy);\n animation[i].current = RGBACurrent[index];\n animation[i].toValue = RGBAToValue ? RGBAToValue[index] : undefined;\n animation[i].onStart(\n animation[i],\n RGBAValue[index],\n timestamp,\n previousAnimation ? previousAnimation[i] : undefined\n );\n res.push(animation[i].current);\n });\n\n animation.current = rgbaArrayToRGBAColor(\n toGammaSpace(res as ParsedColorArray)\n );\n };\n\n const colorOnFrame = (\n animation: Animation,\n timestamp: Timestamp\n ): boolean => {\n const RGBACurrent = toLinearSpace(convertToRGBA(animation.current));\n const res: Array = [];\n let finished = true;\n tab.forEach((i, index) => {\n animation[i].current = RGBACurrent[index];\n const result = animation[i].onFrame(animation[i], timestamp);\n // We really need to assign this value to result, instead of passing it directly - otherwise once \"finished\" is false, onFrame won't be called\n finished = finished && result;\n res.push(animation[i].current);\n });\n\n animation.current = rgbaArrayToRGBAColor(\n toGammaSpace(res as ParsedColorArray)\n );\n return finished;\n };\n\n const transformationMatrixOnStart = (\n animation: Animation,\n value: AffineMatrixFlat,\n timestamp: Timestamp,\n previousAnimation: Animation\n ): void => {\n const toValue = animation.toValue as AffineMatrixFlat;\n\n animation.startMatrices = decomposeMatrixIntoMatricesAndAngles(value);\n animation.stopMatrices = decomposeMatrixIntoMatricesAndAngles(toValue);\n\n // We create an animation copy to animate single value between 0 and 100\n // We set limits from 0 to 100 (instead of 0-1) to make spring look good\n // with default thresholds.\n\n animation[0] = Object.assign({}, animationCopy);\n animation[0].current = 0;\n animation[0].toValue = 100;\n animation[0].onStart(\n animation[0],\n 0,\n timestamp,\n previousAnimation ? previousAnimation[0] : undefined\n );\n\n animation.current = value;\n };\n\n const transformationMatrixOnFrame = (\n animation: Animation,\n timestamp: Timestamp\n ): boolean => {\n let finished = true;\n const result = animation[0].onFrame(animation[0], timestamp);\n // We really need to assign this value to result, instead of passing it directly - otherwise once \"finished\" is false, onFrame won't be called\n finished = finished && result;\n\n const progress = animation[0].current / 100;\n\n const transforms = ['translationMatrix', 'scaleMatrix', 'skewMatrix'];\n const mappedTransforms: Array = [];\n\n transforms.forEach((key, _) =>\n mappedTransforms.push(\n applyProgressToMatrix(\n progress,\n animation.startMatrices[key],\n animation.stopMatrices[key]\n )\n )\n );\n\n const [currentTranslation, currentScale, skewMatrix] = mappedTransforms;\n\n const rotations: Array<'x' | 'y' | 'z'> = ['x', 'y', 'z'];\n const mappedRotations: Array = [];\n\n rotations.forEach((key, _) => {\n const angle = applyProgressToNumber(\n progress,\n animation.startMatrices['r' + key],\n animation.stopMatrices['r' + key]\n );\n mappedRotations.push(getRotationMatrix(angle, key));\n });\n\n const [rotationMatrixX, rotationMatrixY, rotationMatrixZ] = mappedRotations;\n\n const rotationMatrix = multiplyMatrices(\n rotationMatrixX,\n multiplyMatrices(rotationMatrixY, rotationMatrixZ)\n );\n\n const updated = flatten(\n multiplyMatrices(\n multiplyMatrices(\n currentScale,\n multiplyMatrices(skewMatrix, rotationMatrix)\n ),\n currentTranslation\n )\n );\n\n animation.current = updated;\n\n return finished;\n };\n\n const arrayOnStart = (\n animation: Animation,\n value: Array,\n timestamp: Timestamp,\n previousAnimation: Animation\n ): void => {\n value.forEach((v, i) => {\n animation[i] = Object.assign({}, animationCopy);\n animation[i].current = v;\n animation[i].toValue = (animation.toValue as Array)[i];\n animation[i].onStart(\n animation[i],\n v,\n timestamp,\n previousAnimation ? previousAnimation[i] : undefined\n );\n });\n\n animation.current = value;\n };\n\n const arrayOnFrame = (\n animation: Animation,\n timestamp: Timestamp\n ): boolean => {\n let finished = true;\n (animation.current as Array).forEach((_, i) => {\n const result = animation[i].onFrame(animation[i], timestamp);\n // We really need to assign this value to result, instead of passing it directly - otherwise once \"finished\" is false, onFrame won't be called\n finished = finished && result;\n (animation.current as Array)[i] = animation[i].current;\n });\n\n return finished;\n };\n\n const objectOnStart = (\n animation: Animation,\n value: AnimatableValueObject,\n timestamp: Timestamp,\n previousAnimation: Animation\n ): void => {\n for (const key in value) {\n animation[key] = Object.assign({}, animationCopy);\n animation[key].onStart = animation.onStart;\n\n animation[key].current = value[key];\n animation[key].toValue = (animation.toValue as AnimatableValueObject)[\n key\n ];\n animation[key].onStart(\n animation[key],\n value[key],\n timestamp,\n previousAnimation ? previousAnimation[key] : undefined\n );\n }\n animation.current = value;\n };\n\n const objectOnFrame = (\n animation: Animation,\n timestamp: Timestamp\n ): boolean => {\n let finished = true;\n const newObject: AnimatableValueObject = {};\n for (const key in animation.current as AnimatableValueObject) {\n const result = animation[key].onFrame(animation[key], timestamp);\n // We really need to assign this value to result, instead of passing it directly - otherwise once \"finished\" is false, onFrame won't be called\n finished = finished && result;\n newObject[key] = animation[key].current;\n }\n animation.current = newObject;\n return finished;\n };\n\n animation.onStart = (\n animation: Animation,\n value: number,\n timestamp: Timestamp,\n previousAnimation: Animation\n ) => {\n if (animation.reduceMotion === undefined) {\n animation.reduceMotion = getReduceMotionFromConfig();\n }\n if (animation.reduceMotion) {\n if (animation.toValue !== undefined) {\n animation.current = animation.toValue;\n } else {\n // if there is no `toValue`, then the base function is responsible for setting the current value\n baseOnStart(animation, value, timestamp, previousAnimation);\n }\n animation.startTime = 0;\n animation.onFrame = () => true;\n return;\n }\n if (isColor(value)) {\n colorOnStart(animation, value, timestamp, previousAnimation);\n animation.onFrame = colorOnFrame;\n return;\n } else if (isAffineMatrixFlat(value)) {\n transformationMatrixOnStart(\n animation,\n value,\n timestamp,\n previousAnimation\n );\n animation.onFrame = transformationMatrixOnFrame;\n return;\n } else if (Array.isArray(value)) {\n arrayOnStart(animation, value, timestamp, previousAnimation);\n animation.onFrame = arrayOnFrame;\n return;\n } else if (typeof value === 'string') {\n prefNumberSuffOnStart(animation, value, timestamp, previousAnimation);\n animation.onFrame = prefNumberSuffOnFrame;\n return;\n } else if (typeof value === 'object' && value !== null) {\n objectOnStart(animation, value, timestamp, previousAnimation);\n animation.onFrame = objectOnFrame;\n return;\n }\n baseOnStart(animation, value, timestamp, previousAnimation);\n };\n}\n\ntype AnimationToDecoration<\n T extends AnimationObject | StyleLayoutAnimation,\n U extends AnimationObject | StyleLayoutAnimation\n> = T extends StyleLayoutAnimation\n ? Record\n : U | (() => U) | AnimatableValue;\n\nconst IS_NATIVE = NativeReanimatedModule.native;\n\nexport function defineAnimation<\n T extends AnimationObject | StyleLayoutAnimation, // type that's supposed to be returned\n U extends AnimationObject | StyleLayoutAnimation = T // type that's received\n>(starting: AnimationToDecoration, factory: () => T): T {\n 'worklet';\n if (IN_STYLE_UPDATER) {\n return starting as unknown as T;\n }\n const create = () => {\n 'worklet';\n const animation = factory();\n decorateAnimation(animation as unknown as U);\n return animation;\n };\n\n if (_WORKLET || !IS_NATIVE) {\n return create();\n }\n // @ts-ignore: eslint-disable-line\n return create;\n}\n\nexport function cancelAnimation(sharedValue: SharedValue): void {\n 'worklet';\n // setting the current value cancels the animation if one is currently running\n sharedValue.value = sharedValue.value; // eslint-disable-line no-self-assign\n}\n","import type { ViewStyle, TextStyle } from 'react-native';\n\nexport interface StyleProps extends ViewStyle, TextStyle {\n originX?: number;\n originY?: number;\n [key: string]: any;\n}\n\nexport interface SharedValue {\n value: Value;\n addListener: (listenerID: number, listener: (value: any) => void) => void;\n removeListener: (listenerID: number) => void;\n modify: (modifier: (value: any) => any) => void;\n}\n\n// The below type is used for HostObjects returned by the JSI API that don't have\n// any accessible fields or methods but can carry data that is accessed from the\n// c++ side. We add a field to the type to make it possible for typescript to recognize\n// which JSI methods accept those types as arguments and to be able to correctly type\n// check other methods that may use them. However, this field is not actually defined\n// nor should be used for anything else as assigning any data to those objects will\n// throw an error.\nexport type ShareableRef = {\n __hostObjectShareableJSRef: T;\n};\n\n// In case of objects with depth or arrays of objects or arrays of arrays etc.\n// we add this utility type that makes it a SharaebleRef of the outermost type.\nexport type FlatShareableRef = T extends ShareableRef\n ? ShareableRef\n : ShareableRef;\n\nexport type ShareableSyncDataHolderRef = {\n __hostObjectShareableJSRefSyncDataHolder: T;\n};\n\nexport type MapperRegistry = {\n start: (\n mapperID: number,\n worklet: () => void,\n inputs: SharedValue[],\n outputs?: SharedValue[]\n ) => void;\n stop: (mapperID: number) => void;\n};\n\ntype WorkletClosure = Record;\n\ninterface WorkletInitDataCommon {\n code: string;\n}\n\ntype WorkletInitDataRelease = WorkletInitDataCommon;\n\ninterface WorkletInitDataDev extends WorkletInitDataCommon {\n location: string;\n sourceMap: string;\n version: string;\n}\n\ninterface WorkletBaseCommon {\n __closure: WorkletClosure;\n __workletHash: number;\n}\n\ninterface WorkletBaseRelease extends WorkletBaseCommon {\n __initData: WorkletInitDataRelease;\n}\n\ninterface WorkletBaseDev extends WorkletBaseCommon {\n __initData: WorkletInitDataDev;\n __stackDetails: Error;\n}\n\nexport type WorkletFunction = ((\n ...args: Args\n) => ReturnValue) &\n (WorkletBaseRelease | WorkletBaseDev);\n\nexport interface NativeEvent {\n nativeEvent: T;\n}\n\nexport interface NestedObject {\n [key: string]: NestedObjectValues;\n}\n\nexport type NestedObjectValues =\n | T\n | Array>\n | NestedObject;\n\ntype Animatable = number | string | Array;\n\nexport type AnimatableValueObject = { [key: string]: Animatable };\n\nexport type AnimatableValue = Animatable | AnimatableValueObject;\n\nexport interface AnimationObject {\n [key: string]: any;\n callback?: AnimationCallback;\n current?: AnimatableValue;\n toValue?: AnimationObject['current'];\n startValue?: AnimationObject['current'];\n finished?: boolean;\n strippedCurrent?: number;\n cancelled?: boolean;\n reduceMotion?: boolean;\n\n __prefix?: string;\n __suffix?: string;\n onFrame: (animation: any, timestamp: Timestamp) => boolean;\n onStart: (\n nextAnimation: any,\n current: any,\n timestamp: Timestamp,\n previousAnimation: any\n ) => void;\n}\n\nexport interface Animation extends AnimationObject {\n onFrame: (animation: T, timestamp: Timestamp) => boolean;\n onStart: (\n nextAnimation: T,\n current: AnimatableValue,\n timestamp: Timestamp,\n previousAnimation: Animation | null | T\n ) => void;\n}\n\nexport enum SensorType {\n ACCELEROMETER = 1,\n GYROSCOPE = 2,\n GRAVITY = 3,\n MAGNETIC_FIELD = 4,\n ROTATION = 5,\n}\nexport enum IOSReferenceFrame {\n XArbitraryZVertical,\n XArbitraryCorrectedZVertical,\n XMagneticNorthZVertical,\n XTrueNorthZVertical,\n Auto,\n}\n\nexport type SensorConfig = {\n interval: number | 'auto';\n adjustToInterfaceOrientation: boolean;\n iosReferenceFrame: IOSReferenceFrame;\n};\n\nexport type AnimatedSensor = {\n sensor: SharedValue;\n unregister: () => void;\n isAvailable: boolean;\n config: SensorConfig;\n};\n\nexport type AnimationCallback = (\n finished?: boolean,\n current?: AnimatableValue\n) => void;\n\nexport type Timestamp = number;\n\nexport type Value3D = {\n x: number;\n y: number;\n z: number;\n interfaceOrientation: InterfaceOrientation;\n};\n\nexport type ValueRotation = {\n qw: number;\n qx: number;\n qy: number;\n qz: number;\n yaw: number;\n pitch: number;\n roll: number;\n interfaceOrientation: InterfaceOrientation;\n};\n\nexport enum InterfaceOrientation {\n ROTATION_0 = 0,\n ROTATION_90 = 90,\n ROTATION_180 = 180,\n ROTATION_270 = 270,\n}\n\nexport type ShadowNodeWrapper = object;\n\nexport enum KeyboardState {\n UNKNOWN = 0,\n OPENING = 1,\n OPEN = 2,\n CLOSING = 3,\n CLOSED = 4,\n}\n\nexport type AnimatedKeyboardInfo = {\n height: SharedValue;\n state: SharedValue;\n};\n\nexport interface MeasuredDimensions {\n x: number;\n y: number;\n width: number;\n height: number;\n pageX: number;\n pageY: number;\n}\n\nexport interface AnimatedKeyboardOptions {\n isStatusBarTranslucentAndroid?: boolean;\n}\n\n/**\n * - `System` - If the `Reduce motion` accessibility setting is enabled on the device, disable the animation. Otherwise, enable the animation.\n * - `Always` - Disable the animation.\n * - `Never` - Enable the animation.\n */\nexport enum ReduceMotion {\n System = 'system',\n Always = 'always',\n Never = 'never',\n}\n\n// THE LAND OF THE DEPRECATED\n\n/**\n * @deprecated\n */\nexport type __Context = Record;\n\n/**\n * @deprecated\n */\nexport interface __WorkletFunction {\n __closure?: __Context;\n __workletHash?: number;\n}\n\n/**\n * @deprecated\n */\nexport interface __BasicWorkletFunction extends __WorkletFunction {\n (): T;\n}\n\n/**\n * @deprecated\n */\nexport interface __ComplexWorkletFunction\n extends __WorkletFunction {\n (...args: A): R;\n __remoteFunction?: (...args: A) => R;\n}\n\n/**\n * @deprecated\n */\nexport interface __AdapterWorkletFunction extends __WorkletFunction {\n (value: NestedObject): void;\n}\n","import type { ForwardedRef } from 'react';\nimport React, { Component, forwardRef } from 'react';\nimport type { FlatListProps, LayoutChangeEvent } from 'react-native';\nimport { FlatList, StyleSheet } from 'react-native';\nimport { AnimatedView } from './View';\nimport createAnimatedComponent from '../../createAnimatedComponent/createAnimatedComponent';\nimport type { ILayoutAnimationBuilder } from '../layoutReanimation/animationBuilder/commonTypes';\nimport type { StyleProps } from '../commonTypes';\nimport type { AnimateProps } from '../helperTypes';\n\nconst AnimatedFlatList = createAnimatedComponent(FlatList as any) as any;\n\ninterface AnimatedFlatListProps {\n onLayout: (event: LayoutChangeEvent) => void;\n // implicit `children` prop has been removed in @types/react^18.0.0\n children: React.ReactNode;\n inverted?: boolean;\n horizontal?: boolean;\n}\n\nconst createCellRenderer = (\n itemLayoutAnimation?: ILayoutAnimationBuilder,\n cellStyle?: StyleProps\n) => {\n const cellRenderer = (props: AnimatedFlatListProps) => {\n return (\n \n {props.children}\n \n );\n };\n\n return cellRenderer;\n};\n\ninterface ReanimatedFlatListPropsWithLayout extends FlatListProps {\n itemLayoutAnimation?: ILayoutAnimationBuilder;\n}\n\nexport type FlatListPropsWithLayout = ReanimatedFlatListPropsWithLayout;\n\n// TODO TYPESCRIPT This is a temporary type to get rid of .d.ts file.\ndeclare class ReanimatedFlatListClass extends Component<\n AnimateProps>\n> {\n getNode(): FlatList;\n}\n\ninterface ReanimatedFlatListProps extends FlatListProps {\n itemLayoutAnimation?: ILayoutAnimationBuilder;\n}\n\nexport const ReanimatedFlatList = forwardRef(\n (props: ReanimatedFlatListProps, ref: ForwardedRef) => {\n const { itemLayoutAnimation, ...restProps } = props;\n\n const cellStyle = restProps?.inverted\n ? restProps?.horizontal\n ? styles.horizontallyInverted\n : styles.verticallyInverted\n : undefined;\n\n // Set default scrollEventThrottle, because user expects\n // to have continuous scroll events and\n // react-native defaults it to 50 for FlatLists.\n // We set it to 1 so we have peace until\n // there are 960 fps screens.\n if (!('scrollEventThrottle' in restProps)) {\n restProps.scrollEventThrottle = 1;\n }\n\n const cellRenderer = React.useMemo(\n () => createCellRenderer(itemLayoutAnimation, cellStyle),\n [cellStyle]\n );\n\n return (\n \n );\n }\n) as unknown as ReanimatedFlatList;\n\nconst styles = StyleSheet.create({\n verticallyInverted: { transform: [{ scaleY: -1 }] },\n horizontallyInverted: { transform: [{ scaleX: -1 }] },\n});\n\nexport type ReanimatedFlatList = typeof ReanimatedFlatListClass &\n FlatList;\n","import type { ImageProps } from 'react-native';\nimport { Image } from 'react-native';\nimport createAnimatedComponent from '../../createAnimatedComponent/createAnimatedComponent';\nimport { Component } from 'react';\nimport type { AnimateProps } from '../helperTypes';\n\n// TODO TYPESCRIPT This is a temporary type to get rid of .d.ts file.\ndeclare class AnimatedImageClass extends Component> {\n getNode(): Image;\n}\n\nexport type AnimatedImage = typeof AnimatedImageClass & Image;\n\nexport const AnimatedImage = createAnimatedComponent(\n Image as any\n) as unknown as AnimatedImage; // TODO TYPESCRIPT This temporary cast is to get rid of .d.ts file.\n","import type { ForwardedRef, RefObject } from 'react';\nimport React, { Component, forwardRef } from 'react';\nimport type { ScrollViewProps } from 'react-native';\nimport { ScrollView } from 'react-native';\nimport createAnimatedComponent from '../../createAnimatedComponent/createAnimatedComponent';\nimport type { SharedValue } from '../commonTypes';\nimport type { AnimateProps } from '../helperTypes';\nimport { useAnimatedRef, useScrollViewOffset } from '../hook';\n\nexport interface AnimatedScrollViewProps extends ScrollViewProps {\n scrollViewOffset?: SharedValue;\n}\n\n// TODO TYPESCRIPT This is a temporary type to get rid of .d.ts file.\ndeclare class AnimatedScrollViewClass extends Component<\n AnimateProps\n> {\n getNode(): ScrollView;\n}\n// TODO TYPESCRIPT This is a temporary type to get rid of .d.ts file.\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\ninterface AnimatedScrollViewInterface extends ScrollView {\n getNode(): ScrollView;\n}\n\nconst AnimatedScrollViewComponent = createAnimatedComponent(\n ScrollView as any\n) as any;\n\n// type AnimatedScrollViewFC = React.FC;\n\nexport const AnimatedScrollView: AnimatedScrollView = forwardRef(\n (props: AnimatedScrollViewProps, ref: ForwardedRef) => {\n const { scrollViewOffset, ...restProps } = props;\n const aref = ref === null ? useAnimatedRef() : ref;\n\n if (scrollViewOffset) {\n useScrollViewOffset(\n aref as RefObject,\n scrollViewOffset\n );\n }\n\n // Set default scrollEventThrottle, because user expects\n // to have continuous scroll events.\n // We set it to 1 so we have peace until\n // there are 960 fps screens.\n if (!('scrollEventThrottle' in restProps)) {\n restProps.scrollEventThrottle = 1;\n }\n\n return ;\n }\n) as unknown as AnimatedScrollView;\n\nexport type AnimatedScrollView = typeof AnimatedScrollViewClass &\n AnimatedScrollViewInterface;\n","import { Component } from 'react';\nimport type { TextProps } from 'react-native';\nimport { Text } from 'react-native';\nimport createAnimatedComponent from '../../createAnimatedComponent/createAnimatedComponent';\nimport type { AnimateProps } from '../helperTypes';\n\n// TODO TYPESCRIPT This is a temporary type to get rid of .d.ts file.\ndeclare class AnimatedTextClass extends Component> {\n getNode(): Text;\n}\n\nexport const AnimatedText = createAnimatedComponent(\n Text as any\n) as unknown as AnimatedText; // TODO TYPESCRIPT This temporary cast is to get rid of .d.ts file.\n\nexport type AnimatedText = typeof AnimatedTextClass & AnimatedTextClass & Text;\n","import type { ViewProps } from 'react-native';\nimport { View } from 'react-native';\nimport createAnimatedComponent from '../../createAnimatedComponent/createAnimatedComponent';\nimport { Component } from 'react';\nimport type { AnimateProps } from '../helperTypes';\n\n// TODO TYPESCRIPT This is a temporary type to get rid of .d.ts file.\ndeclare class AnimatedViewClass extends Component> {\n getNode(): View;\n}\nexport type AnimatedView = typeof AnimatedViewClass & View;\n\nexport const AnimatedView = createAnimatedComponent(View);\n","import NativeReanimatedModule from './NativeReanimated';\nimport { nativeShouldBeMock, isWeb } from './PlatformChecker';\nimport type {\n AnimatedKeyboardOptions,\n SensorConfig,\n SensorType,\n SharedValue,\n Value3D,\n ValueRotation,\n} from './commonTypes';\nimport { makeShareableCloneRecursive } from './shareables';\nimport type {\n LayoutAnimationFunction,\n LayoutAnimationType,\n} from './layoutReanimation';\nimport { initializeUIRuntime } from './initializers';\nimport type {\n ProgressAnimationCallback,\n SharedTransitionAnimationsFunction,\n} from './layoutReanimation/animationBuilder/commonTypes';\nimport { SensorContainer } from './SensorContainer';\n\nexport { startMapper, stopMapper } from './mappers';\nexport { runOnJS, runOnUI } from './threads';\nexport { createWorkletRuntime } from './runtimes';\nexport type { WorkletRuntime } from './runtimes';\nexport { makeShareable, makeShareableCloneRecursive } from './shareables';\nexport { makeMutable, makeRemote } from './mutables';\n\n/**\n * @returns `true` in Reanimated 3, doesn't exist in Reanimated 2 or 1\n */\nexport const isReanimated3 = () => true;\n\n// Superseded by check in `/src/threads.ts`.\n// Used by `react-navigation` to detect if using Reanimated 2 or 3.\n/**\n * @deprecated This function was superseded by other checks.\n * We keep it here for backward compatibility reasons.\n * If you need to check if you are using Reanimated 3 or Reanimated 2\n * please use `isReanimated3` function instead.\n * @returns `true` in Reanimated 3, doesn't exist in Reanimated 2\n */\nexport const isConfigured = isReanimated3;\n\n// this is for web implementation\nglobal._WORKLET = false;\nglobal._log = function (s: string) {\n console.log(s);\n};\n\nexport function getViewProp(viewTag: number, propName: string): Promise {\n if (global._IS_FABRIC) {\n throw new Error(\n '[Reanimated] `getViewProp` is not supported on Fabric yet.'\n );\n }\n\n return new Promise((resolve, reject) => {\n return NativeReanimatedModule.getViewProp(\n viewTag,\n propName,\n (result: T) => {\n if (typeof result === 'string' && result.substr(0, 6) === 'error:') {\n reject(result);\n } else {\n resolve(result);\n }\n }\n );\n });\n}\n\nfunction getSensorContainer(): SensorContainer {\n if (!global.__sensorContainer) {\n global.__sensorContainer = new SensorContainer();\n }\n return global.__sensorContainer;\n}\n\nexport function registerEventHandler(\n eventHandler: (event: T) => void,\n eventName: string,\n emitterReactTag = -1\n): number {\n function handleAndFlushAnimationFrame(eventTimestamp: number, event: T) {\n 'worklet';\n global.__frameTimestamp = eventTimestamp;\n eventHandler(event);\n global.__flushAnimationFrame(eventTimestamp);\n global.__frameTimestamp = undefined;\n }\n return NativeReanimatedModule.registerEventHandler(\n makeShareableCloneRecursive(handleAndFlushAnimationFrame),\n eventName,\n emitterReactTag\n );\n}\n\nexport function unregisterEventHandler(id: number): void {\n return NativeReanimatedModule.unregisterEventHandler(id);\n}\n\nexport function subscribeForKeyboardEvents(\n eventHandler: (state: number, height: number) => void,\n options: AnimatedKeyboardOptions\n): number {\n // TODO: this should really go with the same code path as other events, that is\n // via registerEventHandler. For now we are copying the code from there.\n function handleAndFlushAnimationFrame(state: number, height: number) {\n 'worklet';\n const now = performance.now();\n global.__frameTimestamp = now;\n eventHandler(state, height);\n global.__flushAnimationFrame(now);\n global.__frameTimestamp = undefined;\n }\n return NativeReanimatedModule.subscribeForKeyboardEvents(\n makeShareableCloneRecursive(handleAndFlushAnimationFrame),\n options.isStatusBarTranslucentAndroid ?? false\n );\n}\n\nexport function unsubscribeFromKeyboardEvents(listenerId: number): void {\n return NativeReanimatedModule.unsubscribeFromKeyboardEvents(listenerId);\n}\n\nexport function registerSensor(\n sensorType: SensorType,\n config: SensorConfig,\n eventHandler: (\n data: Value3D | ValueRotation,\n orientationDegrees: number\n ) => void\n): number {\n const sensorContainer = getSensorContainer();\n return sensorContainer.registerSensor(\n sensorType,\n config,\n makeShareableCloneRecursive(eventHandler)\n );\n}\n\nexport function initializeSensor(\n sensorType: SensorType,\n config: SensorConfig\n): SharedValue {\n const sensorContainer = getSensorContainer();\n return sensorContainer.initializeSensor(sensorType, config);\n}\n\nexport function unregisterSensor(sensorId: number): void {\n const sensorContainer = getSensorContainer();\n return sensorContainer.unregisterSensor(sensorId);\n}\n\nif (!isWeb()) {\n initializeUIRuntime();\n}\n\ntype FeaturesConfig = {\n enableLayoutAnimations: boolean;\n setByUser: boolean;\n};\n\nlet featuresConfig: FeaturesConfig = {\n enableLayoutAnimations: false,\n setByUser: false,\n};\n\nexport function enableLayoutAnimations(\n flag: boolean,\n isCallByUser = true\n): void {\n if (isCallByUser) {\n featuresConfig = {\n enableLayoutAnimations: flag,\n setByUser: true,\n };\n NativeReanimatedModule.enableLayoutAnimations(flag);\n } else if (\n !featuresConfig.setByUser &&\n featuresConfig.enableLayoutAnimations !== flag\n ) {\n featuresConfig.enableLayoutAnimations = flag;\n NativeReanimatedModule.enableLayoutAnimations(flag);\n }\n}\n\nexport function configureLayoutAnimations(\n viewTag: number | HTMLElement,\n type: LayoutAnimationType,\n config:\n | LayoutAnimationFunction\n | Keyframe\n | SharedTransitionAnimationsFunction\n | ProgressAnimationCallback,\n sharedTransitionTag = ''\n): void {\n NativeReanimatedModule.configureLayoutAnimation(\n viewTag as number, // On web this function is no-op, therefore we can cast viewTag to number\n type,\n sharedTransitionTag,\n makeShareableCloneRecursive(config)\n );\n}\n\nexport function configureProps(uiProps: string[], nativeProps: string[]): void {\n if (!nativeShouldBeMock()) {\n NativeReanimatedModule.configureProps(uiProps, nativeProps);\n }\n}\n","type StackDetails = [Error, number, number];\n\nconst _workletStackDetails = new Map();\n\nexport function registerWorkletStackDetails(\n hash: number,\n stackDetails: StackDetails\n) {\n _workletStackDetails.set(hash, stackDetails);\n}\n\nfunction getBundleOffset(error: Error): [string, number, number] {\n const frame = error.stack?.split('\\n')?.[0];\n if (frame) {\n const parsedFrame = /@([^@]+):(\\d+):(\\d+)/.exec(frame);\n if (parsedFrame) {\n const [, file, line, col] = parsedFrame;\n return [file, Number(line), Number(col)];\n }\n }\n return ['unknown', 0, 0];\n}\n\nfunction processStack(stack: string): string {\n const workletStackEntries = stack.match(/worklet_(\\d+):(\\d+):(\\d+)/g);\n let result = stack;\n workletStackEntries?.forEach((match) => {\n const [, hash, origLine, origCol] = match.split(/:|_/).map(Number);\n const errorDetails = _workletStackDetails.get(hash);\n if (!errorDetails) {\n return;\n }\n const [error, lineOffset, colOffset] = errorDetails;\n const [bundleFile, bundleLine, bundleCol] = getBundleOffset(error);\n const line = origLine + bundleLine + lineOffset;\n const col = origCol + bundleCol + colOffset;\n\n result = result.replace(match, `${bundleFile}:${line}:${col}`);\n });\n return result;\n}\n\nexport function reportFatalErrorOnJS({\n message,\n stack,\n}: {\n message: string;\n stack?: string;\n}) {\n const error = new Error();\n error.message = message;\n error.stack = stack ? processStack(stack) : undefined;\n error.name = 'ReanimatedError';\n // @ts-ignore React Native's ErrorUtils implementation extends the Error type with jsEngine field\n error.jsEngine = 'reanimated';\n // @ts-ignore the reportFatalError method is an internal method of ErrorUtils not exposed in the type definitions\n global.ErrorUtils.reportFatalError(error);\n}\n","export function getShadowNodeWrapperFromRef() {\n throw new Error(\n '[Reanimated] Trying to call `getShadowNodeWrapperFromRef` on web.'\n );\n}\n","import { runOnUI } from '../core';\nimport type { FrameInfo } from './FrameCallbackRegistryUI';\nimport { prepareUIRegistry } from './FrameCallbackRegistryUI';\n\nexport default class FrameCallbackRegistryJS {\n private nextCallbackId = 0;\n\n constructor() {\n prepareUIRegistry();\n }\n\n registerFrameCallback(callback: (frameInfo: FrameInfo) => void): number {\n if (!callback) {\n return -1;\n }\n\n const callbackId = this.nextCallbackId;\n this.nextCallbackId++;\n\n runOnUI(() => {\n global._frameCallbackRegistry.registerFrameCallback(callback, callbackId);\n })();\n\n return callbackId;\n }\n\n unregisterFrameCallback(callbackId: number): void {\n runOnUI(() => {\n global._frameCallbackRegistry.unregisterFrameCallback(callbackId);\n })();\n }\n\n manageStateFrameCallback(callbackId: number, state: boolean): void {\n runOnUI(() => {\n global._frameCallbackRegistry.manageStateFrameCallback(callbackId, state);\n })();\n }\n}\n","import { runOnUIImmediately } from '../threads';\n\ntype CallbackDetails = {\n callback: (frameInfo: FrameInfo) => void;\n startTime: number | null;\n};\n\nexport type FrameInfo = {\n timestamp: number;\n timeSincePreviousFrame: number | null;\n timeSinceFirstFrame: number;\n};\n\nexport interface FrameCallbackRegistryUI {\n frameCallbackRegistry: Map;\n activeFrameCallbacks: Set;\n previousFrameTimestamp: number | null;\n runCallbacks: (callId: number) => void;\n nextCallId: number;\n registerFrameCallback: (\n callback: (frameInfo: FrameInfo) => void,\n callbackId: number\n ) => void;\n unregisterFrameCallback: (callbackId: number) => void;\n manageStateFrameCallback: (callbackId: number, state: boolean) => void;\n}\n\nexport const prepareUIRegistry = runOnUIImmediately(() => {\n 'worklet';\n\n const frameCallbackRegistry: FrameCallbackRegistryUI = {\n frameCallbackRegistry: new Map(),\n activeFrameCallbacks: new Set(),\n previousFrameTimestamp: null,\n nextCallId: 0,\n\n runCallbacks(callId) {\n const loop = (timestamp: number) => {\n if (callId !== this.nextCallId) {\n return;\n }\n if (this.previousFrameTimestamp === null) {\n this.previousFrameTimestamp = timestamp;\n }\n\n const delta = timestamp - this.previousFrameTimestamp;\n\n this.activeFrameCallbacks.forEach((callbackId: number) => {\n const callbackDetails = this.frameCallbackRegistry.get(callbackId)!;\n\n const { startTime } = callbackDetails;\n\n if (startTime === null) {\n // First frame\n callbackDetails.startTime = timestamp;\n\n callbackDetails.callback({\n timestamp,\n timeSincePreviousFrame: null,\n timeSinceFirstFrame: 0,\n });\n } else {\n // Next frame\n callbackDetails.callback({\n timestamp,\n timeSincePreviousFrame: delta,\n timeSinceFirstFrame: timestamp - startTime,\n });\n }\n });\n\n if (this.activeFrameCallbacks.size > 0) {\n this.previousFrameTimestamp = timestamp;\n requestAnimationFrame(loop);\n } else {\n this.previousFrameTimestamp = null;\n }\n };\n\n // runCallback() should only be called after registering a callback,\n // so if there is only one active callback, then it means that there were\n // zero previously and the loop isn't running yet.\n if (this.activeFrameCallbacks.size === 1 && callId === this.nextCallId) {\n requestAnimationFrame(loop);\n }\n },\n\n registerFrameCallback(\n callback: (frameInfo: FrameInfo) => void,\n callbackId: number\n ) {\n this.frameCallbackRegistry.set(callbackId, {\n callback: callback,\n startTime: null,\n });\n },\n\n unregisterFrameCallback(callbackId: number) {\n this.manageStateFrameCallback(callbackId, false);\n this.frameCallbackRegistry.delete(callbackId);\n },\n\n manageStateFrameCallback(callbackId: number, state: boolean) {\n if (callbackId === -1) {\n return;\n }\n if (state) {\n this.activeFrameCallbacks.add(callbackId);\n this.runCallbacks(this.nextCallId);\n } else {\n const callback = this.frameCallbackRegistry.get(callbackId)!;\n callback.startTime = null;\n\n this.activeFrameCallbacks.delete(callbackId);\n if (this.activeFrameCallbacks.size === 0) {\n this.nextCallId += 1;\n }\n }\n },\n };\n\n global._frameCallbackRegistry = frameCallbackRegistry;\n});\n","import { useCallback } from 'react';\nimport { useAnimatedStyle } from './useAnimatedStyle';\nimport type { DependencyList } from './commonTypes';\nimport type {\n AnimatedPropsAdapterFunction,\n useAnimatedPropsType,\n} from '../helperTypes';\nimport { shouldBeUseWeb } from '../PlatformChecker';\n\n// TODO: we should make sure that when useAP is used we are not assigning styles\n// when you need styles to animated you should always use useAS\n// TODO TYPESCRIPT This is a temporary cast to get rid of .d.ts file.\n\nexport let useAnimatedProps: useAnimatedPropsType;\n\nif (shouldBeUseWeb()) {\n useAnimatedProps = function (\n updater: () => Partial,\n deps?: DependencyList | null,\n adapters?:\n | AnimatedPropsAdapterFunction\n | AnimatedPropsAdapterFunction[]\n | null\n ) {\n return (useAnimatedStyle as useAnimatedPropsType)(\n updater,\n deps,\n adapters,\n true\n );\n };\n} else {\n useAnimatedProps = useAnimatedStyle as useAnimatedPropsType;\n}\n\nexport function useWorkletCallback(\n fun: (...args: A) => R,\n deps?: DependencyList\n): (...args: Parameters) => R {\n return useCallback(fun, deps ?? []);\n}\n\nexport { useEvent, useHandler } from './utils';\n","export type { DependencyList, AnimatedRef } from './commonTypes';\nexport {\n useAnimatedProps,\n useEvent,\n useHandler,\n useWorkletCallback,\n} from './Hooks';\nexport { useSharedValue } from './useSharedValue';\nexport { useReducedMotion } from './useReducedMotion';\nexport { useAnimatedStyle } from './useAnimatedStyle';\nexport { useAnimatedGestureHandler } from './useAnimatedGestureHandler';\nexport type {\n GestureHandlerEvent,\n GestureHandlers,\n} from './useAnimatedGestureHandler';\nexport { useAnimatedReaction } from './useAnimatedReaction';\nexport type { AnimatedReactionWorkletFunction } from './useAnimatedReaction';\nexport { useAnimatedRef } from './useAnimatedRef';\nexport { useAnimatedScrollHandler } from './useAnimatedScrollHandler';\nexport type { ScrollHandler, ScrollHandlers } from './useAnimatedScrollHandler';\nexport { useDerivedValue } from './useDerivedValue';\nexport type { DerivedValue } from './useDerivedValue';\nexport { useAnimatedSensor } from './useAnimatedSensor';\nexport { useFrameCallback } from './useFrameCallback';\nexport type { FrameCallback } from './useFrameCallback';\nexport { useAnimatedKeyboard } from './useAnimatedKeyboard';\nexport { useScrollViewOffset } from './useScrollViewOffset';\n","import type { __Context, __WorkletFunction, NativeEvent } from '../commonTypes';\nimport type { DependencyList } from './commonTypes';\nimport { useEvent, useHandler } from './Hooks';\n\ninterface Handler extends __WorkletFunction {\n (event: T, context: TContext, isCanceledOrFailed?: boolean): void;\n}\n\nexport interface GestureHandlers {\n [key: string]: Handler | undefined;\n onStart?: Handler;\n onActive?: Handler;\n onEnd?: Handler;\n onFail?: Handler;\n onCancel?: Handler;\n onFinish?: Handler;\n}\n\nconst EventType = {\n UNDETERMINED: 0,\n FAILED: 1,\n BEGAN: 2,\n CANCELLED: 3,\n ACTIVE: 4,\n END: 5,\n};\n\ninterface GestureHandlerNativeEvent {\n handlerTag: number;\n numberOfPointers: number;\n state: (typeof EventType)[keyof typeof EventType];\n}\n\nexport interface GestureHandlerEvent extends NativeEvent {\n nativeEvent: T;\n}\n\ntype InferArgument = T extends GestureHandlerEvent\n ? E extends GestureHandlerNativeEvent\n ? E\n : never\n : never;\n\nexport function useAnimatedGestureHandler<\n T extends GestureHandlerEvent,\n TContext extends __Context = __Context,\n Payload = InferArgument\n>(\n handlers: GestureHandlers,\n dependencies?: DependencyList\n): (e: T) => void {\n const { context, doDependenciesDiffer, useWeb } = useHandler<\n Payload,\n TContext\n >(handlers, dependencies);\n\n const handler = (e: T) => {\n 'worklet';\n const event = useWeb ? e.nativeEvent : e;\n\n if (event.state === EventType.BEGAN && handlers.onStart) {\n handlers.onStart(event, context);\n }\n if (event.state === EventType.ACTIVE && handlers.onActive) {\n handlers.onActive(event, context);\n }\n if (\n event.oldState === EventType.ACTIVE &&\n event.state === EventType.END &&\n handlers.onEnd\n ) {\n handlers.onEnd(event, context);\n }\n if (\n event.oldState === EventType.BEGAN &&\n event.state === EventType.FAILED &&\n handlers.onFail\n ) {\n handlers.onFail(event, context);\n }\n if (\n event.oldState === EventType.ACTIVE &&\n event.state === EventType.CANCELLED &&\n handlers.onCancel\n ) {\n handlers.onCancel(event, context);\n }\n if (\n (event.oldState === EventType.BEGAN ||\n event.oldState === EventType.ACTIVE) &&\n event.state !== EventType.BEGAN &&\n event.state !== EventType.ACTIVE &&\n handlers.onFinish\n ) {\n handlers.onFinish(\n event,\n context,\n event.state === EventType.CANCELLED || event.state === EventType.FAILED\n );\n }\n };\n\n if (useWeb) {\n return handler;\n }\n\n return useEvent(\n handler,\n ['onGestureHandlerStateChange', 'onGestureHandlerEvent'],\n doDependenciesDiffer\n ) as unknown as (e: T) => void; // this is not correct but we want to make GH think it receives a function\n}\n","import { useEffect, useRef } from 'react';\nimport {\n makeMutable,\n subscribeForKeyboardEvents,\n unsubscribeFromKeyboardEvents,\n} from '../core';\nimport type {\n AnimatedKeyboardInfo,\n AnimatedKeyboardOptions,\n} from '../commonTypes';\nimport { KeyboardState } from '../commonTypes';\n\nexport function useAnimatedKeyboard(\n options: AnimatedKeyboardOptions = { isStatusBarTranslucentAndroid: false }\n): AnimatedKeyboardInfo {\n const ref = useRef(null);\n const listenerId = useRef(-1);\n const isSubscribed = useRef(false);\n\n if (ref.current === null) {\n const keyboardEventData: AnimatedKeyboardInfo = {\n state: makeMutable(KeyboardState.UNKNOWN),\n height: makeMutable(0),\n };\n listenerId.current = subscribeForKeyboardEvents((state, height) => {\n 'worklet';\n keyboardEventData.state.value = state;\n keyboardEventData.height.value = height;\n }, options);\n ref.current = keyboardEventData;\n isSubscribed.current = true;\n }\n useEffect(() => {\n if (isSubscribed.current === false && ref.current !== null) {\n const keyboardEventData = ref.current;\n // subscribe again after Fast Refresh\n listenerId.current = subscribeForKeyboardEvents((state, height) => {\n 'worklet';\n keyboardEventData.state.value = state;\n keyboardEventData.height.value = height;\n }, options);\n isSubscribed.current = true;\n }\n return () => {\n unsubscribeFromKeyboardEvents(listenerId.current);\n isSubscribed.current = false;\n };\n }, []);\n return ref.current;\n}\n","import { useEffect } from 'react';\nimport type { __BasicWorkletFunction, __WorkletFunction } from '../commonTypes';\nimport { startMapper, stopMapper } from '../core';\nimport type { DependencyList } from './commonTypes';\nimport { useSharedValue } from './useSharedValue';\nimport { shouldBeUseWeb } from '../PlatformChecker';\n\nexport interface AnimatedReactionWorkletFunction extends __WorkletFunction {\n (prepared: T, previous: T | null): void;\n}\n/**\n * @param prepare - worklet used for data preparation for the second parameter\n * @param react - worklet which takes data prepared by the one in the first parameter and performs certain actions\n * the first worklet defines the inputs, in other words on which shared values change will it be called.\n * the second one can modify any shared values but those which are mentioned in the first worklet. Beware of that, because this may result in endless loop and high cpu usage.\n */\nexport function useAnimatedReaction(\n prepare: __BasicWorkletFunction,\n react: AnimatedReactionWorkletFunction,\n dependencies?: DependencyList\n): void {\n const previous = useSharedValue(null, true);\n\n let inputs = Object.values(prepare.__closure ?? {});\n\n if (shouldBeUseWeb()) {\n if (!inputs.length && dependencies?.length) {\n // let web work without a Babel/SWC plugin\n inputs = dependencies;\n }\n }\n\n if (dependencies === undefined) {\n dependencies = [\n ...Object.values(prepare.__closure ?? {}),\n ...Object.values(react.__closure ?? {}),\n prepare.__workletHash,\n react.__workletHash,\n ];\n } else {\n dependencies.push(prepare.__workletHash, react.__workletHash);\n }\n\n useEffect(() => {\n const fun = () => {\n 'worklet';\n const input = prepare();\n react(input, previous.value);\n previous.value = input;\n };\n const mapperId = startMapper(fun, inputs, []);\n return () => {\n stopMapper(mapperId);\n };\n }, dependencies);\n}\n","import type { Component } from 'react';\nimport { useRef } from 'react';\nimport { useSharedValue } from './useSharedValue';\nimport type { AnimatedRef } from './commonTypes';\nimport type { ShadowNodeWrapper } from '../commonTypes';\nimport { getShadowNodeWrapperFromRef } from '../fabricUtils';\nimport {\n makeShareableCloneRecursive,\n registerShareableMapping,\n} from '../shareables';\nimport { Platform, findNodeHandle } from 'react-native';\n\ninterface MaybeScrollableComponent extends Component {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getNativeScrollRef?: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getScrollableNode?: any;\n viewConfig?: {\n uiViewClassName?: string;\n };\n}\n\nfunction getComponentOrScrollable(component: MaybeScrollableComponent) {\n if (global._IS_FABRIC && component.getNativeScrollRef) {\n return component.getNativeScrollRef();\n } else if (!global._IS_FABRIC && component.getScrollableNode) {\n return component.getScrollableNode();\n }\n return component;\n}\n\nconst getTagValueFunction = global._IS_FABRIC\n ? getShadowNodeWrapperFromRef\n : findNodeHandle;\n\nexport function useAnimatedRef<\n T extends MaybeScrollableComponent\n>(): AnimatedRef {\n const tag = useSharedValue(-1);\n const viewName = useSharedValue(null);\n\n const ref = useRef>();\n\n if (!ref.current) {\n const fun: AnimatedRef = >((component) => {\n // enters when ref is set by attaching to a component\n if (component) {\n tag.value = getTagValueFunction(getComponentOrScrollable(component));\n fun.current = component;\n // viewName is required only on iOS with Paper\n if (Platform.OS === 'ios' && !global._IS_FABRIC) {\n viewName.value = component?.viewConfig?.uiViewClassName || 'RCTView';\n }\n }\n return tag.value;\n });\n\n fun.current = null;\n\n const remoteRef = makeShareableCloneRecursive({\n __init: () => {\n 'worklet';\n const f = () => tag.value;\n f.viewName = viewName;\n return f;\n },\n });\n registerShareableMapping(fun, remoteRef);\n ref.current = fun;\n }\n\n return ref.current;\n}\n","import type { RefObject } from 'react';\nimport type { NativeScrollEvent, NativeSyntheticEvent } from 'react-native';\nimport type { __Context, NativeEvent, __WorkletFunction } from '../commonTypes';\nimport type WorkletEventHandler from '../WorkletEventHandler';\nimport type { DependencyList } from './commonTypes';\nimport { useEvent, useHandler } from './Hooks';\n\nexport interface ScrollHandler\n extends __WorkletFunction {\n (event: NativeScrollEvent, context?: TContext): void;\n}\n\nexport interface ScrollEvent\n extends NativeScrollEvent,\n NativeEvent {\n eventName: string;\n}\nexport interface ScrollHandlers {\n [key: string]: ScrollHandler | undefined;\n onScroll?: ScrollHandler;\n onBeginDrag?: ScrollHandler;\n onEndDrag?: ScrollHandler;\n onMomentumBegin?: ScrollHandler;\n onMomentumEnd?: ScrollHandler;\n}\n\n// TODO TYPESCRIPT This is a temporary type to get rid of .d.ts file.\ntype OnScroll = (event: NativeSyntheticEvent) => void;\n\n// TODO TYPESCRIPT This is a temporary type to get rid of .d.ts file.\nexport type useAnimatedScrollHandler = <\n TContext extends __Context = Record\n>(\n handlers: ScrollHandlers | ScrollHandler,\n deps?: DependencyList\n) => OnScroll;\n\nexport const useAnimatedScrollHandler = function (\n handlers: ScrollHandlers | ScrollHandler,\n dependencies?: DependencyList\n): RefObject> {\n // case when handlers is a function\n const scrollHandlers: ScrollHandlers =\n typeof handlers === 'function' ? { onScroll: handlers } : handlers;\n const { context, doDependenciesDiffer } = useHandler(\n scrollHandlers,\n dependencies\n );\n\n // build event subscription array\n const subscribeForEvents = ['onScroll'];\n if (scrollHandlers.onBeginDrag !== undefined) {\n subscribeForEvents.push('onScrollBeginDrag');\n }\n if (scrollHandlers.onEndDrag !== undefined) {\n subscribeForEvents.push('onScrollEndDrag');\n }\n if (scrollHandlers.onMomentumBegin !== undefined) {\n subscribeForEvents.push('onMomentumScrollBegin');\n }\n if (scrollHandlers.onMomentumEnd !== undefined) {\n subscribeForEvents.push('onMomentumScrollEnd');\n }\n\n return useEvent(\n (event: ScrollEvent) => {\n 'worklet';\n const {\n onScroll,\n onBeginDrag,\n onEndDrag,\n onMomentumBegin,\n onMomentumEnd,\n } = scrollHandlers;\n if (onScroll && event.eventName.endsWith('onScroll')) {\n onScroll(event, context);\n } else if (onBeginDrag && event.eventName.endsWith('onScrollBeginDrag')) {\n onBeginDrag(event, context);\n } else if (onEndDrag && event.eventName.endsWith('onScrollEndDrag')) {\n onEndDrag(event, context);\n } else if (\n onMomentumBegin &&\n event.eventName.endsWith('onMomentumScrollBegin')\n ) {\n onMomentumBegin(event, context);\n } else if (\n onMomentumEnd &&\n event.eventName.endsWith('onMomentumScrollEnd')\n ) {\n onMomentumEnd(event, context);\n }\n },\n subscribeForEvents,\n doDependenciesDiffer\n // TODO TYPESCRIPT This temporary cast is to get rid of .d.ts file.\n ) as any;\n // TODO TYPESCRIPT This temporary cast is to get rid of .d.ts file.\n} as unknown as useAnimatedScrollHandler;\n","import { useEffect, useRef } from 'react';\nimport { initializeSensor, registerSensor, unregisterSensor } from '../core';\nimport type {\n SensorConfig,\n AnimatedSensor,\n Value3D,\n ValueRotation,\n} from '../commonTypes';\nimport { SensorType, IOSReferenceFrame } from '../commonTypes';\nimport { callMicrotasks } from '../threads';\n\n// euler angles are in order ZXY, z = yaw, x = pitch, y = roll\n// https://github.com/mrdoob/three.js/blob/dev/src/math/Quaternion.js#L237\nfunction eulerToQuaternion(pitch: number, roll: number, yaw: number) {\n 'worklet';\n const c1 = Math.cos(pitch / 2);\n const s1 = Math.sin(pitch / 2);\n const c2 = Math.cos(roll / 2);\n const s2 = Math.sin(roll / 2);\n const c3 = Math.cos(yaw / 2);\n const s3 = Math.sin(yaw / 2);\n\n return [\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n ];\n}\n\nfunction adjustRotationToInterfaceOrientation(data: ValueRotation) {\n 'worklet';\n const { interfaceOrientation, pitch, roll, yaw } = data;\n if (interfaceOrientation === 90) {\n data.pitch = roll;\n data.roll = -pitch;\n data.yaw = yaw - Math.PI / 2;\n } else if (interfaceOrientation === 270) {\n data.pitch = -roll;\n data.roll = pitch;\n data.yaw = yaw + Math.PI / 2;\n } else if (interfaceOrientation === 180) {\n data.pitch *= -1;\n data.roll *= -1;\n data.yaw *= -1;\n }\n\n const q = eulerToQuaternion(data.pitch, data.roll, data.yaw);\n data.qx = q[0];\n data.qy = q[1];\n data.qz = q[2];\n data.qw = q[3];\n return data;\n}\n\nfunction adjustVectorToInterfaceOrientation(data: Value3D) {\n 'worklet';\n const { interfaceOrientation, x, y } = data;\n if (interfaceOrientation === 90) {\n data.x = -y;\n data.y = x;\n } else if (interfaceOrientation === 270) {\n data.x = y;\n data.y = -x;\n } else if (interfaceOrientation === 180) {\n data.x *= -1;\n data.y *= -1;\n }\n return data;\n}\n\nexport function useAnimatedSensor(\n sensorType: SensorType.ROTATION,\n userConfig?: Partial\n): AnimatedSensor;\nexport function useAnimatedSensor(\n sensorType: Exclude,\n userConfig?: Partial\n): AnimatedSensor;\nexport function useAnimatedSensor(\n sensorType: SensorType,\n userConfig?: Partial\n): AnimatedSensor {\n const config: SensorConfig = {\n interval: 'auto',\n adjustToInterfaceOrientation: true,\n iosReferenceFrame: IOSReferenceFrame.Auto,\n ...userConfig,\n };\n const ref = useRef>({\n sensor: initializeSensor(sensorType, config),\n unregister: () => {\n // NOOP\n },\n isAvailable: false,\n config: config,\n });\n\n useEffect(() => {\n const newConfig = {\n ...config,\n ...userConfig,\n };\n ref.current.sensor = initializeSensor(sensorType, newConfig);\n\n const sensorData = ref.current.sensor;\n const adjustToInterfaceOrientation =\n ref.current.config.adjustToInterfaceOrientation;\n\n const id = registerSensor(sensorType, config, (data) => {\n 'worklet';\n if (adjustToInterfaceOrientation) {\n if (sensorType === SensorType.ROTATION) {\n data = adjustRotationToInterfaceOrientation(data as ValueRotation);\n } else {\n data = adjustVectorToInterfaceOrientation(data as Value3D);\n }\n }\n sensorData.value = data;\n callMicrotasks();\n });\n\n if (id !== -1) {\n // if sensor is available\n ref.current.unregister = () => unregisterSensor(id);\n ref.current.isAvailable = true;\n } else {\n // if sensor is unavailable\n ref.current.unregister = () => {\n // NOOP\n };\n ref.current.isAvailable = false;\n }\n\n return () => {\n ref.current.unregister();\n };\n }, [sensorType, userConfig]);\n\n return ref.current;\n}\n","import type { MutableRefObject } from 'react';\nimport { useEffect, useRef } from 'react';\n\nimport { startMapper, stopMapper, makeRemote } from '../core';\nimport updateProps, { updatePropsJestWrapper } from '../UpdateProps';\nimport { initialUpdaterRun } from '../animation';\nimport NativeReanimatedModule from '../NativeReanimated';\nimport { useSharedValue } from './useSharedValue';\nimport {\n buildWorkletsHash,\n isAnimated,\n shallowEqual,\n validateAnimatedStyles,\n} from './utils';\nimport type { DefaultStyle, DependencyList, Descriptor } from './commonTypes';\nimport type { ViewDescriptorsSet, ViewRefSet } from '../ViewDescriptorsSet';\nimport { makeViewDescriptorsSet, makeViewsRefSet } from '../ViewDescriptorsSet';\nimport { isJest, shouldBeUseWeb } from '../PlatformChecker';\nimport type {\n AnimationObject,\n Timestamp,\n NestedObjectValues,\n SharedValue,\n StyleProps,\n __AdapterWorkletFunction,\n __BasicWorkletFunction,\n} from '../commonTypes';\nimport type { AnimatedStyle } from '../helperTypes';\n\ninterface AnimatedState {\n last: AnimatedStyle;\n animations: AnimatedStyle;\n isAnimationRunning: boolean;\n isAnimationCancelled: boolean;\n}\n\ninterface AnimationRef {\n initial: {\n value: AnimatedStyle;\n updater: () => AnimatedStyle;\n };\n remoteState: AnimatedState;\n viewDescriptors: ViewDescriptorsSet;\n}\n\nfunction prepareAnimation(\n frameTimestamp: number,\n animatedProp: AnimatedStyle,\n lastAnimation: AnimatedStyle,\n lastValue: AnimatedStyle\n): void {\n 'worklet';\n if (Array.isArray(animatedProp)) {\n animatedProp.forEach((prop, index) => {\n prepareAnimation(\n frameTimestamp,\n prop,\n lastAnimation && lastAnimation[index],\n lastValue && lastValue[index]\n );\n });\n // return animatedProp;\n }\n if (typeof animatedProp === 'object' && animatedProp.onFrame) {\n const animation = animatedProp;\n\n let value = animation.current;\n if (lastValue !== undefined) {\n if (typeof lastValue === 'object') {\n if (lastValue.value !== undefined) {\n // previously it was a shared value\n value = lastValue.value;\n } else if (lastValue.onFrame !== undefined) {\n if (lastAnimation?.current !== undefined) {\n // it was an animation before, copy its state\n value = lastAnimation.current;\n } else if (lastValue?.current !== undefined) {\n // it was initialized\n value = lastValue.current;\n }\n }\n } else {\n // previously it was a plain value, just set it as starting point\n value = lastValue;\n }\n }\n\n animation.callStart = (timestamp: Timestamp) => {\n animation.onStart(animation, value, timestamp, lastAnimation);\n };\n animation.callStart(frameTimestamp);\n animation.callStart = null;\n } else if (typeof animatedProp === 'object') {\n // it is an object\n Object.keys(animatedProp).forEach((key) =>\n prepareAnimation(\n frameTimestamp,\n animatedProp[key],\n lastAnimation && lastAnimation[key],\n lastValue && lastValue[key]\n )\n );\n }\n}\n\nfunction runAnimations(\n animation: AnimatedStyle,\n timestamp: Timestamp,\n key: number | string,\n result: AnimatedStyle,\n animationsActive: SharedValue\n): boolean {\n 'worklet';\n if (!animationsActive.value) {\n return true;\n }\n if (Array.isArray(animation)) {\n result[key] = [];\n let allFinished = true;\n animation.forEach((entry, index) => {\n if (\n !runAnimations(entry, timestamp, index, result[key], animationsActive)\n ) {\n allFinished = false;\n }\n });\n return allFinished;\n } else if (typeof animation === 'object' && animation.onFrame) {\n let finished = true;\n if (!animation.finished) {\n if (animation.callStart) {\n animation.callStart(timestamp);\n animation.callStart = null;\n }\n finished = animation.onFrame(animation, timestamp);\n animation.timestamp = timestamp;\n if (finished) {\n animation.finished = true;\n animation.callback && animation.callback(true /* finished */);\n }\n }\n result[key] = animation.current;\n return finished;\n } else if (typeof animation === 'object') {\n result[key] = {};\n let allFinished = true;\n Object.keys(animation).forEach((k) => {\n if (\n !runAnimations(\n animation[k],\n timestamp,\n k,\n result[key],\n animationsActive\n )\n ) {\n allFinished = false;\n }\n });\n return allFinished;\n } else {\n result[key] = animation;\n return true;\n }\n}\n\nfunction styleUpdater(\n viewDescriptors: SharedValue,\n updater: __BasicWorkletFunction>,\n state: AnimatedState,\n maybeViewRef: ViewRefSet | undefined,\n animationsActive: SharedValue,\n isAnimatedProps = false\n): void {\n 'worklet';\n const animations = state.animations ?? {};\n const newValues = updater() ?? {};\n const oldValues = state.last;\n const nonAnimatedNewValues: StyleProps = {};\n\n let hasAnimations = false;\n let frameTimestamp: number | undefined;\n let hasNonAnimatedValues = false;\n for (const key in newValues) {\n const value = newValues[key];\n if (isAnimated(value)) {\n frameTimestamp = global.__frameTimestamp || performance.now();\n prepareAnimation(frameTimestamp, value, animations[key], oldValues[key]);\n animations[key] = value;\n hasAnimations = true;\n } else {\n hasNonAnimatedValues = true;\n nonAnimatedNewValues[key] = value;\n delete animations[key];\n }\n }\n\n if (hasAnimations) {\n const frame = (timestamp: Timestamp) => {\n const { animations, last, isAnimationCancelled } = state;\n if (isAnimationCancelled) {\n state.isAnimationRunning = false;\n return;\n }\n\n const updates: AnimatedStyle = {};\n let allFinished = true;\n for (const propName in animations) {\n const finished = runAnimations(\n animations[propName],\n timestamp,\n propName,\n updates,\n animationsActive\n );\n if (finished) {\n last[propName] = updates[propName];\n delete animations[propName];\n } else {\n allFinished = false;\n }\n }\n\n if (updates) {\n updateProps(viewDescriptors, updates, maybeViewRef);\n }\n\n if (!allFinished) {\n requestAnimationFrame(frame);\n } else {\n state.isAnimationRunning = false;\n }\n };\n\n state.animations = animations;\n if (!state.isAnimationRunning) {\n state.isAnimationCancelled = false;\n state.isAnimationRunning = true;\n frame(frameTimestamp!);\n }\n\n if (hasNonAnimatedValues) {\n updateProps(viewDescriptors, nonAnimatedNewValues, maybeViewRef);\n }\n } else {\n state.isAnimationCancelled = true;\n state.animations = [];\n\n if (!shallowEqual(oldValues, newValues)) {\n updateProps(viewDescriptors, newValues, maybeViewRef, isAnimatedProps);\n }\n }\n state.last = newValues;\n}\n\nfunction jestStyleUpdater(\n viewDescriptors: SharedValue,\n updater: __BasicWorkletFunction>,\n state: AnimatedState,\n maybeViewRef: ViewRefSet | undefined,\n animationsActive: SharedValue,\n animatedStyle: MutableRefObject>,\n adapters: __AdapterWorkletFunction[] = []\n): void {\n 'worklet';\n const animations: AnimatedStyle = state.animations ?? {};\n const newValues = updater() ?? {};\n const oldValues = state.last;\n\n // extract animated props\n let hasAnimations = false;\n let frameTimestamp: number | undefined;\n Object.keys(animations).forEach((key) => {\n const value = newValues[key];\n if (!isAnimated(value)) {\n delete animations[key];\n }\n });\n Object.keys(newValues).forEach((key) => {\n const value = newValues[key];\n if (isAnimated(value)) {\n frameTimestamp = global.__frameTimestamp || performance.now();\n prepareAnimation(frameTimestamp, value, animations[key], oldValues[key]);\n animations[key] = value;\n hasAnimations = true;\n }\n });\n\n function frame(timestamp: Timestamp) {\n const { animations, last, isAnimationCancelled } = state;\n if (isAnimationCancelled) {\n state.isAnimationRunning = false;\n return;\n }\n\n const updates: AnimatedStyle = {};\n let allFinished = true;\n Object.keys(animations).forEach((propName) => {\n const finished = runAnimations(\n animations[propName],\n timestamp,\n propName,\n updates,\n animationsActive\n );\n if (finished) {\n last[propName] = updates[propName];\n delete animations[propName];\n } else {\n allFinished = false;\n }\n });\n\n if (Object.keys(updates).length) {\n updatePropsJestWrapper(\n viewDescriptors,\n updates,\n maybeViewRef,\n animatedStyle,\n adapters\n );\n }\n\n if (!allFinished) {\n requestAnimationFrame(frame);\n } else {\n state.isAnimationRunning = false;\n }\n }\n\n if (hasAnimations) {\n state.animations = animations;\n if (!state.isAnimationRunning) {\n state.isAnimationCancelled = false;\n state.isAnimationRunning = true;\n frame(frameTimestamp!);\n }\n } else {\n state.isAnimationCancelled = true;\n state.animations = [];\n }\n\n // calculate diff\n state.last = newValues;\n\n if (!shallowEqual(oldValues, newValues)) {\n updatePropsJestWrapper(\n viewDescriptors,\n newValues,\n maybeViewRef,\n animatedStyle,\n adapters\n );\n }\n}\n\n// check for invalid usage of shared values in returned object\nfunction checkSharedValueUsage(\n prop: NestedObjectValues,\n currentKey?: string\n): void {\n if (Array.isArray(prop)) {\n // if it's an array (i.ex. transform) validate all its elements\n for (const element of prop) {\n checkSharedValueUsage(element, currentKey);\n }\n } else if (\n typeof prop === 'object' &&\n prop !== null &&\n prop.value === undefined\n ) {\n // if it's a nested object, run validation for all its props\n for (const key of Object.keys(prop)) {\n checkSharedValueUsage(prop[key], key);\n }\n } else if (\n currentKey !== undefined &&\n typeof prop === 'object' &&\n prop !== null &&\n prop.value !== undefined\n ) {\n // if shared value is passed insted of its value, throw an error\n throw new Error(\n `[Reanimated] Invalid value passed to \\`${currentKey}\\`, maybe you forgot to use \\`.value\\`?`\n );\n }\n}\n\n// You cannot pass Shared Values to `useAnimatedStyle` directly.\nexport function useAnimatedStyle