@surething/cockpit 1.0.219 → 1.0.220
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/.next-prod/BUILD_ID +1 -1
- package/.next-prod/app-path-routes-manifest.json +4 -4
- package/.next-prod/build-manifest.json +2 -2
- package/.next-prod/prerender-manifest.json +3 -3
- package/.next-prod/server/app/_global-error/page.js.nft.json +1 -1
- package/.next-prod/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_global-error.html +1 -1
- package/.next-prod/server/app/_global-error.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found/page.js +1 -1
- package/.next-prod/server/app/_not-found/page.js.nft.json +1 -1
- package/.next-prod/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_not-found.html +1 -1
- package/.next-prod/server/app/_not-found.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next-prod/server/app/api/agent/test/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/bash/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/codex/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/deepseek/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/kimi/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/ollama/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/pty-input/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/route.js +2 -0
- package/.next-prod/server/app/api/chat/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/claude-stats/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/commands/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/comments/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/columns/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/export/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/query/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/schemas/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/dev/spans/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/extension/version/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/file/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/blame/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/clipboard/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/copy/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/delete/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/expanded/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/index/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/init/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/paste/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/read/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/readdir/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/recent/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/save/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/search/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/stat/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/text/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/branch-diff/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/branches/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/commit-diff/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/commits/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/diff/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/discard/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/stage/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/status/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/unstage/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/worktree/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/global-state/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/jupyter/load/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/jupyter/save/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/jupyter/shutdown/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/definition/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/hover/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/references/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/status/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/warmup/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/columns/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/export/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/query/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/schemas/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/query/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/schema/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/note/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/ollama/models/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/ollama/start/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/open-cursor/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/open-vscode/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/pick-folder/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/pinned-sessions/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/project-settings/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/project-state/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/affected/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/callees/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/callers/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/coedit/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/context/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/file/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/file-functions/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/impact/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/related/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/risk/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/search/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projects/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/command/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/delete/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/get/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/keys/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/set/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/[id]/comments/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/[id]/replies/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/[id]/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/identify/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/order/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/share-info/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/users/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/scheduled-tasks/route.js +1 -1
- package/.next-prod/server/app/api/scheduled-tasks/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/services/config/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/services/scripts/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/fork/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/history/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/session-by-path/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/sessions/projects/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/sessions/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/settings/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/skills/[id]/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/skills/content/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/skills/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/aliases/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/autocomplete/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/bubble-order/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/env/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/history/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/version/route.js.nft.json +1 -1
- package/.next-prod/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next-prod/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/.next-prod/server/app/page.js +1 -1
- package/.next-prod/server/app/page.js.nft.json +1 -1
- package/.next-prod/server/app/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/project/page.js +1 -1
- package/.next-prod/server/app/project/page.js.nft.json +1 -1
- package/.next-prod/server/app/project/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/review/[id]/page.js +1 -1
- package/.next-prod/server/app/review/[id]/page.js.nft.json +1 -1
- package/.next-prod/server/app/review/[id]/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app-paths-manifest.json +4 -4
- package/.next-prod/server/chunks/{1921.js → 3408.js} +2 -2
- package/.next-prod/server/chunks/3863.js +2 -2
- package/.next-prod/server/chunks/8916.js +1 -1
- package/.next-prod/server/chunks/9658.js +4 -4
- package/.next-prod/server/middleware-build-manifest.js +1 -1
- package/.next-prod/server/pages/404.html +1 -1
- package/.next-prod/server/pages/500.html +1 -1
- package/.next-prod/server/server-reference-manifest.json +1 -1
- package/.next-prod/static/chunks/{5204-babf0d0290febbec.js → 2759-50f11ab1460db5e0.js} +2 -2
- package/.next-prod/static/chunks/{6321-a2227f1f162bd000.js → 6321-604138b4f668f15d.js} +4 -4
- package/.next-prod/static/chunks/6345-59866cd6d074c773.js +14 -0
- package/.next-prod/static/chunks/app/{layout-a21c32c2b18fbae2.js → layout-e3a565f85cbc7298.js} +1 -1
- package/.next-prod/static/chunks/app/{page-c5dc8ea6f9fc740b.js → page-9dfd5af2be962e89.js} +1 -1
- package/.next-prod/static/chunks/app/project/{page-c5dc8ea6f9fc740b.js → page-9dfd5af2be962e89.js} +1 -1
- package/.next-prod/trace +13 -13
- package/.next-prod/trace-build +1 -1
- package/dist/{chunk-O4P2J44N.mjs → chunk-4S74IEU4.mjs} +1 -1
- package/dist/{chunk-GCYLMG43.mjs → chunk-6BFKFQG5.mjs} +7 -0
- package/dist/{chunk-WOM47O75.mjs → chunk-ICB7IS3A.mjs} +1 -1
- package/dist/httpApi.mjs +2 -2
- package/dist/scheduledTasks.mjs +74 -14
- package/dist/{server-SNB4H35J.mjs → server-Z6V4HKGV.mjs} +2 -2
- package/dist/wsServer.mjs +4 -4
- package/package.json +1 -1
- package/.next-prod/static/chunks/6345-d9033e1e3d07c277.js +0 -14
- /package/.next-prod/static/{2xsVtkHy1Q-18e5b3DPua → 3yP7H7dfhCBEDq0V_mbpG}/_buildManifest.js +0 -0
- /package/.next-prod/static/{2xsVtkHy1Q-18e5b3DPua → 3yP7H7dfhCBEDq0V_mbpG}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5204],{5989:(e,t,n)=>{"use strict";let r,i;n.d(t,{XI:()=>tr,nA:()=>eQ,A0:()=>eY,Hj:()=>e0});var s=n(82159),o=n(76865),a=n(27050),l=n(63197),h=n(12894),c=n(8242);if("u">typeof WeakMap){let e=new WeakMap;r=t=>e.get(t),i=(t,n)=>(e.set(t,n),n)}else{let e=[],t=10,n=0;r=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},i=(r,i)=>(n==t&&(n=0),e[n++]=r,e[n++]=i)}var u=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){let n=this.map[t];if(n!=e)continue;let r=t%this.width,i=t/this.width|0,s=r+1,o=i+1;for(let e=1;s<this.width&&this.map[t+e]==n;e++)s++;for(let e=1;o<this.height&&this.map[t+this.width*e]==n;e++)o++;return{left:r,top:i,right:s,bottom:o}}throw RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){let{left:r,right:i,top:s,bottom:o}=this.findCell(e);return"horiz"==t?(n<0?0==r:i==this.width)?null:this.map[s*this.width+(n<0?r-1:i)]:(n<0?0==s:o==this.height)?null:this.map[r+this.width*(n<0?s-1:o)]}rectBetween(e,t){let{left:n,right:r,top:i,bottom:s}=this.findCell(e),{left:o,right:a,top:l,bottom:h}=this.findCell(t);return{left:Math.min(n,o),top:Math.min(i,l),right:Math.max(r,a),bottom:Math.max(s,h)}}cellsInRect(e){let t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let i=e.left;i<e.right;i++){let s=r*this.width+i,o=this.map[s];!n[o]&&(n[o]=!0,i==e.left&&i&&this.map[s-1]==o||r==e.top&&r&&this.map[s-this.width]==o||t.push(o))}return t}positionAt(e,t,n){for(let r=0,i=0;;r++){let s=i+n.child(r).nodeSize;if(r==e){let n=t+e*this.width,r=(e+1)*this.width;for(;n<r&&this.map[n]<i;)n++;return n==r?s-1:this.map[n]}i=s}}static get(e){return r(e)||i(e,d(e))}};function d(e){if("table"!=e.type.spec.tableRole)throw RangeError("Not a table node: "+e.type.name);let t=p(e),n=e.childCount,r=[],i=0,s=null,o=[];for(let e=0,i=t*n;e<i;e++)r[e]=0;for(let a=0,l=0;a<n;a++){let h=e.child(a);l++;for(let e=0;;e++){for(;i<r.length&&0!=r[i];)i++;if(e==h.childCount)break;let c=h.child(e),{colspan:u,rowspan:d,colwidth:p}=c.attrs;for(let e=0;e<d;e++){if(e+a>=n){(s||(s=[])).push({type:"overlong_rowspan",pos:l,n:d-e});break}let h=i+e*t;for(let e=0;e<u;e++){0==r[h+e]?r[h+e]=l:(s||(s=[])).push({type:"collision",row:a,pos:l,n:u-e});let n=p&&p[e];if(n){let r=(h+e)%t*2,i=o[r];null==i||i!=n&&1==o[r+1]?(o[r]=n,o[r+1]=1):i==n&&o[r+1]++}}}i+=u,l+=c.nodeSize}let c=(a+1)*t,u=0;for(;i<c;)0==r[i++]&&u++;u&&(s||(s=[])).push({type:"missing",row:a,n:u}),l++}(0===t||0===n)&&(s||(s=[])).push({type:"zero_sized"});let a=new u(t,n,r,s),l=!1;for(let e=0;!l&&e<o.length;e+=2)null!=o[e]&&o[e+1]<n&&(l=!0);return l&&f(a,o,e),a}function p(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){let i=e.child(r),s=0;if(n)for(let t=0;t<r;t++){let n=e.child(t);for(let e=0;e<n.childCount;e++){let i=n.child(e);t+i.attrs.rowspan>r&&(s+=i.attrs.colspan)}}for(let e=0;e<i.childCount;e++){let t=i.child(e);s+=t.attrs.colspan,t.attrs.rowspan>1&&(n=!0)}-1==t?t=s:t!=s&&(t=Math.max(t,s))}return t}function f(e,t,n){e.problems||(e.problems=[]);let r={};for(let i=0;i<e.map.length;i++){let s=e.map[i];if(r[s])continue;r[s]=!0;let o=n.nodeAt(s);if(!o)throw RangeError(`No cell with offset ${s} found`);let a=null,l=o.attrs;for(let n=0;n<l.colspan;n++){let r=t[(i+n)%e.width*2];null==r||l.colwidth&&l.colwidth[n]==r||((a||(a=m(l)))[n]=r)}a&&e.problems.unshift({type:"colwidth mismatch",pos:s,colwidth:a})}}function m(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function g(e){let t=e.cached.tableNodeTypes;if(!t)for(let n in t=e.cached.tableNodeTypes={},e.nodes){let r=e.nodes[n],i=r.spec.tableRole;i&&(t[i]=r)}return t}let _=new o.hs("selectingCells");function y(e){for(let t=e.depth-1;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function b(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}function k(e){let t=e.selection.$head;for(let e=t.depth;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return!0;return!1}function w(e){let t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&"cell"==t.node.type.spec.tableRole)return t.$anchor;let n=y(t.$head)||v(t.$head);if(n)return n;throw RangeError(`No cell found around position ${t.head}`)}function v(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n-t.nodeSize)}}function C(e){return"row"==e.parent.type.spec.tableRole&&!!e.nodeAfter}function x(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function S(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function A(e,t,n){let r=e.node(-1),i=u.get(r),s=e.start(-1),o=i.nextCell(e.pos-s,t,n);return null==o?null:e.node(0).resolve(s+o)}function E(e,t,n=1){let r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(e=>e>0)||(r.colwidth=null)),r}function M(e,t,n=1){let r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let e=0;e<n;e++)r.colwidth.splice(t,0,0)}return r}function T(e,t,n){let r=g(t.type.schema).header_cell;for(let i=0;i<e.height;i++)if(t.nodeAt(e.map[n+i*e.width]).type!=r)return!1;return!0}var N=class e extends o.LN{constructor(e,t=e){const n=e.node(-1),r=u.get(n),i=e.start(-1),s=r.rectBetween(e.pos-i,t.pos-i),a=e.node(0),l=r.cellsInRect(s).filter(e=>e!=t.pos-i);l.unshift(t.pos-i);const h=l.map(e=>{let t=n.nodeAt(e);if(!t)throw RangeError(`No cell with offset ${e} found`);let r=i+e+1;return new o.yn(a.resolve(r),a.resolve(r+t.content.size))});super(h[0].$from,h[0].$to,h),this.$anchorCell=e,this.$headCell=t}map(t,n){let r=t.resolve(n.map(this.$anchorCell.pos)),i=t.resolve(n.map(this.$headCell.pos));if(C(r)&&C(i)&&S(r,i)){let t=this.$anchorCell.node(-1)!=r.node(-1);return t&&this.isRowSelection()?e.rowSelection(r,i):t&&this.isColSelection()?e.colSelection(r,i):new e(r,i)}return o.U3.between(r,i)}content(){let e=this.$anchorCell.node(-1),t=u.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),i={},s=[];for(let n=r.top;n<r.bottom;n++){let o=[];for(let s=n*t.width+r.left,a=r.left;a<r.right;a++,s++){let n=t.map[s];if(i[n])continue;i[n]=!0;let a=t.findCell(n),l=e.nodeAt(n);if(!l)throw RangeError(`No cell with offset ${n} found`);let h=r.left-a.left,c=a.right-r.right;if(h>0||c>0){let e=l.attrs;if(h>0&&(e=E(e,0,h)),c>0&&(e=E(e,e.colspan-c,c)),a.left<r.left){if(!(l=l.type.createAndFill(e)))throw RangeError(`Could not create cell with attrs ${JSON.stringify(e)}`)}else l=l.type.create(e,l.content)}if(a.top<r.top||a.bottom>r.bottom){let e={...l.attrs,rowspan:Math.min(a.bottom,r.bottom)-Math.max(a.top,r.top)};l=a.top<r.top?l.type.createAndFill(e):l.type.create(e,l.content)}o.push(l)}s.push(e.child(n).copy(a.FK.from(o)))}let o=this.isColSelection()&&this.isRowSelection()?e:s;return new a.Ji(a.FK.from(o),1,1)}replace(e,t=a.Ji.empty){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:s,$to:o}=r[i],l=e.mapping.slice(n);e.replace(l.map(s.pos),l.map(o.pos),i?a.Ji.empty:t)}let i=o.LN.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,t){this.replace(e,new a.Ji(a.FK.from(t),0,0))}forEachCell(e){let t=this.$anchorCell.node(-1),n=u.get(t),r=this.$anchorCell.start(-1),i=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let n=0;n<i.length;n++)e(t.nodeAt(i[n]),r+i[n])}isColSelection(){let e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);return!(Math.min(e,t)>0)&&Math.max(e+this.$anchorCell.nodeAfter.attrs.rowspan,t+this.$headCell.nodeAfter.attrs.rowspan)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let r=t.node(-1),i=u.get(r),s=t.start(-1),o=i.findCell(t.pos-s),a=i.findCell(n.pos-s),l=t.node(0);return o.top<=a.top?(o.top>0&&(t=l.resolve(s+i.map[o.left])),a.bottom<i.height&&(n=l.resolve(s+i.map[i.width*(i.height-1)+a.right-1]))):(a.top>0&&(n=l.resolve(s+i.map[a.left])),o.bottom<i.height&&(t=l.resolve(s+i.map[i.width*(i.height-1)+o.right-1]))),new e(t,n)}isRowSelection(){let e=this.$anchorCell.node(-1),t=u.get(e),n=this.$anchorCell.start(-1),r=t.colCount(this.$anchorCell.pos-n),i=t.colCount(this.$headCell.pos-n);return!(Math.min(r,i)>0)&&Math.max(r+this.$anchorCell.nodeAfter.attrs.colspan,i+this.$headCell.nodeAfter.attrs.colspan)==t.width}eq(t){return t instanceof e&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let r=t.node(-1),i=u.get(r),s=t.start(-1),o=i.findCell(t.pos-s),a=i.findCell(n.pos-s),l=t.node(0);return o.left<=a.left?(o.left>0&&(t=l.resolve(s+i.map[o.top*i.width])),a.right<i.width&&(n=l.resolve(s+i.map[i.width*(a.top+1)-1]))):(a.left>0&&(n=l.resolve(s+i.map[a.top*i.width])),o.right<i.width&&(t=l.resolve(s+i.map[i.width*(o.top+1)-1]))),new e(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new e(t.resolve(n),t.resolve(r))}getBookmark(){return new I(this.$anchorCell.pos,this.$headCell.pos)}};N.prototype.visible=!1,o.LN.jsonID("cell",N);var I=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){let t=e.resolve(this.anchor),n=e.resolve(this.head);return"row"==t.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&S(t,n)?new N(t,n):o.LN.near(n,1)}};function D(e){if(!(e.selection instanceof N))return null;let t=[];return e.selection.forEachCell((e,n)=>{t.push(l.NZ.node(n,n+e.nodeSize,{class:"selectedCell"}))}),l.zF.create(e.doc,t)}function L({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,r=t.pos,i=e.depth;for(;i>=0&&!(e.after(i+1)<e.end(i));i--,n++);for(let e=t.depth;e>=0&&!(t.before(e+1)>t.start(e));e--,r--);return n==r&&/row|table/.test(e.node(i).type.spec.tableRole)}function R({$from:e,$to:t}){let n,r;for(let t=e.depth;t>0;t--){let r=e.node(t);if("cell"===r.type.spec.tableRole||"header_cell"===r.type.spec.tableRole){n=r;break}}for(let e=t.depth;e>0;e--){let n=t.node(e);if("cell"===n.type.spec.tableRole||"header_cell"===n.type.spec.tableRole){r=n;break}}return n!==r&&0===t.parentOffset}function F(e,t,n){let r,i,s=(t||e).selection,a=(t||e).doc;if(s instanceof o.nh&&(i=s.node.type.spec.tableRole)){if("cell"==i||"header_cell"==i)r=N.create(a,s.from);else if("row"==i){let e=a.resolve(s.from+1);r=N.rowSelection(e,e)}else if(!n){let e=u.get(s.node),t=s.from+1,n=t+e.map[e.width*e.height-1];r=N.create(a,t+1,n)}}else s instanceof o.U3&&L(s)?r=o.U3.create(a,s.from):s instanceof o.U3&&R(s)&&(r=o.U3.create(a,s.$from.start(),s.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}let P=new o.hs("fix-tables");function O(e,t,n,r){let i=e.childCount,s=t.childCount;e:for(let o=0,a=0;o<s;o++){let s=t.child(o);for(let t=a,r=Math.min(i,o+3);t<r;t++)if(e.child(t)==s){a=t+1,n+=s.nodeSize;continue e}r(s,n),a<i&&e.child(a).sameMarkup(s)?O(e.child(a),s,n+1,r):s.nodesBetween(0,s.content.size,r,n+1),n+=s.nodeSize}}function z(e,t){let n,r=(t,r)=>{"table"==t.type.spec.tableRole&&(n=B(e,t,r,n))};return t?t.doc!=e.doc&&O(t.doc,e.doc,0,r):e.doc.descendants(r),n}function B(e,t,n,r){let i,s,o=u.get(t);if(!o.problems)return r;r||(r=e.tr);let a=[];for(let e=0;e<o.height;e++)a.push(0);for(let e=0;e<o.problems.length;e++){let i=o.problems[e];if("collision"==i.type){let e=t.nodeAt(i.pos);if(!e)continue;let s=e.attrs;for(let e=0;e<s.rowspan;e++)a[i.row+e]+=i.n;r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,E(s,s.colspan-i.n,i.n))}else if("missing"==i.type)a[i.row]+=i.n;else if("overlong_rowspan"==i.type){let e=t.nodeAt(i.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,{...e.attrs,rowspan:e.attrs.rowspan-i.n})}else if("colwidth mismatch"==i.type){let e=t.nodeAt(i.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,{...e.attrs,colwidth:i.colwidth})}else if("zero_sized"==i.type){let e=r.mapping.map(n);r.delete(e,e+t.nodeSize)}}for(let e=0;e<a.length;e++)a[e]&&(null==i&&(i=e),s=e);for(let l=0,h=n+1;l<o.height;l++){let n=t.child(l),o=h+n.nodeSize,c=a[l];if(c>0){let t="cell";n.firstChild&&(t=n.firstChild.type.spec.tableRole);let a=[];for(let n=0;n<c;n++){let n=g(e.schema)[t].createAndFill();n&&a.push(n)}let u=(0==l||i==l-1)&&s==l?h+1:o-1;r.insert(r.mapping.map(u),a)}h=o}return r.setMeta(P,{fixTables:!0})}function $(e){let t=e.selection,n=w(e),r=n.node(-1),i=n.start(-1),s=u.get(r);return{...t instanceof N?s.rectBetween(t.$anchorCell.pos-i,t.$headCell.pos-i):s.findCell(n.pos-i),tableStart:i,map:s,table:r}}function j(e,{map:t,tableStart:n,table:r},i){let s=i>0?-1:0;T(t,r,i+s)&&(s=0==i||i==t.width?null:0);for(let o=0;o<t.height;o++){let a=o*t.width+i;if(i>0&&i<t.width&&t.map[a-1]==t.map[a]){let s=t.map[a],l=r.nodeAt(s);e.setNodeMarkup(e.mapping.map(n+s),null,M(l.attrs,i-t.colCount(s))),o+=l.attrs.rowspan-1}else{let l=null==s?g(r.type.schema).cell:r.nodeAt(t.map[a+s]).type,h=t.positionAt(o,i,r);e.insert(e.mapping.map(n+h),l.createAndFill())}}return e}function q(e,t){if(!k(e))return!1;if(t){let n=$(e);t(j(e.tr,n,n.left))}return!0}function H(e,t){if(!k(e))return!1;if(t){let n=$(e);t(j(e.tr,n,n.right))}return!0}function U(e,{map:t,table:n,tableStart:r},i){let s=e.mapping.maps.length;for(let o=0;o<t.height;){let a=o*t.width+i,l=t.map[a],h=n.nodeAt(l),c=h.attrs;if(i>0&&t.map[a-1]==l||i<t.width-1&&t.map[a+1]==l)e.setNodeMarkup(e.mapping.slice(s).map(r+l),null,E(c,i-t.colCount(l)));else{let t=e.mapping.slice(s).map(r+l);e.delete(t,t+h.nodeSize)}o+=c.rowspan}}function W(e,t){if(!k(e))return!1;if(t){let n=$(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(let e=n.right-1;U(r,n,e),e!=n.left;e--){let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=u.get(e)}t(r)}return!0}function V(e,t,n){var r;let i=g(t.type.schema).header_cell;for(let s=0;s<e.width;s++)if((null==(r=t.nodeAt(e.map[s+n*e.width]))?void 0:r.type)!=i)return!1;return!0}function G(e,{map:t,tableStart:n,table:r},i){let s=n;for(let e=0;e<i;e++)s+=r.child(e).nodeSize;let o=[],a=i>0?-1:0;V(t,r,i+a)&&(a=0==i||i==t.height?null:0);for(let s=0,h=t.width*i;s<t.width;s++,h++)if(i>0&&i<t.height&&t.map[h]==t.map[h-t.width]){let i=t.map[h],o=r.nodeAt(i).attrs;e.setNodeMarkup(n+i,null,{...o,rowspan:o.rowspan+1}),s+=o.colspan-1}else{var l;let e=null==a?g(r.type.schema).cell:null==(l=r.nodeAt(t.map[h+a*t.width]))?void 0:l.type,n=null==e?void 0:e.createAndFill();n&&o.push(n)}return e.insert(s,g(r.type.schema).row.create(null,o)),e}function J(e,t){if(!k(e))return!1;if(t){let n=$(e);t(G(e.tr,n,n.top))}return!0}function K(e,t){if(!k(e))return!1;if(t){let n=$(e);t(G(e.tr,n,n.bottom))}return!0}function Z(e,{map:t,table:n,tableStart:r},i){let s=0;for(let e=0;e<i;e++)s+=n.child(e).nodeSize;let o=s+n.child(i).nodeSize,a=e.mapping.maps.length;e.delete(s+r,o+r);let l=new Set;for(let s=0,o=i*t.width;s<t.width;s++,o++){let h=t.map[o];if(!l.has(h)){if(l.add(h),i>0&&h==t.map[o-t.width]){let t=n.nodeAt(h).attrs;e.setNodeMarkup(e.mapping.slice(a).map(h+r),null,{...t,rowspan:t.rowspan-1}),s+=t.colspan-1}else if(i<t.height&&h==t.map[o+t.width]){let o=n.nodeAt(h),l=o.attrs,c=o.type.create({...l,rowspan:o.attrs.rowspan-1},o.content),u=t.positionAt(i+1,s,n);e.insert(e.mapping.slice(a).map(r+u),c),s+=l.colspan-1}}}}function X(e,t){if(!k(e))return!1;if(t){let n=$(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(let e=n.bottom-1;Z(r,n,e),e!=n.top;e--){let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=u.get(n.table)}t(r)}return!0}function Q(e){let t=e.content;return 1==t.childCount&&t.child(0).isTextblock&&0==t.child(0).childCount}function Y({width:e,height:t,map:n},r){let i=r.top*e+r.left,s=i,o=(r.bottom-1)*e+r.left,a=i+(r.right-r.left-1);for(let t=r.top;t<r.bottom;t++){if(r.left>0&&n[s]==n[s-1]||r.right<e&&n[a]==n[a+1])return!0;s+=e,a+=e}for(let s=r.left;s<r.right;s++){if(r.top>0&&n[i]==n[i-e]||r.bottom<t&&n[o]==n[o+e])return!0;i++,o++}return!1}function ee(e,t){let n=e.selection;if(!(n instanceof N)||n.$anchorCell.pos==n.$headCell.pos)return!1;let r=$(e),{map:i}=r;if(Y(i,r))return!1;if(t){let n,s,o=e.tr,l={},h=a.FK.empty;for(let e=r.top;e<r.bottom;e++)for(let t=r.left;t<r.right;t++){let a=i.map[e*i.width+t],c=r.table.nodeAt(a);if(!l[a]&&c)if(l[a]=!0,null==n)n=a,s=c;else{Q(c)||(h=h.append(c.content));let e=o.mapping.map(a+r.tableStart);o.delete(e,e+c.nodeSize)}}if(null==n||null==s)return!0;if(o.setNodeMarkup(n+r.tableStart,null,{...M(s.attrs,s.attrs.colspan,r.right-r.left-s.attrs.colspan),rowspan:r.bottom-r.top}),h.size>0){let e=n+1+s.content.size,t=Q(s)?n+1:e;o.replaceWith(t+r.tableStart,e+r.tableStart,h)}o.setSelection(new N(o.doc.resolve(n+r.tableStart))),t(o)}return!0}function et(e,t){let n=g(e.schema);return en(({node:e})=>n[e.type.spec.tableRole])(e,t)}function en(e){return(t,n)=>{let r,i,s=t.selection;if(s instanceof N){if(s.$anchorCell.pos!=s.$headCell.pos)return!1;r=s.$anchorCell.nodeAfter,i=s.$anchorCell.pos}else{var o;if(!(r=b(s.$from)))return!1;i=null==(o=y(s.$from))?void 0:o.pos}if(null==r||null==i||1==r.attrs.colspan&&1==r.attrs.rowspan)return!1;if(n){let o,a=r.attrs,l=[],h=a.colwidth;a.rowspan>1&&(a={...a,rowspan:1}),a.colspan>1&&(a={...a,colspan:1});let c=$(t),u=t.tr;for(let e=0;e<c.right-c.left;e++)l.push(h?{...a,colwidth:h&&h[e]?[h[e]]:null}:a);for(let t=c.top;t<c.bottom;t++){let n=c.map.positionAt(t,c.left,c.table);t==c.top&&(n+=r.nodeSize);for(let i=c.left,s=0;i<c.right;i++,s++)(i!=c.left||t!=c.top)&&u.insert(o=u.mapping.map(n+c.tableStart,1),e({node:r,row:t,col:i}).createAndFill(l[s]))}u.setNodeMarkup(i,e({node:r,row:c.top,col:c.left}),l[0]),s instanceof N&&u.setSelection(new N(u.doc.resolve(s.$anchorCell.pos),o?u.doc.resolve(o):void 0)),n(u)}return!0}}function er(e,t){return function(n,r){if(!k(n))return!1;let i=w(n);if(i.nodeAfter.attrs[e]===t)return!1;if(r){let s=n.tr;n.selection instanceof N?n.selection.forEachCell((n,r)=>{n.attrs[e]!==t&&s.setNodeMarkup(r,null,{...n.attrs,[e]:t})}):s.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[e]:t}),r(s)}return!0}}function ei(e){return function(t,n){if(!k(t))return!1;if(n){let r=g(t.schema),i=$(t),s=t.tr,o=i.map.cellsInRect("column"==e?{left:i.left,top:0,right:i.right,bottom:i.map.height}:"row"==e?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),a=o.map(e=>i.table.nodeAt(e));for(let e=0;e<o.length;e++)a[e].type==r.header_cell&&s.setNodeMarkup(i.tableStart+o[e],r.cell,a[e].attrs);if(0===s.steps.length)for(let e=0;e<o.length;e++)s.setNodeMarkup(i.tableStart+o[e],r.header_cell,a[e].attrs);n(s)}return!0}}function es(e,t,n){let r=t.map.cellsInRect({left:0,top:0,right:"row"==e?t.map.width:1,bottom:"column"==e?t.map.height:1});for(let e=0;e<r.length;e++){let i=t.table.nodeAt(r[e]);if(i&&i.type!==n.header_cell)return!1}return!0}function eo(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?ei(e):function(t,n){if(!k(t))return!1;if(n){let r=g(t.schema),i=$(t),s=t.tr,o=es("row",i,r),a=es("column",i,r),l=+("column"===e?!!o:"row"===e&&!!a),h="column"==e?{left:0,top:l,right:1,bottom:i.map.height}:"row"==e?{left:l,top:0,right:i.map.width,bottom:1}:i,c="column"==e?a?r.cell:r.header_cell:"row"==e?o?r.cell:r.header_cell:r.cell;i.map.cellsInRect(h).forEach(e=>{let t=e+i.tableStart,n=s.doc.nodeAt(t);n&&s.setNodeMarkup(t,c,n.attrs)}),n(s)}return!0}}eo("row",{useDeprecatedLogic:!0}),eo("column",{useDeprecatedLogic:!0});let ea=eo("cell",{useDeprecatedLogic:!0});function el(e,t){if(t<0){let t=e.nodeBefore;if(t)return e.pos-t.nodeSize;for(let t=e.index(-1)-1,n=e.before();t>=0;t--){let r=e.node(-1).child(t),i=r.lastChild;if(i)return n-1-i.nodeSize;n-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;let t=e.node(-1);for(let n=e.indexAfter(-1),r=e.after();n<t.childCount;n++){let e=t.child(n);if(e.childCount)return r+1;r+=e.nodeSize}}return null}function eh(e){return function(t,n){if(!k(t))return!1;let r=el(w(t),e);if(null==r)return!1;if(n){let e=t.doc.resolve(r);n(t.tr.setSelection(o.U3.between(e,x(e))).scrollIntoView())}return!0}}function ec(e,t){let n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if("table"==n.node(r).type.spec.tableRole)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function eu(e,t){let n=e.selection;if(!(n instanceof N))return!1;if(t){let r=e.tr,i=g(e.schema).cell.createAndFill().content;n.forEachCell((e,t)=>{e.content.eq(i)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new a.Ji(i,0,0))}),r.docChanged&&t(r)}return!0}function ed(e){if(0===e.size)return null;let{content:t,openStart:n,openEnd:r}=e;for(;1==t.childCount&&(n>0&&r>0||"table"==t.child(0).type.spec.tableRole);)n--,r--,t=t.child(0).content;let i=t.child(0),s=i.type.spec.tableRole,o=i.type.schema,l=[];if("row"==s)for(let e=0;e<t.childCount;e++){let i=t.child(e).content,s=e?0:Math.max(0,n-1),h=e<t.childCount-1?0:Math.max(0,r-1);(s||h)&&(i=ef(g(o).row,new a.Ji(i,s,h)).content),l.push(i)}else{if("cell"!=s&&"header_cell"!=s)return null;l.push(n||r?ef(g(o).row,new a.Ji(t,n,r)).content:t)}return ep(o,l)}function ep(e,t){let n=[];for(let e=0;e<t.length;e++){let r=t[e];for(let t=r.childCount-1;t>=0;t--){let{rowspan:i,colspan:s}=r.child(t).attrs;for(let t=e;t<e+i;t++)n[t]=(n[t]||0)+s}}let r=0;for(let e=0;e<n.length;e++)r=Math.max(r,n[e]);for(let i=0;i<n.length;i++)if(i>=t.length&&t.push(a.FK.empty),n[i]<r){let s=g(e).cell.createAndFill(),o=[];for(let e=n[i];e<r;e++)o.push(s);t[i]=t[i].append(a.FK.from(o))}return{height:t.length,width:r,rows:t}}function ef(e,t){let n=e.createAndFill();return new c.dL(n).replace(0,n.content.size,t).doc}function em({width:e,height:t,rows:n},r,i){if(e!=r){let t=[],i=[];for(let e=0;e<n.length;e++){let s=n[e],o=[];for(let n=t[e]||0,i=0;n<r;i++){let a=s.child(i%s.childCount);n+a.attrs.colspan>r&&(a=a.type.createChecked(E(a.attrs,a.attrs.colspan,n+a.attrs.colspan-r),a.content)),o.push(a),n+=a.attrs.colspan;for(let n=1;n<a.attrs.rowspan;n++)t[e+n]=(t[e+n]||0)+a.attrs.colspan}i.push(a.FK.from(o))}n=i,e=r}if(t!=i){let e=[];for(let r=0,s=0;r<i;r++,s++){let o=[],l=n[s%t];for(let e=0;e<l.childCount;e++){let t=l.child(e);r+t.attrs.rowspan>i&&(t=t.type.create({...t.attrs,rowspan:Math.max(1,i-t.attrs.rowspan)},t.content)),o.push(t)}e.push(a.FK.from(o))}n=e,t=i}return{width:e,height:t,rows:n}}function eg(e,t,n,r,i,s,o){let l,h,c=g(e.doc.type.schema);if(i>t.width)for(let s=0,a=0;s<t.height;s++){let u,d=n.child(s);a+=d.nodeSize;let p=[];u=null==d.lastChild||d.lastChild.type==c.cell?l||(l=c.cell.createAndFill()):h||(h=c.header_cell.createAndFill());for(let e=t.width;e<i;e++)p.push(u);e.insert(e.mapping.slice(o).map(a-1+r),p)}if(s>t.height){let u=[];for(let e=0,r=(t.height-1)*t.width;e<Math.max(t.width,i);e++){let i=!(e>=t.width)&&n.nodeAt(t.map[r+e]).type==c.header_cell;u.push(i?h||(h=c.header_cell.createAndFill()):l||(l=c.cell.createAndFill()))}let d=c.row.create(null,a.FK.from(u)),p=[];for(let e=t.height;e<s;e++)p.push(d);e.insert(e.mapping.slice(o).map(r+n.nodeSize-2),p)}return!!(l||h)}function e_(e,t,n,r,i,s,o,a){if(0==o||o==t.height)return!1;let l=!1;for(let h=i;h<s;h++){let i=o*t.width+h,s=t.map[i];if(t.map[i-t.width]==s){l=!0;let i=n.nodeAt(s),{top:c,left:u}=t.findCell(s);e.setNodeMarkup(e.mapping.slice(a).map(s+r),null,{...i.attrs,rowspan:o-c}),e.insert(e.mapping.slice(a).map(t.positionAt(o,u,n)),i.type.createAndFill({...i.attrs,rowspan:c+i.attrs.rowspan-o})),h+=i.attrs.colspan-1}}return l}function ey(e,t,n,r,i,s,o,a){if(0==o||o==t.width)return!1;let l=!1;for(let h=i;h<s;h++){let i=h*t.width+o,s=t.map[i];if(t.map[i-1]==s){l=!0;let i=n.nodeAt(s),c=t.colCount(s),u=e.mapping.slice(a).map(s+r);e.setNodeMarkup(u,null,E(i.attrs,o-c,i.attrs.colspan-(o-c))),e.insert(u+i.nodeSize,i.type.createAndFill(E(i.attrs,0,o-c))),h+=i.attrs.rowspan-1}}return l}function eb(e,t,n,r,i){let s=n?e.doc.nodeAt(n-1):e.doc;if(!s)throw Error("No table found");let o=u.get(s),{top:l,left:h}=r,c=h+i.width,d=l+i.height,p=e.tr,f=0;function m(){if(!(s=n?p.doc.nodeAt(n-1):p.doc))throw Error("No table found");o=u.get(s),f=p.mapping.maps.length}eg(p,o,s,n,c,d,0)&&m(),e_(p,o,s,n,h,c,l,f)&&m(),e_(p,o,s,n,h,c,d,f)&&m(),ey(p,o,s,n,l,d,h,f)&&m(),ey(p,o,s,n,l,d,c,f)&&m();for(let e=l;e<d;e++){let t=o.positionAt(e,h,s),r=o.positionAt(e,c,s);p.replace(p.mapping.slice(f).map(t+n),p.mapping.slice(f).map(r+n),new a.Ji(i.rows[e-l],0,0))}m(),p.setSelection(new N(p.doc.resolve(n+o.positionAt(l,h,s)),p.doc.resolve(n+o.positionAt(d-1,c-1,s)))),t(p)}let ek=(0,h.K)({ArrowLeft:ev("horiz",-1),ArrowRight:ev("horiz",1),ArrowUp:ev("vert",-1),ArrowDown:ev("vert",1),"Shift-ArrowLeft":eC("horiz",-1),"Shift-ArrowRight":eC("horiz",1),"Shift-ArrowUp":eC("vert",-1),"Shift-ArrowDown":eC("vert",1),Backspace:eu,"Mod-Backspace":eu,Delete:eu,"Mod-Delete":eu});function ew(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function ev(e,t){return(n,r,i)=>{if(!i)return!1;let s=n.selection;if(s instanceof N)return ew(n,r,o.LN.near(s.$headCell,t));if("horiz"!=e&&!s.empty)return!1;let a=eE(i,e,t);if(null==a)return!1;if("horiz"==e)return ew(n,r,o.LN.near(n.doc.resolve(s.head+t),t));{let i,s=n.doc.resolve(a),l=A(s,e,t);return i=l?o.LN.near(l,1):t<0?o.LN.near(n.doc.resolve(s.before(-1)),-1):o.LN.near(n.doc.resolve(s.after(-1)),1),ew(n,r,i)}}}function eC(e,t){return(n,r,i)=>{let s;if(!i)return!1;let o=n.selection;if(o instanceof N)s=o;else{let r=eE(i,e,t);if(null==r)return!1;s=new N(n.doc.resolve(r))}let a=A(s.$headCell,e,t);return!!a&&ew(n,r,new N(s.$anchorCell,a))}}function ex(e,t){let n=y(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new N(n))),!0)}function eS(e,t,n){if(!k(e.state))return!1;let r=ed(n),i=e.state.selection;if(i instanceof N){r||(r={width:1,height:1,rows:[a.FK.from(ef(g(e.state.schema).cell,n))]});let t=i.$anchorCell.node(-1),s=i.$anchorCell.start(-1),o=u.get(t).rectBetween(i.$anchorCell.pos-s,i.$headCell.pos-s);return r=em(r,o.right-o.left,o.bottom-o.top),eb(e.state,e.dispatch,s,o,r),!0}if(!r)return!1;{let t=w(e.state),n=t.start(-1);return eb(e.state,e.dispatch,n,u.get(t.node(-1)).findCell(t.pos-n),r),!0}}function eA(e,t){var n;let r;if(0!=t.button||t.ctrlKey||t.metaKey)return;let i=eM(e,t.target);if(t.shiftKey&&e.state.selection instanceof N)s(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&i&&null!=(r=y(e.state.selection.$anchor))&&(null==(n=eT(e,t))?void 0:n.pos)!=r.pos)s(r,t),t.preventDefault();else if(!i)return;function s(t,n){let r=eT(e,n),i=null==_.getState(e.state);if(!r||!S(t,r))if(!i)return;else r=t;let s=new N(t,r);if(i||!e.state.selection.eq(s)){let n=e.state.tr.setSelection(s);i&&n.setMeta(_,t.pos),e.dispatch(n)}}function o(){e.root.removeEventListener("mouseup",o),e.root.removeEventListener("dragstart",o),e.root.removeEventListener("mousemove",a),null!=_.getState(e.state)&&e.dispatch(e.state.tr.setMeta(_,-1))}function a(n){let r,a=n,l=_.getState(e.state);if(null!=l)r=e.state.doc.resolve(l);else if(eM(e,a.target)!=i&&!(r=eT(e,t)))return o();r&&s(r,a)}e.root.addEventListener("mouseup",o),e.root.addEventListener("dragstart",o),e.root.addEventListener("mousemove",a)}function eE(e,t,n){if(!(e.state.selection instanceof o.U3))return null;let{$head:r}=e.state.selection;for(let i=r.depth-1;i>=0;i--){let s=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:s.childCount))break;if("cell"==s.type.spec.tableRole||"header_cell"==s.type.spec.tableRole){let s=r.before(i),o="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(o)?s:null}}return null}function eM(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t;return null}function eT(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let{inside:r,pos:i}=n;return r>=0&&y(e.state.doc.resolve(r))||y(e.state.doc.resolve(i))}var eN=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),eI(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type==this.node.type&&(this.node=e,eI(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))}};function eI(e,t,n,r,i,s){let o=0,a=!0,l=t.firstChild,h=e.firstChild;if(h){for(let e=0,n=0;e<h.childCount;e++){let{colspan:c,colwidth:u}=h.child(e).attrs;for(let e=0;e<c;e++,n++){let h=i==n?s:u&&u[e],c=h?h+"px":"";if(o+=h||r,h||(a=!1),l)l.style.width!=c&&(l.style.width=c),l=l.nextSibling;else{let e=document.createElement("col");e.style.width=c,t.appendChild(e)}}}for(;l;){var c;let e=l.nextSibling;null==(c=l.parentNode)||c.removeChild(l),l=e}a?(n.style.width=o+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=o+"px")}}let eD=new o.hs("tableColumnResizing");function eL({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:r=eN,lastColumnResizable:i=!0}={}){let s=new o.k_({key:eD,state:{init(e,t){var i;let o=null==(i=s.spec)||null==(i=i.props)?void 0:i.nodeViews,a=g(t.schema).table.name;return r&&o&&(o[a]=(e,t)=>new r(e,n,t)),new eR(-1,!1)},apply:(e,t)=>t.apply(e)},props:{attributes:e=>{let t=eD.getState(e);return t&&t.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(t,n)=>{eF(t,n,e,i)},mouseleave:e=>{eP(e)},mousedown:(e,r)=>{eO(e,r,t,n)}},decorations:e=>{let t=eD.getState(e);if(t&&t.activeHandle>-1)return eV(e,t.activeHandle)},nodeViews:{}}});return s}var eR=class e{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(t){let n=this,r=t.getMeta(eD);if(r&&null!=r.setHandle)return new e(r.setHandle,!1);if(r&&void 0!==r.setDragging)return new e(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let r=t.mapping.map(n.activeHandle,-1);return C(t.doc.resolve(r))||(r=-1),new e(r,n.dragging)}return n}};function eF(e,t,n,r){if(!e.editable)return;let i=eD.getState(e.state);if(i&&!i.dragging){let s=eB(t.target),o=-1;if(s){let{left:r,right:i}=s.getBoundingClientRect();t.clientX-r<=n?o=e$(e,t,"left",n):i-t.clientX<=n&&(o=e$(e,t,"right",n))}if(o!=i.activeHandle){if(!r&&-1!==o){let t=e.state.doc.resolve(o),n=t.node(-1),r=u.get(n),i=t.start(-1);if(r.colCount(t.pos-i)+t.nodeAfter.attrs.colspan-1==r.width-1)return}eq(e,o)}}}function eP(e){if(!e.editable)return;let t=eD.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&eq(e,-1)}function eO(e,t,n,r){var i;if(!e.editable)return!1;let s=null!=(i=e.dom.ownerDocument.defaultView)?i:window,o=eD.getState(e.state);if(!o||-1==o.activeHandle||o.dragging)return!1;let a=e.state.doc.nodeAt(o.activeHandle),l=ez(e,o.activeHandle,a.attrs);function h(t){s.removeEventListener("mouseup",h),s.removeEventListener("mousemove",c);let r=eD.getState(e.state);(null==r?void 0:r.dragging)&&(eH(e,r.activeHandle,ej(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(eD,{setDragging:null})))}function c(t){if(!t.which)return h(t);let i=eD.getState(e.state);if(i&&i.dragging){let s=ej(i.dragging,t,n);eU(e,i.activeHandle,s,r)}}return e.dispatch(e.state.tr.setMeta(eD,{setDragging:{startX:t.clientX,startWidth:l}})),eU(e,o.activeHandle,l,r),s.addEventListener("mouseup",h),s.addEventListener("mousemove",c),t.preventDefault(),!0}function ez(e,t,{colspan:n,colwidth:r}){let i=r&&r[r.length-1];if(i)return i;let s=e.domAtPos(t),o=s.node.childNodes[s.offset].offsetWidth,a=n;if(r)for(let e=0;e<n;e++)r[e]&&(o-=r[e],a--);return o/a}function eB(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function e$(e,t,n,r){let i="right"==n?-r:r,s=e.posAtCoords({left:t.clientX+i,top:t.clientY});if(!s)return -1;let{pos:o}=s,a=y(e.state.doc.resolve(o));if(!a)return -1;if("right"==n)return a.pos;let l=u.get(a.node(-1)),h=a.start(-1),c=l.map.indexOf(a.pos-h);return c%l.width==0?-1:h+l.map[c-1]}function ej(e,t,n){let r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function eq(e,t){e.dispatch(e.state.tr.setMeta(eD,{setHandle:t}))}function eH(e,t,n){let r=e.state.doc.resolve(t),i=r.node(-1),s=u.get(i),o=r.start(-1),a=s.colCount(r.pos-o)+r.nodeAfter.attrs.colspan-1,l=e.state.tr;for(let e=0;e<s.height;e++){let t=e*s.width+a;if(e&&s.map[t]==s.map[t-s.width])continue;let r=s.map[t],h=i.nodeAt(r).attrs,c=1==h.colspan?0:a-s.colCount(r);if(h.colwidth&&h.colwidth[c]==n)continue;let u=h.colwidth?h.colwidth.slice():eW(h.colspan);u[c]=n,l.setNodeMarkup(o+r,null,{...h,colwidth:u})}l.docChanged&&e.dispatch(l)}function eU(e,t,n,r){let i=e.state.doc.resolve(t),s=i.node(-1),o=i.start(-1),a=u.get(s).colCount(i.pos-o)+i.nodeAfter.attrs.colspan-1,l=e.domAtPos(i.start(-1)).node;for(;l&&"TABLE"!=l.nodeName;)l=l.parentNode;l&&eI(s,l.firstChild,l,r,a,n)}function eW(e){return Array(e).fill(0)}function eV(e,t){let n=[],r=e.doc.resolve(t),i=r.node(-1);if(!i)return l.zF.empty;let s=u.get(i),o=r.start(-1),a=s.colCount(r.pos-o)+r.nodeAfter.attrs.colspan-1;for(let t=0;t<s.height;t++){let r=a+t*s.width;if((a==s.width-1||s.map[r]!=s.map[r+1])&&(0==t||s.map[r]!=s.map[r-s.width])){var h;let t=s.map[r],a=o+t+i.nodeAt(t).nodeSize-1,c=document.createElement("div");c.className="column-resize-handle",(null==(h=eD.getState(e))?void 0:h.dragging)&&n.push(l.NZ.node(o+t,o+t+i.nodeAt(t).nodeSize,{class:"column-resize-dragging"})),n.push(l.NZ.widget(a,c))}}return l.zF.create(e.doc,n)}function eG({allowTableNodeSelection:e=!1}={}){return new o.k_({key:_,state:{init:()=>null,apply(e,t){let n=e.getMeta(_);if(null!=n)return -1==n?null:n;if(null==t||!e.docChanged)return t;let{deleted:r,pos:i}=e.mapping.mapResult(t);return r?null:i}},props:{decorations:D,handleDOMEvents:{mousedown:eA},createSelectionBetween:e=>null!=_.getState(e.state)?e.state.selection:null,handleTripleClick:ex,handleKeyDown:ek,handlePaste:eS},appendTransaction:(t,n,r)=>F(r,z(r,n),e)})}function eJ(e){return"left"===e||"right"===e||"center"===e?e:null}function eK(e){let t=(e.style.textAlign||"").trim().toLowerCase(),n=(e.getAttribute("align")||"").trim().toLowerCase();return eJ(t||n)}function eZ(e){return eJ(null==e?void 0:e.align)}function eX(){return{default:null,parseHTML:e=>eK(e),renderHTML:e=>e.align?{style:`text-align: ${e.align}`}:{}}}var eQ=s.bP.create({name:"tableCell",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{var t,n;let r=e.getAttribute("colwidth"),i=r?r.split(",").map(e=>parseInt(e,10)):null;if(!i){let r=null==(t=e.closest("table"))?void 0:t.querySelectorAll("colgroup > col"),i=Array.from((null==(n=e.parentElement)?void 0:n.children)||[]).indexOf(e);if(i&&i>-1&&r&&r[i]){let e=r[i].getAttribute("width");return e?[parseInt(e,10)]:null}}return i}},align:eX()}),tableRole:"cell",isolating:!0,parseHTML:()=>[{tag:"td"}],renderHTML({HTMLAttributes:e}){return["td",(0,s.KV)(this.options.HTMLAttributes,e),0]}}),eY=s.bP.create({name:"tableHeader",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?t.split(",").map(e=>parseInt(e,10)):null}},align:eX()}),tableRole:"header_cell",isolating:!0,parseHTML:()=>[{tag:"th"}],renderHTML({HTMLAttributes:e}){return["th",(0,s.KV)(this.options.HTMLAttributes,e),0]}}),e0=s.bP.create({name:"tableRow",addOptions:()=>({HTMLAttributes:{}}),content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:()=>[{tag:"tr"}],renderHTML({HTMLAttributes:e}){return["tr",(0,s.KV)(this.options.HTMLAttributes,e),0]}});function e1(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function e2(e,t,n,r,i,s){var o;let a=0,l=!0,h=t.firstChild,c=e.firstChild;if(null!==c)for(let e=0,n=0;e<c.childCount;e+=1){let{colspan:o,colwidth:u}=c.child(e).attrs;for(let e=0;e<o;e+=1,n+=1){let o=i===n?s:u&&u[e],c=o?`${o}px`:"";if(a+=o||r,o||(l=!1),h){if(h.style.width!==c){let[e,t]=e1(r,o);h.style.setProperty(e,t)}h=h.nextSibling}else{let e=document.createElement("col"),[n,i]=e1(r,o);e.style.setProperty(n,i),t.appendChild(e)}}}for(;h;){let e=h.nextSibling;null==(o=h.parentNode)||o.removeChild(h),h=e}let u=e.attrs.style&&"string"==typeof e.attrs.style&&/\bwidth\s*:/i.test(e.attrs.style);l&&!u?(n.style.width=`${a}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${a}px`)}var e3=class{constructor(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),e.attrs.style&&(this.table.style.cssText=e.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),e2(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type===this.node.type&&(this.node=e,e2(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){let t=e.target,n=this.dom.contains(t),r=this.contentDOM.contains(t);return!!n&&!r&&("attributes"===e.type||"childList"===e.type||"characterData"===e.type)}};function e5(e,t,n,r){let i=0,s=!0,o=[],a=e.firstChild;if(!a)return{};for(let e=0,l=0;e<a.childCount;e+=1){let{colspan:h,colwidth:c}=a.child(e).attrs;for(let e=0;e<h;e+=1,l+=1){let a=n===l?r:c&&c[e];i+=a||t,a||(s=!1);let[h,u]=e1(t,a);o.push(["col",{style:`${h}: ${u}`}])}}return{colgroup:["colgroup",{},...o],tableWidth:s?`${i}px`:"",tableMinWidth:s?"":`${i}px`}}function e4(e,t){return t?e.createChecked(null,t):e.createAndFill()}function e6(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;let t={};return Object.keys(e.nodes).forEach(n=>{let r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}function e8(e,t,n,r,i){let s=e6(e),o=[],a=[];for(let e=0;e<n;e+=1){let e=e4(s.cell,i);if(e&&a.push(e),r){let e=e4(s.header_cell,i);e&&o.push(e)}}let l=[];for(let e=0;e<t;e+=1)l.push(s.row.createChecked(null,r&&0===e?o:a));return s.table.createChecked(null,l)}function e9(e){return e instanceof N}var e7=({editor:e})=>{let{selection:t}=e.state;if(!e9(t))return!1;let n=0,r=(0,s.eL)(t.ranges[0].$from,e=>"table"===e.type.name);return null==r||r.node.descendants(e=>{if("table"===e.type.name)return!1;["tableCell","tableHeader"].includes(e.type.name)&&(n+=1)}),n===t.ranges.length&&(e.commands.deleteTable(),!0)},te="\x1f";function tt(e){return(e||"").replace(/\s+/g," ").trim()}var tn=function(e,t,n={}){var r;let i=null!=(r=n.cellLineSeparator)?r:te;if(!e||!e.content||0===e.content.length)return"";let s=[];e.content.forEach(e=>{let n=[];e.content&&e.content.forEach(e=>{let r="",s=tt(r=e.content&&Array.isArray(e.content)&&e.content.length>1?e.content.map(e=>t.renderChildren(e)).join(i):e.content?t.renderChildren(e.content):""),o="tableHeader"===e.type,a=eZ(e.attrs);n.push({text:s,isHeader:o,align:a})}),s.push(n)});let o=s.reduce((e,t)=>Math.max(e,t.length),0);if(0===o)return"";let a=Array(o).fill(0);s.forEach(e=>{var t;for(let n=0;n<o;n+=1){let r=((null==(t=e[n])?void 0:t.text)||"").length;r>a[n]&&(a[n]=r),a[n]<3&&(a[n]=3)}});let l=(e,t)=>e+" ".repeat(Math.max(0,t-e.length)),h=s[0],c=h.some(e=>e.isHeader),u=Array(o).fill(null);s.forEach(e=>{var t;for(let n=0;n<o;n+=1)!u[n]&&(null==(t=e[n])?void 0:t.align)&&(u[n]=e[n].align)});let d="\n",p=Array(o).fill(0).map((e,t)=>c&&h[t]&&h[t].text||"");return d+=`| ${p.map((e,t)=>l(e,a[t])).join(" | ")} |
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2759],{5989:(e,t,n)=>{"use strict";let r,i;n.d(t,{XI:()=>tr,nA:()=>eQ,A0:()=>eY,Hj:()=>e0});var s=n(82159),o=n(76865),a=n(27050),l=n(63197),h=n(12894),c=n(8242);if("u">typeof WeakMap){let e=new WeakMap;r=t=>e.get(t),i=(t,n)=>(e.set(t,n),n)}else{let e=[],t=10,n=0;r=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},i=(r,i)=>(n==t&&(n=0),e[n++]=r,e[n++]=i)}var u=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){let n=this.map[t];if(n!=e)continue;let r=t%this.width,i=t/this.width|0,s=r+1,o=i+1;for(let e=1;s<this.width&&this.map[t+e]==n;e++)s++;for(let e=1;o<this.height&&this.map[t+this.width*e]==n;e++)o++;return{left:r,top:i,right:s,bottom:o}}throw RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){let{left:r,right:i,top:s,bottom:o}=this.findCell(e);return"horiz"==t?(n<0?0==r:i==this.width)?null:this.map[s*this.width+(n<0?r-1:i)]:(n<0?0==s:o==this.height)?null:this.map[r+this.width*(n<0?s-1:o)]}rectBetween(e,t){let{left:n,right:r,top:i,bottom:s}=this.findCell(e),{left:o,right:a,top:l,bottom:h}=this.findCell(t);return{left:Math.min(n,o),top:Math.min(i,l),right:Math.max(r,a),bottom:Math.max(s,h)}}cellsInRect(e){let t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let i=e.left;i<e.right;i++){let s=r*this.width+i,o=this.map[s];!n[o]&&(n[o]=!0,i==e.left&&i&&this.map[s-1]==o||r==e.top&&r&&this.map[s-this.width]==o||t.push(o))}return t}positionAt(e,t,n){for(let r=0,i=0;;r++){let s=i+n.child(r).nodeSize;if(r==e){let n=t+e*this.width,r=(e+1)*this.width;for(;n<r&&this.map[n]<i;)n++;return n==r?s-1:this.map[n]}i=s}}static get(e){return r(e)||i(e,d(e))}};function d(e){if("table"!=e.type.spec.tableRole)throw RangeError("Not a table node: "+e.type.name);let t=p(e),n=e.childCount,r=[],i=0,s=null,o=[];for(let e=0,i=t*n;e<i;e++)r[e]=0;for(let a=0,l=0;a<n;a++){let h=e.child(a);l++;for(let e=0;;e++){for(;i<r.length&&0!=r[i];)i++;if(e==h.childCount)break;let c=h.child(e),{colspan:u,rowspan:d,colwidth:p}=c.attrs;for(let e=0;e<d;e++){if(e+a>=n){(s||(s=[])).push({type:"overlong_rowspan",pos:l,n:d-e});break}let h=i+e*t;for(let e=0;e<u;e++){0==r[h+e]?r[h+e]=l:(s||(s=[])).push({type:"collision",row:a,pos:l,n:u-e});let n=p&&p[e];if(n){let r=(h+e)%t*2,i=o[r];null==i||i!=n&&1==o[r+1]?(o[r]=n,o[r+1]=1):i==n&&o[r+1]++}}}i+=u,l+=c.nodeSize}let c=(a+1)*t,u=0;for(;i<c;)0==r[i++]&&u++;u&&(s||(s=[])).push({type:"missing",row:a,n:u}),l++}(0===t||0===n)&&(s||(s=[])).push({type:"zero_sized"});let a=new u(t,n,r,s),l=!1;for(let e=0;!l&&e<o.length;e+=2)null!=o[e]&&o[e+1]<n&&(l=!0);return l&&f(a,o,e),a}function p(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){let i=e.child(r),s=0;if(n)for(let t=0;t<r;t++){let n=e.child(t);for(let e=0;e<n.childCount;e++){let i=n.child(e);t+i.attrs.rowspan>r&&(s+=i.attrs.colspan)}}for(let e=0;e<i.childCount;e++){let t=i.child(e);s+=t.attrs.colspan,t.attrs.rowspan>1&&(n=!0)}-1==t?t=s:t!=s&&(t=Math.max(t,s))}return t}function f(e,t,n){e.problems||(e.problems=[]);let r={};for(let i=0;i<e.map.length;i++){let s=e.map[i];if(r[s])continue;r[s]=!0;let o=n.nodeAt(s);if(!o)throw RangeError(`No cell with offset ${s} found`);let a=null,l=o.attrs;for(let n=0;n<l.colspan;n++){let r=t[(i+n)%e.width*2];null==r||l.colwidth&&l.colwidth[n]==r||((a||(a=m(l)))[n]=r)}a&&e.problems.unshift({type:"colwidth mismatch",pos:s,colwidth:a})}}function m(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function g(e){let t=e.cached.tableNodeTypes;if(!t)for(let n in t=e.cached.tableNodeTypes={},e.nodes){let r=e.nodes[n],i=r.spec.tableRole;i&&(t[i]=r)}return t}let _=new o.hs("selectingCells");function y(e){for(let t=e.depth-1;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function b(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}function k(e){let t=e.selection.$head;for(let e=t.depth;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return!0;return!1}function w(e){let t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&"cell"==t.node.type.spec.tableRole)return t.$anchor;let n=y(t.$head)||v(t.$head);if(n)return n;throw RangeError(`No cell found around position ${t.head}`)}function v(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n-t.nodeSize)}}function C(e){return"row"==e.parent.type.spec.tableRole&&!!e.nodeAfter}function x(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function S(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function A(e,t,n){let r=e.node(-1),i=u.get(r),s=e.start(-1),o=i.nextCell(e.pos-s,t,n);return null==o?null:e.node(0).resolve(s+o)}function E(e,t,n=1){let r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(e=>e>0)||(r.colwidth=null)),r}function M(e,t,n=1){let r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let e=0;e<n;e++)r.colwidth.splice(t,0,0)}return r}function T(e,t,n){let r=g(t.type.schema).header_cell;for(let i=0;i<e.height;i++)if(t.nodeAt(e.map[n+i*e.width]).type!=r)return!1;return!0}var N=class e extends o.LN{constructor(e,t=e){const n=e.node(-1),r=u.get(n),i=e.start(-1),s=r.rectBetween(e.pos-i,t.pos-i),a=e.node(0),l=r.cellsInRect(s).filter(e=>e!=t.pos-i);l.unshift(t.pos-i);const h=l.map(e=>{let t=n.nodeAt(e);if(!t)throw RangeError(`No cell with offset ${e} found`);let r=i+e+1;return new o.yn(a.resolve(r),a.resolve(r+t.content.size))});super(h[0].$from,h[0].$to,h),this.$anchorCell=e,this.$headCell=t}map(t,n){let r=t.resolve(n.map(this.$anchorCell.pos)),i=t.resolve(n.map(this.$headCell.pos));if(C(r)&&C(i)&&S(r,i)){let t=this.$anchorCell.node(-1)!=r.node(-1);return t&&this.isRowSelection()?e.rowSelection(r,i):t&&this.isColSelection()?e.colSelection(r,i):new e(r,i)}return o.U3.between(r,i)}content(){let e=this.$anchorCell.node(-1),t=u.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),i={},s=[];for(let n=r.top;n<r.bottom;n++){let o=[];for(let s=n*t.width+r.left,a=r.left;a<r.right;a++,s++){let n=t.map[s];if(i[n])continue;i[n]=!0;let a=t.findCell(n),l=e.nodeAt(n);if(!l)throw RangeError(`No cell with offset ${n} found`);let h=r.left-a.left,c=a.right-r.right;if(h>0||c>0){let e=l.attrs;if(h>0&&(e=E(e,0,h)),c>0&&(e=E(e,e.colspan-c,c)),a.left<r.left){if(!(l=l.type.createAndFill(e)))throw RangeError(`Could not create cell with attrs ${JSON.stringify(e)}`)}else l=l.type.create(e,l.content)}if(a.top<r.top||a.bottom>r.bottom){let e={...l.attrs,rowspan:Math.min(a.bottom,r.bottom)-Math.max(a.top,r.top)};l=a.top<r.top?l.type.createAndFill(e):l.type.create(e,l.content)}o.push(l)}s.push(e.child(n).copy(a.FK.from(o)))}let o=this.isColSelection()&&this.isRowSelection()?e:s;return new a.Ji(a.FK.from(o),1,1)}replace(e,t=a.Ji.empty){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:s,$to:o}=r[i],l=e.mapping.slice(n);e.replace(l.map(s.pos),l.map(o.pos),i?a.Ji.empty:t)}let i=o.LN.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,t){this.replace(e,new a.Ji(a.FK.from(t),0,0))}forEachCell(e){let t=this.$anchorCell.node(-1),n=u.get(t),r=this.$anchorCell.start(-1),i=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let n=0;n<i.length;n++)e(t.nodeAt(i[n]),r+i[n])}isColSelection(){let e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);return!(Math.min(e,t)>0)&&Math.max(e+this.$anchorCell.nodeAfter.attrs.rowspan,t+this.$headCell.nodeAfter.attrs.rowspan)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let r=t.node(-1),i=u.get(r),s=t.start(-1),o=i.findCell(t.pos-s),a=i.findCell(n.pos-s),l=t.node(0);return o.top<=a.top?(o.top>0&&(t=l.resolve(s+i.map[o.left])),a.bottom<i.height&&(n=l.resolve(s+i.map[i.width*(i.height-1)+a.right-1]))):(a.top>0&&(n=l.resolve(s+i.map[a.left])),o.bottom<i.height&&(t=l.resolve(s+i.map[i.width*(i.height-1)+o.right-1]))),new e(t,n)}isRowSelection(){let e=this.$anchorCell.node(-1),t=u.get(e),n=this.$anchorCell.start(-1),r=t.colCount(this.$anchorCell.pos-n),i=t.colCount(this.$headCell.pos-n);return!(Math.min(r,i)>0)&&Math.max(r+this.$anchorCell.nodeAfter.attrs.colspan,i+this.$headCell.nodeAfter.attrs.colspan)==t.width}eq(t){return t instanceof e&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let r=t.node(-1),i=u.get(r),s=t.start(-1),o=i.findCell(t.pos-s),a=i.findCell(n.pos-s),l=t.node(0);return o.left<=a.left?(o.left>0&&(t=l.resolve(s+i.map[o.top*i.width])),a.right<i.width&&(n=l.resolve(s+i.map[i.width*(a.top+1)-1]))):(a.left>0&&(n=l.resolve(s+i.map[a.top*i.width])),o.right<i.width&&(t=l.resolve(s+i.map[i.width*(o.top+1)-1]))),new e(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new e(t.resolve(n),t.resolve(r))}getBookmark(){return new I(this.$anchorCell.pos,this.$headCell.pos)}};N.prototype.visible=!1,o.LN.jsonID("cell",N);var I=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){let t=e.resolve(this.anchor),n=e.resolve(this.head);return"row"==t.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&S(t,n)?new N(t,n):o.LN.near(n,1)}};function D(e){if(!(e.selection instanceof N))return null;let t=[];return e.selection.forEachCell((e,n)=>{t.push(l.NZ.node(n,n+e.nodeSize,{class:"selectedCell"}))}),l.zF.create(e.doc,t)}function L({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,r=t.pos,i=e.depth;for(;i>=0&&!(e.after(i+1)<e.end(i));i--,n++);for(let e=t.depth;e>=0&&!(t.before(e+1)>t.start(e));e--,r--);return n==r&&/row|table/.test(e.node(i).type.spec.tableRole)}function R({$from:e,$to:t}){let n,r;for(let t=e.depth;t>0;t--){let r=e.node(t);if("cell"===r.type.spec.tableRole||"header_cell"===r.type.spec.tableRole){n=r;break}}for(let e=t.depth;e>0;e--){let n=t.node(e);if("cell"===n.type.spec.tableRole||"header_cell"===n.type.spec.tableRole){r=n;break}}return n!==r&&0===t.parentOffset}function F(e,t,n){let r,i,s=(t||e).selection,a=(t||e).doc;if(s instanceof o.nh&&(i=s.node.type.spec.tableRole)){if("cell"==i||"header_cell"==i)r=N.create(a,s.from);else if("row"==i){let e=a.resolve(s.from+1);r=N.rowSelection(e,e)}else if(!n){let e=u.get(s.node),t=s.from+1,n=t+e.map[e.width*e.height-1];r=N.create(a,t+1,n)}}else s instanceof o.U3&&L(s)?r=o.U3.create(a,s.from):s instanceof o.U3&&R(s)&&(r=o.U3.create(a,s.$from.start(),s.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}let P=new o.hs("fix-tables");function O(e,t,n,r){let i=e.childCount,s=t.childCount;e:for(let o=0,a=0;o<s;o++){let s=t.child(o);for(let t=a,r=Math.min(i,o+3);t<r;t++)if(e.child(t)==s){a=t+1,n+=s.nodeSize;continue e}r(s,n),a<i&&e.child(a).sameMarkup(s)?O(e.child(a),s,n+1,r):s.nodesBetween(0,s.content.size,r,n+1),n+=s.nodeSize}}function z(e,t){let n,r=(t,r)=>{"table"==t.type.spec.tableRole&&(n=B(e,t,r,n))};return t?t.doc!=e.doc&&O(t.doc,e.doc,0,r):e.doc.descendants(r),n}function B(e,t,n,r){let i,s,o=u.get(t);if(!o.problems)return r;r||(r=e.tr);let a=[];for(let e=0;e<o.height;e++)a.push(0);for(let e=0;e<o.problems.length;e++){let i=o.problems[e];if("collision"==i.type){let e=t.nodeAt(i.pos);if(!e)continue;let s=e.attrs;for(let e=0;e<s.rowspan;e++)a[i.row+e]+=i.n;r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,E(s,s.colspan-i.n,i.n))}else if("missing"==i.type)a[i.row]+=i.n;else if("overlong_rowspan"==i.type){let e=t.nodeAt(i.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,{...e.attrs,rowspan:e.attrs.rowspan-i.n})}else if("colwidth mismatch"==i.type){let e=t.nodeAt(i.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,{...e.attrs,colwidth:i.colwidth})}else if("zero_sized"==i.type){let e=r.mapping.map(n);r.delete(e,e+t.nodeSize)}}for(let e=0;e<a.length;e++)a[e]&&(null==i&&(i=e),s=e);for(let l=0,h=n+1;l<o.height;l++){let n=t.child(l),o=h+n.nodeSize,c=a[l];if(c>0){let t="cell";n.firstChild&&(t=n.firstChild.type.spec.tableRole);let a=[];for(let n=0;n<c;n++){let n=g(e.schema)[t].createAndFill();n&&a.push(n)}let u=(0==l||i==l-1)&&s==l?h+1:o-1;r.insert(r.mapping.map(u),a)}h=o}return r.setMeta(P,{fixTables:!0})}function $(e){let t=e.selection,n=w(e),r=n.node(-1),i=n.start(-1),s=u.get(r);return{...t instanceof N?s.rectBetween(t.$anchorCell.pos-i,t.$headCell.pos-i):s.findCell(n.pos-i),tableStart:i,map:s,table:r}}function j(e,{map:t,tableStart:n,table:r},i){let s=i>0?-1:0;T(t,r,i+s)&&(s=0==i||i==t.width?null:0);for(let o=0;o<t.height;o++){let a=o*t.width+i;if(i>0&&i<t.width&&t.map[a-1]==t.map[a]){let s=t.map[a],l=r.nodeAt(s);e.setNodeMarkup(e.mapping.map(n+s),null,M(l.attrs,i-t.colCount(s))),o+=l.attrs.rowspan-1}else{let l=null==s?g(r.type.schema).cell:r.nodeAt(t.map[a+s]).type,h=t.positionAt(o,i,r);e.insert(e.mapping.map(n+h),l.createAndFill())}}return e}function q(e,t){if(!k(e))return!1;if(t){let n=$(e);t(j(e.tr,n,n.left))}return!0}function H(e,t){if(!k(e))return!1;if(t){let n=$(e);t(j(e.tr,n,n.right))}return!0}function U(e,{map:t,table:n,tableStart:r},i){let s=e.mapping.maps.length;for(let o=0;o<t.height;){let a=o*t.width+i,l=t.map[a],h=n.nodeAt(l),c=h.attrs;if(i>0&&t.map[a-1]==l||i<t.width-1&&t.map[a+1]==l)e.setNodeMarkup(e.mapping.slice(s).map(r+l),null,E(c,i-t.colCount(l)));else{let t=e.mapping.slice(s).map(r+l);e.delete(t,t+h.nodeSize)}o+=c.rowspan}}function W(e,t){if(!k(e))return!1;if(t){let n=$(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(let e=n.right-1;U(r,n,e),e!=n.left;e--){let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=u.get(e)}t(r)}return!0}function V(e,t,n){var r;let i=g(t.type.schema).header_cell;for(let s=0;s<e.width;s++)if((null==(r=t.nodeAt(e.map[s+n*e.width]))?void 0:r.type)!=i)return!1;return!0}function G(e,{map:t,tableStart:n,table:r},i){let s=n;for(let e=0;e<i;e++)s+=r.child(e).nodeSize;let o=[],a=i>0?-1:0;V(t,r,i+a)&&(a=0==i||i==t.height?null:0);for(let s=0,h=t.width*i;s<t.width;s++,h++)if(i>0&&i<t.height&&t.map[h]==t.map[h-t.width]){let i=t.map[h],o=r.nodeAt(i).attrs;e.setNodeMarkup(n+i,null,{...o,rowspan:o.rowspan+1}),s+=o.colspan-1}else{var l;let e=null==a?g(r.type.schema).cell:null==(l=r.nodeAt(t.map[h+a*t.width]))?void 0:l.type,n=null==e?void 0:e.createAndFill();n&&o.push(n)}return e.insert(s,g(r.type.schema).row.create(null,o)),e}function J(e,t){if(!k(e))return!1;if(t){let n=$(e);t(G(e.tr,n,n.top))}return!0}function K(e,t){if(!k(e))return!1;if(t){let n=$(e);t(G(e.tr,n,n.bottom))}return!0}function Z(e,{map:t,table:n,tableStart:r},i){let s=0;for(let e=0;e<i;e++)s+=n.child(e).nodeSize;let o=s+n.child(i).nodeSize,a=e.mapping.maps.length;e.delete(s+r,o+r);let l=new Set;for(let s=0,o=i*t.width;s<t.width;s++,o++){let h=t.map[o];if(!l.has(h)){if(l.add(h),i>0&&h==t.map[o-t.width]){let t=n.nodeAt(h).attrs;e.setNodeMarkup(e.mapping.slice(a).map(h+r),null,{...t,rowspan:t.rowspan-1}),s+=t.colspan-1}else if(i<t.height&&h==t.map[o+t.width]){let o=n.nodeAt(h),l=o.attrs,c=o.type.create({...l,rowspan:o.attrs.rowspan-1},o.content),u=t.positionAt(i+1,s,n);e.insert(e.mapping.slice(a).map(r+u),c),s+=l.colspan-1}}}}function X(e,t){if(!k(e))return!1;if(t){let n=$(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(let e=n.bottom-1;Z(r,n,e),e!=n.top;e--){let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=u.get(n.table)}t(r)}return!0}function Q(e){let t=e.content;return 1==t.childCount&&t.child(0).isTextblock&&0==t.child(0).childCount}function Y({width:e,height:t,map:n},r){let i=r.top*e+r.left,s=i,o=(r.bottom-1)*e+r.left,a=i+(r.right-r.left-1);for(let t=r.top;t<r.bottom;t++){if(r.left>0&&n[s]==n[s-1]||r.right<e&&n[a]==n[a+1])return!0;s+=e,a+=e}for(let s=r.left;s<r.right;s++){if(r.top>0&&n[i]==n[i-e]||r.bottom<t&&n[o]==n[o+e])return!0;i++,o++}return!1}function ee(e,t){let n=e.selection;if(!(n instanceof N)||n.$anchorCell.pos==n.$headCell.pos)return!1;let r=$(e),{map:i}=r;if(Y(i,r))return!1;if(t){let n,s,o=e.tr,l={},h=a.FK.empty;for(let e=r.top;e<r.bottom;e++)for(let t=r.left;t<r.right;t++){let a=i.map[e*i.width+t],c=r.table.nodeAt(a);if(!l[a]&&c)if(l[a]=!0,null==n)n=a,s=c;else{Q(c)||(h=h.append(c.content));let e=o.mapping.map(a+r.tableStart);o.delete(e,e+c.nodeSize)}}if(null==n||null==s)return!0;if(o.setNodeMarkup(n+r.tableStart,null,{...M(s.attrs,s.attrs.colspan,r.right-r.left-s.attrs.colspan),rowspan:r.bottom-r.top}),h.size>0){let e=n+1+s.content.size,t=Q(s)?n+1:e;o.replaceWith(t+r.tableStart,e+r.tableStart,h)}o.setSelection(new N(o.doc.resolve(n+r.tableStart))),t(o)}return!0}function et(e,t){let n=g(e.schema);return en(({node:e})=>n[e.type.spec.tableRole])(e,t)}function en(e){return(t,n)=>{let r,i,s=t.selection;if(s instanceof N){if(s.$anchorCell.pos!=s.$headCell.pos)return!1;r=s.$anchorCell.nodeAfter,i=s.$anchorCell.pos}else{var o;if(!(r=b(s.$from)))return!1;i=null==(o=y(s.$from))?void 0:o.pos}if(null==r||null==i||1==r.attrs.colspan&&1==r.attrs.rowspan)return!1;if(n){let o,a=r.attrs,l=[],h=a.colwidth;a.rowspan>1&&(a={...a,rowspan:1}),a.colspan>1&&(a={...a,colspan:1});let c=$(t),u=t.tr;for(let e=0;e<c.right-c.left;e++)l.push(h?{...a,colwidth:h&&h[e]?[h[e]]:null}:a);for(let t=c.top;t<c.bottom;t++){let n=c.map.positionAt(t,c.left,c.table);t==c.top&&(n+=r.nodeSize);for(let i=c.left,s=0;i<c.right;i++,s++)(i!=c.left||t!=c.top)&&u.insert(o=u.mapping.map(n+c.tableStart,1),e({node:r,row:t,col:i}).createAndFill(l[s]))}u.setNodeMarkup(i,e({node:r,row:c.top,col:c.left}),l[0]),s instanceof N&&u.setSelection(new N(u.doc.resolve(s.$anchorCell.pos),o?u.doc.resolve(o):void 0)),n(u)}return!0}}function er(e,t){return function(n,r){if(!k(n))return!1;let i=w(n);if(i.nodeAfter.attrs[e]===t)return!1;if(r){let s=n.tr;n.selection instanceof N?n.selection.forEachCell((n,r)=>{n.attrs[e]!==t&&s.setNodeMarkup(r,null,{...n.attrs,[e]:t})}):s.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[e]:t}),r(s)}return!0}}function ei(e){return function(t,n){if(!k(t))return!1;if(n){let r=g(t.schema),i=$(t),s=t.tr,o=i.map.cellsInRect("column"==e?{left:i.left,top:0,right:i.right,bottom:i.map.height}:"row"==e?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),a=o.map(e=>i.table.nodeAt(e));for(let e=0;e<o.length;e++)a[e].type==r.header_cell&&s.setNodeMarkup(i.tableStart+o[e],r.cell,a[e].attrs);if(0===s.steps.length)for(let e=0;e<o.length;e++)s.setNodeMarkup(i.tableStart+o[e],r.header_cell,a[e].attrs);n(s)}return!0}}function es(e,t,n){let r=t.map.cellsInRect({left:0,top:0,right:"row"==e?t.map.width:1,bottom:"column"==e?t.map.height:1});for(let e=0;e<r.length;e++){let i=t.table.nodeAt(r[e]);if(i&&i.type!==n.header_cell)return!1}return!0}function eo(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?ei(e):function(t,n){if(!k(t))return!1;if(n){let r=g(t.schema),i=$(t),s=t.tr,o=es("row",i,r),a=es("column",i,r),l=+("column"===e?!!o:"row"===e&&!!a),h="column"==e?{left:0,top:l,right:1,bottom:i.map.height}:"row"==e?{left:l,top:0,right:i.map.width,bottom:1}:i,c="column"==e?a?r.cell:r.header_cell:"row"==e?o?r.cell:r.header_cell:r.cell;i.map.cellsInRect(h).forEach(e=>{let t=e+i.tableStart,n=s.doc.nodeAt(t);n&&s.setNodeMarkup(t,c,n.attrs)}),n(s)}return!0}}eo("row",{useDeprecatedLogic:!0}),eo("column",{useDeprecatedLogic:!0});let ea=eo("cell",{useDeprecatedLogic:!0});function el(e,t){if(t<0){let t=e.nodeBefore;if(t)return e.pos-t.nodeSize;for(let t=e.index(-1)-1,n=e.before();t>=0;t--){let r=e.node(-1).child(t),i=r.lastChild;if(i)return n-1-i.nodeSize;n-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;let t=e.node(-1);for(let n=e.indexAfter(-1),r=e.after();n<t.childCount;n++){let e=t.child(n);if(e.childCount)return r+1;r+=e.nodeSize}}return null}function eh(e){return function(t,n){if(!k(t))return!1;let r=el(w(t),e);if(null==r)return!1;if(n){let e=t.doc.resolve(r);n(t.tr.setSelection(o.U3.between(e,x(e))).scrollIntoView())}return!0}}function ec(e,t){let n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if("table"==n.node(r).type.spec.tableRole)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function eu(e,t){let n=e.selection;if(!(n instanceof N))return!1;if(t){let r=e.tr,i=g(e.schema).cell.createAndFill().content;n.forEachCell((e,t)=>{e.content.eq(i)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new a.Ji(i,0,0))}),r.docChanged&&t(r)}return!0}function ed(e){if(0===e.size)return null;let{content:t,openStart:n,openEnd:r}=e;for(;1==t.childCount&&(n>0&&r>0||"table"==t.child(0).type.spec.tableRole);)n--,r--,t=t.child(0).content;let i=t.child(0),s=i.type.spec.tableRole,o=i.type.schema,l=[];if("row"==s)for(let e=0;e<t.childCount;e++){let i=t.child(e).content,s=e?0:Math.max(0,n-1),h=e<t.childCount-1?0:Math.max(0,r-1);(s||h)&&(i=ef(g(o).row,new a.Ji(i,s,h)).content),l.push(i)}else{if("cell"!=s&&"header_cell"!=s)return null;l.push(n||r?ef(g(o).row,new a.Ji(t,n,r)).content:t)}return ep(o,l)}function ep(e,t){let n=[];for(let e=0;e<t.length;e++){let r=t[e];for(let t=r.childCount-1;t>=0;t--){let{rowspan:i,colspan:s}=r.child(t).attrs;for(let t=e;t<e+i;t++)n[t]=(n[t]||0)+s}}let r=0;for(let e=0;e<n.length;e++)r=Math.max(r,n[e]);for(let i=0;i<n.length;i++)if(i>=t.length&&t.push(a.FK.empty),n[i]<r){let s=g(e).cell.createAndFill(),o=[];for(let e=n[i];e<r;e++)o.push(s);t[i]=t[i].append(a.FK.from(o))}return{height:t.length,width:r,rows:t}}function ef(e,t){let n=e.createAndFill();return new c.dL(n).replace(0,n.content.size,t).doc}function em({width:e,height:t,rows:n},r,i){if(e!=r){let t=[],i=[];for(let e=0;e<n.length;e++){let s=n[e],o=[];for(let n=t[e]||0,i=0;n<r;i++){let a=s.child(i%s.childCount);n+a.attrs.colspan>r&&(a=a.type.createChecked(E(a.attrs,a.attrs.colspan,n+a.attrs.colspan-r),a.content)),o.push(a),n+=a.attrs.colspan;for(let n=1;n<a.attrs.rowspan;n++)t[e+n]=(t[e+n]||0)+a.attrs.colspan}i.push(a.FK.from(o))}n=i,e=r}if(t!=i){let e=[];for(let r=0,s=0;r<i;r++,s++){let o=[],l=n[s%t];for(let e=0;e<l.childCount;e++){let t=l.child(e);r+t.attrs.rowspan>i&&(t=t.type.create({...t.attrs,rowspan:Math.max(1,i-t.attrs.rowspan)},t.content)),o.push(t)}e.push(a.FK.from(o))}n=e,t=i}return{width:e,height:t,rows:n}}function eg(e,t,n,r,i,s,o){let l,h,c=g(e.doc.type.schema);if(i>t.width)for(let s=0,a=0;s<t.height;s++){let u,d=n.child(s);a+=d.nodeSize;let p=[];u=null==d.lastChild||d.lastChild.type==c.cell?l||(l=c.cell.createAndFill()):h||(h=c.header_cell.createAndFill());for(let e=t.width;e<i;e++)p.push(u);e.insert(e.mapping.slice(o).map(a-1+r),p)}if(s>t.height){let u=[];for(let e=0,r=(t.height-1)*t.width;e<Math.max(t.width,i);e++){let i=!(e>=t.width)&&n.nodeAt(t.map[r+e]).type==c.header_cell;u.push(i?h||(h=c.header_cell.createAndFill()):l||(l=c.cell.createAndFill()))}let d=c.row.create(null,a.FK.from(u)),p=[];for(let e=t.height;e<s;e++)p.push(d);e.insert(e.mapping.slice(o).map(r+n.nodeSize-2),p)}return!!(l||h)}function e_(e,t,n,r,i,s,o,a){if(0==o||o==t.height)return!1;let l=!1;for(let h=i;h<s;h++){let i=o*t.width+h,s=t.map[i];if(t.map[i-t.width]==s){l=!0;let i=n.nodeAt(s),{top:c,left:u}=t.findCell(s);e.setNodeMarkup(e.mapping.slice(a).map(s+r),null,{...i.attrs,rowspan:o-c}),e.insert(e.mapping.slice(a).map(t.positionAt(o,u,n)),i.type.createAndFill({...i.attrs,rowspan:c+i.attrs.rowspan-o})),h+=i.attrs.colspan-1}}return l}function ey(e,t,n,r,i,s,o,a){if(0==o||o==t.width)return!1;let l=!1;for(let h=i;h<s;h++){let i=h*t.width+o,s=t.map[i];if(t.map[i-1]==s){l=!0;let i=n.nodeAt(s),c=t.colCount(s),u=e.mapping.slice(a).map(s+r);e.setNodeMarkup(u,null,E(i.attrs,o-c,i.attrs.colspan-(o-c))),e.insert(u+i.nodeSize,i.type.createAndFill(E(i.attrs,0,o-c))),h+=i.attrs.rowspan-1}}return l}function eb(e,t,n,r,i){let s=n?e.doc.nodeAt(n-1):e.doc;if(!s)throw Error("No table found");let o=u.get(s),{top:l,left:h}=r,c=h+i.width,d=l+i.height,p=e.tr,f=0;function m(){if(!(s=n?p.doc.nodeAt(n-1):p.doc))throw Error("No table found");o=u.get(s),f=p.mapping.maps.length}eg(p,o,s,n,c,d,0)&&m(),e_(p,o,s,n,h,c,l,f)&&m(),e_(p,o,s,n,h,c,d,f)&&m(),ey(p,o,s,n,l,d,h,f)&&m(),ey(p,o,s,n,l,d,c,f)&&m();for(let e=l;e<d;e++){let t=o.positionAt(e,h,s),r=o.positionAt(e,c,s);p.replace(p.mapping.slice(f).map(t+n),p.mapping.slice(f).map(r+n),new a.Ji(i.rows[e-l],0,0))}m(),p.setSelection(new N(p.doc.resolve(n+o.positionAt(l,h,s)),p.doc.resolve(n+o.positionAt(d-1,c-1,s)))),t(p)}let ek=(0,h.K)({ArrowLeft:ev("horiz",-1),ArrowRight:ev("horiz",1),ArrowUp:ev("vert",-1),ArrowDown:ev("vert",1),"Shift-ArrowLeft":eC("horiz",-1),"Shift-ArrowRight":eC("horiz",1),"Shift-ArrowUp":eC("vert",-1),"Shift-ArrowDown":eC("vert",1),Backspace:eu,"Mod-Backspace":eu,Delete:eu,"Mod-Delete":eu});function ew(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function ev(e,t){return(n,r,i)=>{if(!i)return!1;let s=n.selection;if(s instanceof N)return ew(n,r,o.LN.near(s.$headCell,t));if("horiz"!=e&&!s.empty)return!1;let a=eE(i,e,t);if(null==a)return!1;if("horiz"==e)return ew(n,r,o.LN.near(n.doc.resolve(s.head+t),t));{let i,s=n.doc.resolve(a),l=A(s,e,t);return i=l?o.LN.near(l,1):t<0?o.LN.near(n.doc.resolve(s.before(-1)),-1):o.LN.near(n.doc.resolve(s.after(-1)),1),ew(n,r,i)}}}function eC(e,t){return(n,r,i)=>{let s;if(!i)return!1;let o=n.selection;if(o instanceof N)s=o;else{let r=eE(i,e,t);if(null==r)return!1;s=new N(n.doc.resolve(r))}let a=A(s.$headCell,e,t);return!!a&&ew(n,r,new N(s.$anchorCell,a))}}function ex(e,t){let n=y(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new N(n))),!0)}function eS(e,t,n){if(!k(e.state))return!1;let r=ed(n),i=e.state.selection;if(i instanceof N){r||(r={width:1,height:1,rows:[a.FK.from(ef(g(e.state.schema).cell,n))]});let t=i.$anchorCell.node(-1),s=i.$anchorCell.start(-1),o=u.get(t).rectBetween(i.$anchorCell.pos-s,i.$headCell.pos-s);return r=em(r,o.right-o.left,o.bottom-o.top),eb(e.state,e.dispatch,s,o,r),!0}if(!r)return!1;{let t=w(e.state),n=t.start(-1);return eb(e.state,e.dispatch,n,u.get(t.node(-1)).findCell(t.pos-n),r),!0}}function eA(e,t){var n;let r;if(0!=t.button||t.ctrlKey||t.metaKey)return;let i=eM(e,t.target);if(t.shiftKey&&e.state.selection instanceof N)s(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&i&&null!=(r=y(e.state.selection.$anchor))&&(null==(n=eT(e,t))?void 0:n.pos)!=r.pos)s(r,t),t.preventDefault();else if(!i)return;function s(t,n){let r=eT(e,n),i=null==_.getState(e.state);if(!r||!S(t,r))if(!i)return;else r=t;let s=new N(t,r);if(i||!e.state.selection.eq(s)){let n=e.state.tr.setSelection(s);i&&n.setMeta(_,t.pos),e.dispatch(n)}}function o(){e.root.removeEventListener("mouseup",o),e.root.removeEventListener("dragstart",o),e.root.removeEventListener("mousemove",a),null!=_.getState(e.state)&&e.dispatch(e.state.tr.setMeta(_,-1))}function a(n){let r,a=n,l=_.getState(e.state);if(null!=l)r=e.state.doc.resolve(l);else if(eM(e,a.target)!=i&&!(r=eT(e,t)))return o();r&&s(r,a)}e.root.addEventListener("mouseup",o),e.root.addEventListener("dragstart",o),e.root.addEventListener("mousemove",a)}function eE(e,t,n){if(!(e.state.selection instanceof o.U3))return null;let{$head:r}=e.state.selection;for(let i=r.depth-1;i>=0;i--){let s=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:s.childCount))break;if("cell"==s.type.spec.tableRole||"header_cell"==s.type.spec.tableRole){let s=r.before(i),o="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(o)?s:null}}return null}function eM(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t;return null}function eT(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let{inside:r,pos:i}=n;return r>=0&&y(e.state.doc.resolve(r))||y(e.state.doc.resolve(i))}var eN=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),eI(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type==this.node.type&&(this.node=e,eI(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))}};function eI(e,t,n,r,i,s){let o=0,a=!0,l=t.firstChild,h=e.firstChild;if(h){for(let e=0,n=0;e<h.childCount;e++){let{colspan:c,colwidth:u}=h.child(e).attrs;for(let e=0;e<c;e++,n++){let h=i==n?s:u&&u[e],c=h?h+"px":"";if(o+=h||r,h||(a=!1),l)l.style.width!=c&&(l.style.width=c),l=l.nextSibling;else{let e=document.createElement("col");e.style.width=c,t.appendChild(e)}}}for(;l;){var c;let e=l.nextSibling;null==(c=l.parentNode)||c.removeChild(l),l=e}a?(n.style.width=o+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=o+"px")}}let eD=new o.hs("tableColumnResizing");function eL({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:r=eN,lastColumnResizable:i=!0}={}){let s=new o.k_({key:eD,state:{init(e,t){var i;let o=null==(i=s.spec)||null==(i=i.props)?void 0:i.nodeViews,a=g(t.schema).table.name;return r&&o&&(o[a]=(e,t)=>new r(e,n,t)),new eR(-1,!1)},apply:(e,t)=>t.apply(e)},props:{attributes:e=>{let t=eD.getState(e);return t&&t.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(t,n)=>{eF(t,n,e,i)},mouseleave:e=>{eP(e)},mousedown:(e,r)=>{eO(e,r,t,n)}},decorations:e=>{let t=eD.getState(e);if(t&&t.activeHandle>-1)return eV(e,t.activeHandle)},nodeViews:{}}});return s}var eR=class e{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(t){let n=this,r=t.getMeta(eD);if(r&&null!=r.setHandle)return new e(r.setHandle,!1);if(r&&void 0!==r.setDragging)return new e(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let r=t.mapping.map(n.activeHandle,-1);return C(t.doc.resolve(r))||(r=-1),new e(r,n.dragging)}return n}};function eF(e,t,n,r){if(!e.editable)return;let i=eD.getState(e.state);if(i&&!i.dragging){let s=eB(t.target),o=-1;if(s){let{left:r,right:i}=s.getBoundingClientRect();t.clientX-r<=n?o=e$(e,t,"left",n):i-t.clientX<=n&&(o=e$(e,t,"right",n))}if(o!=i.activeHandle){if(!r&&-1!==o){let t=e.state.doc.resolve(o),n=t.node(-1),r=u.get(n),i=t.start(-1);if(r.colCount(t.pos-i)+t.nodeAfter.attrs.colspan-1==r.width-1)return}eq(e,o)}}}function eP(e){if(!e.editable)return;let t=eD.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&eq(e,-1)}function eO(e,t,n,r){var i;if(!e.editable)return!1;let s=null!=(i=e.dom.ownerDocument.defaultView)?i:window,o=eD.getState(e.state);if(!o||-1==o.activeHandle||o.dragging)return!1;let a=e.state.doc.nodeAt(o.activeHandle),l=ez(e,o.activeHandle,a.attrs);function h(t){s.removeEventListener("mouseup",h),s.removeEventListener("mousemove",c);let r=eD.getState(e.state);(null==r?void 0:r.dragging)&&(eH(e,r.activeHandle,ej(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(eD,{setDragging:null})))}function c(t){if(!t.which)return h(t);let i=eD.getState(e.state);if(i&&i.dragging){let s=ej(i.dragging,t,n);eU(e,i.activeHandle,s,r)}}return e.dispatch(e.state.tr.setMeta(eD,{setDragging:{startX:t.clientX,startWidth:l}})),eU(e,o.activeHandle,l,r),s.addEventListener("mouseup",h),s.addEventListener("mousemove",c),t.preventDefault(),!0}function ez(e,t,{colspan:n,colwidth:r}){let i=r&&r[r.length-1];if(i)return i;let s=e.domAtPos(t),o=s.node.childNodes[s.offset].offsetWidth,a=n;if(r)for(let e=0;e<n;e++)r[e]&&(o-=r[e],a--);return o/a}function eB(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function e$(e,t,n,r){let i="right"==n?-r:r,s=e.posAtCoords({left:t.clientX+i,top:t.clientY});if(!s)return -1;let{pos:o}=s,a=y(e.state.doc.resolve(o));if(!a)return -1;if("right"==n)return a.pos;let l=u.get(a.node(-1)),h=a.start(-1),c=l.map.indexOf(a.pos-h);return c%l.width==0?-1:h+l.map[c-1]}function ej(e,t,n){let r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function eq(e,t){e.dispatch(e.state.tr.setMeta(eD,{setHandle:t}))}function eH(e,t,n){let r=e.state.doc.resolve(t),i=r.node(-1),s=u.get(i),o=r.start(-1),a=s.colCount(r.pos-o)+r.nodeAfter.attrs.colspan-1,l=e.state.tr;for(let e=0;e<s.height;e++){let t=e*s.width+a;if(e&&s.map[t]==s.map[t-s.width])continue;let r=s.map[t],h=i.nodeAt(r).attrs,c=1==h.colspan?0:a-s.colCount(r);if(h.colwidth&&h.colwidth[c]==n)continue;let u=h.colwidth?h.colwidth.slice():eW(h.colspan);u[c]=n,l.setNodeMarkup(o+r,null,{...h,colwidth:u})}l.docChanged&&e.dispatch(l)}function eU(e,t,n,r){let i=e.state.doc.resolve(t),s=i.node(-1),o=i.start(-1),a=u.get(s).colCount(i.pos-o)+i.nodeAfter.attrs.colspan-1,l=e.domAtPos(i.start(-1)).node;for(;l&&"TABLE"!=l.nodeName;)l=l.parentNode;l&&eI(s,l.firstChild,l,r,a,n)}function eW(e){return Array(e).fill(0)}function eV(e,t){let n=[],r=e.doc.resolve(t),i=r.node(-1);if(!i)return l.zF.empty;let s=u.get(i),o=r.start(-1),a=s.colCount(r.pos-o)+r.nodeAfter.attrs.colspan-1;for(let t=0;t<s.height;t++){let r=a+t*s.width;if((a==s.width-1||s.map[r]!=s.map[r+1])&&(0==t||s.map[r]!=s.map[r-s.width])){var h;let t=s.map[r],a=o+t+i.nodeAt(t).nodeSize-1,c=document.createElement("div");c.className="column-resize-handle",(null==(h=eD.getState(e))?void 0:h.dragging)&&n.push(l.NZ.node(o+t,o+t+i.nodeAt(t).nodeSize,{class:"column-resize-dragging"})),n.push(l.NZ.widget(a,c))}}return l.zF.create(e.doc,n)}function eG({allowTableNodeSelection:e=!1}={}){return new o.k_({key:_,state:{init:()=>null,apply(e,t){let n=e.getMeta(_);if(null!=n)return -1==n?null:n;if(null==t||!e.docChanged)return t;let{deleted:r,pos:i}=e.mapping.mapResult(t);return r?null:i}},props:{decorations:D,handleDOMEvents:{mousedown:eA},createSelectionBetween:e=>null!=_.getState(e.state)?e.state.selection:null,handleTripleClick:ex,handleKeyDown:ek,handlePaste:eS},appendTransaction:(t,n,r)=>F(r,z(r,n),e)})}function eJ(e){return"left"===e||"right"===e||"center"===e?e:null}function eK(e){let t=(e.style.textAlign||"").trim().toLowerCase(),n=(e.getAttribute("align")||"").trim().toLowerCase();return eJ(t||n)}function eZ(e){return eJ(null==e?void 0:e.align)}function eX(){return{default:null,parseHTML:e=>eK(e),renderHTML:e=>e.align?{style:`text-align: ${e.align}`}:{}}}var eQ=s.bP.create({name:"tableCell",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{var t,n;let r=e.getAttribute("colwidth"),i=r?r.split(",").map(e=>parseInt(e,10)):null;if(!i){let r=null==(t=e.closest("table"))?void 0:t.querySelectorAll("colgroup > col"),i=Array.from((null==(n=e.parentElement)?void 0:n.children)||[]).indexOf(e);if(i&&i>-1&&r&&r[i]){let e=r[i].getAttribute("width");return e?[parseInt(e,10)]:null}}return i}},align:eX()}),tableRole:"cell",isolating:!0,parseHTML:()=>[{tag:"td"}],renderHTML({HTMLAttributes:e}){return["td",(0,s.KV)(this.options.HTMLAttributes,e),0]}}),eY=s.bP.create({name:"tableHeader",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?t.split(",").map(e=>parseInt(e,10)):null}},align:eX()}),tableRole:"header_cell",isolating:!0,parseHTML:()=>[{tag:"th"}],renderHTML({HTMLAttributes:e}){return["th",(0,s.KV)(this.options.HTMLAttributes,e),0]}}),e0=s.bP.create({name:"tableRow",addOptions:()=>({HTMLAttributes:{}}),content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:()=>[{tag:"tr"}],renderHTML({HTMLAttributes:e}){return["tr",(0,s.KV)(this.options.HTMLAttributes,e),0]}});function e1(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function e2(e,t,n,r,i,s){var o;let a=0,l=!0,h=t.firstChild,c=e.firstChild;if(null!==c)for(let e=0,n=0;e<c.childCount;e+=1){let{colspan:o,colwidth:u}=c.child(e).attrs;for(let e=0;e<o;e+=1,n+=1){let o=i===n?s:u&&u[e],c=o?`${o}px`:"";if(a+=o||r,o||(l=!1),h){if(h.style.width!==c){let[e,t]=e1(r,o);h.style.setProperty(e,t)}h=h.nextSibling}else{let e=document.createElement("col"),[n,i]=e1(r,o);e.style.setProperty(n,i),t.appendChild(e)}}}for(;h;){let e=h.nextSibling;null==(o=h.parentNode)||o.removeChild(h),h=e}let u=e.attrs.style&&"string"==typeof e.attrs.style&&/\bwidth\s*:/i.test(e.attrs.style);l&&!u?(n.style.width=`${a}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${a}px`)}var e3=class{constructor(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),e.attrs.style&&(this.table.style.cssText=e.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),e2(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type===this.node.type&&(this.node=e,e2(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){let t=e.target,n=this.dom.contains(t),r=this.contentDOM.contains(t);return!!n&&!r&&("attributes"===e.type||"childList"===e.type||"characterData"===e.type)}};function e5(e,t,n,r){let i=0,s=!0,o=[],a=e.firstChild;if(!a)return{};for(let e=0,l=0;e<a.childCount;e+=1){let{colspan:h,colwidth:c}=a.child(e).attrs;for(let e=0;e<h;e+=1,l+=1){let a=n===l?r:c&&c[e];i+=a||t,a||(s=!1);let[h,u]=e1(t,a);o.push(["col",{style:`${h}: ${u}`}])}}return{colgroup:["colgroup",{},...o],tableWidth:s?`${i}px`:"",tableMinWidth:s?"":`${i}px`}}function e4(e,t){return t?e.createChecked(null,t):e.createAndFill()}function e6(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;let t={};return Object.keys(e.nodes).forEach(n=>{let r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}function e8(e,t,n,r,i){let s=e6(e),o=[],a=[];for(let e=0;e<n;e+=1){let e=e4(s.cell,i);if(e&&a.push(e),r){let e=e4(s.header_cell,i);e&&o.push(e)}}let l=[];for(let e=0;e<t;e+=1)l.push(s.row.createChecked(null,r&&0===e?o:a));return s.table.createChecked(null,l)}function e9(e){return e instanceof N}var e7=({editor:e})=>{let{selection:t}=e.state;if(!e9(t))return!1;let n=0,r=(0,s.eL)(t.ranges[0].$from,e=>"table"===e.type.name);return null==r||r.node.descendants(e=>{if("table"===e.type.name)return!1;["tableCell","tableHeader"].includes(e.type.name)&&(n+=1)}),n===t.ranges.length&&(e.commands.deleteTable(),!0)},te="\x1f";function tt(e){return(e||"").replace(/\s+/g," ").trim()}var tn=function(e,t,n={}){var r;let i=null!=(r=n.cellLineSeparator)?r:te;if(!e||!e.content||0===e.content.length)return"";let s=[];e.content.forEach(e=>{let n=[];e.content&&e.content.forEach(e=>{let r="",s=tt(r=e.content&&Array.isArray(e.content)&&e.content.length>1?e.content.map(e=>t.renderChildren(e)).join(i):e.content?t.renderChildren(e.content):""),o="tableHeader"===e.type,a=eZ(e.attrs);n.push({text:s,isHeader:o,align:a})}),s.push(n)});let o=s.reduce((e,t)=>Math.max(e,t.length),0);if(0===o)return"";let a=Array(o).fill(0);s.forEach(e=>{var t;for(let n=0;n<o;n+=1){let r=((null==(t=e[n])?void 0:t.text)||"").length;r>a[n]&&(a[n]=r),a[n]<3&&(a[n]=3)}});let l=(e,t)=>e+" ".repeat(Math.max(0,t-e.length)),h=s[0],c=h.some(e=>e.isHeader),u=Array(o).fill(null);s.forEach(e=>{var t;for(let n=0;n<o;n+=1)!u[n]&&(null==(t=e[n])?void 0:t.align)&&(u[n]=e[n].align)});let d="\n",p=Array(o).fill(0).map((e,t)=>c&&h[t]&&h[t].text||"");return d+=`| ${p.map((e,t)=>l(e,a[t])).join(" | ")} |
|
|
2
2
|
| ${a.map((e,t)=>{let n=Math.max(3,e),r=u[t];return"left"===r?`:${"-".repeat(n)}`:"right"===r?`${"-".repeat(n)}:`:"center"===r?`:${"-".repeat(n)}:`:"-".repeat(n)}).join(" | ")} |
|
|
3
3
|
`,(c?s.slice(1):s).forEach(e=>{d+=`| ${Array(o).fill(0).map((t,n)=>l(e[n]&&e[n].text||"",a[n])).join(" | ")} |
|
|
4
4
|
`}),d},tr=s.bP.create({name:"table",addOptions:()=>({HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:e3,lastColumnResizable:!0,allowTableNodeSelection:!1}),content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:()=>[{tag:"table"}],renderHTML({node:e,HTMLAttributes:t}){let{colgroup:n,tableWidth:r,tableMinWidth:i}=e5(e,this.options.cellMinWidth),o=t.style;function a(){return o||(r?`width: ${r}`:`min-width: ${i}`)}let l=["table",(0,s.KV)(this.options.HTMLAttributes,t,{style:a()}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},l]:l},parseMarkdown:(e,t)=>{let n=[],r=Array.isArray(e.align)?e.align:[];if(e.header){let i=[];e.header.forEach((e,n)=>{var s;let o=eJ(null!=(s=r[n])?s:e.align),a=o?{align:o}:{};i.push(t.createNode("tableHeader",a,[{type:"paragraph",content:t.parseInline(e.tokens)}]))}),n.push(t.createNode("tableRow",{},i))}return e.rows&&e.rows.forEach(e=>{let i=[];e.forEach((e,n)=>{var s;let o=eJ(null!=(s=r[n])?s:e.align),a=o?{align:o}:{};i.push(t.createNode("tableCell",a,[{type:"paragraph",content:t.parseInline(e.tokens)}]))}),n.push(t.createNode("tableRow",{},i))}),t.createNode("table",void 0,n)},renderMarkdown:(e,t)=>tn(e,t),addCommands:()=>({insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:i,editor:s})=>{let a=e8(s.schema,e,t,n);if(i){let e=r.selection.from+1;r.replaceSelectionWith(a).scrollIntoView().setSelection(o.U3.near(r.doc.resolve(e)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>q(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>H(e,t),deleteColumn:()=>({state:e,dispatch:t})=>W(e,t),addRowBefore:()=>({state:e,dispatch:t})=>J(e,t),addRowAfter:()=>({state:e,dispatch:t})=>K(e,t),deleteRow:()=>({state:e,dispatch:t})=>X(e,t),deleteTable:()=>({state:e,dispatch:t})=>ec(e,t),mergeCells:()=>({state:e,dispatch:t})=>ee(e,t),splitCell:()=>({state:e,dispatch:t})=>et(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>eo("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>eo("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>ea(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>!!ee(e,t)||et(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>er(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>eh(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>eh(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&z(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){let n=N.create(t.doc,e.anchorCell,e.headCell);t.setSelection(n)}return!0}}),addKeyboardShortcuts(){return{Tab:()=>!!this.editor.commands.goToNextCell()||!!this.editor.can().addRowAfter()&&this.editor.chain().addRowAfter().goToNextCell().run(),"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:e7,"Mod-Backspace":e7,Delete:e7,"Mod-Delete":e7}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[eL({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],eG({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){let t={name:e.name,options:e.options,storage:e.storage};return{tableRole:(0,s.gk)((0,s.iI)(e,"tableRole",t))}}});s.YY.create({name:"tableKit",addExtensions(){let e=[];return!1!==this.options.table&&e.push(tr.configure(this.options.table)),!1!==this.options.tableCell&&e.push(eQ.configure(this.options.tableCell)),!1!==this.options.tableHeader&&e.push(eY.configure(this.options.tableHeader)),!1!==this.options.tableRow&&e.push(e0.configure(this.options.tableRow)),e}})},6268:(e,t,n)=>{"use strict";n.d(t,{A:()=>r.A0});var r=n(5989)},8242:(e,t,n)=>{"use strict";n.d(t,{$L:()=>Q,Ln:()=>x,N0:()=>J,Um:()=>X,Wg:()=>S,X9:()=>m,Ys:()=>w,dL:()=>eg,jP:()=>I,n9:()=>W,oM:()=>L,zy:()=>H});var r=n(27050);let i=65535,s=65536;function o(e,t){return e+t*s}function a(e){return e&i}function l(e){return(e-(e&i))/s}let h=1,c=2,u=4,d=8;class p{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&d)>0}get deletedBefore(){return(this.delInfo&(h|u))>0}get deletedAfter(){return(this.delInfo&(c|u))>0}get deletedAcross(){return(this.delInfo&u)>0}}class f{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&f.empty)return f.empty}recover(e){let t=0,n=a(e);if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[3*e+2]-this.ranges[3*e+1];return this.ranges[3*n]+t+l(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,i=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let f=this.ranges[a+i],m=this.ranges[a+s],g=l+f;if(e<=g){let i=f?e==l?-1:e==g?1:t:t,s=l+r+(i<0?0:m);if(n)return s;let _=e==(t<0?l:g)?null:o(a/3,e-l),y=e==l?c:e==g?h:u;return(t<0?e!=l:e!=g)&&(y|=d),new p(s,y,_)}r+=m-f}return n?e+r:new p(e+r,0,null)}touches(e,t){let n=0,r=a(t),i=this.inverted?2:1,s=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let o=this.ranges[t]-(this.inverted?n:0);if(o>e)break;let a=this.ranges[t+i];if(e<=o+a&&t==3*r)return!0;n+=this.ranges[t+s]-a}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let s=this.ranges[r],o=s-(this.inverted?i:0),a=s+(this.inverted?0:i),l=this.ranges[r+t],h=this.ranges[r+n];e(o,o+l,a,a+h),i+=h-l}}invert(){return new f(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?f.empty:new f(e<0?[0,-e,0]:[0,0,e])}}f.empty=new f([]);class m{constructor(e,t,n=0,r=e?e.length:0){this.mirror=t,this.from=n,this.to=r,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new m(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),null!=t&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let r=e.getMirror(t);this.appendMap(e._maps[t],null!=r&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new m;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this._maps[n].mapResult(e,t);if(null!=i.recover){let t=this.getMirror(n);if(null!=t&&t>n&&t<this.to){n=t,e=this._maps[t].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new p(e,r,null)}}let g=Object.create(null);class _{getMap(){return f.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError("Invalid input for Step.fromJSON");let n=g[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in g)throw RangeError("Duplicate use of step JSON ID "+e);return g[e]=t,t.prototype.jsonID=e,t}}class y{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new y(e,null)}static fail(e){return new y(null,e)}static fromReplace(e,t,n,i){try{return y.ok(e.replace(t,n,i))}catch(e){if(e instanceof r.vI)return y.fail(e.message);throw e}}}function b(e,t,n){let i=[];for(let r=0;r<e.childCount;r++){let s=e.child(r);s.content.size&&(s=s.copy(b(s.content,t,s))),s.isInline&&(s=t(s,n,r)),i.push(s)}return r.FK.fromArray(i)}class k extends _{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),i=n.node(n.sharedDepth(this.to)),s=new r.Ji(b(t.content,(e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e,i),t.openStart,t.openEnd);return y.fromReplace(e,this.from,this.to,s)}invert(){return new w(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new k(t.pos,n.pos,this.mark)}merge(e){return e instanceof k&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new k(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for AddMarkStep.fromJSON");return new k(t.from,t.to,e.markFromJSON(t.mark))}}_.jsonID("addMark",k);class w extends _{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new r.Ji(b(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return y.fromReplace(e,this.from,this.to,n)}invert(){return new k(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new w(t.pos,n.pos,this.mark)}merge(e){return e instanceof w&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new w(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new w(t.from,t.to,e.markFromJSON(t.mark))}}_.jsonID("removeMark",w);class v extends _{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return y.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return y.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.from(n),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);if(t){let e=this.mark.addToSet(t.marks);if(e.length==t.marks.length){for(let n=0;n<t.marks.length;n++)if(!t.marks[n].isInSet(e))return new v(this.pos,t.marks[n]);return new v(this.pos,this.mark)}}return new C(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new v(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new v(t.pos,e.markFromJSON(t.mark))}}_.jsonID("addNodeMark",v);class C extends _{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return y.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return y.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.from(n),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new v(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new C(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new C(t.pos,e.markFromJSON(t.mark))}}_.jsonID("removeNodeMark",C);class x extends _{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&A(e,this.from,this.to)?y.fail("Structure replace would overwrite content"):y.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new f([this.from,this.to-this.from,this.slice.size])}invert(e){return new x(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.to,-1),n=this.from==this.to&&x.MAP_BIAS<0?t:e.mapResult(this.from,1);return n.deletedAcross&&t.deletedAcross?null:new x(n.pos,Math.max(n.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof x)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart)if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;else{let t=this.slice.size+e.slice.size==0?r.Ji.empty:new r.Ji(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new x(e.from,this.to,t,this.structure)}{let t=this.slice.size+e.slice.size==0?r.Ji.empty:new r.Ji(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new x(this.from,this.to+(e.to-e.from),t,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for ReplaceStep.fromJSON");return new x(t.from,t.to,r.Ji.fromJSON(e,t.slice),!!t.structure)}}x.MAP_BIAS=1,_.jsonID("replace",x);class S extends _{constructor(e,t,n,r,i,s,o=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=s,this.structure=o}apply(e){if(this.structure&&(A(e,this.from,this.gapFrom)||A(e,this.gapTo,this.to)))return y.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return y.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?y.fromReplace(e,this.from,this.to,n):y.fail("Content does not fit in gap")}getMap(){return new f([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new S(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||i>n.pos?null:new S(t.pos,n.pos,r,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new S(t.from,t.to,t.gapFrom,t.gapTo,r.Ji.fromJSON(e,t.slice),t.insert,!!t.structure)}}function A(e,t,n){let r=e.resolve(t),i=n-t,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let e=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function E(e,t,n,r){let i,s,o=[],a=[];e.doc.nodesBetween(t,n,(e,l,h)=>{if(!e.isInline)return;let c=e.marks;if(!r.isInSet(c)&&h.type.allowsMarkType(r.type)){let h=Math.max(l,t),u=Math.min(l+e.nodeSize,n),d=r.addToSet(c);for(let e=0;e<c.length;e++)c[e].isInSet(d)||(i&&i.to==h&&i.mark.eq(c[e])?i.to=u:o.push(i=new w(h,u,c[e])));s&&s.to==h?s.to=u:a.push(s=new k(h,u,r))}}),o.forEach(t=>e.step(t)),a.forEach(t=>e.step(t))}function M(e,t,n,i){let s=[],o=0;e.doc.nodesBetween(t,n,(e,a)=>{if(!e.isInline)return;o++;let l=null;if(i instanceof r.sX){let t=e.marks,n;for(;n=i.isInSet(t);)(l||(l=[])).push(n),t=n.removeFromSet(t)}else i?i.isInSet(e.marks)&&(l=[i]):l=e.marks;if(l&&l.length){let r=Math.min(a+e.nodeSize,n);for(let e=0;e<l.length;e++){let n=l[e],i;for(let e=0;e<s.length;e++){let t=s[e];t.step==o-1&&n.eq(s[e].style)&&(i=t)}i?(i.to=r,i.step=o):s.push({style:n,from:Math.max(a,t),to:r,step:o})}}}),s.forEach(t=>e.step(new w(t.from,t.to,t.style)))}function T(e,t,n,i=n.contentMatch,s=!0){let o=e.doc.nodeAt(t),a=[],l=t+1;for(let t=0;t<o.childCount;t++){let h=o.child(t),c=l+h.nodeSize,u=i.matchType(h.type);if(u){i=u;for(let t=0;t<h.marks.length;t++)n.allowsMarkType(h.marks[t].type)||e.step(new w(l,c,h.marks[t]));if(s&&h.isText&&"pre"!=n.whitespace){let e,t=/\r?\n|\r/g,i;for(;e=t.exec(h.text);)i||(i=new r.Ji(r.FK.from(n.schema.text(" ",n.allowedMarks(h.marks))),0,0)),a.push(new x(l+e.index,l+e.index+e[0].length,i))}}else a.push(new x(l,c,r.Ji.empty));l=c}if(!i.validEnd){let t=i.fillBefore(r.FK.empty,!0);e.replace(l,l,new r.Ji(t,0,0))}for(let t=a.length-1;t>=0;t--)e.step(a[t])}function N(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function I(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth,r=0,i=0;;--n){let s=e.$from.node(n),o=e.$from.index(n)+r,a=e.$to.indexAfter(n)-i;if(n<e.depth&&s.canReplace(o,a,t))return n;if(0==n||s.type.spec.isolating||!N(s,o,a))break;o&&(r=1),a<s.childCount&&(i=1)}return null}function D(e,t,n){let{$from:i,$to:s,depth:o}=t,a=i.before(o+1),l=s.after(o+1),h=a,c=l,u=r.FK.empty,d=0;for(let e=o,t=!1;e>n;e--)t||i.index(e)>0?(t=!0,u=r.FK.from(i.node(e).copy(u)),d++):h--;let p=r.FK.empty,f=0;for(let e=o,t=!1;e>n;e--)t||s.after(e+1)<s.end(e)?(t=!0,p=r.FK.from(s.node(e).copy(p)),f++):c++;e.step(new S(h,c,a,l,new r.Ji(u.append(p),d,f),u.size-d,!0))}function L(e,t,n=null,r=e){let i=F(e,t),s=i&&P(r,t);return s?i.map(R).concat({type:t,attrs:n}).concat(s.map(R)):null}function R(e){return{type:e,attrs:null}}function F(e,t){let{parent:n,startIndex:r,endIndex:i}=e,s=n.contentMatchAt(r).findWrapping(t);if(!s)return null;let o=s.length?s[0]:t;return n.canReplaceWith(r,i,o)?s:null}function P(e,t){let{parent:n,startIndex:r,endIndex:i}=e,s=n.child(r),o=t.contentMatch.findWrapping(s.type);if(!o)return null;let a=(o.length?o[o.length-1]:t).contentMatch;for(let e=r;a&&e<i;e++)a=a.matchType(n.child(e).type);return a&&a.validEnd?o:null}function O(e,t,n){let i=r.FK.empty;for(let e=n.length-1;e>=0;e--){if(i.size){let t=n[e].type.contentMatch.matchFragment(i);if(!t||!t.validEnd)throw RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=r.FK.from(n[e].type.create(n[e].attrs,i))}let s=t.start,o=t.end;e.step(new S(s,o,s,o,new r.Ji(i,0,0),n.length,!0))}function z(e,t,n,i,s){if(!i.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let o=e.steps.length;e.doc.nodesBetween(t,n,(t,n)=>{let a="function"==typeof s?s(t):s;if(t.isTextblock&&!t.hasMarkup(i,a)&&j(e.doc,e.mapping.slice(o).map(n),i)){let s=null;if(i.schema.linebreakReplacement){let e="pre"==i.whitespace,t=!!i.contentMatch.matchType(i.schema.linebreakReplacement);e&&!t?s=!1:!e&&t&&(s=!0)}!1===s&&$(e,t,n,o),T(e,e.mapping.slice(o).map(n,1),i,void 0,null===s);let l=e.mapping.slice(o),h=l.map(n,1),c=l.map(n+t.nodeSize,1);return e.step(new S(h,c,h+1,c-1,new r.Ji(r.FK.from(i.create(a,null,t.marks)),0,0),1,!0)),!0===s&&B(e,t,n,o),!1}})}function B(e,t,n,r){t.forEach((i,s)=>{if(i.isText){let o,a=/\r?\n|\r/g;for(;o=a.exec(i.text);){let i=e.mapping.slice(r).map(n+1+s+o.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function $(e,t,n,r){t.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+s);e.replaceWith(i,i+1,t.type.schema.text("\n"))}})}function j(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function q(e,t,n,i,s){let o=e.doc.nodeAt(t);if(!o)throw RangeError("No node at given position");n||(n=o.type);let a=n.create(i,null,s||o.marks);if(o.isLeaf)return e.replaceWith(t,t+o.nodeSize,a);if(!n.validContent(o.content))throw RangeError("Invalid content for node type "+n.name);e.step(new S(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new r.Ji(r.FK.from(a),0,0),1,!0))}function H(e,t,n=1,r){let i=e.resolve(t),s=i.depth-n,o=r&&r[r.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let e=i.depth-1,t=n-2;e>s;e--,t--){let n=i.node(e),s=i.index(e);if(n.type.spec.isolating)return!1;let o=n.content.cutByIndex(s,n.childCount),a=r&&r[t+1];a&&(o=o.replaceChild(0,a.type.create(a.attrs)));let l=r&&r[t]||n;if(!n.canReplace(s+1,n.childCount)||!l.type.validContent(o))return!1}let a=i.indexAfter(s),l=r&&r[0];return i.node(s).canReplaceWith(a,a,l?l.type:i.node(s+1).type)}function U(e,t,n=1,i){let s=e.doc.resolve(t),o=r.FK.empty,a=r.FK.empty;for(let e=s.depth,t=s.depth-n,l=n-1;e>t;e--,l--){o=r.FK.from(s.node(e).copy(o));let t=i&&i[l];a=r.FK.from(t?t.type.create(t.attrs,a):s.node(e).copy(a))}e.step(new x(t,t,new r.Ji(o.append(a),n,n),!0))}function W(e,t){let n=e.resolve(t),r=n.index();return G(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function V(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let s=t.child(i),o=s.type==r?e.type.schema.nodes.text:s.type;if(!(n=n.matchType(o))||!e.type.allowsMarks(s.marks))return!1}return n.validEnd}function G(e,t){return!!(e&&t&&!e.isLeaf&&V(e,t))}function J(e,t,n=-1){let r=e.resolve(t);for(let e=r.depth;;e--){let i,s,o=r.index(e);if(e==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(e+1),o++,s=r.node(e).maybeChild(o)):(i=r.node(e).maybeChild(o-1),s=r.node(e+1)),i&&!i.isTextblock&&G(i,s)&&r.node(e).canReplace(o,o+1))return t;if(0==e)break;t=n<0?r.before(e):r.after(e)}}function K(e,t,n){let i=null,{linebreakReplacement:s}=e.doc.type.schema,o=e.doc.resolve(t-n),a=o.node().type;if(s&&a.inlineContent){let e="pre"==a.whitespace,t=!!a.contentMatch.matchType(s);e&&!t?i=!1:!e&&t&&(i=!0)}let l=e.steps.length;if(!1===i){let r=e.doc.resolve(t+n);$(e,r.node(),r.before(),l)}a.inlineContent&&T(e,t+n-1,a,o.node().contentMatchAt(o.index()),null==i);let h=e.mapping.slice(l),c=h.map(t-n);if(e.step(new x(c,h.map(t+n,-1),r.Ji.empty,!0)),!0===i){let t=e.doc.resolve(c);B(e,t.node(),t.before(),e.steps.length)}return e}function Z(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)break}return null}function X(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let e=0;e<n.openStart;e++)i=i.firstChild.content;for(let e=1;e<=(0==n.openStart&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,s=r.index(t)+ +(n>0),o=r.node(t),a=!1;if(1==e)a=o.canReplace(s,s,i);else{let e=o.contentMatchAt(s).findWrapping(i.firstChild.type);a=e&&o.canReplaceWith(s,s,e[0])}if(a)return 0==n?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function Q(e,t,n=t,i=r.Ji.empty){if(t==n&&!i.size)return null;let s=e.resolve(t),o=e.resolve(n);return Y(s,o,i)?new x(t,n,i):new ee(s,o,i).fit()}function Y(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}_.jsonID("replaceAround",S);class ee{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=r.FK.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=r.FK.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(e<0?this.$to:n.doc.resolve(e));if(!i)return null;let s=this.placed,o=n.depth,a=i.depth;for(;o&&a&&1==s.childCount;)s=s.firstChild.content,o--,a--;let l=new r.Ji(s,o,a);return e>-1?new S(n.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||n.pos!=this.$to.pos?new x(n.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let i=t.firstChild;if(t.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){e=n;break}t=i.content}for(let t=1;t<=2;t++)for(let n=1==t?e:this.unplaced.openStart;n>=0;n--){let e,i=null,s=(e=n?(i=er(this.unplaced.content,n-1).firstChild).content:this.unplaced.content).firstChild;for(let e=this.depth;e>=0;e--){let{type:o,match:a}=this.frontier[e],l,h=null;if(1==t&&(s?a.matchType(s.type)||(h=a.fillBefore(r.FK.from(s),!1)):i&&o.compatibleContent(i.type)))return{sliceDepth:n,frontierDepth:e,parent:i,inject:h};if(2==t&&s&&(l=a.findWrapping(s.type)))return{sliceDepth:n,frontierDepth:e,parent:i,wrap:l};if(i&&a.matchType(i.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=er(e,t);return!!i.childCount&&!i.firstChild.isLeaf&&(this.unplaced=new r.Ji(e,t+1,Math.max(n,i.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=er(e,t);if(i.childCount<=1&&t>0){let s=e.size-t<=t+i.size;this.unplaced=new r.Ji(et(e,t-1,1),t-1,s?t-1:n)}else this.unplaced=new r.Ji(et(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:i,wrap:s}){for(;this.depth>t;)this.closeFrontierNode();if(s)for(let e=0;e<s.length;e++)this.openFrontierNode(s[e]);let o=this.unplaced,a=n?n.content:o.content,l=o.openStart-e,h=0,c=[],{match:u,type:d}=this.frontier[t];if(i){for(let e=0;e<i.childCount;e++)c.push(i.child(e));u=u.matchFragment(i)}let p=a.size+e-(o.content.size-o.openEnd);for(;h<a.childCount;){let e=a.child(h),t=u.matchType(e.type);if(!t)break;(++h>1||0==l||e.content.size)&&(u=t,c.push(ei(e.mark(d.allowedMarks(e.marks)),1==h?l:0,h==a.childCount?p:-1)))}let f=h==a.childCount;f||(p=-1),this.placed=en(this.placed,t,r.FK.from(c)),this.frontier[t].match=u,f&&p<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=a;e<p;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=f?0==e?r.Ji.empty:new r.Ji(et(o.content,e-1,1),e-1,p<0?o.openEnd:e-1):new r.Ji(et(o.content,e,h),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!es(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return -1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){t:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),s=es(e,t,r,n,i);if(s){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=es(e,n,r,t,!0);if(!i||i.childCount)continue t}return{depth:t,fit:s,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=en(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=en(this.placed,this.depth,r.FK.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(r.FK.empty,!0);e.childCount&&(this.placed=en(this.placed,this.frontier.length,e))}}function et(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(et(e.firstChild.content,t-1,n)))}function en(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(en(e.lastChild.content,t-1,n)))}function er(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function ei(e,t,n){if(t<=0)return e;let i=e.content;return t>1&&(i=i.replaceChild(0,ei(i.firstChild,t-1,1==i.childCount?n-1:0))),t>0&&(i=e.type.contentMatch.fillBefore(i).append(i),n<=0&&(i=i.append(e.type.contentMatch.matchFragment(i).fillBefore(r.FK.empty,!0)))),e.copy(i)}function es(e,t,n,r,i){let s=e.node(t),o=i?e.indexAfter(t):e.index(t);if(o==s.childCount&&!n.compatibleContent(s.type))return null;let a=r.fillBefore(s.content,!0,o);return a&&!eo(n,s.content,o)?a:null}function eo(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function ea(e){return e.spec.defining||e.spec.definingForContent}function el(e,t,n,i){if(!i.size)return e.deleteRange(t,n);let s=e.doc.resolve(t),o=e.doc.resolve(n);if(Y(s,o,i))return e.step(new x(t,n,i));let a=ed(s,o);0==a[a.length-1]&&a.pop();let l=-(s.depth+1);a.unshift(l);for(let e=s.depth,t=s.pos-1;e>0;e--,t--){let n=s.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;a.indexOf(e)>-1?l=e:s.before(e)==t&&a.splice(1,0,-e)}let h=a.indexOf(l),c=[],u=i.openStart;for(let e=i.content,t=0;;t++){let n=e.firstChild;if(c.push(n),t==i.openStart)break;e=n.content}for(let e=u-1;e>=0;e--){let t=c[e],n=ea(t.type);if(n&&!t.sameMarkup(s.node(Math.abs(l)-1)))u=e;else if(n||!t.type.isTextblock)break}for(let t=i.openStart;t>=0;t--){let l=(t+u+1)%(i.openStart+1),d=c[l];if(d)for(let t=0;t<a.length;t++){let c=a[(t+h)%a.length],u=!0;c<0&&(u=!1,c=-c);let p=s.node(c-1),f=s.index(c-1);if(p.canReplaceWith(f,f,d.type,d.marks))return e.replace(s.before(c),u?o.after(c):n,new r.Ji(eh(i.content,0,i.openStart,l),l,i.openEnd))}}let d=e.steps.length;for(let r=a.length-1;r>=0&&(e.replace(t,n,i),!(e.steps.length>d));r--){let e=a[r];e<0||(t=s.before(e),n=o.after(e))}}function eh(e,t,n,i,s){if(t<n){let r=e.firstChild;e=e.replaceChild(0,r.copy(eh(r.content,t+1,n,i,r)))}if(t>i){let t=s.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(r.FK.empty,!0))}return e}function ec(e,t,n,i){if(!i.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let r=Z(e.doc,t,i.type);null!=r&&(t=n=r)}e.replaceRange(t,n,new r.Ji(r.FK.from(i),0,0))}function eu(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&0==r.parentOffset&&0==i.parentOffset){let s=r.sharedDepth(n),o=!1;for(let e=r.depth;e>s;e--)r.node(e).type.spec.isolating&&(o=!0);for(let e=i.depth;e>s;e--)i.node(e).type.spec.isolating&&(o=!0);if(!o){for(let e=r.depth;e>0&&t==r.start(e);e--)t=r.before(e);for(let e=i.depth;e>0&&n==i.start(e);e--)n=i.before(e);r=e.doc.resolve(t),i=e.doc.resolve(n)}}let s=ed(r,i);for(let t=0;t<s.length;t++){let n=s[t],o=t==s.length-1;if(o&&0==n||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),i.end(n));if(n>0&&(o||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return e.delete(r.before(n),i.after(n))}for(let s=1;s<=r.depth&&s<=i.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&i.end(s)-n!=i.depth-s&&r.start(s-1)==i.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),i.index(s-1)))return e.delete(r.before(s),n);e.delete(t,n)}function ed(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let r=e.start(i);if(r<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(r==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==r-1)&&n.push(i)}return n}class ep extends _{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return y.fail("No node at attribute step's position");let n=Object.create(null);for(let e in t.attrs)n[e]=t.attrs[e];n[this.attr]=this.value;let i=t.type.create(n,null,t.marks);return y.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.from(i),0,+!t.isLeaf))}getMap(){return f.empty}invert(e){return new ep(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ep(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if("number"!=typeof t.pos||"string"!=typeof t.attr)throw RangeError("Invalid input for AttrStep.fromJSON");return new ep(t.pos,t.attr,t.value)}}_.jsonID("attr",ep);class ef extends _{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return y.ok(n)}getMap(){return f.empty}invert(e){return new ef(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if("string"!=typeof t.attr)throw RangeError("Invalid input for DocAttrStep.fromJSON");return new ef(t.attr,t.value)}}_.jsonID("docAttr",ef);let em=class extends Error{};(em=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype),em.prototype.constructor=em,em.prototype.name="TransformError";class eg{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new m}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new em(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let r=this.mapping.maps[n];n&&(e=r.map(e,1),t=r.map(t,-1)),r.forEach((n,r,i,s)=>{e=Math.min(e,i),t=Math.max(t,s)})}return 1e9==e?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=r.Ji.empty){let i=Q(this.doc,e,t,n);return i&&this.step(i),this}replaceWith(e,t,n){return this.replace(e,t,new r.Ji(r.FK.from(n),0,0))}delete(e,t){return this.replace(e,t,r.Ji.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return el(this,e,t,n),this}replaceRangeWith(e,t,n){return ec(this,e,t,n),this}deleteRange(e,t){return eu(this,e,t),this}lift(e,t){return D(this,e,t),this}join(e,t=1){return K(this,e,t),this}wrap(e,t){return O(this,e,t),this}setBlockType(e,t=e,n,r=null){return z(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r){return q(this,e,t,n,r),this}setNodeAttribute(e,t,n){return this.step(new ep(e,t,n)),this}setDocAttribute(e,t){return this.step(new ef(e,t)),this}addNodeMark(e,t){return this.step(new v(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw RangeError("No node at position "+e);if(t instanceof r.CU)t.isInSet(n.marks)&&this.step(new C(e,t));else{let r=n.marks,i,s=[];for(;i=t.isInSet(r);)s.push(new C(e,i)),r=i.removeFromSet(r);for(let e=s.length-1;e>=0;e--)this.step(s[e])}return this}split(e,t=1,n){return U(this,e,t,n),this}addMark(e,t,n){return E(this,e,t,n),this}removeMark(e,t,n){return M(this,e,t,n),this}clearIncompatible(e,t,n){return T(this,e,t,n),this}}},9921:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],s=(0,r.A)("chevron-up",i)},10762:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],s=(0,r.A)("terminal",i)},11019:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],s=(0,r.A)("message-circle-question-mark",i)},12612:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]],s=(0,r.A)("file-diff",i)},12651:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],s=(0,r.A)("circle-check",i)},12894:(e,t,n)=>{"use strict";n.d(t,{K:()=>_,w:()=>g});for(var r={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},i={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},s="u">typeof navigator&&/Mac/.test(navigator.platform),o="u">typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),a=0;a<10;a++)r[48+a]=r[96+a]=String(a);for(var a=1;a<=24;a++)r[a+111]="F"+a;for(var a=65;a<=90;a++)r[a]=String.fromCharCode(a+32),i[a]=String.fromCharCode(a);for(var l in r)i.hasOwnProperty(l)||(i[l]=r[l]);function h(e){var t=!(s&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||o&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?i:r)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}var c=n(76865);let u="u">typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),d="u">typeof navigator&&/Win/.test(navigator.platform);function p(e){let t,n,r,i,s=e.split(/-(?!$)/),o=s[s.length-1];"Space"==o&&(o=" ");for(let e=0;e<s.length-1;e++){let o=s[e];if(/^(cmd|meta|m)$/i.test(o))i=!0;else if(/^a(lt)?$/i.test(o))t=!0;else if(/^(c|ctrl|control)$/i.test(o))n=!0;else if(/^s(hift)?$/i.test(o))r=!0;else if(/^mod$/i.test(o))u?i=!0:n=!0;else throw Error("Unrecognized modifier name: "+o)}return t&&(o="Alt-"+o),n&&(o="Ctrl-"+o),i&&(o="Meta-"+o),r&&(o="Shift-"+o),o}function f(e){let t=Object.create(null);for(let n in e)t[p(n)]=e[n];return t}function m(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function g(e){return new c.k_({props:{handleKeyDown:_(e)}})}function _(e){let t=f(e);return function(e,n){let i=h(n),s,o=t[m(i,n)];if(o&&o(e.state,e.dispatch,e))return!0;if(1==i.length&&" "!=i){if(n.shiftKey){let r=t[m(i,n,!1)];if(r&&r(e.state,e.dispatch,e))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(d&&n.ctrlKey&&n.altKey)&&(s=r[n.keyCode])&&s!=i){let r=t[m(s,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}},13439:(e,t,n)=>{"use strict";n.d(t,{$Z:()=>eu,hG:()=>eb});var r=n(12115),i=n(47650),s=n(8039),o=n(95155),a=n(82159);let{getOwnPropertyNames:l,getOwnPropertySymbols:h}=Object,{hasOwnProperty:c}=Object.prototype;function u(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function d(e){return function(t,n,r){if(!t||!n||"object"!=typeof t||"object"!=typeof n)return e(t,n,r);let{cache:i}=r,s=i.get(t),o=i.get(n);if(s&&o)return s===n&&o===t;i.set(t,n),i.set(n,t);let a=e(t,n,r);return i.delete(t),i.delete(n),a}}function p(e){return null!=e?e[Symbol.toStringTag]:void 0}function f(e){return l(e).concat(h(e))}let m=Object.hasOwn||((e,t)=>c.call(e,t));function g(e,t){return e===t||!e&&!t&&e!=e&&t!=t}let _="__v",y="__o",b="_owner",{getOwnPropertyDescriptor:k,keys:w}=Object;function v(e,t){return e.byteLength===t.byteLength&&F(new Uint8Array(e),new Uint8Array(t))}function C(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function x(e,t){return e.byteLength===t.byteLength&&F(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function S(e,t){return g(e.getTime(),t.getTime())}function A(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function E(e,t){return e===t}function M(e,t,n){let r,i,s=e.size;if(s!==t.size)return!1;if(!s)return!0;let o=Array(s),a=e.entries(),l=0;for(;(r=a.next())&&!r.done;){let s=t.entries(),a=!1,h=0;for(;(i=s.next())&&!i.done;){if(o[h]){h++;continue}let s=r.value,c=i.value;if(n.equals(s[0],c[0],l,h,e,t,n)&&n.equals(s[1],c[1],s[0],c[0],e,t,n)){a=o[h]=!0;break}h++}if(!a)return!1;l++}return!0}let T=g;function N(e,t,n){let r=w(e),i=r.length;if(w(t).length!==i)return!1;for(;i-- >0;)if(!O(e,t,n,r[i]))return!1;return!0}function I(e,t,n){let r,i,s,o=f(e),a=o.length;if(f(t).length!==a)return!1;for(;a-- >0;)if(!O(e,t,n,r=o[a])||(i=k(e,r),s=k(t,r),(i||s)&&(!i||!s||i.configurable!==s.configurable||i.enumerable!==s.enumerable||i.writable!==s.writable)))return!1;return!0}function D(e,t){return g(e.valueOf(),t.valueOf())}function L(e,t){return e.source===t.source&&e.flags===t.flags}function R(e,t,n){let r,i,s=e.size;if(s!==t.size)return!1;if(!s)return!0;let o=Array(s),a=e.values();for(;(r=a.next())&&!r.done;){let s=t.values(),a=!1,l=0;for(;(i=s.next())&&!i.done;){if(!o[l]&&n.equals(r.value,i.value,r.value,i.value,e,t,n)){a=o[l]=!0;break}l++}if(!a)return!1}return!0}function F(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function P(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function O(e,t,n,r){return(r===b||r===y||r===_)&&(!!e.$$typeof||!!t.$$typeof)||m(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}let z="[object ArrayBuffer]",B="[object Arguments]",$="[object Boolean]",j="[object DataView]",q="[object Date]",H="[object Error]",U="[object Map]",W="[object Number]",V="[object Object]",G="[object RegExp]",J="[object Set]",K="[object String]",Z={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},X="[object URL]",Q=Object.prototype.toString;function Y({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:s,areMapsEqual:o,areNumbersEqual:a,areObjectsEqual:l,arePrimitiveWrappersEqual:h,areRegExpsEqual:c,areSetsEqual:u,areTypedArraysEqual:d,areUrlsEqual:f,unknownTagComparators:m}){return function(g,_,y){if(g===_)return!0;if(null==g||null==_)return!1;let b=typeof g;if(b!==typeof _)return!1;if("object"!==b)return"number"===b?a(g,_,y):"function"===b&&s(g,_,y);let k=g.constructor;if(k!==_.constructor)return!1;if(k===Object)return l(g,_,y);if(Array.isArray(g))return t(g,_,y);if(k===Date)return r(g,_,y);if(k===RegExp)return c(g,_,y);if(k===Map)return o(g,_,y);if(k===Set)return u(g,_,y);let w=Q.call(g);if(w===q)return r(g,_,y);if(w===G)return c(g,_,y);if(w===U)return o(g,_,y);if(w===J)return u(g,_,y);if(w===V)return"function"!=typeof g.then&&"function"!=typeof _.then&&l(g,_,y);if(w===X)return f(g,_,y);if(w===H)return i(g,_,y);if(w===B)return l(g,_,y);if(Z[w])return d(g,_,y);if(w===z)return e(g,_,y);if(w===j)return n(g,_,y);if(w===$||w===W||w===K)return h(g,_,y);if(m){let e=m[w];if(!e){let t=p(g);t&&(e=m[t])}if(e)return e(g,_,y)}return!1}}function ee({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:v,areArraysEqual:n?I:C,areDataViewsEqual:x,areDatesEqual:S,areErrorsEqual:A,areFunctionsEqual:E,areMapsEqual:n?u(M,I):M,areNumbersEqual:T,areObjectsEqual:n?I:N,arePrimitiveWrappersEqual:D,areRegExpsEqual:L,areSetsEqual:n?u(R,I):R,areTypedArraysEqual:n?u(F,I):F,areUrlsEqual:P,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=d(r.areArraysEqual),t=d(r.areMapsEqual),n=d(r.areObjectsEqual),i=d(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}function et(e){return function(t,n,r,i,s,o,a){return e(t,n,a)}}function en({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(s,o){let{cache:a=e?new WeakMap:void 0,meta:l}=n();return t(s,o,{cache:a,equals:r,meta:l,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let s={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,s)}}let er=ei();function ei(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,s=Y(ee(e)),o=n?n(s):et(s);return en({circular:t,comparator:s,createState:r,equals:o,strict:i})}ei({strict:!0}),ei({circular:!0}),ei({circular:!0,strict:!0}),ei({createInternalComparator:()=>g}),ei({strict:!0,createInternalComparator:()=>g}),ei({circular:!0,createInternalComparator:()=>g}),ei({circular:!0,createInternalComparator:()=>g,strict:!0});var es=n(94577),eo=(...e)=>t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})},ea=({contentComponent:e})=>{let t=(0,s.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,o.jsx)(o.Fragment,{children:Object.values(t)})};function el(){let e=new Set,t={};return{subscribe:t=>(e.add(t),()=>{e.delete(t)}),getSnapshot:()=>t,getServerSnapshot:()=>t,setRenderer(n,r){t={...t,[n]:i.createPortal(r.reactElement,r.element,n)},e.forEach(e=>e())},removeRenderer(n){let r={...t};delete r[n],t=r,e.forEach(e=>e())}}}var eh=class extends r.Component{constructor(e){super(e),this.editorContentRef=r.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var e;let t=this.props.editor;if(t&&!t.isDestroyed&&(null==(e=t.view.dom)?void 0:e.parentNode)){if(t.contentComponent)return;let e=this.editorContentRef.current;e.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:e}),t.contentComponent=el(),t.createNodeViews(),t.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){var e;let t=this.props.editor;if(t){t.isEditorContentInitialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),t.contentComponent=null;try{if(!(null==(e=t.view.dom)?void 0:e.parentNode))return;let n=document.createElement("div");n.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:n})}catch{}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{ref:eo(t,this.editorContentRef),...n}),(null==e?void 0:e.contentComponent)&&(0,o.jsx)(ea,{contentComponent:e.contentComponent})]})}},ec=(0,r.forwardRef)((e,t)=>{let n=r.useMemo(()=>Math.floor(0xffffffff*Math.random()).toString(),[e.editor]);return r.createElement(eh,{key:n,innerRef:t,...e})}),eu=r.memo(ec),ed="u">typeof window?r.useLayoutEffect:r.useEffect,ep=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber||(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber}),this.lastSnapshot}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let e=()=>{this.transactionNumber+=1,this.subscribers.forEach(e=>e())},t=this.editor;return t.on("transaction",e),()=>{t.off("transaction",e)}}}};function ef(e){var t;let[n]=(0,r.useState)(()=>new ep(e.editor)),i=(0,es.useSyncExternalStoreWithSelector)(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,null!=(t=e.equalityFn)?t:er);return ed(()=>n.watch(e.editor),[e.editor,n]),(0,r.useDebugValue)(i),i}var em=!1,eg="u"<typeof window,e_=eg||!!("u">typeof window&&window.next),ey=class e{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(e=>e())}getInitialEditor(){if(void 0===this.options.current.immediatelyRender){if(eg||e_){if(em)throw Error("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches.");return null}return this.createEditor()}if(this.options.current.immediatelyRender&&eg&&em)throw Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){let e={...this.options.current,onBeforeCreate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onBeforeCreate)?void 0:n.call(t,...e)},onBlur:(...e)=>{var t,n;return null==(n=(t=this.options.current).onBlur)?void 0:n.call(t,...e)},onCreate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onCreate)?void 0:n.call(t,...e)},onDestroy:(...e)=>{var t,n;return null==(n=(t=this.options.current).onDestroy)?void 0:n.call(t,...e)},onFocus:(...e)=>{var t,n;return null==(n=(t=this.options.current).onFocus)?void 0:n.call(t,...e)},onSelectionUpdate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onSelectionUpdate)?void 0:n.call(t,...e)},onTransaction:(...e)=>{var t,n;return null==(n=(t=this.options.current).onTransaction)?void 0:n.call(t,...e)},onUpdate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onUpdate)?void 0:n.call(t,...e)},onContentError:(...e)=>{var t,n;return null==(n=(t=this.options.current).onContentError)?void 0:n.call(t,...e)},onDrop:(...e)=>{var t,n;return null==(n=(t=this.options.current).onDrop)?void 0:n.call(t,...e)},onPaste:(...e)=>{var t,n;return null==(n=(t=this.options.current).onPaste)?void 0:n.call(t,...e)},onDelete:(...e)=>{var t,n;return null==(n=(t=this.options.current).onDelete)?void 0:n.call(t,...e)}};return new a.KE(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,t){return Object.keys(e).every(n=>!!["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(n)||("extensions"===n&&e.extensions&&t.extensions?e.extensions.length===t.extensions.length&&e.extensions.every((e,n)=>{var r;return e===(null==(r=t.extensions)?void 0:r[n])}):e[n]===t[n]))}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&0===t.length?e.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(null===this.previousDeps){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((t,n)=>t===e[n]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){let e=this.instanceId,t=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){t&&t.setOptions(this.options.current);return}t&&!t.isDestroyed&&(t.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function eb(e={},t=[]){let n=(0,r.useRef)(e);n.current=e;let[i]=(0,r.useState)(()=>new ey(n)),o=(0,s.useSyncExternalStore)(i.subscribe,i.getEditor,i.getServerSnapshot);return(0,r.useDebugValue)(o),(0,r.useEffect)(i.onRender(t)),ef({editor:o,selector:({transactionNumber:t})=>!1===e.shouldRerenderOnTransaction||void 0===e.shouldRerenderOnTransaction?null:e.immediatelyRender&&0===t?0:t+1}),o}var ek=(0,r.createContext)({editor:null});ek.Consumer;var ew=(0,r.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),ev=()=>(0,r.useContext)(ew);r.forwardRef((e,t)=>{let{onDragStart:n}=ev(),r=e.as||"div";return(0,o.jsx)(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})}),r.createContext({markViewContentRef:()=>{}}),a.Db,a.Yv;var eC=(0,r.createContext)({get editor(){throw Error("useTiptap must be used within a <Tiptap> provider")}});eC.displayName="TiptapContext";var ex=()=>(0,r.useContext)(eC);function eS({editor:e,instance:t,children:n}){let i=null!=e?e:t;if(!i)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let s=(0,r.useMemo)(()=>({editor:i}),[i]),a=(0,r.useMemo)(()=>({editor:i}),[i]);return(0,o.jsx)(ek.Provider,{value:a,children:(0,o.jsx)(eC.Provider,{value:s,children:n})})}function eA({...e}){let{editor:t}=ex();return(0,o.jsx)(eu,{editor:t,...e})}eS.displayName="Tiptap",eA.displayName="Tiptap.Content",Object.assign(eS,{Content:eA})},14066:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{TM:()=>Language,iX:()=>Parser});var C,TRANSFER_BUFFER,LANGUAGE_VERSION,MIN_COMPATIBLE_VERSION,process=__webpack_require__(41463),__defProp=Object.defineProperty,__name=(e,t)=>__defProp(e,"name",{value:t,configurable:!0}),Edit=class{static{__name(this,"Edit")}startPosition;oldEndPosition;newEndPosition;startIndex;oldEndIndex;newEndIndex;constructor({startIndex:e,oldEndIndex:t,newEndIndex:n,startPosition:r,oldEndPosition:i,newEndPosition:s}){this.startIndex=e>>>0,this.oldEndIndex=t>>>0,this.newEndIndex=n>>>0,this.startPosition=r,this.oldEndPosition=i,this.newEndPosition=s}editPoint(e,t){let n=t,r={...e};if(t>=this.oldEndIndex){n=this.newEndIndex+(t-this.oldEndIndex);let i=e.row;r.row=this.newEndPosition.row+(e.row-this.oldEndPosition.row),r.column=i===this.oldEndPosition.row?this.newEndPosition.column+(e.column-this.oldEndPosition.column):e.column}else t>this.startIndex&&(n=this.newEndIndex,r.row=this.newEndPosition.row,r.column=this.newEndPosition.column);return{point:r,index:n}}editRange(e){let t={startIndex:e.startIndex,startPosition:{...e.startPosition},endIndex:e.endIndex,endPosition:{...e.endPosition}};return e.endIndex>=this.oldEndIndex?e.endIndex!==Number.MAX_SAFE_INTEGER&&(t.endIndex=this.newEndIndex+(e.endIndex-this.oldEndIndex),t.endPosition={row:this.newEndPosition.row+(e.endPosition.row-this.oldEndPosition.row),column:e.endPosition.row===this.oldEndPosition.row?this.newEndPosition.column+(e.endPosition.column-this.oldEndPosition.column):e.endPosition.column},t.endIndex<this.newEndIndex&&(t.endIndex=Number.MAX_SAFE_INTEGER,t.endPosition={row:Number.MAX_SAFE_INTEGER,column:Number.MAX_SAFE_INTEGER})):e.endIndex>this.startIndex&&(t.endIndex=this.startIndex,t.endPosition={...this.startPosition}),e.startIndex>=this.oldEndIndex?(t.startIndex=this.newEndIndex+(e.startIndex-this.oldEndIndex),t.startPosition={row:this.newEndPosition.row+(e.startPosition.row-this.oldEndPosition.row),column:e.startPosition.row===this.oldEndPosition.row?this.newEndPosition.column+(e.startPosition.column-this.oldEndPosition.column):e.startPosition.column},t.startIndex<this.newEndIndex&&(t.startIndex=Number.MAX_SAFE_INTEGER,t.startPosition={row:Number.MAX_SAFE_INTEGER,column:Number.MAX_SAFE_INTEGER})):e.startIndex>this.startIndex&&(t.startIndex=this.startIndex,t.startPosition={...this.startPosition}),t}},SIZE_OF_SHORT=2,SIZE_OF_INT=4,SIZE_OF_CURSOR=4*SIZE_OF_INT,SIZE_OF_NODE=5*SIZE_OF_INT,SIZE_OF_POINT=2*SIZE_OF_INT,SIZE_OF_RANGE=2*SIZE_OF_INT+2*SIZE_OF_POINT,ZERO_POINT={row:0,column:0},INTERNAL=Symbol("INTERNAL");function assertInternal(e){if(e!==INTERNAL)throw Error("Illegal constructor")}function isPoint(e){return!!e&&"number"==typeof e.row&&"number"==typeof e.column}function setModule(e){C=e}__name(assertInternal,"assertInternal"),__name(isPoint,"isPoint"),__name(setModule,"setModule");var LookaheadIterator=class{static{__name(this,"LookaheadIterator")}0=0;language;constructor(e,t,n){assertInternal(e),this[0]=t,this.language=n}get currentTypeId(){return C._ts_lookahead_iterator_current_symbol(this[0])}get currentType(){return this.language.types[this.currentTypeId]||"ERROR"}delete(){C._ts_lookahead_iterator_delete(this[0]),this[0]=0}reset(e,t){return!!C._ts_lookahead_iterator_reset(this[0],e[0],t)&&(this.language=e,!0)}resetState(e){return!!C._ts_lookahead_iterator_reset_state(this[0],e)}[Symbol.iterator](){return{next:__name(()=>C._ts_lookahead_iterator_next(this[0])?{done:!1,value:this.currentType}:{done:!0,value:""},"next")}}};function getText(e,t,n,r){let i=n-t,s=e.textCallback(t,r);if(s){for(t+=s.length;t<n;){let n=e.textCallback(t,r);if(n&&n.length>0)t+=n.length,s+=n;else break}t>n&&(s=s.slice(0,i))}return s??""}__name(getText,"getText");var Tree=class _Tree{static{__name(this,"Tree")}0=0;textCallback;language;constructor(e,t,n,r){assertInternal(e),this[0]=t,this.language=n,this.textCallback=r}copy(){return new _Tree(INTERNAL,C._ts_tree_copy(this[0]),this.language,this.textCallback)}delete(){C._ts_tree_delete(this[0]),this[0]=0}get rootNode(){return C._ts_tree_root_node_wasm(this[0]),unmarshalNode(this)}rootNodeWithOffset(e,t){let n=TRANSFER_BUFFER+SIZE_OF_NODE;return C.setValue(n,e,"i32"),marshalPoint(n+SIZE_OF_INT,t),C._ts_tree_root_node_with_offset_wasm(this[0]),unmarshalNode(this)}edit(e){marshalEdit(e),C._ts_tree_edit_wasm(this[0])}walk(){return this.rootNode.walk()}getChangedRanges(e){if(!(e instanceof _Tree))throw TypeError("Argument must be a Tree");C._ts_tree_get_changed_ranges_wasm(this[0],e[0]);let t=C.getValue(TRANSFER_BUFFER,"i32"),n=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),r=Array(t);if(t>0){let e=n;for(let n=0;n<t;n++)r[n]=unmarshalRange(e),e+=SIZE_OF_RANGE;C._free(n)}return r}getIncludedRanges(){C._ts_tree_included_ranges_wasm(this[0]);let e=C.getValue(TRANSFER_BUFFER,"i32"),t=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),n=Array(e);if(e>0){let r=t;for(let t=0;t<e;t++)n[t]=unmarshalRange(r),r+=SIZE_OF_RANGE;C._free(t)}return n}},TreeCursor=class _TreeCursor{static{__name(this,"TreeCursor")}0=0;1=0;2=0;3=0;tree;constructor(e,t){assertInternal(e),this.tree=t,unmarshalTreeCursor(this)}copy(){let e=new _TreeCursor(INTERNAL,this.tree);return C._ts_tree_cursor_copy_wasm(this.tree[0]),unmarshalTreeCursor(e),e}delete(){marshalTreeCursor(this),C._ts_tree_cursor_delete_wasm(this.tree[0]),this[0]=this[1]=this[2]=0}get currentNode(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_wasm(this.tree[0]),unmarshalNode(this.tree)}get currentFieldId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_field_id_wasm(this.tree[0])}get currentFieldName(){return this.tree.language.fields[this.currentFieldId]}get currentDepth(){return marshalTreeCursor(this),C._ts_tree_cursor_current_depth_wasm(this.tree[0])}get currentDescendantIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_current_descendant_index_wasm(this.tree[0])}get nodeType(){return this.tree.language.types[this.nodeTypeId]||"ERROR"}get nodeTypeId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_type_id_wasm(this.tree[0])}get nodeStateId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_state_id_wasm(this.tree[0])}get nodeId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_id_wasm(this.tree[0])}get nodeIsNamed(){return marshalTreeCursor(this),1===C._ts_tree_cursor_current_node_is_named_wasm(this.tree[0])}get nodeIsMissing(){return marshalTreeCursor(this),1===C._ts_tree_cursor_current_node_is_missing_wasm(this.tree[0])}get nodeText(){marshalTreeCursor(this);let e=C._ts_tree_cursor_start_index_wasm(this.tree[0]),t=C._ts_tree_cursor_end_index_wasm(this.tree[0]);C._ts_tree_cursor_start_position_wasm(this.tree[0]);let n=unmarshalPoint(TRANSFER_BUFFER);return getText(this.tree,e,t,n)}get startPosition(){return marshalTreeCursor(this),C._ts_tree_cursor_start_position_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get endPosition(){return marshalTreeCursor(this),C._ts_tree_cursor_end_position_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get startIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_start_index_wasm(this.tree[0])}get endIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_end_index_wasm(this.tree[0])}gotoFirstChild(){marshalTreeCursor(this);let e=C._ts_tree_cursor_goto_first_child_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===e}gotoLastChild(){marshalTreeCursor(this);let e=C._ts_tree_cursor_goto_last_child_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===e}gotoParent(){marshalTreeCursor(this);let e=C._ts_tree_cursor_goto_parent_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===e}gotoNextSibling(){marshalTreeCursor(this);let e=C._ts_tree_cursor_goto_next_sibling_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===e}gotoPreviousSibling(){marshalTreeCursor(this);let e=C._ts_tree_cursor_goto_previous_sibling_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===e}gotoDescendant(e){marshalTreeCursor(this),C._ts_tree_cursor_goto_descendant_wasm(this.tree[0],e),unmarshalTreeCursor(this)}gotoFirstChildForIndex(e){marshalTreeCursor(this),C.setValue(TRANSFER_BUFFER+SIZE_OF_CURSOR,e,"i32");let t=C._ts_tree_cursor_goto_first_child_for_index_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===t}gotoFirstChildForPosition(e){marshalTreeCursor(this),marshalPoint(TRANSFER_BUFFER+SIZE_OF_CURSOR,e);let t=C._ts_tree_cursor_goto_first_child_for_position_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===t}reset(e){marshalNode(e),marshalTreeCursor(this,TRANSFER_BUFFER+SIZE_OF_NODE),C._ts_tree_cursor_reset_wasm(this.tree[0]),unmarshalTreeCursor(this)}resetTo(e){marshalTreeCursor(this,TRANSFER_BUFFER),marshalTreeCursor(e,TRANSFER_BUFFER+SIZE_OF_CURSOR),C._ts_tree_cursor_reset_to_wasm(this.tree[0],e.tree[0]),unmarshalTreeCursor(this)}},Node=class{static{__name(this,"Node")}0=0;_children;_namedChildren;constructor(e,{id:t,tree:n,startIndex:r,startPosition:i,other:s}){assertInternal(e),this[0]=s,this.id=t,this.tree=n,this.startIndex=r,this.startPosition=i}id;startIndex;startPosition;tree;get typeId(){return marshalNode(this),C._ts_node_symbol_wasm(this.tree[0])}get grammarId(){return marshalNode(this),C._ts_node_grammar_symbol_wasm(this.tree[0])}get type(){return this.tree.language.types[this.typeId]||"ERROR"}get grammarType(){return this.tree.language.types[this.grammarId]||"ERROR"}get isNamed(){return marshalNode(this),1===C._ts_node_is_named_wasm(this.tree[0])}get isExtra(){return marshalNode(this),1===C._ts_node_is_extra_wasm(this.tree[0])}get isError(){return marshalNode(this),1===C._ts_node_is_error_wasm(this.tree[0])}get isMissing(){return marshalNode(this),1===C._ts_node_is_missing_wasm(this.tree[0])}get hasChanges(){return marshalNode(this),1===C._ts_node_has_changes_wasm(this.tree[0])}get hasError(){return marshalNode(this),1===C._ts_node_has_error_wasm(this.tree[0])}get endIndex(){return marshalNode(this),C._ts_node_end_index_wasm(this.tree[0])}get endPosition(){return marshalNode(this),C._ts_node_end_point_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get text(){return getText(this.tree,this.startIndex,this.endIndex,this.startPosition)}get parseState(){return marshalNode(this),C._ts_node_parse_state_wasm(this.tree[0])}get nextParseState(){return marshalNode(this),C._ts_node_next_parse_state_wasm(this.tree[0])}equals(e){return this.tree===e.tree&&this.id===e.id}child(e){return marshalNode(this),C._ts_node_child_wasm(this.tree[0],e),unmarshalNode(this.tree)}namedChild(e){return marshalNode(this),C._ts_node_named_child_wasm(this.tree[0],e),unmarshalNode(this.tree)}childForFieldId(e){return marshalNode(this),C._ts_node_child_by_field_id_wasm(this.tree[0],e),unmarshalNode(this.tree)}childForFieldName(e){let t=this.tree.language.fields.indexOf(e);return -1!==t?this.childForFieldId(t):null}fieldNameForChild(e){marshalNode(this);let t=C._ts_node_field_name_for_child_wasm(this.tree[0],e);return t?C.AsciiToString(t):null}fieldNameForNamedChild(e){marshalNode(this);let t=C._ts_node_field_name_for_named_child_wasm(this.tree[0],e);return t?C.AsciiToString(t):null}childrenForFieldName(e){let t=this.tree.language.fields.indexOf(e);return -1!==t&&0!==t?this.childrenForFieldId(t):[]}childrenForFieldId(e){marshalNode(this),C._ts_node_children_by_field_id_wasm(this.tree[0],e);let t=C.getValue(TRANSFER_BUFFER,"i32"),n=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),r=Array(t);if(t>0){let e=n;for(let n=0;n<t;n++)r[n]=unmarshalNode(this.tree,e),e+=SIZE_OF_NODE;C._free(n)}return r}firstChildForIndex(e){marshalNode(this);let t=TRANSFER_BUFFER+SIZE_OF_NODE;return C.setValue(t,e,"i32"),C._ts_node_first_child_for_byte_wasm(this.tree[0]),unmarshalNode(this.tree)}firstNamedChildForIndex(e){marshalNode(this);let t=TRANSFER_BUFFER+SIZE_OF_NODE;return C.setValue(t,e,"i32"),C._ts_node_first_named_child_for_byte_wasm(this.tree[0]),unmarshalNode(this.tree)}get childCount(){return marshalNode(this),C._ts_node_child_count_wasm(this.tree[0])}get namedChildCount(){return marshalNode(this),C._ts_node_named_child_count_wasm(this.tree[0])}get firstChild(){return this.child(0)}get firstNamedChild(){return this.namedChild(0)}get lastChild(){return this.child(this.childCount-1)}get lastNamedChild(){return this.namedChild(this.namedChildCount-1)}get children(){if(!this._children){marshalNode(this),C._ts_node_children_wasm(this.tree[0]);let e=C.getValue(TRANSFER_BUFFER,"i32"),t=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32");if(this._children=Array(e),e>0){let n=t;for(let t=0;t<e;t++)this._children[t]=unmarshalNode(this.tree,n),n+=SIZE_OF_NODE;C._free(t)}}return this._children}get namedChildren(){if(!this._namedChildren){marshalNode(this),C._ts_node_named_children_wasm(this.tree[0]);let e=C.getValue(TRANSFER_BUFFER,"i32"),t=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32");if(this._namedChildren=Array(e),e>0){let n=t;for(let t=0;t<e;t++)this._namedChildren[t]=unmarshalNode(this.tree,n),n+=SIZE_OF_NODE;C._free(t)}}return this._namedChildren}descendantsOfType(e,t=ZERO_POINT,n=ZERO_POINT){Array.isArray(e)||(e=[e]);let r=[],i=this.tree.language.types;for(let t of e)"ERROR"==t&&r.push(65535);for(let t=0,n=i.length;t<n;t++)e.includes(i[t])&&r.push(t);let s=C._malloc(SIZE_OF_INT*r.length);for(let e=0,t=r.length;e<t;e++)C.setValue(s+e*SIZE_OF_INT,r[e],"i32");marshalNode(this),C._ts_node_descendants_of_type_wasm(this.tree[0],s,r.length,t.row,t.column,n.row,n.column);let o=C.getValue(TRANSFER_BUFFER,"i32"),a=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),l=Array(o);if(o>0){let e=a;for(let t=0;t<o;t++)l[t]=unmarshalNode(this.tree,e),e+=SIZE_OF_NODE}return C._free(a),C._free(s),l}get nextSibling(){return marshalNode(this),C._ts_node_next_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get previousSibling(){return marshalNode(this),C._ts_node_prev_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get nextNamedSibling(){return marshalNode(this),C._ts_node_next_named_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get previousNamedSibling(){return marshalNode(this),C._ts_node_prev_named_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get descendantCount(){return marshalNode(this),C._ts_node_descendant_count_wasm(this.tree[0])}get parent(){return marshalNode(this),C._ts_node_parent_wasm(this.tree[0]),unmarshalNode(this.tree)}childWithDescendant(e){return marshalNode(this),marshalNode(e,1),C._ts_node_child_with_descendant_wasm(this.tree[0]),unmarshalNode(this.tree)}descendantForIndex(e,t=e){if("number"!=typeof e||"number"!=typeof t)throw Error("Arguments must be numbers");marshalNode(this);let n=TRANSFER_BUFFER+SIZE_OF_NODE;return C.setValue(n,e,"i32"),C.setValue(n+SIZE_OF_INT,t,"i32"),C._ts_node_descendant_for_index_wasm(this.tree[0]),unmarshalNode(this.tree)}namedDescendantForIndex(e,t=e){if("number"!=typeof e||"number"!=typeof t)throw Error("Arguments must be numbers");marshalNode(this);let n=TRANSFER_BUFFER+SIZE_OF_NODE;return C.setValue(n,e,"i32"),C.setValue(n+SIZE_OF_INT,t,"i32"),C._ts_node_named_descendant_for_index_wasm(this.tree[0]),unmarshalNode(this.tree)}descendantForPosition(e,t=e){if(!isPoint(e)||!isPoint(t))throw Error("Arguments must be {row, column} objects");marshalNode(this);let n=TRANSFER_BUFFER+SIZE_OF_NODE;return marshalPoint(n,e),marshalPoint(n+SIZE_OF_POINT,t),C._ts_node_descendant_for_position_wasm(this.tree[0]),unmarshalNode(this.tree)}namedDescendantForPosition(e,t=e){if(!isPoint(e)||!isPoint(t))throw Error("Arguments must be {row, column} objects");marshalNode(this);let n=TRANSFER_BUFFER+SIZE_OF_NODE;return marshalPoint(n,e),marshalPoint(n+SIZE_OF_POINT,t),C._ts_node_named_descendant_for_position_wasm(this.tree[0]),unmarshalNode(this.tree)}walk(){return marshalNode(this),C._ts_tree_cursor_new_wasm(this.tree[0]),new TreeCursor(INTERNAL,this.tree)}edit(e){if(this.startIndex>=e.oldEndIndex){let t,n;this.startIndex=e.newEndIndex+(this.startIndex-e.oldEndIndex),this.startPosition.row>e.oldEndPosition.row?(t=this.startPosition.row-e.oldEndPosition.row,n=this.startPosition.column):(t=0,n=this.startPosition.column,this.startPosition.column>=e.oldEndPosition.column&&(n=this.startPosition.column-e.oldEndPosition.column)),t>0?(this.startPosition.row+=t,this.startPosition.column=n):this.startPosition.column+=n}else this.startIndex>e.startIndex&&(this.startIndex=e.newEndIndex,this.startPosition.row=e.newEndPosition.row,this.startPosition.column=e.newEndPosition.column)}toString(){marshalNode(this);let e=C._ts_node_to_string_wasm(this.tree[0]),t=C.AsciiToString(e);return C._free(e),t}};function unmarshalCaptures(e,t,n,r,i){for(let s=0,o=i.length;s<o;s++){let o=C.getValue(n,"i32"),a=unmarshalNode(t,n+=SIZE_OF_INT);n+=SIZE_OF_NODE,i[s]={patternIndex:r,name:e.captureNames[o],node:a}}return n}function marshalNode(e,t=0){let n=TRANSFER_BUFFER+t*SIZE_OF_NODE;C.setValue(n,e.id,"i32"),n+=SIZE_OF_INT,C.setValue(n,e.startIndex,"i32"),n+=SIZE_OF_INT,C.setValue(n,e.startPosition.row,"i32"),n+=SIZE_OF_INT,C.setValue(n,e.startPosition.column,"i32"),n+=SIZE_OF_INT,C.setValue(n,e[0],"i32")}function unmarshalNode(e,t=TRANSFER_BUFFER){let n=C.getValue(t,"i32");if(t+=SIZE_OF_INT,0===n)return null;let r=C.getValue(t,"i32");t+=SIZE_OF_INT;let i=C.getValue(t,"i32");t+=SIZE_OF_INT;let s=C.getValue(t,"i32");return t+=SIZE_OF_INT,new Node(INTERNAL,{id:n,tree:e,startIndex:r,startPosition:{row:i,column:s},other:C.getValue(t,"i32")})}function marshalTreeCursor(e,t=TRANSFER_BUFFER){C.setValue(t+0*SIZE_OF_INT,e[0],"i32"),C.setValue(t+ +SIZE_OF_INT,e[1],"i32"),C.setValue(t+2*SIZE_OF_INT,e[2],"i32"),C.setValue(t+3*SIZE_OF_INT,e[3],"i32")}function unmarshalTreeCursor(e){e[0]=C.getValue(TRANSFER_BUFFER+0*SIZE_OF_INT,"i32"),e[1]=C.getValue(TRANSFER_BUFFER+ +SIZE_OF_INT,"i32"),e[2]=C.getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),e[3]=C.getValue(TRANSFER_BUFFER+3*SIZE_OF_INT,"i32")}function marshalPoint(e,t){C.setValue(e,t.row,"i32"),C.setValue(e+SIZE_OF_INT,t.column,"i32")}function unmarshalPoint(e){return{row:C.getValue(e,"i32")>>>0,column:C.getValue(e+SIZE_OF_INT,"i32")>>>0}}function marshalRange(e,t){marshalPoint(e,t.startPosition),marshalPoint(e+=SIZE_OF_POINT,t.endPosition),e+=SIZE_OF_POINT,C.setValue(e,t.startIndex,"i32"),e+=SIZE_OF_INT,C.setValue(e,t.endIndex,"i32")}function unmarshalRange(e){let t={};return t.startPosition=unmarshalPoint(e),t.endPosition=unmarshalPoint(e+=SIZE_OF_POINT),e+=SIZE_OF_POINT,t.startIndex=C.getValue(e,"i32")>>>0,e+=SIZE_OF_INT,t.endIndex=C.getValue(e,"i32")>>>0,t}function marshalEdit(e,t=TRANSFER_BUFFER){marshalPoint(t,e.startPosition),marshalPoint(t+=SIZE_OF_POINT,e.oldEndPosition),marshalPoint(t+=SIZE_OF_POINT,e.newEndPosition),t+=SIZE_OF_POINT,C.setValue(t,e.startIndex,"i32"),t+=SIZE_OF_INT,C.setValue(t,e.oldEndIndex,"i32"),t+=SIZE_OF_INT,C.setValue(t,e.newEndIndex,"i32")}function unmarshalLanguageMetadata(e){let t=C.getValue(e,"i32");return{major_version:t,minor_version:C.getValue(e+=SIZE_OF_INT,"i32"),patch_version:C.getValue(e+=SIZE_OF_INT,"i32")}}__name(unmarshalCaptures,"unmarshalCaptures"),__name(marshalNode,"marshalNode"),__name(unmarshalNode,"unmarshalNode"),__name(marshalTreeCursor,"marshalTreeCursor"),__name(unmarshalTreeCursor,"unmarshalTreeCursor"),__name(marshalPoint,"marshalPoint"),__name(unmarshalPoint,"unmarshalPoint"),__name(marshalRange,"marshalRange"),__name(unmarshalRange,"unmarshalRange"),__name(marshalEdit,"marshalEdit"),__name(unmarshalLanguageMetadata,"unmarshalLanguageMetadata");var LANGUAGE_FUNCTION_REGEX=/^tree_sitter_\w+$/,Language=class _Language{static{__name(this,"Language")}0=0;types;fields;constructor(e,t){assertInternal(e),this[0]=t,this.types=Array(C._ts_language_symbol_count(this[0]));for(let e=0,t=this.types.length;e<t;e++)2>C._ts_language_symbol_type(this[0],e)&&(this.types[e]=C.UTF8ToString(C._ts_language_symbol_name(this[0],e)));this.fields=Array(C._ts_language_field_count(this[0])+1);for(let e=0,t=this.fields.length;e<t;e++){const t=C._ts_language_field_name_for_id(this[0],e);0!==t?this.fields[e]=C.UTF8ToString(t):this.fields[e]=null}}get name(){let e=C._ts_language_name(this[0]);return 0===e?null:C.UTF8ToString(e)}get abiVersion(){return C._ts_language_abi_version(this[0])}get metadata(){return(C._ts_language_metadata_wasm(this[0]),0===C.getValue(TRANSFER_BUFFER,"i32"))?null:unmarshalLanguageMetadata(TRANSFER_BUFFER+SIZE_OF_INT)}get fieldCount(){return this.fields.length-1}get stateCount(){return C._ts_language_state_count(this[0])}fieldIdForName(e){let t=this.fields.indexOf(e);return -1!==t?t:null}fieldNameForId(e){return this.fields[e]??null}idForNodeType(e,t){let n=C.lengthBytesUTF8(e),r=C._malloc(n+1);C.stringToUTF8(e,r,n+1);let i=C._ts_language_symbol_for_name(this[0],r,n,+!!t);return C._free(r),i||null}get nodeTypeCount(){return C._ts_language_symbol_count(this[0])}nodeTypeForId(e){let t=C._ts_language_symbol_name(this[0],e);return t?C.UTF8ToString(t):null}nodeTypeIsNamed(e){return!!C._ts_language_type_is_named_wasm(this[0],e)}nodeTypeIsVisible(e){return!!C._ts_language_type_is_visible_wasm(this[0],e)}get supertypes(){C._ts_language_supertypes_wasm(this[0]);let e=C.getValue(TRANSFER_BUFFER,"i32"),t=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),n=Array(e);if(e>0){let r=t;for(let t=0;t<e;t++)n[t]=C.getValue(r,"i16"),r+=SIZE_OF_SHORT}return n}subtypes(e){C._ts_language_subtypes_wasm(this[0],e);let t=C.getValue(TRANSFER_BUFFER,"i32"),n=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),r=Array(t);if(t>0){let e=n;for(let n=0;n<t;n++)r[n]=C.getValue(e,"i16"),e+=SIZE_OF_SHORT}return r}nextState(e,t){return C._ts_language_next_state(this[0],e,t)}lookaheadIterator(e){let t=C._ts_lookahead_iterator_new(this[0],e);return t?new LookaheadIterator(INTERNAL,t,this):null}static async load(e){let t;if(e instanceof Uint8Array)t=e;else if(globalThis.process?.versions.node){let n=await __webpack_require__.e(480).then(__webpack_require__.t.bind(__webpack_require__,80480,19));t=await n.readFile(e)}else{let n=await fetch(e);if(!n.ok){let e=await n.text();throw Error(`Language.load failed with status ${n.status}.
|
|
@@ -14,7 +14,7 @@ ${n}
|
|
|
14
14
|
`)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[(0,r.tG)({find:s,type:this.type})]}}),a=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,l=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,h=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,c=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,u=r.CU.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return i("strong",{...(0,r.KV)(this.options.HTMLAttributes,e),children:i("slot",{})})},markdownTokenName:"strong",parseMarkdown:(e,t)=>t.applyMark("bold",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[(0,r.OX)({find:a,type:this.type}),(0,r.OX)({find:h,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:l,type:this.type}),(0,r.Zc)({find:c,type:this.type})]}}),d=/(^|[^`])`([^`]+)`(?!`)$/,p=/(^|[^`])`([^`]+)`(?!`)/g,f=r.CU.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:e}){return["code",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[(0,r.OX)({find:d,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:p,type:this.type})]}}),m=n(76865),g=4,_=/^```([a-z]+)?[\s\n]$/,y=/^~~~([a-z]+)?[\s\n]$/,b=r.bP.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:g,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options;if(!n)return null;let r=[...(null==(t=e.firstElementChild)?void 0:t.classList)||[]].filter(e=>e.startsWith(n)).map(e=>e.replace(n,""))[0];return r||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:e,HTMLAttributes:t}){return["pre",(0,r.KV)(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(e,t)=>{var n,r;return(null==(n=e.raw)?void 0:n.startsWith("```"))===!1&&(null==(r=e.raw)?void 0:r.startsWith("~~~"))===!1&&"indented"!==e.codeBlockStyle?[]:t.createNode("codeBlock",{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[])},renderMarkdown:(e,t)=>{var n;let r=(null==(n=e.attrs)?void 0:n.language)||"";return e.content?[`\`\`\`${r}`,t.renderChildren(e.content),"```"].join("\n"):`\`\`\`${r}
|
|
15
15
|
|
|
16
16
|
\`\`\``},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=1===t.pos;return!!e&&t.parent.type.name===this.name&&(!!n||!t.parent.textContent.length)&&this.editor.commands.clearNodes()},Tab:({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=null!=(t=this.options.tabSize)?t:g,{state:r}=e,{selection:i}=r,{$from:s,empty:o}=i;if(s.parent.type!==this.type)return!1;let a=" ".repeat(n);return o?e.commands.insertContent(a):e.commands.command(({tr:e})=>{let{from:t,to:n}=i,s=r.doc.textBetween(t,n,"\n","\n").split("\n").map(e=>a+e).join("\n");return e.replaceWith(t,n,r.schema.text(s)),!0})},"Shift-Tab":({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=null!=(t=this.options.tabSize)?t:g,{state:r}=e,{selection:i}=r,{$from:s,empty:o}=i;return s.parent.type===this.type&&(o?e.commands.command(({tr:e})=>{var t;let{pos:i}=s,o=s.start(),a=s.end(),l=r.doc.textBetween(o,a,"\n","\n").split("\n"),h=0,c=0,u=i-o;for(let e=0;e<l.length;e+=1){if(c+l[e].length>=u){h=e;break}c+=l[e].length+1}let d=Math.min(((null==(t=l[h].match(/^ */))?void 0:t[0])||"").length,n);if(0===d)return!0;let p=o;for(let e=0;e<h;e+=1)p+=l[e].length+1;return e.delete(p,p+d),i-p<=d&&e.setSelection(m.U3.create(e.doc,p)),!0}):e.commands.command(({tr:e})=>{let{from:t,to:s}=i,o=r.doc.textBetween(t,s,"\n","\n").split("\n").map(e=>{var t;let r=Math.min(((null==(t=e.match(/^ */))?void 0:t[0])||"").length,n);return e.slice(r)}).join("\n");return e.replaceWith(t,s,r.schema.text(o)),!0}))},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;let s=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith("\n\n");return!!s&&!!o&&e.chain().command(({tr:e})=>(e.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:s}=n;if(!s||i.parent.type!==this.type||i.parentOffset!==i.parent.nodeSize-2)return!1;let o=i.after();return void 0!==o&&(r.nodeAt(o)?e.commands.command(({tr:e})=>(e.setSelection(m.LN.near(r.resolve(o))),!0)):e.commands.exitCode())}}},addInputRules(){return[(0,r.JJ)({find:_,type:this.type,getAttributes:e=>({language:e[1]})}),(0,r.JJ)({find:y,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new m.k_({key:new m.hs("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,s=null==i?void 0:i.mode;if(!n||!s)return!1;let{tr:o,schema:a}=e.state,l=a.text(n.replace(/\r\n?/g,"\n"));return o.replaceSelectionWith(this.type.create({language:s},l)),o.selection.$from.parent.type!==this.type&&o.setSelection(m.U3.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.setMeta("paste",!0),e.dispatch(o),!0}}})]}}),k=r.bP.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n\n"):""}),w=r.bP.create({name:"hardBreak",markdownTokenName:"br",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",(0,r.KV)(this.options.HTMLAttributes,e)]},renderText:()=>"\n",renderMarkdown:()=>`
|
|
17
|
-
`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:e,storedMarks:i}=n;if(e.$from.parent.type.spec.isolating)return!1;let{keepMarks:s}=this.options,{splittableMarks:o}=r.extensionManager,a=i||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command(({tr:e,dispatch:t})=>{if(t&&a&&s){let t=a.filter(e=>o.includes(e.type.name));e.ensureMarks(t)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),v=r.bP.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){let n=this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0];return[`h${n}`,(0,r.KV)(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var n;let r=(null==(n=e.attrs)?void 0:n.level)?parseInt(e.attrs.level,10):1,i="#".repeat(r);return e.content?`${i} ${t.renderChildren(e.content)}`:""},addCommands(){return{setHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.setNode(this.name,e),toggleHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,...{[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}}),{})},addInputRules(){return this.options.levels.map(e=>(0,r.JJ)({find:RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}}),C=r.bP.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{},nextNodeType:"paragraph"}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:e}){return["hr",(0,r.KV)(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!(0,r.AB)(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:i}=n,s=e();return(0,r.BQ)(n)?s.insertContentAt(i.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({state:e,tr:t,dispatch:n})=>{if(n){let{$to:n}=t.selection,r=n.end();if(n.nodeAfter)n.nodeAfter.isTextblock?t.setSelection(m.U3.create(t.doc,n.pos+1)):n.nodeAfter.isBlock?t.setSelection(m.nh.create(t.doc,n.pos)):t.setSelection(m.U3.create(t.doc,n.pos));else{let i=e.schema.nodes[this.options.nextNodeType]||n.parent.type.contentMatch.defaultType,s=null==i?void 0:i.create();s&&(t.insert(r,s),t.setSelection(m.U3.create(t.doc,r+1)))}t.scrollIntoView()}return!0}).run()}}},addInputRules(){return[(0,r.Ce)({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),x=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,S=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,A=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,E=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,M=r.CU.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>"normal"!==e.style.fontStyle&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",(0,r.KV)(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(e,t)=>t.applyMark("italic",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[(0,r.OX)({find:x,type:this.type}),(0,r.OX)({find:A,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:S,type:this.type}),(0,r.Zc)({find:E,type:this.type})]}}),T=n(59265),N=n(82150),I=" ",D="\xa0",L=r.bP.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,r.KV)(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(1===n.length&&"image"===n[0].type)return t.parseChildren([n[0]]);let r=t.parseInline(n);return 1===n.length&&"text"===n[0].type&&(n[0].raw===I||n[0].text===I||n[0].raw===D||n[0].text===D)&&1===r.length&&"text"===r[0].type&&(r[0].text===I||r[0].text===D)?t.createNode("paragraph",void 0,[]):t.createNode("paragraph",void 0,r)},renderMarkdown:(e,t,n)=>{var r,i;if(!e)return"";let s=Array.isArray(e.content)?e.content:[];if(0===s.length){let e=Array.isArray(null==(r=null==n?void 0:n.previousNode)?void 0:r.content)?n.previousNode.content:[];return(null==(i=null==n?void 0:n.previousNode)?void 0:i.type)==="paragraph"&&0===e.length?I:""}return t.renderChildren(s)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),R=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,F=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,P=r.CU.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("line-through")&&{}}],renderHTML({HTMLAttributes:e}){return["s",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[(0,r.OX)({find:R,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:F,type:this.type})]}}),O=r.bP.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""}),z=r.CU.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("underline")&&{}}],renderHTML({HTMLAttributes:e}){return["u",(0,r.KV)(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown:(e,t)=>`++${t.renderChildren(e)}++`,markdownTokenizer:{name:"underline",level:"inline",start:e=>e.indexOf("++"),tokenize(e,t,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!r)return;let i=r[2].trim();return{type:"underline",raw:r[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),B=n(62678),$=r.YY.create({name:"starterKit",addExtensions(){var e,t,n,r;let i=[];return!1!==this.options.bold&&i.push(u.configure(this.options.bold)),!1!==this.options.blockquote&&i.push(o.configure(this.options.blockquote)),!1!==this.options.bulletList&&i.push(N.Rg.configure(this.options.bulletList)),!1!==this.options.code&&i.push(f.configure(this.options.code)),!1!==this.options.codeBlock&&i.push(b.configure(this.options.codeBlock)),!1!==this.options.document&&i.push(k.configure(this.options.document)),!1!==this.options.dropcursor&&i.push(B.QO.configure(this.options.dropcursor)),!1!==this.options.gapcursor&&i.push(B.vR.configure(this.options.gapcursor)),!1!==this.options.hardBreak&&i.push(w.configure(this.options.hardBreak)),!1!==this.options.heading&&i.push(v.configure(this.options.heading)),!1!==this.options.undoRedo&&i.push(B.lb.configure(this.options.undoRedo)),!1!==this.options.horizontalRule&&i.push(C.configure(this.options.horizontalRule)),!1!==this.options.italic&&i.push(M.configure(this.options.italic)),!1!==this.options.listItem&&i.push(N.ck.configure(this.options.listItem)),!1!==this.options.listKeymap&&i.push(N.it.configure(null==(e=this.options)?void 0:e.listKeymap)),!1!==this.options.link&&i.push(T.N_.configure(null==(t=this.options)?void 0:t.link)),!1!==this.options.orderedList&&i.push(N._J.configure(this.options.orderedList)),!1!==this.options.paragraph&&i.push(L.configure(this.options.paragraph)),!1!==this.options.strike&&i.push(P.configure(this.options.strike)),!1!==this.options.text&&i.push(O.configure(this.options.text)),!1!==this.options.underline&&i.push(z.configure(null==(n=this.options)?void 0:n.underline)),!1!==this.options.trailingNode&&i.push(B.JU.configure(null==(r=this.options)?void 0:r.trailingNode)),i}})},42080:(e,t,n)=>{"use strict";n.d(t,{$B:()=>u,Sd:()=>s,T2:()=>l});var r=n(8242),i=n(27050);function s(e,t=null){return function(n,r){let{$from:i,$to:s}=n.selection,a=i.blockRange(s);if(!a)return!1;let l=r?n.tr:null;return!!o(l,a,e,t)&&(r&&r(l.scrollIntoView()),!0)}}function o(e,t,n,s=null){let l=!1,h=t,c=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&0==t.startIndex){if(0==t.$from.index(t.depth-1))return!1;let e=c.resolve(t.start-2);h=new i.u$(e,e,t.depth),t.endIndex<t.parent.childCount&&(t=new i.u$(t.$from,c.resolve(t.$to.end(t.depth)),t.depth)),l=!0}let u=(0,r.oM)(h,n,s,t);return!!u&&(e&&a(e,t,u,l,n),!0)}function a(e,t,n,s,o){let a=i.FK.empty;for(let e=n.length-1;e>=0;e--)a=i.FK.from(n[e].type.create(n[e].attrs,a));e.step(new r.Wg(t.start-2*!!s,t.end,t.start,t.end,new i.Ji(a,0,0),n.length,!0));let l=0;for(let e=0;e<n.length;e++)n[e].type==o&&(l=e+1);let h=n.length-l,c=t.start+n.length-2*!!s,u=t.parent;for(let n=t.startIndex,i=t.endIndex,s=!0;n<i;n++,s=!1)!s&&(0,r.zy)(e.doc,c,h)&&(e.split(c,h),c+=2*h),c+=u.child(n).nodeSize;return e}function l(e){return function(t,n){let{$from:r,$to:i}=t.selection,s=r.blockRange(i,t=>t.childCount>0&&t.firstChild.type==e);return!!s&&(!n||(r.node(s.depth-1).type==e?h(t,n,e,s):c(t,n,s)))}}function h(e,t,n,s){let o=e.tr,a=s.end,l=s.$to.end(s.depth);a<l&&(o.step(new r.Wg(a-1,l,a,l,new i.Ji(i.FK.from(n.create(null,s.parent.copy())),1,0),1,!0)),s=new i.u$(o.doc.resolve(s.$from.pos),o.doc.resolve(l),s.depth));let h=(0,r.jP)(s);if(null==h)return!1;o.lift(s,h);let c=o.doc.resolve(o.mapping.map(a,-1)-1);return(0,r.n9)(o.doc,c.pos)&&c.nodeBefore.type==c.nodeAfter.type&&o.join(c.pos),t(o.scrollIntoView()),!0}function c(e,t,n){let s=e.tr,o=n.parent;for(let e=n.end,t=n.endIndex-1,r=n.startIndex;t>r;t--)e-=o.child(t).nodeSize,s.delete(e-1,e+1);let a=s.doc.resolve(n.start),l=a.nodeAfter;if(s.mapping.map(n.end)!=n.start+a.nodeAfter.nodeSize)return!1;let h=0==n.startIndex,c=n.endIndex==o.childCount,u=a.node(-1),d=a.index(-1);if(!u.canReplace(d+ +!h,d+1,l.content.append(c?i.FK.empty:i.FK.from(o))))return!1;let p=a.pos,f=p+l.nodeSize;return s.step(new r.Wg(p-!!h,f+ +!!c,p+1,f-1,new i.Ji((h?i.FK.empty:i.FK.from(o.copy(i.FK.empty))).append(c?i.FK.empty:i.FK.from(o.copy(i.FK.empty))),+!h,+!c),+!h)),t(s.scrollIntoView()),!0}function u(e){return function(t,n){let{$from:s,$to:o}=t.selection,a=s.blockRange(o,t=>t.childCount>0&&t.firstChild.type==e);if(!a)return!1;let l=a.startIndex;if(0==l)return!1;let h=a.parent,c=h.child(l-1);if(c.type!=e)return!1;if(n){let s=c.lastChild&&c.lastChild.type==h.type,o=i.FK.from(s?e.create():null),l=new i.Ji(i.FK.from(e.create(null,i.FK.from(h.type.create(null,o)))),s?3:1,0),u=a.start,d=a.end;n(t.tr.step(new r.Wg(u-(s?3:1),d,u,d,l,1,!0)).scrollIntoView())}return!0}}},42790:(e,t,n)=>{"use strict";n.d(t,{v:()=>l});var r,i,s,o,a=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};!function(e){e[e.EOS=0]="EOS",e[e.Text=1]="Text",e[e.Incomplete=2]="Incomplete",e[e.ESC=3]="ESC",e[e.Unknown=4]="Unknown",e[e.SGR=5]="SGR",e[e.OSCURL=6]="OSCURL"}(r||(r={}));class l{constructor(){this.VERSION="6.0.6",this.setup_palettes(),this._use_classes=!1,this.bold=!1,this.faint=!1,this.italic=!1,this.underline=!1,this.fg=this.bg=null,this._buffer="",this._url_allowlist={http:1,https:1},this._escape_html=!0,this.boldStyle="font-weight:bold",this.faintStyle="opacity:0.7",this.italicStyle="font-style:italic",this.underlineStyle="text-decoration:underline"}set use_classes(e){this._use_classes=e}get use_classes(){return this._use_classes}set url_allowlist(e){this._url_allowlist=e}get url_allowlist(){return this._url_allowlist}set escape_html(e){this._escape_html=e}get escape_html(){return this._escape_html}set boldStyle(e){this._boldStyle=e}get boldStyle(){return this._boldStyle}set faintStyle(e){this._faintStyle=e}get faintStyle(){return this._faintStyle}set italicStyle(e){this._italicStyle=e}get italicStyle(){return this._italicStyle}set underlineStyle(e){this._underlineStyle=e}get underlineStyle(){return this._underlineStyle}setup_palettes(){this.ansi_colors=[[{rgb:[0,0,0],class_name:"ansi-black"},{rgb:[187,0,0],class_name:"ansi-red"},{rgb:[0,187,0],class_name:"ansi-green"},{rgb:[187,187,0],class_name:"ansi-yellow"},{rgb:[0,0,187],class_name:"ansi-blue"},{rgb:[187,0,187],class_name:"ansi-magenta"},{rgb:[0,187,187],class_name:"ansi-cyan"},{rgb:[255,255,255],class_name:"ansi-white"}],[{rgb:[85,85,85],class_name:"ansi-bright-black"},{rgb:[255,85,85],class_name:"ansi-bright-red"},{rgb:[0,255,0],class_name:"ansi-bright-green"},{rgb:[255,255,85],class_name:"ansi-bright-yellow"},{rgb:[85,85,255],class_name:"ansi-bright-blue"},{rgb:[255,85,255],class_name:"ansi-bright-magenta"},{rgb:[85,255,255],class_name:"ansi-bright-cyan"},{rgb:[255,255,255],class_name:"ansi-bright-white"}]],this.palette_256=[],this.ansi_colors.forEach(e=>{e.forEach(e=>{this.palette_256.push(e)})});let e=[0,95,135,175,215,255];for(let t=0;t<6;++t)for(let n=0;n<6;++n)for(let r=0;r<6;++r){let i={rgb:[e[t],e[n],e[r]],class_name:"truecolor"};this.palette_256.push(i)}let t=8;for(let e=0;e<24;++e,t+=10){let e={rgb:[t,t,t],class_name:"truecolor"};this.palette_256.push(e)}}escape_txt_for_html(e){return this._escape_html?e.replace(/[&<>"']/gm,e=>"&"===e?"&":"<"===e?"<":">"===e?">":'"'===e?""":"'"===e?"'":void 0):e}append_buffer(e){var t=this._buffer+e;this._buffer=t}get_next_packet(){var e={kind:r.EOS,text:"",url:""},t=this._buffer.length;if(0==t)return e;var n=this._buffer.indexOf("\x1b");if(-1==n)return e.kind=r.Text,e.text=this._buffer,this._buffer="",e;if(n>0)return e.kind=r.Text,e.text=this._buffer.slice(0,n),this._buffer=this._buffer.slice(n),e;if(0==n){if(t<3)return e.kind=r.Incomplete,e;var l=this._buffer.charAt(1);if("["!=l&&"]"!=l&&"("!=l)return e.kind=r.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;if("["==l){this._csi_regex||(this._csi_regex=h(i||(i=a(["\n ^ # beginning of line\n #\n # First attempt\n (?: # legal sequence\n \x1b[ # CSI\n ([<-?]?) # private-mode char\n ([d;]*) # any digits or semicolons\n ([ -/]? # an intermediate modifier\n [@-~]) # the command\n )\n | # alternate (second attempt)\n (?: # illegal sequence\n \x1b[ # CSI\n [ -~]* # anything legal\n ([\0-\x1f:]) # anything illegal\n )\n "],["\n ^ # beginning of line\n #\n # First attempt\n (?: # legal sequence\n \\x1b\\[ # CSI\n ([\\x3c-\\x3f]?) # private-mode char\n ([\\d;]*) # any digits or semicolons\n ([\\x20-\\x2f]? # an intermediate modifier\n [\\x40-\\x7e]) # the command\n )\n | # alternate (second attempt)\n (?: # illegal sequence\n \\x1b\\[ # CSI\n [\\x20-\\x7e]* # anything legal\n ([\\x00-\\x1f:]) # anything illegal\n )\n "]))));let t=this._buffer.match(this._csi_regex);if(null===t)return e.kind=r.Incomplete,e;if(t[4])return e.kind=r.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;""!=t[1]||"m"!=t[3]?e.kind=r.Unknown:e.kind=r.SGR,e.text=t[2];var u=t[0].length;return this._buffer=this._buffer.slice(u),e}if("]"==l){if(t<4)return e.kind=r.Incomplete,e;if("8"!=this._buffer.charAt(2)||";"!=this._buffer.charAt(3))return e.kind=r.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;this._osc_st||(this._osc_st=c(s||(s=a(["\n (?: # legal sequence\n (\x1b\\) # ESC | # alternate\n (\x07) # BEL (what xterm did)\n )\n | # alternate (second attempt)\n ( # illegal sequence\n [\0-\x06] # anything illegal\n | # alternate\n [\b-\x1a] # anything illegal\n | # alternate\n [\x1c-\x1f] # anything illegal\n )\n "],["\n (?: # legal sequence\n (\\x1b\\\\) # ESC \\\n | # alternate\n (\\x07) # BEL (what xterm did)\n )\n | # alternate (second attempt)\n ( # illegal sequence\n [\\x00-\\x06] # anything illegal\n | # alternate\n [\\x08-\\x1a] # anything illegal\n | # alternate\n [\\x1c-\\x1f] # anything illegal\n )\n "])))),this._osc_st.lastIndex=0;{let t=this._osc_st.exec(this._buffer);if(null===t)return e.kind=r.Incomplete,e;if(t[3])return e.kind=r.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e}{let t=this._osc_st.exec(this._buffer);if(null===t)return e.kind=r.Incomplete,e;if(t[3])return e.kind=r.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e}this._osc_regex||(this._osc_regex=h(o||(o=a(["\n ^ # beginning of line\n #\n \x1b]8; # OSC Hyperlink\n [ -:<-~]* # params (excluding ;)\n ; # end of params\n ([!-~]{0,512}) # URL capture\n (?: # ST\n (?:\x1b\\) # ESC | # alternate\n (?:\x07) # BEL (what xterm did)\n )\n ([ -~]+) # TEXT capture\n \x1b]8;; # OSC Hyperlink End\n (?: # ST\n (?:\x1b\\) # ESC | # alternate\n (?:\x07) # BEL (what xterm did)\n )\n "],["\n ^ # beginning of line\n #\n \\x1b\\]8; # OSC Hyperlink\n [\\x20-\\x3a\\x3c-\\x7e]* # params (excluding ;)\n ; # end of params\n ([\\x21-\\x7e]{0,512}) # URL capture\n (?: # ST\n (?:\\x1b\\\\) # ESC \\\n | # alternate\n (?:\\x07) # BEL (what xterm did)\n )\n ([\\x20-\\x7e]+) # TEXT capture\n \\x1b\\]8;; # OSC Hyperlink End\n (?: # ST\n (?:\\x1b\\\\) # ESC \\\n | # alternate\n (?:\\x07) # BEL (what xterm did)\n )\n "]))));let n=this._buffer.match(this._osc_regex);if(null===n)return e.kind=r.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;e.kind=r.OSCURL,e.url=n[1],e.text=n[2];var u=n[0].length;return this._buffer=this._buffer.slice(u),e}if("("==l)return e.kind=r.Unknown,this._buffer=this._buffer.slice(3),e}}ansi_to_html(e){this.append_buffer(e);for(var t=[];;){var n=this.get_next_packet();if(n.kind==r.EOS||n.kind==r.Incomplete)break;n.kind!=r.ESC&&n.kind!=r.Unknown&&(n.kind==r.Text?t.push(this.transform_to_html(this.with_state(n))):n.kind==r.SGR?this.process_ansi(n):n.kind==r.OSCURL&&t.push(this.process_hyperlink(n)))}return t.join("")}with_state(e){return{bold:this.bold,faint:this.faint,italic:this.italic,underline:this.underline,fg:this.fg,bg:this.bg,text:e.text}}process_ansi(e){let t=e.text.split(";");for(;t.length>0;){let e=parseInt(t.shift(),10);if(isNaN(e)||0===e)this.fg=null,this.bg=null,this.bold=!1,this.faint=!1,this.italic=!1,this.underline=!1;else if(1===e)this.bold=!0;else if(2===e)this.faint=!0;else if(3===e)this.italic=!0;else if(4===e)this.underline=!0;else if(21===e)this.bold=!1;else if(22===e)this.faint=!1,this.bold=!1;else if(23===e)this.italic=!1;else if(24===e)this.underline=!1;else if(39===e)this.fg=null;else if(49===e)this.bg=null;else if(e>=30&&e<38)this.fg=this.ansi_colors[0][e-30];else if(e>=40&&e<48)this.bg=this.ansi_colors[0][e-40];else if(e>=90&&e<98)this.fg=this.ansi_colors[1][e-90];else if(e>=100&&e<108)this.bg=this.ansi_colors[1][e-100];else if((38===e||48===e)&&t.length>0){let n=38===e,r=t.shift();if("5"===r&&t.length>0){let e=parseInt(t.shift(),10);e>=0&&e<=255&&(n?this.fg=this.palette_256[e]:this.bg=this.palette_256[e])}if("2"===r&&t.length>2){let e=parseInt(t.shift(),10),r=parseInt(t.shift(),10),i=parseInt(t.shift(),10);if(e>=0&&e<=255&&r>=0&&r<=255&&i>=0&&i<=255){let t={rgb:[e,r,i],class_name:"truecolor"};n?this.fg=t:this.bg=t}}}}}transform_to_html(e){let t=e.text;if(0===t.length||(t=this.escape_txt_for_html(t),!e.bold&&!e.italic&&!e.faint&&!e.underline&&null===e.fg&&null===e.bg))return t;let n=[],r=[],i=e.fg,s=e.bg;e.bold&&n.push(this._boldStyle),e.faint&&n.push(this._faintStyle),e.italic&&n.push(this._italicStyle),e.underline&&n.push(this._underlineStyle),this._use_classes?(i&&("truecolor"!==i.class_name?r.push(`${i.class_name}-fg`):n.push(`color:rgb(${i.rgb.join(",")})`)),s&&("truecolor"!==s.class_name?r.push(`${s.class_name}-bg`):n.push(`background-color:rgb(${s.rgb.join(",")})`))):(i&&n.push(`color:rgb(${i.rgb.join(",")})`),s&&n.push(`background-color:rgb(${s.rgb})`));let o="",a="";return r.length&&(o=` class="${r.join(" ")}"`),n.length&&(a=` style="${n.join(";")}"`),`<span${a}${o}>${t}</span>`}process_hyperlink(e){let t=e.url.split(":");return t.length<1||!this._url_allowlist[t[0]]?"":`<a href="${this.escape_txt_for_html(e.url)}">${this.escape_txt_for_html(e.text)}</a>`}}function h(e){let t=e.raw[0],n=/^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm;return new RegExp(t.replace(n,""))}function c(e){let t=e.raw[0],n=/^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm;return RegExp(t.replace(n,""),"g")}},43203:(e,t,n)=>{"use strict";n.d(t,{n:()=>r.nA});var r=n(5989)},43561:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var r=n(62678).Or},44695:(e,t,n)=>{"use strict";n.d(t,{L:()=>r.L2});var r=n(82150)},45916:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],s=(0,r.A)("text-align-start",i)},48368:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],s=(0,r.A)("file-text",i)},48434:(e,t,n)=>{"use strict";n.d(t,{_:()=>r._0});var r=n(82150)},49698:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M8 21s-4-3-4-9 4-9 4-9",key:"uto9ud"}],["path",{d:"M16 3s4 3 4 9-4 9-4 9",key:"4w2vsq"}],["line",{x1:"15",x2:"9",y1:"9",y2:"15",key:"f7djnv"}],["line",{x1:"9",x2:"15",y1:"9",y2:"15",key:"1shsy8"}]],s=(0,r.A)("variable",i)},50538:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],s=(0,r.A)("history",i)},51914:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],s=(0,r.A)("plus",i)},52475:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],s=(0,r.A)("code",i)},53961:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],s=(0,r.A)("zap",i)},55804:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],s=(0,r.A)("circle-dot",i)},58515:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],s=(0,r.A)("square-check-big",i)},59265:(e,t,n)=>{"use strict";n.d(t,{N_:()=>tc,Ay:()=>tu});var r=n(82159);let i="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",s="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",o="numeric",a="ascii",l="alpha",h="asciinumeric",c="alphanumeric",u="domain",d="emoji",p="scheme",f="slashscheme",m="whitespace";function g(e,t){return e in t||(t[e]=[]),t[e]}function _(e,t,n){for(let r in t[o]&&(t[h]=!0,t[c]=!0),t[a]&&(t[h]=!0,t[l]=!0),t[h]&&(t[c]=!0),t[l]&&(t[c]=!0),t[c]&&(t[u]=!0),t[d]&&(t[u]=!0),t){let t=g(r,n);0>t.indexOf(e)&&t.push(e)}}function y(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function b(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}b.groups={},b.prototype={accepts(){return!!this.t},go(e){let t=this,n=t.j[e];if(n)return n;for(let n=0;n<t.jr.length;n++){let r=t.jr[n][0],i=t.jr[n][1];if(i&&r.test(e))return i}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,r)},tr(e,t,n,r){let i;return r=r||b.groups,t&&t.j?i=t:(i=new b(t),n&&r&&_(t,n,r)),this.jr.push([e,i]),i},ts(e,t,n,r){let i=this,s=e.length;if(!s)return i;for(let t=0;t<s-1;t++)i=i.tt(e[t]);return i.tt(e[s-1],t,n,r)},tt(e,t,n,r){r=r||b.groups;let i=this;if(t&&t.j)return i.j[e]=t,t;let s=t,o,a=i.go(e);return a?(Object.assign((o=new b).j,a.j),o.jr.push.apply(o.jr,a.jr),o.jd=a.jd,o.t=a.t):o=new b,s&&(r&&(o.t&&"string"==typeof o.t?_(s,Object.assign(y(o.t,r),n),r):n&&_(s,n,r)),o.t=s),i.j[e]=o,o}};let k=(e,t,n,r,i)=>e.ta(t,n,r,i),w=(e,t,n,r,i)=>e.tr(t,n,r,i),v=(e,t,n,r,i)=>e.ts(t,n,r,i),C=(e,t,n,r,i)=>e.tt(t,n,r,i),x="WORD",S="UWORD",A="ASCIINUMERICAL",E="ALPHANUMERICAL",M="LOCALHOST",T="TLD",N="UTLD",I="SCHEME",D="SLASH_SCHEME",L="NUM",R="WS",F="NL",P="OPENBRACE",O="CLOSEBRACE",z="OPENBRACKET",B="CLOSEBRACKET",$="OPENPAREN",j="CLOSEPAREN",q="OPENANGLEBRACKET",H="CLOSEANGLEBRACKET",U="FULLWIDTHLEFTPAREN",W="FULLWIDTHRIGHTPAREN",V="LEFTCORNERBRACKET",G="RIGHTCORNERBRACKET",J="LEFTWHITECORNERBRACKET",K="RIGHTWHITECORNERBRACKET",Z="FULLWIDTHLESSTHAN",X="FULLWIDTHGREATERTHAN",Q="AMPERSAND",Y="APOSTROPHE",ee="ASTERISK",et="AT",en="BACKSLASH",er="BACKTICK",ei="CARET",es="COLON",eo="COMMA",ea="DOLLAR",el="DOT",eh="EQUALS",ec="EXCLAMATION",eu="HYPHEN",ed="PERCENT",ep="PIPE",ef="PLUS",em="POUND",eg="QUERY",e_="QUOTE",ey="FULLWIDTHMIDDLEDOT",eb="SEMI",ek="SLASH",ew="TILDE",ev="UNDERSCORE",eC="EMOJI",ex="SYM";var eS=Object.freeze({__proto__:null,ALPHANUMERICAL:E,AMPERSAND:Q,APOSTROPHE:Y,ASCIINUMERICAL:A,ASTERISK:ee,AT:et,BACKSLASH:en,BACKTICK:er,CARET:ei,CLOSEANGLEBRACKET:H,CLOSEBRACE:O,CLOSEBRACKET:B,CLOSEPAREN:j,COLON:es,COMMA:eo,DOLLAR:ea,DOT:el,EMOJI:eC,EQUALS:eh,EXCLAMATION:ec,FULLWIDTHGREATERTHAN:X,FULLWIDTHLEFTPAREN:U,FULLWIDTHLESSTHAN:Z,FULLWIDTHMIDDLEDOT:ey,FULLWIDTHRIGHTPAREN:W,HYPHEN:eu,LEFTCORNERBRACKET:V,LEFTWHITECORNERBRACKET:J,LOCALHOST:M,NL:F,NUM:L,OPENANGLEBRACKET:q,OPENBRACE:P,OPENBRACKET:z,OPENPAREN:$,PERCENT:ed,PIPE:ep,PLUS:ef,POUND:em,QUERY:eg,QUOTE:e_,RIGHTCORNERBRACKET:G,RIGHTWHITECORNERBRACKET:K,SCHEME:I,SEMI:eb,SLASH:ek,SLASH_SCHEME:D,SYM:ex,TILDE:ew,TLD:T,UNDERSCORE:ev,UTLD:N,UWORD:S,WORD:x,WS:R});let eA=/[a-z]/,eE=/\p{L}/u,eM=/\p{Emoji}/u,eT=/\d/,eN=/\s/,eI="\r",eD="\n",eL="️",eR="",eF="",eP=null,eO=null;function ez(e=[]){let t={};b.groups=t;let n=new b;null==eP&&(eP=eq(i)),null==eO&&(eO=eq(s)),C(n,"'",Y),C(n,"{",P),C(n,"}",O),C(n,"[",z),C(n,"]",B),C(n,"(",$),C(n,")",j),C(n,"<",q),C(n,">",H),C(n,"(",U),C(n,")",W),C(n,"「",V),C(n,"」",G),C(n,"『",J),C(n,"』",K),C(n,"<",Z),C(n,">",X),C(n,"&",Q),C(n,"*",ee),C(n,"@",et),C(n,"`",er),C(n,"^",ei),C(n,":",es),C(n,",",eo),C(n,"$",ea),C(n,".",el),C(n,"=",eh),C(n,"!",ec),C(n,"-",eu),C(n,"%",ed),C(n,"|",ep),C(n,"+",ef),C(n,"#",em),C(n,"?",eg),C(n,'"',e_),C(n,"/",ek),C(n,";",eb),C(n,"~",ew),C(n,"_",ev),C(n,"\\",en),C(n,"・",ey);let r=w(n,eT,L,{[o]:!0});w(r,eT,r);let g=w(r,eA,A,{[h]:!0}),y=w(r,eE,E,{[c]:!0}),k=w(n,eA,x,{[a]:!0});w(k,eT,g),w(k,eA,k),w(g,eT,g),w(g,eA,g);let eB=w(n,eE,S,{[l]:!0});w(eB,eA),w(eB,eT,y),w(eB,eE,eB),w(y,eT,y),w(y,eA),w(y,eE,y);let e$=C(n,eD,F,{[m]:!0}),eH=C(n,eI,R,{[m]:!0}),eU=w(n,eN,R,{[m]:!0});C(n,eF,eU),C(eH,eD,e$),C(eH,eF,eU),w(eH,eN,eU),C(eU,eI),C(eU,eD),w(eU,eN,eU),C(eU,eF,eU);let eW=w(n,eM,eC,{[d]:!0});C(eW,"#"),w(eW,eM,eW),C(eW,eL,eW);let eV=C(eW,eR);C(eV,"#"),w(eV,eM,eW);let eG=[[eA,k],[eT,g]],eJ=[[eA,null],[eE,eB],[eT,y]];for(let e=0;e<eP.length;e++)ej(n,eP[e],T,x,eG);for(let e=0;e<eO.length;e++)ej(n,eO[e],N,S,eJ);_(T,{tld:!0,ascii:!0},t),_(N,{utld:!0,alpha:!0},t),ej(n,"file",I,x,eG),ej(n,"mailto",I,x,eG),ej(n,"http",D,x,eG),ej(n,"https",D,x,eG),ej(n,"ftp",D,x,eG),ej(n,"ftps",D,x,eG),_(I,{scheme:!0,ascii:!0},t),_(D,{slashscheme:!0,ascii:!0},t),e=e.sort((e,t)=>e[0]>t[0]?1:-1);for(let t=0;t<e.length;t++){let r=e[t][0],i=e[t][1]?{[p]:!0}:{[f]:!0};r.indexOf("-")>=0?i[u]=!0:eA.test(r)?eT.test(r)?i[h]=!0:i[a]=!0:i[o]=!0,v(n,r,r,i)}return v(n,"localhost",M,{ascii:!0}),n.jd=new b(ex),{start:n,tokens:Object.assign({groups:t},eS)}}function eB(e,t){let n=e$(t.replace(/[A-Z]/g,e=>e.toLowerCase())),r=n.length,i=[],s=0,o=0;for(;o<r;){let a=e,l=null,h=0,c=null,u=-1,d=-1;for(;o<r&&(l=a.go(n[o]));)(a=l).accepts()?(u=0,d=0,c=a):u>=0&&(u+=n[o].length,d++),h+=n[o].length,s+=n[o].length,o++;s-=u,o-=d,h-=u,i.push({t:c.t,v:t.slice(s-h,s),s:s-h,e:s})}return i}function e$(e){let t=[],n=e.length,r=0;for(;r<n;){let i,s=e.charCodeAt(r),o=s<55296||s>56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(o),r+=o.length}return t}function ej(e,t,n,r,i){let s,o=t.length;for(let n=0;n<o-1;n++){let o=t[n];e.j[o]?s=e.j[o]:((s=new b(r)).jr=i.slice(),e.j[o]=s),e=s}return(s=new b(n)).jr=i.slice(),e.j[t[o-1]]=s,s}function eq(e){let t=[],n=[],r=0,i="0123456789";for(;r<e.length;){let s=0;for(;i.indexOf(e[r+s])>=0;)s++;if(s>0){t.push(n.join(""));for(let t=parseInt(e.substring(r,r+s),10);t>0;t--)n.pop();r+=s}else n.push(e[r]),r++}return t}let eH={defaultProtocol:"http",events:null,format:eW,formatHref:eW,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function eU(e,t=null){let n=Object.assign({},eH);e&&(n=Object.assign(n,e instanceof eU?e.o:e));let r=n.ignoreTags,i=[];for(let e=0;e<r.length;e++)i.push(r[e].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}function eW(e){return e}function eV(e,t){this.t="token",this.v=e,this.tk=t}function eG(e,t){class n extends eV{constructor(t,n){super(t,n),this.t=e}}for(let e in t)n.prototype[e]=t[e];return n.t=e,n}eU.prototype={o:eH,ignoreTags:[],defaultRender:e=>e,check(e){return this.get("validate",e.toString(),e)},get(e,t,n){let r=null!=t,i=this.o[e];return i&&("object"==typeof i?"function"==typeof(i=n.t in i?i[n.t]:eH[e])&&r&&(i=i(t,n)):"function"==typeof i&&r&&(i=i(t,n.t,n))),i},getObj(e,t,n){let r=this.o[e];return"function"==typeof r&&null!=t&&(r=r(t,n.t,n)),r},render(e){let t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}},eV.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=eH.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),i=e.get("tagName",n,t),s=this.toFormattedString(e),o={},a=e.get("className",n,t),l=e.get("target",n,t),h=e.get("rel",n,t),c=e.getObj("attributes",n,t),u=e.getObj("events",n,t);return o.href=r,a&&(o.class=a),l&&(o.target=l),h&&(o.rel=h),c&&Object.assign(o,c),{tagName:i,attributes:o,content:s,eventListeners:u}}};let eJ=eG("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),eK=eG("text"),eZ=eG("nl"),eX=eG("url",{isLink:!0,toHref(e=eH.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==M&&e[1].t===es}}),eQ=e=>new b(e);function eY({groups:e}){let t=e.domain.concat([Q,ee,et,en,er,ei,ea,eh,eu,L,ed,ep,ef,em,ek,ex,ew,ev]),n=[Y,es,eo,el,ec,ed,eg,e_,eb,q,H,P,O,B,z,$,j,U,W,V,G,J,K,Z,X],r=[Q,Y,ee,en,er,ei,ea,eh,eu,P,O,ed,ep,ef,em,eg,ek,ex,ew,ev],i=eQ(),s=C(i,ew);k(s,r,s),k(s,e.domain,s);let o=eQ(),a=eQ(),l=eQ();k(i,e.domain,o),k(i,e.scheme,a),k(i,e.slashscheme,l),k(o,r,s),k(o,e.domain,o);let h=C(o,et);C(s,et,h),C(a,et,h),C(l,et,h);let c=C(s,el);k(c,r,s),k(c,e.domain,s);let u=eQ();k(h,e.domain,u),k(u,e.domain,u);let d=C(u,el);k(d,e.domain,u);let p=eQ(eJ);k(d,e.tld,p),k(d,e.utld,p),C(h,M,p);let f=C(u,eu);C(f,eu,f),k(f,e.domain,u),k(p,e.domain,u),C(p,el,d),C(p,eu,f),k(C(p,es),e.numeric,eJ);let m=C(o,eu),g=C(o,el);C(m,eu,m),k(m,e.domain,o),k(g,r,s),k(g,e.domain,o);let _=eQ(eX);k(g,e.tld,_),k(g,e.utld,_),k(_,e.domain,o),k(_,r,s),C(_,el,g),C(_,eu,m),C(_,et,h);let y=C(_,es),b=eQ(eX);k(y,e.numeric,b);let w=eQ(eX),v=eQ();k(w,t,w),k(w,n,v),k(v,t,w),k(v,n,v),C(_,ek,w),C(b,ek,w);let x=C(a,es),S=C(l,es),A=C(S,ek),E=C(A,ek);k(a,e.domain,o),C(a,el,g),C(a,eu,m),k(l,e.domain,o),C(l,el,g),C(l,eu,m),k(x,e.domain,w),C(x,ek,w),C(x,eg,w),k(E,e.domain,w),k(E,t,w),C(E,ek,w);let T=[[P,O],[z,B],[$,j],[q,H],[U,W],[V,G],[J,K],[Z,X]];for(let e=0;e<T.length;e++){let[r,i]=T[e],s=C(w,r);C(v,r,s),C(s,i,w);let o=eQ(eX);k(s,t,o);let a=eQ();k(s,n),k(o,t,o),k(o,n,a),k(a,t,o),k(a,n,a),C(o,i,w),C(a,i,w)}return C(i,M,_),C(i,F,eZ),{start:i,tokens:eS}}function e0(e,t,n){let r=n.length,i=0,s=[],o=[];for(;i<r;){let a=e,l=null,h=null,c=0,u=null,d=-1;for(;i<r&&!(l=a.go(n[i].t));)o.push(n[i++]);for(;i<r&&(h=l||a.go(n[i].t));)l=null,(a=h).accepts()?(d=0,u=a):d>=0&&d++,i++,c++;if(d<0)(i-=c)<r&&(o.push(n[i]),i++);else{o.length>0&&(s.push(e1(eK,t,o)),o=[]),i-=d,c-=d;let e=u.t,r=n.slice(i-c,i);s.push(e1(e,t,r))}}return o.length>0&&s.push(e1(eK,t,o)),s}function e1(e,t,n){let r=n[0].s,i=n[n.length-1].e;return new e(t.slice(r,i),n)}let e2="u">typeof console&&console&&console.warn||(()=>{}),e3="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",e5={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function e4(){return b.groups={},e5.scanner=null,e5.parser=null,e5.tokenQueue=[],e5.pluginQueue=[],e5.customSchemes=[],e5.initialized=!1,e5}function e6(e,t=!1){if(e5.initialized&&e2(`linkifyjs: already initialized - will not register custom scheme "${e}" ${e3}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw Error(`linkifyjs: incorrect scheme format.
|
|
17
|
+
`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:e,storedMarks:i}=n;if(e.$from.parent.type.spec.isolating)return!1;let{keepMarks:s}=this.options,{splittableMarks:o}=r.extensionManager,a=i||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command(({tr:e,dispatch:t})=>{if(t&&a&&s){let t=a.filter(e=>o.includes(e.type.name));e.ensureMarks(t)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),v=r.bP.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){let n=this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0];return[`h${n}`,(0,r.KV)(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var n;let r=(null==(n=e.attrs)?void 0:n.level)?parseInt(e.attrs.level,10):1,i="#".repeat(r);return e.content?`${i} ${t.renderChildren(e.content)}`:""},addCommands(){return{setHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.setNode(this.name,e),toggleHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,...{[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}}),{})},addInputRules(){return this.options.levels.map(e=>(0,r.JJ)({find:RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}}),C=r.bP.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{},nextNodeType:"paragraph"}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:e}){return["hr",(0,r.KV)(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!(0,r.AB)(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:i}=n,s=e();return(0,r.BQ)(n)?s.insertContentAt(i.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({state:e,tr:t,dispatch:n})=>{if(n){let{$to:n}=t.selection,r=n.end();if(n.nodeAfter)n.nodeAfter.isTextblock?t.setSelection(m.U3.create(t.doc,n.pos+1)):n.nodeAfter.isBlock?t.setSelection(m.nh.create(t.doc,n.pos)):t.setSelection(m.U3.create(t.doc,n.pos));else{let i=e.schema.nodes[this.options.nextNodeType]||n.parent.type.contentMatch.defaultType,s=null==i?void 0:i.create();s&&(t.insert(r,s),t.setSelection(m.U3.create(t.doc,r+1)))}t.scrollIntoView()}return!0}).run()}}},addInputRules(){return[(0,r.Ce)({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),x=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,S=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,A=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,E=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,M=r.CU.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>"normal"!==e.style.fontStyle&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",(0,r.KV)(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(e,t)=>t.applyMark("italic",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[(0,r.OX)({find:x,type:this.type}),(0,r.OX)({find:A,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:S,type:this.type}),(0,r.Zc)({find:E,type:this.type})]}}),T=n(59265),N=n(82150),I=" ",D="\xa0",L=r.bP.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,r.KV)(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(1===n.length&&"image"===n[0].type)return t.parseChildren([n[0]]);let r=t.parseInline(n);return 1===n.length&&"text"===n[0].type&&(n[0].raw===I||n[0].text===I||n[0].raw===D||n[0].text===D)&&1===r.length&&"text"===r[0].type&&(r[0].text===I||r[0].text===D)?t.createNode("paragraph",void 0,[]):t.createNode("paragraph",void 0,r)},renderMarkdown:(e,t,n)=>{var r,i;if(!e)return"";let s=Array.isArray(e.content)?e.content:[];if(0===s.length){let e=Array.isArray(null==(r=null==n?void 0:n.previousNode)?void 0:r.content)?n.previousNode.content:[];return(null==(i=null==n?void 0:n.previousNode)?void 0:i.type)==="paragraph"&&0===e.length?I:""}return t.renderChildren(s)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),R=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,F=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,P=r.CU.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("line-through")&&{}}],renderHTML({HTMLAttributes:e}){return["s",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[(0,r.OX)({find:R,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:F,type:this.type})]}}),O=r.bP.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""}),z=r.CU.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("underline")&&{}}],renderHTML({HTMLAttributes:e}){return["u",(0,r.KV)(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown:(e,t)=>`++${t.renderChildren(e)}++`,markdownTokenizer:{name:"underline",level:"inline",start:e=>e.indexOf("++"),tokenize(e,t,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!r)return;let i=r[2].trim();return{type:"underline",raw:r[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),B=n(62678),$=r.YY.create({name:"starterKit",addExtensions(){var e,t,n,r;let i=[];return!1!==this.options.bold&&i.push(u.configure(this.options.bold)),!1!==this.options.blockquote&&i.push(o.configure(this.options.blockquote)),!1!==this.options.bulletList&&i.push(N.Rg.configure(this.options.bulletList)),!1!==this.options.code&&i.push(f.configure(this.options.code)),!1!==this.options.codeBlock&&i.push(b.configure(this.options.codeBlock)),!1!==this.options.document&&i.push(k.configure(this.options.document)),!1!==this.options.dropcursor&&i.push(B.QO.configure(this.options.dropcursor)),!1!==this.options.gapcursor&&i.push(B.vR.configure(this.options.gapcursor)),!1!==this.options.hardBreak&&i.push(w.configure(this.options.hardBreak)),!1!==this.options.heading&&i.push(v.configure(this.options.heading)),!1!==this.options.undoRedo&&i.push(B.lb.configure(this.options.undoRedo)),!1!==this.options.horizontalRule&&i.push(C.configure(this.options.horizontalRule)),!1!==this.options.italic&&i.push(M.configure(this.options.italic)),!1!==this.options.listItem&&i.push(N.ck.configure(this.options.listItem)),!1!==this.options.listKeymap&&i.push(N.it.configure(null==(e=this.options)?void 0:e.listKeymap)),!1!==this.options.link&&i.push(T.N_.configure(null==(t=this.options)?void 0:t.link)),!1!==this.options.orderedList&&i.push(N._J.configure(this.options.orderedList)),!1!==this.options.paragraph&&i.push(L.configure(this.options.paragraph)),!1!==this.options.strike&&i.push(P.configure(this.options.strike)),!1!==this.options.text&&i.push(O.configure(this.options.text)),!1!==this.options.underline&&i.push(z.configure(null==(n=this.options)?void 0:n.underline)),!1!==this.options.trailingNode&&i.push(B.JU.configure(null==(r=this.options)?void 0:r.trailingNode)),i}})},42080:(e,t,n)=>{"use strict";n.d(t,{$B:()=>u,Sd:()=>s,T2:()=>l});var r=n(8242),i=n(27050);function s(e,t=null){return function(n,r){let{$from:i,$to:s}=n.selection,a=i.blockRange(s);if(!a)return!1;let l=r?n.tr:null;return!!o(l,a,e,t)&&(r&&r(l.scrollIntoView()),!0)}}function o(e,t,n,s=null){let l=!1,h=t,c=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&0==t.startIndex){if(0==t.$from.index(t.depth-1))return!1;let e=c.resolve(t.start-2);h=new i.u$(e,e,t.depth),t.endIndex<t.parent.childCount&&(t=new i.u$(t.$from,c.resolve(t.$to.end(t.depth)),t.depth)),l=!0}let u=(0,r.oM)(h,n,s,t);return!!u&&(e&&a(e,t,u,l,n),!0)}function a(e,t,n,s,o){let a=i.FK.empty;for(let e=n.length-1;e>=0;e--)a=i.FK.from(n[e].type.create(n[e].attrs,a));e.step(new r.Wg(t.start-2*!!s,t.end,t.start,t.end,new i.Ji(a,0,0),n.length,!0));let l=0;for(let e=0;e<n.length;e++)n[e].type==o&&(l=e+1);let h=n.length-l,c=t.start+n.length-2*!!s,u=t.parent;for(let n=t.startIndex,i=t.endIndex,s=!0;n<i;n++,s=!1)!s&&(0,r.zy)(e.doc,c,h)&&(e.split(c,h),c+=2*h),c+=u.child(n).nodeSize;return e}function l(e){return function(t,n){let{$from:r,$to:i}=t.selection,s=r.blockRange(i,t=>t.childCount>0&&t.firstChild.type==e);return!!s&&(!n||(r.node(s.depth-1).type==e?h(t,n,e,s):c(t,n,s)))}}function h(e,t,n,s){let o=e.tr,a=s.end,l=s.$to.end(s.depth);a<l&&(o.step(new r.Wg(a-1,l,a,l,new i.Ji(i.FK.from(n.create(null,s.parent.copy())),1,0),1,!0)),s=new i.u$(o.doc.resolve(s.$from.pos),o.doc.resolve(l),s.depth));let h=(0,r.jP)(s);if(null==h)return!1;o.lift(s,h);let c=o.doc.resolve(o.mapping.map(a,-1)-1);return(0,r.n9)(o.doc,c.pos)&&c.nodeBefore.type==c.nodeAfter.type&&o.join(c.pos),t(o.scrollIntoView()),!0}function c(e,t,n){let s=e.tr,o=n.parent;for(let e=n.end,t=n.endIndex-1,r=n.startIndex;t>r;t--)e-=o.child(t).nodeSize,s.delete(e-1,e+1);let a=s.doc.resolve(n.start),l=a.nodeAfter;if(s.mapping.map(n.end)!=n.start+a.nodeAfter.nodeSize)return!1;let h=0==n.startIndex,c=n.endIndex==o.childCount,u=a.node(-1),d=a.index(-1);if(!u.canReplace(d+ +!h,d+1,l.content.append(c?i.FK.empty:i.FK.from(o))))return!1;let p=a.pos,f=p+l.nodeSize;return s.step(new r.Wg(p-!!h,f+ +!!c,p+1,f-1,new i.Ji((h?i.FK.empty:i.FK.from(o.copy(i.FK.empty))).append(c?i.FK.empty:i.FK.from(o.copy(i.FK.empty))),+!h,+!c),+!h)),t(s.scrollIntoView()),!0}function u(e){return function(t,n){let{$from:s,$to:o}=t.selection,a=s.blockRange(o,t=>t.childCount>0&&t.firstChild.type==e);if(!a)return!1;let l=a.startIndex;if(0==l)return!1;let h=a.parent,c=h.child(l-1);if(c.type!=e)return!1;if(n){let s=c.lastChild&&c.lastChild.type==h.type,o=i.FK.from(s?e.create():null),l=new i.Ji(i.FK.from(e.create(null,i.FK.from(h.type.create(null,o)))),s?3:1,0),u=a.start,d=a.end;n(t.tr.step(new r.Wg(u-(s?3:1),d,u,d,l,1,!0)).scrollIntoView())}return!0}}},42790:(e,t,n)=>{"use strict";n.d(t,{v:()=>l});var r,i,s,o,a=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};!function(e){e[e.EOS=0]="EOS",e[e.Text=1]="Text",e[e.Incomplete=2]="Incomplete",e[e.ESC=3]="ESC",e[e.Unknown=4]="Unknown",e[e.SGR=5]="SGR",e[e.OSCURL=6]="OSCURL"}(r||(r={}));class l{constructor(){this.VERSION="6.0.6",this.setup_palettes(),this._use_classes=!1,this.bold=!1,this.faint=!1,this.italic=!1,this.underline=!1,this.fg=this.bg=null,this._buffer="",this._url_allowlist={http:1,https:1},this._escape_html=!0,this.boldStyle="font-weight:bold",this.faintStyle="opacity:0.7",this.italicStyle="font-style:italic",this.underlineStyle="text-decoration:underline"}set use_classes(e){this._use_classes=e}get use_classes(){return this._use_classes}set url_allowlist(e){this._url_allowlist=e}get url_allowlist(){return this._url_allowlist}set escape_html(e){this._escape_html=e}get escape_html(){return this._escape_html}set boldStyle(e){this._boldStyle=e}get boldStyle(){return this._boldStyle}set faintStyle(e){this._faintStyle=e}get faintStyle(){return this._faintStyle}set italicStyle(e){this._italicStyle=e}get italicStyle(){return this._italicStyle}set underlineStyle(e){this._underlineStyle=e}get underlineStyle(){return this._underlineStyle}setup_palettes(){this.ansi_colors=[[{rgb:[0,0,0],class_name:"ansi-black"},{rgb:[187,0,0],class_name:"ansi-red"},{rgb:[0,187,0],class_name:"ansi-green"},{rgb:[187,187,0],class_name:"ansi-yellow"},{rgb:[0,0,187],class_name:"ansi-blue"},{rgb:[187,0,187],class_name:"ansi-magenta"},{rgb:[0,187,187],class_name:"ansi-cyan"},{rgb:[255,255,255],class_name:"ansi-white"}],[{rgb:[85,85,85],class_name:"ansi-bright-black"},{rgb:[255,85,85],class_name:"ansi-bright-red"},{rgb:[0,255,0],class_name:"ansi-bright-green"},{rgb:[255,255,85],class_name:"ansi-bright-yellow"},{rgb:[85,85,255],class_name:"ansi-bright-blue"},{rgb:[255,85,255],class_name:"ansi-bright-magenta"},{rgb:[85,255,255],class_name:"ansi-bright-cyan"},{rgb:[255,255,255],class_name:"ansi-bright-white"}]],this.palette_256=[],this.ansi_colors.forEach(e=>{e.forEach(e=>{this.palette_256.push(e)})});let e=[0,95,135,175,215,255];for(let t=0;t<6;++t)for(let n=0;n<6;++n)for(let r=0;r<6;++r){let i={rgb:[e[t],e[n],e[r]],class_name:"truecolor"};this.palette_256.push(i)}let t=8;for(let e=0;e<24;++e,t+=10){let e={rgb:[t,t,t],class_name:"truecolor"};this.palette_256.push(e)}}escape_txt_for_html(e){return this._escape_html?e.replace(/[&<>"']/gm,e=>"&"===e?"&":"<"===e?"<":">"===e?">":'"'===e?""":"'"===e?"'":void 0):e}append_buffer(e){var t=this._buffer+e;this._buffer=t}get_next_packet(){var e={kind:r.EOS,text:"",url:""},t=this._buffer.length;if(0==t)return e;var n=this._buffer.indexOf("\x1b");if(-1==n)return e.kind=r.Text,e.text=this._buffer,this._buffer="",e;if(n>0)return e.kind=r.Text,e.text=this._buffer.slice(0,n),this._buffer=this._buffer.slice(n),e;if(0==n){if(t<3)return e.kind=r.Incomplete,e;var l=this._buffer.charAt(1);if("["!=l&&"]"!=l&&"("!=l)return e.kind=r.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;if("["==l){this._csi_regex||(this._csi_regex=h(i||(i=a(["\n ^ # beginning of line\n #\n # First attempt\n (?: # legal sequence\n \x1b[ # CSI\n ([<-?]?) # private-mode char\n ([d;]*) # any digits or semicolons\n ([ -/]? # an intermediate modifier\n [@-~]) # the command\n )\n | # alternate (second attempt)\n (?: # illegal sequence\n \x1b[ # CSI\n [ -~]* # anything legal\n ([\0-\x1f:]) # anything illegal\n )\n "],["\n ^ # beginning of line\n #\n # First attempt\n (?: # legal sequence\n \\x1b\\[ # CSI\n ([\\x3c-\\x3f]?) # private-mode char\n ([\\d;]*) # any digits or semicolons\n ([\\x20-\\x2f]? # an intermediate modifier\n [\\x40-\\x7e]) # the command\n )\n | # alternate (second attempt)\n (?: # illegal sequence\n \\x1b\\[ # CSI\n [\\x20-\\x7e]* # anything legal\n ([\\x00-\\x1f:]) # anything illegal\n )\n "]))));let t=this._buffer.match(this._csi_regex);if(null===t)return e.kind=r.Incomplete,e;if(t[4])return e.kind=r.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;""!=t[1]||"m"!=t[3]?e.kind=r.Unknown:e.kind=r.SGR,e.text=t[2];var u=t[0].length;return this._buffer=this._buffer.slice(u),e}if("]"==l){if(t<4)return e.kind=r.Incomplete,e;if("8"!=this._buffer.charAt(2)||";"!=this._buffer.charAt(3))return e.kind=r.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;this._osc_st||(this._osc_st=c(s||(s=a(["\n (?: # legal sequence\n (\x1b\\) # ESC | # alternate\n (\x07) # BEL (what xterm did)\n )\n | # alternate (second attempt)\n ( # illegal sequence\n [\0-\x06] # anything illegal\n | # alternate\n [\b-\x1a] # anything illegal\n | # alternate\n [\x1c-\x1f] # anything illegal\n )\n "],["\n (?: # legal sequence\n (\\x1b\\\\) # ESC \\\n | # alternate\n (\\x07) # BEL (what xterm did)\n )\n | # alternate (second attempt)\n ( # illegal sequence\n [\\x00-\\x06] # anything illegal\n | # alternate\n [\\x08-\\x1a] # anything illegal\n | # alternate\n [\\x1c-\\x1f] # anything illegal\n )\n "])))),this._osc_st.lastIndex=0;{let t=this._osc_st.exec(this._buffer);if(null===t)return e.kind=r.Incomplete,e;if(t[3])return e.kind=r.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e}{let t=this._osc_st.exec(this._buffer);if(null===t)return e.kind=r.Incomplete,e;if(t[3])return e.kind=r.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e}this._osc_regex||(this._osc_regex=h(o||(o=a(["\n ^ # beginning of line\n #\n \x1b]8; # OSC Hyperlink\n [ -:<-~]* # params (excluding ;)\n ; # end of params\n ([!-~]{0,512}) # URL capture\n (?: # ST\n (?:\x1b\\) # ESC | # alternate\n (?:\x07) # BEL (what xterm did)\n )\n ([ -~]+) # TEXT capture\n \x1b]8;; # OSC Hyperlink End\n (?: # ST\n (?:\x1b\\) # ESC | # alternate\n (?:\x07) # BEL (what xterm did)\n )\n "],["\n ^ # beginning of line\n #\n \\x1b\\]8; # OSC Hyperlink\n [\\x20-\\x3a\\x3c-\\x7e]* # params (excluding ;)\n ; # end of params\n ([\\x21-\\x7e]{0,512}) # URL capture\n (?: # ST\n (?:\\x1b\\\\) # ESC \\\n | # alternate\n (?:\\x07) # BEL (what xterm did)\n )\n ([\\x20-\\x7e]+) # TEXT capture\n \\x1b\\]8;; # OSC Hyperlink End\n (?: # ST\n (?:\\x1b\\\\) # ESC \\\n | # alternate\n (?:\\x07) # BEL (what xterm did)\n )\n "]))));let n=this._buffer.match(this._osc_regex);if(null===n)return e.kind=r.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;e.kind=r.OSCURL,e.url=n[1],e.text=n[2];var u=n[0].length;return this._buffer=this._buffer.slice(u),e}if("("==l)return e.kind=r.Unknown,this._buffer=this._buffer.slice(3),e}}ansi_to_html(e){this.append_buffer(e);for(var t=[];;){var n=this.get_next_packet();if(n.kind==r.EOS||n.kind==r.Incomplete)break;n.kind!=r.ESC&&n.kind!=r.Unknown&&(n.kind==r.Text?t.push(this.transform_to_html(this.with_state(n))):n.kind==r.SGR?this.process_ansi(n):n.kind==r.OSCURL&&t.push(this.process_hyperlink(n)))}return t.join("")}with_state(e){return{bold:this.bold,faint:this.faint,italic:this.italic,underline:this.underline,fg:this.fg,bg:this.bg,text:e.text}}process_ansi(e){let t=e.text.split(";");for(;t.length>0;){let e=parseInt(t.shift(),10);if(isNaN(e)||0===e)this.fg=null,this.bg=null,this.bold=!1,this.faint=!1,this.italic=!1,this.underline=!1;else if(1===e)this.bold=!0;else if(2===e)this.faint=!0;else if(3===e)this.italic=!0;else if(4===e)this.underline=!0;else if(21===e)this.bold=!1;else if(22===e)this.faint=!1,this.bold=!1;else if(23===e)this.italic=!1;else if(24===e)this.underline=!1;else if(39===e)this.fg=null;else if(49===e)this.bg=null;else if(e>=30&&e<38)this.fg=this.ansi_colors[0][e-30];else if(e>=40&&e<48)this.bg=this.ansi_colors[0][e-40];else if(e>=90&&e<98)this.fg=this.ansi_colors[1][e-90];else if(e>=100&&e<108)this.bg=this.ansi_colors[1][e-100];else if((38===e||48===e)&&t.length>0){let n=38===e,r=t.shift();if("5"===r&&t.length>0){let e=parseInt(t.shift(),10);e>=0&&e<=255&&(n?this.fg=this.palette_256[e]:this.bg=this.palette_256[e])}if("2"===r&&t.length>2){let e=parseInt(t.shift(),10),r=parseInt(t.shift(),10),i=parseInt(t.shift(),10);if(e>=0&&e<=255&&r>=0&&r<=255&&i>=0&&i<=255){let t={rgb:[e,r,i],class_name:"truecolor"};n?this.fg=t:this.bg=t}}}}}transform_to_html(e){let t=e.text;if(0===t.length||(t=this.escape_txt_for_html(t),!e.bold&&!e.italic&&!e.faint&&!e.underline&&null===e.fg&&null===e.bg))return t;let n=[],r=[],i=e.fg,s=e.bg;e.bold&&n.push(this._boldStyle),e.faint&&n.push(this._faintStyle),e.italic&&n.push(this._italicStyle),e.underline&&n.push(this._underlineStyle),this._use_classes?(i&&("truecolor"!==i.class_name?r.push(`${i.class_name}-fg`):n.push(`color:rgb(${i.rgb.join(",")})`)),s&&("truecolor"!==s.class_name?r.push(`${s.class_name}-bg`):n.push(`background-color:rgb(${s.rgb.join(",")})`))):(i&&n.push(`color:rgb(${i.rgb.join(",")})`),s&&n.push(`background-color:rgb(${s.rgb})`));let o="",a="";return r.length&&(o=` class="${r.join(" ")}"`),n.length&&(a=` style="${n.join(";")}"`),`<span${a}${o}>${t}</span>`}process_hyperlink(e){let t=e.url.split(":");return t.length<1||!this._url_allowlist[t[0]]?"":`<a href="${this.escape_txt_for_html(e.url)}">${this.escape_txt_for_html(e.text)}</a>`}}function h(e){let t=e.raw[0],n=/^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm;return new RegExp(t.replace(n,""))}function c(e){let t=e.raw[0],n=/^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm;return RegExp(t.replace(n,""),"g")}},43203:(e,t,n)=>{"use strict";n.d(t,{n:()=>r.nA});var r=n(5989)},43561:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var r=n(62678).Or},44695:(e,t,n)=>{"use strict";n.d(t,{L:()=>r.L2});var r=n(82150)},45916:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],s=(0,r.A)("text-align-start",i)},48368:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],s=(0,r.A)("file-text",i)},48434:(e,t,n)=>{"use strict";n.d(t,{_:()=>r._0});var r=n(82150)},49698:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M8 21s-4-3-4-9 4-9 4-9",key:"uto9ud"}],["path",{d:"M16 3s4 3 4 9-4 9-4 9",key:"4w2vsq"}],["line",{x1:"15",x2:"9",y1:"9",y2:"15",key:"f7djnv"}],["line",{x1:"9",x2:"15",y1:"9",y2:"15",key:"1shsy8"}]],s=(0,r.A)("variable",i)},50538:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],s=(0,r.A)("history",i)},51914:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],s=(0,r.A)("plus",i)},52475:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],s=(0,r.A)("code",i)},53961:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],s=(0,r.A)("zap",i)},55804:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],s=(0,r.A)("circle-dot",i)},56204:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],s=(0,r.A)("send",i)},58515:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],s=(0,r.A)("square-check-big",i)},59265:(e,t,n)=>{"use strict";n.d(t,{N_:()=>tc,Ay:()=>tu});var r=n(82159);let i="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",s="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",o="numeric",a="ascii",l="alpha",h="asciinumeric",c="alphanumeric",u="domain",d="emoji",p="scheme",f="slashscheme",m="whitespace";function g(e,t){return e in t||(t[e]=[]),t[e]}function _(e,t,n){for(let r in t[o]&&(t[h]=!0,t[c]=!0),t[a]&&(t[h]=!0,t[l]=!0),t[h]&&(t[c]=!0),t[l]&&(t[c]=!0),t[c]&&(t[u]=!0),t[d]&&(t[u]=!0),t){let t=g(r,n);0>t.indexOf(e)&&t.push(e)}}function y(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function b(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}b.groups={},b.prototype={accepts(){return!!this.t},go(e){let t=this,n=t.j[e];if(n)return n;for(let n=0;n<t.jr.length;n++){let r=t.jr[n][0],i=t.jr[n][1];if(i&&r.test(e))return i}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,r)},tr(e,t,n,r){let i;return r=r||b.groups,t&&t.j?i=t:(i=new b(t),n&&r&&_(t,n,r)),this.jr.push([e,i]),i},ts(e,t,n,r){let i=this,s=e.length;if(!s)return i;for(let t=0;t<s-1;t++)i=i.tt(e[t]);return i.tt(e[s-1],t,n,r)},tt(e,t,n,r){r=r||b.groups;let i=this;if(t&&t.j)return i.j[e]=t,t;let s=t,o,a=i.go(e);return a?(Object.assign((o=new b).j,a.j),o.jr.push.apply(o.jr,a.jr),o.jd=a.jd,o.t=a.t):o=new b,s&&(r&&(o.t&&"string"==typeof o.t?_(s,Object.assign(y(o.t,r),n),r):n&&_(s,n,r)),o.t=s),i.j[e]=o,o}};let k=(e,t,n,r,i)=>e.ta(t,n,r,i),w=(e,t,n,r,i)=>e.tr(t,n,r,i),v=(e,t,n,r,i)=>e.ts(t,n,r,i),C=(e,t,n,r,i)=>e.tt(t,n,r,i),x="WORD",S="UWORD",A="ASCIINUMERICAL",E="ALPHANUMERICAL",M="LOCALHOST",T="TLD",N="UTLD",I="SCHEME",D="SLASH_SCHEME",L="NUM",R="WS",F="NL",P="OPENBRACE",O="CLOSEBRACE",z="OPENBRACKET",B="CLOSEBRACKET",$="OPENPAREN",j="CLOSEPAREN",q="OPENANGLEBRACKET",H="CLOSEANGLEBRACKET",U="FULLWIDTHLEFTPAREN",W="FULLWIDTHRIGHTPAREN",V="LEFTCORNERBRACKET",G="RIGHTCORNERBRACKET",J="LEFTWHITECORNERBRACKET",K="RIGHTWHITECORNERBRACKET",Z="FULLWIDTHLESSTHAN",X="FULLWIDTHGREATERTHAN",Q="AMPERSAND",Y="APOSTROPHE",ee="ASTERISK",et="AT",en="BACKSLASH",er="BACKTICK",ei="CARET",es="COLON",eo="COMMA",ea="DOLLAR",el="DOT",eh="EQUALS",ec="EXCLAMATION",eu="HYPHEN",ed="PERCENT",ep="PIPE",ef="PLUS",em="POUND",eg="QUERY",e_="QUOTE",ey="FULLWIDTHMIDDLEDOT",eb="SEMI",ek="SLASH",ew="TILDE",ev="UNDERSCORE",eC="EMOJI",ex="SYM";var eS=Object.freeze({__proto__:null,ALPHANUMERICAL:E,AMPERSAND:Q,APOSTROPHE:Y,ASCIINUMERICAL:A,ASTERISK:ee,AT:et,BACKSLASH:en,BACKTICK:er,CARET:ei,CLOSEANGLEBRACKET:H,CLOSEBRACE:O,CLOSEBRACKET:B,CLOSEPAREN:j,COLON:es,COMMA:eo,DOLLAR:ea,DOT:el,EMOJI:eC,EQUALS:eh,EXCLAMATION:ec,FULLWIDTHGREATERTHAN:X,FULLWIDTHLEFTPAREN:U,FULLWIDTHLESSTHAN:Z,FULLWIDTHMIDDLEDOT:ey,FULLWIDTHRIGHTPAREN:W,HYPHEN:eu,LEFTCORNERBRACKET:V,LEFTWHITECORNERBRACKET:J,LOCALHOST:M,NL:F,NUM:L,OPENANGLEBRACKET:q,OPENBRACE:P,OPENBRACKET:z,OPENPAREN:$,PERCENT:ed,PIPE:ep,PLUS:ef,POUND:em,QUERY:eg,QUOTE:e_,RIGHTCORNERBRACKET:G,RIGHTWHITECORNERBRACKET:K,SCHEME:I,SEMI:eb,SLASH:ek,SLASH_SCHEME:D,SYM:ex,TILDE:ew,TLD:T,UNDERSCORE:ev,UTLD:N,UWORD:S,WORD:x,WS:R});let eA=/[a-z]/,eE=/\p{L}/u,eM=/\p{Emoji}/u,eT=/\d/,eN=/\s/,eI="\r",eD="\n",eL="️",eR="",eF="",eP=null,eO=null;function ez(e=[]){let t={};b.groups=t;let n=new b;null==eP&&(eP=eq(i)),null==eO&&(eO=eq(s)),C(n,"'",Y),C(n,"{",P),C(n,"}",O),C(n,"[",z),C(n,"]",B),C(n,"(",$),C(n,")",j),C(n,"<",q),C(n,">",H),C(n,"(",U),C(n,")",W),C(n,"「",V),C(n,"」",G),C(n,"『",J),C(n,"』",K),C(n,"<",Z),C(n,">",X),C(n,"&",Q),C(n,"*",ee),C(n,"@",et),C(n,"`",er),C(n,"^",ei),C(n,":",es),C(n,",",eo),C(n,"$",ea),C(n,".",el),C(n,"=",eh),C(n,"!",ec),C(n,"-",eu),C(n,"%",ed),C(n,"|",ep),C(n,"+",ef),C(n,"#",em),C(n,"?",eg),C(n,'"',e_),C(n,"/",ek),C(n,";",eb),C(n,"~",ew),C(n,"_",ev),C(n,"\\",en),C(n,"・",ey);let r=w(n,eT,L,{[o]:!0});w(r,eT,r);let g=w(r,eA,A,{[h]:!0}),y=w(r,eE,E,{[c]:!0}),k=w(n,eA,x,{[a]:!0});w(k,eT,g),w(k,eA,k),w(g,eT,g),w(g,eA,g);let eB=w(n,eE,S,{[l]:!0});w(eB,eA),w(eB,eT,y),w(eB,eE,eB),w(y,eT,y),w(y,eA),w(y,eE,y);let e$=C(n,eD,F,{[m]:!0}),eH=C(n,eI,R,{[m]:!0}),eU=w(n,eN,R,{[m]:!0});C(n,eF,eU),C(eH,eD,e$),C(eH,eF,eU),w(eH,eN,eU),C(eU,eI),C(eU,eD),w(eU,eN,eU),C(eU,eF,eU);let eW=w(n,eM,eC,{[d]:!0});C(eW,"#"),w(eW,eM,eW),C(eW,eL,eW);let eV=C(eW,eR);C(eV,"#"),w(eV,eM,eW);let eG=[[eA,k],[eT,g]],eJ=[[eA,null],[eE,eB],[eT,y]];for(let e=0;e<eP.length;e++)ej(n,eP[e],T,x,eG);for(let e=0;e<eO.length;e++)ej(n,eO[e],N,S,eJ);_(T,{tld:!0,ascii:!0},t),_(N,{utld:!0,alpha:!0},t),ej(n,"file",I,x,eG),ej(n,"mailto",I,x,eG),ej(n,"http",D,x,eG),ej(n,"https",D,x,eG),ej(n,"ftp",D,x,eG),ej(n,"ftps",D,x,eG),_(I,{scheme:!0,ascii:!0},t),_(D,{slashscheme:!0,ascii:!0},t),e=e.sort((e,t)=>e[0]>t[0]?1:-1);for(let t=0;t<e.length;t++){let r=e[t][0],i=e[t][1]?{[p]:!0}:{[f]:!0};r.indexOf("-")>=0?i[u]=!0:eA.test(r)?eT.test(r)?i[h]=!0:i[a]=!0:i[o]=!0,v(n,r,r,i)}return v(n,"localhost",M,{ascii:!0}),n.jd=new b(ex),{start:n,tokens:Object.assign({groups:t},eS)}}function eB(e,t){let n=e$(t.replace(/[A-Z]/g,e=>e.toLowerCase())),r=n.length,i=[],s=0,o=0;for(;o<r;){let a=e,l=null,h=0,c=null,u=-1,d=-1;for(;o<r&&(l=a.go(n[o]));)(a=l).accepts()?(u=0,d=0,c=a):u>=0&&(u+=n[o].length,d++),h+=n[o].length,s+=n[o].length,o++;s-=u,o-=d,h-=u,i.push({t:c.t,v:t.slice(s-h,s),s:s-h,e:s})}return i}function e$(e){let t=[],n=e.length,r=0;for(;r<n;){let i,s=e.charCodeAt(r),o=s<55296||s>56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(o),r+=o.length}return t}function ej(e,t,n,r,i){let s,o=t.length;for(let n=0;n<o-1;n++){let o=t[n];e.j[o]?s=e.j[o]:((s=new b(r)).jr=i.slice(),e.j[o]=s),e=s}return(s=new b(n)).jr=i.slice(),e.j[t[o-1]]=s,s}function eq(e){let t=[],n=[],r=0,i="0123456789";for(;r<e.length;){let s=0;for(;i.indexOf(e[r+s])>=0;)s++;if(s>0){t.push(n.join(""));for(let t=parseInt(e.substring(r,r+s),10);t>0;t--)n.pop();r+=s}else n.push(e[r]),r++}return t}let eH={defaultProtocol:"http",events:null,format:eW,formatHref:eW,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function eU(e,t=null){let n=Object.assign({},eH);e&&(n=Object.assign(n,e instanceof eU?e.o:e));let r=n.ignoreTags,i=[];for(let e=0;e<r.length;e++)i.push(r[e].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}function eW(e){return e}function eV(e,t){this.t="token",this.v=e,this.tk=t}function eG(e,t){class n extends eV{constructor(t,n){super(t,n),this.t=e}}for(let e in t)n.prototype[e]=t[e];return n.t=e,n}eU.prototype={o:eH,ignoreTags:[],defaultRender:e=>e,check(e){return this.get("validate",e.toString(),e)},get(e,t,n){let r=null!=t,i=this.o[e];return i&&("object"==typeof i?"function"==typeof(i=n.t in i?i[n.t]:eH[e])&&r&&(i=i(t,n)):"function"==typeof i&&r&&(i=i(t,n.t,n))),i},getObj(e,t,n){let r=this.o[e];return"function"==typeof r&&null!=t&&(r=r(t,n.t,n)),r},render(e){let t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}},eV.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=eH.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),i=e.get("tagName",n,t),s=this.toFormattedString(e),o={},a=e.get("className",n,t),l=e.get("target",n,t),h=e.get("rel",n,t),c=e.getObj("attributes",n,t),u=e.getObj("events",n,t);return o.href=r,a&&(o.class=a),l&&(o.target=l),h&&(o.rel=h),c&&Object.assign(o,c),{tagName:i,attributes:o,content:s,eventListeners:u}}};let eJ=eG("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),eK=eG("text"),eZ=eG("nl"),eX=eG("url",{isLink:!0,toHref(e=eH.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==M&&e[1].t===es}}),eQ=e=>new b(e);function eY({groups:e}){let t=e.domain.concat([Q,ee,et,en,er,ei,ea,eh,eu,L,ed,ep,ef,em,ek,ex,ew,ev]),n=[Y,es,eo,el,ec,ed,eg,e_,eb,q,H,P,O,B,z,$,j,U,W,V,G,J,K,Z,X],r=[Q,Y,ee,en,er,ei,ea,eh,eu,P,O,ed,ep,ef,em,eg,ek,ex,ew,ev],i=eQ(),s=C(i,ew);k(s,r,s),k(s,e.domain,s);let o=eQ(),a=eQ(),l=eQ();k(i,e.domain,o),k(i,e.scheme,a),k(i,e.slashscheme,l),k(o,r,s),k(o,e.domain,o);let h=C(o,et);C(s,et,h),C(a,et,h),C(l,et,h);let c=C(s,el);k(c,r,s),k(c,e.domain,s);let u=eQ();k(h,e.domain,u),k(u,e.domain,u);let d=C(u,el);k(d,e.domain,u);let p=eQ(eJ);k(d,e.tld,p),k(d,e.utld,p),C(h,M,p);let f=C(u,eu);C(f,eu,f),k(f,e.domain,u),k(p,e.domain,u),C(p,el,d),C(p,eu,f),k(C(p,es),e.numeric,eJ);let m=C(o,eu),g=C(o,el);C(m,eu,m),k(m,e.domain,o),k(g,r,s),k(g,e.domain,o);let _=eQ(eX);k(g,e.tld,_),k(g,e.utld,_),k(_,e.domain,o),k(_,r,s),C(_,el,g),C(_,eu,m),C(_,et,h);let y=C(_,es),b=eQ(eX);k(y,e.numeric,b);let w=eQ(eX),v=eQ();k(w,t,w),k(w,n,v),k(v,t,w),k(v,n,v),C(_,ek,w),C(b,ek,w);let x=C(a,es),S=C(l,es),A=C(S,ek),E=C(A,ek);k(a,e.domain,o),C(a,el,g),C(a,eu,m),k(l,e.domain,o),C(l,el,g),C(l,eu,m),k(x,e.domain,w),C(x,ek,w),C(x,eg,w),k(E,e.domain,w),k(E,t,w),C(E,ek,w);let T=[[P,O],[z,B],[$,j],[q,H],[U,W],[V,G],[J,K],[Z,X]];for(let e=0;e<T.length;e++){let[r,i]=T[e],s=C(w,r);C(v,r,s),C(s,i,w);let o=eQ(eX);k(s,t,o);let a=eQ();k(s,n),k(o,t,o),k(o,n,a),k(a,t,o),k(a,n,a),C(o,i,w),C(a,i,w)}return C(i,M,_),C(i,F,eZ),{start:i,tokens:eS}}function e0(e,t,n){let r=n.length,i=0,s=[],o=[];for(;i<r;){let a=e,l=null,h=null,c=0,u=null,d=-1;for(;i<r&&!(l=a.go(n[i].t));)o.push(n[i++]);for(;i<r&&(h=l||a.go(n[i].t));)l=null,(a=h).accepts()?(d=0,u=a):d>=0&&d++,i++,c++;if(d<0)(i-=c)<r&&(o.push(n[i]),i++);else{o.length>0&&(s.push(e1(eK,t,o)),o=[]),i-=d,c-=d;let e=u.t,r=n.slice(i-c,i);s.push(e1(e,t,r))}}return o.length>0&&s.push(e1(eK,t,o)),s}function e1(e,t,n){let r=n[0].s,i=n[n.length-1].e;return new e(t.slice(r,i),n)}let e2="u">typeof console&&console&&console.warn||(()=>{}),e3="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",e5={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function e4(){return b.groups={},e5.scanner=null,e5.parser=null,e5.tokenQueue=[],e5.pluginQueue=[],e5.customSchemes=[],e5.initialized=!1,e5}function e6(e,t=!1){if(e5.initialized&&e2(`linkifyjs: already initialized - will not register custom scheme "${e}" ${e3}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw Error(`linkifyjs: incorrect scheme format.
|
|
18
18
|
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
19
19
|
2. Cannot start or end with "-"
|
|
20
20
|
3. "-" cannot repeat`);e5.customSchemes.push([e,t])}function e8(){e5.scanner=ez(e5.customSchemes);for(let e=0;e<e5.tokenQueue.length;e++)e5.tokenQueue[e][1]({scanner:e5.scanner});e5.parser=eY(e5.scanner.tokens);for(let e=0;e<e5.pluginQueue.length;e++)e5.pluginQueue[e][1]({scanner:e5.scanner,parser:e5.parser});return e5.initialized=!0,e5}function e9(e){return e5.initialized||e8(),e0(e5.parser.start,e,eB(e5.scanner.start,e))}function e7(e,t=null,n=null){if(t&&"object"==typeof t){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}let r=new eU(n),i=e9(e),s=[];for(let e=0;e<i.length;e++){let n=i[e];n.isLink&&(!t||n.t===t)&&r.check(n)&&s.push(n.toFormattedObject(r))}return s}e9.scan=eB;var te=n(76865),tt="[\0- \xa0 -\u2029 ]",tn=new RegExp(tt),tr=RegExp(`${tt}$`),ti=RegExp(tt,"g");function ts(e){return 1===e.length?e[0].isLink:3===e.length&&!!e[1].isLink&&["()","[]"].includes(e[0].value+e[2].value)}function to(e){return new te.k_({key:new te.hs("autolink"),appendTransaction:(t,n,i)=>{let s=t.some(e=>e.docChanged)&&!n.doc.eq(i.doc),o=t.some(e=>e.getMeta("preventAutolink"));if(!s||o)return;let{tr:a}=i,l=(0,r.T7)(n.doc,[...t]);if((0,r.FF)(l).forEach(({newRange:t})=>{let n,s,o=(0,r.Nx)(i.doc,t,e=>e.isTextblock);if(o.length>1)n=o[0],s=i.doc.textBetween(n.pos,n.pos+n.node.nodeSize,void 0," ");else if(o.length){let e=i.doc.textBetween(t.from,t.to," "," ");if(!tr.test(e))return;n=o[0],s=i.doc.textBetween(n.pos,t.to,void 0," ")}if(n&&s){let t=s.split(tn).filter(Boolean);if(t.length<=0)return!1;let o=t[t.length-1],l=n.pos+s.lastIndexOf(o);if(!o)return!1;let h=e9(o).map(t=>t.toObject(e.defaultProtocol));if(!ts(h))return!1;h.filter(e=>e.isLink).map(e=>({...e,from:l+e.start+1,to:l+e.end+1})).filter(e=>!i.schema.marks.code||!i.doc.rangeHasMark(e.from,e.to,i.schema.marks.code)).filter(t=>e.validate(t.value)).filter(t=>e.shouldAutoLink(t.value)).forEach(t=>{(0,r.hO)(t.from,t.to,i.doc).some(t=>t.mark.type===e.type)||a.addMark(t.from,t.to,e.type.create({href:t.href}))})}}),a.steps.length)return a}})}function ta(e){return new te.k_({key:new te.hs("handleClickLink"),props:{handleClick:(t,n,i)=>{var s,o;if(0!==i.button||!t.editable)return!1;let a=null;if(i.target instanceof HTMLAnchorElement)a=i.target;else{let t=i.target;if(!t)return!1;let n=e.editor.view.dom;(a=t.closest("a"))&&!n.contains(a)&&(a=null)}if(!a)return!1;let l=!1;if(e.enableClickSelection&&(l=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){let n=(0,r.gu)(t.state,e.type.name),i=null!=(s=a.href)?s:n.href,h=null!=(o=a.target)?o:n.target;i&&(window.open(i,h),l=!0)}return l}}})}function tl(e){return new te.k_({key:new te.hs("handlePasteLink"),props:{handlePaste:(t,n,r)=>{let{shouldAutoLink:i}=e,{state:s}=t,{selection:o}=s,{empty:a}=o;if(a)return!1;let l="";r.content.forEach(e=>{l+=e.textContent});let h=e7(l,{defaultProtocol:e.defaultProtocol}).find(e=>e.isLink&&e.value===l);return!!l&&!!h&&(void 0===i||!!i(h.value))&&e.editor.commands.setMark(e.type,{href:h.href})}}})}function th(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(e=>{let t="string"==typeof e?e:e.scheme;t&&n.push(t)}),!e||e.replace(ti,"").match(RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var tc=r.CU.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{"string"==typeof e?e6(e):e6(e.scheme,e.optionalSlashes)})},onDestroy(){e4()},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!th(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>{let t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes("@"))return!0;let r=(e.includes("@")?e.split("@").pop():e).split(/[/?#:]/)[0];return!/^\d{1,3}(\.\d{1,3}){3}$/.test(r)&&!!/\./.test(r)}}),addAttributes(){return{href:{default:null,parseHTML:e=>e.getAttribute("href")},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!!t&&!!this.options.isAllowedUri(t,{defaultValidate:e=>!!th(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:e=>!!th(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",(0,r.KV)(this.options.HTMLAttributes,e),0]:["a",(0,r.KV)(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n,r,i,s;let o=null!=(r=null==(n=e.attrs)?void 0:n.href)?r:"",a=null!=(s=null==(i=e.attrs)?void 0:i.title)?s:"",l=t.renderChildren(e);return a?`[${l}](${o} "${a}")`:`[${l}](${o})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return!!this.options.isAllowedUri(n,{defaultValidate:e=>!!th(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&t().setMark(this.name,e).setMeta("preventAutolink",!0).run()},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return(!n||!!this.options.isAllowedUri(n,{defaultValidate:e=>!!th(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))&&t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[(0,r.Zc)({find:e=>{let t=[];if(e){let{protocols:n,defaultProtocol:r}=this.options,i=e7(e).filter(e=>e.isLink&&this.options.isAllowedUri(e.value,{defaultValidate:e=>!!th(e,n),protocols:n,defaultProtocol:r}));i.length&&i.forEach(e=>{this.options.shouldAutoLink(e.value)&&t.push({text:e.value,data:{href:e.href},index:e.start})})}return t},type:this.type,getAttributes:e=>{var t;return{href:null==(t=e.data)?void 0:t.href}}})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(to({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:e=>this.options.isAllowedUri(e,{defaultValidate:e=>!!th(e,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(ta({type:this.type,editor:this.editor,openOnClick:"whenNotEditable"===this.options.openOnClick||this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(tl({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}}),tu=tc},61878:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],s=(0,r.A)("search",i)},62678:(e,t,n)=>{"use strict";n.d(t,{QO:()=>G,vR:()=>J,Or:()=>X,JU:()=>ee,lb:()=>et});var r=n(82159),i=n(76865),s=n(8242);function o(e={}){return new i.k_({view:t=>new a(t,e)})}class a{constructor(e,t){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!=(n=t.width)?n:1,this.color=!1===t.color?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t,n=this.editorView.state.doc.resolve(this.cursorPos),r=!n.parent.inlineContent,i,s=this.editorView.dom,o=s.getBoundingClientRect(),a=o.width/s.offsetWidth,l=o.height/s.offsetHeight;if(r){let e=n.nodeBefore,t=n.nodeAfter;if(e||t){let n=this.editorView.nodeDOM(this.cursorPos-(e?e.nodeSize:0));if(n){let r=n.getBoundingClientRect(),s=e?r.bottom:r.top;e&&t&&(s=(s+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let o=this.width/2*l;i={left:r.left,right:r.right,top:s-o,bottom:s+o}}}}if(!i){let e=this.editorView.coordsAtPos(this.cursorPos),t=this.width/2*a;i={left:e.left-t,right:e.left+t,top:e.top,bottom:e.bottom}}let h=this.editorView.dom.offsetParent;if(!this.element&&(this.element=h.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",r),this.element.classList.toggle("prosemirror-dropcursor-inline",!r),h&&(h!=document.body||"static"!=getComputedStyle(h).position)){let n=h.getBoundingClientRect(),r=n.width/h.offsetWidth,i=n.height/h.offsetHeight;e=n.left-h.scrollLeft*r,t=n.top-h.scrollTop*i}else e=-pageXOffset,t=-pageYOffset;this.element.style.left=(i.left-e)/a+"px",this.element.style.top=(i.top-t)/l+"px",this.element.style.width=(i.right-i.left)/a+"px",this.element.style.height=(i.bottom-i.top)/l+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i="function"==typeof r?r(this.editorView,t,e):r;if(t&&!i){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=(0,s.Um)(this.editorView.state.doc,e,this.editorView.dragging.slice);null!=t&&(e=t)}this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}var l=n(63197),h=n(12894),c=n(27050);class u extends i.LN{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return u.valid(n)?new u(n):i.LN.near(n)}content(){return c.Ji.empty}eq(e){return e instanceof u&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for GapCursor.fromJSON");return new u(e.resolve(t.pos))}getBookmark(){return new d(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!f(e)||!m(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,n=!1){i:for(;;){if(!n&&u.valid(e))return e;let r=e.pos,s=null;for(let n=e.depth;;n--){let i=e.node(n);if(t>0?e.indexAfter(n)<i.childCount:e.index(n)>0){s=i.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let o=e.doc.resolve(r);if(u.valid(o))return o}for(;;){let o=t>0?s.firstChild:s.lastChild;if(!o){if(s.isAtom&&!s.isText&&!i.nh.isSelectable(s)){e=e.doc.resolve(r+s.nodeSize*t),n=!1;continue i}break}s=o,r+=t;let a=e.doc.resolve(r);if(u.valid(a))return a}return null}}}u.prototype.visible=!1,u.findFrom=u.findGapCursorFrom,i.LN.jsonID("gapcursor",u);class d{constructor(e){this.pos=e}map(e){return new d(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return u.valid(t)?new u(t):i.LN.near(t)}}function p(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function f(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(0==n){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||p(e.type))return!0;if(e.inlineContent)return!1}}return!0}function m(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||p(e.type))return!0;if(e.inlineContent)return!1}}return!0}function g(){return new i.k_({props:{decorations:w,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&u.valid(n)?new u(n):null,handleClick:b,handleKeyDown:_,handleDOMEvents:{beforeinput:k}}})}let _=(0,h.K)({ArrowLeft:y("horiz",-1),ArrowRight:y("horiz",1),ArrowUp:y("vert",-1),ArrowDown:y("vert",1)});function y(e,t){let n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,s){let o=e.selection,a=t>0?o.$to:o.$from,l=o.empty;if(o instanceof i.U3){if(!s.endOfTextblock(n)||0==a.depth)return!1;l=!1,a=e.doc.resolve(t>0?a.after():a.before())}let h=u.findGapCursorFrom(a,t,l);return!!h&&(r&&r(e.tr.setSelection(new u(h))),!0)}}function b(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!u.valid(r))return!1;let s=e.posAtCoords({left:n.clientX,top:n.clientY});return!(s&&s.inside>-1&&i.nh.isSelectable(e.state.doc.nodeAt(s.inside)))&&(e.dispatch(e.state.tr.setSelection(new u(r))),!0)}function k(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof u))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let s=c.FK.empty;for(let e=r.length-1;e>=0;e--)s=c.FK.from(r[e].createAndFill(null,s));let o=e.state.tr.replace(n.pos,n.pos,new c.Ji(s,0,0));return o.setSelection(i.U3.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function w(e){if(!(e.selection instanceof u))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",l.zF.create(e.doc,[l.NZ.widget(e.selection.head,t,{key:"gapcursor"})])}var v=200,C=function(){};C.prototype.append=function(e){return e.length?(e=C.from(e),!this.length&&e||e.length<v&&this.leafAppend(e)||this.length<v&&e.leafPrepend(this)||this.appendInner(e)):this},C.prototype.prepend=function(e){return e.length?C.from(e).append(this):this},C.prototype.appendInner=function(e){return new S(this,e)},C.prototype.slice=function(e,t){return(void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t)?C.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},C.prototype.get=function(e){if(!(e<0)&&!(e>=this.length))return this.getInner(e)},C.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},C.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},C.from=function(e){return e instanceof C?e:e&&e.length?new x(e):C.empty};var x=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(!1===e(this.values[i],r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(!1===e(this.values[i],r+i))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=v)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=v)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(C);C.empty=new x([]);var S=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&!1===this.left.forEachInner(e,t,Math.min(n,i),r)||n>i&&!1===this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&!1===this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)||n<i&&!1===this.left.forEachInvertedInner(e,Math.min(t,i),n,r))return!1},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(C);let A=C,E=500;class M{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){let n,r,i,s;if(0==this.eventCount)return null;let o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}t&&(r=(n=this.remapping(o,this.items.length)).maps.length);let a=e.tr,l=[],h=[];return this.items.forEach((e,t)=>{if(!e.step){n||(r=(n=this.remapping(o,t+1)).maps.length),r--,h.push(e);return}if(n){h.push(new N(e.map));let t=e.step.map(n.slice(r)),i;t&&a.maybeStep(t).doc&&(i=a.mapping.maps[a.mapping.maps.length-1],l.push(new N(i,void 0,void 0,l.length+h.length))),r--,i&&n.appendMap(i,r)}else a.maybeStep(e.step);if(e.selection)return i=n?e.selection.map(n.slice(r)):e.selection,s=new M(this.items.slice(0,o).append(h.reverse().concat(l)),this.eventCount-1),!1},this.items.length,0),{remaining:s,transform:a,selection:i}}addTransform(e,t,n,r){let i=[],s=this.eventCount,o=this.items,a=!r&&o.length?o.get(o.length-1):null;for(let n=0;n<e.steps.length;n++){let l=e.steps[n].invert(e.docs[n]),h=new N(e.mapping.maps[n],l,t),c;(c=a&&a.merge(h))&&(h=c,n?i.pop():o=o.slice(0,o.length-1)),i.push(h),t&&(s++,t=void 0),r||(a=h)}let l=s-n.depth;return l>D&&(o=T(o,l),s-=l),new M(o.append(i),s)}remapping(e,t){let n=new s.X9;return this.items.forEach((t,r)=>{let i=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(e){return 0==this.eventCount?this:new M(this.items.append(e.map(e=>new N(e))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),i=e.mapping,s=e.steps.length,o=this.eventCount;this.items.forEach(e=>{e.selection&&o--},r);let a=t;this.items.forEach(t=>{let r=i.getMirror(--a);if(null==r)return;s=Math.min(s,r);let l=i.maps[r];if(t.step){let s=e.steps[r].invert(e.docs[r]),h=t.selection&&t.selection.map(i.slice(a+1,r));h&&o++,n.push(new N(l,s,h))}else n.push(new N(l))},r);let l=[];for(let e=t;e<s;e++)l.push(new N(i.maps[e]));let h=new M(this.items.slice(0,r).append(l).append(n),o);return h.emptyItemCount()>E&&(h=h.compress(this.items.length-n.length)),h}emptyItemCount(){let e=0;return this.items.forEach(t=>{!t.step&&e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],i=0;return this.items.forEach((s,o)=>{if(o>=e)r.push(s),s.selection&&i++;else if(s.step){let e=s.step.map(t.slice(n)),o=e&&e.getMap();if(n--,o&&t.appendMap(o,n),e){let a=s.selection&&s.selection.map(t.slice(n));a&&i++;let l=new N(o.invert(),e,a),h,c=r.length-1;(h=r.length&&r[c].merge(l))?r[c]=h:r.push(l)}}else s.map&&n--},this.items.length,0),new M(A.from(r.reverse()),i)}}function T(e,t){let n;return e.forEach((e,r)=>{if(e.selection&&0==t--)return n=r,!1}),e.slice(n)}M.empty=new M(A.empty,0);class N{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new N(t.getMap().invert(),t,this.selection)}}}class I{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}}let D=20;function L(e,t,n,r){let i=n.getMeta(j),s;if(i)return i.historyState;n.getMeta(q)&&(e=new I(e.done,e.undone,null,0,-1));let o=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(o&&o.getMeta(j))if(o.getMeta(j).redo)return new I(e.done.addTransform(n,void 0,r,$(t)),e.undone,F(n.mapping.maps),e.prevTime,e.prevComposition);else return new I(e.done,e.undone.addTransform(n,void 0,r,$(t)),null,e.prevTime,e.prevComposition);if(!1===n.getMeta("addToHistory")||o&&!1===o.getMeta("addToHistory"))if(s=n.getMeta("rebased"))return new I(e.done.rebased(n,s),e.undone.rebased(n,s),P(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new I(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),P(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);{let i=n.getMeta("composition"),s=0==e.prevTime||!o&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!R(n,e.prevRanges)),a=o?P(e.prevRanges,n.mapping):F(n.mapping.maps);return new I(e.done.addTransform(n,s?t.selection.getBookmark():void 0,r,$(t)),M.empty,a,n.time,null==i?e.prevComposition:i)}}function R(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}function F(e){let t=[];for(let n=e.length-1;n>=0&&0==t.length;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function P(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),s=t.map(e[r+1],-1);i<=s&&n.push(i,s)}return n}function O(e,t,n){let r=$(t),i=j.get(t).spec.config,s=(n?e.undone:e.done).popEvent(t,r);if(!s)return null;let o=s.selection.resolve(s.transform.doc),a=(n?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),i,r),l=new I(n?a:s.remaining,n?s.remaining:a,null,0,-1);return s.transform.setSelection(o).setMeta(j,{redo:n,historyState:l})}let z=!1,B=null;function $(e){let t=e.plugins;if(B!=t){z=!1,B=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){z=!0;break}}return z}let j=new i.hs("history"),q=new i.hs("closeHistory");function H(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new i.k_({key:j,state:{init:()=>new I(M.empty,M.empty,null,0,-1),apply:(t,n,r)=>L(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?W:"historyRedo"==n?V:null;return!!r&&!!e.editable&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}function U(e,t){return(n,r)=>{let i=j.getState(n);if(!i||0==(e?i.undone:i.done).eventCount)return!1;if(r){let s=O(i,n,e);s&&r(t?s.scrollIntoView():s)}return!0}}let W=U(!1,!0),V=U(!0,!0);U(!1,!1),U(!0,!1),r.YY.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(e=>""!==e).length}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=e=>{let t=(null==e?void 0:e.node)||this.editor.state.doc;if("textSize"===((null==e?void 0:e.mode)||this.options.mode)){let e=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{let t=(null==e?void 0:e.node)||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new i.k_({key:new i.hs("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;let i=this.options.limit;if(null==i||0===i){e=!0;return}let s=this.storage.characters({node:r.doc});if(s>i){let t=0,n=s-i;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let o=r.tr.deleteRange(t,n);return e=!0,o}e=!0},filterTransaction:(e,t)=>{let n=this.options.limit;if(!e.docChanged||0===n||null==n)return!0;let r=this.storage.characters({node:t.doc}),i=this.storage.characters({node:e.doc});if(i<=n||r>n&&i>n&&i<=r)return!0;if(r>n&&i>n&&i>r||!e.getMeta("paste"))return!1;let s=e.selection.$head.pos,o=s-(i-n),a=s;return e.deleteRange(o,a),!(this.storage.characters({node:e.doc})>n)}})]}});var G=r.YY.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[o(this.options)]}});r.YY.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new i.k_({key:new i.hs("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,s=[];if(!n||!r)return l.zF.create(e,[]);let o=0;"deepest"===this.options.mode&&e.descendants((e,t)=>{if(!e.isText){if(!(i>=t&&i<=t+e.nodeSize-1))return!1;o+=1}});let a=0;return e.descendants((e,t)=>!e.isText&&!!(i>=t&&i<=t+e.nodeSize-1)&&((a+=1,"deepest"===this.options.mode&&o-a>0||"shallowest"===this.options.mode&&a>1)?"deepest"===this.options.mode:void s.push(l.NZ.node(t,t+e.nodeSize,{class:this.options.className})))),l.zF.create(e,s)}}})]}});var J=r.YY.create({name:"gapCursor",addProseMirrorPlugins:()=>[g()],extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:null!=(t=(0,r.gk)((0,r.iI)(e,"allowGapCursor",n)))?t:null}}}),K="placeholder";function Z(e){return e.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}var X=r.YY.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:K,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){let e=this.options.dataAttribute?`data-${Z(this.options.dataAttribute)}`:`data-${K}`;return[new i.k_({key:new i.hs("placeholder"),props:{decorations:({doc:t,selection:n})=>{let i=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:s}=n,o=[];if(!i)return null;let a=this.editor.isEmpty;return t.descendants((t,n)=>{let i=s>=n&&s<=n+t.nodeSize,h=!t.isLeaf&&(0,r.Op)(t);if(!t.type.isTextblock)return this.options.includeChildren;if((i||!this.options.showOnlyCurrent)&&h){let r=[this.options.emptyNodeClass];a&&r.push(this.options.emptyEditorClass);let s=l.NZ.node(n,n+t.nodeSize,{class:r.join(" "),[e]:"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:t,pos:n,hasAnchor:i}):this.options.placeholder});o.push(s)}return this.options.includeChildren}),l.zF.create(t,o)}}})]}});r.YY.create({name:"selection",addOptions:()=>({className:"selection"}),addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new i.k_({key:new i.hs("selection"),props:{decorations:n=>n.selection.empty||e.isFocused||!e.isEditable||(0,r.BQ)(n.selection)||e.view.dragging?null:l.zF.create(n.doc,[l.NZ.inline(n.selection.from,n.selection.to,{class:t.className})])}})]}});var Q="skipTrailingNode";function Y({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||(null==t?void 0:t.type)===e}var ee=r.YY.create({name:"trailingNode",addOptions:()=>({node:void 0,notAfter:[]}),addProseMirrorPlugins(){var e;let t=new i.hs(this.name),n=this.options.node||(null==(e=this.editor.schema.topNodeType.contentMatch.defaultType)?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>(this.options.notAfter||[]).concat(n).includes(e.name));return[new i.k_({key:t,appendTransaction:(e,r,i)=>{let{doc:s,tr:o,schema:a}=i,l=t.getState(i),h=s.content.size,c=a.nodes[n];if(!e.some(e=>e.getMeta(Q))&&l)return o.insert(h,c.create())},state:{init:(e,t)=>!Y({node:t.tr.doc.lastChild,types:r}),apply:(e,t)=>!e.docChanged||e.getMeta("__uniqueIDTransaction")?t:!Y({node:e.doc.lastChild,types:r})}})]}}),et=r.YY.create({name:"undoRedo",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>W(e,t),redo:()=>({state:e,dispatch:t})=>V(e,t)}),addProseMirrorPlugins(){return[H(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}})},64702:(e,t,n)=>{"use strict";n.d(t,{Te:()=>C});var r=n(12115),i=n(47650);function s(e,t,n){let r,i=n.initialDeps??[],s=!0;function o(){var o,a,l;let h,c;n.key&&(null==(o=n.debug)?void 0:o.call(n))&&(h=Date.now());let u=e();if(!(u.length!==i.length||u.some((e,t)=>i[t]!==e)))return r;if(i=u,n.key&&(null==(a=n.debug)?void 0:a.call(n))&&(c=Date.now()),r=t(...u),n.key&&(null==(l=n.debug)?void 0:l.call(n))){let e=Math.round((Date.now()-h)*100)/100,t=Math.round((Date.now()-c)*100)/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${i(t,5)} /${i(e,5)} ms`,`
|