1"use strict";(globalThis.webpackChunkwips_components_scripts||=[]).push([[13235],{cc30f9429d79d409(e,t,a){a.r(t),a.d(t,{default:()=>L}),a("27e0a48d3d4d9aab");var l=a("b641633d6c906d19"),i=a("99c472be6da17922"),n=a("a54fa6d0a722ba3f"),c=a("ab5c7e913102dd40"),r=a("6155503b942128ba"),d=a("2cd8b79e06d19d27"),o=a("4b8286c7297f47dc"),s=a("7d5db5aa799e1d34"),u=a("92c490e8e5efe9cd"),g=a("eb0d7dd6674ec63a"),v=a("6f4d764aaa9897a7"),p=a("101018c313582b37"),b=a("db64757cc986cc7f"),m=a("34a3dd721571e110"),f=a("fc91755686360c39"),h=a("31f89a0fd6ca3ca1"),_=a("eb2d2fe46a8c034e"),w=a("57d05961455c7f88");const C=["href","onClick"],k=["innerHTML"],y={key:0},A=["id","href","onClick"],E=["id","href"],P=(0,l.pM)({name:"SinglePageArticleView",directives:{ContextMenu:w.A}}),I=(0,l.pM)({...P,setup(e){const t=(0,l.$V)(()=>Promise.resolve().then(a.bind(a,"d9492f72911b6294"))),w=(0,l.$V)(()=>a.e(75528).then(a.bind(a,"0da68dbb8fafda3e"))),{t:P}=(0,c.s)(),I=(0,o.I)(v.G),{navigate:L}=(0,d.oy)(),$=(0,s.N)(v.G),R=(0,u.x)(v.G),{pageId:S,description:V}=(0,g.bP)(I),{pageStructure:X}=(0,g.bP)($),{isAdministrator:D}=(0,g.bP)(R);function F(e){return new h.n(P).editDocument("DhpArticle",e.id,P("Edit article")).deleteDocument("DhpArticle",e.id,P("Delete article")).build()}const T=(0,n.KR)(null);let M=null;const U=(0,l.EW)(()=>X.value?.currentPage),W=(0,l.EW)(()=>{const e=X.value?.sidebarNavigation?.parentPage;return e?e.url||`/?id=${e.id}`:null}),H=(0,l.EW)(()=>S.value?`/Api/v2/pages/${S.value}/dhp-articles?include=text&limit=200`:null),{data:x,isLoading:B}=(0,r.u)(H),K=(0,l.EW)(()=>x.value?.items??[]),N=(0,l.EW)(()=>x.value?.globalListing??!1),Q=(0,l.EW)(()=>D.value&&!N.value),j=(0,n.KR)([]);(0,l.wB)(K,e=>{j.value=[...e]},{immediate:!0});const J=(0,l.EW)(()=>K.value.map(e=>e.id).join(",")!==j.value.map(e=>e.id).join(","));function O(e,t){const a=j.value.splice(e,1)[0];j.value.splice(t,0,a)}function q(){j.value=[...K.value]}async function G(){await fetch("/admin/sorted-doctype-api/ordered-list",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({doctype:"DhpArticle",name:"contentplugin"+S.value,items:j.value.map(e=>e.id)})}),top?.location.reload()}function Y(){return document.body.classList.contains("has-admin-shell")?57:16}function Z(){const e=Y()+40;let t=null;for(const a of j.value){const l=document.getElementById("article-"+a.id);l&&l.getBoundingClientRect().top<=e&&(t=a.id)}null===t&&j.value.length>0&&(t=j.value[0].id),T.value=t}function z(){ee(),Z(),M=Z,window.addEventListener("scroll",M,{passive:!0})}function ee(){M&&(window.removeEventListener("scroll",M),M=null)}return(0,l.wB)(j,e=>{e.length>0&&requestAnimationFrame(()=>z())}),(0,l.sV)(()=>{j.value.length>0&&requestAnimationFrame(()=>z())}),(0,l.xo)(()=>{ee()}),(e,a)=>{const c=(0,l.gN)("context-menu");return(0,l.uX)(),(0,l.CE)("div",{class:(0,i.C4)(e.$style.page)},[(0,l.bF)(b.A),(0,l.Lk)("div",{class:(0,i.C4)(e.$style.wrapper)},[(0,l.bF)(p.A,{"back-url":W.value},{"above-menu":(0,l.k6)(()=>[j.value.length>0?((0,l.uX)(),(0,l.CE)("nav",{key:0,class:(0,i.C4)(e.$style.articleToc)},[(0,l.bF)(_.A,{"enable-ordering":Q.value,"drag-handle":".toc-drag-handle",draggable:".draggable-toc-item","block-list":j.value,"onUpdate:blockList":a[0]||(a[0]=e=>j.value=e),onReorder:O},{default:(0,l.k6)(()=>[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(j.value,t=>(0,l.bo)(((0,l.uX)(),(0,l.CE)("div",{key:t.id,class:(0,i.C4)(["draggable-toc-item",e.$style.tocItemRow])},[Q.value?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,i.C4)(["toc-drag-handle",e.$style.dragHandle]),"aria-hidden":"true"},"â ",2)):(0,l.Q3)("",!0),(0,l.Lk)("a",{href:"#article-"+t.id,class:(0,i.C4)([e.$style.tocItem,{[e.$style.tocActive]:T.value===t.id}]),onClick:e=>{return a=e,l=t.id,void((0,d.MO)(a)||(a.preventDefault(),function(e){const t=document.getElementById("article-"+e);if(t){const e=t.getBoundingClientRect().top+window.scrollY-Y();window.scrollTo({top:e,behavior:"smooth"})}}(l)));var a,l}},(0,i.v_)(t.title),11,C)],2)),[[c,F(t)]])),128))]),_:1},8,["enable-ordering","block-list"])],2)):(0,l.Q3)("",!0)]),_:1},8,["back-url"]),(0,l.Lk)("main",{class:(0,i.C4)(e.$style.main)},[(0,l.Lk)("header",{class:(0,i.C4)(e.$style.pageHeader)},[(0,l.Lk)("h1",null,(0,i.v_)(U.value?.title||(0,n.R1)(P)("Articles")),1),(0,n.R1)(V)?((0,l.uX)(),(0,l.CE)("div",{key:0,innerHTML:(0,n.R1)(V),class:(0,i.C4)(e.$style.pageDescription)}
1,null,10,k)):(0,l.Q3)("",!0)],2),(0,l.bF)(m.A),(0,n.R1)(B)?((0,l.uX)(),(0,l.CE)("div",y,(0,i.v_)((0,n.R1)(P)("Loading...")),1)):(0,l.Q3)("",!0),((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(j.value,(a,r)=>(0,l.bo)(((0,l.uX)(),(0,l.CE)("article",{key:a.id},[r>0?((0,l.uX)(),(0,l.CE)("hr",{key:0,class:(0,i.C4)(e.$style.separator)},null,2)):(0,l.Q3)("",!0),"redirect-permanent"===a.readmoreAction&&a.redirectUrl?((0,l.uX)(),(0,l.CE)("a",{key:1,id:"article-"+a.id,href:a.redirectUrl,class:(0,i.C4)(e.$style.redirectLink),target:"_blank",rel:"noopener",onClick:e=>function(e,t){(0,d.MO)(e)||(e.preventDefault(),t.redirectUrl&&L(t.redirectUrl))}(e,a)},[(0,l.Lk)("h2",null,(0,i.v_)(a.title),1),(0,l.bF)((0,n.R1)(t),{"icon-name":"open_in_new",class:(0,i.C4)(e.$style.redirectIcon)},null,8,["class"])],10,A)):"download-document"===a.readmoreAction&&a.documentUrl?((0,l.uX)(),(0,l.CE)("a",{key:2,id:"article-"+a.id,href:a.documentUrl,class:(0,i.C4)(e.$style.redirectLink),target:"_blank"},[(0,l.Lk)("h2",null,(0,i.v_)(a.title),1),(0,l.bF)((0,n.R1)(t),{"icon-name":"download",class:(0,i.C4)(e.$style.redirectIcon)},null,8,["class"])],10,E)):((0,l.uX)(),(0,l.Wv)(f.A,{key:3,article:a,"anchor-id":"article-"+a.id,"is-page-heading":!1},null,8,["article","anchor-id"]))])),[[c,F(a)]])),128))],2)],2),Q.value?((0,l.uX)(),(0,l.Wv)((0,n.R1)(w),{key:0,"unsaved-changes-text":(0,n.R1)(P)("Article order has been modified. Save changes?"),visible:J.value,onRevert:q,onSave:G},null,8,["unsaved-changes-text","visible"])):(0,l.Q3)("",!0)],2)}}}),L=(0,a("461bee8a7784aa7f").A)(I,[["__cssModules",{$style:{page:"SinglePageArticleView__page--CFwIX",wrapper:"SinglePageArticleView__wrapper--Nbj80",main:"SinglePageArticleView__main--K4ue6",pageHeader:"SinglePageArticleView__pageHeader--fZ9jT",pageDescription:"SinglePageArticleView__pageDescription--amIqn",tocItemRow:"SinglePageArticleView__tocItemRow--f_bgK",dragHandle:"SinglePageArticleView__dragHandle--Jf9Jc",redirectLink:"SinglePageArticleView__redirectLink--Uin1h",redirectIcon:"SinglePageArticleView__redirectIcon--BIteV",separator:"SinglePageArticleView__separator--NcuIC",articleToc:"SinglePageArticleView__articleToc--wMAbC",tocItem:"SinglePageArticleView__tocItem--h8hJO",tocActive:"SinglePageArticleView__tocActive--Xlll4"}}]])}}]);
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.