PageSourceSearch

https://discours.netlify.app/scripts/tiptap-presets-eb3e976e.js

js discours.netlify.app collected 2026-10-03 10:40:34 UTC 31,057 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkdiscours_io_frontend=globalThis.webpackChunkdiscours_io_frontend||[]).push([[1,45,263,474],{6823(e,t,r){function o(e){const t=e.includes("?")?"&":"?";return`${e}${t}editorProtocol=${n}`}r.d(t,{NP:()=>a,Wu:()=>o,iv:()=>n});const n="2",a="X-Editor-Protocol"},36090(e,t,r){async function o(e={}){function t(e,t){try{return e()}catch(e){return window.__sentry&&window.__sentry.captureException(e,{tags:{tiptap_extension:t}}),null}}const{element:o,content:n="",editable:I=!0,placeholder:k="Начните писать...",userId:Z="anonymous",userName:ee="Гость",userSlug:te=null,userAvatar:ue=null,userColor:de,onUpdate:ce,onSelectionUpdate:ge,onFocus:pe,onBlur:fe,collaboration:me=null,getLanguageToolPrivacyState:he=null,uploadService:ye=null,notificationService:we=null}=e;if(me&&me.serverUrl&&me.documentName&&!re)try{oe||(oe=Promise.all([r.e(316),r.e(272),r.e(197)]).then(r.bind(r,41315))),re=await oe}catch(e){(0,p.UT)("[editor] Collab bundle failed to load, falling back to non-collab mode:",e),re=null,oe=null}const Se=de||function(e){if(!e||"anonymous"===e)return le[Math.floor(Math.random()*le.length)];let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t&=t;
1const r=Math.abs(t)%le.length;return le[r]}(Z),be=a.YY.create({name:"autolinkUndoFix",priority:1e3,addProseMirrorPlugins:()=>[new s.k_({filterTransaction:e=>{e.getMeta("history$")&&e.setMeta("preventAutolink",!0);const t=e.getMeta("y-sync$");return t&&t.isUndoRedoOperation&&e.setMeta("preventAutolink",!0),!0}})]}),ve=[f.C,m.y,h.i,y._,w.r,S.h,b.f,Y.UC,G.H,l.A.configure({history:!(me&&re),blockquote:!0,heading:!1}),K.q.configure({levels:[2,3,4]}),u.K.configure({openOnClick:!1,HTMLAttributes:{target:"_blank",rel:"noopener noreferrer"}}),be,d.A.configure({placeholder:k,showOnlyCurrent:!1,emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty"}),c.A,g.A.extend({addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right")}}}).configure({types:["heading","paragraph"],alignments:["left","center","right"]}),v._g,C.i,t(()=>A.dr,"ImageBubbleMenu"),T.Q,t(()=>_.GD,"DiscoursKeyboard"),t(()=>E.P,"SearchReplace"),D.tW,t(()=>P.Mn,"FootnoteTooltip"),x.r.configure({uploadService:ye,notificationService:we}),t(()=>M.M,"LinkBubbleMenu"),U.M,W.r.configure({userId:Z,userName:ee,userSlug:te,userAvatar:ue}),H.SuggestionAdd,H.SuggestionDelete,H.SuggestionFormat,L.P,F.W9,R.o5,B.HtmlCleaner,t(()=>j.a2,"WordCount"),t(()=>N.n.configure({enabled:!1,getPrivacyState:he}),"LanguageTool"),t(()=>O.mV,"TocGenerator"),q.FT,z.H,V.V,t(()=>X.c,"LinkPasteHandler"),...ae?[]:[t(()=>Q.A.configure({dragHandleWidth:se.WIDTH,scrollTreshold:se.SCROLL_THRESHOLD,excludedTags:se.EXCLUDED_TAGS}),"GlobalDragHandle")],J.A].filter(Boolean);let Ae=null,Ce=null,Te=null,_e=null,Ee=null,xe=null;if(me&&me.serverUrl&&me.documentName&&re){const{Y:e,HocuspocusProvider:t,Collaboration:r,CollaborationCursor:o}=re;Ce=new e.Doc,"function"==typeof xe&&window.removeEventListener("error",xe,!0),xe=function(e){e&&e.target instanceof WebSocket&&-1!==(e.target.url||"").indexOf(me.serverUrl)&&e.stopImmediatePropagation()},window.addEventListener("error",xe,!0),Ae=new t({url:me.serverUrl,name:me.documentName,token:me.token,parameters:{editorProtocol:i.iv},document:Ce,preserveConnection:!1,maxAttempts:5,delay:1e3,factor:2,maxDelay:3e4,onSynced:({state:e})=>{!0===e&&me.onSynced&&me.onSynced()},onDisconnect:()=>{(0,p.UT)("[Tiptap] Collaboration disconnected"),me.onDisconnect&&me.onDisconnect()},onConnect:()=>{me.onConnect&&me.onConnect()},onStatus:e=>{me.onStatus&&me.onStatus(e)},onClose:e=>{(0,p.UT)("[Tiptap] WebSocket closed:",e?.code,e?.reason),me.onClose&&me.onClose(e)},onAuthenticationFailed:e=>{(0,p.UT)("[Tiptap] Authentication failed:",e?.reason),me.onAuthenticationFailed&&me.onAuthenticationFailed(e)},onMessage:e=>{}}),ne&&(Te=(e,t)=>{},Ce.on("update",Te)),"undefined"!=typeof window&&window.DISCOURS_DEBUG_YJS&&(window._yjsUpdateCount||(window._yjsUpdateCount=0,window._yjsUpdateStart=Date.now()),_e=(e,t)=>{window._yjsUpdateCount++;const r=(Date.now()-window._yjsUpdateStart)/1e3;window._yjsUpdateCount%20==0&&(window._yjsUpdateCount/r).toFixed(2)},Ce.on("update",_e),Ee=()=>{window._awarenessCount||(window._awarenessCount=0,window._awarenessStart=Date.now()),window._awarenessCount++;const e=(Date.now()-window._awarenessStart)/1e3;window._awarenessCount%20==0&&(window._awarenessCount/e).toFixed(2)},Ae.awareness.on("change",Ee)),ve.push(r.configure({document:Ce})),ie||ve.push(o.configure({provider:Ae,user:{name:ee,color:Se,id:"anonymous"!==Z?Z:null,slug:te||null,avatar:ue&&(ue.startsWith("http://")||ue.startsWith("https://"))?ue:null},selectionRender:e=>({style:`background-color: ${e.color}55`,class:"ProseMirror-yjs-selection"}),render:e=>{const t=document.createElement("span");t.classList.add("collaboration-cursor__caret"),t.style.borderColor=e.color,t.style.willChange="transform";let r=e.color.replace("#","");3===r.length&&(r=r[0]+r[0]+r[1]+r[1]+r[2]+r[2]);const o=(.2126*(parseInt(r.substring(0,2),16)||0)+.7152*(parseInt(r.substring(2,4),16)||0)+.0722*(parseInt(r.substring(4,6),16)||0))/255,n=document.createElement("div");return n.classList.add("collaboration-cursor__label"),n.style.backgroundColor=e.color,n.style.color=o>.55?"#1a1a1a":"#fff",n.textContent=e.name,n.style.animation="cursor-label-fade 0.3s ease-out 2s forwards",t.appendChild(n),t}}))}const Me=o.addEventListener.bind(o);let Ie;o.addEventListener=function(e,t,r){return"mousewheel"===e&&("boolean"==typeof r?r={capture:r,passive:!0}:r?"object"==typeof r&&(r=Object.assign({},r,{passive:!0})):r={passive:!0}),Me(e,t,r)};let ke=null;try{Ie=new a.KE({element:o,editable:I,content:me&&re?"":n||"",extensions:ve,editorProps:{attributes:{class:"tiptap-editor-content"}},onCreate:({editor:e})=>{try{me||setTimeout(()=>{e&&!e.isDestroyed&&e.clearUndoHistory&&e.clearUndoHistory()},0)}catch(e){}},onUpdate:({editor:e,transaction:t})=>{try{ce&&e&&!e.isDestroyed&&ce(e,t)}catch(e){}},onSelectionUpdate:({editor:e})=>{try{if(ge&&e&&!e.isDestroyed){const{from:t,to:r,empty:o}=e.state.selection;ge({from:t,to:r,empty:o,hasSelection:!o,selectedText:o?"":e.state.doc.textBetween(t,r)})}}catch(e){}},onFocus:({editor:e})=>{try{pe&&e&&!e.isDestroyed&&pe(e)}catch(e){}},onBlur:({editor:e})=>{try{fe&&e&&!e.isDestroyed&&fe(e)}catch(e){}},onTransaction:({transaction:e})=>
1{if("undefined"!=typeof window&&window.DISCOURS_DEBUG_TRANSACTIONS&&(window._tiptapLastTransaction=e,window._tiptapTxCount||(window._tiptapTxCount=0,window._tiptapTxStart=Date.now(),window._tiptapDebugInterval=setInterval(()=>{const e=(Date.now()-window._tiptapTxStart)/1e3;(window._tiptapTxCount/e).toFixed(2),window},5e3)),window._tiptapTxCount++,window._tiptapTxCount%50==0)){Date.now(),window;window}}})}catch(e){ke=e}finally{o.addEventListener=Me}if(ke)return window.__sentry&&window.__sentry.captureException(ke,{tags:{component:"tiptap_editor_init"}}),we&&we.error("Редактор не&nbsp;загрузился&nbsp;— обновите страницу или&nbsp;попробуйте&nbsp;снова",{delay:0}),null;const De=(0,H.createSuggestionModePlugin)({userId:Z});Ie.registerPlugin(De),Ie.notificationService=we,Ie.setSuggestionMode=e=>{if(Ie.isDestroyed)return;const{tr:t}=Ie.state;t.setMeta(H.suggestionModePluginKey,{enabled:e}),Ie.view.dispatch(t)},Ie.isSuggestionMode=()=>{if(Ie.isDestroyed)return!1;const e=H.suggestionModePluginKey.getState(Ie.state);return!!e&&e.enabled},Ie.setUserId=e=>{if(Ie.isDestroyed)return;const{tr:t}=Ie.state;t.setMeta(H.suggestionModePluginKey,{userId:e}),Ie.view.dispatch(t)},Ie.getSuggestionUserId=()=>{const e=H.suggestionModePluginKey.getState(Ie.state);return e?e.userId:null},Ie.isCollaborative=()=>!!Ae,Ie.getProvider=()=>Ae,Ie.getYDoc=()=>Ce;let Pe=null;"undefined"!=typeof window&&(Pe=()=>{if(!Ae)return null;const e=[];
1return Ae.awareness.getStates().forEach((t,r)=>{e.push({clientId:r,self:r===Ae.awareness.clientID,user:t.user&&t.user.name||null,hasCursor:!(!t.cursor||null==t.cursor.anchor)})}),{synced:Ae.synced,authorizedScope:Ae.authorizedScope,clients:e}},window.__discoursCollabDebug=Pe),Ie.resolveRelativePosition=e=>{if(!Ce||!re)return null;try{const t=re.Y.createAbsolutePositionFromRelativePosition(e,Ce);return t?t.index:null}catch(e){return null}};let Ue=0,We=[];Ie.beginPendingMediaUpload=()=>{Ie.isDestroyed||(Ue+=1)},Ie.endPendingMediaUpload=()=>{if(Ue>0&&(Ue-=1),0===Ue&&We.length>0){const e=We;We=[],e.forEach(e=>{try{e(!0)}catch(e){}})}},Ie.hasPendingMediaUploads=()=>Ue>0,Ie.waitForPendingMediaUploads=(e=3e4)=>0===Ue?Promise.resolve(!0):new Promise(t=>{const r=setTimeout(()=>{We=We.filter(e=>e!==o),t(!1)},e),o=e=>{clearTimeout(r),t(!!e)};We.push(o)}),Ie.clearUndoHistory=()=>{if(Ie.isDestroyed)return!1;if(Ae){try{const e=Ie.state.plugins;for(let t=0;t<e.length;t++){const r=e[t].getState(Ie.state);if(r&&r.undoManager)return r.undoManager.clear(),!0}}catch(e){(0,p.UT)("[TipTap] Не удалось очистить collab undo-стек:",e)}return!1}return!!Ie.commands.clearHistory&&(Ie.commands.clearHistory(),!0)},Ie.getCommentsMap=()=>{if(Ce)try{return Ce.getMap("comments")}catch(e){(0,p.UT)("[getCommentsMap] Y.js fallback (teardown?):",e)}return Ie._localCommentsMap||(Ie._localCommentsMap=new Map),Ie._localCommentsMap},Ie.getSuggestionsMap=()=>{if(Ce)try{return Ce.getMap("suggestions")}catch(e){(0,p.UT)("[getSuggestionsMap] Y.js fallback (teardown?):",e)}return Ie._localSuggestionsMap||(Ie._localSuggestionsMap=new Map),Ie._localSuggestionsMap},Ie.acceptAllSuggestions=()=>H.suggestionCommands.acceptAllSuggestions(Ie),Ie.rejectAllSuggestions=()=>H.suggestionCommands.rejectAllSuggestions(Ie),Ie.toggleFormatSuggestion=(e,t)=>H.suggestionCommands.toggleFormatSuggestion(Ie,e,t),Ie.setLinkSuggestion=e=>H.suggestionCommands.setLinkSuggestion(Ie,e),Ie.removeLinkSuggestion=()=>H.suggestionCommands.removeLinkSuggestion(Ie),Ie.recordBlockFormatSuggestion=(e,t)=>H.suggestionCommands.recordBlockFormatSuggestion(Ie,e,t),Ie.revertBlockFormat=(e,t,r,o,n,a)=>H.suggestionCommands.revertBlockFormat(Ie,e,t,r,o,n,a),Ie.enforceBlockFormatExclusion=(e,t)=>H.suggestionCommands.enforceBlockFormatExclusion(Ie,e,t),Ie.markRangeForDeletion=(e,t)=>H.suggestionCommands.markRangeForDeletion(Ie,e,t),Ie.smartToggleFormat=(e,t={})=>Ie.isSuggestionMode()?Ie.toggleFormatSuggestion(e,t):Ie.chain().focus().toggleMark(e,t).run(),Ie.smartSetLink=e=>Ie.isSuggestionMode()?Ie.setLinkSuggestion(e):Ie.chain().focus().setLink({href:e}).run(),Ie.smartRemoveLink=()=>Ie.isSuggestionMode()?Ie.removeLinkSuggestion():Ie.chain().focus().unsetLink().run();const Le=Ie.destroy.bind(Ie);return Ie.destroy=()=>{try{"undefined"!=typeof window&&window._tiptapDebugInterval&&(clearInterval(window._tiptapDebugInterval),window._tiptapDebugInterval=null,window._tiptapTxCount=0,window._tiptapTxStart=null)}catch(e){}try{"function"==typeof Ee&&Ae&&Ae.awareness&&Ae.awareness.off("change",Ee),Ae&&("function"==typeof xe&&(window.removeEventListener("error",xe,!0),xe=null),Ae.destroy())}catch(e){}finally{"undefined"!=typeof window&&Pe&&window.__discoursCollabDebug===Pe&&(window.__discoursCollabDebug=null),Pe=null}try{"function"==typeof Te&&Ce&&Ce.off("update",Te),"function"==typeof _e&&Ce&&Ce.off("update",_e),Ce&&Ce.destroy()}catch(e){}try{"undefined"!=typeof window&&(void 0!==window._yjsUpdateCount&&(window._yjsUpdateCount=0,window._yjsUpdateStart=null),void 0!==window._awarenessCount&&(window._awarenessCount=0,window._awarenessStart=null),delete window._tiptapLastTransaction,window._tiptapDebugInterval&&(clearInterval(window._tiptapDebugInterval),delete window._tiptapDebugInterval),delete window._tiptapTxCount,delete window._tiptapTxStart)}catch(e){}Ie._localCommentsMap&&(Ie._localCommentsMap.clear(),Ie._localCommentsMap=null),Ie._localSuggestionsMap&&(Ie._localSuggestionsMap.clear(),Ie._localSuggestionsMap=null),Ue=0;const e=We;We=[],e.forEach(e=>{try{e(!1)}catch(e){}}),re=null,oe=null;try{Le()}catch(e){}},Ie}function n(e="id"){return`${e}_${Date.now()}_${Math.random().toString(36).substring(2,11)}`}r.r(t),r.d(t,{EMBED_PROVIDERS:()=>q.F3,EXITABLE_BLOCK_TYPES:()=>Z.EXITABLE_BLOCK_TYPES,Editor:()=>a.KE,IMAGE_ALIGNMENT_CLASSES:()=>v.Rh,ImageGallery:()=>C.i,SpoilerBlock:()=>T.Q,WRAPPER_TYPES:()=>Z.WRAPPER_TYPES,applyTypography:()=>R.yd,applyTypographySync:()=>R.rX,applyTypographyToHtml:()=>R.mD,applyTypographyToHtmlSync:()=>R.fl,cleanHtml:()=>B.cleanHtml,countCharacters:()=>j.wZ,countWords:()=>j.rj,createFootnote:()=>D.h_,createTiptapEditor:()=>o,createTocBlockContent:()=>Y.db,default:()=>ue,extractAll:()=>ee.extractAll,extractComments:()=>ee.extractComments,extractHeadings:()=>O.HV,extractSuggestions:()=>ee.extractSuggestions,findActiveWrapper:()=>Z.findActiveWrapper,findAllWrappersInSelection:()=>Z.findAllWrappersInSelection,generateId:()=>n,generateTocHtml:()=>O.t8,getFootnotes:()=>D.WQ,getReadingTime:()=>j.Wo,getValidationErrorMessage:()=>Z.getValidationErrorMessage,getYoutubeEmbedUrl:()=>q.Eq,isContentLikelyDuplicated:()=>te.py,isValidEmbedUrl:()=>q.TE,liftAllWrappers:()=>Z.liftAllWrappers,liftWrapper:()=>Z.liftWrapper,openFootnoteEditor:()=>I.openFootnoteEditor,openHtmlEditor:()=>k.openHtmlEditor,parseEmbedUrl:()=>q.US,parseYoutubeUrl:()=>q.s4,preloadTypograf:()=>R.uT,setWrapper:()=>Z.setWrapper,suggestionCommands:()=>H.suggestionCommands,toggleWrapperWithExclusion:()=>Z.toggleWrapperWithExclusion,validateContentForWrapper:()=>Z.validateContentForWrapper});var a=r(52781),i=r(6823),s=r(42845),l=r(65427),u=r(45765),d=r(98005),c=r(37594),g=r(94341),p=r(40154),f=r(81968),m=r(69204),h=r(2312),y=r(82953),w=r(40312),S=r(9962),b=r(16654),v=r(66586),A=r(65912),C=r(90036),T=r(47996),_=r(67194),E=r(21),x=r(60152),M=r(60667),I=r(61849),k=r(26855),D=r(54844),P=r(66590),U=r(69527),W=r(39396),L=r(6436),F=r(13240),H=r(46508),R=r(18509),B=r(35282),j=r(15090),N=r(68929),O=r(63092),Y=r(57484),G=r(69718),K=r(88971),q=r(55079),V=r(84159),z=r(12347),X=r(28555),Q=r(95691),J=r(42023),Z=r(99159),ee=r(60150),te=r(7573);let re=null,oe=null;const ne="undefined"!=typeof window&&window.DISCOURS_DEBUG,ae="undefined"!=typeof window&&window.DISCOURS_DISABLE_DRAG_HANDLE,ie="undefined"!=typeof window&&window.DISCOURS_DISABLE_COLLAB_CURSOR,se={WIDTH:24,SCROLL_THRESHOLD:100,EXCLUDED_TAGS:["figure","hr"]},le=["#958DF1","#F98181","#FBBC88","#FAF594","#70CFF8","#94FADB","#B9F18D","#C3E2C2","#EAECCC","#AFC8AD"],ue={createTiptapEditor:o,generateId:n,extractAll:ee.extractAll,extractComments:ee.extractComments,extractSuggestions:ee.extractSuggestions,getFootnotes:D.WQ,openFootnoteEditor:I.openFootnoteEditor,openHtmlEditor:k.openHtmlEditor,createFootnote:D.h_,applyTypography:R.yd,applyTypographyToHtml:R.mD,applyTypographySync:R.rX,applyTypographyToHtmlSync:R.fl,preloadTypograf:R.uT,cleanHtml:B.cleanHtml,countWords:j.rj,countCharacters:j.wZ,getReadingTime:j.Wo,extractHeadings:O.HV,generateTocHtml:O.t8,createTocBlockContent:Y.db,parseEmbedUrl:q.US,parseYoutubeUrl:q.s4,getYoutubeEmbedUrl:q.Eq,isValidEmbedUrl:q.TE,EMBED_PROVIDERS:q.F3,IMAGE_ALIGNMENT_CLASSES:v.Rh,ImageGallery:C.i,SpoilerBlock:T.Q,WRAPPER_TYPES:Z.WRAPPER_TYPES,EXITABLE_BLOCK_TYPES:Z.EXITABLE_BLOCK_TYPES,validateContentForWrapper:Z.validateContentForWrapper,getValidationErrorMessage:Z.getValidationErrorMessage,findActiveWrapper:Z.findActiveWrapper,findAllWrappersInSelection:Z.findAllWrappersInSelection,liftWrapper:Z.liftWrapper,liftAllWrappers:Z.liftAllWrappers,setWrapper:Z.setWrapper,toggleWrapperWithExclusion:Z.toggleWrapperWithExclusion}},49088(e,t,r){function o(){if(g)return null;if(u)return u;
1try{return u=new Worker(new URL(r.p+r.u(748),r.b)),u.addEventListener("message",function(e){var t=e.data;if(0!==t.id||"ready"!==t.result){var r=c.get(t.id);r&&(c.delete(t.id),t.error?r.reject(new Error(t.error)):r.resolve(t.result))}}),u.addEventListener("error",function(e){g=!0,u=null,c.forEach(function(e){e.reject(new Error("Worker error"))}),c.clear(),clearTimeout(p),p=setTimeout(function(){g=!1},6e4)}),u}catch(e){return g=!0,null}}function n(e,t){if(!e)return Promise.resolve(e);var r=o();if(!r)return Promise.reject(new Error("Worker unavailable"));var n=++d;return new Promise(function(o,a){var i=setTimeout(function(){c.delete(n),a(new Error("Worker timeout"))},1e4);c.set(n,{resolve:function(e){clearTimeout(i),o(e)},reject:function(e){clearTimeout(i),a(e)}}),r.postMessage({id:n,action:"execute",text:e,config:t||null})})}function a(e,t){if(!e||0===e.length)return Promise.resolve([]);var r=o();if(!r)return Promise.reject(new Error("Worker unavailable"));var n=++d;return new Promise(function(o,a){var i=setTimeout(function(){c.delete(n),a(new Error("Worker batch timeout"))},15e3);c.set(n,{resolve:function(e){clearTimeout(i),o(e)},reject:function(e){clearTimeout(i),a(e)}}),r.postMessage({id:n,action:"executeBatch",texts:e,config:t||null})})}function i(){return!g&&"undefined"!=typeof Worker}function s(){g||o()}function l(){u&&(u.terminate(),u=null),g=!1,c.forEach(function(e){e.reject(new Error("Worker terminated"))}),c.clear(),clearTimeout(p),p=null}r.d(t,{EG:()=>l,MN:()=>a,Sz:()=>i,YP:()=>s,gl:()=>n});let u=null,d=0,c=new Map,g=!1,p=null},60150(e,t,r){function o(e,t){if("string"==typeof t)return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}function n(e,t,r){if("paragraphBreak"===e)return"Добавить абзац";if("link"===e)return("add"===t?"Добавить":"Удалить")+" ссылку"+(r?": "+r:"");switch(e){case"heading":return"Заголовок "+(r||"");case"alignment":return"выравнивание "+({center:"по центру",right:"по правому краю",left:"по левому краю"}[r]||r||"");case"bulletList":return"маркированный список";case"orderedList":return"нумерованный список";case"blockquote":return"цитата";case"taSub":return"подвёрстка";case"taBorderSub":return"подвёрстка с рамкой";case"taQuotation":return"цитата из источника";case"taEpigraph":return"эпиграф";case"taSelectionFrame":return"рамка выделения"}return{bold:"жирный",italic:"курсив",underline:"подчёркивание",strike:"зачёркивание",code:"код",subscript:"подстрочный",superscript:"надстрочный",lead:"лид",highlight:"выделение"}[e]||e}function a(e,t){for(var r=0;r<t.length;r++){var o=e[t[r]];if("string"==typeof o&&o.trim())return o.trim()}return""}function i(e){if(null==e)return"";if("string"==typeof e)return e.trim();if("number"==typeof e||"boolean"==typeof e)return String(e);if("object"!=typeof e)return"";var t,r=a(e,E),o=a(e,x),n=o?(t=String(o).split("?")[0].split("#")[0]).split("/").pop()||t:"";return r&&n?r+" ("+n+")":r||n}function s(e,t){return t>0?e+" … и ещё "+t:e}function l(e,t){for(var r,o,n=[],a=0;a<e.length;a++){var i=n.concat([e[a]]).join(" · ");if(n.length&&s(i,t-(n.length+1)).length>100)break;n.push(e[a])}if(!n.length)return"";if(1===n.length){var l=100-s("",t-1).length;n[0]=(r=n[0],o=Math.max(l,12),r.length<=o?r:r.slice(0,Math.max(o-1,1)).replace(/\s+$/,"")+"…")}return s(n.join(" · "),t-n.length)}function u(e,t){for(var r=[],o=0,n=0;n<t.length;n++){var a=t[n];if(!(a>=e.length||(o++,r.length>=4))){var s=i(e[a]);r.push("№"+(a+1)+(s?" "+s:""))}}return o?l(r,o):""}function d(e){try{return JSON.stringify(e)}catch(e){return""}}function c(e){var t=[],r=!1,o=function e(o){return o&&"object"==typeof o?-1!==t.indexOf(o)||t.length>=32?(r=!0,null):(t.push(o),Array.isArray(o)?n=o.map(e):(n={},Object.keys(o).sort().forEach(function(t){n[t]=e(o[t])})),t.pop(),n):o;var n}(e);return r?"":d(o)}function g(e){return null==e?"":"string"==typeof e?e:"number"==typeof e||"boolean"==typeof e?String(e):Array.isArray(e)?(t=e).length?l(t.slice(0,4).map(function(e,t){return i(e)||"элемент "+(t+1)}),t.length):"":"object"==typeof e?i(e)||d(e):"";var t}function p(e,t){if(e===t)return!0;var r=null==e||""===e,o=null==t||""===t;if(r||o)return r&&o;if("object"!=typeof e||"object"!=typeof t)return!1;var n=c(e),a=c(t);return""!==n&&n===a}function f(e,t){const r={before:g(e),after:g(t)};if(r.before!==r.after)return r;if(!Array.isArray(e)||!Array.isArray(t))return r;const o=function(e,t){for(var r=Math.max(e.length,t.length),o=[],n=0;n<r;n++)p(e[n],t[n])||o.push(n);return o.length&&o.length!==r?o:null}(e,t);if(!o)return r;const n={before:u(e,o),after:u(t,o)};return n.before===n.after?r:n}
1function m(e,t){if(!t||"object"!=typeof t||Array.isArray(t))return[];const r=e&&e.attrs||{},n=[];for(const e of Object.keys(t)){if((0,v.Yu)(e))continue;const a=o(r,e);if(p(a,t[e]))continue;const i=f(a,t[e]);n.push({key:e,label:o(_,e)||e,before:i.before,after:i.after})}return n}function h(e){switch(e.type.name){case"discoursImage":return"картинки";case"socialEmbed":{const t=(e.attrs.providerName||e.attrs.provider||"").toLowerCase();return t.includes("youtube")||t.includes("vimeo")||t.includes("rutube")?"видео":"медиа"}case"footnote":return"сноски";case"imageGallery":return"галереи";case"spoilerBlock":return"спойлера";case"pdfViewer":return"документа";default:return e.type.name}}function y(e){const{doc:t}=e.state,r=A.get(e);if(r&&r.version===t)return r.data;const a=new Map,i=new Map,s=new Map,l=new Map,u=new Map,d=[],c=[];t.descendants((e,t)=>{if(e.marks)for(let r=0;r<e.marks.length;r++){const o=e.marks[r],u=o.type.name;if("comment"===u){const r=o.attrs.commentId,n=a.get(r);n?(n.to=t+e.nodeSize,n.quotedText+=e.text||""):a.set(r,{commentId:r,resolved:o.attrs.resolved,from:t,to:t+e.nodeSize,quotedText:e.text||"",authorId:o.attrs.authorId||null,authorName:o.attrs.authorName||null,authorSlug:o.attrs.authorSlug||null,authorAvatar:o.attrs.authorAvatar||null})}else if("suggestionAdd"===u){const r=o.attrs.suggestionId,n=i.get(r);n?(n.to=t+e.nodeSize,n.text+=e.text||""):i.set(r,{suggestionId:r,authorId:o.attrs.authorId,authorName:o.attrs.authorName||null,authorSlug:o.attrs.authorSlug||null,authorAvatar:o.attrs.authorAvatar||null,createdAt:o.attrs.createdAt,type:"add",from:t,to:t+e.nodeSize,text:e.text||""})}else if("suggestionDelete"===u){const r=o.attrs.suggestionId,n=s.get(r);n?(n.to=t+e.nodeSize,n.text+=e.text||""):s.set(r,{suggestionId:r,authorId:o.attrs.authorId,authorName:o.attrs.authorName||null,authorSlug:o.attrs.authorSlug||null,authorAvatar:o.attrs.authorAvatar||null,createdAt:o.attrs.createdAt,type:"delete",from:t,to:t+e.nodeSize,text:e.text||""})}else if("suggestionFormat"===u){const r=o.attrs.suggestionId,a=l.get(r),i=e.text||"",s="paragraphBreak"===o.attrs.formatType?i.replace(b.PARAGRAPH_BREAK_MARKER,""):i;a?(a.to=t+e.nodeSize,a.text+=s):l.set(r,{suggestionId:r,authorId:o.attrs.authorId,authorName:o.attrs.authorName||null,authorSlug:o.attrs.authorSlug||null,authorAvatar:o.attrs.authorAvatar||null,createdAt:o.attrs.createdAt,type:"format",formatType:o.attrs.formatType,formatAction:o.attrs.formatAction,formatValue:o.attrs.formatValue,originalValue:o.attrs.originalValue||null,formatDescription:n(o.attrs.formatType,o.attrs.formatAction,o.attrs.formatValue),from:t,to:t+e.nodeSize,text:s})}}const r=o(T,e.attrs&&e.attrs.suggestionType);if(e.attrs&&e.attrs.suggestionId&&r&&!u.has(e.attrs.suggestionId)&&u.set(e.attrs.suggestionId,{suggestionId:e.attrs.suggestionId,authorId:e.attrs.suggestionAuthorId,createdAt:e.attrs.suggestionCreatedAt,type:r,from:t,to:t+e.nodeSize,text:"",isNode:!0,nodeType:e.type.name,nodeDescription:h(e),nextAttrs:e.attrs&&e.attrs.suggestionNextAttrs||null,updateChanges:"node-update"===r?m(e,e.attrs.suggestionNextAttrs):[]}),e.isText)for(let r=0;r<e.text.length;r++)c.push(t+r),d.push(e.text[r])});const g=Array.from(a.values()),p=Array.from(i.values()),f=Array.from(s.values()),y=Array.from(l.values()),w=Array.from(u.values()),S={comments:g,suggestions:{adds:p,deletes:f,formats:y,nodeSuggestions:w,all:[...p,...f,...y,...w]},textIndex:{text:d.join(""),posMap:c}};return A.set(e,{version:t,data:S}),"undefined"!=typeof process&&process,S}function w(e){return y(e).comments.map(function(e){return Object.assign({},e)})}function S(e){function t(e){return e.map(function(e){return Object.assign({},e)})}var{doc:r}=e.state,o=C.get(e);if(o&&o.version===r&&o.data)return o.data;for(var n=y(e).suggestions,a=t(n.adds),i=t(n.deletes),s=t(n.formats),l=t(n.nodeSuggestions),u=[],d=new Set,c=new Set,g=new Map,p=new Map,f=0;f<a.length;f++){var m=a[f];m.suggestionId&&(g.set(m.authorId+":"+m.from,m),p.set(m.authorId+":"+m.to,m))}for(var h=0;h<i.length;h++){var w=i[h];if(w.suggestionId){var S=g.get(w.authorId+":"+w.to)||p.get(w.authorId+":"+w.from);S&&!d.has(S.suggestionId)&&(u.push({suggestionId:w.suggestionId,type:"replace",authorId:w.authorId,authorName:w.authorName||S.authorName||null,authorSlug:w.authorSlug||S.authorSlug||null,authorAvatar:w.authorAvatar||S.authorAvatar||null,createdAt:w.createdAt<S.createdAt?w.createdAt:S.createdAt,from:Math.min(w.from,S.from),to:Math.max(w.to,S.to),deleteText:w.text,addText:S.text,text:w.text+" → "+S.text,_addSuggestionId:S.suggestionId}),d.add(S.suggestionId),c.add(w.suggestionId))}}u.length>0&&(a=a.filter(function(e){return!d.has(e.suggestionId)}),i=i.filter(function(e){return!c.has(e.suggestionId)}));var b={adds:a,deletes:i,replaces:u,formats:s,nodeSuggestions:l,all:[].concat(a,i,u,s,l)};return C.set(e,{version:r,data:b}),b}r.r(t),r.d(t,{extractAll:()=>y,extractComments:()=>w,extractSuggestions:()=>S});var b=r(46508),v=r(43592);const A=new WeakMap,C=new WeakMap,T={add:"node-add",delete:"node-delete",update:"node-update",[v.Uq]:"node-update"},_={src:"файл",alt:"описание",title:"заголовок",caption:"подпись",content:"текст",href:"ссылка",provider:"источник",providerName:"источник",images:"изображения"};var E=["caption","title","alt","label","name","text"],x=["src","url","href"]},80058(e,t,r){function o(e){return G[e]||((0,Y.UT)(`[TipTap Presets] Unknown preset "${e}", falling back to "full"`),G.full)}function n(e){return e in G}function a(){return Object.keys(G)}r.r(t),r.d(t,{albumPreset:()=>O,basicSanitizeHtml:()=>d.NT,commentsPreset:()=>N,createPlaceholder:()=>d.Um,fullPreset:()=>H,getAvailablePresets:()=>a,getPreset:()=>o,hasPreset:()=>n,minimalStarterKitConfig:()=>d.lt,safeChain:()=>d.Jq,safeCommand:()=>d.PF,safeGetAttributes:()=>d.lU,safeIsActive:()=>d.g0,simplifiedPreset:()=>R});var i=r(65427),s=r(45765),l=r(37594),u=r(94341),d=r(7573),c=r(81968),g=r(69204),p=r(2312),f=r(82953),m=r(40312),h=r(9962),y=r(16654),w=r(66586),S=r(65912),b=r(60152),v=r(55079),A=r(88971),C=r(57484),T=r(63092),_=r(54844),E=r(66590),x=r(60667),M=r(67194),I=r(18509),k=r(35282),D=r(15090),P=r(69527),U=r(39396),W=r(46508),L=r(95691),F=r(42023);const H={name:"full",description:"Full-featured editor for articles and expo content",toolbar:[["bold","italic","underline"],["alignLeft","alignCenter","alignRight"],["bulletList","orderedList"],["heading2","heading3","quote","lead","quotation","epigraph","sub","borderSub","selectionFrame"],["link"],["footnote"],["image"],["video","embed"],["toc"]],adminToolbar:["html"],getExtensions(e={}){const{collaborative:t=!1,enableDragHandle:r=!0,uploadService:o=null,notificationService:n=null,placeholder:a="Место для вашей истории…",userId:H="anonymous",userName:R="Гость",userSlug:B=null,userAvatar:j=null}=e,N=[c.C,g.y,p.i,f._,m.r,h.h,y.f,C.UC,i.A.configure({history:!t,blockquote:!0,heading:!1}),A.q.configure({levels:[2,3,4]}),s.K.configure({openOnClick:!1,HTMLAttributes:{target:"_blank",rel:"noopener noreferrer"}}),(0,d.Um)(a),l.A,u.A.extend({addKeyboardShortcuts(){return{"Mod-Shift
1-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right")}}}).configure({types:["heading","paragraph"],alignments:["left","center","right"]}),w._g,S.dr,M.GD,_.tW,E.Mn,b.r.configure({uploadService:o,notificationService:n}),x.M,P.M,U.r.configure({userId:H,userName:R,userSlug:B,userAvatar:j}),W.SuggestionAdd,W.SuggestionDelete,W.SuggestionFormat,I.o5,k.HtmlCleaner,D.a2,T.mV,v.FT,F.A];return r&&N.push(L.A.configure({dragHandleWidth:24,scrollTreshold:100,excludedTags:["figure","hr"]})),N},features:{formatting:["bold","italic","underline","strike"],alignment:["left","center","right"],lists:["bullet","ordered"],headings:[2,3,4],wrappers:["quote","lead","quotation","epigraph","sub","borderSub","selectionFrame"],media:["image","video","embed"],special:["link","footnote","toc"],collaboration:["comments","suggestions"],utilities:["typography","wordCount","htmlEditor"]}},R={name:"simplified",description:"Minimal editor with only bold and italic formatting",toolbar:[["bold","italic"]],adminToolbar:["html"],getExtensions(e={}){const{placeholder:t="Введите текст..."}=e;return[i.A.configure(d.lt),(0,d.Um)(t),I.o5,k.HtmlCleaner]},features:{formatting:["bold","italic"],alignment:[],lists:[],headings:[],wrappers:[],media:[],special:[],collaboration:[],utilities:["typography"]}};var B=r(6436),j=r(13240);const N={name:"comments",description:"Editor for comments and private messages",toolbar:[["bold","italic"],["link"],["image"]],adminToolbar:[],getExtensions(e={}){const{uploadService:t=null,notificationService:r=null,placeholder:o="Написать комментарий..."}=e;return[i.A.configure(d.lt),s.K.configure({openOnClick:!1,HTMLAttributes:{target:"_blank",rel:"noopener noreferrer"}}),(0,d.Um)(o),w._g,S.dr,b.r.configure({uploadService:t,notificationService:r}),x.M,I.o5,k.HtmlCleaner,B.P,j.W9.configure({insertText:!0})]},features:{formatting:["bold","italic"],alignment:[],lists:[],headings:[],wrappers:[],media:["image"],special:["link"],collaboration:[],utilities:["typography"]}},O={name:"album",description:"Editor for album item descriptions with formatting and wrappers",toolbar:[["bold","italic"],["link"],["formatDropdown"],["wrapperDropdown"],["footnote"],["image"]],adminToolbar:[],getExtensions(e={}){const{uploadService:t=null,notificationService:r=null,placeholder:o="Введите описание..."}=e;return[c.C,g.y,p.i,f._,m.r,h.h,y.f,i.A.configure({history:!0,blockquote:!0,heading:!1}),A.q.configure({levels:[2,3]}),s.K.configure({openOnClick:!1,HTMLAttributes:{target:"_blank",rel:"noopener noreferrer"}}),(0,d.Um)(o),w._g,S.dr,b.r.configure({uploadService:t,notificationService:r}),_.tW,E.Mn,x.M,I.o5,k.HtmlCleaner]},features:{formatting:["bold","italic"],alignment:[],lists:[],headings:[2,3],wrappers:["lead","highlight","blockquote","quotation","epigraph","sub","borderSub","selectionFrame"],media:["image"],special:["link","footnote"],collaboration:[],utilities:["typography"]}};var Y=r(40154);const G={full:H,simplified:R,comments:N,album:O}},87263(e,t,r){function o(e){var t=Math.floor(e)||0,r=Math.floor(t/3600),o=Math.floor(t%3600/60),n=t%60;return r>0?r+":"+String(o).padStart(2,"0")+":"+String(n).padStart(2,"0"):o+":"+String(n).padStart(2,"0")}r.d(t,{E:()=>o})}}]);

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.