PageSourceSearch

https://yadro.com/_next/static/chunks/1407-1ab375fa399f87e2.js

js yadro.com collected 2026-10-02 07:24:37 UTC 16,352 bytes, 2 lines download raw bytes

1!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="22a93512-69da-48f3-9c45-5a27adf7dd34",t._sentryDebugIdIdentifier="sentry-dbid-22a93512-69da-48f3-9c45-5a27adf7dd34")}catch(t){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1407],{33978:function(t,e,n){n.d(e,{V:function(){return r}});var a=n(16384);let o="/api/v1/docs";class r{static async getProducts(t){return t?await a.h.get("".concat(o,"/products/?group=").concat(t)):await a.h.get("".concat(o,"/products/"))}static async getCategories(t){return t?await a.h.get("".concat(o,"/categories/?product_id=").concat(t)):await a.h.get("".concat(o,"/categories/"))}static async getReleases(t){return await a.h.get("".concat(o,"/releases/?category_id=").concat(t))}static async getDocuments(t){return t?await a.h.get("".concat(o,"/documents/?").concat(t)):await a.h.get("".concat(o,"/documents/"))}static async getDocumentSchema(t){return await a.h.get("".concat(o,"/documents/").concat(t,"/schema/"))}static async getDocumentPDF(t){return await a.h.get("".concat(o,"/documents/").concat(t,"/pdf/"),{responseType:"arraybuffer"})}static async getDocumentContent(t){let e=t.split("#")[0];return await a.h.get("".concat(o,"/documents/").concat(e,"/html/"))}static async getBreadcrumbPath(t,e,n){return await a.h.get("".concat(o,"/documents/").concat(t,"/version/").concat(e,"/category/").concat(n,"/breadcrumbs/"))}static async getDocumentSearch(t){return(await a.h.get("".concat(o,"/search/").concat(t))).data}static async postSearch(t){let e=[t.product_id&&"product_id=".concat(encodeURIComponent(t.product_id)),t.category_id&&"category_id=".concat(encodeURIComponent(t.category_id)),t.ease_id&&"release_id=".concat(encodeURIComponent(t.ease_id)),t.phrase&&"phrase=".concat(encodeURIComponent(t.phrase))].filter(Boolean).join("&");return await a.h.post("".concat(o,"/search/start?").concat(e))}static async getTreadData(t){return await a.h.get("".concat(o,"/search/results?thread_id=").concat(t.thread_id,"&run_id=").concat(t.run_id))}static async postSearchEvent(t){return await a.h.post("/api/v1/search/events/clicks",t)}static async getDocumentationScheme(){return await a.h.get("/api/v1/docs/schema/")}}},2962:function(t,e,n){n.d(e,{Fs:function(){return o},Z0:function(){return a}});let a="smart_search_search_query",o={сервер:"Полная техническая документация на серверы YADRO. Руководства по эксплуатации, установке и сервисные мануалы для специалистов.",коммутатор:"Техническая документация на коммутаторы KORNFELD YADRO. Руководства по настройке, спецификации портов и инструкции по интеграции в сеть.",схд:"Вся техническая документация на системы хранения данных TATLIN от YADRO. Руководства по развертыванию, управлению и обновлению.","дисковые модули расширения":"Техническая документация на дисковые модули расширения Yadro. Руководства пользователя, руководство по обновлению, QuickStart Guide.",по:"Программное обеспечение для управления и мониторинга продуктов YADRO"}},18318:function(t,e,n){n.d(e,{J:function(){return a}});let a=(t,e)=>{let n=e.findIndex(e=>e.id===t),a={value:void 0,name:""};return n>-1&&(a.value=String(e[n].id),a.name=e[n].version?e[n].version:e[n].name||""),a}},40510:function(t,e,n){n.d(e,{Fs:function(){return a.Fs},uU:function(){return o}});var a=n(2962);n(37122),n(17177);let o=t=>!t||(null==t?void 0:t.length)<3||(null==t?void 0:t.length)>100},37122:function(t,e,n){n.d(e,{L:function(){return r}});var a=n(33978),o=n(56280);let r=t=>{let{updateCategoriesList:e,setFetchStatus:n}=t,r=window.sessionStorage.getItem("activeProduct"),i=window.sessionStorage.getItem("activeCategory"),c=window.sessionStorage.getItem("nextPage"),u=o.o.getState().activeVersionId,s="";Number(r)>-1&&(s="".concat(s,"product_id=").concat(r)),Number(i)>-1&&(s="".concat(s,"&category_id=").concat(i)),u>-1&&(s="".concat(s,"&release_id=").concat(u)),Number(c)>1&&(s="".concat(s,"&page=").concat(c)),document.documentElement.scrollHeight-(document.documentElement.scrollTop+window.innerHeight)<100&&(window.sessionStorage.setItem("nextPage","0"),Number(c)>1&&(n("pending"),a.V.getDocuments(s).then(t=>{t.data.next&&window.sessionStorage.setItem("nextPage",t.data.next.split("page=")[1].split("&")[0]),t.data.results.length>0&&e(t.data.results[0].categories),n("success")})))}},17177:function(t,e,n){n.d(e,{i:function(){return o}});var a=n(33978);let o=t=>{let e=t=>{let e=4294967295;for(let n=0;n<t.length;n++){e^=t.charCodeAt(n);for(let t=0;t<8;t++)e=e>>>1^(1&e?3988292384:0)}return(4294967295^e)>>>0};if(t.activeVersion>-1||t.frameActive){t.setData(),t.setFetchStatus("pending");let n="";t.activeProduct>-1&&(n="".concat(n,"product_id=").concat(t.activeProduct)),t.activeCategory>-1&&(n="".concat(n,"&category_id=").concat(t.activeCategory)),t.activeCategory>-1&&(n="".concat(n,"&release_id=").concat(t.activeVersion));let o=!1,r=setTimeout(()=>{o=!0,t.setFetchStatus("timeout")},2e4);a.V.getDocuments("".concat(n,"&page=1")).then(n=>{if(!o){if(clearTimeout(r),200===n.status)t.setData(n.data),t.setFetchStatus("success");else{t.setFetchStatus("error");return}if(n.data&&n.data.next?window.sessionStorage.setItem("nextPage",n.data.next.split("page=")[1].split("&")[0]):window.sessionStorage.setItem("nextPage","0"),n.data){var a,i,c,u,s,d;window.localStorage.removeItem("frameActiveProduct");let t="undefined"===sessionStorage.getItem("activeProductType")?"null":sessionStorage.getItem("activeProductType"),o=(null===(a=n.data.results[0])||void 0===a?void 0:a.name)||"",r=(null===(c=n.data.results[0])||void 0===c?void 0:null===(i=c.categories[0])||void 0===i?void 0:i.name)||"",l=(null===(d=n.data.results[0])||void 0===d?void 0:null===(s=d.categories[0])||void 0===s?void 0:null===(u=s.releases[0])||void 0===u?void 0:u.version)||"",v=e("".concat(t,"/").concat(o,"/").concat(r,"/").concat(l)).toString(16);window.sessionStorage.setItem("filterCast",v)}}}).catch(()=>{o||(clearTimeout(r),t.setFetchStatus("error"))})}}},61407:function(t,e,n){n.d(e,{$q:function(){return o.$q},DN:function(){return o.DN},Dk:function(){return o.Dk},Ve:function(){return o.Ve},eX:function(){return r.e},oR:function(){return a.o},rT:function(){return o.rT},vA:function(){return r.v}});var a=n(56280),o=n(73203),r=n(69347);n(4622)},73203:function(t,e,n){n.d(e,{$q:function(){return P},AZ:function(){return f},CW:function(){return I},DB:function(){return r},DN:function(){return U},Dk:function(){return w},FN:function(){return h},HV:function(){return l},Io:function(){return c},KY:function(){return d},MB:function(){return S},QX:function(){return s},Rb:function(){return i},S2:function(){return F},Su:function(){return V},Tj:function(){return v},U:function(){return T},UD:function(){return D},Uw:function(){return p},Ve:function(){return E},XX:function(){return b},YE:function(){return y},a_:function(){return a},cS:function(){return A},g6:function(){return _},pf:function(){return g},rT:function(){return q},sH:function(){return m},sT:function(){return u},vX:function(){return C},yA:function(){return o}});let a=t=>t.setData,o=t=>t.data,r=t=>t.updateCategoriesList,i=t=>t.equipmentData,c=t=>t.getProducts,u=t=>t.setActiveProduct,s=t=>t.products,d=t=>t.activeProductId,l=t=>t.getCategories,v=t=>t.categories,g=t=>t.activeCategoryId,m=t=>t.setActiveCategory,f=t=>t.getVersions,h=t=>t.versions,p=t=>t.activeVersionId,S=t=>t.setActiveVersion,y=t=>t.setFetchStatus,D=t=>t.fetchStatus,w=t=>t.documentationSchemeStatus,I=t=>t.activeUrl,_=t=>t.setActiveUrl,P=t=>t.breadcrumbItems,C=t=>t.setBreadcrumbItems,b=t=>t.isFrame,T=t=>t.productType,F=t=>t.activeProductType,A=t=>t.setProductTypes,V=t=>t.setActiveProductType,E=t=>t.documentationScheme,U=t=>t.setDocumentationScheme,q=t=>t.setDocumentationSchemeStatus},4622:function(t,e,n){n.d(e,{R:function(){return m}});var a=n(41081),o=n(89154),r=n(10531),i=n(33978),c=n(40510),u=n(56280),s=n(73203),d=n(18318),l=n(2962),v=n(5073);let g=()=>{let[t,e]=(0,a.useState)(null),[n,o]=(0,a.useState)(!0);return(0,a.useEffect)(()=>{(async()=>{try{let t="true"===v.env.NEXT_PUBLIC_ENABLE_SMART_SEARCH;e({data:{attributes:{is_inner_user:t}}})}catch(t){console.error("Error fetching user data:",t),e({data:{attributes:{is_inner_user:!1}}})}finally{o(!1)}})()},[]),{userInfo:t,isInitiatorDataLoading:n}},m=()=>{var t,e,n,v,m,f,h,p,S,y,D,w,I,_,P,C,b,T;let{userInfo:F,isInitiatorDataLoading:A}=g(),[V,E]=(0,a.useState)(""),[U,q]=(0,a.useState)(null),N=(0,u.o)(s.QX),R=(0,u.o)(s.KY),k=(0,u.o)(s.Tj),L=(0,u.o)(s.pf),x=(0,u.o)(s.FN),B=(0,u.o)(s.Uw),X=(null===(t=(0,d.J)(R,N))||void 0===t?void 0:t.value)||"",Y=(null===(e=(0,d.J)(L,k
1))||void 0===e?void 0:e.value)||"",H=(null===(n=(0,d.J)(B,x))||void 0===n?void 0:n.value)||"",{mutate:K,data:O,isPending:j,error:J}=(0,o.D)({mutationFn:async t=>await i.V.postSearch(t)}),M=(0,a.useCallback)(t=>{K(t)},[K]),{data:W,isLoading:Z,isFetching:$,error:Q,refetch:G}=(0,r.a)({queryKey:["getTreadData"],queryFn:async()=>{var t,e,n,a;if((null==O?void 0:null===(t=O.data)||void 0===t?void 0:t.thread_id)!==void 0&&(null==O?void 0:null===(e=O.data)||void 0===e?void 0:e.run_id)!==void 0)return i.V.getTreadData({run_id:null==O?void 0:null===(n=O.data)||void 0===n?void 0:n.run_id,thread_id:null==O?void 0:null===(a=O.data)||void 0===a?void 0:a.thread_id})},enabled:!!O&&(null==O?void 0:null===(v=O.data)||void 0===v?void 0:v.thread_id)!==void 0&&(null==O?void 0:null===(m=O.data)||void 0===m?void 0:m.run_id)!==void 0});(0,a.useEffect)(()=>{null!==localStorage.getItem(l.Z0)&&E(localStorage.getItem(l.Z0)||"")},[]),(0,a.useEffect)(()=>{V&&!(0,c.uU)(V)&&M({phrase:V,product_id:String(X),category_id:String(Y),ease_id:String(H)})},[V,M,X,Y,H]);let{mutate:z}=(0,o.D)({mutationFn:async t=>await i.V.postSearchEvent(t)}),tt=(0,a.useCallback)(t=>new Promise(e=>{var n;z({...t,run_id:(null==O?void 0:null===(n=O.data)||void 0===n?void 0:n.run_id)||""},{onSuccess:t=>{e(t)},onError:()=>{e(null)}})}),[z,null==O?void 0:null===(f=O.data)||void 0===f?void 0:f.run_id]),te=(0,a.useCallback)(t=>{q(t)},[q]);(0,a.useEffect)(()=>{var t,e,n,a;let o;let r=0;return((null==W?void 0:null===(e=W.data)||void 0===e?void 0:null===(t=e.thread)||void 0===t?void 0:t.status)==="queued"||(null==W?void 0:null===(a=W.data)||void 0===a?void 0:null===(n=a.thread)||void 0===n?void 0:n.status)==="in_progress")&&(o=setInterval(()=>{r<100?!Z&&!$&&(G(),r++):clearInterval(o)},1e3)),()=>{o&&clearInterval(o)}},[null==W?void 0:null===(p=W.data)||void 0===p?void 0:null===(h=p.thread)||void 0===h?void 0:h.status,G,Z,$]),(0,a.useEffect)(()=>{var t,e;!U||j||$||Z||(null==W?void 0:null===(e=W.data)||void 0===e?void 0:null===(t=e.thread)||void 0===t?void 0:t.status)!=="completed"||q(null)},[j,$,Z,V,q,null==W?void 0:null===(y=W.data)||void 0===y?void 0:null===(S=y.results)||void 0===S?void 0:S.length,null==W?void 0:null===(w=W.data)||void 0===w?void 0:null===(D=w.thread)||void 0===D?void 0:D.status,U]);let tn=(0,a.useMemo)(()=>{var t;return(null==x?void 0:null===(t=x.find(t=>t.id===Number(H)))||void 0===t?void 0:t.version)||""},[x,H]);return{isShowSearch:(null==F?void 0:null===(_=F.data)||void 0===_?void 0:null===(I=_.attributes)||void 0===I?void 0:I.is_inner_user)||!1,isShowSearchLoading:A,setSearchQuery:E,threadStatus:null==W?void 0:null===(C=W.data)||void 0===C?void 0:null===(P=C.thread)||void 0===P?void 0:P.status,isCreatingThread:j,isCreatingThreadError:J,searchQuery:V,createThreadInfoStatus:null==O?void 0:null===(b=O.data)||void 0===b?void 0:b.status,searchThreadData:null==W?void 0:null===(T=W.data)||void 0===T?void 0:T.results,isSearchThreadDataLoading:Z||$,isSearchThreadLoadingError:Q,sendEventStatistic:tt,handleSearchVariant:te,versionName:V&&tn}}},69347:function(t,e,n){n.d(e,{e:function(){return o},v:function(){return u}});var a,o,r=n(10531),i=n(33978);(a=o||(o={})).getProducts="getProducts",a.getDocuments="getDocuments",a.getDocumentContent="getDocumentContent",a.getDocumentSearch="getDocumentSearch";let c={getProducts:i.V.getProducts,getDocuments:i.V.getDocuments,getDocumentContent:i.V.getDocumentContent,getDocumentSearch:i.V.getDocumentSearch},u=function(t,e){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],{data:a,status:o,error:i,isError:u}=(0,r.a)({queryKey:[t,e],queryFn:()=>(0,c[t])(e),gcTime:0,enabled:n});return{data:a,status:o,error:i,isError:u}}},56280:function(t,e,n){n.d(e,{o:function(){return i}});var a=n(43206),o=n(19330),r=n(51276);let i=(0,a.U)()((0,r.mW)((0,o.n)(t=>({data:[],equipmentData:[],selectedEquipmentData:[],releases:[],activeEquipment:"",activeUrl:"",productType:[],activeProductType:"",products:[],activeProductId:-1,productIDforPagination:-1,categories:[],activeCategoryId:-1,versions:[],activeVersionId:-1,filterParams:"",fetchStatus:"",documentationSchemeStatus:"",breadcrumbItems:[{name:"Главная",path:"/"},{name:"Документация",path:"/ru/documentation"}],downloadFiles:[],isFrame:!1,documentationScheme:[],setDocumentationScheme:e=>{t(t=>{t.documentationScheme=e},!1,"setDocumentationScheme")},setDownloadFiles:e=>t(t=>{t.downloadFiles.push(e)},!1,"setDownloadFiles"),clearDownloadFiles:e=>t(t=>{if(e){let n=t.downloadFiles.findIndex(t=>t===e);n>=0&&t.downloadFiles.splice(n)}else t.downloadFiles=[]},!1,"clearDownloadFiles"),getProducts:e=>t(t=>{t.products=e.map(t=>{var e;return{...t,name:null===(e=t.name)||void 0===e?void 0:e.toUpperCase()}}).sort((t,e)=>(t.name||"")<(e.name||"")?-1:1)},!1,"getProducts"),getCategories:e=>t(t=>{e.sort((t,e)=>(t.name||"").toLowerCase()<(e.name||"").toLowerCase()?-1:1),t.categories=e,1===e.length&&(t.activeCategoryId=Number(e[0].id))},!1,"getCategories"),setActiveProduct:e=>t(t=>{t.activeCategoryId=-1,t.activeVersionId=-1,t.activeProductId=e,t.productIDforPagination=e},!1,"setActiveProduct"),setActiveCategory:e=>t(t=>{t.activeVersionId=-1,t.activeCategoryId=e},!1,"setActiveCategory"),getVersions:e=>t(t=>{t.versions=e},!1,"getVersions"),setActiveVersion:e=>t(t=>{t.activeVersionId=e},!1,"setActiveVersion"),setFilterParams:e=>t(t=>{t.filterParams=e},!1,"setFilterParams"),setData:e=>t(t=>{t.data=e?e.results:[],t.equipmentData=t.data.length>0?t.data[0].categories:[],t.fetchStatus="success"},!1,"setData"),updateCategoriesList:e=>t(t=>{t.equipmentData=t.equipmentData.concat(e)},!1,"updateCategoriesList"),setFetchStatus:e=>t(t=>{t.fetchStatus=e},!1,"setFetchStatus"),setDocumentationSchemeStatus:e=>t(t=>{t.documentationSchemeStatus=e},!1,"setDocumentationSchemeStatus"),setProductTypes:e=>t(t=>{let n=new Map;e.forEach(t=>{t.id&&n.set(String(t.id),{id:t.id,name:t.name})}),t.productType=Array.from(n.values())},!1,"setProductTypes"),setActiveProductType:e=>t(t=>{t.activeProductType=e,t.activeProductId=-1,t.activeCategoryId=-1,t.activeVersionId=-1},!1,"setActiveProductType"),setActiveUrl:e=>{let[n,a]=e.split("#");"undefined"!=typeof sessionStorage&&(a?sessionStorage.setItem("fragment",a):sessionStorage.removeItem("fragment")),t(t=>{t.activeUrl=n},!1,"setActiveUrl")},setBreadcrumbItems:e=>{t(t=>{t.breadcrumbItems.splice(2),e&&(t.breadcrumbItems=t.breadcrumbItems.concat(e))},!1,"setBreadcrumbItems")},setIsFrame:e=>{t(t=>{t.isFrame=e})}}))))},16384:function(t,e,n){n.d(e,{h:function(){return c}});var a=n(38117),o=n(26470),r=n(11720);let i=n(5073).env.NEXT_PUBLIC_API_URL||"",c=r.default.create({baseURL:i,withCredentials:!0});c.interceptors.response.use(t=>t,t=>{var e,n,r,i,c;return r=null===(e=t.response)||void 0===e?void 0:e.status,i="WAF Blocked Request (477) in Axios",c=null===(n=t.config)||void 0===n?void 0:n.url,477===r&&a.$e(t=>{t.setTag("waf_blocked","true"),t.setTag("http.status_code","477"),c&&t.setContext("request_details",{url:c}),o.uT(i||"WAF Blocked Request (477)","warning")}),console.error("API Error:",t),Promise.reject(t)})}}]);
2//# sourceMappingURL=1407-1ab375fa399f87e2.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.