import{s as k,E as N,G as A,f as r,H as C,J as x,K as w,L as F,M as D,N as H,O,z as B,P,Q as m,T as L,D as j,U as R,V as T,W as S,X as U,Y as W}from"./index-DT8qTvyx.js";var I=function(g){k(l,g);function l(e){var t=this,n,o,a;t=g.call(this,e)||this;var i=e.store;return i.syncProps(e,void 0,["pages"]),i.updateActivePage(Object.assign({},(n=e.env)!==null&&n!==void 0?n:{},{showFullBreadcrumbPath:(o=e.showFullBreadcrumbPath)!==null&&o!==void 0?o:!1,showBreadcrumbHomePath:(a=e.showBreadcrumbHomePath)!==null&&a!==void 0?a:!0})),e.env.watchRouteChange&&(t.unWatchRouteChange=e.env.watchRouteChange(function(){var c,u,d;return i.updateActivePage(Object.assign({},(c=e.env)!==null&&c!==void 0?c:{},{showFullBreadcrumbPath:(u=e.showFullBreadcrumbPath)!==null&&u!==void 0?u:!1,showBreadcrumbHomePath:(d=e.showBreadcrumbHomePath)!==null&&d!==void 0?d:!0}))})),t}return l.prototype.componentDidMount=function(){return N(this,void 0,void 0,function(){var e,t,n,o;return A(this,function(a){switch(a.label){case 0:return e=this.props,t=e.data,n=e.dispatchEvent,[4,n("init",t,this)];case 1:return o=a.sent(),o!=null&&o.prevented?[2]:(this.reload(),[2])}})})},l.prototype.componentDidUpdate=function(e){var t,n,o;return N(this,void 0,void 0,function(){var a,i;return A(this,function(c){return a=this.props,i=a.store,i.syncProps(a,e,["pages"]),T(e.api,a.api,e.data,a.data)?this.reload():a.location&&a.location!==e.location&&i.updateActivePage(Object.assign({},(t=a.env)!==null&&t!==void 0?t:{},{showFullBreadcrumbPath:(n=a.showFullBreadcrumbPath)!==null&&n!==void 0?n:!1,showBreadcrumbHomePath:(o=a.showBreadcrumbHomePath)!==null&&o!==void 0?o:!0})),[2]})})},l.prototype.componentWillUnmount=function(){var e;(e=this.unWatchRouteChange)===null||e===void 0||e.call(this)},l.prototype.reload=function(e,t,n,o,a){return N(this,void 0,void 0,function(){var i,c,u,d,v,s,b,f,E,p;return A(this,function(h){switch(h.label){case 0:return t?[2,this.receive(t,void 0,a)]:(i=this.props,c=i.api,u=i.store,d=i.env,v=i.showFullBreadcrumbPath,s=v===void 0?!1:v,b=i.showBreadcrumbHomePath,f=b===void 0?!0:b,E=i.locale,U(c,u.data)?[4,u.fetchInitData(c,u.data,{})]:[3,2]);case 1:p=h.sent(),d.replaceText&&(p.data=W(p.data,d.replaceText,d.replaceTextIgnoreKeys)),p!=null&&p.data.pages&&(p.data=S(p.data,E),u.setPages(p.data.pages),u.updateActivePage(Object.assign({},d??{},{showFullBreadcrumbPath:s,showBreadcrumbHomePath:f}))),h.label=2;case 2:return[2,u.data]}})})},l.prototype.receive=function(e,t,n){return N(this,void 0,void 0,function(){var o;return A(this,function(a){return o=this.props.store,o.updateData(e,void 0,n),[2,this.reload()]})})},l.prototype.resolveDefinitions=function(e){var t,n=this.props,o=n.resolveDefinitions,a=n.store,i=(t=a.schema)===null||t===void 0?void 0:t.definitions;return(i==null?void 0:i[e])||o(e)},l.prototype.handleNavClick=function(e){e.preventDefault();var t=this.props.env,n=e.currentTarget.getAttribute("href");t.jumpTo(n,void 0,this.props.data)},l.prototype.renderHeader=function(){var e=this.props,t=e.classnames,n=e.brandName,o=e.header,a=e.render,i=e.store,c=e.logo,u=e.env;return!o&&!c&&!n?null:r.createElement(r.Fragment,null,r.createElement("div",{className:t("Layout-brandBar")},r.createElement("div",{onClick:i.toggleOffScreen,className:t("Layout-offScreenBtn")},r.createElement("i",{className:"bui-icon iconfont icon-collapse"})),r.createElement("div",{className:t("Layout-brand")},c&&~c.indexOf("