From 5d4df9ac9c84f960b59f262b7b0c34dddcc6df0f Mon Sep 17 00:00:00 2001 From: gingerlemon Date: Tue, 15 Aug 2023 20:00:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .firebase/hosting.ZGlzdA.cache | 10 +-- dist/index.html | 90 +------------------------ dist/main.js | 2 +- src/components/note-mode/ShareDialog.js | 6 +- src/pages/NoteMode.js | 1 + 5 files changed, 10 insertions(+), 99 deletions(-) diff --git a/.firebase/hosting.ZGlzdA.cache b/.firebase/hosting.ZGlzdA.cache index e9813aa..aff7c8b 100644 --- a/.firebase/hosting.ZGlzdA.cache +++ b/.firebase/hosting.ZGlzdA.cache @@ -1,8 +1,8 @@ -f8135b3ccd9971e2b5a4.svg,1692085469105,c32ae80bab62d3e539d1da6c3e48ed099c2cd23b4df906b19e5bb632f0bfae4e -index.html,1692097167944,a4d225bcbbb1e69b12418f41c308e386df8ee858faad4a90e6c75b35d8081665 +66b838d3e9ac50f55037.svg,1692085469105,971b377fd617eb17e8bbfd059e19055ff3f18cfcf36717fde8fcf8ba6195d0ec a4f939ae26c6419ccf99.svg,1692085469105,d6b815876f3e4279579da2bb858d27024cef2d599bc9c3051ec9d10ac67ce871 -vendors.js.LICENSE.txt,1692085469105,ef4711e37ef5bb325bdabb6a77d667c31e273cf00d832e10e4e228d93882075e +f8135b3ccd9971e2b5a4.svg,1692085469105,c32ae80bab62d3e539d1da6c3e48ed099c2cd23b4df906b19e5bb632f0bfae4e main.js.LICENSE.txt,1692085469105,5bcf7ad56e14554ea655f13f3a79ddf6fb23a153bf6028e5bfea9a7a6cd9154d -66b838d3e9ac50f55037.svg,1692085469105,971b377fd617eb17e8bbfd059e19055ff3f18cfcf36717fde8fcf8ba6195d0ec -main.js,1692085469104,2e8b1a3421fc395919d58a9224a391aaf8b61fcd40ce0c5eca62ff16715193f9 vendors.js,1692085469104,5383f587835738f5669419d86cfa96295eed175a29dd10f51d3a142b50446c7a +vendors.js.LICENSE.txt,1692085469105,ef4711e37ef5bb325bdabb6a77d667c31e273cf00d832e10e4e228d93882075e +index.html,1692099051829,e0d9a58c41acfc33b00e0568e03d481918a6b79af52b069e703412c3f2d21322 +main.js,1692099051829,6a75f6852c68e0b33e8dfebdde63d939d9c16e4d6377318ecd7ad0a7ea9978ea diff --git a/dist/index.html b/dist/index.html index e83bc58..7b4df35 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1,89 +1 @@ - - - - - - Welcome to Firebase Hosting - - - - - - - - - - - - - - - - - - - -
-

Welcome

-

Firebase Hosting Setup Complete

-

You're seeing this because you've successfully setup Firebase Hosting. Now it's time to go build something extraordinary!

- Open Hosting Documentation -
-

Firebase SDK Loading…

