PageSourceSearch

https://go.chatway.app/assets/vendor-prosemirror-extra-Bknp-F1W.js

js chatway.app collected 2026-10-02 02:30:52 UTC 10,833 bytes, 2 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`release-202609300849`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`269dcc09-8b05-4ef8-8fe8-6d42ab3f46f5`,e._sentryDebugIdIdentifier=`sentry-dbid-269dcc09-8b05-4ef8-8fe8-6d42ab3f46f5`)}catch{}})();import{B as e,G as t,M as n,V as r,j as i}from"./vendor-tiptap-BYc2tCfl.js";import{d as a}from"./vendor-prosemirror-core-BRjRA0uN.js";function o(){var e=arguments[0];typeof e==`string`&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&typeof n==`object`&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i==`string`?e.setAttribute(r,i):i!=null&&(e[r]=i)}t++}for(;t<arguments.length;t++)s(e,arguments[t]);return e}function s(e,t){if(typeof t==`string`)e.appendChild(document.createTextNode(t));else if(t!=null)if(t.nodeType!=null)e.appendChild(t);else if(Array.isArray(t))for(var n=0;n<t.length;n++)s(e,t[n]);else throw RangeError(`Unsupported child node: `+t)}var c=`http://www.w3.org/2000/svg`,l=`http://www.w3.org/1999/xlink`,u=`ProseMirror-icon`;function d(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return t}function f(e,t){let n=(e.nodeType==9?e:e.ownerDocument)||document,r=n.createElement(`div`);if(r.className=u,t.path){let{path:i,width:a,height:o}=t,s=`pm-icon-`+d(i).toString(16);n.getElementById(s)||p(e,s,t);let u=r.appendChild(n.createElementNS(c,`svg`));u.style.width=a/o+`em`,u.appendChild(n.createElementNS(c,`use`)).setAttributeNS(l,`href`,/([^#]*)/.exec(n.location.toString())[1]+`#`+s)}else if(t.dom)r.appendChild(t.dom.cloneNode(!0));else{let{text:e,css:i}=t;r.appendChild(n.createElement(`span`)).textContent=e||``,i&&(r.firstChild.style.cssText=i)}return r}function p(e,t,n){let[r,i]=e.nodeType==9?[e,e.body]:[e.ownerDocument||document,e],a=r.getElementById(u+`-collection`);a||(a=r.createElementNS(c,`svg`),a.id=u+`-collection`,a.style.display=`none`,i.insertBefore(a,i.firstChild));let o=r.createElementNS(c,`symbol`);o.id=t,o.setAttribute(`viewBox`,`0 0 `+n.width+` `+n.height),o.appendChild(r.createElementNS(c,`path`)).setAttribute(`d`,n.path),a.appendChild(o)}var m=`ProseMirror-menu`,h=class{constructor(e){this.spec=e}render(e){let t=this.spec,n=t.render?t.render(e):t.icon?f(e.root,t.icon):t.label?o(`div`,null,g(e,t.label)):null;if(!n)throw RangeError(`MenuItem without icon or label property`);if(t.title){let r=typeof t.title==`function`?t.title(e.state):t.title;n.setAttribute(`title`,g(e,r))}t.class&&n.classList.add(t.class),t.css&&(n.style.cssText+=t.css),n.addEventListener(`mousedown`,r=>{r.preventDefault(),n.classList.contains(m+`-disabled`)||t.run(e.state,e.dispatch,e,r)});function r(e){if(t.select){let r=t.select(e);if(n.style.display=r?``:`none`,!r)return!1}let r=!0;if(t.enable&&(r=t.enable(e)||!1,x(n,m+`-disabled`,!r)),t.active){let i=r&&t.active(e)||!1;x(n,m+`-active`,i)}return!0}return{dom:n,update:r}}};function g(e,t){return e._props.translate?e._props.translate(t):t}function _(e,t){return n=>{let r=!1;for(let i=0;i<e.length;i++){let a=e[i](n);t[i].style.display=a?``:`none`,a&&(r=!0)}return r}}function v(e,t){let n=document.createDocumentFragment(),r=[],i=[];for(let a=0;a<t.length;a++){let s=t[a],c=[],l=[];for(let t=0;t<s.length;t++){let{dom:r,update:i}=s[t].render(e),a=o(`span`,{class:m+`item`},r);n.appendChild(a),l.push(a),c.push(i)}c.length&&(r.push(_(c,l)),a<t.length-1&&i.push(n.appendChild(y())))}function a(e){let t=!1,n=!1;for(let a=0;a<r.length;a++){let o=r[a](e);a&&(i[a-1].style.display=n&&o?``:`none`),n=o,o&&(t=!0)}return t}return{dom:n,update:a}}function y(){return o(`span`,{class:m+`separator`})}var b={join:{width:800,height:900,path:`M0 75h800v125h-800z M0 825h800v-125h-800z M250 400h100v-100h100v100h100v100h-100v100h-100v-100h-100z`},lift:{width:1024,height:1024,path:`M219 310v329q0 7-5 12t-12 5q-8 0-13-5l-164-164q-5-5-5-13t5-13l164-164q5-5 13-5 7 0 12 5t5 12zM1024 749v109q0 7-5 12t-12 5h-987q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h987q7 0 12 5t5 12zM1024 530v109q0 7-5 12t-12 5h-621q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h621q7 0 12 5t5 12zM1024 310v109q0 7-5 12t-12 5h-621q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h621q7 0 12 5t5 12zM1024 91v109q0 7-5 12t-12 5h-987q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h987q7 0 12 5t5 12z`},selectParentNode:{text:`⬚`,css:`font-weight: bold`},undo:{width:1024,height:1024,path:`M761 1024c113-206 132-520-313-509v253l-384-384 384-384v248c534-13 594 472 313 775z`},redo:{width:1024,height:1024,path:`M576 248v-248l384 384-384 384v-253c-446-10-427 303-313 509-280-303-221-789 313-775z`},strong:{width:805,height:1024,path:`M317 869q42 18 80 18 214 0 214-191 0-65-23-102-15-25-35-42t-38-26-46-14-48-6-54-1q-41 0-57 5 0 30-0 90t-0 90q0 4-0 38t-0 55 2 47 6 38zM309 442q24 4 62 4 46 0 81-7t62-25 42-51 14-81q0-40-16-70t-45-46-61-24-70-8q-28 0-74 7 0 28 2 86t2 86q0 15-0 45t-0 45q0 26 0 39zM0 950l1-53q8-2 48-9t60-15q4-6 7-15t4-19 3-18 1-21 0-19v-37q0-561-12-585-2-4-12-8t-25-6-28-4-27-2-17-1l-2-47q56-1 194-6t213-5q13 0 39 0t38 0q40 0 78 7t73 24 61 40 42 59 16 78q0 29-9 54t-22 41-36 32-41 25-48 22q88 20 146 76t58 141q0 57-20 102t-53 74-78 48-93 27-100 8q-25 0-75-1t-75-1q-60 0-175 6t-132 6z`},em:{width:585,height:1024,path:`M0 949l9-48q3-1 46-12t63-21q16-20 23-57 0-4 35-165t65-310 29-169v-14q-13-7-31-10t-39-4-33-3l10-58q18 1 68 3t85 4 68 1q27 0 56-1t69-4 56-3q-2 22-10 50-17 5-58 16t-62 19q-4 10-8 24t-5 22-4 26-3 24q-15 84-50 239t-44 203q-1 5-7 33t-11 51-9 47-3 32l0 10q9 2 105 17-1 25-9 56-6 0-18 0t-18 0q-16 0-49-5t-49-5q-78-1-117-1-29 0-81 5t-69 6z`},code:{width:896,height:1024,path:`M608 192l-96 96 224 224-224 224 96 96 288-320-288-320zM288 192l-288 320 288 320 96-96-224-224 224-224-96-96z`},link:{width:951,height:1024,path:`M832 694q0-22-16-38l-118-118q-16-16-38-16-24 0-41 18 1 1 10 10t12 12 8 10 7 14 2 15q0 22-16 38t-38 16q-8 
10-15-2t-14-7-10-8-12-12-10-10q-18 17-18 41 0 22 16 38l117 118q15 15 38 15 22 0 38-14l84-83q16-16 16-38zM430 292q0-22-16-38l-117-118q-16-16-38-16-22 0-38 15l-84 83q-16 16-16 38 0 22 16 38l118 118q15 15 38 15 24 0 41-17-1-1-10-10t-12-12-8-10-7-14-2-15q0-22 16-38t38-16q8 0 15 2t14 7 10 8 12 12 10 10q18-17 18-41zM941 694q0 68-48 116l-84 83q-47 47-116 47-69 0-116-48l-117-118q-47-47-47-116 0-70 50-119l-50-50q-49 50-118 50-68 0-116-48l-118-118q-48-48-48-116t48-116l84-83q47-47 116-47 69 0 116 48l117 118q47 47 47 116 0 70-50 119l50 50q49-50 118-50 68 0 116 48l118 118q48 48 48 116z`},bulletList:{width:768,height:896,path:`M0 512h128v-128h-128v128zM0 256h128v-128h-128v128zM0 768h128v-128h-128v128zM256 512h512v-128h-512v128zM256 256h512v-128h-512v128zM256 768h512v-128h-512v128z`},orderedList:{width:768,height:896,path:`M320 512h448v-128h-448v128zM320 768h448v-128h-448v128zM320 128v128h448v-128h-448zM79 384h78v-256h-36l-85 23v50l43-2v185zM189 590c0-36-12-78-96-78-33 0-64 6-83 16l1 66c21-10 42-15 67-15s32 11 32 28c0 26-30 58-110 112v50h192v-67l-91 2c49-30 87-66 87-113l1-1z`},blockquote:{width:640,height:896,path:`M0 448v256h256v-256h-128c0 0 0-128 128-128v-128c0 0-256 0-256 256zM640 320v-128c0 0-256 0-256 256v256h256v-256h-128c0 0 0-128 128-128z`}};new h({title:`Join with above block`,run:e,select:t=>e(t),icon:b.join}),new h({title:`Lift out of enclosing block`,run:r,select:e=>r(e),icon:b.lift}),new h({title:`Select parent node`,run:t,select:e=>t(e),icon:b.selectParentNode}),new h({title:`Undo last change`,run:n,enable:e=>n(e),icon:b.undo}),new h({title:`Redo last undone change`,run:i,enable:e=>i(e),icon:b.redo});function x(e,t,n){n?e.classList.add(t):e.classList.remove(t)}var S=`ProseMirror-menubar`;function C(){if(typeof navigator>`u`)return!1;let e=navigator.userAgent;return!/Edge\/\d/.test(e)&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e)}function w(e){return new a({view(t){return new T(t,e)}})}var T=class{constructor(e,t){this.editorView=e,this.options=t,this.spacer=null,this.maxHeight=0,this.widthForMaxHeight=0,this.floating=!1,this.scrollHandler=null,this.wrapper=o(`div`,{class:S+`-wrapper`}),this.menu=this.wrapper.appendChild(o(`div`,{class:S})),this.menu.className=S,e.dom.parentNode&&e.dom.parentNode.replaceChild(this.wrapper,e.dom),this.wrapper.appendChild(e.dom);let{dom:n,update:r}=v(this.editorView,this.options.content);if(this.contentUpdate=r,this.menu.appendChild(n),this.update(),t.floating&&!C()){this.updateFloat();let e=O(this.wrapper);this.scrollHandler=t=>{let n=this.editorView.root;(n.body||n).contains(this.wrapper)?this.updateFloat(t.target.getBoundingClientRect?t.target:void 0):e.forEach(e=>e.removeEventListener(`scroll`,this.scrollHandler))},e.forEach(e=>e.addEventListener(`scroll`,this.scrollHandler))}}update(){this.contentUpdate(this.editorView.state),this.floating?this.updateScrollCursor():(this.menu.offsetWidth!=this.widthForMaxHeight&&(this.widthForMaxHeight=this.menu.offsetWidth,this.maxHeight=0),this.menu.offsetHeight>this.maxHeight&&(this.maxHeight=this.menu.offsetHeight,this.menu.style.minHeight=this.maxHeight+`px`))}updateScrollCursor(){let e=this.editorView.root.getSelection();if(!e.focusNode)return;let t=e.getRangeAt(0).getClientRects(),n=t[E(e)?0:t.length-1];if(!n)return;let r=this.menu.getBoundingClientRect();if(n.top<r.bottom&&n.bottom>r.top){let e=D(this.wrapper);e&&(e.scrollTop-=r.bottom-n.top)}}updateFloat(e){let t=this.wrapper,n=t.getBoundingClientRect(),r=e?Math.max(0,e.getBoundingClientRect().top):0;if(this.floating)if(n.top>=r||n.bottom<this.menu.offsetHeight+10)this.floating=!1,this.menu.style.position=this.menu.style.left=this.menu.style.top=this.menu.style.width=``,this.menu.style.display=``,this.spacer.parentNode.removeChild(this.spacer),this.spacer=null;else{let i=(t.offsetWidth-t.clientWidth)/2;this.menu.style.left=n.left+i+`px`,this.menu.style.display=n.top>(this.editorView.dom.ownerDocument.defaultView||window).innerHeight?`none`:``,e&&(this.menu.style.top=r+`px`)}else if(n.top<r&&n.bottom>=this.menu.offsetHeight+10){this.floating=!0;let n=this.menu.getBoundingClientRect();this.menu.style.left=n.left+`px`,this.menu.style.width=n.width+`px`,e&&(this.menu.style.top=r+`px`),this.menu.style.position=`fixed`,this.spacer=o(`div`,{class:S+`-spacer`,style:`height: ${n.height}px`}),t.insertBefore(this.spacer,this.menu)}}destroy(){this.wrapper.parentNode&&this.wrapper.parentNode.replaceChild(this.editorView.dom,this.wrapper)}};function E(e){return e.anchorNode==e.focusNode?e.anchorOffset>e.focusOffset:e.anchorNode.compareDocumentPosition(e.focusNode)==Node.DOCUMENT_POSITION_FOLLOWING}function D(e){for(let t=e.parentNode;t;t=t.parentNode)if(t.scrollHeight>t.clientHeight)return t}function O(e){let t=[e.ownerDocument.defaultView||window];for(let n=e.parentNode;n;n=n.parentNode)t.push(n);return t}export{w as n,h as t};
2//# sourceMappingURL=vendor-prosemirror-extra-Bknp-F1W.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.