@codernote/record-tree 2.9.0 → 2.9.1
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/dist/index.js +632 -629
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.color-panel[data-v-d2cde42f]{background:#fff;border:1px solid #f2f2f2;width:164px;padding:5px 5px 0}.color-panel ul[data-v-d2cde42f]{list-style-type:none;margin:0}.color-panel ul li[data-v-d2cde42f]{display:inline-block;margin:0 5px;width:20px;height:20px;border-radius:100%;border:1px solid #f2f2f2;display:inline-flex;align-items:center;justify-content:center}.node-complex[data-v-6cfd6a1b]{display:flex;flex-direction:row;align-self:center;outline:none}.holder[data-v-6cfd6a1b]{width:0px;overflow:hidden;border-width:1px;border-style:solid;border-color:transparent;outline:none}.node-element[data-v-6cfd6a1b]{display:inline-block;position:relative;margin:5px 1px}.node-element:hover .node-del[data-v-6cfd6a1b]{display:block}.node-image img[data-v-6cfd6a1b]{outline:none}.node-audio[data-v-6cfd6a1b]{width:300px}.node-audio audio[data-v-6cfd6a1b]{width:300px;outline:none}.node-video video[data-v-6cfd6a1b]{outline:none;-o-object-fit:cover;object-fit:cover;background-color:#000}.node-del[data-v-6cfd6a1b]{cursor:pointer;display:none;width:15px;height:15px;position:absolute;top:-3px;right:-3px;background-color:#e6f7ff;background-size:100% 100%;border-radius:50%}.node-del[data-v-6cfd6a1b]:before,.node-del[data-v-6cfd6a1b]:after{content:"";position:absolute;top:50%;left:50%;width:2px;height:10px;background-color:#595959}.node-del[data-v-6cfd6a1b]:before{transform:translate(-50%,-50%) rotate(45deg)}.node-del[data-v-6cfd6a1b]:after{transform:translate(-50%,-50%) rotate(-45deg)}.node-file-wrap[data-v-6cfd6a1b]{width:260px;padding:10px 16px;display:flex;background:#f2f2f2;border-radius:5px;justify-content:center;align-items:center}.node-file-left[data-v-6cfd6a1b]{flex:1}.node-file-left h6[data-v-6cfd6a1b]{font-size:14px;font-weight:700;margin:0 0 5px;padding:0;white-space:nowrap}.node-file-left p[data-v-6cfd6a1b]{margin:0;padding:0;font-size:12px;color:#999}.node-file-right a[data-v-6cfd6a1b]{color:#52a770;font-size:14px}@keyframes blinkBorder-6cfd6a1b{0%,to{border-color:transparent}50%{border-color:#333}}.node-complex .holder[data-v-6cfd6a1b]:focus{animation:blinkBorder-6cfd6a1b 1s infinite}.fullscreen-handle[data-v-6cfd6a1b]{width:15px;height:15px;position:absolute;bottom:0;right:16px;cursor:pointer;background:#fff9}.resize-handle[data-v-6cfd6a1b]{width:15px;height:15px;position:absolute;bottom:0;right:0;cursor:se-resize;transform:rotate(90deg);background:#fff9}.resize-handle svg[data-v-6cfd6a1b]{cursor:se-resize}.media-placeholder[data-v-6cfd6a1b]{-o-object-fit:contain;object-fit:contain;border:1px dashed #d0d0d0;border-radius:4px;background:#fafafa;display:flex;align-items:center;justify-content:center;width:50px;height:50px}.media-placeholder img[data-v-6cfd6a1b]{width:20px;height:20px;animation:bounce-6cfd6a1b 1s ease-in-out infinite}.media-fail[data-v-6cfd6a1b]{-o-object-fit:contain;object-fit:contain;border-radius:4px;display:flex;align-items:center;justify-content:center}.media-fail img[data-v-6cfd6a1b]{width:40px;height:40px}@keyframes bounce-6cfd6a1b{0%,to{transform:translateY(0)}50%{transform:translateY(-8px)}}.ProseMirror{outline:none}.ProseMirror s{text-decoration:line-through}.ProseMirror blockquote{border-left:3px solid #e5e7eb;padding-left:1rem;color:#6b7280}.ProseMirror ul[data-type=taskList]{list-style:none;padding:0}.ProseMirror ul[data-type=taskList] li{display:flex;align-items:flex-start}.ProseMirror ul[data-type=taskList] li>label{flex:0 0 auto;margin-right:.5rem;margin-top:.125rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ProseMirror ul[data-type=taskList] li>div{flex:1 1 auto}.ProseMirror ul[data-type=taskList] input[type=checkbox]{cursor:pointer}.ProseMirror table{border-collapse:collapse;table-layout:fixed;width:100%;margin:0;overflow:hidden}.ProseMirror table td,.ProseMirror table th{min-width:1em;border:1px solid #ddd;padding:4px 8px;vertical-align:top;box-sizing:border-box;position:relative}.ProseMirror table th{font-weight:600;text-align:left;background-color:#f3f4f6}.ProseMirror table .selectedCell:after{z-index:2;position:absolute;content:"";left:0;right:0;top:0;bottom:0;background:#c8c8ff66;pointer-events:none}.ProseMirror table .columnSelected{background-color:#c8c8ff33}.node-div[data-v-40ce1bbb]{display:flex;align-items:center;position:relative;margin-bottom:8px}.node-div>div[data-v-40ce1bbb]{flex:1}.node-icon[data-v-40ce1bbb]{touch-action:manipulation;position:relative;width:21px;height:21px;border-radius:100%;box-sizing:border-box;border:5px solid #fff;background-color:#fff;cursor:pointer;align-self:flex-start}.node-icon-with-children[data-v-40ce1bbb]:before{content:"";position:absolute;top:-20px;right:-30px;bottom:-10px;left:-20px;z-index:5}.node-icon-todo[data-v-40ce1bbb]{border-radius:0}.node-icon .node-circle[data-v-40ce1bbb]{display:block;position:absolute;width:7px;height:7px;left:50%;top:50%;transform:translate(-50%) translateY(-50%);border-radius:10px;background-color:#eee}.node-finished[data-v-40ce1bbb]{text-decoration:line-through;color:#999}.node-ul[data-v-dc61c4c0]{display:grid;grid-template-rows:1fr;transition:.25s grid-template-rows ease}.node-ul ul[data-v-dc61c4c0]{background-color:#fff;margin:0;padding:0;list-style:none;overflow:hidden}.node-li[data-v-dc61c4c0]{padding:0;list-style:none;margin:0;line-height:1.5;position:relative;overflow:hidden}[data-v-dc61c4c0] .sublevel .node-li{margin-left:15px}[data-v-dc61c4c0] .drag-over-top:before{content:"";width:100%;height:1px;top:0;background-color:#eee;position:absolute;z-index:100}[data-v-dc61c4c0] .drag-over-center{background-color:#eee}[data-v-dc61c4c0] .drag-over-bottom:after{content:"";width:100%;height:1px;background-color:#eee;position:absolute;bottom:0;z-index:100}[data-v-dc61c4c0] .has-child:not(.collapsed) .drag-over-bottom:after{left:15px}.collapsed>.node-ul[data-v-dc61c4c0]{grid-template-rows:0fr}[data-v-dc61c4c0] .collapsed .node-icon .node-line{display:none}[data-v-dc61c4c0] .collapsed.has-child>.node-div>.node-icon{background-color:#ddd}.tree-title[data-v-dc61c4c0]{padding-left:25px;font-weight:700;outline:none;font-size:1.125rem;line-height:1.5;width:100%}[data-v-dc61c4c0] .node-li.has-child.collapsed .node-icon:after{background-color:#aaa}[data-v-dc61c4c0] .node-li.dragging .node-icon .node-line{display:none}[data-v-dc61c4c0] .has-child>.node-div>.node-icon .node-line{content:"";position:absolute;top:20px;left:50%;height:9999px;width:1px;background-color:#f2f2f2}[data-v-dc61c4c0] .has-child>.node-div>.node-icon:hover .node-line{background-color:var(--line-color)}.dragging-image{max-width:300px;opacity:.5}.record-tree-popper-content{display:flex;flex-wrap:wrap;padding:10px;box-shadow:0 2px 12px #1d1c1c1f;border:1px solid rgba(29,28,28,.12);border-radius:5px;overflow:hidden;background:#fff;z-index:9999}.record-tree-popper-content-item{padding:8px 10px;display:flex;align-items:center;justify-content:center;cursor:pointer}.record-tree-popper-content-item.active{background:#f2f2f2}.record-tree-title-bar{position:relative;display:flex;padding:3px 0 5px}.record-tree-title{padding-left:25px;font-weight:700;outline:none;font-size:18px;line-height:1.5;width:100%}.record-tree-popper-reference{display:flex;position:absolute;top:0;left:0;text-align:center;border-radius:9999px;color:#fff}.record-tree-empty-icon{display:inline-block;border-radius:9999px}.record-tree-title .node-text{margin-left:0!important}.record-tree-title-bar .popper{transform:translate3d(0,22px,0)!important}.record-tree-title-finished{text-decoration:line-through;color:#999}.record-audio[data-v-e59bd63b]{position:absolute;background:#fff;padding:20px;width:400px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:10px;z-index:999;box-shadow:0 4px 6px #0000001a,0 1px 3px #00000014}.record-audio .recwave[data-v-e59bd63b]{width:300px;height:40px}.record-audio .audio-item[data-v-e59bd63b]{margin-top:10px;display:flex;align-items:center}.record-audio .audio-item a[data-v-e59bd63b]{color:#52a770;margin-left:10px;font-size:12px;cursor:pointer}.record-audio .audio-text[data-v-e59bd63b]{background:#f5f5f5;margin-top:10px;padding:8px 12px;border-radius:5px}.record-audio .buttons[data-v-e59bd63b]{margin-top:10px;display:flex;align-items:center}.record-audio .buttons .btn[data-v-e59bd63b]{margin-right:10px;font-size:14px;width:80px;padding:6px 0;text-align:center;cursor:pointer;border-radius:20px}.record-audio .buttons .finish[data-v-e59bd63b]{color:#fff;background:#1677ff;border:1px solid #1677ff}.record-audio .buttons .disabled[data-v-e59bd63b]{background:#eee;cursor:default;border-color:#eee}.record-audio .buttons .cancel[data-v-e59bd63b]{border:1px solid #eee}.record-audio .buttons .oper[data-v-e59bd63b]{margin-right:10px}.record-audio .main[data-v-e59bd63b]{display:flex;align-items:center}.record-audio .duration[data-v-e59bd63b]{width:60px;margin-left:10px;color:#999;font-size:12px}.wrap[data-v-e59bd63b]{position:fixed;left:0;top:0;bottom:0;z-index:9999}.mask[data-v-e59bd63b]{position:absolute;left:0;top:0;right:0;bottom:0;background:#fffc}.record-audio-mobile[data-v-e59bd63b]{display:flex;width:100vw;position:absolute;background:#fff;padding:20px;left:50%;top:50%;transform:translate(-50%,-50%);z-index:999;align-items:center}.record-audio-mobile .recwave[data-v-e59bd63b]{flex:1;height:30px}.record-audio-mobile .oper[data-v-e59bd63b]{margin-right:10px}.record-video[data-v-9c809fcc]{position:absolute;background:#fff;padding:20px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:10px;z-index:999;box-shadow:0 4px 6px #0000001a,0 1px 3px #00000014}.video-item[data-v-9c809fcc]{width:300px}.buttons[data-v-9c809fcc]{margin-top:10px;display:flex;align-items:center}.buttons .btn[data-v-9c809fcc]{margin-right:10px;font-size:14px;width:80px;padding:6px 0;text-align:center;cursor:pointer;border-radius:20px}.buttons .finish[data-v-9c809fcc]{color:#fff;background:#1677ff;border:1px solid #1677ff}.buttons .disabled[data-v-9c809fcc]{background:#eee;cursor:default;border-color:#eee}.buttons .cancel[data-v-9c809fcc]{border:1px solid #eee}.buttons .oper[data-v-9c809fcc]{margin-right:10px}.wrap[data-v-9c809fcc]{position:fixed;left:0;top:0;bottom:0;z-index:9999}.mask[data-v-9c809fcc]{position:absolute;left:0;top:0;right:0;bottom:0;background:#fffc}.record-video[data-v-69fc6ef1]{position:absolute;background:#fff;padding:20px;left:50%;top:50%;width:452px;transform:translate(-50%,-50%);border-radius:10px;z-index:999;box-shadow:0 4px 6px #0000001a,0 1px 3px #00000014}.video-item[data-v-69fc6ef1]{width:200px}.img-item[data-v-69fc6ef1]{width:200px;height:150px;border:1px dashed #eee;margin-left:10px}.img-item img[data-v-69fc6ef1]{width:200px}.record-content[data-v-69fc6ef1]{display:flex}.buttons[data-v-69fc6ef1]{margin-top:10px;display:flex;align-items:center}.buttons .btn[data-v-69fc6ef1]{margin-right:10px;font-size:14px;width:80px;padding:6px 0;text-align:center;cursor:pointer;border-radius:20px}.buttons .finish[data-v-69fc6ef1]{color:#fff;background:#1677ff;border:1px solid #1677ff}.buttons .disabled[data-v-69fc6ef1]{background:#eee;cursor:default;border-color:#eee}.buttons .cancel[data-v-69fc6ef1]{border:1px solid #eee}.buttons .oper[data-v-69fc6ef1]{margin-right:10px}.wrap[data-v-69fc6ef1]{position:fixed;left:0;top:0;bottom:0;z-index:9999}.mask[data-v-69fc6ef1]{position:absolute;left:0;top:0;right:0;bottom:0;background:#fffc}.record-tree-mobile .record-tree{height:calc(100vh - 45px);overflow-y:scroll}.record-tree-mobile .record-tree-main{padding-left:0;padding-right:0}.record-tree-mobile .record-tree-options{padding:12px 0;display:flex;position:fixed}.record-tree-mobile .node-icon{margin-right:8px;border:3px solid #fff}.record-tree-mobile .node-icon .node-circle{width:10px;height:10px}.record-tree-mobile .node-file-wrap{width:200px}.record-tree-mobile .node-file-right{display:none}.record-tree-mobile .node-image img{width:auto;max-height:80px}.record-tree-mobile .node-audio,.record-tree-mobile .node-video{width:200px}.record-tree-mobile .node-audio audio{width:200px;outline:none}.record-tree-mobile .node-video video{width:200px;outline:none}.record-tree-container{position:relative;height:100%}.record-tree-main{padding-left:15px;padding-right:15px;overflow:scroll;flex:1}.record-tree{position:relative;padding-bottom:40px;display:flex;flex-direction:column;overflow:hidden;height:100%}.record-tree.record-tree-nobar{padding-bottom:0}.record-tree-options{position:absolute;bottom:0;left:0;width:100%;display:flex;justify-content:space-between;padding:5px 0;background:#fff;border-top:1px dotted #ddd;align-items:center}.record-tree-option-left{display:flex;flex:1}.record-tree-option-left-fixed{display:flex;position:relative;align-items:center;padding:0 10px}.record-tree-option-left-fixed:after{content:"";position:absolute;right:0;width:1px;background:#eee;height:20px;top:50%;transform:translateY(-50%)}.record-tree-option-left-scroll{display:flex;padding:0 10px;flex:1;align-items:center}.record-tree-option-left-scroll::-webkit-scrollbar{display:none}.record-tree-option-left-scroll-mobile{overflow-x:scroll}.record-tree-option-right{display:flex;align-items:center;justify-content:center;padding:0 10px;font-size:16px;position:relative}.record-tree-option-right:before{content:"";position:absolute;left:0;width:1px;background:#eee;height:20px;top:50%;transform:translateY(-50%)}.record-tree-option-item{margin:0 5px;cursor:pointer;display:flex;justify-content:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}img:fullscreen{width:auto!important;height:auto!important;max-width:100%!important;max-height:100%!important;-o-object-fit:contain;object-fit:contain}.record-tree .node-text{flex:1;border:none;outline:none;word-break:break-all;overflow:hidden;-webkit-user-select:text;-moz-user-select:text;user-select:text}.record-tree .node-text a{color:#0076ff;cursor:pointer}.record-tree .node-text mark{background-color:transparent;text-decoration:underline;text-decoration-color:#9acd32;text-decoration-thickness:2px;text-underline-offset:2px}.record-tree .node-text p{line-height:1.3}.date-popover{display:block;padding:5px 10px;background:#333;border-radius:4px;position:fixed;z-index:9999;transform:translate(-50%,-120%);font-size:12px;color:#666;text-align:center;transition:opacity .3s;color:#fff}.date-popover:after{content:"";position:absolute;top:95%;left:50%;transform:translate(-50%);border-width:6px;border-style:solid;border-color:#333 transparent transparent transparent}.date-popover.date-popover--bottom{transform:translate(-50%,20%)}.date-popover.date-popover--bottom:after{top:auto;bottom:95%;border-color:transparent transparent #333 transparent}.tiptap p.is-editor-empty:first-child:before{color:#adb5bd;content:attr(data-placeholder);float:left;height:0;pointer-events:none}.top-bar{display:flex}.top-bar-left{flex:1}.top-bar-right{width:80px;display:flex;justify-content:center;align-items:center}.record-tree-lock{position:absolute;left:0;right:0;top:0;background:#fff;opacity:.3;pointer-events:none;height:100%}.record-tree-clipboard{position:fixed;left:0;top:0;right:0;display:flex;justify-content:space-between;background:#eee;padding:8px 20px;z-index:999}.record-tree-clipboard-text{flex:1;font-size:12px;color:#333;min-width:0}.record-tree-clipboard-text p{color:#999}.record-tree-clipboard-text div{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.record-tree-clipboard-operation{display:flex;align-items:center;justify-content:center}.record-tree-context-menu{position:fixed;z-index:10000;background:#fff;border-radius:6px;box-shadow:0 2px 12px #00000026;padding:4px 0;min-width:120px}.record-tree-context-menu .context-menu-item{display:flex;align-items:center;padding:8px 12px;cursor:pointer;font-size:14px;color:#333;transition:background-color .2s}.record-tree-context-menu .context-menu-item:hover{background-color:#f5f5f5}.record-tree-context-menu .context-menu-item svg{margin-right:8px}.record-tree-context-menu .context-menu-item span{white-space:nowrap}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
import { openBlock as rt, createElementBlock as
|
|
2
|
+
import { openBlock as rt, createElementBlock as ft, createElementVNode as Qe, createVNode as xt, unref as $e, Fragment as qr, renderList as $r, normalizeStyle as an, reactive as qs, ref as ut, watch as mn, withModifiers as Ht, normalizeClass as qt, createCommentVNode as At, toDisplayString as zn, nextTick as Qt, onMounted as wo, onBeforeUnmount as ta, createBlock as ln, onUnmounted as Mr, computed as Pn, resolveComponent as $s, createSlots as xo, withCtx as Gr, Teleport as Gs } from "vue";
|
|
3
3
|
import So from "vue3-popper";
|
|
4
4
|
import Ot from "vue-inline-svg";
|
|
5
|
-
import { detectDeviceType as
|
|
5
|
+
import { detectDeviceType as na, truncateString as js, formatBytes as Ks, getTag as Co, isTodoTag as To, getExt as jr, getTagStyle as Mo, uuid as hn, getTagStyleById as Xs, parseMimeType as ko, getSize as Ro, oss as Ao } from "@codernote/utils";
|
|
6
6
|
import Js from "mitt";
|
|
7
7
|
import { useEditor as Zs, EditorContent as Qs } from "@tiptap/vue-3";
|
|
8
8
|
import e0 from "@tiptap/extension-link";
|
|
@@ -10,7 +10,7 @@ import t0 from "@tiptap/extension-highlight";
|
|
|
10
10
|
import n0 from "@tiptap/extension-placeholder";
|
|
11
11
|
import { Mark as Eo, mergeAttributes as qn, Extension as r0, Node as $n, wrappingInputRule as i0, callOrReturn as a0, getExtensionField as o0, findParentNodeClosestToPos as s0 } from "@tiptap/core";
|
|
12
12
|
import l0 from "@tiptap/starter-kit";
|
|
13
|
-
import
|
|
13
|
+
import Ra from "dayjs";
|
|
14
14
|
const c0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1709866109224'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='4677'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M742.832175%20461.155909h125.076465a50.844091%2050.844091%200%200%201%200%20101.688182h-137.787488l27.455809%2027.45581A50.844091%2050.844091%200%201%201%20685.378352%20660.973188l-107.789474-106.772592a50.844091%2050.844091%200%200%201%200-71.690169l107.789474-107.789474a50.844091%2050.844091%200%201%201%2072.198609%2071.690169z%20m-586.740815-305.064549h711.81728a50.844091%2050.844091%200%200%201%200%20101.688183h-711.81728a50.844091%2050.844091%200%200%201%200-101.688183z%20m0%20305.064549h305.064549a50.844091%2050.844091%200%201%201%200%20101.688182h-305.064549a50.844091%2050.844091%200%200%201%200-101.688182z%20m0%20305.064548h711.81728a50.844091%2050.844091%200%200%201%200%20101.688183h-711.81728a50.844091%2050.844091%200%200%201%200-101.688183z'%20fill='%232c2c2c'%20p-id='4678'%3e%3c/path%3e%3c/svg%3e", u0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1709866100174'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='4504'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M281.676266%20461.155909l-14.744786-14.744787a50.844091%2050.844091%200%200%201%2071.690168-72.19861l107.789474%20107.789474a50.844091%2050.844091%200%200%201%200%2071.690169L338.621648%20660.973188a50.844091%2050.844091%200%201%201-71.690168-71.690169l27.455809-27.455809H156.09136a50.844091%2050.844091%200%200%201%200-101.688183z%20m586.740814-305.064549a50.844091%2050.844091%200%200%201%200%20101.688183h-711.817279a50.844091%2050.844091%200%200%201%200-101.688183z%20m0%20610.129097a50.844091%2050.844091%200%200%201%200%20101.688183h-711.817279a50.844091%2050.844091%200%200%201%200-101.688183z%20m0-305.064548a50.844091%2050.844091%200%200%201%200%20101.688182h-305.064548a50.844091%2050.844091%200%200%201%200-101.688182z'%20fill='%232c2c2c'%20p-id='4505'%3e%3c/path%3e%3c/svg%3e", f0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1709779202767'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='4512'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M470.016%20976.896q-44.032%200-59.392-20.48t-15.36-65.536q0-20.48-0.512-64.512t-1.024-93.696-1.536-96.768-1.024-74.752q0-39.936-7.68-62.464t-35.328-21.504q-20.48%200-48.64-1.024t-49.664%200q-35.84%200-45.568-19.456t13.824-50.176q24.576-30.72%2057.344-72.704t67.584-86.016%2068.096-87.04%2058.88-75.776q23.552-29.696%2045.568-30.72t46.592%2026.624q24.576%2029.696%2056.832%2069.632t67.072%2082.432%2068.608%2083.968%2060.416%2073.216q29.696%2035.84%2023.04%2058.88t-43.52%2023.04q-11.264%200-25.088%200.512t-29.184%201.024-30.208%201.024-27.136%200.512q-25.6%201.024-32.256%2016.384t-5.632%2041.984q0%2029.696%200.512%2077.824t1.024%20100.352%201.536%20101.376%201.024%2079.872q0%2013.312-2.048%2027.648t-9.728%2026.112-21.504%2019.968-36.352%208.192q-27.648%200-52.736%200.512t-56.832%201.536z'%20p-id='4513'%3e%3c/path%3e%3c/svg%3e", d0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1709779221999'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='4657'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M564.224%2044.032q43.008%200%2058.368%2020.48t15.36%2065.536q0%2020.48%200.512%2064.512t0.512%2093.696%200.512%2096.768%200.512%2074.752q0%2038.912%207.68%2061.952t35.328%2022.016q19.456%200%2048.128%201.024t49.152%201.024q35.84%200%2045.568%2018.944t-13.824%2049.664q-24.576%2030.72-57.344%2072.704t-68.096%2086.016-69.12%2086.528-59.392%2075.264q-23.552%2029.696-45.568%2030.72t-45.568-27.648q-24.576-29.696-57.344-69.632t-67.072-82.432-67.584-83.968-59.904-74.24q-29.696-35.84-22.528-58.88t44.032-23.04l24.576%200q14.336%200%2029.696-0.512t30.208-1.536%2026.112-1.024q26.624%200%2032.768-15.36t6.144-41.984q0-29.696-0.512-77.824t-0.512-100.352-0.512-101.376-0.512-79.872q0-13.312%202.048-27.648t9.728-26.112%2020.992-19.456%2036.864-7.68q27.648%200%2053.248-0.512t57.344-0.512z'%20p-id='4658'%3e%3c/path%3e%3c/svg%3e", h0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1709780159129'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='8535'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M901.12%2068.224a202.88%20202.88%200%200%200-286.976%200l-0.64%200.832%200.512%200.512c-0.768%200.704-1.728%200.896-2.368%201.6L144.896%20537.792l-0.128%200.128-0.128%200.256-11.712%2011.712a47.296%2047.296%200%200%200-9.856%2014.656c-85.76%20109.76-79.36%20268.288%2021.76%20369.344%20100.864%20100.992%20259.008%20107.52%20368.832%2022.272a51.072%2051.072%200%200%200%2015.232-10.24l324.608-324.672a48.512%2048.512%200%200%200%201.024-68.8%2048.704%2048.704%200%200%200-68.864%200.896L475.776%20863.36l-0.256-0.256c-0.896%200.96-1.472%202.112-2.496%203.008a184%20184%200%200%201-260.352-259.968l0.256-0.384c0.896-0.96%201.92-1.536%202.944-2.432l-0.256-0.192%20464-464c0.64-0.704%200.896-1.664%201.536-2.432l0.256%200.256c0.256-0.256%200.384-0.576%200.64-0.768a106.88%20106.88%200%201%201%20151.232%20151.296l-0.768%200.64%200.512%200.512c-0.768%200.64-1.728%200.896-2.368%201.6l-478.592%20478.656c-11.392%2011.456-29.888%2010.112-41.152-1.344a28.224%2028.224%200%200%201-0.64-40.384l415.232-415.104a48.64%2048.64%200%200%200%200.896-68.8%2048.576%2048.576%200%200%200-68.736%200.896l-415.168%20415.296c-0.384%200.32-0.512%200.768-0.768%201.088-47.36%2048.96-46.976%20126.72%201.344%20174.976%2045.888%2046.08%20118.4%2048.128%20167.488%207.616%203.136-1.92%206.656-3.584%209.344-6.464l478.592-478.656c0.768-0.704%200.896-1.664%201.536-2.432l0.256%200.256%200.832-0.64a202.944%20202.944%200%200%200%200-286.976z'%20fill='%23030000'%20p-id='8536'%3e%3c/path%3e%3c/svg%3e", p0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1709780533791'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='25342'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M355.555556%20967.111111a28.444444%2028.444444%200%201%201%200-56.888889h312.888888a28.444444%2028.444444%200%201%201%200%2056.888889H355.555556z%20m128-56.888889v-100.878222a296.433778%20296.433778%200%200%201-182.727112-86.158222A296.718222%20296.718222%200%200%201%20213.333333%20512v-99.555556a28.444444%2028.444444%200%200%201%2056.888889%200v99.555556c0.142222%20133.475556%20108.316444%20241.635556%20241.777778%20241.777778%20133.475556-0.142222%20241.635556-108.302222%20241.777778-241.777778v-99.555556a28.444444%2028.444444%200%201%201%2056.888889%200v99.555556a296.718222%20296.718222%200%200%201-87.466667%20211.2A296.433778%20296.433778%200%200%201%20540.444444%20809.358222V910.222222h-56.888888z%20m-113.777778-391.111111v-312.888889C369.777778%20123.747556%20436.636444%2056.888889%20519.111111%2056.888889%20601.6%2056.888889%20668.444444%20123.747556%20668.444444%20206.222222v312.888889C668.444444%20601.585778%20601.6%20668.444444%20519.111111%20668.444444%20436.636444%20668.444444%20369.777778%20601.585778%20369.777778%20519.111111z'%20fill='%23323233'%20p-id='25343'%3e%3c/path%3e%3c/svg%3e", m0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1709780437481'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='16390'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M746.656%20310.528l110.688-49.184a42.656%2042.656%200%200%201%2060%2038.976v423.36a42.656%2042.656%200%200%201-60%2038.976l-110.688-49.184V768a85.344%2085.344%200%200%201-85.312%2085.344H192A85.344%2085.344%200%200%201%20106.656%20768V256A85.344%2085.344%200%200%201%20192%20170.656h469.344A85.344%2085.344%200%200%201%20746.656%20256v54.528zM320%20381.184v261.632a21.344%2021.344%200%200%200%2033.152%2017.728l196.224-130.784a21.344%2021.344%200%200%200%200-35.52l-196.224-130.784a21.344%2021.344%200%200%200-33.152%2017.728z'%20fill='%23000000'%20p-id='16391'%3e%3c/path%3e%3c/svg%3e", v0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1709780461968'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='20299'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M813.812907%20828.826855l-31.770588%200%200%200L241.960751%20828.826855l-0.004093%200-31.766494%200c-35.092239%200-63.541175-28.369118-63.541175-63.365166L146.648988%20337.743234c0-34.996049%2028.448936-63.365166%2063.541175-63.365166l31.766494%200%200.004093%200%200%200%20103.249549%200%2039.709397-63.365166c0-8.749268%2022.99983-15.84078%2031.774681-15.84078l190.614315%200c8.769734%200%2031.770588%207.091512%2031.770588%2015.84078l39.712467%2063.365166%20103.250572%200%2031.770588%200c35.092239%200%2063.537082%2028.369118%2063.537082%2063.365166l0%20427.718455C877.349989%20800.457738%20848.905146%20828.826855%20813.812907%20828.826855L813.812907%20828.826855zM512.001023%20337.743234c-114.046453%200-206.504214%2092.201935-206.504214%20205.940372%200%20113.739461%2092.457762%20205.936279%20206.504214%20205.936279%20114.043383%200%20206.496028-92.196819%20206.500121-205.928093l0-0.016373C718.497051%20429.941076%20626.044406%20337.743234%20512.001023%20337.743234L512.001023%20337.743234zM512.001023%20686.254719c-78.958306%200-142.963039-63.828724-142.963039-142.571113%200-78.738295%2064.004733-142.571113%20142.963039-142.571113%2078.955236%200%20142.963039%2063.832817%20142.963039%20142.571113C654.964062%20622.425995%20590.95626%20686.254719%20512.001023%20686.254719L512.001023%20686.254719zM512.001023%20686.254719'%20fill='%23272636'%20p-id='20300'%3e%3c/path%3e%3c/svg%3e", g0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1709785409899'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='37829'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M512%200C230.4%200%200%20230.4%200%20512s230.4%20512%20512%20512%20512-230.4%20512-512-230.4-512-512-512z%20m0%20960c-249.6%200-448-198.4-448-448s198.4-448%20448-448%20448%20198.4%20448%20448-198.4%20448-448%20448z'%20fill='%23333333'%20p-id='37830'%3e%3c/path%3e%3cpath%20d='M352%20352h320v320h-320z'%20fill='%23333333'%20p-id='37831'%3e%3c/path%3e%3c/svg%3e", b0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1709785373002'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='30220'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M392.256%20515.008a119.744%20119.744%200%201%200%20239.488%200%20119.744%20119.744%200%201%200-239.488%200z'%20fill='%23333333'%20p-id='30221'%3e%3c/path%3e%3cpath%20d='M512%2068.032A447.488%20447.488%200%200%200%2065.024%20515.008%20447.424%20447.424%200%200%200%20512%20961.984a447.424%20447.424%200%200%200%20446.976-446.976A447.424%20447.424%200%200%200%20512%2068.032z%20m0%20829.952c-211.2%200-382.976-171.84-382.976-382.976S300.8%20132.032%20512%20132.032s382.976%20171.84%20382.976%20382.976S723.2%20897.984%20512%20897.984z'%20fill='%23333333'%20p-id='30222'%3e%3c/path%3e%3c/svg%3e", _0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1712145583790'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='5884'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M734.165333%20350.165333l-384%20384L469.333333%20853.333333H170.666667v-298.666666l119.168%20119.168%20384-384L554.666667%20170.666667h298.666666v298.666666l-119.168-119.168zM256%20256v192H170.666667V170.666667h256v85.333333H256z%20m512%20512v-170.666667h85.333333v256h-256v-85.333333h170.666667z'%20fill='%234B4F54'%20p-id='5885'%3e%3c/path%3e%3c/svg%3e", y0 = "data:image/svg+xml,%3csvg%20t='1714370428406'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='4557'%20width='200'%20height='200'%3e%3cpath%20d='M213.333333%20213.333333h213.333334V128H170.666667a42.666667%2042.666667%200%200%200-42.666667%2042.666667v256h85.333333V213.333333zM170.666667%20896h256v-85.333333H213.333333v-213.333334H128v256a42.666667%2042.666667%200%200%200%2042.666667%2042.666667z%20m725.333333-42.666667v-256h-85.333333v213.333334h-213.333334v85.333333h256a42.666667%2042.666667%200%200%200%2042.666667-42.666667zM597.333333%20213.333333h213.333334v213.333334h85.333333V170.666667a42.666667%2042.666667%200%200%200-42.666667-42.666667h-256v85.333333z'%20fill='%23515151'%20p-id='4558'%3e%3c/path%3e%3c/svg%3e", w0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1718256873576'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='8028'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M707.872%20484.64C745.376%20440.096%20768%20382.656%20768%20320c0-141.152-114.848-256-256-256l-128%200-128%200L192%2064l0%20896%2064%200%20128%200%20192%200c141.152%200%20256-114.848%20256-256C832%20611.04%20782.208%20529.504%20707.872%20484.64zM384%20192l101.504%200c55.968%200%20101.504%2057.408%20101.504%20128s-45.536%20128-101.504%20128L384%20448%20384%20192zM543.008%20832%20384%20832%20384%20576l159.008%200c58.464%200%20106.016%2057.408%20106.016%20128S601.44%20832%20543.008%20832z'%20fill='%23000000'%20p-id='8029'%3e%3c/path%3e%3c/svg%3e", x0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1718256954702'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='9002'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M904%20816H120c-4.4%200-8%203.6-8%208v80c0%204.4%203.6%208%208%208h784c4.4%200%208-3.6%208-8v-80c0-4.4-3.6-8-8-8z%20m-650.3-80h85c4.2%200%208-2.7%209.3-6.8l53.7-166h219.2l53.2%20166c1.3%204%205%206.8%209.3%206.8h89.1c1.1%200%202.2-0.2%203.2-0.5%205.1-1.8%207.8-7.3%206-12.4L573.6%20118.6c-1.4-3.9-5.1-6.6-9.2-6.6H462.1c-4.2%200-7.9%202.6-9.2%206.6L244.5%20723.1c-0.4%201-0.5%202.1-0.5%203.2-0.1%205.3%204.3%209.7%209.7%209.7z%20m255.9-516.1h4.1l83.8%20263.8H424.9l84.7-263.8z'%20fill='%23333333'%20p-id='9003'%3e%3c/path%3e%3c/svg%3e", S0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1718341836843'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='5749'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M79.25419%201010.518503l930.261375-930.261375a46.513269%2046.513269%200%201%200-65.772693-65.772693L13.481497%20944.74581c-17.739973%2018.233418-17.539385%2047.335679%200.448313%2065.32438%2017.988701%2017.987698%2047.090962%2018.188286%2065.32438%200.448313z'%20fill='%23E02020'%20p-id='5750'%3e%3c/path%3e%3c/svg%3e", C0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1721969717382'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='4251'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M298.666667%20426.666667V341.333333a213.333333%20213.333333%200%201%201%20426.666666%200v85.333334h42.666667a85.333333%2085.333333%200%200%201%2085.333333%2085.333333v256a85.333333%2085.333333%200%200%201-85.333333%2085.333333H256a85.333333%2085.333333%200%200%201-85.333333-85.333333v-256a85.333333%2085.333333%200%200%201%2085.333333-85.333333h42.666667z%20m213.333333-213.333334a128%20128%200%200%200-128%20128v85.333334h256V341.333333a128%20128%200%200%200-128-128z'%20fill='green'%20p-id='4252'%3e%3c/path%3e%3c/svg%3e", T0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1721969878651'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='7064'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M666.752%20194.517333L617.386667%20268.629333A128%20128%200%200%200%20384%20341.333333l0.042667%2085.333334h384a85.333333%2085.333333%200%200%201%2085.333333%2085.333333v256a85.333333%2085.333333%200%200%201-85.333333%2085.333333H256a85.333333%2085.333333%200%200%201-85.333333-85.333333v-256a85.333333%2085.333333%200%200%201%2085.333333-85.333333h42.666667V341.333333a213.333333%20213.333333%200%200%201%20368.085333-146.816z'%20fill='%23000000'%20p-id='7065'%3e%3c/path%3e%3c/svg%3e", M0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1724214601601'%20class='icon'%20viewBox='0%200%201035%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='7572'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='202.1484375'%20height='200'%3e%3cpath%20d='M388.361%20382.546h194.18v64.727h-194.18v-64.727zM0%20576.726h258.907v64.728H0v-64.727z%20m1035.63-129.453H776.723v-64.727h258.907v64.727zM388.361%20900.361H323.635V382.546h64.727v517.815z%20m614.906%200H388.361v-64.726h582.542V447.273h64.727v453.088h-32.363zM32.363%20123.64h614.906v64.726H64.727v388.362H0V123.639h32.363z%20m647.27%20517.815H453.087v-64.727h194.18V123.639h64.728v517.815h-32.364z'%20fill='%23333333'%20p-id='7573'%3e%3c/path%3e%3c/svg%3e", k0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1725435945575'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1036'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M896.074%20935.824c-10.233%200-20.465-3.901-28.275-11.707L99.65%20156.469c-15.626-15.616-15.634-40.942-0.019-56.568%2015.616-15.626%2040.942-15.634%2056.568-0.019L924.35%20867.531c15.626%2015.615%2015.634%2040.942%200.018%2056.568-7.811%207.816-18.054%2011.725-28.294%2011.725z'%20p-id='1037'%20fill='%23d81e06'%3e%3c/path%3e%3cpath%20d='M127.925%20935.824c-10.242%200-20.481-3.908-28.293-11.725-15.616-15.626-15.607-40.953%200.019-56.568L867.799%2099.882c15.627-15.616%2040.953-15.607%2056.568%200.019%2015.616%2015.626%2015.608%2040.953-0.018%2056.568L156.2%20924.117c-7.809%207.805-18.043%2011.707-28.275%2011.707z'%20p-id='1038'%20fill='%23d81e06'%3e%3c/path%3e%3c/svg%3e", R0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1725435953539'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1249'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M394.792%20797.429c-9.71%200-19.443-3.513-27.137-10.622L87.488%20527.917c-16.225-14.993-17.224-40.3-2.231-56.525%2014.993-16.226%2040.3-17.225%2056.524-2.231l280.167%20258.89c16.225%2014.993%2017.224%2040.3%202.231%2056.524-7.883%208.532-18.62%2012.854-29.387%2012.854z'%20p-id='1250'%20fill='%237cba59'%3e%3c/path%3e%3cpath%20d='M394.808%20797.429c-10.555%200-21.088-4.15-28.949-12.391-15.249-15.984-14.652-41.304%201.333-56.553l514.564-490.858c15.983-15.249%2041.303-14.652%2056.553%201.333%2015.248%2015.985%2014.651%2041.305-1.334%2056.553l-514.563%20490.86c-7.745%207.387-17.684%2011.056-27.604%2011.056z'%20p-id='1251'%20fill='%237cba59'%3e%3c/path%3e%3c/svg%3e", A0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1760004998012'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='4876'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M672%20640c-8%200-16-3.2-22.4-9.6L512%20492.8l-137.6%20137.6c-12.8%2012.8-32%2012.8-44.8%200-12.8-12.8-12.8-32%200-44.8l160-160c12.8-12.8%2032-12.8%2044.8%200l160%20160c12.8%2012.8%2012.8%2032%200%2044.8-6.4%206.4-14.4%209.6-22.4%209.6z'%20fill='%23FEC10D'%20p-id='4877'%3e%3c/path%3e%3cpath%20d='M512%20960c-17.6%200-32-14.4-32-32V464c0-17.6%2014.4-32%2032-32s32%2014.4%2032%2032v464c0%2017.6-14.4%2032-32%2032z'%20fill='%23FEC10D'%20p-id='4878'%3e%3c/path%3e%3cpath%20d='M768%20768h-64c-17.6%200-32-14.4-32-32s14.4-32%2032-32h64c88%200%20160-72%20160-160%200-76.8-57.6-145.6-134.4-158.4-14.4-1.6-25.6-14.4-27.2-28.8C753.6%20227.2%20643.2%20128%20512%20128s-241.6%2099.2-254.4%20230.4c-1.6%2014.4-12.8%2025.6-27.2%2028.8-76.8%2011.2-134.4%2080-134.4%20156.8%200%2088%2072%20160%20160%20160h64c17.6%200%2032%2014.4%2032%2032s-14.4%2032-32%2032h-64C132.8%20768%2032%20667.2%2032%20544c0-100.8%2068.8-188.8%20164.8-216C224%20176%20355.2%2064%20512%2064c156.8%200%20288%20112%20315.2%20264C923.2%20355.2%20992%20443.2%20992%20544c0%20123.2-100.8%20224-224%20224z'%20fill='%23FEC10D'%20p-id='4879'%3e%3c/path%3e%3c/svg%3e", E0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1761639699991'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='4671'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M490.666667%20712.533333c0-119.466667%2081.066667-217.6%20196.266666-247.466666l-64-64c-17.066667-17.066667-42.666667-17.066667-59.733333%200l-396.8%20396.8v-597.333334h682.666667v277.333334c34.133333%2017.066667%2064%2038.4%2085.333333%2064v-384c0-21.333333-17.066667-42.666667-42.666667-42.666667h-768c-21.333333%200-42.666667%2017.066667-42.666666%2042.666667v682.666666c0%2021.333333%2017.066667%2042.666667%2042.666666%2042.666667h435.2c-42.666667-42.666667-68.266667-102.4-68.266666-170.666667z'%20p-id='4672'%3e%3c/path%3e%3cpath%20d='M337.066667%20375.466667m-85.333334%200a85.333333%2085.333333%200%201%200%20170.666667%200%2085.333333%2085.333333%200%201%200-170.666667%200Z'%20p-id='4673'%3e%3c/path%3e%3cpath%20d='M746.666667%20904.533333c-106.666667%200-196.266667-85.333333-196.266667-196.266666s85.333333-196.266667%20196.266667-196.266667%20196.266667%2085.333333%20196.266666%20196.266667-85.333333%20196.266667-196.266666%20196.266666z%20m-17.066667-132.266666v38.4h38.4v-38.4h-38.4z%20m0-157.866667v115.2h38.4v-115.2h-38.4z'%20p-id='4674'%3e%3c/path%3e%3c/svg%3e", kt = {
|
|
15
15
|
left: c0,
|
|
16
16
|
right: u0,
|
|
@@ -76,17 +76,17 @@ const c0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
|
76
76
|
], i = (a) => {
|
|
77
77
|
t("change", a);
|
|
78
78
|
};
|
|
79
|
-
return (a, o) => (rt(),
|
|
79
|
+
return (a, o) => (rt(), ft("div", D0, [
|
|
80
80
|
Qe("ul", null, [
|
|
81
81
|
Qe("li", null, [
|
|
82
|
-
|
|
82
|
+
xt($e(Ot), {
|
|
83
83
|
src: $e(kt).clear,
|
|
84
84
|
width: 16,
|
|
85
85
|
height: 16,
|
|
86
86
|
onClick: o[0] || (o[0] = (s) => i(null))
|
|
87
87
|
}, null, 8, ["src"])
|
|
88
88
|
]),
|
|
89
|
-
(rt(),
|
|
89
|
+
(rt(), ft(qr, null, $r(r, (s) => Qe("li", {
|
|
90
90
|
key: s,
|
|
91
91
|
style: an({ backgroundColor: s }),
|
|
92
92
|
onClick: (l) => i(s)
|
|
@@ -98,7 +98,7 @@ const c0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
|
98
98
|
currentId: null,
|
|
99
99
|
dragId: null,
|
|
100
100
|
pos: null,
|
|
101
|
-
isMobile:
|
|
101
|
+
isMobile: na() === "mobile",
|
|
102
102
|
noteCreatedAt: null
|
|
103
103
|
// 当前笔记的创建时间,用于计算历史日期
|
|
104
104
|
}), _r = {}, fr = Js();
|
|
@@ -260,7 +260,7 @@ const z0 = ["contenteditable"], P0 = {
|
|
|
260
260
|
emits: ["remove", "change", "keydown", "focus"],
|
|
261
261
|
setup(n, { expose: e, emit: t }) {
|
|
262
262
|
const r = ct.isMobile, i = t, a = n, o = ut(), s = ut(), l = ut(), f = ut(), m = ut(), v = ut(0);
|
|
263
|
-
|
|
263
|
+
mn(
|
|
264
264
|
() => a.data.content,
|
|
265
265
|
() => {
|
|
266
266
|
v.value = 0;
|
|
@@ -273,34 +273,34 @@ const z0 = ["contenteditable"], P0 = {
|
|
|
273
273
|
function R() {
|
|
274
274
|
m.value && m.value.focus();
|
|
275
275
|
}
|
|
276
|
-
function M(
|
|
277
|
-
const
|
|
278
|
-
if (
|
|
276
|
+
function M(ie) {
|
|
277
|
+
const ae = hr();
|
|
278
|
+
if (ie.key === "ArrowLeft" && ae > 0) {
|
|
279
279
|
Qt(() => {
|
|
280
|
-
rr(
|
|
280
|
+
rr(ie.currentTarget, 0);
|
|
281
281
|
});
|
|
282
282
|
return;
|
|
283
283
|
}
|
|
284
|
-
|
|
285
|
-
rr(
|
|
286
|
-
}), i("keydown",
|
|
284
|
+
ie.key === "ArrowRight" && ae === 0 && Qt(() => {
|
|
285
|
+
rr(ie.currentTarget, 1 / 0, !0);
|
|
286
|
+
}), i("keydown", ie);
|
|
287
287
|
}
|
|
288
|
-
function N(
|
|
289
|
-
i("focus",
|
|
288
|
+
function N(ie) {
|
|
289
|
+
i("focus", ie);
|
|
290
290
|
}
|
|
291
291
|
function ne() {
|
|
292
292
|
i("remove");
|
|
293
293
|
}
|
|
294
|
-
function me(
|
|
295
|
-
if (
|
|
294
|
+
function me(ie) {
|
|
295
|
+
if (ie.currentTarget !== f.value)
|
|
296
296
|
return;
|
|
297
|
-
const
|
|
298
|
-
|
|
297
|
+
const ae = l.value;
|
|
298
|
+
ae.requestFullscreen ? ae.requestFullscreen() : ae.webkitRequestFullscreen ? ae.webkitRequestFullscreen() : ae.msRequestFullscreen && ae.msRequestFullscreen();
|
|
299
299
|
}
|
|
300
|
-
function z(
|
|
301
|
-
if (
|
|
300
|
+
function z(ie) {
|
|
301
|
+
if (ie.currentTarget !== s.value)
|
|
302
302
|
return;
|
|
303
|
-
const
|
|
303
|
+
const ae = ie.clientX, Ee = ie.clientY, Ie = parseInt(
|
|
304
304
|
document.defaultView.getComputedStyle(l.value).width,
|
|
305
305
|
10
|
|
306
306
|
), je = parseInt(
|
|
@@ -309,7 +309,7 @@ const z0 = ["contenteditable"], P0 = {
|
|
|
309
309
|
), Ke = Ie / je;
|
|
310
310
|
let Ne = Ie, oe = je;
|
|
311
311
|
const pt = (Te) => {
|
|
312
|
-
let De = Ie + Te.clientX -
|
|
312
|
+
let De = Ie + Te.clientX - ae, Pe = je + Te.clientY - Ee;
|
|
313
313
|
const { origWidth: Ye, origHeight: He } = a.data.size || {};
|
|
314
314
|
Ye && He && (De = Math.min(De, Ye), Pe = Math.min(Pe, He)), De = Math.max(De, 50), Pe = Math.max(Pe, 50), De / Pe > Ke ? (Ne = Pe * Ke, oe = Pe, l.value.style.height = oe + "px", l.value.style.width = Ne + "px") : (Ne = De, oe = De / Ke, l.value.style.width = De + "px", l.value.style.height = oe + "px");
|
|
315
315
|
}, Ve = () => {
|
|
@@ -324,13 +324,13 @@ const z0 = ["contenteditable"], P0 = {
|
|
|
324
324
|
};
|
|
325
325
|
document.documentElement.addEventListener("mousemove", pt, !1), document.documentElement.addEventListener("mouseup", Ve, !1);
|
|
326
326
|
}
|
|
327
|
-
function q(
|
|
328
|
-
return window.location.protocol === "https:" && /^http:/.test(
|
|
327
|
+
function q(ie) {
|
|
328
|
+
return window.location.protocol === "https:" && /^http:/.test(ie) ? ie.replace(/^http:/, "https:") : ie;
|
|
329
329
|
}
|
|
330
|
-
function fe(
|
|
331
|
-
typeof
|
|
330
|
+
function fe(ie) {
|
|
331
|
+
typeof ie != "string" || !/http|https/.test(ie) ? v.value = 2 : v.value = 1;
|
|
332
332
|
}
|
|
333
|
-
return (
|
|
333
|
+
return (ie, ae) => (rt(), ft("div", {
|
|
334
334
|
class: "node-text",
|
|
335
335
|
ref_key: "element",
|
|
336
336
|
ref: o,
|
|
@@ -343,27 +343,27 @@ const z0 = ["contenteditable"], P0 = {
|
|
|
343
343
|
contenteditable: !1,
|
|
344
344
|
class: qt(`node-complex node-${n.data.type}`)
|
|
345
345
|
}, [
|
|
346
|
-
n.readOnly ? At("", !0) : (rt(),
|
|
346
|
+
n.readOnly ? At("", !0) : (rt(), ft("span", P0)),
|
|
347
347
|
Qe("div", H0, [
|
|
348
|
-
n.data.type === "image" && !v.value ? (rt(),
|
|
348
|
+
n.data.type === "image" && !v.value ? (rt(), ft("img", {
|
|
349
349
|
key: 0,
|
|
350
350
|
ref_key: "resource",
|
|
351
351
|
ref: l,
|
|
352
352
|
src: q(n.data.content),
|
|
353
353
|
width: n.data.size ? n.data.size.width : 80,
|
|
354
354
|
height: n.data.size ? n.data.size.height : 80,
|
|
355
|
-
onError:
|
|
355
|
+
onError: ae[0] || (ae[0] = (Ee) => fe(n.data.content))
|
|
356
356
|
}, null, 40, V0)) : At("", !0),
|
|
357
|
-
n.data.type === "audio" && !v.value ? (rt(),
|
|
357
|
+
n.data.type === "audio" && !v.value ? (rt(), ft("audio", {
|
|
358
358
|
key: 1,
|
|
359
359
|
ref_key: "resource",
|
|
360
360
|
ref: l,
|
|
361
361
|
src: q(n.data.content),
|
|
362
362
|
controls: "",
|
|
363
363
|
width: "300",
|
|
364
|
-
onError:
|
|
364
|
+
onError: ae[1] || (ae[1] = (Ee) => fe(n.data.content))
|
|
365
365
|
}, null, 40, Y0)) : At("", !0),
|
|
366
|
-
n.data.type === "video" && !v.value ? (rt(),
|
|
366
|
+
n.data.type === "video" && !v.value ? (rt(), ft("video", {
|
|
367
367
|
key: 2,
|
|
368
368
|
ref_key: "resource",
|
|
369
369
|
ref: l,
|
|
@@ -371,9 +371,9 @@ const z0 = ["contenteditable"], P0 = {
|
|
|
371
371
|
controls: "",
|
|
372
372
|
width: n.data.size ? n.data.size.width : 300,
|
|
373
373
|
height: n.data.size ? n.data.size.width : 300,
|
|
374
|
-
onError:
|
|
374
|
+
onError: ae[2] || (ae[2] = (Ee) => fe(n.data.content))
|
|
375
375
|
}, null, 40, U0)) : At("", !0),
|
|
376
|
-
v.value && (n.data.type === "image" || n.data.type === "audio" || n.data.type === "video") ? (rt(),
|
|
376
|
+
v.value && (n.data.type === "image" || n.data.type === "audio" || n.data.type === "video") ? (rt(), ft("div", {
|
|
377
377
|
key: 3,
|
|
378
378
|
class: qt(
|
|
379
379
|
v.value === 1 ? "media-fail" : "media-placeholder"
|
|
@@ -383,7 +383,7 @@ const z0 = ["contenteditable"], P0 = {
|
|
|
383
383
|
src: v.value === 1 ? $e(kt).fail : $e(kt).uploading
|
|
384
384
|
}, null, 8, W0)
|
|
385
385
|
], 2)) : At("", !0),
|
|
386
|
-
n.data.type === "file" ? (rt(),
|
|
386
|
+
n.data.type === "file" ? (rt(), ft("div", q0, [
|
|
387
387
|
Qe("div", $0, [
|
|
388
388
|
Qe("h6", null, zn($e(js)(n.data.name, 20)), 1),
|
|
389
389
|
Qe("p", null, zn($e(Ks)(n.data.size)), 1)
|
|
@@ -396,39 +396,39 @@ const z0 = ["contenteditable"], P0 = {
|
|
|
396
396
|
}, "下载", 8, j0)
|
|
397
397
|
])
|
|
398
398
|
])) : At("", !0),
|
|
399
|
-
!n.readOnly && !v.value && !$e(r) && (n.data.type === "image" || n.data.type === "video") ? (rt(),
|
|
399
|
+
!n.readOnly && !v.value && !$e(r) && (n.data.type === "image" || n.data.type === "video") ? (rt(), ft("div", {
|
|
400
400
|
key: 5,
|
|
401
401
|
class: "resize-handle",
|
|
402
402
|
ref_key: "resizableBox",
|
|
403
403
|
ref: s,
|
|
404
404
|
onMousedown: Ht(z, ["prevent", "stop"])
|
|
405
405
|
}, [
|
|
406
|
-
|
|
406
|
+
xt($e(Ot), {
|
|
407
407
|
src: $e(kt).resize,
|
|
408
408
|
width: 15,
|
|
409
409
|
height: 15
|
|
410
410
|
}, null, 8, ["src"])
|
|
411
411
|
], 544)) : At("", !0),
|
|
412
|
-
!n.readOnly && !v.value && !$e(r) && n.data.type === "image" ? (rt(),
|
|
412
|
+
!n.readOnly && !v.value && !$e(r) && n.data.type === "image" ? (rt(), ft("div", {
|
|
413
413
|
key: 6,
|
|
414
414
|
class: "fullscreen-handle",
|
|
415
415
|
ref_key: "fullscreenBox",
|
|
416
416
|
ref: f,
|
|
417
417
|
onMousedown: Ht(me, ["prevent", "stop"])
|
|
418
418
|
}, [
|
|
419
|
-
|
|
419
|
+
xt($e(Ot), {
|
|
420
420
|
src: $e(kt).fullscreen,
|
|
421
421
|
width: 15,
|
|
422
422
|
height: 15
|
|
423
423
|
}, null, 8, ["src"])
|
|
424
424
|
], 544)) : At("", !0),
|
|
425
|
-
n.readOnly ? At("", !0) : (rt(),
|
|
425
|
+
n.readOnly ? At("", !0) : (rt(), ft("div", {
|
|
426
426
|
key: 7,
|
|
427
427
|
class: "node-del",
|
|
428
428
|
onClick: Ht(ne, ["stop"])
|
|
429
429
|
}))
|
|
430
430
|
]),
|
|
431
|
-
n.readOnly ? At("", !0) : (rt(),
|
|
431
|
+
n.readOnly ? At("", !0) : (rt(), ft("span", {
|
|
432
432
|
key: 1,
|
|
433
433
|
ref_key: "holderRight",
|
|
434
434
|
ref: m,
|
|
@@ -1107,7 +1107,7 @@ class ol {
|
|
|
1107
1107
|
return !this.hasDefault;
|
|
1108
1108
|
}
|
|
1109
1109
|
}
|
|
1110
|
-
class
|
|
1110
|
+
class ra {
|
|
1111
1111
|
/**
|
|
1112
1112
|
@internal
|
|
1113
1113
|
*/
|
|
@@ -1129,7 +1129,7 @@ class ia {
|
|
|
1129
1129
|
*/
|
|
1130
1130
|
static compile(e, t) {
|
|
1131
1131
|
let r = /* @__PURE__ */ Object.create(null), i = 0;
|
|
1132
|
-
return e.forEach((a, o) => r[a] = new
|
|
1132
|
+
return e.forEach((a, o) => r[a] = new ra(a, i++, t, o)), r;
|
|
1133
1133
|
}
|
|
1134
1134
|
/**
|
|
1135
1135
|
When there is a mark of this type in the given set, a new set
|
|
@@ -1194,7 +1194,7 @@ let cl = class Fi {
|
|
|
1194
1194
|
Parse a document from the content of a DOM node.
|
|
1195
1195
|
*/
|
|
1196
1196
|
parse(e, t = {}) {
|
|
1197
|
-
let r = new
|
|
1197
|
+
let r = new Ea(this, t, !1);
|
|
1198
1198
|
return r.addAll(e, Xt.none, t.from, t.to), r.finish();
|
|
1199
1199
|
}
|
|
1200
1200
|
/**
|
|
@@ -1206,7 +1206,7 @@ let cl = class Fi {
|
|
|
1206
1206
|
the left of the input and the end of nodes at the end.
|
|
1207
1207
|
*/
|
|
1208
1208
|
parseSlice(e, t = {}) {
|
|
1209
|
-
let r = new
|
|
1209
|
+
let r = new Ea(this, t, !0);
|
|
1210
1210
|
return r.addAll(e, Xt.none, t.from, t.to), nt.maxOpen(r.finish());
|
|
1211
1211
|
}
|
|
1212
1212
|
/**
|
|
@@ -1263,13 +1263,13 @@ let cl = class Fi {
|
|
|
1263
1263
|
for (let i in e.marks) {
|
|
1264
1264
|
let a = e.marks[i].spec.parseDOM;
|
|
1265
1265
|
a && a.forEach((o) => {
|
|
1266
|
-
r(o =
|
|
1266
|
+
r(o = Da(o)), o.mark || o.ignore || o.clearMark || (o.mark = i);
|
|
1267
1267
|
});
|
|
1268
1268
|
}
|
|
1269
1269
|
for (let i in e.nodes) {
|
|
1270
1270
|
let a = e.nodes[i].spec.parseDOM;
|
|
1271
1271
|
a && a.forEach((o) => {
|
|
1272
|
-
r(o =
|
|
1272
|
+
r(o = Da(o)), o.node || o.ignore || o.mark || (o.node = i);
|
|
1273
1273
|
});
|
|
1274
1274
|
}
|
|
1275
1275
|
return t;
|
|
@@ -1324,7 +1324,7 @@ const zo = {
|
|
|
1324
1324
|
style: !0,
|
|
1325
1325
|
title: !0
|
|
1326
1326
|
}, Po = { ol: !0, ul: !0 }, yr = 1, zi = 2, gr = 4;
|
|
1327
|
-
function
|
|
1327
|
+
function Aa(n, e, t) {
|
|
1328
1328
|
return e != null ? (e ? yr : 0) | (e === "full" ? zi : 0) : n && n.whitespace == "pre" ? yr | zi : t & ~gr;
|
|
1329
1329
|
}
|
|
1330
1330
|
class Lr {
|
|
@@ -1360,10 +1360,10 @@ class Lr {
|
|
|
1360
1360
|
return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !zo.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
|
|
1361
1361
|
}
|
|
1362
1362
|
}
|
|
1363
|
-
class
|
|
1363
|
+
class Ea {
|
|
1364
1364
|
constructor(e, t, r) {
|
|
1365
1365
|
this.parser = e, this.options = t, this.isOpen = r, this.open = 0, this.localPreserveWS = !1;
|
|
1366
|
-
let i = t.topNode, a, o =
|
|
1366
|
+
let i = t.topNode, a, o = Aa(null, t.preserveWhitespace, 0) | (r ? gr : 0);
|
|
1367
1367
|
i ? a = new Lr(i.type, i.attrs, Xt.none, !0, t.topMatch || i.type.contentMatch, o) : r ? a = new Lr(null, null, Xt.none, !0, null, o) : a = new Lr(e.schema.topNodeType, null, Xt.none, !0, null, o), this.nodes = [a], this.find = t.findPositions, this.needsBlock = !1;
|
|
1368
1368
|
}
|
|
1369
1369
|
get top() {
|
|
@@ -1529,7 +1529,7 @@ class Da {
|
|
|
1529
1529
|
a.match && (a.match = a.match.matchType(e.type));
|
|
1530
1530
|
let o = Xt.none;
|
|
1531
1531
|
for (let s of i.concat(e.marks))
|
|
1532
|
-
(a.type ? a.type.allowsMarkType(s.type) :
|
|
1532
|
+
(a.type ? a.type.allowsMarkType(s.type) : Ba(s.type, e.type)) && (o = s.addToSet(o));
|
|
1533
1533
|
return a.content.push(e.mark(o)), !0;
|
|
1534
1534
|
}
|
|
1535
1535
|
return !1;
|
|
@@ -1545,10 +1545,10 @@ class Da {
|
|
|
1545
1545
|
this.closeExtra();
|
|
1546
1546
|
let o = this.top;
|
|
1547
1547
|
o.match = o.match && o.match.matchType(e);
|
|
1548
|
-
let s =
|
|
1548
|
+
let s = Aa(e, a, o.options);
|
|
1549
1549
|
o.options & gr && o.content.length == 0 && (s |= gr);
|
|
1550
1550
|
let l = Xt.none;
|
|
1551
|
-
return r = r.filter((f) => (o.type ? o.type.allowsMarkType(f.type) :
|
|
1551
|
+
return r = r.filter((f) => (o.type ? o.type.allowsMarkType(f.type) : Ba(f.type, e)) ? (l = f.addToSet(l), !1) : !0), this.nodes.push(new Lr(e, t, l, i, null, s)), this.open++, r;
|
|
1552
1552
|
}
|
|
1553
1553
|
// Make sure all nodes above this.open are finished and added to
|
|
1554
1554
|
// their parents
|
|
@@ -1651,13 +1651,13 @@ function fl(n) {
|
|
|
1651
1651
|
function dl(n, e) {
|
|
1652
1652
|
return (n.matches || n.msMatchesSelector || n.webkitMatchesSelector || n.mozMatchesSelector).call(n, e);
|
|
1653
1653
|
}
|
|
1654
|
-
function
|
|
1654
|
+
function Da(n) {
|
|
1655
1655
|
let e = {};
|
|
1656
1656
|
for (let t in n)
|
|
1657
1657
|
e[t] = n[t];
|
|
1658
1658
|
return e;
|
|
1659
1659
|
}
|
|
1660
|
-
function
|
|
1660
|
+
function Ba(n, e) {
|
|
1661
1661
|
let t = e.schema.nodes;
|
|
1662
1662
|
for (let r in t) {
|
|
1663
1663
|
let i = t[r];
|
|
@@ -1769,17 +1769,17 @@ class ri {
|
|
|
1769
1769
|
This can be useful as a base to build a custom serializer from.
|
|
1770
1770
|
*/
|
|
1771
1771
|
static nodesFromSchema(e) {
|
|
1772
|
-
let t =
|
|
1772
|
+
let t = La(e.nodes);
|
|
1773
1773
|
return t.text || (t.text = (r) => r.text), t;
|
|
1774
1774
|
}
|
|
1775
1775
|
/**
|
|
1776
1776
|
Gather the serializers in a schema's mark specs into an object.
|
|
1777
1777
|
*/
|
|
1778
1778
|
static marksFromSchema(e) {
|
|
1779
|
-
return
|
|
1779
|
+
return La(e.marks);
|
|
1780
1780
|
}
|
|
1781
1781
|
}
|
|
1782
|
-
function
|
|
1782
|
+
function La(n) {
|
|
1783
1783
|
let e = {};
|
|
1784
1784
|
for (let t in n) {
|
|
1785
1785
|
let r = n[t].spec.toDOM;
|
|
@@ -1790,10 +1790,10 @@ function Na(n) {
|
|
|
1790
1790
|
function bi(n) {
|
|
1791
1791
|
return n.document || window.document;
|
|
1792
1792
|
}
|
|
1793
|
-
const
|
|
1793
|
+
const Na = /* @__PURE__ */ new WeakMap();
|
|
1794
1794
|
function hl(n) {
|
|
1795
|
-
let e =
|
|
1796
|
-
return e === void 0 &&
|
|
1795
|
+
let e = Na.get(n);
|
|
1796
|
+
return e === void 0 && Na.set(n, e = pl(n)), e;
|
|
1797
1797
|
}
|
|
1798
1798
|
function pl(n) {
|
|
1799
1799
|
let e = null;
|
|
@@ -1855,7 +1855,7 @@ const Ho = 65535, Vo = Math.pow(2, 16);
|
|
|
1855
1855
|
function ml(n, e) {
|
|
1856
1856
|
return n + e * Vo;
|
|
1857
1857
|
}
|
|
1858
|
-
function
|
|
1858
|
+
function Oa(n) {
|
|
1859
1859
|
return n & Ho;
|
|
1860
1860
|
}
|
|
1861
1861
|
function vl(n) {
|
|
@@ -1912,7 +1912,7 @@ class nn {
|
|
|
1912
1912
|
@internal
|
|
1913
1913
|
*/
|
|
1914
1914
|
recover(e) {
|
|
1915
|
-
let t = 0, r =
|
|
1915
|
+
let t = 0, r = Oa(e);
|
|
1916
1916
|
if (!this.inverted)
|
|
1917
1917
|
for (let i = 0; i < r; i++)
|
|
1918
1918
|
t += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];
|
|
@@ -1949,7 +1949,7 @@ class nn {
|
|
|
1949
1949
|
@internal
|
|
1950
1950
|
*/
|
|
1951
1951
|
touches(e, t) {
|
|
1952
|
-
let r = 0, i =
|
|
1952
|
+
let r = 0, i = Oa(t), a = this.inverted ? 2 : 1, o = this.inverted ? 1 : 2;
|
|
1953
1953
|
for (let s = 0; s < this.ranges.length; s += 3) {
|
|
1954
1954
|
let l = this.ranges[s] - (this.inverted ? r : 0);
|
|
1955
1955
|
if (l > e)
|
|
@@ -2178,11 +2178,11 @@ class Vt {
|
|
|
2178
2178
|
}
|
|
2179
2179
|
}
|
|
2180
2180
|
}
|
|
2181
|
-
function
|
|
2181
|
+
function ia(n, e, t) {
|
|
2182
2182
|
let r = [];
|
|
2183
2183
|
for (let i = 0; i < n.childCount; i++) {
|
|
2184
2184
|
let a = n.child(i);
|
|
2185
|
-
a.content.size && (a = a.copy(
|
|
2185
|
+
a.content.size && (a = a.copy(ia(a.content, e, a))), a.isInline && (a = e(a, t, i)), r.push(a);
|
|
2186
2186
|
}
|
|
2187
2187
|
return tt.fromArray(r);
|
|
2188
2188
|
}
|
|
@@ -2194,11 +2194,11 @@ class Rn extends jt {
|
|
|
2194
2194
|
super(), this.from = e, this.to = t, this.mark = r;
|
|
2195
2195
|
}
|
|
2196
2196
|
apply(e) {
|
|
2197
|
-
let t = e.slice(this.from, this.to), r = e.resolve(this.from), i = r.node(r.sharedDepth(this.to)), a = new nt(
|
|
2197
|
+
let t = e.slice(this.from, this.to), r = e.resolve(this.from), i = r.node(r.sharedDepth(this.to)), a = new nt(ia(t.content, (o, s) => !o.isAtom || !s.type.allowsMarkType(this.mark.type) ? o : o.mark(this.mark.addToSet(o.marks)), i), t.openStart, t.openEnd);
|
|
2198
2198
|
return Vt.fromReplace(e, this.from, this.to, a);
|
|
2199
2199
|
}
|
|
2200
2200
|
invert() {
|
|
2201
|
-
return new
|
|
2201
|
+
return new vn(this.from, this.to, this.mark);
|
|
2202
2202
|
}
|
|
2203
2203
|
map(e) {
|
|
2204
2204
|
let t = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
|
|
@@ -2225,7 +2225,7 @@ class Rn extends jt {
|
|
|
2225
2225
|
}
|
|
2226
2226
|
}
|
|
2227
2227
|
jt.jsonID("addMark", Rn);
|
|
2228
|
-
class
|
|
2228
|
+
class vn extends jt {
|
|
2229
2229
|
/**
|
|
2230
2230
|
Create a mark-removing step.
|
|
2231
2231
|
*/
|
|
@@ -2233,7 +2233,7 @@ class mn extends jt {
|
|
|
2233
2233
|
super(), this.from = e, this.to = t, this.mark = r;
|
|
2234
2234
|
}
|
|
2235
2235
|
apply(e) {
|
|
2236
|
-
let t = e.slice(this.from, this.to), r = new nt(
|
|
2236
|
+
let t = e.slice(this.from, this.to), r = new nt(ia(t.content, (i) => i.mark(this.mark.removeFromSet(i.marks)), e), t.openStart, t.openEnd);
|
|
2237
2237
|
return Vt.fromReplace(e, this.from, this.to, r);
|
|
2238
2238
|
}
|
|
2239
2239
|
invert() {
|
|
@@ -2241,10 +2241,10 @@ class mn extends jt {
|
|
|
2241
2241
|
}
|
|
2242
2242
|
map(e) {
|
|
2243
2243
|
let t = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
|
|
2244
|
-
return t.deleted && r.deleted || t.pos >= r.pos ? null : new
|
|
2244
|
+
return t.deleted && r.deleted || t.pos >= r.pos ? null : new vn(t.pos, r.pos, this.mark);
|
|
2245
2245
|
}
|
|
2246
2246
|
merge(e) {
|
|
2247
|
-
return e instanceof
|
|
2247
|
+
return e instanceof vn && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new vn(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
|
|
2248
2248
|
}
|
|
2249
2249
|
toJSON() {
|
|
2250
2250
|
return {
|
|
@@ -2260,10 +2260,10 @@ class mn extends jt {
|
|
|
2260
2260
|
static fromJSON(e, t) {
|
|
2261
2261
|
if (typeof t.from != "number" || typeof t.to != "number")
|
|
2262
2262
|
throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");
|
|
2263
|
-
return new
|
|
2263
|
+
return new vn(t.from, t.to, e.markFromJSON(t.mark));
|
|
2264
2264
|
}
|
|
2265
2265
|
}
|
|
2266
|
-
jt.jsonID("removeMark",
|
|
2266
|
+
jt.jsonID("removeMark", vn);
|
|
2267
2267
|
class An extends jt {
|
|
2268
2268
|
/**
|
|
2269
2269
|
Create a node mark step.
|
|
@@ -2476,7 +2476,7 @@ function gl(n, e, t, r) {
|
|
|
2476
2476
|
if (!r.isInSet(v) && m.type.allowsMarkType(r.type)) {
|
|
2477
2477
|
let b = Math.max(f, e), R = Math.min(f + l.nodeSize, t), M = r.addToSet(v);
|
|
2478
2478
|
for (let N = 0; N < v.length; N++)
|
|
2479
|
-
v[N].isInSet(M) || (o && o.to == b && o.mark.eq(v[N]) ? o.to = R : i.push(o = new
|
|
2479
|
+
v[N].isInSet(M) || (o && o.to == b && o.mark.eq(v[N]) ? o.to = R : i.push(o = new vn(b, R, v[N])));
|
|
2480
2480
|
s && s.to == b ? s.to = R : a.push(s = new Rn(b, R, r));
|
|
2481
2481
|
}
|
|
2482
2482
|
}), i.forEach((l) => n.step(l)), a.forEach((l) => n.step(l));
|
|
@@ -2488,7 +2488,7 @@ function bl(n, e, t, r) {
|
|
|
2488
2488
|
return;
|
|
2489
2489
|
a++;
|
|
2490
2490
|
let l = null;
|
|
2491
|
-
if (r instanceof
|
|
2491
|
+
if (r instanceof ra) {
|
|
2492
2492
|
let f = o.marks, m;
|
|
2493
2493
|
for (; m = r.isInSet(f); )
|
|
2494
2494
|
(l || (l = [])).push(m), f = m.removeFromSet(f);
|
|
@@ -2504,9 +2504,9 @@ function bl(n, e, t, r) {
|
|
|
2504
2504
|
b ? (b.to = f, b.step = a) : i.push({ style: v, from: Math.max(s, e), to: f, step: a });
|
|
2505
2505
|
}
|
|
2506
2506
|
}
|
|
2507
|
-
}), i.forEach((o) => n.step(new
|
|
2507
|
+
}), i.forEach((o) => n.step(new vn(o.from, o.to, o.style)));
|
|
2508
2508
|
}
|
|
2509
|
-
function
|
|
2509
|
+
function aa(n, e, t, r = t.contentMatch, i = !0) {
|
|
2510
2510
|
let a = n.doc.nodeAt(e), o = [], s = e + 1;
|
|
2511
2511
|
for (let l = 0; l < a.childCount; l++) {
|
|
2512
2512
|
let f = a.child(l), m = s + f.nodeSize, v = r.matchType(f.type);
|
|
@@ -2515,7 +2515,7 @@ function oa(n, e, t, r = t.contentMatch, i = !0) {
|
|
|
2515
2515
|
else {
|
|
2516
2516
|
r = v;
|
|
2517
2517
|
for (let b = 0; b < f.marks.length; b++)
|
|
2518
|
-
t.allowsMarkType(f.marks[b].type) || n.step(new
|
|
2518
|
+
t.allowsMarkType(f.marks[b].type) || n.step(new vn(s, m, f.marks[b]));
|
|
2519
2519
|
if (i && f.isText && t.whitespace != "pre") {
|
|
2520
2520
|
let b, R = /\r?\n|\r/g, M;
|
|
2521
2521
|
for (; b = R.exec(f.text); )
|
|
@@ -2565,7 +2565,7 @@ function wl(n, e, t, r, i) {
|
|
|
2565
2565
|
let R = r.whitespace == "pre", M = !!r.contentMatch.matchType(r.schema.linebreakReplacement);
|
|
2566
2566
|
R && !M ? f = !1 : !R && M && (f = !0);
|
|
2567
2567
|
}
|
|
2568
|
-
f === !1 && $o(n, o, s, a),
|
|
2568
|
+
f === !1 && $o(n, o, s, a), aa(n, n.mapping.slice(a).map(s, 1), r, void 0, f === null);
|
|
2569
2569
|
let m = n.mapping.slice(a), v = m.map(s, 1), b = m.map(s + o.nodeSize, 1);
|
|
2570
2570
|
return n.step(new un(v, b, v + 1, b - 1, new nt(tt.from(r.create(l, null, o.marks)), 0, 0), 1, !0)), f === !0 && qo(n, o, s, a), !1;
|
|
2571
2571
|
}
|
|
@@ -2627,7 +2627,7 @@ function Tl(n, e, t) {
|
|
|
2627
2627
|
let m = n.doc.resolve(e + t);
|
|
2628
2628
|
$o(n, m.node(), m.before(), s);
|
|
2629
2629
|
}
|
|
2630
|
-
o.inlineContent &&
|
|
2630
|
+
o.inlineContent && aa(n, e + t - 1, o, a.node().contentMatchAt(a.index()), r == null);
|
|
2631
2631
|
let l = n.mapping.slice(s), f = l.map(e - t);
|
|
2632
2632
|
if (n.step(new $t(f, l.map(e + t, -1), nt.empty, !0)), r === !0) {
|
|
2633
2633
|
let m = n.doc.resolve(f);
|
|
@@ -3275,7 +3275,7 @@ class Ol {
|
|
|
3275
3275
|
third argument.
|
|
3276
3276
|
*/
|
|
3277
3277
|
clearIncompatible(e, t, r) {
|
|
3278
|
-
return
|
|
3278
|
+
return aa(this, e, t, r), this;
|
|
3279
3279
|
}
|
|
3280
3280
|
}
|
|
3281
3281
|
const xi = /* @__PURE__ */ Object.create(null);
|
|
@@ -3351,7 +3351,7 @@ class St {
|
|
|
3351
3351
|
let a = e.steps.length, o = this.ranges;
|
|
3352
3352
|
for (let s = 0; s < o.length; s++) {
|
|
3353
3353
|
let { $from: l, $to: f } = o[s], m = e.mapping.slice(a);
|
|
3354
|
-
e.replaceRange(m.map(l.pos), m.map(f.pos), s ? nt.empty : t), s == 0 &&
|
|
3354
|
+
e.replaceRange(m.map(l.pos), m.map(f.pos), s ? nt.empty : t), s == 0 && za(e, a, (r ? r.isInline : i && i.isTextblock) ? -1 : 1);
|
|
3355
3355
|
}
|
|
3356
3356
|
}
|
|
3357
3357
|
/**
|
|
@@ -3362,7 +3362,7 @@ class St {
|
|
|
3362
3362
|
let r = e.steps.length, i = this.ranges;
|
|
3363
3363
|
for (let a = 0; a < i.length; a++) {
|
|
3364
3364
|
let { $from: o, $to: s } = i[a], l = e.mapping.slice(r), f = l.map(o.pos), m = l.map(s.pos);
|
|
3365
|
-
a ? e.deleteRange(f, m) : (e.replaceRangeWith(f, m, t),
|
|
3365
|
+
a ? e.deleteRange(f, m) : (e.replaceRangeWith(f, m, t), za(e, r, t.isInline ? -1 : 1));
|
|
3366
3366
|
}
|
|
3367
3367
|
}
|
|
3368
3368
|
/**
|
|
@@ -3389,7 +3389,7 @@ class St {
|
|
|
3389
3389
|
negative, it will search backwards first.
|
|
3390
3390
|
*/
|
|
3391
3391
|
static near(e, t = 1) {
|
|
3392
|
-
return this.findFrom(e, t) || this.findFrom(e, -t) || new
|
|
3392
|
+
return this.findFrom(e, t) || this.findFrom(e, -t) || new gn(e.node(0));
|
|
3393
3393
|
}
|
|
3394
3394
|
/**
|
|
3395
3395
|
Find the cursor or leaf node selection closest to the start of
|
|
@@ -3398,14 +3398,14 @@ class St {
|
|
|
3398
3398
|
exists.
|
|
3399
3399
|
*/
|
|
3400
3400
|
static atStart(e) {
|
|
3401
|
-
return er(e, e, 0, 0, 1) || new
|
|
3401
|
+
return er(e, e, 0, 0, 1) || new gn(e);
|
|
3402
3402
|
}
|
|
3403
3403
|
/**
|
|
3404
3404
|
Find the cursor or leaf node selection closest to the end of the
|
|
3405
3405
|
given document.
|
|
3406
3406
|
*/
|
|
3407
3407
|
static atEnd(e) {
|
|
3408
|
-
return er(e, e, e.content.size, e.childCount, -1) || new
|
|
3408
|
+
return er(e, e, e.content.size, e.childCount, -1) || new gn(e);
|
|
3409
3409
|
}
|
|
3410
3410
|
/**
|
|
3411
3411
|
Deserialize the JSON representation of a selection. Must be
|
|
@@ -3452,16 +3452,16 @@ class Jo {
|
|
|
3452
3452
|
this.$from = e, this.$to = t;
|
|
3453
3453
|
}
|
|
3454
3454
|
}
|
|
3455
|
-
let
|
|
3456
|
-
function
|
|
3457
|
-
!
|
|
3455
|
+
let Ia = !1;
|
|
3456
|
+
function Fa(n) {
|
|
3457
|
+
!Ia && !n.parent.inlineContent && (Ia = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + n.parent.type.name + ")"));
|
|
3458
3458
|
}
|
|
3459
3459
|
class Ct extends St {
|
|
3460
3460
|
/**
|
|
3461
3461
|
Construct a text selection between the given points.
|
|
3462
3462
|
*/
|
|
3463
3463
|
constructor(e, t = e) {
|
|
3464
|
-
|
|
3464
|
+
Fa(e), Fa(t), super(e, t);
|
|
3465
3465
|
}
|
|
3466
3466
|
/**
|
|
3467
3467
|
Returns a resolved position if this is a cursor selection (an
|
|
@@ -3562,7 +3562,7 @@ class bt extends St {
|
|
|
3562
3562
|
return { type: "node", anchor: this.anchor };
|
|
3563
3563
|
}
|
|
3564
3564
|
getBookmark() {
|
|
3565
|
-
return new
|
|
3565
|
+
return new oa(this.anchor);
|
|
3566
3566
|
}
|
|
3567
3567
|
/**
|
|
3568
3568
|
@internal
|
|
@@ -3588,20 +3588,20 @@ class bt extends St {
|
|
|
3588
3588
|
}
|
|
3589
3589
|
bt.prototype.visible = !1;
|
|
3590
3590
|
St.jsonID("node", bt);
|
|
3591
|
-
class
|
|
3591
|
+
class oa {
|
|
3592
3592
|
constructor(e) {
|
|
3593
3593
|
this.anchor = e;
|
|
3594
3594
|
}
|
|
3595
3595
|
map(e) {
|
|
3596
3596
|
let { deleted: t, pos: r } = e.mapResult(this.anchor);
|
|
3597
|
-
return t ? new ii(r, r) : new
|
|
3597
|
+
return t ? new ii(r, r) : new oa(r);
|
|
3598
3598
|
}
|
|
3599
3599
|
resolve(e) {
|
|
3600
3600
|
let t = e.resolve(this.anchor), r = t.nodeAfter;
|
|
3601
3601
|
return r && bt.isSelectable(r) ? new bt(t) : St.near(t);
|
|
3602
3602
|
}
|
|
3603
3603
|
}
|
|
3604
|
-
class
|
|
3604
|
+
class gn extends St {
|
|
3605
3605
|
/**
|
|
3606
3606
|
Create an all-selection over the given document.
|
|
3607
3607
|
*/
|
|
@@ -3623,25 +3623,25 @@ class vn extends St {
|
|
|
3623
3623
|
@internal
|
|
3624
3624
|
*/
|
|
3625
3625
|
static fromJSON(e) {
|
|
3626
|
-
return new
|
|
3626
|
+
return new gn(e);
|
|
3627
3627
|
}
|
|
3628
3628
|
map(e) {
|
|
3629
|
-
return new
|
|
3629
|
+
return new gn(e);
|
|
3630
3630
|
}
|
|
3631
3631
|
eq(e) {
|
|
3632
|
-
return e instanceof
|
|
3632
|
+
return e instanceof gn;
|
|
3633
3633
|
}
|
|
3634
3634
|
getBookmark() {
|
|
3635
3635
|
return Il;
|
|
3636
3636
|
}
|
|
3637
3637
|
}
|
|
3638
|
-
St.jsonID("all",
|
|
3638
|
+
St.jsonID("all", gn);
|
|
3639
3639
|
const Il = {
|
|
3640
3640
|
map() {
|
|
3641
3641
|
return this;
|
|
3642
3642
|
},
|
|
3643
3643
|
resolve(n) {
|
|
3644
|
-
return new
|
|
3644
|
+
return new gn(n);
|
|
3645
3645
|
}
|
|
3646
3646
|
};
|
|
3647
3647
|
function er(n, e, t, r, i, a = !1) {
|
|
@@ -3661,7 +3661,7 @@ function er(n, e, t, r, i, a = !1) {
|
|
|
3661
3661
|
}
|
|
3662
3662
|
return null;
|
|
3663
3663
|
}
|
|
3664
|
-
function
|
|
3664
|
+
function za(n, e, t) {
|
|
3665
3665
|
let r = n.steps.length - 1;
|
|
3666
3666
|
if (r < e)
|
|
3667
3667
|
return;
|
|
@@ -3673,12 +3673,12 @@ function Pa(n, e, t) {
|
|
|
3673
3673
|
o == null && (o = m);
|
|
3674
3674
|
}), n.setSelection(St.near(n.doc.resolve(o), t));
|
|
3675
3675
|
}
|
|
3676
|
-
function
|
|
3676
|
+
function Pa(n, e) {
|
|
3677
3677
|
return !e || !n ? n : n.bind(e);
|
|
3678
3678
|
}
|
|
3679
3679
|
class Nr {
|
|
3680
3680
|
constructor(e, t, r) {
|
|
3681
|
-
this.name = e, this.init =
|
|
3681
|
+
this.name = e, this.init = Pa(t.init, r), this.apply = Pa(t.apply, r);
|
|
3682
3682
|
}
|
|
3683
3683
|
}
|
|
3684
3684
|
new Nr("doc", {
|
|
@@ -3717,7 +3717,7 @@ function Zo(n, e, t) {
|
|
|
3717
3717
|
}
|
|
3718
3718
|
return t;
|
|
3719
3719
|
}
|
|
3720
|
-
class
|
|
3720
|
+
class sa {
|
|
3721
3721
|
/**
|
|
3722
3722
|
Create a plugin.
|
|
3723
3723
|
*/
|
|
@@ -3905,15 +3905,15 @@ const Fl = $n.create({
|
|
|
3905
3905
|
if (n = n.previousSibling, !n)
|
|
3906
3906
|
return e;
|
|
3907
3907
|
}, es = function(n, e, t, r) {
|
|
3908
|
-
return t && (
|
|
3908
|
+
return t && (Ha(n, e, t, r, -1) || Ha(n, e, t, r, 1));
|
|
3909
3909
|
}, Hl = /^(img|br|input|textarea|hr)$/i;
|
|
3910
|
-
function
|
|
3910
|
+
function Ha(n, e, t, r, i) {
|
|
3911
3911
|
for (var a; ; ) {
|
|
3912
3912
|
if (n == t && e == r)
|
|
3913
3913
|
return !0;
|
|
3914
3914
|
if (e == (i < 0 ? 0 : Xr(n))) {
|
|
3915
3915
|
let o = n.parentNode;
|
|
3916
|
-
if (!o || o.nodeType != 1 ||
|
|
3916
|
+
if (!o || o.nodeType != 1 || la(n) || Hl.test(n.nodeName) || n.contentEditable == "false")
|
|
3917
3917
|
return !1;
|
|
3918
3918
|
e = jn(n) + (i < 0 ? 0 : 1), n = o;
|
|
3919
3919
|
} else if (n.nodeType == 1) {
|
|
@@ -3942,7 +3942,7 @@ function Vl(n, e, t) {
|
|
|
3942
3942
|
r = r && a == 0, i = i && a == Xr(n);
|
|
3943
3943
|
}
|
|
3944
3944
|
}
|
|
3945
|
-
function
|
|
3945
|
+
function la(n) {
|
|
3946
3946
|
let e;
|
|
3947
3947
|
for (let t = n; t && !(e = t.pmViewDesc); t = t.parentNode)
|
|
3948
3948
|
;
|
|
@@ -3955,9 +3955,9 @@ function ns(n, e) {
|
|
|
3955
3955
|
let t = document.createEvent("Event");
|
|
3956
3956
|
return t.initEvent("keydown", !0, !0), t.keyCode = n, t.key = t.code = e, t;
|
|
3957
3957
|
}
|
|
3958
|
-
const
|
|
3958
|
+
const bn = typeof navigator < "u" ? navigator : null, Va = typeof document < "u" ? document : null, Ln = bn && bn.userAgent || "", Vi = /Edge\/(\d+)/.exec(Ln), rs = /MSIE \d/.exec(Ln), Yi = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ln), kr = !!(rs || Yi || Vi), is = rs ? document.documentMode : Yi ? +Yi[1] : Vi ? +Vi[1] : 0, oi = !kr && /gecko\/(\d+)/i.test(Ln);
|
|
3959
3959
|
oi && +(/Firefox\/(\d+)/.exec(Ln) || [0, 0])[1];
|
|
3960
|
-
const Ui = !kr && /Chrome\/(\d+)/.exec(Ln), xn = !!Ui, as = Ui ? +Ui[1] : 0, Kn = !kr && !!
|
|
3960
|
+
const Ui = !kr && /Chrome\/(\d+)/.exec(Ln), xn = !!Ui, as = Ui ? +Ui[1] : 0, Kn = !kr && !!bn && /Apple Computer/.test(bn.vendor), ca = Kn && (/Mobile\/\w+/.test(Ln) || !!bn && bn.maxTouchPoints > 2), sn = ca || (bn ? /Mac/.test(bn.platform) : !1), os = bn ? /Win/.test(bn.platform) : !1, Rr = /Android \d/.test(Ln), ua = !!Va && "webkitFontSmoothing" in Va.documentElement.style, Yl = ua ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
3961
3961
|
function Ul(n, e = null) {
|
|
3962
3962
|
let t = n.domSelectionRange(), r = n.state.doc;
|
|
3963
3963
|
if (!t.focusNode)
|
|
@@ -3999,7 +3999,7 @@ function Ul(n, e = null) {
|
|
|
3999
3999
|
function ss(n) {
|
|
4000
4000
|
return n.editable ? n.hasFocus() : Gl(n) && document.activeElement && document.activeElement.contains(n.dom);
|
|
4001
4001
|
}
|
|
4002
|
-
function
|
|
4002
|
+
function fa(n, e = !1) {
|
|
4003
4003
|
let t = n.state.selection;
|
|
4004
4004
|
if ($l(n, t), !!ss(n)) {
|
|
4005
4005
|
if (!e && n.input.mouseDown && n.input.mouseDown.allowDefault && xn) {
|
|
@@ -4013,13 +4013,13 @@ function da(n, e = !1) {
|
|
|
4013
4013
|
ql(n);
|
|
4014
4014
|
else {
|
|
4015
4015
|
let { anchor: r, head: i } = t, a, o;
|
|
4016
|
-
|
|
4016
|
+
Ya && !(t instanceof Ct) && (t.$from.parent.inlineContent || (a = Ua(n, t.from)), !t.empty && !t.$from.parent.inlineContent && (o = Ua(n, t.to))), n.docView.setSelection(r, i, n, e), Ya && (a && Wa(a), o && Wa(o)), t.visible ? n.dom.classList.remove("ProseMirror-hideselection") : (n.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && Wl(n));
|
|
4017
4017
|
}
|
|
4018
4018
|
n.domObserver.setCurSelection(), n.domObserver.connectSelection();
|
|
4019
4019
|
}
|
|
4020
4020
|
}
|
|
4021
|
-
const
|
|
4022
|
-
function
|
|
4021
|
+
const Ya = Kn || xn && as < 63;
|
|
4022
|
+
function Ua(n, e) {
|
|
4023
4023
|
let { node: t, offset: r } = n.docView.domFromPos(e, 0), i = r < t.childNodes.length ? t.childNodes[r] : null, a = r ? t.childNodes[r - 1] : null;
|
|
4024
4024
|
if (Kn && i && i.contentEditable == "false")
|
|
4025
4025
|
return Ci(i);
|
|
@@ -4033,7 +4033,7 @@ function Wa(n, e) {
|
|
|
4033
4033
|
function Ci(n) {
|
|
4034
4034
|
return n.contentEditable = "true", Kn && n.draggable && (n.draggable = !1, n.wasDraggable = !0), n;
|
|
4035
4035
|
}
|
|
4036
|
-
function
|
|
4036
|
+
function Wa(n) {
|
|
4037
4037
|
n.contentEditable = "false", n.wasDraggable && (n.draggable = !0, n.wasDraggable = null);
|
|
4038
4038
|
}
|
|
4039
4039
|
function Wl(n) {
|
|
@@ -4056,11 +4056,11 @@ function ql(n) {
|
|
|
4056
4056
|
function $l(n, e) {
|
|
4057
4057
|
if (e instanceof bt) {
|
|
4058
4058
|
let t = n.docView.descAt(e.from);
|
|
4059
|
-
t != n.lastSelectedViewDesc && (
|
|
4059
|
+
t != n.lastSelectedViewDesc && (qa(n), t && t.selectNode(), n.lastSelectedViewDesc = t);
|
|
4060
4060
|
} else
|
|
4061
|
-
|
|
4061
|
+
qa(n);
|
|
4062
4062
|
}
|
|
4063
|
-
function
|
|
4063
|
+
function qa(n) {
|
|
4064
4064
|
n.lastSelectedViewDesc && (n.lastSelectedViewDesc.parent && n.lastSelectedViewDesc.deselectNode(), n.lastSelectedViewDesc = void 0);
|
|
4065
4065
|
}
|
|
4066
4066
|
function ls(n, e, t, r) {
|
|
@@ -4083,7 +4083,7 @@ function Wi(n, e) {
|
|
|
4083
4083
|
function Mn(n, e) {
|
|
4084
4084
|
return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()), !0;
|
|
4085
4085
|
}
|
|
4086
|
-
function
|
|
4086
|
+
function $a(n, e, t) {
|
|
4087
4087
|
let r = n.state.selection;
|
|
4088
4088
|
if (r instanceof Ct)
|
|
4089
4089
|
if (t.indexOf("s") > -1) {
|
|
@@ -4101,7 +4101,7 @@ function Ga(n, e, t) {
|
|
|
4101
4101
|
if (!a || a.isText)
|
|
4102
4102
|
return !1;
|
|
4103
4103
|
let s = e < 0 ? i.pos - a.nodeSize : i.pos;
|
|
4104
|
-
return a.isAtom || (o = n.docView.descAt(s)) && !o.contentDOM ? bt.isSelectable(a) ? Mn(n, new bt(e < 0 ? n.state.doc.resolve(i.pos - a.nodeSize) : i)) :
|
|
4104
|
+
return a.isAtom || (o = n.docView.descAt(s)) && !o.contentDOM ? bt.isSelectable(a) ? Mn(n, new bt(e < 0 ? n.state.doc.resolve(i.pos - a.nodeSize) : i)) : ua ? Mn(n, new Ct(n.state.doc.resolve(e < 0 ? s : s + a.nodeSize))) : !1 : !1;
|
|
4105
4105
|
}
|
|
4106
4106
|
} else return !1;
|
|
4107
4107
|
else {
|
|
@@ -4196,7 +4196,7 @@ function cs(n) {
|
|
|
4196
4196
|
return e && e.node && e.node.isBlock;
|
|
4197
4197
|
}
|
|
4198
4198
|
function Xl(n, e) {
|
|
4199
|
-
for (; n && e == n.childNodes.length && !
|
|
4199
|
+
for (; n && e == n.childNodes.length && !la(n); )
|
|
4200
4200
|
e = jn(n) + 1, n = n.parentNode;
|
|
4201
4201
|
for (; n && e < n.childNodes.length; ) {
|
|
4202
4202
|
let t = n.childNodes[e];
|
|
@@ -4208,7 +4208,7 @@ function Xl(n, e) {
|
|
|
4208
4208
|
}
|
|
4209
4209
|
}
|
|
4210
4210
|
function Jl(n, e) {
|
|
4211
|
-
for (; n && !e && !
|
|
4211
|
+
for (; n && !e && !la(n); )
|
|
4212
4212
|
e = jn(n), n = n.parentNode;
|
|
4213
4213
|
for (; n && e; ) {
|
|
4214
4214
|
let t = n.childNodes[e - 1];
|
|
@@ -4234,10 +4234,10 @@ function qi(n, e, t) {
|
|
|
4234
4234
|
n.domObserver.setCurSelection();
|
|
4235
4235
|
let { state: i } = n;
|
|
4236
4236
|
setTimeout(() => {
|
|
4237
|
-
n.state == i &&
|
|
4237
|
+
n.state == i && fa(n);
|
|
4238
4238
|
}, 50);
|
|
4239
4239
|
}
|
|
4240
|
-
function
|
|
4240
|
+
function Ga(n, e) {
|
|
4241
4241
|
let t = n.state.doc.resolve(e);
|
|
4242
4242
|
if (!(xn || os) && t.parent.inlineContent) {
|
|
4243
4243
|
let i = n.coordsAtPos(e);
|
|
@@ -4254,7 +4254,7 @@ function ja(n, e) {
|
|
|
4254
4254
|
}
|
|
4255
4255
|
return getComputedStyle(n.dom).direction == "rtl" ? "rtl" : "ltr";
|
|
4256
4256
|
}
|
|
4257
|
-
function
|
|
4257
|
+
function ja(n, e, t) {
|
|
4258
4258
|
let r = n.state.selection;
|
|
4259
4259
|
if (r instanceof Ct && !r.empty || t.indexOf("s") > -1 || sn && t.indexOf("m") > -1)
|
|
4260
4260
|
return !1;
|
|
@@ -4265,12 +4265,12 @@ function Ka(n, e, t) {
|
|
|
4265
4265
|
return Mn(n, o);
|
|
4266
4266
|
}
|
|
4267
4267
|
if (!i.parent.inlineContent) {
|
|
4268
|
-
let o = e < 0 ? i : a, s = r instanceof
|
|
4268
|
+
let o = e < 0 ? i : a, s = r instanceof gn ? St.near(o, e) : St.findFrom(o, e);
|
|
4269
4269
|
return s ? Mn(n, s) : !1;
|
|
4270
4270
|
}
|
|
4271
4271
|
return !1;
|
|
4272
4272
|
}
|
|
4273
|
-
function
|
|
4273
|
+
function Ka(n, e) {
|
|
4274
4274
|
if (!(n.state.selection instanceof Ct))
|
|
4275
4275
|
return !0;
|
|
4276
4276
|
let { $head: t, $anchor: r, empty: i } = n.state.selection;
|
|
@@ -4287,7 +4287,7 @@ function Xa(n, e) {
|
|
|
4287
4287
|
}
|
|
4288
4288
|
return !1;
|
|
4289
4289
|
}
|
|
4290
|
-
function
|
|
4290
|
+
function Xa(n, e, t) {
|
|
4291
4291
|
n.domObserver.stop(), e.contentEditable = t, n.domObserver.start();
|
|
4292
4292
|
}
|
|
4293
4293
|
function Zl(n) {
|
|
@@ -4296,7 +4296,7 @@ function Zl(n) {
|
|
|
4296
4296
|
let { focusNode: e, focusOffset: t } = n.domSelectionRange();
|
|
4297
4297
|
if (e && e.nodeType == 1 && t == 0 && e.firstChild && e.firstChild.contentEditable == "false") {
|
|
4298
4298
|
let r = e.firstChild;
|
|
4299
|
-
|
|
4299
|
+
Xa(n, r, "true"), setTimeout(() => Xa(n, r, "false"), 20);
|
|
4300
4300
|
}
|
|
4301
4301
|
return !1;
|
|
4302
4302
|
}
|
|
@@ -4307,22 +4307,22 @@ function Ql(n) {
|
|
|
4307
4307
|
function ec(n, e) {
|
|
4308
4308
|
let t = e.keyCode, r = Ql(e);
|
|
4309
4309
|
if (t == 8 || sn && t == 72 && r == "c")
|
|
4310
|
-
return
|
|
4310
|
+
return Ka(n, -1) || Qn(n, -1);
|
|
4311
4311
|
if (t == 46 && !e.shiftKey || sn && t == 68 && r == "c")
|
|
4312
|
-
return
|
|
4312
|
+
return Ka(n, 1) || Qn(n, 1);
|
|
4313
4313
|
if (t == 13 || t == 27)
|
|
4314
4314
|
return !0;
|
|
4315
4315
|
if (t == 37 || sn && t == 66 && r == "c") {
|
|
4316
|
-
let i = t == 37 ?
|
|
4317
|
-
return
|
|
4316
|
+
let i = t == 37 ? Ga(n, n.state.selection.from) == "ltr" ? -1 : 1 : -1;
|
|
4317
|
+
return $a(n, i, r) || Qn(n, i);
|
|
4318
4318
|
} else if (t == 39 || sn && t == 70 && r == "c") {
|
|
4319
|
-
let i = t == 39 ?
|
|
4320
|
-
return
|
|
4319
|
+
let i = t == 39 ? Ga(n, n.state.selection.from) == "ltr" ? 1 : -1 : 1;
|
|
4320
|
+
return $a(n, i, r) || Qn(n, i);
|
|
4321
4321
|
} else {
|
|
4322
4322
|
if (t == 38 || sn && t == 80 && r == "c")
|
|
4323
|
-
return
|
|
4323
|
+
return ja(n, -1, r) || Qn(n, -1);
|
|
4324
4324
|
if (t == 40 || sn && t == 78 && r == "c")
|
|
4325
|
-
return Zl(n) ||
|
|
4325
|
+
return Zl(n) || ja(n, 1, r) || Qn(n, 1);
|
|
4326
4326
|
if (r == (sn ? "m" : "c") && (t == 66 || t == 73 || t == 89 || t == 90))
|
|
4327
4327
|
return !0;
|
|
4328
4328
|
}
|
|
@@ -4382,7 +4382,7 @@ function fs(n, e, t, r, i) {
|
|
|
4382
4382
|
} else
|
|
4383
4383
|
n.someProp("transformPastedHTML", (v) => {
|
|
4384
4384
|
t = v(t, n);
|
|
4385
|
-
}), o = ic(t),
|
|
4385
|
+
}), o = ic(t), ua && ac(o);
|
|
4386
4386
|
let f = o && o.querySelector("[data-pm-slice]"), m = f && /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(f.getAttribute("data-pm-slice") || "");
|
|
4387
4387
|
if (m && m[3])
|
|
4388
4388
|
for (let v = +m[3]; v > 0; v--) {
|
|
@@ -4400,14 +4400,14 @@ function fs(n, e, t, r, i) {
|
|
|
4400
4400
|
return b.nodeName == "BR" && !b.nextSibling && b.parentNode && !tc.test(b.parentNode.nodeName) ? { ignore: !0 } : null;
|
|
4401
4401
|
}
|
|
4402
4402
|
})), m)
|
|
4403
|
-
s = oc(
|
|
4403
|
+
s = oc(Ja(s, +m[1], +m[2]), m[4]);
|
|
4404
4404
|
else if (s = nt.maxOpen(nc(s.content, i), !0), s.openStart || s.openEnd) {
|
|
4405
4405
|
let v = 0, b = 0;
|
|
4406
4406
|
for (let R = s.content.firstChild; v < s.openStart && !R.type.spec.isolating; v++, R = R.firstChild)
|
|
4407
4407
|
;
|
|
4408
4408
|
for (let R = s.content.lastChild; b < s.openEnd && !R.type.spec.isolating; b++, R = R.lastChild)
|
|
4409
4409
|
;
|
|
4410
|
-
s =
|
|
4410
|
+
s = Ja(s, v, b);
|
|
4411
4411
|
}
|
|
4412
4412
|
return n.someProp("transformPasted", (v) => {
|
|
4413
4413
|
s = v(s, n, l);
|
|
@@ -4461,7 +4461,7 @@ function $i(n, e, t, r, i, a) {
|
|
|
4461
4461
|
let o = e < 0 ? n.firstChild : n.lastChild, s = o.content;
|
|
4462
4462
|
return n.childCount > 1 && (a = 0), i < r - 1 && (s = $i(s, e, t, r, i + 1, a)), i >= t && (s = e < 0 ? o.contentMatchAt(0).fillBefore(s, a <= i).append(s) : s.append(o.contentMatchAt(o.childCount).fillBefore(tt.empty, !0))), n.replaceChild(e < 0 ? 0 : n.childCount - 1, o.copy(s));
|
|
4463
4463
|
}
|
|
4464
|
-
function
|
|
4464
|
+
function Ja(n, e, t) {
|
|
4465
4465
|
return e < n.openStart && (n = new nt($i(n.content, -1, e, n.openStart, 0, n.openEnd), e, n.openEnd)), t < n.openEnd && (n = new nt($i(n.content, 1, t, n.openEnd, 0, 0), n.openStart, t)), n;
|
|
4466
4466
|
}
|
|
4467
4467
|
const ms = {
|
|
@@ -4475,9 +4475,9 @@ const ms = {
|
|
|
4475
4475
|
td: ["table", "tbody", "tr"],
|
|
4476
4476
|
th: ["table", "tbody", "tr"]
|
|
4477
4477
|
};
|
|
4478
|
-
let
|
|
4478
|
+
let Za = null;
|
|
4479
4479
|
function vs() {
|
|
4480
|
-
return
|
|
4480
|
+
return Za || (Za = document.implementation.createHTMLDocument("title"));
|
|
4481
4481
|
}
|
|
4482
4482
|
let Ti = null;
|
|
4483
4483
|
function rc(n) {
|
|
@@ -4525,7 +4525,7 @@ function En(n, e) {
|
|
|
4525
4525
|
on.keydown = (n, e) => {
|
|
4526
4526
|
let t = e;
|
|
4527
4527
|
if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !bs(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !(Rr && xn && t.keyCode == 13)))
|
|
4528
|
-
if (t.keyCode != 229 && n.domObserver.forceFlush(),
|
|
4528
|
+
if (t.keyCode != 229 && n.domObserver.forceFlush(), ca && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
|
|
4529
4529
|
let r = Date.now();
|
|
4530
4530
|
n.input.lastIOSEnter = r, n.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
4531
4531
|
n.input.lastIOSEnter == r && (n.someProp("handleKeyDown", (i) => i(n, ns(13, "Enter"))), n.input.lastIOSEnter = 0);
|
|
@@ -4556,7 +4556,7 @@ function sc(n, e) {
|
|
|
4556
4556
|
let t = e.x - n.clientX, r = e.y - n.clientY;
|
|
4557
4557
|
return t * t + r * r < 100;
|
|
4558
4558
|
}
|
|
4559
|
-
function
|
|
4559
|
+
function da(n, e, t, r, i) {
|
|
4560
4560
|
if (r == -1)
|
|
4561
4561
|
return !1;
|
|
4562
4562
|
let a = n.state.doc.resolve(r);
|
|
@@ -4593,13 +4593,13 @@ function cc(n, e) {
|
|
|
4593
4593
|
return i != null ? (ar(n, bt.create(n.state.doc, i)), !0) : !1;
|
|
4594
4594
|
}
|
|
4595
4595
|
function uc(n, e, t, r, i) {
|
|
4596
|
-
return
|
|
4596
|
+
return da(n, "handleClickOn", e, t, r) || n.someProp("handleClick", (a) => a(n, e, r)) || (i ? cc(n, t) : lc(n, t));
|
|
4597
4597
|
}
|
|
4598
4598
|
function fc(n, e, t, r) {
|
|
4599
|
-
return
|
|
4599
|
+
return da(n, "handleDoubleClickOn", e, t, r) || n.someProp("handleDoubleClick", (i) => i(n, e, r));
|
|
4600
4600
|
}
|
|
4601
4601
|
function dc(n, e, t, r) {
|
|
4602
|
-
return
|
|
4602
|
+
return da(n, "handleTripleClickOn", e, t, r) || n.someProp("handleTripleClick", (i) => i(n, e, r)) || hc(n, t, r);
|
|
4603
4603
|
}
|
|
4604
4604
|
function hc(n, e, t) {
|
|
4605
4605
|
if (t.button != 0)
|
|
@@ -4619,14 +4619,14 @@ function hc(n, e, t) {
|
|
|
4619
4619
|
return !0;
|
|
4620
4620
|
}
|
|
4621
4621
|
}
|
|
4622
|
-
function
|
|
4622
|
+
function ha(n) {
|
|
4623
4623
|
return Zr(n);
|
|
4624
4624
|
}
|
|
4625
4625
|
const gs = sn ? "metaKey" : "ctrlKey";
|
|
4626
4626
|
fn.mousedown = (n, e) => {
|
|
4627
4627
|
let t = e;
|
|
4628
4628
|
n.input.shiftKey = t.shiftKey;
|
|
4629
|
-
let r =
|
|
4629
|
+
let r = ha(n), i = Date.now(), a = "singleClick";
|
|
4630
4630
|
i - n.input.lastClick.time < 500 && sc(t, n.input.lastClick) && !t[gs] && n.input.lastClick.button == t.button && (n.input.lastClick.type == "singleClick" ? a = "doubleClick" : n.input.lastClick.type == "doubleClick" && (a = "tripleClick")), n.input.lastClick = { time: i, x: t.clientX, y: t.clientY, type: a, button: t.button };
|
|
4631
4631
|
let o = n.posAtCoords(si(t));
|
|
4632
4632
|
o && (a == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new pc(n, o, t, !!r)) : (a == "doubleClick" ? fc : dc)(n, o.pos, o.inside, t) ? t.preventDefault() : En(n, "pointer"));
|
|
@@ -4654,7 +4654,7 @@ class pc {
|
|
|
4654
4654
|
}, 20), this.view.domObserver.start()), e.root.addEventListener("mouseup", this.up = this.up.bind(this)), e.root.addEventListener("mousemove", this.move = this.move.bind(this)), En(e, "pointer");
|
|
4655
4655
|
}
|
|
4656
4656
|
done() {
|
|
4657
|
-
this.view.root.removeEventListener("mouseup", this.up), this.view.root.removeEventListener("mousemove", this.move), this.mightDrag && this.target && (this.view.domObserver.stop(), this.mightDrag.addAttr && this.target.removeAttribute("draggable"), this.mightDrag.setUneditable && this.target.removeAttribute("contentEditable"), this.view.domObserver.start()), this.delayedSelectionSync && setTimeout(() =>
|
|
4657
|
+
this.view.root.removeEventListener("mouseup", this.up), this.view.root.removeEventListener("mousemove", this.move), this.mightDrag && this.target && (this.view.domObserver.stop(), this.mightDrag.addAttr && this.target.removeAttribute("draggable"), this.mightDrag.setUneditable && this.target.removeAttribute("contentEditable"), this.view.domObserver.start()), this.delayedSelectionSync && setTimeout(() => fa(this.view)), this.view.input.mouseDown = null;
|
|
4658
4658
|
}
|
|
4659
4659
|
up(e) {
|
|
4660
4660
|
if (this.done(), !this.view.dom.contains(e.target))
|
|
@@ -4678,12 +4678,12 @@ class pc {
|
|
|
4678
4678
|
}
|
|
4679
4679
|
}
|
|
4680
4680
|
fn.touchstart = (n) => {
|
|
4681
|
-
n.input.lastTouch = Date.now(),
|
|
4681
|
+
n.input.lastTouch = Date.now(), ha(n), En(n, "pointer");
|
|
4682
4682
|
};
|
|
4683
4683
|
fn.touchmove = (n) => {
|
|
4684
4684
|
n.input.lastTouch = Date.now(), En(n, "pointer");
|
|
4685
4685
|
};
|
|
4686
|
-
fn.contextmenu = (n) =>
|
|
4686
|
+
fn.contextmenu = (n) => ha(n);
|
|
4687
4687
|
function bs(n, e) {
|
|
4688
4688
|
return n.composing ? !0 : Kn && Math.abs(e.timeStamp - n.input.compositionEndedAt) < 500 ? (n.input.compositionEndedAt = -2e8, !0) : !1;
|
|
4689
4689
|
}
|
|
@@ -4752,7 +4752,7 @@ function _c(n, e) {
|
|
|
4752
4752
|
t.parentNode && t.parentNode.removeChild(t), n.focus();
|
|
4753
4753
|
}, 50);
|
|
4754
4754
|
}
|
|
4755
|
-
const xr = kr && is < 15 ||
|
|
4755
|
+
const xr = kr && is < 15 || ca && Yl < 604;
|
|
4756
4756
|
fn.copy = on.cut = (n, e) => {
|
|
4757
4757
|
let t = e, r = n.state.selection, i = t.type == "cut";
|
|
4758
4758
|
if (r.empty)
|
|
@@ -4875,7 +4875,7 @@ function Cc(n, e, t) {
|
|
|
4875
4875
|
}
|
|
4876
4876
|
fn.focus = (n) => {
|
|
4877
4877
|
n.input.lastFocus = Date.now(), n.focused || (n.domObserver.stop(), n.dom.classList.add("ProseMirror-focused"), n.domObserver.start(), n.focused = !0, setTimeout(() => {
|
|
4878
|
-
n.docView && n.hasFocus() && !n.domObserver.currentSelection.eq(n.domSelectionRange()) &&
|
|
4878
|
+
n.docView && n.hasFocus() && !n.domObserver.currentSelection.eq(n.domSelectionRange()) && fa(n);
|
|
4879
4879
|
}, 20));
|
|
4880
4880
|
};
|
|
4881
4881
|
fn.blur = (n, e) => {
|
|
@@ -4913,7 +4913,7 @@ class Qr {
|
|
|
4913
4913
|
}
|
|
4914
4914
|
map(e, t, r, i) {
|
|
4915
4915
|
let { pos: a, deleted: o } = e.mapResult(t.from + i, this.side < 0 ? -1 : 1);
|
|
4916
|
-
return o ? null : new
|
|
4916
|
+
return o ? null : new cn(a - r, a - r, this);
|
|
4917
4917
|
}
|
|
4918
4918
|
valid() {
|
|
4919
4919
|
return !0;
|
|
@@ -4931,7 +4931,7 @@ class Dn {
|
|
|
4931
4931
|
}
|
|
4932
4932
|
map(e, t, r, i) {
|
|
4933
4933
|
let a = e.map(t.from + i, this.spec.inclusiveStart ? -1 : 1) - r, o = e.map(t.to + i, this.spec.inclusiveEnd ? 1 : -1) - r;
|
|
4934
|
-
return a >= o ? null : new
|
|
4934
|
+
return a >= o ? null : new cn(a, o, this);
|
|
4935
4935
|
}
|
|
4936
4936
|
valid(e, t) {
|
|
4937
4937
|
return t.from < t.to;
|
|
@@ -4945,7 +4945,7 @@ class Dn {
|
|
|
4945
4945
|
destroy() {
|
|
4946
4946
|
}
|
|
4947
4947
|
}
|
|
4948
|
-
class
|
|
4948
|
+
class pa {
|
|
4949
4949
|
constructor(e, t) {
|
|
4950
4950
|
this.attrs = e, this.spec = t || Hn;
|
|
4951
4951
|
}
|
|
@@ -4954,19 +4954,19 @@ class ma {
|
|
|
4954
4954
|
if (a.deleted)
|
|
4955
4955
|
return null;
|
|
4956
4956
|
let o = e.mapResult(t.to + i, -1);
|
|
4957
|
-
return o.deleted || o.pos <= a.pos ? null : new
|
|
4957
|
+
return o.deleted || o.pos <= a.pos ? null : new cn(a.pos - r, o.pos - r, this);
|
|
4958
4958
|
}
|
|
4959
4959
|
valid(e, t) {
|
|
4960
4960
|
let { index: r, offset: i } = e.content.findIndex(t.from), a;
|
|
4961
4961
|
return i == t.from && !(a = e.child(r)).isText && i + a.nodeSize == t.to;
|
|
4962
4962
|
}
|
|
4963
4963
|
eq(e) {
|
|
4964
|
-
return this == e || e instanceof
|
|
4964
|
+
return this == e || e instanceof pa && Sr(this.attrs, e.attrs) && Sr(this.spec, e.spec);
|
|
4965
4965
|
}
|
|
4966
4966
|
destroy() {
|
|
4967
4967
|
}
|
|
4968
4968
|
}
|
|
4969
|
-
class
|
|
4969
|
+
class cn {
|
|
4970
4970
|
/**
|
|
4971
4971
|
@internal
|
|
4972
4972
|
*/
|
|
@@ -4977,7 +4977,7 @@ class ln {
|
|
|
4977
4977
|
@internal
|
|
4978
4978
|
*/
|
|
4979
4979
|
copy(e, t) {
|
|
4980
|
-
return new
|
|
4980
|
+
return new cn(e, t, this.type);
|
|
4981
4981
|
}
|
|
4982
4982
|
/**
|
|
4983
4983
|
@internal
|
|
@@ -5000,14 +5000,14 @@ class ln {
|
|
|
5000
5000
|
widget's current document position.
|
|
5001
5001
|
*/
|
|
5002
5002
|
static widget(e, t, r) {
|
|
5003
|
-
return new
|
|
5003
|
+
return new cn(e, e, new Qr(t, r));
|
|
5004
5004
|
}
|
|
5005
5005
|
/**
|
|
5006
5006
|
Creates an inline decoration, which adds the given attributes to
|
|
5007
5007
|
each inline node between `from` and `to`.
|
|
5008
5008
|
*/
|
|
5009
5009
|
static inline(e, t, r, i) {
|
|
5010
|
-
return new
|
|
5010
|
+
return new cn(e, t, new Dn(r, i));
|
|
5011
5011
|
}
|
|
5012
5012
|
/**
|
|
5013
5013
|
Creates a node decoration. `from` and `to` should point precisely
|
|
@@ -5015,7 +5015,7 @@ class ln {
|
|
|
5015
5015
|
node, will receive the given attributes.
|
|
5016
5016
|
*/
|
|
5017
5017
|
static node(e, t, r, i) {
|
|
5018
|
-
return new
|
|
5018
|
+
return new cn(e, t, new pa(r, i));
|
|
5019
5019
|
}
|
|
5020
5020
|
/**
|
|
5021
5021
|
The spec provided when creating this decoration. Can be useful
|
|
@@ -5190,7 +5190,7 @@ class Pt {
|
|
|
5190
5190
|
@internal
|
|
5191
5191
|
*/
|
|
5192
5192
|
locals(e) {
|
|
5193
|
-
return
|
|
5193
|
+
return ma(this.localsInner(e));
|
|
5194
5194
|
}
|
|
5195
5195
|
/**
|
|
5196
5196
|
@internal
|
|
@@ -5210,7 +5210,7 @@ class Pt {
|
|
|
5210
5210
|
}
|
|
5211
5211
|
}
|
|
5212
5212
|
Pt.empty = new Pt([], []);
|
|
5213
|
-
Pt.removeOverlap =
|
|
5213
|
+
Pt.removeOverlap = ma;
|
|
5214
5214
|
const Kt = Pt.empty;
|
|
5215
5215
|
class Fn {
|
|
5216
5216
|
constructor(e) {
|
|
@@ -5251,7 +5251,7 @@ class Fn {
|
|
|
5251
5251
|
t.push(a[o]);
|
|
5252
5252
|
}
|
|
5253
5253
|
}
|
|
5254
|
-
return t ?
|
|
5254
|
+
return t ? ma(r ? t : t.sort(Vn)) : tr;
|
|
5255
5255
|
}
|
|
5256
5256
|
// Create a group for the given array of decoration sets, or return
|
|
5257
5257
|
// a single set when possible.
|
|
@@ -5325,7 +5325,7 @@ function xs(n, e) {
|
|
|
5325
5325
|
let t = [];
|
|
5326
5326
|
for (let r = 0; r < n.length; r++) {
|
|
5327
5327
|
let i = n[r];
|
|
5328
|
-
t.push(new
|
|
5328
|
+
t.push(new cn(i.from + e, i.to + e, i.type));
|
|
5329
5329
|
}
|
|
5330
5330
|
return t;
|
|
5331
5331
|
}
|
|
@@ -5374,7 +5374,7 @@ function ei(n, e, t, r) {
|
|
|
5374
5374
|
function Vn(n, e) {
|
|
5375
5375
|
return n.from - e.from || n.to - e.to;
|
|
5376
5376
|
}
|
|
5377
|
-
function
|
|
5377
|
+
function ma(n) {
|
|
5378
5378
|
let e = n;
|
|
5379
5379
|
for (let t = 0; t < e.length - 1; t++) {
|
|
5380
5380
|
let r = e[t];
|
|
@@ -5382,17 +5382,17 @@ function va(n) {
|
|
|
5382
5382
|
for (let i = t + 1; i < e.length; i++) {
|
|
5383
5383
|
let a = e[i];
|
|
5384
5384
|
if (a.from == r.from) {
|
|
5385
|
-
a.to != r.to && (e == n && (e = n.slice()), e[i] = a.copy(a.from, r.to),
|
|
5385
|
+
a.to != r.to && (e == n && (e = n.slice()), e[i] = a.copy(a.from, r.to), Qa(e, i + 1, a.copy(r.to, a.to)));
|
|
5386
5386
|
continue;
|
|
5387
5387
|
} else {
|
|
5388
|
-
a.from < r.to && (e == n && (e = n.slice()), e[t] = r.copy(r.from, a.from),
|
|
5388
|
+
a.from < r.to && (e == n && (e = n.slice()), e[t] = r.copy(r.from, a.from), Qa(e, i, r.copy(a.from, r.to)));
|
|
5389
5389
|
break;
|
|
5390
5390
|
}
|
|
5391
5391
|
}
|
|
5392
5392
|
}
|
|
5393
5393
|
return e;
|
|
5394
5394
|
}
|
|
5395
|
-
function
|
|
5395
|
+
function Qa(n, e, t) {
|
|
5396
5396
|
for (; e < n.length && Vn(t, n[e]) > 0; )
|
|
5397
5397
|
e++;
|
|
5398
5398
|
n.splice(e, 0, t);
|
|
@@ -5634,17 +5634,17 @@ function Oc(n) {
|
|
|
5634
5634
|
break;
|
|
5635
5635
|
}
|
|
5636
5636
|
const fe = i + q * e;
|
|
5637
|
-
for (let
|
|
5638
|
-
r[fe +
|
|
5637
|
+
for (let ie = 0; ie < ne; ie++) {
|
|
5638
|
+
r[fe + ie] == 0 ? r[fe + ie] = m : (a || (a = [])).push({
|
|
5639
5639
|
type: "collision",
|
|
5640
5640
|
row: f,
|
|
5641
5641
|
pos: m,
|
|
5642
|
-
n: ne -
|
|
5642
|
+
n: ne - ie
|
|
5643
5643
|
});
|
|
5644
|
-
const
|
|
5645
|
-
if (
|
|
5646
|
-
const Ee = (fe +
|
|
5647
|
-
Ie == null || Ie !=
|
|
5644
|
+
const ae = z && z[ie];
|
|
5645
|
+
if (ae) {
|
|
5646
|
+
const Ee = (fe + ie) % e * 2, Ie = o[Ee];
|
|
5647
|
+
Ie == null || Ie != ae && o[Ee + 1] == 1 ? (o[Ee] = ae, o[Ee + 1] = 1) : Ie == ae && o[Ee + 1]++;
|
|
5648
5648
|
}
|
|
5649
5649
|
}
|
|
5650
5650
|
}
|
|
@@ -5765,7 +5765,7 @@ function Xi(n) {
|
|
|
5765
5765
|
function Vc(n) {
|
|
5766
5766
|
return n.node(0).resolve(n.pos + n.nodeAfter.nodeSize);
|
|
5767
5767
|
}
|
|
5768
|
-
function
|
|
5768
|
+
function va(n, e) {
|
|
5769
5769
|
return n.depth == e.depth && n.pos >= e.start(-1) && n.pos <= e.end(-1);
|
|
5770
5770
|
}
|
|
5771
5771
|
function Ts(n, e, t) {
|
|
@@ -5795,7 +5795,7 @@ function Yc(n, e, t) {
|
|
|
5795
5795
|
for (let i = 0; i < n.height; i++) if (e.nodeAt(n.map[t + i * n.width]).type != r) return !1;
|
|
5796
5796
|
return !0;
|
|
5797
5797
|
}
|
|
5798
|
-
var Lt = class
|
|
5798
|
+
var Lt = class wn extends St {
|
|
5799
5799
|
constructor(e, t = e) {
|
|
5800
5800
|
const r = e.node(-1), i = Ft.get(r), a = e.start(-1), o = i.rectBetween(e.pos - a, t.pos - a), s = e.node(0), l = i.cellsInRect(o).filter((m) => m != t.pos - a);
|
|
5801
5801
|
l.unshift(t.pos - a);
|
|
@@ -5809,9 +5809,9 @@ var Lt = class yn extends St {
|
|
|
5809
5809
|
}
|
|
5810
5810
|
map(e, t) {
|
|
5811
5811
|
const r = e.resolve(t.map(this.$anchorCell.pos)), i = e.resolve(t.map(this.$headCell.pos));
|
|
5812
|
-
if (Xi(r) && Xi(i) &&
|
|
5812
|
+
if (Xi(r) && Xi(i) && va(r, i)) {
|
|
5813
5813
|
const a = this.$anchorCell.node(-1) != r.node(-1);
|
|
5814
|
-
return a && this.isRowSelection() ?
|
|
5814
|
+
return a && this.isRowSelection() ? wn.rowSelection(r, i) : a && this.isColSelection() ? wn.colSelection(r, i) : new wn(r, i);
|
|
5815
5815
|
}
|
|
5816
5816
|
return Ct.between(r, i);
|
|
5817
5817
|
}
|
|
@@ -5871,7 +5871,7 @@ var Lt = class yn extends St {
|
|
|
5871
5871
|
}
|
|
5872
5872
|
static colSelection(e, t = e) {
|
|
5873
5873
|
const r = e.node(-1), i = Ft.get(r), a = e.start(-1), o = i.findCell(e.pos - a), s = i.findCell(t.pos - a), l = e.node(0);
|
|
5874
|
-
return o.top <= s.top ? (o.top > 0 && (e = l.resolve(a + i.map[o.left])), s.bottom < i.height && (t = l.resolve(a + i.map[i.width * (i.height - 1) + s.right - 1]))) : (s.top > 0 && (t = l.resolve(a + i.map[s.left])), o.bottom < i.height && (e = l.resolve(a + i.map[i.width * (i.height - 1) + o.right - 1]))), new
|
|
5874
|
+
return o.top <= s.top ? (o.top > 0 && (e = l.resolve(a + i.map[o.left])), s.bottom < i.height && (t = l.resolve(a + i.map[i.width * (i.height - 1) + s.right - 1]))) : (s.top > 0 && (t = l.resolve(a + i.map[s.left])), o.bottom < i.height && (e = l.resolve(a + i.map[i.width * (i.height - 1) + o.right - 1]))), new wn(e, t);
|
|
5875
5875
|
}
|
|
5876
5876
|
isRowSelection() {
|
|
5877
5877
|
const e = this.$anchorCell.node(-1), t = Ft.get(e), r = this.$anchorCell.start(-1), i = t.colCount(this.$anchorCell.pos - r), a = t.colCount(this.$headCell.pos - r);
|
|
@@ -5880,11 +5880,11 @@ var Lt = class yn extends St {
|
|
|
5880
5880
|
return Math.max(o, s) == t.width;
|
|
5881
5881
|
}
|
|
5882
5882
|
eq(e) {
|
|
5883
|
-
return e instanceof
|
|
5883
|
+
return e instanceof wn && e.$anchorCell.pos == this.$anchorCell.pos && e.$headCell.pos == this.$headCell.pos;
|
|
5884
5884
|
}
|
|
5885
5885
|
static rowSelection(e, t = e) {
|
|
5886
5886
|
const r = e.node(-1), i = Ft.get(r), a = e.start(-1), o = i.findCell(e.pos - a), s = i.findCell(t.pos - a), l = e.node(0);
|
|
5887
|
-
return o.left <= s.left ? (o.left > 0 && (e = l.resolve(a + i.map[o.top * i.width])), s.right < i.width && (t = l.resolve(a + i.map[i.width * (s.top + 1) - 1]))) : (s.left > 0 && (t = l.resolve(a + i.map[s.top * i.width])), o.right < i.width && (e = l.resolve(a + i.map[i.width * (o.top + 1) - 1]))), new
|
|
5887
|
+
return o.left <= s.left ? (o.left > 0 && (e = l.resolve(a + i.map[o.top * i.width])), s.right < i.width && (t = l.resolve(a + i.map[i.width * (s.top + 1) - 1]))) : (s.left > 0 && (t = l.resolve(a + i.map[s.top * i.width])), o.right < i.width && (e = l.resolve(a + i.map[i.width * (o.top + 1) - 1]))), new wn(e, t);
|
|
5888
5888
|
}
|
|
5889
5889
|
toJSON() {
|
|
5890
5890
|
return {
|
|
@@ -5894,10 +5894,10 @@ var Lt = class yn extends St {
|
|
|
5894
5894
|
};
|
|
5895
5895
|
}
|
|
5896
5896
|
static fromJSON(e, t) {
|
|
5897
|
-
return new
|
|
5897
|
+
return new wn(e.resolve(t.anchor), e.resolve(t.head));
|
|
5898
5898
|
}
|
|
5899
5899
|
static create(e, t, r = t) {
|
|
5900
|
-
return new
|
|
5900
|
+
return new wn(e.resolve(t), e.resolve(r));
|
|
5901
5901
|
}
|
|
5902
5902
|
getBookmark() {
|
|
5903
5903
|
return new Uc(this.$anchorCell.pos, this.$headCell.pos);
|
|
@@ -5914,14 +5914,14 @@ var Uc = class ks {
|
|
|
5914
5914
|
}
|
|
5915
5915
|
resolve(e) {
|
|
5916
5916
|
const t = e.resolve(this.anchor), r = e.resolve(this.head);
|
|
5917
|
-
return t.parent.type.spec.tableRole == "row" && r.parent.type.spec.tableRole == "row" && t.index() < t.parent.childCount && r.index() < r.parent.childCount &&
|
|
5917
|
+
return t.parent.type.spec.tableRole == "row" && r.parent.type.spec.tableRole == "row" && t.index() < t.parent.childCount && r.index() < r.parent.childCount && va(t, r) ? new Lt(t, r) : St.near(r, 1);
|
|
5918
5918
|
}
|
|
5919
5919
|
};
|
|
5920
5920
|
function Wc(n) {
|
|
5921
5921
|
if (!(n.selection instanceof Lt)) return null;
|
|
5922
5922
|
const e = [];
|
|
5923
5923
|
return n.selection.forEachCell((t, r) => {
|
|
5924
|
-
e.push(
|
|
5924
|
+
e.push(cn.node(r, r + t.nodeSize, { class: "selectedCell" }));
|
|
5925
5925
|
}), Pt.create(n.doc, e);
|
|
5926
5926
|
}
|
|
5927
5927
|
function qc({ $from: n, $to: e }) {
|
|
@@ -6036,7 +6036,7 @@ function Kc(n, e, t, r) {
|
|
|
6036
6036
|
}
|
|
6037
6037
|
return r.setMeta(jc, { fixTables: !0 });
|
|
6038
6038
|
}
|
|
6039
|
-
function
|
|
6039
|
+
function _n(n) {
|
|
6040
6040
|
const e = n.selection, t = li(n), r = t.node(-1), i = t.start(-1), a = Ft.get(r);
|
|
6041
6041
|
return {
|
|
6042
6042
|
...e instanceof Lt ? a.rectBetween(e.$anchorCell.pos - i, e.$headCell.pos - i) : a.findCell(t.pos - i),
|
|
@@ -6063,7 +6063,7 @@ function Es(n, { map: e, tableStart: t, table: r }, i) {
|
|
|
6063
6063
|
function Xc(n, e) {
|
|
6064
6064
|
if (!dn(n)) return !1;
|
|
6065
6065
|
if (e) {
|
|
6066
|
-
const t =
|
|
6066
|
+
const t = _n(n);
|
|
6067
6067
|
e(Es(n.tr, t, t.left));
|
|
6068
6068
|
}
|
|
6069
6069
|
return !0;
|
|
@@ -6071,7 +6071,7 @@ function Xc(n, e) {
|
|
|
6071
6071
|
function Jc(n, e) {
|
|
6072
6072
|
if (!dn(n)) return !1;
|
|
6073
6073
|
if (e) {
|
|
6074
|
-
const t =
|
|
6074
|
+
const t = _n(n);
|
|
6075
6075
|
e(Es(n.tr, t, t.right));
|
|
6076
6076
|
}
|
|
6077
6077
|
return !0;
|
|
@@ -6091,7 +6091,7 @@ function Zc(n, { map: e, table: t, tableStart: r }, i) {
|
|
|
6091
6091
|
function Qc(n, e) {
|
|
6092
6092
|
if (!dn(n)) return !1;
|
|
6093
6093
|
if (e) {
|
|
6094
|
-
const t =
|
|
6094
|
+
const t = _n(n), r = n.tr;
|
|
6095
6095
|
if (t.left == 0 && t.right == t.map.width) return !1;
|
|
6096
6096
|
for (let i = t.right - 1; Zc(r, t, i), i != t.left; i--) {
|
|
6097
6097
|
const a = t.tableStart ? r.doc.nodeAt(t.tableStart - 1) : r.doc;
|
|
@@ -6130,7 +6130,7 @@ function Ds(n, { map: e, tableStart: t, table: r }, i) {
|
|
|
6130
6130
|
function t1(n, e) {
|
|
6131
6131
|
if (!dn(n)) return !1;
|
|
6132
6132
|
if (e) {
|
|
6133
|
-
const t =
|
|
6133
|
+
const t = _n(n);
|
|
6134
6134
|
e(Ds(n.tr, t, t.top));
|
|
6135
6135
|
}
|
|
6136
6136
|
return !0;
|
|
@@ -6138,7 +6138,7 @@ function t1(n, e) {
|
|
|
6138
6138
|
function n1(n, e) {
|
|
6139
6139
|
if (!dn(n)) return !1;
|
|
6140
6140
|
if (e) {
|
|
6141
|
-
const t =
|
|
6141
|
+
const t = _n(n);
|
|
6142
6142
|
e(Ds(n.tr, t, t.bottom));
|
|
6143
6143
|
}
|
|
6144
6144
|
return !0;
|
|
@@ -6171,7 +6171,7 @@ function r1(n, { map: e, table: t, tableStart: r }, i) {
|
|
|
6171
6171
|
function i1(n, e) {
|
|
6172
6172
|
if (!dn(n)) return !1;
|
|
6173
6173
|
if (e) {
|
|
6174
|
-
const t =
|
|
6174
|
+
const t = _n(n), r = n.tr;
|
|
6175
6175
|
if (t.top == 0 && t.bottom == t.map.height) return !1;
|
|
6176
6176
|
for (let i = t.bottom - 1; r1(r, t, i), i != t.top; i--) {
|
|
6177
6177
|
const a = t.tableStart ? r.doc.nodeAt(t.tableStart - 1) : r.doc;
|
|
@@ -6182,7 +6182,7 @@ function i1(n, e) {
|
|
|
6182
6182
|
}
|
|
6183
6183
|
return !0;
|
|
6184
6184
|
}
|
|
6185
|
-
function
|
|
6185
|
+
function eo(n) {
|
|
6186
6186
|
const e = n.content;
|
|
6187
6187
|
return e.childCount == 1 && e.child(0).isTextblock && e.child(0).childCount == 0;
|
|
6188
6188
|
}
|
|
@@ -6198,10 +6198,10 @@ function a1({ width: n, height: e, map: t }, r) {
|
|
|
6198
6198
|
}
|
|
6199
6199
|
return !1;
|
|
6200
6200
|
}
|
|
6201
|
-
function
|
|
6201
|
+
function to(n, e) {
|
|
6202
6202
|
const t = n.selection;
|
|
6203
6203
|
if (!(t instanceof Lt) || t.$anchorCell.pos == t.$headCell.pos) return !1;
|
|
6204
|
-
const r =
|
|
6204
|
+
const r = _n(n), { map: i } = r;
|
|
6205
6205
|
if (a1(i, r)) return !1;
|
|
6206
6206
|
if (e) {
|
|
6207
6207
|
const a = n.tr, o = {};
|
|
@@ -6212,7 +6212,7 @@ function no(n, e) {
|
|
|
6212
6212
|
if (o[b] = !0, l == null)
|
|
6213
6213
|
l = b, f = R;
|
|
6214
6214
|
else {
|
|
6215
|
-
|
|
6215
|
+
eo(R) || (s = s.append(R.content));
|
|
6216
6216
|
const M = a.mapping.map(b + r.tableStart);
|
|
6217
6217
|
a.delete(M, M + R.nodeSize);
|
|
6218
6218
|
}
|
|
@@ -6222,14 +6222,14 @@ function no(n, e) {
|
|
|
6222
6222
|
...Ms(f.attrs, f.attrs.colspan, r.right - r.left - f.attrs.colspan),
|
|
6223
6223
|
rowspan: r.bottom - r.top
|
|
6224
6224
|
}), s.size > 0) {
|
|
6225
|
-
const m = l + 1 + f.content.size, v =
|
|
6225
|
+
const m = l + 1 + f.content.size, v = eo(f) ? l + 1 : m;
|
|
6226
6226
|
a.replaceWith(v + r.tableStart, m + r.tableStart, s);
|
|
6227
6227
|
}
|
|
6228
6228
|
a.setSelection(new Lt(a.doc.resolve(l + r.tableStart))), e(a);
|
|
6229
6229
|
}
|
|
6230
6230
|
return !0;
|
|
6231
6231
|
}
|
|
6232
|
-
function
|
|
6232
|
+
function no(n, e) {
|
|
6233
6233
|
const t = Gt(n.schema);
|
|
6234
6234
|
return o1(({ node: r }) => t[r.type.spec.tableRole])(n, e);
|
|
6235
6235
|
}
|
|
@@ -6256,7 +6256,7 @@ function o1(n) {
|
|
|
6256
6256
|
...s,
|
|
6257
6257
|
colspan: 1
|
|
6258
6258
|
});
|
|
6259
|
-
const m =
|
|
6259
|
+
const m = _n(e), v = e.tr;
|
|
6260
6260
|
for (let R = 0; R < m.right - m.left; R++) l.push(f ? {
|
|
6261
6261
|
...s,
|
|
6262
6262
|
colwidth: f && f[R] ? [f[R]] : null
|
|
@@ -6305,7 +6305,7 @@ function l1(n) {
|
|
|
6305
6305
|
return function(e, t) {
|
|
6306
6306
|
if (!dn(e)) return !1;
|
|
6307
6307
|
if (t) {
|
|
6308
|
-
const r = Gt(e.schema), i =
|
|
6308
|
+
const r = Gt(e.schema), i = _n(e), a = e.tr, o = i.map.cellsInRect(n == "column" ? {
|
|
6309
6309
|
left: i.left,
|
|
6310
6310
|
top: 0,
|
|
6311
6311
|
right: i.right,
|
|
@@ -6323,7 +6323,7 @@ function l1(n) {
|
|
|
6323
6323
|
return !0;
|
|
6324
6324
|
};
|
|
6325
6325
|
}
|
|
6326
|
-
function
|
|
6326
|
+
function ro(n, e, t) {
|
|
6327
6327
|
const r = e.map.cellsInRect({
|
|
6328
6328
|
left: 0,
|
|
6329
6329
|
top: 0,
|
|
@@ -6340,7 +6340,7 @@ function Cr(n, e) {
|
|
|
6340
6340
|
return e = e || { useDeprecatedLogic: !1 }, e.useDeprecatedLogic ? l1(n) : function(t, r) {
|
|
6341
6341
|
if (!dn(t)) return !1;
|
|
6342
6342
|
if (r) {
|
|
6343
|
-
const i = Gt(t.schema), a =
|
|
6343
|
+
const i = Gt(t.schema), a = _n(t), o = t.tr, s = ro("row", a, i), l = ro("column", a, i), f = (n === "column" ? s : n === "row" && l) ? 1 : 0, m = n == "column" ? {
|
|
6344
6344
|
left: 0,
|
|
6345
6345
|
top: f,
|
|
6346
6346
|
right: 1,
|
|
@@ -6382,7 +6382,7 @@ function u1(n, e) {
|
|
|
6382
6382
|
}
|
|
6383
6383
|
return null;
|
|
6384
6384
|
}
|
|
6385
|
-
function
|
|
6385
|
+
function io(n) {
|
|
6386
6386
|
return function(e, t) {
|
|
6387
6387
|
if (!dn(e)) return !1;
|
|
6388
6388
|
const r = u1(li(e), n);
|
|
@@ -6512,7 +6512,7 @@ function m1(n, e, t, r, i, a, o) {
|
|
|
6512
6512
|
}
|
|
6513
6513
|
return !!(f || m);
|
|
6514
6514
|
}
|
|
6515
|
-
function
|
|
6515
|
+
function ao(n, e, t, r, i, a, o, s) {
|
|
6516
6516
|
if (o == 0 || o == e.height) return !1;
|
|
6517
6517
|
let l = !1;
|
|
6518
6518
|
for (let f = i; f < a; f++) {
|
|
@@ -6531,7 +6531,7 @@ function oo(n, e, t, r, i, a, o, s) {
|
|
|
6531
6531
|
}
|
|
6532
6532
|
return l;
|
|
6533
6533
|
}
|
|
6534
|
-
function
|
|
6534
|
+
function oo(n, e, t, r, i, a, o, s) {
|
|
6535
6535
|
if (o == 0 || o == e.width) return !1;
|
|
6536
6536
|
let l = !1;
|
|
6537
6537
|
for (let f = i; f < a; f++) {
|
|
@@ -6544,7 +6544,7 @@ function so(n, e, t, r, i, a, o, s) {
|
|
|
6544
6544
|
}
|
|
6545
6545
|
return l;
|
|
6546
6546
|
}
|
|
6547
|
-
function
|
|
6547
|
+
function so(n, e, t, r, i) {
|
|
6548
6548
|
let a = t ? n.doc.nodeAt(t - 1) : n.doc;
|
|
6549
6549
|
if (!a) throw new Error("No table found");
|
|
6550
6550
|
let o = Ft.get(a);
|
|
@@ -6554,7 +6554,7 @@ function lo(n, e, t, r, i) {
|
|
|
6554
6554
|
if (a = t ? v.doc.nodeAt(t - 1) : v.doc, !a) throw new Error("No table found");
|
|
6555
6555
|
o = Ft.get(a), b = v.mapping.maps.length;
|
|
6556
6556
|
}
|
|
6557
|
-
m1(v, o, a, t, f, m, b) && R(),
|
|
6557
|
+
m1(v, o, a, t, f, m, b) && R(), ao(v, o, a, t, l, f, s, b) && R(), ao(v, o, a, t, l, f, m, b) && R(), oo(v, o, a, t, s, m, l, b) && R(), oo(v, o, a, t, s, m, f, b) && R();
|
|
6558
6558
|
for (let M = s; M < m; M++) {
|
|
6559
6559
|
const N = o.positionAt(M, l, a), ne = o.positionAt(M, f, a);
|
|
6560
6560
|
v.replace(v.mapping.slice(b).map(N + t), v.mapping.slice(b).map(ne + t), new nt(i.rows[M - s], 0, 0));
|
|
@@ -6624,16 +6624,16 @@ function b1(n, e, t) {
|
|
|
6624
6624
|
rows: [tt.from(Ji(Gt(n.state.schema).cell, t))]
|
|
6625
6625
|
});
|
|
6626
6626
|
const a = i.$anchorCell.node(-1), o = i.$anchorCell.start(-1), s = Ft.get(a).rectBetween(i.$anchorCell.pos - o, i.$headCell.pos - o);
|
|
6627
|
-
return r = p1(r, s.right - s.left, s.bottom - s.top),
|
|
6627
|
+
return r = p1(r, s.right - s.left, s.bottom - s.top), so(n.state, n.dispatch, o, s, r), !0;
|
|
6628
6628
|
} else if (r) {
|
|
6629
6629
|
const a = li(n.state), o = a.start(-1);
|
|
6630
|
-
return
|
|
6630
|
+
return so(n.state, n.dispatch, o, Ft.get(a.node(-1)).findCell(a.pos - o), r), !0;
|
|
6631
6631
|
} else return !1;
|
|
6632
6632
|
}
|
|
6633
6633
|
function _1(n, e) {
|
|
6634
6634
|
var t;
|
|
6635
6635
|
if (e.button != 0 || e.ctrlKey || e.metaKey) return;
|
|
6636
|
-
const r =
|
|
6636
|
+
const r = lo(n, e.target);
|
|
6637
6637
|
let i;
|
|
6638
6638
|
if (e.shiftKey && n.state.selection instanceof Lt)
|
|
6639
6639
|
a(n.state.selection.$anchorCell, e), e.preventDefault();
|
|
@@ -6643,7 +6643,7 @@ function _1(n, e) {
|
|
|
6643
6643
|
function a(l, f) {
|
|
6644
6644
|
let m = Ri(n, f);
|
|
6645
6645
|
const v = kn.getState(n.state) == null;
|
|
6646
|
-
if (!m || !
|
|
6646
|
+
if (!m || !va(l, m)) if (v) m = l;
|
|
6647
6647
|
else return;
|
|
6648
6648
|
const b = new Lt(l, m);
|
|
6649
6649
|
if (v || !n.state.selection.eq(b)) {
|
|
@@ -6658,7 +6658,7 @@ function _1(n, e) {
|
|
|
6658
6658
|
const f = l, m = kn.getState(n.state);
|
|
6659
6659
|
let v;
|
|
6660
6660
|
if (m != null) v = n.state.doc.resolve(m);
|
|
6661
|
-
else if (
|
|
6661
|
+
else if (lo(n, f.target) != r && (v = Ri(n, e), !v))
|
|
6662
6662
|
return o();
|
|
6663
6663
|
v && a(v, f);
|
|
6664
6664
|
}
|
|
@@ -6677,7 +6677,7 @@ function Bs(n, e, t) {
|
|
|
6677
6677
|
}
|
|
6678
6678
|
return null;
|
|
6679
6679
|
}
|
|
6680
|
-
function
|
|
6680
|
+
function lo(n, e) {
|
|
6681
6681
|
for (; e && e != n.dom; e = e.parentNode) if (e.nodeName == "TD" || e.nodeName == "TH") return e;
|
|
6682
6682
|
return null;
|
|
6683
6683
|
}
|
|
@@ -6727,7 +6727,7 @@ function Zi(n, e, t, r, i, a) {
|
|
|
6727
6727
|
}
|
|
6728
6728
|
const rn = new ai("tableColumnResizing");
|
|
6729
6729
|
function w1({ handleWidth: n = 5, cellMinWidth: e = 25, defaultCellMinWidth: t = 100, View: r = y1, lastColumnResizable: i = !0 } = {}) {
|
|
6730
|
-
const a = new
|
|
6730
|
+
const a = new sa({
|
|
6731
6731
|
key: rn,
|
|
6732
6732
|
state: {
|
|
6733
6733
|
init(o, s) {
|
|
@@ -6787,7 +6787,7 @@ function S1(n, e, t, r) {
|
|
|
6787
6787
|
let o = -1;
|
|
6788
6788
|
if (a) {
|
|
6789
6789
|
const { left: s, right: l } = a.getBoundingClientRect();
|
|
6790
|
-
e.clientX - s <= t ? o =
|
|
6790
|
+
e.clientX - s <= t ? o = co(n, e, "left", t) : l - e.clientX <= t && (o = co(n, e, "right", t));
|
|
6791
6791
|
}
|
|
6792
6792
|
if (o != i.activeHandle) {
|
|
6793
6793
|
if (!r && o !== -1) {
|
|
@@ -6816,17 +6816,17 @@ function T1(n, e, t, r) {
|
|
|
6816
6816
|
function f(v) {
|
|
6817
6817
|
a.removeEventListener("mouseup", f), a.removeEventListener("mousemove", m);
|
|
6818
6818
|
const b = rn.getState(n.state);
|
|
6819
|
-
b != null && b.dragging && (R1(n, b.activeHandle,
|
|
6819
|
+
b != null && b.dragging && (R1(n, b.activeHandle, uo(b.dragging, v, t)), n.dispatch(n.state.tr.setMeta(rn, { setDragging: null })));
|
|
6820
6820
|
}
|
|
6821
6821
|
function m(v) {
|
|
6822
6822
|
if (!v.which) return f(v);
|
|
6823
6823
|
const b = rn.getState(n.state);
|
|
6824
6824
|
if (b && b.dragging) {
|
|
6825
|
-
const R =
|
|
6826
|
-
|
|
6825
|
+
const R = uo(b.dragging, v, t);
|
|
6826
|
+
fo(n, b.activeHandle, R, r);
|
|
6827
6827
|
}
|
|
6828
6828
|
}
|
|
6829
|
-
return
|
|
6829
|
+
return fo(n, o.activeHandle, l, r), a.addEventListener("mouseup", f), a.addEventListener("mousemove", m), e.preventDefault(), !0;
|
|
6830
6830
|
}
|
|
6831
6831
|
function M1(n, e, { colspan: t, colwidth: r }) {
|
|
6832
6832
|
const i = r && r[r.length - 1];
|
|
@@ -6841,7 +6841,7 @@ function k1(n) {
|
|
|
6841
6841
|
for (; n && n.nodeName != "TD" && n.nodeName != "TH"; ) n = n.classList && n.classList.contains("ProseMirror") ? null : n.parentNode;
|
|
6842
6842
|
return n;
|
|
6843
6843
|
}
|
|
6844
|
-
function
|
|
6844
|
+
function co(n, e, t, r) {
|
|
6845
6845
|
const i = t == "right" ? -r : r, a = n.posAtCoords({
|
|
6846
6846
|
left: e.clientX + i,
|
|
6847
6847
|
top: e.clientY
|
|
@@ -6853,7 +6853,7 @@ function uo(n, e, t, r) {
|
|
|
6853
6853
|
const l = Ft.get(s.node(-1)), f = s.start(-1), m = l.map.indexOf(s.pos - f);
|
|
6854
6854
|
return m % l.width == 0 ? -1 : f + l.map[m - 1];
|
|
6855
6855
|
}
|
|
6856
|
-
function
|
|
6856
|
+
function uo(n, e, t) {
|
|
6857
6857
|
const r = e.clientX - n.startX;
|
|
6858
6858
|
return Math.max(t, n.startWidth + r);
|
|
6859
6859
|
}
|
|
@@ -6875,7 +6875,7 @@ function R1(n, e, t) {
|
|
|
6875
6875
|
}
|
|
6876
6876
|
l.docChanged && n.dispatch(l);
|
|
6877
6877
|
}
|
|
6878
|
-
function
|
|
6878
|
+
function fo(n, e, t, r) {
|
|
6879
6879
|
const i = n.state.doc.resolve(e), a = i.node(-1), o = i.start(-1), s = Ft.get(a).colCount(i.pos - o) + i.nodeAfter.attrs.colspan - 1;
|
|
6880
6880
|
let l = n.domAtPos(i.start(-1)).node;
|
|
6881
6881
|
for (; l && l.nodeName != "TABLE"; ) l = l.parentNode;
|
|
@@ -6893,13 +6893,13 @@ function E1(n, e) {
|
|
|
6893
6893
|
if ((s == a.width - 1 || a.map[m] != a.map[m + 1]) && (f == 0 || a.map[m] != a.map[m - a.width])) {
|
|
6894
6894
|
var l;
|
|
6895
6895
|
const v = a.map[m], b = o + v + i.nodeAt(v).nodeSize - 1, R = document.createElement("div");
|
|
6896
|
-
R.className = "column-resize-handle", !((l = rn.getState(n)) === null || l === void 0) && l.dragging && t.push(
|
|
6896
|
+
R.className = "column-resize-handle", !((l = rn.getState(n)) === null || l === void 0) && l.dragging && t.push(cn.node(o + v, o + v + i.nodeAt(v).nodeSize, { class: "column-resize-dragging" })), t.push(cn.widget(b, R));
|
|
6897
6897
|
}
|
|
6898
6898
|
}
|
|
6899
6899
|
return Pt.create(n.doc, t);
|
|
6900
6900
|
}
|
|
6901
6901
|
function D1({ allowTableNodeSelection: n = !1 } = {}) {
|
|
6902
|
-
return new
|
|
6902
|
+
return new sa({
|
|
6903
6903
|
key: kn,
|
|
6904
6904
|
state: {
|
|
6905
6905
|
init() {
|
|
@@ -6931,7 +6931,7 @@ function D1({ allowTableNodeSelection: n = !1 } = {}) {
|
|
|
6931
6931
|
function Qi(n, e) {
|
|
6932
6932
|
return e ? ["width", `${Math.max(e, n)}px`] : ["min-width", `${n}px`];
|
|
6933
6933
|
}
|
|
6934
|
-
function
|
|
6934
|
+
function ho(n, e, t, r, i, a) {
|
|
6935
6935
|
var o;
|
|
6936
6936
|
let s = 0, l = !0, f = e.firstChild;
|
|
6937
6937
|
const m = n.firstChild;
|
|
@@ -6960,10 +6960,10 @@ function po(n, e, t, r, i, a) {
|
|
|
6960
6960
|
}
|
|
6961
6961
|
class B1 {
|
|
6962
6962
|
constructor(e, t) {
|
|
6963
|
-
this.node = e, this.cellMinWidth = t, this.dom = document.createElement("div"), this.dom.className = "tableWrapper", this.table = this.dom.appendChild(document.createElement("table")), this.colgroup = this.table.appendChild(document.createElement("colgroup")),
|
|
6963
|
+
this.node = e, this.cellMinWidth = t, this.dom = document.createElement("div"), this.dom.className = "tableWrapper", this.table = this.dom.appendChild(document.createElement("table")), this.colgroup = this.table.appendChild(document.createElement("colgroup")), ho(e, this.colgroup, this.table, t), this.contentDOM = this.table.appendChild(document.createElement("tbody"));
|
|
6964
6964
|
}
|
|
6965
6965
|
update(e) {
|
|
6966
|
-
return e.type !== this.node.type ? !1 : (this.node = e,
|
|
6966
|
+
return e.type !== this.node.type ? !1 : (this.node = e, ho(e, this.colgroup, this.table, this.cellMinWidth), !0);
|
|
6967
6967
|
}
|
|
6968
6968
|
ignoreMutation(e) {
|
|
6969
6969
|
return e.type === "attributes" && (e.target === this.table || this.colgroup.contains(e.target));
|
|
@@ -6989,7 +6989,7 @@ function L1(n, e, t, r) {
|
|
|
6989
6989
|
const l = a ? `${i}px` : "", f = a ? "" : `${i}px`;
|
|
6990
6990
|
return { colgroup: ["colgroup", {}, ...o], tableWidth: l, tableMinWidth: f };
|
|
6991
6991
|
}
|
|
6992
|
-
function
|
|
6992
|
+
function po(n, e) {
|
|
6993
6993
|
return n.createAndFill();
|
|
6994
6994
|
}
|
|
6995
6995
|
function N1(n) {
|
|
@@ -7004,9 +7004,9 @@ function N1(n) {
|
|
|
7004
7004
|
function O1(n, e, t, r, i) {
|
|
7005
7005
|
const a = N1(n), o = [], s = [];
|
|
7006
7006
|
for (let f = 0; f < t; f += 1) {
|
|
7007
|
-
const m =
|
|
7007
|
+
const m = po(a.cell);
|
|
7008
7008
|
if (m && s.push(m), r) {
|
|
7009
|
-
const v =
|
|
7009
|
+
const v = po(a.header_cell);
|
|
7010
7010
|
v && o.push(v);
|
|
7011
7011
|
}
|
|
7012
7012
|
}
|
|
@@ -7080,15 +7080,15 @@ const zr = ({ editor: n }) => {
|
|
|
7080
7080
|
addRowAfter: () => ({ state: n, dispatch: e }) => n1(n, e),
|
|
7081
7081
|
deleteRow: () => ({ state: n, dispatch: e }) => i1(n, e),
|
|
7082
7082
|
deleteTable: () => ({ state: n, dispatch: e }) => f1(n, e),
|
|
7083
|
-
mergeCells: () => ({ state: n, dispatch: e }) =>
|
|
7084
|
-
splitCell: () => ({ state: n, dispatch: e }) =>
|
|
7083
|
+
mergeCells: () => ({ state: n, dispatch: e }) => to(n, e),
|
|
7084
|
+
splitCell: () => ({ state: n, dispatch: e }) => no(n, e),
|
|
7085
7085
|
toggleHeaderColumn: () => ({ state: n, dispatch: e }) => Cr("column")(n, e),
|
|
7086
7086
|
toggleHeaderRow: () => ({ state: n, dispatch: e }) => Cr("row")(n, e),
|
|
7087
7087
|
toggleHeaderCell: () => ({ state: n, dispatch: e }) => c1(n, e),
|
|
7088
|
-
mergeOrSplit: () => ({ state: n, dispatch: e }) =>
|
|
7088
|
+
mergeOrSplit: () => ({ state: n, dispatch: e }) => to(n, e) ? !0 : no(n, e),
|
|
7089
7089
|
setCellAttribute: (n, e) => ({ state: t, dispatch: r }) => s1(n, e)(t, r),
|
|
7090
|
-
goToNextCell: () => ({ state: n, dispatch: e }) =>
|
|
7091
|
-
goToPreviousCell: () => ({ state: n, dispatch: e }) =>
|
|
7090
|
+
goToNextCell: () => ({ state: n, dispatch: e }) => io(1)(n, e),
|
|
7091
|
+
goToPreviousCell: () => ({ state: n, dispatch: e }) => io(-1)(n, e),
|
|
7092
7092
|
fixTables: () => ({ state: n, dispatch: e }) => (e && As(n), !0),
|
|
7093
7093
|
setCellSelection: (n) => ({ tr: e, dispatch: t }) => {
|
|
7094
7094
|
if (t) {
|
|
@@ -7222,7 +7222,7 @@ const zr = ({ editor: n }) => {
|
|
|
7222
7222
|
renderHTML({ HTMLAttributes: n }) {
|
|
7223
7223
|
return ["td", qn(this.options.HTMLAttributes, n), 0];
|
|
7224
7224
|
}
|
|
7225
|
-
}), Ns = "date-popover", ht = () => ct.noteCreatedAt ?
|
|
7225
|
+
}), Ns = "date-popover", ht = () => ct.noteCreatedAt ? Ra(ct.noteCreatedAt) : Ra(), Tr = {
|
|
7226
7226
|
现在: () => ht().format("YYYY-MM-DD HH:mm:ss"),
|
|
7227
7227
|
前天: () => ht().subtract(2, "day").format("YYYY-MM-DD"),
|
|
7228
7228
|
前日: () => ht().subtract(2, "day").format("YYYY-MM-DD"),
|
|
@@ -7272,7 +7272,7 @@ const zr = ({ editor: n }) => {
|
|
|
7272
7272
|
下下周今天: () => ht().add(2, "week").format("YYYY-MM-DD")
|
|
7273
7273
|
}, Os = Object.keys(Tr);
|
|
7274
7274
|
Os.sort((n, e) => e.length - n.length);
|
|
7275
|
-
const
|
|
7275
|
+
const mo = new RegExp(`(${Os.join("|")})`, "g"), Is = (n) => n.tagName.toLowerCase() === "mark", ni = () => {
|
|
7276
7276
|
document.querySelectorAll(`.${Ns}`).forEach((e) => {
|
|
7277
7277
|
e.remove();
|
|
7278
7278
|
});
|
|
@@ -7369,8 +7369,8 @@ const vo = new RegExp(`(${Os.join("|")})`, "g"), Is = (n) => n.tagName.toLowerCa
|
|
|
7369
7369
|
tag: "div",
|
|
7370
7370
|
// getAttrs 返回 false 表示不匹配,返回对象表示匹配
|
|
7371
7371
|
getAttrs: (q) => {
|
|
7372
|
-
const fe = q.hasAttribute("style"),
|
|
7373
|
-
return fe ||
|
|
7372
|
+
const fe = q.hasAttribute("style"), ie = q.hasAttribute("class"), ae = q.hasAttribute("id");
|
|
7373
|
+
return fe || ie || ae ? {} : !1;
|
|
7374
7374
|
}
|
|
7375
7375
|
}
|
|
7376
7376
|
];
|
|
@@ -7416,21 +7416,21 @@ const vo = new RegExp(`(${Os.join("|")})`, "g"), Is = (n) => n.tagName.toLowerCa
|
|
|
7416
7416
|
addProseMirrorPlugins() {
|
|
7417
7417
|
const q = this.type;
|
|
7418
7418
|
return [
|
|
7419
|
-
new
|
|
7419
|
+
new sa({
|
|
7420
7420
|
key: new ai("dateMarkPlugin"),
|
|
7421
|
-
appendTransaction(fe,
|
|
7421
|
+
appendTransaction(fe, ie, ae) {
|
|
7422
7422
|
if (!(fe.some((Ke) => Ke.docChanged) || fe.some((Ke) => Ke.getMeta("compositionEnd"))) || i.value) return null;
|
|
7423
|
-
const Ie =
|
|
7423
|
+
const Ie = ae.tr;
|
|
7424
7424
|
let je = !1;
|
|
7425
|
-
return
|
|
7425
|
+
return ae.doc.descendants((Ke, Ne) => {
|
|
7426
7426
|
if (!Ke.isText) return;
|
|
7427
7427
|
const oe = Ke.marks.some((Ve) => Ve.type === q), pt = Ke.text;
|
|
7428
7428
|
if (oe)
|
|
7429
7429
|
Tr[pt] || (Ie.removeMark(Ne, Ne + Ke.nodeSize, q), je = !0);
|
|
7430
7430
|
else {
|
|
7431
|
-
|
|
7431
|
+
mo.lastIndex = 0;
|
|
7432
7432
|
let Ve;
|
|
7433
|
-
for (; (Ve =
|
|
7433
|
+
for (; (Ve = mo.exec(pt)) !== null; ) {
|
|
7434
7434
|
const Te = Ne + Ve.index, De = Te + Ve[0].length, Pe = Ve[0], Ye = Tr[Pe]();
|
|
7435
7435
|
Ie.addMark(
|
|
7436
7436
|
Te,
|
|
@@ -7493,20 +7493,20 @@ const vo = new RegExp(`(${Os.join("|")})`, "g"), Is = (n) => n.tagName.toLowerCa
|
|
|
7493
7493
|
spellcheck: "false"
|
|
7494
7494
|
},
|
|
7495
7495
|
handleKeyDown(q, fe) {
|
|
7496
|
-
const { selection:
|
|
7497
|
-
for (let Pe =
|
|
7498
|
-
if (
|
|
7496
|
+
const { selection: ie } = q.state, { $from: ae } = ie, Ee = (De) => {
|
|
7497
|
+
for (let Pe = ae.depth; Pe > 0; Pe--)
|
|
7498
|
+
if (ae.node(Pe).type.name === De)
|
|
7499
7499
|
return !0;
|
|
7500
7500
|
return !1;
|
|
7501
7501
|
}, Ie = Ee("tableCell") || Ee("tableHeader") || Ee("table"), je = Ee("codeBlock");
|
|
7502
7502
|
if (je && fe.key === "Tab") {
|
|
7503
7503
|
fe.preventDefault();
|
|
7504
|
-
const { tr: De } = q.state, { from: Pe, to: Ye } =
|
|
7504
|
+
const { tr: De } = q.state, { from: Pe, to: Ye } = ie, He = " ";
|
|
7505
7505
|
return Pe === Ye ? De.insertText(He, Pe) : De.replaceSelectionWith(q.state.schema.text(He)), q.dispatch(De), !0;
|
|
7506
7506
|
}
|
|
7507
7507
|
if (Ie || je)
|
|
7508
7508
|
return !1;
|
|
7509
|
-
const { doc: Ke } = q.state, { from: Ne, to: oe } =
|
|
7509
|
+
const { doc: Ke } = q.state, { from: Ne, to: oe } = ie, pt = Ke.content.size - 1, Ve = Ne === 1 && oe === 1, Te = Ne === pt && oe === pt;
|
|
7510
7510
|
if (ct.pos = Ne, fe.key === "Backspace") {
|
|
7511
7511
|
if (Ke.textBetween(0, Ke.content.size).trim().length === 0)
|
|
7512
7512
|
return console.log("[text.vue] Backspace on empty doc, emitting keydown"), l("keydown", fe), !0;
|
|
@@ -7552,25 +7552,25 @@ const vo = new RegExp(`(${Os.join("|")})`, "g"), Is = (n) => n.tagName.toLowerCa
|
|
|
7552
7552
|
typeof q == "object" ? q.from : q
|
|
7553
7553
|
);
|
|
7554
7554
|
}, N = () => {
|
|
7555
|
-
const { state: q } = v.value, { from: fe, to:
|
|
7556
|
-
return fe ===
|
|
7555
|
+
const { state: q } = v.value, { from: fe, to: ie } = q.selection;
|
|
7556
|
+
return fe === ie ? fe : { from: fe, to: ie };
|
|
7557
7557
|
};
|
|
7558
|
-
|
|
7558
|
+
mn(
|
|
7559
7559
|
() => s.content,
|
|
7560
7560
|
(q) => {
|
|
7561
7561
|
v != null && v.value && q !== f && v.value.getHTML() !== q && (v.value.commands.setContent(q, !1), f = q);
|
|
7562
7562
|
}
|
|
7563
|
-
),
|
|
7563
|
+
), mn(
|
|
7564
7564
|
() => s.readOnly,
|
|
7565
7565
|
() => {
|
|
7566
7566
|
v != null && v.value && v.value.setEditable(!s.readOnly);
|
|
7567
7567
|
}
|
|
7568
|
-
),
|
|
7568
|
+
), wo(() => {
|
|
7569
7569
|
const q = o.value.rootEl;
|
|
7570
7570
|
m = () => {
|
|
7571
7571
|
v.value.commands.selectAll();
|
|
7572
7572
|
}, q.addEventListener("dblclick", m), Di.install(q);
|
|
7573
|
-
}),
|
|
7573
|
+
}), ta(() => {
|
|
7574
7574
|
var fe;
|
|
7575
7575
|
const q = (fe = o.value) == null ? void 0 : fe.rootEl;
|
|
7576
7576
|
q && m && (q.removeEventListener("dblclick", m), m = null), v.value && v.value.destroy(), q && Di.uninstall(q);
|
|
@@ -7593,11 +7593,11 @@ const vo = new RegExp(`(${Os.join("|")})`, "g"), Is = (n) => n.tagName.toLowerCa
|
|
|
7593
7593
|
focus: M,
|
|
7594
7594
|
bold: me,
|
|
7595
7595
|
color: z
|
|
7596
|
-
}), (q, fe) => (rt(),
|
|
7596
|
+
}), (q, fe) => (rt(), ln($e(Qs), {
|
|
7597
7597
|
editor: $e(v),
|
|
7598
7598
|
ref_key: "container",
|
|
7599
7599
|
ref: o,
|
|
7600
|
-
onCompositionstart: fe[0] || (fe[0] = Ht((
|
|
7600
|
+
onCompositionstart: fe[0] || (fe[0] = Ht((ie) => i.value = !0, ["stop"])),
|
|
7601
7601
|
onCompositionend: Ht(R, ["stop"])
|
|
7602
7602
|
}, null, 8, ["editor"]));
|
|
7603
7603
|
}
|
|
@@ -7645,8 +7645,8 @@ const vo = new RegExp(`(${Os.join("|")})`, "g"), Is = (n) => n.tagName.toLowerCa
|
|
|
7645
7645
|
const q = new RegExp(`^(${z}[::])`), fe = new RegExp(`([::]${z})$`);
|
|
7646
7646
|
if (q.test(ne) || fe.test(ne)) {
|
|
7647
7647
|
me = me.replace(q, "").replace(fe, "");
|
|
7648
|
-
const
|
|
7649
|
-
M.tag_id =
|
|
7648
|
+
const ie = a.tags.find((ae) => ae.name === z);
|
|
7649
|
+
M.tag_id = ie.created_at, M.text = me && `<p>${me}</p>`;
|
|
7650
7650
|
}
|
|
7651
7651
|
}), o("change", M);
|
|
7652
7652
|
}
|
|
@@ -7664,27 +7664,29 @@ const vo = new RegExp(`(${Os.join("|")})`, "g"), Is = (n) => n.tagName.toLowerCa
|
|
|
7664
7664
|
return e({
|
|
7665
7665
|
focus,
|
|
7666
7666
|
dispatch: b
|
|
7667
|
-
}), (R, M) =>
|
|
7668
|
-
|
|
7669
|
-
|
|
7670
|
-
|
|
7671
|
-
|
|
7672
|
-
|
|
7673
|
-
|
|
7674
|
-
|
|
7675
|
-
|
|
7676
|
-
|
|
7677
|
-
|
|
7678
|
-
|
|
7679
|
-
|
|
7680
|
-
|
|
7681
|
-
|
|
7682
|
-
|
|
7683
|
-
|
|
7684
|
-
|
|
7685
|
-
|
|
7686
|
-
|
|
7687
|
-
|
|
7667
|
+
}), (R, M) => (rt(), ft("div", null, [
|
|
7668
|
+
n.data.type ? (rt(), ln($e(X0), {
|
|
7669
|
+
key: `media-${n.data.type}`,
|
|
7670
|
+
ref_key: "mediaEditor",
|
|
7671
|
+
ref: i,
|
|
7672
|
+
data: n.data,
|
|
7673
|
+
readOnly: n.readOnly,
|
|
7674
|
+
onChange: f,
|
|
7675
|
+
onKeydown: s,
|
|
7676
|
+
onFocus: l,
|
|
7677
|
+
onRemove: m
|
|
7678
|
+
}, null, 8, ["data", "readOnly"])) : (rt(), ln($e(Y1), {
|
|
7679
|
+
key: "text",
|
|
7680
|
+
ref_key: "textEditor",
|
|
7681
|
+
ref: r,
|
|
7682
|
+
content: n.readOnly ? v(n.data.text) : n.data.text,
|
|
7683
|
+
readOnly: n.readOnly,
|
|
7684
|
+
placeholder: n.placeholder,
|
|
7685
|
+
onChange: f,
|
|
7686
|
+
onKeydown: s,
|
|
7687
|
+
onFocus: l
|
|
7688
|
+
}, null, 8, ["content", "readOnly", "placeholder"]))
|
|
7689
|
+
]));
|
|
7688
7690
|
}
|
|
7689
7691
|
}, U1 = {
|
|
7690
7692
|
class: "node-div",
|
|
@@ -7722,20 +7724,20 @@ const vo = new RegExp(`(${Os.join("|")})`, "g"), Is = (n) => n.tagName.toLowerCa
|
|
|
7722
7724
|
const t = n, r = e;
|
|
7723
7725
|
let i = 0, a = null;
|
|
7724
7726
|
const o = ut(null);
|
|
7725
|
-
|
|
7727
|
+
wo(() => {
|
|
7726
7728
|
_r[t.node.uuid] = o.value;
|
|
7727
7729
|
}), Mr(() => {
|
|
7728
7730
|
delete _r[t.node.uuid], a && (clearTimeout(a), a = null);
|
|
7729
7731
|
});
|
|
7730
7732
|
const s = Pn(() => {
|
|
7731
|
-
const
|
|
7732
|
-
return
|
|
7733
|
+
const ae = Co(t.node.tag_id, t.tags);
|
|
7734
|
+
return ae.created_at ? ae : null;
|
|
7733
7735
|
}), l = Pn(() => To(s.value)), f = Pn(() => {
|
|
7734
|
-
const
|
|
7735
|
-
return l.value &&
|
|
7736
|
+
const ae = jr(t.node);
|
|
7737
|
+
return l.value && ae.finished;
|
|
7736
7738
|
});
|
|
7737
7739
|
function m() {
|
|
7738
|
-
const
|
|
7740
|
+
const ae = (/* @__PURE__ */ new Date()).getTime(), Ee = ae - i;
|
|
7739
7741
|
clearTimeout(a);
|
|
7740
7742
|
const Ie = 500;
|
|
7741
7743
|
Ee < Ie && Ee > 0 ? (i = 0, r("change", {
|
|
@@ -7744,7 +7746,7 @@ const vo = new RegExp(`(${Os.join("|")})`, "g"), Is = (n) => n.tagName.toLowerCa
|
|
|
7744
7746
|
})) : (a = setTimeout(() => {
|
|
7745
7747
|
if (l.value) {
|
|
7746
7748
|
const je = jr(t.node);
|
|
7747
|
-
|
|
7749
|
+
ie({
|
|
7748
7750
|
...t.node,
|
|
7749
7751
|
ext: {
|
|
7750
7752
|
...je,
|
|
@@ -7752,51 +7754,51 @@ const vo = new RegExp(`(${Os.join("|")})`, "g"), Is = (n) => n.tagName.toLowerCa
|
|
|
7752
7754
|
}
|
|
7753
7755
|
});
|
|
7754
7756
|
}
|
|
7755
|
-
}, Ie), i =
|
|
7757
|
+
}, Ie), i = ae);
|
|
7756
7758
|
}
|
|
7757
7759
|
function v() {
|
|
7758
|
-
const
|
|
7759
|
-
ct.currentId =
|
|
7760
|
+
const ae = t.node;
|
|
7761
|
+
ct.currentId = ae.uuid, ct.isMobile && Do();
|
|
7760
7762
|
}
|
|
7761
|
-
function b(
|
|
7762
|
-
switch (
|
|
7763
|
+
function b(ae, ...Ee) {
|
|
7764
|
+
switch (ae.key) {
|
|
7763
7765
|
case "Backspace":
|
|
7764
|
-
R(
|
|
7766
|
+
R(ae, ...Ee);
|
|
7765
7767
|
break;
|
|
7766
7768
|
case "ArrowUp":
|
|
7767
|
-
|
|
7769
|
+
ae.preventDefault(), q(ae, ...Ee);
|
|
7768
7770
|
break;
|
|
7769
7771
|
case "ArrowDown":
|
|
7770
|
-
|
|
7772
|
+
ae.preventDefault(), z(ae, ...Ee);
|
|
7771
7773
|
break;
|
|
7772
7774
|
case "ArrowLeft":
|
|
7773
|
-
|
|
7775
|
+
ae.preventDefault(), ne(ae, ...Ee);
|
|
7774
7776
|
break;
|
|
7775
7777
|
case "ArrowRight":
|
|
7776
|
-
|
|
7778
|
+
ae.preventDefault(), me(ae, ...Ee);
|
|
7777
7779
|
break;
|
|
7778
7780
|
case "Tab":
|
|
7779
|
-
M(
|
|
7781
|
+
M(ae, ...Ee);
|
|
7780
7782
|
break;
|
|
7781
7783
|
case "Enter":
|
|
7782
|
-
|
|
7784
|
+
ae.preventDefault(), N(ae, ...Ee);
|
|
7783
7785
|
break;
|
|
7784
7786
|
default:
|
|
7785
|
-
if (!((
|
|
7787
|
+
if (!((ae.ctrlKey || ae.metaKey) && (ae.key === "v" || ae.key === "V"))) return ae.preventDefault(), !1;
|
|
7786
7788
|
break;
|
|
7787
7789
|
}
|
|
7788
7790
|
}
|
|
7789
|
-
function R(
|
|
7791
|
+
function R(ae) {
|
|
7790
7792
|
var Ie;
|
|
7791
7793
|
const Ee = t.node;
|
|
7792
|
-
|
|
7794
|
+
ae.preventDefault(), !((Ie = Ee.children) != null && Ie.length) && (ct.pos = null, r("toPrevFocus", Ee, !0), fe());
|
|
7793
7795
|
}
|
|
7794
|
-
function M(
|
|
7795
|
-
r("tab",
|
|
7796
|
+
function M(ae) {
|
|
7797
|
+
r("tab", ae, t.node);
|
|
7796
7798
|
}
|
|
7797
|
-
function N(
|
|
7799
|
+
function N(ae) {
|
|
7798
7800
|
const Ee = t.node;
|
|
7799
|
-
if (
|
|
7801
|
+
if (ae.ctrlKey) {
|
|
7800
7802
|
r("change", {
|
|
7801
7803
|
...Ee,
|
|
7802
7804
|
collapsed: !1
|
|
@@ -7809,19 +7811,19 @@ const vo = new RegExp(`(${Os.join("|")})`, "g"), Is = (n) => n.tagName.toLowerCa
|
|
|
7809
7811
|
const { left: Ke, right: Ne } = Lo(je, ct.pos - 1);
|
|
7810
7812
|
Ee.text = Ke, Ie.text = Ne;
|
|
7811
7813
|
}
|
|
7812
|
-
Ee.children ? Ee.children.unshift(Ie) : Ee.children = [Ie],
|
|
7814
|
+
Ee.children ? Ee.children.unshift(Ie) : Ee.children = [Ie], ie(), Qt(() => {
|
|
7813
7815
|
ct.pos = 0, r("toFocus", Ie);
|
|
7814
7816
|
});
|
|
7815
7817
|
} else
|
|
7816
7818
|
r("enter", Ee);
|
|
7817
7819
|
}
|
|
7818
|
-
function ne(
|
|
7820
|
+
function ne(ae) {
|
|
7819
7821
|
const Ee = t.node;
|
|
7820
|
-
|
|
7822
|
+
ae.currentTarget && (ct.pos = null, r("toPrevFocus", Ee, !0));
|
|
7821
7823
|
}
|
|
7822
|
-
function me(
|
|
7824
|
+
function me(ae) {
|
|
7823
7825
|
const Ee = t.node;
|
|
7824
|
-
|
|
7826
|
+
ae.currentTarget && (ct.pos = 0, r("toNextFocus", Ee, !0, !0));
|
|
7825
7827
|
}
|
|
7826
7828
|
function z() {
|
|
7827
7829
|
r("toNextFocus", t.node, !1, !0);
|
|
@@ -7832,10 +7834,10 @@ const vo = new RegExp(`(${Os.join("|")})`, "g"), Is = (n) => n.tagName.toLowerCa
|
|
|
7832
7834
|
function fe() {
|
|
7833
7835
|
r("remove", t.node);
|
|
7834
7836
|
}
|
|
7835
|
-
function ae
|
|
7836
|
-
r("change",
|
|
7837
|
+
function ie(ae = t.node) {
|
|
7838
|
+
r("change", ae);
|
|
7837
7839
|
}
|
|
7838
|
-
return (
|
|
7840
|
+
return (ae, Ee) => (rt(), ft("div", U1, [
|
|
7839
7841
|
Qe("span", {
|
|
7840
7842
|
class: qt(["node-icon", {
|
|
7841
7843
|
"node-icon-todo": l.value,
|
|
@@ -7854,7 +7856,7 @@ const vo = new RegExp(`(${Os.join("|")})`, "g"), Is = (n) => n.tagName.toLowerCa
|
|
|
7854
7856
|
})
|
|
7855
7857
|
}, null, 4)
|
|
7856
7858
|
], 2),
|
|
7857
|
-
|
|
7859
|
+
xt($e(Fs), {
|
|
7858
7860
|
ref_key: "editor",
|
|
7859
7861
|
ref: o,
|
|
7860
7862
|
class: qt({
|
|
@@ -7863,14 +7865,14 @@ const vo = new RegExp(`(${Os.join("|")})`, "g"), Is = (n) => n.tagName.toLowerCa
|
|
|
7863
7865
|
readOnly: n.readOnly,
|
|
7864
7866
|
data: n.node,
|
|
7865
7867
|
tags: n.tags,
|
|
7866
|
-
onChange:
|
|
7868
|
+
onChange: ie,
|
|
7867
7869
|
onKeydown: b,
|
|
7868
7870
|
onFocus: v,
|
|
7869
7871
|
onRemove: fe
|
|
7870
7872
|
}, null, 8, ["class", "readOnly", "data", "tags"])
|
|
7871
7873
|
], 512));
|
|
7872
7874
|
}
|
|
7873
|
-
},
|
|
7875
|
+
}, vo = /* @__PURE__ */ Gn(W1, [["__scopeId", "data-v-40ce1bbb"]]);
|
|
7874
7876
|
function zs(n) {
|
|
7875
7877
|
var o;
|
|
7876
7878
|
let t = (((o = n.target) == null ? void 0 : o.querySelector(".node-div")) || n.target).getBoundingClientRect(), r = n.clientY, i = t.top + t.height / 3, a = t.top + t.height / 3 * 2;
|
|
@@ -7971,12 +7973,12 @@ const j1 = {
|
|
|
7971
7973
|
],
|
|
7972
7974
|
setup(n, { expose: e, emit: t }) {
|
|
7973
7975
|
const r = n, i = t;
|
|
7974
|
-
e({ appendNode: Ie, updateNode: je, head: Ee, addFiles:
|
|
7976
|
+
e({ appendNode: Ie, updateNode: je, head: Ee, addFiles: ae });
|
|
7975
7977
|
let a = null, o = null;
|
|
7976
7978
|
function s() {
|
|
7977
7979
|
a && (clearTimeout(a), a = null), o && (fr.off("dragEnd", o), o = null);
|
|
7978
7980
|
}
|
|
7979
|
-
|
|
7981
|
+
ta(s), mn(
|
|
7980
7982
|
() => r.nodes,
|
|
7981
7983
|
() => {
|
|
7982
7984
|
Ne();
|
|
@@ -8003,7 +8005,7 @@ const j1 = {
|
|
|
8003
8005
|
Te.stopPropagation();
|
|
8004
8006
|
const Pe = Te.dataTransfer.files;
|
|
8005
8007
|
if (ea(), Pe.length)
|
|
8006
|
-
|
|
8008
|
+
ae(Pe, De);
|
|
8007
8009
|
else {
|
|
8008
8010
|
let p = Te.dataTransfer.getData("dragNode");
|
|
8009
8011
|
const Y = zs(Te);
|
|
@@ -8043,7 +8045,7 @@ const j1 = {
|
|
|
8043
8045
|
}
|
|
8044
8046
|
function b(Te, De) {
|
|
8045
8047
|
const Pe = Te.clipboardData.files;
|
|
8046
|
-
Pe.length && (
|
|
8048
|
+
Pe.length && (ae(Pe, De), Te.preventDefault());
|
|
8047
8049
|
}
|
|
8048
8050
|
function R(Te, De) {
|
|
8049
8051
|
Te.preventDefault();
|
|
@@ -8070,7 +8072,7 @@ const j1 = {
|
|
|
8070
8072
|
};
|
|
8071
8073
|
De.push(Pe);
|
|
8072
8074
|
const Ye = () => {
|
|
8073
|
-
|
|
8075
|
+
ie(Pe);
|
|
8074
8076
|
};
|
|
8075
8077
|
ct.isMobile ? setTimeout(Ye, 100) : setTimeout(Ye, 200);
|
|
8076
8078
|
}
|
|
@@ -8138,7 +8140,7 @@ const j1 = {
|
|
|
8138
8140
|
ct.isMobile ? P(Y) : setTimeout(() => P(Y), 0);
|
|
8139
8141
|
}
|
|
8140
8142
|
}
|
|
8141
|
-
function
|
|
8143
|
+
function ie(Te, De = !1) {
|
|
8142
8144
|
let Pe = hr();
|
|
8143
8145
|
const Ye = () => {
|
|
8144
8146
|
const P = Tn(Te);
|
|
@@ -8146,7 +8148,7 @@ const j1 = {
|
|
|
8146
8148
|
}, He = ct.isMobile ? 30 : 0;
|
|
8147
8149
|
setTimeout(Ye, He);
|
|
8148
8150
|
}
|
|
8149
|
-
function
|
|
8151
|
+
function ae(Te, De, Pe = 0) {
|
|
8150
8152
|
if (Te) {
|
|
8151
8153
|
const He = Array.from(Te).slice(0, 5);
|
|
8152
8154
|
i("fileUpload", He, (p) => {
|
|
@@ -8225,9 +8227,9 @@ const j1 = {
|
|
|
8225
8227
|
}
|
|
8226
8228
|
return (Te, De) => {
|
|
8227
8229
|
const Pe = $s("tree-editor");
|
|
8228
|
-
return n.readOnly ? (rt(),
|
|
8230
|
+
return n.readOnly ? (rt(), ft("div", j1, [
|
|
8229
8231
|
Qe("ul", null, [
|
|
8230
|
-
(rt(!0),
|
|
8232
|
+
(rt(!0), ft(qr, null, $r(n.nodes, (Ye) => (rt(), ft("li", {
|
|
8231
8233
|
key: Ye.uuid,
|
|
8232
8234
|
id: `${Ye.uuid}`,
|
|
8233
8235
|
class: qt({
|
|
@@ -8236,13 +8238,13 @@ const j1 = {
|
|
|
8236
8238
|
"has-child": !!(Ye.children || []).length
|
|
8237
8239
|
})
|
|
8238
8240
|
}, [
|
|
8239
|
-
|
|
8241
|
+
xt($e(vo), {
|
|
8240
8242
|
readOnly: "",
|
|
8241
8243
|
tags: n.tags,
|
|
8242
8244
|
node: Ye,
|
|
8243
8245
|
onChange: pt
|
|
8244
8246
|
}, null, 8, ["tags", "node"]),
|
|
8245
|
-
(Ye.children || []).length ? (rt(),
|
|
8247
|
+
(Ye.children || []).length ? (rt(), ln(Pe, {
|
|
8246
8248
|
key: 0,
|
|
8247
8249
|
readOnly: "",
|
|
8248
8250
|
onChange: (He) => oe(Ye, He),
|
|
@@ -8251,9 +8253,9 @@ const j1 = {
|
|
|
8251
8253
|
}, null, 8, ["onChange", "nodes"])) : At("", !0)
|
|
8252
8254
|
], 10, K1))), 128))
|
|
8253
8255
|
])
|
|
8254
|
-
])) : (rt(),
|
|
8256
|
+
])) : (rt(), ft("div", X1, [
|
|
8255
8257
|
Qe("ul", null, [
|
|
8256
|
-
(rt(!0),
|
|
8258
|
+
(rt(!0), ft(qr, null, $r(n.nodes, (Ye) => (rt(), ft("li", {
|
|
8257
8259
|
key: Ye.uuid,
|
|
8258
8260
|
id: `${Ye.uuid}`,
|
|
8259
8261
|
ref_for: !0,
|
|
@@ -8271,19 +8273,19 @@ const j1 = {
|
|
|
8271
8273
|
onDragleave: Ht((He) => $e(ea)(He, Ye), ["stop"]),
|
|
8272
8274
|
onPaste: Ht((He) => b(He, Ye), ["stop"])
|
|
8273
8275
|
}, [
|
|
8274
|
-
(rt(),
|
|
8276
|
+
(rt(), ln($e(vo), {
|
|
8275
8277
|
key: `${Ye.uuid}-${Ye.type || "text"}`,
|
|
8276
8278
|
node: Ye,
|
|
8277
8279
|
tags: n.tags,
|
|
8278
8280
|
onChange: pt,
|
|
8279
8281
|
onToPrevFocus: q,
|
|
8280
8282
|
onToNextFocus: fe,
|
|
8281
|
-
onToFocus:
|
|
8283
|
+
onToFocus: ie,
|
|
8282
8284
|
onEnter: ne,
|
|
8283
8285
|
onTab: R,
|
|
8284
8286
|
onRemove: M
|
|
8285
8287
|
}, null, 8, ["node", "tags"])),
|
|
8286
|
-
(Ye.children || []).length ? (rt(),
|
|
8288
|
+
(Ye.children || []).length ? (rt(), ln(Pe, {
|
|
8287
8289
|
key: 0,
|
|
8288
8290
|
nodes: Ye.children,
|
|
8289
8291
|
tags: n.tags,
|
|
@@ -8291,7 +8293,7 @@ const j1 = {
|
|
|
8291
8293
|
allowEmpty: !0,
|
|
8292
8294
|
sublevel: !0,
|
|
8293
8295
|
onChange: (He) => oe(Ye, He),
|
|
8294
|
-
onFocusPrev: (He) =>
|
|
8296
|
+
onFocusPrev: (He) => ie(Ye, He),
|
|
8295
8297
|
onFocusNext: (He) => fe(Ye, He),
|
|
8296
8298
|
onTransfer: (He) => N(Ye, He),
|
|
8297
8299
|
onFileUpload: De[0] || (De[0] = (...He) => Te.$emit("fileUpload", ...He)),
|
|
@@ -8349,53 +8351,53 @@ const j1 = {
|
|
|
8349
8351
|
// 图标定位top值
|
|
8350
8352
|
}, i = ut(null), a = n, o = t;
|
|
8351
8353
|
e({ focus: b });
|
|
8352
|
-
const s = ut(null), l =
|
|
8354
|
+
const s = ut(null), l = na() === "mobile", f = ut(!1), m = Pn(() => {
|
|
8353
8355
|
try {
|
|
8354
|
-
const
|
|
8355
|
-
if (typeof
|
|
8356
|
+
const ie = JSON.parse(a.note.title);
|
|
8357
|
+
if (typeof ie != "object")
|
|
8356
8358
|
throw new Error();
|
|
8357
|
-
return
|
|
8359
|
+
return ie;
|
|
8358
8360
|
} catch {
|
|
8359
8361
|
return {
|
|
8360
8362
|
text: a.note.title
|
|
8361
8363
|
};
|
|
8362
8364
|
}
|
|
8363
8365
|
}), v = Pn(() => {
|
|
8364
|
-
const
|
|
8365
|
-
return To(
|
|
8366
|
+
const ie = Co(a.note.tag_id, a.tags), ae = jr(a.note);
|
|
8367
|
+
return To(ie) && ae.finished;
|
|
8366
8368
|
});
|
|
8367
|
-
|
|
8369
|
+
mn(
|
|
8368
8370
|
() => {
|
|
8369
|
-
var
|
|
8370
|
-
return (
|
|
8371
|
+
var ie;
|
|
8372
|
+
return (ie = a.note) == null ? void 0 : ie.title;
|
|
8371
8373
|
},
|
|
8372
|
-
(
|
|
8373
|
-
const
|
|
8374
|
-
f.value = !
|
|
8374
|
+
(ie) => {
|
|
8375
|
+
const ae = (ie || "").replace(/^<p><\/p>$/, "");
|
|
8376
|
+
f.value = !ae;
|
|
8375
8377
|
},
|
|
8376
8378
|
{ immediate: !0 }
|
|
8377
|
-
),
|
|
8378
|
-
_r.tree_title =
|
|
8379
|
+
), mn(i, (ie) => {
|
|
8380
|
+
ie && (_r.tree_title = ie);
|
|
8379
8381
|
}), Mr(() => {
|
|
8380
8382
|
delete _r.tree_title;
|
|
8381
8383
|
});
|
|
8382
|
-
function b(
|
|
8383
|
-
i.value.dispatch("focus",
|
|
8384
|
+
function b(ie = "end") {
|
|
8385
|
+
i.value.dispatch("focus", ie);
|
|
8384
8386
|
}
|
|
8385
|
-
function R(
|
|
8386
|
-
const
|
|
8387
|
-
|
|
8387
|
+
function R(ie) {
|
|
8388
|
+
const ae = { ...a.note }, Ee = +ie.created_at;
|
|
8389
|
+
ae.tag_id === Ee ? delete ae.tag_id : ae.tag_id = Ee, o("change", ae.title, ae);
|
|
8388
8390
|
}
|
|
8389
8391
|
function M() {
|
|
8390
8392
|
ct.currentId = "tree_title", l && Do(!1);
|
|
8391
8393
|
}
|
|
8392
|
-
function N(
|
|
8393
|
-
if (
|
|
8394
|
-
o("change", JSON.stringify(
|
|
8394
|
+
function N(ie) {
|
|
8395
|
+
if (ie.type)
|
|
8396
|
+
o("change", JSON.stringify(ie));
|
|
8395
8397
|
else {
|
|
8396
|
-
const
|
|
8397
|
-
|
|
8398
|
-
o("change",
|
|
8398
|
+
const ae = { ...a.note };
|
|
8399
|
+
ie.tag_id && (ae.tag_id = ie.tag_id), Qt(() => {
|
|
8400
|
+
o("change", ie.text, ae);
|
|
8399
8401
|
});
|
|
8400
8402
|
}
|
|
8401
8403
|
}
|
|
@@ -8404,39 +8406,39 @@ const j1 = {
|
|
|
8404
8406
|
b();
|
|
8405
8407
|
}, 200);
|
|
8406
8408
|
}
|
|
8407
|
-
function me(
|
|
8408
|
-
|
|
8409
|
+
function me(ie) {
|
|
8410
|
+
ie.preventDefault(), a.enableDbEnter ? s.value ? (clearTimeout(s.value), s.value = null, o("dbEnter")) : s.value = setTimeout(() => {
|
|
8409
8411
|
s.value = null, o("focusContent");
|
|
8410
8412
|
}, 180) : o("focusContent");
|
|
8411
8413
|
}
|
|
8412
|
-
function z(
|
|
8413
|
-
switch (
|
|
8414
|
+
function z(ie, ...ae) {
|
|
8415
|
+
switch (ie.key) {
|
|
8414
8416
|
case "Enter":
|
|
8415
8417
|
case "ArrowDown":
|
|
8416
|
-
|
|
8418
|
+
ie.preventDefault(), me(ie, ...ae);
|
|
8417
8419
|
break;
|
|
8418
8420
|
default:
|
|
8419
|
-
if (!((
|
|
8421
|
+
if (!((ie.ctrlKey || ie.metaKey) && (ie.key === "v" || ie.key === "V"))) return ie.preventDefault(), !1;
|
|
8420
8422
|
break;
|
|
8421
8423
|
}
|
|
8422
8424
|
}
|
|
8423
|
-
function q(
|
|
8424
|
-
if (
|
|
8425
|
-
const
|
|
8426
|
-
Array.from(
|
|
8427
|
-
o("input",
|
|
8425
|
+
function q(ie) {
|
|
8426
|
+
if (ie.clipboardData) {
|
|
8427
|
+
const ae = ie.clipboardData.items;
|
|
8428
|
+
Array.from(ae).some((Ie) => Ie.kind === "file") ? (ie.preventDefault(), f.value ? fe(ie.clipboardData.files[0]) : o("file", ie.clipboardData.files)) : ie.clipboardData.getData("text") && (f.value = !1, setTimeout(() => {
|
|
8429
|
+
o("input", ie.target.textContent);
|
|
8428
8430
|
}, 0));
|
|
8429
8431
|
}
|
|
8430
8432
|
}
|
|
8431
|
-
async function fe(
|
|
8432
|
-
const
|
|
8433
|
+
async function fe(ie) {
|
|
8434
|
+
const ae = ko(ie.type), Ee = URL.createObjectURL(ie);
|
|
8433
8435
|
let Ie = {};
|
|
8434
|
-
switch ((
|
|
8436
|
+
switch ((ae.mainType === "image" || ae.mainType === "video") && (Ie = await Ro(ie, ae.mainType)), ae.mainType) {
|
|
8435
8437
|
case "image":
|
|
8436
8438
|
case "audio":
|
|
8437
8439
|
case "video":
|
|
8438
8440
|
N({
|
|
8439
|
-
type:
|
|
8441
|
+
type: ae.mainType,
|
|
8440
8442
|
content: Ee,
|
|
8441
8443
|
size: Ie
|
|
8442
8444
|
});
|
|
@@ -8444,12 +8446,12 @@ const j1 = {
|
|
|
8444
8446
|
default:
|
|
8445
8447
|
N({
|
|
8446
8448
|
type: "file",
|
|
8447
|
-
name:
|
|
8449
|
+
name: ie.name,
|
|
8448
8450
|
content: Ee,
|
|
8449
|
-
size:
|
|
8451
|
+
size: ie.size
|
|
8450
8452
|
});
|
|
8451
8453
|
}
|
|
8452
|
-
Ao.uploadFile([
|
|
8454
|
+
Ao.uploadFile([ie], (je, Ke) => {
|
|
8453
8455
|
if (Ke) {
|
|
8454
8456
|
const Ne = Ke[0];
|
|
8455
8457
|
Ne.code === 0 && N({
|
|
@@ -8459,8 +8461,8 @@ const j1 = {
|
|
|
8459
8461
|
}
|
|
8460
8462
|
});
|
|
8461
8463
|
}
|
|
8462
|
-
return (
|
|
8463
|
-
n.tags.length ? (rt(),
|
|
8464
|
+
return (ie, ae) => (rt(), ft("div", tu, [
|
|
8465
|
+
n.tags.length ? (rt(), ln($e(So), { key: 0 }, xo({
|
|
8464
8466
|
default: Gr(() => [
|
|
8465
8467
|
Qe("span", {
|
|
8466
8468
|
class: "record-tree-popper-reference",
|
|
@@ -8482,7 +8484,7 @@ const j1 = {
|
|
|
8482
8484
|
class: "record-tree-popper-content",
|
|
8483
8485
|
style: an({ width: r.popW, height: r.popH })
|
|
8484
8486
|
}, [
|
|
8485
|
-
(rt(!0),
|
|
8487
|
+
(rt(!0), ft(qr, null, $r(n.tags, (Ee) => (rt(), ft("span", {
|
|
8486
8488
|
class: qt(["record-tree-popper-content-item", {
|
|
8487
8489
|
active: n.note.tag_id === Ee.created_at
|
|
8488
8490
|
}]),
|
|
@@ -8503,7 +8505,8 @@ const j1 = {
|
|
|
8503
8505
|
key: "0"
|
|
8504
8506
|
}
|
|
8505
8507
|
]), 1024)) : At("", !0),
|
|
8506
|
-
|
|
8508
|
+
(rt(), ln($e(Fs), {
|
|
8509
|
+
key: `title-${m.value.type || "text"}`,
|
|
8507
8510
|
id: "tree_title",
|
|
8508
8511
|
ref_key: "recordTitle",
|
|
8509
8512
|
ref: i,
|
|
@@ -8517,16 +8520,16 @@ const j1 = {
|
|
|
8517
8520
|
onChange: N,
|
|
8518
8521
|
onRemove: ne,
|
|
8519
8522
|
onFocus: M,
|
|
8520
|
-
onClick:
|
|
8523
|
+
onClick: ae[0] || (ae[0] = Ht(() => {
|
|
8521
8524
|
}, ["stop"])),
|
|
8522
8525
|
onPaste: q,
|
|
8523
8526
|
onKeydown: z
|
|
8524
|
-
}, null, 8, ["class", "readOnly", "data", "tags"])
|
|
8527
|
+
}, null, 8, ["class", "readOnly", "data", "tags"]))
|
|
8525
8528
|
]));
|
|
8526
8529
|
}
|
|
8527
8530
|
};
|
|
8528
8531
|
var yt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
8529
|
-
function
|
|
8532
|
+
function ga(n) {
|
|
8530
8533
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
8531
8534
|
}
|
|
8532
8535
|
function iu(n) {
|
|
@@ -8557,9 +8560,9 @@ const ou = {}, su = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
8557
8560
|
__proto__: null,
|
|
8558
8561
|
default: ou
|
|
8559
8562
|
}, Symbol.toStringTag, { value: "Module" })), lu = /* @__PURE__ */ iu(su);
|
|
8560
|
-
var
|
|
8563
|
+
var go;
|
|
8561
8564
|
function ci() {
|
|
8562
|
-
return
|
|
8565
|
+
return go || (go = 1, function(n, e) {
|
|
8563
8566
|
(function(t, r) {
|
|
8564
8567
|
n.exports = r();
|
|
8565
8568
|
})(yt, function() {
|
|
@@ -8720,16 +8723,16 @@ function ci() {
|
|
|
8720
8723
|
* wordArray1.concat(wordArray2);
|
|
8721
8724
|
*/
|
|
8722
8725
|
concat: function(z) {
|
|
8723
|
-
var q = this.words, fe = z.words,
|
|
8724
|
-
if (this.clamp(),
|
|
8725
|
-
for (var Ee = 0; Ee <
|
|
8726
|
+
var q = this.words, fe = z.words, ie = this.sigBytes, ae = z.sigBytes;
|
|
8727
|
+
if (this.clamp(), ie % 4)
|
|
8728
|
+
for (var Ee = 0; Ee < ae; Ee++) {
|
|
8726
8729
|
var Ie = fe[Ee >>> 2] >>> 24 - Ee % 4 * 8 & 255;
|
|
8727
|
-
q[
|
|
8730
|
+
q[ie + Ee >>> 2] |= Ie << 24 - (ie + Ee) % 4 * 8;
|
|
8728
8731
|
}
|
|
8729
8732
|
else
|
|
8730
|
-
for (var je = 0; je <
|
|
8731
|
-
q[
|
|
8732
|
-
return this.sigBytes +=
|
|
8733
|
+
for (var je = 0; je < ae; je += 4)
|
|
8734
|
+
q[ie + je >>> 2] = fe[je >>> 2];
|
|
8735
|
+
return this.sigBytes += ae, this;
|
|
8733
8736
|
},
|
|
8734
8737
|
/**
|
|
8735
8738
|
* Removes insignificant bits.
|
|
@@ -8788,11 +8791,11 @@ function ci() {
|
|
|
8788
8791
|
* var hexString = CryptoJS.enc.Hex.stringify(wordArray);
|
|
8789
8792
|
*/
|
|
8790
8793
|
stringify: function(z) {
|
|
8791
|
-
for (var q = z.words, fe = z.sigBytes,
|
|
8792
|
-
var Ee = q[
|
|
8793
|
-
|
|
8794
|
+
for (var q = z.words, fe = z.sigBytes, ie = [], ae = 0; ae < fe; ae++) {
|
|
8795
|
+
var Ee = q[ae >>> 2] >>> 24 - ae % 4 * 8 & 255;
|
|
8796
|
+
ie.push((Ee >>> 4).toString(16)), ie.push((Ee & 15).toString(16));
|
|
8794
8797
|
}
|
|
8795
|
-
return
|
|
8798
|
+
return ie.join("");
|
|
8796
8799
|
},
|
|
8797
8800
|
/**
|
|
8798
8801
|
* Converts a hex string to a word array.
|
|
@@ -8808,8 +8811,8 @@ function ci() {
|
|
|
8808
8811
|
* var wordArray = CryptoJS.enc.Hex.parse(hexString);
|
|
8809
8812
|
*/
|
|
8810
8813
|
parse: function(z) {
|
|
8811
|
-
for (var q = z.length, fe = [],
|
|
8812
|
-
fe[
|
|
8814
|
+
for (var q = z.length, fe = [], ie = 0; ie < q; ie += 2)
|
|
8815
|
+
fe[ie >>> 3] |= parseInt(z.substr(ie, 2), 16) << 24 - ie % 8 * 4;
|
|
8813
8816
|
return new v.init(fe, q / 2);
|
|
8814
8817
|
}
|
|
8815
8818
|
}, M = b.Latin1 = {
|
|
@@ -8827,11 +8830,11 @@ function ci() {
|
|
|
8827
8830
|
* var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
|
|
8828
8831
|
*/
|
|
8829
8832
|
stringify: function(z) {
|
|
8830
|
-
for (var q = z.words, fe = z.sigBytes,
|
|
8831
|
-
var Ee = q[
|
|
8832
|
-
|
|
8833
|
+
for (var q = z.words, fe = z.sigBytes, ie = [], ae = 0; ae < fe; ae++) {
|
|
8834
|
+
var Ee = q[ae >>> 2] >>> 24 - ae % 4 * 8 & 255;
|
|
8835
|
+
ie.push(String.fromCharCode(Ee));
|
|
8833
8836
|
}
|
|
8834
|
-
return
|
|
8837
|
+
return ie.join("");
|
|
8835
8838
|
},
|
|
8836
8839
|
/**
|
|
8837
8840
|
* Converts a Latin1 string to a word array.
|
|
@@ -8847,8 +8850,8 @@ function ci() {
|
|
|
8847
8850
|
* var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
|
|
8848
8851
|
*/
|
|
8849
8852
|
parse: function(z) {
|
|
8850
|
-
for (var q = z.length, fe = [],
|
|
8851
|
-
fe[
|
|
8853
|
+
for (var q = z.length, fe = [], ie = 0; ie < q; ie++)
|
|
8854
|
+
fe[ie >>> 2] |= (z.charCodeAt(ie) & 255) << 24 - ie % 4 * 8;
|
|
8852
8855
|
return new v.init(fe, q);
|
|
8853
8856
|
}
|
|
8854
8857
|
}, N = b.Utf8 = {
|
|
@@ -8927,13 +8930,13 @@ function ci() {
|
|
|
8927
8930
|
* var processedData = bufferedBlockAlgorithm._process(!!'flush');
|
|
8928
8931
|
*/
|
|
8929
8932
|
_process: function(z) {
|
|
8930
|
-
var q, fe = this._data,
|
|
8933
|
+
var q, fe = this._data, ie = fe.words, ae = fe.sigBytes, Ee = this.blockSize, Ie = Ee * 4, je = ae / Ie;
|
|
8931
8934
|
z ? je = r.ceil(je) : je = r.max((je | 0) - this._minBufferSize, 0);
|
|
8932
|
-
var Ke = je * Ee, Ne = r.min(Ke * 4,
|
|
8935
|
+
var Ke = je * Ee, Ne = r.min(Ke * 4, ae);
|
|
8933
8936
|
if (Ke) {
|
|
8934
8937
|
for (var oe = 0; oe < Ke; oe += Ee)
|
|
8935
|
-
this._doProcessBlock(
|
|
8936
|
-
q =
|
|
8938
|
+
this._doProcessBlock(ie, oe);
|
|
8939
|
+
q = ie.splice(0, Ke), fe.sigBytes -= Ne;
|
|
8937
8940
|
}
|
|
8938
8941
|
return new v.init(q, Ne);
|
|
8939
8942
|
},
|
|
@@ -9058,9 +9061,9 @@ function ci() {
|
|
|
9058
9061
|
});
|
|
9059
9062
|
}(Bi)), Bi.exports;
|
|
9060
9063
|
}
|
|
9061
|
-
var Li = { exports: {} },
|
|
9064
|
+
var Li = { exports: {} }, bo;
|
|
9062
9065
|
function cu() {
|
|
9063
|
-
return
|
|
9066
|
+
return bo || (bo = 1, function(n, e) {
|
|
9064
9067
|
(function(t, r) {
|
|
9065
9068
|
n.exports = r(ci());
|
|
9066
9069
|
})(yt, function(t) {
|
|
@@ -9084,17 +9087,17 @@ function cu() {
|
|
|
9084
9087
|
this._hash = new o.init(f.slice(0));
|
|
9085
9088
|
},
|
|
9086
9089
|
_doProcessBlock: function(R, M) {
|
|
9087
|
-
for (var N = this._hash.words, ne = N[0], me = N[1], z = N[2], q = N[3], fe = N[4],
|
|
9090
|
+
for (var N = this._hash.words, ne = N[0], me = N[1], z = N[2], q = N[3], fe = N[4], ie = N[5], ae = N[6], Ee = N[7], Ie = 0; Ie < 64; Ie++) {
|
|
9088
9091
|
if (Ie < 16)
|
|
9089
9092
|
v[Ie] = R[M + Ie] | 0;
|
|
9090
9093
|
else {
|
|
9091
9094
|
var je = v[Ie - 15], Ke = (je << 25 | je >>> 7) ^ (je << 14 | je >>> 18) ^ je >>> 3, Ne = v[Ie - 2], oe = (Ne << 15 | Ne >>> 17) ^ (Ne << 13 | Ne >>> 19) ^ Ne >>> 10;
|
|
9092
9095
|
v[Ie] = Ke + v[Ie - 7] + oe + v[Ie - 16];
|
|
9093
9096
|
}
|
|
9094
|
-
var pt = fe &
|
|
9095
|
-
Ee =
|
|
9097
|
+
var pt = fe & ie ^ ~fe & ae, Ve = ne & me ^ ne & z ^ me & z, Te = (ne << 30 | ne >>> 2) ^ (ne << 19 | ne >>> 13) ^ (ne << 10 | ne >>> 22), De = (fe << 26 | fe >>> 6) ^ (fe << 21 | fe >>> 11) ^ (fe << 7 | fe >>> 25), Pe = Ee + De + pt + m[Ie] + v[Ie], Ye = Te + Ve;
|
|
9098
|
+
Ee = ae, ae = ie, ie = fe, fe = q + Pe | 0, q = z, z = me, me = ne, ne = Pe + Ye | 0;
|
|
9096
9099
|
}
|
|
9097
|
-
N[0] = N[0] + ne | 0, N[1] = N[1] + me | 0, N[2] = N[2] + z | 0, N[3] = N[3] + q | 0, N[4] = N[4] + fe | 0, N[5] = N[5] +
|
|
9100
|
+
N[0] = N[0] + ne | 0, N[1] = N[1] + me | 0, N[2] = N[2] + z | 0, N[3] = N[3] + q | 0, N[4] = N[4] + fe | 0, N[5] = N[5] + ie | 0, N[6] = N[6] + ae | 0, N[7] = N[7] + Ee | 0;
|
|
9098
9101
|
},
|
|
9099
9102
|
_doFinalize: function() {
|
|
9100
9103
|
var R = this._data, M = R.words, N = this._nDataBytes * 8, ne = R.sigBytes * 8;
|
|
@@ -9110,9 +9113,9 @@ function cu() {
|
|
|
9110
9113
|
});
|
|
9111
9114
|
}(Li)), Li.exports;
|
|
9112
9115
|
}
|
|
9113
|
-
var Ni = { exports: {} },
|
|
9116
|
+
var Ni = { exports: {} }, _o;
|
|
9114
9117
|
function uu() {
|
|
9115
|
-
return
|
|
9118
|
+
return _o || (_o = 1, function(n, e) {
|
|
9116
9119
|
(function(t, r) {
|
|
9117
9120
|
n.exports = r(ci());
|
|
9118
9121
|
})(yt, function(t) {
|
|
@@ -9196,7 +9199,7 @@ function uu() {
|
|
|
9196
9199
|
});
|
|
9197
9200
|
})(Ps);
|
|
9198
9201
|
var fu = Ps.exports;
|
|
9199
|
-
const du = /* @__PURE__ */
|
|
9202
|
+
const du = /* @__PURE__ */ ga(fu);
|
|
9200
9203
|
var Hs = { exports: {} };
|
|
9201
9204
|
(function(n, e) {
|
|
9202
9205
|
(function(t, r) {
|
|
@@ -9271,7 +9274,7 @@ var Hs = { exports: {} };
|
|
|
9271
9274
|
});
|
|
9272
9275
|
})(Hs);
|
|
9273
9276
|
var hu = Hs.exports;
|
|
9274
|
-
const pu = /* @__PURE__ */
|
|
9277
|
+
const pu = /* @__PURE__ */ ga(hu);
|
|
9275
9278
|
let pn, nr = "", Wr = "", Vs = null;
|
|
9276
9279
|
function mu() {
|
|
9277
9280
|
var n = "wss://iat-api.xfyun.cn/v2/iat", e = "iat-api.xfyun.cn", t = "4f2bbe08d7ee54da888cfd009514e89f", r = "NTc3MWNlNDNiZWFmMGM2Yzk0ZjRlZjdi", i = (/* @__PURE__ */ new Date()).toGMTString(), a = "hmac-sha256", o = "host date request-line", s = `host: ${e}
|
|
@@ -9442,10 +9445,10 @@ var Ys = { exports: {} };
|
|
|
9442
9445
|
}, fe = function(C) {
|
|
9443
9446
|
var y = C.state, u = "ctx.state=" + y;
|
|
9444
9447
|
return q(y) && (u += j("nMIy::(注意:ctx不是running状态,rec.open和start至少要有一个在用户操作(触摸、点击等)时进行调用,否则将在rec.start时尝试进行ctx.resume,可能会产生兼容性问题(仅iOS),请参阅文档中runningContext配置)")), u;
|
|
9445
|
-
},
|
|
9446
|
-
o[
|
|
9447
|
-
var
|
|
9448
|
-
o[
|
|
9448
|
+
}, ie = "ConnectEnableWebM";
|
|
9449
|
+
o[ie] = !0;
|
|
9450
|
+
var ae = "ConnectEnableWorklet";
|
|
9451
|
+
o[ae] = !1;
|
|
9449
9452
|
var Ee = function(C) {
|
|
9450
9453
|
var y = C.BufferSize || o.BufferSize, u = C.Stream, W = u._c, ee = W[b], de = {}, ce = pt(u), we = ce[0], ge = null, ke = "";
|
|
9451
9454
|
if (we && we.getSettings) {
|
|
@@ -9475,8 +9478,8 @@ var Ys = { exports: {} };
|
|
|
9475
9478
|
}
|
|
9476
9479
|
}, E = "ScriptProcessor", x = "audioWorklet", _e = f + " " + x, $ = "RecProc", X = "MediaRecorder", Me = X + ".WebM.PCM", re = W.createScriptProcessor || W.createJavaScriptNode, ue = j("ZGlf::。由于{1}内部1秒375次回调,在移动端可能会有性能问题导致回调丢失录音变短,PC端无影响,暂不建议开启{1}。", 0, x), _ = function() {
|
|
9477
9480
|
Fe = u.isWorklet = !1, je(u), Ve(j("7TU0::Connect采用老的{1},", 0, E) + he.get(
|
|
9478
|
-
o[
|
|
9479
|
-
[f + "." +
|
|
9481
|
+
o[ae] ? j("JwCL::但已设置{1}尝试启用{2}", 2) : j("VGjB::可设置{1}尝试启用{2}", 2),
|
|
9482
|
+
[f + "." + ae + "=true", x]
|
|
9480
9483
|
) + Se + ue, 3);
|
|
9481
9484
|
var G = u._p = re.call(W, y, 1, 1);
|
|
9482
9485
|
be(G), G.onaudioprocess = function(F) {
|
|
@@ -9484,7 +9487,7 @@ var Ys = { exports: {} };
|
|
|
9484
9487
|
U(T, ee);
|
|
9485
9488
|
};
|
|
9486
9489
|
}, K = function() {
|
|
9487
|
-
Ae = u.isWebM = !1, Ke(u), Fe = u.isWorklet = !re || o[
|
|
9490
|
+
Ae = u.isWebM = !1, Ke(u), Fe = u.isWorklet = !re || o[ae];
|
|
9488
9491
|
var G = window.AudioWorkletNode;
|
|
9489
9492
|
if (!(Fe && W[x] && G)) {
|
|
9490
9493
|
_();
|
|
@@ -9527,7 +9530,7 @@ var Ys = { exports: {} };
|
|
|
9527
9530
|
});
|
|
9528
9531
|
be(k), k.port.onmessage = function(L) {
|
|
9529
9532
|
te && (clearTimeout(te), te = ""), T() ? U(L.data.val, ee) : Fe || Ve(j("XUap::{1}多余回调", 0, x), 3);
|
|
9530
|
-
}, Ve(j("yOta::Connect采用{1},设置{2}可恢复老式{3}", 0, x, f + "." +
|
|
9533
|
+
}, Ve(j("yOta::Connect采用{1},设置{2}可恢复老式{3}", 0, x, f + "." + ae + "=false", E) + Se + ue, 3);
|
|
9531
9534
|
}
|
|
9532
9535
|
}, V = function() {
|
|
9533
9536
|
if (T()) {
|
|
@@ -9548,7 +9551,7 @@ var Ys = { exports: {} };
|
|
|
9548
9551
|
}, V, V);
|
|
9549
9552
|
}, d = function() {
|
|
9550
9553
|
var G = window[X], F = "ondataavailable", T = "audio/webm; codecs=pcm";
|
|
9551
|
-
Ae = u.isWebM = o[
|
|
9554
|
+
Ae = u.isWebM = o[ie];
|
|
9552
9555
|
var B = G && F in G.prototype && G.isTypeSupported(T);
|
|
9553
9556
|
if (Se = B ? "" : j("VwPd::(此浏览器不支持{1})", 0, Me), !Ae || !B) {
|
|
9554
9557
|
K();
|
|
@@ -9578,7 +9581,7 @@ var Ys = { exports: {} };
|
|
|
9578
9581
|
}, J.readAsArrayBuffer(c.data);
|
|
9579
9582
|
};
|
|
9580
9583
|
try {
|
|
9581
|
-
k.start(~~(y / 48)), Ve(j("LMEm::Connect采用{1},设置{2}可恢复使用{3}或老式{4}", 0, Me, f + "." +
|
|
9584
|
+
k.start(~~(y / 48)), Ve(j("LMEm::Connect采用{1},设置{2}可恢复使用{3}或老式{4}", 0, Me, f + "." + ie + "=false", x, E));
|
|
9582
9585
|
} catch (c) {
|
|
9583
9586
|
Ve("mr start err", 1, c), K();
|
|
9584
9587
|
}
|
|
@@ -10279,7 +10282,7 @@ var Ys = { exports: {} };
|
|
|
10279
10282
|
});
|
|
10280
10283
|
})(Ys);
|
|
10281
10284
|
var yu = Ys.exports;
|
|
10282
|
-
const Oi = /* @__PURE__ */
|
|
10285
|
+
const Oi = /* @__PURE__ */ ga(yu);
|
|
10283
10286
|
(function(n) {
|
|
10284
10287
|
var e = typeof window == "object" && !!window.document, t = e ? window : Object, r = t.Recorder, i = r.i18n;
|
|
10285
10288
|
n(r, i, i.$T, e);
|
|
@@ -10296,8 +10299,8 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
10296
10299
|
var N = M.bitRate, ne = M.sampleRate, me = ne;
|
|
10297
10300
|
if ((" " + a + ",").indexOf(" " + N + ",") == -1 && n.CLog(t("eGB9::{1}不在mp3支持的取值范围:{2}", 0, "bitRate=" + N, a), 3), (" " + i + ",").indexOf(" " + ne + ",") == -1) {
|
|
10298
10301
|
for (var z = i.split(", "), q = [], fe = 0; fe < z.length; fe++) q.push({ v: +z[fe], s: Math.abs(z[fe] - ne) });
|
|
10299
|
-
q.sort(function(
|
|
10300
|
-
return
|
|
10302
|
+
q.sort(function(ie, ae) {
|
|
10303
|
+
return ie.s - ae.s;
|
|
10301
10304
|
}), me = q[0].v, M.sampleRate = me, n.CLog(t("zLTa::sampleRate已更新为{1},因为{2}不在mp3支持的取值范围:{3}", 0, me, ne, i), 3);
|
|
10302
10305
|
}
|
|
10303
10306
|
}, s = function() {
|
|
@@ -10320,17 +10323,17 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
10320
10323
|
}
|
|
10321
10324
|
}
|
|
10322
10325
|
o(z);
|
|
10323
|
-
var
|
|
10326
|
+
var ie = new n.lamejs.Mp3Encoder(1, z.sampleRate, z.bitRate), ae = 57600, Ee = new Int8Array(5e5), Ie = 0, je = 0, Ke = 0, Ne = function() {
|
|
10324
10327
|
try {
|
|
10325
10328
|
if (je < q)
|
|
10326
|
-
var oe =
|
|
10329
|
+
var oe = ie.encodeBuffer(M.subarray(je, je + ae));
|
|
10327
10330
|
else {
|
|
10328
10331
|
Ke = 1;
|
|
10329
|
-
var oe =
|
|
10332
|
+
var oe = ie.flush();
|
|
10330
10333
|
}
|
|
10331
10334
|
} catch (Pe) {
|
|
10332
10335
|
if (console.error(Pe), !Ke) try {
|
|
10333
|
-
|
|
10336
|
+
ie.flush();
|
|
10334
10337
|
} catch (Ye) {
|
|
10335
10338
|
console.error(Ye);
|
|
10336
10339
|
}
|
|
@@ -10346,7 +10349,7 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
10346
10349
|
Ee.set(oe, Ie), Ie += pt;
|
|
10347
10350
|
}
|
|
10348
10351
|
if (je < q)
|
|
10349
|
-
je +=
|
|
10352
|
+
je += ae, setTimeout(Ne);
|
|
10350
10353
|
else {
|
|
10351
10354
|
var Te = [Ee.buffer.slice(0, Ie)], De = b.fn(Te, Ie, q, z.sampleRate);
|
|
10352
10355
|
R(De, z), N(Te[0] || new ArrayBuffer(0), "audio/mp3");
|
|
@@ -10461,11 +10464,11 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
10461
10464
|
} }, me(), z();
|
|
10462
10465
|
try {
|
|
10463
10466
|
if (!fe) {
|
|
10464
|
-
var
|
|
10465
|
-
|
|
10466
|
-
var
|
|
10467
|
-
|
|
10468
|
-
var Ee = n.lamejs.toString(), Ie = (window.URL || webkitURL).createObjectURL(new Blob(["var wk_lame=(", Ee,
|
|
10467
|
+
var ie = (ne + "").replace(/[\w\$]+\.onmessage/g, "self.postMessage");
|
|
10468
|
+
ie = ie.replace(/[\w\$]+\.wkScope/g, "wkScope");
|
|
10469
|
+
var ae = ");wk_lame();self.onmessage=" + ie;
|
|
10470
|
+
ae += ";var wkScope={ wk_ctxs:{},wk_lame:wk_lame", ae += ",wk_mp3TrimFix:{rm:" + b.rm + ",fn:" + b.fn + "} }";
|
|
10471
|
+
var Ee = n.lamejs.toString(), Ie = (window.URL || webkitURL).createObjectURL(new Blob(["var wk_lame=(", Ee, ae], { type: "text/javascript" }));
|
|
10469
10472
|
fe = new Worker(Ie), setTimeout(function() {
|
|
10470
10473
|
(window.URL || webkitURL).revokeObjectURL(Ie);
|
|
10471
10474
|
}, 1e4), me(1);
|
|
@@ -10510,22 +10513,22 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
10510
10513
|
}, q = z(0) + z(1), fe = z(2) + z(3);
|
|
10511
10514
|
if (!/^1{11}/.test(q))
|
|
10512
10515
|
return null;
|
|
10513
|
-
var
|
|
10516
|
+
var ie = { "00": 2.5, 10: 2, 11: 1 }[q.substr(11, 2)], ae = { "01": 3 }[q.substr(13, 2)], Ee = {
|
|
10514
10517
|
//lamejs -> Tables.samplerate_table
|
|
10515
10518
|
1: [44100, 48e3, 32e3],
|
|
10516
10519
|
2: [22050, 24e3, 16e3],
|
|
10517
10520
|
"2.5": [11025, 12e3, 8e3]
|
|
10518
|
-
}[
|
|
10521
|
+
}[ie];
|
|
10519
10522
|
Ee && (Ee = Ee[ne(fe.substr(4, 2), 2)]);
|
|
10520
10523
|
var Ie = [
|
|
10521
10524
|
//lamejs -> Tables.bitrate_table
|
|
10522
10525
|
[0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160],
|
|
10523
10526
|
[0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320]
|
|
10524
10527
|
//MPEG 1
|
|
10525
|
-
][
|
|
10526
|
-
if (!
|
|
10528
|
+
][ie == 1 ? 1 : 0][ne(fe.substr(0, 4), 2)];
|
|
10529
|
+
if (!ie || !ae || !Ie || !Ee)
|
|
10527
10530
|
return null;
|
|
10528
|
-
for (var je = Math.round(N * 8 / Ie), Ke =
|
|
10531
|
+
for (var je = Math.round(N * 8 / Ie), Ke = ae == 1 ? 384 : ae == 2 || ie == 1 ? 1152 : 576, Ne = Ke / Ee * 1e3, oe = Math.floor(Ke * Ie / 8 / Ee * 1e3), pt = 0, Ve = 0, Te = 0; Te < M.length; Te++) {
|
|
10529
10532
|
var De = M[Te];
|
|
10530
10533
|
if (Ve += De.byteLength, Ve >= oe + 3) {
|
|
10531
10534
|
var Pe = new Uint8Array(De), Ye = De.byteLength - (Ve - (oe + 3) + 1), He = z(Ye, Pe);
|
|
@@ -10534,8 +10537,8 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
10534
10537
|
}
|
|
10535
10538
|
}
|
|
10536
10539
|
return pt && oe++, {
|
|
10537
|
-
version:
|
|
10538
|
-
layer:
|
|
10540
|
+
version: ie,
|
|
10541
|
+
layer: ae,
|
|
10539
10542
|
sampleRate: Ee,
|
|
10540
10543
|
bitRate: Ie,
|
|
10541
10544
|
duration: je,
|
|
@@ -10555,17 +10558,17 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
10555
10558
|
return { size: N, err: "mp3 unknown format" };
|
|
10556
10559
|
var q = Math.round(ne / me * 1e3), fe = Math.floor((z.duration - q) / z.frameDurationFloat);
|
|
10557
10560
|
if (fe > 0) {
|
|
10558
|
-
var
|
|
10559
|
-
N -=
|
|
10560
|
-
for (var
|
|
10561
|
+
var ie = fe * z.frameSize - (z.hasPadding ? 1 : 0);
|
|
10562
|
+
N -= ie;
|
|
10563
|
+
for (var ae = 0, Ee = [], Ie = 0; Ie < M.length; Ie++) {
|
|
10561
10564
|
var je = M[Ie];
|
|
10562
|
-
if (
|
|
10565
|
+
if (ie <= 0)
|
|
10563
10566
|
break;
|
|
10564
|
-
|
|
10567
|
+
ie >= je.byteLength ? (ie -= je.byteLength, Ee.push(je), M.splice(Ie, 1), Ie--) : (M[Ie] = je.slice(ie), ae = je, ie = 0);
|
|
10565
10568
|
}
|
|
10566
10569
|
var Ke = this.rm(M, N);
|
|
10567
10570
|
if (!Ke) {
|
|
10568
|
-
|
|
10571
|
+
ae && (M[0] = ae);
|
|
10569
10572
|
for (var Ie = 0; Ie < Ee.length; Ie++)
|
|
10570
10573
|
M.splice(Ie, 0, Ee[Ie]);
|
|
10571
10574
|
z.err = "mp3 fix error: 已还原,错误原因不明";
|
|
@@ -10686,7 +10689,7 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
10686
10689
|
return w + "." + U + "." + E;
|
|
10687
10690
|
};
|
|
10688
10691
|
}
|
|
10689
|
-
function
|
|
10692
|
+
function ie() {
|
|
10690
10693
|
var w = null;
|
|
10691
10694
|
this.qupvt = null, this.setModules = function(A) {
|
|
10692
10695
|
this.qupvt = A, w = A;
|
|
@@ -11032,7 +11035,7 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
11032
11035
|
}
|
|
11033
11036
|
};
|
|
11034
11037
|
var T = [1, 1, 1, 1, 8, 2, 2, 2, 4, 4, 4, 8, 8, 8, 16, 16], B = [1, 2, 4, 8, 1, 2, 4, 8, 2, 4, 8, 2, 4, 8, 4, 8], O = [0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4], V = [0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3];
|
|
11035
|
-
|
|
11038
|
+
ie.slen1_tab = O, ie.slen2_tab = V;
|
|
11036
11039
|
function k(A, S) {
|
|
11037
11040
|
for (var D, H = S.tt[1][A], Z = S.tt[0][A], h = 0; h < oe.scfsi_band.length - 1; h++) {
|
|
11038
11041
|
for (D = oe.scfsi_band[h]; D < oe.scfsi_band[h + 1] && !(Z.scalefac[D] != H.scalefac[D] && H.scalefac[D] >= 0); D++)
|
|
@@ -11237,8 +11240,8 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
11237
11240
|
}
|
|
11238
11241
|
};
|
|
11239
11242
|
}
|
|
11240
|
-
|
|
11241
|
-
function
|
|
11243
|
+
ae.STEPS_per_dB = 100, ae.MAX_dB = 120, ae.GAIN_NOT_ENOUGH_SAMPLES = -24601, ae.GAIN_ANALYSIS_ERROR = 0, ae.GAIN_ANALYSIS_OK = 1, ae.INIT_GAIN_ANALYSIS_ERROR = 0, ae.INIT_GAIN_ANALYSIS_OK = 1, ae.YULE_ORDER = 10, ae.MAX_ORDER = ae.YULE_ORDER, ae.MAX_SAMP_FREQ = 48e3, ae.RMS_WINDOW_TIME_NUMERATOR = 1, ae.RMS_WINDOW_TIME_DENOMINATOR = 20, ae.MAX_SAMPLES_PER_WINDOW = ae.MAX_SAMP_FREQ * ae.RMS_WINDOW_TIME_NUMERATOR / ae.RMS_WINDOW_TIME_DENOMINATOR + 1;
|
|
11244
|
+
function ae() {
|
|
11242
11245
|
}
|
|
11243
11246
|
function Ee() {
|
|
11244
11247
|
function w($, X, Me, re, ue, _, K, d, G, F, T, B, O, V) {
|
|
@@ -11786,7 +11789,7 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
11786
11789
|
if (k.version == 1)
|
|
11787
11790
|
for (L = 0; L < 2; L++)
|
|
11788
11791
|
for (c = 0; c < A.channels_out; c++) {
|
|
11789
|
-
var D = S.tt[L][c], H =
|
|
11792
|
+
var D = S.tt[L][c], H = ie.slen1_tab[D.scalefac_compress], Z = ie.slen2_tab[D.scalefac_compress];
|
|
11790
11793
|
for (I = 0, J = 0; J < D.sfbdivide; J++)
|
|
11791
11794
|
D.scalefac[J] != -1 && (re(A, D.scalefac[J], H), I += H);
|
|
11792
11795
|
for (; J < D.sfbmax; J++)
|
|
@@ -17157,16 +17160,16 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
17157
17160
|
Xe < 2 ? (w.fft_long(Mt, Ge[qe], Xe, lt, Je), w.fft_short(Mt, Le[Ue], Xe, lt, Je)) : Xe == 2 && r(), le[0] = /*fix NON_LINEAR_SCALE_ENERGY*/
|
|
17158
17161
|
Ge[qe + 0][0], le[0] *= le[0];
|
|
17159
17162
|
for (var mt = u.BLKSIZE / 2 - 1; mt >= 0; --mt) {
|
|
17160
|
-
var
|
|
17163
|
+
var wt = Ge[qe + 0][u.BLKSIZE / 2 - mt], Dt = Ge[qe + 0][u.BLKSIZE / 2 + mt];
|
|
17161
17164
|
le[u.BLKSIZE / 2 - mt] = /*fix NON_LINEAR_SCALE_ENERGY*/
|
|
17162
|
-
(
|
|
17165
|
+
(wt * wt + Dt * Dt) * 0.5;
|
|
17163
17166
|
}
|
|
17164
17167
|
for (var vt = 2; vt >= 0; --vt) {
|
|
17165
17168
|
ye[vt][0] = Le[Ue + 0][vt][0], ye[vt][0] *= ye[vt][0];
|
|
17166
17169
|
for (var mt = u.BLKSIZE_s / 2 - 1; mt >= 0; --mt) {
|
|
17167
|
-
var
|
|
17170
|
+
var wt = Le[Ue + 0][vt][u.BLKSIZE_s / 2 - mt], Dt = Le[Ue + 0][vt][u.BLKSIZE_s / 2 + mt];
|
|
17168
17171
|
ye[vt][u.BLKSIZE_s / 2 - mt] = /*fix NON_LINEAR_SCALE_ENERGY*/
|
|
17169
|
-
(
|
|
17172
|
+
(wt * wt + Dt * Dt) * 0.5;
|
|
17170
17173
|
}
|
|
17171
17174
|
}
|
|
17172
17175
|
{
|
|
@@ -17281,8 +17284,8 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
17281
17284
|
break;
|
|
17282
17285
|
}
|
|
17283
17286
|
{
|
|
17284
|
-
var mt = xe.PSY.bo_s_weight[Le],
|
|
17285
|
-
We = mt * le[Ue], Xe = mt * ye[Ue], xe.en[Ge].s[Le][qe] += We, xe.thm[Ge].s[Le][qe] += Xe, We =
|
|
17287
|
+
var mt = xe.PSY.bo_s_weight[Le], wt = 1 - mt;
|
|
17288
|
+
We = mt * le[Ue], Xe = mt * ye[Ue], xe.en[Ge].s[Le][qe] += We, xe.thm[Ge].s[Le][qe] += Xe, We = wt * le[Ue], Xe = wt * ye[Ue];
|
|
17286
17289
|
}
|
|
17287
17290
|
}
|
|
17288
17291
|
for (; Le < u.SBMAX_s; ++Le)
|
|
@@ -17315,9 +17318,9 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
17315
17318
|
ye[Xe] = lt;
|
|
17316
17319
|
}
|
|
17317
17320
|
for (We = Xe = 0; Xe < Ue.npart_s; Xe++) {
|
|
17318
|
-
var
|
|
17319
|
-
for (++
|
|
17320
|
-
Dt += Ue.s3_ss[We] * ye[
|
|
17321
|
+
var wt = Ue.s3ind_s[Xe][0], Dt = Ue.s3_ss[We++] * ye[wt];
|
|
17322
|
+
for (++wt; wt <= Ue.s3ind_s[Xe][1]; )
|
|
17323
|
+
Dt += Ue.s3_ss[We] * ye[wt], ++We, ++wt;
|
|
17321
17324
|
{
|
|
17322
17325
|
var vt = _e * Ue.nb_s1[qe][Xe];
|
|
17323
17326
|
Ge[Xe] = Math.min(Dt, vt);
|
|
@@ -17449,7 +17452,7 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
17449
17452
|
-0.313819 * 2
|
|
17450
17453
|
];
|
|
17451
17454
|
this.L3psycho_anal_ns = function(xe, le, ye, Ge, qe, Le, Ue, We, Xe, lt) {
|
|
17452
|
-
var Je = xe.internal_flags, Mt = f([2, u.BLKSIZE]), mt = f([2, 3, u.BLKSIZE_s]),
|
|
17455
|
+
var Je = xe.internal_flags, Mt = f([2, u.BLKSIZE]), mt = f([2, 3, u.BLKSIZE_s]), wt = s(u.CBANDS + 1), Dt = s(u.CBANDS + 1), vt = s(u.CBANDS + 2), st = o(2), _t = o(2), Yt, Ze, dt, at, Rt, Sn, Jt, gt, Ar = f([2, 576]), en, Nn = o(u.CBANDS + 2), Xn = o(u.CBANDS + 2);
|
|
17453
17456
|
for (R.fill(Xn, 0), Yt = Je.channels_out, xe.mode == q.JOINT_STEREO && (Yt = 4), xe.VBR == z.vbr_off ? en = Je.ResvMax == 0 ? 0 : Je.ResvSize / Je.ResvMax * 0.5 : xe.VBR == z.vbr_rh || xe.VBR == z.vbr_mtrh || xe.VBR == z.vbr_mt ? en = 0.6 : en = 1, Ze = 0; Ze < Je.channels_out; Ze++) {
|
|
17454
17457
|
var sr = le[Ze], lr = ye + 576 - 350 - G + 192;
|
|
17455
17458
|
for (at = 0; at < 576; at++) {
|
|
@@ -17461,39 +17464,39 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
17461
17464
|
qe[Ge][Ze].en.assign(Je.en[Ze]), qe[Ge][Ze].thm.assign(Je.thm[Ze]), Yt > 2 && r();
|
|
17462
17465
|
}
|
|
17463
17466
|
for (Ze = 0; Ze < Yt; Ze++) {
|
|
17464
|
-
var
|
|
17467
|
+
var ba, _a, tn = s(12), Cn = [0, 0, 0, 0], di = s(12), ya = 1, wa, xa = s(u.CBANDS), Sa = s(u.CBANDS), It = [0, 0, 0, 0], Ca = s(u.HBLKSIZE), Ta = f([3, u.HBLKSIZE_s]);
|
|
17465
17468
|
for (at = 0; at < 3; at++)
|
|
17466
17469
|
tn[at] = Je.nsPsy.last_en_subshort[Ze][at + 6], di[at] = tn[at] / Je.nsPsy.last_en_subshort[Ze][at + 4], Cn[0] += tn[at];
|
|
17467
17470
|
Ze == 2 && r();
|
|
17468
17471
|
{
|
|
17469
|
-
var
|
|
17472
|
+
var Ma = Ar[Ze & 1], cr = 0;
|
|
17470
17473
|
for (at = 0; at < 9; at++) {
|
|
17471
17474
|
for (var Ws = cr + 64, Ut = 1; cr < Ws; cr++)
|
|
17472
|
-
Ut < Math.abs(
|
|
17475
|
+
Ut < Math.abs(Ma[cr]) && (Ut = Math.abs(Ma[cr]));
|
|
17473
17476
|
Je.nsPsy.last_en_subshort[Ze][at] = tn[at + 3] = Ut, Cn[1 + at / 3] += Ut, Ut > tn[at + 3 - 2] ? Ut = Ut / tn[at + 3 - 2] : tn[at + 3 - 2] > Ut * 10 ? Ut = tn[at + 3 - 2] / (Ut * 10) : Ut = 0, di[at + 3] = Ut;
|
|
17474
17477
|
}
|
|
17475
17478
|
}
|
|
17476
|
-
for (xe.analysis && r(),
|
|
17477
|
-
It[at / 3] == 0 && di[at] >
|
|
17479
|
+
for (xe.analysis && r(), wa = Ze == 3 ? Je.nsPsy.attackthre_s : Je.nsPsy.attackthre, at = 0; at < 12; at++)
|
|
17480
|
+
It[at / 3] == 0 && di[at] > wa && (It[at / 3] = at % 3 + 1);
|
|
17478
17481
|
for (at = 1; at < 4; at++) {
|
|
17479
17482
|
var hi;
|
|
17480
17483
|
Cn[at - 1] > Cn[at] ? hi = Cn[at - 1] / Cn[at] : hi = Cn[at] / Cn[at - 1], hi < 1.7 && (It[at] = 0, at == 1 && (It[0] = 0));
|
|
17481
17484
|
}
|
|
17482
|
-
for (It[0] != 0 && Je.nsPsy.lastAttacks[Ze] != 0 && (It[0] = 0), (Je.nsPsy.lastAttacks[Ze] == 3 || It[0] + It[1] + It[2] + It[3] != 0) && (
|
|
17485
|
+
for (It[0] != 0 && Je.nsPsy.lastAttacks[Ze] != 0 && (It[0] = 0), (Je.nsPsy.lastAttacks[Ze] == 3 || It[0] + It[1] + It[2] + It[3] != 0) && (ya = 0, It[1] != 0 && It[0] != 0 && (It[1] = 0), It[2] != 0 && It[1] != 0 && (It[2] = 0), It[3] != 0 && It[2] != 0 && (It[3] = 0)), Ze < 2 ? _t[Ze] = ya : r(), Xe[Ze] = Je.tot_ener[Ze], _a = mt, ba = Mt, B(
|
|
17483
17486
|
xe,
|
|
17487
|
+
Ca,
|
|
17484
17488
|
Ta,
|
|
17485
|
-
|
|
17486
|
-
_a,
|
|
17489
|
+
ba,
|
|
17487
17490
|
Ze & 1,
|
|
17488
|
-
|
|
17491
|
+
_a,
|
|
17489
17492
|
Ze & 1,
|
|
17490
17493
|
Ge,
|
|
17491
17494
|
Ze,
|
|
17492
17495
|
le,
|
|
17493
17496
|
ye
|
|
17494
|
-
), et(Je,
|
|
17497
|
+
), et(Je, Ca, wt, xa, Sa), ot(Je, xa, Sa, Nn), gt = 0; gt < 3; gt++) {
|
|
17495
17498
|
var pi, Zt;
|
|
17496
|
-
for (g(xe,
|
|
17499
|
+
for (g(xe, Ta, Dt, vt, Ze, gt), Z(Je, Dt, vt, Ze, gt), Jt = 0; Jt < u.SBMAX_s; Jt++) {
|
|
17497
17500
|
if (Zt = Je.thm[Ze].s[Jt][gt], Zt *= ue, It[gt] >= 2 || It[gt + 1] == 1) {
|
|
17498
17501
|
var ur = gt != 0 ? gt - 1 : 2, Ut = Q(
|
|
17499
17502
|
Je.thm[Ze].s[Jt][ur],
|
|
@@ -17520,28 +17523,28 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
17520
17523
|
pi = tn[gt * 3 + 3] + tn[gt * 3 + 4] + tn[gt * 3 + 5], tn[gt * 3 + 5] * 6 < pi && (Zt *= 0.5, tn[gt * 3 + 4] * 6 < pi && (Zt *= 0.5)), Je.thm[Ze].s[Jt][gt] = Zt;
|
|
17521
17524
|
}
|
|
17522
17525
|
}
|
|
17523
|
-
for (Je.nsPsy.lastAttacks[Ze] = It[2], Sn = 0,
|
|
17524
|
-
for (var On = Je.s3ind[
|
|
17525
|
-
mi =
|
|
17526
|
+
for (Je.nsPsy.lastAttacks[Ze] = It[2], Sn = 0, dt = 0; dt < Je.npart_l; dt++) {
|
|
17527
|
+
for (var On = Je.s3ind[dt][0], mi = wt[On] * I[Nn[On]], In = Je.s3_ll[Sn++] * mi; ++On <= Je.s3ind[dt][1]; )
|
|
17528
|
+
mi = wt[On] * I[Nn[On]], In = H(
|
|
17526
17529
|
In,
|
|
17527
17530
|
Je.s3_ll[Sn++] * mi,
|
|
17528
17531
|
On,
|
|
17529
|
-
On -
|
|
17532
|
+
On - dt,
|
|
17530
17533
|
Je
|
|
17531
17534
|
);
|
|
17532
|
-
In *= 0.158489319246111, Je.blocktype_old[Ze & 1] == u.SHORT_TYPE ? vt[
|
|
17533
|
-
Math.min(In, Math.min(E * Je.nb_1[Ze][
|
|
17535
|
+
In *= 0.158489319246111, Je.blocktype_old[Ze & 1] == u.SHORT_TYPE ? vt[dt] = In : vt[dt] = Q(
|
|
17536
|
+
Math.min(In, Math.min(E * Je.nb_1[Ze][dt], x * Je.nb_2[Ze][dt])),
|
|
17534
17537
|
In,
|
|
17535
17538
|
en
|
|
17536
|
-
), Je.nb_2[Ze][
|
|
17539
|
+
), Je.nb_2[Ze][dt] = Je.nb_1[Ze][dt], Je.nb_1[Ze][dt] = In;
|
|
17537
17540
|
}
|
|
17538
|
-
for (;
|
|
17539
|
-
|
|
17540
|
-
h(Je,
|
|
17541
|
+
for (; dt <= u.CBANDS; ++dt)
|
|
17542
|
+
wt[dt] = 0, vt[dt] = 0;
|
|
17543
|
+
h(Je, wt, vt, Ze);
|
|
17541
17544
|
}
|
|
17542
17545
|
for ((xe.mode == q.STEREO || xe.mode == q.JOINT_STEREO) && r(), xe.mode == q.JOINT_STEREO && r(), ve(xe, _t, lt, st), Ze = 0; Ze < Yt; Ze++) {
|
|
17543
|
-
var Er, Dr = 0,
|
|
17544
|
-
Ze > 1 ? r() : (Er = Ue, Dr = 0,
|
|
17546
|
+
var Er, Dr = 0, ka, vi;
|
|
17547
|
+
Ze > 1 ? r() : (Er = Ue, Dr = 0, ka = lt[Ze], vi = qe[Ge][Ze]), ka == u.SHORT_TYPE ? Er[Dr + Ze] = Be(vi, Je.masking_lower) : Er[Dr + Ze] = ze(vi, Je.masking_lower), xe.analysis && (Je.pinfo.pe[Ge][Ze] = Er[Dr + Ze]);
|
|
17545
17548
|
}
|
|
17546
17549
|
return 0;
|
|
17547
17550
|
};
|
|
@@ -17553,7 +17556,7 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
17553
17556
|
return xe < 0 && (xe = 0), xe = xe * 1e-3, 13 * Math.atan(0.76 * xe) + 3.5 * Math.atan(xe * xe / (7.5 * 7.5));
|
|
17554
17557
|
}
|
|
17555
17558
|
function Tt(xe, le, ye, Ge, qe, Le, Ue, We, Xe, lt, Je, Mt) {
|
|
17556
|
-
var mt = s(u.CBANDS + 1),
|
|
17559
|
+
var mt = s(u.CBANDS + 1), wt = We / (Mt > 15 ? 2 * 576 : 2 * 192), Dt = o(u.HBLKSIZE), vt;
|
|
17557
17560
|
We /= Xe;
|
|
17558
17561
|
var st = 0, _t = 0;
|
|
17559
17562
|
for (vt = 0; vt < u.CBANDS; vt++) {
|
|
@@ -17568,11 +17571,11 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
17568
17571
|
}
|
|
17569
17572
|
}
|
|
17570
17573
|
mt[vt] = We * st;
|
|
17571
|
-
for (var
|
|
17574
|
+
for (var dt = 0; dt < Mt; dt++) {
|
|
17572
17575
|
var at, Rt, Sn, Jt, gt;
|
|
17573
|
-
Sn = lt[
|
|
17574
|
-
var Ar =
|
|
17575
|
-
Ue[
|
|
17576
|
+
Sn = lt[dt], Jt = lt[dt + 1], at = 0 | Math.floor(0.5 + Je * (Sn - 0.5)), at < 0 && (at = 0), Rt = 0 | Math.floor(0.5 + Je * (Jt - 0.5)), Rt > Xe / 2 && (Rt = Xe / 2), ye[dt] = (Dt[at] + Dt[Rt]) / 2, le[dt] = Dt[Rt];
|
|
17577
|
+
var Ar = wt * Jt;
|
|
17578
|
+
Ue[dt] = (Ar - mt[le[dt]]) / (mt[le[dt] + 1] - mt[le[dt]]), Ue[dt] < 0 ? Ue[dt] = 0 : Ue[dt] > 1 && (Ue[dt] = 1), gt = Nt(We * lt[dt] * Je), gt = Math.min(gt, 15.5) / 15.5, Le[dt] = Math.pow(
|
|
17576
17579
|
10,
|
|
17577
17580
|
1.25 * (1 - Math.cos(Math.PI * gt)) - 2.5
|
|
17578
17581
|
);
|
|
@@ -17614,7 +17617,7 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
17614
17617
|
);
|
|
17615
17618
|
}
|
|
17616
17619
|
this.psymodel_init = function(xe) {
|
|
17617
|
-
var le = xe.internal_flags, ye, Ge = !0, qe = 13, Le = 24, Ue = 0, We = 0, Xe = -8.25, lt = -4.5, Je = s(u.CBANDS), Mt = s(u.CBANDS), mt = s(u.CBANDS),
|
|
17620
|
+
var le = xe.internal_flags, ye, Ge = !0, qe = 13, Le = 24, Ue = 0, We = 0, Xe = -8.25, lt = -4.5, Je = s(u.CBANDS), Mt = s(u.CBANDS), mt = s(u.CBANDS), wt = xe.out_samplerate;
|
|
17618
17621
|
switch (xe.experimentalZ) {
|
|
17619
17622
|
default:
|
|
17620
17623
|
case 0:
|
|
@@ -17651,7 +17654,7 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
17651
17654
|
Mt,
|
|
17652
17655
|
le.mld_l,
|
|
17653
17656
|
le.PSY.bo_l_weight,
|
|
17654
|
-
|
|
17657
|
+
wt,
|
|
17655
17658
|
u.BLKSIZE,
|
|
17656
17659
|
le.scalefac_band.l,
|
|
17657
17660
|
u.BLKSIZE / (2 * 576),
|
|
@@ -17673,8 +17676,8 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
17673
17676
|
var _t;
|
|
17674
17677
|
_t = me.MAX_VALUE;
|
|
17675
17678
|
for (var Yt = 0; Yt < le.numlines_l[ye]; Yt++, st++) {
|
|
17676
|
-
var Ze =
|
|
17677
|
-
|
|
17679
|
+
var Ze = wt * st / (1e3 * u.BLKSIZE), dt;
|
|
17680
|
+
dt = this.ATHformula(Ze * 1e3, xe) - 20, dt = Math.pow(10, 0.1 * dt), dt *= le.numlines_l[ye], _t > dt && (_t = dt);
|
|
17678
17681
|
}
|
|
17679
17682
|
le.ATH.cb_l[ye] = _t, _t = -20 + Je[ye] * 20 / 10, _t > 6 && (_t = 100), _t < -15 && (_t = -15), _t -= 8, le.minval_l[ye] = Math.pow(10, _t / 10) * le.numlines_l[ye];
|
|
17680
17683
|
}
|
|
@@ -17686,7 +17689,7 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
17686
17689
|
Mt,
|
|
17687
17690
|
le.mld_s,
|
|
17688
17691
|
le.PSY.bo_s_weight,
|
|
17689
|
-
|
|
17692
|
+
wt,
|
|
17690
17693
|
u.BLKSIZE_s,
|
|
17691
17694
|
le.scalefac_band.s,
|
|
17692
17695
|
u.BLKSIZE_s / (2 * 192),
|
|
@@ -17695,8 +17698,8 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
17695
17698
|
var _t, vt = Xe;
|
|
17696
17699
|
Je[ye] >= qe && (vt = lt * (Je[ye] - qe) / (Le - qe) + Xe * (Le - Je[ye]) / (Le - qe)), mt[ye] = Math.pow(10, vt / 10), _t = me.MAX_VALUE;
|
|
17697
17700
|
for (var Yt = 0; Yt < le.numlines_s[ye]; Yt++, st++) {
|
|
17698
|
-
var Ze =
|
|
17699
|
-
|
|
17701
|
+
var Ze = wt * st / (1e3 * u.BLKSIZE_s), dt;
|
|
17702
|
+
dt = this.ATHformula(Ze * 1e3, xe) - 20, dt = Math.pow(10, 0.1 * dt), dt *= le.numlines_s[ye], _t > dt && (_t = dt);
|
|
17700
17703
|
}
|
|
17701
17704
|
le.ATH.cb_s[ye] = _t, _t = -7 + Je[ye] * 7 / 12, Je[ye] > 12 && (_t *= 1 + Math.log(1 + _t) * 3.1), Je[ye] < 12 && (_t *= 1 + Math.log(1 - _t) * 2.3), _t < -15 && (_t = -15), _t -= 8, le.minval_s[ye] = Math.pow(10, _t / 10) * le.numlines_s[ye];
|
|
17702
17705
|
}
|
|
@@ -17707,14 +17710,14 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
17707
17710
|
Mt,
|
|
17708
17711
|
mt,
|
|
17709
17712
|
Ge
|
|
17710
|
-
), se(), w.init_fft(le), le.decay = Math.exp(-1 * U / (re *
|
|
17713
|
+
), se(), w.init_fft(le), le.decay = Math.exp(-1 * U / (re * wt / 192));
|
|
17711
17714
|
{
|
|
17712
17715
|
var at;
|
|
17713
17716
|
at = d, xe.exp_nspsytune & 2 && (at = 1), Math.abs(xe.msfix) > 0 && (at = xe.msfix), xe.msfix = at;
|
|
17714
17717
|
for (var Rt = 0; Rt < le.npart_l; Rt++)
|
|
17715
17718
|
le.s3ind[Rt][1] > le.npart_l - 1 && (le.s3ind[Rt][1] = le.npart_l - 1);
|
|
17716
17719
|
}
|
|
17717
|
-
var Sn = 576 * le.mode_gr /
|
|
17720
|
+
var Sn = 576 * le.mode_gr / wt;
|
|
17718
17721
|
if (le.ATH.decay = Math.pow(10, -12 / 10 * Sn), le.ATH.adjust = 0.01, le.ATH.adjustLimit = 1, xe.ATHtype != -1) {
|
|
17719
17722
|
var Ze, Jt = xe.out_samplerate / u.BLKSIZE, gt = 0;
|
|
17720
17723
|
for (Ze = 0, ye = 0; ye < u.BLKSIZE / 2; ++ye)
|
|
@@ -17731,20 +17734,20 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
17731
17734
|
++st;
|
|
17732
17735
|
}
|
|
17733
17736
|
for (st = 0, ye = 0; ye < le.npart_l; ye++) {
|
|
17734
|
-
var Ze =
|
|
17737
|
+
var Ze = wt * (st + le.numlines_l[ye] / 2) / (1 * u.BLKSIZE);
|
|
17735
17738
|
le.mld_cb_l[ye] = zt(Ze), st += le.numlines_l[ye];
|
|
17736
17739
|
}
|
|
17737
17740
|
for (; ye < u.CBANDS; ++ye)
|
|
17738
17741
|
le.mld_cb_l[ye] = 1;
|
|
17739
17742
|
for (st = 0, ye = 0; ye < le.npart_s; ye++) {
|
|
17740
|
-
var Ze =
|
|
17743
|
+
var Ze = wt * (st + le.numlines_s[ye] / 2) / (1 * u.BLKSIZE_s);
|
|
17741
17744
|
le.mld_cb_s[ye] = zt(Ze), st += le.numlines_s[ye];
|
|
17742
17745
|
}
|
|
17743
17746
|
for (; ye < u.CBANDS; ++ye)
|
|
17744
17747
|
le.mld_cb_s[ye] = 1;
|
|
17745
17748
|
return 0;
|
|
17746
17749
|
};
|
|
17747
|
-
function
|
|
17750
|
+
function yn(xe, le) {
|
|
17748
17751
|
xe < -0.3 && (xe = 3410), xe /= 1e3, xe = Math.max(0.1, xe);
|
|
17749
17752
|
var ye = 3.64 * Math.pow(xe, -0.8) - 6.8 * Math.exp(-0.6 * Math.pow(xe - 3.4, 2)) + 6 * Math.exp(-0.15 * Math.pow(xe - 8.7, 2)) + (0.6 + 0.04 * le) * 1e-3 * Math.pow(xe, 4);
|
|
17750
17753
|
return ye;
|
|
@@ -17753,22 +17756,22 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
17753
17756
|
var ye;
|
|
17754
17757
|
switch (le.ATHtype) {
|
|
17755
17758
|
case 0:
|
|
17756
|
-
ye =
|
|
17759
|
+
ye = yn(xe, 9);
|
|
17757
17760
|
break;
|
|
17758
17761
|
case 1:
|
|
17759
|
-
ye =
|
|
17762
|
+
ye = yn(xe, -1);
|
|
17760
17763
|
break;
|
|
17761
17764
|
case 2:
|
|
17762
|
-
ye =
|
|
17765
|
+
ye = yn(xe, 0);
|
|
17763
17766
|
break;
|
|
17764
17767
|
case 3:
|
|
17765
|
-
ye =
|
|
17768
|
+
ye = yn(xe, 1) + 6;
|
|
17766
17769
|
break;
|
|
17767
17770
|
case 4:
|
|
17768
|
-
ye =
|
|
17771
|
+
ye = yn(xe, le.ATHcurve);
|
|
17769
17772
|
break;
|
|
17770
17773
|
default:
|
|
17771
|
-
ye =
|
|
17774
|
+
ye = yn(xe, 0);
|
|
17772
17775
|
break;
|
|
17773
17776
|
}
|
|
17774
17777
|
return ye;
|
|
@@ -18127,7 +18130,7 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
18127
18130
|
for (it = 0; it < Q; ++it)
|
|
18128
18131
|
zt[1][it] *= h.scale_right;
|
|
18129
18132
|
h.num_channels == 2 && ze.channels_out == 1 && r(), Nt = A(h), Et[0] = ze.mfbuf[0], Et[1] = ze.mfbuf[1];
|
|
18130
|
-
for (var
|
|
18133
|
+
for (var yn = 0; Q > 0; ) {
|
|
18131
18134
|
var xe = [null, null], le = 0, ye = 0;
|
|
18132
18135
|
xe[0] = zt[0], xe[1] = zt[1];
|
|
18133
18136
|
var Ge = new H();
|
|
@@ -18135,7 +18138,7 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
18135
18138
|
h,
|
|
18136
18139
|
Et,
|
|
18137
18140
|
xe,
|
|
18138
|
-
|
|
18141
|
+
yn,
|
|
18139
18142
|
Q,
|
|
18140
18143
|
Ge
|
|
18141
18144
|
), le = Ge.n_in, ye = Ge.n_out, ze.findReplayGain && !ze.decode_on_the_fly && x.AnalyzeSamples(
|
|
@@ -18146,9 +18149,9 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
18146
18149
|
ze.mf_size,
|
|
18147
18150
|
ye,
|
|
18148
18151
|
ze.channels_out
|
|
18149
|
-
) ==
|
|
18152
|
+
) == ae.GAIN_ANALYSIS_ERROR)
|
|
18150
18153
|
return -6;
|
|
18151
|
-
if (Q -= le,
|
|
18154
|
+
if (Q -= le, yn += le, ze.channels_out == 2, ze.mf_size += ye, ze.mf_samples_to_encode < 1 && r(), ze.mf_samples_to_encode += ye, ze.mf_size >= Nt) {
|
|
18152
18155
|
var qe = Oe - et;
|
|
18153
18156
|
if (Oe == 0 && (qe = 0), ot = D(
|
|
18154
18157
|
h,
|
|
@@ -18207,7 +18210,7 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
18207
18210
|
}
|
|
18208
18211
|
function Se(w, U, E) {
|
|
18209
18212
|
w != 1 && r("fix cc: only supports mono");
|
|
18210
|
-
var x = new Re(), _e = new be(), $ = new
|
|
18213
|
+
var x = new Re(), _e = new be(), $ = new ae(), X = new Ke(), Me = new Ee(), re = new p(), ue = new Ce(), _ = new je(), K = new fe(), d = new te(), G = new Ie(), F = new ie(), T = new Ae(), B = new Fe();
|
|
18211
18214
|
x.setModules($, X, Me, re, ue, _, K, d, B), X.setModules($, B, K, _), d.setModules(X, K), Me.setModules(x), ue.setModules(X, G, re, F), re.setModules(F, G, x.enc.psy), G.setModules(X), F.setModules(re), _.setModules(x, X, K), _e.setModules(T, B), T.setModules(K, d, Me);
|
|
18212
18215
|
var O = x.lame_init();
|
|
18213
18216
|
O.num_channels = w, O.in_samplerate = U, O.out_samplerate = U, O.brate = E, O.mode = q.STEREO, O.quality = 3, O.bWriteVbrTag = !1, O.disable_reservoir = !0, O.write_id3tag_automatic = !1, x.lame_init_params(O);
|
|
@@ -18312,11 +18315,11 @@ const Oi = /* @__PURE__ */ ba(yu);
|
|
|
18312
18315
|
draw: function(s) {
|
|
18313
18316
|
var l = this, f = l.set, m = l.ctx, v = f.scale, b = f.width * v, R = f.height * v, M = f.speed / f.fps, N = l._phase -= M, ne = N + M * f.phase, me = s / 100, z = l.genPath(2, me, N), q = l.genPath(1.8, me, ne);
|
|
18314
18317
|
m.clearRect(0, 0, b, R), m.beginPath();
|
|
18315
|
-
for (var fe = 0,
|
|
18316
|
-
|
|
18318
|
+
for (var fe = 0, ie = 0; ie <= b; fe++, ie += v)
|
|
18319
|
+
ie == 0 ? m.moveTo(ie, z[fe]) : m.lineTo(ie, z[fe]);
|
|
18317
18320
|
fe--;
|
|
18318
|
-
for (var
|
|
18319
|
-
m.lineTo(
|
|
18321
|
+
for (var ie = b - 1; ie >= 0; fe--, ie -= v)
|
|
18322
|
+
m.lineTo(ie, q[fe]);
|
|
18320
18323
|
m.closePath(), m.fillStyle = l.linearBg, m.fill(), l.drawPath(q, l.linear2), l.drawPath(z, l.linear1);
|
|
18321
18324
|
},
|
|
18322
18325
|
drawPath: function(s, l) {
|
|
@@ -18358,10 +18361,10 @@ const wu = {
|
|
|
18358
18361
|
sampleRate: 16e3,
|
|
18359
18362
|
bitRate: 16,
|
|
18360
18363
|
//mp3格式,指定采样率hz、比特率kbps,其他参数使用默认配置;注意:是数字的参数必须提供数字,不要用字符串;需要使用的type类型,需提前把格式支持文件加载进来,比如使用wav格式需要提前加载wav.js编码引擎
|
|
18361
|
-
onProcess: (
|
|
18364
|
+
onProcess: (ie, ae, Ee, Ie) => {
|
|
18362
18365
|
m.value = M(Ee), a.value && a.value.input(
|
|
18363
|
-
|
|
18364
|
-
|
|
18366
|
+
ie[ie.length - 1],
|
|
18367
|
+
ae,
|
|
18365
18368
|
Ie
|
|
18366
18369
|
);
|
|
18367
18370
|
}
|
|
@@ -18371,16 +18374,16 @@ const wu = {
|
|
|
18371
18374
|
a.value.input([0], 0, 16e3), N();
|
|
18372
18375
|
})), o.value = !0;
|
|
18373
18376
|
},
|
|
18374
|
-
(
|
|
18375
|
-
alert(
|
|
18377
|
+
(ie, ae) => {
|
|
18378
|
+
alert(ie, ae), console.log((ae ? "UserNotAllow" : "") + "无法录音:" + ie);
|
|
18376
18379
|
}
|
|
18377
18380
|
);
|
|
18378
18381
|
}
|
|
18379
18382
|
Mr(() => {
|
|
18380
18383
|
i.value.close(), i.value = null, b.value = "";
|
|
18381
18384
|
}), R();
|
|
18382
|
-
function M(
|
|
18383
|
-
const
|
|
18385
|
+
function M(ie) {
|
|
18386
|
+
const ae = Math.floor(ie / 1e3), Ee = Math.floor(ae / 60), Ie = ae % 60, je = Ee.toString().padStart(2, "0"), Ke = Ie.toString().padStart(2, "0");
|
|
18384
18387
|
return `${je}:${Ke}`;
|
|
18385
18388
|
}
|
|
18386
18389
|
function N() {
|
|
@@ -18388,18 +18391,18 @@ const wu = {
|
|
|
18388
18391
|
}
|
|
18389
18392
|
function ne() {
|
|
18390
18393
|
i.value.stop(
|
|
18391
|
-
(
|
|
18392
|
-
s.value = !1, l.value = window.URL.createObjectURL(
|
|
18394
|
+
(ie, ae) => {
|
|
18395
|
+
s.value = !1, l.value = window.URL.createObjectURL(ie), m.value = M(ae), f.value = ie, ct.isMobile && me();
|
|
18393
18396
|
},
|
|
18394
|
-
(
|
|
18395
|
-
console.log("录音失败:" +
|
|
18397
|
+
(ie) => {
|
|
18398
|
+
console.log("录音失败:" + ie), s.value = !1, l.value = null, f.value = null, m.value = "00:00";
|
|
18396
18399
|
}
|
|
18397
18400
|
);
|
|
18398
18401
|
}
|
|
18399
18402
|
function me() {
|
|
18400
|
-
const [,
|
|
18403
|
+
const [, ie] = f.value.type.split("/"), ae = (/* @__PURE__ */ new Date()).getTime(), Ee = `${ae}.${ie}`, Ie = new File([f.value], Ee, {
|
|
18401
18404
|
type: f.value.type,
|
|
18402
|
-
lastModified:
|
|
18405
|
+
lastModified: ae
|
|
18403
18406
|
});
|
|
18404
18407
|
r("finish", [Ie]), r("cancel");
|
|
18405
18408
|
}
|
|
@@ -18410,51 +18413,51 @@ const wu = {
|
|
|
18410
18413
|
r("cancel");
|
|
18411
18414
|
}
|
|
18412
18415
|
function fe() {
|
|
18413
|
-
const [,
|
|
18416
|
+
const [, ie] = f.value.type.split("/"), ae = (/* @__PURE__ */ new Date()).getTime(), Ee = `${ae}.${ie}`, Ie = new File([f.value], Ee, {
|
|
18414
18417
|
type: f.value.type,
|
|
18415
|
-
lastModified:
|
|
18418
|
+
lastModified: ae
|
|
18416
18419
|
});
|
|
18417
18420
|
_u(Ie, (je) => {
|
|
18418
18421
|
b.value = je;
|
|
18419
18422
|
});
|
|
18420
18423
|
}
|
|
18421
|
-
return (
|
|
18424
|
+
return (ie, ae) => (rt(), ft("div", {
|
|
18422
18425
|
class: "wrap",
|
|
18423
18426
|
style: an({
|
|
18424
18427
|
width: v.value
|
|
18425
18428
|
})
|
|
18426
18429
|
}, [
|
|
18427
|
-
$e(ct).isMobile ? (rt(),
|
|
18428
|
-
s.value ? (rt(),
|
|
18430
|
+
$e(ct).isMobile ? (rt(), ft("div", wu, [
|
|
18431
|
+
s.value ? (rt(), ft("a", {
|
|
18429
18432
|
key: 1,
|
|
18430
18433
|
onClick: ne,
|
|
18431
18434
|
title: "停止录制",
|
|
18432
18435
|
class: "oper"
|
|
18433
18436
|
}, [
|
|
18434
|
-
|
|
18437
|
+
xt($e(Ot), {
|
|
18435
18438
|
src: $e(kt).stop,
|
|
18436
18439
|
width: 24,
|
|
18437
18440
|
height: 24
|
|
18438
18441
|
}, null, 8, ["src"])
|
|
18439
|
-
])) : (rt(),
|
|
18442
|
+
])) : (rt(), ft("a", {
|
|
18440
18443
|
key: 0,
|
|
18441
18444
|
onClick: N,
|
|
18442
18445
|
title: "开始录制",
|
|
18443
18446
|
class: "oper"
|
|
18444
18447
|
}, [
|
|
18445
|
-
|
|
18448
|
+
xt($e(Ot), {
|
|
18446
18449
|
src: $e(kt).record,
|
|
18447
18450
|
width: 24,
|
|
18448
18451
|
height: 24
|
|
18449
18452
|
}, null, 8, ["src"])
|
|
18450
18453
|
])),
|
|
18451
|
-
|
|
18452
|
-
])) : (rt(),
|
|
18454
|
+
ae[0] || (ae[0] = Qe("div", { class: "recwave" }, null, -1))
|
|
18455
|
+
])) : (rt(), ft("div", xu, [
|
|
18453
18456
|
Qe("div", Su, [
|
|
18454
|
-
|
|
18457
|
+
ae[1] || (ae[1] = Qe("div", { class: "recwave" }, null, -1)),
|
|
18455
18458
|
Qe("div", Cu, zn(m.value), 1)
|
|
18456
18459
|
]),
|
|
18457
|
-
l.value && !$e(ct).isMobile ? (rt(),
|
|
18460
|
+
l.value && !$e(ct).isMobile ? (rt(), ft("div", Tu, [
|
|
18458
18461
|
Qe("audio", {
|
|
18459
18462
|
src: l.value,
|
|
18460
18463
|
controls: "",
|
|
@@ -18462,26 +18465,26 @@ const wu = {
|
|
|
18462
18465
|
}, null, 8, Mu),
|
|
18463
18466
|
Qe("a", { onClick: fe }, "转文本")
|
|
18464
18467
|
])) : At("", !0),
|
|
18465
|
-
b.value ? (rt(),
|
|
18468
|
+
b.value ? (rt(), ft("div", ku, zn(b.value), 1)) : At("", !0),
|
|
18466
18469
|
Qe("div", Ru, [
|
|
18467
|
-
s.value ? (rt(),
|
|
18470
|
+
s.value ? (rt(), ft("a", {
|
|
18468
18471
|
key: 1,
|
|
18469
18472
|
onClick: ne,
|
|
18470
18473
|
title: "停止录制",
|
|
18471
18474
|
class: "oper"
|
|
18472
18475
|
}, [
|
|
18473
|
-
|
|
18476
|
+
xt($e(Ot), {
|
|
18474
18477
|
src: $e(kt).stop,
|
|
18475
18478
|
width: 24,
|
|
18476
18479
|
height: 24
|
|
18477
18480
|
}, null, 8, ["src"])
|
|
18478
|
-
])) : (rt(),
|
|
18481
|
+
])) : (rt(), ft("a", {
|
|
18479
18482
|
key: 0,
|
|
18480
18483
|
onClick: N,
|
|
18481
18484
|
title: "开始录制",
|
|
18482
18485
|
class: "oper"
|
|
18483
18486
|
}, [
|
|
18484
|
-
|
|
18487
|
+
xt($e(Ot), {
|
|
18485
18488
|
src: $e(kt).record,
|
|
18486
18489
|
width: 24,
|
|
18487
18490
|
height: 24
|
|
@@ -18495,7 +18498,7 @@ const wu = {
|
|
|
18495
18498
|
disabled: !f.value
|
|
18496
18499
|
})
|
|
18497
18500
|
}, " 插入音频 ", 2),
|
|
18498
|
-
b.value ? (rt(),
|
|
18501
|
+
b.value ? (rt(), ft("a", {
|
|
18499
18502
|
key: 2,
|
|
18500
18503
|
onClick: z,
|
|
18501
18504
|
class: qt({
|
|
@@ -19437,10 +19440,10 @@ var Us = { exports: {} };
|
|
|
19437
19440
|
return Y.kind === (p || "audio");
|
|
19438
19441
|
});
|
|
19439
19442
|
}
|
|
19440
|
-
function
|
|
19443
|
+
function ie(P, p) {
|
|
19441
19444
|
"srcObject" in p ? p.srcObject = P : "mozSrcObject" in p ? p.mozSrcObject = P : p.srcObject = P;
|
|
19442
19445
|
}
|
|
19443
|
-
function
|
|
19446
|
+
function ae(P, p) {
|
|
19444
19447
|
if (typeof EBML > "u")
|
|
19445
19448
|
throw new Error("Please link: https://www.webrtc-experiment.com/EBML.js");
|
|
19446
19449
|
var Y = new EBML.Reader(), he = new EBML.Decoder(), j = EBML.tools, Ce = new FileReader();
|
|
@@ -19455,7 +19458,7 @@ var Us = { exports: {} };
|
|
|
19455
19458
|
p(ee);
|
|
19456
19459
|
}, Ce.readAsArrayBuffer(P);
|
|
19457
19460
|
}
|
|
19458
|
-
typeof e < "u" && (e.invokeSaveAsDialog = z, e.getTracks = fe, e.getSeekableBlob =
|
|
19461
|
+
typeof e < "u" && (e.invokeSaveAsDialog = z, e.getTracks = fe, e.getSeekableBlob = ae, e.bytesToSize = me, e.isElectron = q);
|
|
19459
19462
|
/**
|
|
19460
19463
|
* Storage is a standalone object used by {@link RecordRTC} to store reusable objects e.g. "new AudioContext".
|
|
19461
19464
|
* @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT}
|
|
@@ -19990,7 +19993,7 @@ var Us = { exports: {} };
|
|
|
19990
19993
|
}), p.canvas || (p.canvas = {
|
|
19991
19994
|
width: p.width,
|
|
19992
19995
|
height: p.height
|
|
19993
|
-
}), u.width = p.canvas.width || 320, u.height = p.canvas.height || 240, W = u.getContext("2d"), p.video && p.video instanceof HTMLVideoElement ? (ee = p.video.cloneNode(), p.initCallback && p.initCallback()) : (ee = document.createElement("video"),
|
|
19996
|
+
}), u.width = p.canvas.width || 320, u.height = p.canvas.height || 240, W = u.getContext("2d"), p.video && p.video instanceof HTMLVideoElement ? (ee = p.video.cloneNode(), p.initCallback && p.initCallback()) : (ee = document.createElement("video"), ie(P, ee), ee.onloadedmetadata = function() {
|
|
19994
19997
|
p.initCallback && p.initCallback();
|
|
19995
19998
|
}, ee.width = p.video.width, ee.height = p.video.height), ee.muted = !0, ee.play(), de = (/* @__PURE__ */ new Date()).getTime(), ce = new pt.Video(), p.disableLogs || (console.log("canvas resolutions", u.width, "*", u.height), console.log("video width/height", ee.width || u.width, "*", ee.height || u.height)), Y(p.frameInterval);
|
|
19996
19999
|
};
|
|
@@ -20579,7 +20582,7 @@ var Us = { exports: {} };
|
|
|
20579
20582
|
var W = document.createElement("video");
|
|
20580
20583
|
W.muted = !0, W.autoplay = !0, W.playsInline = !0, u = !1, W.onloadedmetadata = function() {
|
|
20581
20584
|
u = !0;
|
|
20582
|
-
},
|
|
20585
|
+
}, ie(P, W), W.play();
|
|
20583
20586
|
}
|
|
20584
20587
|
var ee = null, de, ce, we = this;
|
|
20585
20588
|
}
|
|
@@ -21112,7 +21115,7 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21112
21115
|
function ne() {
|
|
21113
21116
|
r("cancel");
|
|
21114
21117
|
}
|
|
21115
|
-
return (me, z) => (rt(),
|
|
21118
|
+
return (me, z) => (rt(), ft("div", {
|
|
21116
21119
|
class: "wrap",
|
|
21117
21120
|
style: an({
|
|
21118
21121
|
width: l.value
|
|
@@ -21128,24 +21131,24 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21128
21131
|
class: "video-item"
|
|
21129
21132
|
}, null, 512),
|
|
21130
21133
|
Qe("div", Lu, [
|
|
21131
|
-
o.value ? (rt(),
|
|
21134
|
+
o.value ? (rt(), ft("a", {
|
|
21132
21135
|
key: 1,
|
|
21133
21136
|
onClick: b,
|
|
21134
21137
|
title: "停止录制",
|
|
21135
21138
|
class: "oper"
|
|
21136
21139
|
}, [
|
|
21137
|
-
|
|
21140
|
+
xt($e(Ot), {
|
|
21138
21141
|
src: $e(kt).stop,
|
|
21139
21142
|
width: 24,
|
|
21140
21143
|
height: 24
|
|
21141
21144
|
}, null, 8, ["src"])
|
|
21142
|
-
])) : (rt(),
|
|
21145
|
+
])) : (rt(), ft("a", {
|
|
21143
21146
|
key: 0,
|
|
21144
21147
|
onClick: v,
|
|
21145
21148
|
title: "开始录制",
|
|
21146
21149
|
class: "oper"
|
|
21147
21150
|
}, [
|
|
21148
|
-
|
|
21151
|
+
xt($e(Ot), {
|
|
21149
21152
|
src: $e(kt).record,
|
|
21150
21153
|
width: 24,
|
|
21151
21154
|
height: 24
|
|
@@ -21208,7 +21211,7 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21208
21211
|
function R() {
|
|
21209
21212
|
r("cancel");
|
|
21210
21213
|
}
|
|
21211
|
-
return f(), (M, N) => (rt(),
|
|
21214
|
+
return f(), (M, N) => (rt(), ft("div", {
|
|
21212
21215
|
class: "wrap",
|
|
21213
21216
|
style: an({
|
|
21214
21217
|
width: o.value
|
|
@@ -21226,7 +21229,7 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21226
21229
|
class: "video-item"
|
|
21227
21230
|
}, null, 512),
|
|
21228
21231
|
Qe("div", zu, [
|
|
21229
|
-
i.value ? (rt(),
|
|
21232
|
+
i.value ? (rt(), ft("img", {
|
|
21230
21233
|
key: 0,
|
|
21231
21234
|
src: i.value
|
|
21232
21235
|
}, null, 8, Pu)) : At("", !0)
|
|
@@ -21245,7 +21248,7 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21245
21248
|
title: "拍照",
|
|
21246
21249
|
class: "oper"
|
|
21247
21250
|
}, [
|
|
21248
|
-
|
|
21251
|
+
xt($e(Ot), {
|
|
21249
21252
|
src: $e(kt).photo,
|
|
21250
21253
|
width: 24,
|
|
21251
21254
|
height: 24
|
|
@@ -21290,7 +21293,7 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21290
21293
|
}, ef = { style: { display: "none" } }, tf = {
|
|
21291
21294
|
key: 5,
|
|
21292
21295
|
class: "record-tree-lock"
|
|
21293
|
-
},
|
|
21296
|
+
}, yo = "KEY_PENDING_NODES", nf = "tree_title", gf = {
|
|
21294
21297
|
__name: "record-tree",
|
|
21295
21298
|
props: {
|
|
21296
21299
|
note: {
|
|
@@ -21327,7 +21330,7 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21327
21330
|
},
|
|
21328
21331
|
mobile: {
|
|
21329
21332
|
type: Boolean,
|
|
21330
|
-
default:
|
|
21333
|
+
default: na() === "mobile"
|
|
21331
21334
|
},
|
|
21332
21335
|
height: {
|
|
21333
21336
|
type: String,
|
|
@@ -21357,32 +21360,32 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21357
21360
|
const r = n, i = t;
|
|
21358
21361
|
e({ focusTitle: pt, focusContent: oe });
|
|
21359
21362
|
const a = ut([{ text: "", uuid: hn() }]), o = ut(null), s = ut(!1), l = ut(!1), f = ut(!1), m = ut(!1), v = ut(!1), b = ut(r.initialLock), R = ut(!1), M = ut({}), N = ut(null), ne = ut(null), me = ut(null), z = ut(null), q = ut(null);
|
|
21360
|
-
let fe = null,
|
|
21361
|
-
const
|
|
21362
|
-
|
|
21363
|
+
let fe = null, ie = null;
|
|
21364
|
+
const ae = Pn(() => !!jr(r.note).rel), Ee = Pn(() => v.value ? !0 : m.value || r.note.created_at);
|
|
21365
|
+
mn(
|
|
21363
21366
|
() => r.clipboard,
|
|
21364
21367
|
(E) => {
|
|
21365
21368
|
pr(r.note.title) && E ? v.value = !0 : v.value = !1;
|
|
21366
21369
|
}
|
|
21367
|
-
),
|
|
21370
|
+
), mn(v, (E) => {
|
|
21368
21371
|
E && document.activeElement && document.activeElement.blur();
|
|
21369
|
-
}),
|
|
21372
|
+
}), mn(
|
|
21370
21373
|
() => r.note.created_at,
|
|
21371
21374
|
(E, x) => {
|
|
21372
21375
|
E !== x && (b.value = r.initialLock), ct.noteCreatedAt = E;
|
|
21373
21376
|
},
|
|
21374
21377
|
{ immediate: !0 }
|
|
21375
|
-
),
|
|
21378
|
+
), mn(
|
|
21376
21379
|
() => r.note,
|
|
21377
21380
|
(E, x) => {
|
|
21378
21381
|
clearTimeout(fe), fe = setTimeout(() => {
|
|
21379
|
-
if (E.content ===
|
|
21382
|
+
if (E.content === ie && o.value === E.created_at) {
|
|
21380
21383
|
fe = null;
|
|
21381
21384
|
return;
|
|
21382
21385
|
}
|
|
21383
21386
|
if (!o.value || o.value !== E.created_at || E.content !== (x == null ? void 0 : x.content)) {
|
|
21384
21387
|
try {
|
|
21385
|
-
if (o.value = E.created_at, a.value = je(E.content),
|
|
21388
|
+
if (o.value = E.created_at, a.value = je(E.content), ie = E.content, a.value.filter((X) => !X.pending).length || a.value.push({
|
|
21386
21389
|
text: "",
|
|
21387
21390
|
uuid: hn()
|
|
21388
21391
|
}), r.readOnly)
|
|
@@ -21396,7 +21399,7 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21396
21399
|
}, 300);
|
|
21397
21400
|
},
|
|
21398
21401
|
{ immediate: !0 }
|
|
21399
|
-
), Ie(),
|
|
21402
|
+
), Ie(), ta(() => {
|
|
21400
21403
|
fe && (clearTimeout(fe), fe = null), W();
|
|
21401
21404
|
});
|
|
21402
21405
|
function Ie() {
|
|
@@ -21428,7 +21431,7 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21428
21431
|
}
|
|
21429
21432
|
}
|
|
21430
21433
|
function Ke(E) {
|
|
21431
|
-
"content" in r.note && (r.note.content != E.content || r.note.title != E.title) && (clearTimeout(fe),
|
|
21434
|
+
"content" in r.note && (r.note.content != E.content || r.note.title != E.title) && (clearTimeout(fe), ie = E.content, Te(), i("change", {
|
|
21432
21435
|
type: "tree",
|
|
21433
21436
|
data: {
|
|
21434
21437
|
...E,
|
|
@@ -21553,7 +21556,7 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21553
21556
|
x && !x.contains(E.target) && W();
|
|
21554
21557
|
}
|
|
21555
21558
|
function de(E) {
|
|
21556
|
-
ct.isMobile || r.readOnly ||
|
|
21559
|
+
ct.isMobile || r.readOnly || ae.value || (E.preventDefault(), E.stopPropagation(), W(), M.value = {
|
|
21557
21560
|
left: `${E.clientX}px`,
|
|
21558
21561
|
top: `${E.clientY}px`
|
|
21559
21562
|
}, R.value = !0, Qt(() => {
|
|
@@ -21641,13 +21644,13 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21641
21644
|
function te(E, x) {
|
|
21642
21645
|
if (!E)
|
|
21643
21646
|
return;
|
|
21644
|
-
const _e = `${
|
|
21647
|
+
const _e = `${yo}_${E}`, $ = JSON.parse(window.localStorage.getItem(_e) || "[]");
|
|
21645
21648
|
$.push(x), window.localStorage.setItem(_e, JSON.stringify($));
|
|
21646
21649
|
}
|
|
21647
21650
|
function Se(E) {
|
|
21648
21651
|
if (!E)
|
|
21649
21652
|
return;
|
|
21650
|
-
const x = `${
|
|
21653
|
+
const x = `${yo}_${E}`, _e = window.localStorage.getItem(x);
|
|
21651
21654
|
_e && Qt(() => {
|
|
21652
21655
|
const $ = JSON.parse(_e);
|
|
21653
21656
|
window.localStorage.removeItem(x), $.forEach((X) => {
|
|
@@ -21661,26 +21664,26 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21661
21664
|
function U() {
|
|
21662
21665
|
v.value = !1, pt();
|
|
21663
21666
|
}
|
|
21664
|
-
return (E, x) => (rt(),
|
|
21667
|
+
return (E, x) => (rt(), ft("div", {
|
|
21665
21668
|
class: qt({
|
|
21666
21669
|
"record-tree-container": !0,
|
|
21667
21670
|
"record-tree-mobile": $e(ct).isMobile
|
|
21668
21671
|
})
|
|
21669
21672
|
}, [
|
|
21670
|
-
v.value ? (rt(),
|
|
21673
|
+
v.value ? (rt(), ft("div", Uu, [
|
|
21671
21674
|
Qe("div", Wu, [
|
|
21672
21675
|
x[9] || (x[9] = Qe("p", null, "来源剪切板", -1)),
|
|
21673
21676
|
Qe("div", null, zn(r.clipboard), 1)
|
|
21674
21677
|
]),
|
|
21675
21678
|
Qe("div", qu, [
|
|
21676
|
-
|
|
21679
|
+
xt($e(Ot), {
|
|
21677
21680
|
src: $e(kt).close,
|
|
21678
21681
|
width: 20,
|
|
21679
21682
|
height: 20,
|
|
21680
21683
|
style: { "margin-right": "20px" },
|
|
21681
21684
|
onClick: U
|
|
21682
21685
|
}, null, 8, ["src"]),
|
|
21683
|
-
|
|
21686
|
+
xt($e(Ot), {
|
|
21684
21687
|
src: $e(kt).confirm,
|
|
21685
21688
|
width: 26,
|
|
21686
21689
|
height: 26,
|
|
@@ -21700,17 +21703,17 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21700
21703
|
),
|
|
21701
21704
|
onMouseenter: Ne
|
|
21702
21705
|
}, [
|
|
21703
|
-
n.showTitle ? (rt(),
|
|
21706
|
+
n.showTitle ? (rt(), ft("div", {
|
|
21704
21707
|
key: 0,
|
|
21705
21708
|
class: "top-bar",
|
|
21706
21709
|
onContextmenu: de
|
|
21707
21710
|
}, [
|
|
21708
21711
|
Qe("div", $u, [
|
|
21709
|
-
|
|
21712
|
+
xt($e(ru), {
|
|
21710
21713
|
ref_key: "titleEditor",
|
|
21711
21714
|
ref: ne,
|
|
21712
21715
|
tags: n.tags,
|
|
21713
|
-
readOnly: n.readOnly || b.value ||
|
|
21716
|
+
readOnly: n.readOnly || b.value || ae.value,
|
|
21714
21717
|
enableDbEnter: n.enableDbEnter,
|
|
21715
21718
|
note: n.note,
|
|
21716
21719
|
onFocusContent: oe,
|
|
@@ -21719,18 +21722,18 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21719
21722
|
onDbEnter: Ye
|
|
21720
21723
|
}, null, 8, ["tags", "readOnly", "enableDbEnter", "note"])
|
|
21721
21724
|
]),
|
|
21722
|
-
|
|
21723
|
-
|
|
21725
|
+
ae.value ? (rt(), ft("div", Gu, [
|
|
21726
|
+
xt($e(Ot), {
|
|
21724
21727
|
src: $e(kt).relate,
|
|
21725
21728
|
width: 20,
|
|
21726
21729
|
height: 20
|
|
21727
21730
|
}, null, 8, ["src"])
|
|
21728
|
-
])) : n.readOnly ? At("", !0) : (rt(),
|
|
21731
|
+
])) : n.readOnly ? At("", !0) : (rt(), ft("div", {
|
|
21729
21732
|
key: 1,
|
|
21730
21733
|
class: "top-bar-right",
|
|
21731
21734
|
onClick: u
|
|
21732
21735
|
}, [
|
|
21733
|
-
|
|
21736
|
+
xt($e(Ot), {
|
|
21734
21737
|
src: b.value ? $e(kt).lock : $e(kt).unlock,
|
|
21735
21738
|
width: 20,
|
|
21736
21739
|
height: 20,
|
|
@@ -21743,7 +21746,7 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21743
21746
|
onContextmenu: de
|
|
21744
21747
|
}, [
|
|
21745
21748
|
Qe("div", ju, [
|
|
21746
|
-
|
|
21749
|
+
xt(eu, {
|
|
21747
21750
|
ref_key: "tree",
|
|
21748
21751
|
ref: N,
|
|
21749
21752
|
nodes: a.value,
|
|
@@ -21758,7 +21761,7 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21758
21761
|
])
|
|
21759
21762
|
], 32)
|
|
21760
21763
|
], 38),
|
|
21761
|
-
n.bar && !n.readOnly ? (rt(),
|
|
21764
|
+
n.bar && !n.readOnly ? (rt(), ft("div", Ku, [
|
|
21762
21765
|
Qe("div", Xu, [
|
|
21763
21766
|
Qe("div", Ju, [
|
|
21764
21767
|
Qe("div", {
|
|
@@ -21766,7 +21769,7 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21766
21769
|
onClick: p,
|
|
21767
21770
|
title: "左缩进"
|
|
21768
21771
|
}, [
|
|
21769
|
-
|
|
21772
|
+
xt($e(Ot), {
|
|
21770
21773
|
src: $e(kt).left,
|
|
21771
21774
|
width: 20,
|
|
21772
21775
|
height: 20
|
|
@@ -21777,7 +21780,7 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21777
21780
|
onClick: Y,
|
|
21778
21781
|
title: "右缩进"
|
|
21779
21782
|
}, [
|
|
21780
|
-
|
|
21783
|
+
xt($e(Ot), {
|
|
21781
21784
|
src: $e(kt).right,
|
|
21782
21785
|
width: 20,
|
|
21783
21786
|
height: 20
|
|
@@ -21788,7 +21791,7 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21788
21791
|
onClick: he,
|
|
21789
21792
|
title: "上移"
|
|
21790
21793
|
}, [
|
|
21791
|
-
|
|
21794
|
+
xt($e(Ot), {
|
|
21792
21795
|
src: $e(kt).up,
|
|
21793
21796
|
width: 20,
|
|
21794
21797
|
height: 20
|
|
@@ -21799,7 +21802,7 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21799
21802
|
onClick: j,
|
|
21800
21803
|
title: "移动"
|
|
21801
21804
|
}, [
|
|
21802
|
-
|
|
21805
|
+
xt($e(Ot), {
|
|
21803
21806
|
src: $e(kt).down,
|
|
21804
21807
|
width: 20,
|
|
21805
21808
|
height: 20
|
|
@@ -21817,20 +21820,20 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21817
21820
|
onClick: C,
|
|
21818
21821
|
title: "加粗"
|
|
21819
21822
|
}, [
|
|
21820
|
-
|
|
21823
|
+
xt($e(Ot), {
|
|
21821
21824
|
src: $e(kt).bold,
|
|
21822
21825
|
width: 20,
|
|
21823
21826
|
height: 20
|
|
21824
21827
|
}, null, 8, ["src"])
|
|
21825
21828
|
]),
|
|
21826
|
-
$e(ct).isMobile ? At("", !0) : (rt(),
|
|
21827
|
-
|
|
21829
|
+
$e(ct).isMobile ? At("", !0) : (rt(), ft("div", Zu, [
|
|
21830
|
+
xt($e(So), {
|
|
21828
21831
|
placement: "top",
|
|
21829
21832
|
hover: !0,
|
|
21830
21833
|
arrow: !0
|
|
21831
21834
|
}, xo({
|
|
21832
21835
|
default: Gr(() => [
|
|
21833
|
-
|
|
21836
|
+
xt($e(Ot), {
|
|
21834
21837
|
src: $e(kt).color,
|
|
21835
21838
|
width: 20,
|
|
21836
21839
|
height: 20
|
|
@@ -21841,7 +21844,7 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21841
21844
|
b.value ? void 0 : {
|
|
21842
21845
|
name: "content",
|
|
21843
21846
|
fn: Gr(() => [
|
|
21844
|
-
|
|
21847
|
+
xt($e(N0), { onChange: y })
|
|
21845
21848
|
]),
|
|
21846
21849
|
key: "0"
|
|
21847
21850
|
}
|
|
@@ -21852,7 +21855,7 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21852
21855
|
onClick: ge,
|
|
21853
21856
|
title: "添加附件"
|
|
21854
21857
|
}, [
|
|
21855
|
-
|
|
21858
|
+
xt($e(Ot), {
|
|
21856
21859
|
src: $e(kt).attach,
|
|
21857
21860
|
width: 20,
|
|
21858
21861
|
height: 20
|
|
@@ -21863,7 +21866,7 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21863
21866
|
onClick: Re,
|
|
21864
21867
|
title: "录制音频"
|
|
21865
21868
|
}, [
|
|
21866
|
-
|
|
21869
|
+
xt($e(Ot), {
|
|
21867
21870
|
src: $e(kt).audio,
|
|
21868
21871
|
width: 20,
|
|
21869
21872
|
height: 20
|
|
@@ -21874,7 +21877,7 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21874
21877
|
onClick: ke,
|
|
21875
21878
|
title: "录制视频"
|
|
21876
21879
|
}, [
|
|
21877
|
-
|
|
21880
|
+
xt($e(Ot), {
|
|
21878
21881
|
src: $e(kt).video,
|
|
21879
21882
|
width: 20,
|
|
21880
21883
|
height: 20
|
|
@@ -21885,7 +21888,7 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21885
21888
|
onClick: be,
|
|
21886
21889
|
title: "拍照"
|
|
21887
21890
|
}, [
|
|
21888
|
-
|
|
21891
|
+
xt($e(Ot), {
|
|
21889
21892
|
src: $e(kt).photo,
|
|
21890
21893
|
width: 20,
|
|
21891
21894
|
height: 20
|
|
@@ -21893,7 +21896,7 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21893
21896
|
])
|
|
21894
21897
|
], 2)
|
|
21895
21898
|
]),
|
|
21896
|
-
$e(ct).isMobile ? (rt(),
|
|
21899
|
+
$e(ct).isMobile ? (rt(), ft("div", Qu, [
|
|
21897
21900
|
Qe("div", {
|
|
21898
21901
|
class: "record-tree-option-item",
|
|
21899
21902
|
onClick: Ht(we, ["stop"])
|
|
@@ -21924,28 +21927,28 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21924
21927
|
}, null, 544)
|
|
21925
21928
|
])
|
|
21926
21929
|
])) : At("", !0),
|
|
21927
|
-
s.value ? (rt(),
|
|
21930
|
+
s.value ? (rt(), ln($e(Eu), {
|
|
21928
21931
|
key: 2,
|
|
21929
21932
|
isMobile: $e(ct).isMobile,
|
|
21930
21933
|
responsive: n.responsive,
|
|
21931
21934
|
onFinish: Ae,
|
|
21932
21935
|
onCancel: x[4] || (x[4] = (_e) => s.value = !1)
|
|
21933
21936
|
}, null, 8, ["isMobile", "responsive"])) : At("", !0),
|
|
21934
|
-
l.value ? (rt(),
|
|
21937
|
+
l.value ? (rt(), ln($e(Ou), {
|
|
21935
21938
|
key: 3,
|
|
21936
21939
|
responsive: n.responsive,
|
|
21937
21940
|
onFinish: Fe,
|
|
21938
21941
|
onCancel: x[5] || (x[5] = (_e) => l.value = !1)
|
|
21939
21942
|
}, null, 8, ["responsive"])) : At("", !0),
|
|
21940
|
-
f.value ? (rt(),
|
|
21943
|
+
f.value ? (rt(), ln($e(Yu), {
|
|
21941
21944
|
key: 4,
|
|
21942
21945
|
responsive: n.responsive,
|
|
21943
21946
|
onFinish: Fe,
|
|
21944
21947
|
onCancel: x[6] || (x[6] = (_e) => f.value = !1)
|
|
21945
21948
|
}, null, 8, ["responsive"])) : At("", !0),
|
|
21946
|
-
b.value && !
|
|
21947
|
-
(rt(),
|
|
21948
|
-
R.value && !n.readOnly && !
|
|
21949
|
+
b.value && !ae.value ? (rt(), ft("div", tf)) : At("", !0),
|
|
21950
|
+
(rt(), ln(Gs, { to: "body" }, [
|
|
21951
|
+
R.value && !n.readOnly && !ae.value && !$e(ct).isMobile ? (rt(), ft("div", {
|
|
21949
21952
|
key: 0,
|
|
21950
21953
|
class: "record-tree-context-menu",
|
|
21951
21954
|
style: an(M.value),
|
|
@@ -21958,7 +21961,7 @@ const Bu = { class: "record-video" }, Lu = { class: "buttons" }, Nu = {
|
|
|
21958
21961
|
class: "context-menu-item",
|
|
21959
21962
|
onClick: ce
|
|
21960
21963
|
}, [
|
|
21961
|
-
|
|
21964
|
+
xt($e(Ot), {
|
|
21962
21965
|
src: b.value ? $e(kt).unlock : $e(kt).lock,
|
|
21963
21966
|
width: 16,
|
|
21964
21967
|
height: 16,
|