- - - - +L.Note
\ No newline at end of file diff --git a/dist/main.js b/dist/main.js index 3b0ac0c..89ca3e1 100644 --- a/dist/main.js +++ b/dist/main.js @@ -1,2 +1,2 @@ /*! For license information please see main.js.LICENSE.txt */ -(()=>{var t,e,n,r={4804:(t,e,n)=>{"use strict";var r,o=n(9526),i=n(4470),a=n(365);var u,c,l,s=a.ZP.footer(r||(u=['\n background-color: #ffffff;\n width: 100vw;\n color: #A7A7A7; \n font-size: 14px;\n font-family: "Inter";\n font-weight: 400;\n text-align: center;\n padding: 10px;\n\n /* ๅฎšไฝๅœจๆœ€ไธ‹ๆ–น */ \n position: fixed;\n bottom: 0px;\n'],c||(c=u.slice(0)),r=Object.freeze(Object.defineProperties(u,{raw:{value:Object.freeze(c)}}))));var f,p,h=a.ZP.button(l||(l=function(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n /* ๆŒ‰้ˆ•็š„ๅค–่ช† */\n border: 3px solid #000000;\n background-color: #ffffff;\n border-radius: 25px;\n\n /* ๆ–‡ๅญ— */\n color: #000000;\n font-family: "Inter";\n font-size: 18px;\n font-weight: bold;\n padding: 10px 20px;\n\n display: block;\n /* margin-bottom: 30px; */\n\n /* ๆป‘้ผ  hover */\n &:hover {\n background-color: #000000;\n color: #ffffff;\n cursor: pointer;\n }\n'])));function d(t){var e=t.btnName,n=t.onClick;return o.createElement(h,{onClick:n},e)}function m(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var y,v=a.ZP.main(f||(f=m(["\n margin: 60px 0 30px;\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n align-items: flex-start;\n gap: 10px;\n\n @media (max-width: 850px) {\n margin: 60px 20px 30px;\n gap: 15px;\n justify-content: left;\n }\n"]))),g=a.ZP.aside(p||(p=m(["\n margin: 5px 0 10px;\n gap: 30px;\n display: flex;\n flex-direction: column;\n\n @media (max-width: 850px) {\n flex-direction: row;\n }\n"])));var w=a.ZP.article(y||(y=function(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n width: 700px;\n /* height: 70vh; */\n\n @media (max-width: 850px) {\n width: 100%;\n }\n\n input {\n width: inherit;\n padding: 0 20px 10px;\n border: none;\n outline: none;\n font-size: 18px;\n resize: none;\n\n /* input ๅ…ง็š„ๅญ— */\n font-family: "Noto Sans TC";\n }\n\n textarea {\n width: 700px;\n border: none;\n outline: none;\n resize: none;\n overflow-y: hidden;\n\n /* textarea ็š„ๆ–‡ๅญ— */\n font-family: inherit;\n font-size: 18px;\n line-height: 1.5;\n padding: 0 20px 10px;\n font-weight: 400;\n\n @media (max-width: 850px) {\n width: 100%;\n }\n }\n\n /* ๏ผ๏ผ๏ผ๏ผ๏ผ ไปฅไธ‹้ฉ็”จ Note ๏ผ๏ผ๏ผ๏ผ๏ผ */\n /* .header ็‚บ note/edit ๅ…ฑ็”จ */\n .title {\n width: 700px;\n font-size: 32px;\n font-weight: 700;\n padding: 0 20px 10px 20px;\n\n @media (max-width: 850px) {\n width: 100%;\n }\n }\n\n .author {\n font-size: 18px;\n width: 100%;\n padding: 0 20px 10px 20px;\n\n @media (max-width: 850px) {\n width: 100%;\n }\n }\n\n div {\n margin: 12px 0 24px;\n\n label, span {\n /* margin: 5px 0; */\n padding-left: 10px;\n font-family: "Inter";\n font-weight: 100;\n font-size: 18px;\n position: relative;\n margin: 12px 0;\n }\n\n img {\n position: absolute;\n margin-left: -42px;\n }\n\n input {\n margin-left: 6px;\n border-bottom: 1px solid #A5A5A5;\n border-radius: 10px;\n }\n\n .password-hint {\n font-weight: 400;\n }\n\n @media (max-width: 850px) {\n width: 100%;\n }\n }\n'])));function x(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return b(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=6&&t.length<=12?(s(t),w("Password done.")):t.length>12||(s(t),w("Password should be 6-12 characters.")):w("Number and English letters only")},maxLength:12}),o.createElement("img",{src:m?A:P,height:"30px",onClick:function(){y(!m)}}),o.createElement("br",null),o.createElement("span",null,"Password hint: "),o.createElement("span",{className:"password-hint"},g)))}var D=n(3277),F=n(1402),z=n(1844),C={apiKey:"MISSING_ENV_VAR".FIREBASE_API_KEY,authDomain:"MISSING_ENV_VAR".FIREBASE_AUTH_DOMAIN,projectId:"MISSING_ENV_VAR".FIREBASE_PROJECT_ID,storageBucket:"MISSING_ENV_VAR".FIREBASE_STORAGE_BUCKET,messagingSenderId:"MISSING_ENV_VAR".MESSAGING_SENDER_ID,appId:"MISSING_ENV_VAR".FIREBASE_APP_ID},M=(0,z.ZF)(C),G=(0,F.ad)(M);function R(t){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},R(t)}function V(){V=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),u=new I(o||[]);return r(a,"_invoke",{value:b(t,n,u)}),a}function s(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f={};function p(){}function h(){}function d(){}var m={};c(m,i,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(j([])));v&&v!==e&&n.call(v,i)&&(m=v);var g=d.prototype=p.prototype=Object.create(m);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function o(r,i,a,u){var c=s(t[r],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==R(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function b(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=E(a,n);if(u){if(u===f)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 c=s(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function E(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=s(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function j(t){if(t||""===t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:j(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function Z(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function B(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Z(i,r,o,a,u,"next",t)}function u(t){Z(i,r,o,a,u,"throw",t)}a(void 0)}))}}function U(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=12||t.length<=6?(a(!0),c("Password should be 6-12 characters.")):(a(!1),r(t)):(a(!0),c("Number and English letters only"))}}),o.createElement("img",{height:"48px",src:p?A:P,onClick:function(){h(!p)}}))))}));var ht,dt=n(2776);var mt=a.ZP.div(ht||(ht=function(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n width: 465px;\n background-color: #F2F2F2;\n border-radius: 20px;\n box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);\n text-align: center;\n\n /* ๅฎšไฝๆญฃไธญ้–“ */\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: +10;\n\n @media (max-width: 700px) {\n width: 320px;\n }\n\n h2 {\n font-size: 24px;\n font-family: "Inter";\n font-weight: 700;\n line-height: 1.2em;\n /* padding-top: 36px;\n padding-bottom: 32px; */\n padding: 36px 20px 32px;\n }\n\n div {\n display: flex;\n flex-direction: row;\n justify-content: center;\n margin: 0 20px 20px;\n gap: 20px;\n }\n'])));function yt(){var t=N(),e=t.setShowDeleteAlert,n=t.setShowVarifyDialog;return o.createElement(mt,null,o.createElement("h2",null,"Do you really want to delete this note?"),o.createElement("div",null,o.createElement(d,{btnName:"Yes",onClick:function(t){t.stopPropagation(),n(!0),e(!1)}}),o.createElement(d,{btnName:"No",onClick:function(){e(!1)}})))}function vt(t){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vt(t)}function gt(){gt=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),u=new I(o||[]);return r(a,"_invoke",{value:b(t,n,u)}),a}function s(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f={};function p(){}function h(){}function d(){}var m={};c(m,i,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(j([])));v&&v!==e&&n.call(v,i)&&(m=v);var g=d.prototype=p.prototype=Object.create(m);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function o(r,i,a,u){var c=s(t[r],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==vt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function b(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=E(a,n);if(u){if(u===f)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 c=s(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function E(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=s(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function j(t){if(t||""===t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:j(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function wt(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function xt(){var t=N(),e=t.noteTitle,n=t.noteAuthor,r=t.noteTexts,i=t.noteID,a=t.notePassword,u=t.setNoteID,c=t.setNoteDate,l=t.noteTimeStamp,s=t.setNoteTimeStamp,f=t.inputPassword,p=t.showDeleteAlert,h=t.setShowDeleteAlert,m=t.showVarifyDialog,y=t.setShowVarifyDialog,x=t.setInputError,b=t.setInputErrorMessage,E=t.setIsFocusPasswordInput,S=(0,D.s0)(),O=(0,o.useRef)();function I(){var t;return t=gt().mark((function t(){var e;return gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,nt(i);case 2:if(e=t.sent,(0,dt.SHA256)(f).toString()!==e){t.next=8;break}Q(i),t.next=11;break;case 8:return x(!0),b("Password is uncorrect"),t.abrupt("return");case 11:j();case 12:case"end":return t.stop()}}),t)})),I=function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){wt(i,r,o,a,u,"next",t)}function u(t){wt(i,r,o,a,u,"throw",t)}a(void 0)}))},I.apply(this,arguments)}function j(){localStorage.removeItem("title"),localStorage.removeItem("texts"),localStorage.removeItem("author"),localStorage.removeItem("timeStamp"),localStorage.removeItem("id"),history.go(0)}function A(t){if(t.preventDefault(),""===a)return alert("Please set the password for this note in the password filed."),void E(!0);if(11111===l){var o,f,p,h,d=(0,dt.SHA256)(a).toString();y=new Date,v=y.getDate(),g=y.getMonth()+1,o=y.getFullYear()+"-"+g+"-"+v,f=(new Date).getTime(),h=function(t,e){var n=t.replace(/\s/g,"-")+"-"+e;return n}(e,o),function(t,e){W.apply(this,arguments)}(h,{noteTitle:e,noteAuthor:n,noteDate:o,noteTexts:r,encryptedPassword:d,noteTimeStamp:f,noteID:p=h}),c(o),s(f),u(p),S("/".concat(p))}else{var m=(0,dt.SHA256)(a).toString();!function(t,e){q.apply(this,arguments)}(i,{noteTitle:e,noteAuthor:n,noteTexts:r,encryptedPassword:m}),S("/".concat(i))}var y,v,g}return(0,o.useEffect)((function(){function t(t){O.current&&!O.current.contains(t.target)&&y(!1)}return document.addEventListener("click",t),function(){document.removeEventListener("click",t)}}),[p]),o.createElement(v,null,o.createElement(w,null,o.createElement(_,{handlePublish:A})),o.createElement(g,null,o.createElement(d,{type:"submit",form:"noteForm",btnName:"Publish",onClick:A}),o.createElement(d,{type:"submit",form:"noteForm",btnName:"Reset",onClick:j}),11111!==l?o.createElement(d,{type:"submit",form:"noteForm",btnName:"Delete",onClick:function(){h(!0)}}):null),m&&o.createElement(pt,{ref:O,doneButtonMission:function(){return I.apply(this,arguments)}}),p&&o.createElement(yt,null))}const bt=n.p+"f8135b3ccd9971e2b5a4.svg";function Et(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return St(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return St(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function St(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:j(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function Bt(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function Ut(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Bt(i,r,o,a,u,"next",t)}function u(t){Bt(i,r,o,a,u,"throw",t)}a(void 0)}))}}function $t(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Yt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Yt(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n{"use strict";n.d(e,{Z:()=>u});var r=n(5402),o=n.n(r),i=n(352),a=n.n(i)()(o());a.push([t.id,".custom-markdown {\n padding: 0 20px 10px;\n line-height: 2em;\n}\n\n.custom-markdown h1 {\n font-size: 32px;\n line-height: 1.5em;\n margin-bottom: 6px;\n}\n\n.custom-markdown h2 {\n font-size: 27px;\n line-height: 1.5em;\n margin-bottom: 4px;\n}\n\n.custom-markdown h3 {\n font-size: 24px;\n line-height: 1.5em;\n margin-bottom: 4px;\n}\n\n.custom-markdown h4 {\n font-size: 18px;\n line-height: 1.5em;\n margin-bottom: 4px;\n}\n\n.custom-markdown h5 {\n font-size: 16px;\n line-height: 1.5em;\n margin-bottom: 4px;\n}\n\n.custom-markdown h6 {\n font-size: 14px;\n line-height: 1.5em;\n margin-bottom: 4px;\n color: #A5A5A5;\n}\n\n.custom-markdown p {\n font-size: 18px;\n}\n\n.custom-markdown ol, ul {\n list-style-position: inside;\n}\n\n.custom-markdown li {\n font-size: 18px;\n line-height: 1.5em;\n}\n\n.custom-markdown a {\n color: #000000;\n margin: 6px 0;\n}\n\n.custom-markdown blockquote {\n border-left: 5px solid #F0F0F0;\n margin: 6px 0;\n}\n\n.custom-markdown code {\n font-size: 16px;\n background-color: #F0F0F0;\n padding: 4px;\n}\n\n.custom-markdown blockquote > p{\n margin-left: 1em;\n color: #4D4D4D;\n}\n\n.custom-markdown pre {\n background-color: #F0F0F0;\n padding: 4px;\n margin: 6px 0;\n}",""]);const u=a},2480:()=>{}},o={};function i(t){var e=o[t];if(void 0!==e)return e.exports;var n=o[t]={id:t,exports:{}};return r[t].call(n.exports,n,n.exports,i),n.exports}i.m=r,t=[],i.O=(e,n,r,o)=>{if(!n){var a=1/0;for(s=0;s=o)&&Object.keys(i.O).every((t=>i.O[t](n[c])))?n.splice(c--,1):(u=!1,o0&&t[s-1][2]>o;s--)t[s]=t[s-1];t[s]=[n,r,o]},i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},n=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,i.t=function(t,r){if(1&r&&(t=this(t)),8&r)return t;if("object"==typeof t&&t){if(4&r&&t.__esModule)return t;if(16&r&&"function"==typeof t.then)return t}var o=Object.create(null);i.r(o);var a={};e=e||[null,n({}),n([]),n(n)];for(var u=2&r&&t;"object"==typeof u&&!~e.indexOf(u);u=n(u))Object.getOwnPropertyNames(u).forEach((e=>a[e]=()=>t[e]));return a.default=()=>t,i.d(o,a),o},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;i.g.importScripts&&(t=i.g.location+"");var e=i.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&!t;)t=n[r--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=t})(),(()=>{var t={179:0};i.O.j=e=>0===t[e];var e=(e,n)=>{var r,o,[a,u,c]=n,l=0;if(a.some((e=>0!==t[e]))){for(r in u)i.o(u,r)&&(i.m[r]=u[r]);if(c)var s=c(i)}for(e&&e(n);li(4804)));a=i.O(a)})(); \ No newline at end of file +(()=>{var t,e,n,r={4804:(t,e,n)=>{"use strict";var r,o=n(9526),i=n(4470),a=n(365);var u,c,l,s=a.ZP.footer(r||(u=['\n background-color: #ffffff;\n width: 100vw;\n color: #A7A7A7; \n font-size: 14px;\n font-family: "Inter";\n font-weight: 400;\n text-align: center;\n padding: 10px;\n\n /* ๅฎšไฝๅœจๆœ€ไธ‹ๆ–น */ \n position: fixed;\n bottom: 0px;\n'],c||(c=u.slice(0)),r=Object.freeze(Object.defineProperties(u,{raw:{value:Object.freeze(c)}}))));var f,p,h=a.ZP.button(l||(l=function(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n /* ๆŒ‰้ˆ•็š„ๅค–่ช† */\n border: 3px solid #000000;\n background-color: #ffffff;\n border-radius: 25px;\n\n /* ๆ–‡ๅญ— */\n color: #000000;\n font-family: "Inter";\n font-size: 18px;\n font-weight: bold;\n padding: 10px 20px;\n\n display: block;\n /* margin-bottom: 30px; */\n\n /* ๆป‘้ผ  hover */\n &:hover {\n background-color: #000000;\n color: #ffffff;\n cursor: pointer;\n }\n'])));function d(t){var e=t.btnName,n=t.onClick;return o.createElement(h,{onClick:n},e)}function m(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var y,v=a.ZP.main(f||(f=m(["\n margin: 60px 0 30px;\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n align-items: flex-start;\n gap: 10px;\n\n @media (max-width: 850px) {\n margin: 60px 20px 30px;\n gap: 15px;\n justify-content: left;\n }\n"]))),g=a.ZP.aside(p||(p=m(["\n margin: 5px 0 10px;\n gap: 30px;\n display: flex;\n flex-direction: column;\n\n @media (max-width: 850px) {\n flex-direction: row;\n }\n"])));var w=a.ZP.article(y||(y=function(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n width: 700px;\n /* height: 70vh; */\n\n @media (max-width: 850px) {\n width: 100%;\n }\n\n input {\n width: inherit;\n padding: 0 20px 10px;\n border: none;\n outline: none;\n font-size: 18px;\n resize: none;\n\n /* input ๅ…ง็š„ๅญ— */\n font-family: "Noto Sans TC";\n }\n\n textarea {\n width: 700px;\n border: none;\n outline: none;\n resize: none;\n overflow-y: hidden;\n\n /* textarea ็š„ๆ–‡ๅญ— */\n font-family: inherit;\n font-size: 18px;\n line-height: 1.5;\n padding: 0 20px 10px;\n font-weight: 400;\n\n @media (max-width: 850px) {\n width: 100%;\n }\n }\n\n /* ๏ผ๏ผ๏ผ๏ผ๏ผ ไปฅไธ‹้ฉ็”จ Note ๏ผ๏ผ๏ผ๏ผ๏ผ */\n /* .header ็‚บ note/edit ๅ…ฑ็”จ */\n .title {\n width: 700px;\n font-size: 32px;\n font-weight: 700;\n padding: 0 20px 10px 20px;\n\n @media (max-width: 850px) {\n width: 100%;\n }\n }\n\n .author {\n font-size: 18px;\n width: 100%;\n padding: 0 20px 10px 20px;\n\n @media (max-width: 850px) {\n width: 100%;\n }\n }\n\n div {\n margin: 12px 0 24px;\n\n label, span {\n /* margin: 5px 0; */\n padding-left: 10px;\n font-family: "Inter";\n font-weight: 100;\n font-size: 18px;\n position: relative;\n margin: 12px 0;\n }\n\n img {\n position: absolute;\n margin-left: -42px;\n }\n\n input {\n margin-left: 6px;\n border-bottom: 1px solid #A5A5A5;\n border-radius: 10px;\n }\n\n .password-hint {\n font-weight: 400;\n }\n\n @media (max-width: 850px) {\n width: 100%;\n }\n }\n'])));function x(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return b(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=6&&t.length<=12?(s(t),w("Password done.")):t.length>12||(s(t),w("Password should be 6-12 characters.")):w("Number and English letters only")},maxLength:12}),o.createElement("img",{src:m?N:A,height:"30px",onClick:function(){y(!m)}}),o.createElement("br",null),o.createElement("span",null,"Password hint: "),o.createElement("span",{className:"password-hint"},g)))}var _=n(3277),F=n(1402),z=n(1844),C={apiKey:"AIzaSyBUv15yx6tjBPpDjQOYLXzNuAuna3SPgd0",authDomain:"l-note-13c24.firebaseapp.com",projectId:"l-note-13c24",storageBucket:"l-note-13c24.appspot.com",messagingSenderId:"MISSING_ENV_VAR".MESSAGING_SENDER_ID,appId:'"1:719013704397:web:1f1ac4587ec30916b92f84"npm i'},M=(0,z.ZF)(C),G=(0,F.ad)(M);function Z(t){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Z(t)}function U(){U=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),u=new j(o||[]);return r(a,"_invoke",{value:b(t,n,u)}),a}function s(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f={};function p(){}function h(){}function d(){}var m={};c(m,i,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(P([])));v&&v!==e&&n.call(v,i)&&(m=v);var g=d.prototype=p.prototype=Object.create(m);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function o(r,i,a,u){var c=s(t[r],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==Z(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function b(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=E(a,n);if(u){if(u===f)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 c=s(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function E(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=s(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function P(t){if(t||""===t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:P(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function R(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function V(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){R(i,r,o,a,u,"next",t)}function u(t){R(i,r,o,a,u,"throw",t)}a(void 0)}))}}function B(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=12||t.length<=6?(a(!0),c("Password should be 6-12 characters.")):(a(!1),r(t)):(a(!0),c("Number and English letters only"))}}),o.createElement("img",{height:"48px",src:p?N:A,onClick:function(){h(!p)}}))))}));var ht,dt=n(2776);var mt=a.ZP.div(ht||(ht=function(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n width: 465px;\n background-color: #F2F2F2;\n border-radius: 20px;\n box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);\n text-align: center;\n\n /* ๅฎšไฝๆญฃไธญ้–“ */\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: +10;\n\n @media (max-width: 700px) {\n width: 320px;\n }\n\n h2 {\n font-size: 24px;\n font-family: "Inter";\n font-weight: 700;\n line-height: 1.2em;\n /* padding-top: 36px;\n padding-bottom: 32px; */\n padding: 36px 20px 32px;\n }\n\n div {\n display: flex;\n flex-direction: row;\n justify-content: center;\n margin: 0 20px 20px;\n gap: 20px;\n }\n'])));function yt(){var t=I(),e=t.setShowDeleteAlert,n=t.setShowVarifyDialog;return o.createElement(mt,null,o.createElement("h2",null,"Do you really want to delete this note?"),o.createElement("div",null,o.createElement(d,{btnName:"Yes",onClick:function(t){t.stopPropagation(),n(!0),e(!1)}}),o.createElement(d,{btnName:"No",onClick:function(){e(!1)}})))}function vt(t){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vt(t)}function gt(){gt=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),u=new j(o||[]);return r(a,"_invoke",{value:b(t,n,u)}),a}function s(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f={};function p(){}function h(){}function d(){}var m={};c(m,i,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(P([])));v&&v!==e&&n.call(v,i)&&(m=v);var g=d.prototype=p.prototype=Object.create(m);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function o(r,i,a,u){var c=s(t[r],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==vt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function b(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=E(a,n);if(u){if(u===f)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 c=s(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function E(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=s(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function P(t){if(t||""===t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:P(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function wt(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function xt(){var t=I(),e=t.noteTitle,n=t.noteAuthor,r=t.noteTexts,i=t.noteID,a=t.notePassword,u=t.setNoteID,c=t.setNoteDate,l=t.noteTimeStamp,s=t.setNoteTimeStamp,f=t.inputPassword,p=t.showDeleteAlert,h=t.setShowDeleteAlert,m=t.showVarifyDialog,y=t.setShowVarifyDialog,x=t.setInputError,b=t.setInputErrorMessage,E=t.setIsFocusPasswordInput,S=(0,_.s0)(),O=(0,o.useRef)();function j(){var t;return t=gt().mark((function t(){var e;return gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,nt(i);case 2:if(e=t.sent,(0,dt.SHA256)(f).toString()!==e){t.next=8;break}K(i),t.next=11;break;case 8:return x(!0),b("Password is uncorrect"),t.abrupt("return");case 11:P();case 12:case"end":return t.stop()}}),t)})),j=function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){wt(i,r,o,a,u,"next",t)}function u(t){wt(i,r,o,a,u,"throw",t)}a(void 0)}))},j.apply(this,arguments)}function P(){localStorage.removeItem("title"),localStorage.removeItem("texts"),localStorage.removeItem("author"),localStorage.removeItem("timeStamp"),localStorage.removeItem("id"),history.go(0)}function N(t){if(t.preventDefault(),""===a)return alert("Please set the password for this note in the password filed."),void E(!0);if(11111===l){var o,f,p,h,d=(0,dt.SHA256)(a).toString();y=new Date,v=y.getDate(),g=y.getMonth()+1,o=y.getFullYear()+"-"+g+"-"+v,f=(new Date).getTime(),h=function(t,e){var n=t.replace(/\s/g,"-")+"-"+e;return n}(e,o),function(t,e){Q.apply(this,arguments)}(h,{noteTitle:e,noteAuthor:n,noteDate:o,noteTexts:r,encryptedPassword:d,noteTimeStamp:f,noteID:p=h}),c(o),s(f),u(p),S("/".concat(p))}else{var m=(0,dt.SHA256)(a).toString();!function(t,e){q.apply(this,arguments)}(i,{noteTitle:e,noteAuthor:n,noteTexts:r,encryptedPassword:m}),S("/".concat(i))}var y,v,g}return(0,o.useEffect)((function(){function t(t){O.current&&!O.current.contains(t.target)&&y(!1)}return document.addEventListener("click",t),function(){document.removeEventListener("click",t)}}),[p]),o.createElement(v,null,o.createElement(w,null,o.createElement(D,{handlePublish:N})),o.createElement(g,null,o.createElement(d,{type:"submit",form:"noteForm",btnName:"Publish",onClick:N}),o.createElement(d,{type:"submit",form:"noteForm",btnName:"Reset",onClick:P}),11111!==l?o.createElement(d,{type:"submit",form:"noteForm",btnName:"Delete",onClick:function(){h(!0)}}):null),m&&o.createElement(pt,{ref:O,doneButtonMission:function(){return j.apply(this,arguments)}}),p&&o.createElement(yt,null))}const bt=n.p+"f8135b3ccd9971e2b5a4.svg";function Et(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return St(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return St(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function St(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:P(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function Vt(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function Bt(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Vt(i,r,o,a,u,"next",t)}function u(t){Vt(i,r,o,a,u,"throw",t)}a(void 0)}))}}function $t(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Yt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Yt(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n{"use strict";n.d(e,{Z:()=>u});var r=n(5402),o=n.n(r),i=n(352),a=n.n(i)()(o());a.push([t.id,".custom-markdown {\n padding: 0 20px 10px;\n line-height: 2em;\n}\n\n.custom-markdown h1 {\n font-size: 32px;\n line-height: 1.5em;\n margin-bottom: 6px;\n}\n\n.custom-markdown h2 {\n font-size: 27px;\n line-height: 1.5em;\n margin-bottom: 4px;\n}\n\n.custom-markdown h3 {\n font-size: 24px;\n line-height: 1.5em;\n margin-bottom: 4px;\n}\n\n.custom-markdown h4 {\n font-size: 18px;\n line-height: 1.5em;\n margin-bottom: 4px;\n}\n\n.custom-markdown h5 {\n font-size: 16px;\n line-height: 1.5em;\n margin-bottom: 4px;\n}\n\n.custom-markdown h6 {\n font-size: 14px;\n line-height: 1.5em;\n margin-bottom: 4px;\n color: #A5A5A5;\n}\n\n.custom-markdown p {\n font-size: 18px;\n}\n\n.custom-markdown ol, ul {\n list-style-position: inside;\n}\n\n.custom-markdown li {\n font-size: 18px;\n line-height: 1.5em;\n}\n\n.custom-markdown a {\n color: #000000;\n margin: 6px 0;\n}\n\n.custom-markdown blockquote {\n border-left: 5px solid #F0F0F0;\n margin: 6px 0;\n}\n\n.custom-markdown code {\n font-size: 16px;\n background-color: #F0F0F0;\n padding: 4px;\n}\n\n.custom-markdown blockquote > p{\n margin-left: 1em;\n color: #4D4D4D;\n}\n\n.custom-markdown pre {\n background-color: #F0F0F0;\n padding: 4px;\n margin: 6px 0;\n}",""]);const u=a},2480:()=>{}},o={};function i(t){var e=o[t];if(void 0!==e)return e.exports;var n=o[t]={id:t,exports:{}};return r[t].call(n.exports,n,n.exports,i),n.exports}i.m=r,t=[],i.O=(e,n,r,o)=>{if(!n){var a=1/0;for(s=0;s=o)&&Object.keys(i.O).every((t=>i.O[t](n[c])))?n.splice(c--,1):(u=!1,o0&&t[s-1][2]>o;s--)t[s]=t[s-1];t[s]=[n,r,o]},i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},n=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,i.t=function(t,r){if(1&r&&(t=this(t)),8&r)return t;if("object"==typeof t&&t){if(4&r&&t.__esModule)return t;if(16&r&&"function"==typeof t.then)return t}var o=Object.create(null);i.r(o);var a={};e=e||[null,n({}),n([]),n(n)];for(var u=2&r&&t;"object"==typeof u&&!~e.indexOf(u);u=n(u))Object.getOwnPropertyNames(u).forEach((e=>a[e]=()=>t[e]));return a.default=()=>t,i.d(o,a),o},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;i.g.importScripts&&(t=i.g.location+"");var e=i.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&!t;)t=n[r--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=t})(),(()=>{var t={179:0};i.O.j=e=>0===t[e];var e=(e,n)=>{var r,o,[a,u,c]=n,l=0;if(a.some((e=>0!==t[e]))){for(r in u)i.o(u,r)&&(i.m[r]=u[r]);if(c)var s=c(i)}for(e&&e(n);li(4804)));a=i.O(a)})(); \ No newline at end of file diff --git a/src/components/note-mode/ShareDialog.js b/src/components/note-mode/ShareDialog.js index a7d97bd..a09a125 100644 --- a/src/components/note-mode/ShareDialog.js +++ b/src/components/note-mode/ShareDialog.js @@ -1,13 +1,11 @@ import React, { useRef, useState } from "react"; import Dialog from "../dialog"; import copyUrlIcon from "../../img/copy-icon.svg" -import { useNoteData } from "../../Hooks/NoteContext"; -export default function ShareDialog({ setShowShareDialog }) { - const { noteID } = useNoteData(); +export default function ShareDialog({ setShowShareDialog, urlNoteID }) { const [isCopied, setIsCopied] = useState(false); const copyUrlRef = useRef(); - const noteUrl = "https://l.note" + "/" + noteID; + const noteUrl = "https://" + "l-note-app.web.app" + "/" + urlNoteID; function closeShareDialog() { setShowShareDialog(false); diff --git a/src/pages/NoteMode.js b/src/pages/NoteMode.js index 2d9063c..fd7080f 100644 --- a/src/pages/NoteMode.js +++ b/src/pages/NoteMode.js @@ -138,6 +138,7 @@ export default function NoteMode() { { showShareDialog && } { showVarifyDialog && (