@standardnotes/community-cdn 0.6.2 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/entries/com.sncommunity.advanced-checklist.json +17 -0
- package/dist/entries/com.sncommunity.bold-editor.json +17 -0
- package/dist/entries/com.sncommunity.markdown-basic.json +17 -0
- package/dist/entries/com.sncommunity.markdown-math.json +17 -0
- package/dist/entries/com.sncommunity.minimal-markdown.json +17 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/asset-manifest.json +13 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/favicon.ico +0 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/index.html +1 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/logo192.png +0 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/logo512.png +0 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/manifest.json +25 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/robots.txt +3 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/sample.ext.json +12 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/static/css/main.339b1865.css +2 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/static/css/main.339b1865.css.map +1 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/static/js/main.js +3 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/static/js/main.js.LICENSE.txt +87 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/static/js/main.js.map +1 -0
- package/dist/static/com.sncommunity.bold-editor/dist/dist.css +5 -0
- package/dist/static/com.sncommunity.bold-editor/dist/dist.min.js +2 -0
- package/dist/static/com.sncommunity.bold-editor/dist/dist.min.js.LICENSE.txt +42 -0
- package/dist/static/com.sncommunity.bold-editor/dist/filesafe-js/EncryptionWorker.js +2 -0
- package/dist/static/com.sncommunity.bold-editor/dist/filesafe-js/EncryptionWorker.js.LICENSE.txt +5 -0
- package/dist/static/com.sncommunity.bold-editor/dist/index.html +1 -0
- package/dist/static/com.sncommunity.bold-editor/dist/vendor.css +6 -0
- package/dist/static/com.sncommunity.bold-editor/dist/vendor.js +1 -0
- package/dist/static/com.sncommunity.markdown-basic/dist/dist.css +6 -0
- package/dist/static/com.sncommunity.markdown-basic/dist/dist.css.map +1 -0
- package/dist/static/com.sncommunity.markdown-basic/dist/dist.js +2 -0
- package/dist/static/com.sncommunity.markdown-basic/dist/dist.js.LICENSE.txt +32 -0
- package/dist/static/com.sncommunity.markdown-basic/dist/index.html +7 -0
- package/dist/static/com.sncommunity.markdown-math/dist/app.css +518 -0
- package/dist/static/com.sncommunity.markdown-math/dist/app.css.map +1 -0
- package/dist/static/com.sncommunity.markdown-math/dist/app.js +78 -0
- package/dist/static/com.sncommunity.markdown-math/dist/app.js.map +1 -0
- package/dist/static/com.sncommunity.markdown-math/dist/dist.css +523 -0
- package/dist/static/com.sncommunity.markdown-math/dist/dist.js +1 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_AMS-Regular.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Main-Bold.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Main-Bold.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Main-Italic.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Main-Italic.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Main-Regular.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Main-Regular.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Math-Italic.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Math-Italic.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Script-Regular.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Script-Regular.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Size1-Regular.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Size2-Regular.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Size3-Regular.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Size4-Regular.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/lib.js +7485 -0
- package/dist/static/com.sncommunity.markdown-math/index.html +52 -0
- package/dist/static/com.sncommunity.minimal-markdown/dist/app.css +143 -0
- package/dist/static/com.sncommunity.minimal-markdown/dist/app.css.map +1 -0
- package/dist/static/com.sncommunity.minimal-markdown/dist/app.js +115 -0
- package/dist/static/com.sncommunity.minimal-markdown/dist/app.js.map +1 -0
- package/dist/static/com.sncommunity.minimal-markdown/dist/dist.css +490 -0
- package/dist/static/com.sncommunity.minimal-markdown/dist/dist.js +11211 -0
- package/dist/static/com.sncommunity.minimal-markdown/dist/lib.js +11096 -0
- package/dist/static/com.sncommunity.minimal-markdown/dist/sn-codemirror-search/dialog/dialog.css +46 -0
- package/dist/static/com.sncommunity.minimal-markdown/dist/sn-codemirror-search/dialog/dialog.js +161 -0
- package/dist/static/com.sncommunity.minimal-markdown/dist/sn-codemirror-search/search.js +258 -0
- package/dist/static/com.sncommunity.minimal-markdown/dist/sn-codemirror-search/searchcursor.js +293 -0
- package/dist/static/com.sncommunity.minimal-markdown/index.html +23 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/asset-manifest.json +13 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/favicon.ico +0 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/index.html +1 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/logo192.png +0 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/logo512.png +0 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/manifest.json +25 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/robots.txt +3 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/sample.ext.json +12 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/static/css/main.339b1865.css +2 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/static/css/main.339b1865.css.map +1 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/static/js/main.js +3 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/static/js/main.js.LICENSE.txt +87 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/static/js/main.js.map +1 -0
- package/dist/zips/com.sncommunity.advanced-checklist/package.json +133 -0
- package/dist/zips/com.sncommunity.advanced-checklist.zip +0 -0
- package/dist/zips/com.sncommunity.bold-editor/dist/dist.css +5 -0
- package/dist/zips/com.sncommunity.bold-editor/dist/dist.min.js +2 -0
- package/dist/zips/com.sncommunity.bold-editor/dist/dist.min.js.LICENSE.txt +42 -0
- package/dist/zips/com.sncommunity.bold-editor/dist/filesafe-js/EncryptionWorker.js +2 -0
- package/dist/zips/com.sncommunity.bold-editor/dist/filesafe-js/EncryptionWorker.js.LICENSE.txt +5 -0
- package/dist/zips/com.sncommunity.bold-editor/dist/index.html +1 -0
- package/dist/zips/com.sncommunity.bold-editor/dist/vendor.css +6 -0
- package/dist/zips/com.sncommunity.bold-editor/dist/vendor.js +1 -0
- package/dist/zips/com.sncommunity.bold-editor/package.json +52 -0
- package/dist/zips/com.sncommunity.bold-editor.zip +0 -0
- package/dist/zips/com.sncommunity.markdown-basic.zip +0 -0
- package/dist/zips/com.sncommunity.markdown-math.zip +0 -0
- package/dist/zips/com.sncommunity.minimal-markdown/dist/app.css +143 -0
- package/dist/zips/com.sncommunity.minimal-markdown/dist/app.css.map +1 -0
- package/dist/zips/com.sncommunity.minimal-markdown/dist/app.js +115 -0
- package/dist/zips/com.sncommunity.minimal-markdown/dist/app.js.map +1 -0
- package/dist/zips/com.sncommunity.minimal-markdown/dist/dist.css +490 -0
- package/dist/zips/com.sncommunity.minimal-markdown/dist/dist.js +11211 -0
- package/dist/zips/com.sncommunity.minimal-markdown/dist/lib.js +11096 -0
- package/dist/zips/com.sncommunity.minimal-markdown/dist/sn-codemirror-search/dialog/dialog.css +46 -0
- package/dist/zips/com.sncommunity.minimal-markdown/dist/sn-codemirror-search/dialog/dialog.js +161 -0
- package/dist/zips/com.sncommunity.minimal-markdown/dist/sn-codemirror-search/search.js +258 -0
- package/dist/zips/com.sncommunity.minimal-markdown/dist/sn-codemirror-search/searchcursor.js +293 -0
- package/dist/zips/com.sncommunity.minimal-markdown/index.html +23 -0
- package/dist/zips/com.sncommunity.minimal-markdown/package.json +39 -0
- package/dist/zips/com.sncommunity.minimal-markdown.zip +0 -0
- package/package.json +2 -2
- package/scripts/Compile.sh +12 -0
- package/scripts/Package.mjs +188 -0
- package/scripts/Readme.mjs +40 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see main.js.LICENSE.txt */
|
|
2
|
+
!function(){var e={613:function(e,t,n){var r,i=n(61).default,o=n(156).default,a=n(704).default,u=n(690).default,s=n(728).default,c=n(416).default;self,e.exports=(r=n(634),function(){var e,t,n={156:function(e){self,e.exports=function(){"use strict";var e,t,n,r,i,o={d:function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},l={};o.d(l,{default:function(){return A}}),function(e){e.SetSize="set-size",e.StreamItems="stream-items",e.StreamContextItem="stream-context-item",e.SaveItems="save-items",e.SelectItem="select-item",e.AssociateItem="associate-item",e.DeassociateItem="deassociate-item",e.ClearSelection="clear-selection",e.CreateItem="create-item",e.CreateItems="create-items",e.DeleteItems="delete-items",e.SetComponentData="set-component-data",e.InstallLocalComponent="install-local-component",e.ToggleActivateComponent="toggle-activate-component",e.RequestPermissions="request-permissions",e.PresentConflictResolution="present-conflict-resolution",e.DuplicateItem="duplicate-item",e.ComponentRegistered="component-registered",e.ActivateThemes="themes",e.Reply="reply",e.SaveSuccess="save-success",e.SaveError="save-error",e.ThemesActivated="themes-activated",e.KeyDown="key-down",e.KeyUp="key-up",e.Click="click"}(e||(e={})),function(e){e[e.Web=1]="Web",e[e.Desktop=2]="Desktop",e[e.Mobile=3]="Mobile"}(t||(t={})),function(e){e.Any="*",e.Item="SF|Item",e.RootKey="SN|RootKey|NoSync",e.ItemsKey="SN|ItemsKey",e.EncryptedStorage="SN|EncryptedStorage",e.Note="Note",e.Tag="Tag",e.SmartTag="SN|SmartTag",e.Component="SN|Component",e.Editor="SN|Editor",e.ActionsExtension="Extension",e.UserPrefs="SN|UserPreferences",e.HistorySession="SN|HistorySession",e.Theme="SN|Theme",e.Mfa="SF|MFA",e.ServerExtension="SF|Extension",e.FilesafeCredentials="SN|FileSafe|Credentials",e.FilesafeFileMetadata="SN|FileSafe|FileMetadata",e.FilesafeIntegration="SN|FileSafe|Integration",e.ExtensionRepo="SN|ExtensionRepo"}(n||(n={})),function(e){e.Pinned="pinned",e.Archived="archived",e.Locked="locked",e.UserModifiedDate="client_updated_at",e.DefaultEditor="defaultEditor",e.MobileRules="mobileRules",e.NotAvailableOnMobile="notAvailableOnMobile",e.MobileActive="mobileActive",e.LastSize="lastSize",e.PrefersPlainEditor="prefersPlainEditor",e.ComponentInstallError="installError"}(r||(r={}));var f=new Uint8Array(16);function d(){if(!i&&!(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(f)}for(var p=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,h=function(e){return"string"==typeof e&&p.test(e)},v=[],g=0;g<256;++g)v.push((g+256).toString(16).substr(1));var m,y,b,w,x=function(e,t,n){var r=(e=e||{}).random||(e.rng||d)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(v[e[t+0]]+v[e[t+1]]+v[e[t+2]]+v[e[t+3]]+"-"+v[e[t+4]]+v[e[t+5]]+"-"+v[e[t+6]]+v[e[t+7]]+"-"+v[e[t+8]]+v[e[t+9]]+"-"+v[e[t+10]]+v[e[t+11]]+v[e[t+12]]+v[e[t+13]]+v[e[t+14]]+v[e[t+15]]).toLowerCase();if(!h(n))throw TypeError("Stringified UUID is invalid");return n}(r)},k=function(e){var n,r,i=(c(n={},t.Web,"web"),c(n,t.Desktop,"desktop"),c(n,t.Mobile,"mobile"),n);return null!==(r=i[e])&&void 0!==r?r:i[t.Web]},S=function(e){return null!=e},_=function(){},E=function(){function e(){u(this,e)}return s(e,null,[{key:"isSupported",get:function(){return!(!window.console&&!console)}},{key:"info",get:function(){return e.isSupported&&this.enabled?console.log.bind(console):_}},{key:"error",get:function(){return e.isSupported?console.error.bind(console):_}}]),e}();function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){O(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(y="enabled")in(m=E)?Object.defineProperty(m,y,{value:!1,enumerable:!0,configurable:!0,writable:!0}):m[y]=!1,function(e){e.Component="component"}(b||(b={})),function(e){e.Shift="Shift",e.Ctrl="Control",e.Meta="Meta"}(w||(w={}));var A=function(){function r(e){if(u(this,r),O(this,"contentWindow",void 0),O(this,"initialPermissions",void 0),O(this,"onReadyCallback",void 0),O(this,"component",{activeThemes:[],acceptsThemes:!0}),O(this,"sentMessages",[]),O(this,"messageQueue",[]),O(this,"lastStreamedItem",void 0),O(this,"pendingSaveItems",void 0),O(this,"pendingSaveTimeout",void 0),O(this,"pendingSaveParams",void 0),O(this,"coallesedSaving",!0),O(this,"coallesedSavingDelay",250),O(this,"messageHandler",void 0),O(this,"keyDownEventListener",void 0),O(this,"keyUpEventListener",void 0),O(this,"clickEventListener",void 0),O(this,"onThemesChangeCallback",void 0),O(this,"concernTimeouts",[]),!e||!e.targetWindow)throw new Error("contentWindow must be a valid Window object.");this.contentWindow=e.targetWindow,this.processParameters(e),this.registerMessageHandler(),this.registerKeyboardEventListeners(),this.registerMouseEventListeners()}return s(r,[{key:"processParameters",value:function(e){var t,n,r=e.initialPermissions,i=e.options,o=e.onReady,a=e.onThemesChange;r&&r.length>0&&(this.initialPermissions=r),S(null==i?void 0:i.coallesedSaving)&&(this.coallesedSaving=i.coallesedSaving),S(null==i?void 0:i.coallesedSavingDelay)&&(this.coallesedSavingDelay=i.coallesedSavingDelay),S(null==i?void 0:i.acceptsThemes)&&(this.component.acceptsThemes=null===(n=null==i?void 0:i.acceptsThemes)||void 0===n||n),S(o)&&(this.onReadyCallback=o),S(a)&&(this.onThemesChangeCallback=a),E.enabled=null!==(t=null==i?void 0:i.debug)&&void 0!==t&&t}},{key:"deinit",value:function(){this.onReadyCallback=void 0,this.component={acceptsThemes:!0,activeThemes:[]},this.messageQueue=[],this.sentMessages=[],this.lastStreamedItem=void 0,this.pendingSaveItems=void 0,this.pendingSaveTimeout=void 0,this.pendingSaveParams=void 0,this.messageHandler&&(this.contentWindow.document.removeEventListener("message",this.messageHandler),this.contentWindow.removeEventListener("message",this.messageHandler)),this.keyDownEventListener&&this.contentWindow.removeEventListener("keydown",this.keyDownEventListener),this.keyUpEventListener&&this.contentWindow.removeEventListener("keyup",this.keyUpEventListener),this.clickEventListener&&this.contentWindow.removeEventListener("click",this.clickEventListener)}},{key:"registerMessageHandler",value:function(){var t=this;this.messageHandler=function(n){if(E.info("Components API Message received:",n.data),!document.referrer||new URL(document.referrer).origin===new URL(n.origin).origin){var r=n.data,i=function(e){if("string"!=typeof e)return!1;try{var t=JSON.parse(e),n=Object.prototype.toString.call(t);return"[object Object]"===n||"[object Array]"===n}catch(e){return!1}}(r)?JSON.parse(r):r;if(i){if(void 0===t.component.origin&&i.action===e.ComponentRegistered)t.component.origin=n.origin;else if(n.origin!==t.component.origin)return;t.handleMessage(i)}else E.error("Invalid data received. Skipping...")}},this.contentWindow.document.addEventListener("message",this.messageHandler,!1),this.contentWindow.addEventListener("message",this.messageHandler,!1),E.info("Waiting for messages...")}},{key:"registerKeyboardEventListeners",value:function(){var e=this;this.keyDownEventListener=function(t){E.info("A key has been pressed: ".concat(t.key)),t.ctrlKey?e.keyDownEvent(w.Ctrl):t.shiftKey?e.keyDownEvent(w.Shift):(t.metaKey||"Meta"===t.key)&&e.keyDownEvent(w.Meta)},this.keyUpEventListener=function(t){E.info("A key has been released: ".concat(t.key)),"Control"===t.key?e.keyUpEvent(w.Ctrl):"Shift"===t.key?e.keyUpEvent(w.Shift):"Meta"===t.key&&e.keyUpEvent(w.Meta)},this.contentWindow.addEventListener("keydown",this.keyDownEventListener,!1),this.contentWindow.addEventListener("keyup",this.keyUpEventListener,!1)}},{key:"registerMouseEventListeners",value:function(){var e=this;this.clickEventListener=function(t){E.info("A click has been performed."),e.mouseClickEvent()},this.contentWindow.addEventListener("click",this.clickEventListener,!1)}},{key:"handleMessage",value:function(t){switch(t.action){case e.ComponentRegistered:this.component.sessionKey=t.sessionKey,t.componentData&&(this.component.data=t.componentData),this.onReady(t.data),E.info("Component successfully registered with payload:",t);break;case e.ActivateThemes:this.activateThemes(t.data.themes);break;default:var n,r;if(!t.original)return;var i=null===(n=this.sentMessages)||void 0===n?void 0:n.filter((function(e){var n;return e.messageId===(null===(n=t.original)||void 0===n?void 0:n.messageId)}))[0];if(!i){var o=this.contentWindow.document.title,a=("The extension '".concat(o,"' is attempting to communicate with Standard Notes, ")+"but an error is preventing it from doing so. Please restart this extension and try again.").replace(" "," ");return void E.info(a)}null==i||null===(r=i.callback)||void 0===r||r.call(i,t.data)}}},{key:"onReady",value:function(t){this.component.environment=t.environment,this.component.platform=t.platform,this.component.uuid=t.uuid,this.initialPermissions&&this.initialPermissions.length>0&&this.requestPermissions(this.initialPermissions);var n,r=a(this.messageQueue);try{for(r.s();!(n=r.n()).done;){var i=n.value;this.postMessage(i.action,i.data,i.callback)}}catch(o){r.e(o)}finally{r.f()}this.messageQueue=[],E.info("Data passed to onReady:",t),this.activateThemes(t.activeThemeUrls||[]),this.postMessage(e.ThemesActivated,{}),this.onReadyCallback&&this.onReadyCallback()}},{key:"getSelfComponentUUID",value:function(){return this.component.uuid}},{key:"isRunningInDesktopApplication",value:function(){return this.component.environment===k(t.Desktop)}},{key:"isRunningInMobileApplication",value:function(){return this.component.environment===k(t.Mobile)}},{key:"getComponentDataValueForKey",value:function(e){if(this.component.data)return this.component.data[e]}},{key:"setComponentDataValueForKey",value:function(t,n){if(!this.component.data)throw new Error("The component has not been initialized.");if(!t||t&&0===t.length)throw new Error("The key for the data value should be a valid string.");this.component.data=I(I({},this.component.data),{},c({},t,n)),this.postMessage(e.SetComponentData,{componentData:this.component.data})}},{key:"clearComponentData",value:function(){this.component.data={},this.postMessage(e.SetComponentData,{componentData:this.component.data})}},{key:"postMessage",value:function(e,t,n){if(this.component.sessionKey){var r,i={action:e,data:t,messageId:this.generateUUID(),sessionKey:this.component.sessionKey,api:b.Component},o=JSON.parse(JSON.stringify(i));o.callback=n,this.sentMessages.push(o),r=this.isRunningInMobileApplication()?JSON.stringify(i):i,E.info("Posting message:",r),this.contentWindow.parent.postMessage(r,this.component.origin)}else this.messageQueue.push({action:e,data:t,api:b.Component,callback:n})}},{key:"requestPermissions",value:function(t,n){this.postMessage(e.RequestPermissions,{permissions:t},(function(){n&&n()}))}},{key:"activateThemes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(this.component.acceptsThemes){E.info("Incoming themes:",e);var t=this.component.activeThemes;if(!t||t.sort().toString()!=e.sort().toString()){var n,r=e,i=[],o=a(t);try{var u=function(){var t=n.value;e.includes(t)?r=r.filter((function(e){return e!==t})):i.push(t)};for(o.s();!(n=o.n()).done;)u()}catch(v){o.e(v)}finally{o.f()}E.info("Deactivating themes:",i),E.info("Activating themes:",r);for(var s=0,c=i;s<c.length;s++){var l=c[s];this.deactivateTheme(l)}this.component.activeThemes=e;var f,d=a(r);try{for(d.s();!(f=d.n()).done;){var p=f.value;if(p){var h=this.contentWindow.document.createElement("link");h.id=btoa(p),h.href=p,h.type="text/css",h.rel="stylesheet",h.media="screen,print",h.className="custom-theme",this.contentWindow.document.getElementsByTagName("head")[0].appendChild(h)}}}catch(v){d.e(v)}finally{d.f()}this.onThemesChangeCallback&&this.onThemesChangeCallback()}}}},{key:"themeElementForUrl",value:function(e){return Array.from(this.contentWindow.document.getElementsByClassName("custom-theme")).slice().find((function(t){return t.id==btoa(e)}))}},{key:"deactivateTheme",value:function(e){var t=this.themeElementForUrl(e);t&&t.parentNode&&(t.setAttribute("disabled","true"),t.parentNode.removeChild(t))}},{key:"generateUUID",value:function(){return x()}},{key:"platform",get:function(){return this.component.platform}},{key:"environment",get:function(){return this.component.environment}},{key:"streamItems",value:function(t,n){this.postMessage(e.StreamItems,{content_types:t},(function(e){n(e.items)}))}},{key:"streamContextItem",value:function(t){var n=this;this.postMessage(e.StreamContextItem,{},(function(e){var r=e.item;(!n.lastStreamedItem||n.lastStreamedItem.uuid!==r.uuid)&&n.pendingSaveTimeout&&(clearTimeout(n.pendingSaveTimeout),n.performSavingOfItems(n.pendingSaveParams),n.pendingSaveTimeout=void 0,n.pendingSaveParams=void 0),n.lastStreamedItem=r,t(n.lastStreamedItem)}))}},{key:"selectItem",value:function(t){this.postMessage(e.SelectItem,{item:this.jsonObjectForItem(t)})}},{key:"clearSelection",value:function(){this.postMessage(e.ClearSelection,{content_type:n.Tag})}},{key:"createItem",value:function(t,n){var r=this;this.postMessage(e.CreateItem,{item:this.jsonObjectForItem(t)},(function(e){var t=e.item;!t&&e.items&&e.items.length>0&&(t=e.items[0]),r.associateItem(t),n&&n(t)}))}},{key:"createItems",value:function(t,n){var r=this,i=t.map((function(e){return r.jsonObjectForItem(e)}));this.postMessage(e.CreateItems,{items:i},(function(e){n&&n(e.items)}))}},{key:"associateItem",value:function(t){this.postMessage(e.AssociateItem,{item:this.jsonObjectForItem(t)})}},{key:"deassociateItem",value:function(t){this.postMessage(e.DeassociateItem,{item:this.jsonObjectForItem(t)})}},{key:"deleteItem",value:function(e,t){this.deleteItems([e],t)}},{key:"deleteItems",value:function(t,n){var r=this,i={items:t.map((function(e){return r.jsonObjectForItem(e)}))};this.postMessage(e.DeleteItems,i,(function(e){n&&n(e)}))}},{key:"sendCustomEvent",value:function(e,t,n){this.postMessage(e,t,(function(e){n&&n(e)}))}},{key:"saveItem",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.saveItems([e],t,n)}},{key:"saveItemWithPresave",value:function(e,t,n){this.saveItemsWithPresave([e],t,n)}},{key:"saveItemsWithPresave",value:function(e,t,n){this.saveItems(e,n,!1,t)}},{key:"performSavingOfItems",value:function(t){var n=this,r=t.items,i=t.presave,o=t.callback,u=setTimeout((function(){n.concernTimeouts.forEach((function(e){return clearTimeout(e)})),alert("This editor is unable to communicate with Standard Notes. Your changes may not be saved. Please backup your changes, then restart the application and try again.")}),5e3);this.concernTimeouts.push(u),i&&i();var s,c=[],l=a(r);try{for(l.s();!(s=l.n()).done;){var f=s.value;c.push(this.jsonObjectForItem(f))}}catch(d){l.e(d)}finally{l.f()}this.postMessage(e.SaveItems,{items:c},(function(){n.concernTimeouts.forEach((function(e){return clearTimeout(e)})),null==o||o()}))}},{key:"saveItems",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0;if(this.pendingSaveItems||(this.pendingSaveItems=[]),this.coallesedSaving&&!r){this.pendingSaveTimeout&&clearTimeout(this.pendingSaveTimeout);var o=e.map((function(e){return e.uuid})),a=this.pendingSaveItems.filter((function(e){return!o.includes(e.uuid)}));this.pendingSaveItems=a.concat(e),this.pendingSaveParams={items:this.pendingSaveItems,presave:i,callback:t},this.pendingSaveTimeout=setTimeout((function(){n.performSavingOfItems(n.pendingSaveParams),n.pendingSaveItems=[],n.pendingSaveTimeout=void 0,n.pendingSaveParams=null}),this.coallesedSavingDelay)}else this.performSavingOfItems({items:e,presave:i,callback:t})}},{key:"setSize",value:function(t,n){this.postMessage(e.SetSize,{type:"container",width:t,height:n})}},{key:"keyDownEvent",value:function(t){this.postMessage(e.KeyDown,{keyboardModifier:t})}},{key:"keyUpEvent",value:function(t){this.postMessage(e.KeyUp,{keyboardModifier:t})}},{key:"mouseClickEvent",value:function(){this.postMessage(e.Click,{})}},{key:"jsonObjectForItem",value:function(e){var t=Object.assign({},e);return t.children=null,t.parent=null,t}},{key:"getItemAppDataValue",value:function(e,t){var n,r;return null==e||null===(n=e.content)||void 0===n||null===(r=n.appData)||void 0===r?void 0:r["org.standardnotes.sn"][t]}}]),r}();return l.default}()},695:function(e){"use strict";e.exports=r}},l={};function f(e){var t=l[e];if(void 0!==t)return t.exports;var r=l[e]={exports:{}};return n[e](r,r.exports,f),r.exports}f.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(t,{a:t}),t},t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},f.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);f.r(i);var o={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&n;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((function(e){return o[e]=function(){return n[e]}}));return o.default=function(){return n},f.d(i,o),i},f.d=function(e,t){for(var n in t)f.o(t,n)&&!f.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};return function(){"use strict";f.d(d,{default:function(){return y}});var e=f(156),t=f.n(e),n=function(){var e=o(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){return setTimeout(e,1e3*t)}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c=function(){function e(t){u(this,e),this.options=t,r(this,"uuidToFileTempUrlAndTypeMapping",{}),r(this,"currentlyLoadingIds",[]),r(this,"statusElementMapping",{}),r(this,"fileTypeToElementType",{"image/png":"img","image/jpg":"img","image/jpeg":"img","image/gif":"img","image/tiff":"img","image/bmp":"img","video/mp4":"video","audio/mpeg":"audio","audio/mp3":"audio"})}return s(e,[{key:"fileTypeForElementType",value:function(e){return this.fileTypeToElementType[e.toLowerCase()]}},{key:"loadFileSafeElements",value:function(){var e,t=this.options.getElementsBySelector("*[fsplaceholder]"),n=a(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;this.loadFileSafeElement(r)}}catch(i){n.e(i)}finally{n.f()}}},{key:"loadFileSafeElement",value:function(){var e=o(i().mark((function e(t){var r,o,a,u,s,c,l,f,d,p,h,v,g=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=this.options.fileSafeInstance,a=t.getAttribute("fsid"),u=null!==(r=t.getAttribute("fsName"))&&void 0!==r?r:"",s=u&&"undefined"!=u?u:"file",a){e.next=3;break}return e.abrupt("return",!1);case 3:if(!(c=this.uuidToFileTempUrlAndTypeMapping[a])){e.next=6;break}return e.abrupt("return",(this.insertMediaElement({fsid:a,fsElement:t,url:c.url,fileType:c.fileType,fsName:c.fsName}),!1));case 6:if(!this.currentlyLoadingIds.includes(a)){e.next=8;break}return e.abrupt("return",!1);case 8:if(l=o.findFileDescriptor(a)){e.next=11;break}return e.abrupt("return",(this.setStatus({fsElement:t,fsid:a,status:"Unable to find ".concat(s," ").concat(a,"."),removable:!0}),!1));case 11:if(f='[fsid="'.concat(l.uuid,'"][fscollapsable]'),!(document.querySelectorAll("img".concat(f,", figure").concat(f,", video").concat(f,", audio").concat(f)).length>0)){e.next=14;break}return e.abrupt("return",!1);case 14:return this.currentlyLoadingIds.push(a),this.setStatus({fsElement:t,fsid:a,status:"Downloading ".concat(s,"...")}),e.next=18,n(.05);case 18:return e.next=20,o.downloadFileFromDescriptor(l).catch((function(){g.setStatus({fsElement:t,fsid:a,status:"Unable to download ".concat(s," ").concat(a,".")})}));case 20:if(d=e.sent){e.next=23;break}return e.abrupt("return",!1);case 23:return this.setStatus({fsElement:t,fsid:a,status:"Decrypting ".concat(s,"...")}),e.next=26,n(.05);case 26:return e.next=28,o.decryptFile({fileDescriptor:l,fileItem:d}).catch((function(){g.setStatus({fsElement:t,fsid:a,status:"Unable to decrypt ".concat(s," ").concat(a,".")})}));case 28:if(p=e.sent){e.next=31;break}return e.abrupt("return",!1);case 31:return this.setStatus({fsElement:t,fsid:a}),e.next=34,n(.05);case 34:return h=l.content.fileType,v=o.createTemporaryFileUrl({base64Data:p.decryptedData,dataType:h}),e.abrupt("return",(this.insertMediaElement({fsid:a,fileType:h,fsName:u,fsElement:t,url:v}),g.currentlyLoadingIds.splice(g.currentlyLoadingIds.indexOf(a),1),this.uuidToFileTempUrlAndTypeMapping[a]={fileType:h,url:v,fsName:u},!0));case 36:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"insertMediaElement",value:function(e){var t,n=e.url,r=e.fsid,i=e.fsName,o=e.fileType,a=e.fsElement;switch(this.fileTypeForElementType(o)){case"img":t=this.createImageElement({url:n,fsid:r,fsName:i,fsElement:a});break;case"video":t=this.createVideoElement({url:n,fsid:r,fileType:o,fsName:i,fsElement:a});break;case"audio":t=this.createAudioElement({url:n,fsid:r,fsName:i});break;default:t=this.createDownloadElement({url:n,fsid:r,fsName:i})}this.insertElementNearElement(t,a),a.remove()}},{key:"wrapElementInTag",value:function(e){var t=e.element,n=e.tagName,r=e.fsid,i=e.fsName,o=document.createElement(n);return o.setAttribute("fsid",r),o.setAttribute("fsName",i),o.setAttribute("fscollapsable","true"),o.setAttribute("contenteditable","true"),o.append(t),o}},{key:"createImageElement",value:function(e){var t=e.url,n=e.fsid,r=e.fsName,i=e.fsElement,o=document.createElement("img");o.setAttribute("src",t),o.setAttribute("srcset","".concat(t," 2x")),o.setAttribute("fsid",n),o.setAttribute("fsName",r),o.setAttribute("fscollapsable","true");var a=i.getAttribute("width");a&&o.setAttribute("width",a);var u=i.getAttribute("height");return u&&o.setAttribute("height",u),o}},{key:"createVideoElement",value:function(e){var t=e.url,n=e.fsid,r=e.fileType,i=e.fsName,o=e.fsElement,a=document.createElement("video");a.setAttribute("controls","true"),a.setAttribute("fsid",n),a.setAttribute("fsName",i),a.setAttribute("fscollapsable","true");var u=o.getAttribute("width");u&&a.setAttribute("width",u);var s=o.getAttribute("height");s&&a.setAttribute("height",s);var c=document.createElement("source");return c.setAttribute("src",t),c.setAttribute("type",r),a.append(c),this.wrapElementInTag({fsid:n,fsName:i,element:a,tagName:"p"})}},{key:"createDownloadElement",value:function(e){var t=e.url,n=e.fsid,r=e.fsName,i=document.createElement("a");return i.setAttribute("fsid",n),i.setAttribute("fsName",r),i.setAttribute("ghost","true"),i.setAttribute("fscollapsable","true"),i.setAttribute("href",t),i.textContent="".concat(r),i}},{key:"createAudioElement",value:function(e){var t=e.url,n=e.fsid,r=e.fsName,i=document.createElement("audio");return i.setAttribute("src",t),i.setAttribute("controls","true"),i.setAttribute("fsid",n),i.setAttribute("fsName",r),i.setAttribute("fscollapsable","true"),this.wrapElementInTag({fsid:n,fsName:r,element:i,tagName:"p"})}},{key:"setStatus",value:function(e){var t=e.status,n=e.fsElement,r=e.fsid,i=e.removable,o=void 0!==i&&i;if(r){var a=this.statusElementMapping[r];a&&(a.remove(),delete this.statusElementMapping[r])}if(t){var u=document.createElement("label");return u.setAttribute("id",r),u.setAttribute("ghost","true"),u.setAttribute("contenteditable","false"),u.style.fontWeight="bold",u.textContent=t,o&&(u.style.userSelect="all"),u=this.insertElementNearElement(u,n),r&&(this.statusElementMapping[r]=u),u}}},{key:"insertStatusAtCursor",value:function(e){var t=Math.random().toString(36).substring(7);return this.setStatus({status:e,fsid:t,fsElement:null}),t}},{key:"removeCursorStatus",value:function(e){var t=this.options.getElementsBySelector("#".concat(e));t.length>0&&t[0].remove()}},{key:"insertElementNearElement",value:function(e,t){var n=this.options.preprocessElement(e),r="child";if(t&&"figure"==n.tagName.toLowerCase()){var i=t.closest("p");i&&(t=i,r="afterend")}return this.options.insertElement(n,t,r),n}}]),e}(),l=function(){function e(t){u(this,e),this.options=t}return s(e,[{key:"onKeyUp",value:function(e){var t=e.isEnter,n=e.isPaste,r=e.isSpace;(t||n||r)&&this.searchPatterns({searchPreviousLine:null!=t&&t})}},{key:"searchPatterns",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{searchPreviousLine:!1},n=t.searchPreviousLine?this.options.getPreviousLineText():this.options.getCurrentLineText(),r=a(this.options.patterns);try{for(r.s();!(e=r.n()).done;){var i=e.value,o=i.regex.exec(n);if(o){var u=o[0];if(u){var s=i.callback(u);this.replaceSelection(i.regex,s,t.searchPreviousLine)}}}}catch(c){r.e(c)}finally{r.f()}}},{key:"replaceSelection",value:function(e,t,n){var r,i,o;null!==(r=this.options)&&void 0!==r&&r.beforeExpand&&this.options.beforeExpand(),this.options.replaceText({regex:e,replacement:t,searchPreviousLine:n}),null!==(i=this.options)&&void 0!==i&&i.afterExpand&&(null===(o=this.options)||void 0===o||o.afterExpand())}}]),e}(),p=/(<p>)?\[FileSafe[^\]]*\](<\/p>)?/g,h=function(e){return e.replace(p,(function(e){return g(e)}))},v=function(e){return"[FileSafe:".concat(e.uuid,":").concat(e.content.fileName,"]")},g=function(e){var t=(e=(e=(e=e.replace("<p>","")).replace("</p>","")).replace("[","").replace("]","")).split(":"),n=t[1],r=t[2],i=t[3],o="";if(i){var a=i.split("x");o="width=".concat(a[0]," height=").concat(a[1])}return"<p fsplaceholder=true style='display: none;' fscollapsable=true ghost=true fsid='".concat(n,"' fsname='").concat(r,"' ").concat(o,"></p>")};function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(){function e(t,n){u(this,e),this.delegate=t,this.options=n,m(this,"fileIdsPendingAssociation",[]),m(this,"componentRelay",void 0),m(this,"fileLoader",void 0),m(this,"textExpander",void 0),m(this,"fileSafeLoading",void 0),m(this,"fileSafeClass",void 0),m(this,"fileSafeInstance",void 0),m(this,"note",void 0),m(this,"ignoreNextTextChange",void 0),m(this,"needsFileSafeElementLoad",void 0),m(this,"previousText",void 0),this.connectToBridge(),this.options.supportsFileSafe&&(this.fileSafeLoading=this.importFileSafe())}return s(e,[{key:"connectToBridge",value:function(){var e=this,n=this.options,r=n.coallesedSaving,a=n.coallesedSavingDelay,u=n.mode,s=n.supportsFileSafe;this.componentRelay=new(t())({targetWindow:window,options:{coallesedSaving:r,coallesedSavingDelay:a},onReady:function(){var t=e.componentRelay.platform;t&&document.documentElement.classList.add(t)},onThemesChange:this.delegate.onThemesChange}),this.componentRelay.streamContextItem(function(){var t=o(i().mark((function t(n){var r,o,a,c,l,f,d,p,v,g;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=!0,e.note&&e.note.uuid==n.uuid&&(r=!1),o=e.note,s?(a=e.fileSafeClass.getSFItemClass(),e.note=new a(n),e.fileSafeInstance.setCurrentNote(e.note)):e.note=n,!n.isMetadataUpdate){t.next=6;break}return t.abrupt("return");case 6:if(c=n.content.text,"html"===u&&r&&(/<[a-z][\s\S]*>/i.test(c)||(e.ignoreNextTextChange=!0)),e.previousText=c,s&&(e.needsFileSafeElementLoad=!0,c=h(c)),t.t0=e.delegate.onNoteValueChange,!t.t0){t.next=14;break}return t.next=14,e.delegate.onNoteValueChange(n);case 14:if(e.delegate.setEditorRawText(c),!e.delegate.onNoteLockToggle){t.next=18;break}d=null!==(l=e.componentRelay.getItemAppDataValue(o,"locked"))&&void 0!==l&&l,p=null!==(f=e.componentRelay.getItemAppDataValue(e.note,"locked"))&&void 0!==f&&f,d!==p&&e.delegate.onNoteLockToggle(p);case 18:r&&(null===(v=(g=e.delegate).clearUndoHistory)||void 0===v||v.call(g));case 19:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}},{key:"importFileSafe",value:function(){var e=o(i().mark((function e(){var t=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.abrupt("return",Promise.resolve().then(f.t.bind(f,695,23)).then((function(e){return t.fileSafeClass=e.default,t.configureFileSafe(),t.fileSafeInstance})));case 4:e.prev=4,e.t0=e.catch(0),console.warn("[EditorKit] Could not import filesafe-js");case 7:case"end":return e.stop()}}),e,null,[[0,4]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"configureFileSafe",value:function(){for(var e=this,t=0,n=["getCurrentLineText","getPreviousLineText","replaceText","getElementsBySelector","insertElement","preprocessElement","insertRawText"];t<n.length;t++){var r=n[t];if(!this.delegate[r])throw Error("Missing ".concat(r," delegate function."))}this.fileSafeInstance=new this.fileSafeClass({componentManager:this.componentRelay}),this.fileSafeInstance.addDataChangeObserver((function(){var t=e.fileSafeInstance.getAllFileDescriptors();if(e.note&&e.fileIdsPendingAssociation.length>0){var n,r=!1,i=a(e.fileIdsPendingAssociation.slice());try{var o=function(){var i=n.value,o=t.find((function(e){return e.uuid==i}));if(!o)return"continue";r=!0,e.fileIdsPendingAssociation.splice(e.fileIdsPendingAssociation.indexOf(i),1);var a=v(o);e.delegate.insertRawText(a)};for(i.s();!(n=i.n()).done;)o()}catch(u){i.e(u)}finally{i.f()}r&&e.textExpander.searchPatterns()}t.length>0&&e.fileLoader.loadFileSafeElements()})),this.fileSafeInstance.addNewFileDescriptorHandler((function(t){e.fileIdsPendingAssociation.push(t.uuid)})),this.fileLoader=new c({fileSafeInstance:this.fileSafeInstance,getElementsBySelector:this.delegate.getElementsBySelector,insertElement:this.delegate.insertElement,preprocessElement:this.delegate.preprocessElement}),this.textExpander=new l({afterExpand:function(){return e.fileLoader.loadFileSafeElements()},getCurrentLineText:this.delegate.getCurrentLineText,getPreviousLineText:this.delegate.getPreviousLineText,replaceText:this.delegate.replaceText,patterns:[{regex:p,callback:function(e){return h(e)}}]})}},{key:"getFileSafe",value:function(){var e=o(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!this.fileSafeInstance&&this.fileSafeLoading?this.fileSafeLoading:this.importFileSafe());case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"onEditorKeyUp",value:function(e){var t=e.isSpace,n=e.isEnter;this.textExpander.onKeyUp({isSpace:t,isEnter:n})}},{key:"onEditorPaste",value:function(){this.textExpander.onKeyUp({isPaste:!0})}},{key:"onEditorValueChanged",value:function(e){var t=this,n=this.options,r=n.mode,i=n.supportsFileSafe;if(this.needsFileSafeElementLoad&&(this.needsFileSafeElementLoad=!1,this.fileLoader.loadFileSafeElements()),this.ignoreNextTextChange)this.ignoreNextTextChange=!1;else if((!i||(e=function(e){var t,n=(new DOMParser).parseFromString(e,"text/html"),r=n.querySelectorAll("*[fscollapsable]"),i=a(r);try{for(i.s();!(t=i.n()).done;){var o=t.value,u=o.getAttribute("fsid"),s=o.getAttribute("fsname"),c=o.getAttribute("width"),l=o.getAttribute("height"),f=["FileSafe",u,s];if(c&&l){var d="".concat(c,"x").concat(l);f.push(d)}var p="<p>[".concat(f.join(":"),"]</p>");o.insertAdjacentHTML("afterend",p),o.remove()}}catch(h){i.e(h)}finally{i.f()}return n.querySelectorAll("*[ghost]").forEach((function(e){return e.remove()})),n.body.innerHTML}(e),this.previousText!=e))&&(this.previousText=e,this.note)){var o=this.note;this.componentRelay.saveItemWithPresave(o,(function(){if(o.content.text=e,t.delegate.generateCustomPreview){var n,i=t.delegate.generateCustomPreview(e);o.content.preview_plain=null!==(n=i.plain)&&void 0!==n?n:" ",o.content.preview_html=i.html}else{if("html"===r){var a=e.replace(p,(function(e){return""}));a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:90;return e.length<=t?e:e.substring(0,t)+"..."}(function(e){var t=document.implementation.createHTMLDocument().body;return t.innerHTML=e,t.textContent||t.innerText||""}(a)),o.content.preview_plain=a.length>0?a:" "}else o.content.preview_plain=e;o.content.preview_html=null}}))}}},{key:"canUploadFiles",value:function(){var e=this.fileSafeInstance.getAllCredentials(),t=this.fileSafeInstance.getAllIntegrations();return e.length>0&&t.length>0}},{key:"uploadJSFileObject",value:function(){var e=o(i().mark((function e(t){var n,r=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.fileLoader.insertStatusAtCursor("Processing file..."),e.abrupt("return",this.fileSafeInstance.encryptAndUploadJavaScriptFileObject(t).then((function(){r.fileLoader.removeCursorStatus(n)})));case 2:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"saveItemWithPresave",value:function(e,t){this.componentRelay.saveItemWithPresave(e,t)}},{key:"platform",get:function(){return this.componentRelay.platform}},{key:"environment",get:function(){return this.componentRelay.environment}},{key:"canUseFileSafe",value:function(){return this.fileSafeInstance.hasLegacyAccess()}},{key:"getComponentDataValueForKey",value:function(e){return this.componentRelay.getComponentDataValueForKey(e)}},{key:"setComponentDataValueForKey",value:function(e,t){this.componentRelay.setComponentDataValueForKey(e,t)}},{key:"isRunningInMobileApplication",value:function(){return this.componentRelay.isRunningInMobileApplication()}}]),e}()}(),d.default}())},379:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Deferred=void 0;t.Deferred=function(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return{resolve:e,reject:t,promise:n}}},622:function(e,t,n){"use strict";var r=n(61).default,i=n(861).default,o=n(704).default,a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(t){o(t)}}function u(e){try{s(r.throw(e))}catch(t){o(t)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.isSameDay=t.assertUnreachable=t.sleep=t.truncateHexString=t.hasGetter=t.isValidUrl=t.deepFreeze=t.pickByCopy=t.deepMerge=t.Copy=t.joinPaths=t.omitByCopy=t.omitInPlace=t.withoutLastElement=t.jsonParseEmbeddedKeys=t.topLevelCompare=t.dateSorted=t.omitUndefinedCopy=t.sortByKey=t.sortedCopy=t.objectToValueArray=t.arrayByRemovingFromIndex=t.addAtIndex=t.removeFromIndex=t.compareValues=t.arrayByDifference=t.filterFromArray=t.addIfUnique=t.removeFromArray=t.subtractFromArray=t.extendArray=t.lastElement=t.uniqueArrayByKey=t.uniqueArray=t.uniqCombineObjArrays=t.greaterOfTwoDates=t.isString=t.isEmpty=t.isNotUndefined=t.isNullOrUndefined=t.isFunction=t.isObject=t.sureSearchArray=t.searchArray=t.findInArray=t.isReactNativeEnvironment=t.isWebCryptoAvailable=t.isWebEnvironment=t.dictToArray=t.getGlobalScope=void 0,t.useBoolean=t.assert=t.log=t.secondHalfOfString=t.firstHalfOfString=t.splitString=t.nonSecureRandomIdentifier=t.dateToLocalizedString=t.sanitizeHtmlString=t.convertTimestampToMilliseconds=t.arraysEqual=t.naturalSort=void 0;var u=n(703),s=n(763),c="undefined"!==typeof Intl?new Intl.Collator("en",{numeric:!0}):void 0;function l(){return"undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:null}function f(){return null!==l()}function d(){return"undefined"!==typeof navigator&&"ReactNative"===navigator.product}function p(e,t){return(0,s.find)(e,t)}function h(e){return null!==e&&("function"===typeof e||"object"===typeof e)}function v(e){return null===e||void 0===e}function g(e,t){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}function m(e,t){e.splice(t,1)}t.getGlobalScope=l,t.dictToArray=function(e){return Object.values(e)},t.isWebEnvironment=f,t.isWebCryptoAvailable=function(){return f()&&!d()&&!(document&&document.documentMode)||/Edge/.test(navigator.userAgent)&&window.crypto&&!!window.crypto.subtle},t.isReactNativeEnvironment=d,t.findInArray=function(e,t,n){return e.find((function(e){return e[t]===n}))},t.searchArray=p,t.sureSearchArray=function(e,t){return p(e,t)},t.isObject=h,t.isFunction=function(e){return null!==e&&"function"===typeof e},t.isNullOrUndefined=v,t.isNotUndefined=function(e){return void 0!=e},t.isEmpty=function(e){return!e||0===e.length},t.isString=function(e){return"string"===typeof e||e instanceof String},t.greaterOfTwoDates=function(e,t){return e>t?e:t},t.uniqCombineObjArrays=function(e,t,n){return(0,s.uniqWith)(e.concat(t),(function(e,t){var r,i=o(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(e[a]!==t[a])return!1}}catch(u){i.e(u)}finally{i.f()}return!0}))},t.uniqueArray=function(e){return(0,s.uniq)(e)},t.uniqueArrayByKey=function(e,t){return(0,s.uniqWith)(e,(function(e,n){return e[t]===n[t]}))},t.lastElement=function(e){return e[e.length-1]},t.extendArray=function(e,t){var n,r=o(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;e.push(i)}}catch(a){r.e(a)}finally{r.f()}},t.subtractFromArray=function(e,t){var n,r=o(t);try{for(r.s();!(n=r.n()).done;){g(e,n.value)}}catch(i){r.e(i)}finally{r.f()}},t.removeFromArray=g,t.addIfUnique=function(e,t){return!e.includes(t)&&(e.push(t),!0)},t.filterFromArray=function(e,t){(0,s.remove)(e,t)},t.arrayByDifference=function(e,t){return e.filter((function(e){return!t.includes(e)})).concat(t.filter((function(t){return!e.includes(t)})))},t.compareValues=function(e,t){return!(e&&!t||!e&&t)&&(e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():e instanceof String&&t instanceof String?e===t:y(e,t))},t.removeFromIndex=m,t.addAtIndex=function(e,t,n){e.splice(n,0,t)},t.arrayByRemovingFromIndex=function(e,t){var n=e.slice();return m(n,t),n},t.objectToValueArray=function(e){for(var t=[],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];t.push(e[i])}return t},t.sortedCopy=function(e){var t,n=Object.keys(e).sort(),r={},i=o(n);try{for(i.s();!(t=i.n()).done;){var a=t.value;r[a]=e[a]}}catch(u){i.e(u)}finally{i.f()}return b(r)};function y(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0,o=n;i<o.length;i++){var a=o[i];if(e[a]!==t[a])return!1}return!0}t.sortByKey=function(e,t){var n=i(e);return n.sort((function(e,n){var r=e[t],i=n[t];return r<i?-1:r>i?1:0})),n},t.omitUndefinedCopy=function(e){for(var t={},n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];v(e[i])||(t[i]=e[i])}return t},t.dateSorted=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return e.sort((function(e,r){var i=e[t].getTime(),o=r[t].getTime(),a=n?1:-1;return i<o?-1*a:i>o?1*a:0}))},t.topLevelCompare=y,t.jsonParseEmbeddedKeys=function(e){for(var t={},n=0,r=Object.keys(e);n<r.length;n++){var i=r[n],o=void 0;try{o=JSON.parse(e[i])}catch(a){o=e[i]}t[i]=o}return t};function b(e){return e instanceof Date?new Date(e):h(e)?JSON.parse(JSON.stringify(e)):e}t.withoutLastElement=function(e){return e.slice(0,-1)},t.omitInPlace=function(e,t){if(e){var n,r=o(t);try{for(r.s();!(n=r.n()).done;){delete e[n.value]}}catch(i){r.e(i)}finally{r.f()}}},t.omitByCopy=function(e,t){if(!v(e)){var n,r=Object.assign({},e),i=o(t);try{for(i.s();!(n=i.n()).done;){delete r[n.value]}}catch(a){i.e(a)}finally{i.f()}return r}},t.joinPaths=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.map((function(e,t){return 0===t?e.trim().replace(/[/]*$/g,""):e.trim().replace(/(^[/]*|[/]*$)/g,"")})).filter((function(e){return e.length})).join("/")},t.Copy=b,t.deepMerge=function(e,t){if(!e||!t)throw"Attempting to deepMerge with null values";return(0,s.mergeWith)(e,t,(function(e,t){if((0,s.isArray)(e))return t})),e},t.pickByCopy=function(e,t){var n,r={},i=o(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;r[a]=e[a]}}catch(u){i.e(u)}finally{i.f()}return b(r)},t.deepFreeze=function e(t){var n,r=Object.getOwnPropertyNames(t),i=o(r);try{for(i.s();!(n=i.n()).done;){var a=n.value,u=t[a];u&&"object"===typeof u&&!Object.isFrozen(u)?t[a]=e(u):t[a]=u}}catch(s){i.e(s)}finally{i.f()}return Object.freeze(t)},t.isValidUrl=function(e){try{return new URL(e),!0}catch(t){return!1}},t.hasGetter=function(e,t){var n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),t);return n&&!v(n.get)},t.truncateHexString=function(e,t){var n=t/4;return e.substring(0,n)},t.sleep=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return a(this,void 0,void 0,r().mark((function n(){return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t&&console.warn("Sleeping for ".concat(e,"ms")),n.abrupt("return",new Promise((function(t){setTimeout((function(){t()}),e)})));case 2:case"end":return n.stop()}}),n)})))},t.assertUnreachable=function(e){throw Error("Unchecked case "+e)},t.isSameDay=function(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()},t.naturalSort=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"asc";switch(n){case"asc":return i(e).sort(c?function(e,n){return c.compare(e[t],n[t])}:function(e,n){return e[t].localeCompare(n[t],"en",{numeric:!0})});case"desc":return i(e).sort(c?function(e,n){return c.compare(n[t],e[t])}:function(e,n){return n[t].localeCompare(e[t],"en",{numeric:!0})})}},t.arraysEqual=function(e,t){return e.length===t.length&&(e.every((function(e){return t.includes(e)}))&&t.every((function(t){return e.includes(t)})))};var w,x;function k(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Function.prototype.apply.call(console.log,console,arguments)}!function(e){e[e.Seconds=10]="Seconds",e[e.Milliseconds=13]="Milliseconds",e[e.Microseconds=16]="Microseconds"}(w||(w={})),t.convertTimestampToMilliseconds=function(e){switch(String(e).length){case w.Seconds:return 1e3*e;case w.Milliseconds:return e;case w.Microseconds:return Math.floor(e/1e3);default:throw"Unhandled timestamp precision: ".concat(e)}},t.sanitizeHtmlString=function(e){return(0,u.sanitize)(e)},t.dateToLocalizedString=function(e){if("undefined"!==typeof Intl&&Intl.DateTimeFormat&&"undefined"!==typeof navigator){if(!x){var t=navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language;x=new Intl.DateTimeFormat(t,{year:"numeric",month:"short",day:"2-digit",weekday:"long",hour:"2-digit",minute:"2-digit"})}return x.format(e)}return e.toDateString()+" "+e.toLocaleTimeString()},t.nonSecureRandomIdentifier=function(){return"".concat(100*Math.random()).replace(".","")},t.splitString=function(e,t){for(var n=e.length/t,r=[],i=0;i<t;i++){var o=e.slice(n*i,n*(i+1));r.push(o)}return r},t.firstHalfOfString=function(e){return e.substring(0,e.length/2)},t.secondHalfOfString=function(e){return e.substring(e.length/2,e.length)},t.log=function(e){for(var t=new Date,n="".concat(t.toLocaleTimeString().replace(" PM","").replace(" AM",""),".").concat(t.getMilliseconds()),r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];k.apply(void 0,["%c".concat(e,"%c").concat(n),"color: black; font-weight: bold; margin-right: 4px","color: gray"].concat(i))},t.assert=function(e){if(void 0===e)throw new Error("Assertion failed; value must be defined")},t.useBoolean=function(e,t){return void 0!=e?e:t}},632:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Uuids=void 0,t.Uuids=function(e){return e.map((function(e){return e.uuid}))}},528:function(e,t,n){"use strict";var r=n(690).default,i=n(728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.UuidGenerator=void 0;var o=function(){function e(){r(this,e)}return i(e,null,[{key:"SetGenerator",value:function(e){this.syncUuidFunc=e}},{key:"GenerateUuid",value:function(){return this.syncUuidFunc()}}]),e}();t.UuidGenerator=o},942:function(e,t,n){"use strict";var r=n(704).default,i=n(690).default,o=n(728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.UuidMap=void 0;var a=n(622),u=function(){function e(){i(this,e),this.directMap={},this.inverseMap={}}return o(e,[{key:"makeCopy",value:function(){var t=new e;return t.directMap=Object.assign({},this.directMap),t.inverseMap=Object.assign({},this.inverseMap),t}},{key:"getDirectRelationships",value:function(e){return this.directMap[e]||[]}},{key:"getInverseRelationships",value:function(e){return this.inverseMap[e]||[]}},{key:"establishRelationship",value:function(e,t){this.establishDirectRelationship(e,t),this.establishInverseRelationship(e,t)}},{key:"deestablishRelationship",value:function(e,t){this.deestablishDirectRelationship(e,t),this.deestablishInverseRelationship(e,t)}},{key:"setAllRelationships",value:function(e,t){var n=this.directMap[e]||[];this.directMap[e]=t;var i,o=r(n);try{for(o.s();!(i=o.n()).done;){var a=i.value;this.deestablishInverseRelationship(e,a)}}catch(l){o.e(l)}finally{o.f()}var u,s=r(t);try{for(s.s();!(u=s.n()).done;){var c=u.value;this.establishInverseRelationship(e,c)}}catch(l){s.e(l)}finally{s.f()}}},{key:"removeFromMap",value:function(e){var t,n=this.directMap[e]||[],i=r(n);try{for(i.s();!(t=i.n()).done;){var o=t.value;(0,a.removeFromArray)(this.inverseMap[o]||[],e)}}catch(f){i.e(f)}finally{i.f()}delete this.directMap[e];var u,s=this.inverseMap[e]||[],c=r(s);try{for(c.s();!(u=c.n()).done;){var l=u.value;(0,a.removeFromArray)(this.directMap[l]||[],e)}}catch(f){c.e(f)}finally{c.f()}delete this.inverseMap[e]}},{key:"establishDirectRelationship",value:function(e,t){var n=this.directMap[e]||[];(0,a.addIfUnique)(n,t),this.directMap[e]=n}},{key:"establishInverseRelationship",value:function(e,t){var n=this.inverseMap[t]||[];(0,a.addIfUnique)(n,e),this.inverseMap[t]=n}},{key:"deestablishDirectRelationship",value:function(e,t){var n=this.directMap[e]||[];(0,a.removeFromArray)(n,t),this.directMap[e]=n}},{key:"deestablishInverseRelationship",value:function(e,t){var n=this.inverseMap[t]||[];(0,a.removeFromArray)(n,e),this.inverseMap[t]=n}}]),e}();t.UuidMap=u},911:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(622),t),i(n(528),t),i(n(942),t),i(n(632),t),i(n(379),t)},516:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(911),t)},703:function(e){e.exports=function(){"use strict";function e(t){return e="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},e(t)}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}function n(){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}}function r(e,i,o){return r=n()?Reflect.construct:function(e,n,r){var i=[null];i.push.apply(i,n);var o=new(Function.bind.apply(e,i));return r&&t(o,r.prototype),o},r.apply(null,arguments)}function i(e){return o(e)||a(e)||u(e)||c()}function o(e){if(Array.isArray(e))return s(e)}function a(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function u(e,t){if(e){if("string"===typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l=Object.hasOwnProperty,f=Object.setPrototypeOf,d=Object.isFrozen,p=Object.getPrototypeOf,h=Object.getOwnPropertyDescriptor,v=Object.freeze,g=Object.seal,m=Object.create,y="undefined"!==typeof Reflect&&Reflect,b=y.apply,w=y.construct;b||(b=function(e,t,n){return e.apply(t,n)}),v||(v=function(e){return e}),g||(g=function(e){return e}),w||(w=function(e,t){return r(e,i(t))});var x=T(Array.prototype.forEach),k=T(Array.prototype.pop),S=T(Array.prototype.push),E=T(String.prototype.toLowerCase),C=T(String.prototype.match),I=T(String.prototype.replace),O=T(String.prototype.indexOf),A=T(String.prototype.trim),D=T(RegExp.prototype.test),P=N(TypeError);function T(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return b(e,t,r)}}function N(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return w(e,n)}}function M(e,t,n){n=n||E,f&&f(e,null);for(var r=t.length;r--;){var i=t[r];if("string"===typeof i){var o=n(i);o!==i&&(d(t)||(t[r]=o),i=o)}e[i]=!0}return e}function R(e){var t,n=m(null);for(t in e)b(l,e,[t])&&(n[t]=e[t]);return n}function L(e,t){for(;null!==e;){var n=h(e,t);if(n){if(n.get)return T(n.get);if("function"===typeof n.value)return T(n.value)}e=p(e)}function r(e){return console.warn("fallback value for",e),null}return r}var j=v(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),F=v(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),B=v(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),z=v(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),U=v(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),H=v(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),W=v(["#text"]),V=v(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),G=v(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),K=v(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),q=v(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),$=g(/\{\{[\w\W]*|[\w\W]*\}\}/gm),J=g(/<%[\w\W]*|[\w\W]*%>/gm),Y=g(/^data-[\-\w.\u00B7-\uFFFF]/),Z=g(/^aria-[\-\w]+$/),X=g(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Q=g(/^(?:\w+script|data):/i),ee=g(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),te=g(/^html$/i),ne=function(){return"undefined"===typeof window?null:window},re=function(t,n){if("object"!==e(t)||"function"!==typeof t.createPolicy)return null;var r=null,i="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(i)&&(r=n.currentScript.getAttribute(i));var o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(_){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function ie(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ne(),n=function(e){return ie(e)};if(n.version="2.4.0",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,o=t.document,a=t.DocumentFragment,u=t.HTMLTemplateElement,s=t.Node,c=t.Element,l=t.NodeFilter,f=t.NamedNodeMap,d=void 0===f?t.NamedNodeMap||t.MozNamedAttrMap:f,p=t.HTMLFormElement,h=t.DOMParser,g=t.trustedTypes,m=c.prototype,y=L(m,"cloneNode"),b=L(m,"nextSibling"),w=L(m,"childNodes"),T=L(m,"parentNode");if("function"===typeof u){var N=o.createElement("template");N.content&&N.content.ownerDocument&&(o=N.content.ownerDocument)}var oe=re(g,r),ae=oe?oe.createHTML(""):"",ue=o,se=ue.implementation,ce=ue.createNodeIterator,le=ue.createDocumentFragment,fe=ue.getElementsByTagName,de=r.importNode,pe={};try{pe=R(o).documentMode?o.documentMode:{}}catch(_){}var he={};n.isSupported="function"===typeof T&&se&&"undefined"!==typeof se.createHTMLDocument&&9!==pe;var ve,ge,me=$,ye=J,be=Y,we=Z,xe=Q,ke=ee,Se=X,_e=null,Ee=M({},[].concat(i(j),i(F),i(B),i(U),i(W))),Ce=null,Ie=M({},[].concat(i(V),i(G),i(K),i(q))),Oe=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ae=null,De=null,Pe=!0,Te=!0,Ne=!1,Me=!1,Re=!1,Le=!1,je=!1,Fe=!1,Be=!1,ze=!1,Ue=!0,He=!1,We="user-content-",Ve=!0,Ge=!1,Ke={},qe=null,$e=M({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Je=null,Ye=M({},["audio","video","img","source","image","track"]),Ze=null,Xe=M({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Qe="http://www.w3.org/1998/Math/MathML",et="http://www.w3.org/2000/svg",tt="http://www.w3.org/1999/xhtml",nt=tt,rt=!1,it=["application/xhtml+xml","text/html"],ot="text/html",at=null,ut=o.createElement("form"),st=function(e){return e instanceof RegExp||e instanceof Function},ct=function(t){at&&at===t||(t&&"object"===e(t)||(t={}),t=R(t),ve=ve=-1===it.indexOf(t.PARSER_MEDIA_TYPE)?ot:t.PARSER_MEDIA_TYPE,ge="application/xhtml+xml"===ve?function(e){return e}:E,_e="ALLOWED_TAGS"in t?M({},t.ALLOWED_TAGS,ge):Ee,Ce="ALLOWED_ATTR"in t?M({},t.ALLOWED_ATTR,ge):Ie,Ze="ADD_URI_SAFE_ATTR"in t?M(R(Xe),t.ADD_URI_SAFE_ATTR,ge):Xe,Je="ADD_DATA_URI_TAGS"in t?M(R(Ye),t.ADD_DATA_URI_TAGS,ge):Ye,qe="FORBID_CONTENTS"in t?M({},t.FORBID_CONTENTS,ge):$e,Ae="FORBID_TAGS"in t?M({},t.FORBID_TAGS,ge):{},De="FORBID_ATTR"in t?M({},t.FORBID_ATTR,ge):{},Ke="USE_PROFILES"in t&&t.USE_PROFILES,Pe=!1!==t.ALLOW_ARIA_ATTR,Te=!1!==t.ALLOW_DATA_ATTR,Ne=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=t.SAFE_FOR_TEMPLATES||!1,Re=t.WHOLE_DOCUMENT||!1,Fe=t.RETURN_DOM||!1,Be=t.RETURN_DOM_FRAGMENT||!1,ze=t.RETURN_TRUSTED_TYPE||!1,je=t.FORCE_BODY||!1,Ue=!1!==t.SANITIZE_DOM,He=t.SANITIZE_NAMED_PROPS||!1,Ve=!1!==t.KEEP_CONTENT,Ge=t.IN_PLACE||!1,Se=t.ALLOWED_URI_REGEXP||Se,nt=t.NAMESPACE||tt,t.CUSTOM_ELEMENT_HANDLING&&st(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Oe.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&st(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Oe.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"===typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Oe.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Me&&(Te=!1),Be&&(Fe=!0),Ke&&(_e=M({},i(W)),Ce=[],!0===Ke.html&&(M(_e,j),M(Ce,V)),!0===Ke.svg&&(M(_e,F),M(Ce,G),M(Ce,q)),!0===Ke.svgFilters&&(M(_e,B),M(Ce,G),M(Ce,q)),!0===Ke.mathMl&&(M(_e,U),M(Ce,K),M(Ce,q))),t.ADD_TAGS&&(_e===Ee&&(_e=R(_e)),M(_e,t.ADD_TAGS,ge)),t.ADD_ATTR&&(Ce===Ie&&(Ce=R(Ce)),M(Ce,t.ADD_ATTR,ge)),t.ADD_URI_SAFE_ATTR&&M(Ze,t.ADD_URI_SAFE_ATTR,ge),t.FORBID_CONTENTS&&(qe===$e&&(qe=R(qe)),M(qe,t.FORBID_CONTENTS,ge)),Ve&&(_e["#text"]=!0),Re&&M(_e,["html","head","body"]),_e.table&&(M(_e,["tbody"]),delete Ae.tbody),v&&v(t),at=t)},lt=M({},["mi","mo","mn","ms","mtext"]),ft=M({},["foreignobject","desc","title","annotation-xml"]),dt=M({},["title","style","font","a","script"]),pt=M({},F);M(pt,B),M(pt,z);var ht=M({},U);M(ht,H);var vt=function(e){var t=T(e);t&&t.tagName||(t={namespaceURI:tt,tagName:"template"});var n=E(e.tagName),r=E(t.tagName);return e.namespaceURI===et?t.namespaceURI===tt?"svg"===n:t.namespaceURI===Qe?"svg"===n&&("annotation-xml"===r||lt[r]):Boolean(pt[n]):e.namespaceURI===Qe?t.namespaceURI===tt?"math"===n:t.namespaceURI===et?"math"===n&&ft[r]:Boolean(ht[n]):e.namespaceURI===tt&&!(t.namespaceURI===et&&!ft[r])&&!(t.namespaceURI===Qe&&!lt[r])&&!ht[n]&&(dt[n]||!pt[n])},gt=function(e){S(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(_){try{e.outerHTML=ae}catch(_){e.remove()}}},mt=function(e,t){try{S(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(_){S(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Ce[e])if(Fe||Be)try{gt(t)}catch(_){}else try{t.setAttribute(e,"")}catch(_){}},yt=function(e){var t,n;if(je)e="<remove></remove>"+e;else{var r=C(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===ve&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var i=oe?oe.createHTML(e):e;if(nt===tt)try{t=(new h).parseFromString(i,ve)}catch(_){}if(!t||!t.documentElement){t=se.createDocument(nt,"template",null);try{t.documentElement.innerHTML=rt?"":i}catch(_){}}var a=t.body||t.documentElement;return e&&n&&a.insertBefore(o.createTextNode(n),a.childNodes[0]||null),nt===tt?fe.call(t,Re?"html":"body")[0]:Re?t.documentElement:a},bt=function(e){return ce.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},wt=function(e){return e instanceof p&&("string"!==typeof e.nodeName||"string"!==typeof e.textContent||"function"!==typeof e.removeChild||!(e.attributes instanceof d)||"function"!==typeof e.removeAttribute||"function"!==typeof e.setAttribute||"string"!==typeof e.namespaceURI||"function"!==typeof e.insertBefore)},xt=function(t){return"object"===e(s)?t instanceof s:t&&"object"===e(t)&&"number"===typeof t.nodeType&&"string"===typeof t.nodeName},kt=function(e,t,r){he[e]&&x(he[e],(function(e){e.call(n,t,r,at)}))},St=function(e){var t;if(kt("beforeSanitizeElements",e,null),wt(e))return gt(e),!0;if(D(/[\u0080-\uFFFF]/,e.nodeName))return gt(e),!0;var r=ge(e.nodeName);if(kt("uponSanitizeElement",e,{tagName:r,allowedTags:_e}),e.hasChildNodes()&&!xt(e.firstElementChild)&&(!xt(e.content)||!xt(e.content.firstElementChild))&&D(/<[/\w]/g,e.innerHTML)&&D(/<[/\w]/g,e.textContent))return gt(e),!0;if("select"===r&&D(/<template/i,e.innerHTML))return gt(e),!0;if(!_e[r]||Ae[r]){if(!Ae[r]&&Et(r)){if(Oe.tagNameCheck instanceof RegExp&&D(Oe.tagNameCheck,r))return!1;if(Oe.tagNameCheck instanceof Function&&Oe.tagNameCheck(r))return!1}if(Ve&&!qe[r]){var i=T(e)||e.parentNode,o=w(e)||e.childNodes;if(o&&i)for(var a=o.length-1;a>=0;--a)i.insertBefore(y(o[a],!0),b(e))}return gt(e),!0}return e instanceof c&&!vt(e)?(gt(e),!0):"noscript"!==r&&"noembed"!==r||!D(/<\/no(script|embed)/i,e.innerHTML)?(Me&&3===e.nodeType&&(t=e.textContent,t=I(t,me," "),t=I(t,ye," "),e.textContent!==t&&(S(n.removed,{element:e.cloneNode()}),e.textContent=t)),kt("afterSanitizeElements",e,null),!1):(gt(e),!0)},_t=function(e,t,n){if(Ue&&("id"===t||"name"===t)&&(n in o||n in ut))return!1;if(Te&&!De[t]&&D(be,t));else if(Pe&&D(we,t));else if(!Ce[t]||De[t]){if(!(Et(e)&&(Oe.tagNameCheck instanceof RegExp&&D(Oe.tagNameCheck,e)||Oe.tagNameCheck instanceof Function&&Oe.tagNameCheck(e))&&(Oe.attributeNameCheck instanceof RegExp&&D(Oe.attributeNameCheck,t)||Oe.attributeNameCheck instanceof Function&&Oe.attributeNameCheck(t))||"is"===t&&Oe.allowCustomizedBuiltInElements&&(Oe.tagNameCheck instanceof RegExp&&D(Oe.tagNameCheck,n)||Oe.tagNameCheck instanceof Function&&Oe.tagNameCheck(n))))return!1}else if(Ze[t]);else if(D(Se,I(n,ke,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==O(n,"data:")||!Je[e])if(Ne&&!D(xe,I(n,ke,"")));else if(n)return!1;return!0},Et=function(e){return e.indexOf("-")>0},Ct=function(t){var r,i,o,a;kt("beforeSanitizeAttributes",t,null);var u=t.attributes;if(u){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ce};for(a=u.length;a--;){var c=r=u[a],l=c.name,f=c.namespaceURI;if(i="value"===l?r.value:A(r.value),o=ge(l),s.attrName=o,s.attrValue=i,s.keepAttr=!0,s.forceKeepAttr=void 0,kt("uponSanitizeAttribute",t,s),i=s.attrValue,!s.forceKeepAttr&&(mt(l,t),s.keepAttr))if(D(/\/>/i,i))mt(l,t);else{Me&&(i=I(i,me," "),i=I(i,ye," "));var d=ge(t.nodeName);if(_t(d,o,i)){if(!He||"id"!==o&&"name"!==o||(mt(l,t),i=We+i),oe&&"object"===e(g)&&"function"===typeof g.getAttributeType)if(f);else switch(g.getAttributeType(d,o)){case"TrustedHTML":i=oe.createHTML(i);break;case"TrustedScriptURL":i=oe.createScriptURL(i)}try{f?t.setAttributeNS(f,l,i):t.setAttribute(l,i),k(n.removed)}catch(_){}}}}kt("afterSanitizeAttributes",t,null)}},It=function e(t){var n,r=bt(t);for(kt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)kt("uponSanitizeShadowNode",n,null),St(n)||(n.content instanceof a&&e(n.content),Ct(n));kt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(i){var o,u,c,l,f,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((rt=!i)&&(i="\x3c!--\x3e"),"string"!==typeof i&&!xt(i)){if("function"!==typeof i.toString)throw P("toString is not a function");if("string"!==typeof(i=i.toString()))throw P("dirty is not a string, aborting")}if(!n.isSupported){if("object"===e(t.toStaticHTML)||"function"===typeof t.toStaticHTML){if("string"===typeof i)return t.toStaticHTML(i);if(xt(i))return t.toStaticHTML(i.outerHTML)}return i}if(Le||ct(d),n.removed=[],"string"===typeof i&&(Ge=!1),Ge){if(i.nodeName){var p=ge(i.nodeName);if(!_e[p]||Ae[p])throw P("root node is forbidden and cannot be sanitized in-place")}}else if(i instanceof s)1===(u=(o=yt("\x3c!----\x3e")).ownerDocument.importNode(i,!0)).nodeType&&"BODY"===u.nodeName||"HTML"===u.nodeName?o=u:o.appendChild(u);else{if(!Fe&&!Me&&!Re&&-1===i.indexOf("<"))return oe&&ze?oe.createHTML(i):i;if(!(o=yt(i)))return Fe?null:ze?ae:""}o&&je&>(o.firstChild);for(var h=bt(Ge?i:o);c=h.nextNode();)3===c.nodeType&&c===l||St(c)||(c.content instanceof a&&It(c.content),Ct(c),l=c);if(l=null,Ge)return i;if(Fe){if(Be)for(f=le.call(o.ownerDocument);o.firstChild;)f.appendChild(o.firstChild);else f=o;return Ce.shadowroot&&(f=de.call(r,f,!0)),f}var v=Re?o.outerHTML:o.innerHTML;return Re&&_e["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&D(te,o.ownerDocument.doctype.name)&&(v="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+v),Me&&(v=I(v,me," "),v=I(v,ye," ")),oe&&ze?oe.createHTML(v):v},n.setConfig=function(e){ct(e),Le=!0},n.clearConfig=function(){at=null,Le=!1},n.isValidAttribute=function(e,t,n){at||ct({});var r=ge(e),i=ge(t);return _t(r,i,n)},n.addHook=function(e,t){"function"===typeof t&&(he[e]=he[e]||[],S(he[e],t))},n.removeHook=function(e){if(he[e])return k(he[e])},n.removeHooks=function(e){he[e]&&(he[e]=[])},n.removeAllHooks=function(){he={}},n}return ie()}()},634:function(e,t,n){var r=n(61).default;e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){(function(t){e.exports=function e(t,n,r){function i(a,u){if(!n[a]){if(!t[a]){if(o)return o(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var o=!1,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,n,i){(function(e){var t,n,o,a,u,s,c=c||function(e,t){var n={},r=n.lib={},i=function(){},o=r.Base={extend:function(e){i.prototype=this;var t=new i;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},a=r.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||s).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes;if(e=e.sigBytes,this.clamp(),r%4)for(var i=0;i<e;i++)t[r+i>>>2]|=(n[i>>>2]>>>24-i%4*8&255)<<24-(r+i)%4*8;else if(65535<n.length)for(i=0;i<e;i+=4)t[r+i>>>2]=n[i>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],r=0;r<t;r+=4)n.push(4294967296*e.random()|0);return new a.init(n,t)}}),u=n.enc={},s=u.Hex={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r<e;r++){var i=t[r>>>2]>>>24-r%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new a.init(n,t/2)}},c=u.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r<e;r++)n.push(String.fromCharCode(t[r>>>2]>>>24-r%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new a.init(n,t)}},l=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},f=r.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,u=i/(4*o);if(t=(u=t?e.ceil(u):e.max((0|u)-this._minBufferSize,0))*o,i=e.min(4*t,i),t){for(var s=0;s<t;s+=o)this._doProcessBlock(r,s);s=r.splice(0,t),n.sigBytes-=i}return new a.init(s,i)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});r.Hasher=f.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new d.HMAC.init(e,n).finalize(t)}}});var d=n.algo={};return n}(Math);function l(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function v(e){return(v="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})(e)}function g(e,t,n,r,i,o,a){try{var u=e[o](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,i)}function m(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){g(o,r,i,a,u,"next",e)}function u(e){g(o,r,i,a,u,"throw",e)}a(void 0)}))}}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,t,n){return t&&b(e.prototype,t),n&&b(e,n),e}n=(t=c).lib.WordArray,t.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp(),e=[];for(var i=0;i<n;i+=3)for(var o=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,a=0;4>a&&i+.75*a<n;a++)e.push(r.charAt(o>>>6*(3-a)&63));if(t=r.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var t=e.length,r=this._map;(i=r.charAt(64))&&-1!=(i=e.indexOf(i))&&(t=i);for(var i=[],o=0,a=0;a<t;a++)if(a%4){var u=r.indexOf(e.charAt(a-1))<<a%4*2,s=r.indexOf(e.charAt(a))>>>6-a%4*2;i[o>>>2]|=(u|s)<<24-o%4*8,o++}return n.create(i,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(e){function t(e,t,n,r,i,o,a){return((e=e+(t&n|~t&r)+i+a)<<o|e>>>32-o)+t}function n(e,t,n,r,i,o,a){return((e=e+(t&r|n&~r)+i+a)<<o|e>>>32-o)+t}function r(e,t,n,r,i,o,a){return((e=e+(t^n^r)+i+a)<<o|e>>>32-o)+t}function i(e,t,n,r,i,o,a){return((e=e+(n^(t|~r))+i+a)<<o|e>>>32-o)+t}for(var o=c,a=(s=o.lib).WordArray,u=s.Hasher,s=o.algo,l=[],f=0;64>f;f++)l[f]=4294967296*e.abs(e.sin(f+1))|0;s=s.MD5=u.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,o){for(var a=0;16>a;a++){var u=e[s=o+a];e[s]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}a=this._hash.words;var s=e[o+0],c=(u=e[o+1],e[o+2]),f=e[o+3],d=e[o+4],p=e[o+5],h=e[o+6],v=e[o+7],g=e[o+8],m=e[o+9],y=e[o+10],b=e[o+11],w=e[o+12],x=e[o+13],k=e[o+14],S=e[o+15],_=t(_=a[0],I=a[1],C=a[2],E=a[3],s,7,l[0]),E=t(E,_,I,C,u,12,l[1]),C=t(C,E,_,I,c,17,l[2]),I=t(I,C,E,_,f,22,l[3]);_=t(_,I,C,E,d,7,l[4]),E=t(E,_,I,C,p,12,l[5]),C=t(C,E,_,I,h,17,l[6]),I=t(I,C,E,_,v,22,l[7]),_=t(_,I,C,E,g,7,l[8]),E=t(E,_,I,C,m,12,l[9]),C=t(C,E,_,I,y,17,l[10]),I=t(I,C,E,_,b,22,l[11]),_=t(_,I,C,E,w,7,l[12]),E=t(E,_,I,C,x,12,l[13]),C=t(C,E,_,I,k,17,l[14]),_=n(_,I=t(I,C,E,_,S,22,l[15]),C,E,u,5,l[16]),E=n(E,_,I,C,h,9,l[17]),C=n(C,E,_,I,b,14,l[18]),I=n(I,C,E,_,s,20,l[19]),_=n(_,I,C,E,p,5,l[20]),E=n(E,_,I,C,y,9,l[21]),C=n(C,E,_,I,S,14,l[22]),I=n(I,C,E,_,d,20,l[23]),_=n(_,I,C,E,m,5,l[24]),E=n(E,_,I,C,k,9,l[25]),C=n(C,E,_,I,f,14,l[26]),I=n(I,C,E,_,g,20,l[27]),_=n(_,I,C,E,x,5,l[28]),E=n(E,_,I,C,c,9,l[29]),C=n(C,E,_,I,v,14,l[30]),_=r(_,I=n(I,C,E,_,w,20,l[31]),C,E,p,4,l[32]),E=r(E,_,I,C,g,11,l[33]),C=r(C,E,_,I,b,16,l[34]),I=r(I,C,E,_,k,23,l[35]),_=r(_,I,C,E,u,4,l[36]),E=r(E,_,I,C,d,11,l[37]),C=r(C,E,_,I,v,16,l[38]),I=r(I,C,E,_,y,23,l[39]),_=r(_,I,C,E,x,4,l[40]),E=r(E,_,I,C,s,11,l[41]),C=r(C,E,_,I,f,16,l[42]),I=r(I,C,E,_,h,23,l[43]),_=r(_,I,C,E,m,4,l[44]),E=r(E,_,I,C,w,11,l[45]),C=r(C,E,_,I,S,16,l[46]),_=i(_,I=r(I,C,E,_,c,23,l[47]),C,E,s,6,l[48]),E=i(E,_,I,C,v,10,l[49]),C=i(C,E,_,I,k,15,l[50]),I=i(I,C,E,_,p,21,l[51]),_=i(_,I,C,E,w,6,l[52]),E=i(E,_,I,C,f,10,l[53]),C=i(C,E,_,I,y,15,l[54]),I=i(I,C,E,_,u,21,l[55]),_=i(_,I,C,E,g,6,l[56]),E=i(E,_,I,C,S,10,l[57]),C=i(C,E,_,I,h,15,l[58]),I=i(I,C,E,_,x,21,l[59]),_=i(_,I,C,E,d,6,l[60]),E=i(E,_,I,C,b,10,l[61]),C=i(C,E,_,I,c,15,l[62]),I=i(I,C,E,_,m,21,l[63]),a[0]=a[0]+_|0,a[1]=a[1]+I|0,a[2]=a[2]+C|0,a[3]=a[3]+E|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var o=e.floor(r/4294967296);for(n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(n.length+1),this._process(),n=(t=this._hash).words,r=0;4>r;r++)i=n[r],n[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);return t},clone:function(){var e=u.clone.call(this);return e._hash=this._hash.clone(),e}}),o.MD5=u._createHelper(s),o.HmacMD5=u._createHmacHelper(s)}(Math),function(){var e,t=c,n=(e=t.lib).Base,r=e.WordArray,i=(e=t.algo).EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:e.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=(u=this.cfg).hasher.create(),i=r.create(),o=i.words,a=u.keySize,u=u.iterations;o.length<a;){s&&n.update(s);var s=n.update(e).finalize(t);n.reset();for(var c=1;c<u;c++)s=n.finalize(s),n.reset();i.concat(s)}return i.sigBytes=4*a,i}});t.EvpKDF=function(e,t,n){return i.create(n).compute(e,t)}}(),c.lib.Cipher||function(e){var t=(h=c).lib,n=t.Base,r=t.WordArray,i=t.BufferedBlockAlgorithm,o=h.enc.Base64,a=h.algo.EvpKDF,u=t.Cipher=i.extend({cfg:n.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){i.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(e){return{encrypt:function(t,n,r){return("string"==typeof n?v:p).encrypt(e,t,n,r)},decrypt:function(t,n,r){return("string"==typeof n?v:p).decrypt(e,t,n,r)}}}});t.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var s=h.mode={},l=function(e,t,n){var r=this._iv;r?this._iv=void 0:r=this._prevBlock;for(var i=0;i<n;i++)e[t+i]^=r[i]},f=(t.BlockCipherMode=n.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}})).extend();f.Encryptor=f.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize;l.call(this,e,t,r),n.encryptBlock(e,t),this._prevBlock=e.slice(t,t+r)}}),f.Decryptor=f.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=e.slice(t,t+r);n.decryptBlock(e,t),l.call(this,e,t,r),this._prevBlock=i}}),s=s.CBC=f,f=(h.pad={}).Pkcs7={pad:function(e,t){for(var n,i=(n=(n=4*t)-e.sigBytes%n)<<24|n<<16|n<<8|n,o=[],a=0;a<n;a+=4)o.push(i);n=r.create(o,n),e.concat(n)},unpad:function(e){e.sigBytes-=255&e.words[e.sigBytes-1>>>2]}},t.BlockCipher=u.extend({cfg:u.cfg.extend({mode:s,padding:f}),reset:function(){u.reset.call(this);var e=(t=this.cfg).iv,t=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=t.createEncryptor;else n=t.createDecryptor,this._minBufferSize=1;this._mode=n.call(t,this,e&&e.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4});var d=t.CipherParams=n.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),p=(s=(h.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return((e=e.salt)?r.create([1398893684,1701076831]).concat(e).concat(t):t).toString(o)},parse:function(e){var t=(e=o.parse(e)).words;if(1398893684==t[0]&&1701076831==t[1]){var n=r.create(t.slice(2,4));t.splice(0,4),e.sigBytes-=16}return d.create({ciphertext:e,salt:n})}},t.SerializableCipher=n.extend({cfg:n.extend({format:s}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r);return t=i.finalize(t),i=i.cfg,d.create({ciphertext:t,key:n,iv:i.iv,algorithm:e,mode:i.mode,padding:i.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}})),h=(h.kdf={}).OpenSSL={execute:function(e,t,n,i){return i||(i=r.random(8)),e=a.create({keySize:t+n}).compute(e,i),n=r.create(e.words.slice(t),4*n),e.sigBytes=4*t,d.create({key:e,iv:n,salt:i})}},v=t.PasswordBasedCipher=p.extend({cfg:p.cfg.extend({kdf:h}),encrypt:function(e,t,n,r){return n=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize),r.iv=n.iv,(e=p.encrypt.call(this,e,t,n.key,r)).mixIn(n),e},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),n=r.kdf.execute(n,e.keySize,e.ivSize,t.salt),r.iv=n.iv,p.decrypt.call(this,e,t,n.key,r)}})}(),function(){for(var e=c,t=e.lib.BlockCipher,n=e.algo,r=[],i=[],o=[],a=[],u=[],s=[],l=[],f=[],d=[],p=[],h=[],v=0;256>v;v++)h[v]=128>v?v<<1:v<<1^283;var g=0,m=0;for(v=0;256>v;v++){var y=(y=m^m<<1^m<<2^m<<3^m<<4)>>>8^255&y^99;r[g]=y,i[y]=g;var b=h[g],w=h[b],x=h[w],k=257*h[y]^16843008*y;o[g]=k<<24|k>>>8,a[g]=k<<16|k>>>16,u[g]=k<<8|k>>>24,s[g]=k,k=16843009*x^65537*w^257*b^16843008*g,l[y]=k<<24|k>>>8,f[y]=k<<16|k>>>16,d[y]=k<<8|k>>>24,p[y]=k,g?(g=b^h[h[h[x^b]]],m^=h[h[m]]):g=m=1}var S=[0,1,2,4,8,16,32,64,128,27,54];n=n.AES=t.extend({_doReset:function(){for(var e=(n=this._key).words,t=n.sigBytes/4,n=4*((this._nRounds=t+6)+1),i=this._keySchedule=[],o=0;o<n;o++)if(o<t)i[o]=e[o];else{var a=i[o-1];o%t?6<t&&4==o%t&&(a=r[a>>>24]<<24|r[a>>>16&255]<<16|r[a>>>8&255]<<8|r[255&a]):(a=r[(a=a<<8|a>>>24)>>>24]<<24|r[a>>>16&255]<<16|r[a>>>8&255]<<8|r[255&a],a^=S[o/t|0]<<24),i[o]=i[o-t]^a}for(e=this._invKeySchedule=[],t=0;t<n;t++)o=n-t,a=t%4?i[o]:i[o-4],e[t]=4>t||4>=o?a:l[r[a>>>24]]^f[r[a>>>16&255]]^d[r[a>>>8&255]]^p[r[255&a]]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,a,u,s,r)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,l,f,d,p,i),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,a,u){for(var s=this._nRounds,c=e[t]^n[0],l=e[t+1]^n[1],f=e[t+2]^n[2],d=e[t+3]^n[3],p=4,h=1;h<s;h++){var v=r[c>>>24]^i[l>>>16&255]^o[f>>>8&255]^a[255&d]^n[p++],g=r[l>>>24]^i[f>>>16&255]^o[d>>>8&255]^a[255&c]^n[p++],m=r[f>>>24]^i[d>>>16&255]^o[c>>>8&255]^a[255&l]^n[p++];d=r[d>>>24]^i[c>>>16&255]^o[l>>>8&255]^a[255&f]^n[p++],c=v,l=g,f=m}v=(u[c>>>24]<<24|u[l>>>16&255]<<16|u[f>>>8&255]<<8|u[255&d])^n[p++],g=(u[l>>>24]<<24|u[f>>>16&255]<<16|u[d>>>8&255]<<8|u[255&c])^n[p++],m=(u[f>>>24]<<24|u[d>>>16&255]<<16|u[c>>>8&255]<<8|u[255&l])^n[p++],d=(u[d>>>24]<<24|u[c>>>16&255]<<16|u[l>>>8&255]<<8|u[255&f])^n[p++],e[t]=v,e[t+1]=g,e[t+2]=m,e[t+3]=d},keySize:8}),e.AES=t._createHelper(n)}(),c=c||function(e,t){var n={},r=n.lib={},i=function(){},o=r.Base={extend:function(e){i.prototype=this;var t=new i;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},a=r.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||s).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes;if(e=e.sigBytes,this.clamp(),r%4)for(var i=0;i<e;i++)t[r+i>>>2]|=(n[i>>>2]>>>24-i%4*8&255)<<24-(r+i)%4*8;else if(65535<n.length)for(i=0;i<e;i+=4)t[r+i>>>2]=n[i>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],r=0;r<t;r+=4)n.push(4294967296*e.random()|0);return new a.init(n,t)}}),u=n.enc={},s=u.Hex={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r<e;r++){var i=t[r>>>2]>>>24-r%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new a.init(n,t/2)}},c=u.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r<e;r++)n.push(String.fromCharCode(t[r>>>2]>>>24-r%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new a.init(n,t)}},l=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},f=r.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,u=i/(4*o);if(t=(u=t?e.ceil(u):e.max((0|u)-this._minBufferSize,0))*o,i=e.min(4*t,i),t){for(var s=0;s<t;s+=o)this._doProcessBlock(r,s);s=r.splice(0,t),n.sigBytes-=i}return new a.init(s,i)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});r.Hasher=f.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new d.HMAC.init(e,n).finalize(t)}}});var d=n.algo={};return n}(Math),function(e){for(var t=c,n=(i=t.lib).WordArray,r=i.Hasher,i=t.algo,o=[],a=[],u=function(e){return 4294967296*(e-(0|e))|0},s=2,l=0;64>l;){var f;e:{f=s;for(var d=e.sqrt(f),p=2;p<=d;p++)if(!(f%p)){f=!1;break e}f=!0}f&&(8>l&&(o[l]=u(e.pow(s,.5))),a[l]=u(e.pow(s,1/3)),l++),s++}var h=[];i=i.SHA256=r.extend({_doReset:function(){this._hash=new n.init(o.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],u=n[3],s=n[4],c=n[5],l=n[6],f=n[7],d=0;64>d;d++){if(16>d)h[d]=0|e[t+d];else{var p=h[d-15],v=h[d-2];h[d]=((p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3)+h[d-7]+((v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10)+h[d-16]}p=f+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&c^~s&l)+a[d]+h[d],v=((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+(r&i^r&o^i&o),f=l,l=c,c=s,s=u+p|0,u=o,o=i,i=r,r=p+v|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+u|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+f|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=e.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}}),t.SHA256=r._createHelper(i),t.HmacSHA256=r._createHmacHelper(i)}(Math),a=(o=c).enc.Utf8,o.algo.HMAC=o.lib.Base.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=a.parse(t));var n=e.blockSize,r=4*n;t.sigBytes>r&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),o=this._iKey=t.clone(),u=i.words,s=o.words,c=0;c<n;c++)u[c]^=1549556828,s[c]^=909522486;i.sigBytes=o.sigBytes=r,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher;return e=t.finalize(e),t.reset(),t.finalize(this._oKey.clone().concat(e))}}),c=c||function(e,t){var n={},r=n.lib={},i=function(){},o=r.Base={extend:function(e){i.prototype=this;var t=new i;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},a=r.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||s).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes;if(e=e.sigBytes,this.clamp(),r%4)for(var i=0;i<e;i++)t[r+i>>>2]|=(n[i>>>2]>>>24-i%4*8&255)<<24-(r+i)%4*8;else if(65535<n.length)for(i=0;i<e;i+=4)t[r+i>>>2]=n[i>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],r=0;r<t;r+=4)n.push(4294967296*e.random()|0);return new a.init(n,t)}}),u=n.enc={},s=u.Hex={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r<e;r++){var i=t[r>>>2]>>>24-r%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new a.init(n,t/2)}},c=u.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r<e;r++)n.push(String.fromCharCode(t[r>>>2]>>>24-r%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new a.init(n,t)}},l=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},f=r.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,u=i/(4*o);if(t=(u=t?e.ceil(u):e.max((0|u)-this._minBufferSize,0))*o,i=e.min(4*t,i),t){for(var s=0;s<t;s+=o)this._doProcessBlock(r,s);s=r.splice(0,t),n.sigBytes-=i}return new a.init(s,i)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});r.Hasher=f.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new d.HMAC.init(e,n).finalize(t)}}});var d=n.algo={};return n}(Math),function(e){var t,n=(t=c).lib,r=n.Base,i=n.WordArray;(t=t.x64={}).Word=r.extend({init:function(e,t){this.high=e,this.low=t}}),t.WordArray=r.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r<t;r++){var o=e[r];n.push(o.high),n.push(o.low)}return i.create(n,this.sigBytes)},clone:function(){for(var e=r.clone.call(this),t=e.words=this.words.slice(0),n=t.length,i=0;i<n;i++)t[i]=t[i].clone();return e}})}(),function(){function e(){return r.create.apply(r,arguments)}for(var t=c,n=t.lib.Hasher,r=(o=t.x64).Word,i=o.WordArray,o=t.algo,a=[e(1116352408,3609767458),e(1899447441,602891725),e(3049323471,3964484399),e(3921009573,2173295548),e(961987163,4081628472),e(1508970993,3053834265),e(2453635748,2937671579),e(2870763221,3664609560),e(3624381080,2734883394),e(310598401,1164996542),e(607225278,1323610764),e(1426881987,3590304994),e(1925078388,4068182383),e(2162078206,991336113),e(2614888103,633803317),e(3248222580,3479774868),e(3835390401,2666613458),e(4022224774,944711139),e(264347078,2341262773),e(604807628,2007800933),e(770255983,1495990901),e(1249150122,1856431235),e(1555081692,3175218132),e(1996064986,2198950837),e(2554220882,3999719339),e(2821834349,766784016),e(2952996808,2566594879),e(3210313671,3203337956),e(3336571891,1034457026),e(3584528711,2466948901),e(113926993,3758326383),e(338241895,168717936),e(666307205,1188179964),e(773529912,1546045734),e(1294757372,1522805485),e(1396182291,2643833823),e(1695183700,2343527390),e(1986661051,1014477480),e(2177026350,1206759142),e(2456956037,344077627),e(2730485921,1290863460),e(2820302411,3158454273),e(3259730800,3505952657),e(3345764771,106217008),e(3516065817,3606008344),e(3600352804,1432725776),e(4094571909,1467031594),e(275423344,851169720),e(430227734,3100823752),e(506948616,1363258195),e(659060556,3750685593),e(883997877,3785050280),e(958139571,3318307427),e(1322822218,3812723403),e(1537002063,2003034995),e(1747873779,3602036899),e(1955562222,1575990012),e(2024104815,1125592928),e(2227730452,2716904306),e(2361852424,442776044),e(2428436474,593698344),e(2756734187,3733110249),e(3204031479,2999351573),e(3329325298,3815920427),e(3391569614,3928383900),e(3515267271,566280711),e(3940187606,3454069534),e(4118630271,4000239992),e(116418474,1914138554),e(174292421,2731055270),e(289380356,3203993006),e(460393269,320620315),e(685471733,587496836),e(852142971,1086792851),e(1017036298,365543100),e(1126000580,2618297676),e(1288033470,3409855158),e(1501505948,4234509866),e(1607167915,987167468),e(1816402316,1246189591)],u=[],s=0;80>s;s++)u[s]=e();o=o.SHA512=n.extend({_doReset:function(){this._hash=new i.init([new r.init(1779033703,4089235720),new r.init(3144134277,2227873595),new r.init(1013904242,4271175723),new r.init(2773480762,1595750129),new r.init(1359893119,2917565137),new r.init(2600822924,725511199),new r.init(528734635,4215389547),new r.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=(f=this._hash.words)[0],r=f[1],i=f[2],o=f[3],s=f[4],c=f[5],l=f[6],f=f[7],d=n.high,p=n.low,h=r.high,v=r.low,g=i.high,m=i.low,y=o.high,b=o.low,w=s.high,x=s.low,k=c.high,S=c.low,_=l.high,E=l.low,C=f.high,I=f.low,O=d,A=p,D=h,P=v,T=g,N=m,M=y,R=b,L=w,j=x,F=k,B=S,z=_,U=E,H=C,W=I,V=0;80>V;V++){var G=u[V];if(16>V)var K=G.high=0|e[t+2*V],q=G.low=0|e[t+2*V+1];else{K=((q=(K=u[V-15]).high)>>>1|($=K.low)<<31)^(q>>>8|$<<24)^q>>>7;var $=($>>>1|q<<31)^($>>>8|q<<24)^($>>>7|q<<25),J=((q=(J=u[V-2]).high)>>>19|(Y=J.low)<<13)^(q<<3|Y>>>29)^q>>>6,Y=(Y>>>19|q<<13)^(Y<<3|q>>>29)^(Y>>>6|q<<26),Z=(q=u[V-7]).high,X=(Q=u[V-16]).high,Q=Q.low;K=(K=(K=K+Z+((q=$+q.low)>>>0<$>>>0?1:0))+J+((q+=Y)>>>0<Y>>>0?1:0))+X+((q+=Q)>>>0<Q>>>0?1:0),G.high=K,G.low=q}Z=L&F^~L&z,Q=j&B^~j&U,G=O&D^O&T^D&T;var ee=A&P^A&N^P&N,te=($=(O>>>28|A<<4)^(O<<30|A>>>2)^(O<<25|A>>>7),J=(A>>>28|O<<4)^(A<<30|O>>>2)^(A<<25|O>>>7),(Y=a[V]).high),ne=Y.low;X=H+((L>>>14|j<<18)^(L>>>18|j<<14)^(L<<23|j>>>9))+((Y=W+((j>>>14|L<<18)^(j>>>18|L<<14)^(j<<23|L>>>9)))>>>0<W>>>0?1:0),H=z,W=U,z=F,U=B,F=L,B=j,L=M+(X=(X=(X=X+Z+((Y+=Q)>>>0<Q>>>0?1:0))+te+((Y+=ne)>>>0<ne>>>0?1:0))+K+((Y+=q)>>>0<q>>>0?1:0))+((j=R+Y|0)>>>0<R>>>0?1:0)|0,M=T,R=N,T=D,N=P,D=O,P=A,O=X+(G=$+G+((q=J+ee)>>>0<J>>>0?1:0))+((A=Y+q|0)>>>0<Y>>>0?1:0)|0}p=n.low=p+A,n.high=d+O+(p>>>0<A>>>0?1:0),v=r.low=v+P,r.high=h+D+(v>>>0<P>>>0?1:0),m=i.low=m+N,i.high=g+T+(m>>>0<N>>>0?1:0),b=o.low=b+R,o.high=y+M+(b>>>0<R>>>0?1:0),x=s.low=x+j,s.high=w+L+(x>>>0<j>>>0?1:0),S=c.low=S+B,c.high=k+F+(S>>>0<B>>>0?1:0),E=l.low=E+U,l.high=_+z+(E>>>0<U>>>0?1:0),I=f.low=I+W,f.high=C+H+(I>>>0<W>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32}),t.SHA512=n._createHelper(o),t.HmacSHA512=n._createHmacHelper(o)}(),s=(u=c).enc.Utf8,u.algo.HMAC=u.lib.Base.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=s.parse(t));var n=e.blockSize,r=4*n;t.sigBytes>r&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),o=this._iKey=t.clone(),a=i.words,u=o.words,c=0;c<n;c++)a[c]^=1549556828,u[c]^=909522486;i.sigBytes=o.sigBytes=r,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher;return e=t.finalize(e),t.reset(),t.finalize(this._oKey.clone().concat(e))}}),c=c||function(e,t){var n={},r=n.lib={},i=function(){},o=r.Base={extend:function(e){i.prototype=this;var t=new i;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},a=r.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||s).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes;if(e=e.sigBytes,this.clamp(),r%4)for(var i=0;i<e;i++)t[r+i>>>2]|=(n[i>>>2]>>>24-i%4*8&255)<<24-(r+i)%4*8;else if(65535<n.length)for(i=0;i<e;i+=4)t[r+i>>>2]=n[i>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],r=0;r<t;r+=4)n.push(4294967296*e.random()|0);return new a.init(n,t)}}),u=n.enc={},s=u.Hex={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r<e;r++){var i=t[r>>>2]>>>24-r%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new a.init(n,t/2)}},c=u.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r<e;r++)n.push(String.fromCharCode(t[r>>>2]>>>24-r%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new a.init(n,t)}},l=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},f=r.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,u=i/(4*o);if(t=(u=t?e.ceil(u):e.max((0|u)-this._minBufferSize,0))*o,i=e.min(4*t,i),t){for(var s=0;s<t;s+=o)this._doProcessBlock(r,s);s=r.splice(0,t),n.sigBytes-=i}return new a.init(s,i)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});r.Hasher=f.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new d.HMAC.init(e,n).finalize(t)}}});var d=n.algo={};return n}(Math),function(){var e=c,t=(i=e.lib).WordArray,n=i.Hasher,r=[],i=e.algo.SHA1=n.extend({_doReset:function(){this._hash=new t.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,i=n[0],o=n[1],a=n[2],u=n[3],s=n[4],c=0;80>c;c++){if(16>c)r[c]=0|e[t+c];else{var l=r[c-3]^r[c-8]^r[c-14]^r[c-16];r[c]=l<<1|l>>>31}l=(i<<5|i>>>27)+s+r[c],l=20>c?l+(1518500249+(o&a|~o&u)):40>c?l+(1859775393+(o^a^u)):60>c?l+((o&a|o&u|a&u)-1894007588):l+((o^a^u)-899497514),s=u,u=a,a=o<<30|o>>>2,o=i,i=l}n[0]=n[0]+i|0,n[1]=n[1]+o|0,n[2]=n[2]+a|0,n[3]=n[3]+u|0,n[4]=n[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA1=n._createHelper(i),e.HmacSHA1=n._createHmacHelper(i)}(),function(){var e=c,t=e.enc.Utf8;e.algo.HMAC=e.lib.Base.extend({init:function(e,n){e=this._hasher=new e.init,"string"==typeof n&&(n=t.parse(n));var r=e.blockSize,i=4*r;n.sigBytes>i&&(n=e.finalize(n)),n.clamp();for(var o=this._oKey=n.clone(),a=this._iKey=n.clone(),u=o.words,s=a.words,c=0;c<r;c++)u[c]^=1549556828,s[c]^=909522486;o.sigBytes=a.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher;return e=t.finalize(e),t.reset(),t.finalize(this._oKey.clone().concat(e))}})}(),function(){var e,t=c,n=(e=t.lib).Base,r=e.WordArray,i=(e=t.algo).HMAC,o=e.PBKDF2=n.extend({cfg:n.extend({keySize:4,hasher:e.SHA1,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){var n=this.cfg,o=i.create(n.hasher,e),a=r.create(),u=r.create([1]),s=a.words,c=u.words,l=n.keySize;for(n=n.iterations;s.length<l;){var f=o.update(t).finalize(u);o.reset();for(var d=f.words,p=d.length,h=f,v=1;v<n;v++){h=o.finalize(h),o.reset();for(var g=h.words,m=0;m<p;m++)d[m]^=g[m]}a.concat(f),c[0]++}return a.sigBytes=4*l,a}});t.PBKDF2=function(e,t,n){return o.create(n).compute(e,t)}}(),c=c||function(e,t){var n={},r=n.lib={},i=function(){},o=r.Base={extend:function(e){i.prototype=this;var t=new i;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},a=r.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||s).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes;if(e=e.sigBytes,this.clamp(),r%4)for(var i=0;i<e;i++)t[r+i>>>2]|=(n[i>>>2]>>>24-i%4*8&255)<<24-(r+i)%4*8;else if(65535<n.length)for(i=0;i<e;i+=4)t[r+i>>>2]=n[i>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],r=0;r<t;r+=4)n.push(4294967296*e.random()|0);return new a.init(n,t)}}),u=n.enc={},s=u.Hex={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r<e;r++){var i=t[r>>>2]>>>24-r%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new a.init(n,t/2)}},c=u.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r<e;r++)n.push(String.fromCharCode(t[r>>>2]>>>24-r%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new a.init(n,t)}},l=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},f=r.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,u=i/(4*o);if(t=(u=t?e.ceil(u):e.max((0|u)-this._minBufferSize,0))*o,i=e.min(4*t,i),t){for(var s=0;s<t;s+=o)this._doProcessBlock(r,s);s=r.splice(0,t),n.sigBytes-=i}return new a.init(s,i)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});r.Hasher=f.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new d.HMAC.init(e,n).finalize(t)}}});var d=n.algo={};return n}(Math),function(){var e=c,t=(i=e.lib).WordArray,n=i.Hasher,r=[],i=e.algo.SHA1=n.extend({_doReset:function(){this._hash=new t.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,i=n[0],o=n[1],a=n[2],u=n[3],s=n[4],c=0;80>c;c++){if(16>c)r[c]=0|e[t+c];else{var l=r[c-3]^r[c-8]^r[c-14]^r[c-16];r[c]=l<<1|l>>>31}l=(i<<5|i>>>27)+s+r[c],l=20>c?l+(1518500249+(o&a|~o&u)):40>c?l+(1859775393+(o^a^u)):60>c?l+((o&a|o&u|a&u)-1894007588):l+((o^a^u)-899497514),s=u,u=a,a=o<<30|o>>>2,o=i,i=l}n[0]=n[0]+i|0,n[1]=n[1]+o|0,n[2]=n[2]+a|0,n[3]=n[3]+u|0,n[4]=n[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA1=n._createHelper(i),e.HmacSHA1=n._createHmacHelper(i)}(),Object.defineProperty(i,"__esModule",{value:!0}),i.StandardFile=i.SFItemTransformer=i.SFCryptoWeb=i.SFCryptoJS=i.SFAbstractCrypto=i.SFItemHistoryEntry=i.SFItemHistory=i.SFHistorySession=i.SFPrivileges=i.SFPredicate=i.SFItemParams=i.SFItem=i.SFSyncManager=i.SFStorageManager=i.SFSingletonManager=i.SFSessionHistoryManager=i.SFPrivilegesManager=i.SFModelManager=i.SFMigrationManager=i.SFHttpManager=i.SFAuthManager=i.SFAlertManager=void 0;var x=function(){function e(){y(this,e)}var t,n;return w(e,[{key:"alert",value:(n=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){window.alert(t.text),e()})));case 1:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)})},{key:"confirm",value:(t=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){window.confirm(t.text)?e():n()})));case 1:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}]),e}();i.SFAlertManager=x;var k=function(){function e(t,n,r,i){y(this,e),e.DidSignOutEvent="DidSignOutEvent",e.WillSignInEvent="WillSignInEvent",e.DidSignInEvent="DidSignInEvent",this.httpManager=n,this.storageManager=t,this.alertManager=r||new x,this.$timeout=i||setTimeout.bind(window),this.eventHandlers=[]}var t,n,i,o,a,u,s,c,l,f;return w(e,[{key:"addEventHandler",value:function(e){return this.eventHandlers.push(e),e}},{key:"removeEventHandler",value:function(e){_.pull(this.eventHandlers,e)}},{key:"notifyEvent",value:function(e,t){var n=!0,r=!1,i=void 0;try{for(var o,a=this.eventHandlers[Symbol.iterator]();!(n=(o=a.next()).done);n=!0)(0,o.value)(e,t||{})}catch(e){r=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}}},{key:"saveKeys",value:(f=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._keys=t,e.next=3,this.storageManager.setItem("mk",t.mk);case 3:return e.next=5,this.storageManager.setItem("ak",t.ak);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return f.apply(this,arguments)})},{key:"signout",value:(l=m(r().mark((function t(n){var i=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._keys=null,this._authParams=null,!n){t.next=6;break}return t.abrupt("return",this.storageManager.clearAllData().then((function(){i.notifyEvent(e.DidSignOutEvent)})));case 6:this.notifyEvent(e.DidSignOutEvent);case 7:case"end":return t.stop()}}),t,this)}))),function(e){return l.apply(this,arguments)})},{key:"keys",value:(c=m(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._keys){e.next=11;break}return e.next=3,this.storageManager.getItem("mk");case 3:if(t=e.sent){e.next=6;break}return e.abrupt("return",null);case 6:return e.t0=t,e.next=9,this.storageManager.getItem("ak");case 9:e.t1=e.sent,this._keys={mk:e.t0,ak:e.t1};case 11:return e.abrupt("return",this._keys);case 12:case"end":return e.stop()}}),e,this)}))),function(){return c.apply(this,arguments)})},{key:"getAuthParams",value:(s=m(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._authParams){e.next=5;break}return e.next=3,this.storageManager.getItem("auth_params");case 3:t=e.sent,this._authParams=JSON.parse(t);case 5:if(!this._authParams||this._authParams.version){e.next=9;break}return e.next=8,this.defaultProtocolVersion();case 8:this._authParams.version=e.sent;case 9:return e.abrupt("return",this._authParams);case 10:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"defaultProtocolVersion",value:(u=m(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.keys();case 2:if(!(t=e.sent)||!t.ak){e.next=7;break}return e.abrupt("return","002");case 7:return e.abrupt("return","001");case 8:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"protocolVersion",value:(a=m(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getAuthParams();case 2:if(!(t=e.sent)||!t.version){e.next=5;break}return e.abrupt("return",t.version);case 5:return e.abrupt("return",this.defaultProtocolVersion());case 6:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"getAuthParamsForEmail",value:(o=m(r().mark((function e(t,n,i){var o,a=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(o=_.merge({email:n},i)).api=E.getApiVersion(),e.abrupt("return",new Promise((function(e,n){var r=t+"/auth/params";a.httpManager.getAbsolute(r,o,(function(t){e(t)}),(function(t){console.error("Error getting auth params",t),"object"!==v(t)&&(t={error:{message:"A server error occurred while trying to sign in. Please try again."}}),e(t)}))})));case 3:case"end":return e.stop()}}),e)}))),function(e,t,n){return o.apply(this,arguments)})},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}},{key:"isLocked",value:function(){return 1==this.locked}},{key:"unlockAndResolve",value:function(e,t){this.unlock(),e(t)}},{key:"login",value:(i=m(r().mark((function t(n,i,o,a,u){var s=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=m(r().mark((function t(c,l){var f,d,p,h,g,y,b,w,x,k;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.keys();case 2:if(null==t.sent){t.next=6;break}return c({error:{message:"Cannot log in because already signed in."}}),t.abrupt("return");case 6:if(!s.isLocked()){t.next=9;break}return c({error:{message:"Login already in progress."}}),t.abrupt("return");case 9:return s.lock(),s.notifyEvent(e.WillSignInEvent),t.next=13,s.getAuthParamsForEmail(n,i,u);case 13:if((f=t.sent).identifier=i,!f.error){t.next=18;break}return s.unlockAndResolve(c,f),t.abrupt("return");case 18:if(f&&f.pw_cost){t.next=21;break}return s.unlockAndResolve(c,{error:{message:"Invalid email or password."}}),t.abrupt("return");case 21:if(SFJS.supportedVersions().includes(f.version)){t.next=25;break}return d=SFJS.isVersionNewerThanLibraryVersion(f.version)?"This version of the application does not support your newer account type. Please upgrade to the latest version of Standard Notes to sign in.":"The protocol version associated with your account is outdated and no longer supported by this application. Please visit standardnotes.org/help/security for more information.",s.unlockAndResolve(c,{error:{message:d}}),t.abrupt("return");case 25:if(!SFJS.isProtocolVersionOutdated(f.version)){t.next=32;break}return p="The encryption version for your account, ".concat(f.version,", is outdated and requires upgrade. You may proceed with login, but are advised to perform a security update using the web or desktop application. Please visit standardnotes.org/help/security for more information."),h=!1,t.next=30,s.alertManager.confirm({title:"Update Needed",text:p,confirmButtonText:"Sign In"}).catch((function(){s.unlockAndResolve(c,{error:{}}),h=!0}));case 30:if(!h){t.next=32;break}return t.abrupt("return");case 32:if(SFJS.supportsPasswordDerivationCost(f.pw_cost)){t.next=36;break}return s.unlockAndResolve(c,{error:{message:"Your account was created on a platform with higher security capabilities than this browser supports. If we attempted to generate your login keys here, it would take hours. Please use a browser with more up to date security capabilities, like Google Chrome or Firefox, to log in."}}),t.abrupt("return");case 36:if(g=SFJS.costMinimumForVersion(f.version),!(f.pw_cost<g)){t.next=41;break}return s.unlockAndResolve(c,{error:{message:"Unable to login due to insecure password parameters. Please visit standardnotes.org/help/security for more information."}}),t.abrupt("return");case 41:if(!a){t.next=47;break}if(y=SFJS.version(),f.version===y){t.next=47;break}return b="Strict sign in refused server sign in parameters. The latest security version is ".concat(y,", but your account is reported to have version ").concat(f.version,". If you'd like to proceed with sign in anyway, please disable strict sign in and try again."),s.unlockAndResolve(c,{error:{message:b}}),t.abrupt("return");case 47:return t.next=49,SFJS.crypto.computeEncryptionKeysForUser(o,f);case 49:w=t.sent,x=n+"/auth/sign_in",(k=_.merge({password:w.pw,email:i},u)).api=E.getApiVersion(),s.httpManager.postAbsolute(x,k,function(){var t=m(r().mark((function t(o){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.handleAuthResponse(o,i,n,f,w);case 2:s.notifyEvent(e.DidSignInEvent),s.$timeout((function(){return s.unlockAndResolve(c,o)}));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),(function(e){console.error("Error logging in",e),"object"!==v(e)&&(e={error:{message:"A server error occurred while trying to sign in. Please try again."}}),s.$timeout((function(){return s.unlockAndResolve(c,e)}))}));case 54:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)}))),function(e,t,n,r,o){return i.apply(this,arguments)})},{key:"register",value:function(e,t,n){var i=this;return new Promise(function(){var o=m(r().mark((function o(a,u){var s,c,l,f,d,p;return r().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(!i.isLocked()){o.next=3;break}return a({error:{message:"Register already in progress."}}),o.abrupt("return");case 3:if(!(n.length<8)){o.next=8;break}return s="Your password must be at least ".concat(8," characters in length. For your security, please choose a longer password or, ideally, a passphrase, and try again."),a({error:{message:s}}),o.abrupt("return");case 8:return i.lock(),o.next=11,SFJS.crypto.generateInitialKeysAndAuthParamsForUser(t,n);case 11:c=o.sent,l=c.keys,f=c.authParams,d=e+"/auth",(p=_.merge({password:l.pw,email:t},f)).api=E.getApiVersion(),i.httpManager.postAbsolute(d,p,function(){var n=m(r().mark((function n(o){return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,i.handleAuthResponse(o,t,e,f,l);case 2:i.unlockAndResolve(a,o);case 3:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),(function(e){console.error("Registration error",e),"object"!==v(e)&&(e={error:{message:"A server error occurred while trying to register. Please try again."}}),i.unlockAndResolve(a,e)}));case 18:case"end":return o.stop()}}),o)})));return function(e,t){return o.apply(this,arguments)}}())}},{key:"changePassword",value:(n=m(r().mark((function e(t,n,i,o,a){var u=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=m(r().mark((function e(s,c){var l,f,d;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!u.isLocked()){e.next=3;break}return s({error:{message:"Change password already in progress."}}),e.abrupt("return");case 3:u.lock(),l=o.pw,f=t+"/auth/change_pw",(d=_.merge({new_password:l,current_password:i},a)).api=E.getApiVersion(),u.httpManager.postAuthenticatedAbsolute(f,d,function(){var e=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u.handleAuthResponse(t,n,null,a,o);case 2:u.unlockAndResolve(s,t);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),(function(e){"object"!==v(e)&&(e={error:{message:"Something went wrong while changing your password. Your password was not changed. Please try again."}}),u.unlockAndResolve(s,e)}));case 9:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e,t,r,i,o){return n.apply(this,arguments)})},{key:"handleAuthResponse",value:(t=m(r().mark((function e(t,n,i,o,a){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!i){e.next=3;break}return e.next=3,this.storageManager.setItem("server",i);case 3:return this._authParams=o,e.next=6,this.storageManager.setItem("auth_params",JSON.stringify(o));case 6:return e.next=8,this.storageManager.setItem("jwt",t.token);case 8:return e.abrupt("return",this.saveKeys(a));case 9:case"end":return e.stop()}}),e,this)}))),function(e,n,r,i,o){return t.apply(this,arguments)})}]),e}();i.SFAuthManager=k;var S="undefined"!=typeof window?window:void 0!==e?e:null,E=function(){function e(t,n){y(this,e),this.$timeout=t||setTimeout.bind(S)}var t,n,i,o,a,u;return w(e,null,[{key:"getApiVersion",value:function(){return"20190520"}}]),w(e,[{key:"setJWTRequestHandler",value:function(e){this.jwtRequestHandler=e}},{key:"setAuthHeadersForRequest",value:(u=m(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.jwtRequestHandler();case 2:(n=e.sent)&&t.setRequestHeader("Authorization","Bearer "+n);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"postAbsolute",value:(a=m(r().mark((function e(t,n,i,o){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.httpRequest("post",t,n,i,o));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t,n,r){return a.apply(this,arguments)})},{key:"postAuthenticatedAbsolute",value:(o=m(r().mark((function e(t,n,i,o){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.httpRequest("post",t,n,i,o,!0));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t,n,r){return o.apply(this,arguments)})},{key:"patchAbsolute",value:(i=m(r().mark((function e(t,n,i,o){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.httpRequest("patch",t,n,i,o));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t,n,r){return i.apply(this,arguments)})},{key:"getAbsolute",value:(n=m(r().mark((function e(t,n,i,o){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.httpRequest("get",t,n,i,o));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t,r,i){return n.apply(this,arguments)})},{key:"httpRequest",value:(t=m(r().mark((function e(t,n,i,o,a){var u,s=this,c=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=c.length>5&&void 0!==c[5]&&c[5],e.abrupt("return",new Promise(function(){var e=m(r().mark((function e(c,l){var f;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((f=new XMLHttpRequest).onreadystatechange=function(){if(4==f.readyState){var e=f.responseText;if(e)try{e=JSON.parse(e)}catch(e){}f.status>=200&&f.status<=299?s.$timeout((function(){o(e),c(e)})):(console.error("Request error:",e),s.$timeout((function(){a(e,f.status),l(e)})))}},"get"==t&&Object.keys(i).length>0&&(n=s.urlForUrlAndParams(n,i)),f.open(t,n,!0),f.setRequestHeader("Content-type","application/json"),!u){e.next=8;break}return e.next=8,s.setAuthHeadersForRequest(f);case 8:"post"==t||"patch"==t?f.send(JSON.stringify(i)):f.send();case 9:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}}),e)}))),function(e,n,r,i,o){return t.apply(this,arguments)})},{key:"urlForUrlAndParams",value:function(e,t){var n=Object.keys(t).map((function(e){return e+"="+encodeURIComponent(t[e])})).join("&");return e.includes("?")?e+"&"+n:e+"?"+n}}]),e}();i.SFHttpManager=E;var C=function(){function e(t,n,i,o){var a=this;y(this,e),this.modelManager=t,this.syncManager=n,this.storageManager=i,this.completionHandlers=[],this.loadMigrations();var u=!1,s=o.addEventHandler((function(e){e==k.DidSignInEvent&&(u=!0)}));this.receivedLocalDataEvent=n.initialDataLoaded(),this.syncManager.addEventHandler(function(){var e=m(r().mark((function e(t,n){var i,c,l,f,d,p,h,v,g;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c="sync:completed"==t,!(i="local-data-loaded"==t)&&!c){e.next=40;break}if(i?a.receivedLocalDataEvent=!0:c&&(a.receivedSyncCompletedEvent=!0),!a.receivedLocalDataEvent||!a.receivedSyncCompletedEvent){e.next=40;break}if(!u){e.next=39;break}return u=!1,o.removeEventHandler(s),e.next=10,a.getCompletedMigrations();case 10:l=e.sent.slice(),f=!0,d=!1,p=void 0,e.prev=14,h=l[Symbol.iterator]();case 16:if(f=(v=h.next()).done){e.next=25;break}return g=v.value,e.next=20,a.migrationForEncodedName(g);case 20:e.sent.runOnlyOnce||_.pull(a._completed,g);case 22:f=!0,e.next=16;break;case 25:e.next=31;break;case 27:e.prev=27,e.t0=e.catch(14),d=!0,p=e.t0;case 31:e.prev=31,e.prev=32,f||null==h.return||h.return();case 34:if(e.prev=34,!d){e.next=37;break}throw p;case 37:return e.finish(34);case 38:return e.finish(31);case 39:a.runPendingMigrations();case 40:case"end":return e.stop()}}),e,null,[[14,27,31,39],[32,,34,38]])})));return function(t,n){return e.apply(this,arguments)}}())}var t,n,i,o,a,u,s,c;return w(e,[{key:"addCompletionHandler",value:function(e){this.completionHandlers.push(e)}},{key:"removeCompletionHandler",value:function(e){_.pull(this.completionHandlers,e)}},{key:"migrationForEncodedName",value:(c=m(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.decode(t);case 2:return n=e.sent,e.abrupt("return",this.migrations.find((function(e){return e.name==n})));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"loadMigrations",value:function(){this.migrations=this.registeredMigrations()}},{key:"registeredMigrations",value:function(){}},{key:"runPendingMigrations",value:(s=m(r().mark((function e(){var t,n,i,o,a,u,s,c,l,f,d,p,h,v,g,m,y,b,w,x,k,S,_,E,C,I,O,A;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getPendingMigrations();case 2:for(t=e.sent,n=!0,i=!1,o=void 0,e.prev=6,a=t[Symbol.iterator]();!(n=(u=a.next()).done);n=!0)(s=u.value).items=[];e.next=14;break;case 10:e.prev=10,e.t0=e.catch(6),i=!0,o=e.t0;case 14:e.prev=14,e.prev=15,n||null==a.return||a.return();case 17:if(e.prev=17,!i){e.next=20;break}throw o;case 20:return e.finish(17);case 21:return e.finish(14);case 22:c=!0,l=!1,f=void 0,e.prev=25,d=this.modelManager.allNondummyItems[Symbol.iterator]();case 27:if(c=(p=d.next()).done){e.next=51;break}for(h=p.value,v=!0,g=!1,m=void 0,e.prev=32,y=t[Symbol.iterator]();!(v=(b=y.next()).done);v=!0)s=b.value,h.content_type==s.content_type&&s.items.push(h);e.next=40;break;case 36:e.prev=36,e.t1=e.catch(32),g=!0,m=e.t1;case 40:e.prev=40,e.prev=41,v||null==y.return||y.return();case 43:if(e.prev=43,!g){e.next=46;break}throw m;case 46:return e.finish(43);case 47:return e.finish(40);case 48:c=!0,e.next=27;break;case 51:e.next=57;break;case 53:e.prev=53,e.t2=e.catch(25),l=!0,f=e.t2;case 57:e.prev=57,e.prev=58,c||null==d.return||d.return();case 60:if(e.prev=60,!l){e.next=63;break}throw f;case 63:return e.finish(60);case 64:return e.finish(57);case 65:w=!0,x=!1,k=void 0,e.prev=68,S=t[Symbol.iterator]();case 70:if(w=(_=S.next()).done){e.next=81;break}if(!((s=_.value).items&&s.items.length>0||s.customHandler)){e.next=77;break}return e.next=75,this.runMigration(s,s.items);case 75:e.next=78;break;case 77:this.markMigrationCompleted(s);case 78:w=!0,e.next=70;break;case 81:e.next=87;break;case 83:e.prev=83,e.t3=e.catch(68),x=!0,k=e.t3;case 87:e.prev=87,e.prev=88,w||null==S.return||S.return();case 90:if(e.prev=90,!x){e.next=93;break}throw k;case 93:return e.finish(90);case 94:return e.finish(87);case 95:for(E=!0,C=!1,I=void 0,e.prev=98,O=this.completionHandlers[Symbol.iterator]();!(E=(A=O.next()).done);E=!0)(0,A.value)();e.next=106;break;case 102:e.prev=102,e.t4=e.catch(98),C=!0,I=e.t4;case 106:e.prev=106,e.prev=107,E||null==O.return||O.return();case 109:if(e.prev=109,!C){e.next=112;break}throw I;case 112:return e.finish(109);case 113:return e.finish(106);case 114:case"end":return e.stop()}}),e,this,[[6,10,14,22],[15,,17,21],[25,53,57,65],[32,36,40,48],[41,,43,47],[58,,60,64],[68,83,87,95],[88,,90,94],[98,102,106,114],[107,,109,113]])}))),function(){return s.apply(this,arguments)})},{key:"encode",value:(u=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",window.btoa(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return u.apply(this,arguments)})},{key:"decode",value:(a=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",window.atob(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return a.apply(this,arguments)})},{key:"getCompletedMigrations",value:(o=m(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._completed){e.next=5;break}return e.next=3,this.storageManager.getItem("migrations");case 3:t=e.sent,this._completed=t?JSON.parse(t):[];case 5:return e.abrupt("return",this._completed);case 6:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"getPendingMigrations",value:(i=m(r().mark((function e(){var t,n,i,o,a,u,s,c;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getCompletedMigrations();case 2:t=e.sent,n=[],i=!0,o=!1,a=void 0,e.prev=7,u=this.migrations[Symbol.iterator]();case 9:if(i=(s=u.next()).done){e.next=22;break}return c=s.value,e.t0=t,e.next=14,this.encode(c.name);case 14:if(e.t1=e.sent,e.t2=e.t0.indexOf.call(e.t0,e.t1),e.t3=-1,e.t2!=e.t3){e.next=19;break}n.push(c);case 19:i=!0,e.next=9;break;case 22:e.next=28;break;case 24:e.prev=24,e.t4=e.catch(7),o=!0,a=e.t4;case 28:e.prev=28,e.prev=29,i||null==u.return||u.return();case 31:if(e.prev=31,!o){e.next=34;break}throw a;case 34:return e.finish(31);case 35:return e.finish(28);case 36:return e.abrupt("return",n);case 37:case"end":return e.stop()}}),e,this,[[7,24,28,36],[29,,31,35]])}))),function(){return i.apply(this,arguments)})},{key:"markMigrationCompleted",value:(n=m(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getCompletedMigrations();case 2:return n=e.sent,e.t0=n,e.next=6,this.encode(t.name);case 6:e.t1=e.sent,e.t0.push.call(e.t0,e.t1),this.storageManager.setItem("migrations",JSON.stringify(n)),t.running=!1;case 10:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"runMigration",value:(t=m(r().mark((function e(t,n){var i=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.running){e.next=2;break}return e.abrupt("return");case 2:if(console.log("Running migration:",t.name),t.running=!0,!t.customHandler){e.next=8;break}return e.abrupt("return",t.customHandler().then((function(){i.markMigrationCompleted(t)})));case 8:return e.abrupt("return",t.handler(n).then((function(){i.markMigrationCompleted(t)})));case 9:case"end":return e.stop()}}),e)}))),function(e,n){return t.apply(this,arguments)})}]),e}();i.SFMigrationManager=C;var I=function(){function e(t){y(this,e),e.MappingSourceRemoteRetrieved="MappingSourceRemoteRetrieved",e.MappingSourceRemoteSaved="MappingSourceRemoteSaved",e.MappingSourceLocalSaved="MappingSourceLocalSaved",e.MappingSourceLocalRetrieved="MappingSourceLocalRetrieved",e.MappingSourceLocalDirtied="MappingSourceLocalDirtied",e.MappingSourceComponentRetrieved="MappingSourceComponentRetrieved",e.MappingSourceDesktopInstalled="MappingSourceDesktopInstalled",e.MappingSourceRemoteActionRetrieved="MappingSourceRemoteActionRetrieved",e.MappingSourceFileImport="MappingSourceFileImport",e.isMappingSourceRetrieved=function(t){return[e.MappingSourceRemoteRetrieved,e.MappingSourceComponentRetrieved,e.MappingSourceRemoteActionRetrieved].includes(t)},this.$timeout=t||setTimeout.bind(window),this.itemSyncObservers=[],this.items=[],this.itemsHash={},this.missedReferences={},this.uuidChangeObservers=[]}var t,n,i,o,a,u,s,c,l,f,d,p;return w(e,[{key:"handleSignout",value:function(){this.items.length=0,this.itemsHash={},this.missedReferences={}}},{key:"addModelUuidChangeObserver",value:function(e,t){this.uuidChangeObservers.push({id:e,callback:t})}},{key:"notifyObserversOfUuidChange",value:function(e,t){var n=!0,r=!1,i=void 0;try{for(var o,a=this.uuidChangeObservers[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var u=o.value;try{u.callback(e,t)}catch(e){console.error("Notify observers of uuid change exception:",e)}}}catch(e){r=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}}},{key:"alternateUUIDForItem",value:(p=m(r().mark((function t(n){var i,o,a,u,s,c,l;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.createItem(n),t.next=3,SFJS.crypto.generateUUID();case 3:for(i.uuid=t.sent,i.informReferencesOfUUIDChange(n.uuid,i.uuid),this.informModelsOfUUIDChangeForItem(i,n.uuid,i.uuid),o=!0,a=!1,u=void 0,t.prev=9,s=n.referencingObjects[Symbol.iterator]();!(o=(c=s.next()).done);o=!0)(l=c.value).setIsNoLongerBeingReferencedBy(n),n.setIsNoLongerBeingReferencedBy(l),l.addItemAsRelationship(i);t.next=17;break;case 13:t.prev=13,t.t0=t.catch(9),a=!0,u=t.t0;case 17:t.prev=17,t.prev=18,o||null==s.return||s.return();case 20:if(t.prev=20,!a){t.next=23;break}throw u;case 23:return t.finish(20);case 24:return t.finish(17);case 25:return this.setItemsDirty(n.referencingObjects,!0),this.resolveReferencesForItem(i),this.loggingEnabled&&console.log(n.uuid,"--\x3e",i.uuid),n.deleted=!0,n.content.references=[],this.setItemDirty(n,!1,!1,e.MappingSourceLocalSaved),t.next=33,this.mapResponseItemsToLocalModels([n],e.MappingSourceLocalSaved);case 33:return this.addItem(i),this.setItemDirty(i,!0,!0,e.MappingSourceLocalSaved),this.notifyObserversOfUuidChange(n,i),t.abrupt("return",i);case 37:case"end":return t.stop()}}),t,this,[[9,13,17,25],[18,,20,24]])}))),function(e){return p.apply(this,arguments)})},{key:"informModelsOfUUIDChangeForItem",value:function(e,t,n){var r=!0,i=!1,o=void 0;try{for(var a,u=this.items[Symbol.iterator]();!(r=(a=u.next()).done);r=!0)a.value.potentialItemOfInterestHasChangedItsUUID(e,t,n)}catch(e){i=!0,o=e}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}}},{key:"didSyncModelsOffline",value:function(t){this.notifySyncObserversOfModels(t,e.MappingSourceLocalSaved)}},{key:"mapResponseItemsToLocalModels",value:(d=m(r().mark((function e(t,n,i){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.mapResponseItemsToLocalModelsWithOptions({items:t,source:n,sourceKey:i}));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return d.apply(this,arguments)})},{key:"mapResponseItemsToLocalModelsOmittingFields",value:(f=m(r().mark((function e(t,n,i,o){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.mapResponseItemsToLocalModelsWithOptions({items:t,omitFields:n,source:i,sourceKey:o}));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t,n,r){return f.apply(this,arguments)})},{key:"mapResponseItemsToLocalModelsWithOptions",value:(l=m(r().mark((function e(t){var n,i,o,a,u,s,c,l,f,d,p,v,g,m,y,b,w,x,k,S,_,E,C,I,O,A,D,P,T,N,M,R,L,j,F,B,z,U,H;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.items,i=t.omitFields,o=t.source,a=t.sourceKey,t.options,u=[],s=[],c=[],l=!0,f=!1,d=void 0,e.prev=5,p=n[Symbol.iterator]();case 7:if(l=(v=p.next()).done){e.next=58;break}if(g=v.value){e.next=11;break}return e.abrupt("continue",55);case 11:if(m=!g.content&&!g.errorDecrypting,g.content_type&&g.uuid&&!m||g.deleted){e.next=16;break}return console.error("Server response item is corrupt:",g),e.abrupt("continue",55);case 16:if(!Array.isArray(i)){e.next=36;break}for(y=!0,b=!1,w=void 0,e.prev=20,x=i[Symbol.iterator]();!(y=(k=x.next()).done);y=!0)S=k.value,delete g[S];e.next=28;break;case 24:e.prev=24,e.t0=e.catch(20),b=!0,w=e.t0;case 28:e.prev=28,e.prev=29,y||null==x.return||x.return();case 31:if(e.prev=31,!b){e.next=34;break}throw w;case 34:return e.finish(31);case 35:return e.finish(28);case 36:if((_=this.findItem(g.uuid))&&(_.updateFromJSON(g),_.dummy=!1),E=g.content_type||_&&_.content_type,!this.acceptableContentTypes||this.acceptableContentTypes.includes(E)){e.next=42;break}return e.abrupt("continue",55);case 42:if(C=!1,1!=g.deleted){e.next=50;break}if(!g.dirty){e.next=48;break}C=!0,e.next=50;break;case 48:return _&&(u.push(_),c.push(_),this.removeItemLocally(_)),e.abrupt("continue",55);case 50:_||(_=this.createItem(g)),this.addItem(_,C),_.errorDecrypting||c.push(_),u.push(_),s.push(g);case 55:l=!0,e.next=7;break;case 58:e.next=64;break;case 60:e.prev=60,e.t1=e.catch(5),f=!0,d=e.t1;case 64:e.prev=64,e.prev=65,l||null==p.return||p.return();case 67:if(e.prev=67,!f){e.next=70;break}throw d;case 70:return e.finish(67);case 71:return e.finish(64);case 72:for(I=!0,O=!1,A=void 0,e.prev=75,D=s.entries()[Symbol.iterator]();!(I=(P=D.next()).done);I=!0)T=h(P.value,2),N=T[0],M=T[1],R=u[N],M.content&&this.resolveReferencesForItem(R),R.didFinishSyncing();e.next=83;break;case 79:e.prev=79,e.t2=e.catch(75),O=!0,A=e.t2;case 83:e.prev=83,e.prev=84,I||null==D.return||D.return();case 86:if(e.prev=86,!O){e.next=89;break}throw A;case 89:return e.finish(86);case 90:return e.finish(83);case 91:for(L=this.popMissedReferenceStructsForObjects(s),j=!0,F=!1,B=void 0,e.prev=95,z=function(){var e=H.value,t=u.find((function(t){return t.uuid==e.reference_uuid}));t&&e.for_item.addItemAsRelationship(t)},U=L[Symbol.iterator]();!(j=(H=U.next()).done);j=!0)z();e.next=104;break;case 100:e.prev=100,e.t3=e.catch(95),F=!0,B=e.t3;case 104:e.prev=104,e.prev=105,j||null==U.return||U.return();case 107:if(e.prev=107,!F){e.next=110;break}throw B;case 110:return e.finish(107);case 111:return e.finish(104);case 112:return e.next=114,this.notifySyncObserversOfModels(c,o,a);case 114:return e.abrupt("return",u);case 115:case"end":return e.stop()}}),e,this,[[5,60,64,72],[20,24,28,36],[29,,31,35],[65,,67,71],[75,79,83,91],[84,,86,90],[95,100,104,112],[105,,107,111]])}))),function(e){return l.apply(this,arguments)})},{key:"missedReferenceBuildKey",value:function(e,t){return"".concat(e,":").concat(t)}},{key:"popMissedReferenceStructsForObjects",value:function(e){if(!e||0==e.length)return[];for(var t=[],n=[],r=e.map((function(e){return e.uuid})),i=r[0].length,o=0,a=Object.keys(this.missedReferences);o<a.length;o++){var u=a[o];r.includes(u.substring(0,i))&&(t.push(this.missedReferences[u]),n.push(u))}for(var s=0,c=n;s<c.length;s++){var l=c[s];delete this.missedReferences[l]}return t}},{key:"resolveReferencesForItem",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e.errorDecrypting){var n=e.contentObject;if(e.updateLocalRelationships(),n.references){var r=n.references.slice(),i=r.map((function(e){return e.uuid})),o=!0,a=this.findItems(i,o),u=!0,s=!1,c=void 0;try{for(var l,f=a.entries()[Symbol.iterator]();!(u=(l=f.next()).done);u=!0){var d=h(l.value,2),p=d[0],v=d[1];if(v)e.addItemAsRelationship(v),t&&this.setItemDirty(v,!0);else{var g=i[p],m=this.missedReferenceBuildKey(g,e.uuid);if(!this.missedReferences[m]){var y={reference_uuid:g,for_item:e};this.missedReferences[m]=y}}}}catch(e){s=!0,c=e}finally{try{u||null==f.return||f.return()}finally{if(s)throw c}}}}}},{key:"notifySyncObserversOfModels",value:(c=m(r().mark((function e(t,n,i){var o,a,u,s,c,l,f,d=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=this.itemSyncObservers.sort((function(e,t){return e.priority<t.priority?-1:1})),a=!0,u=!1,s=void 0,e.prev=4,c=r().mark((function e(){var o,a,u,s,c,l,p,h,v,g;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(o=f.value,a=o.types.includes("*")?t:t.filter((function(e){return o.types.includes(e.content_type)})),u=[],s=[],c=!0,l=!1,p=void 0,e.prev=6,h=a[Symbol.iterator]();!(c=(v=h.next()).done);c=!0)(g=v.value).deleted?s.push(g):u.push(g);e.next=14;break;case 10:e.prev=10,e.t0=e.catch(6),l=!0,p=e.t0;case 14:e.prev=14,e.prev=15,c||null==h.return||h.return();case 17:if(e.prev=17,!l){e.next=20;break}throw p;case 20:return e.finish(17);case 21:return e.finish(14);case 22:if(!(a.length>0)){e.next=25;break}return e.next=25,d._callSyncObserverCallbackWithTimeout(o,a,u,s,n,i);case 25:case"end":return e.stop()}}),e,null,[[6,10,14,22],[15,,17,21]])})),l=o[Symbol.iterator]();case 7:if(a=(f=l.next()).done){e.next=12;break}return e.delegateYield(c(),"t0",9);case 9:a=!0,e.next=7;break;case 12:e.next=18;break;case 14:e.prev=14,e.t1=e.catch(4),u=!0,s=e.t1;case 18:e.prev=18,e.prev=19,a||null==l.return||l.return();case 21:if(e.prev=21,!u){e.next=24;break}throw s;case 24:return e.finish(21);case 25:return e.finish(18);case 26:case"end":return e.stop()}}),e,this,[[4,14,18,26],[19,,21,25]])}))),function(e,t,n){return c.apply(this,arguments)})},{key:"_callSyncObserverCallbackWithTimeout",value:(s=m(r().mark((function e(t,n,i,o,a,u){var s=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,r){s.$timeout((function(){try{t.callback(n,i,o,a,u)}catch(e){console.error("Sync observer exception",e)}finally{e()}}))})));case 1:case"end":return e.stop()}}),e)}))),function(e,t,n,r,i,o){return s.apply(this,arguments)})},{key:"setItemDirty",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;this.setItemsDirty([e],t,n,r,i)}},{key:"setItemsDirty",value:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,a=!0,u=!1,s=void 0;try{for(var c,l=t[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var f=c.value;f.setDirty(n,r)}}catch(e){u=!0,s=e}finally{try{a||null==l.return||l.return()}finally{if(u)throw s}}this.notifySyncObserversOfModels(t,i||e.MappingSourceLocalDirtied,o)}},{key:"createItem",value:function(t){var n=e.ContentTypeClassMapping&&e.ContentTypeClassMapping[t.content_type];return n||(n=M),new n(t)}},{key:"createDuplicateItemFromResponseItem",value:(u=m(r().mark((function e(t){var n,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.setDirty){e.next=3;break}return console.error("Attempting to create conflicted copy of non-response item."),e.abrupt("return",null);case 3:return n=JSON.parse(JSON.stringify(t)),e.next=6,SFJS.crypto.generateUUID();case 6:return n.uuid=e.sent,i=this.createItem(n),e.abrupt("return",i);case 9:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"duplicateItemAndAddAsConflict",value:function(e){return this.duplicateItemWithCustomContentAndAddAsConflict({content:e.content,duplicateOf:e})}},{key:"duplicateItemWithCustomContentAndAddAsConflict",value:function(e){var t=e.content,n=e.duplicateOf,r=this.duplicateItemWithCustomContent({content:t,duplicateOf:n});return this.addDuplicatedItemAsConflict({duplicate:r,duplicateOf:n}),r}},{key:"addDuplicatedItemAsConflict",value:function(e){var t=e.duplicate,n=e.duplicateOf;this.addDuplicatedItem(t,n),t.content.conflict_of=n.uuid}},{key:"duplicateItemWithCustomContent",value:function(e){var t=e.content,n=e.duplicateOf,r=new n.constructor({content:t});return r.created_at=n.created_at,r.content_type||(r.content_type=n.content_type),r}},{key:"duplicateItemAndAdd",value:function(e){var t=this.duplicateItemWithoutAdding(e);return this.addDuplicatedItem(t,e),t}},{key:"duplicateItemWithoutAdding",value:function(e){var t=new e.constructor({content:e.content});return t.created_at=e.created_at,t.content_type||(t.content_type=e.content_type),t}},{key:"addDuplicatedItem",value:function(e,t){this.addItem(e);var n=!0,r=!1,i=void 0;try{for(var o,a=t.referencingObjects[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var u=o.value;u.addItemAsRelationship(e),this.setItemDirty(u,!0)}}catch(e){r=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}this.resolveReferencesForItem(e),this.setItemDirty(e,!0)}},{key:"addItem",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.addItems([e],t)}},{key:"addItems",value:function(e){var t=this;e.forEach((function(e){t.itemsHash[e.uuid]||(t.itemsHash[e.uuid]=e,t.items.push(e))}))}},{key:"addItemSyncObserver",value:function(e,t,n){this.addItemSyncObserverWithPriority({id:e,types:t,callback:n,priority:1})}},{key:"addItemSyncObserverWithPriority",value:function(e){var t=e.id,n=e.priority,r=e.types,i=e.callback;Array.isArray(r)||(r=[r]),this.itemSyncObservers.push({id:t,types:r,priority:n,callback:i})}},{key:"removeItemSyncObserver",value:function(e){_.remove(this.itemSyncObservers,_.find(this.itemSyncObservers,{id:e}))}},{key:"getDirtyItems",value:function(){return this.items.filter((function(e){return 1==e.dirty&&!e.dummy&&(!e.errorDecrypting||e.deleted)}))}},{key:"clearDirtyItems",value:function(e){var t=!0,n=!1,r=void 0;try{for(var i,o=e[Symbol.iterator]();!(t=(i=o.next()).done);t=!0)i.value.setDirty(!1)}catch(e){n=!0,r=e}finally{try{t||null==o.return||o.return()}finally{if(n)throw r}}}},{key:"removeAndDirtyAllRelationshipsForItem",value:function(e){if(!e.errorDecrypting){var t=!0,n=!1,r=void 0;try{for(var i,o=e.content.references[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var a=i.value,u=this.findItem(a.uuid);u&&(e.removeItemAsRelationship(u),u.hasRelationshipWithItem(e)&&(u.removeItemAsRelationship(e),this.setItemDirty(u,!0)))}}catch(e){n=!0,r=e}finally{try{t||null==o.return||o.return()}finally{if(n)throw r}}}var s=!0,c=!1,l=void 0;try{for(var f,d=e.referencingObjects[Symbol.iterator]();!(s=(f=d.next()).done);s=!0){var p=f.value;p.removeItemAsRelationship(e),this.setItemDirty(p,!0)}}catch(e){c=!0,l=e}finally{try{s||null==d.return||d.return()}finally{if(c)throw l}}e.referencingObjects=[]}},{key:"setAllItemsDirty",value:function(){var e=this.allItems;this.setItemsDirty(e,!0)}},{key:"setItemToBeDeleted",value:function(e){e.deleted=!0,e.dummy||this.setItemDirty(e,!0),this.removeAndDirtyAllRelationshipsForItem(e)}},{key:"removeItemLocally",value:(a=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:_.remove(this.items,{uuid:t.uuid}),delete this.itemsHash[t.uuid],t.isBeingRemovedLocally();case 3:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"allItemsMatchingTypes",value:function(e){return this.allItems.filter((function(t){return(_.includes(e,t.content_type)||_.includes(e,"*"))&&!t.dummy}))}},{key:"invalidItems",value:function(){return this.allItems.filter((function(e){return e.errorDecrypting}))}},{key:"validItemsForContentType",value:function(e){return this.allItems.filter((function(t){return t.content_type==e&&!t.errorDecrypting}))}},{key:"findItem",value:function(e){return this.itemsHash[e]}},{key:"findItems",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[],r=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=this.itemsHash[s];(c||t)&&n.push(c)}}catch(e){i=!0,o=e}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}},{key:"itemsMatchingPredicate",value:function(e){return this.itemsMatchingPredicates([e])}},{key:"itemsMatchingPredicates",value:function(e){return this.filterItemsWithPredicates(this.allItems,e)}},{key:"filterItemsWithPredicates",value:function(e,t){return e.filter((function(e){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var u=o.value;if(!e.satisfiesPredicate(u))return!1}}catch(e){r=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return!0}))}},{key:"importItems",value:(o=m(r().mark((function t(n){var i,o,a,u,s,c,l,f,d,p,h,v,g,m,y,b,w,x,k,S,_,E,C,I,O,A,D;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=[],o={},a=!0,u=!1,s=void 0,t.prev=5,c=n[Symbol.iterator]();case 7:if(a=(l=c.next()).done){t.next=18;break}if(f=l.value,d=this.findItem(f.uuid)){t.next=13;break}return o[f.uuid]={},t.abrupt("continue",15);case 13:p=this.duplicateItemWithoutAdding(d),o[f.uuid]={frozenValue:p,itemRef:d};case 15:a=!0,t.next=7;break;case 18:t.next=24;break;case 20:t.prev=20,t.t0=t.catch(5),u=!0,s=t.t0;case 24:t.prev=24,t.prev=25,a||null==c.return||c.return();case 27:if(t.prev=27,!u){t.next=30;break}throw s;case 30:return t.finish(27);case 31:return t.finish(24);case 32:h=!0,v=!1,g=void 0,t.prev=35,m=n[Symbol.iterator]();case 37:if(h=(y=m.next()).done){t.next=52;break}if(b=y.value,w=o[b.uuid],x=w.frozenValue,k=w.itemRef,!x||k.errorDecrypting){t.next=47;break}return t.next=43,this.createDuplicateItemFromResponseItem(b);case 43:S=t.sent,b.deleted||x.isItemContentEqualWith(S)||(this.addDuplicatedItemAsConflict({duplicate:S,duplicateOf:k}),i.push(S)),t.next=49;break;case 47:i.push(b),k&&k.errorDecrypting&&(k.errorDecrypting=!1);case 49:h=!0,t.next=37;break;case 52:t.next=58;break;case 54:t.prev=54,t.t1=t.catch(35),v=!0,g=t.t1;case 58:t.prev=58,t.prev=59,h||null==m.return||m.return();case 61:if(t.prev=61,!v){t.next=64;break}throw g;case 64:return t.finish(61);case 65:return t.finish(58);case 66:return t.next=68,this.mapResponseItemsToLocalModels(i,e.MappingSourceFileImport);case 68:for(_=t.sent,E=!0,C=!1,I=void 0,t.prev=72,O=_[Symbol.iterator]();!(E=(A=O.next()).done);E=!0)D=A.value,this.setItemDirty(D,!0,!1),D.deleted=!1;t.next=80;break;case 76:t.prev=76,t.t2=t.catch(72),C=!0,I=t.t2;case 80:t.prev=80,t.prev=81,E||null==O.return||O.return();case 83:if(t.prev=83,!C){t.next=86;break}throw I;case 86:return t.finish(83);case 87:return t.finish(80);case 88:return t.abrupt("return",_);case 89:case"end":return t.stop()}}),t,this,[[5,20,24,32],[25,,27,31],[35,54,58,66],[59,,61,65],[72,76,80,88],[81,,83,87]])}))),function(e){return o.apply(this,arguments)})},{key:"getAllItemsJSONData",value:(i=m(r().mark((function e(t,n,i){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.getJSONDataForItems(this.allItems,t,n,i));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return i.apply(this,arguments)})},{key:"getJSONDataForItems",value:(n=m(r().mark((function e(t,n,i,o){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(t.map((function(e){return new R(e,n,i).paramsForExportFile()}))).then((function(e){if(o&&0==e.length)return null;var t={items:e};return n&&(t.auth_params=i),JSON.stringify(t,null,2)})));case 1:case"end":return e.stop()}}),e)}))),function(e,t,r,i){return n.apply(this,arguments)})},{key:"computeDataIntegrityHash",value:(t=m(r().mark((function e(){var t,n,i,o;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=this.allNondummyItems.sort((function(e,t){return t.updated_at-e.updated_at})),n=t.map((function(e){return e.updatedAtTimestamp()})),i=n.join(","),e.next=6,SFJS.crypto.sha256(i);case 6:return o=e.sent,e.abrupt("return",o);case 10:return e.prev=10,e.t0=e.catch(0),console.error("Error computing data integrity hash",e.t0),e.abrupt("return",null);case 14:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return t.apply(this,arguments)})},{key:"allItems",get:function(){return this.items.slice()}},{key:"allNondummyItems",get:function(){return this.items.filter((function(e){return!e.dummy}))}}]),e}();i.SFModelManager=I;var O=function(){function e(t,n,r){y(this,e),this.modelManager=t,this.syncManager=n,this.singletonManager=r,this.loadPrivileges(),e.CredentialAccountPassword="CredentialAccountPassword",e.CredentialLocalPasscode="CredentialLocalPasscode",e.ActionManageExtensions="ActionManageExtensions",e.ActionManageBackups="ActionManageBackups",e.ActionViewProtectedNotes="ActionViewProtectedNotes",e.ActionManagePrivileges="ActionManagePrivileges",e.ActionManagePasscode="ActionManagePasscode",e.ActionDeleteNote="ActionDeleteNote",e.SessionExpiresAtKey="SessionExpiresAtKey",e.SessionLengthKey="SessionLengthKey",e.SessionLengthNone=0,e.SessionLengthFiveMinutes=300,e.SessionLengthOneHour=3600,e.SessionLengthOneWeek=604800,this.availableActions=[e.ActionViewProtectedNotes,e.ActionDeleteNote,e.ActionManagePasscode,e.ActionManageBackups,e.ActionManageExtensions,e.ActionManagePrivileges],this.availableCredentials=[e.CredentialAccountPassword,e.CredentialLocalPasscode],this.sessionLengths=[e.SessionLengthNone,e.SessionLengthFiveMinutes,e.SessionLengthOneHour,e.SessionLengthOneWeek,e.SessionLengthIndefinite]}var t,n,i,o,a,u,s,c,l,f,d,p;return w(e,[{key:"setDelegate",value:function(e){this.delegate=e}},{key:"getAvailableActions",value:function(){return this.availableActions}},{key:"getAvailableCredentials",value:function(){return this.availableCredentials}},{key:"netCredentialsForAction",value:(p=m(r().mark((function t(n){var i,o,a,u,s,c,l,f;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPrivileges();case 2:t.t0=n,i=t.sent.getCredentialsForAction(t.t0),o=[],a=!0,u=!1,s=void 0,t.prev=8,c=i[Symbol.iterator]();case 10:if(a=(l=c.next()).done){t.next=27;break}if((f=l.value)!=e.CredentialAccountPassword){t.next=19;break}return t.next=15,this.delegate.isOffline();case 15:t.sent||o.push(f),t.next=24;break;case 19:if(f!=e.CredentialLocalPasscode){t.next=24;break}return t.next=22,this.delegate.hasLocalPasscode();case 22:t.sent&&o.push(f);case 24:a=!0,t.next=10;break;case 27:t.next=33;break;case 29:t.prev=29,t.t1=t.catch(8),u=!0,s=t.t1;case 33:t.prev=33,t.prev=34,a||null==c.return||c.return();case 36:if(t.prev=36,!u){t.next=39;break}throw s;case 39:return t.finish(36);case 40:return t.finish(33);case 41:return t.abrupt("return",o);case 42:case"end":return t.stop()}}),t,this,[[8,29,33,41],[34,,36,40]])}))),function(e){return p.apply(this,arguments)})},{key:"loadPrivileges",value:(d=m(r().mark((function e(){var t=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.loadPromise){e.next=2;break}return e.abrupt("return",this.loadPromise);case 2:return this.loadPromise=new Promise((function(e,n){var i=j.contentType(),o=new L("content_type","=",i);t.singletonManager.registerSingleton([o],(function(n){t.privileges=n,e(n)}),function(){var n=m(r().mark((function n(o){var a;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=new j({content_type:i}),SFJS.crypto.generateUUIDSync){n.next=4;break}return n.next=4,a.initUUID();case 4:t.modelManager.addItem(a),t.modelManager.setItemDirty(a,!0),t.syncManager.sync(),o(a),e(a);case 9:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}())})),e.abrupt("return",this.loadPromise);case 4:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"getPrivileges",value:(f=m(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.privileges){e.next=4;break}return e.abrupt("return",this.privileges);case 4:return e.abrupt("return",this.loadPrivileges());case 5:case"end":return e.stop()}}),e,this)}))),function(){return f.apply(this,arguments)})},{key:"displayInfoForCredential",value:function(t){var n={};return n[e.CredentialAccountPassword]={label:"Account Password",prompt:"Please enter your account password."},n[e.CredentialLocalPasscode]={label:"Local Passcode",prompt:"Please enter your local passcode."},n[t]}},{key:"displayInfoForAction",value:function(t){var n={};return n[e.ActionManageExtensions]={label:"Manage Extensions"},n[e.ActionManageBackups]={label:"Download/Import Backups"},n[e.ActionViewProtectedNotes]={label:"View Protected Notes"},n[e.ActionManagePrivileges]={label:"Manage Privileges"},n[e.ActionManagePasscode]={label:"Manage Passcode"},n[e.ActionDeleteNote]={label:"Delete Notes"},n[t]}},{key:"getSessionLengthOptions",value:function(){return[{value:e.SessionLengthNone,label:"Don't Remember"},{value:e.SessionLengthFiveMinutes,label:"5 Minutes"},{value:e.SessionLengthOneHour,label:"1 Hour"},{value:e.SessionLengthOneWeek,label:"1 Week"}]}},{key:"setSessionLength",value:(l=m(r().mark((function t(n){var i;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n,o=void 0,(o=new Date).setSeconds(o.getSeconds()+r),i=o,t.abrupt("return",Promise.all([this.delegate.saveToStorage(e.SessionExpiresAtKey,JSON.stringify(i)),this.delegate.saveToStorage(e.SessionLengthKey,JSON.stringify(n))]));case 3:case"end":return t.stop()}var r,o}),t,this)}))),function(e){return l.apply(this,arguments)})},{key:"clearSession",value:(c=m(r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.setSessionLength(e.SessionLengthNone));case 1:case"end":return t.stop()}}),t,this)}))),function(){return c.apply(this,arguments)})},{key:"getSelectedSessionLength",value:(s=m(r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.delegate.getFromStorage(e.SessionLengthKey);case 2:if(!(n=t.sent)){t.next=7;break}return t.abrupt("return",JSON.parse(n));case 7:return t.abrupt("return",e.SessionLengthNone);case 8:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"getSessionExpirey",value:(u=m(r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.delegate.getFromStorage(e.SessionExpiresAtKey);case 2:if(!(n=t.sent)){t.next=7;break}return t.abrupt("return",new Date(JSON.parse(n)));case 7:return t.abrupt("return",new Date);case 8:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"actionHasPrivilegesConfigured",value:(a=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.netCredentialsForAction(t);case 2:return e.t0=e.sent.length,e.abrupt("return",e.t0>0);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"actionRequiresPrivilege",value:(o=m(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getSessionExpirey();case 2:if(!(e.sent>new Date)){e.next=5;break}return e.abrupt("return",!1);case 5:return e.next=7,this.netCredentialsForAction(t);case 7:return n=e.sent,e.abrupt("return",n.length>0);case 9:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"savePrivileges",value:(i=m(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getPrivileges();case 2:t=e.sent,this.modelManager.setItemDirty(t,!0),this.syncManager.sync();case 5:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"authenticateAction",value:(n=m(r().mark((function e(t,n){var i,o,a,u,s,c,l,f,d;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.netCredentialsForAction(t);case 2:i=e.sent,o=[],a=[],u=!0,s=!1,c=void 0,e.prev=7,l=i[Symbol.iterator]();case 9:if(u=(f=l.next()).done){e.next=18;break}return d=f.value,e.next=13,this._verifyAuthenticationParameters(d,n[d]);case 13:e.sent?o.push(d):a.push(d);case 15:u=!0,e.next=9;break;case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(7),s=!0,c=e.t0;case 24:e.prev=24,e.prev=25,u||null==l.return||l.return();case 27:if(e.prev=27,!s){e.next=30;break}throw c;case 30:return e.finish(27);case 31:return e.finish(24);case 32:return e.abrupt("return",{success:0==a.length,successfulCredentials:o,failedCredentials:a});case 33:case"end":return e.stop()}}),e,this,[[7,20,24,32],[25,,27,31]])}))),function(e,t){return n.apply(this,arguments)})},{key:"_verifyAuthenticationParameters",value:(t=m(r().mark((function t(n,i){var o,a,u=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=function(){var e=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u.delegate.verifyAccountPassword(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),a=function(){var e=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u.delegate.verifyLocalPasscode(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n!=e.CredentialAccountPassword){t.next=6;break}return t.abrupt("return",o(i));case 6:if(n!=e.CredentialLocalPasscode){t.next=8;break}return t.abrupt("return",a(i));case 8:case"end":return t.stop()}}),t)}))),function(e,n){return t.apply(this,arguments)})}]),e}();i.SFPrivilegesManager=O;var A=function(){function e(t,n,r,i,o){var a=this;y(this,e),this.modelManager=t,this.storageManager=n,this.$timeout=o||setTimeout.bind(window),this.keyRequestHandler=r,this.loadFromDisk().then((function(){a.modelManager.addItemSyncObserver("session-history",i,(function(e,t,n,r,i){if(r!==I.MappingSourceLocalDirtied){var o=!0,u=!1,s=void 0;try{for(var c,l=e[Symbol.iterator]();!(o=(c=l.next()).done);o=!0){var f=c.value;try{a.addHistoryEntryForItem(f)}catch(e){console.log("Caught exception while trying to add item history entry",e)}}}catch(e){u=!0,s=e}finally{try{o||null==l.return||l.return()}finally{if(u)throw s}}}}))}))}var t,n,i,o,a,u,s;return w(e,[{key:"encryptionParams",value:(s=m(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.keyRequestHandler());case 1:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"addHistoryEntryForItem",value:function(e){var t=this,n={uuid:e.uuid,content_type:e.content_type,updated_at:e.updated_at,content:e.getContentCopy()},r=this.historySession.addEntryForItem(n);this.autoOptimize&&this.historySession.optimizeHistoryForItem(e),r&&this.diskEnabled&&(this.diskTimeout&&(this.$timeout.hasOwnProperty("cancel")?this.$timeout.cancel(this.diskTimeout):clearTimeout(this.diskTimeout)),this.diskTimeout=this.$timeout((function(){t.saveToDisk()}),2e3))}},{key:"historyForItem",value:function(e){return this.historySession.historyForItem(e)}},{key:"clearHistoryForItem",value:(u=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.historySession.clearItemHistory(t),e.abrupt("return",this.saveToDisk());case 2:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"clearAllHistory",value:(a=m(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.historySession.clearAllHistory(),e.abrupt("return",this.storageManager.removeItem("sessionHistory_revisions"));case 2:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"toggleDiskSaving",value:(o=m(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.diskEnabled=!this.diskEnabled,!this.diskEnabled){e.next=6;break}this.storageManager.setItem("sessionHistory_persist",JSON.stringify(!0)),this.saveToDisk(),e.next=8;break;case 6:return this.storageManager.setItem("sessionHistory_persist",JSON.stringify(!1)),e.abrupt("return",this.storageManager.removeItem("sessionHistory_revisions"));case 8:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"saveToDisk",value:(i=m(r().mark((function e(){var t,n=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.diskEnabled){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.encryptionParams();case 4:t=e.sent,new R(this.historySession,t.keys,t.auth_params).paramsForSync().then((function(e){n.storageManager.setItem("sessionHistory_revisions",JSON.stringify(e))}));case 7:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"loadFromDisk",value:(n=m(r().mark((function e(){var t,n,i,o,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.storageManager.getItem("sessionHistory_persist");case 2:return(t=e.sent)&&(this.diskEnabled=JSON.parse(t)),e.next=6,this.storageManager.getItem("sessionHistory_revisions");case 6:if(!(n=e.sent)){e.next=18;break}return n=JSON.parse(n),e.next=11,this.encryptionParams();case 11:return i=e.sent,e.next=14,SFJS.itemTransformer.decryptItem(n,i.keys);case 14:o=new F(n),this.historySession=o,e.next=19;break;case 18:this.historySession=new F;case 19:return e.next=21,this.storageManager.getItem("sessionHistory_autoOptimize");case 21:a=e.sent,this.autoOptimize=!a||JSON.parse(a);case 23:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"toggleAutoOptimize",value:(t=m(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.autoOptimize=!this.autoOptimize,this.autoOptimize?this.storageManager.setItem("sessionHistory_autoOptimize",JSON.stringify(!0)):this.storageManager.setItem("sessionHistory_autoOptimize",JSON.stringify(!1));case 2:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}();i.SFSessionHistoryManager=A;var D=function(){function e(t,n){var r=this;y(this,e),this.syncManager=n,this.modelManager=t,this.singletonHandlers=[],t.addItemSyncObserverWithPriority({id:"sf-singleton-manager",types:"*",priority:-1,callback:function(e,n,i,o,a){o!==I.MappingSourceLocalDirtied&&r.resolveSingletons(t.allNondummyItems,null,!0)}}),n.addEventHandler((function(e,n){if("local-data-loaded"==e)r.resolveSingletons(t.allNondummyItems,null,!0),r.initialDataLoaded=!0;else if("sync:completed"==e){if(!r.initialDataLoaded)return;r.resolveSingletons(n.retrievedItems,n.savedItems)}})),t.addModelUuidChangeObserver("singleton-manager",(function(e,t){var n=!0,i=!1,o=void 0;try{for(var a,u=r.singletonHandlers[Symbol.iterator]();!(n=(a=u.next()).done);n=!0){var s=a.value;s.singleton&&L.ItemSatisfiesPredicates(t,s.predicates)&&(s.singleton=null,r.resolveSingletons([t]))}}catch(e){i=!0,o=e}finally{try{n||null==u.return||u.return()}finally{if(i)throw o}}}))}return w(e,[{key:"registerSingleton",value:function(e,t,n){this.singletonHandlers.push({predicates:e,resolutionCallback:t,createBlock:n})}},{key:"resolveSingletons",value:function(e,t,n){var r=this;e=e||[],t=t||[];var i=!0,o=!1,a=void 0;try{for(var u,s=function(){var i=u.value,o=i.predicates.slice(),a=r.modelManager.filterItemsWithPredicates(e,o),s=function(){i.createBlock&&(i.pendingCreateBlockCallback=!0,i.createBlock((function(e){i.singleton=e,i.pendingCreateBlockCallback=!1,i.resolutionCallback&&i.resolutionCallback(e)})))},c=r.modelManager.filterItemsWithPredicates(t,o).length;if(a.length>0||c>0){var l=r.modelManager.itemsMatchingPredicates(o);if(l.length>=2){var f=l.sort((function(e,t){return e.errorDecrypting?1:t.errorDecrypting||e.created_at<t.created_at?-1:1})),d=f[0],p=f.slice(1,f.length),h=!0,v=!1,g=void 0;try{for(var m,y=p[Symbol.iterator]();!(h=(m=y.next()).done);h=!0){var b=m.value;r.modelManager.setItemToBeDeleted(b)}}catch(e){v=!0,g=e}finally{try{h||null==y.return||y.return()}finally{if(v)throw g}}r.syncManager.sync(),i.singleton=d,i.resolutionCallback&&i.resolutionCallback(d)}else if(1==l.length){var w=l[0];w.errorDecrypting?(r.modelManager.setItemToBeDeleted(w),s()):i.singleton&&i.singleton===w||(i.singleton=w,i.resolutionCallback&&i.resolutionCallback(w))}}else i.singleton||n||i.pendingCreateBlockCallback||s()},c=this.singletonHandlers[Symbol.iterator]();!(i=(u=c.next()).done);i=!0)s()}catch(e){o=!0,a=e}finally{try{i||null==c.return||c.return()}finally{if(o)throw a}}}}]),e}();i.SFSingletonManager=D;var P=function(){function e(){y(this,e)}var t,n,i,o,a,u,s,c,l,f;return w(e,[{key:"setItem",value:(f=m(r().mark((function e(t,n){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e,t){return f.apply(this,arguments)})},{key:"getItem",value:(l=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return l.apply(this,arguments)})},{key:"removeItem",value:(c=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return c.apply(this,arguments)})},{key:"clear",value:(s=m(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(){return s.apply(this,arguments)})},{key:"getAllModels",value:(u=m(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(){return u.apply(this,arguments)})},{key:"saveModel",value:(a=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.saveModels([t]));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"saveModels",value:(o=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"deleteModel",value:(i=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"clearAllModels",value:(n=m(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})},{key:"clearAllData",value:(t=m(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all([this.clear(),this.clearAllModels()]));case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}();i.SFStorageManager=P;var T,N=function(){function e(t,n,r,i,o){y(this,e),e.KeyRequestLoadLocal="KeyRequestLoadLocal",e.KeyRequestSaveLocal="KeyRequestSaveLocal",e.KeyRequestLoadSaveAccount="KeyRequestLoadSaveAccount",this.httpManager=r,this.modelManager=t,this.storageManager=n,this.$interval=o||setInterval.bind(window),this.$timeout=i||setTimeout.bind(window),this.syncStatus={},this.syncStatusObservers=[],this.eventHandlers=[],this.PerSyncItemUploadLimit=150,this.ServerItemDownloadLimit=150,this.MajorDataChangeThreshold=15,this.MaxDiscordanceBeforeOutOfSync=5,this.syncDiscordance=0,this.outOfSync=!1}var t,n,i,o,a,u,s,c,l,f,d,p,h,v,g,b,x,k,S,C,O,A,D;return w(e,[{key:"handleServerIntegrityHash",value:(D=m(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&0!=t.length){e.next=2;break}return e.abrupt("return",!0);case 2:return e.next=4,this.modelManager.computeDataIntegrityHash();case 4:if(n=e.sent){e.next=7;break}return e.abrupt("return",!0);case 7:if(n===t){e.next=13;break}return this.syncDiscordance++,this.syncDiscordance>=this.MaxDiscordanceBeforeOutOfSync&&(this.outOfSync||(this.outOfSync=!0,this.notifyEvent("enter-out-of-sync"))),e.abrupt("return",!1);case 13:return this.outOfSync&&(this.outOfSync=!1,this.notifyEvent("exit-out-of-sync")),this.syncDiscordance=0,e.abrupt("return",!0);case 16:case"end":return e.stop()}}),e,this)}))),function(e){return D.apply(this,arguments)})},{key:"isOutOfSync",value:function(){return this.outOfSync}},{key:"getServerURL",value:(A=m(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.storageManager.getItem("server");case 2:if(e.t0=e.sent,e.t0){e.next=5;break}e.t0=window._default_sf_server;case 5:return e.abrupt("return",e.t0);case 6:case"end":return e.stop()}}),e,this)}))),function(){return A.apply(this,arguments)})},{key:"getSyncURL",value:(O=m(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getServerURL();case 2:return e.t0=e.sent,e.abrupt("return",e.t0+"/items/sync");case 4:case"end":return e.stop()}}),e,this)}))),function(){return O.apply(this,arguments)})},{key:"registerSyncStatusObserver",value:function(e){var t={key:new Date,callback:e};return this.syncStatusObservers.push(t),t}},{key:"removeSyncStatusObserver",value:function(e){_.pull(this.syncStatusObservers,e)}},{key:"syncStatusDidChange",value:function(){var e=this;this.syncStatusObservers.forEach((function(t){t.callback(e.syncStatus)}))}},{key:"addEventHandler",value:function(e){return this.eventHandlers.push(e),e}},{key:"removeEventHandler",value:function(e){_.pull(this.eventHandlers,e)}},{key:"notifyEvent",value:function(e,t){var n=!0,r=!1,i=void 0;try{for(var o,a=this.eventHandlers[Symbol.iterator]();!(n=(o=a.next()).done);n=!0)(0,o.value)(e,t||{})}catch(e){r=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}}},{key:"setKeyRequestHandler",value:function(e){this.keyRequestHandler=e}},{key:"getActiveKeyInfo",value:(C=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.keyRequestHandler(t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return C.apply(this,arguments)})},{key:"initialDataLoaded",value:function(){return!0===this._initialDataLoaded}},{key:"_sortLocalItems",value:function(e){var t=this;return e.sort((function(e,n){var r=new Date(n.updated_at)-new Date(e.updated_at),i=t.contentTypeLoadPriority,o=0,a=0;return i&&(o=i.indexOf(e.content_type),a=i.indexOf(n.content_type),-1==o&&(o=i.length),-1==a&&(a=i.length)),o==a?r:o<a?-1:1}))}},{key:"loadLocalItems",value:(S=m(r().mark((function t(){var n,i,o,a,u,s=this,c=arguments;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=c.length>0&&void 0!==c[0]?c[0]:{},i=n.incrementalCallback,o=n.batchSize,!(a=n.options)||!a.simulateHighLatency){t.next=5;break}return u=a.simulatedLatency||1e3,t.next=5,this._awaitSleep(u);case 5:if(!this.loadLocalDataPromise){t.next=7;break}return t.abrupt("return",this.loadLocalDataPromise);case 7:return o||(o=100),this.loadLocalDataPromise=this.storageManager.getAllModels().then((function(t){var n=(t=(t=s._sortLocalItems(t)).filter((function(e){var t=s.modelManager.findItem(e.uuid);return!t||new Date(e.dirtiedDate)>t.dirtiedDate}))).length,a=0,u=[],c=function(){var l=m(r().mark((function l(){var f,d;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return f=t.slice(a,a+o),r.next=3,s.handleItemsResponse(f,null,I.MappingSourceLocalRetrieved,e.KeyRequestLoadLocal);case 3:if(d=r.sent,u.push(d),!((a+=f.length)<n)){r.next=10;break}return r.abrupt("return",new Promise((function(e,t){s.$timeout((function(){s.notifyEvent("local-data-incremental-load"),i&&i(a,n),c().then(e)}))})));case 10:s._initialDataLoaded=!0,s.notifyEvent("local-data-loaded");case 12:case"end":return r.stop()}}),l)})));return function(){return l.apply(this,arguments)}}();return c()})),t.abrupt("return",this.loadLocalDataPromise);case 10:case"end":return t.stop()}}),t,this)}))),function(){return S.apply(this,arguments)})},{key:"writeItemsToLocalStorage",value:(k=m(r().mark((function t(n,i){var o=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!=n.length){t.next=2;break}return t.abrupt("return");case 2:return t.abrupt("return",new Promise(function(){var t=m(r().mark((function t(a,u){var s,c,l,f,d,p,h,v,g,y;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(s=[],c=[],l=!0,f=!1,d=void 0,t.prev=4,p=n[Symbol.iterator]();!(l=(h=p.next()).done);l=!0)!0!==(v=h.value).deleted||v.dirty?s.push(v):c.push(v);t.next=12;break;case 8:t.prev=8,t.t0=t.catch(4),f=!0,d=t.t0;case 12:t.prev=12,t.prev=13,l||null==p.return||p.return();case 15:if(t.prev=15,!f){t.next=18;break}throw d;case 18:return t.finish(15);case 19:return t.finish(12);case 20:if(!(c.length>0)){t.next=23;break}return t.next=23,Promise.all(c.map(function(){var e=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",o.storageManager.deleteModel(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 23:return t.next=25,o.getActiveKeyInfo(e.KeyRequestSaveLocal);case 25:if(g=t.sent,!(s.length>0)){t.next=33;break}return t.next=29,Promise.all(s.map(function(){var e=m(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new R(t,g.keys,g.auth_params),e.next=3,n.paramsForLocalStorage();case 3:return n=e.sent,i&&delete n.dirty,e.abrupt("return",n);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())).catch((function(e){return u(e)}));case 29:return y=t.sent,t.next=32,o.storageManager.saveModels(y).catch((function(e){console.error("Error writing items",e),o.syncStatus.localError=e,o.syncStatusDidChange(),u()}));case 32:o.syncStatus.localError&&(o.syncStatus.localError=null,o.syncStatusDidChange());case 33:a();case 34:case"end":return t.stop()}}),t,null,[[4,8,12,20],[13,,15,19]])})));return function(e,n){return t.apply(this,arguments)}}()));case 3:case"end":return t.stop()}}),t)}))),function(e,t){return k.apply(this,arguments)})},{key:"syncOffline",value:(x=m(r().mark((function e(t){var n,i,o,a,u,s=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=!0,i=!1,o=void 0,e.prev=3,a=t[Symbol.iterator]();!(n=(u=a.next()).done);n=!0)u.value.updated_at=new Date;e.next=11;break;case 7:e.prev=7,e.t0=e.catch(3),i=!0,o=e.t0;case 11:e.prev=11,e.prev=12,n||null==a.return||a.return();case 14:if(e.prev=14,!i){e.next=17;break}throw o;case 17:return e.finish(14);case 18:return e.finish(11);case 19:return e.abrupt("return",this.writeItemsToLocalStorage(t,!0).then((function(e){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var u=o.value;u.deleted&&s.modelManager.removeItemLocally(u)}}catch(e){r=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return s.modelManager.clearDirtyItems(t),s.modelManager.didSyncModelsOffline(t),s.notifyEvent("sync:completed",{savedItems:t}),{saved_items:t}})));case 20:case"end":return e.stop()}}),e,this,[[3,7,11,19],[12,,14,18]])}))),function(e){return x.apply(this,arguments)})},{key:"markAllItemsDirtyAndSaveOffline",value:(b=m(r().mark((function e(t){var n,i,o,a,u,s,c,l,f,d,p,h,v;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=28;break}n=this.modelManager.allNondummyItems.filter((function(e){return!e.errorDecrypting})).slice(),i=!0,o=!1,a=void 0,e.prev=5,u=n[Symbol.iterator]();case 7:if(i=(s=u.next()).done){e.next=14;break}return c=s.value,e.next=11,this.modelManager.alternateUUIDForItem(c);case 11:i=!0,e.next=7;break;case 14:e.next=20;break;case 16:e.prev=16,e.t0=e.catch(5),o=!0,a=e.t0;case 20:e.prev=20,e.prev=21,i||null==u.return||u.return();case 23:if(e.prev=23,!o){e.next=26;break}throw a;case 26:return e.finish(23);case 27:return e.finish(20);case 28:for(l=this.modelManager.allNondummyItems,f=!0,d=!1,p=void 0,e.prev=32,h=l[Symbol.iterator]();!(f=(v=h.next()).done);f=!0)v.value.setDirty(!0);e.next=40;break;case 36:e.prev=36,e.t1=e.catch(32),d=!0,p=e.t1;case 40:e.prev=40,e.prev=41,f||null==h.return||h.return();case 43:if(e.prev=43,!d){e.next=46;break}throw p;case 46:return e.finish(43);case 47:return e.finish(40);case 48:return e.abrupt("return",this.writeItemsToLocalStorage(l,!1));case 49:case"end":return e.stop()}}),e,this,[[5,16,20,28],[21,,23,27],[32,36,40,48],[41,,43,47]])}))),function(e){return b.apply(this,arguments)})},{key:"setSyncToken",value:(g=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._syncToken=t,e.next=3,this.storageManager.setItem("syncToken",t);case 3:case"end":return e.stop()}}),e,this)}))),function(e){return g.apply(this,arguments)})},{key:"getSyncToken",value:(v=m(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._syncToken){e.next=4;break}return e.next=3,this.storageManager.getItem("syncToken");case 3:this._syncToken=e.sent;case 4:return e.abrupt("return",this._syncToken);case 5:case"end":return e.stop()}}),e,this)}))),function(){return v.apply(this,arguments)})},{key:"setCursorToken",value:(h=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._cursorToken=t,!t){e.next=6;break}return e.next=4,this.storageManager.setItem("cursorToken",t);case 4:e.next=8;break;case 6:return e.next=8,this.storageManager.removeItem("cursorToken");case 8:case"end":return e.stop()}}),e,this)}))),function(e){return h.apply(this,arguments)})},{key:"getCursorToken",value:(p=m(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._cursorToken){e.next=4;break}return e.next=3,this.storageManager.getItem("cursorToken");case 3:this._cursorToken=e.sent;case 4:return e.abrupt("return",this._cursorToken);case 5:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"clearQueuedCallbacks",value:function(){this._queuedCallbacks=[]}},{key:"callQueuedCallbacks",value:function(e){var t=this.queuedCallbacks;if(t.length){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0)(0,o.value)(e)}catch(e){r=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}this.clearQueuedCallbacks()}}},{key:"beginCheckingIfSyncIsTakingTooLong",value:function(){this.syncStatus.checker&&this.stopCheckingIfSyncIsTakingTooLong(),this.syncStatus.checker=this.$interval(function(){(new Date-this.syncStatus.syncStart)/1e3>5&&(this.notifyEvent("sync:taking-too-long"),this.stopCheckingIfSyncIsTakingTooLong())}.bind(this),500)}},{key:"stopCheckingIfSyncIsTakingTooLong",value:function(){this.$interval.hasOwnProperty("cancel")?this.$interval.cancel(this.syncStatus.checker):clearInterval(this.syncStatus.checker),this.syncStatus.checker=null}},{key:"lockSyncing",value:function(){this.syncLocked=!0}},{key:"unlockSyncing",value:function(){this.syncLocked=!1}},{key:"sync",value:(d=m(r().mark((function t(){var n,i=this,o=arguments;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=o.length>0&&void 0!==o[0]?o[0]:{},!this.syncLocked){t.next=4;break}return console.log("Sync Locked, Returning;"),t.abrupt("return");case 4:return t.abrupt("return",new Promise(function(){var t=m(r().mark((function t(o,a){var u,s,c,l,f,d,p,h,v,g,m,y,b,w;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n||(n={}),u=i.modelManager.getDirtyItems(),s=u.filter((function(e){return!i.lastDirtyItemsSave||e.dirtiedDate>i.lastDirtyItemsSave})),t.next=5,i.getActiveKeyInfo(e.KeyRequestLoadSaveAccount);case 5:if(c=t.sent,l=i.syncStatus.syncOpInProgress,f=i.initialDataLoaded(),!l&&f){t.next=16;break}return i.performSyncAgainOnCompletion=!0,i.lastDirtyItemsSave=new Date,t.next=13,i.writeItemsToLocalStorage(s,!1);case 13:return l&&(i.queuedCallbacks.push(o),i.loggingEnabled&&console.warn("Attempting to sync while existing sync is in progress.")),f||(i.loggingEnabled&&console.warn("(1) Attempting to perform online sync before local data has loaded"),o()),t.abrupt("return");case 16:if(i.syncStatus.syncOpInProgress=!0,!c.offline){t.next=19;break}return t.abrupt("return",i.syncOffline(u).then((function(e){i.syncStatus.syncOpInProgress=!1,o(e)})).catch((function(e){i.notifyEvent("sync-exception",e)})));case 19:if(i.initialDataLoaded()){t.next=22;break}return console.error("Attempting to perform online sync before local data has loaded"),t.abrupt("return");case 22:return i.loggingEnabled&&console.log("Syncing online user."),d=i.syncStatus.needsMoreSync,i.syncStatus.syncStart=new Date,i.beginCheckingIfSyncIsTakingTooLong(),p=i.PerSyncItemUploadLimit,(h=u.slice(0,p)).length<u.length?i.syncStatus.needsMoreSync=!0:i.syncStatus.needsMoreSync=!1,d||(i.syncStatus.total=u.length,i.syncStatus.current=0),i.syncStatus.current>i.syncStatus.total&&(i.syncStatus.total=i.syncStatus.current),i.syncStatusDidChange(),t.next=34,i.writeItemsToLocalStorage(s,!1);case 34:return i.lastDirtyItemsSave=new Date,n.onPreSyncSave&&n.onPreSyncSave(),i.allRetreivedItems||(i.allRetreivedItems=[]),i.allSavedItems||(i.allSavedItems=[]),(v={}).limit=i.ServerItemDownloadLimit,n.performIntegrityCheck&&(v.compute_integrity=!0),t.prev=41,t.next=44,Promise.all(h.map((function(e){var t=new R(e,c.keys,c.auth_params);return t.additionalFields=n.additionalFields,t.paramsForSync()}))).then((function(e){v.items=e}));case 44:t.next=49;break;case 46:t.prev=46,t.t0=t.catch(41),i.notifyEvent("sync-exception",t.t0);case 49:for(g=!0,m=!1,y=void 0,t.prev=52,b=h[Symbol.iterator]();!(g=(w=b.next()).done);g=!0)w.value.dirtyCount=0;t.next=60;break;case 56:t.prev=56,t.t1=t.catch(52),m=!0,y=t.t1;case 60:t.prev=60,t.prev=61,g||null==b.return||b.return();case 63:if(t.prev=63,!m){t.next=66;break}throw y;case 66:return t.finish(63);case 67:return t.finish(60);case 68:return t.next=70,i.getSyncToken();case 70:return v.sync_token=t.sent,t.next=73,i.getCursorToken();case 73:return v.cursor_token=t.sent,v.api=E.getApiVersion(),i.loggingEnabled&&console.log("Syncing with params",v),t.prev=76,t.t2=i.httpManager,t.next=80,i.getSyncURL();case 80:t.t3=t.sent,t.t4=v,t.t5=function(e){i.handleSyncSuccess(h,e,n).then((function(){o(e)})).catch((function(e){console.log("Caught sync success exception:",e),i.handleSyncError(e,null,u).then((function(t){i.notifyEvent("sync-exception",e),o(t)}))}))},t.t6=function(e,t){i.handleSyncError(e,t,u).then((function(e){o(e)}))},t.t2.postAuthenticatedAbsolute.call(t.t2,t.t3,t.t4,t.t5,t.t6),t.next=90;break;case 87:t.prev=87,t.t7=t.catch(76),console.log("Sync exception caught:",t.t7);case 90:case"end":return t.stop()}}),t,null,[[41,46],[52,56,60,68],[61,,63,67],[76,87]])})));return function(e,n){return t.apply(this,arguments)}}()));case 5:case"end":return t.stop()}}),t,this)}))),function(){return d.apply(this,arguments)})},{key:"_awaitSleep",value:(f=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.warn("Simulating high latency sync request",t),e.abrupt("return",new Promise((function(e,n){setTimeout((function(){e()}),t)})));case 2:case"end":return e.stop()}}),e)}))),function(e){return f.apply(this,arguments)})},{key:"handleSyncSuccess",value:(l=m(r().mark((function t(n,i,o){var a,u,s,c,l,f,d,p,h,v,g,m,y,b,w,x,k=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.simulateHighLatency){t.next=4;break}return a=o.simulatedLatency||1e3,t.next=4,this._awaitSleep(a);case 4:for(this.syncStatus.error=null,this.loggingEnabled&&console.log("Sync response",i),u=this.allSavedItems.map((function(e){return e.uuid})),s=i.saved_items.map((function(e){return e.uuid})),i.retrieved_items=i.retrieved_items.filter((function(e){var t=u.includes(e.uuid),n=s.includes(e.uuid);if(t||n)return!1;var r=k.modelManager.findItem(e.uuid);return!r||!r.dirty})),c=[],l=!0,f=!1,d=void 0,t.prev=13,p=n[Symbol.iterator]();!(l=(h=p.next()).done);l=!0)0==(v=h.value).dirtyCount&&c.push(v);t.next=21;break;case 17:t.prev=17,t.t0=t.catch(13),f=!0,d=t.t0;case 21:t.prev=21,t.prev=22,l||null==p.return||p.return();case 24:if(t.prev=24,!f){t.next=27;break}throw d;case 27:return t.finish(24);case 28:return t.finish(21);case 29:return this.modelManager.clearDirtyItems(c),t.next=32,this.handleItemsResponse(i.retrieved_items,null,I.MappingSourceRemoteRetrieved,e.KeyRequestLoadSaveAccount);case 32:return g=t.sent,this.allRetreivedItems=this.allRetreivedItems.concat(g),this.syncStatus.retrievedCount=this.allRetreivedItems.length,m=["content","auth_hash"],t.next=38,this.handleItemsResponse(i.saved_items,m,I.MappingSourceRemoteSaved,e.KeyRequestLoadSaveAccount);case 38:return y=t.sent,this.allSavedItems=this.allSavedItems.concat(y),b=i.unsaved,t.next=43,this.deprecated_handleUnsavedItemsResponse(b);case 43:return t.next=45,this.handleConflictsResponse(i.conflicts);case 45:if(w=t.sent,x=w&&w.length>0,!w){t.next=50;break}return t.next=50,this.writeItemsToLocalStorage(w,!1);case 50:return t.next=52,this.writeItemsToLocalStorage(y,!1);case 52:return t.next=54,this.writeItemsToLocalStorage(g,!1);case 54:if(!i.integrity_hash||i.cursor_token){t.next=59;break}return t.next=57,this.handleServerIntegrityHash(i.integrity_hash);case 57:t.sent||this.syncDiscordance<this.MaxDiscordanceBeforeOutOfSync&&(this.performSyncAgainOnCompletion=!0);case 59:return this.syncStatus.syncOpInProgress=!1,this.syncStatus.current+=n.length,this.syncStatusDidChange(),this.setSyncToken(i.sync_token),this.setCursorToken(i.cursor_token),this.stopCheckingIfSyncIsTakingTooLong(),t.next=67,this.getCursorToken();case 67:if(!t.sent&&!this.syncStatus.needsMoreSync){t.next=72;break}return t.abrupt("return",new Promise((function(e,t){setTimeout(function(){this.sync(o).then(e)}.bind(k),10)})));case 72:if(!x){t.next=77;break}return this.performSyncAgainOnCompletion=!1,t.abrupt("return",new Promise((function(e,t){setTimeout((function(){k.sync(o).then(e)}),10)})));case 77:return this.syncStatus.retrievedCount=0,this.syncStatus.current=0,this.syncStatus.total=0,this.syncStatusDidChange(),(this.allRetreivedItems.length>=this.majorDataChangeThreshold||y.length>=this.majorDataChangeThreshold||b&&b.length>=this.majorDataChangeThreshold||w&&w.length>=this.majorDataChangeThreshold)&&this.notifyEvent("major-data-change"),this.callQueuedCallbacks(i),this.notifyEvent("sync:completed",{retrievedItems:this.allRetreivedItems,savedItems:this.allSavedItems}),this.allRetreivedItems=[],this.allSavedItems=[],this.performSyncAgainOnCompletion&&(this.performSyncAgainOnCompletion=!1,setTimeout((function(){k.sync(o)}),10)),t.abrupt("return",i);case 88:case"end":return t.stop()}}),t,this,[[13,17,21,29],[22,,24,28]])}))),function(e,t,n){return l.apply(this,arguments)})},{key:"handleSyncError",value:(c=m(r().mark((function e(t,n,i){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("Sync error: ",t),401==n&&this.notifyEvent("sync-session-invalid"),t?"string"==typeof t&&(t={error:{message:t}}):t={error:{message:"Could not connect to server."}},this.syncStatus.syncOpInProgress=!1,this.syncStatus.error=t.error,this.syncStatusDidChange(),this.writeItemsToLocalStorage(i,!1),this.modelManager.didSyncModelsOffline(i),this.stopCheckingIfSyncIsTakingTooLong(),this.notifyEvent("sync:error",t.error),this.callQueuedCallbacks({error:"Sync error"}),e.abrupt("return",t);case 12:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return c.apply(this,arguments)})},{key:"handleItemsResponse",value:(s=m(r().mark((function e(t,n,i,o){var a,u,s;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getActiveKeyInfo(o);case 2:return a=e.sent.keys,e.next=5,SFJS.itemTransformer.decryptMultipleItems(t,a);case 5:return e.next=7,this.modelManager.mapResponseItemsToLocalModelsOmittingFields(t,n,i);case 7:return u=e.sent,(s=u.filter((function(e){var t=e.errorDecryptingValueChanged;return e.errorDecryptingValueChanged=!1,t}))).length>0&&this.writeItemsToLocalStorage(s,!1),e.abrupt("return",u);case 11:case"end":return e.stop()}}),e,this)}))),function(e,t,n,r){return s.apply(this,arguments)})},{key:"refreshErroredItems",value:(u=m(r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!((n=this.modelManager.allNondummyItems.filter((function(e){return 1==e.errorDecrypting}))).length>0)){t.next=3;break}return t.abrupt("return",this.handleItemsResponse(n,null,I.MappingSourceLocalRetrieved,e.KeyRequestLoadSaveAccount));case 3:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"handleConflictsResponse",value:(a=m(r().mark((function t(n){var i,o,a,u,s,c,l,f,d,p,h,v,g,m,y,b,w,x,k,S,_,E,C,O,A,D,P,T,N,R,L;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n&&0!=n.length){t.next=2;break}return t.abrupt("return");case 2:this.loggingEnabled&&console.log("Handle Conflicted Items:",n),i={},o=!0,a=!1,u=void 0,t.prev=7,s=n[Symbol.iterator]();case 9:if(o=(c=s.next()).done){t.next=21;break}if(l=c.value,f=l.server_item||l.unsaved_item,d=this.modelManager.findItem(f.uuid)){t.next=16;break}return i[f.uuid]={},t.abrupt("continue",18);case 16:p=d.getContentCopy(),i[f.uuid]={frozenContent:p,itemRef:d};case 18:o=!0,t.next=9;break;case 21:t.next=27;break;case 23:t.prev=23,t.t0=t.catch(7),a=!0,u=t.t0;case 27:t.prev=27,t.prev=28,o||null==s.return||s.return();case 30:if(t.prev=30,!a){t.next=33;break}throw u;case 33:return t.finish(30);case 34:return t.finish(27);case 35:h=[],v=!0,g=!1,m=void 0,t.prev=39,y=n[Symbol.iterator]();case 41:if(v=(b=y.next()).done){t.next=91;break}return w=b.value,x=w.server_item||w.unsaved_item,t.t1=SFJS.itemTransformer,t.t2=[x],t.next=48,this.getActiveKeyInfo(e.KeyRequestLoadSaveAccount);case 48:return t.t3=t.sent.keys,t.next=51,t.t1.decryptMultipleItems.call(t.t1,t.t2,t.t3);case 51:if(k=i[x.uuid],S=k.frozenContent,_=k.itemRef){t.next=54;break}return t.abrupt("continue",88);case 54:if(h.push(_),"uuid_conflict"!==w.type){t.next=62;break}return t.next=58,this.modelManager.alternateUUIDForItem(_);case 58:E=t.sent,h.push(E),t.next=88;break;case 62:if("sync_conflict"!==w.type){t.next=86;break}return t.next=65,this.modelManager.createDuplicateItemFromResponseItem(x);case 65:if(C=t.sent,O=this.modelManager.duplicateItemWithCustomContent({content:S,duplicateOf:_}),A=!O.isItemContentEqualWith(C),D=!_.isItemContentEqualWith(C),P=!1,T=!1,N=!1,R=!1,x.deleted||_.deleted?R=!0:A?(new Date-_.client_updated_at)/1e3<20?(N=!0,T=!0):(P=!0,R=!0):D?M.AreItemContentsEqual({leftContent:_.content,rightContent:C.content,keysToIgnore:_.keysToIgnoreWhenCheckingContentEquality().concat(["references"]),appDataKeysToIgnore:_.appDataKeysToIgnoreWhenCheckingContentEquality()})?N=!0:(P=!0,R=!0):R=!0,!P){t.next=79;break}return t.next=77,this.modelManager.duplicateItemWithCustomContentAndAddAsConflict({content:S,duplicateOf:_});case 77:L=t.sent,h.push(L);case 79:if(T&&(this.modelManager.addDuplicatedItemAsConflict({duplicate:C,duplicateOf:_}),h.push(C)),!R){t.next=83;break}return t.next=83,this.modelManager.mapResponseItemsToLocalModelsOmittingFields([x],null,I.MappingSourceRemoteRetrieved);case 83:N&&(_.updated_at=C.updated_at,_.setDirty(!0)),t.next=88;break;case 86:return console.error("Unsupported conflict type",w.type),t.abrupt("continue",88);case 88:v=!0,t.next=41;break;case 91:t.next=97;break;case 93:t.prev=93,t.t4=t.catch(39),g=!0,m=t.t4;case 97:t.prev=97,t.prev=98,v||null==y.return||y.return();case 100:if(t.prev=100,!g){t.next=103;break}throw m;case 103:return t.finish(100);case 104:return t.finish(97);case 105:return t.abrupt("return",h);case 106:case"end":return t.stop()}}),t,this,[[7,23,27,35],[28,,30,34],[39,93,97,105],[98,,100,104]])}))),function(e){return a.apply(this,arguments)})},{key:"deprecated_handleUnsavedItemsResponse",value:(o=m(r().mark((function t(n){var i,o,a,u,s,c,l,f,d,p;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n&&0!=n.length){t.next=2;break}return t.abrupt("return");case 2:this.loggingEnabled&&console.log("Handle Unsaved Items:",n),i=!0,o=!1,a=void 0,t.prev=6,u=n[Symbol.iterator]();case 8:if(i=(s=u.next()).done){t.next=35;break}return c=s.value,l=c.item,t.t0=SFJS.itemTransformer,t.t1=[l],t.next=15,this.getActiveKeyInfo(e.KeyRequestLoadSaveAccount);case 15:return t.t2=t.sent.keys,t.next=18,t.t0.decryptMultipleItems.call(t.t0,t.t1,t.t2);case 18:if(f=this.modelManager.findItem(l.uuid)){t.next=21;break}return t.abrupt("continue",32);case 21:if("uuid_conflict"!==(d=c.error).tag){t.next=27;break}return t.next=25,this.modelManager.alternateUUIDForItem(f);case 25:t.next=32;break;case 27:if("sync_conflict"!==d.tag){t.next=32;break}return t.next=30,this.modelManager.createDuplicateItemFromResponseItem(l);case 30:p=t.sent,l.deleted||f.isItemContentEqualWith(p)||this.modelManager.addDuplicatedItemAsConflict({duplicate:p,duplicateOf:f});case 32:i=!0,t.next=8;break;case 35:t.next=41;break;case 37:t.prev=37,t.t3=t.catch(6),o=!0,a=t.t3;case 41:t.prev=41,t.prev=42,i||null==u.return||u.return();case 44:if(t.prev=44,!o){t.next=47;break}throw a;case 47:return t.finish(44);case 48:return t.finish(41);case 49:case"end":return t.stop()}}),t,this,[[6,37,41,49],[42,,44,48]])}))),function(e){return o.apply(this,arguments)})},{key:"stateless_downloadAllItems",value:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(function(){var i=m(r().mark((function i(o,a){var u;return r().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return u={limit:n.limit||500,sync_token:n.syncToken,cursor_token:n.cursorToken,content_type:n.contentType,event:n.event,api:E.getApiVersion()},i.prev=1,i.t0=t.httpManager,i.next=5,t.getSyncURL();case 5:i.t1=i.sent,i.t2=u,i.t3=function(){var i=m(r().mark((function i(a){var u,s;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n.retrievedItems||(n.retrievedItems=[]),u=a.retrieved_items,r.next=4,t.getActiveKeyInfo(e.KeyRequestLoadSaveAccount);case 4:return s=r.sent.keys,r.next=7,SFJS.itemTransformer.decryptMultipleItems(u,s);case 7:n.retrievedItems=n.retrievedItems.concat(u.map((function(e){return t.modelManager.createItem(e)}))),n.syncToken=a.sync_token,n.cursorToken=a.cursor_token,n.cursorToken?t.stateless_downloadAllItems(n).then(o):o(n.retrievedItems);case 11:case"end":return r.stop()}}),i)})));return function(e){return i.apply(this,arguments)}}(),i.t4=function(e,t){a(e)},i.t0.postAuthenticatedAbsolute.call(i.t0,i.t1,i.t2,i.t3,i.t4),i.next=16;break;case 12:i.prev=12,i.t5=i.catch(1),console.log("Download all items exception caught:",i.t5),a(i.t5);case 16:case"end":return i.stop()}}),i,null,[[1,12]])})));return function(e,t){return i.apply(this,arguments)}}())}},{key:"resolveOutOfSync",value:(i=m(r().mark((function e(){var t=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.stateless_downloadAllItems({event:"resolve-out-of-sync"}).then(function(){var e=m(r().mark((function e(n){var i,o,a,u,s,c,l,f;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=[],o=!0,a=!1,u=void 0,e.prev=4,s=n[Symbol.iterator]();case 6:if(o=(c=s.next()).done){e.next=18;break}if(l=c.value,!(f=t.modelManager.findItem(l.uuid))){e.next=14;break}if(l.isItemContentEqualWith(f)){e.next=14;break}return e.next=14,t.modelManager.duplicateItemAndAddAsConflict(f);case 14:i.push(l);case 15:o=!0,e.next=6;break;case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(4),a=!0,u=e.t0;case 24:e.prev=24,e.prev=25,o||null==s.return||s.return();case 27:if(e.prev=27,!a){e.next=30;break}throw u;case 30:return e.finish(27);case 31:return e.finish(24);case 32:return e.next=34,t.modelManager.mapResponseItemsToLocalModelsWithOptions({items:i,source:I.MappingSourceRemoteRetrieved});case 34:return e.next=36,t.writeItemsToLocalStorage(t.modelManager.allNondummyItems);case 36:return e.abrupt("return",t.sync({performIntegrityCheck:!0}));case 37:case"end":return e.stop()}}),e,null,[[4,20,24,32],[25,,27,31]])})));return function(t){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"handleSignout",value:(n=m(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.outOfSync=!1,this.loadLocalDataPromise=null,this.performSyncAgainOnCompletion=!1,this.syncStatus.syncOpInProgress=!1,this._queuedCallbacks=[],this.syncStatus={},e.abrupt("return",this.clearSyncToken());case 7:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"clearSyncToken",value:(t=m(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._syncToken=null,this._cursorToken=null,e.abrupt("return",this.storageManager.removeItem("syncToken"));case 3:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"__setLocalDataNotLoaded",value:function(){this.loadLocalDataPromise=null,this._initialDataLoaded=!1}},{key:"queuedCallbacks",get:function(){return this._queuedCallbacks||(this._queuedCallbacks=[]),this._queuedCallbacks}}]),e}();i.SFSyncManager=N;var M=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};y(this,e),this.content={},this.referencingObjects=[],this.updateFromJSON(t),this.uuid||"undefined"!=typeof SFJS&&SFJS.crypto.generateUUIDSync&&(this.uuid=SFJS.crypto.generateUUIDSync()),"object"!==v(this.content)||this.content.references||(this.content.references=[])}var t;return w(e,[{key:"initUUID",value:(t=m(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.uuid){e.next=4;break}return e.next=3,SFJS.crypto.generateUUID();case 3:this.uuid=e.sent;case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"updateFromJSON",value:function(t){if(t){this.deleted=t.deleted,this.uuid=t.uuid,this.enc_item_key=t.enc_item_key,this.auth_hash=t.auth_hash,this.auth_params=t.auth_params;for(var n=0,r=["errorDecrypting","dirty","dirtyCount","dirtiedDate","dummy"];n<r.length;n++){var i=r[n];void 0!==t[i]&&(this[i]=t[i])}if(this.dirtiedDate&&"string"==typeof this.dirtiedDate&&(this.dirtiedDate=new Date(this.dirtiedDate)),this.content_type||(this.content_type=t.content_type),t.errorDecrypting)this.content=t.content;else try{var o="string"==typeof t.content?JSON.parse(t.content):t.content;e.deepMerge(this.contentObject,o)}catch(e){console.log("Error while updating item from json",e)}t.created_at&&(this.created_at=t.created_at),t.updated_at&&(this.updated_at=t.updated_at),this.created_at?this.created_at=new Date(this.created_at):this.created_at=new Date,this.updated_at?this.updated_at=new Date(this.updated_at):this.updated_at=new Date(0),this._client_updated_at=null,t.content?this.mapContentToLocalProperties(this.contentObject):1==t.deleted&&this.handleDeletedContent()}}},{key:"mapContentToLocalProperties",value:function(e){}},{key:"createContentJSONFromProperties",value:function(){var t=this.structureParams();return e.deepMerge(this.contentObject,t),t}},{key:"structureParams",value:function(){return this.getContentCopy()}},{key:"handleDeletedContent",value:function(){}},{key:"setDirty",value:function(e,t){this.dirty=e,this.dirtyCount||(this.dirtyCount=0),e?this.dirtyCount++:this.dirtyCount=0,this.dirtiedDate=new Date,e&&t?this.client_updated_at=new Date:this.hasRawClientUpdatedAtValue()||(this.client_updated_at=new Date(this.updated_at))}},{key:"updateLocalRelationships",value:function(){}},{key:"addItemAsRelationship",value:function(e){if(e.setIsBeingReferencedBy(this),!this.hasRelationshipWithItem(e)){var t=this.content.references||[];t.push({uuid:e.uuid,content_type:e.content_type}),this.content.references=t}}},{key:"removeItemAsRelationship",value:function(e){e.setIsNoLongerBeingReferencedBy(this),this.removeReferenceWithUuid(e.uuid)}},{key:"setIsBeingReferencedBy",value:function(e){_.find(this.referencingObjects,{uuid:e.uuid})||this.referencingObjects.push(e)}},{key:"setIsNoLongerBeingReferencedBy",value:function(e){_.remove(this.referencingObjects,{uuid:e.uuid}),this.hasRelationshipWithItem(e)&&(this.removeReferenceWithUuid(e.uuid),this.setDirty(!0))}},{key:"removeReferenceWithUuid",value:function(e){var t=this.content.references||[];t=t.filter((function(t){return t.uuid!=e})),this.content.references=t}},{key:"hasRelationshipWithItem",value:function(e){return null!=this.content.references.find((function(t){return t.uuid==e.uuid}))}},{key:"isBeingRemovedLocally",value:function(){}},{key:"didFinishSyncing",value:function(){}},{key:"informReferencesOfUUIDChange",value:function(e,t){}},{key:"potentialItemOfInterestHasChangedItsUUID",value:function(e,t,n){if(!this.errorDecrypting){var r=!0,i=!1,o=void 0;try{for(var a,u=this.content.references[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value;s.uuid==t&&(s.uuid=n,this.setDirty(!0))}}catch(e){i=!0,o=e}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}}}},{key:"doNotEncrypt",value:function(){return!1}},{key:"setDomainDataItem",value:function(e,t,n){if(n){if(!this.errorDecrypting){this.content.appData||(this.content.appData={});var r=this.content.appData[n];r||(r={}),r[e]=t,this.content.appData[n]=r}}else console.error("SFItem.AppDomain needs to be set.")}},{key:"getDomainDataItem",value:function(e,t){if(t){if(!this.errorDecrypting){this.content.appData||(this.content.appData={});var n=this.content.appData[t];return n?n[e]:null}}else console.error("SFItem.AppDomain needs to be set.")}},{key:"setAppDataItem",value:function(t,n){this.setDomainDataItem(t,n,e.AppDomain)}},{key:"getAppDataItem",value:function(t){return this.getDomainDataItem(t,e.AppDomain)}},{key:"hasRawClientUpdatedAtValue",value:function(){return null!=this.getAppDataItem("client_updated_at")}},{key:"keysToIgnoreWhenCheckingContentEquality",value:function(){return[]}},{key:"appDataKeysToIgnoreWhenCheckingContentEquality",value:function(){return["client_updated_at"]}},{key:"getContentCopy",value:function(){return JSON.parse(JSON.stringify(this.content))}},{key:"isItemContentEqualWith",value:function(t){return e.AreItemContentsEqual({leftContent:this.content,rightContent:t.content,keysToIgnore:this.keysToIgnoreWhenCheckingContentEquality(),appDataKeysToIgnore:this.appDataKeysToIgnoreWhenCheckingContentEquality()})}},{key:"satisfiesPredicate",value:function(e){return L.ItemSatisfiesPredicate(this,e)}},{key:"createdAtString",value:function(){return this.dateToLocalizedString(this.created_at)}},{key:"updatedAtString",value:function(){return this.dateToLocalizedString(this.client_updated_at)}},{key:"updatedAtTimestamp",value:function(){return this.updated_at.getTime()}},{key:"dateToLocalizedString",value:function(e){if("undefined"!=typeof Intl&&Intl.DateTimeFormat){if(!T){var t=navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language;T=new Intl.DateTimeFormat(t,{year:"numeric",month:"short",day:"2-digit",weekday:"long",hour:"2-digit",minute:"2-digit"})}return T.format(e)}return e.toDateString()+" "+e.toLocaleTimeString()}},{key:"contentObject",get:function(){if(this.errorDecrypting)return this.content;if(!this.content)return this.content={},this.content;if(null!==this.content&&"object"===v(this.content))return this.content;try{var e=JSON.parse(this.content);return this.content=e,this.content}catch(e){return console.log("Error parsing json",e,this),this.content={},this.content}}},{key:"pinned",get:function(){return this.getAppDataItem("pinned")}},{key:"archived",get:function(){return this.getAppDataItem("archived")}},{key:"locked",get:function(){return this.getAppDataItem("locked")}},{key:"displayName",get:function(){return"Item"}},{key:"client_updated_at",get:function(){if(!this._client_updated_at){var e=this.getAppDataItem("client_updated_at");this._client_updated_at=e?new Date(e):new Date(this.updated_at)}return this._client_updated_at},set:function(e){this._client_updated_at=e,this.setAppDataItem("client_updated_at",e)}}],[{key:"deepMerge",value:function(e,t){return _.mergeWith(e,t,(function(e,t){if(_.isArray(e))return t})),e}},{key:"AreItemContentsEqual",value:function(t){var n=t.leftContent,r=t.rightContent,i=t.keysToIgnore,o=t.appDataKeysToIgnore,a=function(e,t){if(!e)return e;var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0)delete e[o.value]}catch(e){r=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return e};return(n=JSON.parse(JSON.stringify(n))).appData&&a(n.appData[e.AppDomain],o),n=a(n,i),(r=JSON.parse(JSON.stringify(r))).appData&&a(r.appData[e.AppDomain],o),r=a(r,i),JSON.stringify(n)===JSON.stringify(r)}}]),e}();i.SFItem=M;var R=function(){function e(t,n,r){if(y(this,e),this.item=t,this.keys=n,this.auth_params=r,this.keys&&!this.auth_params)throw"SFItemParams.auth_params must be supplied if supplying keys.";if(this.auth_params&&!this.auth_params.version)throw"SFItemParams.auth_params is missing version"}var t,n,i,o,a;return w(e,[{key:"paramsForExportFile",value:(a=m(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.forExportFile=!0,!t){e.next=5;break}return e.abrupt("return",this.__params());case 5:return e.next=7,this.__params();case 7:return n=e.sent,e.abrupt("return",_.omit(n,["deleted"]));case 9:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"paramsForExtension",value:(o=m(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.paramsForExportFile());case 1:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"paramsForLocalStorage",value:(i=m(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.additionalFields=["dirty","dirtiedDate","errorDecrypting"],this.forExportFile=!0,e.abrupt("return",this.__params());case 3:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"paramsForSync",value:(n=m(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.__params());case 1:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"__params",value:(t=m(r().mark((function e(){var t,n,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t={uuid:this.item.uuid,content_type:this.item.content_type,deleted:this.item.deleted,created_at:this.item.created_at,updated_at:this.item.updated_at},this.item.errorDecrypting){e.next=23;break}if(n=this.item.doNotEncrypt()&&!this.forExportFile,!this.keys||n){e.next=11;break}return e.next=6,SFJS.itemTransformer.encryptItem(this.item,this.keys,this.auth_params);case 6:i=e.sent,_.merge(t,i),"001"!==this.auth_params.version&&(t.auth_hash=null),e.next=21;break;case 11:if(!this.forExportFile){e.next=15;break}e.t0=this.item.createContentJSONFromProperties(),e.next=19;break;case 15:return e.next=17,SFJS.crypto.base64(JSON.stringify(this.item.createContentJSONFromProperties()));case 17:e.t1=e.sent,e.t0="000"+e.t1;case 19:t.content=e.t0,this.forExportFile||(t.enc_item_key=null,t.auth_hash=null);case 21:e.next=26;break;case 23:t.content=this.item.content,t.enc_item_key=this.item.enc_item_key,t.auth_hash=this.item.auth_hash;case 26:return this.additionalFields&&_.merge(t,_.pick(this.item,this.additionalFields)),e.abrupt("return",t);case 28:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}();i.SFItemParams=R;var L=function(){function e(t,n,r){y(this,e),this.keypath=t,this.operator=n,this.value=r,e.IsRecursiveOperator(this.operator)&&(this.value=this.value.map(e.fromArray))}return w(e,null,[{key:"fromArray",value:function(t){return new e(t[0],t[1],t[2])}},{key:"ObjectSatisfiesPredicate",value:function(t,n){if(Array.isArray(n)&&(n=this.fromArray(n)),e.IsRecursiveOperator(n.operator)){if("and"===n.operator){var r=!0,i=!1,o=void 0;try{for(var a,u=n.value[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value;if(!this.ObjectSatisfiesPredicate(t,s))return!1}}catch(e){i=!0,o=e}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return!0}if("or"===n.operator){var c=!0,l=!1,f=void 0;try{for(var d,p=n.value[Symbol.iterator]();!(c=(d=p.next()).done);c=!0)if(s=d.value,this.ObjectSatisfiesPredicate(t,s))return!0}catch(e){l=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(l)throw f}}return!1}}var h=n.value;"string"==typeof h&&h.includes(".ago")&&(h=this.DateFromString(h));var v=n.keypath.split(".").reduce((function(e,t){return e&&e[t]}),t),g=[!1,"",null,void 0,NaN];return null==v?"!="==n.operator?!g.includes(n.value):g.includes(n.value):"="==n.operator?Array.isArray(v)?JSON.stringify(v)==JSON.stringify(h):v==h:"!="==n.operator?Array.isArray(v)?JSON.stringify(v)!=JSON.stringify(h):v!==h:"<"==n.operator?v<h:">"==n.operator?v>h:"<="==n.operator?v<=h:">="==n.operator?v>=h:"startsWith"==n.operator?v.startsWith(h):"in"==n.operator?-1!=h.indexOf(v):"includes"==n.operator?this.resolveIncludesPredicate(v,h):"matches"==n.operator&&new RegExp(h).test(v)}},{key:"resolveIncludesPredicate",value:function(t,n){if("string"==typeof n)return t.includes(n);var r;r=Array.isArray(n)?e.fromArray(n):n;var i=!0,o=!1,a=void 0;try{for(var u,s=t[Symbol.iterator]();!(i=(u=s.next()).done);i=!0){var c=u.value;if(this.ObjectSatisfiesPredicate(c,r))return!0}}catch(e){o=!0,a=e}finally{try{i||null==s.return||s.return()}finally{if(o)throw a}}return!1}},{key:"ItemSatisfiesPredicate",value:function(t,n){return Array.isArray(n)&&(n=e.fromArray(n)),this.ObjectSatisfiesPredicate(t,n)}},{key:"ItemSatisfiesPredicates",value:function(e,t){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var u=o.value;if(!this.ItemSatisfiesPredicate(e,u))return!1}}catch(e){r=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return!0}},{key:"DateFromString",value:function(e){var t=e.split("."),n=t[1],r=new Date,i=parseInt(t[0]);return"days"==n?r.setDate(r.getDate()-i):"hours"==n&&r.setHours(r.getHours()-i),r}},{key:"IsRecursiveOperator",value:function(e){return["and","or"].includes(e)}}]),e}();i.SFPredicate=L;var j=function(e){function t(e){var n;return y(this,t),(n=l(this,f(t).call(this,e))).content.desktopPrivileges||(n.content.desktopPrivileges={}),n}return d(t,e),w(t,null,[{key:"contentType",value:function(){return"SN|Privileges"}}]),w(t,[{key:"setCredentialsForAction",value:function(e,t){this.content.desktopPrivileges[e]=t}},{key:"getCredentialsForAction",value:function(e){return this.content.desktopPrivileges[e]||[]}},{key:"toggleCredentialForAction",value:function(e,t){this.isCredentialRequiredForAction(e,t)?this.removeCredentialForAction(e,t):this.addCredentialForAction(e,t)}},{key:"removeCredentialForAction",value:function(e,t){_.pull(this.content.desktopPrivileges[e],t)}},{key:"addCredentialForAction",value:function(e,t){var n=this.getCredentialsForAction(e);n.push(t),this.setCredentialsForAction(e,n)}},{key:"isCredentialRequiredForAction",value:function(e,t){return this.getCredentialsForAction(e).includes(t)}}]),t}(M);i.SFPrivileges=j;var F=function(e){function t(e){var n;return y(this,t),(n=l(this,f(t).call(this,e))).content.itemUUIDToItemHistoryMapping||(n.content.itemUUIDToItemHistoryMapping={}),Object.keys(n.content.itemUUIDToItemHistoryMapping).forEach((function(e){var t=n.content.itemUUIDToItemHistoryMapping[e];n.content.itemUUIDToItemHistoryMapping[e]=new B(t)})),n}return d(t,e),w(t,[{key:"addEntryForItem",value:function(e){return this.historyForItem(e).addHistoryEntryForItem(e)}},{key:"historyForItem",value:function(e){var t=this.content.itemUUIDToItemHistoryMapping[e.uuid];return t||(t=this.content.itemUUIDToItemHistoryMapping[e.uuid]=new B),t}},{key:"clearItemHistory",value:function(e){this.historyForItem(e).clear()}},{key:"clearAllHistory",value:function(){this.content.itemUUIDToItemHistoryMapping={}}},{key:"optimizeHistoryForItem",value:function(e){var n=this.historyForItem(e);n.entries.length>t.LargeItemEntryAmountThreshold&&n.optimize()}}]),t}(M);i.SFHistorySession=F,F.LargeItemEntryAmountThreshold=60;var B=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(y(this,e),this.entries||(this.entries=[]),t.entries){var n=!0,r=!1,i=void 0;try{for(var o,a=t.entries[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var u=o.value,s=this.createEntryForItem(u.item);s.setPreviousEntry(this.getLastEntry()),this.entries.push(s)}}catch(e){r=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}}}return w(e,[{key:"createEntryForItem",value:function(t){var n=e.HistoryEntryClassMapping&&e.HistoryEntryClassMapping[t.content_type];return n||(n=z),new n(t)}},{key:"getLastEntry",value:function(){return this.entries[this.entries.length-1]}},{key:"addHistoryEntryForItem",value:function(e){var t=this.createEntryForItem(e),n=this.getLastEntry();if(t.setPreviousEntry(n),!t.isSameAsEntry(n))return this.entries.push(t),t}},{key:"clear",value:function(){this.entries.length=0}},{key:"optimize",value:function(){var t=this,n=[],r=function(t){return t.deltaSize()>e.LargeEntryDeltaThreshold},i=function(e,i,o){if(o?n.push(e):-1!==(i=n.indexOf(e))&&n.splice(i,1),o&&r(e)&&-1==e.operationVector()){var a=t.entries[i-1];a&&n.push(a)}};this.entries.forEach((function(e,n){if(0==n||n==t.entries.length-1)i(e,n,!0);else{var o=r(e);i(e,n,o)}})),this.entries=this.entries.filter((function(e,t){return-1!==n.indexOf(e)}))}}]),e}();i.SFItemHistory=B,B.LargeEntryDeltaThreshold=15;var z=function(){function e(t){y(this,e),this.item=M.deepMerge({},t),this.defaultContentKeyToDiffOn="text",this.textCharDiffLength=0,"string"==typeof this.item.updated_at&&(this.item.updated_at=new Date(this.item.updated_at))}return w(e,[{key:"setPreviousEntry",value:function(e){this.hasPreviousEntry=null!=e,this.item.content[this.defaultContentKeyToDiffOn]&&(this.textCharDiffLength=e?this.item.content[this.defaultContentKeyToDiffOn].length-e.item.content[this.defaultContentKeyToDiffOn].length:this.item.content[this.defaultContentKeyToDiffOn].length)}},{key:"operationVector",value:function(){return null!=this.textCharDiffLength?this.hasPreviousEntry&&0!=this.textCharDiffLength?this.textCharDiffLength<0?-1:1:0:1}},{key:"deltaSize",value:function(){return null!=this.textCharDiffLength?Math.abs(this.textCharDiffLength):1}},{key:"isSameAsEntry",value:function(e){if(!e)return!1;var t=new M(this.item),n=new M(e.item);return t.isItemContentEqualWith(n)}}]),e}();i.SFItemHistoryEntry=z,S="undefined"!=typeof window?window:void 0!==e?e:null;var U=function(){function e(){y(this,e),this.DefaultPBKDF2Length=768}var t,n,i,o,a,u,s,l,f,d,p,h,v,g,b;return w(e,[{key:"generateUUIDSync",value:function(){var e=S.crypto||S.msCrypto;if(e){var t=new Uint32Array(4);e.getRandomValues(t);var n=-1;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){n++;var r=t[n>>3]>>n%8*4&15;return("x"==e?r:3&r|8).toString(16)}))}var r=(new Date).getTime();return S.performance&&"function"==typeof S.performance.now&&(r+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=(r+16*Math.random())%16|0;return r=Math.floor(r/16),("x"==e?t:3&t|8).toString(16)}))}},{key:"generateUUID",value:(b=m(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.generateUUIDSync());case 1:case"end":return e.stop()}}),e,this)}))),function(){return b.apply(this,arguments)})},{key:"timingSafeEqual",value:function(e,t){var n=String(e),r=String(t),i=n.length,o=0;i!==r.length&&(r=n,o=1);for(var a=0;a<i;a++)o|=n.charCodeAt(a)^r.charCodeAt(a);return 0===o}},{key:"decryptText",value:(g=m(r().mark((function e(){var t,n,i,o,a,u,s,l,f,d,p,h=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=h.length>0&&void 0!==h[0]?h[0]:{},n=t.ciphertextToAuth,i=t.contentCiphertext,o=t.encryptionKey,a=t.iv,u=t.authHash,s=t.authKey,!(h.length>1?h[1]:void 0)||u){e.next=5;break}return console.error("Auth hash is required."),e.abrupt("return");case 5:if(!u){e.next=12;break}return e.next=8,this.hmac256(n,s);case 8:if(l=e.sent,!1!==this.timingSafeEqual(u,l)){e.next=12;break}return console.error("Auth hash does not match, returning null."),e.abrupt("return",null);case 12:return f=c.enc.Hex.parse(o),d=c.enc.Hex.parse(a||""),p=c.AES.decrypt(i,f,{iv:d,mode:c.mode.CBC,padding:c.pad.Pkcs7}),e.abrupt("return",p.toString(c.enc.Utf8));case 16:case"end":return e.stop()}}),e,this)}))),function(){return g.apply(this,arguments)})},{key:"encryptText",value:(v=m(r().mark((function e(t,n,i){var o,a,u;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=c.enc.Hex.parse(n),a=c.enc.Hex.parse(i||""),u=c.AES.encrypt(t,o,{iv:a,mode:c.mode.CBC,padding:c.pad.Pkcs7}),e.abrupt("return",u.toString());case 4:case"end":return e.stop()}}),e)}))),function(e,t,n){return v.apply(this,arguments)})},{key:"generateRandomKey",value:(h=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.lib.WordArray.random(t/8).toString());case 1:case"end":return e.stop()}}),e)}))),function(e){return h.apply(this,arguments)})},{key:"generateItemEncryptionKey",value:(p=m(r().mark((function e(){var t,n,i,o;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=512,n=1,e.next=4,this.generateRandomKey(t);case 4:return i=e.sent,e.next=7,this.generateRandomKey(t);case 7:return o=e.sent,e.abrupt("return",this.pbkdf2(o,i,n,t));case 9:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"firstHalfOfKey",value:(d=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.substring(0,t.length/2));case 1:case"end":return e.stop()}}),e)}))),function(e){return d.apply(this,arguments)})},{key:"secondHalfOfKey",value:(f=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.substring(t.length/2,t.length));case 1:case"end":return e.stop()}}),e)}))),function(e){return f.apply(this,arguments)})},{key:"base64",value:(l=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",S.btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode("0x"+t)}))));case 1:case"end":return e.stop()}}),e)}))),function(e){return l.apply(this,arguments)})},{key:"base64Decode",value:(s=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",S.atob(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return s.apply(this,arguments)})},{key:"sha256",value:(u=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.SHA256(t).toString());case 1:case"end":return e.stop()}}),e)}))),function(e){return u.apply(this,arguments)})},{key:"hmac256",value:(a=m(r().mark((function e(t,n){var i,o,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=c.enc.Hex.parse(n),o=c.enc.Utf8.parse(t),a=c.HmacSHA256(o,i).toString(),e.abrupt("return",a);case 4:case"end":return e.stop()}}),e)}))),function(e,t){return a.apply(this,arguments)})},{key:"generateSalt",value:(o=m(r().mark((function e(t,n,i,o){var a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sha256([t,"SF",n,i,o].join(":"));case 2:return a=e.sent,e.abrupt("return",a);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t,n,r){return o.apply(this,arguments)})},{key:"generateSymmetricKeyPair",value:(i=m(r().mark((function e(){var t,n,i,o,a,u,s,c,l,f,d=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.length>0&&void 0!==d[0]?d[0]:{},n=t.password,i=t.pw_salt,o=t.pw_cost,e.next=3,this.pbkdf2(n,i,o,this.DefaultPBKDF2Length);case 3:return a=e.sent,u=a.length,s=u/3,c=a.slice(0,s),l=a.slice(s,2*s),f=a.slice(2*s,3*s),e.abrupt("return",[c,l,f]);case 10:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"computeEncryptionKeysForUser",value:(n=m(r().mark((function e(t,n){var i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("003"!=n.version){e.next=9;break}if(n.identifier){e.next=4;break}return console.error("authParams is missing identifier."),e.abrupt("return");case 4:return e.next=6,this.generateSalt(n.identifier,n.version,n.pw_cost,n.pw_nonce);case 6:i=e.sent,e.next=10;break;case 9:i=n.pw_salt;case 10:return e.abrupt("return",this.generateSymmetricKeyPair({password:t,pw_salt:i,pw_cost:n.pw_cost}).then((function(e){return{pw:e[0],mk:e[1],ak:e[2]}})));case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"generateInitialKeysAndAuthParamsForUser",value:(t=m(r().mark((function e(t,n){var i,o,a,u;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=this.SFJS.version,o=this.SFJS.defaultPasswordGenerationCost,e.next=4,this.generateRandomKey(256);case 4:return a=e.sent,e.next=7,this.generateSalt(t,i,o,a);case 7:return u=e.sent,e.abrupt("return",this.generateSymmetricKeyPair({password:n,pw_salt:u,pw_cost:o}).then((function(e){var n={pw_nonce:a,pw_cost:o,identifier:t,version:i};return{keys:{pw:e[0],mk:e[1],ak:e[2]},authParams:n}})));case 9:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})}]),e}();i.SFAbstractCrypto=U;var H=function(e){function t(){return y(this,t),l(this,f(t).apply(this,arguments))}var n;return d(t,e),w(t,[{key:"pbkdf2",value:(n=m(r().mark((function e(t,n,i,o){var a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a={keySize:o/32,hasher:c.algo.SHA512,iterations:i},e.abrupt("return",c.PBKDF2(t,n,a).toString());case 2:case"end":return e.stop()}}),e)}))),function(e,t,r,i){return n.apply(this,arguments)})}]),t}(U);i.SFCryptoJS=H;var W=(S="undefined"!=typeof window?window:void 0!==e?e:null).crypto?S.crypto.subtle:null,V=function(e){function t(){return y(this,t),l(this,f(t).apply(this,arguments))}var n,i,o,a,u,s,c,p,h,v,g,b,x,k;return d(t,e),w(t,[{key:"pbkdf2",value:(k=m(r().mark((function e(t,n,i,o){var a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.webCryptoImportKey(t,"PBKDF2",["deriveBits"]);case 2:if(a=e.sent){e.next=6;break}return console.log("Key is null, unable to continue"),e.abrupt("return",null);case 6:return e.abrupt("return",this.webCryptoDeriveBits(a,n,i,o));case 7:case"end":return e.stop()}}),e,this)}))),function(e,t,n,r){return k.apply(this,arguments)})},{key:"generateRandomKey",value:(x=m(r().mark((function e(t){var n=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",W.generateKey({name:"AES-CBC",length:t},!0,["encrypt","decrypt"]).then((function(e){return W.exportKey("raw",e).then(function(){var e=m(r().mark((function e(t){var i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.arrayBufferToHexString(new Uint8Array(t));case 2:return i=e.sent,e.abrupt("return",i);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){console.error("Error exporting key",e)}))})).catch((function(e){console.error("Error generating key",e)})));case 2:case"end":return e.stop()}}),e)}))),function(e){return x.apply(this,arguments)})},{key:"generateItemEncryptionKey",value:(b=m(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all([this.generateRandomKey(256),this.generateRandomKey(256)]).then((function(e){return e.join("")})));case 2:case"end":return e.stop()}}),e,this)}))),function(){return b.apply(this,arguments)})},{key:"encryptText",value:(g=m(r().mark((function e(t,n,i){var o,a,u,s,c,l=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!i){e.next=6;break}return e.next=3,this.hexStringToArrayBuffer(i);case 3:e.t0=e.sent,e.next=7;break;case 6:e.t0=new ArrayBuffer(16);case 7:return o=e.t0,a={name:"AES-CBC",iv:o},e.next=11,this.hexStringToArrayBuffer(n);case 11:return u=e.sent,e.next=14,this.webCryptoImportKey(u,a.name,["encrypt"]);case 14:return s=e.sent,e.next=17,this.stringToArrayBuffer(t);case 17:return c=e.sent,e.abrupt("return",crypto.subtle.encrypt(a,s,c).then(function(){var e=m(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.arrayBufferToBase64(t);case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 19:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return g.apply(this,arguments)})},{key:"decryptText",value:(v=m(r().mark((function e(){var t,n,i,o,a,u,s,c,l,f,d,p,h,v=this,g=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=g.length>0&&void 0!==g[0]?g[0]:{},n=t.ciphertextToAuth,i=t.contentCiphertext,o=t.encryptionKey,a=t.iv,u=t.authHash,s=t.authKey,!(g.length>1?g[1]:void 0)||u){e.next=5;break}return console.error("Auth hash is required."),e.abrupt("return");case 5:if(!u){e.next=12;break}return e.next=8,this.hmac256(n,s);case 8:if(c=e.sent,!1!==this.timingSafeEqual(u,c)){e.next=12;break}return console.error("Auth hash does not match, returning null. ".concat(u," != ").concat(c)),e.abrupt("return",null);case 12:if(!a){e.next=18;break}return e.next=15,this.hexStringToArrayBuffer(a);case 15:e.t0=e.sent,e.next=19;break;case 18:e.t0=new ArrayBuffer(16);case 19:return l=e.t0,f={name:"AES-CBC",iv:l},e.next=23,this.hexStringToArrayBuffer(o);case 23:return d=e.sent,e.next=26,this.webCryptoImportKey(d,f.name,["decrypt"]);case 26:return p=e.sent,e.next=29,this.base64ToArrayBuffer(i);case 29:return h=e.sent,e.abrupt("return",crypto.subtle.decrypt(f,p,h).then(function(){var e=m(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,v.arrayBufferToString(t);case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){console.error("Error decrypting:",e)})));case 31:case"end":return e.stop()}}),e,this)}))),function(){return v.apply(this,arguments)})},{key:"hmac256",value:(h=m(r().mark((function e(t,n){var i,o,a,u=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.hexStringToArrayBuffer(n);case 2:return i=e.sent,e.next=5,this.webCryptoImportKey(i,"HMAC",["sign"],{name:"SHA-256"});case 5:return o=e.sent,e.next=8,this.stringToArrayBuffer(t);case 8:return a=e.sent,e.abrupt("return",crypto.subtle.sign({name:"HMAC"},o,a).then(function(){var e=m(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u.arrayBufferToHexString(t);case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){console.error("Error computing hmac",e)})));case 10:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"webCryptoImportKey",value:(p=m(r().mark((function e(t,n,i,o){var a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"!=typeof t){e.next=6;break}return e.next=3,this.stringToArrayBuffer(t);case 3:e.t0=e.sent,e.next=7;break;case 6:e.t0=t;case 7:return a=e.t0,e.abrupt("return",W.importKey("raw",a,{name:n,hash:o},!1,i).then((function(e){return e})).catch((function(e){return console.error(e),null})));case 9:case"end":return e.stop()}}),e,this)}))),function(e,t,n,r){return p.apply(this,arguments)})},{key:"webCryptoDeriveBits",value:(c=m(r().mark((function e(t,n,i,o){var a,u=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.stringToArrayBuffer(n);case 2:return e.t0=e.sent,e.t1=i,e.t2={name:"SHA-512"},a={name:"PBKDF2",salt:e.t0,iterations:e.t1,hash:e.t2},e.abrupt("return",W.deriveBits(a,t,o).then(function(){var e=m(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u.arrayBufferToHexString(new Uint8Array(t));case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){return console.error(e),null})));case 7:case"end":return e.stop()}}),e,this)}))),function(e,t,n,r){return c.apply(this,arguments)})},{key:"stringToArrayBuffer",value:(s=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){var r=new Blob([t]),i=new FileReader;i.onload=function(t){e(t.target.result)},i.readAsArrayBuffer(r)})));case 1:case"end":return e.stop()}}),e)}))),function(e){return s.apply(this,arguments)})},{key:"arrayBufferToString",value:(u=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){var r=new Blob([t]),i=new FileReader;i.onload=function(t){e(t.target.result)},i.readAsText(r)})));case 1:case"end":return e.stop()}}),e)}))),function(e){return u.apply(this,arguments)})},{key:"arrayBufferToHexString",value:(a=m(r().mark((function e(t){var n,i,o,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=new Uint8Array(t),i="",a=0;a<n.byteLength;a++)(o=n[a].toString(16)).length<2&&(o="0"+o),i+=o;return e.abrupt("return",i);case 4:case"end":return e.stop()}}),e)}))),function(e){return a.apply(this,arguments)})},{key:"hexStringToArrayBuffer",value:(o=m(r().mark((function e(t){var n,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=[],i=0;i<t.length;i+=2)n.push(parseInt(t.substr(i,2),16));return e.abrupt("return",new Uint8Array(n));case 2:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"base64ToArrayBuffer",value:(i=m(r().mark((function e(t){var n,i,o,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.base64Decode(t);case 2:for(n=e.sent,i=n.length,o=new Uint8Array(i),a=0;a<i;a++)o[a]=n.charCodeAt(a);return e.abrupt("return",o.buffer);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"arrayBufferToBase64",value:(n=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){var r=new Blob([t],{type:"application/octet-binary"}),i=new FileReader;i.onload=function(t){var n=t.target.result;e(n.substr(n.indexOf(",")+1))},i.readAsDataURL(r)})));case 1:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)})}]),t}(U);i.SFCryptoWeb=V;var G=function(){function e(t){y(this,e),this.crypto=t}var t,n,i,o;return w(e,[{key:"_private_encryptString",value:(o=m(r().mark((function e(t,n,i,o,a){var u,s,c,l,f,d;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("001"!==a.version){e.next=7;break}return e.next=3,this.crypto.encryptText(t,n,null);case 3:s=e.sent,u=a.version+s,e.next=21;break;case 7:return e.next=9,this.crypto.generateRandomKey(128);case 9:return c=e.sent,e.next=12,this.crypto.encryptText(t,n,c);case 12:return s=e.sent,l=[a.version,o,c,s].join(":"),e.next=16,this.crypto.hmac256(l,i);case 16:return f=e.sent,e.next=19,this.crypto.base64(JSON.stringify(a));case 19:d=e.sent,u=[a.version,f,o,c,s,d].join(":");case 21:return e.abrupt("return",u);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t,n,r,i){return o.apply(this,arguments)})},{key:"encryptItem",value:(i=m(r().mark((function e(t,n,i){var o,a,u,s,c,l;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o={},e.next=3,this.crypto.generateItemEncryptionKey();case 3:if(a=e.sent,"001"!==i.version){e.next=10;break}return e.next=7,this.crypto.encryptText(a,n.mk,null);case 7:o.enc_item_key=e.sent,e.next=13;break;case 10:return e.next=12,this._private_encryptString(a,n.mk,n.ak,t.uuid,i);case 12:o.enc_item_key=e.sent;case 13:return e.next=15,this.crypto.firstHalfOfKey(a);case 15:return u=e.sent,e.next=18,this.crypto.secondHalfOfKey(a);case 18:return s=e.sent,e.next=21,this._private_encryptString(JSON.stringify(t.createContentJSONFromProperties()),u,s,t.uuid,i);case 21:if(c=e.sent,"001"!==i.version){e.next=27;break}return e.next=25,this.crypto.hmac256(c,s);case 25:l=e.sent,o.auth_hash=l;case 27:return o.content=c,e.abrupt("return",o);case 29:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return i.apply(this,arguments)})},{key:"encryptionComponentsFromString",value:function(e,t,n){var r=e.substring(0,3);if("001"===r)return{contentCiphertext:e.substring(3,e.length),encryptionVersion:r,ciphertextToAuth:e,iv:null,authHash:null,encryptionKey:t,authKey:n};var i=e.split(":");return{encryptionVersion:i[0],authHash:i[1],uuid:i[2],iv:i[3],contentCiphertext:i[4],authParams:i[5],ciphertextToAuth:[i[0],i[2],i[3],i[4]].join(":"),encryptionKey:t,authKey:n}}},{key:"decryptItem",value:(n=m(r().mark((function e(t,n){var i,o,a,u,s,c,l,f;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"==typeof t.content){e.next=2;break}return e.abrupt("return");case 2:if(!t.content.startsWith("000")){e.next=14;break}return e.prev=3,e.t0=JSON,e.next=7,this.crypto.base64Decode(t.content.substring(3,t.content.length));case 7:e.t1=e.sent,t.content=e.t0.parse.call(e.t0,e.t1),e.next=13;break;case 11:e.prev=11,e.t2=e.catch(3);case 13:return e.abrupt("return");case 14:if(t.enc_item_key){e.next=17;break}return console.log("Missing item encryption key, skipping decryption."),e.abrupt("return");case 17:if(i=t.enc_item_key,o=!0,i.startsWith("002")||i.startsWith("003")||(i="001"+i,o=!1),!(a=this.encryptionComponentsFromString(i,n.mk,n.ak)).uuid||a.uuid===t.uuid){e.next=26;break}return console.error("Item key params UUID does not match item UUID"),t.errorDecrypting||(t.errorDecryptingValueChanged=!0),t.errorDecrypting=!0,e.abrupt("return");case 26:return e.next=28,this.crypto.decryptText(a,o);case 28:if(u=e.sent){e.next=34;break}return console.log("Error decrypting item",t),t.errorDecrypting||(t.errorDecryptingValueChanged=!0),t.errorDecrypting=!0,e.abrupt("return");case 34:return e.next=36,this.crypto.firstHalfOfKey(u);case 36:return s=e.sent,e.next=39,this.crypto.secondHalfOfKey(u);case 39:return c=e.sent,l=this.encryptionComponentsFromString(t.content,s,c),e.prev=41,e.t3=JSON,e.next=45,this.crypto.base64Decode(l.authParams);case 45:e.t4=e.sent,t.auth_params=e.t3.parse.call(e.t3,e.t4),e.next=51;break;case 49:e.prev=49,e.t5=e.catch(41);case 51:if(!l.uuid||l.uuid===t.uuid){e.next=55;break}return t.errorDecrypting||(t.errorDecryptingValueChanged=!0),t.errorDecrypting=!0,e.abrupt("return");case 55:return l.authHash||(l.authHash=t.auth_hash),e.next=58,this.crypto.decryptText(l,!0);case 58:(f=e.sent)?(1==t.errorDecrypting&&(t.errorDecryptingValueChanged=!0),t.errorDecrypting=!1,t.content=f):(t.errorDecrypting||(t.errorDecryptingValueChanged=!0),t.errorDecrypting=!0);case 60:case"end":return e.stop()}}),e,this,[[3,11],[41,49]])}))),function(e,t){return n.apply(this,arguments)})},{key:"decryptMultipleItems",value:(t=m(r().mark((function e(t,n,i){var o,a=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=function(){var e=m(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:if(1!=t.deleted||null!=t.content){e.next=4;break}return e.abrupt("return");case 4:if(!("string"==typeof t.content||t.content instanceof String)){e.next=19;break}return e.prev=6,e.next=9,a.decryptItem(t,n);case 9:e.next=19;break;case 11:if(e.prev=11,e.t0=e.catch(6),t.errorDecrypting||(t.errorDecryptingValueChanged=!0),t.errorDecrypting=!0,!i){e.next=17;break}throw e.t0;case 17:return console.error("Error decrypting item",t,e.t0),e.abrupt("return");case 19:case"end":return e.stop()}}),e,null,[[6,11]])})));return function(t){return e.apply(this,arguments)}}(),e.abrupt("return",Promise.all(t.map((function(e){return o(e)}))));case 2:case"end":return e.stop()}}),e)}))),function(e,n,r){return t.apply(this,arguments)})}]),e}();i.SFItemTransformer=G,S="undefined"!=typeof window?window:void 0!==e?e:null;var K=function(){function e(t){y(this,e),S&&("undefined"!=typeof document&&document.documentMode||/Edge/.test(navigator.userAgent)||!S.crypto||!S.crypto.subtle?this.crypto=new H:this.crypto=new V),t&&(this.crypto=t),this.itemTransformer=new G(this.crypto),this.crypto.SFJS={version:this.version(),defaultPasswordGenerationCost:this.defaultPasswordGenerationCost()}}return w(e,[{key:"version",value:function(){return"003"}},{key:"supportsPasswordDerivationCost",value:function(e){return!(e>5e3)||this.crypto instanceof V}},{key:"supportedVersions",value:function(){return["001","002","003"]}},{key:"isVersionNewerThanLibraryVersion",value:function(e){var t=this.version();return parseInt(e)>parseInt(t)}},{key:"isProtocolVersionOutdated",value:function(e){var t={"001":Date.parse("2018-01-01"),"002":Date.parse("2020-01-01")}[e];return!!t&&new Date>t}},{key:"costMinimumForVersion",value:function(e){return{"001":3e3,"002":3e3,"003":11e4}[e]}},{key:"defaultPasswordGenerationCost",value:function(){return this.costMinimumForVersion(this.version())}}]),e}();if(i.StandardFile=K,S)try{S.StandardFile=K,S.SFJS=new K,S.SFCryptoWeb=V,S.SFCryptoJS=H,S.SFItemTransformer=G,S.SFModelManager=I,S.SFItem=M,S.SFItemParams=R,S.SFHttpManager=E,S.SFStorageManager=P,S.SFSyncManager=N,S.SFAuthManager=k,S.SFMigrationManager=C,S.SFAlertManager=x,S.SFPredicate=L,S.SFHistorySession=F,S.SFSessionHistoryManager=A,S.SFItemHistory=B,S.SFItemHistoryEntry=z,S.SFPrivilegesManager=O,S.SFPrivileges=j,S.SFSingletonManager=D}catch(e){console.log("Exception while exporting window variables",e)}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}).call(this,n(2))},function(e,t){!function(t){"use strict";var n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag",s="object"==typeof e,c=t.regeneratorRuntime;if(c)s&&(e.exports=c);else{(c=t.regeneratorRuntime=s?e.exports:{}).wrap=v;var l={},f={};f[o]=function(){return this};var d=Object.getPrototypeOf,p=d&&d(d(C([])));p&&p!==n&&r.call(p,o)&&(f=p);var h=b.prototype=m.prototype=Object.create(f);y.prototype=h.constructor=b,b.constructor=y,b[u]=y.displayName="GeneratorFunction",c.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},c.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u in e||(e[u]="GeneratorFunction")),e.prototype=Object.create(h),e},c.awrap=function(e){return{__await:e}},w(x.prototype),x.prototype[a]=function(){return this},c.AsyncIterator=x,c.async=function(e,t,n,r){var i=new x(v(e,t,n,r));return c.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(h),h[u]="Generator",h[o]=function(){return this},h.toString=function(){return"[object Generator]"},c.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},c.values=C,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(u&&s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}}}function v(e,t,n,r){var i=t&&t.prototype instanceof m?t:m,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var u=k(a,n);if(u){if(u===l)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=g(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}(e,n,a),o}function g(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function m(){}function y(){}function b(){}function w(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function x(e){var t;this._invoke=function(n,i){function o(){return new Promise((function(t,o){!function t(n,i,o,a){var u=g(e[n],e,i);if("throw"!==u.type){var s=u.arg,c=s.value;return c&&"object"==typeof c&&r.call(c,"__await")?Promise.resolve(c.__await).then((function(e){t("next",e,o,a)}),(function(e){t("throw",e,o,a)})):Promise.resolve(c).then((function(e){s.value=e,o(s)}),a)}a(u.arg)}(n,i,t,o)}))}return t=t?t.then(o,o):o()}}function k(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=g(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function C(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:I}}function I(){return{value:void 0,done:!0}}}(function(){return this}()||Function("return this")())},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){(function(e,r){var i;(function(){function o(e,t){return e.set(t[0],t[1]),e}function a(e,t){return e.add(t),e}function u(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function s(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function c(e,t){return!(null==e||!e.length)&&-1<v(e,t,0)}function l(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function f(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function d(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)n=t(n,e[r],r,e);return n}function p(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function h(e,t,n){var r=e.length;for(n+=-1;++n<r;)if(t(e[n],n,e))return n;return-1}function v(e,t,n){if(t==t)e:{--n;for(var r=e.length;++n<r;)if(e[n]===t){e=n;break e}e=-1}else e=h(e,g,n);return e}function g(e){return e!=e}function m(e,t){return e.has(t)}function y(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function b(e){var t=Object;return function(n){return e(t(n))}}function w(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function x(){}function k(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function S(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function _(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function E(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new _;++t<n;)this.add(e[t])}function C(e){this.size=(this.__data__=new S(e)).size}function I(e,t){var n,r=kn(e),i=!r&&xn(e),o=!r&&!i&&Sn(e),a=!r&&!i&&!o&&_n(e);if(r=r||i||o||a){i=e.length;for(var u=String,s=-1,c=Array(i);++s<i;)c[s]=u(s);i=c}else i=[];for(n in u=i.length,e)!t&&!Et.call(e,n)||r&&("length"==n||o&&("offset"==n||"parent"==n)||a&&("buffer"==n||"byteLength"==n||"byteOffset"==n)||ce(n,u))||i.push(n);return i}function O(e,t,n){(n===$e||xe(e[t],n))&&(n!==$e||t in e)||P(e,t,n)}function A(e,t,n){var r=e[t];Et.call(e,t)&&xe(r,n)&&(n!==$e||t in e)||P(e,t,n)}function D(e,t){for(var n=e.length;n--;)if(xe(e[n][0],t))return n;return-1}function P(e,t,n){"__proto__"==t&&zt?zt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function T(e,t,n,r,i,o){var a,u=1&t,s=2&t,c=4&t;if(n&&(a=i?n(e,r,i,o):n(e)),a!==$e)return a;if(!Ce(e))return e;if(r=kn(e)){if(a=function(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&Et.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return J(e,a)}else{var l=gn(e),f="[object Function]"==l||"[object GeneratorFunction]"==l;if(Sn(e))return K(e,u);if("[object Object]"==l||"[object Arguments]"==l||f&&!i){if(a=s||f?{}:ae(e),!u)return s?function(e,t){return Y(e,vn(e),t)}(e,function(e,t){return e&&Y(t,Be(t),e)}(a,e)):function(e,t){return Y(e,hn(e),t)}(e,function(e,t){return e&&Y(t,Fe(t),e)}(a,e))}else{if(!lt[l])return i?e:{};a=ue(e,l,T,u)}}if(o||(o=new C),i=o.get(e))return i;o.set(e,a),s=c?s?ne:te:s?Be:Fe;var d=r?$e:s(e);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n););}(d||e,(function(r,i){d&&(r=e[i=r]),A(a,i,T(r,t,n,i,e,o))})),a}function N(e,t){var n=[];return ln(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function M(e,t){for(var n=0,r=(t=G(t,e)).length;null!=e&&n<r;)e=e[he(t[n++])];return n&&n==r?e:$e}function R(e,t,n){return t=t(e),kn(e)?t:f(t,n(e))}function L(e){if(null==e)e=e===$e?"[object Undefined]":"[object Null]";else if(Bt&&Bt in Object(e)){var t=Et.call(e,Bt),n=e[Bt];try{e[Bt]=$e;var r=!0}catch(e){}var i=It.call(e);r&&(t?e[Bt]=n:delete e[Bt]),e=i}else e=It.call(e);return e}function j(e){return Ie(e)&&"[object Arguments]"==L(e)}function F(e,t,n,r,i){if(e===t)t=!0;else if(null==e||null==t||!Ie(e)&&!Ie(t))t=e!=e&&t!=t;else e:{var o,a,u=kn(e),s=kn(t),c="[object Object]"==(o="[object Arguments]"==(o=u?"[object Array]":gn(e))?"[object Object]":o);if(s="[object Object]"==(a="[object Arguments]"==(a=s?"[object Array]":gn(t))?"[object Object]":a),(a=o==a)&&Sn(e)){if(!Sn(t)){t=!1;break e}u=!0,c=!1}if(a&&!c)i||(i=new C),t=u||_n(e)?Q(e,t,n,r,F,i):function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!o(new Tt(e),new Tt(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return xe(+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 u=y;case"[object Set]":if(u||(u=w),e.size!=t.size&&!(1&r))break;return(n=a.get(e))?n==t:(r|=2,a.set(e,t),t=Q(u(e),u(t),r,i,o,a),a.delete(e),t);case"[object Symbol]":if(un)return un.call(e)==un.call(t)}return!1}(e,t,o,n,r,F,i);else{if(!(1&n)&&(u=c&&Et.call(e,"__wrapped__"),o=s&&Et.call(t,"__wrapped__"),u||o)){e=u?e.value():e,t=o?t.value():t,i||(i=new C),t=F(e,t,n,r,i);break e}if(a)t:if(i||(i=new C),u=1&n,o=te(e),s=o.length,a=te(t).length,s==a||u){for(c=s;c--;){var l=o[c];if(!(u?l in t:Et.call(t,l))){t=!1;break t}}if((a=i.get(e))&&i.get(t))t=a==t;else{a=!0,i.set(e,t),i.set(t,e);for(var f=u;++c<s;){var d=e[l=o[c]],p=t[l];if(r)var h=u?r(p,d,l,t,e,i):r(d,p,l,e,t,i);if(h===$e?d!==p&&!F(d,p,n,r,i):!h){a=!1;break}f||(f="constructor"==l)}a&&!f&&(n=e.constructor)!=(r=t.constructor)&&"constructor"in e&&"constructor"in t&&!("function"==typeof n&&n instanceof n&&"function"==typeof r&&r instanceof r)&&(a=!1),i.delete(e),i.delete(t),t=a}}else t=!1;else t=!1}}return t}function B(e){return"function"==typeof e?e:null==e?He:"object"==typeof e?kn(e)?function(e,t){return le(e)&&t==t&&!Ce(t)?de(he(e),t):function(n){var r=Le(n,e);return r===$e&&r===t?je(n,e):F(t,r,3)}}(e[0],e[1]):function(e){var t=function(e){for(var t=Fe(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,i==i&&!Ce(i)]}return t}(e);return 1==t.length&&t[0][2]?de(t[0][0],t[0][1]):function(n){return n===e||function(e,t){var n=t.length,r=n;if(null==e)return!r;for(e=Object(e);n--;)if((i=t[n])[2]?i[1]!==e[i[0]]:!(i[0]in e))return!1;for(;++n<r;){var i,o=(i=t[n])[0],a=e[o],u=i[1];if(i[2]){if(a===$e&&!(o in e))return!1}else if(!F(u,a,3,void 0,i=new C))return!1}return!0}(n,t)}}(e):Ge(e)}function z(e,t){var n=-1,r=ke(e)?Array(e.length):[];return ln(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function U(e,t,n,r,i){e!==t&&fn(t,(function(o,a){if(Ce(o)){i||(i=new C);var u=i,s=e[a],c=t[a];if(h=u.get(c))O(e,a,h);else{var l=(h=r?r(s,c,a+"",e,t,u):$e)===$e;if(l){var f=kn(c),d=!f&&Sn(c),p=!f&&!d&&_n(c),h=c;f||d||p?kn(s)?h=s:Se(s)?h=J(s):d?(l=!1,h=K(c,!0)):p?(l=!1,h=$(c,!0)):h=[]:Oe(c)||xn(c)?(h=s,xn(s)?h=Me(s):(!Ce(s)||n&&_e(s))&&(h=ae(c))):l=!1}l&&(u.set(c,h),U(h,c,n,r,u),u.delete(c)),O(e,a,h)}}else(u=r?r(e[a],o,a+"",e,t,i):$e)===$e&&(u=o),O(e,a,u)}),Be)}function H(e){return mn(pe(e,void 0,He),e+"")}function W(e){if("string"==typeof e)return e;if(kn(e))return l(e,W)+"";if(De(e))return sn?sn.call(e):"";var t=e+"";return"0"==t&&1/e==-Je?"-0":t}function V(e,t){var n;if(2>(t=G(t,e)).length)n=e;else{var r=0,i=-1,o=-1,a=(n=t).length;for(0>r&&(r=-r>a?0:a+r),0>(i=i>a?a:i)&&(i+=a),a=r>i?0:i-r>>>0,r>>>=0,i=Array(a);++o<a;)i[o]=n[o+r];n=M(e,i)}null==(e=n)||delete e[he(ye(t))]}function G(e,t){return kn(e)?e:le(e,t)?[e]:yn(Re(e))}function K(e,t){if(t)return e.slice();var n=e.length;return n=Nt?Nt(n):new e.constructor(n),e.copy(n),n}function q(e){var t=new e.constructor(e.byteLength);return new Tt(t).set(new Tt(e)),t}function $(e,t){return new e.constructor(t?q(e.buffer):e.buffer,e.byteOffset,e.length)}function J(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function Y(e,t,n){var r=!n;n||(n={});for(var i=-1,o=t.length;++i<o;){var a=t[i],u=$e;u===$e&&(u=e[a]),r?P(n,a,u):A(n,a,u)}return n}function Z(e){return H((function(t,n){var r,i=-1,o=n.length,a=1<o?n[o-1]:$e,u=2<o?n[2]:$e;if(a=3<e.length&&"function"==typeof a?(o--,a):$e,r=u){r=n[0];var s=n[1];if(Ce(u)){var c=typeof s;r=!!("number"==c?ke(u)&&ce(s,u.length):"string"==c&&s in u)&&xe(u[s],r)}else r=!1}for(r&&(a=3>o?$e:a,o=1),t=Object(t);++i<o;)(u=n[i])&&e(t,u,i,a);return t}))}function X(e){return Oe(e)?$e:e}function Q(e,t,n,r,i,o){var a=1&n,u=e.length;if(u!=(s=t.length)&&!(a&&s>u))return!1;if((s=o.get(e))&&o.get(t))return s==t;var s=-1,c=!0,l=2&n?new E:$e;for(o.set(e,t),o.set(t,e);++s<u;){var f=e[s],d=t[s];if(r)var h=a?r(d,f,s,t,e,o):r(f,d,s,e,t,o);if(h!==$e){if(h)continue;c=!1;break}if(l){if(!p(t,(function(e,t){if(!m(l,t)&&(f===e||i(f,e,n,r,o)))return l.push(t)}))){c=!1;break}}else if(f!==d&&!i(f,d,n,r,o)){c=!1;break}}return o.delete(e),o.delete(t),c}function ee(e){return mn(pe(e,$e,me),e+"")}function te(e){return R(e,Fe,hn)}function ne(e){return R(e,Be,vn)}function re(){var e=(e=x.iteratee||We)===We?B:e;return arguments.length?e(arguments[0],arguments[1]):e}function ie(e,t){var n=e.__data__,r=typeof t;return("string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t)?n["string"==typeof t?"string":"hash"]:n.map}function oe(e,t){var n=null==e?$e:e[t];return!Ce(n)||Ct&&Ct in n||!(_e(n)?At:at).test(ve(n))?$e:n}function ae(e){return"function"!=typeof e.constructor||fe(e)?{}:cn(Mt(e))}function ue(e,t,n,r){var i=e.constructor;switch(t){case"[object ArrayBuffer]":return q(e);case"[object Boolean]":case"[object Date]":return new i(+e);case"[object DataView]":return t=r?q(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return $(e,r);case"[object Map]":return d(t=r?n(y(e),1):y(e),o,new e.constructor);case"[object Number]":case"[object String]":return new i(e);case"[object RegExp]":return(t=new e.constructor(e.source,rt.exec(e))).lastIndex=e.lastIndex,t;case"[object Set]":return d(t=r?n(w(e),1):w(e),a,new e.constructor);case"[object Symbol]":return un?Object(un.call(e)):{}}}function se(e){return kn(e)||xn(e)||!!(Ft&&e&&e[Ft])}function ce(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||st.test(e))&&-1<e&&0==e%1&&e<t}function le(e,t){if(kn(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!De(e))||Xe.test(e)||!Ze.test(e)||null!=t&&e in Object(t)}function fe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||kt)}function de(e,t){return function(n){return null!=n&&n[e]===t&&(t!==$e||e in Object(n))}}function pe(e,t,n){return t=Gt(t===$e?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=Gt(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];for(i=-1,o=Array(t+1);++i<t;)o[i]=r[i];return o[t]=n(a),u(e,this,o)}}function he(e){if("string"==typeof e||De(e))return e;var t=e+"";return"0"==t&&1/e==-Je?"-0":t}function ve(e){if(null!=e){try{return _t.call(e)}catch(e){}return e+""}return""}function ge(e,t,n){var r=null==e?0:e.length;return r?(0>(n=null==n?0:Te(n))&&(n=Gt(r+n,0)),h(e,re(t,3),n)):-1}function me(e){return null!=e&&e.length?function e(t,n,r,i,o){var a=-1,u=t.length;for(r||(r=se),o||(o=[]);++a<u;){var s=t[a];0<n&&r(s)?1<n?e(s,n-1,r,i,o):f(o,s):i||(o[o.length]=s)}return o}(e,1):[]}function ye(e){var t=null==e?0:e.length;return t?e[t-1]:$e}function be(e,t){var n;if(e&&e.length&&t&&t.length){var r=v,i=-1,o=(n=t).length;for(e===n&&(n=J(n));++i<o;)for(var a=0,u=n[i];-1<(a=r(e,u,a,void 0));)e!=e&&jt.call(e,a,1),jt.call(e,a,1);n=e}else n=e;return n}function we(e,t){function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;return o.has(i)?o.get(i):(r=e.apply(this,r),n.cache=o.set(i,r)||o,r)}if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");return n.cache=new(we.Cache||_),n}function xe(e,t){return e===t||e!=e&&t!=t}function ke(e){return null!=e&&Ee(e.length)&&!_e(e)}function Se(e){return Ie(e)&&ke(e)}function _e(e){return!!Ce(e)&&("[object Function]"==(e=L(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}function Ee(e){return"number"==typeof e&&-1<e&&0==e%1&&9007199254740991>=e}function Ce(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ie(e){return null!=e&&"object"==typeof e}function Oe(e){return!(!Ie(e)||"[object Object]"!=L(e))&&(null===(e=Mt(e))||"function"==typeof(e=Et.call(e,"constructor")&&e.constructor)&&e instanceof e&&_t.call(e)==Ot)}function Ae(e){return"string"==typeof e||!kn(e)&&Ie(e)&&"[object String]"==L(e)}function De(e){return"symbol"==typeof e||Ie(e)&&"[object Symbol]"==L(e)}function Pe(e){return e?(e=Ne(e))===Je||e===-Je?17976931348623157e292*(0>e?-1:1):e==e?e:0:0===e?e:0}function Te(e){var t=(e=Pe(e))%1;return e==e?t?e-t:e:0}function Ne(e){if("number"==typeof e)return e;if(De(e))return Ye;if(Ce(e)&&(e=Ce(e="function"==typeof e.valueOf?e.valueOf():e)?e+"":e),"string"!=typeof e)return 0===e?e:+e;e=e.replace(tt,"");var t=ot.test(e);return t||ut.test(e)?dt(e.slice(2),t?2:8):it.test(e)?Ye:+e}function Me(e){return Y(e,Be(e))}function Re(e){return null==e?"":W(e)}function Le(e,t,n){return(e=null==e?$e:M(e,t))===$e?n:e}function je(e,t){var n;if(n=null!=e){for(var r,i=-1,o=(r=G(t,n=e)).length,a=!1;++i<o;){var u=he(r[i]);if(!(a=null!=n&&null!=n&&u in Object(n)))break;n=n[u]}n=a||++i!=o?a:!!(o=null==n?0:n.length)&&Ee(o)&&ce(u,o)&&(kn(n)||xn(n))}return n}function Fe(e){if(ke(e))e=I(e);else if(fe(e)){var t,n=[];for(t in Object(e))Et.call(e,t)&&"constructor"!=t&&n.push(t);e=n}else e=Vt(e);return e}function Be(e){if(ke(e))e=I(e,!0);else if(Ce(e)){var t,n=fe(e),r=[];for(t in e)("constructor"!=t||!n&&Et.call(e,t))&&r.push(t);e=r}else{if(t=[],null!=e)for(n in Object(e))t.push(n);e=t}return e}function ze(e){return null==e?[]:function(e,t){return l(t,(function(t){return e[t]}))}(e,Fe(e))}function Ue(e){return function(){return e}}function He(e){return e}function We(e){return B("function"==typeof e?e:T(e,1))}function Ve(){}function Ge(e){return le(e)?function(e){return function(t){return null==t?$e:t[e]}}(he(e)):function(e){return function(t){return M(t,e)}}(e)}function Ke(){return[]}function qe(){return!1}var $e,Je=1/0,Ye=NaN,Ze=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Xe=/^\w*$/,Qe=/^\./,et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tt=/^\s+|\s+$/g,nt=/\\(\\)?/g,rt=/\w*$/,it=/^[-+]0x[0-9a-f]+$/i,ot=/^0b[01]+$/i,at=/^\[object .+?Constructor\]$/,ut=/^0o[0-7]+$/i,st=/^(?:0|[1-9]\d*)$/,ct={};ct["[object Float32Array]"]=ct["[object Float64Array]"]=ct["[object Int8Array]"]=ct["[object Int16Array]"]=ct["[object Int32Array]"]=ct["[object Uint8Array]"]=ct["[object Uint8ClampedArray]"]=ct["[object Uint16Array]"]=ct["[object Uint32Array]"]=!0,ct["[object Arguments]"]=ct["[object Array]"]=ct["[object ArrayBuffer]"]=ct["[object Boolean]"]=ct["[object DataView]"]=ct["[object Date]"]=ct["[object Error]"]=ct["[object Function]"]=ct["[object Map]"]=ct["[object Number]"]=ct["[object Object]"]=ct["[object RegExp]"]=ct["[object Set]"]=ct["[object String]"]=ct["[object WeakMap]"]=!1;var lt={};lt["[object Arguments]"]=lt["[object Array]"]=lt["[object ArrayBuffer]"]=lt["[object DataView]"]=lt["[object Boolean]"]=lt["[object Date]"]=lt["[object Float32Array]"]=lt["[object Float64Array]"]=lt["[object Int8Array]"]=lt["[object Int16Array]"]=lt["[object Int32Array]"]=lt["[object Map]"]=lt["[object Number]"]=lt["[object Object]"]=lt["[object RegExp]"]=lt["[object Set]"]=lt["[object String]"]=lt["[object Symbol]"]=lt["[object Uint8Array]"]=lt["[object Uint8ClampedArray]"]=lt["[object Uint16Array]"]=lt["[object Uint32Array]"]=!0,lt["[object Error]"]=lt["[object Function]"]=lt["[object WeakMap]"]=!1;var ft,dt=parseInt,pt="object"==typeof e&&e&&e.Object===Object&&e,ht="object"==typeof self&&self&&self.Object===Object&&self,vt=pt||ht||Function("return this")(),gt=t&&!t.nodeType&&t,mt=gt&&"object"==typeof r&&r&&!r.nodeType&&r,yt=mt&&mt.exports===gt,bt=yt&&pt.process;e:{try{ft=bt&&bt.binding&&bt.binding("util");break e}catch(o){}ft=void 0}var wt=ft&&ft.isTypedArray,xt=Array.prototype,kt=Object.prototype,St=vt["__core-js_shared__"],_t=Function.prototype.toString,Et=kt.hasOwnProperty,Ct=function(){var e=/[^.]+$/.exec(St&&St.keys&&St.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),It=kt.toString,Ot=_t.call(Object),At=RegExp("^"+_t.call(Et).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Dt=yt?vt.Buffer:$e,Pt=vt.Symbol,Tt=vt.Uint8Array,Nt=Dt?Dt.a:$e,Mt=b(Object.getPrototypeOf),Rt=Object.create,Lt=kt.propertyIsEnumerable,jt=xt.splice,Ft=Pt?Pt.isConcatSpreadable:$e,Bt=Pt?Pt.toStringTag:$e,zt=function(){try{var e=oe(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Ut=Math.floor,Ht=Object.getOwnPropertySymbols,Wt=Dt?Dt.isBuffer:$e,Vt=b(Object.keys),Gt=Math.max,Kt=Math.min,qt=Date.now,$t=oe(vt,"DataView"),Jt=oe(vt,"Map"),Yt=oe(vt,"Promise"),Zt=oe(vt,"Set"),Xt=oe(vt,"WeakMap"),Qt=oe(Object,"create"),en=ve($t),tn=ve(Jt),nn=ve(Yt),rn=ve(Zt),on=ve(Xt),an=Pt?Pt.prototype:$e,un=an?an.valueOf:$e,sn=an?an.toString:$e,cn=function(){function e(){}return function(t){return Ce(t)?Rt?Rt(t):(e.prototype=t,t=new e,e.prototype=$e,t):{}}}();k.prototype.clear=function(){this.__data__=Qt?Qt(null):{},this.size=0},k.prototype.delete=function(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e},k.prototype.get=function(e){var t=this.__data__;return Qt?"__lodash_hash_undefined__"===(e=t[e])?$e:e:Et.call(t,e)?t[e]:$e},k.prototype.has=function(e){var t=this.__data__;return Qt?t[e]!==$e:Et.call(t,e)},k.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Qt&&t===$e?"__lodash_hash_undefined__":t,this},S.prototype.clear=function(){this.__data__=[],this.size=0},S.prototype.delete=function(e){var t=this.__data__;return!(0>(e=D(t,e))||(e==t.length-1?t.pop():jt.call(t,e,1),--this.size,0))},S.prototype.get=function(e){var t=this.__data__;return 0>(e=D(t,e))?$e:t[e][1]},S.prototype.has=function(e){return-1<D(this.__data__,e)},S.prototype.set=function(e,t){var n=this.__data__,r=D(n,e);return 0>r?(++this.size,n.push([e,t])):n[r][1]=t,this},_.prototype.clear=function(){this.size=0,this.__data__={hash:new k,map:new(Jt||S),string:new k}},_.prototype.delete=function(e){return e=ie(this,e).delete(e),this.size-=e?1:0,e},_.prototype.get=function(e){return ie(this,e).get(e)},_.prototype.has=function(e){return ie(this,e).has(e)},_.prototype.set=function(e,t){var n=ie(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},E.prototype.add=E.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},E.prototype.has=function(e){return this.__data__.has(e)},C.prototype.clear=function(){this.__data__=new S,this.size=0},C.prototype.delete=function(e){var t=this.__data__;return e=t.delete(e),this.size=t.size,e},C.prototype.get=function(e){return this.__data__.get(e)},C.prototype.has=function(e){return this.__data__.has(e)},C.prototype.set=function(e,t){var n=this.__data__;if(n instanceof S){var r=n.__data__;if(!Jt||199>r.length)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new _(r)}return n.set(e,t),this.size=n.size,this};var ln=function(e,t){if(null==e)return e;if(!ke(e))return function(e,t){return e&&fn(e,t,Fe)}(e,t);for(var n=e.length,r=-1,i=Object(e);++r<n&&!1!==t(i[r],r,i););return e},fn=function(e,t,n){for(var r=-1,i=Object(e),o=(n=n(e)).length;o--;){var a=n[++r];if(!1===t(i[a],a,i))break}return e},dn=zt?function(e,t){return zt(e,"toString",{configurable:!0,enumerable:!1,value:Ue(t),writable:!0})}:He,pn=Zt&&1/w(new Zt([,-0]))[1]==Je?function(e){return new Zt(e)}:Ve,hn=Ht?function(e){return null==e?[]:(e=Object(e),s(Ht(e),(function(t){return Lt.call(e,t)})))}:Ke,vn=Ht?function(e){for(var t=[];e;)f(t,hn(e)),e=Mt(e);return t}:Ke,gn=L;($t&&"[object DataView]"!=gn(new $t(new ArrayBuffer(1)))||Jt&&"[object Map]"!=gn(new Jt)||Yt&&"[object Promise]"!=gn(Yt.resolve())||Zt&&"[object Set]"!=gn(new Zt)||Xt&&"[object WeakMap]"!=gn(new Xt))&&(gn=function(e){var t=L(e);if(e=(e="[object Object]"==t?e.constructor:$e)?ve(e):"")switch(e){case en:return"[object DataView]";case tn:return"[object Map]";case nn:return"[object Promise]";case rn:return"[object Set]";case on:return"[object WeakMap]"}return t});var mn=function(e){var t=0,n=0;return function(){var r=qt(),i=16-(r-n);if(n=r,0<i){if(800<=++t)return arguments[0]}else t=0;return e.apply($e,arguments)}}(dn),yn=function(e){var t=(e=we(e,(function(e){return 500===t.size&&t.clear(),e}))).cache;return e}((function(e){var t=[];return Qe.test(e)&&t.push(""),e.replace(et,(function(e,n,r,i){t.push(r?i.replace(nt,"$1"):n||e)})),t})),bn=H(be),wn=function(e){return function(t,n,r){var i=Object(t);if(!ke(t)){var o=re(n,3);t=Fe(t),n=function(e){return o(i[e],e,i)}}return-1<(n=e(t,n,r))?i[o?t[n]:n]:$e}}(ge);we.Cache=_;var xn=j(function(){return arguments}())?j:function(e){return Ie(e)&&Et.call(e,"callee")&&!Lt.call(e,"callee")},kn=Array.isArray,Sn=Wt||qe,_n=wt?function(e){return function(t){return e(t)}}(wt):function(e){return Ie(e)&&Ee(e.length)&&!!ct[L(e)]},En=Z((function(e,t,n){U(e,t,n)})),Cn=Z((function(e,t,n,r){U(e,t,n,r)})),In=ee((function(e,t){var n={};if(null==e)return n;var r=!1;t=l(t,(function(t){return t=G(t,e),r||(r=1<t.length),t})),Y(e,ne(e),n),r&&(n=T(n,7,X));for(var i=t.length;i--;)V(n,t[i]);return n})),On=ee((function(e,t){return null==e?{}:function(e,t){return function(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],u=M(e,a);if(n(u,a)){var s=o;if(a=G(a,e),Ce(s))for(var c=-1,l=(a=G(a,s)).length,f=l-1;null!=s&&++c<l;){var d=he(a[c]),p=u;if(c!=f){var h=s[d];(p=$e)===$e&&(p=Ce(h)?h:ce(a[c+1])?[]:{})}A(s,d,p),s=s[d]}}}return o}(e,t,(function(t,n){return je(e,n)}))}(e,t)}));x.constant=Ue,x.filter=function(e,t){return(kn(e)?s:N)(e,re(t,3))},x.flatten=me,x.iteratee=We,x.keys=Fe,x.keysIn=Be,x.map=function(e,t){return(kn(e)?l:z)(e,re(t,3))},x.memoize=we,x.merge=En,x.mergeWith=Cn,x.omit=In,x.pick=On,x.property=Ge,x.pull=bn,x.pullAll=be,x.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=re(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}for(o=(r=e?i.length:0)-1;r--;)if(a=i[r],r==o||a!==u){var u=a;ce(a)?jt.call(e,a,1):V(e,a)}return n},x.toPlainObject=Me,x.uniq=function(e){if(e&&e.length)e:{var t=-1,n=c,r=e.length,i=!0,o=[],a=o;if(200<=r){if(n=pn(e)){e=w(n);break e}i=!1,n=m,a=new E}else a=o;t:for(;++t<r;){var u=s=e[t],s=0!==s?s:0;if(i&&u==u){for(var l=a.length;l--;)if(a[l]===u)continue t;o.push(s)}else n(a,u,void 0)||(a!==o&&a.push(u),o.push(s))}e=o}else e=[];return e},x.values=ze,x.cloneDeep=function(e){return T(e,5)},x.eq=xe,x.find=wn,x.findIndex=ge,x.get=Le,x.hasIn=je,x.identity=He,x.includes=function(e,t,n,r){return e=ke(e)?e:ze(e),n=n&&!r?Te(n):0,r=e.length,0>n&&(n=Gt(r+n,0)),Ae(e)?n<=r&&-1<e.indexOf(t,n):!!r&&-1<v(e,t,n)},x.isArguments=xn,x.isArray=kn,x.isArrayLike=ke,x.isArrayLikeObject=Se,x.isBuffer=Sn,x.isFunction=_e,x.isLength=Ee,x.isObject=Ce,x.isObjectLike=Ie,x.isPlainObject=Oe,x.isString=Ae,x.isSymbol=De,x.isTypedArray=_n,x.last=ye,x.stubArray=Ke,x.stubFalse=qe,x.noop=Ve,x.sortedIndexBy=function(e,t,n){t=(n=re(n,2))(t);for(var r=0,i=null==e?0:e.length,o=t!=t,a=null===t,u=De(t),s=t===$e;r<i;){var c=Ut((r+i)/2),l=n(e[c]),f=l!==$e,d=null===l,p=l==l,h=De(l);(o?p:s?p&&f:a?p&&f&&!d:u?p&&f&&!d&&!h:!d&&!h&&l<t)?r=c+1:i=c}return Kt(i,4294967294)},x.toFinite=Pe,x.toInteger=Te,x.toNumber=Ne,x.toString=Re,x.VERSION="4.17.4",vt._=x,void 0===(i=function(){return x}.call(t,n,t,r))||(r.exports=i)}).call(this)}).call(this,n(2),n(4)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return z})),n(1),n(3);var i=n(0);function o(e,t,n,r,i,o,a){try{var u=e[o](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,i)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function u(e){o(a,r,i,u,s,"next",e)}function s(e){o(a,r,i,u,s,"throw",e)}u(void 0)}))}}function u(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 o,a=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.componentManager=t,this.updateObservers=[],this.items=[]}var t,n,o,s,l;return t=e,(n=[{key:"getPlatform",value:function(){return this.componentManager.platform}},{key:"getEnvironment",value:function(){return this.componentManager.environment}},{key:"isMobile",value:function(){return"mobile"==this.getEnvironment()}},{key:"addEventHandler",value:function(e){var t={id:Math.random,callback:e};return this.updateObservers.push(t),t}},{key:"removeUpdateObserver",value:function(e){this.updateObservers.splice(this.updateObservers.indexOf(e),1)}},{key:"notifyObserversOfEvent",value:function(e){var t,n=u(this.updateObservers);try{for(n.s();!(t=n.n()).done;)t.value.callback(e)}catch(e){n.e(e)}finally{n.f()}}},{key:"filterItems",value:function(e){return this.items.filter((function(t){return t.content_type==e}))}},{key:"getFileDescriptors",value:function(){return this.filterItems(e.FileDescriptorContentTypeKey)}},{key:"beginStreamingFiles",value:function(){var t=this,n=[e.FileDescriptorContentTypeKey,e.FileSafeCredentialsContentType,e.FileSafeIntegrationContentTypeKey];this.componentManager.streamItems(n,(function(e){t.handleStreamItemsMessage(e)}))}},{key:"handleStreamItemsMessage",value:(l=a(r().mark((function t(n){var o,a,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=u(n),t.prev=1,o.s();case 3:if((a=o.n()).done){t.next=15;break}if(s=a.value,!(s=new i.SFItem(s)).deleted){t.next=9;break}return this.removeItemFromItems(s),t.abrupt("continue",13);case 9:if(!s.isMetadataUpdate){t.next=11;break}return t.abrupt("continue",13);case 11:(c=this.indexOfItem(s))>=0?this.items[c]=s:this.items.push(s);case 13:t.next=3;break;case 15:t.next=20;break;case 17:t.prev=17,t.t0=t.catch(1),o.e(t.t0);case 20:return t.prev=20,o.f(),t.finish(20);case 23:this.notifyObserversOfEvent(e.BridgeEventReceivedItems);case 24:case"end":return t.stop()}}),t,this,[[1,17,20,23]])}))),function(e){return l.apply(this,arguments)})},{key:"indexOfItem",value:function(e){for(var t in this.items)if(this.items[t].uuid==e.uuid)return t;return-1}},{key:"removeItemFromItems",value:function(e){this.items=this.items.filter((function(t){return t.uuid!==e.uuid}))}},{key:"createItem",value:function(e,t){this.createItems([e],t)}},{key:"createItems",value:function(e,t){this.componentManager.createItems(e,(function(e){t&&t(e.map((function(e){return new i.SFItem(e)})))}))}},{key:"saveItem",value:(s=a(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.saveItems([t]));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"saveItems",value:(o=a(r().mark((function t(n){var i=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){i.componentManager.saveItems(n,(function(n){t(n),i.notifyObserversOfEvent(e.BridgeEventSavedItem)}))})));case 1:case"end":return t.stop()}}),t)}))),function(e){return o.apply(this,arguments)})},{key:"indexOfItem",value:function(e){for(var t in this.items)if(this.items[t].uuid==e.uuid)return t;return-1}},{key:"deleteItem",value:function(e,t){this.deleteItems([e],t)}},{key:"deleteItems",value:function(e,t){this.componentManager.deleteItems(e,t)}},{key:"removeItemFromItems",value:function(e){this.items=this.items.filter((function(t){return t.uuid!==e.uuid}))}}])&&c(t.prototype,n),e}();function d(e,t,n,r,i,o,a){try{var u=e[o](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,i)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){d(o,r,i,a,u,"next",e)}function u(e){d(o,r,i,a,u,"throw",e)}a(void 0)}))}}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}l(f,"FileItemContentTypeKey","SN|FileSafe|File"),l(f,"FileSafeCredentialsContentType","SN|FileSafe|Credentials"),l(f,"FileDescriptorContentTypeKey","SN|FileSafe|FileMetadata"),l(f,"FileSafeIntegrationContentTypeKey","SN|FileSafe|Integration"),l(f,"BridgeEventLoadedCredentials","BridgeEventLoadedCredentials"),l(f,"BridgeEventReceivedItems","BridgeEventReceivedItems"),l(f,"BridgeEventSavedItem","BridgeEventSavedItem");var v=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.httpManger=new i.SFHttpManager,this.httpManger.setJWTRequestHandler((function(){}))}var t,n,o,a,u;return t=e,(n=[{key:"setCredentials",value:function(e){this.credentials=e}},{key:"uploadFile",value:(u=p(r().mark((function e(t,n,i){var o,a,u=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o="".concat(i.content.relayUrl,"/integrations/save-item"),a={file:{name:t,item:n},source:i.content.source,authorization:i.content.authorization},e.abrupt("return",new Promise((function(e,t){u.httpManger.postAbsolute(o,a,(function(t){e(t.metadata)}),(function(e){var n=e.error;n||(n={message:"File upload failed."}),console.log("Upload error response",n),t(n)}))})));case 3:case"end":return e.stop()}}),e)}))),function(e,t,n){return u.apply(this,arguments)})},{key:"downloadFile",value:(a=p(r().mark((function e(t,n){var i,o,a=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i="".concat(n.content.relayUrl,"/integrations/download-item"),o={metadata:t.content.serverMetadata,authorization:n.content.authorization},e.abrupt("return",new Promise((function(e,t){a.httpManger.postAbsolute(i,o,(function(t){e(t)}),(function(e){var n=e.error;console.log("Download error response",e),t(n)}))})));case 3:case"end":return e.stop()}}),e)}))),function(e,t){return a.apply(this,arguments)})},{key:"deleteFile",value:(o=p(r().mark((function e(t,n){var i,o,a=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i="".concat(n.content.relayUrl,"/integrations/delete-item"),o={metadata:t.content.serverMetadata,authorization:n.content.authorization},e.abrupt("return",new Promise((function(e,t){a.httpManger.postAbsolute(i,o,(function(t){e(t)}),(function(e){var n=e.error;console.log("Download error response",e),t(n)}))})));case 3:case"end":return e.stop()}}),e)}))),function(e,t){return o.apply(this,arguments)})}])&&h(t.prototype,n),e}();function g(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 o,a=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t,n,r,i,o,a){try{var u=e[o](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,i)}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var w=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.extensionBridge=t}var t,n,o,a;return t=e,(n=[{key:"integrationForFileDescriptor",value:function(e){return this.integrations.find((function(t){return e.content.serverMetadata&&t.content.source==e.content.serverMetadata.source}))}},{key:"parseIntegrationCode",value:function(e){var t=atob(e),n=JSON.parse(t);return n.rawCode=e,n}},{key:"saveIntegrationFromCode",value:(o=r().mark((function e(t){var n,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.parseIntegrationCode(t),0==this.integrations.length&&(n.isDefaultUploadSource=!0),i=this.createAndSaveIntegrationObject(n),e.abrupt("return",i);case 4:case"end":return e.stop()}}),e,this)})),a=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=o.apply(e,t);function a(e){y(i,n,r,a,u,"next",e)}function u(e){y(i,n,r,a,u,"throw",e)}a(void 0)}))},function(e){return a.apply(this,arguments)})},{key:"createAndSaveIntegrationObject",value:function(e){var t=new i.SFItem({content_type:f.FileSafeIntegrationContentTypeKey,content:e});return this.extensionBridge.createItems([t]),t}},{key:"getDefaultIntegration",value:function(){return this.integrations.find((function(e){return e.content.isDefaultUploadSource}))}},{key:"setIntegrationAsDefault",value:function(e){var t=[e],n=this.getDefaultIntegration();n&&(n.content.isDefaultUploadSource=!1,t.push(n)),e.content.isDefaultUploadSource=!0,this.extensionBridge.saveItems(t)}},{key:"displayStringForIntegration",value:function(e){var t,n,r=e.content.source.split("_"),i="",o=0,a=g(r);try{for(a.s();!(t=a.n()).done;){i+=(n=t.value).charAt(0).toUpperCase()+n.slice(1),o<r.length-1&&(i+=" "),o++}}catch(e){a.e(e)}finally{a.f()}return i}},{key:"deleteIntegration",value:function(e){var t=this,n=e.content.isDefaultUploadSource;this.extensionBridge.deleteItem(e,(function(r){if(r.deleted&&n&&t.integrations.length>0){var i,o=g(t.integrations);try{for(o.s();!(i=o.n()).done;){var a=i.value;if(a!=e){t.setIntegrationAsDefault(a);break}}}catch(e){o.e(e)}finally{o.f()}}}))}},{key:"integrations",get:function(){return this.extensionBridge.filterItems(f.FileSafeIntegrationContentTypeKey)}}])&&b(t.prototype,n),e}();function x(e,t,n,r,i,o,a){try{var u=e[o](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,i)}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function S(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=function(){function e(t){var n=this,r=t.extensionBridge,i=t.onCredentialLoad;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),_(this,"getDefaultCredentials",(function(){var e=n.credentials.find((function(e){return e.content.isDefault}));return!e&&n.credentials.length>0&&(e=n.credentials[0]),e})),_(this,"setCredentialAsDefault",(function(e){var t=n.getDefaultCredentials();t&&(t.content.isDefault=!1),e.content.isDefault=!0,n.extensionBridge.saveItems([t,e])})),_(this,"deleteCredential",(function(e){n.extensionBridge.deleteItem(e)})),this.extensionBridge=r,this.onCredentialLoad=i,this.credentials=[],this.extensionBridge.addEventHandler((function(e){e==f.BridgeEventReceivedItems&&n.reloadCredentials()}))}var t,n,o,a;return t=e,(n=[{key:"reloadCredentials",value:function(){var e=this;this.credentials=[];var t=this.extensionBridge.filterItems(f.FileSafeCredentialsContentType);if(0!=t.length){var n,r=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 o,a=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}(t);try{var i=function(){var t=n.value;e.credentials.find((function(e){e.uuid,t.uuid}))||e.credentials.push(t)};for(r.s();!(n=r.n()).done;)i()}catch(e){r.e(e)}finally{r.f()}this.onCredentialLoad(),this.credentials.length>0&&this.didLoadCredentials()}}},{key:"createNewCredentials",value:(o=r().mark((function e(){var t,n,o,a,u;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=256,e.next=3,SFJS.crypto.generateRandomKey(t);case 3:return n=e.sent,e.next=6,SFJS.crypto.generateRandomKey(t);case 6:return o=e.sent,e.next=9,SFJS.crypto.generateInitialKeysAndAuthParamsForUser(n,o);case 9:return(a=e.sent).isDefault=0==this.credentials.length,u=new i.SFItem({content_type:f.FileSafeCredentialsContentType,content:a}),this.extensionBridge.saveItem(u),this.didLoadCredentials(),e.abrupt("return",u);case 15:case"end":return e.stop()}}),e,this)})),a=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=o.apply(e,t);function a(e){x(i,n,r,a,u,"next",e)}function u(e){x(i,n,r,a,u,"throw",e)}a(void 0)}))},function(){return a.apply(this,arguments)})},{key:"didLoadCredentials",value:function(){this.extensionBridge.notifyObserversOfEvent(f.BridgeEventLoadedCredentials)}},{key:"credentialForFileDescriptor",value:function(e){return this.credentials.find((function(t){return e.content.references.find((function(e){return e.uuid==t.uuid}))}))}},{key:"getAllCredentials",value:function(){return this.credentials}},{key:"saveCredential",value:function(e){this.extensionBridge.saveItem(e)}}])&&S(t.prototype,n),e}(),C=function(){return new Worker(n.p+"filesafe-js/EncryptionWorker.js")};function I(e,t,n,r,i,o,a){try{var u=e[o](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,i)}function O(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){I(o,r,i,a,u,"next",e)}function u(e){I(o,r,i,a,u,"throw",e)}a(void 0)}))}}function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var P=function(){function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.extensionBridge=t,this.relayManager=n,this.integrationManager=r,this.credentialManager=i}var t,n,o,a,u,s,c;return t=e,(n=[{key:"getAllFileDescriptors",value:function(){return this.extensionBridge.getFileDescriptors()}},{key:"fileDescriptorsForNote",value:function(e){return e?this.extensionBridge.getFileDescriptors().filter((function(t){return t.hasRelationshipWithItem(e)})):[]}},{key:"findFileDescriptor",value:function(e){return this.extensionBridge.getFileDescriptors().find((function(t){return t.uuid==e}))}},{key:"fileDescriptorsEncryptedWithCredential",value:function(e){return this.extensionBridge.getFileDescriptors().filter((function(t){return t.content.references.find((function(t){return t.uuid==e.uuid}))}))}},{key:"deleteFileFromDescriptor",value:(c=O(r().mark((function e(t){var n=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,r){n.extensionBridge.deleteItems([t],(function(r){if(r.deleted){var i=n.integrationManager.integrationForFileDescriptor(t);i&&n.relayManager.deleteFile(t,i).then((function(t){e()}))}else e(r)}))})));case 1:case"end":return e.stop()}}),e)}))),function(e){return c.apply(this,arguments)})},{key:"uploadFile",value:(s=O(r().mark((function e(t){var n,o,a,u,s,c,l,d=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.fileItem,o=t.inputFileName,a=t.fileType,u=t.credential,s=t.note,c=this.integrationManager.getDefaultIntegration(),o.split(".")[1],l="".concat(n.uuid,".sf.json"),e.abrupt("return",new Promise((function(e,t){var r=new C;r.addEventListener("message",(function(n){var r=n.data;if(r.error)return console.log("Error uploading file",r.error),void t(r.error);var c=new i.SFItem({content_type:f.FileDescriptorContentTypeKey,content:{serverMetadata:n.data.metadata,fileName:o,fileType:a}});s&&c.addItemAsRelationship(s),c.addItemAsRelationship(u),d.extensionBridge.createItem(c,(function(t){e(t[0])}))}));var p={outputFileName:l,fileItem:n,integration:c,operation:"upload",credentials:d.credentialManager.getDefaultCredentials()};r.postMessage(p)})));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"downloadFileFromDescriptor",value:(u=O(r().mark((function e(t){var n,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.integrationManager.integrationForFileDescriptor(t)){e.next=6;break}throw(i=t.content.serverMetadata)?alert("Unable to find integration named '".concat(i.source,"'.")):alert("Unable to find integration for this file."),"Unable to find integration";case 6:return e.abrupt("return",this.relayManager.downloadFile(t,n).then((function(e){return e.items[0]})));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"encryptFile",value:(a=O(r().mark((function e(t){var n,i,o,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.data,i=t.inputFileName,o=t.fileType,a=t.credential,e.abrupt("return",new Promise((function(e,t){var r=new C;r.addEventListener("message",(function(t){e(t.data.fileItem)})),r.postMessage({operation:"encrypt",keys:a.content.keys,authParams:a.content.authParams,contentType:f.FileItemContentTypeKey,fileData:n,fileName:i,fileType:o})})));case 2:case"end":return e.stop()}}),e)}))),function(e){return a.apply(this,arguments)})},{key:"decryptFile",value:(o=O(r().mark((function e(t){var n,i,o;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.fileDescriptor,i=t.fileItem,(o=t.credential)||(o=this.credentialManager.credentialForFileDescriptor(n)),e.abrupt("return",new Promise((function(e,t){var n=new C;n.addEventListener("message",(function(n){var r=n.data;r.error?t(r.error):e(r)})),n.postMessage({operation:"decrypt",keys:o.content.keys,item:i})})));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})}])&&A(t.prototype,n),e}();function T(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}D(P,"FileItemContentTypeKey","SN|FileSafe|File"),D(P,"FileDescriptorContentTypeKey","SN|FileSafe|FileMetadata");var N=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,n=[{key:"base64toBinary",value:function(e){for(var t=atob(e),n=[],r=0;r<t.length;r++)n.push(t.charCodeAt(r));return new Uint8Array(n)}},{key:"downloadData",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=document.createElement("a");o.setAttribute("download",t);var a=this.tempUrlForData(e,n);o.href=a,o.setAttribute("target","_blank"),i?window.location.href=o.href:(document.body.appendChild(o),o.click(),o.remove()),setTimeout((function(){r.revokeTempUrl(a)}),500)}},{key:"tempUrlForData",value:function(e,t){return window.URL.createObjectURL(new Blob([e],{type:t||"text/json"}))}},{key:"revokeTempUrl",value:function(e){window.URL.revokeObjectURL(e)}},{key:"copyTextToClipboard",value:function(e){if(window.clipboardData&&window.clipboardData.setData)return clipboardData.setData("Text",e);var t;if(document.queryCommandSupported&&document.queryCommandSupported("copy"))try{(t=document.createElement("textarea")).setAttribute("readonly",!0),t.setAttribute("contenteditable",!0),t.style.position="fixed",t.value=e,document.body.appendChild(t),t.focus(),t.select();var n=document.createRange();n.selectNodeContents(t);var r=window.getSelection();r.removeAllRanges(),r.addRange(n),t.setSelectionRange(0,t.value.length),document.execCommand("copy")}catch(e){console.error(e)}finally{document.body.removeChild(t)}}}],null&&T(t.prototype,null),n&&T(t,n),e}();function M(e,t,n,r,i,o,a){try{var u=e[o](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,i)}function R(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){M(o,r,i,a,u,"next",e)}function u(e){M(o,r,i,a,u,"throw",e)}a(void 0)}))}}function L(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return j(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 o,a=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function F(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function B(e,t,n){return t&&F(e.prototype,t),n&&F(e,n),e}var z=function(){function e(t){var n=this,r=t.componentManager;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.dataChangeObservers=[],this.newFileDescriptorHandlers=[],this.extensionBridge=new f(r),this.extensionBridge.addEventHandler((function(e){n.notifyObservers()})),this.relayManager=new v,this.integrationManager=new w(this.extensionBridge),this.credentialManager=new E({extensionBridge:this.extensionBridge,onCredentialLoad:function(){n.relayManager.setCredentials(n.credentialManager.getDefaultCredentials())}}),this.fileManager=new P(this.extensionBridge,this.relayManager,this.integrationManager,this.credentialManager),this.extensionBridge.beginStreamingFiles()}var t,n,o,a,u,s,c,l;return B(e,null,[{key:"getSFItemClass",value:function(){return i.SFItem}}]),B(e,[{key:"addNewFileDescriptorHandler",value:function(e){this.newFileDescriptorHandlers.push(e)}},{key:"notifyObservers",value:function(){var e,t=L(this.dataChangeObservers);try{for(t.s();!(e=t.n()).done;)(0,e.value)()}catch(e){t.e(e)}finally{t.f()}}},{key:"addDataChangeObserver",value:function(e){return this.dataChangeObservers.push(e),e}},{key:"removeDataChangeObserver",value:function(e){this.dataChangeObservers=this.dataChangeObservers.filter((function(e){}))}},{key:"setCurrentNote",value:function(e){this.currentNote=e,this.notifyObservers()}},{key:"getAllFileDescriptors",value:function(){return this.fileManager.getAllFileDescriptors()}},{key:"findFileDescriptor",value:function(e){return this.fileManager.findFileDescriptor(e)}},{key:"fileDescriptorsForCurrentNote",value:function(){return this.fileManager.fileDescriptorsForNote(this.currentNote)}},{key:"fileDescriptorsForNote",value:function(e){return this.fileManager.fileDescriptorsForNote(e)}},{key:"fileDescriptorsEncryptedWithCredential",value:function(e){return this.fileManager.fileDescriptorsEncryptedWithCredential(e)}},{key:"deleteFileFromDescriptor",value:(l=R(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.fileManager.deleteFileFromDescriptor(t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"uploadFile",value:(c=R(r().mark((function e(t){var n,i,o,a,u,s,c,l;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.fileItem,i=t.inputFileName,o=t.fileType,a=t.credential,(u=t.note)||(u=this.currentNote),e.next=4,this.fileManager.uploadFile({fileItem:n,inputFileName:i,fileType:o,credential:a,note:u});case 4:if(s=e.sent){c=L(this.newFileDescriptorHandlers);try{for(c.s();!(l=c.n()).done;)(0,l.value)(s)}catch(e){c.e(e)}finally{c.f()}}return e.abrupt("return",s);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"encryptAndUploadJavaScriptFileObject",value:(s=R(r().mark((function e(t){var n=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,i){var o=new FileReader;o.onload=function(){var i=R(r().mark((function i(o){var a,u,s,c;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=o.target.result,u=a,r.next=4,SFJS.crypto.arrayBufferToBase64(u);case 4:return s=r.sent,r.next=7,n.encryptAndUploadData({base64Data:s,inputFileName:t.name,fileType:t.type});case 7:c=r.sent,e(c);case 9:case"end":return r.stop()}}),i)})));return function(e){return i.apply(this,arguments)}}(),o.readAsArrayBuffer(t)})));case 1:case"end":return e.stop()}}),e)}))),function(e){return s.apply(this,arguments)})},{key:"encryptAndUploadData",value:(u=R(r().mark((function e(t){var n,i,o,a,u=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.base64Data,i=t.inputFileName,o=t.fileType,a=this.getDefaultCredentials(),e.abrupt("return",this.encryptFile({data:n,inputFileName:i,fileType:o,credential:a}).then(function(){var e=R(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u.uploadFile({fileItem:t,inputFileName:i,fileType:o,credential:a}).catch((function(e){console.error("filesafe-js | error uploading file:",e)})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"downloadFileFromDescriptor",value:(a=R(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.fileManager.downloadFileFromDescriptor(t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"encryptFile",value:(o=R(r().mark((function e(t){var n,i,o,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.data,i=t.inputFileName,o=t.fileType,a=t.credential,e.abrupt("return",this.fileManager.encryptFile({data:n,inputFileName:i,fileType:o,credential:a}));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"decryptFile",value:(n=R(r().mark((function e(t){var n,i,o;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.fileDescriptor,i=t.fileItem,o=t.credential,e.abrupt("return",this.fileManager.decryptFile({fileDescriptor:n,fileItem:i,credential:o}));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"downloadBase64Data",value:function(e){var t=e.base64Data,n=e.fileName,r=e.fileType;N.downloadData(N.base64toBinary(t),n,r)}},{key:"createTemporaryFileUrl",value:function(e){var t=e.base64Data,n=e.dataType;return N.tempUrlForData(N.base64toBinary(t),n)}},{key:"revokeTempUrl",value:function(e){N.revokeTempUrl(e)}},{key:"createNewCredentials",value:(t=R(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.credentialManager.createNewCredentials());case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"numberOfFilesEncryptedWithCredential",value:function(e){return this.fileManager.fileDescriptorsEncryptedWithCredential(e).length}},{key:"credentialForFileDescriptor",value:function(e){return this.credentialManager.credentialForFileDescriptor(e)}},{key:"getAllCredentials",value:function(){return this.credentialManager.getAllCredentials()}},{key:"getDefaultCredentials",value:function(){return this.credentialManager.getDefaultCredentials()}},{key:"setCredentialAsDefault",value:function(e){return this.credentialManager.setCredentialAsDefault(e)}},{key:"deleteCredential",value:function(e){return this.credentialManager.deleteCredential(e)}},{key:"saveCredential",value:function(e){return this.credentialManager.saveCredential(e)}},{key:"getAllIntegrations",value:function(){return this.integrationManager.integrations}},{key:"integrationForFileDescriptor",value:function(e){return this.integrationManager.integrationForFileDescriptor(e)}},{key:"saveIntegrationFromCode",value:function(e){return this.integrationManager.saveIntegrationFromCode(e)}},{key:"getDefaultIntegration",value:function(){return this.integrationManager.getDefaultIntegration()}},{key:"setIntegrationAsDefault",value:function(e){return this.integrationManager.setIntegrationAsDefault(e)}},{key:"deleteIntegration",value:function(e){return this.integrationManager.deleteIntegration(e)}},{key:"displayStringForIntegration",value:function(e){return this.integrationManager.displayStringForIntegration(e)}},{key:"base64toBinary",value:function(e){return N.base64toBinary(e)}},{key:"isMobile",value:function(){return this.extensionBridge.isMobile()}},{key:"getEnvironment",value:function(){return this.extensionBridge.getEnvironment()}},{key:"getPlatform",value:function(){return this.extensionBridge.getPlatform()}},{key:"copyTextToClipboard",value:function(e){return N.copyTextToClipboard(e)}},{key:"hasLegacyAccess",value:function(){var e=Boolean(this.getAllCredentials().length>0&&this.getAllIntegrations().length>0),t=Boolean(this.getAllFileDescriptors().length>0);return e||t}}]),e}()}])},110:function(e,t,n){"use strict";var r=n(309),i={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},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};function s(e){return r.isMemo(e)?a:u[e.$$typeof]||i}u[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u[r.Memo]=a;var c=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(h){var i=p(n);i&&i!==h&&e(t,i,r)}var a=l(n);f&&(a=a.concat(f(n)));for(var u=s(t),v=s(n),g=0;g<a.length;++g){var m=a[g];if(!o[m]&&(!r||!r[m])&&(!v||!v[m])&&(!u||!u[m])){var y=d(n,m);try{c(t,m,y)}catch(b){}}}}return t}},746:function(e,t){"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,l=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,v=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,m=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function x(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case l:case f:case o:case u:case a:case p:return e;default:switch(e=e&&e.$$typeof){case c:case d:case g:case v:case s:return e;default:return t}}case i:return t}}}function k(e){return x(e)===f}t.AsyncMode=l,t.ConcurrentMode=f,t.ContextConsumer=c,t.ContextProvider=s,t.Element=r,t.ForwardRef=d,t.Fragment=o,t.Lazy=g,t.Memo=v,t.Portal=i,t.Profiler=u,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return k(e)||x(e)===l},t.isConcurrentMode=k,t.isContextConsumer=function(e){return x(e)===c},t.isContextProvider=function(e){return x(e)===s},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return x(e)===d},t.isFragment=function(e){return x(e)===o},t.isLazy=function(e){return x(e)===g},t.isMemo=function(e){return x(e)===v},t.isPortal=function(e){return x(e)===i},t.isProfiler=function(e){return x(e)===u},t.isStrictMode=function(e){return x(e)===a},t.isSuspense=function(e){return x(e)===p},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===o||e===f||e===u||e===a||e===p||e===h||"object"===typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===v||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===y||e.$$typeof===b||e.$$typeof===w||e.$$typeof===m)},t.typeOf=x},309:function(e,t,n){"use strict";e.exports=n(746)},176:function(e){"use strict";e.exports=function(e,t,n,r,i,o,a,u){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,a,u],l=0;(s=new Error(t.replace(/%s/g,(function(){return c[l++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},763:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",u="__lodash_placeholder__",s=16,c=32,l=64,f=128,d=256,p=1/0,h=9007199254740991,v=NaN,g=4294967295,m=[["ary",f],["bind",1],["bindKey",2],["curry",8],["curryRight",s],["flip",512],["partial",c],["partialRight",l],["rearg",d]],y="[object Arguments]",b="[object Array]",w="[object Boolean]",x="[object Date]",k="[object Error]",S="[object Function]",_="[object GeneratorFunction]",E="[object Map]",C="[object Number]",I="[object Object]",O="[object Promise]",A="[object RegExp]",D="[object Set]",P="[object String]",T="[object Symbol]",N="[object WeakMap]",M="[object ArrayBuffer]",R="[object DataView]",L="[object Float32Array]",j="[object Float64Array]",F="[object Int8Array]",B="[object Int16Array]",z="[object Int32Array]",U="[object Uint8Array]",H="[object Uint8ClampedArray]",W="[object Uint16Array]",V="[object Uint32Array]",G=/\b__p \+= '';/g,K=/\b(__p \+=) '' \+/g,q=/(__e\(.*?\)|\b__t\)) \+\n'';/g,$=/&(?:amp|lt|gt|quot|#39);/g,J=/[&<>"']/g,Y=RegExp($.source),Z=RegExp(J.source),X=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(ie.source),ae=/^\s+/,ue=/\s/,se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ce=/\{\n\/\* \[wrapped with (.+)\] \*/,le=/,? & /,fe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,de=/[()=,{}\[\]\/\s]/,pe=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ve=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,me=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,we=/^(?:0|[1-9]\d*)$/,xe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ke=/($^)/,Se=/['\n\r\u2028\u2029\\]/g,_e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ee="\\u2700-\\u27bf",Ce="a-z\\xdf-\\xf6\\xf8-\\xff",Ie="A-Z\\xc0-\\xd6\\xd8-\\xde",Oe="\\ufe0e\\ufe0f",Ae="\\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",De="['\u2019]",Pe="[\\ud800-\\udfff]",Te="["+Ae+"]",Ne="["+_e+"]",Me="\\d+",Re="[\\u2700-\\u27bf]",Le="["+Ce+"]",je="[^\\ud800-\\udfff"+Ae+Me+Ee+Ce+Ie+"]",Fe="\\ud83c[\\udffb-\\udfff]",Be="[^\\ud800-\\udfff]",ze="(?:\\ud83c[\\udde6-\\uddff]){2}",Ue="[\\ud800-\\udbff][\\udc00-\\udfff]",He="["+Ie+"]",We="(?:"+Le+"|"+je+")",Ve="(?:"+He+"|"+je+")",Ge="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Ke="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",qe="(?:"+Ne+"|"+Fe+")"+"?",$e="[\\ufe0e\\ufe0f]?",Je=$e+qe+("(?:\\u200d(?:"+[Be,ze,Ue].join("|")+")"+$e+qe+")*"),Ye="(?:"+[Re,ze,Ue].join("|")+")"+Je,Ze="(?:"+[Be+Ne+"?",Ne,ze,Ue,Pe].join("|")+")",Xe=RegExp(De,"g"),Qe=RegExp(Ne,"g"),et=RegExp(Fe+"(?="+Fe+")|"+Ze+Je,"g"),tt=RegExp([He+"?"+Le+"+"+Ge+"(?="+[Te,He,"$"].join("|")+")",Ve+"+"+Ke+"(?="+[Te,He+We,"$"].join("|")+")",He+"?"+We+"+"+Ge,He+"+"+Ke,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Me,Ye].join("|"),"g"),nt=RegExp("[\\u200d\\ud800-\\udfff"+_e+Oe+"]"),rt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ot=-1,at={};at[L]=at[j]=at[F]=at[B]=at[z]=at[U]=at[H]=at[W]=at[V]=!0,at[y]=at[b]=at[M]=at[w]=at[R]=at[x]=at[k]=at[S]=at[E]=at[C]=at[I]=at[A]=at[D]=at[P]=at[N]=!1;var ut={};ut[y]=ut[b]=ut[M]=ut[R]=ut[w]=ut[x]=ut[L]=ut[j]=ut[F]=ut[B]=ut[z]=ut[E]=ut[C]=ut[I]=ut[A]=ut[D]=ut[P]=ut[T]=ut[U]=ut[H]=ut[W]=ut[V]=!0,ut[k]=ut[S]=ut[N]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ct=parseFloat,lt=parseInt,ft="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,dt="object"==typeof self&&self&&self.Object===Object&&self,pt=ft||dt||Function("return this")(),ht=t&&!t.nodeType&&t,vt=ht&&e&&!e.nodeType&&e,gt=vt&&vt.exports===ht,mt=gt&&ft.process,yt=function(){try{var e=vt&&vt.require&&vt.require("util").types;return e||mt&&mt.binding&&mt.binding("util")}catch(t){}}(),bt=yt&&yt.isArrayBuffer,wt=yt&&yt.isDate,xt=yt&&yt.isMap,kt=yt&&yt.isRegExp,St=yt&&yt.isSet,_t=yt&&yt.isTypedArray;function Et(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ct(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function It(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Ot(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function At(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Dt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Pt(e,t){return!!(null==e?0:e.length)&&Ut(e,t,0)>-1}function Tt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Nt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Mt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Rt(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Lt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function jt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Ft=Gt("length");function Bt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function zt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Ut(e,t,n){return t===t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):zt(e,Wt,n)}function Ht(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Wt(e){return e!==e}function Vt(e,t){var n=null==e?0:e.length;return n?$t(e,t)/n:v}function Gt(e){return function(t){return null==t?i:t[e]}}function Kt(e){return function(t){return null==e?i:e[t]}}function qt(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function $t(e,t){for(var n,r=-1,o=e.length;++r<o;){var a=t(e[r]);a!==i&&(n=n===i?a:n+a)}return n}function Jt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Yt(e){return e?e.slice(0,vn(e)+1).replace(ae,""):e}function Zt(e){return function(t){return e(t)}}function Xt(e,t){return Nt(t,(function(t){return e[t]}))}function Qt(e,t){return e.has(t)}function en(e,t){for(var n=-1,r=e.length;++n<r&&Ut(t,e[n],0)>-1;);return n}function tn(e,t){for(var n=e.length;n--&&Ut(t,e[n],0)>-1;);return n}function nn(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var rn=Kt({"\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"}),on=Kt({"&":"&","<":"<",">":">",'"':""","'":"'"});function an(e){return"\\"+st[e]}function un(e){return nt.test(e)}function sn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function cn(e,t){return function(n){return e(t(n))}}function ln(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==u||(e[n]=u,o[i++]=n)}return o}function fn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function dn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function pn(e){return un(e)?function(e){var t=et.lastIndex=0;for(;et.test(e);)++t;return t}(e):Ft(e)}function hn(e){return un(e)?function(e){return e.match(et)||[]}(e):function(e){return e.split("")}(e)}function vn(e){for(var t=e.length;t--&&ue.test(e.charAt(t)););return t}var gn=Kt({"&":"&","<":"<",">":">",""":'"',"'":"'"});var mn=function e(t){var n=(t=null==t?pt:mn.defaults(pt.Object(),t,mn.pick(pt,it))).Array,r=t.Date,ue=t.Error,_e=t.Function,Ee=t.Math,Ce=t.Object,Ie=t.RegExp,Oe=t.String,Ae=t.TypeError,De=n.prototype,Pe=_e.prototype,Te=Ce.prototype,Ne=t["__core-js_shared__"],Me=Pe.toString,Re=Te.hasOwnProperty,Le=0,je=function(){var e=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Fe=Te.toString,Be=Me.call(Ce),ze=pt._,Ue=Ie("^"+Me.call(Re).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=gt?t.Buffer:i,We=t.Symbol,Ve=t.Uint8Array,Ge=He?He.allocUnsafe:i,Ke=cn(Ce.getPrototypeOf,Ce),qe=Ce.create,$e=Te.propertyIsEnumerable,Je=De.splice,Ye=We?We.isConcatSpreadable:i,Ze=We?We.iterator:i,et=We?We.toStringTag:i,nt=function(){try{var e=po(Ce,"defineProperty");return e({},"",{}),e}catch(t){}}(),st=t.clearTimeout!==pt.clearTimeout&&t.clearTimeout,ft=r&&r.now!==pt.Date.now&&r.now,dt=t.setTimeout!==pt.setTimeout&&t.setTimeout,ht=Ee.ceil,vt=Ee.floor,mt=Ce.getOwnPropertySymbols,yt=He?He.isBuffer:i,Ft=t.isFinite,Kt=De.join,yn=cn(Ce.keys,Ce),bn=Ee.max,wn=Ee.min,xn=r.now,kn=t.parseInt,Sn=Ee.random,_n=De.reverse,En=po(t,"DataView"),Cn=po(t,"Map"),In=po(t,"Promise"),On=po(t,"Set"),An=po(t,"WeakMap"),Dn=po(Ce,"create"),Pn=An&&new An,Tn={},Nn=zo(En),Mn=zo(Cn),Rn=zo(In),Ln=zo(On),jn=zo(An),Fn=We?We.prototype:i,Bn=Fn?Fn.valueOf:i,zn=Fn?Fn.toString:i;function Un(e){if(ru(e)&&!Ka(e)&&!(e instanceof Gn)){if(e instanceof Vn)return e;if(Re.call(e,"__wrapped__"))return Uo(e)}return new Vn(e)}var Hn=function(){function e(){}return function(t){if(!nu(t))return{};if(qe)return qe(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Wn(){}function Vn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Gn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Jn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new $n;++t<n;)this.add(e[t])}function Yn(e){var t=this.__data__=new qn(e);this.size=t.size}function Zn(e,t){var n=Ka(e),r=!n&&Ga(e),i=!n&&!r&&Ya(e),o=!n&&!r&&!i&&fu(e),a=n||r||i||o,u=a?Jt(e.length,Oe):[],s=u.length;for(var c in e)!t&&!Re.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||wo(c,s))||u.push(c);return u}function Xn(e){var t=e.length;return t?e[Jr(0,t-1)]:i}function Qn(e,t){return jo(Di(e),sr(t,0,e.length))}function er(e){return jo(Di(e))}function tr(e,t,n){(n!==i&&!Ha(e[t],n)||n===i&&!(t in e))&&ar(e,t,n)}function nr(e,t,n){var r=e[t];Re.call(e,t)&&Ha(r,n)&&(n!==i||t in e)||ar(e,t,n)}function rr(e,t){for(var n=e.length;n--;)if(Ha(e[n][0],t))return n;return-1}function ir(e,t,n,r){return pr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function or(e,t){return e&&Pi(t,Nu(t),e)}function ar(e,t,n){"__proto__"==t&&nt?nt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ur(e,t){for(var r=-1,o=t.length,a=n(o),u=null==e;++r<o;)a[r]=u?i:Ou(e,t[r]);return a}function sr(e,t,n){return e===e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function cr(e,t,n,r,o,a){var u,s=1&t,c=2&t,l=4&t;if(n&&(u=o?n(e,r,o,a):n(e)),u!==i)return u;if(!nu(e))return e;var f=Ka(e);if(f){if(u=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Re.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!s)return Di(e,u)}else{var d=go(e),p=d==S||d==_;if(Ya(e))return _i(e,s);if(d==I||d==y||p&&!o){if(u=c||p?{}:yo(e),!s)return c?function(e,t){return Pi(e,vo(e),t)}(e,function(e,t){return e&&Pi(t,Mu(t),e)}(u,e)):function(e,t){return Pi(e,ho(e),t)}(e,or(u,e))}else{if(!ut[d])return o?e:{};u=function(e,t,n){var r=e.constructor;switch(t){case M:return Ei(e);case w:case x:return new r(+e);case R:return function(e,t){var n=t?Ei(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case L:case j:case F:case B:case z:case U:case H:case W:case V:return Ci(e,n);case E:return new r;case C:case P:return new r(e);case A:return function(e){var t=new e.constructor(e.source,ve.exec(e));return t.lastIndex=e.lastIndex,t}(e);case D:return new r;case T:return i=e,Bn?Ce(Bn.call(i)):{}}var i}(e,d,s)}}a||(a=new Yn);var h=a.get(e);if(h)return h;a.set(e,u),su(e)?e.forEach((function(r){u.add(cr(r,t,n,r,e,a))})):iu(e)&&e.forEach((function(r,i){u.set(i,cr(r,t,n,i,e,a))}));var v=f?i:(l?c?oo:io:c?Mu:Nu)(e);return It(v||e,(function(r,i){v&&(r=e[i=r]),nr(u,i,cr(r,t,n,i,e,a))})),u}function lr(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ce(e);r--;){var o=n[r],a=t[o],u=e[o];if(u===i&&!(o in e)||!a(u))return!1}return!0}function fr(e,t,n){if("function"!=typeof e)throw new Ae(o);return No((function(){e.apply(i,n)}),t)}function dr(e,t,n,r){var i=-1,o=Pt,a=!0,u=e.length,s=[],c=t.length;if(!u)return s;n&&(t=Nt(t,Zt(n))),r?(o=Tt,a=!1):t.length>=200&&(o=Qt,a=!1,t=new Jn(t));e:for(;++i<u;){var l=e[i],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f===f){for(var d=c;d--;)if(t[d]===f)continue e;s.push(l)}else o(t,f,r)||s.push(l)}return s}Un.templateSettings={escape:X,evaluate:Q,interpolate:ee,variable:"",imports:{_:Un}},Un.prototype=Wn.prototype,Un.prototype.constructor=Un,Vn.prototype=Hn(Wn.prototype),Vn.prototype.constructor=Vn,Gn.prototype=Hn(Wn.prototype),Gn.prototype.constructor=Gn,Kn.prototype.clear=function(){this.__data__=Dn?Dn(null):{},this.size=0},Kn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Kn.prototype.get=function(e){var t=this.__data__;if(Dn){var n=t[e];return n===a?i:n}return Re.call(t,e)?t[e]:i},Kn.prototype.has=function(e){var t=this.__data__;return Dn?t[e]!==i:Re.call(t,e)},Kn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Dn&&t===i?a:t,this},qn.prototype.clear=function(){this.__data__=[],this.size=0},qn.prototype.delete=function(e){var t=this.__data__,n=rr(t,e);return!(n<0)&&(n==t.length-1?t.pop():Je.call(t,n,1),--this.size,!0)},qn.prototype.get=function(e){var t=this.__data__,n=rr(t,e);return n<0?i:t[n][1]},qn.prototype.has=function(e){return rr(this.__data__,e)>-1},qn.prototype.set=function(e,t){var n=this.__data__,r=rr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},$n.prototype.clear=function(){this.size=0,this.__data__={hash:new Kn,map:new(Cn||qn),string:new Kn}},$n.prototype.delete=function(e){var t=lo(this,e).delete(e);return this.size-=t?1:0,t},$n.prototype.get=function(e){return lo(this,e).get(e)},$n.prototype.has=function(e){return lo(this,e).has(e)},$n.prototype.set=function(e,t){var n=lo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Jn.prototype.add=Jn.prototype.push=function(e){return this.__data__.set(e,a),this},Jn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.clear=function(){this.__data__=new qn,this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yn.prototype.get=function(e){return this.__data__.get(e)},Yn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof qn){var r=n.__data__;if(!Cn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new $n(r)}return n.set(e,t),this.size=n.size,this};var pr=Mi(xr),hr=Mi(kr,!0);function vr(e,t){var n=!0;return pr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function gr(e,t,n){for(var r=-1,o=e.length;++r<o;){var a=e[r],u=t(a);if(null!=u&&(s===i?u===u&&!lu(u):n(u,s)))var s=u,c=a}return c}function mr(e,t){var n=[];return pr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function yr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=bo),i||(i=[]);++o<a;){var u=e[o];t>0&&n(u)?t>1?yr(u,t-1,n,r,i):Mt(i,u):r||(i[i.length]=u)}return i}var br=Ri(),wr=Ri(!0);function xr(e,t){return e&&br(e,t,Nu)}function kr(e,t){return e&&wr(e,t,Nu)}function Sr(e,t){return Dt(t,(function(t){return Qa(e[t])}))}function _r(e,t){for(var n=0,r=(t=wi(t,e)).length;null!=e&&n<r;)e=e[Bo(t[n++])];return n&&n==r?e:i}function Er(e,t,n){var r=t(e);return Ka(e)?r:Mt(r,n(e))}function Cr(e){return null==e?e===i?"[object Undefined]":"[object Null]":et&&et in Ce(e)?function(e){var t=Re.call(e,et),n=e[et];try{e[et]=i;var r=!0}catch(a){}var o=Fe.call(e);r&&(t?e[et]=n:delete e[et]);return o}(e):function(e){return Fe.call(e)}(e)}function Ir(e,t){return e>t}function Or(e,t){return null!=e&&Re.call(e,t)}function Ar(e,t){return null!=e&&t in Ce(e)}function Dr(e,t,r){for(var o=r?Tt:Pt,a=e[0].length,u=e.length,s=u,c=n(u),l=1/0,f=[];s--;){var d=e[s];s&&t&&(d=Nt(d,Zt(t))),l=wn(d.length,l),c[s]=!r&&(t||a>=120&&d.length>=120)?new Jn(s&&d):i}d=e[0];var p=-1,h=c[0];e:for(;++p<a&&f.length<l;){var v=d[p],g=t?t(v):v;if(v=r||0!==v?v:0,!(h?Qt(h,g):o(f,g,r))){for(s=u;--s;){var m=c[s];if(!(m?Qt(m,g):o(e[s],g,r)))continue e}h&&h.push(g),f.push(v)}}return f}function Pr(e,t,n){var r=null==(e=Ao(e,t=wi(t,e)))?e:e[Bo(Xo(t))];return null==r?i:Et(r,e,n)}function Tr(e){return ru(e)&&Cr(e)==y}function Nr(e,t,n,r,o){return e===t||(null==e||null==t||!ru(e)&&!ru(t)?e!==e&&t!==t:function(e,t,n,r,o,a){var u=Ka(e),s=Ka(t),c=u?b:go(e),l=s?b:go(t),f=(c=c==y?I:c)==I,d=(l=l==y?I:l)==I,p=c==l;if(p&&Ya(e)){if(!Ya(t))return!1;u=!0,f=!1}if(p&&!f)return a||(a=new Yn),u||fu(e)?no(e,t,n,r,o,a):function(e,t,n,r,i,o,a){switch(n){case R:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case M:return!(e.byteLength!=t.byteLength||!o(new Ve(e),new Ve(t)));case w:case x:case C:return Ha(+e,+t);case k:return e.name==t.name&&e.message==t.message;case A:case P:return e==t+"";case E:var u=sn;case D:var s=1&r;if(u||(u=fn),e.size!=t.size&&!s)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=no(u(e),u(t),r,i,o,a);return a.delete(e),l;case T:if(Bn)return Bn.call(e)==Bn.call(t)}return!1}(e,t,c,n,r,o,a);if(!(1&n)){var h=f&&Re.call(e,"__wrapped__"),v=d&&Re.call(t,"__wrapped__");if(h||v){var g=h?e.value():e,m=v?t.value():t;return a||(a=new Yn),o(g,m,n,r,a)}}if(!p)return!1;return a||(a=new Yn),function(e,t,n,r,o,a){var u=1&n,s=io(e),c=s.length,l=io(t).length;if(c!=l&&!u)return!1;var f=c;for(;f--;){var d=s[f];if(!(u?d in t:Re.call(t,d)))return!1}var p=a.get(e),h=a.get(t);if(p&&h)return p==t&&h==e;var v=!0;a.set(e,t),a.set(t,e);var g=u;for(;++f<c;){var m=e[d=s[f]],y=t[d];if(r)var b=u?r(y,m,d,t,e,a):r(m,y,d,e,t,a);if(!(b===i?m===y||o(m,y,n,r,a):b)){v=!1;break}g||(g="constructor"==d)}if(v&&!g){var w=e.constructor,x=t.constructor;w==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(v=!1)}return a.delete(e),a.delete(t),v}(e,t,n,r,o,a)}(e,t,n,r,Nr,o))}function Mr(e,t,n,r){var o=n.length,a=o,u=!r;if(null==e)return!a;for(e=Ce(e);o--;){var s=n[o];if(u&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<a;){var c=(s=n[o])[0],l=e[c],f=s[1];if(u&&s[2]){if(l===i&&!(c in e))return!1}else{var d=new Yn;if(r)var p=r(l,f,c,e,t,d);if(!(p===i?Nr(f,l,3,r,d):p))return!1}}return!0}function Rr(e){return!(!nu(e)||(t=e,je&&je in t))&&(Qa(e)?Ue:ye).test(zo(e));var t}function Lr(e){return"function"==typeof e?e:null==e?os:"object"==typeof e?Ka(e)?Hr(e[0],e[1]):Ur(e):hs(e)}function jr(e){if(!Eo(e))return yn(e);var t=[];for(var n in Ce(e))Re.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Fr(e){if(!nu(e))return function(e){var t=[];if(null!=e)for(var n in Ce(e))t.push(n);return t}(e);var t=Eo(e),n=[];for(var r in e)("constructor"!=r||!t&&Re.call(e,r))&&n.push(r);return n}function Br(e,t){return e<t}function zr(e,t){var r=-1,i=$a(e)?n(e.length):[];return pr(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function Ur(e){var t=fo(e);return 1==t.length&&t[0][2]?Io(t[0][0],t[0][1]):function(n){return n===e||Mr(n,e,t)}}function Hr(e,t){return ko(e)&&Co(t)?Io(Bo(e),t):function(n){var r=Ou(n,e);return r===i&&r===t?Au(n,e):Nr(t,r,3)}}function Wr(e,t,n,r,o){e!==t&&br(t,(function(a,u){if(o||(o=new Yn),nu(a))!function(e,t,n,r,o,a,u){var s=Po(e,n),c=Po(t,n),l=u.get(c);if(l)return void tr(e,n,l);var f=a?a(s,c,n+"",e,t,u):i,d=f===i;if(d){var p=Ka(c),h=!p&&Ya(c),v=!p&&!h&&fu(c);f=c,p||h||v?Ka(s)?f=s:Ja(s)?f=Di(s):h?(d=!1,f=_i(c,!0)):v?(d=!1,f=Ci(c,!0)):f=[]:au(c)||Ga(c)?(f=s,Ga(s)?f=bu(s):nu(s)&&!Qa(s)||(f=yo(c))):d=!1}d&&(u.set(c,f),o(f,c,r,a,u),u.delete(c));tr(e,n,f)}(e,t,u,n,Wr,r,o);else{var s=r?r(Po(e,u),a,u+"",e,t,o):i;s===i&&(s=a),tr(e,u,s)}}),Mu)}function Vr(e,t){var n=e.length;if(n)return wo(t+=t<0?n:0,n)?e[t]:i}function Gr(e,t,n){t=t.length?Nt(t,(function(e){return Ka(e)?function(t){return _r(t,1===e.length?e[0]:e)}:e})):[os];var r=-1;t=Nt(t,Zt(co()));var i=zr(e,(function(e,n,i){var o=Nt(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,(function(e,t){return function(e,t,n){var r=-1,i=e.criteria,o=t.criteria,a=i.length,u=n.length;for(;++r<a;){var s=Ii(i[r],o[r]);if(s)return r>=u?s:s*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Kr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],u=_r(e,a);n(u,a)&&ei(o,wi(a,e),u)}return o}function qr(e,t,n,r){var i=r?Ht:Ut,o=-1,a=t.length,u=e;for(e===t&&(t=Di(t)),n&&(u=Nt(e,Zt(n)));++o<a;)for(var s=0,c=t[o],l=n?n(c):c;(s=i(u,l,s,r))>-1;)u!==e&&Je.call(u,s,1),Je.call(e,s,1);return e}function $r(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;wo(i)?Je.call(e,i,1):di(e,i)}}return e}function Jr(e,t){return e+vt(Sn()*(t-e+1))}function Yr(e,t){var n="";if(!e||t<1||t>h)return n;do{t%2&&(n+=e),(t=vt(t/2))&&(e+=e)}while(t);return n}function Zr(e,t){return Mo(Oo(e,t,os),e+"")}function Xr(e){return Xn(Hu(e))}function Qr(e,t){var n=Hu(e);return jo(n,sr(t,0,n.length))}function ei(e,t,n,r){if(!nu(e))return e;for(var o=-1,a=(t=wi(t,e)).length,u=a-1,s=e;null!=s&&++o<a;){var c=Bo(t[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=u){var f=s[c];(l=r?r(f,c,s):i)===i&&(l=nu(f)?f:wo(t[o+1])?[]:{})}nr(s,c,l),s=s[c]}return e}var ti=Pn?function(e,t){return Pn.set(e,t),e}:os,ni=nt?function(e,t){return nt(e,"toString",{configurable:!0,enumerable:!1,value:ns(t),writable:!0})}:os;function ri(e){return jo(Hu(e))}function ii(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=n(o);++i<o;)a[i]=e[i+t];return a}function oi(e,t){var n;return pr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function ai(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t===t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!lu(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return ui(e,t,os,n)}function ui(e,t,n,r){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var u=(t=n(t))!==t,s=null===t,c=lu(t),l=t===i;o<a;){var f=vt((o+a)/2),d=n(e[f]),p=d!==i,h=null===d,v=d===d,g=lu(d);if(u)var m=r||v;else m=l?v&&(r||p):s?v&&p&&(r||!h):c?v&&p&&!h&&(r||!g):!h&&!g&&(r?d<=t:d<t);m?o=f+1:a=f}return wn(a,4294967294)}function si(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],u=t?t(a):a;if(!n||!Ha(u,s)){var s=u;o[i++]=0===a?0:a}}return o}function ci(e){return"number"==typeof e?e:lu(e)?v:+e}function li(e){if("string"==typeof e)return e;if(Ka(e))return Nt(e,li)+"";if(lu(e))return zn?zn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function fi(e,t,n){var r=-1,i=Pt,o=e.length,a=!0,u=[],s=u;if(n)a=!1,i=Tt;else if(o>=200){var c=t?null:Yi(e);if(c)return fn(c);a=!1,i=Qt,s=new Jn}else s=t?[]:u;e:for(;++r<o;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f===f){for(var d=s.length;d--;)if(s[d]===f)continue e;t&&s.push(f),u.push(l)}else i(s,f,n)||(s!==u&&s.push(f),u.push(l))}return u}function di(e,t){return null==(e=Ao(e,t=wi(t,e)))||delete e[Bo(Xo(t))]}function pi(e,t,n,r){return ei(e,t,n(_r(e,t)),r)}function hi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ii(e,r?0:o,r?o+1:i):ii(e,r?o+1:0,r?i:o)}function vi(e,t){var n=e;return n instanceof Gn&&(n=n.value()),Rt(t,(function(e,t){return t.func.apply(t.thisArg,Mt([e],t.args))}),n)}function gi(e,t,r){var i=e.length;if(i<2)return i?fi(e[0]):[];for(var o=-1,a=n(i);++o<i;)for(var u=e[o],s=-1;++s<i;)s!=o&&(a[o]=dr(a[o]||u,e[s],t,r));return fi(yr(a,1),t,r)}function mi(e,t,n){for(var r=-1,o=e.length,a=t.length,u={};++r<o;){var s=r<a?t[r]:i;n(u,e[r],s)}return u}function yi(e){return Ja(e)?e:[]}function bi(e){return"function"==typeof e?e:os}function wi(e,t){return Ka(e)?e:ko(e,t)?[e]:Fo(wu(e))}var xi=Zr;function ki(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ii(e,t,n)}var Si=st||function(e){return pt.clearTimeout(e)};function _i(e,t){if(t)return e.slice();var n=e.length,r=Ge?Ge(n):new e.constructor(n);return e.copy(r),r}function Ei(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function Ci(e,t){var n=t?Ei(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ii(e,t){if(e!==t){var n=e!==i,r=null===e,o=e===e,a=lu(e),u=t!==i,s=null===t,c=t===t,l=lu(t);if(!s&&!l&&!a&&e>t||a&&u&&c&&!s&&!l||r&&u&&c||!n&&c||!o)return 1;if(!r&&!a&&!l&&e<t||l&&n&&o&&!r&&!a||s&&n&&o||!u&&o||!c)return-1}return 0}function Oi(e,t,r,i){for(var o=-1,a=e.length,u=r.length,s=-1,c=t.length,l=bn(a-u,0),f=n(c+l),d=!i;++s<c;)f[s]=t[s];for(;++o<u;)(d||o<a)&&(f[r[o]]=e[o]);for(;l--;)f[s++]=e[o++];return f}function Ai(e,t,r,i){for(var o=-1,a=e.length,u=-1,s=r.length,c=-1,l=t.length,f=bn(a-s,0),d=n(f+l),p=!i;++o<f;)d[o]=e[o];for(var h=o;++c<l;)d[h+c]=t[c];for(;++u<s;)(p||o<a)&&(d[h+r[u]]=e[o++]);return d}function Di(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function Pi(e,t,n,r){var o=!n;n||(n={});for(var a=-1,u=t.length;++a<u;){var s=t[a],c=r?r(n[s],e[s],s,n,e):i;c===i&&(c=e[s]),o?ar(n,s,c):nr(n,s,c)}return n}function Ti(e,t){return function(n,r){var i=Ka(n)?Ct:ir,o=t?t():{};return i(n,e,co(r,2),o)}}function Ni(e){return Zr((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:i,u=o>2?n[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,u&&xo(n[0],n[1],u)&&(a=o<3?i:a,o=1),t=Ce(t);++r<o;){var s=n[r];s&&e(t,s,r,a)}return t}))}function Mi(e,t){return function(n,r){if(null==n)return n;if(!$a(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Ce(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Ri(e){return function(t,n,r){for(var i=-1,o=Ce(t),a=r(t),u=a.length;u--;){var s=a[e?u:++i];if(!1===n(o[s],s,o))break}return t}}function Li(e){return function(t){var n=un(t=wu(t))?hn(t):i,r=n?n[0]:t.charAt(0),o=n?ki(n,1).join(""):t.slice(1);return r[e]()+o}}function ji(e){return function(t){return Rt(Qu(Gu(t).replace(Xe,"")),e,"")}}function Fi(e){return function(){var t=arguments;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]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Hn(e.prototype),r=e.apply(n,t);return nu(r)?r:n}}function Bi(e){return function(t,n,r){var o=Ce(t);if(!$a(t)){var a=co(n,3);t=Nu(t),n=function(e){return a(o[e],e,o)}}var u=e(t,n,r);return u>-1?o[a?t[u]:u]:i}}function zi(e){return ro((function(t){var n=t.length,r=n,a=Vn.prototype.thru;for(e&&t.reverse();r--;){var u=t[r];if("function"!=typeof u)throw new Ae(o);if(a&&!s&&"wrapper"==uo(u))var s=new Vn([],!0)}for(r=s?r:n;++r<n;){var c=uo(u=t[r]),l="wrapper"==c?ao(u):i;s=l&&So(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?s[uo(l[0])].apply(s,l[3]):1==u.length&&So(u)?s[c]():s.thru(u)}return function(){var e=arguments,r=e[0];if(s&&1==e.length&&Ka(r))return s.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function Ui(e,t,r,o,a,u,s,c,l,d){var p=t&f,h=1&t,v=2&t,g=24&t,m=512&t,y=v?i:Fi(e);return function i(){for(var f=arguments.length,b=n(f),w=f;w--;)b[w]=arguments[w];if(g)var x=so(i),k=nn(b,x);if(o&&(b=Oi(b,o,a,g)),u&&(b=Ai(b,u,s,g)),f-=k,g&&f<d){var S=ln(b,x);return $i(e,t,Ui,i.placeholder,r,b,S,c,l,d-f)}var _=h?r:this,E=v?_[e]:e;return f=b.length,c?b=Do(b,c):m&&f>1&&b.reverse(),p&&l<f&&(b.length=l),this&&this!==pt&&this instanceof i&&(E=y||Fi(E)),E.apply(_,b)}}function Hi(e,t){return function(n,r){return function(e,t,n,r){return xr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function Wi(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=li(n),r=li(r)):(n=ci(n),r=ci(r)),o=e(n,r)}return o}}function Vi(e){return ro((function(t){return t=Nt(t,Zt(co())),Zr((function(n){var r=this;return e(t,(function(e){return Et(e,r,n)}))}))}))}function Gi(e,t){var n=(t=t===i?" ":li(t)).length;if(n<2)return n?Yr(t,e):t;var r=Yr(t,ht(e/pn(t)));return un(t)?ki(hn(r),0,e).join(""):r.slice(0,e)}function Ki(e){return function(t,r,o){return o&&"number"!=typeof o&&xo(t,r,o)&&(r=o=i),t=vu(t),r===i?(r=t,t=0):r=vu(r),function(e,t,r,i){for(var o=-1,a=bn(ht((t-e)/(r||1)),0),u=n(a);a--;)u[i?a:++o]=e,e+=r;return u}(t,r,o=o===i?t<r?1:-1:vu(o),e)}}function qi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=yu(t),n=yu(n)),e(t,n)}}function $i(e,t,n,r,o,a,u,s,f,d){var p=8&t;t|=p?c:l,4&(t&=~(p?l:c))||(t&=-4);var h=[e,t,o,p?a:i,p?u:i,p?i:a,p?i:u,s,f,d],v=n.apply(i,h);return So(e)&&To(v,h),v.placeholder=r,Ro(v,e,t)}function Ji(e){var t=Ee[e];return function(e,n){if(e=yu(e),(n=null==n?0:wn(gu(n),292))&&Ft(e)){var r=(wu(e)+"e").split("e");return+((r=(wu(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Yi=On&&1/fn(new On([,-0]))[1]==p?function(e){return new On(e)}:ls;function Zi(e){return function(t){var n=go(t);return n==E?sn(t):n==D?dn(t):function(e,t){return Nt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Xi(e,t,r,a,p,h,v,g){var m=2&t;if(!m&&"function"!=typeof e)throw new Ae(o);var y=a?a.length:0;if(y||(t&=-97,a=p=i),v=v===i?v:bn(gu(v),0),g=g===i?g:gu(g),y-=p?p.length:0,t&l){var b=a,w=p;a=p=i}var x=m?i:ao(e),k=[e,t,r,a,p,b,w,h,v,g];if(x&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,a=r==f&&8==n||r==f&&n==d&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var s=t[3];if(s){var c=e[3];e[3]=c?Oi(c,s,t[4]):s,e[4]=c?ln(e[3],u):t[4]}(s=t[5])&&(c=e[5],e[5]=c?Ai(c,s,t[6]):s,e[6]=c?ln(e[5],u):t[6]);(s=t[7])&&(e[7]=s);r&f&&(e[8]=null==e[8]?t[8]:wn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(k,x),e=k[0],t=k[1],r=k[2],a=k[3],p=k[4],!(g=k[9]=k[9]===i?m?0:e.length:bn(k[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)S=8==t||t==s?function(e,t,r){var o=Fi(e);return function a(){for(var u=arguments.length,s=n(u),c=u,l=so(a);c--;)s[c]=arguments[c];var f=u<3&&s[0]!==l&&s[u-1]!==l?[]:ln(s,l);return(u-=f.length)<r?$i(e,t,Ui,a.placeholder,i,s,f,i,i,r-u):Et(this&&this!==pt&&this instanceof a?o:e,this,s)}}(e,t,g):t!=c&&33!=t||p.length?Ui.apply(i,k):function(e,t,r,i){var o=1&t,a=Fi(e);return function t(){for(var u=-1,s=arguments.length,c=-1,l=i.length,f=n(l+s),d=this&&this!==pt&&this instanceof t?a:e;++c<l;)f[c]=i[c];for(;s--;)f[c++]=arguments[++u];return Et(d,o?r:this,f)}}(e,t,r,a);else var S=function(e,t,n){var r=1&t,i=Fi(e);return function t(){return(this&&this!==pt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,r);return Ro((x?ti:To)(S,k),e,t)}function Qi(e,t,n,r){return e===i||Ha(e,Te[n])&&!Re.call(r,n)?t:e}function eo(e,t,n,r,o,a){return nu(e)&&nu(t)&&(a.set(t,e),Wr(e,t,i,eo,a),a.delete(t)),e}function to(e){return au(e)?i:e}function no(e,t,n,r,o,a){var u=1&n,s=e.length,c=t.length;if(s!=c&&!(u&&c>s))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var d=-1,p=!0,h=2&n?new Jn:i;for(a.set(e,t),a.set(t,e);++d<s;){var v=e[d],g=t[d];if(r)var m=u?r(g,v,d,t,e,a):r(v,g,d,e,t,a);if(m!==i){if(m)continue;p=!1;break}if(h){if(!jt(t,(function(e,t){if(!Qt(h,t)&&(v===e||o(v,e,n,r,a)))return h.push(t)}))){p=!1;break}}else if(v!==g&&!o(v,g,n,r,a)){p=!1;break}}return a.delete(e),a.delete(t),p}function ro(e){return Mo(Oo(e,i,qo),e+"")}function io(e){return Er(e,Nu,ho)}function oo(e){return Er(e,Mu,vo)}var ao=Pn?function(e){return Pn.get(e)}:ls;function uo(e){for(var t=e.name+"",n=Tn[t],r=Re.call(Tn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function so(e){return(Re.call(Un,"placeholder")?Un:e).placeholder}function co(){var e=Un.iteratee||as;return e=e===as?Lr:e,arguments.length?e(arguments[0],arguments[1]):e}function lo(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function fo(e){for(var t=Nu(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Co(i)]}return t}function po(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Rr(n)?n:i}var ho=mt?function(e){return null==e?[]:(e=Ce(e),Dt(mt(e),(function(t){return $e.call(e,t)})))}:ms,vo=mt?function(e){for(var t=[];e;)Mt(t,ho(e)),e=Ke(e);return t}:ms,go=Cr;function mo(e,t,n){for(var r=-1,i=(t=wi(t,e)).length,o=!1;++r<i;){var a=Bo(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&tu(i)&&wo(a,i)&&(Ka(e)||Ga(e))}function yo(e){return"function"!=typeof e.constructor||Eo(e)?{}:Hn(Ke(e))}function bo(e){return Ka(e)||Ga(e)||!!(Ye&&e&&e[Ye])}function wo(e,t){var n=typeof e;return!!(t=null==t?h:t)&&("number"==n||"symbol"!=n&&we.test(e))&&e>-1&&e%1==0&&e<t}function xo(e,t,n){if(!nu(n))return!1;var r=typeof t;return!!("number"==r?$a(n)&&wo(t,n.length):"string"==r&&t in n)&&Ha(n[t],e)}function ko(e,t){if(Ka(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!lu(e))||(ne.test(e)||!te.test(e)||null!=t&&e in Ce(t))}function So(e){var t=uo(e),n=Un[t];if("function"!=typeof n||!(t in Gn.prototype))return!1;if(e===n)return!0;var r=ao(n);return!!r&&e===r[0]}(En&&go(new En(new ArrayBuffer(1)))!=R||Cn&&go(new Cn)!=E||In&&go(In.resolve())!=O||On&&go(new On)!=D||An&&go(new An)!=N)&&(go=function(e){var t=Cr(e),n=t==I?e.constructor:i,r=n?zo(n):"";if(r)switch(r){case Nn:return R;case Mn:return E;case Rn:return O;case Ln:return D;case jn:return N}return t});var _o=Ne?Qa:ys;function Eo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Te)}function Co(e){return e===e&&!nu(e)}function Io(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==i||e in Ce(n)))}}function Oo(e,t,r){return t=bn(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=bn(i.length-t,0),u=n(a);++o<a;)u[o]=i[t+o];o=-1;for(var s=n(t+1);++o<t;)s[o]=i[o];return s[t]=r(u),Et(e,this,s)}}function Ao(e,t){return t.length<2?e:_r(e,ii(t,0,-1))}function Do(e,t){for(var n=e.length,r=wn(t.length,n),o=Di(e);r--;){var a=t[r];e[r]=wo(a,n)?o[a]:i}return e}function Po(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]}var To=Lo(ti),No=dt||function(e,t){return pt.setTimeout(e,t)},Mo=Lo(ni);function Ro(e,t,n){var r=t+"";return Mo(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(se,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return It(m,(function(n){var r="_."+n[0];t&n[1]&&!Pt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ce);return t?t[1].split(le):[]}(r),n)))}function Lo(e){var t=0,n=0;return function(){var r=xn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function jo(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var a=Jr(n,o),u=e[a];e[a]=e[n],e[n]=u}return e.length=t,e}var Fo=function(e){var t=La(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,(function(e,n,r,i){t.push(r?i.replace(pe,"$1"):n||e)})),t}));function Bo(e){if("string"==typeof e||lu(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function zo(e){if(null!=e){try{return Me.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Uo(e){if(e instanceof Gn)return e.clone();var t=new Vn(e.__wrapped__,e.__chain__);return t.__actions__=Di(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ho=Zr((function(e,t){return Ja(e)?dr(e,yr(t,1,Ja,!0)):[]})),Wo=Zr((function(e,t){var n=Xo(t);return Ja(n)&&(n=i),Ja(e)?dr(e,yr(t,1,Ja,!0),co(n,2)):[]})),Vo=Zr((function(e,t){var n=Xo(t);return Ja(n)&&(n=i),Ja(e)?dr(e,yr(t,1,Ja,!0),i,n):[]}));function Go(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:gu(n);return i<0&&(i=bn(r+i,0)),zt(e,co(t,3),i)}function Ko(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=gu(n),o=n<0?bn(r+o,0):wn(o,r-1)),zt(e,co(t,3),o,!0)}function qo(e){return(null==e?0:e.length)?yr(e,1):[]}function $o(e){return e&&e.length?e[0]:i}var Jo=Zr((function(e){var t=Nt(e,yi);return t.length&&t[0]===e[0]?Dr(t):[]})),Yo=Zr((function(e){var t=Xo(e),n=Nt(e,yi);return t===Xo(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Dr(n,co(t,2)):[]})),Zo=Zr((function(e){var t=Xo(e),n=Nt(e,yi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Dr(n,i,t):[]}));function Xo(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Qo=Zr(ea);function ea(e,t){return e&&e.length&&t&&t.length?qr(e,t):e}var ta=ro((function(e,t){var n=null==e?0:e.length,r=ur(e,t);return $r(e,Nt(t,(function(e){return wo(e,n)?+e:e})).sort(Ii)),r}));function na(e){return null==e?e:_n.call(e)}var ra=Zr((function(e){return fi(yr(e,1,Ja,!0))})),ia=Zr((function(e){var t=Xo(e);return Ja(t)&&(t=i),fi(yr(e,1,Ja,!0),co(t,2))})),oa=Zr((function(e){var t=Xo(e);return t="function"==typeof t?t:i,fi(yr(e,1,Ja,!0),i,t)}));function aa(e){if(!e||!e.length)return[];var t=0;return e=Dt(e,(function(e){if(Ja(e))return t=bn(e.length,t),!0})),Jt(t,(function(t){return Nt(e,Gt(t))}))}function ua(e,t){if(!e||!e.length)return[];var n=aa(e);return null==t?n:Nt(n,(function(e){return Et(t,i,e)}))}var sa=Zr((function(e,t){return Ja(e)?dr(e,t):[]})),ca=Zr((function(e){return gi(Dt(e,Ja))})),la=Zr((function(e){var t=Xo(e);return Ja(t)&&(t=i),gi(Dt(e,Ja),co(t,2))})),fa=Zr((function(e){var t=Xo(e);return t="function"==typeof t?t:i,gi(Dt(e,Ja),i,t)})),da=Zr(aa);var pa=Zr((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,ua(e,n)}));function ha(e){var t=Un(e);return t.__chain__=!0,t}function va(e,t){return t(e)}var ga=ro((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return ur(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Gn&&wo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:va,args:[o],thisArg:i}),new Vn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)}));var ma=Ti((function(e,t,n){Re.call(e,n)?++e[n]:ar(e,n,1)}));var ya=Bi(Go),ba=Bi(Ko);function wa(e,t){return(Ka(e)?It:pr)(e,co(t,3))}function xa(e,t){return(Ka(e)?Ot:hr)(e,co(t,3))}var ka=Ti((function(e,t,n){Re.call(e,n)?e[n].push(t):ar(e,n,[t])}));var Sa=Zr((function(e,t,r){var i=-1,o="function"==typeof t,a=$a(e)?n(e.length):[];return pr(e,(function(e){a[++i]=o?Et(t,e,r):Pr(e,t,r)})),a})),_a=Ti((function(e,t,n){ar(e,n,t)}));function Ea(e,t){return(Ka(e)?Nt:zr)(e,co(t,3))}var Ca=Ti((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Ia=Zr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&xo(e,t[0],t[1])?t=[]:n>2&&xo(t[0],t[1],t[2])&&(t=[t[0]]),Gr(e,yr(t,1),[])})),Oa=ft||function(){return pt.Date.now()};function Aa(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Xi(e,f,i,i,i,i,t)}function Da(e,t){var n;if("function"!=typeof t)throw new Ae(o);return e=gu(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Pa=Zr((function(e,t,n){var r=1;if(n.length){var i=ln(n,so(Pa));r|=c}return Xi(e,r,t,n,i)})),Ta=Zr((function(e,t,n){var r=3;if(n.length){var i=ln(n,so(Ta));r|=c}return Xi(t,r,e,n,i)}));function Na(e,t,n){var r,a,u,s,c,l,f=0,d=!1,p=!1,h=!0;if("function"!=typeof e)throw new Ae(o);function v(t){var n=r,o=a;return r=a=i,f=t,s=e.apply(o,n)}function g(e){return f=e,c=No(y,t),d?v(e):s}function m(e){var n=e-l;return l===i||n>=t||n<0||p&&e-f>=u}function y(){var e=Oa();if(m(e))return b(e);c=No(y,function(e){var n=t-(e-l);return p?wn(n,u-(e-f)):n}(e))}function b(e){return c=i,h&&r?v(e):(r=a=i,s)}function w(){var e=Oa(),n=m(e);if(r=arguments,a=this,l=e,n){if(c===i)return g(l);if(p)return Si(c),c=No(y,t),v(l)}return c===i&&(c=No(y,t)),s}return t=yu(t)||0,nu(n)&&(d=!!n.leading,u=(p="maxWait"in n)?bn(yu(n.maxWait)||0,t):u,h="trailing"in n?!!n.trailing:h),w.cancel=function(){c!==i&&Si(c),f=0,r=l=a=c=i},w.flush=function(){return c===i?s:b(Oa())},w}var Ma=Zr((function(e,t){return fr(e,1,t)})),Ra=Zr((function(e,t,n){return fr(e,yu(t)||0,n)}));function La(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ae(o);var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(La.Cache||$n),n}function ja(e){if("function"!=typeof e)throw new Ae(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}La.Cache=$n;var Fa=xi((function(e,t){var n=(t=1==t.length&&Ka(t[0])?Nt(t[0],Zt(co())):Nt(yr(t,1),Zt(co()))).length;return Zr((function(r){for(var i=-1,o=wn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return Et(e,this,r)}))})),Ba=Zr((function(e,t){var n=ln(t,so(Ba));return Xi(e,c,i,t,n)})),za=Zr((function(e,t){var n=ln(t,so(za));return Xi(e,l,i,t,n)})),Ua=ro((function(e,t){return Xi(e,d,i,i,i,t)}));function Ha(e,t){return e===t||e!==e&&t!==t}var Wa=qi(Ir),Va=qi((function(e,t){return e>=t})),Ga=Tr(function(){return arguments}())?Tr:function(e){return ru(e)&&Re.call(e,"callee")&&!$e.call(e,"callee")},Ka=n.isArray,qa=bt?Zt(bt):function(e){return ru(e)&&Cr(e)==M};function $a(e){return null!=e&&tu(e.length)&&!Qa(e)}function Ja(e){return ru(e)&&$a(e)}var Ya=yt||ys,Za=wt?Zt(wt):function(e){return ru(e)&&Cr(e)==x};function Xa(e){if(!ru(e))return!1;var t=Cr(e);return t==k||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!au(e)}function Qa(e){if(!nu(e))return!1;var t=Cr(e);return t==S||t==_||"[object AsyncFunction]"==t||"[object Proxy]"==t}function eu(e){return"number"==typeof e&&e==gu(e)}function tu(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function nu(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ru(e){return null!=e&&"object"==typeof e}var iu=xt?Zt(xt):function(e){return ru(e)&&go(e)==E};function ou(e){return"number"==typeof e||ru(e)&&Cr(e)==C}function au(e){if(!ru(e)||Cr(e)!=I)return!1;var t=Ke(e);if(null===t)return!0;var n=Re.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Me.call(n)==Be}var uu=kt?Zt(kt):function(e){return ru(e)&&Cr(e)==A};var su=St?Zt(St):function(e){return ru(e)&&go(e)==D};function cu(e){return"string"==typeof e||!Ka(e)&&ru(e)&&Cr(e)==P}function lu(e){return"symbol"==typeof e||ru(e)&&Cr(e)==T}var fu=_t?Zt(_t):function(e){return ru(e)&&tu(e.length)&&!!at[Cr(e)]};var du=qi(Br),pu=qi((function(e,t){return e<=t}));function hu(e){if(!e)return[];if($a(e))return cu(e)?hn(e):Di(e);if(Ze&&e[Ze])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ze]());var t=go(e);return(t==E?sn:t==D?fn:Hu)(e)}function vu(e){return e?(e=yu(e))===p||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function gu(e){var t=vu(e),n=t%1;return t===t?n?t-n:t:0}function mu(e){return e?sr(gu(e),0,g):0}function yu(e){if("number"==typeof e)return e;if(lu(e))return v;if(nu(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=nu(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Yt(e);var n=me.test(e);return n||be.test(e)?lt(e.slice(2),n?2:8):ge.test(e)?v:+e}function bu(e){return Pi(e,Mu(e))}function wu(e){return null==e?"":li(e)}var xu=Ni((function(e,t){if(Eo(t)||$a(t))Pi(t,Nu(t),e);else for(var n in t)Re.call(t,n)&&nr(e,n,t[n])})),ku=Ni((function(e,t){Pi(t,Mu(t),e)})),Su=Ni((function(e,t,n,r){Pi(t,Mu(t),e,r)})),_u=Ni((function(e,t,n,r){Pi(t,Nu(t),e,r)})),Eu=ro(ur);var Cu=Zr((function(e,t){e=Ce(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&xo(t[0],t[1],o)&&(r=1);++n<r;)for(var a=t[n],u=Mu(a),s=-1,c=u.length;++s<c;){var l=u[s],f=e[l];(f===i||Ha(f,Te[l])&&!Re.call(e,l))&&(e[l]=a[l])}return e})),Iu=Zr((function(e){return e.push(i,eo),Et(Lu,i,e)}));function Ou(e,t,n){var r=null==e?i:_r(e,t);return r===i?n:r}function Au(e,t){return null!=e&&mo(e,t,Ar)}var Du=Hi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),e[t]=n}),ns(os)),Pu=Hi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),Re.call(e,t)?e[t].push(n):e[t]=[n]}),co),Tu=Zr(Pr);function Nu(e){return $a(e)?Zn(e):jr(e)}function Mu(e){return $a(e)?Zn(e,!0):Fr(e)}var Ru=Ni((function(e,t,n){Wr(e,t,n)})),Lu=Ni((function(e,t,n,r){Wr(e,t,n,r)})),ju=ro((function(e,t){var n={};if(null==e)return n;var r=!1;t=Nt(t,(function(t){return t=wi(t,e),r||(r=t.length>1),t})),Pi(e,oo(e),n),r&&(n=cr(n,7,to));for(var i=t.length;i--;)di(n,t[i]);return n}));var Fu=ro((function(e,t){return null==e?{}:function(e,t){return Kr(e,t,(function(t,n){return Au(e,n)}))}(e,t)}));function Bu(e,t){if(null==e)return{};var n=Nt(oo(e),(function(e){return[e]}));return t=co(t),Kr(e,n,(function(e,n){return t(e,n[0])}))}var zu=Zi(Nu),Uu=Zi(Mu);function Hu(e){return null==e?[]:Xt(e,Nu(e))}var Wu=ji((function(e,t,n){return t=t.toLowerCase(),e+(n?Vu(t):t)}));function Vu(e){return Xu(wu(e).toLowerCase())}function Gu(e){return(e=wu(e))&&e.replace(xe,rn).replace(Qe,"")}var Ku=ji((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),qu=ji((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),$u=Li("toLowerCase");var Ju=ji((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Yu=ji((function(e,t,n){return e+(n?" ":"")+Xu(t)}));var Zu=ji((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Xu=Li("toUpperCase");function Qu(e,t,n){return e=wu(e),(t=n?i:t)===i?function(e){return rt.test(e)}(e)?function(e){return e.match(tt)||[]}(e):function(e){return e.match(fe)||[]}(e):e.match(t)||[]}var es=Zr((function(e,t){try{return Et(e,i,t)}catch(n){return Xa(n)?n:new ue(n)}})),ts=ro((function(e,t){return It(t,(function(t){t=Bo(t),ar(e,t,Pa(e[t],e))})),e}));function ns(e){return function(){return e}}var rs=zi(),is=zi(!0);function os(e){return e}function as(e){return Lr("function"==typeof e?e:cr(e,1))}var us=Zr((function(e,t){return function(n){return Pr(n,e,t)}})),ss=Zr((function(e,t){return function(n){return Pr(e,n,t)}}));function cs(e,t,n){var r=Nu(t),i=Sr(t,r);null!=n||nu(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Sr(t,Nu(t)));var o=!(nu(n)&&"chain"in n)||!!n.chain,a=Qa(e);return It(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=Di(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Mt([this.value()],arguments))})})),e}function ls(){}var fs=Vi(Nt),ds=Vi(At),ps=Vi(jt);function hs(e){return ko(e)?Gt(Bo(e)):function(e){return function(t){return _r(t,e)}}(e)}var vs=Ki(),gs=Ki(!0);function ms(){return[]}function ys(){return!1}var bs=Wi((function(e,t){return e+t}),0),ws=Ji("ceil"),xs=Wi((function(e,t){return e/t}),1),ks=Ji("floor");var Ss=Wi((function(e,t){return e*t}),1),_s=Ji("round"),Es=Wi((function(e,t){return e-t}),0);return Un.after=function(e,t){if("function"!=typeof t)throw new Ae(o);return e=gu(e),function(){if(--e<1)return t.apply(this,arguments)}},Un.ary=Aa,Un.assign=xu,Un.assignIn=ku,Un.assignInWith=Su,Un.assignWith=_u,Un.at=Eu,Un.before=Da,Un.bind=Pa,Un.bindAll=ts,Un.bindKey=Ta,Un.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ka(e)?e:[e]},Un.chain=ha,Un.chunk=function(e,t,r){t=(r?xo(e,t,r):t===i)?1:bn(gu(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,u=0,s=n(ht(o/t));a<o;)s[u++]=ii(e,a,a+=t);return s},Un.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Un.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Mt(Ka(r)?Di(r):[r],yr(t,1))},Un.cond=function(e){var t=null==e?0:e.length,n=co();return e=t?Nt(e,(function(e){if("function"!=typeof e[1])throw new Ae(o);return[n(e[0]),e[1]]})):[],Zr((function(n){for(var r=-1;++r<t;){var i=e[r];if(Et(i[0],this,n))return Et(i[1],this,n)}}))},Un.conforms=function(e){return function(e){var t=Nu(e);return function(n){return lr(n,e,t)}}(cr(e,1))},Un.constant=ns,Un.countBy=ma,Un.create=function(e,t){var n=Hn(e);return null==t?n:or(n,t)},Un.curry=function e(t,n,r){var o=Xi(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Un.curryRight=function e(t,n,r){var o=Xi(t,s,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Un.debounce=Na,Un.defaults=Cu,Un.defaultsDeep=Iu,Un.defer=Ma,Un.delay=Ra,Un.difference=Ho,Un.differenceBy=Wo,Un.differenceWith=Vo,Un.drop=function(e,t,n){var r=null==e?0:e.length;return r?ii(e,(t=n||t===i?1:gu(t))<0?0:t,r):[]},Un.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ii(e,0,(t=r-(t=n||t===i?1:gu(t)))<0?0:t):[]},Un.dropRightWhile=function(e,t){return e&&e.length?hi(e,co(t,3),!0,!0):[]},Un.dropWhile=function(e,t){return e&&e.length?hi(e,co(t,3),!0):[]},Un.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&xo(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=gu(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:gu(r))<0&&(r+=o),r=n>r?0:mu(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Un.filter=function(e,t){return(Ka(e)?Dt:mr)(e,co(t,3))},Un.flatMap=function(e,t){return yr(Ea(e,t),1)},Un.flatMapDeep=function(e,t){return yr(Ea(e,t),p)},Un.flatMapDepth=function(e,t,n){return n=n===i?1:gu(n),yr(Ea(e,t),n)},Un.flatten=qo,Un.flattenDeep=function(e){return(null==e?0:e.length)?yr(e,p):[]},Un.flattenDepth=function(e,t){return(null==e?0:e.length)?yr(e,t=t===i?1:gu(t)):[]},Un.flip=function(e){return Xi(e,512)},Un.flow=rs,Un.flowRight=is,Un.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Un.functions=function(e){return null==e?[]:Sr(e,Nu(e))},Un.functionsIn=function(e){return null==e?[]:Sr(e,Mu(e))},Un.groupBy=ka,Un.initial=function(e){return(null==e?0:e.length)?ii(e,0,-1):[]},Un.intersection=Jo,Un.intersectionBy=Yo,Un.intersectionWith=Zo,Un.invert=Du,Un.invertBy=Pu,Un.invokeMap=Sa,Un.iteratee=as,Un.keyBy=_a,Un.keys=Nu,Un.keysIn=Mu,Un.map=Ea,Un.mapKeys=function(e,t){var n={};return t=co(t,3),xr(e,(function(e,r,i){ar(n,t(e,r,i),e)})),n},Un.mapValues=function(e,t){var n={};return t=co(t,3),xr(e,(function(e,r,i){ar(n,r,t(e,r,i))})),n},Un.matches=function(e){return Ur(cr(e,1))},Un.matchesProperty=function(e,t){return Hr(e,cr(t,1))},Un.memoize=La,Un.merge=Ru,Un.mergeWith=Lu,Un.method=us,Un.methodOf=ss,Un.mixin=cs,Un.negate=ja,Un.nthArg=function(e){return e=gu(e),Zr((function(t){return Vr(t,e)}))},Un.omit=ju,Un.omitBy=function(e,t){return Bu(e,ja(co(t)))},Un.once=function(e){return Da(2,e)},Un.orderBy=function(e,t,n,r){return null==e?[]:(Ka(t)||(t=null==t?[]:[t]),Ka(n=r?i:n)||(n=null==n?[]:[n]),Gr(e,t,n))},Un.over=fs,Un.overArgs=Fa,Un.overEvery=ds,Un.overSome=ps,Un.partial=Ba,Un.partialRight=za,Un.partition=Ca,Un.pick=Fu,Un.pickBy=Bu,Un.property=hs,Un.propertyOf=function(e){return function(t){return null==e?i:_r(e,t)}},Un.pull=Qo,Un.pullAll=ea,Un.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?qr(e,t,co(n,2)):e},Un.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?qr(e,t,i,n):e},Un.pullAt=ta,Un.range=vs,Un.rangeRight=gs,Un.rearg=Ua,Un.reject=function(e,t){return(Ka(e)?Dt:mr)(e,ja(co(t,3)))},Un.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=co(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return $r(e,i),n},Un.rest=function(e,t){if("function"!=typeof e)throw new Ae(o);return Zr(e,t=t===i?t:gu(t))},Un.reverse=na,Un.sampleSize=function(e,t,n){return t=(n?xo(e,t,n):t===i)?1:gu(t),(Ka(e)?Qn:Qr)(e,t)},Un.set=function(e,t,n){return null==e?e:ei(e,t,n)},Un.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:ei(e,t,n,r)},Un.shuffle=function(e){return(Ka(e)?er:ri)(e)},Un.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&xo(e,t,n)?(t=0,n=r):(t=null==t?0:gu(t),n=n===i?r:gu(n)),ii(e,t,n)):[]},Un.sortBy=Ia,Un.sortedUniq=function(e){return e&&e.length?si(e):[]},Un.sortedUniqBy=function(e,t){return e&&e.length?si(e,co(t,2)):[]},Un.split=function(e,t,n){return n&&"number"!=typeof n&&xo(e,t,n)&&(t=n=i),(n=n===i?g:n>>>0)?(e=wu(e))&&("string"==typeof t||null!=t&&!uu(t))&&!(t=li(t))&&un(e)?ki(hn(e),0,n):e.split(t,n):[]},Un.spread=function(e,t){if("function"!=typeof e)throw new Ae(o);return t=null==t?0:bn(gu(t),0),Zr((function(n){var r=n[t],i=ki(n,0,t);return r&&Mt(i,r),Et(e,this,i)}))},Un.tail=function(e){var t=null==e?0:e.length;return t?ii(e,1,t):[]},Un.take=function(e,t,n){return e&&e.length?ii(e,0,(t=n||t===i?1:gu(t))<0?0:t):[]},Un.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ii(e,(t=r-(t=n||t===i?1:gu(t)))<0?0:t,r):[]},Un.takeRightWhile=function(e,t){return e&&e.length?hi(e,co(t,3),!1,!0):[]},Un.takeWhile=function(e,t){return e&&e.length?hi(e,co(t,3)):[]},Un.tap=function(e,t){return t(e),e},Un.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Ae(o);return nu(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Na(e,t,{leading:r,maxWait:t,trailing:i})},Un.thru=va,Un.toArray=hu,Un.toPairs=zu,Un.toPairsIn=Uu,Un.toPath=function(e){return Ka(e)?Nt(e,Bo):lu(e)?[e]:Di(Fo(wu(e)))},Un.toPlainObject=bu,Un.transform=function(e,t,n){var r=Ka(e),i=r||Ya(e)||fu(e);if(t=co(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:nu(e)&&Qa(o)?Hn(Ke(e)):{}}return(i?It:xr)(e,(function(e,r,i){return t(n,e,r,i)})),n},Un.unary=function(e){return Aa(e,1)},Un.union=ra,Un.unionBy=ia,Un.unionWith=oa,Un.uniq=function(e){return e&&e.length?fi(e):[]},Un.uniqBy=function(e,t){return e&&e.length?fi(e,co(t,2)):[]},Un.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?fi(e,i,t):[]},Un.unset=function(e,t){return null==e||di(e,t)},Un.unzip=aa,Un.unzipWith=ua,Un.update=function(e,t,n){return null==e?e:pi(e,t,bi(n))},Un.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:pi(e,t,bi(n),r)},Un.values=Hu,Un.valuesIn=function(e){return null==e?[]:Xt(e,Mu(e))},Un.without=sa,Un.words=Qu,Un.wrap=function(e,t){return Ba(bi(t),e)},Un.xor=ca,Un.xorBy=la,Un.xorWith=fa,Un.zip=da,Un.zipObject=function(e,t){return mi(e||[],t||[],nr)},Un.zipObjectDeep=function(e,t){return mi(e||[],t||[],ei)},Un.zipWith=pa,Un.entries=zu,Un.entriesIn=Uu,Un.extend=ku,Un.extendWith=Su,cs(Un,Un),Un.add=bs,Un.attempt=es,Un.camelCase=Wu,Un.capitalize=Vu,Un.ceil=ws,Un.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=yu(n))===n?n:0),t!==i&&(t=(t=yu(t))===t?t:0),sr(yu(e),t,n)},Un.clone=function(e){return cr(e,4)},Un.cloneDeep=function(e){return cr(e,5)},Un.cloneDeepWith=function(e,t){return cr(e,5,t="function"==typeof t?t:i)},Un.cloneWith=function(e,t){return cr(e,4,t="function"==typeof t?t:i)},Un.conformsTo=function(e,t){return null==t||lr(e,t,Nu(t))},Un.deburr=Gu,Un.defaultTo=function(e,t){return null==e||e!==e?t:e},Un.divide=xs,Un.endsWith=function(e,t,n){e=wu(e),t=li(t);var r=e.length,o=n=n===i?r:sr(gu(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Un.eq=Ha,Un.escape=function(e){return(e=wu(e))&&Z.test(e)?e.replace(J,on):e},Un.escapeRegExp=function(e){return(e=wu(e))&&oe.test(e)?e.replace(ie,"\\$&"):e},Un.every=function(e,t,n){var r=Ka(e)?At:vr;return n&&xo(e,t,n)&&(t=i),r(e,co(t,3))},Un.find=ya,Un.findIndex=Go,Un.findKey=function(e,t){return Bt(e,co(t,3),xr)},Un.findLast=ba,Un.findLastIndex=Ko,Un.findLastKey=function(e,t){return Bt(e,co(t,3),kr)},Un.floor=ks,Un.forEach=wa,Un.forEachRight=xa,Un.forIn=function(e,t){return null==e?e:br(e,co(t,3),Mu)},Un.forInRight=function(e,t){return null==e?e:wr(e,co(t,3),Mu)},Un.forOwn=function(e,t){return e&&xr(e,co(t,3))},Un.forOwnRight=function(e,t){return e&&kr(e,co(t,3))},Un.get=Ou,Un.gt=Wa,Un.gte=Va,Un.has=function(e,t){return null!=e&&mo(e,t,Or)},Un.hasIn=Au,Un.head=$o,Un.identity=os,Un.includes=function(e,t,n,r){e=$a(e)?e:Hu(e),n=n&&!r?gu(n):0;var i=e.length;return n<0&&(n=bn(i+n,0)),cu(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ut(e,t,n)>-1},Un.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:gu(n);return i<0&&(i=bn(r+i,0)),Ut(e,t,i)},Un.inRange=function(e,t,n){return t=vu(t),n===i?(n=t,t=0):n=vu(n),function(e,t,n){return e>=wn(t,n)&&e<bn(t,n)}(e=yu(e),t,n)},Un.invoke=Tu,Un.isArguments=Ga,Un.isArray=Ka,Un.isArrayBuffer=qa,Un.isArrayLike=$a,Un.isArrayLikeObject=Ja,Un.isBoolean=function(e){return!0===e||!1===e||ru(e)&&Cr(e)==w},Un.isBuffer=Ya,Un.isDate=Za,Un.isElement=function(e){return ru(e)&&1===e.nodeType&&!au(e)},Un.isEmpty=function(e){if(null==e)return!0;if($a(e)&&(Ka(e)||"string"==typeof e||"function"==typeof e.splice||Ya(e)||fu(e)||Ga(e)))return!e.length;var t=go(e);if(t==E||t==D)return!e.size;if(Eo(e))return!jr(e).length;for(var n in e)if(Re.call(e,n))return!1;return!0},Un.isEqual=function(e,t){return Nr(e,t)},Un.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Nr(e,t,i,n):!!r},Un.isError=Xa,Un.isFinite=function(e){return"number"==typeof e&&Ft(e)},Un.isFunction=Qa,Un.isInteger=eu,Un.isLength=tu,Un.isMap=iu,Un.isMatch=function(e,t){return e===t||Mr(e,t,fo(t))},Un.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Mr(e,t,fo(t),n)},Un.isNaN=function(e){return ou(e)&&e!=+e},Un.isNative=function(e){if(_o(e))throw new ue("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Rr(e)},Un.isNil=function(e){return null==e},Un.isNull=function(e){return null===e},Un.isNumber=ou,Un.isObject=nu,Un.isObjectLike=ru,Un.isPlainObject=au,Un.isRegExp=uu,Un.isSafeInteger=function(e){return eu(e)&&e>=-9007199254740991&&e<=h},Un.isSet=su,Un.isString=cu,Un.isSymbol=lu,Un.isTypedArray=fu,Un.isUndefined=function(e){return e===i},Un.isWeakMap=function(e){return ru(e)&&go(e)==N},Un.isWeakSet=function(e){return ru(e)&&"[object WeakSet]"==Cr(e)},Un.join=function(e,t){return null==e?"":Kt.call(e,t)},Un.kebabCase=Ku,Un.last=Xo,Un.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=gu(n))<0?bn(r+o,0):wn(o,r-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):zt(e,Wt,o,!0)},Un.lowerCase=qu,Un.lowerFirst=$u,Un.lt=du,Un.lte=pu,Un.max=function(e){return e&&e.length?gr(e,os,Ir):i},Un.maxBy=function(e,t){return e&&e.length?gr(e,co(t,2),Ir):i},Un.mean=function(e){return Vt(e,os)},Un.meanBy=function(e,t){return Vt(e,co(t,2))},Un.min=function(e){return e&&e.length?gr(e,os,Br):i},Un.minBy=function(e,t){return e&&e.length?gr(e,co(t,2),Br):i},Un.stubArray=ms,Un.stubFalse=ys,Un.stubObject=function(){return{}},Un.stubString=function(){return""},Un.stubTrue=function(){return!0},Un.multiply=Ss,Un.nth=function(e,t){return e&&e.length?Vr(e,gu(t)):i},Un.noConflict=function(){return pt._===this&&(pt._=ze),this},Un.noop=ls,Un.now=Oa,Un.pad=function(e,t,n){e=wu(e);var r=(t=gu(t))?pn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Gi(vt(i),n)+e+Gi(ht(i),n)},Un.padEnd=function(e,t,n){e=wu(e);var r=(t=gu(t))?pn(e):0;return t&&r<t?e+Gi(t-r,n):e},Un.padStart=function(e,t,n){e=wu(e);var r=(t=gu(t))?pn(e):0;return t&&r<t?Gi(t-r,n)+e:e},Un.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),kn(wu(e).replace(ae,""),t||0)},Un.random=function(e,t,n){if(n&&"boolean"!=typeof n&&xo(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=vu(e),t===i?(t=e,e=0):t=vu(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=Sn();return wn(e+o*(t-e+ct("1e-"+((o+"").length-1))),t)}return Jr(e,t)},Un.reduce=function(e,t,n){var r=Ka(e)?Rt:qt,i=arguments.length<3;return r(e,co(t,4),n,i,pr)},Un.reduceRight=function(e,t,n){var r=Ka(e)?Lt:qt,i=arguments.length<3;return r(e,co(t,4),n,i,hr)},Un.repeat=function(e,t,n){return t=(n?xo(e,t,n):t===i)?1:gu(t),Yr(wu(e),t)},Un.replace=function(){var e=arguments,t=wu(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Un.result=function(e,t,n){var r=-1,o=(t=wi(t,e)).length;for(o||(o=1,e=i);++r<o;){var a=null==e?i:e[Bo(t[r])];a===i&&(r=o,a=n),e=Qa(a)?a.call(e):a}return e},Un.round=_s,Un.runInContext=e,Un.sample=function(e){return(Ka(e)?Xn:Xr)(e)},Un.size=function(e){if(null==e)return 0;if($a(e))return cu(e)?pn(e):e.length;var t=go(e);return t==E||t==D?e.size:jr(e).length},Un.snakeCase=Ju,Un.some=function(e,t,n){var r=Ka(e)?jt:oi;return n&&xo(e,t,n)&&(t=i),r(e,co(t,3))},Un.sortedIndex=function(e,t){return ai(e,t)},Un.sortedIndexBy=function(e,t,n){return ui(e,t,co(n,2))},Un.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ai(e,t);if(r<n&&Ha(e[r],t))return r}return-1},Un.sortedLastIndex=function(e,t){return ai(e,t,!0)},Un.sortedLastIndexBy=function(e,t,n){return ui(e,t,co(n,2),!0)},Un.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=ai(e,t,!0)-1;if(Ha(e[n],t))return n}return-1},Un.startCase=Yu,Un.startsWith=function(e,t,n){return e=wu(e),n=null==n?0:sr(gu(n),0,e.length),t=li(t),e.slice(n,n+t.length)==t},Un.subtract=Es,Un.sum=function(e){return e&&e.length?$t(e,os):0},Un.sumBy=function(e,t){return e&&e.length?$t(e,co(t,2)):0},Un.template=function(e,t,n){var r=Un.templateSettings;n&&xo(e,t,n)&&(t=i),e=wu(e),t=Su({},t,r,Qi);var o,a,u=Su({},t.imports,r.imports,Qi),s=Nu(u),c=Xt(u,s),l=0,f=t.interpolate||ke,d="__p += '",p=Ie((t.escape||ke).source+"|"+f.source+"|"+(f===ee?he:ke).source+"|"+(t.evaluate||ke).source+"|$","g"),h="//# sourceURL="+(Re.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ot+"]")+"\n";e.replace(p,(function(t,n,r,i,u,s){return r||(r=i),d+=e.slice(l,s).replace(Se,an),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),u&&(a=!0,d+="';\n"+u+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=s+t.length,t})),d+="';\n";var v=Re.call(t,"variable")&&t.variable;if(v){if(de.test(v))throw new ue("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(G,""):d).replace(K,"$1").replace(q,"$1;"),d="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=es((function(){return _e(s,h+"return "+d).apply(i,c)}));if(g.source=d,Xa(g))throw g;return g},Un.times=function(e,t){if((e=gu(e))<1||e>h)return[];var n=g,r=wn(e,g);t=co(t),e-=g;for(var i=Jt(r,t);++n<e;)t(n);return i},Un.toFinite=vu,Un.toInteger=gu,Un.toLength=mu,Un.toLower=function(e){return wu(e).toLowerCase()},Un.toNumber=yu,Un.toSafeInteger=function(e){return e?sr(gu(e),-9007199254740991,h):0===e?e:0},Un.toString=wu,Un.toUpper=function(e){return wu(e).toUpperCase()},Un.trim=function(e,t,n){if((e=wu(e))&&(n||t===i))return Yt(e);if(!e||!(t=li(t)))return e;var r=hn(e),o=hn(t);return ki(r,en(r,o),tn(r,o)+1).join("")},Un.trimEnd=function(e,t,n){if((e=wu(e))&&(n||t===i))return e.slice(0,vn(e)+1);if(!e||!(t=li(t)))return e;var r=hn(e);return ki(r,0,tn(r,hn(t))+1).join("")},Un.trimStart=function(e,t,n){if((e=wu(e))&&(n||t===i))return e.replace(ae,"");if(!e||!(t=li(t)))return e;var r=hn(e);return ki(r,en(r,hn(t))).join("")},Un.truncate=function(e,t){var n=30,r="...";if(nu(t)){var o="separator"in t?t.separator:o;n="length"in t?gu(t.length):n,r="omission"in t?li(t.omission):r}var a=(e=wu(e)).length;if(un(e)){var u=hn(e);a=u.length}if(n>=a)return e;var s=n-pn(r);if(s<1)return r;var c=u?ki(u,0,s).join(""):e.slice(0,s);if(o===i)return c+r;if(u&&(s+=c.length-s),uu(o)){if(e.slice(s).search(o)){var l,f=c;for(o.global||(o=Ie(o.source,wu(ve.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var d=l.index;c=c.slice(0,d===i?s:d)}}else if(e.indexOf(li(o),s)!=s){var p=c.lastIndexOf(o);p>-1&&(c=c.slice(0,p))}return c+r},Un.unescape=function(e){return(e=wu(e))&&Y.test(e)?e.replace($,gn):e},Un.uniqueId=function(e){var t=++Le;return wu(e)+t},Un.upperCase=Zu,Un.upperFirst=Xu,Un.each=wa,Un.eachRight=xa,Un.first=$o,cs(Un,function(){var e={};return xr(Un,(function(t,n){Re.call(Un.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Un.VERSION="4.17.21",It(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Un[e].placeholder=Un})),It(["drop","take"],(function(e,t){Gn.prototype[e]=function(n){n=n===i?1:bn(gu(n),0);var r=this.__filtered__&&!t?new Gn(this):this.clone();return r.__filtered__?r.__takeCount__=wn(n,r.__takeCount__):r.__views__.push({size:wn(n,g),type:e+(r.__dir__<0?"Right":"")}),r},Gn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),It(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Gn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:co(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),It(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Gn.prototype[e]=function(){return this[n](1).value()[0]}})),It(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Gn.prototype[e]=function(){return this.__filtered__?new Gn(this):this[n](1)}})),Gn.prototype.compact=function(){return this.filter(os)},Gn.prototype.find=function(e){return this.filter(e).head()},Gn.prototype.findLast=function(e){return this.reverse().find(e)},Gn.prototype.invokeMap=Zr((function(e,t){return"function"==typeof e?new Gn(this):this.map((function(n){return Pr(n,e,t)}))})),Gn.prototype.reject=function(e){return this.filter(ja(co(e)))},Gn.prototype.slice=function(e,t){e=gu(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Gn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=gu(t))<0?n.dropRight(-t):n.take(t-e)),n)},Gn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Gn.prototype.toArray=function(){return this.take(g)},xr(Gn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Un[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);o&&(Un.prototype[t]=function(){var t=this.__wrapped__,u=r?[1]:arguments,s=t instanceof Gn,c=u[0],l=s||Ka(t),f=function(e){var t=o.apply(Un,Mt([e],u));return r&&d?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(s=l=!1);var d=this.__chain__,p=!!this.__actions__.length,h=a&&!d,v=s&&!p;if(!a&&l){t=v?t:new Gn(this);var g=e.apply(t,u);return g.__actions__.push({func:va,args:[f],thisArg:i}),new Vn(g,d)}return h&&v?e.apply(this,u):(g=this.thru(f),h?r?g.value()[0]:g.value():g)})})),It(["pop","push","shift","sort","splice","unshift"],(function(e){var t=De[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Un.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ka(i)?i:[],e)}return this[n]((function(n){return t.apply(Ka(n)?n:[],e)}))}})),xr(Gn.prototype,(function(e,t){var n=Un[t];if(n){var r=n.name+"";Re.call(Tn,r)||(Tn[r]=[]),Tn[r].push({name:t,func:n})}})),Tn[Ui(i,2).name]=[{name:"wrapper",func:i}],Gn.prototype.clone=function(){var e=new Gn(this.__wrapped__);return e.__actions__=Di(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Di(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Di(this.__views__),e},Gn.prototype.reverse=function(){if(this.__filtered__){var e=new Gn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Gn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ka(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=wn(t,e+a);break;case"takeRight":e=bn(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,u=o.end,s=u-a,c=r?u:a-1,l=this.__iteratees__,f=l.length,d=0,p=wn(s,this.__takeCount__);if(!n||!r&&i==s&&p==s)return vi(e,this.__actions__);var h=[];e:for(;s--&&d<p;){for(var v=-1,g=e[c+=t];++v<f;){var m=l[v],y=m.iteratee,b=m.type,w=y(g);if(2==b)g=w;else if(!w){if(1==b)continue e;break e}}h[d++]=g}return h},Un.prototype.at=ga,Un.prototype.chain=function(){return ha(this)},Un.prototype.commit=function(){return new Vn(this.value(),this.__chain__)},Un.prototype.next=function(){this.__values__===i&&(this.__values__=hu(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Un.prototype.plant=function(e){for(var t,n=this;n instanceof Wn;){var r=Uo(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Un.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Gn){var t=e;return this.__actions__.length&&(t=new Gn(this)),(t=t.reverse()).__actions__.push({func:va,args:[na],thisArg:i}),new Vn(t,this.__chain__)}return this.thru(na)},Un.prototype.toJSON=Un.prototype.valueOf=Un.prototype.value=function(){return vi(this.__wrapped__,this.__actions__)},Un.prototype.first=Un.prototype.head,Ze&&(Un.prototype[Ze]=function(){return this}),Un}();pt._=mn,(r=function(){return mn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},725:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,o){for(var a,u,s=i(e),c=1;c<arguments.length;c++){for(var l in a=Object(arguments[c]))n.call(a,l)&&(s[l]=a[l]);if(t){u=t(a);for(var f=0;f<u.length;f++)r.call(a,u[f])&&(s[u[f]]=a[u[f]])}}return s}},888:function(e,t,n){"use strict";var r=n(47);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var u=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 u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={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:i};return n.PropTypes=n,n}},7:function(e,t,n){e.exports=n(888)()},47:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},424:function(e,t,n){"use strict";var r=n(725),i=n(791);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=60106,u=60107,s=60108,c=60114,l=60109,f=60110,d=60112,p=60113,h=60120,v=60115,g=60116,m=60121,y=60117,b=60119,w=60129,x=60131;if("function"===typeof Symbol&&Symbol.for){var k=Symbol.for;a=k("react.portal"),u=k("react.fragment"),s=k("react.strict_mode"),c=k("react.profiler"),l=k("react.provider"),f=k("react.context"),d=k("react.forward_ref"),p=k("react.suspense"),h=k("react.suspense_list"),v=k("react.memo"),g=k("react.lazy"),m=k("react.block"),y=k("react.fundamental"),b=k("react.scope"),w=k("react.debug_trace_mode"),x=k("react.legacy_hidden")}function S(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case u:return"Fragment";case a:return"Portal";case c:return"Profiler";case s:return"StrictMode";case p:return"Suspense";case h:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case f:return(e.displayName||"Context")+".Consumer";case l:return(e._context.displayName||"Context")+".Provider";case d:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case v:return S(e.type);case m:return S(e._render);case g:t=e._payload,e=e._init;try{return S(e(t))}catch(n){}}return null}var _=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E={};function C(e,t){for(var n=0|e._threadCount;n<=t;n++)e[n]=e._currentValue2,e._threadCount=n+1}for(var I=new Uint16Array(16),O=0;15>O;O++)I[O]=O+1;I[15]=0;var A=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,D=Object.prototype.hasOwnProperty,P={},T={};function N(e){return!!D.call(T,e)||!D.call(P,e)&&(A.test(e)?T[e]=!0:(P[e]=!0,!1))}function M(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var R={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){R[e]=new M(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];R[t]=new M(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){R[e]=new M(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){R[e]=new M(e,2,!1,e,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(e){R[e]=new M(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){R[e]=new M(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){R[e]=new M(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){R[e]=new M(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){R[e]=new M(e,5,!1,e.toLowerCase(),null,!1,!1)}));var L=/[\-:]([a-z])/g;function j(e){return e[1].toUpperCase()}"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(e){var t=e.replace(L,j);R[t]=new M(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(L,j);R[t]=new M(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(L,j);R[t]=new M(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){R[e]=new M(e,1,!1,e.toLowerCase(),null,!1,!1)})),R.xlinkHref=new M("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){R[e]=new M(e,1,!1,e.toLowerCase(),null,!0,!0)}));var F=/["'&<>]/;function B(e){if("boolean"===typeof e||"number"===typeof e)return""+e;e=""+e;var t=F.exec(e);if(t){var n,r="",i=0;for(n=t.index;n<e.length;n++){switch(e.charCodeAt(n)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}i!==n&&(r+=e.substring(i,n)),i=n+1,r+=t}e=i!==n?r+e.substring(i,n):r}return e}function z(e,t){var n,r=R.hasOwnProperty(e)?R[e]:null;return(n="style"!==e)&&(n=null!==r?0===r.type:2<e.length&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1])),n||function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(e,t,r,!1)?"":null!==r?(e=r.attributeName,3===(n=r.type)||4===n&&!0===t?e+'=""':(r.sanitizeURL&&(t=""+t),e+'="'+B(t)+'"')):N(e)?e+'="'+B(t)+'"':""}var U="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},H=null,W=null,V=null,G=!1,K=!1,q=null,$=0;function J(){if(null===H)throw Error(o(321));return H}function Y(){if(0<$)throw Error(o(312));return{memoizedState:null,queue:null,next:null}}function Z(){return null===V?null===W?(G=!1,W=V=Y()):(G=!0,V=W):null===V.next?(G=!1,V=V.next=Y()):(G=!0,V=V.next),V}function X(e,t,n,r){for(;K;)K=!1,$+=1,V=null,n=e(t,r);return Q(),n}function Q(){H=null,K=!1,W=null,$=0,V=q=null}function ee(e,t){return"function"===typeof t?t(e):t}function te(e,t,n){if(H=J(),V=Z(),G){var r=V.queue;if(t=r.dispatch,null!==q&&void 0!==(n=q.get(r))){q.delete(r),r=V.memoizedState;do{r=e(r,n.action),n=n.next}while(null!==n);return V.memoizedState=r,[r,t]}return[V.memoizedState,t]}return e=e===ee?"function"===typeof t?t():t:void 0!==n?n(t):t,V.memoizedState=e,e=(e=V.queue={last:null,dispatch:null}).dispatch=re.bind(null,H,e),[V.memoizedState,e]}function ne(e,t){if(H=J(),t=void 0===t?null:t,null!==(V=Z())){var n=V.memoizedState;if(null!==n&&null!==t){var r=n[1];e:if(null===r)r=!1;else{for(var i=0;i<r.length&&i<t.length;i++)if(!U(t[i],r[i])){r=!1;break e}r=!0}if(r)return n[0]}}return e=e(),V.memoizedState=[e,t],e}function re(e,t,n){if(!(25>$))throw Error(o(301));if(e===H)if(K=!0,e={action:n,next:null},null===q&&(q=new Map),void 0===(n=q.get(t)))q.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}}function ie(){}var oe=null,ae={readContext:function(e){var t=oe.threadID;return C(e,t),e[t]},useContext:function(e){J();var t=oe.threadID;return C(e,t),e[t]},useMemo:ne,useReducer:te,useRef:function(e){H=J();var t=(V=Z()).memoizedState;return null===t?(e={current:e},V.memoizedState=e):t},useState:function(e){return te(ee,e)},useLayoutEffect:function(){},useCallback:function(e,t){return ne((function(){return e}),t)},useImperativeHandle:ie,useEffect:ie,useDebugValue:ie,useDeferredValue:function(e){return J(),e},useTransition:function(){return J(),[function(e){e()},!1]},useOpaqueIdentifier:function(){return(oe.identifierPrefix||"")+"R:"+(oe.uniqueID++).toString(36)},useMutableSource:function(e,t){return J(),t(e._source)}},ue="http://www.w3.org/1999/xhtml";function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}var ce={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},le=r({menuitem:!0},ce),fe={animationIterationCount:!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,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},de=["Webkit","ms","Moz","O"];Object.keys(fe).forEach((function(e){de.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[e]}))}));var pe=/([A-Z])/g,he=/^ms-/,ve=i.Children.toArray,ge=_.ReactCurrentDispatcher,me={listing:!0,pre:!0,textarea:!0},ye=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,be={},we={};var xe=Object.prototype.hasOwnProperty,ke={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function Se(e,t){if(void 0===e)throw Error(o(152,S(t)||"Component"))}function _e(e,t,n){function a(i,a){var u=a.prototype&&a.prototype.isReactComponent,s=function(e,t,n,r){if(r&&"object"===typeof(r=e.contextType)&&null!==r)return C(r,n),r[n];if(e=e.contextTypes){for(var i in n={},e)n[i]=t[i];t=n}else t=E;return t}(a,t,n,u),c=[],l=!1,f={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===c)return null},enqueueReplaceState:function(e,t){l=!0,c=[t]},enqueueSetState:function(e,t){if(null===c)return null;c.push(t)}};if(u){if(u=new a(i.props,s,f),"function"===typeof a.getDerivedStateFromProps){var d=a.getDerivedStateFromProps.call(null,i.props,u.state);null!=d&&(u.state=r({},u.state,d))}}else if(H={},u=a(i.props,s,f),null==(u=X(a,i.props,u,s))||null==u.render)return void Se(e=u,a);if(u.props=i.props,u.context=s,u.updater=f,void 0===(f=u.state)&&(u.state=f=null),"function"===typeof u.UNSAFE_componentWillMount||"function"===typeof u.componentWillMount)if("function"===typeof u.componentWillMount&&"function"!==typeof a.getDerivedStateFromProps&&u.componentWillMount(),"function"===typeof u.UNSAFE_componentWillMount&&"function"!==typeof a.getDerivedStateFromProps&&u.UNSAFE_componentWillMount(),c.length){f=c;var p=l;if(c=null,l=!1,p&&1===f.length)u.state=f[0];else{d=p?f[0]:u.state;var h=!0;for(p=p?1:0;p<f.length;p++){var v=f[p];null!=(v="function"===typeof v?v.call(u,d,i.props,s):v)&&(h?(h=!1,d=r({},d,v)):r(d,v))}u.state=d}}else c=null;if(Se(e=u.render(),a),"function"===typeof u.getChildContext&&"object"===typeof(i=a.childContextTypes)){var g=u.getChildContext();for(var m in g)if(!(m in i))throw Error(o(108,S(a)||"Unknown",m))}g&&(t=r({},t,g))}for(;i.isValidElement(e);){var u=e,s=u.type;if("function"!==typeof s)break;a(u,s)}return{child:e,context:t}}var Ee=function(){function e(e,t,n){i.isValidElement(e)?e.type!==u?e=[e]:(e=e.props.children,e=i.isValidElement(e)?[e]:ve(e)):e=ve(e),e={type:null,domNamespace:ue,children:e,childIndex:0,context:E,footer:""};var r=I[0];if(0===r){var a=I,s=2*(r=a.length);if(!(65536>=s))throw Error(o(304));var c=new Uint16Array(s);for(c.set(a),(I=c)[0]=r+1,a=r;a<s-1;a++)I[a]=a+1;I[s-1]=0}else I[0]=I[r];this.threadID=r,this.stack=[e],this.exhausted=!1,this.currentSelectValue=null,this.previousWasTextNode=!1,this.makeStaticMarkup=t,this.suspenseDepth=0,this.contextIndex=-1,this.contextStack=[],this.contextValueStack=[],this.uniqueID=0,this.identifierPrefix=n&&n.identifierPrefix||""}var t=e.prototype;return t.destroy=function(){if(!this.exhausted){this.exhausted=!0,this.clearProviders();var e=this.threadID;I[e]=I[0],I[0]=e}},t.pushProvider=function(e){var t=++this.contextIndex,n=e.type._context,r=this.threadID;C(n,r);var i=n[r];this.contextStack[t]=n,this.contextValueStack[t]=i,n[r]=e.props.value},t.popProvider=function(){var e=this.contextIndex,t=this.contextStack[e],n=this.contextValueStack[e];this.contextStack[e]=null,this.contextValueStack[e]=null,this.contextIndex--,t[this.threadID]=n},t.clearProviders=function(){for(var e=this.contextIndex;0<=e;e--)this.contextStack[e][this.threadID]=this.contextValueStack[e]},t.read=function(e){if(this.exhausted)return null;var t=oe;oe=this;var n=ge.current;ge.current=ae;try{for(var r=[""],i=!1;r[0].length<e;){if(0===this.stack.length){this.exhausted=!0;var a=this.threadID;I[a]=I[0],I[0]=a;break}var u=this.stack[this.stack.length-1];if(i||u.childIndex>=u.children.length){var s=u.footer;if(""!==s&&(this.previousWasTextNode=!1),this.stack.pop(),"select"===u.type)this.currentSelectValue=null;else if(null!=u.type&&null!=u.type.type&&u.type.type.$$typeof===l)this.popProvider(u.type);else if(u.type===p){this.suspenseDepth--;var c=r.pop();if(i){i=!1;var f=u.fallbackFrame;if(!f)throw Error(o(303));this.stack.push(f),r[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}r[this.suspenseDepth]+=c}r[this.suspenseDepth]+=s}else{var d=u.children[u.childIndex++],h="";try{h+=this.render(d,u.context,u.domNamespace)}catch(v){if(null!=v&&"function"===typeof v.then)throw Error(o(294));throw v}r.length<=this.suspenseDepth&&r.push(""),r[this.suspenseDepth]+=h}}return r[0]}finally{ge.current=n,oe=t,Q()}},t.render=function(e,t,n){if("string"===typeof e||"number"===typeof e)return""===(n=""+e)?"":this.makeStaticMarkup?B(n):this.previousWasTextNode?"\x3c!-- --\x3e"+B(n):(this.previousWasTextNode=!0,B(n));if(e=(t=_e(e,t,this.threadID)).child,t=t.context,null===e||!1===e)return"";if(!i.isValidElement(e)){if(null!=e&&null!=e.$$typeof){if((n=e.$$typeof)===a)throw Error(o(257));throw Error(o(258,n.toString()))}return e=ve(e),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),""}var m=e.type;if("string"===typeof m)return this.renderDOM(e,t,n);switch(m){case x:case w:case s:case c:case h:case u:return e=ve(e.props.children),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case p:throw Error(o(294));case b:throw Error(o(343))}if("object"===typeof m&&null!==m)switch(m.$$typeof){case d:H={};var k=m.render(e.props,e.ref);return k=X(m.render,e.props,k,e.ref),k=ve(k),this.stack.push({type:null,domNamespace:n,children:k,childIndex:0,context:t,footer:""}),"";case v:return e=[i.createElement(m.type,r({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case l:return n={type:e,domNamespace:n,children:m=ve(e.props.children),childIndex:0,context:t,footer:""},this.pushProvider(e),this.stack.push(n),"";case f:m=e.type,k=e.props;var S=this.threadID;return C(m,S),m=ve(k.children(m[S])),this.stack.push({type:e,domNamespace:n,children:m,childIndex:0,context:t,footer:""}),"";case y:throw Error(o(338));case g:return m=(k=(m=e.type)._init)(m._payload),e=[i.createElement(m,r({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),""}throw Error(o(130,null==m?m:typeof m,""))},t.renderDOM=function(e,t,n){var a=e.type.toLowerCase();if(n===ue&&se(a),!be.hasOwnProperty(a)){if(!ye.test(a))throw Error(o(65,a));be[a]=!0}var u=e.props;if("input"===a)u=r({type:void 0},u,{defaultChecked:void 0,defaultValue:void 0,value:null!=u.value?u.value:u.defaultValue,checked:null!=u.checked?u.checked:u.defaultChecked});else if("textarea"===a){var s=u.value;if(null==s){s=u.defaultValue;var c=u.children;if(null!=c){if(null!=s)throw Error(o(92));if(Array.isArray(c)){if(!(1>=c.length))throw Error(o(93));c=c[0]}s=""+c}null==s&&(s="")}u=r({},u,{value:void 0,children:""+s})}else if("select"===a)this.currentSelectValue=null!=u.value?u.value:u.defaultValue,u=r({},u,{value:void 0});else if("option"===a){c=this.currentSelectValue;var l=function(e){if(void 0===e||null===e)return e;var t="";return i.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(u.children);if(null!=c){var f=null!=u.value?u.value+"":l;if(s=!1,Array.isArray(c)){for(var d=0;d<c.length;d++)if(""+c[d]===f){s=!0;break}}else s=""+c===f;u=r({selected:void 0,children:void 0},u,{selected:s,children:l})}}if(s=u){if(le[a]&&(null!=s.children||null!=s.dangerouslySetInnerHTML))throw Error(o(137,a));if(null!=s.dangerouslySetInnerHTML){if(null!=s.children)throw Error(o(60));if("object"!==typeof s.dangerouslySetInnerHTML||!("__html"in s.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=s.style&&"object"!==typeof s.style)throw Error(o(62))}s=u,c=this.makeStaticMarkup,l=1===this.stack.length,f="<"+e.type;e:if(-1===a.indexOf("-"))d="string"===typeof s.is;else 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":d=!1;break e;default:d=!0}for(x in s)if(xe.call(s,x)){var p=s[x];if(null!=p){if("style"===x){var h=void 0,v="",g="";for(h in p)if(p.hasOwnProperty(h)){var m=0===h.indexOf("--"),y=p[h];if(null!=y){if(m)var b=h;else if(b=h,we.hasOwnProperty(b))b=we[b];else{var w=b.replace(pe,"-$1").toLowerCase().replace(he,"-ms-");b=we[b]=w}v+=g+b+":",g=h,v+=m=null==y||"boolean"===typeof y||""===y?"":m||"number"!==typeof y||0===y||fe.hasOwnProperty(g)&&fe[g]?(""+y).trim():y+"px",g=";"}}p=v||null}h=null,d?ke.hasOwnProperty(x)||(h=N(h=x)&&null!=p?h+'="'+B(p)+'"':""):h=z(x,p),h&&(f+=" "+h)}}c||l&&(f+=' data-reactroot=""');var x=f;s="",ce.hasOwnProperty(a)?x+="/>":(x+=">",s="</"+e.type+">");e:{if(null!=(c=u.dangerouslySetInnerHTML)){if(null!=c.__html){c=c.__html;break e}}else if("string"===typeof(c=u.children)||"number"===typeof c){c=B(c);break e}c=null}return null!=c?(u=[],me.hasOwnProperty(a)&&"\n"===c.charAt(0)&&(x+="\n"),x+=c):u=ve(u.children),e=e.type,n=null==n||"http://www.w3.org/1999/xhtml"===n?se(e):"http://www.w3.org/2000/svg"===n&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":n,this.stack.push({domNamespace:n,type:a,children:u,childIndex:0,context:t,footer:s}),this.previousWasTextNode=!1,x},e}();t.renderToString=function(e,t){e=new Ee(e,!1,t);try{return e.read(1/0)}finally{e.destroy()}}},463:function(e,t,n){"use strict";var r=n(791),i=n(725),o=n(296);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));var u=new Set,s={};function c(e,t){l(e,t),l(e+"Capture",t)}function l(e,t){for(s[e]=t,e=0;e<t.length;e++)u.add(t[e])}var f=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p=Object.prototype.hasOwnProperty,h={},v={};function g(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){m[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];m[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){m[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){m[e]=new g(e,2,!1,e,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(e){m[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){m[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){m[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){m[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){m[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function w(e,t,n,r){var i=m.hasOwnProperty(t)?m[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!p.call(v,e)||!p.call(h,e)&&(d.test(e)?v[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,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(e){var t=e.replace(y,b);m[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,b);m[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,b);m[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var x=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,k=60103,S=60106,_=60107,E=60108,C=60114,I=60109,O=60110,A=60112,D=60113,P=60120,T=60115,N=60116,M=60121,R=60128,L=60129,j=60130,F=60131;if("function"===typeof Symbol&&Symbol.for){var B=Symbol.for;k=B("react.element"),S=B("react.portal"),_=B("react.fragment"),E=B("react.strict_mode"),C=B("react.profiler"),I=B("react.provider"),O=B("react.context"),A=B("react.forward_ref"),D=B("react.suspense"),P=B("react.suspense_list"),T=B("react.memo"),N=B("react.lazy"),M=B("react.block"),B("react.scope"),R=B("react.opaque.id"),L=B("react.debug_trace_mode"),j=B("react.offscreen"),F=B("react.legacy_hidden")}var z,U="function"===typeof Symbol&&Symbol.iterator;function H(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=U&&e[U]||e["@@iterator"])?e:null}function W(e){if(void 0===z)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);z=t&&t[1]||""}return"\n"+z+e}var V=!1;function G(e,t){if(!e||V)return"";V=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(s){var r=s}Reflect.construct(e,[],t)}else{try{t.call()}catch(s){r=s}e.call(t.prototype)}else{try{throw Error()}catch(s){r=s}e()}}catch(s){if(s&&r&&"string"===typeof s.stack){for(var i=s.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,u=o.length-1;1<=a&&0<=u&&i[a]!==o[u];)u--;for(;1<=a&&0<=u;a--,u--)if(i[a]!==o[u]){if(1!==a||1!==u)do{if(a--,0>--u||i[a]!==o[u])return"\n"+i[a].replace(" at new "," at ")}while(1<=a&&0<=u);break}}}finally{V=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?W(e):""}function K(e){switch(e.tag){case 5:return W(e.type);case 16:return W("Lazy");case 13:return W("Suspense");case 19:return W("SuspenseList");case 0:case 2:case 15:return e=G(e.type,!1);case 11:return e=G(e.type.render,!1);case 22:return e=G(e.type._render,!1);case 1:return e=G(e.type,!0);default:return""}}function q(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case _:return"Fragment";case S:return"Portal";case C:return"Profiler";case E:return"StrictMode";case D:return"Suspense";case P:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case O:return(e.displayName||"Context")+".Consumer";case I:return(e._context.displayName||"Context")+".Provider";case A:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case T:return q(e.type);case M:return q(e._render);case N:t=e._payload,e=e._init;try{return q(e(t))}catch(n){}}return null}function $(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function J(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Y(e){e._valueTracker||(e._valueTracker=function(e){var t=J(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Z(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=J(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function X(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Q(e,t){var n=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=$(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=$(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ie(e,t.type,n):t.hasOwnProperty("defaultValue")&&ie(e,t.type,$(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ie(e,t,n){"number"===t&&X(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function oe(e,t){return e=i({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ae(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+$(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function ue(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function se(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:$(n)}}function ce(e,t){var n=$(t.value),r=$(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function le(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var fe="http://www.w3.org/1999/xhtml",de="http://www.w3.org/2000/svg";function pe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function he(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?pe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ve,ge,me=(ge=function(e,t){if(e.namespaceURI!==de||"innerHTML"in e)e.innerHTML=t;else{for((ve=ve||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ve.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ge(e,t)}))}:ge);function ye(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var be={animationIterationCount:!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,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},we=["Webkit","ms","Moz","O"];function xe(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||be.hasOwnProperty(e)&&be[e]?(""+t).trim():t+"px"}function ke(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=xe(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(be).forEach((function(e){we.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),be[t]=be[e]}))}));var Se=i({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});function _e(e,t){if(t){if(Se[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62))}}function Ee(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){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}}function Ce(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ie=null,Oe=null,Ae=null;function De(e){if(e=ri(e)){if("function"!==typeof Ie)throw Error(a(280));var t=e.stateNode;t&&(t=oi(t),Ie(e.stateNode,e.type,t))}}function Pe(e){Oe?Ae?Ae.push(e):Ae=[e]:Oe=e}function Te(){if(Oe){var e=Oe,t=Ae;if(Ae=Oe=null,De(e),t)for(e=0;e<t.length;e++)De(t[e])}}function Ne(e,t){return e(t)}function Me(e,t,n,r,i){return e(t,n,r,i)}function Re(){}var Le=Ne,je=!1,Fe=!1;function Be(){null===Oe&&null===Ae||(Re(),Te())}function ze(e,t){var n=e.stateNode;if(null===n)return null;var r=oi(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}var Ue=!1;if(f)try{var He={};Object.defineProperty(He,"passive",{get:function(){Ue=!0}}),window.addEventListener("test",He,He),window.removeEventListener("test",He,He)}catch(ge){Ue=!1}function We(e,t,n,r,i,o,a,u,s){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(l){this.onError(l)}}var Ve=!1,Ge=null,Ke=!1,qe=null,$e={onError:function(e){Ve=!0,Ge=e}};function Je(e,t,n,r,i,o,a,u,s){Ve=!1,Ge=null,We.apply($e,arguments)}function Ye(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ze(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Xe(e){if(Ye(e)!==e)throw Error(a(188))}function Qe(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ye(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return Xe(i),e;if(o===r)return Xe(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var u=!1,s=i.child;s;){if(s===n){u=!0,n=i,r=o;break}if(s===r){u=!0,r=i,n=o;break}s=s.sibling}if(!u){for(s=o.child;s;){if(s===n){u=!0,n=o,r=i;break}if(s===r){u=!0,r=o,n=i;break}s=s.sibling}if(!u)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function et(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var tt,nt,rt,it,ot=!1,at=[],ut=null,st=null,ct=null,lt=new Map,ft=new Map,dt=[],pt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ht(e,t,n,r,i){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:i,targetContainers:[r]}}function vt(e,t){switch(e){case"focusin":case"focusout":ut=null;break;case"dragenter":case"dragleave":st=null;break;case"mouseover":case"mouseout":ct=null;break;case"pointerover":case"pointerout":lt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ft.delete(t.pointerId)}}function gt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e=ht(t,n,r,i,o),null!==t&&(null!==(t=ri(t))&&nt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function mt(e){var t=ni(e.target);if(null!==t){var n=Ye(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ze(n)))return e.blockedOn=t,void it(e.lanePriority,(function(){o.unstable_runWithPriority(e.priority,(function(){rt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function yt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ri(n))&&nt(t),e.blockedOn=n,!1;t.shift()}return!0}function bt(e,t,n){yt(e)&&n.delete(t)}function wt(){for(ot=!1;0<at.length;){var e=at[0];if(null!==e.blockedOn){null!==(e=ri(e.blockedOn))&&tt(e);break}for(var t=e.targetContainers;0<t.length;){var n=Qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&at.shift()}null!==ut&&yt(ut)&&(ut=null),null!==st&&yt(st)&&(st=null),null!==ct&&yt(ct)&&(ct=null),lt.forEach(bt),ft.forEach(bt)}function xt(e,t){e.blockedOn===t&&(e.blockedOn=null,ot||(ot=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,wt)))}function kt(e){function t(t){return xt(t,e)}if(0<at.length){xt(at[0],e);for(var n=1;n<at.length;n++){var r=at[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==ut&&xt(ut,e),null!==st&&xt(st,e),null!==ct&&xt(ct,e),lt.forEach(t),ft.forEach(t),n=0;n<dt.length;n++)(r=dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<dt.length&&null===(n=dt[0]).blockedOn;)mt(n),null===n.blockedOn&&dt.shift()}function St(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _t={animationend:St("Animation","AnimationEnd"),animationiteration:St("Animation","AnimationIteration"),animationstart:St("Animation","AnimationStart"),transitionend:St("Transition","TransitionEnd")},Et={},Ct={};function It(e){if(Et[e])return Et[e];if(!_t[e])return e;var t,n=_t[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ct)return Et[e]=n[t];return e}f&&(Ct=document.createElement("div").style,"AnimationEvent"in window||(delete _t.animationend.animation,delete _t.animationiteration.animation,delete _t.animationstart.animation),"TransitionEvent"in window||delete _t.transitionend.transition);var Ot=It("animationend"),At=It("animationiteration"),Dt=It("animationstart"),Pt=It("transitionend"),Tt=new Map,Nt=new Map,Mt=["abort","abort",Ot,"animationEnd",At,"animationIteration",Dt,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Pt,"transitionEnd","waiting","waiting"];function Rt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],i=e[n+1];i="on"+(i[0].toUpperCase()+i.slice(1)),Nt.set(r,t),Tt.set(r,i),c(i,[r])}}(0,o.unstable_now)();var Lt=8;function jt(e){if(0!==(1&e))return Lt=15,1;if(0!==(2&e))return Lt=14,2;if(0!==(4&e))return Lt=13,4;var t=24&e;return 0!==t?(Lt=12,t):0!==(32&e)?(Lt=11,32):0!==(t=192&e)?(Lt=10,t):0!==(256&e)?(Lt=9,256):0!==(t=3584&e)?(Lt=8,t):0!==(4096&e)?(Lt=7,4096):0!==(t=4186112&e)?(Lt=6,t):0!==(t=62914560&e)?(Lt=5,t):67108864&e?(Lt=4,67108864):0!==(134217728&e)?(Lt=3,134217728):0!==(t=805306368&e)?(Lt=2,t):0!==(1073741824&e)?(Lt=1,1073741824):(Lt=8,e)}function Ft(e,t){var n=e.pendingLanes;if(0===n)return Lt=0;var r=0,i=0,o=e.expiredLanes,a=e.suspendedLanes,u=e.pingedLanes;if(0!==o)r=o,i=Lt=15;else if(0!==(o=134217727&n)){var s=o&~a;0!==s?(r=jt(s),i=Lt):0!==(u&=o)&&(r=jt(u),i=Lt)}else 0!==(o=n&~a)?(r=jt(o),i=Lt):0!==u&&(r=jt(u),i=Lt);if(0===r)return 0;if(r=n&((0>(r=31-Vt(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0===(t&a)){if(jt(t),i<=Lt)return t;Lt=i}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-Vt(t)),r|=e[n],t&=~i;return r}function Bt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function zt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=Ut(24&~t))?zt(10,t):e;case 10:return 0===(e=Ut(192&~t))?zt(8,t):e;case 8:return 0===(e=Ut(3584&~t))&&(0===(e=Ut(4186112&~t))&&(e=512)),e;case 2:return 0===(t=Ut(805306368&~t))&&(t=268435456),t}throw Error(a(358,e))}function Ut(e){return e&-e}function Ht(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Wt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Vt(t)]=n}var Vt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Gt(e)/Kt|0)|0},Gt=Math.log,Kt=Math.LN2;var qt=o.unstable_UserBlockingPriority,$t=o.unstable_runWithPriority,Jt=!0;function Yt(e,t,n,r){je||Re();var i=Xt,o=je;je=!0;try{Me(i,e,t,n,r)}finally{(je=o)||Be()}}function Zt(e,t,n,r){$t(qt,Xt.bind(null,e,t,n,r))}function Xt(e,t,n,r){var i;if(Jt)if((i=0===(4&t))&&0<at.length&&-1<pt.indexOf(e))e=ht(null,e,t,n,r),at.push(e);else{var o=Qt(e,t,n,r);if(null===o)i&&vt(e,r);else{if(i){if(-1<pt.indexOf(e))return e=ht(o,e,t,n,r),void at.push(e);if(function(e,t,n,r,i){switch(t){case"focusin":return ut=gt(ut,e,t,n,r,i),!0;case"dragenter":return st=gt(st,e,t,n,r,i),!0;case"mouseover":return ct=gt(ct,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return lt.set(o,gt(lt.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,ft.set(o,gt(ft.get(o)||null,e,t,n,r,i)),!0}return!1}(o,e,t,n,r))return;vt(e,r)}Rr(e,t,r,null,n)}}}function Qt(e,t,n,r){var i=Ce(r);if(null!==(i=ni(i))){var o=Ye(i);if(null===o)i=null;else{var a=o.tag;if(13===a){if(null!==(i=Ze(o)))return i;i=null}else if(3===a){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return Rr(e,t,r,i,n),null}var en=null,tn=null,nn=null;function rn(){if(nn)return nn;var e,t,n=tn,r=n.length,i="value"in en?en.value:en.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return nn=i.slice(e,1<t?1-t:void 0)}function on(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function an(){return!0}function un(){return!1}function sn(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?an:un,this.isPropagationStopped=un,this}return i(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var cn,ln,fn,dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pn=sn(dn),hn=i({},dn,{view:0,detail:0}),vn=sn(hn),gn=i({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:On,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fn&&(fn&&"mousemove"===e.type?(cn=e.screenX-fn.screenX,ln=e.screenY-fn.screenY):ln=cn=0,fn=e),cn)},movementY:function(e){return"movementY"in e?e.movementY:ln}}),mn=sn(gn),yn=sn(i({},gn,{dataTransfer:0})),bn=sn(i({},hn,{relatedTarget:0})),wn=sn(i({},dn,{animationName:0,elapsedTime:0,pseudoElement:0})),xn=i({},dn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),kn=sn(xn),Sn=sn(i({},dn,{data:0})),_n={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},En={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Cn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function In(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Cn[e])&&!!t[e]}function On(){return In}var An=i({},hn,{key:function(e){if(e.key){var t=_n[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=on(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?En[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:On,charCode:function(e){return"keypress"===e.type?on(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?on(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Dn=sn(An),Pn=sn(i({},gn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Tn=sn(i({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:On})),Nn=sn(i({},dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Mn=i({},gn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Rn=sn(Mn),Ln=[9,13,27,32],jn=f&&"CompositionEvent"in window,Fn=null;f&&"documentMode"in document&&(Fn=document.documentMode);var Bn=f&&"TextEvent"in window&&!Fn,zn=f&&(!jn||Fn&&8<Fn&&11>=Fn),Un=String.fromCharCode(32),Hn=!1;function Wn(e,t){switch(e){case"keyup":return-1!==Ln.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Gn=!1;var Kn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function qn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Kn[e.type]:"textarea"===t}function $n(e,t,n,r){Pe(r),0<(t=jr(t,"onChange")).length&&(n=new pn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Jn=null,Yn=null;function Zn(e){Ar(e,0)}function Xn(e){if(Z(ii(e)))return e}function Qn(e,t){if("change"===e)return t}var er=!1;if(f){var tr;if(f){var nr="oninput"in document;if(!nr){var rr=document.createElement("div");rr.setAttribute("oninput","return;"),nr="function"===typeof rr.oninput}tr=nr}else tr=!1;er=tr&&(!document.documentMode||9<document.documentMode)}function ir(){Jn&&(Jn.detachEvent("onpropertychange",or),Yn=Jn=null)}function or(e){if("value"===e.propertyName&&Xn(Yn)){var t=[];if($n(t,Yn,e,Ce(e)),e=Zn,je)e(t);else{je=!0;try{Ne(e,t)}finally{je=!1,Be()}}}}function ar(e,t,n){"focusin"===e?(ir(),Yn=n,(Jn=t).attachEvent("onpropertychange",or)):"focusout"===e&&ir()}function ur(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Xn(Yn)}function sr(e,t){if("click"===e)return Xn(t)}function cr(e,t){if("input"===e||"change"===e)return Xn(t)}var lr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},fr=Object.prototype.hasOwnProperty;function dr(e,t){if(lr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!fr.call(t,n[r])||!lr(e[n[r]],t[n[r]]))return!1;return!0}function pr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hr(e,t){var n,r=pr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=pr(r)}}function vr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?vr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function gr(){for(var e=window,t=X();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=X((e=t.contentWindow).document)}return t}function mr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var yr=f&&"documentMode"in document&&11>=document.documentMode,br=null,wr=null,xr=null,kr=!1;function Sr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;kr||null==br||br!==X(r)||("selectionStart"in(r=br)&&mr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},xr&&dr(xr,r)||(xr=r,0<(r=jr(wr,"onSelect")).length&&(t=new pn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=br)))}Rt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Rt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Rt(Mt,2);for(var _r="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Er=0;Er<_r.length;Er++)Nt.set(_r[Er],0);l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Cr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ir=new Set("cancel close invalid load scroll toggle".split(" ").concat(Cr));function Or(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,u,s,c){if(Je.apply(this,arguments),Ve){if(!Ve)throw Error(a(198));var l=Ge;Ve=!1,Ge=null,Ke||(Ke=!0,qe=l)}}(r,t,void 0,e),e.currentTarget=null}function Ar(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var u=r[a],s=u.instance,c=u.currentTarget;if(u=u.listener,s!==o&&i.isPropagationStopped())break e;Or(i,u,c),o=s}else for(a=0;a<r.length;a++){if(s=(u=r[a]).instance,c=u.currentTarget,u=u.listener,s!==o&&i.isPropagationStopped())break e;Or(i,u,c),o=s}}}if(Ke)throw e=qe,Ke=!1,qe=null,e}function Dr(e,t){var n=ai(t),r=e+"__bubble";n.has(r)||(Mr(t,e,2,!1),n.add(r))}var Pr="_reactListening"+Math.random().toString(36).slice(2);function Tr(e){e[Pr]||(e[Pr]=!0,u.forEach((function(t){Ir.has(t)||Nr(t,!1,e,null),Nr(t,!0,e,null)})))}function Nr(e,t,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=n;if("selectionchange"===e&&9!==n.nodeType&&(o=n.ownerDocument),null!==r&&!t&&Ir.has(e)){if("scroll"!==e)return;i|=2,o=r}var a=ai(o),u=e+"__"+(t?"capture":"bubble");a.has(u)||(t&&(i|=4),Mr(o,e,i,t),a.add(u))}function Mr(e,t,n,r){var i=Nt.get(t);switch(void 0===i?2:i){case 0:i=Yt;break;case 1:i=Zt;break;default:i=Xt}n=i.bind(null,t,n,e),i=void 0,!Ue||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Rr(e,t,n,r,i){var o=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var u=r.stateNode.containerInfo;if(u===i||8===u.nodeType&&u.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var s=a.tag;if((3===s||4===s)&&((s=a.stateNode.containerInfo)===i||8===s.nodeType&&s.parentNode===i))return;a=a.return}for(;null!==u;){if(null===(a=ni(u)))return;if(5===(s=a.tag)||6===s){r=o=a;continue e}u=u.parentNode}}r=r.return}!function(e,t,n){if(Fe)return e(t,n);Fe=!0;try{Le(e,t,n)}finally{Fe=!1,Be()}}((function(){var r=o,i=Ce(n),a=[];e:{var u=Tt.get(e);if(void 0!==u){var s=pn,c=e;switch(e){case"keypress":if(0===on(n))break e;case"keydown":case"keyup":s=Dn;break;case"focusin":c="focus",s=bn;break;case"focusout":c="blur",s=bn;break;case"beforeblur":case"afterblur":s=bn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":s=mn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":s=yn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":s=Tn;break;case Ot:case At:case Dt:s=wn;break;case Pt:s=Nn;break;case"scroll":s=vn;break;case"wheel":s=Rn;break;case"copy":case"cut":case"paste":s=kn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":s=Pn}var l=0!==(4&t),f=!l&&"scroll"===e,d=l?null!==u?u+"Capture":null:u;l=[];for(var p,h=r;null!==h;){var v=(p=h).stateNode;if(5===p.tag&&null!==v&&(p=v,null!==d&&(null!=(v=ze(h,d))&&l.push(Lr(h,v,p)))),f)break;h=h.return}0<l.length&&(u=new s(u,c,null,n,i),a.push({event:u,listeners:l}))}}if(0===(7&t)){if(s="mouseout"===e||"pointerout"===e,(!(u="mouseover"===e||"pointerover"===e)||0!==(16&t)||!(c=n.relatedTarget||n.fromElement)||!ni(c)&&!c[ei])&&(s||u)&&(u=i.window===i?i:(u=i.ownerDocument)?u.defaultView||u.parentWindow:window,s?(s=r,null!==(c=(c=n.relatedTarget||n.toElement)?ni(c):null)&&(c!==(f=Ye(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(s=null,c=r),s!==c)){if(l=mn,v="onMouseLeave",d="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(l=Pn,v="onPointerLeave",d="onPointerEnter",h="pointer"),f=null==s?u:ii(s),p=null==c?u:ii(c),(u=new l(v,h+"leave",s,n,i)).target=f,u.relatedTarget=p,v=null,ni(i)===r&&((l=new l(d,h+"enter",c,n,i)).target=p,l.relatedTarget=f,v=l),f=v,s&&c)e:{for(d=c,h=0,p=l=s;p;p=Fr(p))h++;for(p=0,v=d;v;v=Fr(v))p++;for(;0<h-p;)l=Fr(l),h--;for(;0<p-h;)d=Fr(d),p--;for(;h--;){if(l===d||null!==d&&l===d.alternate)break e;l=Fr(l),d=Fr(d)}l=null}else l=null;null!==s&&Br(a,u,s,l,!1),null!==c&&null!==f&&Br(a,f,c,l,!0)}if("select"===(s=(u=r?ii(r):window).nodeName&&u.nodeName.toLowerCase())||"input"===s&&"file"===u.type)var g=Qn;else if(qn(u))if(er)g=cr;else{g=ur;var m=ar}else(s=u.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===u.type||"radio"===u.type)&&(g=sr);switch(g&&(g=g(e,r))?$n(a,g,n,i):(m&&m(e,u,r),"focusout"===e&&(m=u._wrapperState)&&m.controlled&&"number"===u.type&&ie(u,"number",u.value)),m=r?ii(r):window,e){case"focusin":(qn(m)||"true"===m.contentEditable)&&(br=m,wr=r,xr=null);break;case"focusout":xr=wr=br=null;break;case"mousedown":kr=!0;break;case"contextmenu":case"mouseup":case"dragend":kr=!1,Sr(a,n,i);break;case"selectionchange":if(yr)break;case"keydown":case"keyup":Sr(a,n,i)}var y;if(jn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Gn?Wn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(zn&&"ko"!==n.locale&&(Gn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Gn&&(y=rn()):(tn="value"in(en=i)?en.value:en.textContent,Gn=!0)),0<(m=jr(r,b)).length&&(b=new Sn(b,e,null,n,i),a.push({event:b,listeners:m}),y?b.data=y:null!==(y=Vn(n))&&(b.data=y))),(y=Bn?function(e,t){switch(e){case"compositionend":return Vn(t);case"keypress":return 32!==t.which?null:(Hn=!0,Un);case"textInput":return(e=t.data)===Un&&Hn?null:e;default:return null}}(e,n):function(e,t){if(Gn)return"compositionend"===e||!jn&&Wn(e,t)?(e=rn(),nn=tn=en=null,Gn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return zn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=jr(r,"onBeforeInput")).length&&(i=new Sn("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=y))}Ar(a,t)}))}function Lr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function jr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=ze(e,n))&&r.unshift(Lr(e,o,i)),null!=(o=ze(e,t))&&r.push(Lr(e,o,i))),e=e.return}return r}function Fr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Br(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var u=n,s=u.alternate,c=u.stateNode;if(null!==s&&s===r)break;5===u.tag&&null!==c&&(u=c,i?null!=(s=ze(n,o))&&a.unshift(Lr(n,s,u)):i||null!=(s=ze(n,o))&&a.push(Lr(n,s,u))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}function zr(){}var Ur=null,Hr=null;function Wr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Vr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Gr="function"===typeof setTimeout?setTimeout:void 0,Kr="function"===typeof clearTimeout?clearTimeout:void 0;function qr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function $r(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Jr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Yr=0;var Zr=Math.random().toString(36).slice(2),Xr="__reactFiber$"+Zr,Qr="__reactProps$"+Zr,ei="__reactContainer$"+Zr,ti="__reactEvents$"+Zr;function ni(e){var t=e[Xr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ei]||n[Xr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Jr(e);null!==e;){if(n=e[Xr])return n;e=Jr(e)}return t}n=(e=n).parentNode}return null}function ri(e){return!(e=e[Xr]||e[ei])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ii(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function oi(e){return e[Qr]||null}function ai(e){var t=e[ti];return void 0===t&&(t=e[ti]=new Set),t}var ui=[],si=-1;function ci(e){return{current:e}}function li(e){0>si||(e.current=ui[si],ui[si]=null,si--)}function fi(e,t){si++,ui[si]=e.current,e.current=t}var di={},pi=ci(di),hi=ci(!1),vi=di;function gi(e,t){var n=e.type.contextTypes;if(!n)return di;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function mi(e){return null!==(e=e.childContextTypes)&&void 0!==e}function yi(){li(hi),li(pi)}function bi(e,t,n){if(pi.current!==di)throw Error(a(168));fi(pi,t),fi(hi,n)}function wi(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in e))throw Error(a(108,q(t)||"Unknown",o));return i({},n,r)}function xi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||di,vi=pi.current,fi(pi,e),fi(hi,hi.current),!0}function ki(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=wi(e,t,vi),r.__reactInternalMemoizedMergedChildContext=e,li(hi),li(pi),fi(pi,e)):li(hi),fi(hi,n)}var Si=null,_i=null,Ei=o.unstable_runWithPriority,Ci=o.unstable_scheduleCallback,Ii=o.unstable_cancelCallback,Oi=o.unstable_shouldYield,Ai=o.unstable_requestPaint,Di=o.unstable_now,Pi=o.unstable_getCurrentPriorityLevel,Ti=o.unstable_ImmediatePriority,Ni=o.unstable_UserBlockingPriority,Mi=o.unstable_NormalPriority,Ri=o.unstable_LowPriority,Li=o.unstable_IdlePriority,ji={},Fi=void 0!==Ai?Ai:function(){},Bi=null,zi=null,Ui=!1,Hi=Di(),Wi=1e4>Hi?Di:function(){return Di()-Hi};function Vi(){switch(Pi()){case Ti:return 99;case Ni:return 98;case Mi:return 97;case Ri:return 96;case Li:return 95;default:throw Error(a(332))}}function Gi(e){switch(e){case 99:return Ti;case 98:return Ni;case 97:return Mi;case 96:return Ri;case 95:return Li;default:throw Error(a(332))}}function Ki(e,t){return e=Gi(e),Ei(e,t)}function qi(e,t,n){return e=Gi(e),Ci(e,t,n)}function $i(){if(null!==zi){var e=zi;zi=null,Ii(e)}Ji()}function Ji(){if(!Ui&&null!==Bi){Ui=!0;var e=0;try{var t=Bi;Ki(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Bi=null}catch(n){throw null!==Bi&&(Bi=Bi.slice(e+1)),Ci(Ti,$i),n}finally{Ui=!1}}}var Yi=x.ReactCurrentBatchConfig;function Zi(e,t){if(e&&e.defaultProps){for(var n in t=i({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Xi=ci(null),Qi=null,eo=null,to=null;function no(){to=eo=Qi=null}function ro(e){var t=Xi.current;li(Xi),e.type._context._currentValue=t}function io(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function oo(e,t){Qi=e,to=eo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(ja=!0),e.firstContext=null)}function ao(e,t){if(to!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(to=e,t=1073741823),t={context:e,observedBits:t,next:null},null===eo){if(null===Qi)throw Error(a(308));eo=t,Qi.dependencies={lanes:0,firstContext:t,responders:null}}else eo=eo.next=t;return e._currentValue}var uo=!1;function so(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function co(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function lo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fo(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function po(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ho(e,t,n,r){var o=e.updateQueue;uo=!1;var a=o.firstBaseUpdate,u=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var c=s,l=c.next;c.next=null,null===u?a=l:u.next=l,u=c;var f=e.alternate;if(null!==f){var d=(f=f.updateQueue).lastBaseUpdate;d!==u&&(null===d?f.firstBaseUpdate=l:d.next=l,f.lastBaseUpdate=c)}}if(null!==a){for(d=o.baseState,u=0,f=l=c=null;;){s=a.lane;var p=a.eventTime;if((r&s)===s){null!==f&&(f=f.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,v=a;switch(s=t,p=n,v.tag){case 1:if("function"===typeof(h=v.payload)){d=h.call(p,d,s);break e}d=h;break e;case 3:h.flags=-4097&h.flags|64;case 0:if(null===(s="function"===typeof(h=v.payload)?h.call(p,d,s):h)||void 0===s)break e;d=i({},d,s);break e;case 2:uo=!0}}null!==a.callback&&(e.flags|=32,null===(s=o.effects)?o.effects=[a]:s.push(a))}else p={eventTime:p,lane:s,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===f?(l=f=p,c=d):f=f.next=p,u|=s;if(null===(a=a.next)){if(null===(s=o.shared.pending))break;a=s.next,s.next=null,o.lastBaseUpdate=s,o.shared.pending=null}}null===f&&(c=d),o.baseState=c,o.firstBaseUpdate=l,o.lastBaseUpdate=f,Uu|=u,e.lanes=u,e.memoizedState=d}}function vo(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!==typeof i)throw Error(a(191,i));i.call(r)}}}var go=(new r.Component).refs;function mo(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:i({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var yo={isMounted:function(e){return!!(e=e._reactInternals)&&Ye(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ds(),i=ps(e),o=lo(r,i);o.payload=t,void 0!==n&&null!==n&&(o.callback=n),fo(e,o),hs(e,i,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ds(),i=ps(e),o=lo(r,i);o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),fo(e,o),hs(e,i,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ds(),r=ps(e),i=lo(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),fo(e,i),hs(e,r,n)}};function bo(e,t,n,r,i,o,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!dr(n,r)||!dr(i,o))}function wo(e,t,n){var r=!1,i=di,o=t.contextType;return"object"===typeof o&&null!==o?o=ao(o):(i=mi(t)?vi:pi.current,o=(r=null!==(r=t.contextTypes)&&void 0!==r)?gi(e,i):di),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=yo,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function xo(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&yo.enqueueReplaceState(t,t.state,null)}function ko(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=go,so(e);var o=t.contextType;"object"===typeof o&&null!==o?i.context=ao(o):(o=mi(t)?vi:pi.current,i.context=gi(e,o)),ho(e,n,i,r),i.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(mo(e,t,o,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&yo.enqueueReplaceState(i,i.state,null),ho(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4)}var So=Array.isArray;function _o(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=r.refs;t===go&&(t=r.refs={}),null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}if("string"!==typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Eo(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function Co(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Ks(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function u(t){return e&&null===t.alternate&&(t.flags=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Ys(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=_o(e,t,n),r.return=e,r):((r=qs(n.type,n.key,n.props,null,e.mode,r)).ref=_o(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Zs(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function f(e,t,n,r,o){return null===t||7!==t.tag?((t=$s(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=Ys(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case k:return(n=qs(t.type,t.key,t.props,null,e.mode,n)).ref=_o(e,null,t),n.return=e,n;case S:return(t=Zs(t,e.mode,n)).return=e,t}if(So(t)||H(t))return(t=$s(t,e.mode,n,null)).return=e,t;Eo(e,t)}return null}function p(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==i?null:s(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case k:return n.key===i?n.type===_?f(e,t,n.props.children,r,i):c(e,t,n,r):null;case S:return n.key===i?l(e,t,n,r):null}if(So(n)||H(n))return null!==i?null:f(e,t,n,r,null);Eo(e,n)}return null}function h(e,t,n,r,i){if("string"===typeof r||"number"===typeof r)return s(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case k:return e=e.get(null===r.key?n:r.key)||null,r.type===_?f(t,e,r.props.children,i,r.key):c(t,e,r,i);case S:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(So(r)||H(r))return f(t,e=e.get(n)||null,r,i,null);Eo(t,r)}return null}function v(i,a,u,s){for(var c=null,l=null,f=a,v=a=0,g=null;null!==f&&v<u.length;v++){f.index>v?(g=f,f=null):g=f.sibling;var m=p(i,f,u[v],s);if(null===m){null===f&&(f=g);break}e&&f&&null===m.alternate&&t(i,f),a=o(m,a,v),null===l?c=m:l.sibling=m,l=m,f=g}if(v===u.length)return n(i,f),c;if(null===f){for(;v<u.length;v++)null!==(f=d(i,u[v],s))&&(a=o(f,a,v),null===l?c=f:l.sibling=f,l=f);return c}for(f=r(i,f);v<u.length;v++)null!==(g=h(f,i,v,u[v],s))&&(e&&null!==g.alternate&&f.delete(null===g.key?v:g.key),a=o(g,a,v),null===l?c=g:l.sibling=g,l=g);return e&&f.forEach((function(e){return t(i,e)})),c}function g(i,u,s,c){var l=H(s);if("function"!==typeof l)throw Error(a(150));if(null==(s=l.call(s)))throw Error(a(151));for(var f=l=null,v=u,g=u=0,m=null,y=s.next();null!==v&&!y.done;g++,y=s.next()){v.index>g?(m=v,v=null):m=v.sibling;var b=p(i,v,y.value,c);if(null===b){null===v&&(v=m);break}e&&v&&null===b.alternate&&t(i,v),u=o(b,u,g),null===f?l=b:f.sibling=b,f=b,v=m}if(y.done)return n(i,v),l;if(null===v){for(;!y.done;g++,y=s.next())null!==(y=d(i,y.value,c))&&(u=o(y,u,g),null===f?l=y:f.sibling=y,f=y);return l}for(v=r(i,v);!y.done;g++,y=s.next())null!==(y=h(v,i,g,y.value,c))&&(e&&null!==y.alternate&&v.delete(null===y.key?g:y.key),u=o(y,u,g),null===f?l=y:f.sibling=y,f=y);return e&&v.forEach((function(e){return t(i,e)})),l}return function(e,r,o,s){var c="object"===typeof o&&null!==o&&o.type===_&&null===o.key;c&&(o=o.props.children);var l="object"===typeof o&&null!==o;if(l)switch(o.$$typeof){case k:e:{for(l=o.key,c=r;null!==c;){if(c.key===l){if(7===c.tag){if(o.type===_){n(e,c.sibling),(r=i(c,o.props.children)).return=e,e=r;break e}}else if(c.elementType===o.type){n(e,c.sibling),(r=i(c,o.props)).ref=_o(e,c,o),r.return=e,e=r;break e}n(e,c);break}t(e,c),c=c.sibling}o.type===_?((r=$s(o.props.children,e.mode,s,o.key)).return=e,e=r):((s=qs(o.type,o.key,o.props,null,e.mode,s)).ref=_o(e,r,o),s.return=e,e=s)}return u(e);case S:e:{for(c=o.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Zs(o,e.mode,s)).return=e,e=r}return u(e)}if("string"===typeof o||"number"===typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=Ys(o,e.mode,s)).return=e,e=r),u(e);if(So(o))return v(e,r,o,s);if(H(o))return g(e,r,o,s);if(l&&Eo(e,o),"undefined"===typeof o&&!c)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,q(e.type)||"Component"))}return n(e,r)}}var Io=Co(!0),Oo=Co(!1),Ao={},Do=ci(Ao),Po=ci(Ao),To=ci(Ao);function No(e){if(e===Ao)throw Error(a(174));return e}function Mo(e,t){switch(fi(To,t),fi(Po,e),fi(Do,Ao),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:he(null,"");break;default:t=he(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}li(Do),fi(Do,t)}function Ro(){li(Do),li(Po),li(To)}function Lo(e){No(To.current);var t=No(Do.current),n=he(t,e.type);t!==n&&(fi(Po,e),fi(Do,n))}function jo(e){Po.current===e&&(li(Do),li(Po))}var Fo=ci(0);function Bo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var zo=null,Uo=null,Ho=!1;function Wo(e,t){var n=Vs(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Vo(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Go(e){if(Ho){var t=Uo;if(t){var n=t;if(!Vo(e,t)){if(!(t=$r(n.nextSibling))||!Vo(e,t))return e.flags=-1025&e.flags|2,Ho=!1,void(zo=e);Wo(zo,n)}zo=e,Uo=$r(t.firstChild)}else e.flags=-1025&e.flags|2,Ho=!1,zo=e}}function Ko(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;zo=e}function qo(e){if(e!==zo)return!1;if(!Ho)return Ko(e),Ho=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Vr(t,e.memoizedProps))for(t=Uo;t;)Wo(e,t),t=$r(t.nextSibling);if(Ko(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Uo=$r(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Uo=null}}else Uo=zo?$r(e.stateNode.nextSibling):null;return!0}function $o(){Uo=zo=null,Ho=!1}var Jo=[];function Yo(){for(var e=0;e<Jo.length;e++)Jo[e]._workInProgressVersionPrimary=null;Jo.length=0}var Zo=x.ReactCurrentDispatcher,Xo=x.ReactCurrentBatchConfig,Qo=0,ea=null,ta=null,na=null,ra=!1,ia=!1;function oa(){throw Error(a(321))}function aa(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!lr(e[n],t[n]))return!1;return!0}function ua(e,t,n,r,i,o){if(Qo=o,ea=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Zo.current=null===e||null===e.memoizedState?Na:Ma,e=n(r,i),ia){o=0;do{if(ia=!1,!(25>o))throw Error(a(301));o+=1,na=ta=null,t.updateQueue=null,Zo.current=Ra,e=n(r,i)}while(ia)}if(Zo.current=Ta,t=null!==ta&&null!==ta.next,Qo=0,na=ta=ea=null,ra=!1,t)throw Error(a(300));return e}function sa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===na?ea.memoizedState=na=e:na=na.next=e,na}function ca(){if(null===ta){var e=ea.alternate;e=null!==e?e.memoizedState:null}else e=ta.next;var t=null===na?ea.memoizedState:na.next;if(null!==t)na=t,ta=e;else{if(null===e)throw Error(a(310));e={memoizedState:(ta=e).memoizedState,baseState:ta.baseState,baseQueue:ta.baseQueue,queue:ta.queue,next:null},null===na?ea.memoizedState=na=e:na=na.next=e}return na}function la(e,t){return"function"===typeof t?t(e):t}function fa(e){var t=ca(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=ta,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var u=i.next;i.next=o.next,o.next=u}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var s=u=o=null,c=i;do{var l=c.lane;if((Qo&l)===l)null!==s&&(s=s.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var f={lane:l,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===s?(u=s=f,o=r):s=s.next=f,ea.lanes|=l,Uu|=l}c=c.next}while(null!==c&&c!==i);null===s?o=r:s.next=u,lr(r,t.memoizedState)||(ja=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=s,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function da(e){var t=ca(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var u=i=i.next;do{o=e(o,u.action),u=u.next}while(u!==i);lr(o,t.memoizedState)||(ja=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function pa(e,t,n){var r=t._getVersion;r=r(t._source);var i=t._workInProgressVersionPrimary;if(null!==i?e=i===r:(e=e.mutableReadLanes,(e=(Qo&e)===e)&&(t._workInProgressVersionPrimary=r,Jo.push(t))),e)return n(t._source);throw Jo.push(t),Error(a(350))}function ha(e,t,n,r){var i=Nu;if(null===i)throw Error(a(349));var o=t._getVersion,u=o(t._source),s=Zo.current,c=s.useState((function(){return pa(i,t,n)})),l=c[1],f=c[0];c=na;var d=e.memoizedState,p=d.refs,h=p.getSnapshot,v=d.source;d=d.subscribe;var g=ea;return e.memoizedState={refs:p,source:t,subscribe:r},s.useEffect((function(){p.getSnapshot=n,p.setSnapshot=l;var e=o(t._source);if(!lr(u,e)){e=n(t._source),lr(f,e)||(l(e),e=ps(g),i.mutableReadLanes|=e&i.pendingLanes),e=i.mutableReadLanes,i.entangledLanes|=e;for(var r=i.entanglements,a=e;0<a;){var s=31-Vt(a),c=1<<s;r[s]|=e,a&=~c}}}),[n,t,r]),s.useEffect((function(){return r(t._source,(function(){var e=p.getSnapshot,n=p.setSnapshot;try{n(e(t._source));var r=ps(g);i.mutableReadLanes|=r&i.pendingLanes}catch(o){n((function(){throw o}))}}))}),[t,r]),lr(h,n)&&lr(v,t)&&lr(d,r)||((e={pending:null,dispatch:null,lastRenderedReducer:la,lastRenderedState:f}).dispatch=l=Pa.bind(null,ea,e),c.queue=e,c.baseQueue=null,f=pa(i,t,n),c.memoizedState=c.baseState=f),f}function va(e,t,n){return ha(ca(),e,t,n)}function ga(e){var t=sa();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:la,lastRenderedState:e}).dispatch=Pa.bind(null,ea,e),[t.memoizedState,e]}function ma(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ea.updateQueue)?(t={lastEffect:null},ea.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ya(e){return e={current:e},sa().memoizedState=e}function ba(){return ca().memoizedState}function wa(e,t,n,r){var i=sa();ea.flags|=e,i.memoizedState=ma(1|t,n,void 0,void 0===r?null:r)}function xa(e,t,n,r){var i=ca();r=void 0===r?null:r;var o=void 0;if(null!==ta){var a=ta.memoizedState;if(o=a.destroy,null!==r&&aa(r,a.deps))return void ma(t,n,o,r)}ea.flags|=e,i.memoizedState=ma(1|t,n,o,r)}function ka(e,t){return wa(516,4,e,t)}function Sa(e,t){return xa(516,4,e,t)}function _a(e,t){return xa(4,2,e,t)}function Ea(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ca(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,xa(4,2,Ea.bind(null,t,e),n)}function Ia(){}function Oa(e,t){var n=ca();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Aa(e,t){var n=ca();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Da(e,t){var n=Vi();Ki(98>n?98:n,(function(){e(!0)})),Ki(97<n?97:n,(function(){var n=Xo.transition;Xo.transition=1;try{e(!1),t()}finally{Xo.transition=n}}))}function Pa(e,t,n){var r=ds(),i=ps(e),o={lane:i,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?o.next=o:(o.next=a.next,a.next=o),t.pending=o,a=e.alternate,e===ea||null!==a&&a===ea)ia=ra=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var u=t.lastRenderedState,s=a(u,n);if(o.eagerReducer=a,o.eagerState=s,lr(s,u))return}catch(c){}hs(e,i,r)}}var Ta={readContext:ao,useCallback:oa,useContext:oa,useEffect:oa,useImperativeHandle:oa,useLayoutEffect:oa,useMemo:oa,useReducer:oa,useRef:oa,useState:oa,useDebugValue:oa,useDeferredValue:oa,useTransition:oa,useMutableSource:oa,useOpaqueIdentifier:oa,unstable_isNewReconciler:!1},Na={readContext:ao,useCallback:function(e,t){return sa().memoizedState=[e,void 0===t?null:t],e},useContext:ao,useEffect:ka,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,wa(4,2,Ea.bind(null,t,e),n)},useLayoutEffect:function(e,t){return wa(4,2,e,t)},useMemo:function(e,t){var n=sa();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=sa();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Pa.bind(null,ea,e),[r.memoizedState,e]},useRef:ya,useState:ga,useDebugValue:Ia,useDeferredValue:function(e){var t=ga(e),n=t[0],r=t[1];return ka((function(){var t=Xo.transition;Xo.transition=1;try{r(e)}finally{Xo.transition=t}}),[e]),n},useTransition:function(){var e=ga(!1),t=e[0];return ya(e=Da.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=sa();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},ha(r,e,t,n)},useOpaqueIdentifier:function(){if(Ho){var e=!1,t=function(e){return{$$typeof:R,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Yr++).toString(36))),Error(a(355))})),n=ga(t)[1];return 0===(2&ea.mode)&&(ea.flags|=516,ma(5,(function(){n("r:"+(Yr++).toString(36))}),void 0,null)),t}return ga(t="r:"+(Yr++).toString(36)),t},unstable_isNewReconciler:!1},Ma={readContext:ao,useCallback:Oa,useContext:ao,useEffect:Sa,useImperativeHandle:Ca,useLayoutEffect:_a,useMemo:Aa,useReducer:fa,useRef:ba,useState:function(){return fa(la)},useDebugValue:Ia,useDeferredValue:function(e){var t=fa(la),n=t[0],r=t[1];return Sa((function(){var t=Xo.transition;Xo.transition=1;try{r(e)}finally{Xo.transition=t}}),[e]),n},useTransition:function(){var e=fa(la)[0];return[ba().current,e]},useMutableSource:va,useOpaqueIdentifier:function(){return fa(la)[0]},unstable_isNewReconciler:!1},Ra={readContext:ao,useCallback:Oa,useContext:ao,useEffect:Sa,useImperativeHandle:Ca,useLayoutEffect:_a,useMemo:Aa,useReducer:da,useRef:ba,useState:function(){return da(la)},useDebugValue:Ia,useDeferredValue:function(e){var t=da(la),n=t[0],r=t[1];return Sa((function(){var t=Xo.transition;Xo.transition=1;try{r(e)}finally{Xo.transition=t}}),[e]),n},useTransition:function(){var e=da(la)[0];return[ba().current,e]},useMutableSource:va,useOpaqueIdentifier:function(){return da(la)[0]},unstable_isNewReconciler:!1},La=x.ReactCurrentOwner,ja=!1;function Fa(e,t,n,r){t.child=null===e?Oo(t,null,n,r):Io(t,e.child,n,r)}function Ba(e,t,n,r,i){n=n.render;var o=t.ref;return oo(t,i),r=ua(e,t,n,r,o,i),null===e||ja?(t.flags|=1,Fa(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,ou(e,t,i))}function za(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!==typeof a||Gs(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=qs(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Ua(e,t,a,r,i,o))}return a=e.child,0===(i&o)&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:dr)(i,r)&&e.ref===t.ref)?ou(e,t,o):(t.flags|=1,(e=Ks(a,r)).ref=t.ref,e.return=t,t.child=e)}function Ua(e,t,n,r,i,o){if(null!==e&&dr(e.memoizedProps,r)&&e.ref===t.ref){if(ja=!1,0===(o&i))return t.lanes=e.lanes,ou(e,t,o);0!==(16384&e.flags)&&(ja=!0)}return Va(e,t,n,r,o)}function Ha(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0===(4&t.mode))t.memoizedState={baseLanes:0},ks(t,n);else{if(0===(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},ks(t,e),null;t.memoizedState={baseLanes:0},ks(t,null!==o?o.baseLanes:n)}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,ks(t,r);return Fa(e,t,i,n),t.child}function Wa(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Va(e,t,n,r,i){var o=mi(n)?vi:pi.current;return o=gi(t,o),oo(t,i),n=ua(e,t,n,r,o,i),null===e||ja?(t.flags|=1,Fa(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,ou(e,t,i))}function Ga(e,t,n,r,i){if(mi(n)){var o=!0;xi(t)}else o=!1;if(oo(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),wo(t,n,r),ko(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,u=t.memoizedProps;a.props=u;var s=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=ao(c):c=gi(t,c=mi(n)?vi:pi.current);var l=n.getDerivedStateFromProps,f="function"===typeof l||"function"===typeof a.getSnapshotBeforeUpdate;f||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(u!==r||s!==c)&&xo(t,a,r,c),uo=!1;var d=t.memoizedState;a.state=d,ho(t,r,a,i),s=t.memoizedState,u!==r||d!==s||hi.current||uo?("function"===typeof l&&(mo(t,n,l,r),s=t.memoizedState),(u=uo||bo(t,n,u,r,d,s,c))?(f||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4)):("function"===typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=s),a.props=r,a.state=s,a.context=c,r=u):("function"===typeof a.componentDidMount&&(t.flags|=4),r=!1)}else{a=t.stateNode,co(e,t),u=t.memoizedProps,c=t.type===t.elementType?u:Zi(t.type,u),a.props=c,f=t.pendingProps,d=a.context,"object"===typeof(s=n.contextType)&&null!==s?s=ao(s):s=gi(t,s=mi(n)?vi:pi.current);var p=n.getDerivedStateFromProps;(l="function"===typeof p||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(u!==f||d!==s)&&xo(t,a,r,s),uo=!1,d=t.memoizedState,a.state=d,ho(t,r,a,i);var h=t.memoizedState;u!==f||d!==h||hi.current||uo?("function"===typeof p&&(mo(t,n,p,r),h=t.memoizedState),(c=uo||bo(t,n,c,r,d,h,s))?(l||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,s),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,s)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!==typeof a.componentDidUpdate||u===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||u===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=s,r=c):("function"!==typeof a.componentDidUpdate||u===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||u===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),r=!1)}return Ka(e,t,n,r,o,i)}function Ka(e,t,n,r,i,o){Wa(e,t);var a=0!==(64&t.flags);if(!r&&!a)return i&&ki(t,n,!1),ou(e,t,o);r=t.stateNode,La.current=t;var u=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Io(t,e.child,null,o),t.child=Io(t,null,u,o)):Fa(e,t,u,o),t.memoizedState=r.state,i&&ki(t,n,!0),t.child}function qa(e){var t=e.stateNode;t.pendingContext?bi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&bi(0,t.context,!1),Mo(e,t.containerInfo)}var $a,Ja,Ya,Za={dehydrated:null,retryLane:0};function Xa(e,t,n){var r,i=t.pendingProps,o=Fo.current,a=!1;return(r=0!==(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!==(2&o)),r?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(o|=1),fi(Fo,1&o),null===e?(void 0!==i.fallback&&Go(t),e=i.children,o=i.fallback,a?(e=Qa(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Za,e):"number"===typeof i.unstable_expectedLoadTime?(e=Qa(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Za,t.lanes=33554432,e):((n=Js({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,a?(i=tu(e,t,i.children,i.fallback,n),a=t.child,o=e.child.memoizedState,a.memoizedState=null===o?{baseLanes:n}:{baseLanes:o.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=Za,i):(n=eu(e,t,i.children,n),t.memoizedState=null,n))}function Qa(e,t,n,r){var i=e.mode,o=e.child;return t={mode:"hidden",children:t},0===(2&i)&&null!==o?(o.childLanes=0,o.pendingProps=t):o=Js(t,i,0,null),n=$s(n,i,r,null),o.return=e,n.return=e,o.sibling=n,e.child=o,n}function eu(e,t,n,r){var i=e.child;return e=i.sibling,n=Ks(i,{mode:"visible",children:n}),0===(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function tu(e,t,n,r,i){var o=t.mode,a=e.child;e=a.sibling;var u={mode:"hidden",children:n};return 0===(2&o)&&t.child!==a?((n=t.child).childLanes=0,n.pendingProps=u,null!==(a=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Ks(a,u),null!==e?r=Ks(e,r):(r=$s(r,o,i,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function nu(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),io(e.return,t)}function ru(e,t,n,r,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,lastEffect:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i,a.lastEffect=o)}function iu(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Fa(e,t,r.children,n),0!==(2&(r=Fo.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!==(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&nu(e,n);else if(19===e.tag)nu(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(fi(Fo,r),0===(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Bo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ru(t,!1,i,n,o,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Bo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ru(t,!0,n,null,o,t.lastEffect);break;case"together":ru(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function ou(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Uu|=t.lanes,0!==(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Ks(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ks(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function au(e,t){if(!Ho)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function uu(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return mi(t.type)&&yi(),null;case 3:return Ro(),li(hi),li(pi),Yo(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(qo(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:jo(t);var o=No(To.current);if(n=t.type,null!==e&&null!=t.stateNode)Ja(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=No(Do.current),qo(t)){r=t.stateNode,n=t.type;var u=t.memoizedProps;switch(r[Xr]=t,r[Qr]=u,n){case"dialog":Dr("cancel",r),Dr("close",r);break;case"iframe":case"object":case"embed":Dr("load",r);break;case"video":case"audio":for(e=0;e<Cr.length;e++)Dr(Cr[e],r);break;case"source":Dr("error",r);break;case"img":case"image":case"link":Dr("error",r),Dr("load",r);break;case"details":Dr("toggle",r);break;case"input":ee(r,u),Dr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!u.multiple},Dr("invalid",r);break;case"textarea":se(r,u),Dr("invalid",r)}for(var c in _e(n,u),e=null,u)u.hasOwnProperty(c)&&(o=u[c],"children"===c?"string"===typeof o?r.textContent!==o&&(e=["children",o]):"number"===typeof o&&r.textContent!==""+o&&(e=["children",""+o]):s.hasOwnProperty(c)&&null!=o&&"onScroll"===c&&Dr("scroll",r));switch(n){case"input":Y(r),re(r,u,!0);break;case"textarea":Y(r),le(r);break;case"select":case"option":break;default:"function"===typeof u.onClick&&(r.onclick=zr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(c=9===o.nodeType?o:o.ownerDocument,e===fe&&(e=pe(n)),e===fe?"script"===n?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),"select"===n&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[Xr]=t,e[Qr]=r,$a(e,t),t.stateNode=e,c=Ee(n,r),n){case"dialog":Dr("cancel",e),Dr("close",e),o=r;break;case"iframe":case"object":case"embed":Dr("load",e),o=r;break;case"video":case"audio":for(o=0;o<Cr.length;o++)Dr(Cr[o],e);o=r;break;case"source":Dr("error",e),o=r;break;case"img":case"image":case"link":Dr("error",e),Dr("load",e),o=r;break;case"details":Dr("toggle",e),o=r;break;case"input":ee(e,r),o=Q(e,r),Dr("invalid",e);break;case"option":o=oe(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=i({},r,{value:void 0}),Dr("invalid",e);break;case"textarea":se(e,r),o=ue(e,r),Dr("invalid",e);break;default:o=r}_e(n,o);var l=o;for(u in l)if(l.hasOwnProperty(u)){var f=l[u];"style"===u?ke(e,f):"dangerouslySetInnerHTML"===u?null!=(f=f?f.__html:void 0)&&me(e,f):"children"===u?"string"===typeof f?("textarea"!==n||""!==f)&&ye(e,f):"number"===typeof f&&ye(e,""+f):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(s.hasOwnProperty(u)?null!=f&&"onScroll"===u&&Dr("scroll",e):null!=f&&w(e,u,f,c))}switch(n){case"input":Y(e),re(e,r,!1);break;case"textarea":Y(e),le(e);break;case"option":null!=r.value&&e.setAttribute("value",""+$(r.value));break;case"select":e.multiple=!!r.multiple,null!=(u=r.value)?ae(e,!!r.multiple,u,!1):null!=r.defaultValue&&ae(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof o.onClick&&(e.onclick=zr)}Wr(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Ya(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));n=No(To.current),No(Do.current),qo(t)?(r=t.stateNode,n=t.memoizedProps,r[Xr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Xr]=t,t.stateNode=r)}return null;case 13:return li(Fo),r=t.memoizedState,0!==(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&qo(t):n=null!==e.memoizedState,r&&!n&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&Fo.current)?0===Fu&&(Fu=3):(0!==Fu&&3!==Fu||(Fu=4),null===Nu||0===(134217727&Uu)&&0===(134217727&Hu)||ys(Nu,Ru))),(r||n)&&(t.flags|=4),null);case 4:return Ro(),null===e&&Tr(t.stateNode.containerInfo),null;case 10:return ro(t),null;case 19:if(li(Fo),null===(r=t.memoizedState))return null;if(u=0!==(64&t.flags),null===(c=r.rendering))if(u)au(r,!1);else{if(0!==Fu||null!==e&&0!==(64&e.flags))for(e=t.child;null!==e;){if(null!==(c=Bo(e))){for(t.flags|=64,au(r,!1),null!==(u=c.updateQueue)&&(t.updateQueue=u,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(u=n).flags&=2,u.nextEffect=null,u.firstEffect=null,u.lastEffect=null,null===(c=u.alternate)?(u.childLanes=0,u.lanes=e,u.child=null,u.memoizedProps=null,u.memoizedState=null,u.updateQueue=null,u.dependencies=null,u.stateNode=null):(u.childLanes=c.childLanes,u.lanes=c.lanes,u.child=c.child,u.memoizedProps=c.memoizedProps,u.memoizedState=c.memoizedState,u.updateQueue=c.updateQueue,u.type=c.type,e=c.dependencies,u.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return fi(Fo,1&Fo.current|2),t.child}e=e.sibling}null!==r.tail&&Wi()>Ku&&(t.flags|=64,u=!0,au(r,!1),t.lanes=33554432)}else{if(!u)if(null!==(e=Bo(c))){if(t.flags|=64,u=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),au(r,!0),null===r.tail&&"hidden"===r.tailMode&&!c.alternate&&!Ho)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Wi()-r.renderingStartTime>Ku&&1073741824!==n&&(t.flags|=64,u=!0,au(r,!1),t.lanes=33554432);r.isBackwards?(c.sibling=t.child,t.child=c):(null!==(n=r.last)?n.sibling=c:t.child=c,r.last=c)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Wi(),n.sibling=null,t=Fo.current,fi(Fo,u?1&t|2:1&t),n):null;case 23:case 24:return Ss(),null!==e&&null!==e.memoizedState!==(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function su(e){switch(e.tag){case 1:mi(e.type)&&yi();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Ro(),li(hi),li(pi),Yo(),0!==(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return jo(e),null;case 13:return li(Fo),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return li(Fo),null;case 4:return Ro(),null;case 10:return ro(e),null;case 23:case 24:return Ss(),null;default:return null}}function cu(e,t){try{var n="",r=t;do{n+=K(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i}}function lu(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}$a=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ja=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,No(Do.current);var a,u=null;switch(n){case"input":o=Q(e,o),r=Q(e,r),u=[];break;case"option":o=oe(e,o),r=oe(e,r),u=[];break;case"select":o=i({},o,{value:void 0}),r=i({},r,{value:void 0}),u=[];break;case"textarea":o=ue(e,o),r=ue(e,r),u=[];break;default:"function"!==typeof o.onClick&&"function"===typeof r.onClick&&(e.onclick=zr)}for(f in _e(n,r),n=null,o)if(!r.hasOwnProperty(f)&&o.hasOwnProperty(f)&&null!=o[f])if("style"===f){var c=o[f];for(a in c)c.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==f&&"children"!==f&&"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(s.hasOwnProperty(f)?u||(u=[]):(u=u||[]).push(f,null));for(f in r){var l=r[f];if(c=null!=o?o[f]:void 0,r.hasOwnProperty(f)&&l!==c&&(null!=l||null!=c))if("style"===f)if(c){for(a in c)!c.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&c[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(u||(u=[]),u.push(f,n)),n=l;else"dangerouslySetInnerHTML"===f?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(u=u||[]).push(f,l)):"children"===f?"string"!==typeof l&&"number"!==typeof l||(u=u||[]).push(f,""+l):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&(s.hasOwnProperty(f)?(null!=l&&"onScroll"===f&&Dr("scroll",e),u||c===l||(u=[])):"object"===typeof l&&null!==l&&l.$$typeof===R?l.toString():(u=u||[]).push(f,l))}n&&(u=u||[]).push("style",n);var f=u;(t.updateQueue=f)&&(t.flags|=4)}},Ya=function(e,t,n,r){n!==r&&(t.flags|=4)};var fu="function"===typeof WeakMap?WeakMap:Map;function du(e,t,n){(n=lo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Yu||(Yu=!0,Zu=r),lu(0,t)},n}function pu(e,t,n){(n=lo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return lu(0,t),r(i)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===Xu?Xu=new Set([this]):Xu.add(this),lu(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var hu="function"===typeof WeakSet?WeakSet:Set;function vu(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){zs(e,n)}else t.current=null}function gu(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Zi(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&qr(t.stateNode.containerInfo))}throw Error(a(163))}function mu(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3===(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var i=e;r=i.next,0!==(4&(i=i.tag))&&0!==(1&i)&&(js(n,e),Ls(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Zi(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&vo(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}vo(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&Wr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&kt(n)))))}throw Error(a(163))}function yu(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"===typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var i=n.memoizedProps.style;i=void 0!==i&&null!==i&&i.hasOwnProperty("display")?i.display:null,r.style.display=xe("display",i)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function bu(e,t){if(_i&&"function"===typeof _i.onCommitFiberUnmount)try{_i.onCommitFiberUnmount(Si,t)}catch(o){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,i=r.destroy;if(r=r.tag,void 0!==i)if(0!==(4&r))js(t,n);else{r=t;try{i()}catch(o){zs(r,o)}}n=n.next}while(n!==e)}break;case 1:if(vu(t),"function"===typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(o){zs(t,o)}break;case 5:vu(t);break;case 4:Eu(e,t)}}function wu(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function xu(e){return 5===e.tag||3===e.tag||4===e.tag}function ku(e){e:{for(var t=e.return;null!==t;){if(xu(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(ye(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||xu(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?Su(e,n,t):_u(e,n,t)}function Su(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=zr));else if(4!==r&&null!==(e=e.child))for(Su(e,t,n),e=e.sibling;null!==e;)Su(e,t,n),e=e.sibling}function _u(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(_u(e,t,n),e=e.sibling;null!==e;)_u(e,t,n),e=e.sibling}function Eu(e,t){for(var n,r,i=t,o=!1;;){if(!o){o=i.return;e:for(;;){if(null===o)throw Error(a(160));switch(n=o.stateNode,o.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}o=o.return}o=!0}if(5===i.tag||6===i.tag){e:for(var u=e,s=i,c=s;;)if(bu(u,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===s)break e;for(;null===c.sibling;){if(null===c.return||c.return===s)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}r?(u=n,s=i.stateNode,8===u.nodeType?u.parentNode.removeChild(s):u.removeChild(s)):n.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){n=i.stateNode.containerInfo,r=!0,i.child.return=i,i=i.child;continue}}else if(bu(e,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(o=!1)}i.sibling.return=i.return,i=i.sibling}}function Cu(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3===(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var i=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[Qr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),Ee(e,i),t=Ee(e,r),i=0;i<o.length;i+=2){var u=o[i],s=o[i+1];"style"===u?ke(n,s):"dangerouslySetInnerHTML"===u?me(n,s):"children"===u?ye(n,s):w(n,u,s,t)}switch(e){case"input":ne(n,r);break;case"textarea":ce(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(o=r.value)?ae(n,!!r.multiple,o,!1):e!==!!r.multiple&&(null!=r.defaultValue?ae(n,!!r.multiple,r.defaultValue,!0):ae(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,kt(n.containerInfo)));case 13:return null!==t.memoizedState&&(Gu=Wi(),yu(t.child,!0)),void Iu(t);case 19:return void Iu(t);case 23:case 24:return void yu(t,null!==t.memoizedState)}throw Error(a(163))}function Iu(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new hu),t.forEach((function(t){var r=Hs.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Ou(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Au=Math.ceil,Du=x.ReactCurrentDispatcher,Pu=x.ReactCurrentOwner,Tu=0,Nu=null,Mu=null,Ru=0,Lu=0,ju=ci(0),Fu=0,Bu=null,zu=0,Uu=0,Hu=0,Wu=0,Vu=null,Gu=0,Ku=1/0;function qu(){Ku=Wi()+500}var $u,Ju=null,Yu=!1,Zu=null,Xu=null,Qu=!1,es=null,ts=90,ns=[],rs=[],is=null,os=0,as=null,us=-1,ss=0,cs=0,ls=null,fs=!1;function ds(){return 0!==(48&Tu)?Wi():-1!==us?us:us=Wi()}function ps(e){if(0===(2&(e=e.mode)))return 1;if(0===(4&e))return 99===Vi()?1:2;if(0===ss&&(ss=zu),0!==Yi.transition){0!==cs&&(cs=null!==Vu?Vu.pendingLanes:0),e=ss;var t=4186112&~cs;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=Vi(),0!==(4&Tu)&&98===e?e=zt(12,ss):e=zt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),ss),e}function hs(e,t,n){if(50<os)throw os=0,as=null,Error(a(185));if(null===(e=vs(e,t)))return null;Wt(e,t,n),e===Nu&&(Hu|=t,4===Fu&&ys(e,Ru));var r=Vi();1===t?0!==(8&Tu)&&0===(48&Tu)?bs(e):(gs(e,n),0===Tu&&(qu(),$i())):(0===(4&Tu)||98!==r&&99!==r||(null===is?is=new Set([e]):is.add(e)),gs(e,n)),Vu=e}function vs(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function gs(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,i=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes;0<u;){var s=31-Vt(u),c=1<<s,l=o[s];if(-1===l){if(0===(c&r)||0!==(c&i)){l=t,jt(c);var f=Lt;o[s]=10<=f?l+250:6<=f?l+5e3:-1}}else l<=t&&(e.expiredLanes|=c);u&=~c}if(r=Ft(e,e===Nu?Ru:0),t=Lt,0===r)null!==n&&(n!==ji&&Ii(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==ji&&Ii(n)}15===t?(n=bs.bind(null,e),null===Bi?(Bi=[n],zi=Ci(Ti,Ji)):Bi.push(n),n=ji):14===t?n=qi(99,bs.bind(null,e)):(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(a(358,e))}}(t),n=qi(n,ms.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function ms(e){if(us=-1,cs=ss=0,0!==(48&Tu))throw Error(a(327));var t=e.callbackNode;if(Rs()&&e.callbackNode!==t)return null;var n=Ft(e,e===Nu?Ru:0);if(0===n)return null;var r=n,i=Tu;Tu|=16;var o=Cs();for(Nu===e&&Ru===r||(qu(),_s(e,r));;)try{As();break}catch(s){Es(e,s)}if(no(),Du.current=o,Tu=i,null!==Mu?r=0:(Nu=null,Ru=0,r=Fu),0!==(zu&Hu))_s(e,0);else if(0!==r){if(2===r&&(Tu|=64,e.hydrate&&(e.hydrate=!1,qr(e.containerInfo)),0!==(n=Bt(e))&&(r=Is(e,n))),1===r)throw t=Bu,_s(e,0),ys(e,n),gs(e,Wi()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:case 5:Ts(e);break;case 3:if(ys(e,n),(62914560&n)===n&&10<(r=Gu+500-Wi())){if(0!==Ft(e,0))break;if(((i=e.suspendedLanes)&n)!==n){ds(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Gr(Ts.bind(null,e),r);break}Ts(e);break;case 4:if(ys(e,n),(4186112&n)===n)break;for(r=e.eventTimes,i=-1;0<n;){var u=31-Vt(n);o=1<<u,(u=r[u])>i&&(i=u),n&=~o}if(n=i,10<(n=(120>(n=Wi()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Au(n/1960))-n)){e.timeoutHandle=Gr(Ts.bind(null,e),n);break}Ts(e);break;default:throw Error(a(329))}}return gs(e,Wi()),e.callbackNode===t?ms.bind(null,e):null}function ys(e,t){for(t&=~Wu,t&=~Hu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Vt(t),r=1<<n;e[n]=-1,t&=~r}}function bs(e){if(0!==(48&Tu))throw Error(a(327));if(Rs(),e===Nu&&0!==(e.expiredLanes&Ru)){var t=Ru,n=Is(e,t);0!==(zu&Hu)&&(n=Is(e,t=Ft(e,t)))}else n=Is(e,t=Ft(e,0));if(0!==e.tag&&2===n&&(Tu|=64,e.hydrate&&(e.hydrate=!1,qr(e.containerInfo)),0!==(t=Bt(e))&&(n=Is(e,t))),1===n)throw n=Bu,_s(e,0),ys(e,t),gs(e,Wi()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ts(e),gs(e,Wi()),null}function ws(e,t){var n=Tu;Tu|=1;try{return e(t)}finally{0===(Tu=n)&&(qu(),$i())}}function xs(e,t){var n=Tu;Tu&=-2,Tu|=8;try{return e(t)}finally{0===(Tu=n)&&(qu(),$i())}}function ks(e,t){fi(ju,Lu),Lu|=t,zu|=t}function Ss(){Lu=ju.current,li(ju)}function _s(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Kr(n)),null!==Mu)for(n=Mu.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&yi();break;case 3:Ro(),li(hi),li(pi),Yo();break;case 5:jo(r);break;case 4:Ro();break;case 13:case 19:li(Fo);break;case 10:ro(r);break;case 23:case 24:Ss()}n=n.return}Nu=e,Mu=Ks(e.current,null),Ru=Lu=zu=t,Fu=0,Bu=null,Wu=Hu=Uu=0}function Es(e,t){for(;;){var n=Mu;try{if(no(),Zo.current=Ta,ra){for(var r=ea.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}ra=!1}if(Qo=0,na=ta=ea=null,ia=!1,Pu.current=null,null===n||null===n.return){Fu=1,Bu=t,Mu=null;break}e:{var o=e,a=n.return,u=n,s=t;if(t=Ru,u.flags|=2048,u.firstEffect=u.lastEffect=null,null!==s&&"object"===typeof s&&"function"===typeof s.then){var c=s;if(0===(2&u.mode)){var l=u.alternate;l?(u.updateQueue=l.updateQueue,u.memoizedState=l.memoizedState,u.lanes=l.lanes):(u.updateQueue=null,u.memoizedState=null)}var f=0!==(1&Fo.current),d=a;do{var p;if(p=13===d.tag){var h=d.memoizedState;if(null!==h)p=null!==h.dehydrated;else{var v=d.memoizedProps;p=void 0!==v.fallback&&(!0!==v.unstable_avoidThisFallback||!f)}}if(p){var g=d.updateQueue;if(null===g){var m=new Set;m.add(c),d.updateQueue=m}else g.add(c);if(0===(2&d.mode)){if(d.flags|=64,u.flags|=16384,u.flags&=-2981,1===u.tag)if(null===u.alternate)u.tag=17;else{var y=lo(-1,1);y.tag=2,fo(u,y)}u.lanes|=1;break e}s=void 0,u=t;var b=o.pingCache;if(null===b?(b=o.pingCache=new fu,s=new Set,b.set(c,s)):void 0===(s=b.get(c))&&(s=new Set,b.set(c,s)),!s.has(u)){s.add(u);var w=Us.bind(null,o,c,u);c.then(w,w)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(null!==d);s=Error((q(u.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Fu&&(Fu=2),s=cu(s,u),d=a;do{switch(d.tag){case 3:o=s,d.flags|=4096,t&=-t,d.lanes|=t,po(d,du(0,o,t));break e;case 1:o=s;var x=d.type,k=d.stateNode;if(0===(64&d.flags)&&("function"===typeof x.getDerivedStateFromError||null!==k&&"function"===typeof k.componentDidCatch&&(null===Xu||!Xu.has(k)))){d.flags|=4096,t&=-t,d.lanes|=t,po(d,pu(d,o,t));break e}}d=d.return}while(null!==d)}Ps(n)}catch(S){t=S,Mu===n&&null!==n&&(Mu=n=n.return);continue}break}}function Cs(){var e=Du.current;return Du.current=Ta,null===e?Ta:e}function Is(e,t){var n=Tu;Tu|=16;var r=Cs();for(Nu===e&&Ru===t||_s(e,t);;)try{Os();break}catch(i){Es(e,i)}if(no(),Tu=n,Du.current=r,null!==Mu)throw Error(a(261));return Nu=null,Ru=0,Fu}function Os(){for(;null!==Mu;)Ds(Mu)}function As(){for(;null!==Mu&&!Oi();)Ds(Mu)}function Ds(e){var t=$u(e.alternate,e,Lu);e.memoizedProps=e.pendingProps,null===t?Ps(e):Mu=t,Pu.current=null}function Ps(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(2048&t.flags)){if(null!==(n=uu(n,t,Lu)))return void(Mu=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&Lu)||0===(4&n.mode)){for(var r=0,i=n.child;null!==i;)r|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=r}null!==e&&0===(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=su(t)))return n.flags&=2047,void(Mu=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Mu=t);Mu=t=e}while(null!==t);0===Fu&&(Fu=5)}function Ts(e){var t=Vi();return Ki(99,Ns.bind(null,e,t)),null}function Ns(e,t){do{Rs()}while(null!==es);if(0!==(48&Tu))throw Error(a(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null;var r=n.lanes|n.childLanes,i=r,o=e.pendingLanes&~i;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=i,e.mutableReadLanes&=i,e.entangledLanes&=i,i=e.entanglements;for(var u=e.eventTimes,s=e.expirationTimes;0<o;){var c=31-Vt(o),l=1<<c;i[c]=0,u[c]=-1,s[c]=-1,o&=~l}if(null!==is&&0===(24&r)&&is.has(e)&&is.delete(e),e===Nu&&(Mu=Nu=null,Ru=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(i=Tu,Tu|=32,Pu.current=null,Ur=Jt,mr(u=gr())){if("selectionStart"in u)s={start:u.selectionStart,end:u.selectionEnd};else e:if(s=(s=u.ownerDocument)&&s.defaultView||window,(l=s.getSelection&&s.getSelection())&&0!==l.rangeCount){s=l.anchorNode,o=l.anchorOffset,c=l.focusNode,l=l.focusOffset;try{s.nodeType,c.nodeType}catch(C){s=null;break e}var f=0,d=-1,p=-1,h=0,v=0,g=u,m=null;t:for(;;){for(var y;g!==s||0!==o&&3!==g.nodeType||(d=f+o),g!==c||0!==l&&3!==g.nodeType||(p=f+l),3===g.nodeType&&(f+=g.nodeValue.length),null!==(y=g.firstChild);)m=g,g=y;for(;;){if(g===u)break t;if(m===s&&++h===o&&(d=f),m===c&&++v===l&&(p=f),null!==(y=g.nextSibling))break;m=(g=m).parentNode}g=y}s=-1===d||-1===p?null:{start:d,end:p}}else s=null;s=s||{start:0,end:0}}else s=null;Hr={focusedElem:u,selectionRange:s},Jt=!1,ls=null,fs=!1,Ju=r;do{try{Ms()}catch(C){if(null===Ju)throw Error(a(330));zs(Ju,C),Ju=Ju.nextEffect}}while(null!==Ju);ls=null,Ju=r;do{try{for(u=e;null!==Ju;){var b=Ju.flags;if(16&b&&ye(Ju.stateNode,""),128&b){var w=Ju.alternate;if(null!==w){var x=w.ref;null!==x&&("function"===typeof x?x(null):x.current=null)}}switch(1038&b){case 2:ku(Ju),Ju.flags&=-3;break;case 6:ku(Ju),Ju.flags&=-3,Cu(Ju.alternate,Ju);break;case 1024:Ju.flags&=-1025;break;case 1028:Ju.flags&=-1025,Cu(Ju.alternate,Ju);break;case 4:Cu(Ju.alternate,Ju);break;case 8:Eu(u,s=Ju);var k=s.alternate;wu(s),null!==k&&wu(k)}Ju=Ju.nextEffect}}catch(C){if(null===Ju)throw Error(a(330));zs(Ju,C),Ju=Ju.nextEffect}}while(null!==Ju);if(x=Hr,w=gr(),b=x.focusedElem,u=x.selectionRange,w!==b&&b&&b.ownerDocument&&vr(b.ownerDocument.documentElement,b)){null!==u&&mr(b)&&(w=u.start,void 0===(x=u.end)&&(x=w),"selectionStart"in b?(b.selectionStart=w,b.selectionEnd=Math.min(x,b.value.length)):(x=(w=b.ownerDocument||document)&&w.defaultView||window).getSelection&&(x=x.getSelection(),s=b.textContent.length,k=Math.min(u.start,s),u=void 0===u.end?k:Math.min(u.end,s),!x.extend&&k>u&&(s=u,u=k,k=s),s=hr(b,k),o=hr(b,u),s&&o&&(1!==x.rangeCount||x.anchorNode!==s.node||x.anchorOffset!==s.offset||x.focusNode!==o.node||x.focusOffset!==o.offset)&&((w=w.createRange()).setStart(s.node,s.offset),x.removeAllRanges(),k>u?(x.addRange(w),x.extend(o.node,o.offset)):(w.setEnd(o.node,o.offset),x.addRange(w))))),w=[];for(x=b;x=x.parentNode;)1===x.nodeType&&w.push({element:x,left:x.scrollLeft,top:x.scrollTop});for("function"===typeof b.focus&&b.focus(),b=0;b<w.length;b++)(x=w[b]).element.scrollLeft=x.left,x.element.scrollTop=x.top}Jt=!!Ur,Hr=Ur=null,e.current=n,Ju=r;do{try{for(b=e;null!==Ju;){var S=Ju.flags;if(36&S&&mu(b,Ju.alternate,Ju),128&S){w=void 0;var _=Ju.ref;if(null!==_){var E=Ju.stateNode;Ju.tag,w=E,"function"===typeof _?_(w):_.current=w}}Ju=Ju.nextEffect}}catch(C){if(null===Ju)throw Error(a(330));zs(Ju,C),Ju=Ju.nextEffect}}while(null!==Ju);Ju=null,Fi(),Tu=i}else e.current=n;if(Qu)Qu=!1,es=e,ts=t;else for(Ju=r;null!==Ju;)t=Ju.nextEffect,Ju.nextEffect=null,8&Ju.flags&&((S=Ju).sibling=null,S.stateNode=null),Ju=t;if(0===(r=e.pendingLanes)&&(Xu=null),1===r?e===as?os++:(os=0,as=e):os=0,n=n.stateNode,_i&&"function"===typeof _i.onCommitFiberRoot)try{_i.onCommitFiberRoot(Si,n,void 0,64===(64&n.current.flags))}catch(C){}if(gs(e,Wi()),Yu)throw Yu=!1,e=Zu,Zu=null,e;return 0!==(8&Tu)||$i(),null}function Ms(){for(;null!==Ju;){var e=Ju.alternate;fs||null===ls||(0!==(8&Ju.flags)?et(Ju,ls)&&(fs=!0):13===Ju.tag&&Ou(e,Ju)&&et(Ju,ls)&&(fs=!0));var t=Ju.flags;0!==(256&t)&&gu(e,Ju),0===(512&t)||Qu||(Qu=!0,qi(97,(function(){return Rs(),null}))),Ju=Ju.nextEffect}}function Rs(){if(90!==ts){var e=97<ts?97:ts;return ts=90,Ki(e,Fs)}return!1}function Ls(e,t){ns.push(t,e),Qu||(Qu=!0,qi(97,(function(){return Rs(),null})))}function js(e,t){rs.push(t,e),Qu||(Qu=!0,qi(97,(function(){return Rs(),null})))}function Fs(){if(null===es)return!1;var e=es;if(es=null,0!==(48&Tu))throw Error(a(331));var t=Tu;Tu|=32;var n=rs;rs=[];for(var r=0;r<n.length;r+=2){var i=n[r],o=n[r+1],u=i.destroy;if(i.destroy=void 0,"function"===typeof u)try{u()}catch(c){if(null===o)throw Error(a(330));zs(o,c)}}for(n=ns,ns=[],r=0;r<n.length;r+=2){i=n[r],o=n[r+1];try{var s=i.create;i.destroy=s()}catch(c){if(null===o)throw Error(a(330));zs(o,c)}}for(s=e.current.firstEffect;null!==s;)e=s.nextEffect,s.nextEffect=null,8&s.flags&&(s.sibling=null,s.stateNode=null),s=e;return Tu=t,$i(),!0}function Bs(e,t,n){fo(e,t=du(0,t=cu(n,t),1)),t=ds(),null!==(e=vs(e,1))&&(Wt(e,1,t),gs(e,t))}function zs(e,t){if(3===e.tag)Bs(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Bs(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Xu||!Xu.has(r))){var i=pu(n,e=cu(t,e),1);if(fo(n,i),i=ds(),null!==(n=vs(n,1)))Wt(n,1,i),gs(n,i);else if("function"===typeof r.componentDidCatch&&(null===Xu||!Xu.has(r)))try{r.componentDidCatch(t,e)}catch(o){}break}}n=n.return}}function Us(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ds(),e.pingedLanes|=e.suspendedLanes&n,Nu===e&&(Ru&n)===n&&(4===Fu||3===Fu&&(62914560&Ru)===Ru&&500>Wi()-Gu?_s(e,0):Wu|=n),gs(e,t)}function Hs(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0===(2&(t=e.mode))?t=1:0===(4&t)?t=99===Vi()?1:2:(0===ss&&(ss=zu),0===(t=Ut(62914560&~ss))&&(t=4194304))),n=ds(),null!==(e=vs(e,t))&&(Wt(e,t,n),gs(e,n))}function Ws(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Vs(e,t,n,r){return new Ws(e,t,n,r)}function Gs(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ks(e,t){var n=e.alternate;return null===n?((n=Vs(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function qs(e,t,n,r,i,o){var u=2;if(r=e,"function"===typeof e)Gs(e)&&(u=1);else if("string"===typeof e)u=5;else e:switch(e){case _:return $s(n.children,i,o,t);case L:u=8,i|=16;break;case E:u=8,i|=1;break;case C:return(e=Vs(12,n,t,8|i)).elementType=C,e.type=C,e.lanes=o,e;case D:return(e=Vs(13,n,t,i)).type=D,e.elementType=D,e.lanes=o,e;case P:return(e=Vs(19,n,t,i)).elementType=P,e.lanes=o,e;case j:return Js(n,i,o,t);case F:return(e=Vs(24,n,t,i)).elementType=F,e.lanes=o,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case I:u=10;break e;case O:u=9;break e;case A:u=11;break e;case T:u=14;break e;case N:u=16,r=null;break e;case M:u=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Vs(u,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function $s(e,t,n,r){return(e=Vs(7,e,r,t)).lanes=n,e}function Js(e,t,n,r){return(e=Vs(23,e,r,t)).elementType=j,e.lanes=n,e}function Ys(e,t,n){return(e=Vs(6,e,null,t)).lanes=n,e}function Zs(e,t,n){return(t=Vs(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Xs(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Ht(0),this.expirationTimes=Ht(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ht(0),this.mutableSourceEagerHydrationData=null}function Qs(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function ec(e,t,n,r){var i=t.current,o=ds(),u=ps(i);e:if(n){t:{if(Ye(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var s=n;do{switch(s.tag){case 3:s=s.stateNode.context;break t;case 1:if(mi(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break t}}s=s.return}while(null!==s);throw Error(a(171))}if(1===n.tag){var c=n.type;if(mi(c)){n=wi(n,c,s);break e}}n=s}else n=di;return null===t.context?t.context=n:t.pendingContext=n,(t=lo(o,u)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),fo(i,t),hs(i,u,o),u}function tc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function nc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function rc(e,t){nc(e,t),(e=e.alternate)&&nc(e,t)}function ic(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Xs(e,t,null!=n&&!0===n.hydrate),t=Vs(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,so(t),e[ei]=n.current,Tr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var i=(t=r[e])._getVersion;i=i(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,i]:n.mutableSourceEagerHydrationData.push(t,i)}this._internalRoot=n}function oc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function ac(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"===typeof i){var u=i;i=function(){var e=tc(a);u.call(e)}}ec(t,a,e,i)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new ic(e,0,t?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"===typeof i){var s=i;i=function(){var e=tc(a);s.call(e)}}xs((function(){ec(t,a,e,i)}))}return tc(a)}function uc(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!oc(t))throw Error(a(200));return Qs(e,t,null,n)}$u=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||hi.current)ja=!0;else{if(0===(n&r)){switch(ja=!1,t.tag){case 3:qa(t),$o();break;case 5:Lo(t);break;case 1:mi(t.type)&&xi(t);break;case 4:Mo(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var i=t.type._context;fi(Xi,i._currentValue),i._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(n&t.child.childLanes)?Xa(e,t,n):(fi(Fo,1&Fo.current),null!==(t=ou(e,t,n))?t.sibling:null);fi(Fo,1&Fo.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(64&e.flags)){if(r)return iu(e,t,n);t.flags|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),fi(Fo,Fo.current),r)break;return null;case 23:case 24:return t.lanes=0,Ha(e,t,n)}return ou(e,t,n)}ja=0!==(16384&e.flags)}else ja=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=gi(t,pi.current),oo(t,n),i=ua(null,t,r,e,i,n),t.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,mi(r)){var o=!0;xi(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,so(t);var u=r.getDerivedStateFromProps;"function"===typeof u&&mo(t,r,u,e),i.updater=yo,t.stateNode=i,i._reactInternals=t,ko(t,r,e,n),t=Ka(null,t,r,!0,o,n)}else t.tag=0,Fa(null,t,i,n),t=t.child;return t;case 16:i=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=(o=i._init)(i._payload),t.type=i,o=t.tag=function(e){if("function"===typeof e)return Gs(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===A)return 11;if(e===T)return 14}return 2}(i),e=Zi(i,e),o){case 0:t=Va(null,t,i,e,n);break e;case 1:t=Ga(null,t,i,e,n);break e;case 11:t=Ba(null,t,i,e,n);break e;case 14:t=za(null,t,i,Zi(i.type,e),r,n);break e}throw Error(a(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,Va(e,t,r,i=t.elementType===r?i:Zi(r,i),n);case 1:return r=t.type,i=t.pendingProps,Ga(e,t,r,i=t.elementType===r?i:Zi(r,i),n);case 3:if(qa(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,co(e,t),ho(t,r,null,n),(r=t.memoizedState.element)===i)$o(),t=ou(e,t,n);else{if((o=(i=t.stateNode).hydrate)&&(Uo=$r(t.stateNode.containerInfo.firstChild),zo=t,o=Ho=!0),o){if(null!=(e=i.mutableSourceEagerHydrationData))for(i=0;i<e.length;i+=2)(o=e[i])._workInProgressVersionPrimary=e[i+1],Jo.push(o);for(n=Oo(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Fa(e,t,r,n),$o();t=t.child}return t;case 5:return Lo(t),null===e&&Go(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,u=i.children,Vr(r,i)?u=null:null!==o&&Vr(r,o)&&(t.flags|=16),Wa(e,t),Fa(e,t,u,n),t.child;case 6:return null===e&&Go(t),null;case 13:return Xa(e,t,n);case 4:return Mo(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Io(t,null,r,n):Fa(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Ba(e,t,r,i=t.elementType===r?i:Zi(r,i),n);case 7:return Fa(e,t,t.pendingProps,n),t.child;case 8:case 12:return Fa(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,i=t.pendingProps,u=t.memoizedProps,o=i.value;var s=t.type._context;if(fi(Xi,s._currentValue),s._currentValue=o,null!==u)if(s=u.value,0===(o=lr(s,o)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(s,o):1073741823))){if(u.children===i.children&&!hi.current){t=ou(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var c=s.dependencies;if(null!==c){u=s.child;for(var l=c.firstContext;null!==l;){if(l.context===r&&0!==(l.observedBits&o)){1===s.tag&&((l=lo(-1,n&-n)).tag=2,fo(s,l)),s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),io(s.return,n),c.lanes|=n;break}l=l.next}}else u=10===s.tag&&s.type===t.type?null:s.child;if(null!==u)u.return=s;else for(u=s;null!==u;){if(u===t){u=null;break}if(null!==(s=u.sibling)){s.return=u.return,u=s;break}u=u.return}s=u}Fa(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,oo(t,n),r=r(i=ao(i,o.unstable_observedBits)),t.flags|=1,Fa(e,t,r,n),t.child;case 14:return o=Zi(i=t.type,t.pendingProps),za(e,t,i,o=Zi(i.type,o),r,n);case 15:return Ua(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Zi(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,mi(r)?(e=!0,xi(t)):e=!1,oo(t,n),wo(t,r,i),ko(t,r,i,n),Ka(null,t,r,!0,e,n);case 19:return iu(e,t,n);case 23:case 24:return Ha(e,t,n)}throw Error(a(156,t.tag))},ic.prototype.render=function(e){ec(e,this._internalRoot,null,null)},ic.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;ec(null,e,null,(function(){t[ei]=null}))},tt=function(e){13===e.tag&&(hs(e,4,ds()),rc(e,4))},nt=function(e){13===e.tag&&(hs(e,67108864,ds()),rc(e,67108864))},rt=function(e){if(13===e.tag){var t=ds(),n=ps(e);hs(e,n,t),rc(e,n)}},it=function(e,t){return t()},Ie=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=oi(r);if(!i)throw Error(a(90));Z(r),ne(r,i)}}}break;case"textarea":ce(e,n);break;case"select":null!=(t=n.value)&&ae(e,!!n.multiple,t,!1)}},Ne=ws,Me=function(e,t,n,r,i){var o=Tu;Tu|=4;try{return Ki(98,e.bind(null,t,n,r,i))}finally{0===(Tu=o)&&(qu(),$i())}},Re=function(){0===(49&Tu)&&(function(){if(null!==is){var e=is;is=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,gs(e,Wi())}))}$i()}(),Rs())},Le=function(e,t){var n=Tu;Tu|=2;try{return e(t)}finally{0===(Tu=n)&&(qu(),$i())}};var sc={Events:[ri,ii,oi,Pe,Te,Rs,{current:!1}]},cc={findFiberByHostInstance:ni,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},lc={bundleType:cc.bundleType,version:cc.version,rendererPackageName:cc.rendererPackageName,rendererConfig:cc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:x.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Qe(e))?null:e.stateNode},findFiberByHostInstance:cc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var fc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fc.isDisabled&&fc.supportsFiber)try{Si=fc.inject(lc),_i=fc}catch(ge){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sc,t.createPortal=uc,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=Qe(t))?null:e.stateNode},t.flushSync=function(e,t){var n=Tu;if(0!==(48&n))return e(t);Tu|=1;try{if(e)return Ki(99,e.bind(null,t))}finally{Tu=n,$i()}},t.hydrate=function(e,t,n){if(!oc(t))throw Error(a(200));return ac(null,e,t,!0,n)},t.render=function(e,t,n){if(!oc(t))throw Error(a(200));return ac(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!oc(e))throw Error(a(40));return!!e._reactRootContainer&&(xs((function(){ac(null,null,e,!1,(function(){e._reactRootContainer=null,e[ei]=null}))})),!0)},t.unstable_batchedUpdates=ws,t.unstable_createPortal=function(e,t){return uc(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!oc(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return ac(e,t,n,!1,r)},t.version="17.0.2"},164:function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(463)},340:function(e,t,n){"use strict";e.exports=n(424)},372:function(e,t){"use strict";var n=60103,r=60106,i=60107,o=60108,a=60114,u=60109,s=60110,c=60112,l=60113,f=60120,d=60115,p=60116,h=60121,v=60122,g=60117,m=60129,y=60131;if("function"===typeof Symbol&&Symbol.for){var b=Symbol.for;n=b("react.element"),r=b("react.portal"),i=b("react.fragment"),o=b("react.strict_mode"),a=b("react.profiler"),u=b("react.provider"),s=b("react.context"),c=b("react.forward_ref"),l=b("react.suspense"),f=b("react.suspense_list"),d=b("react.memo"),p=b("react.lazy"),h=b("react.block"),v=b("react.server.block"),g=b("react.fundamental"),m=b("react.debug_trace_mode"),y=b("react.legacy_hidden")}function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case i:case a:case o:case l:case f:return e;default:switch(e=e&&e.$$typeof){case s:case c:case p:case d:case u:return e;default:return t}}case r:return t}}}t.isContextConsumer=function(e){return w(e)===s},t.isFragment=function(e){return w(e)===i},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===i||e===a||e===m||e===o||e===l||e===f||e===y||"object"===typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===d||e.$$typeof===u||e.$$typeof===s||e.$$typeof===c||e.$$typeof===g||e.$$typeof===h||e[0]===v)},t.typeOf=w},441:function(e,t,n){"use strict";e.exports=n(372)},374:function(e,t,n){"use strict";n(725);var r=n(791),i=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),t.Fragment=o("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,l=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(l=t.ref),t)u.call(t,r)&&!s.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:l,props:o,_owner:a.current}}t.jsx=c,t.jsxs=c},117:function(e,t,n){"use strict";var r=n(725),i=60103,o=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,u=60110,s=60112;t.Suspense=60113;var c=60115,l=60116;if("function"===typeof Symbol&&Symbol.for){var f=Symbol.for;i=f("react.element"),o=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),a=f("react.provider"),u=f("react.context"),s=f("react.forward_ref"),t.Suspense=f("react.suspense"),c=f("react.memo"),l=f("react.lazy")}var d="function"===typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v={};function g(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||h}function m(){}function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||h}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(p(85));this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},m.prototype=g.prototype;var b=y.prototype=new m;b.constructor=y,r(b,g.prototype),b.isPureReactComponent=!0;var w={current:null},x=Object.prototype.hasOwnProperty,k={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,n){var r,o={},a=null,u=null;if(null!=t)for(r in void 0!==t.ref&&(u=t.ref),void 0!==t.key&&(a=""+t.key),t)x.call(t,r)&&!k.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var c=Array(s),l=0;l<s;l++)c[l]=arguments[l+2];o.children=c}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===o[r]&&(o[r]=s[r]);return{$$typeof:i,type:e,key:a,ref:u,props:o,_owner:w.current}}function _(e){return"object"===typeof e&&null!==e&&e.$$typeof===i}var E=/\/+/g;function C(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function I(e,t,n,r,a){var u=typeof e;"undefined"!==u&&"boolean"!==u||(e=null);var s=!1;if(null===e)s=!0;else switch(u){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case i:case o:s=!0}}if(s)return a=a(s=e),e=""===r?"."+C(s,0):r,Array.isArray(a)?(n="",null!=e&&(n=e.replace(E,"$&/")+"/"),I(a,t,n,"",(function(e){return e}))):null!=a&&(_(a)&&(a=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||s&&s.key===a.key?"":(""+a.key).replace(E,"$&/")+"/")+e)),t.push(a)),1;if(s=0,r=""===r?".":r+":",Array.isArray(e))for(var c=0;c<e.length;c++){var l=r+C(u=e[c],c);s+=I(u,t,n,l,a)}else if(l=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"===typeof l)for(e=l.call(e),c=0;!(u=e.next()).done;)s+=I(u=u.value,t,n,l=r+C(u,c++),a);else if("object"===u)throw t=""+e,Error(p(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function O(e,t,n){if(null==e)return e;var r=[],i=0;return I(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function A(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var D={current:null};function P(){var e=D.current;if(null===e)throw Error(p(321));return e}var T={ReactCurrentDispatcher:D,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:w,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:O,forEach:function(e,t,n){O(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return O(e,(function(){t++})),t},toArray:function(e){return O(e,(function(e){return e}))||[]},only:function(e){if(!_(e))throw Error(p(143));return e}},t.Component=g,t.PureComponent=y,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=T,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(p(267,e));var o=r({},e.props),a=e.key,u=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(u=t.ref,s=w.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in t)x.call(t,l)&&!k.hasOwnProperty(l)&&(o[l]=void 0===t[l]&&void 0!==c?c[l]:t[l])}var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){c=Array(l);for(var f=0;f<l;f++)c[f]=arguments[f+2];o.children=c}return{$$typeof:i,type:e.type,key:a,ref:u,props:o,_owner:s}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:u,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=S,t.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:s,render:e}},t.isValidElement=_,t.lazy=function(e){return{$$typeof:l,_payload:{_status:-1,_result:e},_init:A}},t.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return P().useCallback(e,t)},t.useContext=function(e,t){return P().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return P().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return P().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return P().useLayoutEffect(e,t)},t.useMemo=function(e,t){return P().useMemo(e,t)},t.useReducer=function(e,t,n){return P().useReducer(e,t,n)},t.useRef=function(e){return P().useRef(e)},t.useState=function(e){return P().useState(e)},t.version="17.0.2"},791:function(e,t,n){"use strict";e.exports=n(117)},184:function(e,t,n){"use strict";e.exports=n(374)},813:function(e,t){"use strict";var n,r,i,o;if("object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var u=Date,s=u.now();t.unstable_now=function(){return u.now()-s}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var c=null,l=null,f=function e(){if(null!==c)try{var n=t.unstable_now();c(!0,n),c=null}catch(r){throw setTimeout(e,0),r}};n=function(e){null!==c?setTimeout(n,0,e):(c=e,setTimeout(f,0))},r=function(e,t){l=setTimeout(e,t)},i=function(){clearTimeout(l)},t.unstable_shouldYield=function(){return!1},o=t.unstable_forceFrameRate=function(){}}else{var d=window.setTimeout,p=window.clearTimeout;if("undefined"!==typeof console){var h=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!==typeof h&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var v=!1,g=null,m=-1,y=5,b=0;t.unstable_shouldYield=function(){return t.unstable_now()>=b},o=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):y=0<e?Math.floor(1e3/e):5};var w=new MessageChannel,x=w.port2;w.port1.onmessage=function(){if(null!==g){var e=t.unstable_now();b=e+y;try{g(!0,e)?x.postMessage(null):(v=!1,g=null)}catch(n){throw x.postMessage(null),n}}else v=!1},n=function(e){g=e,v||(v=!0,x.postMessage(null))},r=function(e,n){m=d((function(){e(t.unstable_now())}),n)},i=function(){p(m),m=-1}}function k(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<E(i,t)))break e;e[r]=t,e[n]=i,n=r}}function S(e){return void 0===(e=e[0])?null:e}function _(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],u=o+1,s=e[u];if(void 0!==a&&0>E(a,n))void 0!==s&&0>E(s,a)?(e[r]=s,e[u]=n,r=u):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==s&&0>E(s,n)))break e;e[r]=s,e[u]=n,r=u}}}return t}return null}function E(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var C=[],I=[],O=1,A=null,D=3,P=!1,T=!1,N=!1;function M(e){for(var t=S(I);null!==t;){if(null===t.callback)_(I);else{if(!(t.startTime<=e))break;_(I),t.sortIndex=t.expirationTime,k(C,t)}t=S(I)}}function R(e){if(N=!1,M(e),!T)if(null!==S(C))T=!0,n(L);else{var t=S(I);null!==t&&r(R,t.startTime-e)}}function L(e,n){T=!1,N&&(N=!1,i()),P=!0;var o=D;try{for(M(n),A=S(C);null!==A&&(!(A.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=A.callback;if("function"===typeof a){A.callback=null,D=A.priorityLevel;var u=a(A.expirationTime<=n);n=t.unstable_now(),"function"===typeof u?A.callback=u:A===S(C)&&_(C),M(n)}else _(C);A=S(C)}if(null!==A)var s=!0;else{var c=S(I);null!==c&&r(R,c.startTime-n),s=!1}return s}finally{A=null,D=o,P=!1}}var j=o;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){T||P||(T=!0,n(L))},t.unstable_getCurrentPriorityLevel=function(){return D},t.unstable_getFirstCallbackNode=function(){return S(C)},t.unstable_next=function(e){switch(D){case 1:case 2:case 3:var t=3;break;default:t=D}var n=D;D=t;try{return e()}finally{D=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=j,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=D;D=e;try{return t()}finally{D=n}},t.unstable_scheduleCallback=function(e,o,a){var u=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?u+a:u:a=u,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:O++,callback:o,priorityLevel:e,startTime:a,expirationTime:s=a+s,sortIndex:-1},a>u?(e.sortIndex=a,k(I,e),null===S(C)&&e===S(I)&&(N?i():N=!0,r(R,a-u))):(e.sortIndex=s,k(C,e),T||P||(T=!0,n(L))),e},t.unstable_wrapCallback=function(e){var t=D;return function(){var n=D;D=t;try{return e.apply(this,arguments)}finally{D=n}}}},296:function(e,t,n){"use strict";e.exports=n(813)},823:function(e){e.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!==typeof e||!e||"object"!==typeof t||!t)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var u=Object.prototype.hasOwnProperty.bind(t),s=0;s<o.length;s++){var c=o[s];if(!u(c))return!1;var l=e[c],f=t[c];if(!1===(i=n?n.call(r,l,f,c):void 0)||void 0===i&&l!==f)return!1}return!0}},9:function(e){var t=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],n=t.join(","),r="undefined"===typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function i(e,t){t=t||{};var i,a,u,l=[],f=[],d=e.querySelectorAll(n);for(t.includeContainer&&r.call(e,n)&&(d=Array.prototype.slice.apply(d)).unshift(e),i=0;i<d.length;i++)o(a=d[i])&&(0===(u=s(a))?l.push(a):f.push({documentOrder:i,tabIndex:u,node:a}));return f.sort(c).map((function(e){return e.node})).concat(l)}function o(e){return!(!a(e)||function(e){return function(e){return l(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'));return!t||t===e}(e)}(e)||s(e)<0)}function a(e){return!(e.disabled||function(e){return l(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}i.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==r.call(e,n)&&o(e)},i.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==r.call(e,u)&&a(e)};var u=t.concat("iframe").join(",");function s(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function c(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function l(e){return"INPUT"===e.tagName}e.exports=i},897:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},405:function(e,t,n){var r=n(897);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.__esModule=!0,e.exports.default=e.exports},156:function(e){function t(e,t,n,r,i,o,a){try{var u=e[o](a),s=u.value}catch(c){return void n(c)}u.done?t(s):Promise.resolve(s).then(r,i)}e.exports=function(e){return function(){var n=this,r=arguments;return new Promise((function(i,o){var a=e.apply(n,r);function u(e){t(a,i,o,u,s,"next",e)}function s(e){t(a,i,o,u,s,"throw",e)}u(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},690:function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},728:function(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},704:function(e,t,n){var r=n(116);e.exports=function(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=r(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}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 a,u=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){s=!0,a=e},f:function(){try{u||null==n.return||n.return()}finally{if(s)throw a}}}},e.exports.__esModule=!0,e.exports.default=e.exports},416:function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},498:function(e){e.exports=function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},281:function(e){e.exports=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.")},e.exports.__esModule=!0,e.exports.default=e.exports},61:function(e,t,n){var r=n(698).default;function i(){"use strict";e.exports=i=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},n=Object.prototype,o=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(A){l=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var i=t&&t.prototype instanceof h?t:h,o=Object.create(i.prototype),a=new C(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var u=S(a,n);if(u){if(u===p)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=d(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===p)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}(e,n,a),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(A){return{type:"throw",arg:A}}}t.wrap=f;var p={};function h(){}function v(){}function g(){}var m={};l(m,u,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(I([])));b&&b!==n&&o.call(b,u)&&(m=b);var w=g.prototype=h.prototype=Object.create(m);function x(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,a,u,s){var c=d(e[i],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&o.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,u,s)}),(function(e){n("throw",e,u,s)})):t.resolve(f).then((function(e){l.value=e,u(l)}),(function(e){return n("throw",e,u,s)}))}s(c.arg)}var i;this._invoke=function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}}function S(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var r=d(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,p;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(e){if(e){var t=e[u];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(o.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:O}}function O(){return{value:void 0,done:!0}}return v.prototype=g,l(w,"constructor",g),l(g,"constructor",v),v.displayName=l(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,c,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},x(k.prototype),l(k.prototype,s,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new k(f(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},x(w),l(w,c,"Generator"),l(w,u,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=I,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),s=o.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:I(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},t}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},861:function(e,t,n){var r=n(405),i=n(498),o=n(116),a=n(281);e.exports=function(e){return r(e)||i(e)||o(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},698:function(e){function t(n){return e.exports=t="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},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},116:function(e,t,n){var r=n(897);e.exports=function(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},n.nc=void 0,function(){"use strict";function e(t){return e="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},e(t)}function t(){t=function(){return n};var n={},r=Object.prototype,i=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(O){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var i=t&&t.prototype instanceof p?t:p,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return I()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var u=k(a,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=f(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===d)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}(e,n,a),o}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(O){return{type:"throw",arg:O}}}n.wrap=l;var d={};function p(){}function h(){}function v(){}var g={};c(g,a,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(C([])));y&&y!==r&&i.call(y,a)&&(g=y);var b=v.prototype=p.prototype=Object.create(g);function w(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(t,n){function r(o,a,u,s){var c=f(t[o],t,a);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==e(d)&&i.call(d,"__await")?n.resolve(d.__await).then((function(e){r("next",e,u,s)}),(function(e){r("throw",e,u,s)})):n.resolve(d).then((function(e){l.value=e,u(l)}),(function(e){return r("throw",e,u,s)}))}s(c.arg)}var o;this._invoke=function(e,t){function i(){return new n((function(n,i){r(e,t,n,i)}))}return o=o?o.then(i,i):i()}}function k(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=f(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function C(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:I}}function I(){return{value:void 0,done:!0}}return h.prototype=v,c(b,"constructor",v),c(v,"constructor",h),h.displayName=c(v,s,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,s,"GeneratorFunction")),e.prototype=Object.create(b),e},n.awrap=function(e){return{__await:e}},w(x.prototype),c(x.prototype,u,(function(){return this})),n.AsyncIterator=x,n.async=function(e,t,r,i,o){void 0===o&&(o=Promise);var a=new x(l(e,t,r,i),o);return n.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},w(b),c(b,s,"Generator"),c(b,a,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},n.values=C,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),s=i.call(o,"finallyLoc");if(u&&s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},n}function r(e,t,n,r,i,o,a){try{var u=e[o](a),s=u.value}catch(c){return void n(c)}u.done?t(s):Promise.resolve(s).then(r,i)}function i(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var o=n(613),a=n.n(o),u=n(791),s=n(164),c=n(340),l=u.createContext(null);var f=function(e){e()},d=function(){return f};var p={notify:function(){},get:function(){return[]}};function h(e,t){var n,r=p;function i(){a.onStateChange&&a.onStateChange()}function o(){n||(n=t?t.addNestedSub(i):e.subscribe(i),r=function(){var e=d(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,i=n={callback:e,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){r&&null!==t&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}())}var a={addNestedSub:function(e){return o(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:i,isSubscribed:function(){return Boolean(n)},trySubscribe:o,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=p)},getListeners:function(){return r}};return a}var v="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?u.useLayoutEffect:u.useEffect;var g=function(e){var t=e.store,n=e.context,r=e.children,i=(0,u.useMemo)((function(){var e=h(t);return{store:t,subscription:e}}),[t]),o=(0,u.useMemo)((function(){return t.getState()}),[t]);v((function(){var e=i.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),o!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[i,o]);var a=n||l;return u.createElement(a.Provider,{value:i},r)},m=n(110),y=n.n(m),b=n(441);function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w.apply(this,arguments)}function x(){return(0,u.useContext)(l)}function k(e){void 0===e&&(e=l);var t=e===l?x:function(){return(0,u.useContext)(e)};return function(){return t().store}}var S=k();function _(e){void 0===e&&(e=l);var t=e===l?S:k(e);return function(){return t().dispatch}}var E=_(),C=function(e,t){return e===t};function I(e){void 0===e&&(e=l);var t=e===l?x:function(){return(0,u.useContext)(e)};return function(e,n){void 0===n&&(n=C);var r=t(),i=function(e,t,n,r){var i,o=(0,u.useReducer)((function(e){return e+1}),0)[1],a=(0,u.useMemo)((function(){return h(n,r)}),[n,r]),s=(0,u.useRef)(),c=(0,u.useRef)(),l=(0,u.useRef)(),f=(0,u.useRef)(),d=n.getState();try{if(e!==c.current||d!==l.current||s.current){var p=e(d);i=void 0!==f.current&&t(p,f.current)?f.current:p}else i=f.current}catch(g){throw s.current&&(g.message+="\nThe error may be correlated with this previous error:\n"+s.current.stack+"\n\n"),g}return v((function(){c.current=e,l.current=d,f.current=i,s.current=void 0})),v((function(){function e(){try{var e=n.getState();if(e===l.current)return;var r=c.current(e);if(t(r,f.current))return;f.current=r,l.current=e}catch(g){s.current=g}o()}return a.onStateChange=e,a.trySubscribe(),e(),function(){return a.tryUnsubscribe()}}),[n,a]),i}(e,n,r.store,r.subscription);return(0,u.useDebugValue)(i),i}}var O,A=I();O=s.unstable_batchedUpdates,f=O;var D=n(823),P=n.n(D);var T=function(e){function t(e,r,s,c,d){for(var p,h,v,g,w,k=0,S=0,_=0,E=0,C=0,T=0,M=v=p=0,L=0,j=0,F=0,B=0,z=s.length,U=z-1,H="",W="",V="",G="";L<z;){if(h=s.charCodeAt(L),L===U&&0!==S+E+_+k&&(0!==S&&(h=47===S?10:47),E=_=k=0,z++,U++),0===S+E+_+k){if(L===U&&(0<j&&(H=H.replace(f,"")),0<H.trim().length)){switch(h){case 32:case 9:case 59:case 13:case 10:break;default:H+=s.charAt(L)}h=59}switch(h){case 123:for(p=(H=H.trim()).charCodeAt(0),v=1,B=++L;L<z;){switch(h=s.charCodeAt(L)){case 123:v++;break;case 125:v--;break;case 47:switch(h=s.charCodeAt(L+1)){case 42:case 47:e:{for(M=L+1;M<U;++M)switch(s.charCodeAt(M)){case 47:if(42===h&&42===s.charCodeAt(M-1)&&L+2!==M){L=M+1;break e}break;case 10:if(47===h){L=M+1;break e}}L=M}}break;case 91:h++;case 40:h++;case 34:case 39:for(;L++<U&&s.charCodeAt(L)!==h;);}if(0===v)break;L++}if(v=s.substring(B,L),0===p&&(p=(H=H.replace(l,"").trim()).charCodeAt(0)),64===p){switch(0<j&&(H=H.replace(f,"")),h=H.charCodeAt(1)){case 100:case 109:case 115:case 45:j=r;break;default:j=P}if(B=(v=t(r,j,v,h,d+1)).length,0<N&&(w=u(3,v,j=n(P,H,F),r,O,I,B,h,d,c),H=j.join(""),void 0!==w&&0===(B=(v=w.trim()).length)&&(h=0,v="")),0<B)switch(h){case 115:H=H.replace(x,a);case 100:case 109:case 45:v=H+"{"+v+"}";break;case 107:v=(H=H.replace(m,"$1 $2"))+"{"+v+"}",v=1===D||2===D&&o("@"+v,3)?"@-webkit-"+v+"@"+v:"@"+v;break;default:v=H+v,112===c&&(W+=v,v="")}else v=""}else v=t(r,n(r,H,F),v,c,d+1);V+=v,v=F=j=M=p=0,H="",h=s.charCodeAt(++L);break;case 125:case 59:if(1<(B=(H=(0<j?H.replace(f,""):H).trim()).length))switch(0===M&&(p=H.charCodeAt(0),45===p||96<p&&123>p)&&(B=(H=H.replace(" ",":")).length),0<N&&void 0!==(w=u(1,H,r,e,O,I,W.length,c,d,c))&&0===(B=(H=w.trim()).length)&&(H="\0\0"),p=H.charCodeAt(0),h=H.charCodeAt(1),p){case 0:break;case 64:if(105===h||99===h){G+=H+s.charAt(L);break}default:58!==H.charCodeAt(B-1)&&(W+=i(H,p,h,H.charCodeAt(2)))}F=j=M=p=0,H="",h=s.charCodeAt(++L)}}switch(h){case 13:case 10:47===S?S=0:0===1+p&&107!==c&&0<H.length&&(j=1,H+="\0"),0<N*R&&u(0,H,r,e,O,I,W.length,c,d,c),I=1,O++;break;case 59:case 125:if(0===S+E+_+k){I++;break}default:switch(I++,g=s.charAt(L),h){case 9:case 32:if(0===E+k+S)switch(C){case 44:case 58:case 9:case 32:g="";break;default:32!==h&&(g=" ")}break;case 0:g="\\0";break;case 12:g="\\f";break;case 11:g="\\v";break;case 38:0===E+S+k&&(j=F=1,g="\f"+g);break;case 108:if(0===E+S+k+A&&0<M)switch(L-M){case 2:112===C&&58===s.charCodeAt(L-3)&&(A=C);case 8:111===T&&(A=T)}break;case 58:0===E+S+k&&(M=L);break;case 44:0===S+_+E+k&&(j=1,g+="\r");break;case 34:case 39:0===S&&(E=E===h?0:0===E?h:E);break;case 91:0===E+S+_&&k++;break;case 93:0===E+S+_&&k--;break;case 41:0===E+S+k&&_--;break;case 40:if(0===E+S+k){if(0===p)if(2*C+3*T===533);else p=1;_++}break;case 64:0===S+_+E+k+M+v&&(v=1);break;case 42:case 47:if(!(0<E+k+_))switch(S){case 0:switch(2*h+3*s.charCodeAt(L+1)){case 235:S=47;break;case 220:B=L,S=42}break;case 42:47===h&&42===C&&B+2!==L&&(33===s.charCodeAt(B+2)&&(W+=s.substring(B,L+1)),g="",S=0)}}0===S&&(H+=g)}T=C,C=h,L++}if(0<(B=W.length)){if(j=r,0<N&&(void 0!==(w=u(2,W,j,e,O,I,B,c,d,c))&&0===(W=w).length))return G+W+V;if(W=j.join(",")+"{"+W+"}",0!==D*A){switch(2!==D||o(W,2)||(A=0),A){case 111:W=W.replace(b,":-moz-$1")+W;break;case 112:W=W.replace(y,"::-webkit-input-$1")+W.replace(y,"::-moz-$1")+W.replace(y,":-ms-input-$1")+W}A=0}}return G+W+V}function n(e,t,n){var i=t.trim().split(v);t=i;var o=i.length,a=e.length;switch(a){case 0:case 1:var u=0;for(e=0===a?"":e[0]+" ";u<o;++u)t[u]=r(e,t[u],n).trim();break;default:var s=u=0;for(t=[];u<o;++u)for(var c=0;c<a;++c)t[s++]=r(e[c]+" ",i[u],n).trim()}return t}function r(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(g,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function i(e,t,n,r){var a=e+";",u=2*t+3*n+4*r;if(944===u){e=a.indexOf(":",9)+1;var s=a.substring(e,a.length-1).trim();return s=a.substring(0,e).trim()+s+";",1===D||2===D&&o(s,1)?"-webkit-"+s+s:s}if(0===D||2===D&&!o(a,1))return a;switch(u){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(C,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(s=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+s+a;case 1005:return p.test(a)?a.replace(d,":-webkit-")+a.replace(d,":-moz-")+a:a;case 1e3:switch(t=(s=a.substring(13).trim()).indexOf("-")+1,s.charCodeAt(0)+s.charCodeAt(t)){case 226:s=a.replace(w,"tb");break;case 232:s=a.replace(w,"tb-rl");break;case 220:s=a.replace(w,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+s+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,u=(s=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|s.charCodeAt(7))){case 203:if(111>s.charCodeAt(8))break;case 115:a=a.replace(s,"-webkit-"+s)+";"+a;break;case 207:case 102:a=a.replace(s,"-webkit-"+(102<u?"inline-":"")+"box")+";"+a.replace(s,"-webkit-"+s)+";"+a.replace(s,"-ms-"+s+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return s=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+s+"-ms-flex-"+s+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(S,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(S,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===E.test(e))return 115===(s=e.substring(e.indexOf(":")+1)).charCodeAt(0)?i(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):a.replace(s,"-webkit-"+s)+a.replace(s,"-moz-"+s.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===n+r&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(h,"$1-webkit-$2")+a}return a}function o(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),M(2!==t?r:r.replace(_,"$1"),n,t)}function a(e,t){var n=i(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(k," or ($1)").substring(4):"("+t+")"}function u(e,t,n,r,i,o,a,u,s,l){for(var f,d=0,p=t;d<N;++d)switch(f=T[d].call(c,e,p,n,r,i,o,a,u,s,l)){case void 0:case!1:case!0:case null:break;default:p=f}if(p!==t)return p}function s(e){return void 0!==(e=e.prefix)&&(M=null,e?"function"!==typeof e?D=1:(D=2,M=e):D=0),s}function c(e,n){var r=e;if(33>r.charCodeAt(0)&&(r=r.trim()),r=[r],0<N){var i=u(-1,n,r,r,O,I,0,0,0,0);void 0!==i&&"string"===typeof i&&(n=i)}var o=t(P,r,n,0,0);return 0<N&&(void 0!==(i=u(-2,o,r,r,O,I,o.length,0,0,0))&&(o=i)),"",A=0,I=O=1,o}var l=/^\0+/g,f=/[\0\r\f]/g,d=/: */g,p=/zoo|gra/,h=/([,: ])(transform)/g,v=/,\r+?/g,g=/([\t\r\n ])*\f?&/g,m=/@(k\w+)\s*(\S*)\s*/,y=/::(place)/g,b=/:(read-only)/g,w=/[svh]\w+-[tblr]{2}/,x=/\(\s*(.*)\s*\)/g,k=/([\s\S]*?);/g,S=/-self|flex-/g,_=/[^]*?(:[rp][el]a[\w-]+)[^]*/,E=/stretch|:\s*\w+\-(?:conte|avail)/,C=/([^-])(image-set\()/,I=1,O=1,A=0,D=1,P=[],T=[],N=0,M=null,R=0;return c.use=function e(t){switch(t){case void 0:case null:N=T.length=0;break;default:if("function"===typeof t)T[N++]=t;else if("object"===typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else R=0|!!t}return e},c.set=s,void 0!==e&&s(e),c},N={animationIterationCount: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};var M=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}},R=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,L=M((function(e){return R.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));function j(){return(j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var F=function(e,t){for(var n=[e[0]],r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n},B=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!(0,b.typeOf)(e)},z=Object.freeze([]),U=Object.freeze({});function H(e){return"function"==typeof e}function W(e){return e.displayName||e.name||"Component"}function V(e){return e&&"string"==typeof e.styledComponentId}var G="undefined"!=typeof process&&({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SC_ATTR||{NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.SC_ATTR)||"data-styled",K="undefined"!=typeof window&&"HTMLElement"in window,q=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!=={NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SC_DISABLE_SPEEDY&&""!=={NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SC_DISABLE_SPEEDY?"false"!=={NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SC_DISABLE_SPEEDY&&{NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!=={NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.SC_DISABLE_SPEEDY&&""!=={NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.SC_DISABLE_SPEEDY&&("false"!=={NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.SC_DISABLE_SPEEDY&&{NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.SC_DISABLE_SPEEDY));function $(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var J=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;e>=i;)(i<<=1)<0&&$(16,""+e);this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var o=r;o<i;o++)this.groupSizes[o]=0}for(var a=this.indexOfGroup(e+1),u=0,s=t.length;u<s;u++)this.tag.insertRule(a,t[u])&&(this.groupSizes[e]++,a++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var i=n;i<r;i++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n,o=r;o<i;o++)t+=this.tag.getRule(o)+"/*!sc*/\n";return t},e}(),Y=new Map,Z=new Map,X=1,Q=function(e){if(Y.has(e))return Y.get(e);for(;Z.has(X);)X++;var t=X++;return Y.set(e,t),Z.set(t,e),t},ee=function(e){return Z.get(e)},te=function(e,t){t>=X&&(X=t+1),Y.set(e,t),Z.set(t,e)},ne="style["+G+'][data-styled-version="5.3.5"]',re=new RegExp("^"+G+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),ie=function(e,t,n){for(var r,i=n.split(","),o=0,a=i.length;o<a;o++)(r=i[o])&&e.registerName(t,r)},oe=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],i=0,o=n.length;i<o;i++){var a=n[i].trim();if(a){var u=a.match(re);if(u){var s=0|parseInt(u[1],10),c=u[2];0!==s&&(te(c,s),ie(e,c,u[3]),e.getTag().insertRules(s,r)),r.length=0}else r.push(a)}}},ae=function(){return"undefined"!=typeof window&&void 0!==window.__webpack_nonce__?window.__webpack_nonce__:null},ue=function(e){var t=document.head,n=e||t,r=document.createElement("style"),i=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(G))return r}}(n),o=void 0!==i?i.nextSibling:null;r.setAttribute(G,"active"),r.setAttribute("data-styled-version","5.3.5");var a=ae();return a&&r.setAttribute("nonce",a),n.insertBefore(r,o),r},se=function(){function e(e){var t=this.element=ue(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var i=t[n];if(i.ownerNode===e)return i}$(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),ce=function(){function e(e){var t=this.element=ue(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),le=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),fe=K,de={isServer:!K,useCSSOMInjection:!q},pe=function(){function e(e,t,n){void 0===e&&(e=U),void 0===t&&(t={}),this.options=j({},de,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&K&&fe&&(fe=!1,function(e){for(var t=document.querySelectorAll(ne),n=0,r=t.length;n<r;n++){var i=t[n];i&&"active"!==i.getAttribute(G)&&(oe(e,i),i.parentNode&&i.parentNode.removeChild(i))}}(this))}e.registerId=function(e){return Q(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(j({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,i=t.target,e=n?new le(i):r?new se(i):new ce(i),new J(e)));var e,t,n,r,i},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(Q(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(Q(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(Q(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",i=0;i<n;i++){var o=ee(i);if(void 0!==o){var a=e.names.get(o),u=t.getGroup(i);if(a&&u&&a.size){var s=G+".g"+i+'[id="'+o+'"]',c="";void 0!==a&&a.forEach((function(e){e.length>0&&(c+=e+",")})),r+=""+u+s+'{content:"'+c+'"}/*!sc*/\n'}}}return r}(this)},e}(),he=/(a)(d)/gi,ve=function(e){return String.fromCharCode(e+(e>25?39:97))};function ge(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=ve(t%52)+n;return(ve(t%52)+n).replace(he,"$1-$2")}var me=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},ye=function(e){return me(5381,e)};function be(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(H(n)&&!V(n))return!1}return!0}var we=ye("5.3.5"),xe=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&be(e),this.componentId=t,this.baseHash=me(we,t),this.baseStyle=n,pe.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,i=[];if(this.baseStyle&&i.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))i.push(this.staticRulesId);else{var o=Be(this.rules,e,t,n).join(""),a=ge(me(this.baseHash,o)>>>0);if(!t.hasNameForId(r,a)){var u=n(o,"."+a,void 0,r);t.insertRules(r,a,u)}i.push(a),this.staticRulesId=a}else{for(var s=this.rules.length,c=me(this.baseHash,n.hash),l="",f=0;f<s;f++){var d=this.rules[f];if("string"==typeof d)l+=d;else if(d){var p=Be(d,e,t,n),h=Array.isArray(p)?p.join(""):p;c=me(c,h+f),l+=h}}if(l){var v=ge(c>>>0);if(!t.hasNameForId(r,v)){var g=n(l,"."+v,void 0,r);t.insertRules(r,v,g)}i.push(v)}}return i.join(" ")},e}(),ke=/^\s*\/\/.*$/gm,Se=[":","[",".","#"];function _e(e){var t,n,r,i,o=void 0===e?U:e,a=o.options,u=void 0===a?U:a,s=o.plugins,c=void 0===s?z:s,l=new T(u),f=[],d=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,i,o,a,u,s,c,l,f){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===c)return r+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(i[0]+r),"";default:return r+(0===f?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){f.push(e)})),p=function(e,r,o){return 0===r&&-1!==Se.indexOf(o[n.length])||o.match(i)?e:"."+t};function h(e,o,a,u){void 0===u&&(u="&");var s=e.replace(ke,""),c=o&&a?a+" "+o+" { "+s+" }":s;return t=u,n=o,r=new RegExp("\\"+n+"\\b","g"),i=new RegExp("(\\"+n+"\\b){2,}"),l(a||!o?"":o,c)}return l.use([].concat(c,[function(e,t,i){2===e&&i.length&&i[0].lastIndexOf(n)>0&&(i[0]=i[0].replace(r,p))},d,function(e){if(-2===e){var t=f;return f=[],t}}])),h.hash=c.length?c.reduce((function(e,t){return t.name||$(15),me(e,t.name)}),5381).toString():"",h}var Ee=u.createContext(),Ce=(Ee.Consumer,u.createContext()),Ie=(Ce.Consumer,new pe),Oe=_e();function Ae(){return(0,u.useContext)(Ee)||Ie}function De(){return(0,u.useContext)(Ce)||Oe}function Pe(e){var t=(0,u.useState)(e.stylisPlugins),n=t[0],r=t[1],i=Ae(),o=(0,u.useMemo)((function(){var t=i;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),a=(0,u.useMemo)((function(){return _e({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return(0,u.useEffect)((function(){P()(n,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),u.createElement(Ee.Provider,{value:o},u.createElement(Ce.Provider,{value:a},e.children))}var Te=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Oe);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return $(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=Oe),this.name+e.hash},e}(),Ne=/([A-Z])/,Me=/([A-Z])/g,Re=/^ms-/,Le=function(e){return"-"+e.toLowerCase()};function je(e){return Ne.test(e)?e.replace(Me,Le).replace(Re,"-ms-"):e}var Fe=function(e){return null==e||!1===e||""===e};function Be(e,t,n,r){if(Array.isArray(e)){for(var i,o=[],a=0,u=e.length;a<u;a+=1)""!==(i=Be(e[a],t,n,r))&&(Array.isArray(i)?o.push.apply(o,i):o.push(i));return o}return Fe(e)?"":V(e)?"."+e.styledComponentId:H(e)?"function"!=typeof(s=e)||s.prototype&&s.prototype.isReactComponent||!t?e:Be(e(t),t,n,r):e instanceof Te?n?(e.inject(n,r),e.getName(r)):e:B(e)?function e(t,n){var r,i,o=[];for(var a in t)t.hasOwnProperty(a)&&!Fe(t[a])&&(Array.isArray(t[a])&&t[a].isCss||H(t[a])?o.push(je(a)+":",t[a],";"):B(t[a])?o.push.apply(o,e(t[a],a)):o.push(je(a)+": "+(r=a,(null==(i=t[a])||"boolean"==typeof i||""===i?"":"number"!=typeof i||0===i||r in N?String(i).trim():i+"px")+";")));return n?[n+" {"].concat(o,["}"]):o}(e):e.toString();var s}var ze=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function Ue(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return H(e)||B(e)?ze(Be(F(z,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:ze(Be(F(e,n)))}new Set;var He=function(e,t,n){return void 0===n&&(n=U),e.theme!==n.theme&&e.theme||t||n.theme},We=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Ve=/(^-|-$)/g;function Ge(e){return e.replace(We,"-").replace(Ve,"")}var Ke=function(e){return ge(ye(e)>>>0)};function qe(e){return"string"==typeof e&&!0}var $e=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Je=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function Ye(e,t,n){var r=e[n];$e(t)&&$e(r)?Ze(r,t):e[n]=t}function Ze(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i];if($e(a))for(var u in a)Je(u)&&Ye(e,a[u],u)}return e}var Xe=u.createContext();Xe.Consumer;var Qe={};function et(e,t,n){var r=V(e),i=!qe(e),o=t.attrs,a=void 0===o?z:o,s=t.componentId,c=void 0===s?function(e,t){var n="string"!=typeof e?"sc":Ge(e);Qe[n]=(Qe[n]||0)+1;var r=n+"-"+Ke("5.3.5"+n+Qe[n]);return t?t+"-"+r:r}(t.displayName,t.parentComponentId):s,l=t.displayName,f=void 0===l?function(e){return qe(e)?"styled."+e:"Styled("+W(e)+")"}(e):l,d=t.displayName&&t.componentId?Ge(t.displayName)+"-"+t.componentId:t.componentId||c,p=r&&e.attrs?Array.prototype.concat(e.attrs,a).filter(Boolean):a,h=t.shouldForwardProp;r&&e.shouldForwardProp&&(h=t.shouldForwardProp?function(n,r,i){return e.shouldForwardProp(n,r,i)&&t.shouldForwardProp(n,r,i)}:e.shouldForwardProp);var v,g=new xe(n,d,r?e.componentStyle:void 0),m=g.isStatic&&0===a.length,b=function(e,t){return function(e,t,n,r){var i=e.attrs,o=e.componentStyle,a=e.defaultProps,s=e.foldedComponentIds,c=e.shouldForwardProp,l=e.styledComponentId,f=e.target,d=function(e,t,n){void 0===e&&(e=U);var r=j({},t,{theme:e}),i={};return n.forEach((function(e){var t,n,o,a=e;for(t in H(a)&&(a=a(r)),a)r[t]=i[t]="className"===t?(n=i[t],o=a[t],n&&o?n+" "+o:n||o):a[t]})),[r,i]}(He(t,(0,u.useContext)(Xe),a)||U,t,i),p=d[0],h=d[1],v=function(e,t,n,r){var i=Ae(),o=De();return t?e.generateAndInjectStyles(U,i,o):e.generateAndInjectStyles(n,i,o)}(o,r,p),g=n,m=h.$as||t.$as||h.as||t.as||f,y=qe(m),b=h!==t?j({},t,{},h):t,w={};for(var x in b)"$"!==x[0]&&"as"!==x&&("forwardedAs"===x?w.as=b[x]:(c?c(x,L,m):!y||L(x))&&(w[x]=b[x]));return t.style&&h.style!==t.style&&(w.style=j({},t.style,{},h.style)),w.className=Array.prototype.concat(s,l,v!==l?v:null,t.className,h.className).filter(Boolean).join(" "),w.ref=g,(0,u.createElement)(m,w)}(v,e,t,m)};return b.displayName=f,(v=u.forwardRef(b)).attrs=p,v.componentStyle=g,v.displayName=f,v.shouldForwardProp=h,v.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):z,v.styledComponentId=d,v.target=r?e.target:e,v.withComponent=function(e){var r=t.componentId,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["componentId"]),o=r&&r+"-"+(qe(e)?e:Ge(W(e)));return et(e,j({},i,{attrs:p,componentId:o}),n)},Object.defineProperty(v,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?Ze({},e.defaultProps,t):t}}),v.toString=function(){return"."+v.styledComponentId},i&&y()(v,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),v}var tt=function(e){return function e(t,n,r){if(void 0===r&&(r=U),!(0,b.isValidElementType)(n))return $(1,String(n));var i=function(){return t(n,r,Ue.apply(void 0,arguments))};return i.withConfig=function(i){return e(t,n,j({},r,{},i))},i.attrs=function(i){return e(t,n,j({},r,{attrs:Array.prototype.concat(r.attrs,i).filter(Boolean)}))},i}(et,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){tt[e]=tt(e)}));!function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=be(e),pe.registerId(this.componentId+1)}var t=e.prototype;t.createStyles=function(e,t,n,r){var i=r(Be(this.rules,t,n,r).join(""),""),o=this.componentId+e;n.insertRules(o,o,i)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&pe.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)}}();!function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=ae();return"<style "+[n&&'nonce="'+n+'"',G+'="true"','data-styled-version="5.3.5"'].filter(Boolean).join(" ")+">"+t+"</style>"},this.getStyleTags=function(){return e.sealed?$(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return $(2);var n=((t={})[G]="",t["data-styled-version"]="5.3.5",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=ae();return r&&(n.nonce=r),[u.createElement("style",j({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new pe({isServer:!0}),this.sealed=!1}var t=e.prototype;t.collectStyles=function(e){return this.sealed?$(2):u.createElement(Pe,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return $(3)}}();var nt=tt;function rt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function it(e,t){if(e){if("string"===typeof e)return rt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rt(e,t):void 0}}function ot(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(s){u=!0,i=s}finally{try{a||null==n.return||n.return()}finally{if(u)throw i}}return o}}(e,t)||it(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.")}()}var at,ut=[],st="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(at||(at={}));var ct,lt,ft=function(e){return Object.freeze(e)},dt=function(e,t){this.inlineSize=e,this.blockSize=t,ft(this)},pt=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,ft(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),ht=function(e){return e instanceof SVGElement&&"getBBox"in e},vt=function(e){if(ht(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},gt=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null===e||void 0===e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},mt="undefined"!==typeof window?window:{},yt=new WeakMap,bt=/auto|scroll/,wt=/^tb|vertical/,xt=/msie|trident/i.test(mt.navigator&&mt.navigator.userAgent),kt=function(e){return parseFloat(e||"0")},St=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new dt((n?t:e)||0,(n?e:t)||0)},_t=ft({devicePixelContentBoxSize:St(),borderBoxSize:St(),contentBoxSize:St(),contentRect:new pt(0,0,0,0)}),Et=function(e,t){if(void 0===t&&(t=!1),yt.has(e)&&!t)return yt.get(e);if(vt(e))return yt.set(e,_t),_t;var n=getComputedStyle(e),r=ht(e)&&e.ownerSVGElement&&e.getBBox(),i=!xt&&"border-box"===n.boxSizing,o=wt.test(n.writingMode||""),a=!r&&bt.test(n.overflowY||""),u=!r&&bt.test(n.overflowX||""),s=r?0:kt(n.paddingTop),c=r?0:kt(n.paddingRight),l=r?0:kt(n.paddingBottom),f=r?0:kt(n.paddingLeft),d=r?0:kt(n.borderTopWidth),p=r?0:kt(n.borderRightWidth),h=r?0:kt(n.borderBottomWidth),v=f+c,g=s+l,m=(r?0:kt(n.borderLeftWidth))+p,y=d+h,b=u?e.offsetHeight-y-e.clientHeight:0,w=a?e.offsetWidth-m-e.clientWidth:0,x=i?v+m:0,k=i?g+y:0,S=r?r.width:kt(n.width)-x-w,_=r?r.height:kt(n.height)-k-b,E=S+v+w+m,C=_+g+b+y,I=ft({devicePixelContentBoxSize:St(Math.round(S*devicePixelRatio),Math.round(_*devicePixelRatio),o),borderBoxSize:St(E,C,o),contentBoxSize:St(S,_,o),contentRect:new pt(f,s,S,_)});return yt.set(e,I),I},Ct=function(e,t,n){var r=Et(e,n),i=r.borderBoxSize,o=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case at.DEVICE_PIXEL_CONTENT_BOX:return a;case at.BORDER_BOX:return i;default:return o}},It=function(e){var t=Et(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=ft([t.borderBoxSize]),this.contentBoxSize=ft([t.contentBoxSize]),this.devicePixelContentBoxSize=ft([t.devicePixelContentBoxSize])},Ot=function(e){if(vt(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},At=function(){var e=1/0,t=[];ut.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new It(t.target),i=Ot(t.target);r.push(n),t.lastReportedSize=Ct(t.target,t.observedBox),i<e&&(e=i)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++){(0,r[n])()}return e},Dt=function(e){ut.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(Ot(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},Pt=function(){var e=0;for(Dt(e);ut.some((function(e){return e.activeTargets.length>0}));)e=At(),Dt(e);return ut.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"===typeof ErrorEvent?e=new ErrorEvent("error",{message:st}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=st),window.dispatchEvent(e)}(),e>0},Tt=[],Nt=function(e){if(!ct){var t=0,n=document.createTextNode("");new MutationObserver((function(){return Tt.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),ct=function(){n.textContent="".concat(t?t--:t++)}}Tt.push(e),ct()},Mt=0,Rt={attributes:!0,characterData:!0,childList:!0,subtree:!0},Lt=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],jt=function(e){return void 0===e&&(e=0),Date.now()+e},Ft=!1,Bt=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!Ft){Ft=!0;var n,r=jt(e);n=function(){var n=!1;try{n=Pt()}finally{if(Ft=!1,e=r-jt(),!Mt)return;n?t.run(1e3):e>0?t.run(e):t.start()}},Nt((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,Rt)};document.body?t():mt.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Lt.forEach((function(t){return mt.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Lt.forEach((function(t){return mt.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),zt=function(e){!Mt&&e>0&&Bt.start(),!(Mt+=e)&&Bt.stop()},Ut=function(){function e(e,t){this.target=e,this.observedBox=t||at.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=Ct(this.target,this.observedBox,!0);return e=this.target,ht(e)||function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),Ht=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},Wt=new WeakMap,Vt=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Gt=function(){function e(){}return e.connect=function(e,t){var n=new Ht(e,t);Wt.set(e,n)},e.observe=function(e,t,n){var r=Wt.get(e),i=0===r.observationTargets.length;Vt(r.observationTargets,t)<0&&(i&&ut.push(r),r.observationTargets.push(new Ut(t,n&&n.box)),zt(1),Bt.schedule())},e.unobserve=function(e,t){var n=Wt.get(e),r=Vt(n.observationTargets,t),i=1===n.observationTargets.length;r>=0&&(i&&ut.splice(ut.indexOf(n),1),n.observationTargets.splice(r,1),zt(-1))},e.disconnect=function(e){var t=this,n=Wt.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),Kt=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!==typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Gt.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!gt(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Gt.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!gt(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Gt.unobserve(this,e)},e.prototype.disconnect=function(){Gt.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}(),qt=u["undefined"!==typeof document&&void 0!==document.createElement?"useLayoutEffect":"useEffect"],$t=function(e){var t=u.useRef(e);return u.useEffect((function(){t.current=e})),t},Jt="undefined"!==typeof window&&"ResizeObserver"in window?window.ResizeObserver:Kt;function Yt(){}var Zt=function(){return lt||(lt=function(){var e=!1,t=[],n=new Map,r=new Jt((function(r,i){t=t.concat(r),e||window.requestAnimationFrame((function(){for(var r=new Set,o=function(e){if(r.has(t[e].target))return"continue";r.add(t[e].target);var o=n.get(t[e].target);null===o||void 0===o||o.forEach((function(n){return n(t[e],i)}))},a=0;a<t.length;a++)o(a);t=[],e=!1})),e=!0}));return{observer:r,subscribe:function(e,t){var i;r.observe(e);var o=null!==(i=n.get(e))&&void 0!==i?i:[];o.push(t),n.set(e,o)},unsubscribe:function(e,t){var i,o=null!==(i=n.get(e))&&void 0!==i?i:[];if(1===o.length)return r.unobserve(e),void n.delete(e);var a=o.indexOf(t);-1!==a&&o.splice(a,1),n.set(e,o)}}}())},Xt=function(e,t){var n=Zt(),r=$t(t);return qt((function(){var t=!1,i=e&&"current"in e?e.current:e;if(!i)return Yt;function o(e,n){t||r.current(e,n)}return n.subscribe(i,o),function(){t=!0,n.unsubscribe(i,o)}}),[e,n,r]),n.observer},Qt=function(){return E()},en=A,tn=function(e,t){var n=ot((0,u.useState)(),2),r=n[0],i=n[1];Xt(e,(function(e){var n,o,a=e.contentRect,u=e.target;n=r,o=a,JSON.stringify(n)!==JSON.stringify(o)&&(i(a),t(u))}))},nn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=(0,u.useRef)();clearTimeout(n.current),n.current=setTimeout((function(){e()}),t)};function rn(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function on(e){return!!e&&!!e[$n]}function an(e){return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===Jn}(e)||Array.isArray(e)||!!e[qn]||!!e.constructor[qn]||pn(e)||hn(e))}function un(e,t,n){void 0===n&&(n=!1),0===sn(e)?(n?Object.keys:Yn)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function sn(e){var t=e[$n];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:pn(e)?2:hn(e)?3:0}function cn(e,t){return 2===sn(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ln(e,t){return 2===sn(e)?e.get(t):e[t]}function fn(e,t,n){var r=sn(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function dn(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function pn(e){return Wn&&e instanceof Map}function hn(e){return Vn&&e instanceof Set}function vn(e){return e.o||e.t}function gn(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Zn(e);delete t[$n];for(var n=Yn(t),r=0;r<n.length;r++){var i=n[r],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function mn(e,t){return void 0===t&&(t=!1),bn(e)||on(e)||!an(e)||(sn(e)>1&&(e.set=e.add=e.clear=e.delete=yn),Object.freeze(e),t&&un(e,(function(e,t){return mn(t,!0)}),!0)),e}function yn(){rn(2)}function bn(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function wn(e){var t=Xn[e];return t||rn(18,e),t}function xn(e,t){Xn[e]||(Xn[e]=t)}function kn(){return Un}function Sn(e,t){t&&(wn("Patches"),e.u=[],e.s=[],e.v=t)}function _n(e){En(e),e.p.forEach(In),e.p=null}function En(e){e===Un&&(Un=e.l)}function Cn(e){return Un={p:[],l:Un,h:e,m:!0,_:0}}function In(e){var t=e[$n];0===t.i||1===t.i?t.j():t.O=!0}function On(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.g||wn("ES5").S(t,e,r),r?(n[$n].P&&(_n(t),rn(4)),an(e)&&(e=An(t,e),t.l||Pn(t,e)),t.u&&wn("Patches").M(n[$n].t,e,t.u,t.s)):e=An(t,n,[]),_n(t),t.u&&t.v(t.u,t.s),e!==Kn?e:void 0}function An(e,t,n){if(bn(t))return t;var r=t[$n];if(!r)return un(t,(function(i,o){return Dn(e,r,t,i,o,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return Pn(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=gn(r.k):r.o;un(3===r.i?new Set(i):i,(function(t,o){return Dn(e,r,i,t,o,n)})),Pn(e,i,!1),n&&e.u&&wn("Patches").R(r,n,e.u,e.s)}return r.o}function Dn(e,t,n,r,i,o){if(on(i)){var a=An(e,i,o&&t&&3!==t.i&&!cn(t.D,r)?o.concat(r):void 0);if(fn(n,r,a),!on(a))return;e.m=!1}if(an(i)&&!bn(i)){if(!e.h.F&&e._<1)return;An(e,i),t&&t.A.l||Pn(e,i)}}function Pn(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&mn(t,n)}function Tn(e,t){var n=e[$n];return(n?vn(n):e)[t]}function Nn(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Mn(e){e.P||(e.P=!0,e.l&&Mn(e.l))}function Rn(e){e.o||(e.o=gn(e.t))}function Ln(e,t,n){var r=pn(t)?wn("MapSet").N(t,n):hn(t)?wn("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:kn(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=r,o=Qn;n&&(i=[r],o=er);var a=Proxy.revocable(i,o),u=a.revoke,s=a.proxy;return r.k=s,r.j=u,s}(t,n):wn("ES5").J(t,n);return(n?n.A:kn()).p.push(r),r}function jn(e){return on(e)||rn(22,e),function e(t){if(!an(t))return t;var n,r=t[$n],i=sn(t);if(r){if(!r.P&&(r.i<4||!wn("ES5").K(r)))return r.t;r.I=!0,n=Fn(t,i),r.I=!1}else n=Fn(t,i);return un(n,(function(t,i){r&&ln(r.t,t)===i||fn(n,t,e(i))})),3===i?new Set(n):n}(e)}function Fn(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return gn(e)}function Bn(){function e(e,t){var n=i[e];return n?n.enumerable=t:i[e]=n={configurable:!0,enumerable:t,get:function(){var t=this[$n];return Qn.get(t,e)},set:function(t){var n=this[$n];Qn.set(n,e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var i=e[t][$n];if(!i.P)switch(i.i){case 5:r(i)&&Mn(i);break;case 4:n(i)&&Mn(i)}}}function n(e){for(var t=e.t,n=e.k,r=Yn(n),i=r.length-1;i>=0;i--){var o=r[i];if(o!==$n){var a=t[o];if(void 0===a&&!cn(t,o))return!0;var u=n[o],s=u&&u[$n];if(s?s.t!==a:!dn(u,a))return!0}}var c=!!t[$n];return r.length!==Yn(t).length+(c?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;r<t.length;r++)if(!t.hasOwnProperty(r))return!0;return!1}var i={};xn("ES5",{J:function(t,n){var r=Array.isArray(t),i=function(t,n){if(t){for(var r=Array(n.length),i=0;i<n.length;i++)Object.defineProperty(r,""+i,e(i,!0));return r}var o=Zn(n);delete o[$n];for(var a=Yn(o),u=0;u<a.length;u++){var s=a[u];o[s]=e(s,t||!!o[s].enumerable)}return Object.create(Object.getPrototypeOf(n),o)}(r,t),o={i:r?5:4,A:n?n.A:kn(),P:!1,I:!1,D:{},l:n,t:t,k:i,o:null,O:!1,C:!1};return Object.defineProperty(i,$n,{value:o,writable:!0}),i},S:function(e,n,i){i?on(n)&&n[$n].A===e&&t(e.p):(e.u&&function e(t){if(t&&"object"==typeof t){var n=t[$n];if(n){var i=n.t,o=n.k,a=n.D,u=n.i;if(4===u)un(o,(function(t){t!==$n&&(void 0!==i[t]||cn(i,t)?a[t]||e(o[t]):(a[t]=!0,Mn(n)))})),un(i,(function(e){void 0!==o[e]||cn(o,e)||(a[e]=!1,Mn(n))}));else if(5===u){if(r(n)&&(Mn(n),a.length=!0),o.length<i.length)for(var s=o.length;s<i.length;s++)a[s]=!1;else for(var c=i.length;c<o.length;c++)a[c]=!0;for(var l=Math.min(o.length,i.length),f=0;f<l;f++)o.hasOwnProperty(f)||(a[f]=!0),void 0===a[f]&&e(o[f])}}}}(e.p[0]),t(e.p))},K:function(e){return 4===e.i?n(e):r(e)}})}var zn,Un,Hn="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Wn="undefined"!=typeof Map,Vn="undefined"!=typeof Set,Gn="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Kn=Hn?Symbol.for("immer-nothing"):((zn={})["immer-nothing"]=!0,zn),qn=Hn?Symbol.for("immer-draftable"):"__$immer_draftable",$n=Hn?Symbol.for("immer-state"):"__$immer_state",Jn=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),Yn="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Zn=Object.getOwnPropertyDescriptors||function(e){var t={};return Yn(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},Xn={},Qn={get:function(e,t){if(t===$n)return e;var n=vn(e);if(!cn(n,t))return function(e,t,n){var r,i=Nn(t,n);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!an(r)?r:r===Tn(e.t,t)?(Rn(e),e.o[t]=Ln(e.A.h,r,e)):r},has:function(e,t){return t in vn(e)},ownKeys:function(e){return Reflect.ownKeys(vn(e))},set:function(e,t,n){var r=Nn(vn(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=Tn(vn(e),t),o=null==i?void 0:i[$n];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(dn(n,i)&&(void 0!==n||cn(e.t,t)))return!0;Rn(e),Mn(e)}return e.o[t]===n&&"number"!=typeof n&&(void 0!==n||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==Tn(e.t,t)||t in e.t?(e.D[t]=!1,Rn(e),Mn(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=vn(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){rn(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){rn(12)}},er={};un(Qn,(function(e,t){er[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),er.deleteProperty=function(e,t){return er.set.call(this,e,t,void 0)},er.set=function(e,t,n){return Qn.set.call(this,e[0],t,n,e[0])};var tr=function(){function e(e){var t=this;this.g=Gn,this.F=!0,this.produce=function(e,n,r){if("function"==typeof e&&"function"!=typeof n){var i=n;n=e;var o=t;return function(e){var t=this;void 0===e&&(e=i);for(var r=arguments.length,a=Array(r>1?r-1:0),u=1;u<r;u++)a[u-1]=arguments[u];return o.produce(e,(function(e){var r;return(r=n).call.apply(r,[t,e].concat(a))}))}}var a;if("function"!=typeof n&&rn(6),void 0!==r&&"function"!=typeof r&&rn(7),an(e)){var u=Cn(t),s=Ln(t,e,void 0),c=!0;try{a=n(s),c=!1}finally{c?_n(u):En(u)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(e){return Sn(u,r),On(e,u)}),(function(e){throw _n(u),e})):(Sn(u,r),On(a,u))}if(!e||"object"!=typeof e){if(void 0===(a=n(e))&&(a=e),a===Kn&&(a=void 0),t.F&&mn(a,!0),r){var l=[],f=[];wn("Patches").M(e,a,l,f),r(l,f)}return a}rn(21,e)},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(i))}))};var r,i,o=t.produce(e,n,(function(e,t){r=e,i=t}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(e){return[e,r,i]})):[o,r,i]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){an(e)||rn(8),on(e)&&(e=jn(e));var t=Cn(this),n=Ln(this,e,void 0);return n[$n].C=!0,En(t),n},t.finishDraft=function(e,t){var n=(e&&e[$n]).A;return Sn(n,t),On(void 0,n)},t.setAutoFreeze=function(e){this.F=e},t.setUseProxies=function(e){e&&!Gn&&rn(20),this.g=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var i=wn("Patches").$;return on(e)?i(e,t):this.produce(e,(function(e){return i(e,t)}))},e}(),nr=new tr,rr=nr.produce,ir=(nr.produceWithPatches.bind(nr),nr.setAutoFreeze.bind(nr),nr.setUseProxies.bind(nr),nr.applyPatches.bind(nr),nr.createDraft.bind(nr),nr.finishDraft.bind(nr),rr);function or(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ar(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ur(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ar(Object(n),!0).forEach((function(t){or(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ar(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function sr(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var cr="function"===typeof Symbol&&Symbol.observable||"@@observable",lr=function(){return Math.random().toString(36).substring(7).split("").join(".")},fr={INIT:"@@redux/INIT"+lr(),REPLACE:"@@redux/REPLACE"+lr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+lr()}};function dr(e){if("object"!==typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function pr(e,t,n){var r;if("function"===typeof t&&"function"===typeof n||"function"===typeof n&&"function"===typeof arguments[3])throw new Error(sr(0));if("function"===typeof t&&"undefined"===typeof n&&(n=t,t=void 0),"undefined"!==typeof n){if("function"!==typeof n)throw new Error(sr(1));return n(pr)(e,t)}if("function"!==typeof e)throw new Error(sr(2));var i=e,o=t,a=[],u=a,s=!1;function c(){u===a&&(u=a.slice())}function l(){if(s)throw new Error(sr(3));return o}function f(e){if("function"!==typeof e)throw new Error(sr(4));if(s)throw new Error(sr(5));var t=!0;return c(),u.push(e),function(){if(t){if(s)throw new Error(sr(6));t=!1,c();var n=u.indexOf(e);u.splice(n,1),a=null}}}function d(e){if(!dr(e))throw new Error(sr(7));if("undefined"===typeof e.type)throw new Error(sr(8));if(s)throw new Error(sr(9));try{s=!0,o=i(o,e)}finally{s=!1}for(var t=a=u,n=0;n<t.length;n++){(0,t[n])()}return e}function p(e){if("function"!==typeof e)throw new Error(sr(10));i=e,d({type:fr.REPLACE})}function h(){var e,t=f;return(e={subscribe:function(e){if("object"!==typeof e||null===e)throw new Error(sr(11));function n(){e.next&&e.next(l())}return n(),{unsubscribe:t(n)}}})[cr]=function(){return this},e}return d({type:fr.INIT}),(r={dispatch:d,subscribe:f,getState:l,replaceReducer:p})[cr]=h,r}function hr(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];0,"function"===typeof e[i]&&(n[i]=e[i])}var o,a=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if("undefined"===typeof n(void 0,{type:fr.INIT}))throw new Error(sr(12));if("undefined"===typeof n(void 0,{type:fr.PROBE_UNKNOWN_ACTION()}))throw new Error(sr(13))}))}(n)}catch(u){o=u}return function(e,t){if(void 0===e&&(e={}),o)throw o;for(var r=!1,i={},u=0;u<a.length;u++){var s=a[u],c=n[s],l=e[s],f=c(l,t);if("undefined"===typeof f){t&&t.type;throw new Error(sr(14))}i[s]=f,r=r||f!==l}return(r=r||a.length!==Object.keys(e).length)?i:e}}function vr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function gr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(sr(15))},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},o=t.map((function(e){return e(i)}));return r=vr.apply(void 0,o)(n.dispatch),ur(ur({},n),{},{dispatch:r})}}}function mr(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(i){return"function"===typeof i?i(n,r,e):t(i)}}}}var yr=mr();yr.withExtraArgument=mr;var br=yr,wr=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xr=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(u){o=[6,u],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},kr=function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},Sr=Object.defineProperty,_r=(Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols),Er=Object.prototype.hasOwnProperty,Cr=Object.prototype.propertyIsEnumerable,Ir=function(e,t,n){return t in e?Sr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Or=function(e,t){for(var n in t||(t={}))Er.call(t,n)&&Ir(e,n,t[n]);if(_r)for(var r=0,i=_r(t);r<i.length;r++){n=i[r];Cr.call(t,n)&&Ir(e,n,t[n])}return e},Ar=function(e,t,n){return new Promise((function(r,i){var o=function(e){try{u(n.next(e))}catch(t){i(t)}},a=function(e){try{u(n.throw(e))}catch(t){i(t)}},u=function(e){return e.done?r(e.value):Promise.resolve(e.value).then(o,a)};u((n=n.apply(e,t)).next())}))},Dr="undefined"!==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"===typeof arguments[0]?vr:vr.apply(null,arguments)};"undefined"!==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function Pr(e){if("object"!==typeof e||null===e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return t===n}var Tr=function(e){function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e.apply(this,n)||this;return Object.setPrototypeOf(i,t.prototype),i}return wr(t,e),Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.prototype.concat.apply(this,t)},t.prototype.prepend=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return 1===e.length&&Array.isArray(e[0])?new(t.bind.apply(t,kr([void 0],e[0].concat(this)))):new(t.bind.apply(t,kr([void 0],e.concat(this))))},t}(Array);function Nr(){return function(e){return function(e){void 0===e&&(e={});var t=e.thunk,n=void 0===t||t,r=(e.immutableCheck,e.serializableCheck,new Tr);n&&(!function(e){return"boolean"===typeof e}(n)?r.push(br.withExtraArgument(n.extraArgument)):r.push(br));0;return r}(e)}}function Mr(e,t){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return Or(Or({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:n[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(t){return t.type===e},n}function Rr(e){var t,n={},r=[],i={addCase:function(e,t){var r="string"===typeof e?e:e.type;if(r in n)throw new Error("addCase cannot be called with two reducers for the same action type");return n[r]=t,i},addMatcher:function(e,t){return r.push({matcher:e,reducer:t}),i},addDefaultCase:function(e){return t=e,i}};return e(i),[n,r,t]}function Lr(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");var n,r="function"==typeof e.initialState?e.initialState:ir(e.initialState,(function(){})),i=e.reducers||{},o=Object.keys(i),a={},u={},s={};function c(){var t="function"===typeof e.extraReducers?Rr(e.extraReducers):[e.extraReducers],n=t[0],i=void 0===n?{}:n,o=t[1],a=void 0===o?[]:o,s=t[2],c=void 0===s?void 0:s,l=Or(Or({},i),u);return function(e,t,n,r){void 0===n&&(n=[]);var i,o="function"===typeof t?Rr(t):[t,n,r],a=o[0],u=o[1],s=o[2];if(function(e){return"function"===typeof e}(e))i=function(){return ir(e(),(function(){}))};else{var c=ir(e,(function(){}));i=function(){return c}}function l(e,t){void 0===e&&(e=i());var n=kr([a[t.type]],u.filter((function(e){return(0,e.matcher)(t)})).map((function(e){return e.reducer})));return 0===n.filter((function(e){return!!e})).length&&(n=[s]),n.reduce((function(e,n){if(n){var r;if(on(e))return"undefined"===typeof(r=n(e,t))?e:r;if(an(e))return ir(e,(function(e){return n(e,t)}));if("undefined"===typeof(r=n(e,t))){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}return e}),e)}return l.getInitialState=i,l}(r,l,a,c)}return o.forEach((function(e){var n,r,o=i[e],c=t+"/"+e;"reducer"in o?(n=o.reducer,r=o.prepare):n=o,a[e]=n,u[c]=n,s[e]=r?Mr(c,r):Mr(c)})),{name:t,reducer:function(e,t){return n||(n=c()),n(e,t)},actions:s,caseReducers:a,getInitialState:function(){return n||(n=c()),n.getInitialState()}}}var jr=function(e){void 0===e&&(e=21);for(var t="",n=e;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t};var Fr=function(e,t){return function(e){return e&&"function"===typeof e.match}(e)?e.match(t):e(t)};function Br(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.some((function(e){return Fr(e,t)}))}}var zr=function(e,t){if("function"!==typeof e)throw new TypeError(t+" is not a function")},Ur=function(){},Hr=function(e,t){return void 0===t&&(t=Ur),e.catch(t),e},Wr=function(e,t){e.addEventListener("abort",t,{once:!0})},Vr=function(e,t){var n=e.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},Gr="listener-cancelled",Kr=function(e){this.code=e,this.name="TaskAbortError",this.message="task cancelled (reason: "+e+")"},qr=function(e){if(e.aborted)throw new Kr(e.reason)},$r=function(e){return Hr(new Promise((function(t,n){var r=function(){return n(new Kr(e.reason))};e.aborted?r():Wr(e,r)})))},Jr=function(e){return function(t){return Hr(Promise.race([$r(e),t]).then((function(t){return qr(e),t})))}},Yr=function(e){var t=Jr(e);return function(e){return t(new Promise((function(t){return setTimeout(t,e)})))}},Zr=Object.assign,Xr={},Qr="listenerMiddleware",ei=function(e){return function(t){zr(t,"taskExecutor");var n,r=new AbortController;n=r,Wr(e,(function(){return Vr(n,e.reason)}));var i,o,a=(i=function(){return Ar(void 0,null,(function(){var n;return xr(this,(function(i){switch(i.label){case 0:return qr(e),qr(r.signal),[4,t({pause:Jr(r.signal),delay:Yr(r.signal),signal:r.signal})];case 1:return n=i.sent(),qr(r.signal),[2,n]}}))}))},o=function(){return Vr(r,"task-completed")},Ar(void 0,null,(function(){var e;return xr(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,4,5]),[4,Promise.resolve()];case 1:return t.sent(),[4,i()];case 2:return[2,{status:"ok",value:t.sent()}];case 3:return[2,{status:(e=t.sent())instanceof Kr?"cancelled":"rejected",error:e}];case 4:return null==o||o(),[7];case 5:return[2]}}))})));return{result:Jr(e)(a),cancel:function(){Vr(r,"task-cancelled")}}}},ti=function(e,t){return function(n,r){return Hr(function(n,r){return Ar(void 0,null,(function(){var i,o,a,u;return xr(this,(function(s){switch(s.label){case 0:qr(t),i=function(){},o=new Promise((function(t){i=e({predicate:n,effect:function(e,n){n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}})})),a=[$r(t),o],null!=r&&a.push(new Promise((function(e){return setTimeout(e,r,null)}))),s.label=1;case 1:return s.trys.push([1,,3,4]),[4,Promise.race(a)];case 2:return u=s.sent(),qr(t),[2,u];case 3:return i(),[7];case 4:return[2]}}))}))}(n,r))}},ni=function(e){var t=e.type,n=e.actionCreator,r=e.matcher,i=e.predicate,o=e.effect;if(t)i=Mr(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error("Creating or removing a listener requires one of the known fields for matching an action");return zr(o,"options.listener"),{predicate:i,type:t,effect:o}},ri=function(e,t,n){try{e(t,n)}catch(r){setTimeout((function(){throw r}),0)}},ii=Mr(Qr+"/add"),oi=Mr(Qr+"/removeAll"),ai=Mr(Qr+"/remove"),ui=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.error.apply(console,kr([Qr+"/error"],e))},si=function(e){e.pending.forEach((function(e){Vr(e,Gr)}))};Bn();var ci,li=Lr({name:"settings",initialState:{canEdit:!0,isRunningOnMobile:!1,spellCheckerEnabled:!0},reducers:{setCanEdit:function(e,t){e.canEdit=t.payload},setIsRunningOnMobile:function(e,t){e.isRunningOnMobile=t.payload},setSpellCheckerEnabled:function(e,t){e.spellCheckerEnabled=t.payload}}}),fi=li.actions,di=fi.setCanEdit,pi=fi.setIsRunningOnMobile,hi=fi.setSpellCheckerEnabled,vi=li.reducer;function gi(e){return function(e){if(Array.isArray(e))return rt(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||it(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.")}()}var mi=new Uint8Array(16);function yi(){if(!ci&&!(ci="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!==typeof msCrypto&&"function"===typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ci(mi)}var bi=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var wi=function(e){return"string"===typeof e&&bi.test(e)},xi=[],ki=0;ki<256;++ki)xi.push((ki+256).toString(16).substr(1));var Si=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(xi[e[t+0]]+xi[e[t+1]]+xi[e[t+2]]+xi[e[t+3]]+"-"+xi[e[t+4]]+xi[e[t+5]]+"-"+xi[e[t+6]]+xi[e[t+7]]+"-"+xi[e[t+8]]+xi[e[t+9]]+"-"+xi[e[t+10]]+xi[e[t+11]]+xi[e[t+12]]+xi[e[t+13]]+xi[e[t+14]]+xi[e[t+15]]).toLowerCase();if(!wi(n))throw TypeError("Stringified UUID is invalid");return n};var _i=function(e,t,n){var r=(e=e||{}).random||(e.rng||yi)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return Si(r)};function Ei(e,t,n){return function(e,t,n){var r=t<0?e.length+t:t;if(r>=0&&r<e.length){var i=n<0?e.length+n:n,o=ot(e.splice(t,1),1)[0];e.splice(i,0,o)}}(e=gi(e),t,n),e}function Ci(e,t){if(0===e||0===t)return 0;var n=Math.min(e,t),r=Math.max(e,t);return Number((n/r*100).toFixed(2))}function Ii(e){var t=e.filter((function(e){return!e.completed})),n=e.filter((function(e){return e.completed}));return{openTasks:t,completedTasks:n}}function Oi(e){var t=[];return e.forEach((function(e){t=t.concat(e.tasks)})),t}function Ai(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return e.length<=t?e:e.substring(0,t)+"..."}function Di(e){if(e){if(/^- \[[x ]\] .*/gim.test(e)){var t=e.split("\n"),n=[];if(t.filter((function(e){return e.replace(/ /g,"").length>0})).map((function(e){return function(e){var t=/^- \[x\] /i,n=e.replace("- [ ] ","").replace(t,"");if(0!==n.length)return{id:_i(),description:n,completed:t.test(e),createdAt:new Date}}(e)})).forEach((function(e){return e&&n.push(e)})),0!==n.length)return{name:"Checklist",tasks:n,sections:Ni}}}}function Pi(e){var t=e.value,n=e.defaultValue;return t?0===t.length?n:t:n}var Ti="1.0.0",Ni=[{id:"open-tasks",name:"Open"},{id:"completed-tasks",name:"Completed"}],Mi={schemaVersion:Ti,defaultSections:[],groups:[]},Ri=Lr({name:"tasks",initialState:Mi,reducers:{taskAdded:function(e,t){var n=t.payload,r=n.groupName,i=n.task,o=e.groups.find((function(e){return e.name===r}));o&&(delete o.draft,o.tasks.unshift(ur(ur({},i),{},{completed:!1,createdAt:new Date})))},taskModified:function(e,t){var n=t.payload,r=n.groupName,i=n.task,o=e.groups.find((function(e){return e.name===r}));if(o){var a=o.tasks.find((function(e){return e.id===i.id}));a&&(a.description=i.description,a.updatedAt=new Date)}},taskDeleted:function(e,t){var n=t.payload,r=n.id,i=n.groupName,o=e.groups.find((function(e){return e.name===i}));o&&(o.tasks=o.tasks.filter((function(e){return e.id!==r})))},taskToggled:function(e,t){var n=t.payload,r=n.id,i=n.groupName,o=e.groups.find((function(e){return e.name===i}));if(o){var a=o.tasks.find((function(e){return e.id===r}));if(a){a.completed=!a.completed,a.updatedAt=new Date,a.completed?a.completedAt=new Date:delete a.completedAt;var u=o.tasks.filter((function(e){return e.id!==r}));o.tasks=[a].concat(gi(u))}}},openAllCompleted:function(e,t){var n=t.payload.groupName,r=e.groups.find((function(e){return e.name===n}));r&&r.tasks.forEach((function(e){e.completed=!1,delete e.completedAt}))},deleteAllCompleted:function(e,t){var n=t.payload.groupName,r=e.groups.find((function(e){return e.name===n}));r&&(r.tasks=r.tasks.filter((function(e){return!1===e.completed})))},tasksReordered:function(e,t){var n=t.payload,r=n.groupName,i=n.swapTaskIndex,o=n.withTaskIndex;if(n.isSameSection){var a=e.groups.find((function(e){return e.name===r}));a&&(a.tasks=Ei(a.tasks,i,o))}},tasksGroupAdded:function(e,t){var n=t.payload.groupName;e.groups.find((function(e){return e.name===n}))||e.groups.push({name:n,tasks:[]})},tasksGroupReordered:function(e,t){var n=t.payload,r=n.swapGroupIndex,i=n.withGroupIndex;e.groups=Ei(e.groups,r,i)},tasksGroupDeleted:function(e,t){var n=t.payload.groupName;e.groups=e.groups.filter((function(e){return e.name!==n}))},tasksGroupMerged:function(e,t){var n,r=t.payload,i=r.groupName,o=r.mergeWith;if(i!==o){var a=e.groups.find((function(e){return e.name===i}));if(a){var u=e.groups.find((function(e){return e.name===o}));u&&(a.name=o,a.tasks=[].concat(gi(null!==(n=u.tasks)&&void 0!==n?n:[]),gi(a.tasks)),e.groups=e.groups.filter((function(e){return e!==u})))}}},tasksGroupRenamed:function(e,t){var n=t.payload,r=n.groupName,i=n.newName;if(r!==i){var o=e.groups.find((function(e){return e.name===r}));o&&(o.name=i)}},tasksGroupCollapsed:function(e,t){var n=t.payload,r=n.groupName,i=n.type,o=n.collapsed,a=e.groups.find((function(e){return e.name===r}));if(a)if("group"!==i){a.sections||(a.sections=e.defaultSections.map((function(e){return{id:e.id,name:e.name}})));var u=a.sections.find((function(e){return e.id===i}));u&&(u.collapsed=o)}else a.collapsed=o},tasksGroupDraft:function(e,t){var n=t.payload,r=n.groupName,i=n.draft,o=e.groups.find((function(e){return e.name===r}));o&&(o.draft=i)},tasksGroupLastActive:function(e,t){var n=t.payload.groupName,r=e.groups.find((function(e){return e.name===n}));r&&(r.lastActive=new Date)},tasksLegacyContentMigrated:function(e,t){var n=t.payload;e.legacyContent&&(n.continue?(e.initialized=!0,e.groups.push(e.legacyContent),delete e.lastError):(e.initialized=!1,e.groups=[],e.lastError="The legacy content migration has been canceled by the user. Please reload this note to try again or switch to the Basic Checklist editor."),delete e.legacyContent)},tasksLoaded:function(e,t){var n=t.payload;n||e.initialized||(n="{}");try{var r,i;if(!function(e){try{JSON.parse(e)}catch(t){return!1}return!0}(n)){var o=Di(n);if(o)return e.legacyContent=o,void(e.initialized=!1)}var a=JSON.parse(n),u={schemaVersion:null!==(r=null===a||void 0===a?void 0:a.schemaVersion)&&void 0!==r?r:Ti,defaultSections:Pi({value:null===a||void 0===a?void 0:a.defaultSections,defaultValue:Ni}),groups:null!==(i=null===a||void 0===a?void 0:a.groups)&&void 0!==i?i:[]};u!==Mi&&(e.schemaVersion=u.schemaVersion,e.groups=u.groups,e.defaultSections=u.defaultSections,e.initialized=!0,delete e.lastError)}catch(s){return e.initialized=!1,void(e.lastError="An error has occurred while parsing the note's content: ".concat(s))}}}}),Li=Ri.actions,ji=Li.taskAdded,Fi=Li.taskModified,Bi=Li.taskToggled,zi=Li.taskDeleted,Ui=Li.openAllCompleted,Hi=Li.deleteAllCompleted,Wi=Li.tasksLoaded,Vi=Li.tasksLegacyContentMigrated,Gi=Li.tasksGroupAdded,Ki=Li.tasksReordered,qi=Li.tasksGroupReordered,$i=Li.tasksGroupDeleted,Ji=Li.tasksGroupMerged,Yi=Li.tasksGroupRenamed,Zi=Li.tasksGroupCollapsed,Xi=Li.tasksGroupDraft,Qi=Li.tasksGroupLastActive,eo=Ri.reducer,to=function(e){var t=this;void 0===e&&(e={});var n=new Map,r=e.extra,i=e.onError,o=void 0===i?ui:i;zr(o,"onError");var a=function(e){for(var t=0,r=n.values();t<r.length;t++){var i=r[t];if(e(i))return i}},u=function(e){var t=a((function(t){return t.effect===e.effect}));return t||(t=function(e){var t=ni(e),n=t.type,r=t.predicate,i=t.effect;return{id:jr(),effect:i,type:n,predicate:r,pending:new Set,unsubscribe:function(){throw new Error("Unsubscribe not initialized")}}}(e)),function(e){return e.unsubscribe=function(){return n.delete(e.id)},n.set(e.id,e),function(t){e.unsubscribe(),(null==t?void 0:t.cancelActive)&&si(e)}}(t)},s=function(e){var t=ni(e),n=t.type,r=t.effect,i=t.predicate,o=a((function(e){return("string"===typeof n?e.type===n:e.predicate===i)&&e.effect===r}));return o&&(o.unsubscribe(),e.cancelActive&&si(o)),!!o},c=function(e,i,a,s){return Ar(t,null,(function(){var t,c,l;return xr(this,(function(f){switch(f.label){case 0:t=new AbortController,c=ti(u,t.signal),f.label=1;case 1:return f.trys.push([1,3,4,5]),e.pending.add(t),[4,Promise.resolve(e.effect(i,Zr({},a,{getOriginalState:s,condition:function(e,t){return c(e,t).then(Boolean)},take:c,delay:Yr(t.signal),pause:Jr(t.signal),extra:r,signal:t.signal,fork:ei(t.signal),unsubscribe:e.unsubscribe,subscribe:function(){n.set(e.id,e)},cancelActiveListeners:function(){e.pending.forEach((function(e,n,r){e!==t&&(Vr(e,Gr),r.delete(e))}))}})))];case 2:return f.sent(),[3,5];case 3:return(l=f.sent())instanceof Kr||ri(o,l,{raisedBy:"effect"}),[3,5];case 4:return Vr(t,"listener-completed"),e.pending.delete(t),[7];case 5:return[2]}}))}))},l=function(e){return function(){e.forEach(si),e.clear()}}(n);return{middleware:function(e){return function(t){return function(r){if(ii.match(r))return u(r.payload);if(!oi.match(r)){if(ai.match(r))return s(r.payload);var i,a=e.getState(),f=function(){if(a===Xr)throw new Error(Qr+": getOriginalState can only be called synchronously");return a};try{if(i=t(r),n.size>0)for(var d=e.getState(),p=Array.from(n.values()),h=0,v=p;h<v.length;h++){var g=v[h],m=!1;try{m=g.predicate(r,d,a)}catch(y){m=!1,ri(o,y,{raisedBy:"predicate"})}m&&c(g,r,e,f)}}finally{a=Xr}return i}l()}}},startListening:u,stopListening:s,clearListeners:l}}(),no=Br(ji,Fi,Bi,zi,Ui,Hi,Ki,Gi,$i,Ji,Zi);to.startListening({matcher:no,effect:function(e,t){var n=e.payload.groupName;t.dispatch(Qi({groupName:n}))}});var ro,io,oo=to.middleware,ao=function(e){var t,n=Nr(),r=e||{},i=r.reducer,o=void 0===i?void 0:i,a=r.middleware,u=void 0===a?n():a,s=r.devTools,c=void 0===s||s,l=r.preloadedState,f=void 0===l?void 0:l,d=r.enhancers,p=void 0===d?void 0:d;if("function"===typeof o)t=o;else{if(!Pr(o))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');t=hr(o)}var h=u;"function"===typeof h&&(h=h(n));var v=gr.apply(void 0,h),g=vr;c&&(g=Dr(Or({trace:!1},"object"===typeof c&&c)));var m=[v];return Array.isArray(p)?m=kr([v],p):"function"===typeof p&&(m=p(m)),pr(t,f,g.apply(void 0,m))}({reducer:{tasks:eo,settings:vi},middleware:function(e){return e().prepend(oo)}}),uo=n(184),so=(0,u.forwardRef)((function(e,t){var n=e.checked,r=e.disabled,i=e.testId,o=e.onChange,a=e.onClick;return(0,uo.jsxs)("label",{className:"checkbox-container",children:[(0,uo.jsx)("input",{className:"checkbox-state",type:"checkbox",checked:n,"data-testid":i,disabled:r,onChange:o,ref:t}),(0,uo.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"3 2 22 20",className:"checkbox-button",onClick:a,children:[(0,uo.jsx)("use",{xlinkHref:"#checkbox-square",className:"checkbox-square"}),(0,uo.jsx)("use",{xlinkHref:"#checkbox-mark",className:"checkbox-mark"}),(0,uo.jsx)("use",{xlinkHref:"#checkbox-circle",className:"checkbox-circle"})]})]})})),co=nt.circle(ro||(ro=i(["\n fill: none;\n stroke: var(--sn-stylekit-neutral-color);\n"]))),lo=nt.circle(io||(io=i(["\n fill: none;\n stroke: var(--sn-stylekit-info-color);\n transition: all 0.5s;\n"]))),fo=function(e){var t=e.size,n=e.percentage,r=ot((0,u.useState)(0),2),i=r[0],o=r[1];(0,u.useEffect)((function(){o(n)}),[n]);var a="0 0 ".concat(t," ").concat(t),s=.001*t*100+1,c=(t-s)/2,l=c*Math.PI*2,f=i*l/100;return(0,uo.jsxs)("svg",{height:t,viewBox:a,width:t,"data-testid":"circular-progress-bar",children:[(0,uo.jsx)(co,{cx:t/2,cy:t/2,r:c,strokeWidth:s}),(0,uo.jsx)(lo,{cx:t/2,cy:t/2,r:c,strokeWidth:s,transform:"rotate(-90 ".concat(t/2," ").concat(t/2,")"),strokeDasharray:"".concat(f," ").concat(l-f),strokeLinecap:"round",style:{transition:"all 0.5s"}})]})};function po(){return!("undefined"===typeof window||!window.document||!window.document.createElement)}var ho=po()?u.useLayoutEffect:u.useEffect;function vo(){var e=(0,u.useState)(Object.create(null))[1];return(0,u.useCallback)((function(){e(Object.create(null))}),[])}var go=function(e){var t=e.children,n=e.type,r=void 0===n?"reach-portal":n,i=e.containerRef,o=(0,u.useRef)(null),a=(0,u.useRef)(null),c=vo();return ho((function(){if(o.current){var e=o.current.ownerDocument,t=(null==i?void 0:i.current)||e.body;return a.current=null==e?void 0:e.createElement(r),t.appendChild(a.current),c(),function(){a.current&&t&&t.removeChild(a.current)}}}),[r,c,i]),a.current?(0,s.createPortal)(t,a.current):(0,u.createElement)("span",{ref:o})};function mo(e){return po()?e?e.ownerDocument:document:null}function yo(){}function bo(e){return!(!e||"[object Function]"!={}.toString.call(e))}function wo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xo(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return wo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wo(e,t):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[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.")}return(n=e[Symbol.iterator]()).next.bind(n)}function ko(e,t){if(null!=e)if(bo(e))e(t);else try{e.current=t}catch(n){throw new Error('Cannot assign value "'+t+'" to ref "'+e+'"')}}function So(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,u.useCallback)((function(e){for(var n,r=xo(t);!(n=r()).done;){ko(n.value,e)}}),t)}function _o(e,t){return function(n){if(e&&e(n),!n.defaultPrevented)return t(n)}}function Eo(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var Co="data-focus-lock",Io="data-focus-lock-disabled";function Oo(e,t){return function(e,t){var n=(0,u.useState)((function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}}))[0];return n.callback=t,n.facade}(t||null,(function(t){return e.forEach((function(e){return function(e,t){return"function"===typeof e?e(t):e&&(e.current=t),e}(e,t)}))}))}var Ao={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},Do=function(e){var t=e.children;return u.createElement(u.Fragment,null,u.createElement("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:Ao}),t,t&&u.createElement("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:Ao}))};Do.propTypes={},Do.defaultProps={children:null};var Po=function(){return Po=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Po.apply(this,arguments)};function To(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}Object.create;Object.create;function No(e){return e}function Mo(e,t){void 0===t&&(t=No);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter((function(e){return e!==i}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var o=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(o)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}};return i}function Ro(e,t){return void 0===t&&(t=No),Mo(e,t)}function Lo(e){void 0===e&&(e={});var t=Mo(null);return t.options=Po({async:!0,ssr:!1},e),t}var jo=Ro({},(function(e){return{target:e.target,currentTarget:e.currentTarget}})),Fo=Ro(),Bo=Ro(),zo=Lo({async:!0}),Uo=[],Ho=u.forwardRef((function(e,t){var n,r=u.useState(),i=r[0],o=r[1],a=u.useRef(),s=u.useRef(!1),c=u.useRef(null),l=e.children,f=e.disabled,d=e.noFocusGuards,p=e.persistentFocus,h=e.crossFrame,v=e.autoFocus,g=(e.allowTextSelection,e.group),m=e.className,y=e.whiteList,b=e.hasPositiveIndices,x=e.shards,k=void 0===x?Uo:x,S=e.as,_=void 0===S?"div":S,E=e.lockProps,C=void 0===E?{}:E,I=e.sideCar,O=e.returnFocus,A=e.focusOptions,D=e.onActivation,P=e.onDeactivation,T=u.useState({})[0],N=u.useCallback((function(){c.current=c.current||document&&document.activeElement,a.current&&D&&D(a.current),s.current=!0}),[D]),M=u.useCallback((function(){s.current=!1,P&&P(a.current)}),[P]);(0,u.useEffect)((function(){f||(c.current=null)}),[]);var R=u.useCallback((function(e){var t=c.current;if(t&&t.focus){var n="function"===typeof O?O(t):O;if(n){var r="object"===typeof n?n:void 0;c.current=null,e?Promise.resolve().then((function(){return t.focus(r)})):t.focus(r)}}}),[O]),L=u.useCallback((function(e){s.current&&jo.useMedium(e)}),[]),j=Fo.useMedium,F=u.useCallback((function(e){a.current!==e&&(a.current=e,o(e))}),[]);var B=w(((n={})[Io]=f&&"disabled",n[Co]=g,n),C),z=!0!==d,U=z&&"tail"!==d,H=Oo([t,F]);return u.createElement(u.Fragment,null,z&&[u.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:f?-1:0,style:Ao}),b?u.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:f?-1:1,style:Ao}):null],!f&&u.createElement(I,{id:T,sideCar:zo,observed:i,disabled:f,persistentFocus:p,crossFrame:h,autoFocus:v,whiteList:y,shards:k,onActivation:N,onDeactivation:M,returnFocus:R,focusOptions:A}),u.createElement(_,w({ref:H},B,{className:m,onBlur:j,onFocus:L}),l),U&&u.createElement("div",{"data-focus-guard":!0,tabIndex:f?-1:0,style:Ao}))}));Ho.propTypes={},Ho.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};var Wo=Ho;function Vo(e,t){return Vo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vo(e,t)}function Go(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Vo(e,t)}var Ko=function(e,t){return function(n){var r,i=[];function o(){r=e(i.map((function(e){return e.props}))),t(r)}var a=function(e){function t(){return e.apply(this,arguments)||this}Go(t,e),t.peek=function(){return r};var a=t.prototype;return a.componentDidMount=function(){i.push(this),o()},a.componentDidUpdate=function(){o()},a.componentWillUnmount=function(){var e=i.indexOf(this);i.splice(e,1),o()},a.render=function(){return u.createElement(n,this.props)},t}(u.PureComponent);return or(a,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(n)+")"),a}},qo=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},$o=function(e){return Array.isArray(e)?e:[e]},Jo=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},Yo=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},Zo=function(e,t){return!e||Yo(e)||!function(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(e,null);return!(!t||!t.getPropertyValue)&&("none"===t.getPropertyValue("display")||"hidden"===t.getPropertyValue("visibility"))}(e)&&t(Jo(e))},Xo=function e(t,n){var r=t.get(n);if(void 0!==r)return r;var i=Zo(n,e.bind(void 0,t));return t.set(n,i),i},Qo=function e(t,n){var r=t.get(n);if(void 0!==r)return r;var i=function(e,t){return!(e&&!Yo(e))||!!ra(e)&&t(Jo(e))}(n,e.bind(void 0,t));return t.set(n,i),i},ea=function(e){return e.dataset},ta=function(e){return"INPUT"===e.tagName},na=function(e){return ta(e)&&"radio"===e.type},ra=function(e){var t=e.getAttribute("data-no-autofocus");return![!0,"true",""].includes(t)},ia=function(e){var t;return Boolean(e&&(null===(t=ea(e))||void 0===t?void 0:t.focusGuard))},oa=function(e){return!ia(e)},aa=function(e){return Boolean(e)},ua=function(e,t){var n=e.tabIndex-t.tabIndex,r=e.index-t.index;if(n){if(!e.tabIndex)return 1;if(!t.tabIndex)return-1}return n||r},sa=function(e,t,n){return qo(e).map((function(e,t){return{node:e,index:t,tabIndex:n&&-1===e.tabIndex?(e.dataset||{}).focusGuard?0:-1:e.tabIndex}})).filter((function(e){return!t||e.tabIndex>=0})).sort(ua)},ca=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"].join(","),la="".concat(ca,", [data-focus-guard]"),fa=function e(t,n){var r;return qo((null===(r=t.shadowRoot)||void 0===r?void 0:r.children)||t.children).reduce((function(t,r){return t.concat(r.matches(n?la:ca)?[r]:[],e(r))}),[])},da=function(e,t){return e.reduce((function(e,n){return e.concat(fa(n,t),n.parentNode?qo(n.parentNode.querySelectorAll(ca)).filter((function(e){return e===n})):[])}),[])},pa=function(e,t){return qo(e).filter((function(e){return Xo(t,e)})).filter((function(e){return function(e){return!((ta(e)||function(e){return"BUTTON"===e.tagName}(e))&&("hidden"===e.type||e.disabled))}(e)}))},ha=function(e,t){return void 0===t&&(t=new Map),qo(e).filter((function(e){return Qo(t,e)}))},va=function(e,t,n){return sa(pa(da(e,n),t),!0,n)},ga=function(e,t){return sa(pa(da(e),t),!1)},ma=function(e,t){return pa(function(e){var t=e.querySelectorAll("[".concat("data-autofocus-inside","]"));return qo(t).map((function(e){return da([e])})).reduce((function(e,t){return e.concat(t)}),[])}(e),t)},ya=function e(t,n){return t.shadowRoot?e(t.shadowRoot,n):!(void 0===Object.getPrototypeOf(t).contains||!Object.getPrototypeOf(t).contains.call(t,n))||qo(t.children).some((function(t){return e(t,n)}))},ba=function e(t){return t.activeElement?t.activeElement.shadowRoot?e(t.activeElement.shadowRoot):t.activeElement:void 0},wa=function(){return document.activeElement?document.activeElement.shadowRoot?ba(document.activeElement.shadowRoot):document.activeElement:void 0},xa=function e(t){return t.parentNode?e(t.parentNode):t},ka=function(e){return $o(e).filter(Boolean).reduce((function(e,t){var n=t.getAttribute(Co);return e.push.apply(e,n?function(e){for(var t=new Set,n=e.length,r=0;r<n;r+=1)for(var i=r+1;i<n;i+=1){var o=e[r].compareDocumentPosition(e[i]);(o&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter((function(e,n){return!t.has(n)}))}(qo(xa(t).querySelectorAll("[".concat(Co,'="').concat(n,'"]:not([').concat(Io,'="disabled"])')))):[t]),e}),[])},Sa=function(e){return Boolean(qo(e.querySelectorAll("iframe")).some((function(e){return e===document.activeElement})))},_a=function(e){var t=document&&wa();return!(!t||t.dataset&&t.dataset.focusGuard)&&ka(e).some((function(e){return ya(e,t)||Sa(e)}))},Ea=function(e,t){return na(e)&&e.name?function(e,t){return t.filter(na).filter((function(t){return t.name===e.name})).filter((function(e){return e.checked}))[0]||e}(e,t):e},Ca=function(e){return e[0]&&e.length>1?Ea(e[0],e):e[0]},Ia=function(e,t){return e.length>1?e.indexOf(Ea(e[t],e)):t},Oa="NEW_FOCUS",Aa=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],u=ia(n);if(!(n&&e.indexOf(n)>=0)){var s=void 0!==n?t.indexOf(n):-1,c=r?t.indexOf(r):s,l=r?e.indexOf(r):-1,f=s-c,d=t.indexOf(o),p=t.indexOf(a),h=function(e){var t=new Set;return e.forEach((function(n){return t.add(Ea(n,e))})),e.filter((function(e){return t.has(e)}))}(t),v=(void 0!==n?h.indexOf(n):-1)-(r?h.indexOf(r):s),g=Ia(e,0),m=Ia(e,i-1);return-1===s||-1===l?Oa:!f&&l>=0?l:s<=d&&u&&Math.abs(f)>1?m:s>=p&&u&&Math.abs(f)>1?g:f&&Math.abs(v)>1?l:s<=d?m:s>p?g:f?Math.abs(f)>1?l:(i+l+f)%i:void 0}},Da=function(e,t,n){var r,i=e.map((function(e){return e.node})),o=ha(i.filter((r=n,function(e){var t,n=null===(t=ea(e))||void 0===t?void 0:t.autofocus;return e.autofocus||void 0!==n&&"false"!==n||r.indexOf(e)>=0})));return o&&o.length?Ca(o):Ca(ha(t))},Pa=function e(t,n){return void 0===n&&(n=[]),n.push(t),t.parentNode&&e(t.parentNode.host||t.parentNode,n),n},Ta=function(e,t){for(var n=Pa(e),r=Pa(t),i=0;i<n.length;i+=1){var o=n[i];if(r.indexOf(o)>=0)return o}return!1},Na=function(e,t,n){var r=$o(e),i=$o(t),o=r[0],a=!1;return i.filter(Boolean).forEach((function(e){a=Ta(a||e,e)||a,n.filter(Boolean).forEach((function(e){var t=Ta(o,e);t&&(a=!a||ya(t,a)?t:Ta(t,a))}))})),a},Ma=function(e,t){return e.reduce((function(e,n){return e.concat(ma(n,t))}),[])},Ra=function(e,t){var n=document&&wa(),r=ka(e).filter(oa),i=Na(n||e,e,r),o=new Map,a=ga(r,o),u=va(r,o).filter((function(e){var t=e.node;return oa(t)}));if(u[0]||(u=a)[0]){var s=ga([i],o).map((function(e){return e.node})),c=function(e,t){var n=new Map;return t.forEach((function(e){return n.set(e.node,e)})),e.map((function(e){return n.get(e)})).filter(aa)}(s,u),l=c.map((function(e){return e.node})),f=Aa(l,s,n,t);return f===Oa?{node:Da(a,l,Ma(r,o))}:void 0===f?f:c[f]}},La=0,ja=!1,Fa=function(e,t,n){void 0===n&&(n={});var r,i,o=Ra(e,t);if(!ja&&o){if(La>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),ja=!0,void setTimeout((function(){ja=!1}),1);La++,r=o.node,i=n.focusOptions,"focus"in r&&r.focus(i),"contentWindow"in r&&r.contentWindow&&r.contentWindow.focus(),La--}},Ba=function(e){var t=ka(e).filter(oa),n=Na(e,e,t),r=new Map,i=va([n],r,!0),o=va(t,r).filter((function(e){var t=e.node;return oa(t)})).map((function(e){return e.node}));return i.map((function(e){var t=e.node;return{node:t,index:e.index,lockItem:o.indexOf(t)>=0,guard:ia(t)}}))};function za(e){var t=window.setImmediate;"undefined"!==typeof t?t(e):setTimeout(e,1)}var Ua=function(){return document&&document.activeElement===document.body||function(){var e=document&&wa();return!!e&&qo(document.querySelectorAll("[".concat("data-no-focus-lock","]"))).some((function(t){return ya(t,e)}))}()},Ha=null,Wa=null,Va=null,Ga=!1,Ka=function(){return!0};function qa(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else{if(!a.lockItem)break;if(o!==e)return;i=null}}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var $a=function(e){return e&&"current"in e?e.current:e},Ja=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},Ya=function(){var e,t=!1;if(Ha){var n=Ha,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,u=n.crossFrame,s=n.focusOptions,c=r||Va&&Va.portaledElement,l=document&&document.activeElement;if(c){var f=[c].concat(a.map($a).filter(Boolean));if(l&&!function(e){return(Ha.whiteList||Ka)(e)}(l)||(i||(u?Boolean(Ga):"meanwhile"===Ga)||!Ua()||!Wa&&o)&&(c&&!(_a(f)||l&&function(e,t){return t.some((function(t){return Ja(e,t,t)}))}(l,f)||(e=l,Va&&Va.portaledElement===e))&&(document&&!Wa&&l&&!o?(l.blur&&l.blur(),document.body.focus()):(t=Fa(f,Wa,{focusOptions:s}),Va={})),Ga=!1,Wa=document&&document.activeElement),document){var d=document&&document.activeElement,p=Ba(f),h=p.map((function(e){return e.node})).indexOf(d);h>-1&&(p.filter((function(e){var t=e.guard,n=e.node;return t&&n.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),qa(h,p.length,1,p),qa(h,-1,-1,p))}}}return t},Za=function(e){Ya()&&e&&(e.stopPropagation(),e.preventDefault())},Xa=function(){return za(Ya)},Qa=function(e){var t=e.target,n=e.currentTarget;n.contains(t)||(Va={observerNode:n,portaledElement:t})},eu=function(){Ga="just",setTimeout((function(){Ga="meanwhile"}),0)};jo.assignSyncMedium(Qa),Fo.assignMedium(Xa),Bo.assignMedium((function(e){return e({moveFocusInside:Fa,focusInside:_a})}));var tu=Ko((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var t=e.slice(-1)[0];t&&!Ha&&(document.addEventListener("focusin",Za),document.addEventListener("focusout",Xa),window.addEventListener("blur",eu));var n=Ha,r=n&&t&&t.id===n.id;Ha=t,n&&!r&&(n.onDeactivation(),e.filter((function(e){return e.id===n.id})).length||n.returnFocus(!t)),t?(Wa=null,r&&n.observed===t.observed||t.onActivation(),Ya(),za(Ya)):(document.removeEventListener("focusin",Za),document.removeEventListener("focusout",Xa),window.removeEventListener("blur",eu),Wa=null)}))((function(){return null})),nu=u.forwardRef((function(e,t){return u.createElement(Wo,w({sideCar:tu,ref:t},e))})),ru=Wo.propTypes||{};ru.sideCar,Eo(ru,["sideCar"]);nu.propTypes={};var iu=nu,ou="right-scroll-bar-position",au="width-before-scroll-bar",uu=Lo(),su=function(){},cu=u.forwardRef((function(e,t){var n=u.useRef(null),r=u.useState({onScrollCapture:su,onWheelCapture:su,onTouchMoveCapture:su}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,h=e.noIsolation,v=e.inert,g=e.allowPinchZoom,m=e.as,y=void 0===m?"div":m,b=To(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=p,x=Oo([n,t]),k=Po(Po({},b),i);return u.createElement(u.Fragment,null,f&&u.createElement(w,{sideCar:uu,removeScrollBar:l,shards:d,noIsolation:h,inert:v,setCallbacks:o,allowPinchZoom:!!g,lockRef:n}),a?u.cloneElement(u.Children.only(s),Po(Po({},k),{ref:x})):u.createElement(y,Po({},k,{className:c,ref:x}),s))}));cu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},cu.classNames={fullWidth:au,zeroRight:ou};var lu,fu=function(e){var t=e.sideCar,n=To(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return u.createElement(r,Po({},n))};fu.isSideCarExport=!0;function du(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=lu||n.nc;return t&&e.setAttribute("nonce",t),e}var pu=function(){var e=0,t=null;return{add:function(n){var r,i;0==e&&(t=du())&&(i=n,(r=t).styleSheet?r.styleSheet.cssText=i:r.appendChild(document.createTextNode(i)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){!--e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},hu=function(){var e=function(){var e=pu();return function(t,n){u.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])}}();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},vu={left:0,top:0,right:0,gap:0},gu=function(e){return parseInt(e||"",10)||0},mu=function(e){if(void 0===e&&(e="margin"),"undefined"===typeof window)return vu;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[gu(n),gu(r),gu(i)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},yu=hu(),bu=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,u=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(u,"px ").concat(r,";\n }\n body {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(i,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(u,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(ou," {\n right: ").concat(u,"px ").concat(r,";\n }\n \n .").concat(au," {\n margin-right: ").concat(u,"px ").concat(r,";\n }\n \n .").concat(ou," .").concat(ou," {\n right: 0 ").concat(r,";\n }\n \n .").concat(au," .").concat(au," {\n margin-right: 0 ").concat(r,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(u,"px;\n }\n")},wu=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=void 0===r?"margin":r,o=u.useMemo((function(){return mu(i)}),[i]);return u.createElement(yu,{styles:bu(o,!t,i,n?"":"!important")})},xu=!1;if("undefined"!==typeof window)try{var ku=Object.defineProperty({},"passive",{get:function(){return xu=!0,!0}});window.addEventListener("test",ku,ku),window.removeEventListener("test",ku,ku)}catch(Um){xu=!1}var Su=!!xu&&{passive:!1},_u=function(e,t){var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},Eu=function(e,t){var n=t;do{if("undefined"!==typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Cu(e,n)){var r=Iu(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Cu=function(e,t){return"v"===e?function(e){return _u(e,"overflowY")}(t):function(e){return _u(e,"overflowX")}(t)},Iu=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},Ou=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Au=function(e){return[e.deltaX,e.deltaY]},Du=function(e){return e&&"current"in e?e.current:e},Pu=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Tu=0,Nu=[];var Mu,Ru=(Mu=function(e){var t=u.useRef([]),n=u.useRef([0,0]),r=u.useRef(),i=u.useState(Tu++)[0],o=u.useState((function(){return hu()}))[0],a=u.useRef(e);u.useEffect((function(){a.current=e}),[e]),u.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(Du),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=u.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!a.current.allowPinchZoom;var i,o=Ou(e),u=n.current,s="deltaX"in e?e.deltaX:u[0]-o[0],c="deltaY"in e?e.deltaY:u[1]-o[1],l=e.target,f=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===f&&"range"===l.type)return!1;var d=Eu(f,l);if(!d)return!0;if(d?i=f:(i="v"===f?"h":"v",d=Eu(f,l)),!d)return!1;if(!r.current&&"changedTouches"in e&&(s||c)&&(r.current=i),!i)return!0;var p=r.current||i;return function(e,t,n,r,i){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=o*r,u=n.target,s=t.contains(u),c=!1,l=a>0,f=0,d=0;do{var p=Iu(e,u),h=p[0],v=p[1]-p[2]-o*h;(h||v)&&Cu(e,u)&&(f+=v,d+=h),u=u.parentNode}while(!s&&u!==document.body||s&&(t.contains(u)||t===u));return(l&&(i&&0===f||!i&&a>f)||!l&&(i&&0===d||!i&&-a>d))&&(c=!0),c}(p,t,e,"h"===p?s:c,!0)}),[]),c=u.useCallback((function(e){var n=e;if(Nu.length&&Nu[Nu.length-1]===o){var r="deltaY"in n?Au(n):Ou(n),i=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)}))[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var u=(a.current.shards||[]).map(Du).filter(Boolean).filter((function(e){return e.contains(n.target)}));(u.length>0?s(n,u[0]):!a.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),l=u.useCallback((function(e,n,r,i){var o={name:e,delta:n,target:r,should:i};t.current.push(o),setTimeout((function(){t.current=t.current.filter((function(e){return e!==o}))}),1)}),[]),f=u.useCallback((function(e){n.current=Ou(e),r.current=void 0}),[]),d=u.useCallback((function(t){l(t.type,Au(t),t.target,s(t,e.lockRef.current))}),[]),p=u.useCallback((function(t){l(t.type,Ou(t),t.target,s(t,e.lockRef.current))}),[]);u.useEffect((function(){return Nu.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Su),document.addEventListener("touchmove",c,Su),document.addEventListener("touchstart",f,Su),function(){Nu=Nu.filter((function(e){return e!==o})),document.removeEventListener("wheel",c,Su),document.removeEventListener("touchmove",c,Su),document.removeEventListener("touchstart",f,Su)}}),[]);var h=e.removeScrollBar,v=e.inert;return u.createElement(u.Fragment,null,v?u.createElement(o,{styles:Pu(i)}):null,h?u.createElement(wu,{gapMode:"margin"}):null)},uu.useMedium(Mu),fu),Lu=u.forwardRef((function(e,t){return u.createElement(cu,Po({},e,{ref:t,sideCar:Ru}))}));Lu.classNames=cu.classNames;var ju=Lu,Fu=n(7),Bu=n.n(Fu);function zu(){return zu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zu.apply(this,arguments)}function Uu(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var Hu=["as","isOpen"],Wu=["allowPinchZoom","as","dangerouslyBypassFocusLock","dangerouslyBypassScrollLock","initialFocusRef","onClick","onDismiss","onKeyDown","onMouseDown","unstable_lockFocusAcrossFrames"],Vu=["as","onClick","onKeyDown"],Gu=(Bu().bool,Bu().bool,Bu().bool,Bu().func,(0,u.forwardRef)((function(e,t){var n=e.as,r=void 0===n?"div":n,i=e.isOpen,o=void 0===i||i,a=Uu(e,Hu);return(0,u.useEffect)((function(){o?window.__REACH_DISABLE_TOOLTIPS=!0:window.requestAnimationFrame((function(){window.__REACH_DISABLE_TOOLTIPS=!1}))}),[o]),o?(0,u.createElement)(go,{"data-reach-dialog-wrapper":""},(0,u.createElement)(Ku,zu({ref:t,as:r},a))):null})));var Ku=(0,u.forwardRef)((function(e,t){var n=e.allowPinchZoom,r=e.as,i=void 0===r?"div":r,o=e.dangerouslyBypassFocusLock,a=void 0!==o&&o,s=e.dangerouslyBypassScrollLock,c=void 0!==s&&s,l=e.initialFocusRef,f=e.onClick,d=e.onDismiss,p=void 0===d?yo:d,h=e.onKeyDown,v=e.onMouseDown,g=e.unstable_lockFocusAcrossFrames,m=Uu(e,Wu);var y=(0,u.useRef)(null),b=(0,u.useRef)(null),w=So(b,t),x=(0,u.useCallback)((function(){l&&l.current&&l.current.focus()}),[l]);return(0,u.useEffect)((function(){return b.current?function(e){var t=[],n=[],r=mo(e);if(!e)return yo;return Array.prototype.forEach.call(r.querySelectorAll("body > *"),(function(r){var i,o;if(r!==(null==(i=e.parentNode)||null==(o=i.parentNode)?void 0:o.parentNode)){var a=r.getAttribute("aria-hidden");null!==a&&"false"!==a||(t.push(a),n.push(r),r.setAttribute("aria-hidden","true"))}})),function(){n.forEach((function(e,n){var r=t[n];null===r?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r)}))}}(b.current):void 0}),[]),(0,u.createElement)(iu,{autoFocus:!0,returnFocus:!0,onActivation:x,disabled:a,crossFrame:null==g||g},(0,u.createElement)(ju,{allowPinchZoom:n,enabled:!c},(0,u.createElement)(i,zu({},m,{ref:w,"data-reach-dialog-overlay":"",onClick:_o(f,(function(e){y.current===e.target&&(e.stopPropagation(),p(e))})),onKeyDown:_o(h,(function(e){"Escape"===e.key&&(e.stopPropagation(),p(e))})),onMouseDown:_o(v,(function(e){y.current=e.target}))}))))}));var qu=(0,u.forwardRef)((function(e,t){var n=e.as,r=void 0===n?"div":n,i=e.onClick;e.onKeyDown;var o=Uu(e,Vu);return(0,u.createElement)(r,zu({"aria-modal":"true",role:"dialog",tabIndex:-1},o,{ref:t,"data-reach-dialog-content":"",onClick:_o(i,(function(e){e.stopPropagation()}))}))}));var $u=!1,Ju=0,Yu=function(){return++Ju};function Zu(e){var t=e||($u?Yu():null),n=(0,u.useState)(t),r=n[0],i=n[1];return ho((function(){null===r&&i(Yu())}),[]),(0,u.useEffect)((function(){!1===$u&&($u=!0)}),[]),null!=r?String(r):void 0}function Xu(e,t){return(0,u.createContext)(t)}function Qu(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return null!=e})).join("--")}var es=n(176),ts=n.n(es);function ns(){return ns=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ns.apply(this,arguments)}function rs(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var is=["leastDestructiveRef"],os=["children"],as=["as"],us=["as"],ss=["id","isOpen","onDismiss","leastDestructiveRef"],cs=Xu(0,{}),ls=(0,u.forwardRef)((function(e,t){var n=e.leastDestructiveRef,r=rs(e,is),i=(0,u.useRef)(null),o=So(t,i),a=Zu(r.id),s=a?Qu("alert-dialog",a):void 0,c=a?Qu("alert-dialog-description",a):void 0;return(0,u.createElement)(cs.Provider,{value:{labelId:s,descriptionId:c,overlayRef:i,leastDestructiveRef:n}},(0,u.createElement)(Gu,ns({},r,{ref:o,"data-reach-alert-dialog-overlay":!0,initialFocusRef:n})))}));var fs=(0,u.forwardRef)((function(e,t){var n=e.children,r=rs(e,os),i=(0,u.useContext)(cs),o=i.descriptionId,a=i.labelId,s=i.leastDestructiveRef,c=i.overlayRef;return(0,u.useEffect)((function(){var e=mo(c.current);a&&(e.getElementById(a)||ts()(!1)),s||ts()(!1)}),[a,s]),(0,u.createElement)(qu,ns({role:"alertdialog","aria-describedby":o,"aria-labelledby":r["aria-label"]?void 0:a},r,{ref:t,"data-reach-alert-dialong-content":!0,"data-reach-alert-dialog-content":!0}),n)}));var ds=(0,u.forwardRef)((function(e,t){var n=e.as,r=void 0===n?"div":n,i=rs(e,as),o=(0,u.useContext)(cs).labelId;return(0,u.createElement)(r,ns({},i,{ref:t,id:o,"data-reach-alert-dialog-label":!0}))}));var ps=(0,u.forwardRef)((function(e,t){var n=e.as,r=void 0===n?"div":n,i=rs(e,us),o=(0,u.useContext)(cs).descriptionId;return(0,u.createElement)(r,ns({},i,{ref:t,id:o,"data-reach-alert-dialog-description":!0}))}));var hs=(0,u.forwardRef)((function(e,t){var n=e.id,r=e.isOpen,i=e.onDismiss,o=e.leastDestructiveRef,a=rs(e,ss);return(0,u.createElement)(ls,{isOpen:r,onDismiss:i,leastDestructiveRef:o,id:n},(0,u.createElement)(fs,ns({ref:t},a)))}));var vs,gs=n(516),ms=function(e){var t=e.testId,n=e.title,r=void 0===n?"":n,i=e.confirmButtonText,o=void 0===i?"Confirm":i,a=e.confirmButtonStyle,s=void 0===a?"info":a,c=e.confirmButtonCb,l=e.cancelButtonText,f=void 0===l?"Cancel":l,d=e.cancelButtonCb,p=e.children,h=(0,u.useRef)(null);return(0,uo.jsx)(hs,{"data-testid":t,onDismiss:d,leastDestructiveRef:h,children:(0,uo.jsx)("div",{className:"sk-modal-content",children:(0,uo.jsx)("div",{className:"sn-component",children:(0,uo.jsx)("div",{className:"sk-panel",children:(0,uo.jsx)("div",{className:"sk-panel-content",children:(0,uo.jsxs)("div",{className:"sk-panel-section",children:[(0,uo.jsx)(ds,{className:"sk-h3 sk-panel-section-title",dangerouslySetInnerHTML:{__html:(0,gs.sanitizeHtmlString)(r)}}),(0,uo.jsx)(ps,{className:"sk-panel-row",children:(0,uo.jsx)("p",{className:"color-foreground",children:p})}),(0,uo.jsxs)("div",{className:"flex my-1",children:[(0,uo.jsx)("button",{"data-testid":"cancel-dialog-button",className:"sn-button small neutral",onClick:d,ref:h,children:f}),(0,uo.jsx)("button",{"data-testid":"confirm-dialog-button",className:"sn-button small ml-2 ".concat(s),onClick:c,children:o})]})]})})})})})})},ys=nt.span(vs||(vs=i(["\n color: var(--sn-stylekit-paragraph-text-color);\n font-size: var(--sn-stylekit-font-size-p);\n margin: 0 10px;\n"])));function bs(e,t){if(null==e)return{};var n,r,i=Eo(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var ws,xs,ks,Ss,_s,Es,Cs,Is,Os,As,Ds,Ps,Ts,Ns,Ms,Rs,Ls=["children","highlight","crossed"],js=nt.h1(ws||(ws=i(["\n color: var(--sn-stylekit-editor-foreground-color);\n display: inline;\n font-size: 1.125rem !important;\n margin-right: 10px !important;\n text-decoration: ",";\n"])),(function(e){return e.crossed?"line-through":"none"})),Fs=function(e){var t=e.children,n=e.highlight,r=void 0!==n&&n,i=e.crossed,o=void 0!==i&&i,a=bs(e,Ls);return(0,uo.jsx)(js,ur(ur({className:"sk-h1 ".concat(r?"info":""),crossed:o},a),{},{children:t}))},Bs=function(e){var t=e.testId,n=e.onClick,r=e.children,i=e.size,o=void 0===i?"normal":i;return(0,uo.jsx)("button",{"data-testid":t,className:"sn-icon-button ".concat(o),onClick:n,children:r})},zs=nt.h3(xs||(xs=i(["\n color: var(--sn-stylekit-foreground-color);\n cursor: pointer;\n font-size: var(--sn-stylekit-font-size-h3);\n font-weight: 500;\n margin: 10px 0px;\n opacity: 0.55;\n\n &::first-letter {\n text-transform: capitalize;\n }\n"]))),Us=nt.textarea(ks||(ks=i(["\n background-color: transparent;\n border: none;\n color: inherit;\n font-size: 0.98rem;\n font-weight: 400;\n margin-left: 2px;\n outline: none;\n overflow: hidden;\n resize: none;\n width: 100%;\n"]))),Hs=(0,u.forwardRef)((function(e,t){var n=e.value,r=e.className,i=e.dir,o=void 0===i?"auto":i,a=e.disabled,u=e.spellCheck,s=e.testId,c=e.onChange,l=e.onKeyPress,f=e.onKeyUp;return(0,uo.jsx)(Us,{className:r,"data-testid":s,dir:o,disabled:a,onChange:c,onKeyPress:l,onKeyUp:f,ref:t,spellCheck:u,value:n})})),Ws=nt.input(Ss||(Ss=i(["\n background-color: unset;\n border: none;\n color: var(--sn-stylekit-foreground-color);\n font-size: ",";\n font-weight: ",";\n height: auto;\n margin: 6px 0 6px 0;\n outline: none;\n padding: 0;\n width: 100%;\n\n /* Remove default shadow for iOS mobile */\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n\n ::placeholder {\n color: var(--sn-stylekit-input-placeholder-color);\n }\n"])),(function(e){return"big"===e.textSize?"1.125rem":"var(--sn-stylekit-font-size-h3)"}),(function(e){return"big"===e.textSize?"500":"400"})),Vs=(0,u.forwardRef)((function(e,t){var n=e.value,r=e.autoFocus,i=e.dir,o=void 0===i?"auto":i,a=e.disabled,u=e.enterKeyHint,s=e.placeholder,c=e.spellCheck,l=e.testId,f=e.textSize,d=void 0===f?"normal":f,p=e.onBlur,h=e.onChange,v=e.onKeyPress;return(0,uo.jsx)(Ws,{type:"text",autoFocus:r,"data-testid":l,dir:o,disabled:a,enterKeyHint:u,onBlur:p,onChange:h,onKeyPress:v,placeholder:s,ref:t,spellCheck:c,textSize:d,value:n})})),Gs=nt.button(_s||(_s=i(["\n align-items: center;\n background-color: var(--sn-stylekit-background-color);\n border-radius: 8px;\n border: 1px solid var(--sn-stylekit-border-color);\n box-sizing: border-box;\n color: var(--sn-stylekit-paragraph-text-color);\n cursor: pointer;\n display: flex;\n height: 36px;\n justify-content: center;\n width: 100%;\n"]))),Ks=function(){return(0,uo.jsx)("svg",{className:"sn-icon small block",fill:"none",height:"14",viewBox:"0 0 14 14",width:"14",xmlns:"http://www.w3.org/2000/svg",children:(0,uo.jsx)("path",{d:"M14 7C14 7.55228 13.5523 8 13 8H8V13C8 13.5523 7.55228 14 7 14C6.44772 14 6 13.5523 6 13V8H1C0.447715 8 0 7.55228 0 7C0 6.44772 0.447715 6 1 6H6V1C6 0.447715 6.44772 0 7 0C7.55228 0 8 0.447715 8 1V6H13C13.5523 6 14 6.44772 14 7Z"})})},qs=function(){return(0,uo.jsx)("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"sn-icon block",children:(0,uo.jsx)("path",{d:"M6.17622 7.15015L10.0012 10.9751L13.8262 7.15015L15.0012 8.33348L10.0012 13.3335L5.00122 8.33348L6.17622 7.15015Z"})})},$s=function(){return(0,uo.jsx)("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"sn-icon block",children:(0,uo.jsx)("path",{d:"M13.826 13.3335L10.001 9.5085L6.17597 13.3335L5.00097 12.1502L10.001 7.15017L15.001 12.1502L13.826 13.3335Z"})})},Js=function(){return(0,uo.jsx)("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"sn-icon block",children:(0,uo.jsx)("path",{d:"M8 17L12 13H15.2C15.6 14.2 16.7 15 18 15C19.7 15 21 13.7 21 12C21 10.3 19.7 9 18 9C16.7 9 15.6 9.8 15.2 11H12L8 7V3H3V8H6L10.2 12L6 16H3V21H8V17Z"})})},Ys=nt((function(e){var t=Object.assign({},e);return(0,uo.jsx)("span",ur(ur({"aria-hidden":!0},t),{},{children:"\u2026"}))}))(Es||(Es=i(["\n font-weight: 800;\n height: 18px;\n line-height: 10px;\n"]))),Zs=function(){return(0,uo.jsx)("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"sn-icon block",children:(0,uo.jsx)("path",{d:"M11.7167 7.5L12.5 8.28333L4.93333 15.8333H4.16667V15.0667L11.7167 7.5ZM14.7167 2.5C14.5083 2.5 14.2917 2.58333 14.1333 2.74167L12.6083 4.26667L15.7333 7.39167L17.2583 5.86667C17.5833 5.54167 17.5833 5 17.2583 4.69167L15.3083 2.74167C15.1417 2.575 14.9333 2.5 14.7167 2.5ZM11.7167 5.15833L2.5 14.375V17.5H5.625L14.8417 8.28333L11.7167 5.15833Z"})})},Xs=function(){return(0,uo.jsx)("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"sn-icon block",children:(0,uo.jsx)("path",{d:"M7.49992 2.5V3.33333H3.33325V5H4.16659V15.8333C4.16659 16.2754 4.34218 16.6993 4.65474 17.0118C4.9673 17.3244 5.39122 17.5 5.83325 17.5H14.1666C14.6086 17.5 15.0325 17.3244 15.3451 17.0118C15.6577 16.6993 15.8333 16.2754 15.8333 15.8333V5H16.6666V3.33333H12.4999V2.5H7.49992ZM5.83325 5H14.1666V15.8333H5.83325V5ZM7.49992 6.66667V14.1667H9.16658V6.66667H7.49992ZM10.8333 6.66667V14.1667H12.4999V6.66667H10.8333Z"})})},Qs=function(e){var t=e.style;return(0,uo.jsx)("svg",{className:"fill-info-color",style:t,width:"157",height:"367",viewBox:"0 0 157 367",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,uo.jsx)("path",{d:"M99.0001 247.998L98.647 248.934L99.0001 247.998ZM24.5 132L25.2141 132.7L24.5 132ZM0.5 0L5.37125 10.4692L12.0022 1.01598L0.5 0ZM6.92587 6.02551C8.4365 7.25097 9.90374 8.51179 11.327 9.8054L12.6722 8.32536C11.2213 7.00667 9.72566 5.72144 8.18586 4.47231L6.92587 6.02551ZM15.508 13.8262C16.8709 15.213 18.1874 16.6313 19.4569 18.0783L20.9603 16.7594C19.6661 15.2841 18.3239 13.8381 16.9344 12.4243L15.508 13.8262ZM23.1595 22.549C24.3562 24.0807 25.5035 25.6394 26.6005 27.2222L28.2443 26.0828C27.1256 24.4688 25.9557 22.8795 24.7355 21.3176L23.1595 22.549ZM29.7675 32.0834C30.7805 33.7408 31.7408 35.4199 32.6478 37.1178L34.4118 36.1754C33.4866 34.4434 32.5071 32.7307 31.474 31.0404L29.7675 32.0834ZM35.229 42.3095C36.0427 44.0742 36.8004 45.8551 37.5014 47.6489L39.3642 46.9209C38.6488 45.0901 37.8755 43.2727 37.0453 41.472L35.229 42.3095ZM39.4487 53.1125C40.0447 54.9603 40.5813 56.8179 41.0577 58.6819L42.9954 58.1866C42.5087 56.2824 41.9607 54.3852 41.3521 52.4985L39.4487 53.1125ZM42.315 64.3374C42.6759 66.2444 42.9736 68.1544 43.2076 70.0638L45.1927 69.8205C44.9534 67.8677 44.649 65.9148 44.2802 63.9656L42.315 64.3374ZM43.72 75.8346C43.8262 77.7696 43.8658 79.7001 43.838 81.6224L45.8378 81.6513C45.8663 79.6823 45.8257 77.7055 45.717 75.725L43.72 75.8346ZM43.5481 87.4004C43.3815 89.3283 43.1449 91.2438 42.8374 93.1429L44.8117 93.4626C45.1272 91.5138 45.3699 89.5491 45.5407 87.5725L43.5481 87.4004ZM41.6958 98.8108C41.2422 100.686 40.7159 102.54 40.1162 104.37L42.0168 104.992C42.6331 103.112 43.1738 101.207 43.6397 99.2812L41.6958 98.8108ZM38.0959 109.781C37.3508 111.553 36.5318 113.296 35.6381 115.006L37.4108 115.932C38.3304 114.172 39.173 112.379 39.9394 110.557L38.0959 109.781ZM32.7511 120.008C31.7252 121.624 30.6262 123.205 29.4531 124.748L31.045 125.958C32.2524 124.371 33.3837 122.743 34.4396 121.08L32.7511 120.008ZM25.7707 129.19C25.127 129.903 24.4654 130.607 23.7859 131.3L25.2141 132.7C25.9129 131.987 26.5935 131.264 27.2557 130.529L25.7707 129.19ZM23.7859 131.3C23.046 132.055 22.3444 132.839 21.6813 133.652L23.231 134.916C23.8557 134.151 24.5168 133.411 25.2141 132.7L23.7859 131.3ZM18.1578 138.875C17.1527 140.7 16.3036 142.621 15.6128 144.626L17.5038 145.278C18.1582 143.378 18.9612 141.562 19.9097 139.84L18.1578 138.875ZM14.0481 150.705C13.6914 152.726 13.4758 154.809 13.4028 156.942L15.4017 157.011C15.4715 154.967 15.6778 152.978 16.0176 151.053L14.0481 150.705ZM13.585 163.182C13.7679 165.206 14.0703 167.265 14.4936 169.35L16.4536 168.952C16.0444 166.936 15.7529 164.95 15.5769 163.002L13.585 163.182ZM16.0352 175.382C16.6308 177.318 17.3275 179.271 18.1263 181.235L19.9788 180.481C19.2016 178.571 18.5247 176.673 17.9468 174.794L16.0352 175.382ZM20.6917 186.878C21.6019 188.689 22.5984 190.504 23.6822 192.319L25.3994 191.293C24.3398 189.519 23.3666 187.746 22.4787 185.98L20.6917 186.878ZM27.037 197.53C28.1854 199.191 29.408 200.849 30.7054 202.501L32.278 201.265C31.0054 199.645 29.807 198.02 28.6823 196.393L27.037 197.53ZM34.6618 207.248C36.0002 208.766 37.4036 210.274 38.8726 211.771L40.3002 210.371C38.8556 208.898 37.4763 207.416 36.1617 205.925L34.6618 207.248ZM43.3085 216.071C44.7959 217.443 46.3409 218.804 47.9437 220.15L49.2299 218.618C47.6506 217.292 46.129 215.952 44.6647 214.601L43.3085 216.071ZM52.7561 224.013C54.3617 225.245 56.0184 226.463 57.7266 227.665L58.8774 226.029C57.1915 224.843 55.5572 223.641 53.9738 222.426L52.7561 224.013ZM62.8386 231.112C64.5391 232.211 66.2854 233.294 68.078 234.36L69.1003 232.641C67.3288 231.588 65.6036 230.517 63.9242 229.432L62.8386 231.112ZM73.4332 237.416C75.2119 238.39 77.0321 239.348 78.8941 240.287L79.7949 238.501C77.9528 237.572 76.1525 236.625 74.3938 235.662L73.4332 237.416ZM84.4528 242.979C86.285 243.831 88.1546 244.665 90.0618 245.481L90.8487 243.643C88.9601 242.834 87.1092 242.008 85.2956 241.165L84.4528 242.979ZM95.746 247.816C96.7041 248.193 97.6711 248.566 98.647 248.934L99.3532 247.063C98.3862 246.698 97.428 246.328 96.4788 245.955L95.746 247.816ZM98.647 248.934C99.569 249.282 100.479 249.633 101.376 249.988L102.112 248.129C101.204 247.77 100.285 247.414 99.3532 247.063L98.647 248.934ZM106.705 252.201C108.507 252.985 110.255 253.786 111.948 254.602L112.816 252.8C111.099 251.973 109.328 251.162 107.504 250.367L106.705 252.201ZM117.086 257.212C118.821 258.141 120.491 259.088 122.097 260.052L123.126 258.337C121.491 257.356 119.793 256.393 118.031 255.449L117.086 257.212ZM126.949 263.145C128.575 264.248 130.125 265.37 131.601 266.512L132.825 264.931C131.315 263.762 129.731 262.615 128.071 261.49L126.949 263.145ZM136.004 270.174C137.46 271.478 138.826 272.804 140.105 274.152L141.556 272.775C140.238 271.387 138.833 270.023 137.339 268.684L136.004 270.174ZM143.856 278.48C145.057 280.005 146.156 281.555 147.154 283.129L148.843 282.058C147.807 280.425 146.669 278.82 145.427 277.243L143.856 278.48ZM149.937 288.094C150.78 289.817 151.513 291.566 152.14 293.34L154.026 292.675C153.373 290.827 152.61 289.006 151.733 287.215L149.937 288.094ZM153.714 298.803C154.131 300.648 154.441 302.519 154.647 304.415L156.635 304.199C156.422 302.229 156.099 300.283 155.665 298.362L153.714 298.803ZM154.953 310.107C154.955 311.983 154.861 313.882 154.674 315.802L156.664 315.996C156.858 314.013 156.955 312.05 156.953 310.106L154.953 310.107ZM153.863 321.471C153.518 323.312 153.092 325.172 152.587 327.048L154.518 327.568C155.036 325.644 155.474 323.734 155.829 321.839L153.863 321.471ZM150.903 332.531C150.291 334.311 149.61 336.104 148.864 337.911L150.712 338.675C151.473 336.833 152.168 335.001 152.794 333.182L150.903 332.531ZM146.519 343.175C145.708 344.875 144.842 346.585 143.92 348.305L145.682 349.25C146.618 347.504 147.5 345.765 148.325 344.036L146.519 343.175ZM141.091 353.325C140.128 354.954 139.118 356.59 138.062 358.235L139.744 359.316C140.814 357.651 141.837 355.993 142.812 354.342L141.091 353.325ZM134.858 363.039C134.311 363.83 133.754 364.623 133.186 365.418L134.814 366.58C135.387 365.777 135.951 364.976 136.504 364.175L134.858 363.039Z"})})},ec=nt.div(Cs||(Cs=i(["\n background-color: var(--sn-stylekit-background-color);\n border: 1px solid var(--sn-stylekit-border-color);\n border-radius: 8px;\n box-sizing: border-box;\n padding: 16px;\n width: 100%;\n"]))),tc=nt.div(Is||(Is=i(["\n display: flex;\n flex-direction: column;\n margin-top: 9px;\n position: relative;\n"]))),nc=nt.div(Os||(Os=i(["\n align-items: center;\n align-content: center;\n display: flex;\n flex-direction: column;\n position: absolute;\n width: 100%;\n z-index: 100;\n"]))),rc=nt.div(As||(As=i(["\n color: var(--sn-stylekit-paragraph-text-color);\n font-size: var(--sn-stylekit-font-size-h2);\n margin: 0;\n text-align: center;\n width: 194px;\n"]))),ic=nt.div(Ds||(Ds=i(["\n background-color: var(--sn-stylekit-border-color);\n border-radius: 8px;\n box-sizing: border-box;\n height: 66px;\n padding: 16px;\n margin-bottom: 9px;\n"]))),oc=nt(ic)(Ps||(Ps=i(["\n opacity: 0.8;\n"]))),ac=nt(ic)(Ts||(Ts=i(["\n opacity: 0.6;\n"]))),uc=nt(ic)(Ns||(Ns=i(["\n opacity: 0.4;\n"]))),sc=nt(ic)(Ms||(Ms=i(["\n opacity: 0.2;\n"]))),cc=function(){var e=(0,u.createRef)(),t=Qt(),n=ot((0,u.useState)(""),2),r=n[0],i=n[1],o=ot((0,u.useState)(!1),2),a=o[0],s=o[1],c=en((function(e){return e.settings.canEdit})),l=en((function(e){return e.settings.spellCheckerEnabled})),f=en((function(e){return e.tasks.groups})).length;return c?(0,uo.jsx)(uo.Fragment,{children:!a&&f>0?(0,uo.jsx)(Gs,{"data-testid":"create-group-button",onClick:function(){s(!a)},children:(0,uo.jsx)(Ks,{})}):(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsx)(ec,{children:(0,uo.jsx)(Vs,{testId:"create-group-input",value:r,enterKeyHint:"go",onBlur:function(e){s(!1),i("")},onChange:function(e){i(e.target.value)},onKeyPress:function(e){if("Enter"===e.key){var n=e.target.value;n.length>0&&t(Gi({groupName:n})),s(!1),i("")}},placeholder:"Name your task group and press enter",ref:e,spellCheck:l,textSize:"big",autoFocus:!0})}),0===f&&(0,uo.jsxs)(tc,{children:[(0,uo.jsxs)(nc,{children:[(0,uo.jsx)(Qs,{style:{marginRight:140,marginBottom:12}}),(0,uo.jsx)(rc,{children:"Get started by naming your first task group"})]}),(0,uo.jsx)(oc,{}),(0,uo.jsx)(ac,{}),(0,uo.jsx)(uc,{}),(0,uo.jsx)(sc,{})]})]})}):(0,uo.jsx)(uo.Fragment,{})},lc=nt.div(Rs||(Rs=i(["\n background-color: var(--sn-stylekit-background-color);\n border: 1px solid var(--sn-stylekit-border-color);\n border-radius: 8px;\n box-sizing: border-box;\n height: 100%;\n padding: 16px;\n margin-bottom: 9px;\n"]))),fc=function(){var e=en((function(e){return e.tasks.lastError}));return e?(0,uo.jsx)(lc,{children:e}):(0,uo.jsx)(uo.Fragment,{})},dc=function(){var e=(0,u.useRef)(null),t=Qt();return(0,uo.jsx)(hs,{"data-testid":"migrate-legacy-content-dialog",leastDestructiveRef:e,children:(0,uo.jsx)("div",{className:"sk-modal-content",children:(0,uo.jsx)("div",{className:"sn-component",children:(0,uo.jsx)("div",{className:"sk-panel",children:(0,uo.jsx)("div",{className:"sk-panel-content",children:(0,uo.jsxs)("div",{className:"sk-panel-section",children:[(0,uo.jsx)(ds,{className:"sk-h3 sk-panel-section-title",children:"Are you sure you want to migrate legacy content to the new format?"}),(0,uo.jsxs)("div",{className:"flex my-1",children:[(0,uo.jsx)("button",{className:"sn-button small neutral",onClick:function(){t(Vi({continue:!1}))},ref:e,children:"Cancel"}),(0,uo.jsx)("button",{className:"sn-button small ml-2 info",onClick:function(){t(Vi({continue:!0}))},children:"Migrate"})]})]})})})})})})},pc=function(e){var t=e.children;return(0,uo.jsx)("p",{className:"ml-2 w-full font-medium",children:t})},hc=function(e){var t=e.groups,n=t.length,r=t.slice(0,Math.min(n,3));if(0===r.length)return(0,uo.jsx)(uo.Fragment,{});var i=n-r.length,o=i>1?"groups":"group";return(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsx)("div",{className:"my-2",children:r.map((function(e,t){var n=e.tasks.length,r=e.tasks.filter((function(e){return!0===e.completed})).length;return(0,uo.jsxs)("p",{"data-testid":"group-summary",className:"mb-1",children:[Ai(e.name,30),(0,uo.jsxs)("span",{className:"px-2 neutral",children:[r,"/",n]})]},"group-".concat(e.name))}))}),i>0&&(0,uo.jsxs)("p",{"data-testid":"groups-remaining",children:["And ",i," other ",o]})]})},vc=function(e){var t=e.groupedTasks,n=Oi(t),r=Ii(n).completedTasks,i=Ci(n.length,r.length),o=10*Math.floor(i/10);return(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsxs)("div",{className:"flex flex-grow items-center mb-3",children:[(0,uo.jsxs)("svg",{"data-testid":"circular-progress-bar",className:"sk-circular-progress",viewBox:"0 0 18 18",children:[(0,uo.jsx)("circle",{className:"background"}),(0,uo.jsx)("circle",{className:"progress p-".concat(o)})]}),(0,uo.jsxs)(pc,{children:[r.length,"/",n.length," tasks completed"]})]}),(0,uo.jsx)(hc,{groups:t})]})};function gc(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var mc="function"===typeof Symbol&&Symbol.observable||"@@observable",yc=function(){return Math.random().toString(36).substring(7).split("").join(".")},bc={INIT:"@@redux/INIT"+yc(),REPLACE:"@@redux/REPLACE"+yc(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+yc()}};function wc(e){if("object"!==typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function xc(e,t,n){var r;if("function"===typeof t&&"function"===typeof n||"function"===typeof n&&"function"===typeof arguments[3])throw new Error(gc(0));if("function"===typeof t&&"undefined"===typeof n&&(n=t,t=void 0),"undefined"!==typeof n){if("function"!==typeof n)throw new Error(gc(1));return n(xc)(e,t)}if("function"!==typeof e)throw new Error(gc(2));var i=e,o=t,a=[],u=a,s=!1;function c(){u===a&&(u=a.slice())}function l(){if(s)throw new Error(gc(3));return o}function f(e){if("function"!==typeof e)throw new Error(gc(4));if(s)throw new Error(gc(5));var t=!0;return c(),u.push(e),function(){if(t){if(s)throw new Error(gc(6));t=!1,c();var n=u.indexOf(e);u.splice(n,1),a=null}}}function d(e){if(!wc(e))throw new Error(gc(7));if("undefined"===typeof e.type)throw new Error(gc(8));if(s)throw new Error(gc(9));try{s=!0,o=i(o,e)}finally{s=!1}for(var t=a=u,n=0;n<t.length;n++){(0,t[n])()}return e}function p(e){if("function"!==typeof e)throw new Error(gc(10));i=e,d({type:bc.REPLACE})}function h(){var e,t=f;return(e={subscribe:function(e){if("object"!==typeof e||null===e)throw new Error(gc(11));function n(){e.next&&e.next(l())}return n(),{unsubscribe:t(n)}}})[mc]=function(){return this},e}return d({type:bc.INIT}),(r={dispatch:d,subscribe:f,getState:l,replaceReducer:p})[mc]=h,r}function kc(e,t){return function(){return t(e.apply(this,arguments))}}function Sc(e,t){if("function"===typeof e)return kc(e,t);if("object"!==typeof e||null===e)throw new Error(gc(16));var n={};for(var r in e){var i=e[r];"function"===typeof i&&(n[r]=kc(i,t))}return n}function _c(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}var Ec=u.createContext(null);var Cc=function(e){e()};function Ic(){var e=Cc,t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,i=n={callback:e,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){r&&null!==t&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var Oc={notify:function(){},get:function(){return[]}};function Ac(e,t){var n,r=Oc;function i(){a.onStateChange&&a.onStateChange()}function o(){n||(n=t?t.addNestedSub(i):e.subscribe(i),r=Ic())}var a={addNestedSub:function(e){return o(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:i,isSubscribed:function(){return Boolean(n)},trySubscribe:o,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=Oc)},getListeners:function(){return r}};return a}var Dc="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?u.useLayoutEffect:u.useEffect;var Pc=function(e){var t=e.store,n=e.context,r=e.children,i=(0,u.useMemo)((function(){var e=Ac(t);return{store:t,subscription:e}}),[t]),o=(0,u.useMemo)((function(){return t.getState()}),[t]);Dc((function(){var e=i.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),o!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[i,o]);var a=n||Ec;return u.createElement(a.Provider,{value:i},r)},Tc=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],Nc=["reactReduxForwardedRef"],Mc=[],Rc=[null,null];function Lc(e,t){var n=e[1];return[t.payload,n+1]}function jc(e,t,n){Dc((function(){return e.apply(void 0,t)}),n)}function Fc(e,t,n,r,i,o,a){e.current=r,t.current=i,n.current=!1,o.current&&(o.current=null,a())}function Bc(e,t,n,r,i,o,a,u,s,c){if(e){var l=!1,f=null,d=function(){if(!l){var e,n,d=t.getState();try{e=r(d,i.current)}catch(p){n=p,f=p}n||(f=null),e===o.current?a.current||s():(o.current=e,u.current=e,a.current=!0,c({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=d,n.trySubscribe(),d();return function(){if(l=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}}var zc=function(){return[null,0]};function Uc(e,t){void 0===t&&(t={});var n=t,r=n.getDisplayName,i=void 0===r?function(e){return"ConnectAdvanced("+e+")"}:r,o=n.methodName,a=void 0===o?"connectAdvanced":o,s=n.renderCountProp,c=void 0===s?void 0:s,l=n.shouldHandleStateChanges,f=void 0===l||l,d=n.storeKey,p=void 0===d?"store":d,h=(n.withRef,n.forwardRef),v=void 0!==h&&h,g=n.context,m=void 0===g?Ec:g,x=Eo(n,Tc),k=m;return function(t){var n=t.displayName||t.name||"Component",r=i(n),o=w({},x,{getDisplayName:i,methodName:a,renderCountProp:c,shouldHandleStateChanges:f,storeKey:p,displayName:r,wrappedComponentName:n,WrappedComponent:t}),s=x.pure;var l=s?u.useMemo:function(e){return e()};function d(n){var r=(0,u.useMemo)((function(){var e=n.reactReduxForwardedRef,t=Eo(n,Nc);return[n.context,e,t]}),[n]),i=r[0],a=r[1],s=r[2],c=(0,u.useMemo)((function(){return i&&i.Consumer&&(0,b.isContextConsumer)(u.createElement(i.Consumer,null))?i:k}),[i,k]),d=(0,u.useContext)(c),p=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(d)&&Boolean(d.store);var h=p?n.store:d.store,v=(0,u.useMemo)((function(){return function(t){return e(t.dispatch,o)}(h)}),[h]),g=(0,u.useMemo)((function(){if(!f)return Rc;var e=Ac(h,p?null:d.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[h,p,d]),m=g[0],y=g[1],x=(0,u.useMemo)((function(){return p?d:w({},d,{subscription:m})}),[p,d,m]),S=(0,u.useReducer)(Lc,Mc,zc),_=S[0][0],E=S[1];if(_&&_.error)throw _.error;var C=(0,u.useRef)(),I=(0,u.useRef)(s),O=(0,u.useRef)(),A=(0,u.useRef)(!1),D=l((function(){return O.current&&s===I.current?O.current:v(h.getState(),s)}),[h,_,s]);jc(Fc,[I,C,A,s,D,O,y]),jc(Bc,[f,h,m,v,I,C,A,O,y,E],[h,m,v]);var P=(0,u.useMemo)((function(){return u.createElement(t,w({},D,{ref:a}))}),[a,t,D]);return(0,u.useMemo)((function(){return f?u.createElement(c.Provider,{value:x},P):P}),[c,P,x])}var h=s?u.memo(d):d;if(h.WrappedComponent=t,h.displayName=d.displayName=r,v){var g=u.forwardRef((function(e,t){return u.createElement(h,w({},e,{reactReduxForwardedRef:t}))}));return g.displayName=r,g.WrappedComponent=t,y()(g,t)}return y()(h,t)}}function Hc(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function Wc(e,t){if(Hc(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!Hc(e[n[i]],t[n[i]]))return!1;return!0}function Vc(e){return function(t,n){var r=e(t,n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function Gc(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function Kc(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=Gc(e);var i=r(t,n);return"function"===typeof i&&(r.mapToProps=i,r.dependsOnOwnProps=Gc(i),i=r(t,n)),i},r}}var qc=[function(e){return"function"===typeof e?Kc(e):void 0},function(e){return e?void 0:Vc((function(e){return{dispatch:e}}))},function(e){return e&&"object"===typeof e?Vc((function(t){return function(e,t){var n={},r=function(r){var i=e[r];"function"===typeof i&&(n[r]=function(){return t(i.apply(void 0,arguments))})};for(var i in e)r(i);return n}(e,t)})):void 0}];var $c=[function(e){return"function"===typeof e?Kc(e):void 0},function(e){return e?void 0:Vc((function(){return{}}))}];function Jc(e,t,n){return w({},n,e,t)}var Yc=[function(e){return"function"===typeof e?function(e){return function(t,n){n.displayName;var r,i=n.pure,o=n.areMergedPropsEqual,a=!1;return function(t,n,u){var s=e(t,n,u);return a?i&&o(s,r)||(r=s):(a=!0,r=s),r}}}(e):void 0},function(e){return e?void 0:function(){return Jc}}],Zc=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function Xc(e,t,n,r){return function(i,o){return n(e(i,o),t(r,o),o)}}function Qc(e,t,n,r,i){var o,a,u,s,c,l=i.areStatesEqual,f=i.areOwnPropsEqual,d=i.areStatePropsEqual,p=!1;function h(i,p){var h=!f(p,a),v=!l(i,o,p,a);return o=i,a=p,h&&v?(u=e(o,a),t.dependsOnOwnProps&&(s=t(r,a)),c=n(u,s,a)):h?(e.dependsOnOwnProps&&(u=e(o,a)),t.dependsOnOwnProps&&(s=t(r,a)),c=n(u,s,a)):v?function(){var t=e(o,a),r=!d(t,u);return u=t,r&&(c=n(u,s,a)),c}():c}return function(i,l){return p?h(i,l):(u=e(o=i,a=l),s=t(r,a),c=n(u,s,a),p=!0,c)}}function el(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,i=t.initMergeProps,o=Eo(t,Zc),a=n(e,o),u=r(e,o),s=i(e,o);return(o.pure?Qc:Xc)(a,u,s,e,o)}var tl=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function nl(e,t,n){for(var r=t.length-1;r>=0;r--){var i=t[r](e);if(i)return i}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function rl(e,t){return e===t}function il(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?Uc:n,i=t.mapStateToPropsFactories,o=void 0===i?$c:i,a=t.mapDispatchToPropsFactories,u=void 0===a?qc:a,s=t.mergePropsFactories,c=void 0===s?Yc:s,l=t.selectorFactory,f=void 0===l?el:l;return function(e,t,n,i){void 0===i&&(i={});var a=i,s=a.pure,l=void 0===s||s,d=a.areStatesEqual,p=void 0===d?rl:d,h=a.areOwnPropsEqual,v=void 0===h?Wc:h,g=a.areStatePropsEqual,m=void 0===g?Wc:g,y=a.areMergedPropsEqual,b=void 0===y?Wc:y,x=Eo(a,tl),k=nl(e,o,"mapStateToProps"),S=nl(t,u,"mapDispatchToProps"),_=nl(n,c,"mergeProps");return r(f,w({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:k,initMapDispatchToProps:S,initMergeProps:_,pure:l,areStatesEqual:p,areOwnPropsEqual:v,areStatePropsEqual:m,areMergedPropsEqual:b},x))}}var ol=il();function al(e,t){var n=(0,u.useState)((function(){return{inputs:t,result:e()}}))[0],r=(0,u.useRef)(!0),i=(0,u.useRef)(n),o=r.current||Boolean(t&&i.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,i.current.inputs))?i.current:{inputs:t,result:e()};return(0,u.useEffect)((function(){r.current=!1,i.current=o}),[o]),o.result}!function(e){Cc=e}(s.unstable_batchedUpdates);var ul=al,sl=function(e,t){return al((function(){return e}),t)},cl="Invariant failed";var ll=function(e){var t=e.top,n=e.right,r=e.bottom,i=e.left;return{top:t,right:n,bottom:r,left:i,width:n-i,height:r-t,x:i,y:t,center:{x:(n+i)/2,y:(r+t)/2}}},fl=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},dl=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},pl={top:0,right:0,bottom:0,left:0},hl=function(e){var t=e.borderBox,n=e.margin,r=void 0===n?pl:n,i=e.border,o=void 0===i?pl:i,a=e.padding,u=void 0===a?pl:a,s=ll(fl(t,r)),c=ll(dl(t,o)),l=ll(dl(c,u));return{marginBox:s,borderBox:ll(t),paddingBox:c,contentBox:l,margin:r,border:o,padding:u}},vl=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&function(e,t){if(!e)throw new Error(cl)}(!1),n},gl=function(e,t){var n,r,i=e.borderBox,o=e.border,a=e.margin,u=e.padding,s=(r=t,{top:(n=i).top+r.y,left:n.left+r.x,bottom:n.bottom+r.y,right:n.right+r.x});return hl({borderBox:s,border:o,margin:a,padding:u})},ml=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),gl(e,t)},yl=function(e,t){var n={top:vl(t.marginTop),right:vl(t.marginRight),bottom:vl(t.marginBottom),left:vl(t.marginLeft)},r={top:vl(t.paddingTop),right:vl(t.paddingRight),bottom:vl(t.paddingBottom),left:vl(t.paddingLeft)},i={top:vl(t.borderTopWidth),right:vl(t.borderRightWidth),bottom:vl(t.borderBottomWidth),left:vl(t.borderLeftWidth)};return hl({borderBox:e,margin:n,padding:r,border:i})},bl=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return yl(t,n)},wl=Number.isNaN||function(e){return"number"===typeof e&&e!==e};function xl(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],i=t[n],!(r===i||wl(r)&&wl(i)))return!1;var r,i;return!0}var kl=function(e,t){var n;void 0===t&&(t=xl);var r,i=[],o=!1;return function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return o&&n===this&&t(a,i)||(r=e.apply(this,a),o=!0,n=this,i=a),r}},Sl=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];t=i,n||(n=requestAnimationFrame((function(){n=null,e.apply(void 0,t)})))};return r.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},r};function _l(e,t){}_l.bind(null,"warn"),_l.bind(null,"error");function El(){}function Cl(e,t,n){var r=t.map((function(t){var r=function(e,t){return w({},e,{},t)}(n,t.options);return e.addEventListener(t.eventName,t.fn,r),function(){e.removeEventListener(t.eventName,t.fn,r)}}));return function(){r.forEach((function(e){e()}))}}var Il="Invariant failed";function Ol(e){this.message=e}function Al(e,t){if(!e)throw new Ol(Il)}Ol.prototype.toString=function(){return this.message};var Dl=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).callbacks=null,t.unbind=El,t.onWindowError=function(e){var n=t.getCallbacks();n.isDragging()&&n.tryAbort(),e.error instanceof Ol&&e.preventDefault()},t.getCallbacks=function(){if(!t.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return t.callbacks},t.setCallbacks=function(e){t.callbacks=e},t}Go(t,e);var n=t.prototype;return n.componentDidMount=function(){this.unbind=Cl(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(e){if(!(e instanceof Ol))throw e;this.setState({})},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(u.Component),Pl=function(e){return e+1},Tl=function(e,t){var n=e.droppableId===t.droppableId,r=Pl(e.index),i=Pl(t.index);return n?"\n You have moved the item from position "+r+"\n to position "+i+"\n ":"\n You have moved the item from position "+r+"\n in list "+e.droppableId+"\n to list "+t.droppableId+"\n in position "+i+"\n "},Nl=function(e,t,n){return t.droppableId===n.droppableId?"\n The item "+e+"\n has been combined with "+n.draggableId:"\n The item "+e+"\n in list "+t.droppableId+"\n has been combined with "+n.draggableId+"\n in list "+n.droppableId+"\n "},Ml=function(e){return"\n The item has returned to its starting position\n of "+Pl(e.index)+"\n"},Rl="\n Press space bar to start a drag.\n When dragging you can use the arrow keys to move the item around and escape to cancel.\n Some screen readers may require you to be in focus mode or to use your pass through key\n",Ll=function(e){return"\n You have lifted an item in position "+Pl(e.source.index)+"\n"},jl=function(e){var t=e.destination;if(t)return Tl(e.source,t);var n=e.combine;return n?Nl(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},Fl=function(e){if("CANCEL"===e.reason)return"\n Movement cancelled.\n "+Ml(e.source)+"\n ";var t=e.destination,n=e.combine;return t?"\n You have dropped the item.\n "+Tl(e.source,t)+"\n ":n?"\n You have dropped the item.\n "+Nl(e.draggableId,e.source,n)+"\n ":"\n The item has been dropped while not over a drop area.\n "+Ml(e.source)+"\n "},Bl={x:0,y:0},zl=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},Ul=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},Hl=function(e,t){return e.x===t.x&&e.y===t.y},Wl=function(e){return{x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}},Vl=function(e,t,n){var r;return void 0===n&&(n=0),(r={})[e]=t,r["x"===e?"y":"x"]=n,r},Gl=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},Kl=function(e,t){return Math.min.apply(Math,t.map((function(t){return Gl(e,t)})))},ql=function(e){return function(t){return{x:e(t.x),y:e(t.y)}}},$l=function(e,t){return{top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}},Jl=function(e){return[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}]},Yl=function(e,t){return t&&t.shouldClipSubject?function(e,t){var n=ll({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n}(t.pageMarginBox,e):ll(e)},Zl=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,i=e.frame,o=function(e,t){return t?$l(e,t.scroll.diff.displacement):e}(t.marginBox,i),a=function(e,t,n){var r;return n&&n.increasedBy?w({},e,((r={})[t.end]=e[t.end]+n.increasedBy[t.line],r)):e}(o,r,n);return{page:t,withPlaceholder:n,active:Yl(a,i)}},Xl=function(e,t){e.frame||Al(!1);var n=e.frame,r=Ul(t,n.scroll.initial),i=Wl(r),o=w({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}});return w({},e,{frame:o,subject:Zl({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o})})};function Ql(e){return Object.values?Object.values(e):Object.keys(e).map((function(t){return e[t]}))}function ef(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function tf(e,t){if(e.find)return e.find(t);var n=ef(e,t);return-1!==n?e[n]:void 0}function nf(e){return Array.prototype.slice.call(e)}var rf=kl((function(e){return e.reduce((function(e,t){return e[t.descriptor.id]=t,e}),{})})),of=kl((function(e){return e.reduce((function(e,t){return e[t.descriptor.id]=t,e}),{})})),af=kl((function(e){return Ql(e)})),uf=kl((function(e){return Ql(e)})),sf=kl((function(e,t){var n=uf(t).filter((function(t){return e===t.descriptor.droppableId})).sort((function(e,t){return e.descriptor.index-t.descriptor.index}));return n}));function cf(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function lf(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var ff=kl((function(e,t){return t.filter((function(t){return t.descriptor.id!==e.descriptor.id}))})),df=function(e,t){return e.descriptor.droppableId===t.descriptor.id},pf={point:Bl,value:0},hf={invisible:{},visible:{},all:[]},vf={displaced:hf,displacedBy:pf,at:null},gf=function(e,t){return function(n){return e<=n&&n<=t}},mf=function(e){var t=gf(e.top,e.bottom),n=gf(e.left,e.right);return function(r){if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;var i=t(r.top)||t(r.bottom),o=n(r.left)||n(r.right);if(i&&o)return!0;var a=r.top<e.top&&r.bottom>e.bottom,u=r.left<e.left&&r.right>e.right;return!(!a||!u)||(a&&o||u&&i)}},yf=function(e){var t=gf(e.top,e.bottom),n=gf(e.left,e.right);return function(e){return t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)}},bf={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},wf={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},xf=function(e){var t=e.target,n=e.destination,r=e.viewport,i=e.withDroppableDisplacement,o=e.isVisibleThroughFrameFn,a=i?function(e,t){var n=t.frame?t.frame.scroll.diff.displacement:Bl;return $l(e,n)}(t,n):t;return function(e,t,n){return!!t.subject.active&&n(t.subject.active)(e)}(a,n,o)&&function(e,t,n){return n(t)(e)}(a,r,o)},kf=function(e){return xf(w({},e,{isVisibleThroughFrameFn:mf}))},Sf=function(e){return xf(w({},e,{isVisibleThroughFrameFn:yf}))};function _f(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,i=e.viewport,o=e.forceShouldAnimate,a=e.last;return t.reduce((function(e,t){var u=function(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return ll(fl(n,r))}(t,r),s=t.descriptor.id;if(e.all.push(s),!kf({target:u,destination:n,viewport:i,withDroppableDisplacement:!0}))return e.invisible[t.descriptor.id]=!0,e;var c=function(e,t,n){if("boolean"===typeof n)return n;if(!t)return!0;var r=t.invisible,i=t.visible;if(r[e])return!1;var o=i[e];return!o||o.shouldAnimate}(s,a,o),l={draggableId:s,shouldAnimate:c};return e.visible[s]=l,e}),{all:[],visible:{},invisible:{}})}function Ef(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,i=e.destination,o=function(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(t,{inHomeList:n});return{displaced:hf,displacedBy:r,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function Cf(e){var t=e.draggable,n=e.insideDestination,r=e.destination,i=e.viewport,o=e.displacedBy,a=e.last,u=e.index,s=e.forceShouldAnimate,c=df(t,r);if(null==u)return Ef({insideDestination:n,inHomeList:c,displacedBy:o,destination:r});var l=tf(n,(function(e){return e.descriptor.index===u}));if(!l)return Ef({insideDestination:n,inHomeList:c,displacedBy:o,destination:r});var f=ff(t,n),d=n.indexOf(l);return{displaced:_f({afterDragging:f.slice(d),destination:r,displacedBy:o,last:a,viewport:i.frame,forceShouldAnimate:s}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:u}}}}function If(e,t){return Boolean(t.effected[e])}var Of=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,i=e.draggables,o=e.destination,a=e.insideDestination,u=e.previousImpact,s=e.viewport,c=e.afterCritical,l=u.at;if(l||Al(!1),"REORDER"===l.type){var f=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,i=e.location;if(!r.length)return null;var o=i.index,a=t?o+1:o-1,u=r[0].descriptor.index,s=r[r.length-1].descriptor.index;return a<u||a>(n?s:s+1)?null:a}({isMovingForward:t,isInHomeList:n,location:l.destination,insideDestination:a});return null==f?null:Cf({draggable:r,insideDestination:a,destination:o,viewport:s,last:u.displaced,displacedBy:u.displacedBy,index:f})}var d=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,i=e.combine,o=e.afterCritical;if(!n.isCombineEnabled)return null;var a=i.draggableId,u=r[a].descriptor.index;return If(a,o)?t?u:u-1:t?u+1:u}({isMovingForward:t,destination:o,displaced:u.displaced,draggables:i,combine:l.combine,afterCritical:c});return null==d?null:Cf({draggable:r,insideDestination:a,destination:o,viewport:s,last:u.displaced,displacedBy:u.displacedBy,index:d})},Af=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,i=lf(n);i||Al(!1);var o=i.draggableId,a=r[o].page.borderBox.center,u=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,i=e.displacedBy,o=Boolean(t.visible[r]||t.invisible[r]);return If(r,n)?o?Bl:Wl(i.point):o?i.point:Bl}({displaced:n.displaced,afterCritical:t,combineWith:o,displacedBy:n.displacedBy});return zl(a,u)},Df=function(e,t){return t.margin[e.start]+t.borderBox[e.size]/2},Pf=function(e,t,n){return t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2},Tf=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return Vl(t.line,n.marginBox[t.end]+Df(t,r),Pf(t,n.marginBox,r))},Nf=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return Vl(t.line,n.marginBox[t.start]-function(e,t){return t.margin[e.end]+t.borderBox[e.size]/2}(t,r),Pf(t,n.marginBox,r))},Mf=function(e){var t=e.impact,n=e.draggable,r=e.draggables,i=e.droppable,o=e.afterCritical,a=sf(i.descriptor.id,r),u=n.page,s=i.axis;if(!a.length)return function(e){var t=e.axis,n=e.moveInto,r=e.isMoving;return Vl(t.line,n.contentBox[t.start]+Df(t,r),Pf(t,n.contentBox,r))}({axis:s,moveInto:i.page,isMoving:u});var c=t.displaced,l=t.displacedBy,f=c.all[0];if(f){var d=r[f];if(If(f,o))return Nf({axis:s,moveRelativeTo:d.page,isMoving:u});var p=gl(d.page,l.point);return Nf({axis:s,moveRelativeTo:p,isMoving:u})}var h=a[a.length-1];if(h.descriptor.id===n.descriptor.id)return u.borderBox.center;if(If(h.descriptor.id,o)){var v=gl(h.page,Wl(o.displacedBy.point));return Tf({axis:s,moveRelativeTo:v,isMoving:u})}return Tf({axis:s,moveRelativeTo:h.page,isMoving:u})},Rf=function(e,t){var n=e.frame;return n?zl(t,n.scroll.diff.displacement):t},Lf=function(e){var t=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,o=e.afterCritical,a=n.page.borderBox.center,u=t.at;return r&&u?"REORDER"===u.type?Mf({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:o}):Af({impact:t,draggables:i,afterCritical:o}):a}(e),n=e.droppable;return n?Rf(n,t):t},jf=function(e,t){var n=Ul(t,e.scroll.initial),r=Wl(n);return{frame:ll({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function Ff(e,t){return e.map((function(e){return t[e]}))}var Bf=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=function(e,t){return zl(e.scroll.diff.displacement,t)}(e.viewport,t),i=Ul(r,n.page.borderBox.center);return zl(n.client.borderBox.center,i)},zf=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,i=e.viewport,o=e.withDroppableDisplacement,a=e.onlyOnMainAxis,u=void 0!==a&&a,s=Ul(r,t.page.borderBox.center),c={target:$l(t.page.borderBox,s),destination:n,withDroppableDisplacement:o,viewport:i};return u?function(e){return xf(w({},e,{isVisibleThroughFrameFn:(t=e.destination.axis,function(e){var n=gf(e.top,e.bottom),r=gf(e.left,e.right);return function(e){return t===bf?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)}})}));var t}(c):Sf(c)},Uf=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,i=e.draggables,o=e.previousImpact,a=e.viewport,u=e.previousPageBorderBoxCenter,s=e.previousClientSelection,c=e.afterCritical;if(!r.isEnabled)return null;var l=sf(r.descriptor.id,i),f=df(n,r),d=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.previousImpact;if(!r.isCombineEnabled)return null;if(!cf(o))return null;function a(e){var t={type:"COMBINE",combine:{draggableId:e,droppableId:r.descriptor.id}};return w({},o,{at:t})}var u=o.displaced.all,s=u.length?u[0]:null;if(t)return s?a(s):null;var c=ff(n,i);if(!s)return c.length?a(c[c.length-1].descriptor.id):null;var l=ef(c,(function(e){return e.descriptor.id===s}));-1===l&&Al(!1);var f=l-1;return f<0?null:a(c[f].descriptor.id)}({isMovingForward:t,draggable:n,destination:r,insideDestination:l,previousImpact:o})||Of({isMovingForward:t,isInHomeList:f,draggable:n,draggables:i,destination:r,insideDestination:l,previousImpact:o,viewport:a,afterCritical:c});if(!d)return null;var p=Lf({impact:d,draggable:n,droppable:r,draggables:i,afterCritical:c});if(zf({draggable:n,destination:r,newPageBorderBoxCenter:p,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:Bf({pageBorderBoxCenter:p,draggable:n,viewport:a}),impact:d,scrollJumpRequest:null};var h=Ul(p,u),v=function(e){var t=e.impact,n=e.viewport,r=e.destination,i=e.draggables,o=e.maxScrollChange,a=jf(n,zl(n.scroll.current,o)),u=r.frame?Xl(r,zl(r.frame.scroll.current,o)):r,s=t.displaced,c=_f({afterDragging:Ff(s.all,i),destination:r,displacedBy:t.displacedBy,viewport:a.frame,last:s,forceShouldAnimate:!1}),l=_f({afterDragging:Ff(s.all,i),destination:u,displacedBy:t.displacedBy,viewport:n.frame,last:s,forceShouldAnimate:!1}),f={},d={},p=[s,c,l];return s.all.forEach((function(e){var t=function(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}(e,p);t?d[e]=t:f[e]=!0})),w({},t,{displaced:{all:s.all,invisible:f,visible:d}})}({impact:d,viewport:a,destination:r,draggables:i,maxScrollChange:h});return{clientSelection:s,impact:v,scrollJumpRequest:h}},Hf=function(e){var t=e.subject.active;return t||Al(!1),t},Wf=function(e,t){var n=e.page.borderBox.center;return If(e.descriptor.id,t)?Ul(n,t.displacedBy.point):n},Vf=function(e,t){var n=e.page.borderBox;return If(e.descriptor.id,t)?$l(n,Wl(t.displacedBy.point)):n},Gf=kl((function(e,t){var n=t[e.line];return{value:n,point:Vl(e.line,n)}})),Kf=function(e,t){return w({},e,{scroll:w({},e.scroll,{max:t})})},qf=function(e,t,n){var r=e.frame;df(t,e)&&Al(!1),e.subject.withPlaceholder&&Al(!1);var i=Gf(e.axis,t.displaceBy).point,o=function(e,t,n){var r=e.axis;if("virtual"===e.descriptor.mode)return Vl(r.line,t[r.line]);var i=e.subject.page.contentBox[r.size],o=sf(e.descriptor.id,n).reduce((function(e,t){return e+t.client.marginBox[r.size]}),0)+t[r.line]-i;return o<=0?null:Vl(r.line,o)}(e,i,n),a={placeholderSize:i,increasedBy:o,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r)return w({},e,{subject:Zl({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame})});var u=o?zl(r.scroll.max,o):r.scroll.max,s=Kf(r,u);return w({},e,{subject:Zl({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:s}),frame:s})},$f=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,i=e.isOver,o=e.draggables,a=e.droppables,u=e.viewport,s=e.afterCritical,c=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,i=e.droppables,o=e.viewport,a=r.subject.active;if(!a)return null;var u=r.axis,s=gf(a[u.start],a[u.end]),c=af(i).filter((function(e){return e!==r})).filter((function(e){return e.isEnabled})).filter((function(e){return Boolean(e.subject.active)})).filter((function(e){return mf(o.frame)(Hf(e))})).filter((function(e){var n=Hf(e);return t?a[u.crossAxisEnd]<n[u.crossAxisEnd]:n[u.crossAxisStart]<a[u.crossAxisStart]})).filter((function(e){var t=Hf(e),n=gf(t[u.start],t[u.end]);return s(t[u.start])||s(t[u.end])||n(a[u.start])||n(a[u.end])})).sort((function(e,n){var r=Hf(e)[u.crossAxisStart],i=Hf(n)[u.crossAxisStart];return t?r-i:i-r})).filter((function(e,t,n){return Hf(e)[u.crossAxisStart]===Hf(n[0])[u.crossAxisStart]}));if(!c.length)return null;if(1===c.length)return c[0];var l=c.filter((function(e){return gf(Hf(e)[u.start],Hf(e)[u.end])(n[u.line])}));return 1===l.length?l[0]:l.length>1?l.sort((function(e,t){return Hf(e)[u.start]-Hf(t)[u.start]}))[0]:c.sort((function(e,t){var r=Kl(n,Jl(Hf(e))),i=Kl(n,Jl(Hf(t)));return r!==i?r-i:Hf(e)[u.start]-Hf(t)[u.start]}))[0]}({isMovingForward:t,pageBorderBoxCenter:n,source:i,droppables:a,viewport:u});if(!c)return null;var l=sf(c.descriptor.id,o),f=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,i=e.insideDestination,o=e.afterCritical,a=i.filter((function(e){return Sf({target:Vf(e,o),destination:r,viewport:n.frame,withDroppableDisplacement:!0})})).sort((function(e,n){var i=Gl(t,Rf(r,Wf(e,o))),a=Gl(t,Rf(r,Wf(n,o)));return i<a?-1:a<i?1:e.descriptor.index-n.descriptor.index}));return a[0]||null}({pageBorderBoxCenter:n,viewport:u,destination:c,insideDestination:l,afterCritical:s}),d=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,i=e.draggable,o=e.draggables,a=e.destination,u=e.viewport,s=e.afterCritical;if(!n){if(r.length)return null;var c={displaced:hf,displacedBy:pf,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:0}}},l=Lf({impact:c,draggable:i,droppable:a,draggables:o,afterCritical:s}),f=df(i,a)?a:qf(a,i,o);return zf({draggable:i,destination:f,newPageBorderBoxCenter:l,viewport:u.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?c:null}var d=Boolean(t[a.axis.line]<=n.page.borderBox.center[a.axis.line]),p=function(){var e=n.descriptor.index;return n.descriptor.id===i.descriptor.id||d?e:e+1}(),h=Gf(a.axis,i.displaceBy);return Cf({draggable:i,insideDestination:r,destination:a,viewport:u,displacedBy:h,last:hf,index:p})}({previousPageBorderBoxCenter:n,destination:c,draggable:r,draggables:o,moveRelativeTo:f,insideDestination:l,viewport:u,afterCritical:s});if(!d)return null;var p=Lf({impact:d,draggable:r,droppable:c,draggables:o,afterCritical:s});return{clientSelection:Bf({pageBorderBoxCenter:p,draggable:r,viewport:u}),impact:d,scrollJumpRequest:null}},Jf=function(e){var t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null},Yf=function(e){var t=e.state,n=e.type,r=function(e,t){var n=Jf(e);return n?t[n]:null}(t.impact,t.dimensions.droppables),i=Boolean(r),o=t.dimensions.droppables[t.critical.droppable.id],a=r||o,u=a.axis.direction,s="vertical"===u&&("MOVE_UP"===n||"MOVE_DOWN"===n)||"horizontal"===u&&("MOVE_LEFT"===n||"MOVE_RIGHT"===n);if(s&&!i)return null;var c="MOVE_DOWN"===n||"MOVE_RIGHT"===n,l=t.dimensions.draggables[t.critical.draggable.id],f=t.current.page.borderBoxCenter,d=t.dimensions,p=d.draggables,h=d.droppables;return s?Uf({isMovingForward:c,previousPageBorderBoxCenter:f,draggable:l,destination:a,draggables:p,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):$f({isMovingForward:c,previousPageBorderBoxCenter:f,draggable:l,isOver:a,draggables:p,droppables:h,viewport:t.viewport,afterCritical:t.afterCritical})};function Zf(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function Xf(e){var t=gf(e.top,e.bottom),n=gf(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}function Qf(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,i=af(r).filter((function(e){if(!e.isEnabled)return!1;var n,r,i=e.subject.active;if(!i)return!1;if(r=i,!((n=t).left<r.right&&n.right>r.left&&n.top<r.bottom&&n.bottom>r.top))return!1;if(Xf(i)(t.center))return!0;var o=e.axis,a=i.center[o.crossAxisLine],u=t[o.crossAxisStart],s=t[o.crossAxisEnd],c=gf(i[o.crossAxisStart],i[o.crossAxisEnd]),l=c(u),f=c(s);return!l&&!f||(l?u<a:s>a)}));return i.length?1===i.length?i[0].descriptor.id:function(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,i=n.page.borderBox.center,o=r.map((function(e){var n=e.axis,r=Vl(e.axis.line,t.center[n.line],e.page.borderBox.center[n.crossAxisLine]);return{id:e.descriptor.id,distance:Gl(i,r)}})).sort((function(e,t){return t.distance-e.distance}));return o[0]?o[0].id:null}({pageBorderBox:t,draggable:n,candidates:i}):null}var ed=function(e,t){return ll($l(e,t))};function td(e){var t=e.displaced,n=e.id;return Boolean(t.visible[n]||t.invisible[n])}var nd=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,i=e.droppables,o=e.previousImpact,a=e.viewport,u=e.afterCritical,s=ed(n.page.borderBox,t),c=Qf({pageBorderBox:s,draggable:n,droppables:i});if(!c)return vf;var l=i[c],f=sf(l.descriptor.id,r),d=function(e,t){var n=e.frame;return n?ed(t,n.scroll.diff.value):t}(l,s);return function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,i=e.destination,o=e.insideDestination,a=e.afterCritical;if(!i.isCombineEnabled)return null;var u=i.axis,s=Gf(i.axis,t.displaceBy),c=s.value,l=n[u.start],f=n[u.end],d=tf(ff(t,o),(function(e){var t=e.descriptor.id,n=e.page.borderBox,i=n[u.size]/4,o=If(t,a),s=td({displaced:r.displaced,id:t});return o?s?f>n[u.start]+i&&f<n[u.end]-i:l>n[u.start]-c+i&&l<n[u.end]-c-i:s?f>n[u.start]+c+i&&f<n[u.end]+c-i:l>n[u.start]+i&&l<n[u.end]-i}));return d?{displacedBy:s,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:d.descriptor.id,droppableId:i.descriptor.id}}}:null}({pageBorderBoxWithDroppableScroll:d,draggable:n,previousImpact:o,destination:l,insideDestination:f,afterCritical:u})||function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.last,a=e.viewport,u=e.afterCritical,s=r.axis,c=Gf(r.axis,n.displaceBy),l=c.value,f=t[s.start],d=t[s.end],p=tf(ff(n,i),(function(e){var t=e.descriptor.id,n=e.page.borderBox.center[s.line],r=If(t,u),i=td({displaced:o,id:t});return r?i?d<=n:f<n-l:i?d<=n+l:f<n})),h=function(e){var t=e.draggable,n=e.closest,r=e.inHomeList;return n?r&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}({draggable:n,closest:p,inHomeList:df(n,r)});return Cf({draggable:n,insideDestination:i,destination:r,viewport:a,last:o,displacedBy:c,index:h})}({pageBorderBoxWithDroppableScroll:d,draggable:n,destination:l,insideDestination:f,last:o.displaced,viewport:a,afterCritical:u})},rd=function(e,t){var n;return w({},e,((n={})[t.descriptor.id]=t,n))},id=function(e){var t=e.previousImpact,n=e.impact,r=e.droppables,i=Jf(t),o=Jf(n);if(!i)return r;if(i===o)return r;var a=r[i];if(!a.subject.withPlaceholder)return r;var u=function(e){var t=e.subject.withPlaceholder;t||Al(!1);var n=e.frame;if(!n)return w({},e,{subject:Zl({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null})});var r=t.oldFrameMaxScroll;r||Al(!1);var i=Kf(n,r);return w({},e,{subject:Zl({page:e.subject.page,axis:e.axis,frame:i,withPlaceholder:null}),frame:i})}(a);return rd(r,u)},od=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,i=e.viewport,o=e.impact,a=e.scrollJumpRequest,u=i||t.viewport,s=r||t.dimensions,c=n||t.current.client.selection,l=Ul(c,t.initial.client.selection),f={offset:l,selection:c,borderBoxCenter:zl(t.initial.client.borderBoxCenter,l)},d={selection:zl(f.selection,u.scroll.current),borderBoxCenter:zl(f.borderBoxCenter,u.scroll.current),offset:zl(f.offset,u.scroll.diff.value)},p={client:f,page:d};if("COLLECTING"===t.phase)return w({phase:"COLLECTING"},t,{dimensions:s,viewport:u,current:p});var h=s.draggables[t.critical.draggable.id],v=o||nd({pageOffset:d.offset,draggable:h,draggables:s.draggables,droppables:s.droppables,previousImpact:t.impact,viewport:u,afterCritical:t.afterCritical}),g=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,i=e.previousImpact,o=e.impact,a=id({previousImpact:i,impact:o,droppables:r}),u=Jf(o);if(!u)return a;var s=r[u];if(df(t,s))return a;if(s.subject.withPlaceholder)return a;var c=qf(s,t,n);return rd(a,c)}({draggable:h,impact:v,previousImpact:t.impact,draggables:s.draggables,droppables:s.droppables});return w({},t,{current:p,dimensions:{draggables:s.draggables,droppables:g},impact:v,viewport:u,scrollJumpRequest:a||null,forceShouldAnimate:!a&&null})};var ad=function(e){var t=e.impact,n=e.viewport,r=e.draggables,i=e.destination,o=e.forceShouldAnimate,a=t.displaced,u=function(e,t){return e.map((function(e){return t[e]}))}(a.all,r);return w({},t,{displaced:_f({afterDragging:u,destination:i,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:o,last:a})})},ud=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,o=e.viewport,a=e.afterCritical,u=Lf({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:a});return Bf({pageBorderBoxCenter:u,draggable:n,viewport:o})},sd=function(e){var t=e.state,n=e.dimensions,r=e.viewport;"SNAP"!==t.movementMode&&Al(!1);var i=t.impact,o=r||t.viewport,a=n||t.dimensions,u=a.draggables,s=a.droppables,c=u[t.critical.draggable.id],l=Jf(i);l||Al(!1);var f=s[l],d=ad({impact:i,viewport:o,destination:f,draggables:u}),p=ud({impact:d,draggable:c,droppable:f,draggables:u,viewport:o,afterCritical:t.afterCritical});return od({impact:d,clientSelection:p,state:t,dimensions:a,viewport:o})},cd=function(e){var t=e.draggable,n=e.home,r=e.draggables,i=e.viewport,o=Gf(n.axis,t.displaceBy),a=sf(n.descriptor.id,r),u=a.indexOf(t);-1===u&&Al(!1);var s,c=a.slice(u+1),l=c.reduce((function(e,t){return e[t.descriptor.id]=!0,e}),{}),f={inVirtualList:"virtual"===n.descriptor.mode,displacedBy:o,effected:l};return{impact:{displaced:_f({afterDragging:c,destination:n,displacedBy:o,last:null,viewport:i.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:(s=t.descriptor,{index:s.index,droppableId:s.droppableId})}},afterCritical:f}},ld=function(e){0},fd=function(e){0},dd=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,i=r.scroll.diff.value;return t.map((function(e){var t=e.descriptor.droppableId,o=function(e){var t=e.frame;return t||Al(!1),t}(n[t]),a=o.scroll.diff.value,u=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,i=gl(t.client,n),o=ml(i,r);return w({},t,{placeholder:w({},t.placeholder,{client:i}),client:i,page:o})}({draggable:e,offset:zl(i,a),initialWindowScroll:r.scroll.initial});return u}))},pd=function(e){return"SNAP"===e.movementMode},hd=function(e,t,n){var r=function(e,t){return{draggables:e.draggables,droppables:rd(e.droppables,t)}}(e.dimensions,t);return!pd(e)||n?od({state:e,dimensions:r}):sd({state:e,dimensions:r})};function vd(e){return e.isDragging&&"SNAP"===e.movementMode?w({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var gd={phase:"IDLE",completed:null,shouldFlush:!1},md=function(e,t){if(void 0===e&&(e=gd),"FLUSH"===t.type)return w({},gd,{shouldFlush:!0});if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&Al(!1);var n=t.payload,r=n.critical,i=n.clientSelection,o=n.viewport,a=n.dimensions,u=n.movementMode,s=a.draggables[r.draggable.id],c=a.droppables[r.droppable.id],l={selection:i,borderBoxCenter:s.client.borderBox.center,offset:Bl},f={client:l,page:{selection:zl(l.selection,o.scroll.initial),borderBoxCenter:zl(l.selection,o.scroll.initial),offset:zl(l.selection,o.scroll.diff.value)}},d=af(a.droppables).every((function(e){return!e.isFixedOnPage})),p=cd({draggable:s,home:c,draggables:a.draggables,viewport:o}),h=p.impact;return{phase:"DRAGGING",isDragging:!0,critical:r,movementMode:u,dimensions:a,initial:f,current:f,isWindowScrollAllowed:d,impact:h,afterCritical:p.afterCritical,onLiftImpact:h,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&Al(!1),w({phase:"COLLECTING"},e,{phase:"COLLECTING"}));if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&Al(!1),function(e){var t=e.state,n=e.published;ld();var r=n.modified.map((function(e){var n=t.dimensions.droppables[e.droppableId];return Xl(n,e.scroll)})),i=w({},t.dimensions.droppables,{},rf(r)),o=of(dd({additions:n.additions,updatedDroppables:i,viewport:t.viewport})),a=w({},t.dimensions.draggables,{},o);n.removals.forEach((function(e){delete a[e]}));var u={droppables:i,draggables:a},s=Jf(t.impact),c=s?u.droppables[s]:null,l=u.draggables[t.critical.draggable.id],f=u.droppables[t.critical.droppable.id],d=cd({draggable:l,home:f,draggables:a,viewport:t.viewport}),p=d.impact,h=d.afterCritical,v=c&&c.isCombineEnabled?t.impact:p,g=nd({pageOffset:t.current.page.offset,draggable:u.draggables[t.critical.draggable.id],draggables:u.draggables,droppables:u.droppables,previousImpact:v,viewport:t.viewport,afterCritical:h});fd();var m=w({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:g,onLiftImpact:p,dimensions:u,afterCritical:h,forceShouldAnimate:!1});return"COLLECTING"===t.phase?m:w({phase:"DROP_PENDING"},m,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1})}({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;Zf(e)||Al(!1);var v=t.payload.client;return Hl(v,e.current.client.selection)?e:od({state:e,clientSelection:v,impact:pd(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return vd(e);if("COLLECTING"===e.phase)return vd(e);Zf(e)||Al(!1);var g=t.payload,m=g.id,y=g.newScroll,b=e.dimensions.droppables[m];if(!b)return e;var x=Xl(b,y);return hd(e,x,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;Zf(e)||Al(!1);var k=t.payload,S=k.id,_=k.isEnabled,E=e.dimensions.droppables[S];E||Al(!1),E.isEnabled===_&&Al(!1);var C=w({},E,{isEnabled:_});return hd(e,C,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;Zf(e)||Al(!1);var I=t.payload,O=I.id,A=I.isCombineEnabled,D=e.dimensions.droppables[O];D||Al(!1),D.isCombineEnabled===A&&Al(!1);var P=w({},D,{isCombineEnabled:A});return hd(e,P,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;Zf(e)||Al(!1),e.isWindowScrollAllowed||Al(!1);var T=t.payload.newScroll;if(Hl(e.viewport.scroll.current,T))return vd(e);var N=jf(e.viewport,T);return pd(e)?sd({state:e,viewport:N}):od({state:e,viewport:N})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!Zf(e))return e;var M=t.payload.maxScroll;if(Hl(M,e.viewport.scroll.max))return e;var R=w({},e.viewport,{scroll:w({},e.viewport.scroll,{max:M})});return w({phase:"DRAGGING"},e,{viewport:R})}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&Al(!1);var L=Yf({state:e,type:t.type});return L?od({state:e,impact:L.impact,clientSelection:L.clientSelection,scrollJumpRequest:L.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){var j=t.payload.reason;return"COLLECTING"!==e.phase&&Al(!1),w({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:j})}if("DROP_ANIMATE"===t.type){var F=t.payload,B=F.completed,z=F.dropDuration,U=F.newHomeClientOffset;return"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&Al(!1),{phase:"DROP_ANIMATING",completed:B,dropDuration:z,newHomeClientOffset:U,dimensions:e.dimensions}}return"DROP_COMPLETE"===t.type?{phase:"IDLE",completed:t.payload.completed,shouldFlush:!1}:e},yd=function(e){return{type:"PUBLISH_WHILE_DRAGGING",payload:e}},bd=function(){return{type:"COLLECTION_STARTING",payload:null}},wd=function(e){return{type:"UPDATE_DROPPABLE_SCROLL",payload:e}},xd=function(e){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}},kd=function(e){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}},Sd=function(e){return{type:"MOVE",payload:e}},_d=function(){return{type:"MOVE_UP",payload:null}},Ed=function(){return{type:"MOVE_DOWN",payload:null}},Cd=function(){return{type:"MOVE_RIGHT",payload:null}},Id=function(){return{type:"MOVE_LEFT",payload:null}},Od=function(e){return{type:"DROP_COMPLETE",payload:e}},Ad=function(e){return{type:"DROP",payload:e}},Dd=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};var Pd="cubic-bezier(.2,1,.1,1)",Td={drop:0,combining:.7},Nd={drop:.75},Md=.2+"s "+"cubic-bezier(0.2, 0, 0, 1)",Rd={fluid:"opacity "+Md,snap:"transform "+Md+", opacity "+Md,drop:function(e){var t=e+"s "+Pd;return"transform "+t+", opacity "+t},outOfTheWay:"transform "+Md,placeholder:"height "+Md+", width "+Md+", margin "+Md},Ld=function(e){return Hl(e,Bl)?null:"translate("+e.x+"px, "+e.y+"px)"},jd=Ld,Fd=function(e,t){var n=Ld(e);return n?t?n+" scale("+Nd.drop+")":n:null},Bd=.33,zd=.55,Ud=zd-Bd,Hd=function(e){var t=e.getState,n=e.dispatch;return function(e){return function(r){if("DROP"===r.type){var i=t(),o=r.payload.reason;if("COLLECTING"!==i.phase){if("IDLE"!==i.phase){"DROP_PENDING"===i.phase&&i.isWaiting&&Al(!1),"DRAGGING"!==i.phase&&"DROP_PENDING"!==i.phase&&Al(!1);var a=i.critical,u=i.dimensions,s=u.draggables[i.critical.draggable.id],c=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,i=e.home,o=e.viewport,a=e.onLiftImpact;return r.at&&"DROP"===n?"REORDER"===r.at.type?{impact:r,didDropInsideDroppable:!0}:{impact:w({},r,{displaced:hf}),didDropInsideDroppable:!0}:{impact:ad({draggables:t,impact:a,destination:i,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1}}({reason:o,lastImpact:i.impact,afterCritical:i.afterCritical,onLiftImpact:i.onLiftImpact,home:i.dimensions.droppables[i.critical.droppable.id],viewport:i.viewport,draggables:i.dimensions.draggables}),l=c.impact,f=c.didDropInsideDroppable,d=f?cf(l):null,p=f?lf(l):null,h={index:a.draggable.index,droppableId:a.droppable.id},v={draggableId:s.descriptor.id,type:s.descriptor.type,source:h,reason:o,mode:i.movementMode,destination:d,combine:p},g=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,i=e.viewport,o=e.afterCritical,a=r.draggables,u=r.droppables,s=Jf(t),c=s?u[s]:null,l=u[n.descriptor.droppableId],f=ud({impact:t,draggable:n,draggables:a,afterCritical:o,droppable:c||l,viewport:i});return Ul(f,n.client.borderBox.center)}({impact:l,draggable:s,dimensions:u,viewport:i.viewport,afterCritical:i.afterCritical}),m={critical:i.critical,afterCritical:i.afterCritical,result:v,impact:l};if(!Hl(i.current.client.offset,g)||Boolean(v.combine)){var y=function(e){var t=e.current,n=e.destination,r=e.reason,i=Gl(t,n);if(i<=0)return Bd;if(i>=1500)return zd;var o=Bd+Ud*(i/1500);return Number(("CANCEL"===r?.6*o:o).toFixed(2))}({current:i.current.client.offset,destination:g,reason:o});n(function(e){return{type:"DROP_ANIMATE",payload:e}}({newHomeClientOffset:g,dropDuration:y,completed:m}))}else n(Od({completed:m}))}}else n(function(e){return{type:"DROP_PENDING",payload:e}}({reason:o}))}else e(r)}}},Wd=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function Vd(e){var t=e.onWindowScroll;var n=Sl((function(){t(Wd())})),r=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(t){t.target!==window&&t.target!==window.document||e()}}}(n),i=El;function o(){return i!==El}return{start:function(){o()&&Al(!1),i=Cl(window,[r])},stop:function(){o()||Al(!1),n.cancel(),i(),i=El},isActive:o}}var Gd=function(e){var t=Vd({onWindowScroll:function(t){e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return function(e){return function(n){t.isActive()||"INITIAL_PUBLISH"!==n.type||t.start(),t.isActive()&&function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(n)&&t.stop(),e(n)}}},Kd=function(){var e=[];return{add:function(t){var n=setTimeout((function(){return function(t){var n=ef(e,(function(e){return e.timerId===t}));-1===n&&Al(!1),e.splice(n,1)[0].callback()}(n)})),r={timerId:n,callback:t};e.push(r)},flush:function(){if(e.length){var t=[].concat(e);e.length=0,t.forEach((function(e){clearTimeout(e.timerId),e.callback()}))}}}},qd=function(e,t){ld(),t(),fd()},$d=function(e,t){return{draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t}},Jd=function(e,t,n,r){if(e){var i=function(e){var t=!1,n=!1,r=setTimeout((function(){n=!0})),i=function(i){t||n||(t=!0,e(i),clearTimeout(r))};return i.wasCalled=function(){return t},i}(n);e(t,{announce:i}),i.wasCalled()||n(r(t))}else n(r(t))},Yd=function(e,t){var n=function(e,t){var n=Kd(),r=null,i=function(n){r||Al(!1),r=null,qd(0,(function(){return Jd(e().onDragEnd,n,t,Fl)}))};return{beforeCapture:function(t,n){r&&Al(!1),qd(0,(function(){var r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})}))},beforeStart:function(t,n){r&&Al(!1),qd(0,(function(){var r=e().onBeforeDragStart;r&&r($d(t,n))}))},start:function(i,o){r&&Al(!1);var a=$d(i,o);r={mode:o,lastCritical:i,lastLocation:a.source,lastCombine:null},n.add((function(){qd(0,(function(){return Jd(e().onDragStart,a,t,Ll)}))}))},update:function(i,o){var a=cf(o),u=lf(o);r||Al(!1);var s=!function(e,t){if(e===t)return!0;var n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r}(i,r.lastCritical);s&&(r.lastCritical=i);var c,l,f=(l=a,!(null==(c=r.lastLocation)&&null==l||null!=c&&null!=l&&c.droppableId===l.droppableId&&c.index===l.index));f&&(r.lastLocation=a);var d=!function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId}(r.lastCombine,u);if(d&&(r.lastCombine=u),s||f||d){var p=w({},$d(i,r.mode),{combine:u,destination:a});n.add((function(){qd(0,(function(){return Jd(e().onDragUpdate,p,t,jl)}))}))}},flush:function(){r||Al(!1),n.flush()},drop:i,abort:function(){if(r){var e=w({},$d(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});i(e)}}}}(e,t);return function(e){return function(t){return function(r){if("BEFORE_INITIAL_CAPTURE"!==r.type){if("INITIAL_PUBLISH"===r.type){var i=r.payload.critical;return n.beforeStart(i,r.payload.movementMode),t(r),void n.start(i,r.payload.movementMode)}if("DROP_COMPLETE"===r.type){var o=r.payload.completed.result;return n.flush(),t(r),void n.drop(o)}if(t(r),"FLUSH"!==r.type){var a=e.getState();"DRAGGING"===a.phase&&n.update(a.critical,a.impact)}else n.abort()}else n.beforeCapture(r.payload.draggableId,r.payload.movementMode)}}}},Zd=function(e){return function(t){return function(n){if("DROP_ANIMATION_FINISHED"===n.type){var r=e.getState();"DROP_ANIMATING"!==r.phase&&Al(!1),e.dispatch(Od({completed:r.completed}))}else t(n)}}},Xd=function(e){var t=null,n=null;return function(r){return function(i){if("FLUSH"!==i.type&&"DROP_COMPLETE"!==i.type&&"DROP_ANIMATION_FINISHED"!==i.type||(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(i),"DROP_ANIMATE"===i.type){var o={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};n=requestAnimationFrame((function(){n=null,t=Cl(window,[o])}))}}}},Qd=function(e){return function(t){return function(n){if(t(n),"PUBLISH_WHILE_DRAGGING"===n.type){var r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(Ad({reason:r.reason})))}}}},ep=_c,tp=function(e){var t,n=e.dimensionMarshal,r=e.focusMarshal,i=e.styleMarshal,o=e.getResponders,a=e.announce,u=e.autoScroller;return xc(md,ep(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(gc(15))},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},o=t.map((function(e){return e(i)}));return r=_c.apply(void 0,o)(n.dispatch),ur(ur({},n),{},{dispatch:r})}}}((t=i,function(){return function(e){return function(n){"INITIAL_PUBLISH"===n.type&&t.dragging(),"DROP_ANIMATE"===n.type&&t.dropping(n.payload.completed.result.reason),"FLUSH"!==n.type&&"DROP_COMPLETE"!==n.type||t.resting(),e(n)}}}),function(e){return function(){return function(t){return function(n){"DROP_COMPLETE"!==n.type&&"FLUSH"!==n.type&&"DROP_ANIMATE"!==n.type||e.stopPublishing(),t(n)}}}}(n),function(e){return function(t){var n=t.getState,r=t.dispatch;return function(t){return function(i){if("LIFT"===i.type){var o=i.payload,a=o.id,u=o.clientSelection,s=o.movementMode,c=n();"DROP_ANIMATING"===c.phase&&r(Od({completed:c.completed})),"IDLE"!==n().phase&&Al(!1),r({type:"FLUSH",payload:null}),r({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:a,movementMode:s}});var l={draggableId:a,scrollOptions:{shouldPublishImmediately:"SNAP"===s}},f=e.startPublishing(l),d=f.critical,p=f.dimensions,h=f.viewport;r({type:"INITIAL_PUBLISH",payload:{critical:d,dimensions:p,clientSelection:u,movementMode:s,viewport:h}})}else t(i)}}}}(n),Hd,Zd,Xd,Qd,function(e){return function(t){return function(n){return function(r){if(function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(r))return e.stop(),void n(r);if("INITIAL_PUBLISH"===r.type){n(r);var i=t.getState();return"DRAGGING"!==i.phase&&Al(!1),void e.start(i)}n(r),e.scroll(t.getState())}}}}(u),Gd,function(e){var t=!1;return function(){return function(n){return function(r){if("INITIAL_PUBLISH"===r.type)return t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),void e.tryRestoreFocusRecorded();if(n(r),t){if("FLUSH"===r.type)return t=!1,void e.tryRestoreFocusRecorded();if("DROP_COMPLETE"===r.type){t=!1;var i=r.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}}(r),Yd(o,a))))};var np=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,i=e.width,o=Ul({x:n,y:t},{x:i,y:r});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},rp=function(){var e=document.documentElement;return e||Al(!1),e},ip=function(){var e=rp();return np({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},op=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry;ld();var i=function(){var e=Wd(),t=ip(),n=e.y,r=e.x,i=rp(),o=i.clientWidth,a=i.clientHeight;return{frame:ll({top:n,left:r,right:r+o,bottom:n+a}),scroll:{initial:e,current:e,max:t,diff:{value:Bl,displacement:Bl}}}}(),o=i.scroll.current,a=t.droppable,u=r.droppable.getAllByType(a.type).map((function(e){return e.callbacks.getDimensionAndWatchScroll(o,n)})),s=r.draggable.getAllByType(t.draggable.type).map((function(e){return e.getDimension(o)})),c={draggables:of(s),droppables:rf(u)};return fd(),{dimensions:c,critical:t,viewport:i}};function ap(e,t,n){return n.descriptor.id!==t.id&&(n.descriptor.type===t.type&&"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode)}var up=function(e,t){var n=null,r=function(e){var t=e.registry,n=e.callbacks,r={additions:{},removals:{},modified:{}},i=null,o=function(){i||(n.collectionStarting(),i=requestAnimationFrame((function(){i=null,ld();var e=r,o=e.additions,a=e.removals,u=e.modified,s=Object.keys(o).map((function(e){return t.draggable.getById(e).getDimension(Bl)})).sort((function(e,t){return e.descriptor.index-t.descriptor.index})),c=Object.keys(u).map((function(e){return{droppableId:e,scroll:t.droppable.getById(e).callbacks.getScrollWhileDragging()}})),l={additions:s,removals:Object.keys(a),modified:c};r={additions:{},removals:{},modified:{}},fd(),n.publish(l)})))};return{add:function(e){var t=e.descriptor.id;r.additions[t]=e,r.modified[e.descriptor.droppableId]=!0,r.removals[t]&&delete r.removals[t],o()},remove:function(e){var t=e.descriptor;r.removals[t.id]=!0,r.modified[t.droppableId]=!0,r.additions[t.id]&&delete r.additions[t.id],o()},stop:function(){i&&(cancelAnimationFrame(i),i=null,r={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=function(t){n||Al(!1);var i=n.critical.draggable;"ADDITION"===t.type&&ap(e,i,t.value)&&r.add(t.value),"REMOVAL"===t.type&&ap(e,i,t.value)&&r.remove(t.value)},o={updateDroppableIsEnabled:function(r,i){e.droppable.exists(r)||Al(!1),n&&t.updateDroppableIsEnabled({id:r,isEnabled:i})},updateDroppableIsCombineEnabled:function(r,i){n&&(e.droppable.exists(r)||Al(!1),t.updateDroppableIsCombineEnabled({id:r,isCombineEnabled:i}))},scrollDroppable:function(t,r){n&&e.droppable.getById(t).callbacks.scroll(r)},updateDroppableScroll:function(r,i){n&&(e.droppable.exists(r)||Al(!1),t.updateDroppableScroll({id:r,newScroll:i}))},startPublishing:function(t){n&&Al(!1);var r=e.draggable.getById(t.draggableId),o=e.droppable.getById(r.descriptor.droppableId),a={draggable:r.descriptor,droppable:o.descriptor},u=e.subscribe(i);return n={critical:a,unsubscribe:u},op({critical:a,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:function(){if(n){r.stop();var t=n.critical.droppable;e.droppable.getAllByType(t.type).forEach((function(e){return e.callbacks.dragStopped()})),n.unsubscribe(),n=null}}};return o},sp=function(e,t){return"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&(e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason)},cp=function(e){window.scrollBy(e.x,e.y)},lp=kl((function(e){return af(e).filter((function(e){return!!e.isEnabled&&!!e.frame}))})),fp=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var i=r[n];return i.frame?i:null}var o=function(e,t){var n=tf(lp(t),(function(t){return t.frame||Al(!1),Xf(t.frame.pageMarginBox)(e)}));return n}(t,r);return o},dp=.25,pp=.05,hp=28,vp=function(e){return Math.pow(e,2)},gp={stopDampeningAt:1200,accelerateAt:360},mp=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,i=n-t;return 0===i?0:(r-t)/i},yp=gp.accelerateAt,bp=gp.stopDampeningAt,wp=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,i=e.shouldUseTimeDampening,o=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return hp;if(e===t.startScrollingFrom)return 1;var n=mp({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=hp*vp(1-n);return Math.ceil(r)}(t,n);return 0===o?0:i?Math.max(function(e,t){var n=t,r=bp,i=Date.now()-n;if(i>=bp)return e;if(i<yp)return 1;var o=mp({startOfRange:yp,endOfRange:r,current:i}),a=e*vp(o);return Math.ceil(a)}(o,r),1):o},xp=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,i=e.axis,o=e.shouldUseTimeDampening,a=function(e,t){return{startScrollingFrom:e[t.size]*dp,maxScrollValueAt:e[t.size]*pp}}(t,i);return n[i.end]<n[i.start]?wp({distanceToEdge:n[i.end],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o}):-1*wp({distanceToEdge:n[i.start],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o})},kp=ql((function(e){return 0===e?0:e})),Sp=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,i=e.center,o=e.shouldUseTimeDampening,a={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},u=xp({container:n,distanceToEdges:a,dragStartTime:t,axis:bf,shouldUseTimeDampening:o}),s=xp({container:n,distanceToEdges:a,dragStartTime:t,axis:wf,shouldUseTimeDampening:o}),c=kp({x:s,y:u});if(Hl(c,Bl))return null;var l=function(e){var t=e.container,n=e.subject,r=e.proposedScroll,i=n.height>t.height,o=n.width>t.width;return o||i?o&&i?null:{x:o?0:r.x,y:i?0:r.y}:r}({container:n,subject:r,proposedScroll:c});return l?Hl(l,Bl)?null:l:null},_p=ql((function(e){return 0===e?0:e>0?1:-1})),Ep=function(){var e=function(e,t){return e<0?e:e>t?e-t:0};return function(t){var n=t.current,r=t.max,i=t.change,o=zl(n,i),a={x:e(o.x,r.x),y:e(o.y,r.y)};return Hl(a,Bl)?null:a}}(),Cp=function(e){var t=e.max,n=e.current,r=e.change,i={x:Math.max(n.x,t.x),y:Math.max(n.y,t.y)},o=_p(r),a=Ep({max:i,current:n,change:o});return!a||(0!==o.x&&0===a.x||0!==o.y&&0===a.y)},Ip=function(e,t){return Cp({current:e.scroll.current,max:e.scroll.max,change:t})},Op=function(e,t){var n=e.frame;return!!n&&Cp({current:n.scroll.current,max:n.scroll.max,change:t})},Ap=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,i=e.scrollWindow,o=e.scrollDroppable,a=t.current.page.borderBoxCenter,u=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){var s=function(e){var t=e.viewport,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,a=Sp({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:o});return a&&Ip(t,a)?a:null}({dragStartTime:n,viewport:t.viewport,subject:u,center:a,shouldUseTimeDampening:r});if(s)return void i(s)}var c=fp({center:a,destination:Jf(t.impact),droppables:t.dimensions.droppables});if(c){var l=function(e){var t=e.droppable,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,a=t.frame;if(!a)return null;var u=Sp({dragStartTime:i,container:a.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:o});return u&&Op(t,u)?u:null}({dragStartTime:n,droppable:c,subject:u,center:a,shouldUseTimeDampening:r});l&&o(c.descriptor.id,l)}},Dp=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,i=function(e,t){if(!Op(e,t))return t;var r=function(e,t){var n=e.frame;return n&&Op(e,t)?Ep({current:n.scroll.current,max:n.scroll.max,change:t}):null}(e,t);if(!r)return n(e.descriptor.id,t),null;var i=Ul(t,r);return n(e.descriptor.id,i),Ul(t,i)},o=function(e,t,n){if(!e)return n;if(!Ip(t,n))return n;var i=function(e,t){if(!Ip(e,t))return null;var n=e.scroll.max,r=e.scroll.current;return Ep({current:r,max:n,change:t})}(t,n);if(!i)return r(n),null;var o=Ul(n,i);return r(o),Ul(n,o)};return function(e){var n=e.scrollJumpRequest;if(n){var r=Jf(e.impact);r||Al(!1);var a=i(e.dimensions.droppables[r],n);if(a){var u=e.viewport,s=o(e.isWindowScrollAllowed,u,a);s&&function(e,n){var r=zl(e.current.client.selection,n);t({client:r})}(e,s)}}}},Pp=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,i=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=Sl(t),i=Sl(n),o=null,a=function(e){o||Al(!1);var t=o,n=t.shouldUseTimeDampening,a=t.dragStartTime;Ap({state:e,scrollWindow:r,scrollDroppable:i,dragStartTime:a,shouldUseTimeDampening:n})};return{start:function(e){ld(),o&&Al(!1);var t=Date.now(),n=!1,r=function(){n=!0};Ap({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:r,scrollDroppable:r}),o={dragStartTime:t,shouldUseTimeDampening:n},fd(),n&&a(e)},stop:function(){o&&(r.cancel(),i.cancel(),o=null)},scroll:a}}({scrollWindow:n,scrollDroppable:t}),o=Dp({move:r,scrollWindow:n,scrollDroppable:t});return{scroll:function(e){"DRAGGING"===e.phase&&("FLUID"!==e.movementMode?e.scrollJumpRequest&&o(e):i.scroll(e))},start:i.start,stop:i.stop}},Tp=function(){var e="data-rbd-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),Np=function(){var e="data-rbd-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),Mp=function(){var e="data-rbd-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),Rp={contextId:"data-rbd-scroll-container-context-id"},Lp=function(e,t){return e.map((function(e){var n=e.styles[t];return n?e.selector+" { "+n+" }":""})).join(" ")},jp="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?u.useLayoutEffect:u.useEffect,Fp=function(){var e=document.querySelector("head");return e||Al(!1),e},Bp=function(e){var t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function zp(e,t){var n=ul((function(){return function(e){var t,n=(t=e,function(e){return"["+e+'="'+t+'"]'}),r=function(){var e="\n cursor: -webkit-grab;\n cursor: grab;\n ";return{selector:n(Tp.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:e,dragging:"pointer-events: none;",dropAnimating:e}}}(),i=[function(){var e="\n transition: "+Rd.outOfTheWay+";\n ";return{selector:n(Np.contextId),styles:{dragging:e,dropAnimating:e,userCancel:e}}}(),r,{selector:n(Mp.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n overflow-anchor: none;\n "}}];return{always:Lp(i,"always"),resting:Lp(i,"resting"),dragging:Lp(i,"dragging"),dropAnimating:Lp(i,"dropAnimating"),userCancel:Lp(i,"userCancel")}}(e)}),[e]),r=(0,u.useRef)(null),i=(0,u.useRef)(null),o=sl(kl((function(e){var t=i.current;t||Al(!1),t.textContent=e})),[]),a=sl((function(e){var t=r.current;t||Al(!1),t.textContent=e}),[]);jp((function(){(r.current||i.current)&&Al(!1);var u=Bp(t),s=Bp(t);return r.current=u,i.current=s,u.setAttribute("data-rbd-always",e),s.setAttribute("data-rbd-dynamic",e),Fp().appendChild(u),Fp().appendChild(s),a(n.always),o(n.resting),function(){var e=function(e){var t=e.current;t||Al(!1),Fp().removeChild(t),e.current=null};e(r),e(i)}}),[t,a,o,n.always,n.resting,e]);var s=sl((function(){return o(n.dragging)}),[o,n.dragging]),c=sl((function(e){o("DROP"!==e?n.userCancel:n.dropAnimating)}),[o,n.dropAnimating,n.userCancel]),l=sl((function(){i.current&&o(n.resting)}),[o,n.resting]);return ul((function(){return{dragging:s,dropping:c,resting:l}}),[s,c,l])}var Up=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Hp(e){return e instanceof Up(e).HTMLElement}function Wp(e,t){var n="["+Tp.contextId+'="'+e+'"]',r=nf(document.querySelectorAll(n));if(!r.length)return null;var i=tf(r,(function(e){return e.getAttribute(Tp.draggableId)===t}));return i&&Hp(i)?i:null}function Vp(){var e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach((function(t){return t(e)}))}function r(t){return e.draggables[t]||null}var i={register:function(t){e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:function(t,n){var r=e.draggables[n.descriptor.id];r&&r.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:function(t){var i=t.descriptor.id,o=r(i);o&&t.uniqueId===o.uniqueId&&(delete e.draggables[i],n({type:"REMOVAL",value:t}))},getById:function(e){var t=r(e);return t||Al(!1),t},findById:r,exists:function(e){return Boolean(r(e))},getAllByType:function(t){return Ql(e.draggables).filter((function(e){return e.descriptor.type===t}))}};function o(t){return e.droppables[t]||null}var a={register:function(t){e.droppables[t.descriptor.id]=t},unregister:function(t){var n=o(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){var t=o(e);return t||Al(!1),t},findById:o,exists:function(e){return Boolean(o(e))},getAllByType:function(t){return Ql(e.droppables).filter((function(e){return e.descriptor.type===t}))}};return{draggable:i,droppable:a,subscribe:function(e){return t.push(e),function(){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var Gp=u.createContext(null),Kp=function(){var e=document.body;return e||Al(!1),e},qp={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"};var $p=0,Jp={separator:"::"};function Yp(e,t){return void 0===t&&(t=Jp),ul((function(){return""+e+t.separator+$p++}),[t.separator,e])}var Zp=u.createContext(null);function Xp(e){0}function Qp(e,t){Xp()}function eh(){Qp()}function th(e){var t=(0,u.useRef)(e);return(0,u.useEffect)((function(){t.current=e})),t}var nh,rh=((nh={})[13]=!0,nh[9]=!0,nh),ih=function(e){rh[e.keyCode]&&e.preventDefault()},oh=function(){var e="visibilitychange";return"undefined"===typeof document?e:tf([e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],(function(e){return"on"+e in document}))||e}();var ah,uh={type:"IDLE"};function sh(e){var t=e.cancel,n=e.completed,r=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(e){var t=e.button,n=e.clientX,o=e.clientY;if(0===t){var a={x:n,y:o},u=r();if("DRAGGING"===u.type)return e.preventDefault(),void u.actions.move(a);if("PENDING"!==u.type&&Al(!1),function(e,t){return Math.abs(t.x-e.x)>=5||Math.abs(t.y-e.y)>=5}(u.point,a)){e.preventDefault();var s=u.actions.fluidLift(a);i({type:"DRAGGING",actions:s})}}}},{eventName:"mouseup",fn:function(e){var i=r();"DRAGGING"===i.type?(e.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"mousedown",fn:function(e){"DRAGGING"===r().type&&e.preventDefault(),t()}},{eventName:"keydown",fn:function(e){if("PENDING"!==r().type)return 27===e.keyCode?(e.preventDefault(),void t()):void ih(e);t()}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){"PENDING"===r().type&&t()}},{eventName:"webkitmouseforcedown",fn:function(e){var n=r();"IDLE"===n.type&&Al(!1),n.actions.shouldRespectForcePress()?t():e.preventDefault()}},{eventName:oh,fn:t}]}function ch(){}var lh=((ah={})[34]=!0,ah[33]=!0,ah[36]=!0,ah[35]=!0,ah);function fh(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:function(r){return 27===r.keyCode?(r.preventDefault(),void n()):32===r.keyCode?(r.preventDefault(),t(),void e.drop()):40===r.keyCode?(r.preventDefault(),void e.moveDown()):38===r.keyCode?(r.preventDefault(),void e.moveUp()):39===r.keyCode?(r.preventDefault(),void e.moveRight()):37===r.keyCode?(r.preventDefault(),void e.moveLeft()):void(lh[r.keyCode]?r.preventDefault():ih(r))}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:oh,fn:n}]}var dh={type:"IDLE"};var ph={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function hh(e,t){if(null==t)return!1;if(Boolean(ph[t.tagName.toLowerCase()]))return!0;var n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==e&&hh(e,t.parentElement)}function vh(e,t){var n=t.target;return!!Hp(n)&&hh(e,n)}var gh=function(e){return ll(e.getBoundingClientRect()).center};var mh=function(){var e="matches";return"undefined"===typeof document?e:tf([e,"msMatchesSelector","webkitMatchesSelector"],(function(e){return e in Element.prototype}))||e}();function yh(e,t){return null==e?null:e[mh](t)?e:yh(e.parentElement,t)}function bh(e,t){return e.closest?e.closest(t):yh(e,t)}function wh(e,t){var n,r=t.target;if(!((n=r)instanceof Up(n).Element))return null;var i=function(e){return"["+Tp.contextId+'="'+e+'"]'}(e),o=bh(r,i);return o&&Hp(o)?o:null}function xh(e){e.preventDefault()}function kh(e){var t=e.expected,n=e.phase,r=e.isLockActive;e.shouldWarn;return!!r()&&t===n}function Sh(e){var t=e.lockAPI,n=e.store,r=e.registry,i=e.draggableId;if(t.isClaimed())return!1;var o=r.draggable.findById(i);return!!o&&(!!o.options.isEnabled&&!!sp(n.getState(),i))}function _h(e){var t=e.lockAPI,n=e.contextId,r=e.store,i=e.registry,o=e.draggableId,a=e.forceSensorStop,u=e.sourceEvent;if(!Sh({lockAPI:t,store:r,registry:i,draggableId:o}))return null;var s=i.draggable.getById(o),c=function(e,t){var n="["+Np.contextId+'="'+e+'"]',r=tf(nf(document.querySelectorAll(n)),(function(e){return e.getAttribute(Np.id)===t}));return r&&Hp(r)?r:null}(n,s.descriptor.id);if(!c)return null;if(u&&!s.options.canDragInteractiveElements&&vh(c,u))return null;var l=t.claim(a||El),f="PRE_DRAG";function d(){return s.options.shouldRespectForcePress}function p(){return t.isActive(l)}var h=function(e,t){kh({expected:e,phase:f,isLockActive:p,shouldWarn:!0})&&r.dispatch(t())}.bind(null,"DRAGGING");function v(e){function n(){t.release(),f="COMPLETED"}function i(t,i){if(void 0===i&&(i={shouldBlockNextClick:!1}),e.cleanup(),i.shouldBlockNextClick){var o=Cl(window,[{eventName:"click",fn:xh,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(o)}n(),r.dispatch(Ad({reason:t}))}return"PRE_DRAG"!==f&&(n(),"PRE_DRAG"!==f&&Al(!1)),r.dispatch(function(e){return{type:"LIFT",payload:e}}(e.liftActionArgs)),f="DRAGGING",w({isActive:function(){return kh({expected:"DRAGGING",phase:f,isLockActive:p,shouldWarn:!1})},shouldRespectForcePress:d,drop:function(e){return i("DROP",e)},cancel:function(e){return i("CANCEL",e)}},e.actions)}return{isActive:function(){return kh({expected:"PRE_DRAG",phase:f,isLockActive:p,shouldWarn:!1})},shouldRespectForcePress:d,fluidLift:function(e){var t=Sl((function(e){h((function(){return Sd({client:e})}))}));return w({},v({liftActionArgs:{id:o,clientSelection:e,movementMode:"FLUID"},cleanup:function(){return t.cancel()},actions:{move:t}}),{move:t})},snapLift:function(){var e={moveUp:function(){return h(_d)},moveRight:function(){return h(Cd)},moveDown:function(){return h(Ed)},moveLeft:function(){return h(Id)}};return v({liftActionArgs:{id:o,clientSelection:gh(c),movementMode:"SNAP"},cleanup:El,actions:e})},abort:function(){kh({expected:"PRE_DRAG",phase:f,isLockActive:p,shouldWarn:!0})&&t.release()}}}var Eh=[function(e){var t=(0,u.useRef)(uh),n=(0,u.useRef)(El),r=ul((function(){return{eventName:"mousedown",fn:function(t){if(!t.defaultPrevented&&0===t.button&&!(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)){var r=e.findClosestDraggableId(t);if(r){var i=e.tryGetLock(r,a,{sourceEvent:t});if(i){t.preventDefault();var o={x:t.clientX,y:t.clientY};n.current(),l(i,o)}}}}}}),[e]),i=ul((function(){return{eventName:"webkitmouseforcewillbegin",fn:function(t){if(!t.defaultPrevented){var n=e.findClosestDraggableId(t);if(n){var r=e.findOptionsForDraggable(n);r&&(r.shouldRespectForcePress||e.canGetLock(n)&&t.preventDefault())}}}}}),[e]),o=sl((function(){n.current=Cl(window,[i,r],{passive:!1,capture:!0})}),[i,r]),a=sl((function(){"IDLE"!==t.current.type&&(t.current=uh,n.current(),o())}),[o]),s=sl((function(){var e=t.current;a(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[a]),c=sl((function(){var e=sh({cancel:s,completed:a,getPhase:function(){return t.current},setPhase:function(e){t.current=e}});n.current=Cl(window,e,{capture:!0,passive:!1})}),[s,a]),l=sl((function(e,n){"IDLE"!==t.current.type&&Al(!1),t.current={type:"PENDING",point:n,actions:e},c()}),[c]);jp((function(){return o(),function(){n.current()}}),[o])},function(e){var t=(0,u.useRef)(ch),n=ul((function(){return{eventName:"keydown",fn:function(n){if(!n.defaultPrevented&&32===n.keyCode){var i=e.findClosestDraggableId(n);if(i){var o=e.tryGetLock(i,s,{sourceEvent:n});if(o){n.preventDefault();var a=!0,u=o.snapLift();t.current(),t.current=Cl(window,fh(u,s),{capture:!0,passive:!1})}}}function s(){a||Al(!1),a=!1,t.current(),r()}}}}),[e]),r=sl((function(){t.current=Cl(window,[n],{passive:!1,capture:!0})}),[n]);jp((function(){return r(),function(){t.current()}}),[r])},function(e){var t=(0,u.useRef)(dh),n=(0,u.useRef)(El),r=sl((function(){return t.current}),[]),i=sl((function(e){t.current=e}),[]),o=ul((function(){return{eventName:"touchstart",fn:function(t){if(!t.defaultPrevented){var r=e.findClosestDraggableId(t);if(r){var i=e.tryGetLock(r,s,{sourceEvent:t});if(i){var o=t.touches[0],a={x:o.clientX,y:o.clientY};n.current(),d(i,a)}}}}}}),[e]),a=sl((function(){n.current=Cl(window,[o],{capture:!0,passive:!1})}),[o]),s=sl((function(){var e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),i(dh),n.current(),a())}),[a,i]),c=sl((function(){var e=t.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[s]),l=sl((function(){var e={capture:!0,passive:!1},t={cancel:c,completed:s,getPhase:r},i=Cl(window,function(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(e){var n=r();if("DRAGGING"===n.type){n.hasMoved=!0;var i=e.touches[0],o={x:i.clientX,y:i.clientY};e.preventDefault(),n.actions.move(o)}else t()}},{eventName:"touchend",fn:function(e){var i=r();"DRAGGING"===i.type?(e.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"touchcancel",fn:function(e){"DRAGGING"===r().type?(e.preventDefault(),t()):t()}},{eventName:"touchforcechange",fn:function(e){var n=r();"IDLE"===n.type&&Al(!1);var i=e.touches[0];if(i&&i.force>=.15){var o=n.actions.shouldRespectForcePress();if("PENDING"!==n.type)return o?n.hasMoved?void e.preventDefault():void t():void e.preventDefault();o&&t()}}},{eventName:oh,fn:t}]}(t),e),o=Cl(window,function(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(e){e.preventDefault()}},{eventName:"keydown",fn:function(e){"DRAGGING"===n().type?(27===e.keyCode&&e.preventDefault(),t()):t()}},{eventName:oh,fn:t}]}(t),e);n.current=function(){i(),o()}}),[c,r,s]),f=sl((function(){var e=r();"PENDING"!==e.type&&Al(!1);var t=e.actions.fluidLift(e.point);i({type:"DRAGGING",actions:t,hasMoved:!1})}),[r,i]),d=sl((function(e,t){"IDLE"!==r().type&&Al(!1);var n=setTimeout(f,120);i({type:"PENDING",point:t,actions:e,longPressTimerId:n}),l()}),[l,r,i,f]);jp((function(){return a(),function(){n.current();var e=r();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),i(dh))}}),[r,a,i]),jp((function(){return Cl(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}])}),[])}];function Ch(e){var t=e.contextId,n=e.store,r=e.registry,i=e.customSensors,o=e.enableDefaultSensors,a=[].concat(o?Eh:[],i||[]),s=(0,u.useState)((function(){return function(){var e=null;function t(){e||Al(!1),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&Al(!1);var n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}()}))[0],c=sl((function(e,t){e.isDragging&&!t.isDragging&&s.tryAbandon()}),[s]);jp((function(){var e=n.getState();return n.subscribe((function(){var t=n.getState();c(e,t),e=t}))}),[s,n,c]),jp((function(){return s.tryAbandon}),[s.tryAbandon]);var l=sl((function(e){return Sh({lockAPI:s,registry:r,store:n,draggableId:e})}),[s,r,n]),f=sl((function(e,i,o){return _h({lockAPI:s,registry:r,contextId:t,store:n,draggableId:e,forceSensorStop:i,sourceEvent:o&&o.sourceEvent?o.sourceEvent:null})}),[t,s,r,n]),d=sl((function(e){return function(e,t){var n=wh(e,t);return n?n.getAttribute(Tp.draggableId):null}(t,e)}),[t]),p=sl((function(e){var t=r.draggable.findById(e);return t?t.options:null}),[r.draggable]),h=sl((function(){s.isClaimed()&&(s.tryAbandon(),"IDLE"!==n.getState().phase&&n.dispatch({type:"FLUSH",payload:null}))}),[s,n]),v=sl(s.isClaimed,[s]),g=ul((function(){return{canGetLock:l,tryGetLock:f,findClosestDraggableId:d,findOptionsForDraggable:p,tryReleaseLock:h,isLockClaimed:v}}),[l,f,d,p,h,v]);Xp();for(var m=0;m<a.length;m++)a[m](g)}function Ih(e){return e.current||Al(!1),e.current}function Oh(e){var t=e.contextId,n=e.setCallbacks,r=e.sensors,i=e.nonce,o=e.dragHandleUsageInstructions,a=(0,u.useRef)(null);eh();var s=th(e),c=sl((function(){return function(e){return{onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}}(s.current)}),[s]),l=function(e){var t=ul((function(){return function(e){return"rbd-announcement-"+e}(e)}),[e]),n=(0,u.useRef)(null);return(0,u.useEffect)((function(){var e=document.createElement("div");return n.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),w(e.style,qp),Kp().appendChild(e),function(){setTimeout((function(){var t=Kp();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)}))}}),[t]),sl((function(e){var t=n.current;t&&(t.textContent=e)}),[])}(t),f=function(e){var t=e.contextId,n=e.text,r=Yp("hidden-text",{separator:"-"}),i=ul((function(){return function(e){return"rbd-hidden-text-"+e.contextId+"-"+e.uniqueId}({contextId:t,uniqueId:r})}),[r,t]);return(0,u.useEffect)((function(){var e=document.createElement("div");return e.id=i,e.textContent=n,e.style.display="none",Kp().appendChild(e),function(){var t=Kp();t.contains(e)&&t.removeChild(e)}}),[i,n]),i}({contextId:t,text:o}),d=zp(t,i),p=sl((function(e){Ih(a).dispatch(e)}),[]),h=ul((function(){return Sc({publishWhileDragging:yd,updateDroppableScroll:wd,updateDroppableIsEnabled:xd,updateDroppableIsCombineEnabled:kd,collectionStarting:bd},p)}),[p]),v=function(){var e=ul(Vp,[]);return(0,u.useEffect)((function(){return function(){requestAnimationFrame(e.clean)}}),[e]),e}(),g=ul((function(){return up(v,h)}),[v,h]),m=ul((function(){return Pp(w({scrollWindow:cp,scrollDroppable:g.scrollDroppable},Sc({move:Sd},p)))}),[g.scrollDroppable,p]),y=function(e){var t=(0,u.useRef)({}),n=(0,u.useRef)(null),r=(0,u.useRef)(null),i=(0,u.useRef)(!1),o=sl((function(e,n){var r={id:e,focus:n};return t.current[e]=r,function(){var n=t.current;n[e]!==r&&delete n[e]}}),[]),a=sl((function(t){var n=Wp(e,t);n&&n!==document.activeElement&&n.focus()}),[e]),s=sl((function(e,t){n.current===e&&(n.current=t)}),[]),c=sl((function(){r.current||i.current&&(r.current=requestAnimationFrame((function(){r.current=null;var e=n.current;e&&a(e)})))}),[a]),l=sl((function(e){n.current=null;var t=document.activeElement;t&&t.getAttribute(Tp.draggableId)===e&&(n.current=e)}),[]);return jp((function(){return i.current=!0,function(){i.current=!1;var e=r.current;e&&cancelAnimationFrame(e)}}),[]),ul((function(){return{register:o,tryRecordFocus:l,tryRestoreFocusRecorded:c,tryShiftRecord:s}}),[o,l,c,s])}(t),b=ul((function(){return tp({announce:l,autoScroller:m,dimensionMarshal:g,focusMarshal:y,getResponders:c,styleMarshal:d})}),[l,m,g,y,c,d]);a.current=b;var x=sl((function(){var e=Ih(a);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})}),[]),k=sl((function(){var e=Ih(a).getState();return e.isDragging||"DROP_ANIMATING"===e.phase}),[]);n(ul((function(){return{isDragging:k,tryAbort:x}}),[k,x]));var S=sl((function(e){return sp(Ih(a).getState(),e)}),[]),_=sl((function(){return Zf(Ih(a).getState())}),[]),E=ul((function(){return{marshal:g,focus:y,contextId:t,canLift:S,isMovementAllowed:_,dragHandleUsageInstructionsId:f,registry:v}}),[t,g,f,y,S,_,v]);return Ch({contextId:t,store:b,registry:v,customSensors:r,enableDefaultSensors:!1!==e.enableDefaultSensors}),(0,u.useEffect)((function(){return x}),[x]),u.createElement(Zp.Provider,{value:E},u.createElement(Pc,{context:Gp,store:b},e.children))}var Ah=0;function Dh(e){var t=ul((function(){return""+Ah++}),[]),n=e.dragHandleUsageInstructions||Rl;return u.createElement(Dl,null,(function(r){return u.createElement(Oh,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd},e.children)}))}var Ph=function(e){return function(t){return e===t}},Th=Ph("scroll"),Nh=Ph("auto"),Mh=(Ph("visible"),function(e,t){return t(e.overflowX)||t(e.overflowY)}),Rh=function(e){var t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return Mh(n,Th)||Mh(n,Nh)},Lh=function e(t){return null==t||t===document.body||t===document.documentElement?null:Rh(t)?t:e(t.parentElement)},jh=function(e){return{x:e.scrollLeft,y:e.scrollTop}},Fh=function e(t){return!!t&&("fixed"===window.getComputedStyle(t).position||e(t.parentElement))},Bh=function(e){return{closestScrollable:Lh(e),isFixedOnPage:Fh(e)}},zh=function(e){var t=e.ref,n=e.descriptor,r=e.env,i=e.windowScroll,o=e.direction,a=e.isDropDisabled,u=e.isCombineEnabled,s=e.shouldClipSubject,c=r.closestScrollable,l=function(e,t){var n=bl(e);if(!t)return n;if(e!==t)return n;var r=n.paddingBox.top-t.scrollTop,i=n.paddingBox.left-t.scrollLeft,o=r+t.scrollHeight,a=i+t.scrollWidth,u=fl({top:r,right:a,bottom:o,left:i},n.border);return hl({borderBox:u,margin:n.margin,border:n.border,padding:n.padding})}(t,c),f=ml(l,i),d=function(){if(!c)return null;var e=bl(c),t={scrollHeight:c.scrollHeight,scrollWidth:c.scrollWidth};return{client:e,page:ml(e,i),scroll:jh(c),scrollSize:t,shouldClipSubject:s}}(),p=function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,i=e.isFixedOnPage,o=e.direction,a=e.client,u=e.page,s=e.closest,c=function(){if(!s)return null;var e=s.scrollSize,t=s.client,n=np({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:s.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:s.shouldClipSubject,scroll:{initial:s.scroll,current:s.scroll,max:n,diff:{value:Bl,displacement:Bl}}}}(),l="vertical"===o?bf:wf;return{descriptor:t,isCombineEnabled:r,isFixedOnPage:i,axis:l,isEnabled:n,client:a,page:u,frame:c,subject:Zl({page:u,withPlaceholder:null,axis:l,frame:c})}}({descriptor:n,isEnabled:!a,isCombineEnabled:u,isFixedOnPage:r.isFixedOnPage,direction:o,client:l,page:f,closest:d});return p},Uh={passive:!1},Hh={passive:!0},Wh=function(e){return e.shouldPublishImmediately?Uh:Hh};function Vh(e){var t=(0,u.useContext)(e);return t||Al(!1),t}var Gh=function(e){return e&&e.env.closestScrollable||null};function Kh(){}var qh={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},$h=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,r=e.animate,i=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,r=e.animate;return t||"close"===r?qh:{height:n.client.borderBox.height,width:n.client.borderBox.width,margin:n.client.margin}}({isAnimatingOpenOnMount:t,placeholder:n,animate:r});return{display:n.display,boxSizing:"border-box",width:i.width,height:i.height,marginTop:i.margin.top,marginRight:i.margin.right,marginBottom:i.margin.bottom,marginLeft:i.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==r?Rd.placeholder:null}};var Jh=u.memo((function(e){var t=(0,u.useRef)(null),n=sl((function(){t.current&&(clearTimeout(t.current),t.current=null)}),[]),r=e.animate,i=e.onTransitionEnd,o=e.onClose,a=e.contextId,s=(0,u.useState)("open"===e.animate),c=s[0],l=s[1];(0,u.useEffect)((function(){return c?"open"!==r?(n(),l(!1),Kh):t.current?Kh:(t.current=setTimeout((function(){t.current=null,l(!1)})),n):Kh}),[r,c,n]);var f=sl((function(e){"height"===e.propertyName&&(i(),"close"===r&&o())}),[r,o,i]),d=$h({isAnimatingOpenOnMount:c,animate:e.animate,placeholder:e.placeholder});return u.createElement(e.placeholder.tagName,{style:d,"data-rbd-placeholder-context-id":a,onTransitionEnd:f,ref:e.innerRef})})),Yh=u.createContext(null);var Zh=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={isVisible:Boolean(t.props.on),data:t.props.on,animate:t.props.shouldAnimate&&t.props.on?"open":"none"},t.onClose=function(){"close"===t.state.animate&&t.setState({isVisible:!1})},t}return Go(t,e),t.getDerivedStateFromProps=function(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}},t.prototype.render=function(){if(!this.state.isVisible)return null;var e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)},t}(u.PureComponent),Xh=5e3,Qh=4500,ev=function(e,t){return t?Rd.drop(t.duration):e?Rd.snap:Rd.fluid},tv=function(e,t){return e?t?Td.drop:Td.combining:null};function nv(e){return"DRAGGING"===e.type?function(e){var t=e.dimension.client,n=e.offset,r=e.combineWith,i=e.dropping,o=Boolean(r),a=function(e){return null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode}(e),u=Boolean(i),s=u?Fd(n,o):jd(n);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:ev(a,i),transform:s,opacity:tv(o,u),zIndex:u?Qh:Xh,pointerEvents:"none"}}(e):{transform:jd((t=e).offset),transition:t.shouldAnimateDisplacement?null:"none"};var t}function rv(e){var t=Yp("draggable"),n=e.descriptor,r=e.registry,i=e.getDraggableRef,o=e.canDragInteractiveElements,a=e.shouldRespectForcePress,s=e.isEnabled,c=ul((function(){return{canDragInteractiveElements:o,shouldRespectForcePress:a,isEnabled:s}}),[o,s,a]),l=sl((function(e){var t=i();return t||Al(!1),function(e,t,n){void 0===n&&(n=Bl);var r=window.getComputedStyle(t),i=t.getBoundingClientRect(),o=yl(i,r),a=ml(o,n);return{descriptor:e,placeholder:{client:o,tagName:t.tagName.toLowerCase(),display:r.display},displaceBy:{x:o.marginBox.width,y:o.marginBox.height},client:o,page:a}}(n,t,e)}),[n,i]),f=ul((function(){return{uniqueId:t,descriptor:n,options:c,getDimension:l}}),[n,l,c,t]),d=(0,u.useRef)(f),p=(0,u.useRef)(!0);jp((function(){return r.draggable.register(d.current),function(){return r.draggable.unregister(d.current)}}),[r.draggable]),jp((function(){if(p.current)p.current=!1;else{var e=d.current;d.current=f,r.draggable.update(f,e)}}),[f,r.draggable])}function iv(e,t,n){Qp()}function ov(e){e.preventDefault()}var av=function(e,t){return e===t},uv=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null};function sv(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var cv={mapped:{type:"SECONDARY",offset:Bl,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:sv(null)}};var lv=ol((function(){var e=function(){var e=kl((function(e,t){return{x:e,y:t}})),t=kl((function(e,t,n,r,i){return{isDragging:!0,isClone:t,isDropAnimating:Boolean(i),dropAnimation:i,mode:e,draggingOver:n,combineWith:r,combineTargetFor:null}})),n=kl((function(e,n,r,i,o,a,u){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:o,combineWith:a,mode:n,offset:e,dimension:r,forceShouldAnimate:u,snapshot:t(n,i,o,a,null)}}}));return function(r,i){if(r.isDragging){if(r.critical.draggable.id!==i.draggableId)return null;var o=r.current.client.offset,a=r.dimensions.draggables[i.draggableId],u=Jf(r.impact),s=(l=r.impact).at&&"COMBINE"===l.at.type?l.at.combine.draggableId:null,c=r.forceShouldAnimate;return n(e(o.x,o.y),r.movementMode,a,i.isClone,u,s,c)}var l;if("DROP_ANIMATING"===r.phase){var f=r.completed;if(f.result.draggableId!==i.draggableId)return null;var d=i.isClone,p=r.dimensions.draggables[i.draggableId],h=f.result,v=h.mode,g=uv(h),m=function(e){return e.combine?e.combine.draggableId:null}(h),y={duration:r.dropDuration,curve:Pd,moveTo:r.newHomeClientOffset,opacity:m?Td.drop:null,scale:m?Nd.drop:null};return{mapped:{type:"DRAGGING",offset:r.newHomeClientOffset,dimension:p,dropping:y,draggingOver:g,combineWith:m,mode:v,forceShouldAnimate:null,snapshot:t(v,d,g,m,y)}}}return null}}(),t=function(){var e=kl((function(e,t){return{x:e,y:t}})),t=kl(sv),n=kl((function(e,n,r){return void 0===n&&(n=null),{mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:t(n)}}})),r=function(e){return e?n(Bl,e,!0):null},i=function(t,i,o,a){var u=o.displaced.visible[t],s=Boolean(a.inVirtualList&&a.effected[t]),c=lf(o),l=c&&c.draggableId===t?i:null;if(!u){if(!s)return r(l);if(o.displaced.invisible[t])return null;var f=Wl(a.displacedBy.point),d=e(f.x,f.y);return n(d,l,!0)}if(s)return r(l);var p=o.displacedBy.point,h=e(p.x,p.y);return n(h,l,u.shouldAnimate)};return function(e,t){if(e.isDragging)return e.critical.draggable.id===t.draggableId?null:i(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){var n=e.completed;return n.result.draggableId===t.draggableId?null:i(t.draggableId,n.result.draggableId,n.impact,n.afterCritical)}return null}}();return function(n,r){return e(n,r)||t(n,r)||cv}}),{dropAnimationFinished:Dd},null,{context:Gp,pure:!0,areStatePropsEqual:av})((function(e){var t=(0,u.useRef)(null),n=sl((function(e){t.current=e}),[]),r=sl((function(){return t.current}),[]),i=Vh(Zp),o=i.contextId,a=i.dragHandleUsageInstructionsId,s=i.registry,c=Vh(Yh),l=c.type,f=c.droppableId,d=ul((function(){return{id:e.draggableId,index:e.index,type:l,droppableId:f}}),[e.draggableId,e.index,l,f]),p=e.children,h=e.draggableId,v=e.isEnabled,g=e.shouldRespectForcePress,m=e.canDragInteractiveElements,y=e.isClone,b=e.mapped,w=e.dropAnimationFinished;iv(),Xp(),y||rv(ul((function(){return{descriptor:d,registry:s,getDraggableRef:r,canDragInteractiveElements:m,shouldRespectForcePress:g,isEnabled:v}}),[d,s,r,m,g,v]));var x=ul((function(){return v?{tabIndex:0,role:"button","aria-describedby":a,"data-rbd-drag-handle-draggable-id":h,"data-rbd-drag-handle-context-id":o,draggable:!1,onDragStart:ov}:null}),[o,a,h,v]),k=sl((function(e){"DRAGGING"===b.type&&b.dropping&&"transform"===e.propertyName&&w()}),[w,b]),S=ul((function(){var e=nv(b),t="DRAGGING"===b.type&&b.dropping?k:null;return{innerRef:n,draggableProps:{"data-rbd-draggable-context-id":o,"data-rbd-draggable-id":h,style:e,onTransitionEnd:t},dragHandleProps:x}}),[o,x,h,b,k,n]),_=ul((function(){return{draggableId:d.id,type:d.type,source:{index:d.index,droppableId:d.droppableId}}}),[d.droppableId,d.id,d.index,d.type]);return p(S,b.snapshot,_)}));function fv(e){return Vh(Yh).isUsingCloneFor!==e.draggableId||e.isClone?u.createElement(lv,e):null}function dv(e){var t="boolean"!==typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return u.createElement(fv,w({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}var pv=function(e,t){return e===t.droppable.type},hv=function(e,t){return t.draggables[e.draggable.id]};var vv,gv={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||Al(!1),document.body}},mv=ol((function(){var e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t=w({},e,{shouldAnimatePlaceholder:!1}),n=kl((function(e){return{draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}}})),r=kl((function(r,i,o,a,u,s){var c=u.descriptor.id;if(u.descriptor.droppableId===r){var l=s?{render:s,dragging:n(u.descriptor)}:null,f={isDraggingOver:o,draggingOverWith:o?c:null,draggingFromThisWith:c,isUsingPlaceholder:!0};return{placeholder:u.placeholder,shouldAnimatePlaceholder:!1,snapshot:f,useClone:l}}if(!i)return t;if(!a)return e;var d={isDraggingOver:o,draggingOverWith:c,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:u.placeholder,shouldAnimatePlaceholder:!0,snapshot:d,useClone:null}}));return function(n,i){var o=i.droppableId,a=i.type,u=!i.isDropDisabled,s=i.renderClone;if(n.isDragging){var c=n.critical;if(!pv(a,c))return t;var l=hv(c,n.dimensions),f=Jf(n.impact)===o;return r(o,u,f,f,l,s)}if("DROP_ANIMATING"===n.phase){var d=n.completed;if(!pv(a,d.critical))return t;var p=hv(d.critical,n.dimensions);return r(o,u,uv(d.result)===o,Jf(d.impact)===o,p,s)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){var h=n.completed;if(!pv(a,h.critical))return t;var v=Jf(h.impact)===o,g=Boolean(h.impact.at&&"COMBINE"===h.impact.at.type),m=h.critical.droppable.id===o;return v?g?e:t:m?e:t}return t}}),{updateViewportMaxScroll:function(e){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}}},null,{context:Gp,pure:!0,areStatePropsEqual:av})((function(e){var t=(0,u.useContext)(Zp);t||Al(!1);var n=t.contextId,r=t.isMovementAllowed,i=(0,u.useRef)(null),o=(0,u.useRef)(null),a=e.children,c=e.droppableId,l=e.type,f=e.mode,d=e.direction,p=e.ignoreContainerClipping,h=e.isDropDisabled,v=e.isCombineEnabled,g=e.snapshot,m=e.useClone,y=e.updateViewportMaxScroll,b=e.getContainerForClone,w=sl((function(){return i.current}),[]),x=sl((function(e){i.current=e}),[]),k=(sl((function(){return o.current}),[]),sl((function(e){o.current=e}),[]));Qp();var S=sl((function(){r()&&y({maxScroll:ip()})}),[r,y]);!function(e){var t=(0,u.useRef)(null),n=Vh(Zp),r=Yp("droppable"),i=n.registry,o=n.marshal,a=th(e),s=ul((function(){return{id:e.droppableId,type:e.type,mode:e.mode}}),[e.droppableId,e.mode,e.type]),c=(0,u.useRef)(s),l=ul((function(){return kl((function(e,n){t.current||Al(!1);var r={x:e,y:n};o.updateDroppableScroll(s.id,r)}))}),[s.id,o]),f=sl((function(){var e=t.current;return e&&e.env.closestScrollable?jh(e.env.closestScrollable):Bl}),[]),d=sl((function(){var e=f();l(e.x,e.y)}),[f,l]),p=ul((function(){return Sl(d)}),[d]),h=sl((function(){var e=t.current,n=Gh(e);e&&n||Al(!1),e.scrollOptions.shouldPublishImmediately?d():p()}),[p,d]),v=sl((function(e,r){t.current&&Al(!1);var i=a.current,o=i.getDroppableRef();o||Al(!1);var u=Bh(o),c={ref:o,descriptor:s,env:u,scrollOptions:r};t.current=c;var l=zh({ref:o,descriptor:s,env:u,windowScroll:e,direction:i.direction,isDropDisabled:i.isDropDisabled,isCombineEnabled:i.isCombineEnabled,shouldClipSubject:!i.ignoreContainerClipping}),f=u.closestScrollable;return f&&(f.setAttribute(Rp.contextId,n.contextId),f.addEventListener("scroll",h,Wh(c.scrollOptions))),l}),[n.contextId,s,h,a]),g=sl((function(){var e=t.current,n=Gh(e);return e&&n||Al(!1),jh(n)}),[]),m=sl((function(){var e=t.current;e||Al(!1);var n=Gh(e);t.current=null,n&&(p.cancel(),n.removeAttribute(Rp.contextId),n.removeEventListener("scroll",h,Wh(e.scrollOptions)))}),[h,p]),y=sl((function(e){var n=t.current;n||Al(!1);var r=Gh(n);r||Al(!1),r.scrollTop+=e.y,r.scrollLeft+=e.x}),[]),b=ul((function(){return{getDimensionAndWatchScroll:v,getScrollWhileDragging:g,dragStopped:m,scroll:y}}),[m,v,g,y]),w=ul((function(){return{uniqueId:r,descriptor:s,callbacks:b}}),[b,s,r]);jp((function(){return c.current=w.descriptor,i.droppable.register(w),function(){t.current&&m(),i.droppable.unregister(w)}}),[b,s,m,w,o,i.droppable]),jp((function(){t.current&&o.updateDroppableIsEnabled(c.current.id,!e.isDropDisabled)}),[e.isDropDisabled,o]),jp((function(){t.current&&o.updateDroppableIsCombineEnabled(c.current.id,e.isCombineEnabled)}),[e.isCombineEnabled,o])}({droppableId:c,type:l,mode:f,direction:d,isDropDisabled:h,isCombineEnabled:v,ignoreContainerClipping:p,getDroppableRef:w});var _=u.createElement(Zh,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},(function(e){var t=e.onClose,r=e.data,i=e.animate;return u.createElement(Jh,{placeholder:r,onClose:t,innerRef:k,animate:i,contextId:n,onTransitionEnd:S})})),E=ul((function(){return{innerRef:x,placeholder:_,droppableProps:{"data-rbd-droppable-id":c,"data-rbd-droppable-context-id":n}}}),[n,c,_,x]),C=m?m.dragging.draggableId:null,I=ul((function(){return{droppableId:c,type:l,isUsingCloneFor:C}}),[c,C,l]);return u.createElement(Yh.Provider,{value:I},a(E,g),function(){if(!m)return null;var e=m.dragging,t=m.render,n=u.createElement(fv,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(function(n,r){return t(n,r,e)}));return s.createPortal(n,b())}())}));mv.defaultProps=gv;var yv,bv=nt.div(vv||(vv=i(["\n align-items: center;\n display: flex;\n margin-bottom: 8px;\n"]))),wv=function(e){var t,n=e.group,r=(0,u.createRef)(),i=Qt(),o=en((function(e){return e.settings.spellCheckerEnabled})),a=en((function(e){return e.settings.canEdit})),s=en((function(e){return e.tasks.groups})),c=n.name,l=ot((0,u.useState)(null!==(t=n.draft)&&void 0!==t?t:""),2),f=l[0],d=l[1];if(nn((function(){var e;(null!==(e=n.draft)&&void 0!==e?e:"")!==f&&i(Xi({groupName:c,draft:f}))})),!a)return(0,uo.jsx)(uo.Fragment,{});var p=function(e,t){return 0===e.length||e.reduce((function(e,t){return e.lastActive?t.lastActive?e.lastActive>t.lastActive?e:t:e:t})).name===t}(s,c);return(0,uo.jsx)(bv,{children:(0,uo.jsx)(Vs,{testId:"create-task-input",disabled:!a,enterKeyHint:"go",onChange:function(e){d(e.target.value)},onKeyPress:function(e){if("Enter"===e.key){var t=e.target.value;if(0===t.length)return;i(ji({task:{id:_i(),description:t},groupName:c})),d("")}},placeholder:"Type a task and press enter",ref:r,spellCheck:o,value:f,autoFocus:p})})},xv=nt.button(yv||(yv=i(["\n background-color: var(--sn-stylekit-contrast-background-color);\n border-radius: 4px;\n border-style: none;\n color: var(--sn-stylekit-paragraph-text-color);\n cursor: pointer;\n display: inline;\n font-size: var(--sn-stylekit-font-size-h6);\n font-weight: 500;\n height: 25px;\n margin-right: 10px;\n opacity: 0.96;\n padding: 4px 10px 4px;\n\n &:hover {\n opacity: 0.8;\n text-decoration: none;\n }\n"]))),kv=function(e){var t=e.groupName,n=Qt(),r=en((function(e){return e.settings.canEdit})),i=ot((0,u.useState)(!1),2),o=i[0],a=i[1],s=ot((0,u.useState)(!1),2),c=s[0],l=s[1];return r?(0,uo.jsxs)("div",{"data-testid":"completed-tasks-actions",children:[(0,uo.jsx)(xv,{onClick:function(){return a(!0)},"data-testid":"reopen-completed-button",children:"Reopen Completed"}),(0,uo.jsx)(xv,{onClick:function(){return l(!0)},"data-testid":"delete-completed-button",children:"Delete Completed"}),o&&(0,uo.jsxs)(ms,{testId:"reopen-all-tasks-dialog",confirmButtonStyle:"danger",confirmButtonCb:function(){return n(Ui({groupName:t}))},cancelButtonCb:function(){return a(!1)},children:["Are you sure you want to reopen completed tasks in the '",(0,uo.jsx)("strong",{children:t}),"' group?"]}),c&&(0,uo.jsxs)(ms,{testId:"delete-completed-tasks-dialog",confirmButtonStyle:"danger",confirmButtonCb:function(){return n(Hi({groupName:t}))},cancelButtonCb:function(){return l(!1)},children:["Are you sure you want to delete completed tasks in the '",(0,uo.jsx)("strong",{children:t}),"' group?"]})]}):(0,uo.jsx)(uo.Fragment,{})};var Sv=u.createContext(null);function _v(e,t){var n=Object.create(null);return e&&u.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,u.isValidElement)(e)?t(e):e}(e)})),n}function Ev(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Cv(e,t){return _v(e.children,(function(n){return(0,u.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:Ev(n,"appear",e),enter:Ev(n,"enter",e),exit:Ev(n,"exit",e)})}))}function Iv(e,t,n){var r=_v(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var u={};for(var s in t){if(i[s])for(r=0;r<i[s].length;r++){var c=i[s][r];u[i[s][r]]=n(c)}u[s]=n(s)}for(r=0;r<o.length;r++)u[o[r]]=n(o[r]);return u}(t,r);return Object.keys(i).forEach((function(o){var a=i[o];if((0,u.isValidElement)(a)){var s=o in t,c=o in r,l=t[o],f=(0,u.isValidElement)(l)&&!l.props.in;!c||s&&!f?c||!s||f?c&&s&&(0,u.isValidElement)(l)&&(i[o]=(0,u.cloneElement)(a,{onExited:n.bind(null,a),in:l.props.in,exit:Ev(a,"exit",e),enter:Ev(a,"enter",e)})):i[o]=(0,u.cloneElement)(a,{in:!1}):i[o]=(0,u.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:Ev(a,"exit",e),enter:Ev(a,"enter",e)})}})),i}var Ov=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},Av=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}Go(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?Cv(e,r):Iv(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=_v(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=w({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Eo(e,["component","childFactory"]),i=this.state.contextValue,o=Ov(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?u.createElement(Sv.Provider,{value:i},o):u.createElement(Sv.Provider,{value:i},u.createElement(t,r,o))},t}(u.Component);Av.propTypes={},Av.defaultProps={component:"div",childFactory:function(e){return e}};var Dv=Av;function Pv(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var Tv=!1,Nv="unmounted",Mv="exited",Rv="entering",Lv="entered",jv="exiting",Fv=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=Mv,r.appearStatus=Rv):i=Lv:i=t.unmountOnExit||t.mountOnEnter?Nv:Mv,r.state={status:i},r.nextCallback=null,r}Go(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Nv?{status:Mv}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Rv&&n!==Lv&&(t=Rv):n!==Rv&&n!==Lv||(t=jv)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===Rv?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===Mv&&this.setState({status:Nv})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[s.findDOMNode(this),r],o=i[0],a=i[1],u=this.getTimeouts(),c=r?u.appear:u.enter;!e&&!n||Tv?this.safeSetState({status:Lv},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:Rv},(function(){t.props.onEntering(o,a),t.onTransitionEnd(c,(function(){t.safeSetState({status:Lv},(function(){t.props.onEntered(o,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:s.findDOMNode(this);t&&!Tv?(this.props.onExit(r),this.safeSetState({status:jv},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Mv},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:Mv},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:s.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Nv)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Eo(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return u.createElement(Sv.Provider,{value:null},"function"===typeof n?n(e,r):u.cloneElement(u.Children.only(n),r))},t}(u.Component);function Bv(){}Fv.contextType=Sv,Fv.propTypes={},Fv.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Bv,onEntering:Bv,onEntered:Bv,onExit:Bv,onExiting:Bv,onExited:Bv},Fv.UNMOUNTED=Nv,Fv.EXITED=Mv,Fv.ENTERING=Rv,Fv.ENTERED=Lv,Fv.EXITING=jv;var zv=Fv,Uv=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"===typeof n.className?n.className=Pv(n.className,r):n.setAttribute("class",Pv(n.className&&n.className.baseVal||"",r)));var n,r}))},Hv=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1];t.removeClasses(i,"exit"),t.addClass(i,o?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1]?"appear":"enter";t.addClass(i,o,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1]?"appear":"enter";t.removeClasses(i,o),t.addClass(i,o,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"===typeof n,i=r?""+(r&&n?n+"-":"")+e:n[e];return{baseClassName:i,activeClassName:r?i+"-active":n[e+"Active"],doneClassName:r?i+"-done":n[e+"Done"]}},t}Go(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&i&&(r+=" "+i),"active"===n&&e&&e.scrollTop,r&&(this.appliedClasses[t][n]=r,function(e,t){e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"===typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r}))}(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,o=n.done;this.appliedClasses[t]={},r&&Uv(e,r),i&&Uv(e,i),o&&Uv(e,o)},n.render=function(){var e=this.props,t=(e.classNames,Eo(e,["classNames"]));return u.createElement(zv,w({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(u.Component);Hv.defaultProps={classNames:""},Hv.propTypes={};var Wv,Vv,Gv,Kv,qv,$v,Jv=Hv,Yv=nt.div(Wv||(Wv=i(["\n align-content: center;\n align-items: center;\n display: flex;\n flex-direction: row;\n min-width: 10%;\n max-width: 90%;\n"]))),Zv=function(e){var t=e.task,n=e.groupName,r=(0,u.useRef)(null),i=(0,u.useRef)(null),o=Qt(),a=en((function(e){return e.settings.canEdit})),s=en((function(e){return e.settings.spellCheckerEnabled})),c=ot((0,u.useState)(!!t.completed),2),l=c[0],f=c[1],d=ot((0,u.useState)(t.description),2),p=d[0],h=d[1];function v(e){if(e){e.style.height="1px",e.style.height=e.scrollHeight-4+"px";var t=parseFloat(e.style.height),n=r.current;t>20?(null===n||void 0===n||n.classList.add("align-baseline"),null===n||void 0===n||n.classList.remove("align-center")):(null===n||void 0===n||n.classList.add("align-center"),null===n||void 0===n||n.classList.remove("align-baseline"))}}return nn((function(){p!==t.description&&o(Fi({task:{id:t.id,description:p},groupName:n}))})),tn(i,v),(0,uo.jsxs)(Yv,{className:"task-item","data-testid":"task-item",ref:r,children:[(0,uo.jsx)(so,{testId:"check-box-input",checked:l,disabled:!a,onChange:function(){var e=!l;f(e);var r,a=i.current;e?null===a||void 0===a||(r=a.classList).add.apply(r,["cross-out","info-color"]):null===a||void 0===a||a.classList.add("no-text-decoration"),o(Bi({id:t.id,groupName:n}))},onClick:function(e){var n,i=e.currentTarget,o=null===(n=r.current)||void 0===n?void 0:n.parentElement;t.completed?(i.classList.remove("explode"),null===o||void 0===o||o.classList.add("completed")):(i.classList.add("explode"),null===o||void 0===o||o.classList.add("opened"))}}),(0,uo.jsx)(Hs,{testId:"text-area-input",className:"text-area-input",disabled:!a||!!l,onChange:function(e){h(e.target.value)},onKeyPress:function(e){"Enter"===e.key&&e.preventDefault()},onKeyUp:function(e){"Enter"===e.key&&0===p.length&&(o(zi({id:t.id,groupName:n})),e.preventDefault()),v(e.target)},ref:i,spellCheck:s,value:p})]})},Xv=["style"],Qv=nt.div(Vv||(Vv=i(["\n align-items: center;\n display: flex;\n\n & > *:first-child {\n margin-right: 14px;\n }\n"]))),eg=nt.div(Gv||(Gv=i(["\n display: flex;\n flex-direction: column;\n\n & > *:not(:last-child) {\n margin-bottom: 9px;\n }\n"]))),tg=nt.div(Kv||(Kv=i(["\n margin-bottom: ",";\n"])),(function(e){var t=e.addMargin,n=e.items,r=e.collapsed;return t&&n>0&&!r?"10px":"0"})),ng=nt.div(qv||(qv=i(["\n margin-top: ",";\n"])),(function(e){var t=e.addMargin,n=e.items;return t&&n>0?"15px":"0"})),rg=nt.div($v||($v=i(["\n color: var(--sn-stylekit-foreground-color);\n"])));var ig,og,ag=function(e,t){return ur(ur({},t),e&&{color:"var(--sn-stylekit-info-color)",fontWeight:500})},ug=function(e){var t=e.groupName,n=e.tasks,r=e.section,i=e.allTasks,o=e.testId,a=e.children,s=Qt(),c=en((function(e){return e.settings.canEdit})),l="".concat(r.id,"-droppable"),f=ot((0,u.useState)(!!r.collapsed),2),d=f[0],p=f[1];function h(){p(!d)}var v=function(e){var t=(0,u.useRef)();return(0,u.useEffect)((function(){t.current=e}),[e]),t.current}(i);return(0,u.useEffect)((function(){s(Zi({groupName:t,type:r.id,collapsed:d}))}),[d,s,t,r.id]),(0,uo.jsx)(tg,{"data-testid":o,addMargin:"open-tasks"===r.id,items:n.length,collapsed:d,children:(0,uo.jsx)(mv,{droppableId:l,isDropDisabled:!c,children:function(e){return(0,uo.jsxs)(rg,{children:[(0,uo.jsx)(Qv,{children:(0,uo.jsx)(zs,{onClick:h,children:r.name})}),!d&&(0,uo.jsxs)(eg,ur(ur({},e.droppableProps),{},{className:"".concat(r.id,"-container"),ref:e.innerRef,children:[(0,uo.jsx)(Dv,{component:null,children:n.map((function(e,n){var r=function(e){return{enter:e?1800:1200,exit:e?1200:1800}}(e.completed);return(0,uo.jsx)(Jv,{timeout:r,classNames:{enter:"fade-in",enterActive:"fade-in",enterDone:"fade-in",exit:"fade-out",exitActive:"fade-out",exitDone:"fade-out"},onEnter:function(t){var n=v.find((function(t){return t.id===e.id}));n&&t.classList.add("hide");var r=!!e.completed;r&&t.classList.add("explode"),!r&&t.classList.remove("explode")},onEntered:function(e){e.classList.remove("hide"),setTimeout((function(){var t;return(t=e.classList).remove.apply(t,["fade-in","explode"])}),r.enter)},children:(0,uo.jsx)(dv,{draggableId:"draggable-".concat(e.id),index:n,isDragDisabled:!c,children:function(n,r){var i=n.innerRef,o=n.draggableProps,a=n.dragHandleProps,u=r.isDragging,s=o.style,c=bs(o,Xv);return(0,uo.jsx)("div",ur(ur(ur({style:ag(u,s),ref:i},c),a),{},{children:(0,uo.jsx)(Zv,{task:e,groupName:t},"task-item-".concat(e.id))}))}},"draggable-".concat(e.id))},e.id)}))}),e.placeholder]})),(0,uo.jsx)(ng,{addMargin:"completed-tasks"===r.id,items:n.length,children:a})]})}})})},sg=nt.div(ig||(ig=i(["\n position: relative;\n"]))),cg=function(e){var t,n=e.group,r=Qt(),i=en((function(e){return e.tasks.defaultSections}));function o(e){if(!!e.destination){var t=e.source,i=e.destination;i&&r(Ki({groupName:n.name,swapTaskIndex:t.index,withTaskIndex:i.index,isSameSection:t.droppableId===i.droppableId}))}}var a=null!==(t=n.sections)&&void 0!==t?t:i;return(0,uo.jsx)(sg,{"data-testid":"task-section-list",children:a.map((function(e){var t=n.tasks.filter((function(t){return"completed-tasks"===e.id?!0===t.completed:!t.completed}));return(0,uo.jsx)(Dh,{onDragEnd:o,children:(0,uo.jsx)(ug,{testId:"".concat(e.id,"-section"),groupName:n.name,section:e,tasks:t,allTasks:n.tasks,children:"completed-tasks"===e.id&&t.length>0&&(0,uo.jsx)(kv,{groupName:n.name})})},"".concat(e.id,"-section-dnd"))}))})},lg=["bottom","height","left","right","top","width"],fg=new Map,dg=function e(){var t=[];fg.forEach((function(e,n){var r=n.getBoundingClientRect();(function(e,t){return void 0===e&&(e={}),void 0===t&&(t={}),lg.some((function(n){return e[n]!==t[n]}))})(r,e.rect)&&(e.rect=r,t.push(e))})),t.forEach((function(e){e.callbacks.forEach((function(t){return t(e.rect)}))})),og=window.requestAnimationFrame(e)};var pg=function(e,t){return{observe:function(){var n=0===fg.size;fg.has(e)?fg.get(e).callbacks.push(t):fg.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]}),n&&dg()},unobserve:function(){var n=fg.get(e);if(n){var r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||fg.delete(e),fg.size||cancelAnimationFrame(og)}}}};function hg(e,t,n){var r,i,o;"boolean"===typeof t?r=t:(r=null==(o=null==t?void 0:t.observe)||o,i=null==t?void 0:t.onChange);bo(n)&&(i=n);var a=(0,u.useState)(e.current),s=a[0],c=a[1],l=(0,u.useRef)(!1),f=(0,u.useRef)(!1),d=(0,u.useState)(null),p=d[0],h=d[1],v=(0,u.useRef)(i);return ho((function(){v.current=i,e.current!==s&&c(e.current)})),ho((function(){s&&!l.current&&(l.current=!0,h(s.getBoundingClientRect()))}),[s]),ho((function(){if(r){var t=s;if(f.current||(f.current=!0,t=e.current),t){var n=pg(t,(function(e){null==v.current||v.current(e),h(e)}));return n.observe(),function(){n.unobserve()}}}}),[r,s,e]),p}var vg=n(9),gg=n.n(vg);function mg(){return mg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mg.apply(this,arguments)}var yg=["as","targetRef","position","unstable_observableRefs"],bg=(0,u.forwardRef)((function(e,t){return(0,u.createElement)(go,null,(0,u.createElement)(wg,mg({ref:t},e)))}));var wg=(0,u.forwardRef)((function(e,t){var n=e.as,r=void 0===n?"div":n,i=e.targetRef,o=e.position,a=void 0===o?Sg:o,s=e.unstable_observableRefs,c=void 0===s?[]:s,l=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,yg),f=(0,u.useRef)(null),d=hg(f,{observe:!l.hidden}),p=hg(i,{observe:!l.hidden}),h=So(f,t);return function(e,t){var n=mo(e.current);function r(e){"Tab"===e.key&&t.current&&0===gg()(t.current).length||("Tab"===e.key&&e.shiftKey?l(e)?f(e):d(e)?p(e):v(e)&&m():"Tab"===e.key&&(o()?a(e):s()?c(e):h(e)&&m()))}function i(){var r=gg()(n),i=r&&e.current?r.indexOf(e.current):-1,o=r&&r[i+1];return(!t.current||!t.current.contains(o||null))&&o}function o(){return!!e.current&&e.current===n.activeElement}function a(e){var n=t.current&&gg()(t.current);n&&n[0]&&(e.preventDefault(),n[0].focus())}function s(){if(!!t.current&&t.current.contains(n.activeElement||null)){var e=t.current&&gg()(t.current);return Boolean(e&&e[e.length-1]===n.activeElement)}return!1}function c(e){var t=i();t&&(e.preventDefault(),t.focus())}function l(e){if(e.shiftKey){var t=i();return e.target===t}}function f(e){var n=t.current&&gg()(t.current),r=n&&n[n.length-1];r&&(e.preventDefault(),r.focus())}function d(e){var n=t.current&&gg()(t.current);return!!n&&(0!==n.length&&e.target===n[0])}function p(t){var n;t.preventDefault(),null==(n=e.current)||n.focus()}function h(e){var r=t.current?gg()(n).filter((function(e){return!t.current.contains(e)})):null;return!!r&&e.target===r[r.length-1]}function v(e){return e.target===gg()(n)[0]}(0,u.useEffect)((function(){return n.addEventListener("keydown",r),function(){n.removeEventListener("keydown",r)}}),[]);var g=[];function m(){var e=t.current&&gg()(t.current);e&&(e.forEach((function(e){g.push([e,e.tabIndex]),e.tabIndex=-1})),n.addEventListener("focusin",y))}function y(){n.removeEventListener("focusin",y),g.forEach((function(e){var t=e[0],n=e[1];t.tabIndex=n}))}}(i,f),(0,u.createElement)(r,mg({"data-reach-popover":"",ref:h},l,{style:mg({position:"absolute"},xg.apply(void 0,[a,p,d].concat(c)),l.style)}))}));function xg(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];return n?e.apply(void 0,[t,n].concat(i.map((function(e){return e.current})))):{visibility:"hidden"}}function kg(e,t,n){return{top:n?e.top-t.height+window.pageYOffset+"px":e.top+e.height+window.pageYOffset+"px"}}var Sg=function(e,t){if(!e||!t)return{};var n=_g(e,t),r=n.directionRight,i=n.directionUp;return mg({left:r?e.right-t.width+window.pageXOffset+"px":e.left+window.pageXOffset+"px"},kg(e,t,i))};function _g(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var i={top:e.top-t.height<0,right:window.innerWidth<e.left+t.width-n,bottom:window.innerHeight<e.bottom+t.height-r,left:e.left+e.width-t.width<0};return{directionRight:i.right&&!i.left,directionLeft:i.left&&!i.right,directionUp:i.bottom&&!i.top,directionDown:i.top&&!i.bottom}}function Eg(){return Eg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Eg.apply(this,arguments)}var Cg=["element","index"];function Ig(e,t){void 0===t&&(t={});return Xu(0,Eg({descendants:[],registerDescendant:yo,unregisterDescendant:yo},t))}function Og(e){var t=e.context,n=e.children,r=e.items,i=e.set,o=(0,u.useCallback)((function(e){var t=e.element,n=e.index,r=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,Cg);t&&i((function(e){var i;if(null!=n)return[].concat(e,[Eg({},r,{element:t,index:n})]).sort((function(e,t){return e.index-t.index}));if(0===e.length)i=[Eg({},r,{element:t,index:0})];else if(e.find((function(e){return e.element===t})))i=e;else{var o=e.findIndex((function(e){return!(!e.element||!t)&&Boolean(e.element.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)})),a=Eg({},r,{element:t,index:o});i=-1===o?[].concat(e,[a]):[].concat(e.slice(0,o),[a],e.slice(o))}return i.map((function(e,t){return Eg({},e,{index:t})}))}))}),[]),a=(0,u.useCallback)((function(e){e&&i((function(t){return t.filter((function(t){return e!==t.element}))}))}),[]);return(0,u.createElement)(t.Provider,{value:(0,u.useMemo)((function(){return{descendants:r,registerDescendant:o,unregisterDescendant:a}}),[r,o,a])},n)}function Ag(e){return"which"in e?3===e.which:"button"in e&&2===e.button}function Dg(e){var t=(0,u.useRef)(null);return(0,u.useEffect)((function(){t.current=e}),[e]),t.current}function Pg(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function Tg(){return Tg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tg.apply(this,arguments)}var Ng=["onKeyDown","onMouseDown","id","ref"],Mg=["index","isLink","onClick","onDragStart","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseUp","onSelect","disabled","onFocus","valueText","ref"],Rg=["id","onKeyDown","ref"],Lg=["onBlur","portal","position","ref"],jg="CLEAR_SELECTION_INDEX",Fg="CLICK_MENU_ITEM",Bg="CLOSE_MENU",zg="OPEN_MENU_AT_INDEX",Ug="OPEN_MENU_CLEARED",Hg="SEARCH_FOR_ITEM",Wg="SELECT_ITEM_AT_INDEX",Vg="SET_BUTTON_ID",Gg=Ig(),Kg=Xu(0,{}),qg={triggerId:null,isExpanded:!1,typeaheadQuery:"",selectionIndex:-1},$g=function(e){var t=e.id,n=e.children,r=(0,u.useRef)(null),i=(0,u.useRef)(null),o=(0,u.useRef)(null),a=(0,u.useState)([]),s=a[0],c=a[1],l=Zu(t),f=t||Qu("menu",l),d=Qu("menu-button",f),p=(0,u.useReducer)(tm,Tg({},qg,{triggerId:d})),h=p[0],v=p[1],g=(0,u.useRef)(!1),m=(0,u.useRef)([]),y=(0,u.useRef)(!1),b=(0,u.useRef)({x:0,y:0}),w={dispatch:v,dropdownId:f,dropdownRef:i,mouseDownStartPosRef:b,popoverRef:o,readyToSelect:y,selectCallbacks:m,state:h,triggerClickedRef:g,triggerRef:r};return(0,u.useEffect)((function(){h.isExpanded?(window.__REACH_DISABLE_TOOLTIPS=!0,window.requestAnimationFrame((function(){em(i.current)}))):window.__REACH_DISABLE_TOOLTIPS=!1}),[h.isExpanded]),(0,u.createElement)(Og,{context:Gg,items:s,set:c},(0,u.createElement)(Kg.Provider,{value:w},bo(n)?n({isExpanded:h.isExpanded,isOpen:h.isExpanded}):n))};function Jg(e){var t=e.onKeyDown,n=e.onMouseDown,r=e.id,i=e.ref,o=Pg(e,Ng),a=nm(),s=a.dispatch,c=a.dropdownId,l=a.mouseDownStartPosRef,f=a.triggerClickedRef,d=a.triggerRef,p=a.state,h=p.triggerId,v=p.isExpanded,g=So(d,i),m=rm(),y=(0,u.useMemo)((function(){return m.findIndex((function(e){return!e.disabled}))}),[m]);return(0,u.useEffect)((function(){null!=r&&r!==h&&s({type:Vg,payload:r})}),[h,s,r]),{data:{isExpanded:v,controls:c},props:Tg({},o,{ref:g,id:h||void 0,onKeyDown:_o(t,(function(e){switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),s({type:zg,payload:{index:y}});break;case"Enter":case" ":s({type:zg,payload:{index:y}})}})),onMouseDown:_o(n,(function(e){Ag(e.nativeEvent)||(l.current={x:e.clientX,y:e.clientY},v||(f.current=!0),s(v?{type:Bg}:{type:Ug}))})),type:"button"})}}function Yg(e){var t=e.index,n=e.isLink,r=void 0!==n&&n,i=e.onClick,o=e.onDragStart,a=e.onMouseDown,s=e.onMouseEnter,c=e.onMouseLeave,l=e.onMouseMove,f=e.onMouseUp,d=e.onSelect,p=e.disabled,h=e.onFocus,v=e.valueText,g=e.ref,m=Pg(e,Mg),y=nm(),b=y.dispatch,w=y.dropdownRef,x=y.mouseDownStartPosRef,k=y.readyToSelect,S=y.selectCallbacks,_=y.triggerRef,E=y.state,C=E.selectionIndex,I=E.isExpanded,O=(0,u.useRef)(null),A=(0,u.useState)(v||""),D=A[0],P=A[1],T=(0,u.useCallback)((function(e){!v&&null!=e&&e.textContent&&P(e.textContent)}),[v]),N=(0,u.useRef)(!1),M=function(e,t){var n=(0,u.useState)(t),r=n[0],i=n[1];return[r,(0,u.useCallback)((function(t){e.current=t,i(t)}),[])]}(O,null),R=M[0],L=M[1],j=function(e,t,n){var r=vo(),i=(0,u.useContext)(t),o=i.registerDescendant,a=i.unregisterDescendant,s=i.descendants,c=null!=n?n:s.findIndex((function(t){return t.element===e.element}));return ho((function(){return e.element||r(),o(Eg({},e,{index:c})),function(){a(e.element)}}),[e,r,c,o,a].concat(Object.values(e))),c}((0,u.useMemo)((function(){return{element:R,key:D,disabled:p,isLink:r}}),[p,R,r,D]),Gg,t),F=j===C&&!p,B=So(g,L,T);function z(){em(_.current),d&&d(),b({type:Fg})}return S.current[j]=d,(0,u.useEffect)((function(){if(I){var e=window.setTimeout((function(){k.current=!0}),400);return function(){window.clearTimeout(e)}}k.current=!1}),[I,k]),(0,u.useEffect)((function(){var e=mo(O.current);return e.addEventListener("mouseup",t),function(){e.removeEventListener("mouseup",t)};function t(){N.current=!1}}),[]),{data:{disabled:p},props:Tg({id:Qg(j),tabIndex:-1},m,{ref:B,"data-disabled":p?"":void 0,"data-selected":F?"":void 0,"data-valuetext":D,onClick:_o(i,(function(e){Ag(e.nativeEvent)||r&&(p?e.preventDefault():z())})),onDragStart:_o(o,(function(e){r&&e.preventDefault()})),onMouseDown:_o(a,(function(e){Ag(e.nativeEvent)||(r?N.current=!0:e.preventDefault())})),onMouseEnter:_o(s,(function(e){var t=mo(w.current);F||null==j||p||(null!=w&&w.current&&w.current!==t.activeElement&&O.current!==t.activeElement&&w.current.focus(),b({type:Wg,payload:{index:j}}))})),onMouseLeave:_o(c,(function(e){b({type:jg})})),onMouseMove:_o(l,(function(e){if(!k.current){var t=Math.abs(e.clientX-x.current.x),n=Math.abs(e.clientY-x.current.y);(t>8||n>8)&&(k.current=!0)}F||null==j||p||b({type:Wg,payload:{index:j,dropdownRef:w}})})),onFocus:_o(h,(function(){k.current=!0,F||null==j||p||b({type:Wg,payload:{index:j}})})),onMouseUp:_o(f,(function(e){Ag(e.nativeEvent)||(k.current?r?N.current?N.current=!1:O.current&&O.current.click():p||z():k.current=!0)}))})}}function Zg(e){e.id;var t=e.onKeyDown,n=e.ref,r=Pg(e,Rg),i=nm(),o=i.dispatch,a=i.triggerRef,s=i.dropdownRef,c=i.selectCallbacks,l=i.dropdownId,f=i.state,d=f.isExpanded,p=f.triggerId,h=f.selectionIndex,v=f.typeaheadQuery,g=rm(),m=So(s,n);(0,u.useEffect)((function(){var e=function(e,t){void 0===t&&(t="");if(!t)return null;var n=e.find((function(e){var n,r,i;return!e.disabled&&(null==(n=e.element)||null==(r=n.dataset)||null==(i=r.valuetext)?void 0:i.toLowerCase().startsWith(t))}));return n?e.indexOf(n):null}(g,v);v&&null!=e&&o({type:Wg,payload:{index:e,dropdownRef:s}});var t=window.setTimeout((function(){return v&&o({type:Hg,payload:""})}),1e3);return function(){return window.clearTimeout(t)}}),[o,g,v,s]);var y=Dg(g.length),b=Dg(g[h]),w=Dg(h);(0,u.useEffect)((function(){h>g.length-1?o({type:Wg,payload:{index:g.length-1,dropdownRef:s}}):y!==g.length&&h>-1&&b&&w===h&&g[h]!==b&&o({type:Wg,payload:{index:g.findIndex((function(e){return e.key===(null==b?void 0:b.key)})),dropdownRef:s}})}),[s,o,g,y,b,w,h]);var x=_o((function(e){var t=e.key;if(d)switch(t){case"Enter":case" ":var n=g.find((function(e){return e.index===h}));n&&!n.disabled&&(e.preventDefault(),n.isLink&&n.element?n.element.click():(em(a.current),c.current[n.index]&&c.current[n.index](),o({type:Fg})));break;case"Escape":em(a.current),o({type:Bg});break;case"Tab":e.preventDefault();break;default:if("string"===typeof t&&1===t.length){var r=v+t.toLowerCase();o({type:Hg,payload:r})}}}),function(e,t){var n=(0,u.useContext)(e).descendants,r=t.callback,i=t.currentIndex,o=t.filter,a=t.key,s=void 0===a?"index":a,c=t.orientation,l=void 0===c?"vertical":c,f=t.rotate,d=void 0===f||f,p=t.rtl,h=void 0!==p&&p;return function(e){if(["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(e.key)){var t=null!=i?i:-1,a=o?n.filter(o):n;if(a.length){var u=a.findIndex((function(e){return e.index===i}));switch(e.key){case"ArrowDown":if("vertical"===l||"both"===l){e.preventDefault();var c=w();r("option"===s?c:c[s])}break;case"ArrowUp":if("vertical"===l||"both"===l){e.preventDefault();var f=x();r("option"===s?f:f[s])}break;case"ArrowLeft":if("horizontal"===l||"both"===l){e.preventDefault();var p=(h?w:x)();r("option"===s?p:p[s])}break;case"ArrowRight":if("horizontal"===l||"both"===l){e.preventDefault();var v=(h?x:w)();r("option"===s?v:v[s])}break;case"PageUp":e.preventDefault();var g=(e.ctrlKey?x:k)();r("option"===s?g:g[s]);break;case"Home":e.preventDefault();var m=k();r("option"===s?m:m[s]);break;case"PageDown":e.preventDefault();var y=(e.ctrlKey?w:S)();r("option"===s?y:y[s]);break;case"End":e.preventDefault();var b=S();r("option"===s?b:b[s])}}}function w(){return t===S().index?d?k():a[u]:a[(u+1)%a.length]}function x(){return t===k().index?d?S():a[u]:a[(u-1+a.length)%a.length]}function k(){return a[0]}function S(){return a[a.length-1]}}}(Gg,{currentIndex:h,orientation:"vertical",rotate:!1,filter:function(e){return!e.disabled},callback:function(e){o({type:Wg,payload:{index:e,dropdownRef:s}})},key:"index"}));return{data:{activeDescendant:Qg(h)||void 0,triggerId:p},props:Tg({tabIndex:-1},r,{ref:m,id:l,onKeyDown:_o(t,x)})}}function Xg(e){var t=e.onBlur,n=e.portal,r=void 0===n||n,i=e.position,o=e.ref,a=Pg(e,Lg),s=nm(),c=s.triggerRef,l=s.triggerClickedRef,f=s.dispatch,d=s.dropdownRef,p=s.popoverRef,h=s.state.isExpanded,v=So(p,o);return(0,u.useEffect)((function(){if(h){var e=mo(p.current);return e.addEventListener("mousedown",t),function(){e.removeEventListener("mousedown",t)}}function t(e){var t,n;l.current?l.current=!1:(t=p.current,n=e.target,t&&t.contains(n)||f({type:Bg}))}}),[l,c,f,d,p,h]),{data:{portal:r,position:i,targetRef:c,isExpanded:h},props:Tg({ref:v,hidden:!h,onBlur:_o(t,(function(e){e.currentTarget.contains(e.relatedTarget)||f({type:Bg})}))},a)}}function Qg(e){var t=(0,u.useContext)(Kg).dropdownId;return null!=e&&e>-1?Qu("option-"+e,t):void 0}function em(e){e&&e.focus()}function tm(e,t){switch(void 0===t&&(t={}),t.type){case Fg:case Bg:return Tg({},e,{isExpanded:!1,selectionIndex:-1});case"OPEN_MENU_AT_FIRST_ITEM":return Tg({},e,{isExpanded:!0,selectionIndex:0});case zg:return Tg({},e,{isExpanded:!0,selectionIndex:t.payload.index});case Ug:return Tg({},e,{isExpanded:!0,selectionIndex:-1});case Wg:var n=t.payload.dropdownRef,r=void 0===n?{current:null}:n;if(t.payload.index>=0&&t.payload.index!==e.selectionIndex){if(r.current){var i=mo(r.current);r.current!==(null==i?void 0:i.activeElement)&&r.current.focus()}return Tg({},e,{selectionIndex:null!=t.payload.max?Math.min(Math.max(t.payload.index,0),t.payload.max):Math.max(t.payload.index,0)})}return e;case jg:return Tg({},e,{selectionIndex:-1});case Vg:return Tg({},e,{triggerId:t.payload});case Hg:return"undefined"!==typeof t.payload?Tg({},e,{typeaheadQuery:t.payload}):e;default:return e}}function nm(){return(0,u.useContext)(Kg)}function rm(){return e=Gg,(0,u.useContext)(e).descendants;var e}function im(){return im=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},im.apply(this,arguments)}function om(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var am=["as","id","children"],um=["as"],sm=["as"],cm=["as"],lm=["as"],fm=["portal"],dm=["as"],pm=(0,u.forwardRef)((function(e,t){var n=e.as,r=void 0===n?u.Fragment:n,i=e.id,o=e.children,a=om(e,am),s=(0,u.useMemo)((function(){try{return(0,b.isFragment)((0,u.createElement)(r,null))}catch(Um){return!1}}),[r])?{}:im({ref:t,id:i,"data-reach-menu":""},a);return(0,u.createElement)(r,s,(0,u.createElement)($g,{id:i,children:o}))}));var hm=(0,u.forwardRef)((function(e,t){var n=e.as,r=void 0===n?"button":n,i=Jg(im({},om(e,um),{ref:t})),o=i.data,a=o.isExpanded,s=o.controls,c=i.props;return(0,u.createElement)(r,im({"aria-expanded":!!a||void 0,"aria-haspopup":!0,"aria-controls":s},c,{"data-reach-menu-button":""}))}));var vm=(0,u.forwardRef)((function(e,t){var n=e.as,r=void 0===n?"div":n,i=Yg(im({},om(e,sm),{ref:t})),o=i.data.disabled,a=i.props;return(0,u.createElement)(r,im({role:"menuitem"},a,{"aria-disabled":o||void 0,"data-reach-menu-item":""}))})),gm=(0,u.forwardRef)((function(e,t){var n=e.as,r=void 0===n?"div":n,i=om(e,cm);return(0,u.createElement)(vm,im({},i,{ref:t,as:r}))}));var mm=(0,u.forwardRef)((function(e,t){var n=e.as,r=void 0===n?"div":n,i=Zg(im({},om(e,lm),{ref:t})),o=i.data,a=o.activeDescendant,s=o.triggerId,c=i.props;return(0,u.createElement)(r,im({"aria-activedescendant":a,"aria-labelledby":s||void 0,role:"menu"},c,{"data-reach-menu-items":""}))}));var ym=(0,u.forwardRef)((function(e,t){var n=e.portal,r=void 0===n||n,i=om(e,fm);return(0,u.createElement)(bm,{portal:r},(0,u.createElement)(mm,im({},i,{ref:t,"data-reach-menu-list":""})))}));var bm=(0,u.forwardRef)((function(e,t){var n=e.as,r=void 0===n?"div":n,i=Xg(im({},om(e,dm),{ref:t})),o=i.data,a=o.portal,s=o.targetRef,c=o.position,l=i.props,f={"data-reach-menu-popover":""};return a?(0,u.createElement)(bg,im({},l,f,{as:r,targetRef:s,position:c})):(0,u.createElement)(r,im({},l,f))}));function wm(){return wm=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wm.apply(this,arguments)}var xm=["as","style"],km=(0,u.forwardRef)((function(e,t){var n=e.as,r=void 0===n?"span":n,i=e.style,o=void 0===i?{}:i,a=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,xm);return(0,u.createElement)(r,wm({ref:t,style:wm({border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"},o)},a))}));var Sm,_m,Em,Cm,Im=km,Om=function(e){var t=e.groupName,n=e.handleClose,r=(0,u.useRef)(null),i=Qt(),o=en((function(e){return e.tasks.groups})).filter((function(e){return e.name!==t})),a=ot((0,u.useState)(),2),s=a[0],c=a[1];return(0,uo.jsx)(hs,{"data-testid":"merge-task-group-dialog",leastDestructiveRef:r,children:(0,uo.jsx)("div",{className:"sk-modal-content",children:(0,uo.jsx)("div",{className:"sn-component",children:(0,uo.jsx)("div",{className:"sk-panel",children:(0,uo.jsx)("div",{className:"sk-panel-content",children:(0,uo.jsxs)("div",{className:"sk-panel-section",children:[(0,uo.jsx)(ds,{className:"sk-h3 sk-panel-section-title",children:"Merging task groups"}),o.length>0?(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsx)(ps,{className:"sk-panel-row",children:(0,uo.jsxs)("p",{className:"color-foreground",children:["Select which group you want to merge '",(0,uo.jsx)("strong",{children:t}),"' into:"]})}),(0,uo.jsx)("fieldset",{className:"flex flex-col",onChange:function(e){var t=e.target.value;c(t)},children:o.map((function(e){return(0,uo.jsxs)("label",{className:"flex items-center mb-1",children:[(0,uo.jsx)("input",{type:"radio",value:e.name,checked:e.name===s,readOnly:!0}),e.name]},e.name)}))})]}):(0,uo.jsx)(ps,{children:(0,uo.jsxs)("p",{className:"color-foreground",children:["There are no other groups to merge '",(0,uo.jsx)("strong",{children:t}),"' with."]})}),(0,uo.jsxs)("div",{className:"flex my-1 mt-4",children:[(0,uo.jsx)("button",{className:"sn-button small neutral",onClick:n,ref:r,children:s?"Cancel":"Close"}),(0,uo.jsx)("button",{className:"sn-button small ml-2 info",onClick:function(){s?(i(Ji({groupName:t,mergeWith:s})),n()):n()},children:"Merge groups"})]})]})})})})})})},Am=function(e){var t=e.groupName,n=e.handleClose,r=(0,u.useRef)(null),i=Qt(),o=ot((0,u.useState)(t),2),a=o[0],s=o[1];function c(){i(Yi({groupName:t,newName:a})),n()}return(0,uo.jsx)(hs,{"data-testid":"rename-task-group-dialog",leastDestructiveRef:r,children:(0,uo.jsx)("div",{className:"sk-modal-content",children:(0,uo.jsx)("div",{className:"sn-component",children:(0,uo.jsx)("div",{className:"sk-panel",children:(0,uo.jsx)("div",{className:"sk-panel-content",children:(0,uo.jsxs)("div",{className:"sk-panel-section",children:[(0,uo.jsxs)(ds,{className:"sk-h3 sk-panel-section-title",children:["Renaming group '",(0,uo.jsx)("strong",{children:t}),"':"]}),(0,uo.jsx)(ps,{children:(0,uo.jsx)(Vs,{testId:"new-group-name-input",autoFocus:!0,onChange:function(e){var t=e.target.value;s(t)},onKeyPress:function(e){"Enter"===e.key&&e.target.value.length>0&&c()},placeholder:"Enter new group name",value:a})}),(0,uo.jsxs)("div",{className:"flex my-1 mt-4",children:[(0,uo.jsx)("button",{className:"sn-button small neutral",onClick:n,ref:r,children:0===a.length?"Close":"Cancel"}),(0,uo.jsx)("button",{className:"sn-button small ml-2 info",disabled:0===a.length,onClick:c,children:"Rename"})]})]})})})})})})},Dm=function(e){var t=e.groupName,n=Qt(),r=ot((0,u.useState)(!1),2),i=r[0],o=r[1],a=ot((0,u.useState)(!1),2),s=a[0],c=a[1],l=ot((0,u.useState)(!1),2),f=l[0],d=l[1];return(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsxs)(pm,{children:[(0,uo.jsxs)(hm,{"data-testid":"task-group-options",className:"sn-icon-button",children:[(0,uo.jsxs)(Im,{children:["Options for '",t,"' group"]}),(0,uo.jsx)(Ys,{})]}),(0,uo.jsxs)(ym,{children:[(0,uo.jsxs)(gm,{"data-testid":"delete-task-group",onSelect:function(){return c(!0)},children:[(0,uo.jsx)(Xs,{}),(0,uo.jsx)("span",{className:"px-1",children:"Delete group"})]}),(0,uo.jsxs)(gm,{"data-testid":"merge-task-group",onSelect:function(){return o(!0)},children:[(0,uo.jsx)(Js,{}),(0,uo.jsx)("span",{className:"px-1",children:"Merge into another group"})]}),(0,uo.jsxs)(gm,{"data-testid":"rename-task-group",onSelect:function(){return d(!0)},children:[(0,uo.jsx)(Zs,{}),(0,uo.jsx)("span",{className:"px-1",children:"Rename"})]})]})]}),s&&(0,uo.jsxs)(ms,{testId:"delete-task-group-dialog",title:"Delete group",confirmButtonText:"Delete",confirmButtonStyle:"danger",confirmButtonCb:function(){return n($i({groupName:t}))},cancelButtonCb:function(){return c(!1)},children:["Are you sure you want to delete the group '",(0,uo.jsx)("strong",{children:t}),"'?"]}),i&&(0,uo.jsx)(Om,{groupName:t,handleClose:function(){return o(!1)}}),f&&(0,uo.jsx)(Am,{groupName:t,handleClose:function(){return d(!1)}})]})},Pm=["group","isDragging","isLast","style","innerRef","onDragStart","onTransitionEnd"],Tm=nt.div(Sm||(Sm=i(["\n background-color: var(--sn-stylekit-background-color);\n border: 1px solid var(--sn-stylekit-border-color);\n border-radius: 4px;\n box-sizing: border-box;\n padding: 16px 18px;\n margin-bottom: ",";\n\n @media only screen and (max-width: 600px) {\n padding: 8px 10px;\n }\n"])),(function(e){return e.isLast?"0px":"9px"})),Nm=function(e){var t=e.group,n=e.isDragging,r=e.isLast,i=e.style,o=e.innerRef,a=e.onDragStart,s=e.onTransitionEnd,c=bs(e,Pm),l=Qt(),f=t.name,d=t.tasks.filter((function(e){return e.completed})).length,p=t.tasks.length,h=Ci(d,p),v=ot((0,u.useState)(!!t.collapsed),2),g=v[0],m=v[1],y=en((function(e){return e.settings.canEdit})),b=p>0&&p===d;return(0,u.useEffect)((function(){l(Zi({groupName:f,type:"group",collapsed:g}))}),[g,l,f]),(0,uo.jsxs)(Tm,{ref:o,style:i,onDragStart:a,onTransitionEnd:s,isLast:r,children:[(0,uo.jsxs)("div",{className:"flex items-center justify-between h-8",children:[(0,uo.jsxs)("div",{className:"flex flex-grow items-center",onClick:function(){g&&m(!1)},children:[(0,uo.jsx)(Fs,ur(ur({crossed:b&&g,highlight:n},c),{},{children:f})),(0,uo.jsx)(fo,{size:18,percentage:h}),(0,uo.jsxs)(ys,{"data-testid":"task-group-stats",children:[d,"/",p]})]}),!n&&(0,uo.jsxs)("div",{className:"flex items-center",children:[y&&(0,uo.jsx)("div",{className:"ml-3",children:(0,uo.jsx)(Dm,{groupName:f})}),(0,uo.jsx)("div",{className:"ml-3",children:(0,uo.jsx)(Bs,{testId:"collapse-task-group",onClick:function(){m(!g)},children:g?(0,uo.jsx)(qs,{}):(0,uo.jsx)($s,{})})})]})]}),!g&&(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsx)(wv,{group:t}),(0,uo.jsx)(cg,{group:t})]})]})},Mm=["onTransitionEnd"],Rm=function(){var e=Qt(),t=en((function(e){return e.settings.canEdit})),n=en((function(e){return e.tasks.groups}));return(0,uo.jsx)(Dh,{"data-testid":"task-group-list",onDragEnd:function(t){if(!!t.destination){var n=t.source,r=t.destination;r&&e(qi({swapGroupIndex:n.index,withGroupIndex:r.index}))}},children:(0,uo.jsx)(mv,{droppableId:"droppable-task-group-list",isDropDisabled:!t,children:function(e){return(0,uo.jsxs)("div",ur(ur({},e.droppableProps),{},{ref:e.innerRef,children:[n.map((function(e,r){return(0,uo.jsx)(dv,{draggableId:"draggable-".concat(e.name),index:r,isDragDisabled:!t,children:function(t,i){var o=t.innerRef,a=t.draggableProps,u=t.dragHandleProps,s=i.isDragging,c=a.onTransitionEnd,l=bs(a,Mm);return(0,uo.jsx)(Nm,ur(ur({group:e,isDragging:s,innerRef:o,onTransitionEnd:c,onDragStart:null===u||void 0===u?void 0:u.onDragStart,isLast:n.length-1===r},u),l),"group-".concat(e.name))}},"draggable-".concat(e.name))})),e.placeholder]}))}})})},Lm=function(){return(0,uo.jsx)("svg",{viewBox:"0 0 0 0",style:{position:"absolute",zIndex:-1,opacity:0},children:(0,uo.jsxs)("defs",{children:[(0,uo.jsx)("path",{id:"checkbox-square",d:"M21 12.7v5c0 1.3-1 2.3-2.3 2.3H8.3C7 20 6 19 6 17.7V7.3C6 6 7 5 8.3 5h10.4C20 5 21 6 21 7.3v5.4"}),(0,uo.jsx)("path",{id:"checkbox-mark",d:"M10 13l2 2 5-5"}),(0,uo.jsx)("circle",{id:"checkbox-circle",cx:"13.5",cy:"12.5",r:"10"})]})})},jm=nt.div(_m||(_m=i(["\n margin: 6px;\n padding-bottom: 60px;\n"]))),Fm=nt.div(Em||(Em=i(["\n background-color: var(--sn-stylekit-secondary-background-color);\n border-top: 1px solid var(--sn-stylekit-border-color);\n bottom: 0;\n display: flex;\n position: fixed;\n width: 100%;\n"]))),Bm=nt.div(Cm||(Cm=i(["\n display: flex;\n justify-content: center;\n margin: 0px;\n padding: 12px 16px;\n position: relative;\n width: 98%;\n"]))),zm=function(){var e=(0,u.useRef)(),n=(0,u.useRef)(),i=en((function(e){return e.tasks.initialized})),o=en((function(e){return e.tasks.groups})),s=en((function(e){return e.tasks.legacyContent})),l=Qt();var f=(0,u.useCallback)((function(){var i={setEditorRawText:function(e){l(Wi(e))},onNoteValueChange:function(){var i=function(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function u(e){r(a,i,o,u,s,"next",e)}function s(e){r(a,i,o,u,s,"throw",e)}u(void 0)}))}}(t().mark((function r(i){var o,a,u;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.current=i,a=null===(o=!i.content.appData["org.standardnotes.sn"].locked)||void 0===o||o,u=i.content.spellcheck,l(di(a)),l(hi(u)),l(pi(n.current.isRunningInMobileApplication()));case 6:case"end":return t.stop()}}),r)})));return function(e){return i.apply(this,arguments)}}(),onNoteLockToggle:function(e){l(di(!e))}};n.current=new(a())(i,{mode:"json",supportsFileSafe:!1})}),[l]);(0,u.useEffect)((function(){f()}),[f]);var d=(0,u.useCallback)((function(){var t=ao.getState().tasks.initialized,r=e.current;r&&t&&(ao.getState().settings.canEdit&&n.current.saveItemWithPresave(r,(function(){var e=ao.getState().tasks,t=e.schemaVersion,n=e.groups,i=e.defaultSections;r.content.text=JSON.stringify({schemaVersion:t,groups:n,defaultSections:i},null,2),r.content.preview_plain=function(e){var t=Oi(e),n=Ii(t).completedTasks;return"".concat(n.length,"/").concat(t.length," tasks completed")}(n),r.content.preview_html=(0,c.renderToString)((0,uo.jsx)(vc,{groupedTasks:n}))})))}),[]);return(0,u.useEffect)((function(){return ao.subscribe((function(){return i&&d()}))})),(0,u.useEffect)((function(){function e(e){e&&e.preventDefault()}return window.addEventListener("drop",e),window.addEventListener("dragover",e),function(){window.removeEventListener("drop",e),window.removeEventListener("dragover",e)}}),[]),s?(0,uo.jsx)(jm,{children:(0,uo.jsx)(dc,{})}):i?0===o.length?(0,uo.jsx)(jm,{children:(0,uo.jsx)(cc,{})}):(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsx)(Lm,{}),(0,uo.jsx)(jm,{children:(0,uo.jsx)(Rm,{})}),(0,uo.jsx)(Fm,{children:(0,uo.jsx)(Bm,{children:(0,uo.jsx)(cc,{})})})]}):(0,uo.jsx)(jm,{children:(0,uo.jsx)(fc,{})})};s.render((0,uo.jsx)(u.StrictMode,{children:(0,uo.jsx)(g,{store:ao,children:(0,uo.jsx)(zm,{})})}),document.getElementById("root"))}()}();
|
|
3
|
+
//# sourceMappingURL=main.js.map
|