WRMCB=function(e){var c=console;if(c&&c.log&&c.error){c.log('Error running batched script.');c.error(e);}} ; try { /* module-key = 'com.atlassian.plugins.atlassian-connect-plugin:confluence-navigator-routes-v5', location = 'v5/js/confluence/navigator/routes.js' */ !function(e,t){"use strict";t(["ac/navigator/routes","ac/navigator/utils","ac/confluence/utils"],(function(t,n,o){var a=["page","blogpost","attachment","comment"],i=["page","blogpost","whiteboard"],r={page:"/api/v2/pages/",blogpost:"/api/v2/blogposts/",whiteboard:"/api/v2/whiteboards/",database:"/api/v2/databases/",embed:"/api/v2/embeds/",folder:"/api/v2/folders/"},c=AJS.contextPath(),s=(AJS.Meta.get("enabled-dark-features"),n.hasContext),d=n.appendQueryParam,p={dashboard:"",contentedit:function(e,t){if(s(e,"contentId")){e.contentId;u(e.contentId,(function(e){var n=e.type;l(n)?t(c+"/display/"+e.space.key+"/customcontent/edit/"+e.id):!function(e){return-1!==a.indexOf(e)}(n)?AJS.error('Cannot navigate to "contentedit" target for content (ID='+e.id+"). Content type <"+n+"> is not supported."):t(c+"/pages/edit"+n+".action?pageId="+e.id)}))}},contenteditv2:function(e,t){s(e,"contentId")&&f(e.contentId,(function(e){var n=e.contentType;l(n)?t(c+"/display/"+e.space.key+"/customcontent/edit/"+e.id):!function(e){return-1!==i.indexOf(e)}(n)?AJS.error('Cannot navigate to "contenteditv2" target for content (ID='+e.id+"). Content type <"+n+"> is not supported."):t(c+e._links.editui)}))},spacetools:"/spaces/viewspacesummary.action?key={spaceKey}",spaceview:"/spaces/{spaceKey}",userprofile:function(e,t){var n;s(e,"userAccountId")?n="/people/"+e.userAccountId:s(e,"username")&&(n=c+"/display/~"+e.username);n&&t(n)},contentview:function(e,t){s(e,"contentId")&&u(e.contentId,(function(n){v(n,e,t)}))},contentviewv2:function(e,t){s(e,"contentId")&&f(e.contentId,(function(n){v(n,e,t)}))},contentlist:function(e,t){var n=encodeURIComponent(e.spaceKey),o=e.contentType;"page"===o?t(c+"/spaces/"+n+"/pages"):"blogpost"===o?t(c+"/spaces/"+n+"/blog"):l(o)?t(c+"/display/"+n+"/customcontent/list/"+encodeURIComponent(o)):AJS.error('Cannot navigate to "contentlist" target for content type <'+o+">")}};t.addRoutes(p);n.enableApi();function u(t,n){e.ajax({url:c+"/rest/api/content/"+t,dataType:"json"}).done(n).fail((function(){AJS.error("Content not found (ID="+t+")")}))}function f(t,n){try{o.getContentType(e,t,(function(o){var a;if(l(o))a=c+"/api/v2/custom-content/"+t+"/";else{if(!r[o]){AJS.error("Unsupported content type for V2 API: "+o);return}a=c+r[o]+t+"/"}e.ajax({url:a,dataType:"json"}).done((function(e){e.contentType=o;n(e)})).fail((function(){AJS.error("Content not found (ID="+t+")")}))}))}catch(e){AJS.error("Error getting content type for V2 API: "+e.message)}}function v(e,t,n){var o=c+e._links.webui;s(t,"versionOverride")&&(o=d(o,"versionOverride",t.versionOverride));s(t,"embeddedContentRender")&&(o=d(o,"embeddedContentRender",t.embeddedContentRender));o&&n(o)}function l(e){return/^(ac:|forge:)/.test(e)}}))}(AJS.$,require); }catch(e){WRMCB(e)}; ; try { /* module-key = 'com.atlassian.plugins.atlassian-connect-plugin:confluence-navigator-routes-v5', location = 'v5/js/confluence/navigator/context.js' */ !function(t,n){"use strict";n(["ac/navigator/context","confluence/api/navigator-context"],(function(t,n){t.setContextFunction(n.getCurrent)}))}(AJS.$,require); }catch(e){WRMCB(e)};