@emailmaker/emailmaker 1.0.98 → 1.0.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/asset-manifest.json +165 -0
- package/css.worker.js +2 -0
- package/css.worker.js.LICENSE.txt +6 -0
- package/editor.worker.js +1 -0
- package/emailmaker-esm.js +1 -0
- package/emailmaker.d.ts +1826 -0
- package/emailmaker.js +1 -0
- package/html.worker.js +1 -0
- package/iframe/429.js +1 -1
- package/iframe/766.js +1 -1
- package/iframe/iframe-eblock.e88ae8a9ae883be1118b.html +1 -0
- package/iframe/iframe.e88ae8a9ae883be1118b.html +1 -0
- package/iframe/js/330.4622fd92.js +1 -0
- package/iframe/sandbox-eblock.js +1 -1
- package/iframe/sandbox.js +1 -1
- package/package.json +1 -1
- package/plugin.html +294 -0
- package/plugin_blocks_test.html +144 -0
- package/plugin_default.html +56 -0
- package/plugin_idigital.html +254 -0
- package/plugin_nota.html +861 -0
- package/plugin_s.html +31 -0
- package/static/css/1169.c8d4ad26.chunk.css +1 -0
- package/static/css/57.c4280089.chunk.css +1 -0
- package/static/css/6501.e131603e.chunk.css +1 -0
- package/static/css/6798.4b23f0cb.chunk.css +1 -0
- package/static/css/84.709e209c.chunk.css +1 -0
- package/static/js/1169.baef237c.chunk.js +2 -0
- package/static/js/1169.baef237c.chunk.js.LICENSE.txt +6 -0
- package/static/js/1303.92cc3c9c.js +2 -0
- package/static/js/1303.92cc3c9c.js.LICENSE.txt +11 -0
- package/static/js/1538.68b12a82.chunk.js +2 -0
- package/static/js/1538.68b12a82.chunk.js.LICENSE.txt +23 -0
- package/static/js/1729.a0be903e.chunk.js +1 -0
- package/static/js/1880.5668de7d.chunk.js +1 -0
- package/static/js/207.2a052cc2.js +2 -0
- package/static/js/207.2a052cc2.js.LICENSE.txt +59 -0
- package/static/js/2624.5a8b68ca.js +2 -0
- package/static/js/2624.5a8b68ca.js.LICENSE.txt +21 -0
- package/static/js/2642.b60a63f6.chunk.js +1 -0
- package/static/js/2854.da9b4ca6.js +2 -0
- package/static/js/2854.da9b4ca6.js.LICENSE.txt +31 -0
- package/static/js/3017.102adc4c.chunk.js +1 -0
- package/static/js/3019.8534e1e7.chunk.js +2 -0
- package/static/js/3019.8534e1e7.chunk.js.LICENSE.txt +6 -0
- package/static/js/3065.c2b60870.js +2 -0
- package/static/js/3065.c2b60870.js.LICENSE.txt +39 -0
- package/static/js/3085.bcc62ca0.chunk.js +2 -0
- package/static/js/3085.bcc62ca0.chunk.js.LICENSE.txt +54 -0
- package/static/js/4309.6c1989bb.chunk.js +1 -0
- package/static/js/4972.a230fee4.js +1 -0
- package/static/js/57.3e1e762a.chunk.js +1 -0
- package/static/js/6144.a3bf0881.chunk.js +2 -0
- package/static/js/6144.a3bf0881.chunk.js.LICENSE.txt +6 -0
- package/static/js/6419.3f1ccca4.js +2 -0
- package/static/js/6419.3f1ccca4.js.LICENSE.txt +1 -0
- package/static/js/6501.40bbf4df.chunk.js +1 -0
- package/static/js/6798.65ecf642.chunk.js +2 -0
- package/static/js/6798.65ecf642.chunk.js.LICENSE.txt +39 -0
- package/static/js/6801.562ec824.chunk.js +2 -0
- package/static/js/6801.562ec824.chunk.js.LICENSE.txt +6 -0
- package/static/js/6819.16ca9581.chunk.js +2 -0
- package/static/js/6819.16ca9581.chunk.js.LICENSE.txt +6 -0
- package/static/js/6957.7ea22637.chunk.js +1 -0
- package/static/js/7463.51929d73.chunk.js +2 -0
- package/static/js/7463.51929d73.chunk.js.LICENSE.txt +6 -0
- package/static/js/84.25bf13c1.chunk.js +1 -0
- package/static/js/8473.88a48c70.chunk.js +2 -0
- package/static/js/8473.88a48c70.chunk.js.LICENSE.txt +101 -0
- package/static/js/8521.0e5efd08.chunk.js +2 -0
- package/static/js/8521.0e5efd08.chunk.js.LICENSE.txt +6 -0
- package/static/js/9644.eb778968.chunk.js +2 -0
- package/static/js/9644.eb778968.chunk.js.LICENSE.txt +6 -0
- package/static/js/9960.6fbe3e6d.chunk.js +2 -0
- package/static/js/9960.6fbe3e6d.chunk.js.LICENSE.txt +30 -0
- package/static/js/9981.4c03120e.js +1 -0
- package/static/js/ant-locale/locale-ar_EG-js.a068e3a8.chunk.js +1 -0
- package/static/js/ant-locale/locale-az_AZ-js.b84a560f.chunk.js +1 -0
- package/static/js/ant-locale/locale-bg_BG-js.3d7c7e4f.chunk.js +1 -0
- package/static/js/ant-locale/locale-bn_BD-js.dd1a7e84.chunk.js +1 -0
- package/static/js/ant-locale/locale-by_BY-js.49b7fc6b.chunk.js +1 -0
- package/static/js/ant-locale/locale-ca_ES-js.24fe4aef.chunk.js +1 -0
- package/static/js/ant-locale/locale-cs_CZ-js.1e90fb24.chunk.js +1 -0
- package/static/js/ant-locale/locale-da_DK-js.61788209.chunk.js +1 -0
- package/static/js/ant-locale/locale-de_DE-js.8e7fdd44.chunk.js +1 -0
- package/static/js/ant-locale/locale-el_GR-js.6c5e0839.chunk.js +1 -0
- package/static/js/ant-locale/locale-en_GB-js.92cc4647.chunk.js +1 -0
- package/static/js/ant-locale/locale-es_ES-js.a31d70e0.chunk.js +1 -0
- package/static/js/ant-locale/locale-et_EE-js.337814a0.chunk.js +1 -0
- package/static/js/ant-locale/locale-eu_ES-js.18f1c965.chunk.js +1 -0
- package/static/js/ant-locale/locale-fa_IR-js.f0f50266.chunk.js +1 -0
- package/static/js/ant-locale/locale-fi_FI-js.e2e08d8a.chunk.js +1 -0
- package/static/js/ant-locale/locale-fr_BE-js.2e2298ab.chunk.js +1 -0
- package/static/js/ant-locale/locale-fr_CA-js.b2f59d9c.chunk.js +1 -0
- package/static/js/ant-locale/locale-fr_FR-js.5d07a79a.chunk.js +1 -0
- package/static/js/ant-locale/locale-ga_IE-js.afa510f9.chunk.js +1 -0
- package/static/js/ant-locale/locale-gl_ES-js.72e19ffc.chunk.js +1 -0
- package/static/js/ant-locale/locale-he_IL-js.47b71730.chunk.js +1 -0
- package/static/js/ant-locale/locale-hi_IN-js.7af15f51.chunk.js +1 -0
- package/static/js/ant-locale/locale-hr_HR-js.4ebb11e0.chunk.js +1 -0
- package/static/js/ant-locale/locale-hu_HU-js.ecde5d7e.chunk.js +1 -0
- package/static/js/ant-locale/locale-hy_AM-js.15e07ba1.chunk.js +1 -0
- package/static/js/ant-locale/locale-id_ID-js.ab0888b9.chunk.js +1 -0
- package/static/js/ant-locale/locale-is_IS-js.fdbfc750.chunk.js +1 -0
- package/static/js/ant-locale/locale-it_IT-js.59a531ef.chunk.js +1 -0
- package/static/js/ant-locale/locale-ja_JP-js.7870613a.chunk.js +1 -0
- package/static/js/ant-locale/locale-ka_GE-js.853f3af0.chunk.js +1 -0
- package/static/js/ant-locale/locale-kk_KZ-js.5fdcc75b.chunk.js +1 -0
- package/static/js/ant-locale/locale-km_KH-js.988792d2.chunk.js +1 -0
- package/static/js/ant-locale/locale-kmr_IQ-js.6903b04d.chunk.js +1 -0
- package/static/js/ant-locale/locale-kn_IN-js.5fbd9645.chunk.js +1 -0
- package/static/js/ant-locale/locale-ko_KR-js.07676057.chunk.js +1 -0
- package/static/js/ant-locale/locale-ku_IQ-js.8d56188e.chunk.js +1 -0
- package/static/js/ant-locale/locale-lt_LT-js.976c50a6.chunk.js +1 -0
- package/static/js/ant-locale/locale-lv_LV-js.d2b7eb7a.chunk.js +1 -0
- package/static/js/ant-locale/locale-mk_MK-js.1a324243.chunk.js +1 -0
- package/static/js/ant-locale/locale-ml_IN-js.9ca0875e.chunk.js +1 -0
- package/static/js/ant-locale/locale-mn_MN-js.e5c5e6b3.chunk.js +1 -0
- package/static/js/ant-locale/locale-ms_MY-js.68d51cfa.chunk.js +1 -0
- package/static/js/ant-locale/locale-my_MM-js.1d798fbf.chunk.js +1 -0
- package/static/js/ant-locale/locale-nb_NO-js.85b15451.chunk.js +1 -0
- package/static/js/ant-locale/locale-ne_NP-js.db143616.chunk.js +1 -0
- package/static/js/ant-locale/locale-nl_BE-js.71247744.chunk.js +1 -0
- package/static/js/ant-locale/locale-nl_NL-js.26845b27.chunk.js +1 -0
- package/static/js/ant-locale/locale-pl_PL-js.44a62852.chunk.js +1 -0
- package/static/js/ant-locale/locale-pt_BR-js.17328a86.chunk.js +1 -0
- package/static/js/ant-locale/locale-pt_PT-js.05d4d804.chunk.js +1 -0
- package/static/js/ant-locale/locale-ro_RO-js.3e1e40bb.chunk.js +1 -0
- package/static/js/ant-locale/locale-si_LK-js.facbc144.chunk.js +1 -0
- package/static/js/ant-locale/locale-sk_SK-js.32bd8996.chunk.js +1 -0
- package/static/js/ant-locale/locale-sl_SI-js.f054d794.chunk.js +1 -0
- package/static/js/ant-locale/locale-sr_RS-js.317370b5.chunk.js +1 -0
- package/static/js/ant-locale/locale-sv_SE-js.ecd8298d.chunk.js +1 -0
- package/static/js/ant-locale/locale-ta_IN-js.ee264565.chunk.js +1 -0
- package/static/js/ant-locale/locale-th_TH-js.f1d32c8f.chunk.js +1 -0
- package/static/js/ant-locale/locale-tk_TK-js.015ee01f.chunk.js +1 -0
- package/static/js/ant-locale/locale-tr_TR-js.4c6d775a.chunk.js +1 -0
- package/static/js/ant-locale/locale-uk_UA-js.cef1c751.chunk.js +1 -0
- package/static/js/ant-locale/locale-ur_PK-js.b5d52218.chunk.js +1 -0
- package/static/js/ant-locale/locale-vi_VN-js.c5140ea5.chunk.js +1 -0
- package/static/js/ant-locale/locale-zh_CN-js.861c7ef0.chunk.js +1 -0
- package/static/js/ant-locale/locale-zh_HK-js.ca14eb1f.chunk.js +1 -0
- package/static/js/ant-locale/locale-zh_TW-js.69bb4746.chunk.js +1 -0
- package/static/js/emailmaker_core.c2851865.js +2 -0
- package/static/js/emailmaker_core.c2851865.js.LICENSE.txt +23 -0
- package/static/js/mergeTags/locale0.24c6e2da.chunk.js +1 -0
- package/static/js/mergeTags/locale1.24fd0fd2.chunk.js +1 -0
- package/static/media/ai-image.7c42c2e12001ebf31881.png +0 -0
- package/static/media/codicon.f13d28f3e470ec5c0896.ttf +0 -0
- package/static/media/empty-image.1827d6561f3c4042dfb3.png +0 -0
- package/static/media/fb.ff10384394f8044ec889.png +0 -0
- package/static/media/frame_dark.318d7ed53535d80662dc.png +0 -0
- package/static/media/frame_light.22a9b4ec728365d8193f.png +0 -0
- package/static/media/frame_template_gallery.85693b3950e7689fb3a5.png +0 -0
- package/static/media/icon-border-radius.2a56b93a7711558098a622296b7ae2e1.svg +1 -0
- package/static/media/icon-create-block.0b077f4000bf7907b9ea871d28c7fb1e.svg +1 -0
- package/static/media/icon-menu-block-welcome.1c534a003522feadd2e7.png +0 -0
- package/static/media/ig.47a89992b4bec92d4364.png +0 -0
- package/static/media/project-email-back-dark.9916625a9a714830b770.svg +29 -0
- package/static/media/project-email-back.0ce470def19ce7c063e0.svg +29 -0
- package/static/media/sign_up_01.333271584216122b89ba.png +0 -0
- package/static/media/sign_up_01_blocks.5538cfdb90d4869794dc.png +0 -0
- package/static/media/sign_up_02.d99d2aa6bf1ea74f01fa.png +0 -0
- package/static/media/sign_up_02_blocks.837fc2c9a9461fda13be.png +0 -0
- package/static/media/sign_up_03.5545ffad60a2cb5e0336.png +0 -0
- package/static/media/sign_up_03_blocks.126601f7a6fbea4b6c54.png +0 -0
- package/static/media/sign_up_04.398a4ca50d5f5b3cd837.png +0 -0
- package/static/media/sign_up_04_blocks.255c5c07b23cbcc256fd.png +0 -0
- package/static/media/sign_up_05.4c58df1be2edaa79d52b.png +0 -0
- package/static/media/sign_up_05_blocks.431b6844fdf3e14642c2.png +0 -0
- package/static/media/tg.10f004529a98df9732b9.png +0 -0
- package/static/media/tw.823a7736ac2d82815c71.png +0 -0
- package/static/media/video.854adea50295d0a3f7ae.png +0 -0
- package/static/media/vk.fe41df919f4e8718e0b3.png +0 -0
- package/static/media/yd.c40d05dde64ef695fdf2.png +0 -0
- package/static/media/yt.4ac57e55d158b40c7fc1.png +0 -0
- package/translations.pot +76 -76
- package/iframe/iframe-eblock.441a4dbc4384f20fcf1e.html +0 -1
- package/iframe/iframe.441a4dbc4384f20fcf1e.html +0 -1
- package/iframe/js/330.378aec42.js +0 -1
- /package/iframe/js/{330.378aec42.js.LICENSE.txt → 330.4622fd92.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[]).push([[57],{10653:(e,t,i)=>{i.r(t),i.d(t,{default:()=>$});var r=i(98173),s=i(2604),n=i(30150),o=i(40120),a=i(48753),l=i(98447),d=i(38826),h=i(871),c=i(47014),u=i(23424),v=i(80772),f=i(84572),m=i(48956),p=i(27941),I=i(5558),y=i(90614),g=i(73180);let w;var _;(_=w||(w={})).isEqual=function(e,t,i=(e,t)=>e===t){if(e===t)return!0;const r=e.length;if(r!==t.length)return!1;for(let s=0;s<r;s++)if(!i(e[s],t[s]))return!1;return!0},_.unique=function(e,t){t||(t=e=>e);const i=new Set;return e.filter(e=>{const r=t(e),s=!i.has(r);return i.add(r),s})};var F=i(12543),P=i(15626),C=i(51213);function E(e){return null==e||""===e?"":e}function S(e){if(null==e)return 1/0;const t=Number(e);return Number.isFinite(t)&&t>=0?t:1/0}function b(e){if(!e)return null;const t=e.folderId;return null==t?null:String(t)}function A(e){return!!e&&e.isFolder}function O(){var e;if("function"===typeof(null===globalThis||void 0===globalThis||null===(e=globalThis.crypto)||void 0===e?void 0:e.randomUUID))return globalThis.crypto.randomUUID();try{const e=globalThis.crypto||globalThis.msCrypto;if(e&&"function"===typeof e.getRandomValues){const t=new Uint8Array(16);e.getRandomValues(t);let i="";for(let e=0;e<t.length;e++)i+=t[e].toString(16).padStart(2,"0");return`id_${i}`}}catch{}return`id_fallback_${Date.now().toString(36)}_${Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(36).slice(0,8)}`}function T(e){const t=new WeakSet;try{return function e(i){if(null===i)return"null";if("boolean"===typeof i)return i?"true":"false";if("number"===typeof i)return Number.isNaN(i)?"NaN":i===1/0?"Infinity":i===-1/0?"-Infinity":Object.is(i,-0)?"-0":String(i);if("string"===typeof i)return JSON.stringify(i);if("undefined"===typeof i)return"undefined";if("symbol"===typeof i)return String(i.toString());if("function"===typeof i)return'"[function]"';if(i instanceof Date)return`"Date(${i.toISOString()})"`;if(i instanceof RegExp)return`"RegExp(${i.toString()})"`;if("object"===typeof i)return t.has(i)?'"[Circular]"':(t.add(i),i instanceof Map?`{Map:${Array.from(i.entries()).sort(([e],[t])=>T(e).localeCompare(T(t))).map(([t,i])=>`[${e(t)}:${e(i)}]`).join(",")}}`:i instanceof Set?`{Set:[${Array.from(i.values()).map(t=>e(t)).sort().join(",")}]}`:Array.isArray(i)?`[${i.map(t=>e(t)).join(",")}]`:`{${Object.entries(i).sort(([e],[t])=>e.localeCompare(t)).map(([t,i])=>`${JSON.stringify(t)}:${e(i)}`).join(",")}}`);return JSON.stringify(String(i))}(e)}catch(i){try{return JSON.stringify(e)}catch{return String(e)}}}class M{constructor(){this.entities=new Map,this.childrenByParent=new Map}now(){return Date.now()}getEntity(e){var t;return null===(t=this.entities.get(e))||void 0===t?void 0:t.value}getRecord(e){return this.entities.get(e)}getFileSystemItem(e){const t=this.getEntity(e);return t&&!A(t)?t:void 0}getFolder(e){const t=this.getEntity(e);return t&&A(t)?t:void 0}getChildrenIds(e,t={}){const i=E(e),r=this.childrenByParent.get(i);return r?t.onlyFileSystemItems?Array.from(r.files):t.onlyFolders?Array.from(r.folders):[...Array.from(r.folders),...Array.from(r.files)]:[]}upsertEntity(e){var t;const i=null!==(t=this.entities.get(e.id))&&void 0!==t?t:null,r=i?i.value:null,s=r?b(r):null,n=b(e),o=!!r&&A(r),a=A(e);let l;if(r&&A(r)&&a){const t=r.childrenCount,i=e.childrenCount;void 0!==t&&void 0===i&&(l=t)}if(r&&(s!==n||o!==a)){const t=E(s),i=this.childrenByParent.get(t);i&&(o?i.folders.delete(e.id):i.files.delete(e.id),0===i.files.size&&0===i.folders.size&&this.childrenByParent.delete(t))}let d=e;void 0!==l&&(d={...e,childrenCount:l}),this.entities.set(e.id,{value:{...d},updatedAt:this.now()});const h=E(n);let c=this.childrenByParent.get(h);c||(c={files:new Set,folders:new Set},this.childrenByParent.set(h,c)),a?c.folders.add(e.id):c.files.add(e.id)}updateServerChildrenCount(e,t){if(null==e||null==t||Number.isNaN(t))return;const i=this.entities.get(e);if(!i||!A(i.value))return;const r={...i.value,childrenCount:t};this.entities.set(e,{value:r,updatedAt:this.now()})}deleteEntityById(e){var t;const i=null!==(t=this.entities.get(e))&&void 0!==t?t:null;if(!i)return{entity:null,parentId:null};const r=i.value,s=b(r),n=E(s),o=this.childrenByParent.get(n);return o&&(A(r)?o.folders.delete(e):o.files.delete(e),0===o.files.size&&0===o.folders.size&&this.childrenByParent.delete(n)),this.entities.delete(e),{entity:{...r},parentId:s}}deleteFolderRecursive(e){const t=this.entities.get(e);if(!t||!A(t.value))return{deletedFolderRecords:[],deletedFileSystemItemRecords:[]};const i=[{id:e,parentId:b(t.value)}],r=[],s=[];for(;i.length;){const e=i.shift();r.push(e);const t=this.childrenByParent.get(E(e.id));if(t){for(const e of Array.from(t.folders)){const t=this.entities.get(e);t&&i.push({id:e,parentId:b(t.value)})}for(const e of Array.from(t.files))s.push(e)}}const n=[];for(const a of s){const e=this.entities.get(a);if(!e)continue;const t=e.value,i=E(b(t)),r=this.childrenByParent.get(i);r&&(r.files.delete(a),0===r.files.size&&0===r.folders.size&&this.childrenByParent.delete(i)),this.entities.delete(a),n.push({...t})}const o=[];for(let a=r.length-1;a>=0;a--){const{id:e,parentId:t}=r[a],i=this.entities.get(e);if(!i)continue;const s=i.value,n=E(s.id);this.childrenByParent.delete(n);const l=E(t),d=this.childrenByParent.get(l);d&&(d.folders.delete(e),0===d.files.size&&0===d.folders.size&&this.childrenByParent.delete(l)),this.entities.delete(e),o.push({...s})}return{deletedFolderRecords:o,deletedFileSystemItemRecords:n}}moveEntityById(e,t){var i;const r=null!==(i=this.entities.get(e))&&void 0!==i?i:null;if(!r)return null;const s=r.value,n=E(b(s)),o=this.childrenByParent.get(n);o&&(A(s)?o.folders.delete(e):o.files.delete(e),0===o.files.size&&0===o.folders.size&&this.childrenByParent.delete(n));const a={...s,folderId:t};if(A(s)&&A(a)){const e=s.childrenCount;void 0!==e&&(a.childrenCount=e)}this.entities.set(e,{value:a,updatedAt:this.now()});const l=E(t);let d=this.childrenByParent.get(l);return d||(d={files:new Set,folders:new Set},this.childrenByParent.set(l,d)),A(a)?d.folders.add(e):d.files.add(e),{...a}}copyFileSystemItem(e,t,i){var r;const s=null!==(r=this.entities.get(e))&&void 0!==r?r:null;if(!s||A(s.value))return null;const n={...s.value,id:t,folderId:i};return this.upsertEntity(n),{...n}}copyFolderShallow(e,t,i){var r;const s=null!==(r=this.entities.get(e))&&void 0!==r?r:null;if(!s||!A(s.value))return null;const n={...s.value,id:t,folderId:i};return this.upsertEntity(n),{...n}}isEntityStale(e,t){var i;const r=null!==(i=this.entities.get(e))&&void 0!==i?i:null;return!r||t!==1/0&&this.now()-r.updatedAt>t}touch(e,t){const i=this.entities.get(e);i&&(i.updatedAt=null!==t&&void 0!==t?t:this.now())}getEntitiesByIds(e){return e.map(e=>{var t,i;return null!==(t=null===(i=this.entities.get(e))||void 0===i?void 0:i.value)&&void 0!==t?t:null})}toJSON(){return{entities:Array.from(this.entities.entries()),childrenByParent:Array.from(this.childrenByParent.entries()).map(([e,t])=>[e,{files:Array.from(t.files),folders:Array.from(t.folders)}])}}static fromJSON(e){const t=new M;for(const[s,n]of null!==(i=e.entities)&&void 0!==i?i:[]){var i;t.entities.set(s,{value:n.value,updatedAt:n.updatedAt})}for(const[s,n]of null!==(r=e.childrenByParent)&&void 0!==r?r:[]){var r;t.childrenByParent.set(s,{files:new Set(n.files),folders:new Set(n.folders)})}return t}}class D{constructor(e={},t=3e5,i=3e4,r){var s,n,o;this.views=new Map,this.strategy=void 0,this.ttl=void 0,this.errorTtl=void 0,this.entityTtl=void 0,this.strategy={allowSortedInsert:null===(s=e.allowSortedInsert)||void 0===s||s,allowSearchInsert:null===(n=e.allowSearchInsert)||void 0===n||n,invalidateOnPaginationFull:null===(o=e.invalidateOnPaginationFull)||void 0===o||o,comparator:e.comparator,filterMatch:e.filterMatch},this.ttl=t,this.errorTtl=i,this.entityTtl=null!==r&&void 0!==r?r:t}now(){return Date.now()}parentKey(e){return E(null!==e&&void 0!==e?e:null)}isExpired(e){return null==e||this.ttl!==1/0&&this.now()-e>this.ttl}isErrorExpired(e){return null==e||this.errorTtl!==1/0&&this.now()-e>this.errorTtl}areEntitiesStale(e,t){if(!e)return!0;for(const i of e)if(t.isEntityStale(i,this.entityTtl))return!0;return!1}isEntityTypeCompatible(e,t){return!t||"all"===t||("file"===t&&!A(e)||!("folder"!==t||!A(e)))}async getOrCreateChildren(e,t,i,r){var s;const n=this.parentKey(e),o=T(null!==t&&void 0!==t?t:{});let a=this.views.get(n);a||(a=new Map,this.views.set(n,a));let l=a.get(o);if(!l){l={params:t,view:{promise:null,value:void 0,meta:void 0,error:void 0,updatedAt:0}},a.set(o,l)}if(l.view.error&&!this.isErrorExpired(l.view.updatedAt))throw l.view.error;if(l.view.value&&!this.isExpired(l.view.updatedAt)&&!this.areEntitiesStale(l.view.value,r)&&(null===(s=l.view.meta)||void 0===s||!s.stale)){var d;return{items:l.view.value.map(e=>r.getEntity(e)).filter(Boolean),...null!==(d=l.view.meta)&&void 0!==d?d:{}}}if(l.view.promise)return l.view.promise;const h=(async()=>{try{const s=await i(e,t);for(const e of s.items)r.upsertEntity(e);l.view.value=s.items.map(e=>e.id);const{items:n,...o}=s,a={...o};return"number"!==typeof a.total&&(a.total=a.total),l.view.meta=a,l.view.meta.stale=!1,l.view.error=null,l.view.updatedAt=this.now(),"number"===typeof a.total&&r.updateServerChildrenCount(e,a.total),s}catch(s){throw l.view.error=s,l.view.value=void 0,l.view.updatedAt=this.now(),s}finally{l.view.promise=null}})();return l.view.promise=h,h}tryInsertSorted(e,t,i){const r=this.strategy.comparator;if(!r)return!1;if(!e.view.value)return!1;const s=e.view.value.map(e=>i.getEntity(e));if(s.some(e=>!e))return!1;let n=0,o=s.length;for(;n<o;){const i=Math.floor((n+o)/2),a=r(t,s[i],e.params);if("number"!==typeof a||Number.isNaN(a))return!1;a>=0?n=i+1:o=i}return e.view.value.includes(t.id)?(e.view.updatedAt=this.now(),!0):(e.view.value=[...e.view.value.slice(0,n),t.id,...e.view.value.slice(n)],e.view.updatedAt=this.now(),e.view.meta&&"number"===typeof e.view.meta.total&&(e.view.meta.total=Number(e.view.meta.total)+1),!0)}updateChildrenCountForOperation(e,t,i,r){const s=b(t);switch(e){case"delete":this.adjustChildrenCount(r,s,-1);break;case"insert":case"copy":this.adjustChildrenCount(r,s,1);break;case"move":this.adjustChildrenCount(r,i,-1),this.adjustChildrenCount(r,s,1)}}adjustChildrenCount(e,t,i){if(!t)return;const r=e.getFolder(t);if(r&&"number"===typeof r.childrenCount){const s=Math.max(0,r.childrenCount+i);e.updateServerChildrenCount(t,s)}}smartInvalidateChildrenViews(e,t,i,r,s,n){if(!t)return;r&&this.updateChildrenCountForOperation(i,t,s,r);const o=this.parentKey(e),a=this.views.get(o);if(a)for(const[,f]of a){var l,d;const e=null!==(l=f.params)&&void 0!==l?l:{},n=null!==(d=null===e||void 0===e?void 0:e.page)&&void 0!==d?d:1,a=S(null===e||void 0===e?void 0:e.pageSize),m=Number.isFinite(a),p=!!(null!==e&&void 0!==e&&e.sortBy||null!==e&&void 0!==e&&e.sortOrder),I=!(null===e||void 0===e||!e.search),y=(null===e||void 0===e?void 0:e.itemType)||"all";if(!this.isEntityTypeCompatible(t,y))continue;if(I&&this.strategy.filterMatch&&!this.strategy.filterMatch(t,f.params)){var h;null!==(h=f.view.value)&&void 0!==h&&h.includes(t.id)&&(f.view.value=f.view.value.filter(e=>e!==t.id),f.view.meta&&"number"===typeof f.view.meta.total&&(f.view.meta.total=Math.max(0,f.view.meta.total-1)),f.view.updatedAt=Date.now());continue}if(!f.view.value){f.view.meta&&(f.view.meta.stale=!0);continue}const g=f.view.value.includes(t.id);var c;if(this.shouldInvalidateCompletely(f,i,t,p,m,n))f.view.meta={...null!==(c=f.view.meta)&&void 0!==c?c:{},stale:!0};else switch(i){case"delete":g&&(f.view.value=f.view.value.filter(e=>e!==t.id),f.view.meta&&"number"===typeof f.view.meta.total&&(f.view.meta.total=Math.max(0,f.view.meta.total-1)),f.view.updatedAt=Date.now());break;case"insert":case"copy":if(!g)if(p&&this.strategy.allowSortedInsert&&this.strategy.comparator&&r){this.tryInsertSorted(f,t,r)&&f.view.meta&&"number"===typeof f.view.meta.total&&(f.view.meta.total+=1)}else if(!m||f.view.value.length<a)f.view.value.push(t.id),f.view.meta&&"number"===typeof f.view.meta.total&&(f.view.meta.total+=1),f.view.updatedAt=Date.now();else{var u;f.view.meta={...null!==(u=f.view.meta)&&void 0!==u?u:{},stale:!0}}break;case"update":if(g){if(p||I){f.view.value=f.view.value.filter(e=>e!==t.id);this.tryReinsertEntity(f,t,r,m,a)||f.view.meta&&"number"===typeof f.view.meta.total&&(f.view.meta.total=Math.max(0,f.view.meta.total-1))}f.view.updatedAt=Date.now()}break;case"move":const e=o===this.parentKey(s),i=o===this.parentKey(t.folderId);if(e&&g&&(f.view.value=f.view.value.filter(e=>e!==t.id),f.view.meta&&"number"===typeof f.view.meta.total&&(f.view.meta.total=Math.max(0,f.view.meta.total-1)),f.view.updatedAt=Date.now()),i&&!g)if(p&&this.strategy.allowSortedInsert&&this.strategy.comparator&&r){this.tryInsertSorted(f,t,r)&&f.view.meta&&"number"===typeof f.view.meta.total&&(f.view.meta.total+=1)}else if(!m||f.view.value.length<a)f.view.value.push(t.id),f.view.meta&&"number"===typeof f.view.meta.total&&(f.view.meta.total+=1),f.view.updatedAt=Date.now();else{var v;f.view.meta={...null!==(v=f.view.meta)&&void 0!==v?v:{},stale:!0}}}}}shouldInvalidateCompletely(e,t,i,r,s,n){return!(!(s&&n>1)||"insert"!==t&&"delete"!==t&&"move"!==t)||(!(!r||this.strategy.comparator||"insert"!==t&&"move"!==t)||!!this.isExpired(e.view.updatedAt))}tryReinsertEntity(e,t,i,r,s){if(this.strategy.comparator&&this.strategy.filterMatch){if(!this.strategy.filterMatch(t,e.params))return!1;if(this.tryInsertSorted(e,t,i))return!0}return(!r||e.view.value.length<s)&&(e.view.value.push(t.id),!0)}forceInvalidateChildrenViews(e){const t=this.parentKey(null!==e&&void 0!==e?e:null),i=this.views.get(t);if(i)for(const[,r]of i)r.view.value=void 0,r.view.error=null,r.view.meta=void 0,r.view.promise=null,r.view.updatedAt=0}getKnownTotal(e){const t=this.parentKey(null!==e&&void 0!==e?e:null),i=this.views.get(t);if(!i)return;let r=null;for(const[,o]of i){const e=o.view.meta;var s,n;if(e&&"number"===typeof e.total)if(!r||(null!==(s=o.view.updatedAt)&&void 0!==s?s:0)>r.updatedAt)r={total:Number(e.total),updatedAt:null!==(n=o.view.updatedAt)&&void 0!==n?n:0}}return r?r.total:void 0}toJSON(){return{views:Array.from(this.views.entries()).map(([e,t])=>[e,Array.from(t.entries())]),ttl:this.ttl,errorTtl:this.errorTtl,entityTtl:this.entityTtl,strategy:{allowSortedInsert:this.strategy.allowSortedInsert,allowSearchInsert:this.strategy.allowSearchInsert,invalidateOnPaginationFull:this.strategy.invalidateOnPaginationFull}}}static fromJSON(e,t){var i,r,s;const n=new D(null!==t&&void 0!==t?t:{},null!==(i=null===e||void 0===e?void 0:e.ttl)&&void 0!==i?i:3e5,null!==(r=null===e||void 0===e?void 0:e.errorTtl)&&void 0!==r?r:3e4,null!==(s=null===e||void 0===e?void 0:e.entityTtl)&&void 0!==s?s:void 0);for(const[v,f]of null!==(o=null===e||void 0===e?void 0:e.views)&&void 0!==o?o:[]){var o;const e=new Map;for(const[t,i]of f){var a,l,d,h,c,u;const r=null!==(a=i.params)&&void 0!==a?a:{},s=null!==(l=i.view)&&void 0!==l?l:{},n={promise:null,value:null!==(d=s.value)&&void 0!==d?d:void 0,meta:null!==(h=s.meta)&&void 0!==h?h:void 0,error:null!==(c=s.error)&&void 0!==c?c:null,updatedAt:null!==(u=s.updatedAt)&&void 0!==u?u:0};e.set(t,{params:r,view:n})}n.views.set(v,e)}return n}}class U{constructor(e={},t=3e5,i=3e4){this.entities=void 0,this.views=void 0,this.ttl=void 0,this.errorTtl=void 0,this.childrenCountPromises=new Map,this.ttl=t,this.errorTtl=i,this.entities=new M,this.views=new D(e,t,i)}getEntity(e){var t;return null!==(t=this.entities.getEntity(e))&&void 0!==t?t:null}getFileSystemItem(e){var t;return null!==(t=this.entities.getFileSystemItem(e))&&void 0!==t?t:null}getFolder(e){var t;return null!==(t=this.entities.getFolder(e))&&void 0!==t?t:null}async getOrCreateChildren(e,t,i){return this.views.getOrCreateChildren(e,t,i,this.entities)}upsertEntity(e){const t=this.entities.getEntity(e.id),i=t?b(t):null,r=b(e),s=!!t&&A(t),n=A(e);if(this.entities.upsertEntity(e),t){if(i!==r||s!==n)return this.views.smartInvalidateChildrenViews(i,t,"delete",this.entities),void this.views.smartInvalidateChildrenViews(r,e,"insert",this.entities);this.views.smartInvalidateChildrenViews(r,e,"update",this.entities,void 0,t)}else this.views.smartInvalidateChildrenViews(r,e,"insert",this.entities)}isAncestor(e,t){let i=t;const r=new Set;for(;i&&!r.has(i);){r.add(i);if(E(i)===E(e))return!0;const t=this.entities.getEntity(i);if(!t)break;i=b(t),null===i&&(i="")}return!1}moveEntity(e,t){const i=this.entities.getEntity(e);if(!i)return null;if(A(i)&&null!==t&&this.isAncestor(e,t))return null;const r=b(i),s=this.entities.moveEntityById(e,t);return s?(this.views.smartInvalidateChildrenViews(r,i,"delete",this.entities),this.views.smartInvalidateChildrenViews(t,s,"insert",this.entities),s):null}copyEntity(e,t,i){var r;const s=this.entities.getEntity(e);if(!s)return null;if(!A(s)){const r=null!==i&&void 0!==i?i:O(),s=this.entities.copyFileSystemItem(e,r,null!==t&&void 0!==t?t:null);return s?(this.views.smartInvalidateChildrenViews(t,s,"copy",this.entities),s):null}const n=[e],o=[];for(;n.length;){const e=n.shift();o.push(e);const t=this.entities.getChildrenIds(e,{onlyFolders:!0});for(const i of t)n.push(i)}const a=new Map;for(const c of o)a.set(c,O());const l={...s,id:a.get(e),folderId:t};this.views.smartInvalidateChildrenViews(t,l,"copy",this.entities);for(const c of o){var d;const i=this.entities.getFolder(c),r=a.get(c),s=b(i),n=null===s?t:null!==(d=a.get(s))&&void 0!==d?d:null,o={...i,id:r,folderId:n};this.entities.upsertEntity(o),c!==e&&this.views.smartInvalidateChildrenViews(n,o,"copy",this.entities)}for(const c of o){const e=a.get(c),t=this.entities.getChildrenIds(c,{onlyFileSystemItems:!0});for(const i of t){const t=this.entities.getFileSystemItem(i);if(!t)continue;const r=O(),s={...t,id:r,folderId:e};this.entities.upsertEntity(s),this.views.smartInvalidateChildrenViews(e,s,"copy",this.entities)}}const h=a.get(e);return h&&null!==(r=this.entities.getEntity(h))&&void 0!==r?r:null}deleteEntity(e){const t=this.entities.getEntity(e);if(!t)return null;if(A(t)){const{deletedFolderRecords:i,deletedFileSystemItemRecords:r}=this.entities.deleteFolderRecursive(e);for(const e of r)this.views.smartInvalidateChildrenViews(e.folderId,e,"delete",this.entities);for(const e of i)this.views.smartInvalidateChildrenViews(e.folderId,e,"delete",this.entities);return t}{const{entity:t,parentId:i}=this.entities.deleteEntityById(e);return t&&this.views.smartInvalidateChildrenViews(i,t,"delete",this.entities),t}}deleteFolderRecursive(e){const{deletedFolderRecords:t,deletedFileSystemItemRecords:i}=this.entities.deleteFolderRecursive(e);for(const r of i)this.views.smartInvalidateChildrenViews(r.folderId,r,"delete",this.entities);for(const r of t)this.views.smartInvalidateChildrenViews(r.folderId,r,"delete",this.entities);return{deletedFileSystemItemIds:i.map(e=>e.id),deletedFolderIds:t.map(e=>e.id)}}forceInvalidate(e){const t=this.entities.getEntity(e);if(!t)return;const i=new Set;if(A(t)){const t=[e];for(;t.length;){const e=t.pop();if(i.has(e))continue;i.add(e),this.views.forceInvalidateChildrenViews(e);const r=this.entities.getChildrenIds(e,{onlyFolders:!0});for(const i of r)t.push(i)}}else{var r;const e=null!==(r=t.folderId)&&void 0!==r?r:null;this.views.forceInvalidateChildrenViews(e)}}getChildrenIds(e){return this.entities.getChildrenIds(e)}async getChildrenCount(e="",t){let i=!1;const r=E(e),s=this.childrenCountPromises.get(r);if(s)return s;const n=(async()=>{try{const i=this.entities.getFolder(e);if(i&&"number"===typeof i.childrenCount)return i.childrenCount;const r=this.views.getKnownTotal(e);if("number"===typeof r)return i&&this.entities.updateServerChildrenCount(e,r),r;if(t){const i=await t(e);return this.entities.getFolder(e)&&this.entities.updateServerChildrenCount(e,i),i}return this.entities.getChildrenIds(e).length}finally{i=!0,this.childrenCountPromises.delete(r)}})();return i||this.childrenCountPromises.set(r,n),n}toJSON(){return{entities:this.entities.toJSON(),views:this.views.toJSON(),ttl:this.ttl,errorTtl:this.errorTtl}}static fromJSON(e,t){var i,r,s,n;const o=new U(null!==t&&void 0!==t?t:{},null!==(i=null===e||void 0===e?void 0:e.ttl)&&void 0!==i?i:3e5,null!==(r=null===e||void 0===e?void 0:e.errorTtl)&&void 0!==r?r:3e4),a=M.fromJSON(null!==(s=null===e||void 0===e?void 0:e.entities)&&void 0!==s?s:{}),l=D.fromJSON(null!==(n=null===e||void 0===e?void 0:e.views)&&void 0!==n?n:{},null!==t&&void 0!==t?t:{});return o.entities=a,o.views=l,o}}var N;function B({childrenCount:e,...t}){return{...t,childCount:e}}let G=(0,C.A)(N=class{async _findOrCreateFolderByPath(e){const t=(i=e)?i.replaceAll("\\","/").split("/").filter(Boolean):[];var i;if(t.length>10)throw new Error("Path depth exceeds maximum limit of 10");let r;for(const o of t){var s;const{files:t}=await this.getFiles({folderId:(null===(s=r)||void 0===s?void 0:s.id)||"",itemType:"folder"});let i=t.find(e=>e.name===o);if(i){if(!i.isFolder)throw new Error(`Path component '${o}' in '${e}' is not a folder`);r={id:i.id,name:i.name,parentId:i.folderId}}else{var n;if(!this._dataProvider.createFolder)throw new Error("Create folder operation is not supported by data provider");r=await this.createFolder({name:o,parentId:null===(n=r)||void 0===n?void 0:n.id})}}return r}getTrashFolder(){return this._findOrCreateFolderByPath(this._pathOptions.trashPath||"Trash")}getTempFolder(){return this._findOrCreateFolderByPath(this._pathOptions.tempPath||"Edited")}constructor(e,t={},i){var r,s;this._dataProvider=e,this._options=t,this._pathOptions=i,this._cache=void 0,this._rootId=void 0,this._useSoftDelete=void 0,this._enableTrash=void 0,this._useSoftDelete=this._pathOptions.useSoftDelete,this._rootId=this._pathOptions.rootId||"",this._enableTrash=void 0===this._options.enableTrash||this._options.enableTrash,this._cache=new U(t.cacheStrategy||{},null===(r=t.cacheStrategy)||void 0===r?void 0:r.ttl,null===(s=t.cacheStrategy)||void 0===s?void 0:s.errorTtl),this.setController({invalidateItemCache:e=>{this._cache.forceInvalidate(e)},getCachedItem:e=>this._cache.getEntity(e)})}setController(e){var t,i;null===(t=(i=this._dataProvider).setController)||void 0===t||t.call(i,e)}_normalizeId(e){return e?"root"===e?this._rootId:e:this._rootId}async getFiles({folderId:e,search:t,sortBy:i,sortOrder:r,page:s,limit:n,itemType:o="all"}){const a=this._normalizeId(null!==e&&void 0!==e?e:this._rootId),l=this._options.clientSideFilter,d=this._options.clientSideSorting,h=this._options.clientSidePaging,c={folderId:a,itemType:o};l||(c.search=t),d||(c.sortBy=null!==i&&void 0!==i?i:"folder"!==o?"date":void 0,c.sortOrder=null!==r&&void 0!==r?r:"folder"!==o?"desc":void 0),h||(c.page=s,c.limit=n);const u={folderId:a,itemType:o,search:l?void 0:t,sortBy:d?void 0:c.sortBy,sortOrder:d?void 0:c.sortOrder,page:h?void 0:s,pageSize:h?void 0:n},v=await this._cache.getOrCreateChildren(a,u,async()=>{const e=await this._dataProvider.getItems(c);return{items:e.items,...e.pagination}});let f,m=v.items;if(l)if("function"===typeof this._options.clientSideFilter)m=this._options.clientSideFilter(m,t);else if(t){const e=t.toLowerCase();m=m.filter(t=>{var i;return null===(i=t.name)||void 0===i?void 0:i.toLowerCase().includes(e)})}d&&(m="function"===typeof this._options.clientSideSorting?this._options.clientSideSorting(m,i,r):this._defaultClientSideSort(m,i,r)),f=h||l?m.length:v.total;let p=m;if(h&&s&&n)if("function"===typeof this._options.clientSidePaging)p=this._options.clientSidePaging(m,s,n);else{const e=(s-1)*n,t=e+n;p=m.slice(e,t)}if(this._dataProvider.getUrl||this._dataProvider.getThumbnailUrl){const e=p.map(async e=>{if(e.isFolder)return e;const[t,i]=await Promise.all([e.url?Promise.resolve(e.url):this._dataProvider.getUrl?this._dataProvider.getUrl(e):Promise.resolve(void 0),e.thumbnailUrl?Promise.resolve(e.thumbnailUrl):this._dataProvider.getThumbnailUrl?this._dataProvider.getThumbnailUrl(e):Promise.resolve(void 0)]);return{...e,url:t,thumbnailUrl:i}});p=await Promise.all(e)}const I={page:s,limit:n,total:f,...!h&&v.totalPages&&{totalPages:v.totalPages},...!h&&v.hasNextPage&&{hasNextPage:v.hasNextPage}};return{files:p.map(B),pagination:I}}_defaultClientSideSort(e,t,i){return e.sort((e,r)=>{let s=0;switch(t){case"name":default:s=(e.name||"").localeCompare(r.name||"");break;case"date":s=new Date(e.date||0).getTime()-new Date(r.date||0).getTime();break;case"size":s=(Number(e.size)||0)-(Number(r.size)||0)}return"desc"===i?-s:s})}async getFileData(e){const t=this._cache.getEntity(e.id);if(this._dataProvider.getFileData)return this._dataProvider.getFileData(t);if(!e.url&&!this._dataProvider.getUrl)throw new Error("Cannot read file");const i=e.url||await this._dataProvider.getUrl(t);if(i)return(await fetch(i)).blob();throw new Error("Unable to get file data")}async getChildrenCount(e){if(!e)return 0;const t=this._normalizeId(null!==e&&void 0!==e?e:this._rootId);return this._cache.getChildrenCount(t,async()=>{const{pagination:e}=await this._dataProvider.getItems({folderId:t,limit:0,itemType:"all"});return(null===e||void 0===e?void 0:e.total)||0})}async uploadFile(e){var t;const i=this._normalizeId(null!==(t=e.folderId)&&void 0!==t?t:this._rootId),r={...this._cache.getEntity(i),...await this._dataProvider.uploadFile({...e,folderId:i}),folderId:i};return this._cache.upsertEntity(r),r}async deleteFile(e){const t=this._normalizeId(e);if(this._useSoftDelete&&this._enableTrash)try{const e=await this.getTrashFolder();return await this.moveItem({itemId:t,targetFolderId:e.id,isFolder:!1})}catch(i){return await this.hardDeleteItem(t)}return await this.hardDeleteItem(t)}async deleteItems(e,t){if(this._useSoftDelete&&this._enableTrash&&!0!==t.permanent)try{const t=await this.getTrashFolder();return await this.moveItems(t.id,e)}catch(i){return await this.hardDeleteItems(e,t)}return await this.hardDeleteItems(e,t)}async hardDeleteItems(e,t){let i={success:!0,detailed:[]};if(this._dataProvider.deleteItems){if(i=await this._dataProvider.deleteItems(e.map(e=>this._cache.getEntity(e)),t),i.success){const t=i.detailed||e.map(e=>({id:e,success:!0,error:void 0}));for(const e of t)e.success?this._cache.deleteEntity(e.id):e.error}}else this._dataProvider.deleteItem&&(i.detailed=await Promise.all(e.map(async e=>{try{return await this._dataProvider.deleteItem(this._cache.getEntity(e),t),this._cache.deleteEntity(e),{id:e,success:!0}}catch(i){return{id:e,error:i,success:!1}}})),i.success=!i.detailed.some(e=>!e.success));if(i.success&&this._enableTrash){const e=await this.getTrashFolder();e&&this._cache.forceInvalidate(e.id)}return i}async hardDeleteItem(e){const t=this._cache.getEntity(e);try{if(await this._dataProvider.deleteItem(t,{permanent:!0}),this._enableTrash){const e=await this.getTrashFolder();e&&this._cache.forceInvalidate(e.id)}return!0}catch(i){return!1}}async createFolder({name:e,parentId:t}){const i=this._normalizeId(null!==t&&void 0!==t?t:this._rootId),r=await this._dataProvider.createFolder(e,i);return this._cache.upsertEntity({id:r.id,folderId:i,name:r.name,isFolder:!0,childrenCount:r.childrenCount}),B(r)}async deleteFolder(e){const t=this._normalizeId(e);if(this._useSoftDelete&&this._enableTrash)try{const e=await this.getTrashFolder();return!!await this.moveItem({itemId:t,targetFolderId:e.id,isFolder:!0})&&(this._cache.deleteFolderRecursive(t),!0)}catch(i){return await this.hardDeleteItem(t)}return await this.hardDeleteItem(t)}async renameFolder(e,t){if(!this._dataProvider.renameItem)throw new Error("Rename folder is not supported");const i=this._normalizeId(e),r=this._cache.getEntity(i),s=await this._dataProvider.renameItem(r,t);return this._cache.upsertEntity({...this._cache.getEntity(s.id),...s}),this._cache.getEntity(s.id)}async renameFile(e,t){if(!this._dataProvider.renameItem)throw new Error("Rename file is not supported");const i=this._cache.getEntity(e),r=this._normalizeId(e),s=await this._dataProvider.renameItem(i,t);return s&&this._cache.upsertEntity({...this._cache.getEntity(r),...s}),this._cache.getEntity(r)}async moveItem({itemId:e,targetFolderId:t}){const i=this._normalizeId(t),r=this._cache.getEntity(e),s=await this._dataProvider.moveItem(r,i);if(s.id===e){const t=this._cache.moveEntity(e,i);return this._cache.upsertEntity({...t,...s}),!0}{const t=this._cache.deleteEntity(e);return this._cache.upsertEntity({...t,...s,folderId:i}),!0}}async moveItems(e,t){const i=this._normalizeId(e),r=t.map(e=>this._cache.getEntity(e));let s={detailed:new Array(r.length),success:!0};if(this._dataProvider.moveItems)s=await this._dataProvider.moveItems(r,i);else{if(!this._dataProvider.moveItem)throw new Error("Move items is not supported");s.detailed=await Promise.all(r.map(async(e,t)=>{try{return{id:r[t].id,data:await this._dataProvider.moveItem(e,i),success:!0}}catch(s){return{id:e.id,success:!1,error:s}}}))}if(s.success){const e=s.detailed||t.map(e=>({id:e,success:!0,data:void 0}));for(const t of e)if(t.success)if(t.data&&t.data.id!==t.id){const e=this._cache.deleteEntity(t.id);this._cache.upsertEntity({...e,...t.data,folderId:i})}else this._cache.moveEntity(t.id,i),t.data&&this._cache.upsertEntity({...this._cache.getEntity(t.id),...t.data,folderId:i});return s}return{success:!1,error:s.error}}async copyItem({itemId:e,targetFolderId:t}){if(!this._dataProvider.copyItem)throw new Error("Copy item is not supported");const i=this._normalizeId(t),r=this._cache.getEntity(e),s=await this._dataProvider.copyItem(r,i),n=this._cache.copyEntity(e,i,s.id);return this._cache.upsertEntity({...n,...s,folderId:i}),!0}async copyItems(e,t){const i=this._normalizeId(e),r=t.map(e=>this._cache.getEntity(e));let s={detailed:new Array(r.length),success:!0};if(this._dataProvider.copyItems)s=await this._dataProvider.copyItems(r,i);else{if(!this._dataProvider.copyItem)return{error:"Copy item is not supported",success:!1};s.detailed=await Promise.all(r.map(async e=>{try{return{id:e.id,data:await this._dataProvider.copyItem(e,i),success:!0}}catch(t){return{id:e.id,success:!1,error:t}}}))}if(!s.success||!s.detailed)return{error:"batchResult in copy method must have detailed results",success:!1};for(let a=0,l=s.detailed.length;a<l;a++){const e=s.detailed[a];var n;if(e.success)if(null!==(n=e.data)&&void 0!==n&&n.id){var o;const t=this._cache.copyEntity(e.id,(null===(o=e.data)||void 0===o?void 0:o.folderId)||i,e.data.id);e.data&&this._cache.upsertEntity({...t,...e.data,folderId:i})}}return s}async uploadFileByUrl(e){var t;if(e.noFolder){const t=await this.getTempFolder();e={...e,folderId:t.id}}const i=this._normalizeId(null!==(t=e.folderId)&&void 0!==t?t:this._rootId),r=await this._dataProvider.uploadFileByUrl(e.url,i);return this._cache.upsertEntity({...r,folderId:i}),r}async updateFile(e,t){if(!this._dataProvider.updateFile)throw new Error("Update file is not supported");const i=this._normalizeId(e),r=this._cache.getEntity(i),s=await this._dataProvider.updateFile(r,{...t});return this._cache.upsertEntity({...this._cache.getEntity(i),...s,...t}),this._cache.getEntity(i)}})||N;var L=i(39416),R=i(32947),k=(i(51731),i(82900));class z{constructor(e,t="",i="Trash",r="Trash",s=!0){this._inner=e,this.rootPath=t,this.trashId=i,this.trashPath=r,this.ensureFolderTrailingSlash=s,this.getUrl=void 0,this.getThumbnailUrl=void 0,this._pathToId=new Map,this._idToPath=new Map,e.getUrl&&(this.getUrl=t=>e.getUrl({...t,id:this._pathForId(t.id,!1),folderId:t.folderId?this._pathForId(t.folderId,!0):this.rootPath})),e.getThumbnailUrl&&(this.getThumbnailUrl=t=>e.getThumbnailUrl({...t,id:this._pathForId(t.id,!1),folderId:t.folderId?this._pathForId(t.folderId,!0):this.rootPath})),this._inner.deleteItems||(this.deleteItems=void 0),this._inner.moveItems||(this.moveItems=void 0),this._inner.copyItems||(this.copyItems=void 0),this._getOrGenerateId(this.rootPath)}setController(e){var t,i;null===(t=(i=this._inner).setController)||void 0===t||t.call(i,{invalidateItemCache:t=>{const i=t.replace(/^\/+|\/+$/g,""),r=this._pathToId.get(i);r&&e.invalidateItemCache(r)},getCachedItem:t=>{const i=t.replace(/^\/+|\/+$/g,""),r=this._pathToId.get(i);if(r){let t=e.getCachedItem(r);if(t)return{...t,id:this._pathForId(t.id,t.isFolder),folderId:this._pathForId(t.folderId,t.isFolder)}}}})}_getOrGenerateId(e){if(e===this.rootPath)return;const t=e.replaceAll(/^\/+|\/+$/g,"");if(t===this.trashPath.replaceAll(/^\/+|\/+$/g,""))return this.trashId;if(this._pathToId.has(t))return this._pathToId.get(t);const i=(0,k.A)();return this._pathToId.set(t,i),this._idToPath.set(i,t),i}_pathForId(e,t){if(""===e||void 0===e)return this.rootPath;if(e===this.trashId)return this.trashPath;let i=this._idToPath.get(e);if(!i)throw new Error(`path for id ${e} not found`);let r=0;for(;r<this.rootPath.length&&"/"===this.rootPath[r];)r++;if(r){let e=0;for(;e<i.length&&"/"===i[e];)e++;const t=i.slice(e);i="/".repeat(r)+t}return t&&this.ensureFolderTrailingSlash&&!i.endsWith("/")&&(i+="/"),i}_updateIdMapping(e,t){const i=t.replace(/^\/+|\/+$/g,""),r=this._idToPath.get(e);r&&this._pathToId.delete(r),this._idToPath.set(e,i),this._pathToId.set(i,e)}async getItems(e){const t=e.folderId?this._pathForId(e.folderId,!0):this.rootPath,i=await this._inner.getItems({...e,folderId:t}),r=i.items.map(e=>{const t=this._getOrGenerateId(e.id),i=e.folderId?this._getOrGenerateId(e.folderId):this._getOrGenerateId(this.rootPath);return{...e,id:t,folderId:i}});return{...i,items:r}}async createFolder(e,t){const i=t?this._pathForId(t,!0):this.rootPath,r=await this._inner.createFolder(e,i),s=this._getOrGenerateId(r.id),n=r.folderId?this._getOrGenerateId(r.folderId):this._getOrGenerateId(this.rootPath);return{...r,id:s,folderId:n}}async renameItem(e,t){if(!this._inner.renameItem)throw new Error("renameItem not supported by inner storage");const i=this._pathForId(e.id,e.isFolder),r=i;let{...s}=await this._inner.renameItem({...e,id:i,folderId:this._pathForId(e.folderId,!0)},t);return this._updateIdMapping(e.id,s.id),e.isFolder&&this.remapCachedFolderContents(e.id,r,s.id),s.folderId&&(s={...s,folderId:this._getOrGenerateId(s.folderId)}),{...s,id:this._getOrGenerateId(s.id)}}async deleteItem(e,t){const i=this._pathForId(e.id,e.isFolder);await this._inner.deleteItem({...e,id:i,folderId:this._pathForId(e.folderId,!0)},t),this.recursivelyRemoveMappings(e.id,i)}async uploadFile(e){const t=e.folderId?this._pathForId(e.folderId,!0):this.rootPath,i=await this._inner.uploadFile({...e,folderId:t}),r=this._getOrGenerateId(i.id),s=e.folderId?e.folderId:this._getOrGenerateId(this.rootPath);return{...i,id:r,folderId:s}}async uploadFileByUrl(e,t){const i=t?this._pathForId(t,!0):this.rootPath,r=await this._inner.uploadFileByUrl(e,i),s=this._getOrGenerateId(r.id),n=r.folderId?this._getOrGenerateId(r.folderId):this._getOrGenerateId(this.rootPath);return{...r,id:s,folderId:n}}async moveItem(e,t){const i=this._pathForId(e.id,e.isFolder),r=this._pathForId(t,!0),s=await this._inner.moveItem({...e,id:i,folderId:this._pathForId(e.folderId,!0)},r);return this._updateIdMapping(e.id,s.id),e.isFolder&&this.remapCachedFolderContents(e.id,i,s.id),{...s,id:this._getOrGenerateId(s.id),folderId:t}}async moveItems(e,t){if(!this._inner.moveItems)throw new Error("moveItems not supported by inner storage");const i=t?this._pathForId(t,!0):this.rootPath,r=e.map(e=>({...e,id:this._pathForId(e.id,e.isFolder),folderId:e.folderId?this._pathForId(e.folderId,!0):this.rootPath})),s=await this._inner.moveItems(r,i),n=[];if(s.detailed&&s.detailed.length===e.length)for(let o=0;o<s.detailed.length;o++){const i=s.detailed[o],r=e[o];if(i.success&&i.data){if(this._updateIdMapping(r.id,i.data.id),r.isFolder){const e=this._pathForId(r.id,r.isFolder);this.remapCachedFolderContents(r.id,e,i.data.id)}n.push({id:r.id,success:!0,data:{...i.data,id:this._getOrGenerateId(i.data.id),folderId:t||this._getOrGenerateId(this.rootPath)}})}else n.push({id:r.id,success:!1,error:i.error})}else for(const o of e)n.push({id:o.id,success:!1,error:"Move operation failed - no detailed results"});return{success:s.success,detailed:n,error:s.error}}async copyItems(e,t){if(!this._inner.copyItems)throw new Error("copyItems not supported by inner storage");const i=t?this._pathForId(t,!0):this.rootPath,r=e.map(e=>({...e,id:this._pathForId(e.id,e.isFolder),folderId:e.folderId?this._pathForId(e.folderId,!0):this.rootPath})),s=await this._inner.copyItems(r,i),n=[];if(s.detailed&&s.detailed.length===e.length)for(let l=0;l<s.detailed.length;l++){var o;const i=s.detailed[l],r=e[l];if(i.success&&null!==(o=i.data)&&void 0!==o&&o.id){const e=this._getOrGenerateId(i.data.id);n.push({id:r.id,success:!0,data:{...i.data,id:e,folderId:t||this._getOrGenerateId(this.rootPath)}})}else{const e=i.success?i.data?i.data.id?"Unknown copy error":"No ID in copied item data":"No data returned from copy operation":i.error;n.push({id:r.id,success:!1,error:e})}}else for(const l of e)n.push({id:l.id,success:!1,error:s.detailed?"Mismatched result count":"No detailed results from copy operation"});const a=n.every(e=>e.success);return{success:a,detailed:n,error:a?void 0:s.error||"Copy operation completed with errors"}}async deleteItems(e,t){if(!this._inner.deleteItems)throw new Error("deleteItems not supported by inner storage");const i=e.map(e=>({...e,id:this._pathForId(e.id,e.isFolder),folderId:e.folderId?this._pathForId(e.folderId,!0):this.rootPath})),r=await this._inner.deleteItems(i,t),s=[];if(r.detailed&&r.detailed.length===e.length)for(let o=0;o<r.detailed.length;o++){const t=r.detailed[o],i=e[o];if(t.success){const e=this._pathForId(i.id,i.isFolder);this.recursivelyRemoveMappings(i.id,e),s.push({id:i.id,success:!0})}else s.push({id:i.id,success:!1,error:t.error})}else for(const o of e)if(r.success){const e=this._pathForId(o.id,o.isFolder);this.recursivelyRemoveMappings(o.id,e),s.push({id:o.id,success:!0})}else s.push({id:o.id,success:!1,error:r.error||"Delete operation failed"});const n=s.every(e=>e.success);return{success:n,detailed:s,error:n?void 0:r.error||"Some items failed to delete"}}remapCachedFolderContents(e,t,i){const r=t.replace(/\/+$/,""),s=i.replace(/\/+$/,""),n=[];for(const[o,a]of this._idToPath.entries()){const e=a.replace(/\/+$/,"");e!==r&&e.startsWith(r+"/")&&n.push({id:o,oldPath:e})}for(const{id:o,oldPath:a}of n){const e=s+a.substring(r.length);this._updateIdMapping(o,e)}}recursivelyRemoveMappings(e,t){const i=t.replace(/\/+$/,""),r=[],s=[];for(const[n,o]of this._idToPath.entries()){const e=o.replace(/\/+$/,"");(e===i||e.startsWith(i+"/"))&&(r.push(n),s.push(e))}for(let n=0;n<r.length;n++)this._idToPath.delete(r[n]),this._pathToId.delete(s[n])}async copyItem(e,t){const i=this._pathForId(e.id,e.isFolder),r=this._pathForId(t,!0),s=await this._inner.copyItem({...e,id:i,folderId:this._pathForId(e.folderId,e.isFolder)},r),n=this._getOrGenerateId(s.id);return{...s,id:n,folderId:t}}async updateFile(e,t){if(!this._inner.updateFile)throw new Error("updateFile not supported by inner storage");const i=this._pathForId(e.id,!1);let{...r}=await this._inner.updateFile({...e,id:i,folderId:this._pathForId(e.folderId,!0)},t);return this._updateIdMapping(e.id,r.id),r.folderId&&(r={...r,folderId:this._getOrGenerateId(r.folderId)}),{...r,id:this._getOrGenerateId(r.id)}}async getFileData(e){const t=this._pathForId(e.id,!1);if(this._inner.getFileData)return this._inner.getFileData({...e,id:t,folderId:this._pathForId(e.folderId,!0)});const i=e.url||this.getUrl&&await this.getUrl(e);if(!i)throw new Error("Cannot get file data: no url and no inner.getFileData");return fetch(i).then(e=>e.blob())}}const{useToken:x}=o.A,$=({storageProvider:e})=>{var t,i,o,_,C,E,S,b,A,O,T,M,D,U,N;const B=(0,p.rD)(),{projectId:k,emailId:$,blockId:V}=(0,n.g)(),{__:K}=(0,F.s9)(),{token:j}=x(),{error:J}=(0,I.hN)(),q=(0,s.wA)(),W=(0,s.d4)(c.B$),Y=(0,s.d4)(c.C1),H=(0,s.d4)(u.cL),Q=(0,s.d4)(v.Ac),X=(0,s.d4)(f.yN),Z=(0,s.d4)(v.js),[ee,te]=(0,r.useState)(""),[ie,re]=(0,r.useState)("my_files"),[se,ne]=(0,r.useState)(!1),[oe,ae]=(0,r.useState)(0),[le,de]=(0,r.useState)(""),[he,ce]=(0,r.useState)(()=>[]),ue=()=>{q((0,u.Oo)()),setTimeout(()=>te(""),600)},ve=!(W||(null===(t=Y.id)||void 0===t?void 0:t.toString())!==(null===X||void 0===X||null===(i=X.members)||void 0===i?void 0:i.owner.ID))&&!0,fe=(0,r.useMemo)(()=>({img:Z,background:Q}),[Z,Q]);(0,r.useEffect)(()=>{H.includes("UPLOAD_BACKGROUND_MODAL")?(te("background"),fe.background&&de(fe.background)):H.includes("UPLOAD_IMAGE_MODAL")&&(te("img"),fe.img&&de(fe.img)),H===R.lx.UPLOAD_IMAGE_MODAL||H===R.lx.UPLOAD_BACKGROUND_MODAL?re("editor"):H===R.lx.UPLOAD_IMAGE_MODAL_AI||H===R.lx.UPLOAD_BACKGROUND_MODAL_AI?ve?(ne(!0),ae(2)):re("ai"):H===R.lx.UPLOAD_IMAGE_MODAL_UPLOAD||H===R.lx.UPLOAD_BACKGROUND_MODAL_UPLOAD?re("my_files"):H===R.lx.UPLOAD_IMAGE_MODAL_STOCK||H===R.lx.UPLOAD_BACKGROUND_MODAL_STOCK?ve?(ne(!0),ae(3)):re("stock_images"):H===R.lx.UPLOAD_IMAGE_MODAL_GIF||H===R.lx.UPLOAD_BACKGROUND_MODAL_GIF?ve?(ne(!0),ae(3)):re("gif"):H===R.lx.UPLOAD_IMAGE_MODAL_EDIT||H===R.lx.UPLOAD_BACKGROUND_MODAL_EDIT?(ve?(ne(!0),ae(5)):re("editor"),q((0,u.Wz)(R.lx.IMAGE_EDITOR_MODAL))):re("my_files")},[H,q,ve,fe]);const me=(0,g.mx)(async()=>e?(e=e.pathMode?new z(e,e.rootId,"Trash",e.trashPath):e,new G(e,B.fileManager,{...e,trashPath:e.pathMode?"trash":e.trashPath,rootId:e.pathMode?"":e.rootId})):(J(K("Error when initializing file manager")),null),[e,J,K,B.fileManager]),pe=r.createElement(d.A,{style:{fontSize:32,margin:-16},spin:!0}),Ie=(0,r.useCallback)(e=>{w.isEqual(e,he)||ce(e)},[he]),[ye]=(0,h.Mv)(),ge=(0,r.useCallback)(async()=>{if(me){const e=he[0];if(e){const t=e.url||e.thumbnailUrl;"img"===ee?q((0,v.tm)(t)):"background"===ee&&q((0,v.e_)(t))}}ue()},[me,q,u.Oo,he,ee]),we=(0,r.useCallback)(async e=>{if(me&&e){const t=e.url||e.thumbnailUrl;"img"===ee?q((0,v.tm)(t)):"background"===ee&&q((0,v.e_)(t))}ue()},[me,q,u.Oo,ee]),_e=(0,r.useCallback)(async()=>{ue()},[q,u.Oo]),[Fe,{data:Pe=[]}]=(0,h.gg)(),Ce=(null===B||void 0===B?void 0:B.handleLimitUsageEmitter)||(0,y.ml)(P.AZ.ON_LIMIT_ID),Ee=(0,r.useCallback)(async function(e){try{await Fe(e).unwrap()}catch(t){}},[Fe]);return ee&&me?r.createElement(r.Fragment,null,!ve&&r.createElement(a.A,{className:"file-manager",closable:!0,footer:null,open:!!ie&&H.includes("UPLOAD_IMAGE_"),width:"100vw",onOk:ge,onCancel:ue},r.createElement(l.A,{spinning:!me,indicator:pe},me&&("editor"===ie?r.createElement(L.BC,{onSave:we,onClose:_e,dataProviders:me,theme:Y.theme,file:le}):r.createElement(L.KG,{dataProviders:me,onChangeSelection:Ie,onEditorOk:we,config:{activeLibraryItem:ie,REACT_APP_GIPHY_KEY:"Nh77eBlPeMn1ed9MBAvL542NUGeNO26F",UNSPLASH_KEY:"S5iNcLqYgRBIOLQdluHdTsCJnjCvahzhG7JfYQOrV7o",APP_NAME_UNSPLASH:"Nh77eBlPeMn1ed9MBAvL542NUGeNO26F",fileForEdit:le,projectId:k,elementId:$||V,pushToGTM:null===B||void 0===B?void 0:B.pushToGTM,handleLimitUsageEmitter:Ce,sseQuery:Ee,messages:Pe,sendAIImageRequest:(null===B||void 0===B?void 0:B.sendAIImageRequest)||ye,locale:Y.locale,theme:Y.theme,customTheme:j,enableTrashFolder:null===(o=B.fileManager)||void 0===o?void 0:o.enableTrash,features:{enableRenameFile:!1!==(null===(_=B.fileManager)||void 0===_?void 0:_.enableRenameFile),enableRenameFolder:!1!==(null===(C=B.fileManager)||void 0===C?void 0:C.enableRenameFolder),enableUpdateFile:!1!==(null===(E=B.fileManager)||void 0===E?void 0:E.enableUpdateFile),enableCopyItem:!1!==(null===(S=B.fileManager)||void 0===S?void 0:S.enableMoveFile),enableCopyFolder:!1!==(null===(b=B.fileManager)||void 0===b?void 0:b.enableCopyFolder),enableDelete:!1!==(null===(A=B.fileManager)||void 0===A?void 0:A.enableDelete),enableEdit:!1!==(null===(O=B.fileManager)||void 0===O?void 0:O.enableEdit),enableMoveItem:!1!==(null===(T=B.fileManager)||void 0===T?void 0:T.enableMoveFile),enableMoveFolder:!1!==(null===(M=B.fileManager)||void 0===M?void 0:M.enableMoveFolder)},disablePagination:!1===(null===(D=B.fileManager)||void 0===D?void 0:D.enablePagination),multiSelect:!1!==(null===(U=B.fileManager)||void 0===U?void 0:U.multiSelect),defaultFolderName:null===(N=B.fileManager)||void 0===N?void 0:N.defaultFolderName}})))),r.createElement(m.A,{open:se,onCancel:()=>ne(!1),initialSlide:oe,sideOnOk:void 0})):null}}}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 6144.a3bf0881.chunk.js.LICENSE.txt */
|
|
2
|
+
"use strict";(globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[]).push([[6144],{36144:(e,t,n)=>{n.r(t),n.d(t,{conf:()=>i,language:()=>r});var i={wordPattern:/(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,comments:{blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},r={defaultToken:"",tokenPostfix:".css",ws:"[ \t\n\r\f]*",identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.bracket"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@strings"},["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@selectorname"},["[\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.bracket",next:"@selectorbody"}]],selectorbody:[{include:"@comments"},["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],["}",{token:"delimiter.bracket",next:"@pop"}]],selectorname:[["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@functioninvocation"},{include:"@numbers"},{include:"@name"},{include:"@strings"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","delimiter"],[",","delimiter"]],rulevalue:[{include:"@comments"},{include:"@strings"},{include:"@term"},["!important","keyword"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],urldeclaration:[{include:"@strings"},["[^)\r\n]+","string"],["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[/[^*/]+/,"comment"],[/./,"comment"]],name:[["@identifier","attribute.value"]],numbers:[["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],keyframedeclaration:[["@identifier","attribute.value"],["{",{token:"delimiter.bracket",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.bracket",next:"@selectorbody"}],["}",{token:"delimiter.bracket",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"attribute.value",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"attribute.value",next:"@pop"}]],strings:[['~?"',{token:"string",next:"@stringenddoublequote"}],["~?'",{token:"string",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string",next:"@pop"}],[/[^\\"]+/,"string"],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string",next:"@pop"}],[/[^\\']+/,"string"],[".","string"]]}}}}]);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*!-----------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Version: 0.34.0(dee69564fa27426c7ebb706c3d2ed3d1acccedfe)
|
|
4
|
+
* Released under the MIT license
|
|
5
|
+
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
6
|
+
*-----------------------------------------------------------------------------*/
|