function() {
  const selected = document.querySelector('[aria-current="${E}"]');
  if(selected) selected.scrollIntoView(${JSON.stringify({behavior:"auto",block:"center",inline:"nearest"})});
  });
  `,m=()=>{let t=(0,r("e4o8D").useRenderServerPlaceholder)();return((0,o.useLayoutEffect)(()=>{if(window.__SSR_RENDERED__){let e=document.createElement("script");return e.appendChild(document.createTextNode(g)),document.body.appendChild(e),()=>{document.body.removeChild(e)}}},[]),t)?e(o).createElement("script",{dangerouslySetInnerHTML:{__html:g}}):null},f=({afterIcon:t,beforeIcon:n,children:a,draggableState:i,dragHandleProps:g,indent:m,isSelected:f,href:_,isNav4Enabled:T,isDisabled:b,...h})=>e(o).createElement(p,{...g,...h,href:b?void 0:_||"#","aria-current":f?E:void 0,"data-testid":"page-tree-item",draggableState:i,indent:m,isSelected:f,isNav4Enabled:T,isDisabled:b,"aria-disabled":b},e(o).createElement(c,null,T&&!b&&e(o).createElement("div",{"aria-hidden":"true",className:(0,r("35pXk").default)(["_kqswstnw _152t1ssb _1e02ze3t _1bsbyh40 _4t3i1crf _t9ec1i34 _bfhk1o0g"])}),e(o).createElement(s,{isSelected:f,draggableState:i,isNav4Enabled:T},n),e(o).createElement(u,null,a),e(o).createElement(l,null,t)),"parent-of-instruction"===i?e(o).createElement(d,{"data-testid":"reparent-background"}):null)}),n("kSPGK",function(e,n){t(e.exports,"useOptimisticTitleChange",()=>i);var a=r("gwFzn");let o=new class{emit(e,t){this.listeners[e]&&this.listeners[e].forEach(e=>{e(t)})}subscribe(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}unsubcribe(e,t){if(this.listeners[e]){let r=this.listeners[e].findIndex(e=>e[0]===t);-1!==r&&this.listeners[e].splice(r,1)}}constructor(){this.listeners=void 0,this.listeners={}}},i=(e,t,n)=>{let[i,s]=(0,a.useState)(t),l=(0,a.useCallback)(t=>{t!==i&&o&&o.emit(e,t)},[e,i]),c=(0,a.useCallback)(t=>{(0,r("dh538").fg)("confluence_optimistic_pagetree_title_update")&&(s(t),n&&n(e,t))},[e,s,n]);return(0,a.useEffect)(()=>(o&&o.subscribe(e,c),()=>{o&&o.unsubcribe(e,c)}),[e,c]),(0,a.useEffect)(()=>{(0,r("dh538").fg)("confluence_optimistic_pagetree_title_update")&&s(t)},[t]),(0,r("dh538").fg)("confluence_optimistic_pagetree_title_update")?{optimisticTitle:i,setOptimisticTitle:l}:{optimisticTitle:t,setOptimisticTitle:e=>{}}}}),n("d0oNo",function(n,a){t(n.exports,"useModernizeChangeboardingActive",()=>s),t(n.exports,"useModernizeChangeboardingState",()=>l),t(n.exports,"WithModernizeChangeboardingActive",()=>u),t(n.exports,"WithModernizeNav4GlobalChangeboardingActive",()=>p),t(n.exports,"WithModernizeNav4SpaceSettingsChangeboardingActive",()=>E);var o=r("gwFzn");let i=(0,r("4ZoIm").createStore)({initialState:{active:!1,nav4GlobalChangeboardingActive:!1,nav4SpaceSettingsChangeboardingActive:!1},actions:{setActive:e=>({setState:t})=>{t({active:e})},nav4GlobalChangeboardingActive:e=>({setState:t})=>{t({nav4GlobalChangeboardingActive:e})},nav4SpaceSettingsChangeboardingActive:e=>({setState:t})=>{t({nav4SpaceSettingsChangeboardingActive:e})}}}),s=(0,r("iFWZA").createStateHook)(i,{selector:e=>e.active}),l=(0,r("iFWZA").createStateHook)(i),c=(0,r("iFWZA").createActionsHook)(i),d=({children:e,setActive:t})=>((0,o.useEffect)(()=>((0,r("9wGTI").fg)("confluence_frontend_exclude_changeboarding_from_vc")&&(0,r("4u5NT").abortAll)("new_interaction","modernize-changeboarding"),t(!0),()=>{t(!1)}),[t]),e),u=({children:t})=>{let{setActive:r}=c();return e(o).createElement(d,{setActive:r},t)},p=({children:t})=>{let{nav4GlobalChangeboardingActive:r}=c();return e(o).createElement(d,{setActive:r},t)},E=({children:t})=>{let{nav4SpaceSettingsChangeboardingActive:r}=c();return e(o).createElement(d,{setActive:r},t)}}),n("6DMfJ",function(e,r){t(e.exports,"BLOG_STATUSES",()=>n),t(e.exports,"VIRTUAL_ROOT_ID",()=>a),t(e.exports,"PAGE_SIZE",()=>o),t(e.exports,"INDENT_PER_LEVEL",()=>i);let n=["current","draft"],a="VIRTUAL_ROOT_ID",o=40,i=16}),n("brn6e",function(e,n){t(e.exports,"getEmojiFromEmojiId",()=>a),t(e.exports,"maybeOverrideFaviconWithEmoji",()=>l),t(e.exports,"onSelectEmoji",()=>c),t(e.exports,"onRemoveEmoji",()=>d),t(e.exports,"emojiExp",()=>u),t(e.exports,"removeEmojiFromTitle",()=>p),t(e.exports,"getEmojiFromTitle",()=>E),t(e.exports,"getTitleAndEmoji",()=>g);let a=async({userId:e,cloudId:t,emojiId:n})=>{let a=await (0,r("8rneB").getEmojiProvider)(t,e);if(a){let e=await a.findById(n);if(e)return a.loadMediaEmoji(e)}return Promise.resolve(null)},o=!1,i=null,s=e=>{document.querySelectorAll("link[rel~='icon']").forEach(t=>{o||(i=t.href,o=!0),t.href=e})},l=e=>{if((0,r("dh538").fg)("confluence_emoji_title_favicon")){if(!e){o&&i&&s(i);return}s(e)}},c=async({selectedEmoji:e,emojiProvider:t,onUpdateStartEmoji:n,createAnalyticsEvent:a,emojiTitleState:o,onEmojiUpdated:i,onUpdateEndEmoji:s,updateContentPropertyMutation:l,contentId:c,componentName:d,isLivePage:u,emojiStatusFieldName:p},E)=>{n&&n(),(0,r("3shHM").sendAnalyticsEvent)(a,{eventType:"sendUIEvent",element:"button",action:"clicked",actionSubject:"emojiPicker",actionSubjectId:"emoji",attributes:{emojiId:e?.id,inputMethod:"title",isLivePage:u}});let g=(0,r("5amrO").convertEmojiFieldNameToPropertyKey)(p),m=await t.loadMediaEmoji(e,!0);return o.setOpenSecondEmojiPicker(!1),o.setSelectedEmoji(m),i().then(({data:t})=>{let n=(0,r("8rneB").getVersionNumber)(t,p),a=n?n+1:1,i=e?.id?.replace(/['"]+/g,"")??"";return l({variables:{contentId:c,propertyKey:g,propertyValue:i,versionNumber:String(a)},update:e=>{try{let n=e.readQuery({query:r("87Z8O").getEmojiTitleProperty,variables:{contentId:c,status:["current","draft"],skipPublishedFragment:!0,draftShareId:(0,r("7PLO8").getDraftShareIdFromQueryParam)()}});n.content.nodes[0][p]&&(n.content.nodes[0][p].nodes[0]={...n.content.nodes[0][p].nodes[0],id:c,key:g,value:i,version:{number:a,__typename:"Version"}}),e.writeQuery({query:r("87Z8O").getEmojiTitleProperty,variables:{contentId:c,status:["current","draft"],skipPublishedFragment:!0,draftShareId:(0,r("7PLO8").getDraftShareIdFromQueryParam)()},data:t})}catch(e){throw Error(`${d} failed to write to cache while updating ${g} content property after user selecting emoji ${e.message}`)}},optimisticResponse:{__typename:"Mutation",experimentalUpdateContentProperty:{__typename:"ExperimentalUpdateContentProperty",success:!0,id:c,key:g,value:i}}}).then(()=>{s&&s(),o.setSelectedEmoji(m)}).catch(e=>{throw Error(`${d} failed to update ${g} content property after user selecting emoji ${e.message}`)})})},d=(e,{onUpdateStartEmoji:t,onUpdateEndEmoji:n,onEmojiUpdated:a,contentId:o,updateContentPropertyMutation:i,componentName:s="",emojiStatusFieldName:l})=>{t&&t();let c=(0,r("5amrO").convertEmojiFieldNameToPropertyKey)(l);return a().then(()=>i({variables:{contentId:o,propertyKey:c,isDelete:!0},update:e=>{try{let t=e.readQuery({query:r("87Z8O").getEmojiTitleProperty,variables:{contentId:o,status:["current","draft"],skipPublishedFragment:!0,draftShareId:(0,r("7PLO8").getDraftShareIdFromQueryParam)()}});t.content.nodes[0][l]={nodes:[],__typename:"PaginatedJsonContentPropertyList"},e.writeQuery({query:r("87Z8O").getEmojiTitleProperty,variables:{contentId:o,status:["current","draft"],skipPublishedFragment:!0,draftShareId:(0,r("7PLO8").getDraftShareIdFromQueryParam)()},data:t})}catch(e){throw Error(`${s} failed to write to cache while updating content property after user removing emoji ${e.message}`)}},optimisticResponse:{__typename:"Mutation",experimentalUpdateContentProperty:{__typename:"ExperimentalUpdateContentProperty",success:!0}}}).finally(()=>{n&&n()}).catch(e=>{throw Error(`${s} failed to update ${c} content property after user removing emoji ${e.message}`)}))},u=RegExp("^(\\p{RI}\\p{RI}|\\p{Extended_Pictographic}(\\p{Emoji_Modifier}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?(\\u{200D}\\p{Extended_Pictographic}(\\p{Emoji_Modifier}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?)*)","u"),p=e=>e&&e.replace(u,"").trimLeft()||"",E=e=>e&&u.exec(e)?.[0]||"",g=(e="",t="",r="",n="",a="",o=!0)=>{let i=o?E(e):"",s="";o&&(s=n?.toLowerCase()==="draft"?r:t);let l=i.length>0,c=s.length>0,d=c?s:i,u=l&&!c?p(e):e;return"draft"!==n||u||(u=a),{text:u,emoji:d,selectedEmoji:s}}}),n("3shHM",function(e,n){t(e.exports,"sendAnalyticsEvent",()=>a),t(e.exports,"trackDraftCreatedWithEmoji",()=>o),t(e.exports,"onFailedToLoadEmoji",()=>i);let a=(e,{eventType:t,element:r,action:n,actionSubject:a,actionSubjectId:o,attributes:i={}})=>{e({type:t,data:{action:n,source:"EmojiTitleSection",actionSubject:a,actionSubjectId:o,attributes:{element:r,...i}}}).fire()},o=async({createAnalyticsEvent:e,contentId:t,isLivePage:n})=>{let{data:o}=await (0,r("hp2SH").getApolloClient)().query({query:r("87Z8O").getEmojiTitleProperty,variables:{contentId:t,status:["current","draft"],skipPublishedFragment:!1}}),i=(0,r("8rneB").getEmojiId)(o,r("5amrO").EMOJI_TITLE_DRAFT_FIELD);i.length>=0&&""!==i&&a(e,{eventType:"sendTrackEvent",element:"",action:"created",actionSubject:"draftWithEmoji",actionSubjectId:"",attributes:{emojiId:i,isLivePage:n}})},i=({createAnalyticsEvent:e,emoji:t,context:r,error:n={message:""},isLivePage:o})=>{a(e,{eventType:"sendTrackEvent",element:"emoji",action:"error",actionSubject:"renderEmoji",actionSubjectId:"renderEmojiError",attributes:{emojiShortName:t&&t.shortName,emojiId:t&&t.id,context:r,errorMessage:n.message,isLivePage:o}})}}),n("dd6Gw",function(e,r){t(e.exports,"getEditorVersionFromPageProperties",()=>n);let n=e=>{let t=e?.properties?.nodes?.find(e=>e?.key==="editor"),r=(t?.value||"").replace(/['"]+/g,"");return"v1"!==r&&"v2"!==r?"":r}}),n("fnlEZ",function(e,n){t(e.exports,"BlogTree",()=>a);let a=(0,r("d2LG0").default)`query BlogTree($spaceKey:String!$first:Int$endCursor:String$statuses:[String]$orderBy:String){content(spaceKey:$spaceKey type:"blogpost" first:$first orderby:$orderBy after:$endCursor status:$statuses){pageInfo{hasNextPage endCursor}nodes{id title status blank properties(keys:["emoji-title-published" "emoji-title-draft" "editor"]){nodes{id key value}}links{webui}metadata{lastModifiedDate createdDate}}}}`}),n("2n8po",function(e,n){t(e.exports,"DropIndicator",()=>o),t(e.exports,"default",()=>i);var a=r("7UHDa");function o({appearance:e="default",edge:t,gap:n,indent:o,type:i}){return(0,a.jsx)(r("31bj1").Line,{edge:t,gap:n,strokeColor:r("9JSVA").presetStrokeColors[e],type:i,indent:o})}r("gwFzn");var i=o}),n("31bj1",function(e,n){t(e.exports,"Line",()=>c);var a=r("7UHDa");r("gwFzn");let o={top:"horizontal",bottom:"horizontal",left:"vertical",right:"vertical"},i={horizontal:"_4t3i10ly _1e02fghn _rjxpidpf _z5wtuj5p",vertical:"_1bsb10ly _154ifghn _94n5idpf _1aukuj5p"},s={top:"_154ihv0e _1auk70hn",right:"_1xi2hv0e _ooun70hn",bottom:"_94n5hv0e _19wo70hn",left:"_1ltvhv0e _qnec70hn"},l={terminal:({indent:e})=>`calc(var(--terminal-radius) + ${e})`,"terminal-no-bleed":({indent:e})=>`calc(var(--terminal-diameter) + ${e})`,"no-terminal":({indent:e})=>e};function c({edge:e,gap:t="0px",indent:n="0px",strokeColor:c=r("9JSVA").presetStrokeColors.default,strokeWidth:d=r("9JSVA").presetStrokeWidth,type:u="terminal"}){let p=o[e];return(0,a.jsx)("div",{style:{"--stroke-color":c,"--stroke-width":d,"--main-axis-offset":`calc(-0.5 * (${t} + var(--stroke-width)))`,"--line-main-axis-start":l[u]({indent:n}),"--terminal-display":"no-terminal"===u?"none":"block","--terminal-diameter":"calc(var(--stroke-width) * 4)","--terminal-radius":"calc(var(--terminal-diameter) / 2)","--terminal-main-axis-start":"calc(-1 * var(--terminal-diameter))","--terminal-cross-axis-offset":"calc(calc(var(--stroke-width) - var(--terminal-diameter)) / 2)"},className:(0,r("35pXk").default)(["_1e0c1ule _kqswstnw _1pbykb7n _lcxvglyw _bfhkys7w _rfx31ssb _3l8810ly _kzdanqa1 _15m6ys7w _cfu11ld9 _1kt9b3bt _1cs8stnw _13y0usvi _1mp4vjfa _kfgtvjfa",i[p],s[e]])})}}),n("9JSVA",function(e,r){t(e.exports,"presetStrokeColors",()=>n),t(e.exports,"presetStrokeWidth",()=>a);let n={default:"var(--ds-border-selected, #0C66E4)",warning:"var(--ds-border-warning, #E56910)"},a="var(--ds-border-width-outline, 2px)"}),n("882hS",function(e,n){t(e.exports,"pointerOutsideOfPreview",()=>r("85Mv7").pointerOutsideOfPreview),r("85Mv7")}),n("85Mv7",function(e,n){t(e.exports,"pointerOutsideOfPreview",()=>s);var a=r("ic3Jg"),o=r("iFRCn"),i=r("76xc7");function s(e){return function({container:t}){return(0,o.isSafariOnIOS)()||(0,a.isAndroid)()?(0,i.centerUnderPointer)({container:t}):(Object.assign(t.style,{borderInlineStart:`${e.x} solid transparent`,borderTop:`${e.y} solid transparent`}),"rtl"===window.getComputedStyle(t).direction)?{x:t.getBoundingClientRect().width,y:0}:{x:0,y:0}}}}),n("iFRCn",function(e,n){t(e.exports,"isSafariOnIOS",()=>i);var a=r("aYpzB"),o=r("e880Z");let i=(0,a.once)(function(){return(0,o.isSafari)()&&"ontouchend"in document})}),n("76xc7",function(e,r){t(e.exports,"centerUnderPointer",()=>n);let n=function({container:e}){let t=e.getBoundingClientRect();return{x:t.width/2,y:t.height/2}}}),n("jJDs8",function(e,n){t(e.exports,"attachInstruction",()=>s),t(e.exports,"extractInstruction",()=>l);let a=Symbol("tree-item-instruction");function o({client:e,borderBox:t}){let r=t.height/4;return e.y<=t.top+r?"reorder-above":e.y>=t.bottom-r?"reorder-below":"make-child"}let i=(0,r("fYKLM").stable)(function e(t,n){return t.type===n.type&&("instruction-blocked"===t.type&&"instruction-blocked"===n.type?e(t.desired,n.desired):(0,r("fYKLM").isShallowEqual)(t,n))});function s(e,{block:t,...r}){let n=i(function({desired:e,block:t}){return t?.includes(e.type)&&"instruction-blocked"!==e.type?{type:"instruction-blocked",desired:e}:e}({desired:function({element:e,input:t,currentLevel:r,indentPerLevel:n,mode:a}){let i={x:t.clientX,y:t.clientY},s=e.getBoundingClientRect();if("standard"===a)return{type:o({borderBox:s,client:i}),indentPerLevel:n,currentLevel:r};let l={x:(s.right+s.left)/2,y:(s.bottom+s.top)/2};if("expanded"===a){let e=o({borderBox:s,client:i});return{type:"reorder-above"===e?e:"make-child",indentPerLevel:n,currentLevel:r}}return i.x<s.left+n*r?i.y<l.y?{type:"reorder-above",indentPerLevel:n,currentLevel:r}:{type:"reparent",desiredLevel:Math.max(Math.floor((i.x-s.left)/n),0),indentPerLevel:n,currentLevel:r}:{type:o({borderBox:s,client:i}),indentPerLevel:n,currentLevel:r}}(r),block:t}));return{...e,[a]:n}}function l(e){return e[a]??null}}),n("fYKLM",function(e,r){function n(e,t){let r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every(r=>Object.is(e[r],t[r]))}function a(e=n){let t=null;return r=>t&&e(t.value,r)?t.value:(t={value:r}).value}t(e.exports,"isShallowEqual",()=>n),t(e.exports,"stable",()=>a)}),n("ft7TS",function(e,n){t(e.exports,"DropIndicator",()=>i);var a=r("7UHDa");function o({instruction:e,isBlocked:t}){let n=`${e.currentLevel*e.indentPerLevel}px`,o=t?"warning":"default";if("reorder-above"===e.type)return(0,a.jsx)(r("2n8po").DropIndicator,{edge:"top",appearance:o,indent:n});if("reorder-below"===e.type)return(0,a.jsx)(r("2n8po").DropIndicator,{edge:"bottom",appearance:o,indent:n});if("make-child"===e.type)return(0,a.jsx)(r("aTio4").DropIndicator,{appearance:o,indent:n});if("reparent"===e.type){let t=`${e.desiredLevel*e.indentPerLevel}px`;return(0,a.jsx)(r("2n8po").DropIndicator,{edge:"bottom",appearance:o,indent:t})}return null}function i({instruction:e}){return"instruction-blocked"===e.type?o({instruction:e.desired,isBlocked:!0}):o({instruction:e,isBlocked:!1})}r("gwFzn")}),n("aTio4",function(e,n){t(e.exports,"DropIndicator",()=>o);var a=r("7UHDa");function o({appearance:e="default",indent:t}){return(0,a.jsx)(r("8Mgg9").Border,{strokeColor:r("9JSVA").presetStrokeColors[e],indent:t})}r("gwFzn")}),n("8Mgg9",function(e,n){t(e.exports,"Border",()=>o);var a=r("7UHDa");function o({strokeColor:e=r("9JSVA").presetStrokeColors.default,strokeWidth:t=r("9JSVA").presetStrokeWidth,borderRadius:n="3px",indent:o="0px"}){return(0,a.jsx)("div",{style:{"--stroke-color":e,"--stroke-width":t,"--border-radius":n,"--indent":o},className:(0,r("35pXk").default)(["_19it1ebc _2rko1koq _kqswstnw _152tidpf _u7coidpf _rjxpidpf _1e02armj _lcxvglyw"])})}r("gwFzn")}),n("sD2Tz",function(n,a){t(n.exports,"EditContentButtonPreloader",()=>i);var o=r("gwFzn");let i=({contentId:t,spaceKey:n,children:a,editSource:i,isEmbeddedEditor:s})=>{let l=(0,o.useContext)(r("58PBI").EditContentButtonPreloaderContext),[c,d]=(0,o.useState)(!1),[{editSource:u},{setEditSource:p}]=(0,r("4ri4I").useEditSource)();(0,o.useEffect)(()=>()=>{c&&r("1Gu3g").EditorPreloadManager.removePreloadedId(t)},[c,t]);let E=(0,o.useCallback)(async()=>{r("1Gu3g").EditorPreloadManager.shouldPreload(t)&&(d(!0),p(i))},[t,i]);return e(o).createElement(o.Fragment,null,e(o).createElement("div",{onMouseEnter:E},a),i===u&&c&&l?l({contentId:t,spaceKey:n,isEmbeddedEditor:s}):null)}}),n("1Gu3g",function(e,r){t(e.exports,"EditorPreloadManager",()=>n);class n{static shouldPreload(e){return!this.cache.has(e)&&(this.cache.add(e),!0)}static removePreloadedId(e){this.cache.delete(e),this.intentCache.delete(e)}static clear(){this.cache.clear(),this.intentCache.clear()}}n.cache=new Set,n.intentCache=new Set});
//# sourceMappingURL=BlogTree.5cdb5f4f.js.map
