From cf83bb5b0cbbe39e59452e4c4805484aea392bcd Mon Sep 17 00:00:00 2001 From: StandardNotes CI Date: Wed, 15 Jun 2022 15:50:26 +0000 Subject: [PATCH] chore(release): components --- packages/components/dist/Checksums.json | 4 ++-- .../build/asset-manifest.json | 10 +++++----- .../build/index.html | 2 +- .../build/package.json | 7 ------- .../build/sample.ext.json | 1 - .../static/js/{main.js => main.e72e12bb.js} | 6 +++--- ...CENSE.txt => main.e72e12bb.js.LICENSE.txt} | 0 .../build/static/js/main.e72e12bb.js.map | 1 + .../build/static/js/main.js.map | 1 - .../org.standardnotes.advanced-checklist.zip | Bin 1111423 -> 1111308 bytes .../package.json | 16 +++------------- 11 files changed, 15 insertions(+), 33 deletions(-) rename packages/components/dist/org.standardnotes.advanced-checklist/build/static/js/{main.js => main.e72e12bb.js} (77%) rename packages/components/dist/org.standardnotes.advanced-checklist/build/static/js/{main.js.LICENSE.txt => main.e72e12bb.js.LICENSE.txt} (100%) create mode 100644 packages/components/dist/org.standardnotes.advanced-checklist/build/static/js/main.e72e12bb.js.map delete mode 100644 packages/components/dist/org.standardnotes.advanced-checklist/build/static/js/main.js.map diff --git a/packages/components/dist/Checksums.json b/packages/components/dist/Checksums.json index f61fb8b41..fa99fe51f 100644 --- a/packages/components/dist/Checksums.json +++ b/packages/components/dist/Checksums.json @@ -91,7 +91,7 @@ }, "org.standardnotes.advanced-checklist": { "version": "0.0.1", - "base64": "62843bb9f88bd51bccd5d1894ed28b8a518c520929ef54279e47a2b0c54890c1", - "binary": "cdb2e4a1e9071e5fec3f979100e4ec9d35240805168bbb0d8dd393d3e2092c83" + "base64": "df36f94cd67567505d14bf847513256061b667e8145860341f7ad7e3df4df78e", + "binary": "c875c20073ac964c94f27f9028514eac7f09528c22fb349cd4f7a095b3bac49b" } } \ No newline at end of file diff --git a/packages/components/dist/org.standardnotes.advanced-checklist/build/asset-manifest.json b/packages/components/dist/org.standardnotes.advanced-checklist/build/asset-manifest.json index 76ab28b71..04a84cdf6 100644 --- a/packages/components/dist/org.standardnotes.advanced-checklist/build/asset-manifest.json +++ b/packages/components/dist/org.standardnotes.advanced-checklist/build/asset-manifest.json @@ -1,13 +1,13 @@ { "files": { - "main.js": "./static/js/main.js", "main.css": "./static/css/main.bb4586b1.css", + "main.js": "./static/js/main.e72e12bb.js", "index.html": "./index.html", - "main.js.map": "./static/js/main.js.map", - "main.bb4586b1.css.map": "./static/css/main.bb4586b1.css.map" + "main.bb4586b1.css.map": "./static/css/main.bb4586b1.css.map", + "main.e72e12bb.js.map": "./static/js/main.e72e12bb.js.map" }, "entrypoints": [ - "static/js/main.js", - "static/css/main.bb4586b1.css" + "static/css/main.bb4586b1.css", + "static/js/main.e72e12bb.js" ] } \ No newline at end of file diff --git a/packages/components/dist/org.standardnotes.advanced-checklist/build/index.html b/packages/components/dist/org.standardnotes.advanced-checklist/build/index.html index 126b58438..a6cba1833 100644 --- a/packages/components/dist/org.standardnotes.advanced-checklist/build/index.html +++ b/packages/components/dist/org.standardnotes.advanced-checklist/build/index.html @@ -1 +1 @@ -Advanced Checklist
\ No newline at end of file +Advanced Checklist
\ No newline at end of file diff --git a/packages/components/dist/org.standardnotes.advanced-checklist/build/package.json b/packages/components/dist/org.standardnotes.advanced-checklist/build/package.json index cafe75dfd..7b5df3522 100644 --- a/packages/components/dist/org.standardnotes.advanced-checklist/build/package.json +++ b/packages/components/dist/org.standardnotes.advanced-checklist/build/package.json @@ -8,13 +8,6 @@ ], "private": true, "license": "AGPL-3.0-or-later", - "repository": { - "type": "git", - "url": "https://github.com/standardnotes/advanced-checklist.git" - }, - "bugs": { - "url": "https://github.com/standardnotes/advanced-checklist/issues" - }, "sn": { "main": "index.html" } diff --git a/packages/components/dist/org.standardnotes.advanced-checklist/build/sample.ext.json b/packages/components/dist/org.standardnotes.advanced-checklist/build/sample.ext.json index 3cfa7ecf7..f831e465b 100644 --- a/packages/components/dist/org.standardnotes.advanced-checklist/build/sample.ext.json +++ b/packages/components/dist/org.standardnotes.advanced-checklist/build/sample.ext.json @@ -8,6 +8,5 @@ "url": "http://localhost:3000/index.html", "download_url": "", "latest_url": "", - "marketing_url": "https://github.com/standardnotes/advanced-checklist", "thumbnail_url": "" } diff --git a/packages/components/dist/org.standardnotes.advanced-checklist/build/static/js/main.js b/packages/components/dist/org.standardnotes.advanced-checklist/build/static/js/main.e72e12bb.js similarity index 77% rename from packages/components/dist/org.standardnotes.advanced-checklist/build/static/js/main.js rename to packages/components/dist/org.standardnotes.advanced-checklist/build/static/js/main.e72e12bb.js index 6fdf2e858..61ef06b25 100644 --- a/packages/components/dist/org.standardnotes.advanced-checklist/build/static/js/main.js +++ b/packages/components/dist/org.standardnotes.advanced-checklist/build/static/js/main.e72e12bb.js @@ -1,3 +1,3 @@ -/*! For license information please see main.js.LICENSE.txt */ -!function(){var e={710:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=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},309: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},885: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},419: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},819:function(e,t,n){var r=n(277).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=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=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=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},292:function(e,t,n){var r=n(340),i=n(885),o=n(416),a=n(419);e.exports=function(e){return r(e)||i(e)||o(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},277: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},416:function(e,t,n){var r=n(710);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},285:function(e,t,n){var r,i=n(819).default,o=n(1).default,a=n(397).default,u=n(911).default,s=n(31).default,c=n(309).default;self,e.exports=(r=n(629),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;t0&&(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;s0&&(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=/(

)?\[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("

","")).replace("

","")).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"

")};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"];t0){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="

[".concat(f.join(":"),"]

");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}())},244:function(e,t,n){"use strict";var r=n(819).default,i=n(292).default,o=n(397).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(32),s=n(987),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);ni?1:0})),n},t.omitUndefinedCopy=function(e){for(var t={},n=0,r=Object.keys(e);n2&&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 io?1*a:0}))},t.topLevelCompare=y,t.jsonParseEmbeddedKeys=function(e){for(var t={},n=0,r=Object.keys(e);n1&&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(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 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;i2?n-2:0),o=2;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?n-1:0),i=1;i/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}})}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.3.8",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 M=o.createElement("template");M.content&&M.content.ownerDocument&&(o=M.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=N({},[].concat(i(j),i(F),i(B),i(z),i(W))),Ce=null,Ie=N({},[].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,Me=!1,Ne=!1,Re=!1,Le=!1,je=!1,Fe=!1,Be=!1,Ue=!1,ze=!0,He=!0,We=!1,Ve={},Ge=null,Ke=N({},["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"]),qe=null,$e=N({},["audio","video","img","source","image","track"]),Je=null,Ye=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ze="http://www.w3.org/1998/Math/MathML",Xe="http://www.w3.org/2000/svg",Qe="http://www.w3.org/1999/xhtml",et=Qe,tt=!1,nt=["application/xhtml+xml","text/html"],rt="text/html",it=null,ot=o.createElement("form"),at=function(e){return e instanceof RegExp||e instanceof Function},ut=function(t){it&&it===t||(t&&"object"===e(t)||(t={}),t=R(t),_e="ALLOWED_TAGS"in t?N({},t.ALLOWED_TAGS):Ee,Ce="ALLOWED_ATTR"in t?N({},t.ALLOWED_ATTR):Ie,Je="ADD_URI_SAFE_ATTR"in t?N(R(Ye),t.ADD_URI_SAFE_ATTR):Ye,qe="ADD_DATA_URI_TAGS"in t?N(R($e),t.ADD_DATA_URI_TAGS):$e,Ge="FORBID_CONTENTS"in t?N({},t.FORBID_CONTENTS):Ke,Ae="FORBID_TAGS"in t?N({},t.FORBID_TAGS):{},De="FORBID_ATTR"in t?N({},t.FORBID_ATTR):{},Ve="USE_PROFILES"in t&&t.USE_PROFILES,Pe=!1!==t.ALLOW_ARIA_ATTR,Te=!1!==t.ALLOW_DATA_ATTR,Me=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Ne=t.SAFE_FOR_TEMPLATES||!1,Re=t.WHOLE_DOCUMENT||!1,Fe=t.RETURN_DOM||!1,Be=t.RETURN_DOM_FRAGMENT||!1,Ue=t.RETURN_TRUSTED_TYPE||!1,je=t.FORCE_BODY||!1,ze=!1!==t.SANITIZE_DOM,He=!1!==t.KEEP_CONTENT,We=t.IN_PLACE||!1,Se=t.ALLOWED_URI_REGEXP||Se,et=t.NAMESPACE||Qe,t.CUSTOM_ELEMENT_HANDLING&&at(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Oe.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&at(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),ve=ve=-1===nt.indexOf(t.PARSER_MEDIA_TYPE)?rt:t.PARSER_MEDIA_TYPE,ge="application/xhtml+xml"===ve?function(e){return e}:E,Ne&&(Te=!1),Be&&(Fe=!0),Ve&&(_e=N({},i(W)),Ce=[],!0===Ve.html&&(N(_e,j),N(Ce,V)),!0===Ve.svg&&(N(_e,F),N(Ce,G),N(Ce,q)),!0===Ve.svgFilters&&(N(_e,B),N(Ce,G),N(Ce,q)),!0===Ve.mathMl&&(N(_e,z),N(Ce,K),N(Ce,q))),t.ADD_TAGS&&(_e===Ee&&(_e=R(_e)),N(_e,t.ADD_TAGS)),t.ADD_ATTR&&(Ce===Ie&&(Ce=R(Ce)),N(Ce,t.ADD_ATTR)),t.ADD_URI_SAFE_ATTR&&N(Je,t.ADD_URI_SAFE_ATTR),t.FORBID_CONTENTS&&(Ge===Ke&&(Ge=R(Ge)),N(Ge,t.FORBID_CONTENTS)),He&&(_e["#text"]=!0),Re&&N(_e,["html","head","body"]),_e.table&&(N(_e,["tbody"]),delete Ae.tbody),v&&v(t),it=t)},st=N({},["mi","mo","mn","ms","mtext"]),ct=N({},["foreignobject","desc","title","annotation-xml"]),lt=N({},["title","style","font","a","script"]),ft=N({},F);N(ft,B),N(ft,U);var dt=N({},z);N(dt,H);var pt=function(e){var t=T(e);t&&t.tagName||(t={namespaceURI:Qe,tagName:"template"});var n=E(e.tagName),r=E(t.tagName);return e.namespaceURI===Xe?t.namespaceURI===Qe?"svg"===n:t.namespaceURI===Ze?"svg"===n&&("annotation-xml"===r||st[r]):Boolean(ft[n]):e.namespaceURI===Ze?t.namespaceURI===Qe?"math"===n:t.namespaceURI===Xe?"math"===n&&ct[r]:Boolean(dt[n]):e.namespaceURI===Qe&&!(t.namespaceURI===Xe&&!ct[r])&&!(t.namespaceURI===Ze&&!st[r])&&!dt[n]&&(lt[n]||!ft[n])},ht=function(e){S(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(_){try{e.outerHTML=ae}catch(_){e.remove()}}},vt=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{ht(t)}catch(_){}else try{t.setAttribute(e,"")}catch(_){}},gt=function(e){var t,n;if(je)e=""+e;else{var r=C(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===ve&&(e=''+e+"");var i=oe?oe.createHTML(e):e;if(et===Qe)try{t=(new h).parseFromString(i,ve)}catch(_){}if(!t||!t.documentElement){t=se.createDocument(et,"template",null);try{t.documentElement.innerHTML=tt?"":i}catch(_){}}var a=t.body||t.documentElement;return e&&n&&a.insertBefore(o.createTextNode(n),a.childNodes[0]||null),et===Qe?fe.call(t,Re?"html":"body")[0]:Re?t.documentElement:a},mt=function(e){return ce.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},yt=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)},bt=function(t){return"object"===e(s)?t instanceof s:t&&"object"===e(t)&&"number"===typeof t.nodeType&&"string"===typeof t.nodeName},wt=function(e,t,r){he[e]&&x(he[e],(function(e){e.call(n,t,r,it)}))},xt=function(e){var t;if(wt("beforeSanitizeElements",e,null),yt(e))return ht(e),!0;if(D(/[\u0080-\uFFFF]/,e.nodeName))return ht(e),!0;var r=ge(e.nodeName);if(wt("uponSanitizeElement",e,{tagName:r,allowedTags:_e}),e.hasChildNodes()&&!bt(e.firstElementChild)&&(!bt(e.content)||!bt(e.content.firstElementChild))&&D(/<[/\w]/g,e.innerHTML)&&D(/<[/\w]/g,e.textContent))return ht(e),!0;if("select"===r&&D(/