@diplodoc/cli 5.26.1 → 5.26.2

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/build/index.js CHANGED
@@ -347994,7 +347994,7 @@ var import_config75 = require("@diplodoc/cli/lib/config");
347994
347994
 
347995
347995
  // src/constants.ts
347996
347996
  var import_node_path2 = require("node:path");
347997
- var VERSION = "5.26.1" ? "5.26.1" : "0.0.0";
347997
+ var VERSION = "5.26.2" ? "5.26.2" : "0.0.0";
347998
347998
  var MAIN_TIMER_ID = "Build time";
347999
347999
  var ASSETS_FOLDER = (0, import_node_path2.resolve)(__dirname, "../assets");
348000
348000
  var BUNDLE_FOLDER = "_bundle";
@@ -391869,8 +391869,8 @@ var run2 = async (argv2) => {
391869
391869
  if (import_node_worker_threads4.isMainThread && require.main === module) {
391870
391870
  (async () => {
391871
391871
  import_utils384.console.time(MAIN_TIMER_ID);
391872
- if ("5.26.1") {
391873
- import_utils384.console.log(`Using v${"5.26.1"} version`);
391872
+ if ("5.26.2") {
391873
+ import_utils384.console.log(`Using v${"5.26.2"} version`);
391874
391874
  }
391875
391875
  const report = await run2(process.argv);
391876
391876
  import_utils384.console.timeEnd(MAIN_TIMER_ID);
package/build/index.mjs CHANGED
@@ -347981,7 +347981,7 @@ import { Command as Command7 } from "@diplodoc/cli/lib/config";
347981
347981
 
347982
347982
  // src/constants.ts
347983
347983
  import { join, resolve as resolve2 } from "node:path";
347984
- var VERSION = "5.26.1" ? "5.26.1" : "0.0.0";
347984
+ var VERSION = "5.26.2" ? "5.26.2" : "0.0.0";
347985
347985
  var MAIN_TIMER_ID = "Build time";
347986
347986
  var ASSETS_FOLDER = resolve2(__dirname, "../assets");
347987
347987
  var BUNDLE_FOLDER = "_bundle";
@@ -391889,8 +391889,8 @@ var run2 = async (argv2) => {
391889
391889
  if (isMainThread4 && __require.main === module) {
391890
391890
  (async () => {
391891
391891
  console5.time(MAIN_TIMER_ID);
391892
- if ("5.26.1") {
391893
- console5.log(`Using v${"5.26.1"} version`);
391892
+ if ("5.26.2") {
391893
+ console5.log(`Using v${"5.26.2"} version`);
391894
391894
  }
391895
391895
  const report = await run2(process.argv);
391896
391896
  console5.timeEnd(MAIN_TIMER_ID);
@@ -4,16 +4,16 @@
4
4
  "976-40cbc1d2518eb8ea.js"
5
5
  ],
6
6
  "js": [
7
- "vendor-f4e28d6d333a34f2.js",
8
- "search-b6246854f4238deb.js",
7
+ "vendor-bfbd11529400b045.js",
8
+ "search-6fbdaaffc89fe254.js",
9
9
  "react-869ecca253e3f1ec.js"
10
10
  ],
11
11
  "css": [
12
- "vendor-604a56a7a92ed771.css",
13
- "search-3aaa18bd7b60f08f.css",
14
- "vendor-dcc8584736da7d7f.rtl.css",
15
- "app-3b7885975521b0fb.rtl.css",
16
- "search-bf88d79943058638.rtl.css"
12
+ "vendor-2189c4800834fb2e.css",
13
+ "search-f3dbe6f0236c6357.css",
14
+ "vendor-39fb2025974ca624.rtl.css",
15
+ "app-ca992357a51ced01.rtl.css",
16
+ "search-b6878a57f75dc338.rtl.css"
17
17
  ]
18
18
  },
19
19
  "app": {
@@ -21,16 +21,16 @@
21
21
  "976-40cbc1d2518eb8ea.js"
22
22
  ],
23
23
  "js": [
24
- "app-c87e24eeaae1b0dc.js",
25
- "vendor-f4e28d6d333a34f2.js",
24
+ "app-28b410dd0e289e80.js",
25
+ "vendor-bfbd11529400b045.js",
26
26
  "react-869ecca253e3f1ec.js"
27
27
  ],
28
28
  "css": [
29
- "vendor-604a56a7a92ed771.css",
30
- "app-2d61aeb310cae43c.css",
31
- "vendor-dcc8584736da7d7f.rtl.css",
32
- "app-3b7885975521b0fb.rtl.css",
33
- "search-bf88d79943058638.rtl.css"
29
+ "vendor-2189c4800834fb2e.css",
30
+ "app-1123934e060acb4c.css",
31
+ "vendor-39fb2025974ca624.rtl.css",
32
+ "app-ca992357a51ced01.rtl.css",
33
+ "search-b6878a57f75dc338.rtl.css"
34
34
  ]
35
35
  }
36
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diplodoc/cli",
3
- "version": "5.26.1",
3
+ "version": "5.26.2",
4
4
  "description": "Make documentation using yfm-docs in Markdown and HTML formats",
5
5
  "keywords": [
6
6
  "markdown",
@@ -76,7 +76,7 @@
76
76
  ]
77
77
  },
78
78
  "dependencies": {
79
- "@diplodoc/client": "^5.2.6",
79
+ "@diplodoc/client": "^5.2.8",
80
80
  "@diplodoc/liquid": "^1.4.0",
81
81
  "@diplodoc/transform": "^4.70.1",
82
82
  "@diplodoc/translation": "^1.7.19",
@@ -1,2 +0,0 @@
1
- (()=>{var e,t,n,r={81253(e,t,n){"use strict";var r,o,a,i,c,s=n(71893),u=n(61642),l=n(74848),d=n(96540),f=n(5338),h=n(55456),m=n(33324),g=n(81836),v=n(78184),p=n(12905),w=n(6790),b=n(86639),y=n(73955),_=n(37321);n(20553);var x=(0,d.createContext)({pathname:"/",depth:0});x.displayName="RouterContext";var S=x.Provider,j=(0,d.createContext)(v.JA.En);j.displayName="Lang";var C=j.Provider,k=n(2919),M=n(60478),T={theme:v.Sx.Light,textSize:v.ov.M,showMiniToc:!0,wideFormat:!0,fullScreen:!1},O=["ar","arc","ckb","dv","fa","ha","he","khw","ks","ps","sd","ur","uz_AF","yi"],N=((r={}).RTL="rtl",r.LTR="ltr",r);function L(){return"u">typeof document}function A(e){var t=e.theme;"u">typeof document&&document.querySelectorAll(".g-root").forEach(function(e){e.classList.toggle("g-root_theme_light","light"===t),e.classList.toggle("g-root_theme_dark","dark"===t)})}function E(e){if(L()){document.body.classList.add("g-root");var t=function(e,t){return document.body.classList.toggle(e,!!t)};Object.keys(e).forEach(function(n){switch(n){case"wideFormat":t("dc-root_wide-format",e[n]);break;case"focusSearch":t("dc-root_focused-search",e[n]);break;case"fullScreen":t("dc-root_full-screen",e[n]);break;case"landingPage":t("dc-root_document-page",!e[n]),t("dc-root_landing-page",e[n]);break;case"mobileView":t("mobile",e[n]),t("desktop",!e[n])}})}}(0,M._)(new Set((0,M._)(["href"]).concat((0,M._)(["src","url","href","icon","image","desktop","mobile","tablet","previewImg","image","avatar","logo","light","dark"]))));var I=function(e){return"boolean"==typeof e?e:!!e&&"true"===e};function F(){var e=z("theme"),t=z("textSize"),n=z("showMiniToc"),r=z("wideFormat"),o=z("fullScreen");return{theme:e,textSize:t,showMiniToc:I(n),wideFormat:I(r),fullScreen:I(o)}}function P(e){return"PAGE_CONSTRUCTOR"===(0,k.M5)(e)}function R(){return!!L()&&document.body.clientWidth<769}function z(e){if(!L())return T[e];try{return sessionStorage.getItem(e)||T[e]}catch(t){return T[e]}}function H(e,t){var n=t.match(/^file:\/\/\/(.*)$/),r=(n?"/"+n[1]:t.replace(/^https?:\/\/[^/]+/,"")).replace(/\/[a-z]{2}\//,"/".concat(e,"/"));return n?"file://"+r:r}var U=n(50467),q=n(53014);function B(e,t){var n=(0,q._)((0,d.useState)(t[e]),2),r=n[0],o=n[1],a=(0,d.useMemo)(function(){var t,n;return t=e,n=o,function(e){if(L())try{sessionStorage.setItem(t,String(e))}catch(e){}n(e)}},[e,o]);return(0,d.useMemo)(function(){var t;return t={},(0,U._)(t,e,r),(0,U._)(t,"onChange"+e.replace(/^./,function(e){return e.toUpperCase()}),a),t},[e,r,a])}var D=n(23614),V=n(41374),W=n(30494),$=n(99407),Z=n(53750),G=n(51735),J=function(){function e(t){var r=this,o=this;(0,W._)(this,e),(0,U._)(this,"worker",void 0),(0,U._)(this,"config",void 0),(0,U._)(this,"init",function(){var e;e=(0,h._)((0,s._)({},r.config),{base:r.base,mark:"Suggest__Item__Marker"}),r.worker=(0,V._)(function(){var t;return(0,G._)(this,function(r){switch(r.label){case 0:return[4,(0,V._)(function(){var e,t,r;return(0,G._)(this,function(o){try{return[2,new Worker(new URL(n.p+n.u("976"),n.b))]}catch(n){if((0,Z._)(n,DOMException)&&(e=K.exec(n.message)))return t=e[1],r=new Blob(["importScripts('".concat(t,"');")],{type:"text/javascript"}),[2,new Worker(URL.createObjectURL(r))];throw n}})})()];case 1:return[4,Q(t=r.sent(),(0,h._)((0,s._)({},e),{type:"init"}))];case 2:return r.sent(),[2,t]}})})()}),(0,U._)(this,"link",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=new URLSearchParams;n&&o.set("query",n),r>1&&o.set("page",r.toString());var a=o.toString()?"?".concat(o.toString()):"";return"".concat(e,"/").concat(t.link).concat(a)}(o.base,o.config,e,t)}),this.config=t}return(0,$._)(e,[{key:"suggest",value:function(e){return(0,V._)(function(){return(0,G._)(this,function(t){return[2,this.request({type:"suggest",query:e})]})}).call(this)}},{key:"search",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return(0,V._)(function(){return(0,G._)(this,function(r){return[2,this.request({type:"search",query:e,page:t,count:n})]})}).call(this)}},{key:"base",get:function(){return window.location.href.split("/").slice(0,-this.config.depth).join("/")}},{key:"request",value:function(e){return(0,V._)(function(){return(0,G._)(this,function(t){switch(t.label){case 0:return[4,this.worker];case 1:return[2,Q.apply(void 0,[t.sent(),e])]}})}).call(this)}}]),e}(),K=/Script at '(.*?)' cannot be accessed from origin/;function Q(e,t){var n=new MessageChannel;return new Promise(function(r,o){n.port1.onmessage=function(e){e.data.error?o(e.data.error):r(e.data.result)},n.port1.onmessageerror=function(e){o(e.data.error)},e.postMessage(t,[n.port2])})}(0,D.default)("Search");var Y=(0,d.createContext)(null);Y.displayName="SearchContext";var X=Y.Provider;n(66008);var ee=n(6429),et=(0,D.default)("Layout");function en(){return null}function er(){return null}function eo(){return null}var ea={doc:!1},ei=function(e){var t,n,r,o=(0,s._)({},ea,e),a=o.children,i=o.doc,c=o.headerHeight;return d.Children.forEach(a,function(e){switch(e.type){case en:t=e.props.children;break;case er:n=e.props.children;break;case eo:r=e.props.children}}),(0,l.jsxs)("div",{className:et({"full-header":(void 0===c?0:c)>0}),children:[t&&(0,l.jsx)("div",{className:et("header"),children:t}),(0,l.jsxs)("div",{className:et("body"),children:[n&&(0,l.jsx)("div",{className:et("content"),children:n}),r&&(0,l.jsx)("div",{className:et("footer",{doc:i}),children:r})]})]})};ei.displayName="Layout",ei.Header=en,ei.Content=er,ei.Footer=eo;var ec=(0,D.default)("pc-page-constructor"),es=(0,D.default)("pc-constructor-row"),eu=function(e){var t=e.children;return t?(0,l.jsx)(ee.fI1,{className:es(),children:(0,l.jsx)(ee.fvL,{children:t})}):null};function el(e){var t=e.background,n=e.blocks,r=(0,ee.DPo)(),o=(0,ee.dgY)(t,r);return(0,l.jsx)("div",{className:ec("docs"),children:(0,l.jsxs)("div",{className:ec("wrapper"),children:[n&&o&&(0,l.jsx)(ee.bGR,(0,h._)((0,s._)({},o),{className:ec("background")})),(0,l.jsx)(ee.xA9,{children:(0,l.jsx)(eu,{children:(0,l.jsx)(ee.FA7,{items:n})})})]})})}var ed=function(e,t){var n=(0,k.M5)(e)===v.KG.PageConstructor&&"data"in e&&"fullScreen"in e.data&&e.data.fullScreen,r=(0,d.useMemo)(function(){return n?e.data:{blocks:[{type:"page",resetPaddings:!0}]}},[n,e]);return(0,d.useMemo)(function(){return{custom:{page:t},layout:r}},[t,r])},ef=n(40258),eh=n(48930),em=n(94650),eg=n(84941),ev=(0,D.default)("Suggest");function ep(){return(0,l.jsx)(em.I,{data:eg.A,className:ev("end"),size:24})}function ew(){var e,t,n,r,o,a,i,c,u=(e=(0,d.useContext)(j),n=void 0===(t=(0,d.useContext)(x).depth)?0:t,r=(0,d.useContext)(Y),a=(o=(0,q._)((0,d.useState)(null),2))[0],i=o[1],c=(0,d.useMemo)(function(){return r?(0,h._)((0,s._)({},r),{depth:n,lang:e}):null},[e,n,r]),(0,d.useEffect)(function(){c&&i(c?new J(c):null)},[c]),a),f=(0,d.useRef)(null),m=(0,ef.j)("search"),g=(0,d.useCallback)(function(){E({focusSearch:!0})},[]),v=(0,d.useCallback)(function(){E({focusSearch:!1}),setTimeout(function(){f.current&&f.current.close()},100)},[]);return!u||m?null:(0,l.jsx)(eh.$,{ref:f,provider:u,onFocus:g,onBlur:v,endContent:(0,l.jsx)(ep,{}),className:ev("input"),classNameContainer:ev(),classNameClose:ev("close"),closeButton:!0})}var eb=n(26141),ey=n(25346),e_=(0,d.memo)(function(e){var t=e.mobileView,n=e.theme,r=e.onChangeTheme,o=e.textSize,a=e.onChangeTextSize,i=e.wideFormat,c=e.onChangeWideFormat,s=e.showMiniToc,u=e.onChangeShowMiniToc,d=e.lang,f=e.langs,h=e.onChangeLang,m=e.availableLangs;return(0,l.jsx)(eb.n,{controlClassName:"Control",controlSize:v.Uv.L,isWideView:t,isMobileView:t,children:(0,l.jsx)(ey.A,{className:"Controls",theme:n,onChangeTheme:r,wideFormat:i,onChangeWideFormat:c,showMiniToc:s,onChangeShowMiniToc:u,textSize:o,onChangeTextSize:a,lang:d,langs:f,onChangeLang:h,availableLangs:void 0===m?[]:m})})});e_.displayName="HeaderControls";var ex=n(15395),eS=n(29794);function ej(e,t,n){return e.some(function(e){return e.type===n})||t.some(function(e){return e.type===n})}var eC={},ek={},eM=[],eT=[],eO=function(e,t,n,r,o){var a=e.toc,i=a.navigation||eC,c=i.header,u=void 0===c?ek:c,f=i.logo,m=u.leftItems,g=void 0===m?eM:m,p=u.rightItems,w=void 0===p?eT:p,b=ej(w,g,"controls"),y=ej(w,g,"search"),_=(0,d.useContext)(Y),S=(0,d.useContext)(x);_&&!y&&w.unshift({type:"search"});var j=(0,d.useMemo)(function(){return{withBorder:!0,leftItems:g,rightItems:w,customMobileHeaderItems:[{type:"search"}]}},[g,w]),C=(0,d.useMemo)(function(){return{toc:a,router:S,headerHeight:64}},[a,S]),k=(0,d.useMemo)(function(){return{controlSize:v.Uv.L,userSettings:t,viewerInterface:o}},[t,o]),M=(0,d.useMemo)(function(){var e;return eC===i?void 0:{header:{leftItems:[]},renderNavigation:function(){var e;return(0,l.jsx)(ex.A,{logo:(0,h._)((0,s._)({},f),{icon:null!=(e=null==f?void 0:f.icon)?e:""}),data:j,navigationTocData:C,mobileControlsData:k})},logo:(0,h._)((0,s._)({},f),{icon:null!=(e=null==f?void 0:f.icon)?e:""})}},[j,C,k,f,i]);return(0,d.useMemo)(function(){return{custom:{search:r,controls:n,MobileDropdown:eS.A},layout:M,withControls:b}},[r,n,M,b])};function eN(e){var t=e.data,n=e.props,r=e.controls,o=n.theme,a=n.fullScreen,i=(0,k.M5)(t),c=(0,k.$T)(i),u=(0,d.useCallback)(function(){return(0,l.jsx)(ew,{})},[]),f=(0,d.useCallback)(function(){return(0,l.jsx)(e_,(0,s._)({},r))},[r]),m=eO(t,r,f,u),g=(0,d.useCallback)(function(){var e,o;return(0,l.jsx)(ei,{headerHeight:a||!m.layout?0:64,children:(0,l.jsx)(ei.Content,{children:(0,l.jsx)(c,(0,h._)((0,s._)({},t,n,m.withControls?(o=["theme","onChangeTheme","textSize","onChangeTextSize","wideFormat","onChangeWideFormat","showMiniToc","onChangeShowMiniToc","langs","onChangeLang"],Object.keys(e=r).reduce(function(t,n){return o.includes(n)||(t[n]=e[n]),t},{})):r),{children:(0,l.jsx)(el,(0,s._)({},t.data))}))})})},[t,m,n,r,a,c]),v=ed(t,g),p=(0,d.useMemo)(function(){return{navigation:m.custom,blocks:v.custom}},[m,v]);return(0,l.jsx)(ee.ZzZ,{theme:o,projectSettings:{disableCompress:!0},ssrConfig:{isServer:!0},children:(0,l.jsx)(ee.i$,{custom:p,content:v.layout,navigation:a?void 0:m.layout})})}var eL=n(58498),eA=n(89457),eE=n(57016),eI=n(29714),eF=n(81397),eP=n(59071);function eR(){var e=(0,eI.D)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eE.v,{}),(0,l.jsx)(eA.l,{}),(0,l.jsx)(eL.A,{theme:e===v.Sx.Dark?"dark":"neutral",zoom:{showMenu:!0,bindKeys:!0}}),(0,l.jsx)(eF.TabsRuntime,{saveTabsToLocalStorage:!0,saveTabsToQueryStateMode:"page"}),(0,l.jsx)(eP.UQ,{})]})}function ez(e,t){return t.some(function(t){return"string"==typeof t?t===e:t.lang===e})}var eH=n(67238),eU=function(e){var t=e.components,n=e.pureComponents;return function(e){return function(r){var o=r.forwardRef,a=r.mdxArtifacts,i=r.html,c=(0,d.useRef)(null);c.current=null;var u=(0,d.useCallback)(function(e){return c.current=e,o(e)},[o]),l=(0,eH.A)({refCtr:c,components:t,pureComponents:n,mdxArtifacts:a,html:i});return d.createElement(d.Fragment,null,d.createElement(e,(0,h._)((0,s._)({},r),{forwardRef:u})),l)}}};function eq(e){var t,r,o,a,i,c,u,f,x,j,M,T,L,I,z,U,D,V,W,$,Z,G=e.data,J=e.router,K=e.lang,Q=e.langs,Y=e.search,ee=e.analytics,et=e.feedback,en=e.viewerInterface,er=(r=B("theme",t=F()),o=B("textSize",t),a=B("wideFormat",t),i=B("fullScreen",t),c=B("showMiniToc",t),(0,d.useMemo)(function(){return(0,s._)({},r,o,a,c,i)},[r,o,a,c,i])),eo=(u=e.lang,f=e.langs,x=(0,d.useCallback)(function(e,t){var n=t||{},r=n.tld,o=n.href;if(o){window.location.href=o;return}var a=window.location.href;r?window.location.replace(H(e,a.replace(/([a-zA-Z0-9-]+\.[a-zA-Z0-9-]+)(?=[/:?#]|$)/,function(e){var t=e.lastIndexOf(".");return -1===t?e:e.slice(0,t+1)+r}))):window.location.replace(H(e,a))},[]),(0,d.useMemo)(function(){return{lang:u,langs:f,onChangeLang:x}},[u,f,x])),ea=(M=(j=(0,q._)((0,d.useState)(R()),2))[0],T=j[1],L=(0,d.useCallback)(function(){T(R())},[]),(0,d.useEffect)(L,[L]),(0,d.useEffect)(function(){return window.addEventListener("resize",L),function(){return window.removeEventListener("resize",L)}},[L]),M),ei=(0,d.useMemo)(function(){if(!("meta"in G))return[];var e=G.meta,t=e.canonical,n=e.alternate;if(!t)return[];var r=new Set,o=(0,q._)(t.split("/"),1)[0];ez(o,Q)&&r.add(o);var a=!0,i=!1,c=void 0;try{for(var s,u=(void 0===n?[]:n)[Symbol.iterator]();!(a=(s=u.next()).done);a=!0){var l=s.value.href;if(!(!l||(0,k.ZR)(l))){var d=(0,q._)(l.split("/"),1)[0];ez(d,Q)&&r.add(d)}}}catch(e){i=!0,c=e}finally{try{a||null==u.return||u.return()}finally{if(i)throw c}}return Array.from(r)},[G,Q]),ec=g.Lq.includes(K)?K:v.JA.En;(0,p.jK)({lang:ec,localeCode:ec});var es=(0,d.useMemo)(function(){var e=[],t=n.g&&"getMdxInitProps"in n.g&&n.g.getMdxInitProps;return"function"==typeof t&&e.push(eU(t({dependencies:{react:d}}))),e},[]),eu=er.theme,el=er.textSize,ed=er.wideFormat,ef=er.fullScreen,eh=er.showMiniToc,em=(z=(I={feedbackUrl:null==et?void 0:et.url,router:J,viewerInterface:en}).feedbackUrl,U=I.router,D=I.viewerInterface,V=(0,d.useCallback)(function(e){z&&fetch(z,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify((0,h._)((0,s._)({},e),{page:U.pathname,timestamp:new Date().toISOString()}))}).catch(function(e){console.error("Failed to send feedback:",e)})},[z,U.pathname]),W=(null==D?void 0:D.feedback)!==!1,z&&W?V:void 0),eg=(0,d.useMemo)(function(){return{router:J,theme:eu,textSize:el,wideFormat:ed,fullScreen:ef,showMiniToc:eh,isMobile:ea}},[J,eu,el,ed,ef,eh,ea]),ev=(0,d.useMemo)(function(){return(0,h._)((0,s._)({},er,eo),{mobileView:ea,availableLangs:ei,onSendFeedback:em})},[eo,er,ea,ei,em]),ep=O.includes(K)?N.RTL:N.LTR,ew=P(G);return(0,d.useEffect)(function(){E({mobileView:ea,wideFormat:ed,fullScreen:ef,landingPage:ew}),A({theme:eu}),function(){var e=window.location.hash.substring(1);if(console.log({hash:e}),e){var t=document.getElementById(e);if(console.log({element:t}),t){for(var n,r=null==t?void 0:t.parentElement;r;)(null==(n=r)?void 0:n.tagName.toLowerCase())==="details"&&(r.open=!0),r=r.parentElement;t.focus(),setTimeout(function(){console.log("scroll"),function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200;if(!((t=e.getBoundingClientRect()).top>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)))if(-1!==["H1","H2","H3","H4","H5","H6"].indexOf(e.tagName))e.scrollIntoView();else{var r=e.getBoundingClientRect().top+window.scrollY-n;window.scrollTo({top:r})}}(t)},10)}}}()},[eu,ea,ed,ef,ew,K]),(0,l.jsx)("div",{className:"App",children:(0,l.jsx)(m.N,{theme:eu,direction:ep,children:(0,l.jsx)(C,{value:K,children:(0,l.jsx)(S,{value:J,children:(0,l.jsx)(X,{value:Y,children:(0,l.jsxs)(w.p,{interface:en||{},children:[(0,l.jsx)(b.W.Provider,{value:es,children:(0,l.jsx)(eN,{data:G,props:eg,controls:ev})}),ee&&(0,l.jsx)(y.A,{router:J,gtmId:(null==ee||null==($=ee.gtm)?void 0:$.id)||"",consentMode:null==ee||null==(Z=ee.gtm)?void 0:Z.mode}),(0,l.jsx)(_.A,{}),(0,l.jsx)(eR,{})]})})})})})})}var eB=document.getElementById("root"),eD=window.__DATA__;if(!eB)throw Error("Root element not found!");if(!(eD&&(void 0===eD?"undefined":(0,u._)(eD))==="object"&&null!==eD&&"data"in eD))throw Error("Invalid data format for App component");a=(o=F()).theme,i=o.wideFormat,c=o.fullScreen,E({mobileView:R(),wideFormat:i,fullScreen:c,landingPage:P(eD.data)}),A({theme:a}),window.STATIC_CONTENT?(0,f.hydrateRoot)(eB,(0,l.jsx)(eq,(0,s._)({},eD))):(0,f.createRoot)(eB).render((0,l.jsx)(eq,(0,s._)({},eD)))},66008(){var e,t;"u">typeof Element&&((t=(e=Element.prototype).matches||e.matchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector)?e.matches=e.matchesSelector=t:e.matches=e.matchesSelector=function(e){var t=this;return Array.prototype.some.call(document.querySelectorAll(e),function(e){return e===t})})},98010(e,t,n){"use strict";function r(){}n.d(t,{A:()=>r})},14892(){},4320(){},80657(){},91190(){},7155(){},54318(){}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,loaded:!1,exports:{}};return r[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=r,a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(e,t){if(1&t&&(e=this(e)),8&t||"object"==typeof e&&e&&(4&t&&e.__esModule||16&t&&"function"==typeof e.then))return e;var n=Object.create(null);a.r(n);var r={};i=i||[null,c({}),c([]),c(c)];for(var o=2&t&&e;("object"==typeof o||"function"==typeof o)&&!~i.indexOf(o);o=c(o))Object.getOwnPropertyNames(o).forEach(t=>{r[t]=()=>e[t]});return r.default=()=>e,a.d(n,r),n},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.u=e=>""+e+"-40cbc1d2518eb8ea.js",a.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s=[],a.O=(e,t,n,r)=>{if(t){r=r||0;for(var o=s.length;o>0&&s[o-1][2]>r;o--)s[o]=s[o-1];s[o]=[t,n,r];return}for(var i=1/0,o=0;o<s.length;o++){for(var[t,n,r]=s[o],c=!0,u=0;u<t.length;u++)(!1&r||i>=r)&&Object.keys(a.O).every(e=>a.O[e](t[u]))?t.splice(u--,1):(c=!1,r<i&&(i=r));if(c){s.splice(o--,1);var l=n();void 0!==l&&(e=l)}}return e},a.rv=()=>"1.7.4",a.j="509",a.g.importScripts&&(u=a.g.location+"");var i,c,s,u,l=a.g.document;if(!u&&l&&(l.currentScript&&"SCRIPT"===l.currentScript.tagName.toUpperCase()&&(u=l.currentScript.src),!u)){var d=l.getElementsByTagName("script");if(d.length)for(var f=d.length-1;f>-1&&(!u||!/^http(s?):/.test(u));)u=d[f--].src}if(!u)throw Error("Automatic publicPath is not supported in this browser");a.p=u=u.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.b=document.baseURI||self.location.href,e={509:0},a.O.j=t=>0===e[t],t=(t,n)=>{var r,o,[i,c,s]=n,u=0;if(i.some(t=>0!==e[t])){for(r in c)a.o(c,r)&&(a.m[r]=c[r]);if(s)var l=s(a)}for(t&&t(n);u<i.length;u++)o=i[u],a.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return a.O(l)},(n=self.webpackChunk_diplodoc_client=self.webpackChunk_diplodoc_client||[]).forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n)),a.ruid="bundler=rspack@1.7.4";var h=a.O(void 0,["85","474"],()=>a(81253));h=a.O(h)})();
2
- //# sourceMappingURL=app-c87e24eeaae1b0dc.js.map
@@ -1,2 +0,0 @@
1
- (()=>{var e,t,r,n={66008(){var e,t;"u">typeof Element&&((t=(e=Element.prototype).matches||e.matchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector)?e.matches=e.matchesSelector=t:e.matches=e.matchesSelector=function(e){var t=this;return Array.prototype.some.call(document.querySelectorAll(e),function(e){return e===t})})},77628(e,t,r){"use strict";var n,o=r(71893),a=r(74848),i=r(96540),c=r(5338),u=r(33324),l=r(78184),s=r(81836),d=r(12905),h=(0,i.createContext)({pathname:"/",depth:0});h.displayName="RouterContext";var f=h.Provider,p=(0,i.createContext)(l.JA.En);p.displayName="Lang";var g=p.Provider,v=r(60478),m={theme:l.Sx.Light,textSize:l.ov.M,showMiniToc:!0,wideFormat:!0,fullScreen:!1},y=["ar","arc","ckb","dv","fa","ha","he","khw","ks","ps","sd","ur","uz_AF","yi"],w=((n={}).RTL="rtl",n.LTR="ltr",n);function _(){return"u">typeof document}(0,v._)(new Set((0,v._)(["href"]).concat((0,v._)(["src","url","href","icon","image","desktop","mobile","tablet","previewImg","image","avatar","logo","light","dark"]))));var b=function(e){return"boolean"==typeof e?e:!!e&&"true"===e};function S(){return!!_()&&document.body.clientWidth<769}function x(e){if(!_())return m[e];try{return sessionStorage.getItem(e)||m[e]}catch(t){return m[e]}}var k=r(50467),C=r(53014);function j(e,t){var r=(0,C._)((0,i.useState)(t[e]),2),n=r[0],o=r[1],a=(0,i.useMemo)(function(){var t,r;return t=e,r=o,function(e){if(_())try{sessionStorage.setItem(t,String(e))}catch(e){}r(e)}},[e,o]);return(0,i.useMemo)(function(){var t;return t={},(0,k._)(t,e,n),(0,k._)(t,"onChange"+e.replace(/^./,function(e){return e.toUpperCase()}),a),t},[e,n,a])}var L=r(51937),M=r(23614),E=r(55456);r(20553),r(66008),r(6429);var O=(0,M.default)("Layout");function T(){return null}function N(){return null}function P(){return null}var R={doc:!1},A=function(e){var t,r,n,c=(0,o._)({},R,e),u=c.children,l=c.doc,s=c.headerHeight;return i.Children.forEach(u,function(e){switch(e.type){case T:t=e.props.children;break;case N:r=e.props.children;break;case P:n=e.props.children}}),(0,a.jsxs)("div",{className:O({"full-header":(void 0===s?0:s)>0}),children:[t&&(0,a.jsx)("div",{className:O("header"),children:t}),(0,a.jsxs)("div",{className:O("body"),children:[r&&(0,a.jsx)("div",{className:O("content"),children:r}),n&&(0,a.jsx)("div",{className:O("footer",{doc:l}),children:n})]})]})};A.displayName="Layout",A.Header=T,A.Content=N,A.Footer=P,(0,M.default)("pc-page-constructor"),(0,M.default)("pc-constructor-row"),(0,M.default)("Suggest");var q=r(26141),F=r(25346);(0,i.memo)(function(e){var t=e.mobileView,r=e.theme,n=e.onChangeTheme,o=e.textSize,i=e.onChangeTextSize,c=e.wideFormat,u=e.onChangeWideFormat,s=e.showMiniToc,d=e.onChangeShowMiniToc,h=e.lang,f=e.langs,p=e.onChangeLang,g=e.availableLangs;return(0,a.jsx)(q.n,{controlClassName:"Control",controlSize:l.Uv.L,isWideView:t,isMobileView:t,children:(0,a.jsx)(F.A,{className:"Controls",theme:r,onChangeTheme:n,wideFormat:c,onChangeWideFormat:u,showMiniToc:s,onChangeShowMiniToc:d,textSize:o,onChangeTextSize:i,lang:h,langs:f,onChangeLang:p,availableLangs:void 0===g?[]:g})})}).displayName="HeaderControls",r(58498),r(89457),r(57016),r(81397),r(59071);var z=r(41374),U=r(30494),I=r(99407),W=r(53750),V=r(51735),B=function(){function e(t){var n=this,a=this;(0,U._)(this,e),(0,k._)(this,"worker",void 0),(0,k._)(this,"config",void 0),(0,k._)(this,"init",function(){var e;e=(0,E._)((0,o._)({},n.config),{base:n.base,mark:"Suggest__Item__Marker"}),n.worker=(0,z._)(function(){var t;return(0,V._)(this,function(n){switch(n.label){case 0:return[4,(0,z._)(function(){var e,t,n;return(0,V._)(this,function(o){try{return[2,new Worker(new URL(r.p+r.u("976"),r.b))]}catch(r){if((0,W._)(r,DOMException)&&(e=H.exec(r.message)))return t=e[1],n=new Blob(["importScripts('".concat(t,"');")],{type:"text/javascript"}),[2,new Worker(URL.createObjectURL(n))];throw r}})})()];case 1:return[4,J(t=n.sent(),(0,E._)((0,o._)({},e),{type:"init"}))];case 2:return n.sent(),[2,t]}})})()}),(0,k._)(this,"link",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=new URLSearchParams;r&&o.set("query",r),n>1&&o.set("page",n.toString());var a=o.toString()?"?".concat(o.toString()):"";return"".concat(e,"/").concat(t.link).concat(a)}(a.base,a.config,e,t)}),this.config=t}return(0,I._)(e,[{key:"suggest",value:function(e){return(0,z._)(function(){return(0,V._)(this,function(t){return[2,this.request({type:"suggest",query:e})]})}).call(this)}},{key:"search",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return(0,z._)(function(){return(0,V._)(this,function(n){return[2,this.request({type:"search",query:e,page:t,count:r})]})}).call(this)}},{key:"base",get:function(){return window.location.href.split("/").slice(0,-this.config.depth).join("/")}},{key:"request",value:function(e){return(0,z._)(function(){return(0,V._)(this,function(t){switch(t.label){case 0:return[4,this.worker];case 1:return[2,J.apply(void 0,[t.sent(),e])]}})}).call(this)}}]),e}(),H=/Script at '(.*?)' cannot be accessed from origin/;function J(e,t){var r=new MessageChannel;return new Promise(function(n,o){r.port1.onmessage=function(e){e.data.error?o(e.data.error):n(e.data.result)},r.port1.onmessageerror=function(e){o(e.data.error)},e.postMessage(t,[r.port2])})}var $=(0,M.default)("Search");function D(e,t){var r=new URLSearchParams;e&&r.set("query",e),t>1&&r.set("page",String(t)),window.history.pushState({},"","?".concat(r.toString()))}var K=function(){var e,t,r,n,c,u,l,s,d=(e=(0,i.useContext)(p),r=void 0===(t=(0,i.useContext)(h).depth)?0:t,n=(0,i.useContext)(G),u=(c=(0,C._)((0,i.useState)(null),2))[0],l=c[1],s=(0,i.useMemo)(function(){return n?(0,E._)((0,o._)({},n),{depth:r,lang:e}):null},[e,r,n]),(0,i.useEffect)(function(){s&&l(s?new B(s):null)},[s]),u),f=(0,i.useContext)(h),g=(0,C._)((0,i.useState)(""),2),v=g[0],m=g[1],y=(0,C._)((0,i.useState)(1),2),w=y[0],_=y[1],b=(0,C._)((0,i.useState)([]),2),S=b[0],x=b[1],k=(0,C._)((0,i.useState)(0),2),j=k[0],M=k[1],O=(0,C._)((0,i.useState)(!1),2),T=O[0],N=O[1],P=(0,i.useRef)(null);(0,i.useEffect)(function(){var e;P.current=d,null==d||null==(e=d.init)||e.call(d)},[d]),(0,i.useEffect)(function(){var e,t={query:(e=new URLSearchParams(window.location.search)).get("query")||"",page:Number(e.get("page"))||1},r=t.query,n=t.page;m(r),_(n)},[f]),(0,i.useEffect)(function(){v&&P.current?(N(!0),P.current.search(v,w,10).then(function(e){var t,r=e.items,n=e.total;x(Array.isArray(t=null!=r?r:[])?t.map(function(e){var t,r,n;return{title:(null==e?void 0:e.title)||(null==e||null==(t=e.hierarchy)?void 0:t.lvl0)||(null==e||null==(r=e.hierarchy)?void 0:r.lvl1)||"",url:(null==e?void 0:e.url)||(null==e?void 0:e.link)||"#",description:(null==e?void 0:e.description)||(null==e?void 0:e.content)||(null==e?void 0:e.text)||"",section:(null==e?void 0:e.section)||(null==e||null==(n=e.hierarchy)?void 0:n.lvl1)||""}}):[]),M(n)}).catch(function(){x([]),M(0)}).finally(function(){return N(!1)})):(x([]),M(0))},[v,w,d]);var R=(0,i.useCallback)(function(e){D(v,e),_(e)},[v]),A=(0,i.useCallback)(function(e){D(e,1),m(e),_(1)},[]);return(0,a.jsx)("div",{className:$(),children:(0,a.jsx)(L.A,{query:v,items:S,page:w,totalItems:j,onPageChange:R,onSubmit:A,loading:T})})},G=(0,i.createContext)(null);G.displayName="SearchContext";var Q=G.Provider,X=document.getElementById("root");if(!X)throw Error("Root element not found!");var Y=window.__DATA__,Z=Y||{};Z.depth=Z.depth||3;var ee=new URL(window.location.href);(0,c.createRoot)(X).render((0,a.jsx)(function(e){var t,r,n,c,h,p,v,m,k,L,M,E,O,T,N,P=e.data,R=e.url,A=P.search,q=(null==A?void 0:A.lang)||l.JA.En,F=(v=j("theme",(t=x("theme"),r=x("textSize"),n=x("showMiniToc"),c=x("wideFormat"),h=x("fullScreen"),p={theme:t,textSize:r,showMiniToc:b(n),wideFormat:b(c),fullScreen:b(h)})),m=j("textSize",p),k=j("wideFormat",p),L=j("fullScreen",p),M=j("showMiniToc",p),(0,i.useMemo)(function(){return(0,o._)({},v,m,k,M,L)},[v,m,k,M,L])),z=(O=(E=(0,C._)((0,i.useState)(S()),2))[0],T=E[1],N=(0,i.useCallback)(function(){T(S())},[]),(0,i.useEffect)(N,[N]),(0,i.useEffect)(function(){return window.addEventListener("resize",N),function(){return window.removeEventListener("resize",N)}},[N]),O),U=s.Lq.includes(q)?q:l.JA.En,I=y.includes(U)?w.RTL:w.LTR;(0,d.jK)({lang:U,localeCode:U});var W={pathname:R.pathname,depth:3},V=F.theme,B=F.wideFormat;return(0,i.useEffect)(function(){var e={mobileView:z,wideFormat:B};if(_()){document.body.classList.add("g-root");var t=function(e,t){return document.body.classList.toggle(e,!!t)};Object.keys(e).forEach(function(r){switch(r){case"wideFormat":t("dc-root_wide-format",e[r]);break;case"focusSearch":t("dc-root_focused-search",e[r]);break;case"fullScreen":t("dc-root_full-screen",e[r]);break;case"landingPage":t("dc-root_document-page",!e[r]),t("dc-root_landing-page",e[r]);break;case"mobileView":t("mobile",e[r]),t("desktop",!e[r])}})}"u">typeof document&&document.querySelectorAll(".g-root").forEach(function(e){e.classList.toggle("g-root_theme_light","light"===V),e.classList.toggle("g-root_theme_dark","dark"===V)})},[V,z,B]),(0,a.jsx)(u.N,{theme:V,direction:I,children:(0,a.jsx)(g,{value:U,children:(0,a.jsx)(f,{value:W,children:(0,a.jsx)(Q,{value:A,children:(0,a.jsx)(K,{})})})})})},(0,o._)({},{data:Y,url:ee})))},98010(e,t,r){"use strict";function n(){}r.d(t,{A:()=>n})},14892(){},4320(){},80657(){},91190(){},7155(){},54318(){}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={id:e,loaded:!1,exports:{}};return n[e].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}a.m=n,a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(e,t){if(1&t&&(e=this(e)),8&t||"object"==typeof e&&e&&(4&t&&e.__esModule||16&t&&"function"==typeof e.then))return e;var r=Object.create(null);a.r(r);var n={};i=i||[null,c({}),c([]),c(c)];for(var o=2&t&&e;("object"==typeof o||"function"==typeof o)&&!~i.indexOf(o);o=c(o))Object.getOwnPropertyNames(o).forEach(t=>{n[t]=()=>e[t]});return n.default=()=>e,a.d(r,n),r},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.u=e=>""+e+"-40cbc1d2518eb8ea.js",a.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),u=[],a.O=(e,t,r,n)=>{if(t){n=n||0;for(var o=u.length;o>0&&u[o-1][2]>n;o--)u[o]=u[o-1];u[o]=[t,r,n];return}for(var i=1/0,o=0;o<u.length;o++){for(var[t,r,n]=u[o],c=!0,l=0;l<t.length;l++)(!1&n||i>=n)&&Object.keys(a.O).every(e=>a.O[e](t[l]))?t.splice(l--,1):(c=!1,n<i&&(i=n));if(c){u.splice(o--,1);var s=r();void 0!==s&&(e=s)}}return e},a.rv=()=>"1.7.4",a.j="328",a.g.importScripts&&(l=a.g.location+"");var i,c,u,l,s=a.g.document;if(!l&&s&&(s.currentScript&&"SCRIPT"===s.currentScript.tagName.toUpperCase()&&(l=s.currentScript.src),!l)){var d=s.getElementsByTagName("script");if(d.length)for(var h=d.length-1;h>-1&&(!l||!/^http(s?):/.test(l));)l=d[h--].src}if(!l)throw Error("Automatic publicPath is not supported in this browser");a.p=l=l.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.b=document.baseURI||self.location.href,e={328:0},a.O.j=t=>0===e[t],t=(t,r)=>{var n,o,[i,c,u]=r,l=0;if(i.some(t=>0!==e[t])){for(n in c)a.o(c,n)&&(a.m[n]=c[n]);if(u)var s=u(a)}for(t&&t(r);l<i.length;l++)o=i[l],a.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return a.O(s)},(r=self.webpackChunk_diplodoc_client=self.webpackChunk_diplodoc_client||[]).forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r)),a.ruid="bundler=rspack@1.7.4";var f=a.O(void 0,["85","474"],()=>a(77628));f=a.O(f)})();
2
- //# sourceMappingURL=search-b6246854f4238deb.js.map