PageSourceSearch

https://cdn2.saby.ru/static/resources/SitePackages/packages/platfo…?x_module=6d4c1096479e3b1386c910d63b4c7e81

js saby.ru collected 2026-10-01 10:35:17 UTC 514,362 bytes, 16 lines download raw bytes

1(function(){var isRtl = typeof document !== 'undefined' && document.cookie && (document.cookie.indexOf('lang=ar') !== -1 || document.cookie.indexOf('lang=he') !== -1);var rtlPostfix = isRtl ? '.rtl' : '';var cssPackage = 'css!SitePackages/packages/platform-base.package' + rtlPostfix;define('css!SbisEnvUI/parking',[cssPackage],'');define('css!SbisEnvUI/header',[cssPackage],'');define('css!SBIS3.CONTROLS/RichEditor/RichContentStyles',[cssPackage],'');define('css!Controls/scrollbar',[cssPackage],'');define('css!Controls/scroll',[cssPackage],'');define('css!Controls/popupTemplate',[cssPackage],'');define('css!Controls/popupConfirmation',[cssPackage],'');define('css!Controls/markup',[cssPackage],'');define('css!Controls/icon',[cssPackage],'');})();
2define("SbisEnvUI/ParkingTemplates",["react/jsx-runtime","react-dom","react","i18n!SbisEnvUI","WasabyLoader/ModulesLoader","UICommon/Focus","UICommon/Deps","UI/Focus","UI/Base","UI/Async","UI/Adaptive","Types/object","TransportCore/transport","SbisEnvUI/Maintains","RequireJsLoader/conduct","ErrorHandling/interface","Env/Env","Controls/markup","Controls/buttons","Compiler/IR","Application/Env","AccessDenied/AskAdm
2in","require","exports","css!Controls/CommonClasses","css!SbisEnvUI/header","css!SbisEnvUI/parking"],(function(e,t,n,s,r,i,o,a,l,u,c,d,f,p,m,g,h,_,v,b,k,C,P,y){var E,S,w,j,I,A,x,N,q,O,D,U,L,M,R,T,H,z,F,B,$;return Object.defineProperty(y,"__esModule",{value:!0}),E=function(e,t,n,s,r,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class a extends s.Component{componentDidMount(){const{requestCallback:e,dialogSize:t}=function(e){var t;if(!(e.error instanceof o.AccessDeniedError&&(null===(t=e.error)||void 0===t?void 0:t.addinfo)))return{requestCallback:e.requestCallback,dialogSize:e.dialogSize};else return{requestCallback:i.Parking.options.accessDeniedRequestCallback,dialogSize:"e"}}(this.props);this.setState({requestCallback:e,dialogSize:t})}render(){var e;return(0,n.jsx)(r.AskAdmin,{...this.props,requestCallback:null===(e=this.state)||void 0===e?void 0:e.requestCallback,showAdmins:!this.props.hideAdmins})}}return t.default=a,t}(0,{},e,n,C,p,f),S=function(e,t,n,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends s.Component{render(){return(0,n.jsx)("a",{onClick:this.props.action,href:this.props.href,children:" "+this.props.caption+" "})}}return r.defaultProps={action:()=>{},caption:"",href:void 0},t.default=r,t}(0,{},e,n),w=function(e,t,n,s){"use strict";function r(e){if(!e)return"";if(e.startsWith("http")||"/"===e||!e.startsWith("/support")&&!e.startsWith("/help"))return e;const t=e.startsWith("/")?e:`/${e}`,n=s.location.hostname.split(".").slice(-2).join(".");if(!n)return t;else return`${s.location.protocol}//${n}${t}`}Object.defineProperty(t,"__esModule",{value:!0}),t.getActionUrl=t.gethostDependedParams=t.syncLoad=t.parseLinks=t.getPropsForDefaultSvg=t.getImageUrl=void 0;return t.getImageUrl=function(e,t){if("string"==typeof e)return e;else return e&&("string"==typeof t&&t.toLowerCase().match("dark")?e.dark:e.default)},t.getPropsForDefaultSvg=function(e,t){let n,s;if("string"==typeof e&&e.includes("CONNECTION_ERROR")&&"string"==typeof t)n="#CONNECTION_ERROR",s=t.toLowerCase().match("dark")?"blue":"default";return{svgId:n,svgTheme:s}},t.parseLinks=function(e){if(!e)return"";const t=[];return e.replace(/<a\s+.*?href\s*=\s*"(.*?)".*?>([\s\S]*?)<\/\s*a>/gi,((e,n,s)=>(t.push(["a",{href:n,target:"_blank"},s||n]),"$%&"))).split("$%&").reduce(((e,n,s)=>{if(n)e.push(n);if(s<t.length)e.push(t[s]);return e}),[["span"]])},t.syncLoad=function(e){try{return(0,n.loadSync)(e)}catch(e){}return null},t.gethostDependedParams=function(){return{logoUrl:s.location.hostname.includes("papirus.tm")?"/cdn/SabyLogo/1.0.11/tm/logo.svg":"/cdn/SabyLogo/1.0.9/logo/saby/default/logo-flat-left.svg",supportUrl:r("/support")}},t.getActionUrl=r,t}(0,{},r,k),j=function(e,t,n,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends n.default{constructor(e){super(e),this.action=this.action.bind(this)}action(e){}openHrefInNewWindow(e){if("undefined"==typeof window)return;const t=window.open((0,s.getActionUrl)(this.props.href),"_blank");if(t||!t.closed)return e.preventDefault(),t;else return}openHref(e){if("undefined"!=typeof window)window.location.href=(0,s.getActionUrl)(this.props.href),e.preventDefault()}reload(){if("undefined"!=typeof window)return new Promise((e=>setTimeout((()=>{window.location.reload(),e()}))))}}return t.default=r,t}(0,{},S,w),I=function(e,t,n,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i extends r.default{constructor(e){super(e);const t=e.capitalizeCaption?e.caption[0].toUpperCase():e.caption[0].toLowerCase();this.caption=t+e.caption.slice(1),this.action=this.action.bind(this)}action(e){this.props.repeatFunction()}render(){return(0,n.jsx)(r.default,{action:this.action,caption:this.caption})}}return i.defaultProps={caption:s("Попробовать еще раз"),capitalizeCaption:!0},t.default=i,t}(0,{},e,s,S),A=function(e,t,n,s,r,i,o,a,l){"use strict";function u({text:e,type:t,size:s,needParseFolderLinks:i,skipDecorate:o}){if(!e)return null;const a={value:e,tagResolver:r.linkWrapResolver,resolverParams:i},l=o?e:(0,n.jsx)(r.Decorator,{...a});return(0,n.jsx)("div",{className:`SbisEnv-ParkingBody__${t} SbisEnv-ParkingBody__${t}_${s}`,children:l})}function c({image:e,size:t,theme:s,needDownScaleImage:r,isSquare:a}){const l=(0,o.useMemo)((()=>(0,i.getImageUrl)(e,s)),[e,s]),{svgTheme:u}=(0,o.useMemo)((()=>(0,i.getPropsForDefaultSvg)(l,s)),[l,s]),c=(0,o.useMemo)((()=>a?"SbisEnv-ParkingBody__image_square":""),[a]),[d,f]=(0,o.useState)(!1);if((0,o.useLayoutEffect)((()=>{const e=new Image;e.src=l;const t=e=>{const{type:t}=e;return f("error"===t)};return e.addEventListener("load",t),e.addEventListener("error",t),()=>{e.removeEventListener("load",t),e.removeEventListener("error",t)}}),[l]),!e||"small"===t||d)return(0,n.jsx)("div",{className:"tw-contents"});else return(0,n.jsxs)("div",{className:u?`SbisEnv-ParkingBody__image_color_${u}`:"tw-contents",children:[(0,n.jsx)("img",{src:l,className:"tw-hidden"}),(0,n.jsx)("div",{className:`\n                        SbisEnv-ParkingBody__image\n                        SbisEnv-ParkingBody__image_${r?"small":""}\n                        SbisEnv-ParkingBody__image_${t}\n                        tw-flex-shrink-0 ${c}`,style:{backgroundImage:`url(${l})`}})]})}function d({action:e,size:t,repeatConfig:n,error:s,mode:r,requestCallback:i,actionCallback:a,requestParam
2s:u,requestData:c,hideAdmins:d}){const p=(0,o.useMemo)((()=>(0,l.lazy)((()=>(0,l.importer)(e)))),[e]);return p?f({action:p,size:t,repeatConfig:n,error:s,mode:r,requestCallback:i,actionCallback:a,requestParams:u,requestData:c,hideAdmins:d}):null}function f({action:e,size:t,repeatConfig:r,error:i,mode:o,actionCallback:a,requestCallback:l,requestParams:u,requestData:c,hideAdmins:d}){if(!e)return null;const f=s.Parking.Const.ButtonSize[t],p=function(e){return e.hasOwnProperty("default")}(e)?e.default:e;return(0,n.jsx)("div",{className:`SbisEnv-ParkingBody__action SbisEnv-ParkingBody__action_${t}`,children:e?(0,n.jsxs)("div",{children:[" ",(0,n.jsx)(p,{size:f,repeatConfig:r,repeatFunction:null==r?void 0:r.function,readOnly:!1,error:i,mode:o,actionCallback:a,requestCallback:l,requestParams:u,requestData:c,hideAdmins:d})," "]}):null})}return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({action:e,image:t,theme:r,message:l,details:p,size:m,repeatConfig:g,needParseFolderLinks:h,className:_,dataQa:v,error:b,mode:k,actionCallback:C,requestCallback:P,requestParams:y,requestData:E,skipParseLinks:S,hideAdmins:w}){const j="string"==typeof e,I=S?l:(0,i.parseLinks)(l),A=S?p:(0,i.parseLinks)(p),x=(0,o.useMemo)((()=>function(e){if(!e)return!1;else return"string"==typeof e?e===s.Parking.Const.IMAGE.INTERNAL:(0,a.isEqual)(e,s.Parking.Const.THEME_IMAGE.INTERNAL)}(t)),[t]),N="string"==typeof t?t===s.Parking.Const.IMAGE.ACCESS_DENIED||t===s.Parking.Const.IMAGE.INTERNAL:(0,a.isEqual)(t,s.Parking.Const.THEME_IMAGE.INTERNAL)||(0,a.isEqual)(t,s.Parking.Const.THEME_IMAGE.ACCESS_DENIED);return(0,n.jsxs)("div",{"data-qa":v,className:`${_}\n             SbisEnv-ParkingBody SbisEnv-ParkingBody_${m} controls_sbisenvui_theme-${r}`,children:[(0,n.jsx)(c,{image:t,size:m,theme:r,needDownScaleImage:N,isSquare:x}),(0,n.jsxs)("div",{className:"SbisEnv-ParkingBody__text-container",children:[(0,n.jsx)(u,{text:I,type:"message",size:m,needParseFolderLinks:h,skipDecorate:S}),(0,n.jsx)(u,{text:A,type:"details",size:m,needParseFolderLinks:h,skipDecorate:S}),j?(0,n.jsx)(d,{action:e,size:m,repeatConfig:g,error:b,mode:k,requestCallback:P,requestParams:y,actionCallback:C,requestData:E,hideAdmins:w}):(0,n.jsx)(f,{action:e,size:m,repeatConfig:g,error:b,mode:k,requestCallback:P,requestParams:y,actionCallback:C,requestData:E,hideAdmins:w})]})]})},t}(0,{},e,p,_,w,n,d,u,"undefined"==typeof css_Controls_CommonClasses||css_Controls_CommonClasses,"undefined"==typeof css_SbisEnvUI_parking||css_SbisEnvUI_parking),x=function(e,t,n,s,r,i,o,a,l,u){"use strict";function c(){const e=(0,u.useRef)(null),[t,s]=(0,u.useState)(!1);if(!e.current)if(e.current=(0,l.syncLoad)("Guest/VDOM/Header"),e.current)(0,i.addPageDeps)(["Guest/VDOM/Header"]),s(!0);return(0,u.useEffect)((()=>{if(!e.current)(0,r.loadAsync)("Guest/VDOM/Header").then((t=>{e.current=t,(0,i.addPageDeps)(["Guest/VDOM/Header"]),s(!0)}))}),[]),t?(0,n.jsxs)("div",{className:"SbisEnvUI-Page__Header",children:[" ",(0,n.jsx)(e.current,{})," "]}):null}return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({hrefRight:e="/support",titleRight:t=o.Parking.Const.HEADER.SUPPORT}){const[r,i]=(0,u.useState)(void 0);(0,u.useEffect)((()=>{i(function(){const e=(0,l.syncLoad)("EngineUser/Info");if(e){const t=e.Info;return t&&t.isInit()&&t.get("guest")}return!1}())}),[]);const d=(0,u.useMemo)((()=>{const{logoUrl:e,supportUrl:t}=(0,l.gethostDependedParams)();return{logo:(0,s.getResourceUrl)(e),hrefRight:t}}),[]);return r?(0,n.jsx)(c,{}):(0,n.jsx)("div",{className:"SbisEnvUI-Page__default-Header",children:(0,n.jsxs)("div",{className:"SbisEnvUI-Page__default-Header-center tw-flex tw-items-center",children:[(0,n.jsxs)("a",{href:"/",className:"SbisEnvUI-Page__default-Header-leftBlock tw-flex tw-items-center",children:[(0,n.jsx)("img",{className:"SbisEnvUI-Page__default-Header-logo",src:d.logo}),(0,n.jsx)("span",{className:"SbisEnvUI-Page__default-Header-title",children:o.Parking.Const.HEADER.ORGANIZATION})]}),(0,n.jsx)("div",{className:"SbisEnvUI-Page__default-Header-rightBlock tw-grow-1 tw-flex\n                                tw-justify-end tw-items-baseline",children:(0,n.jsx)(a.Button,{caption:t,href:d.hrefRight,viewMode:"link",fontColorStyle:"label",fontSize:"3xl"})})]})})},t}(0,{},e,m,r,o,p,v,w,n,"undefined"==typeof css_SbisEnvUI_header||css_SbisEnvUI_header),N=function(e,t,n,s,r,i,o,a,l,u,c,d,f,p){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0});const m=["onResult"],g=(0,o.lazy)((()=>(0,o.importer)("Controls/popupConfirmation:Footer"))),h=(0,o.lazy)((()=>(0,o.importer)("Controls/popupConfirmation:Template")));if(r.constants.isBrowserPlatform)setTimeout((()=>{new Promise(((t,n)=>{e(["Controls/popupConfirmation"],t,n)}))}),s.Parking.Const.LOAD_DELAY);const _=(0,a.forwardRef)((({details:e,message:t,image:r,action:o,repeatConfig:_,needParseFolderLinks:v,theme:b,buttons:k,closeHandler:C,onCloseNotify:P,imgLoadingTimeout:y=100,type:E="ok",error:S,mode:w,dialogSize:j,requestCallback:I,status:A,requestParams:x,skipParseLinks:N,closeButtonVisible:q},O)=>{const[D,U]=function(e,t,n){const[s,r]=(0,a.useState)(!1),[o,l]=(0,a.useState)(!1),u=(0,a.useRef)(null);return(0,a.useEffect)((()=>{if(!e)return l(!1),void r(!0);if(!u.current)u.current=new Image;const s=u.current;if(s.complete)return l(!0),void r(!0);let o=!1;s.onload=()=>{if(!o)l(!0)},s.src=(0,i.getImageUrl)(e,t);const a=setTimeout((()=>{o=!0,r(!0)}),n);return()=>{clearTimeout(a),o=!0,s.onload=null}}),[]),[s,o]}((A||(null==S?void 0:S.status))===l.HTTPStatus.Forbidden?null:r,b,y),L=(0,a.useRef)(),M=function(e){const[t,n]=(0,a.useState)(null);return(0,a.useEffect)((()=>{let t;if(e)t=s.Parking.options.loadDataForRequest();else t=Promise.resolve(!0);t.then((e=>n(e))).catch((()=>n(!0)))}),[]),t}(I),R=(0,p.useAdaptiveMode)();(0,a.useEffect)((()=>{if(D&&M&&L.current)(0,c.activate)(L.current)}),[D,M,L]);const{_buttons:T,_message:H,_details:z,_markerStyle:F,_requestCallback:B}=function(e,t,n){var s;const{message:r,details:i,buttons:o}=t;if(e instanceof l.AccessDeniedError){if(null===(s=null==e?void 0:e.addinfo)||void 0===s?void 0:s.get("RequestStatus"))return{_message:f("Недостаточно прав"),_details:f("Запрос отправлен администратору, дождитесь его обработки"),_buttons:void 0,_markerStyle:"info",_requestCallback:null};if(e.addinfo&&n)return{_message:r,_buttons:[{caption:f("Отправить запрос"),buttonStyle:"primary",value:!0,readOnly:!0},{caption:f("Отмена"),value:void 0}],_requestCallback:n}}return{_message:r,_details:i,_buttons:o,_requestCallback:n}}(S,{message:t,details:e,buttons:k},I),[$,W]=(0,a.useState)(T),G=(0,a.useRef)(""),V=(0,a.useCallback)((e=>{if("function"==typeof C)C(e);if(e&&"function"==typeof B)B(S,G.current,x);if(P)P(e)}),[C,P]),K=(e,t)=>{const n=$&&$.map(((e,n)=>({...e,readOnly:0===n?!t.length:!1})));return W(n),G.current=t,t},Q=(0,a.useMemo)((()=>(0,n.jsx)(u.default,{className:"SbisEnv-ParkingDialog controls-text-default",dataQa:"sbis-err-dialog",message:H,details:z,image:U?r:void 0,action:o,repeatConfig:_,needParseFolderLinks:v,size:"dialog",theme:b,error:S,mode:w,actionCallback:K,requestCallback:B,requestParams:x,status:A||(null==S?void 0:S.status),requestData:M,skipParseLinks:N})),[t,e,U,r,o,_,v,b,M]),J=(0,a.useMemo)((()=>(0,n.jsx)(g,{type:E,buttons:$,onResult:V,customEvents:m})),[E,$,V]);return(0,n.jsx)(d.FocusRoot,{as:"div",autofocus:!0,ref:L,children:(0,n.jsx)("div",{ref:O,className:D&&M?"":"tw-invisible-important",children:(0,n.jsx)(h,{onClose:q?V:()=>null,closeButtonViewMode:"linkButton",closeButtonSize:"m",closeButtonVisible:q,theme:b,width:R.window.innerWidth.up(p.DEFAULT_BREAKPOINTS.sm)?j:"d",borderStyle:void 0,markerStyle:null!=F?F:"danger",bodyContentTemplate:Q,footerContentTemplate:J})})})}));return t.default=_,t}(P,{},e,p,h,w,u,n,f,A,i,a,s,c,"undefined"==typeof css_Controls_CommonClasses||css_Controls_CommonClasses,"undefined"==typeof css_SbisEnvUI_parking||css_SbisEnvUI_parking),q=function(e,t,n,s,r){"use strict";function i({message:e,details:t,action:s,needToShift:i,isSuccessfulAction:o}){return(0,n.jsxs)("div",{className:"SbisEnv-ParkingBody SbisEnv-ParkingBody_inlist  "+(i?"SbisEnv-ParkingBody_inlist_shift":""),style:o?{display:"none"}:{},children:[(0,n.jsx)("div",{className:"SbisEnv-ParkingBody__message_inlist",children:e}),(0,n.jsx)("div",{className:"SbisEnv-ParkingBody__details_inlist",children:t}),(0,n.jsx)("div",{className:"SbisEnv-ParkingBody__action SbisEnv-ParkingBody__action_inlist",children:(0,n.jsx)(r.default,{repeatFunction:s})})]})}
2Object.defineProperty(t,"__esModule",{value:!0});const o=(0,s.forwardRef)((({message:e,details:t,listOptions:r,isPagingVisible:o,showInDirection:a,action:l=()=>Promise.resolve()},u)=>{const[c,d]=(0,s.useState)(null),[f,p]=(0,s.useState)(!1),[m,g]=(0,s.useState)(!1);(0,s.useEffect)((()=>{if("function"==typeof c)c();g(!1)}),[c,m]),(0,s.useEffect)((()=>{p("down"===a&&o)}),[a,o]);const h=(0,s.useCallback)((()=>{Promise.resolve().then((()=>l())).then((e=>{g(!0),d((()=>e))})).catch((()=>{}))}),[l]),_=(0,s.useMemo)((()=>{if(!r)return null;const e=r.content;return(0,n.jsx)(e,{...r})}),[r]),v=(0,n.jsx)(i,{message:e,details:t,needToShift:f,isSuccessfulAction:m,action:h});return(0,n.jsxs)("div",{ref:u,children:["up"===a&&v,_,"down"===a&&v]})}));return t.default=o,t}(0,{},e,n,I,"undefined"==typeof css_SbisEnvUI_parking||css_SbisEnvUI_parking),O=q,D=function(e,t,n,s,r,i){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.portrait="portrait",e.landscape="landscape"}(o||(o={}));const a={[s.ErrorViewSize.large]:{[o.portrait]:{width:500,height:492},[o.landscape]:{width:500,height:364}},[s.ErrorViewSize.medium]:{[o.portrait]:{width:275,height:248},[o.landscape]:{width:380,height:208}},[s.ErrorViewSize.normal]:{[o.portrait]:{width:166,height:188},[o.landscape]:{width:250,height:144}},[s.ErrorViewSize.small]:{[o.portrait]:{width:0,height:0},[o.landscape]:{width:0,height:0}}},l=(0,r.forwardRef)((({size:e,orientation:t=o.portrait,width:s,height:l,image:u,message:c,details:d,action:f,repeatConfig:p,needParseFolderLinks:m,theme:g,error:h,requestCallback:_,requestParams:v,status:b,className:k,skipParseLinks:C,hideAdmins:P},y)=>{const[E,S]=(0,r.useState)(e),[w,j]=(0,r.useState)(t),I=(0,r.useRef)(null);if((0,r.useImperativeHandle)(y,(()=>I.current)),(0,r.useEffect)((()=>{if(E)return;const e=function(e,t,n){if(void 0!==t&&void 0!==n)return{width:t,height:n};let s=0,r=0;if(e){const t=e.getBoundingClientRect();s=t.width,r=t.height}return{width:null!=t?t:s,height:null!=n?n:r}}(I.current,s,l),t=0===e.height,n=Object.entries(a).find((([,n])=>{const s=Object.entries(n).find((([,{width:n,height:s}])=>e.width>=n&&t||e.width>=n&&e.height>=s));if(s)j(s[0]);return s}))[0];S(n)}),[]),!E){const e=`${k} tw-w-full tw-h-full`;return(0,n.jsx)("div",{ref:I,className:e})}return(0,n.jsx)("div",{ref:I,className:"tw-contents",children:(0,n.jsx)(i.default,{image:u,message:c,details:d,action:f,error:h,size:E,repeatConfig:p,needParseFolderLinks:m,theme:g,className:`controls-text-unaccented SbisEnv-ParkingBody_${w} ${k}`,requestCallback:_,requestParams:v,status:b||(null==h?void 0:h.status),skipParseLinks:C,hideAdmins:P})})}));return t.default=l,t}(0,{},e,g,n,A,"undefined"==typeof css_Controls_CommonClasses||css_Controls_CommonClasses,"undefined"==typeof css_SbisEnvUI_parking||css_SbisEnvUI_parking),U=D,L=function(e,t,n,s,r,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=(0,s.forwardRef)((({image:e,message:t,details:a,action:l,repeatConfig:u,theme:c,attrs:d,header:f,requestCallback:p,status:m,error:g,requestParams:h,skipParseLinks:_},v)=>{const[b,k]=(0,s.useState)(null),C=(0,s.useRef)(null===document||void 0===document?void 0:document.getElementById("sbisEnvUI_errorContainer"));return(0,s.useEffect)((()=>{k(C.current)}),[]),(0,n.jsx)("div",{ref:v,children:b&&(0,r.createPortal)((0,n.jsxs)("div",{ref:v,style:null==d?void 0:d.style,className:`SbisEnv-ParkingPage controls_sbisenvui_theme-${c}`,children:[(0,n.jsx)(i.default,{...f}),(0,n.jsx)("div",{className:"SbisEnv-ParkingContent",children:(0,n.jsx)(o.default,{image:e,message:t,details:a,action:l,repeatConfig:u,size:"large",theme:c,className:"controls-text-unaccented",requestCallback:p,requestParams:h,status:m||(null==g?void 0:g.status),error:g,skipParseLinks:_})})]}),b)})}));return t.default=a,t}(0,{},e,n,t,x,A,"undefined"==typeof css_Controls_CommonClasses||css_Controls_CommonClasses,"undefined"==typeof css_SbisEnvUI_parking||css_SbisEnvUI_parking),M=L,R=function(e,t,n,s,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.linkActionFactory=void 0,t.linkActionFactory=function(e,t,i){var o;return(o=class extends s.default{action(t){let n;switch(e){case"openHrefInNewWindow":n=this.openHrefInNewWindow.bind(this);break;case"openHref":n=this.openHref.bind(this);break;case"reload":n=this.reload.bind(this);break;default:return}return n(t)}render(){return(0,n.jsx)(s.default,{action:this.action,caption:this.props.caption,href:(0,r.getActionUrl)(this.props.href)})}}).defaultProps={caption:t,href:i},o},t}(0,{},e,j,w),T=function(e){"use strict";function t(){return this}var n=["closeNotify","CloseNotify","_options"];return e.g({v:1,m:"wml!SbisEnvUI/_ParkingTemplates/_templates/DialogWrapper",d:e.d(["SbisEnvUI/_ParkingTemplates/_templates/Dialog"],arguments,1
2),t:[e.r(((e,s)=>[e.C(s,"ws:SbisEnvUI/_ParkingTemplates/_templates/Dialog",{K:"0_",E:{"on:closenotify":[{value:n[0],originalName:n[1],viewController:s.v}],meta:{isControl:!0,context:t,handler:e.M(s,0)}},O:e.s(s,{},e.m(s,1)),m:"attribute",c:!0,i:0})]))],p:n.slice(0,1),e:[function(e,t,n,s,r,i){return e.g(this,[i])},(e,t)=>e.g(t,[n[2]])],i:[[[1]]]})}(b,N),H=function(e,t,n,s,r,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=(0,s.linkActionFactory)("openHrefInNewWindow",o("напишите нам"),"/support");class l extends i.Component{action(){}render(){var e;return(0,n.jsxs)("div",{children:[(null===(e=this.props.repeatConfig)||void 0===e?void 0:e.display)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("span",{children:[o("Давайте подождем и")," "]}),(0,n.jsx)(r.default,{caption:o("попробуем еще раз"),capitalizeCaption:!1,repeatFunction:this.props.repeatConfig.function})]}):null,(0,n.jsxs)("div",{children:[""+o("Если повторится")," — ",(0,n.jsx)(a,{})]})]})}}return t.default=l,t}(0,{},e,R,I,n,s),z=function(e,t,n,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends n.Control{constructor(){super(...arguments),this._template=s}closeNotify(e,t){this._notify("close",[],{bubbling:!0}),this._notify("sendResult",[t],{bubbling:!0})}}return t.default=r,t}(0,{},l,T),F=z,B=function(e,t,n,s,r,i,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Maintenance=t.AskAdmin=t.RepeatAction=t.linkActionFactory=t.ComponentsConfig=t.NetworkRestriction=t.Support=t.Reload=t.MainPage=t.HelpPage=t.LinkAction=void 0,Object.defineProperty(t,"linkActionFactory",{enumerable:!0,get:function(){return s.linkActionFactory}});const l=(0,s.linkActionFactory)("reload",n.Parking.Const.ACTION.RELOAD,"");t.Reload=l;const u=(0,s.linkActionFactory)("openHref",n.Parking.Const.ACTION.MAIN_PAGE,"/");t.MainPage=u;const c=(0,s.linkActionFactory)("openHrefInNewWindow",n.Parking.Const.ACTION.ASK_SUPPORT,"/support");t.Support=c;const d=(0,s.linkActionFactory)("openHrefInNewWindow",n.Parking.Const.ACTION.ASK_ADMIN,"/help/userlaw/limit");t.NetworkRestriction=d;const f=(0,s.linkActionFactory)("openHrefInNewWindow",n.Parking.Const.ACTION.HELP_PAGE,"/help/start/teh_terms/browser");t.HelpPage=f;const p=(0,s.linkActionFactory)("openHrefInNewWindow",n.Parking.Const.ACTION.HELP_PAGE,"/help/start/components");return t.ComponentsConfig=p,Object.defineProperty(t,"LinkAction",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"RepeatAction",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"AskAdmin",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"Maintenance",{enumerable:!0,get:function(){return a.default}}),t}(0,{},p,R,j,I,E,H),$=B,y.actions=y.Page=y.InList=y.Include=y.Dialog=void 0,Object.defineProperty(y,"Dialog",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(y,"Include",{enumerable:!0,get:function(){return U.default}}),Object.defineProperty(y,"InList",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(y,"Page",{enumerable:!0,get:function(){return M.default}}),y.actions=$,y}));
3define("SbisEnvUI/Maintains",["optional!EngineUser/Info","i18n!SbisEnvUI","UI/Utils","Types/source","Types/entity","TransportCore/transport","RequireJsLoader/conduct","ErrorHandling/interface","Env/Env","Browser/Transport","require","exports"],(function(e,t,r,n,o,a,i,s,u,c,l,d){var E,f,g,p,m,S,_,A,O,T,I,M,C,N,P,R,b,D,v,y,U,j,k,F,G,L,w,H,h,V,B,q,z;return Object.defineProperty(d,"__esModule",{value:!0}),E=function(e,t,r,n,o){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.APPLIED_ERROR_CODE=t.Size=t.THEME_IMAGE=t.IMAGE=t.DETAILS=t.ACTION=t.MESSAGE=t.HEADER=t.ButtonSize=t.LOAD_DELAY=void 0,t.LOAD_DELAY=15e3,t.ButtonSize={[r.ErrorViewSize.large]:"l",[r.ErrorViewSize.medium]:"xs",[r.ErrorViewSize.normal]:"xs",[r.ErrorViewSize.small]:"xs",[r.ErrorViewSize.dialog]:"l"},t.HEADER={get ORGANIZATION(){return o("Сеть деловых коммуникаций")},get SUPPORT(){return o("Поддержка")}},t.MESSAGE={get REMOVED_TASK(){return o("Сожалеем, но эта задача была удалена")},get REMOVED_DIALOG(){return o("Сожалеем, но этот диалог был удален")},get REMOVED_DOCUMENT(){return o("Сожалеем, но этот док
3умент был удален")},get NOT_FOUND(){return o("Возможно, документ был удален или вы перешли по неправильной ссылке")},get ACCESS_DENIED(){return o("Недостаточно прав")},get ACCESS_DENIED_TASK(){return o("У вас нет доступа")},get ACCESS_DENIED_DOCUMENT(){return o("У вас нет прав на доступ к документу")},get ACCESS_DENIED_MESSAGE(){return o("К сожалению, диалог вам недоступен")},get ACCESS_DENIED_OBJECT(){return o("Нет прав на просмотр объекта")},get ACCESS_DENIED_PAGE(){return o("Страница недоступна")},get SERVICE_FOR_MAINTENANCE(){return o("Извините, мы на техническом обслуживании")},get ACCOUNT_MANAGEMENT(){return o("Идет модернизация кабинета")},get CONNECTION_ERROR(){return o("Произошел разрыв соединения")},get UPDATE(){return o("Saby обновляется до версии")},get INTERNAL(){return o("Что-то пошло не так")},get EXCLUSIVE(){return o("Идет модернизация кабинета")},get NOSCRIPT(){return o("В настройках вашего браузера заблокировано использование JavaScript")},get NETWORK(){return o("Доступ к разделу разрешен только из внутренних сетей компании")}},t.ACTION={get RELOAD(){return o("Обновить страницу")},get MAIN_PAGE(){return o("Перейти на главную")},get ASK_ACCESS_AUTHOR(){return o("Отправить запрос его автору")},get REQUESTED(){return o("Запрос отправлен, ожидайте")},get ASK_ACCESS_GROUP(){return o("Отправьте запрос его участникам")},get ASK_SUPPORT(){return o("Обратиться в тех. поддержку")},get ASK_ADMIN(){return o("Обратитесь к администратору")},get ACCESS_DENIED(){return""},get HELP_PAGE(){return o("Перейти на страницу помощи")},get TRY_AGAIN(){return o("Попробовать еще раз")}},t.DETAILS={get ASK_ADMIN(){return o("Обратитесь к администратору")},get ACCOUNT_MANAGEMENT(){return o("Скоро вам будут доступны дополнительные возможности Saby")},get CONNECTION_ERROR(){return o("Проверьте подключение к интернету")},get RESOURCE_CONNECTION_ERROR(){return o("Проверьте подключение к интернету и обновите страницу")},get INTERNAL(){return""},get NOT_FOUND(){return""},get SERVICE_FOR_MAINTENANCE(){return""},get ACCESS_DENIED(){return""},get EXCLUSIVE(){return o("Скоро вам будут доступны дополнительные возможности Saby")},get FEATURE_DISABLED(){return o("Выключен переключатель функционала")},get COMPONENT_DISABLED(){return o("Необходимо включить компонент")},get COMPONENTS_DISABLED(){return o("Необходимо включить компоненты")}},t.IMAGE={get SERVICE_FOR_MAINTENANCE(){return(0,n.getResourceUrl)("/cdn/Maintenance/1.1.3/img/SERVICE_FOR_MAINTENANCE_default.svg")},DIAGNOSTICS:(0,n.getResourceUrl)("/cdn/Maintenance/1.1.0/img/DIAGNOSTICS.png"),get NOT_FOUND(){return(0,n.getResourceUrl)("/cdn/Maintenance/1.1.2/img/NOT_FOUND_default.svg")},get ACCESS_DENIED(){return(0,n.getResourceUrl)("/cdn/Maintenance/1.1.5/img/NO_ACCESS_default.svg")},get EXCLUSIVE(){return(0,n.getResourceUrl)("/cdn/Maintenance/1.1.0/img/EXCLUSIVE_default.svg")},get UPDATE(){return(0,n.getResourceUrl)("/cdn/Maintenance/1.1.2/img/UPDATE_default.svg")},get INTERNAL(){return(0,n.getResourceUrl)("/cdn/Maintenance/1.1.1/img/CUP_default.svg")},get NETWORK(){return(0,n.getResourceUrl)("/cdn/Maintenance/1.1.2/img/NOT_FOUND_default.svg")},get CONNECTION_ERROR(){return(0,n.getResourceUrl)("/cdn/Maintenance/1.1.3/img/CONNECTION_ERROR_default.svg")}},function(e){e.default="default",e.dark="blue"}(a||(a={}));const i={};
3return t.THEME_IMAGE=i,Object.keys(t.IMAGE).forEach((e=>{Object.defineProperty(i,e,{enumerable:!0,get:()=>({default:t.IMAGE[e],dark:t.IMAGE[e].includes(a.default)?t.IMAGE[e].replace(a.default,a.dark):t.IMAGE[e]})})})),t.Size=r.ErrorViewSize,t.APPLIED_ERROR_CODE=45334,t}(0,{},s,i,t),f=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=({error:e})=>{if(e instanceof ReferenceError||e instanceof TypeError||e instanceof SyntaxError||e instanceof RangeError||e instanceof URIError||"function"==typeof InternalError&&e instanceof InternalError)throw r.Logger.error(e.message,null,e),new n.PromiseCanceledError(e.message)},t}(0,{},r,o),g=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.getMessageDetails=void 0,t.getMessageDetails=function(e,t){return{message:e.message||t.message,details:(e instanceof r.RPC.Error?e.user_hint:void 0)||t.details}},t}(0,{},c),p=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.Maintenance=t.ComponentsConfig=t.NetworkRestriction=t.Support=t.Reload=t.MainPage=t.HelpPage=t.RepeatAction=t.LinkAction=t.AskAdmin=void 0,t.AskAdmin="SbisEnvUI/ParkingTemplates:actions.AskAdmin",t.LinkAction="SbisEnvUI/ParkingTemplates:actions.LinkAction",t.RepeatAction="SbisEnvUI/ParkingTemplates:actions.RepeatAction",t.HelpPage="SbisEnvUI/ParkingTemplates:actions.HelpPage",t.MainPage="SbisEnvUI/ParkingTemplates:actions.MainPage",t.Reload="SbisEnvUI/ParkingTemplates:actions.Reload",t.Support="SbisEnvUI/ParkingTemplates:actions.Support",t.NetworkRestriction="SbisEnvUI/ParkingTemplates:actions.NetworkRestriction",t.ComponentsConfig="SbisEnvUI/ParkingTemplates:actions.ComponentsConfig",t.Maintenance="SbisEnvUI/ParkingTemplates:actions.Maintenance",t}(0,{}),m=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(r.constants.isServerSide&&e&&e.status>0&&"undefined"!=typeof process&&process.domain&&process.domain.res)return process.domain.res.sendStatus(e.status),!0;else return!1},t}(0,{},u),S=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.getBaseTemplateForMode=t.templates=void 0,t.templates={dialog:"SbisEnvUI/ParkingTemplates:Dialog",page:"SbisEnvUI/ParkingTemplates:Page",include:"SbisEnvUI/ParkingTemplates:Include",inlist:"SbisEnvUI/ParkingTemplates:InList"},t.getBaseTemplateForMode=function(e){return t.templates[e]||t.templates[r.ErrorViewMode.dialog]},t}(0,{},s),_=function(e,t,r,n,o,a,i,s,u){"use strict";function c(e){var t;return e&&(null===(t=null==e?void 0:e.addinfo)||void 0===t?void 0:t.get("RequestStatus"))}function l(t,n,i){if(!t.addinfo)return;const c=f(t.addinfo),l=t.addinfo instanceof s.Record?t.addinfo:t.addinfo=new s.Record({rawData:c,adapter:new s.adapter.Sbis}),d=l.get("Handler"),[E,g]=d.split("."),p=l.get("HandlerParams");if(p.set({Comment:n,UserId:(null===u.Info||void 0===u.Info?void 0:u.Info.isInit())?u.Info.get("UserId"):""}
3),i&&!p.has("RequestParams"))i.href=i.href||t.url,p.addField({name:"RequestParams",type:"object"}),p.set("RequestParams",i);let m=!1,S="",_="";new o.SbisService({endpoint:E}).call(g,{Params:p}).then((()=>{m=!0,S=a("Запрос отправлен администратору системы."),_=a("Когда он будет обработан, вы получите уведомление")})).catch((e=>{m=!1,S=e.message||r.MESSAGE.SERVICE_FOR_MAINTENANCE})).finally((()=>new Promise(((t,r)=>{e(["Controls/popup"],t,r)})).then((({Confirmation:e})=>{e.openPopup({type:"ok",markerStyle:m?"default":"danger",message:S,details:_.length?_:null})}))))}function d(e){const t=e.addinfo instanceof s.Record?e.addinfo:e.addinfo=new s.Record({rawData:f(e.addinfo),adapter:new s.adapter.Sbis});if(!t.has("Handler"))return null;if(t.has("HandlerParams")&&t.get("HandlerParams").has("RightsParams")&&t.get("HandlerParams").get("RightsParams"))return t;else return e.url?t:null}Object.defineProperty(t,"__esModule",{value:!0}),t.getAccessDenied=t.prepareError=t.loadDataForRequest=t.requestCallback=void 0;const E={message:r.MESSAGE.ACCESS_DENIED,image:r.THEME_IMAGE.ACCESS_DENIED,action:i.AskAdmin};t.default=E;const f=function(e){if("string"==typeof e){if(!e)return e;try{return JSON.parse(e)}catch(e){throw new Error("addInfo must be valid JSON-string")}}else return e};return t.requestCallback=l,t.loadDataForRequest=async function(){const t=[new Promise(((t,r)=>{e(["Controls/buttons"],t,r)})),new Promise(((t,r)=>{e(["Controls/input"],t,r)}))],r=await Promise.all(t),[n,o]=r;return{Button:n.Button,Area:o.Area}},t.prepareError=d,t.getAccessDenied=function(e,t){if(t)t.addinfo=d(t);const r=null==t?void 0:t.addinfo,o=e===n.ErrorViewMode.dialog;return{...E,details:c(t)?a("Запрос отправлен администратору, дождитесь его обработки"):o?a("Запросите доступ"):void 0,mode:e,buttons:o&&c(t)?[{caption:a("OK"),value:void 0}]:o&&r?[{caption:a("Отправить запрос"),buttonStyle:"primary",value:!0,readOnly:!0},{caption:a("Отмена"),value:void 0}]:void 0,dialogSize:r?"e":void 0,requestCallback:r?l:void 0,error:t}},t}(l,{},E,s,n,t,p,o,e),A=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={message:r.MESSAGE.INTERNAL};return t.default=n,t}(0,{},E),O=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o={message:r.MESSAGE.ACCESS_DENIED_PAGE,details:r.DETAILS.COMPONENT_DISABLED,image:r.THEME_IMAGE.ACCESS_DENIED,action:n.ComponentsConfig};return t.default=o,t}(0,{},E,p),T=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={message:r.MESSAGE.CONNECTION_ERROR,image:r.THEME_IMAGE.CONNECTION_ERROR,details:r.DETAILS.CONNECTION_ERROR};return t.default=n,t}(0,{},E),I=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={message:r.MESSAGE.EXCLUSIVE,image:r.THEME_IMAGE.EXCLUSIVE,details:r.DETAILS.EXCLUSIVE};return t.default=n,t}(0,{},E),M=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={message:r.MESSAGE.ACCESS_DENIED_PAGE,details:r.DETAILS.FEATURE_DISABLED,image:r.THEME_IMAGE.ACCESS_DENIED};return t.default=n,t}(0,{},E),C=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o={message:r.MESSAGE.INTERNAL,image:r.THEME_IMAGE.INTERNAL,details:r.DETAILS.INTERNAL,action:n.Maintenance};return t.default=o,t}(0,{},E,p),N=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMaintenance=void 0;const o={message:r.MESSAGE.SERVICE_FOR_MAINTENANCE,image:r.THEME_IMAGE.SERVICE_FOR_MAINTENANCE,action:n.Reload,details:r.DETAILS.SERVICE_FOR_MAINTENANCE};return t.default=o,t.getMaintenance=function(){return{message:r.MESSAGE.SERVICE_FOR_MAINTENANCE,image:r.THEME_IMAGE.SERVICE_FOR_MAINTENANCE,action:n.Reload,details:r.DETAILS.SERVICE_FOR_MAINTENANCE}},t}(0,{},E,p),P=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o={message:r.MESSAGE.NETWORK,image:r.THEME_IMAGE.NETWORK,action:n.NetworkRestriction};return t.default=o,t}(0,{},E,p),R=function(e,t,r,n){"use strict";
3Object.defineProperty(t,"__esModule",{value:!0});const o={message:r.MESSAGE.NOSCRIPT,image:r.THEME_IMAGE.NOT_FOUND,action:n.HelpPage};return t.default=o,t}(0,{},E,p),b=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o={message:r.MESSAGE.NOT_FOUND,image:r.THEME_IMAGE.NOT_FOUND,details:r.DETAILS.NOT_FOUND,action:n.MainPage};return t.default=o,t}(0,{},E,p),D=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o={message:r.MESSAGE.ACCESS_DENIED_OBJECT,image:r.THEME_IMAGE.ACCESS_DENIED,action:n.AskAdmin};return t.default=o,t}(0,{},E,p),v=function(e,t,r,n,o,a,i,s,u,c,l,d,E,f){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.accessDeniedRequestCallback=t.loadDataForRequest=t.getAccessDenied=t.accessDenied=t.scope=t.feature=t.component=t.network=t.connection=t.internal=t.getMaintenance=t.maintenance=t.applied=t.exclusive=t.notFound=t.noscript=void 0,Object.defineProperty(t,"noscript",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"notFound",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"exclusive",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"applied",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"maintenance",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"getMaintenance",{enumerable:!0,get:function(){return i.getMaintenance}}),Object.defineProperty(t,"internal",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"connection",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"network",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"component",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"feature",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"scope",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(t,"accessDenied",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"getAccessDenied",{enumerable:!0,get:function(){return f.getAccessDenied}}),Object.defineProperty(t,"loadDataForRequest",{enumerable:!0,get:function(){return f.loadDataForRequest}}),Object.defineProperty(t,"accessDeniedRequestCallback",{enumerable:!0,get:function(){return f.requestCallback}}),t}(0,{},R,b,I,A,N,C,T,P,O,M,D,_),y=function(e,t,r,n,o,a,i,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=({error:e,mode:t})=>{const u=r.RPC.Error.checkErrorStatus(e,[n.HTTPStatus.Forbidden]);if(u){const r=(0,a.getAccessDenied)(t,e);return{type:s.ErrorType.accessDenied,status:u,template:(0,o.getBaseTemplateForMode)(t),options:{...r,...(0,i.getMessageDetails)(e,r),error:e}}}},t}(0,{},c,a,S,v,g,s),U=function(e,t,r,n,o,a,i,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const u=(t,r,n)=>new Promise(((t,r)=>{e(["optional!CustomizableError/handlers"],t,r)})).then((e=>{if(!e)return!1;else return e.getData(t,r,n).then((e=>({template:"CustomizableError/handlers:Template",...e})))})).catch((function(e){requirejs.onError(e)}));return t.default=({error:e})=>{const t=r.RPC.Error.checkErrorStatus(e,[a.APPLIED_ERROR_CODE]),c=(0,i.getMessageDetails)(e,o.applied);if(t)return{type:n.ErrorType.applaied,status:t,mode:n.ErrorViewMode.dialog,asyncData:u.bind(this,e,c.message,c.details),template:(0,s.getBaseTemplateForMode)(n.ErrorViewMode.dialog),options:{...o.applied,error:e,closeButtonVisible:!0,...c}}},t}(l,{},c,s,v,E,g,S),j=function(e,t,r,n,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=({error:e,mode:t})=>{if(e instanceof r.ConnectionError||0===e.status)return{type:a.ErrorType.connection,template:(0,n.getBaseTemplateForMode)(t),options:{...o.connection,error:e}}},t}(0,{},a,S,v,s),k=function(e,t,r,n,o,a,i,s,u){"use strict";function c(e){return{type:s.ErrorType.internal,status:n.HTTPStatus.InternalServerError,template:(0,o.getBaseTemplateForMode)(e),options:a.internal}}Object.defineProperty(t,"__esModule",{value:!0}),t.getInternalViewConfig=void 0;t.getInternalViewConfig=c;return t.default=({error:e,mode:t})=>{const o=(e=>e instanceof r.RPC.Error&&String(e.message).toLowerCase().includes(u("Внутренняя ошибка сервера").toLowerCase()))(e);
3if((e=>r.RPC.Error.checkErrorStatus(e,[n.HTTPStatus.InternalServerError])>0)(e)||o){const r=c(t);if(!o)r.options={...r.options,...(0,i.getMessageDetails)(e,a.internal),error:e};return r}},t}(0,{},c,a,S,v,g,s,t),F=function(e,t,r,n,o,a,i){"use strict";var s;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.ServiceInChainUnavailable="{ba9eed08-16fb-43ab-8f8b-6e5b39900009}"}(s||(s={}));return t.default=({error:e,mode:t})=>{let u=r.RPC.Error.checkErrorStatus(e,[n.HTTPStatus.ServiceUnavailable,n.HTTPStatus.BadGateway,n.HTTPStatus.GatewayTimeout]);if(!u&&e instanceof r.RPC.Error&&e.classid===s.ServiceInChainUnavailable)u=n.HTTPStatus.ServiceUnavailable;if(u)return{type:i.ErrorType.maintenance,status:u,template:(0,o.getBaseTemplateForMode)(t),options:{...(0,a.getMaintenance)(),error:e}}},t}(0,{},c,a,S,v,s),G=function(e,t,r,n,o,a){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.AccessOnlyFromInnerNetwork="{711dd44c-8b3b-11ec-a8a3-0242ac120002}"}(i||(i={}));return t.default=({error:e,mode:t})=>{if(e instanceof r.RPC.Error&&"string"==typeof e.classid&&e.classid===i.AccessOnlyFromInnerNetwork)return{type:a.ErrorType.network,template:(0,n.getBaseTemplateForMode)(t),options:{...o.network,error:e}}},t}(0,{},c,S,v,s),L=function(e,t,r,n,o,a,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=({error:e,mode:t})=>
3{const s=r.RPC.Error.checkErrorStatus(e,[i.HTTPStatus.NotFound]);if(s)return{type:a.ErrorType.notFound,status:s,template:(0,n.getBaseTemplateForMode)(t),options:{...o.notFound,action:t===a.ErrorViewMode.dialog?void 0:o.notFound.action,error:e}}},t}(0,{},c,S,v,s,a),w=function(e,t,r,n,o,a,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=({error:e,mode:t})=>{const s=r.RPC.Error.checkErrorStatus(e,[n.HTTPStatus.NotFound]);if(s)return{type:o.ErrorType.internal,status:s,template:(0,a.getBaseTemplateForMode)(t),options:{...i.internal,error:e}}},t}(0,{},c,a,s,S,v),H=function(e,t,r,n,o,a,i,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=({error:e,mode:t})=>{const u=(0,i.getMessageDetails)(e,s.internal);if(e instanceof r.RPC.Error)return{type:o.ErrorType.rpc,template:(0,n.getBaseTemplateForMode)(t),options:{image:a.THEME_IMAGE.INTERNAL,...u,error:e}}},t}(0,{},c,S,s,E,g,v),h=function(e,t,r,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=e=>{const t=(0,n.default)(e);if(t){if(t.options)t.options.details=o.DETAILS.RESOURCE_CONNECTION_ERROR;t.type=r.ErrorType.connection}return t},t}(0,{},s,j,E),V=function(e,t,r,n,o,a,i,s,u,c,l){"use strict";function d(t=[n.default,o.default,a.default,i.default,s.default]){return({error:n,mode:o})=>{const i=n,s=i.originalError&&i.originalError.target&&i.originalError.target.src;if("timeout"===i.requireType)return{options:u.internal,template:(0,c.getBaseTemplateForMode)(o),processed:!1};if("scripterror"!==i.requireType||!s){try{!function(t){if(void 0!==e&&"function"==typeof e.onError)e.onError(t)}(i)}catch(e){}return}const d=r.IoC.resolve("ITransport",{url:s}).execute().then((()=>({options:u.internal,template:(0,c.getBaseTemplateForMode)(o),processed:!1})),(e=>{let r;for(const n of t)if(r=n({error:e,mode:o}),r)return r.processed=!1,r.type=l.ErrorType.require,r}));return{...(0,a.getInternalViewConfig)(o),promise:d}}}Object.defineProperty(t,"__esModule",{value:!0}),t.factory=void 0,t.factory=d;const E=d();return t.default=E,t}(l,{},u,y,h,k,F,w,v,S,s),B=function(e,t,r,n,o,a,i,s,u,c,l,d){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.network=t.javaScript=t.require=t.rpc=t.accessDenied=t.connection=t.internal=t.maintenance=t.applied=t.notFound=void 0,Object.defineProperty(t,"notFound",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"applied",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"maintenance",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"internal",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"connection",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"accessDenied",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"rpc",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"require",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"javaScript",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"network",{enumerable:!0,get:function(){return d.default}}),t}(0,{},L,U,F,k,j,y,H,V,f,G),q=function(e,t,r,n,o,a,i,s,u,c){"use strict";if(Object.defineProperty(t,"__esModule",{value:!0}),t.options=t.handlers=t.action=t.routing=t.templates=t.Const=void 0,t.routing=n.default,a.constants.isBrowserPlatform){const t="SbisEnvUI/ParkingTemplates",r=a.cookie.get("performance_testing")?0:o.LOAD_DELAY;setTimeout((()=>{var r;const n=null===document||void 0===document?void 0:document.createElement("img");n.src=o.THEME_IMAGE.CONNECTION_ERROR.default,n.style.display="none",n.onload=()=>n.remove(),n.onerror=()=>n.remove(),null===(r=null===document||void 0===document?void 0:document.body)||void 0===r||r.appendChild(n),new Promise(((r,n)=>{e([t],r,n)}))}),r)}const l={Dialog:r.templates.dialog,Include:r.templates.include,Inlist:r.templates.inlist,Page:r.templates.page,getBaseTemplateForMode:r.getBaseTemplateForMode};return t.templates=l,t.Const=i,t.handlers=s,t.options=u,t.action=c,t}(l,{},S,m,E,u,E,B,v,p),z=q,d.Parking=void 0,d.Parking=z,d}));
4define("SbisEnvUI/ErrorHandling",["require","exports","SbisEnvUI/Maintains"],(function(e,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.setHandlers=n.getHandlers=void 0;const{handlers:r}=i.Parking;let s=[r.applied,r.javaScript,r.require,r.internal,r.notFound,r.maintenance,r.connection,r.network,r.accessDenied,r.rpc];n.getHandlers=()=>s.slice();n.setHandlers=e=>{s=e.slice()}}));
5define("Router/router",["router","react/jsx-runtime","react","WasabyLoader/ModulesLoader","UICore/Contexts","UI/Contexts","Router/CustomRouterJson","Env/Env","Application/Env","require","exports"],(function(e,t,r,s,i,n,o,a,l,u,c){var h,f,d,g,p,y,_,R,m,v,P,w,O,U,b,S,x,k,H,C,j,I,M,N,Q,E,T,F,A,D,L,V,$,B,q,W,G,X,Y,K,J,z,Z,ee,te,re;return Object.defineProperty(c,"__esModule",{value:!0}),h=function(e,t,r){"use strict";
5Object.defineProperty(t,"__esModule",{value:!0}),t.SPA_HISTORY_MAX_LENGTH=void 0,t.SPA_HISTORY_MAX_LENGTH=20;t.default=class{constructor(e,t,r,s){this._urlRewriter=e,this._routerUrl=t,this._windowHistory=r,this._spaHistory=[],this._onChangeHistoryState="function"==typeof s?s:()=>{},this._initHistory()}_initHistory(){let e=this._routerUrl.getUrl();e=e.replace(/^[\/]{2,}/,"/");const t={id:0,state:this._urlRewriter.get(this._routerUrl.getLogicUrl()),href:e};if("undefined"!=typeof window)if(this._windowHistory.state&&"number"==typeof this._windowHistory.state.id)t.id=this._windowHistory.state.id;else if(!this._windowHistory.state)s=!0,this._windowHistory.replaceState(t,t.href,t.href),s=!1;this._setHistory([t]),this._setHistoryPosition(0),this._callOnChangeHistoryState(t)}back(e){const t=this.getHistory(),r=this.getHistoryPosition();if(0===r){const r=this._calculateNewHistoryState(e);t.unshift({id:t[0].id-1,state:r.state,href:r.href})}else if(e&&e.state){let s=r-1;for(let r=s;r>=0;r--){const i=t[r];if(i.state===e.state)if(!("id"in e)||i.id===e.id){s=r;break}}this._setHistoryPosition(s)}else this._setHistoryPosition(r-1);this._callOnChangeHistoryState(this.getCurrentState()),this._updateStateUrl()}forward(e){const t=this.getHistory();let r=this.getHistoryPosition()+1;if(e&&e.state&&r<t.length)for(let s=r;s<t.length;s++)if(t[s].state===e.state){r=s;break}if(this._setHistoryPosition(r),r>=t.length){const s=this._calculateNewHistoryState(e);t.push({id:t[r-1].id+1,state:s.state,href:s.href})}else if(e&&e.state&&e.href&&e.id)t[r]=e;this._callOnChangeHistoryState(this.getCurrentState()),this._updateStateUrl()}_calculateNewHistoryState(e){var t;if(e&&e.state)return{id:e.id,state:this._urlRewriter.get(e.state),href:e.href||this._urlRewriter.getReverse(e.state)};const r=null===(t=null===window||void 0===window?void 0:window.history)||void 0===t?void 0:t.state,s=r&&r.state,i=this._routerUrl.getUrl();return{id:(null==r?void 0:r.id)||0,state:s||this._urlRewriter.get(i),href:i}}push(e){const t=this.getHistory(),r=this.getHistoryPosition();t.length=r+1,e.id=t[r].id+1,t.push(e),this._setHistoryPosition(r+1),this._callOnChangeHistoryState(e),this._updateStateUrl();const s=e.href||e.state;this._windowHistory.pushState(e,s,s)}replaceState(e){const t=this.getHistory(),r=this.getHistoryPosition(),i=t[r];e.id=i.id,e.href=e.href||this._routerUrl.getRealUrl(this._urlRewriter.getReverse(e.state)),t[r]=e,this._callOnChangeHistoryState(e,!0),this._updateStateUrl(),s=!0,this._windowHistory.replaceState(e,e.href,e.href),s=!1}_updateStateUrl(){this._routerUrl.setStateUrl(this.getCurrentState().state)}getPrevState(){return this.getHistory()[this.getHistoryPosition()-1]}getCurrentState(){return this.getHistory()[this.getHistoryPosition()]}getNextState(){return this.getHistory()[this.getHistoryPosition()+1]}getHistory(){return this._routerHistory}_setHistory(e){this._routerHistory=e}getHistoryPosition(){return this._historyPosition}_setHistoryPosition(e){this._historyPosition=e}getSpaHistory(){return this._spaHistory}_callOnChangeHistoryState(e,r=!1){const s=e.href||e.state;if(r)this._spaHistory.pop();for(this._spaHistory.push(s);this._spaHistory.length>t.SPA_HISTORY_MAX_LENGTH;)this._spaHistory.shift();this._onChangeHistoryState({href:s,spaHistory:this._spaHistory})}};let s=!0;if("undefined"!=typeof window){const e=window.history.replaceState;window.history.replaceState=function(t,i,n){if(!s&&!globalThis.unsafe_replaceState)r.logger.error(new Error("Нельзя вызывать window.history.replaceState в обход механизмов Wasaby-роутинга. \nИспользуйте методы Router/router:IRouter#replaceState или Router/router:IHistory#replaceState."));e.apply(window.history,[t,i,n])}}return t}(0,{},l),f=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.decodeParam=t.encodeParam=void 0,t.encodeParam=function(e){const t=typeof e;let r=e;if("undefined"!==t){if("string"!==t)r=JSON.stringify(r);r=encodeURIComponent(r)}return r},t.decodeParam=function(e){let t=e;if(void 0!==t)try{t=decodeURIComponent(t)}catch(e){}return t},t}(0,{}),d=function(e,t,r){"use strict";function s(e){const t=/[?&](ext[^=]+)=([^&]+)/g;let s=[];if(r.detection.isIE||r.detection.chrome&&r.detection.chromeVersion<73){let r;for(;null!==(r=t.exec(e));)s.push(r)}else s=[...e.matchAll(t)];return s.map((e=>`${e[1]}=${e[2]}`)).join("&")}
5Object.defineProperty(t,"__esModule",{value:!0}),t.UrlParts=void 0;const i=/[^/]\/[^/]+\.[a-zA-Z]+$/;if(t.UrlParts=class{constructor(e){this._hasTrailingSlash=!1,this._urlParts=this._parseUrl(e)}_parseUrl(e){let t=e.indexOf("?");const r=e.indexOf("#");if(r>=0&&t>r)t=-1;let i=e,n="",o="";if(t>=0&&r>=0)i=e.substring(0,t),n=e.substring(t,r),o=e.substring(r,e.length);else if(t>=0)i=e.substring(0,t),n=e.substring(t,e.length);else if(r>=0)i=e.substring(0,r),o=e.substring(r,e.length);let a="";if(n)a=s(n);return this._hasTrailingSlash=i&&"/"!==i?!!i.match(/\/$/):!1,{path:i.replace(/\/$/,""),query:n,fragment:o,extQuery:a}}getPath(){return this._urlParts.path}getQuery(){return this._urlParts.query}clearQuery(){this._urlParts.query=""}getFragment(){return this._urlParts.fragment}clearFragment(){this._urlParts.fragment=""}get hasTrailingSlash(){return this._hasTrailingSlash}join(e,t=!1){let r=this.getPath();if(e.hasOwnProperty("path"))r=e.path;r=r.replace(/^[#/?&]+/,"").replace(/[#/?&]+$/,"");const i=r.startsWith("http")?"":"/";r=r.length?[i,r,this._getTrailingSlash(r,t)].join(""):"/";let n=this.getQuery();if(e.hasOwnProperty("query"))n=e.query;if(n=n.replace(/^[#/?]/,""),n.length>0)n="?"+n;let o=this.getFragment();if(e.hasOwnProperty("fragment"))o=e.fragment;if(o=o.replace(/^[#/?]/,""),o.length>0)o="#"+o;const a=this.getExtQuery();if(a&&!s(n))if(n.length>0)n=n+"&"+a.replace("?","&");else n="?"+a;return[r,n,o].join("")}_getTrailingSlash(e,t){if(i.exec(e))return"";else return this._hasTrailingSlash||t?"/":""}getExtQuery(){return this._urlParts.extQuery}setExtQuery(e){this._urlParts.extQuery=e}},"undefined"!=typeof window){const e=window.open,t=/ret=([^&]+)/;window.open=function(r,i,n){try{if(!r||"_blank"!==i)return e(r,i,n);const o=s(window.location.href);if(!o)return e(r,i,n);const a=r.match(t);if(!a||!a[1])return e(r,i,n);const l=decodeURIComponent(a[1]),u=l.indexOf("?")>=0?"&":"?",c=encodeURIComponent(l+u+o),h=r.replace(t,`ret=${c}`);return e(h,i,n)}catch(e){console.error("Произошла ошибка при попытке вставить в новый url ext-параметры ",e)}return e(r,i,n)}}return t}(0,{},a),g=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(){this._registeredRoutes={},this._registeredReferences={}}addRoute(e,t,r){this._registeredRoutes[e.getInstanceId()]={beforeUrlChangeCb:t,afterUrlChangeCb:r}}removeRoute(e){delete this._registeredRoutes[e.getInstanceId()]}addReference(e,t){this._registeredReferences[e.getInstanceId()]={afterUrlChangeCb:t}}removeReference(e){delete this._registeredReferences[e.getInstanceId()]}callBeforeUrlChange(e,t,r){if(!Object.keys(this._registeredRoutes).length)return!1;let s=[];const i=[];for(const n in this._registeredRoutes){if(!this._registeredRoutes.hasOwnProperty(n))continue;const o=this._registeredRoutes[n].beforeUrlChangeCb(e,t,r);if(o instanceof Promise)s.push(o);else i.push(o)}if(s.length)return s=s.concat(i.map((e=>Promise.resolve(e)))),Promise.all(s).then((e=>-1===e.indexOf(!1)));else return-1===i.indexOf(!1)}callAfterUrlChange(e,t){for(const r in this._registeredRoutes)if(this._registeredRoutes.hasOwnProperty(r))this._registeredRoutes[r].afterUrlChangeCb(e,t);for(const r in this._registeredReferences)if(this._registeredReferences.hasOwnProperty(r))this._registeredReferences[r].afterUrlChangeCb(e,t)}},t}(0,{}),p=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e,t){this.location=e,this._stateUrl=t.get(this.getLogicUrl())}getStateUrl(){return this._stateUrl||this.getLogicUrl()}setStateUrl(e){this._stateUrl=e}getUrl(){return this.location.pathname+this.location.search+this.location.hash}getServiceUrl(e){const t=e||this.getUrl();let s=(0,r.getConfig)("appRoot");if(!s||"/"===s)return t;s=s.replace(/\//g,"");const i=t.replace(/^\//,"").split("/");if(i[0]!==s)i.unshift(s);return"/"+i.join("/")}getLogicUrl(){let e=this.getUrl();const t=(0,r.getConfig)("appRoot");if(t&&"/"!==t){const r=t.replace(/\//g,""),s=new RegExp(`^/${r}`);e=e.replace(s,"")}const s=(0,r.getConfig)("appAlias");if(!s)return e;const i=new RegExp(`^/${s}`);return e.replace(i,"")}getRealUrl(e){let t=e;if(t){const e=(0,r.getConfig)("appAlias");if(e)t="/"+e+(t.startsWith("/")?t:"/"+t)}else t=this.getUrl();
5return this.getServiceUrl(t)}},t}(0,{},l),y=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{get state(){return this._states[this._states.length-1]}constructor(e){this._location=e,this.isFake=!0,this._states=[]}pushState(e,t,r){this._states.push(e),this._location._update(r)}replaceState(e,t,r){this._states.pop(),this._states.push(e),this._location._update(r)}back(){this._states.pop();const e=this._states[this._states.length-1];if(e)this._location._update(e.href||e.state)}},t}(0,{}),_=function(e,t){"use strict";function r(e,t){const{path:r,misc:n}=function(e){const t=e.match(/[?#]/);if(t){const r=t.index;return{path:e.substring(0,r),misc:e.slice(r)}}return{path:e,misc:""}}(e);if("/"===r&&t&&t.rootRoute)return t.rootRoute+n;if(!t||!t.tree||!Object.keys(t.tree).length)return;let a,l=-1;const u=[],c=(e,t,r=[])=>{if(e||r.length)a=e,l=t,u.push(...r)},h=i(r).split("/");let f=t.tree;for(let e=0;e<h.length;e++){const t=h[e];if(f.hasOwnProperty(t)){c(f[t].value,e),f=f[t].tree;continue}const{regexValues:r,state:i,treeNode:n}=s(t,f);if(!n)break;c(i,e,r),f=n}if(!a)return;u.forEach(((e,t)=>{a=null==a?void 0:a.replace(`$${t+1}`,e)}));const d=h.slice(l+1).join("/");return("/"+a+(d?"/"+d:"")).replace(o,"/")+n}function s(e,t){let r,s,i=[];return Object.keys(t).forEach((n=>{if(i.length||r||0!==n.indexOf("regex:"))return;const o=new RegExp(n.replace("regex:","")),a=e.match(o);if(a)i=a.slice(1),r=t[n].value,s=t[n].tree})),{regexValues:i,state:r,treeNode:s}}function i(e){let t=e.replace(n,"");const r=t.indexOf("?"),s=t.indexOf("#");if(-1!==r)t=t.slice(0,r);if(-1!==s)t=t.slice(0,s);return t=t.replace(/^\//,"").replace(/\/$/,""),t}Object.defineProperty(t,"__esModule",{value:!0}),t.getPath=t.UrlRewriterClass=void 0;const n=/^http[s]?:\/\//,o=/\/{2,}/g;return t.UrlRewriterClass=class{constructor(e){this.routeTree=e.routeTree,this.reverseRouteTree=e.reverseRouteTree}get(e,t=!1){const s=r(e,this.routeTree);if(t)return s;else return null!=s?s:e}getReverse(e,t=!1){const s=r(e,this.reverseRouteTree);if(t)return s;else return null!=s?s:e}},t.getPath=i,t}(0,{}),R=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=(0,r.createContext)(undefined);return s.displayName="Router/router:Context",t.default=s,t}(0,{},r),m=R,v=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.disablePartialSend=t.enablePartialSend=void 0,t.enablePartialSend=function(){if("undefined"!=typeof window)return;return(0,r.loadSync)("Router/ServerRouting").enablePartialSend()},t.disablePartialSend=function(){if("undefined"!=typeof window)return;return(0,r.loadSync)("Router/ServerRouting").disablePartialSend()},t}(0,{},s),P=v,w=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.calculateReferenceHref=void 0,t.calculateReferenceHref=function(e,t,r){const s=t.maskResolver.calculateState(e.state,e,r);let i;if(e.href){const s=t.urlRewriter.getReverse(r||t.url.getStateUrl());i=t.maskResolver.calculateUrl(e.href,e,s)}else{const e=t.urlRewriter.getReverse(s);i=t.url.getRealUrl(e)}return{state:s,href:i}},t}(0,{}),O=w,U=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUrlOptionsFromProps=void 0,t.getUrlOptionsFromProps=function(e,t){const s={};for(const n in e)if(e.hasOwnProperty(n)&&(i=n,!(r.indexOf(i)>=0))&&!t.hasOwnProperty(n))s[n]=e[n];var i;return s};const r=["content","mask","theme","_isSeparatedOptions","_logicParent","readOnly","children","getDataToRender"];return t}(0,{}),b=U,S=function(e,t,r,s){"use strict";var i;return Object.defineProperty(t,"__esModule",{value:!0}),t.calculateMaskType=t.MaskType=void 0,function(e){e[e.Undefined=0]="Undefined",e[e.Path=1]="Path",e[e.Query=2]="Query",e[e.PathFragment=3]="PathFragment",e[e.QueryFragment=4]="QueryFragment"}(i||(t.MaskType=i={})),t.calculateMaskType=function(e,t,n=!1){const o=new s.UrlParts(e),a=[];return[o.getPath(),o.getQuery(),o.getFragment()].forEach((e=>{if(!e)return;const s=function(e,t){if(e.indexOf("/")>-1)return function(e,t){if(0===e.indexOf("#"))return!0;const r=t.getFragment();if(!r)return!1;const s=/([^\/?&#:]+\/):[^\/?&#]/g;let i=s.exec(e);for(;i;){if(r.indexOf(i[1])>-1)return!0;
5i=s.exec(e)}return!1}(e,t)?i.PathFragment:i.Path;if(e.indexOf("=")>-1)return 0===e.indexOf("#")?i.QueryFragment:i.Query;return r.IoC.resolve("ILogger").error("Router.MaskResolver",`Mask "${e}" is invalid`),i.Undefined}(e,t),l={mask:e,maskType:s};if(n&&s===i.Path)l.hasTrailingSlash=o.hasTrailingSlash;a.push(l)})),a},t}(0,{},a,d),x=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e="/"){this.protocol="",this.host="",this.hostname="",this.port="",this.href="",this.pathname="",this.search="",this.hash="",this._update(e||"/")}replace(){}_update(e){const t=new r.UrlParts(e);this.pathname=t.getPath(),this.search=t.getQuery(),this.hash=t.getFragment(),this.href=e}},t}(0,{},d),k=function(e,t,r,s,i,n){"use strict";function o(e){const t=function(e){if(!e)return[];const t=Object.keys(e);let r=t.length;const s=new Array(r);for(;r--;)s[r]=[t[r],e[t[r]]];return s}(e),r=a(t),s=a(function(e){return e.map((e=>[e[1],e[0]]))}(t));return{routeTree:r,reverseRouteTree:s}}function a(e){const t={tree:{},rootRoute:null};return e.forEach((e=>{const r=e[0],s=e[1];if("/"===r)return void(t.rootRoute="/"+(0,n.getPath)(s));const i=r.split("/").filter((e=>e));let o=t.tree;i.forEach(((e,t)=>{if(!o.hasOwnProperty(e))o[e]={value:void 0,tree:{}};if(t===i.length-1)if(!o[e].value||o[e].value.length>s.length)o[e].value=s;o=o[e].tree}))})),t}Object.defineProperty(t,"__esModule",{value:!0}),t._prepareRoutes=void 0;class l{constructor(e){this.rewriters=e}get(e){let t;for(const r of this.rewriters)if(t=r.get(e,!0),t)break;return null!=t?t:e}getReverse(e){let t;for(const r of this.rewriters)if(t=r.getReverse(e,!0),t)break;return null!=t?t:e}static getInstance(){const e=(0,s.getStore)("UrlRewriterAPI");let t=e.get("instance");if(!t){const s=[],a=o(r||{});s.push(new n.UrlRewriterClass(a));const u=(0,i.get)();if(u)s.push(new n.UrlRewriterClass(o(u)));t=new l(s),e.set("instance",t)}return t}}return t.default=l,t._prepareRoutes=o,t}(0,{},e,l,o,_),H=function(e,t,r,s,i,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.useRouter=void 0,t.useRouter=function(){const e=(0,r.useContext)(i.default),{Router:t}=(0,r.useContext)((0,n.getWasabyContext)());if(!e)s.logger.error(new Error("Router не нашелся в контексте. Необходимо убедиться, чтобы контекст Router/router:Context был правильно инициализирован в корне страницы."));return e||t},t}(0,{},r,l,R,i),C=H,j=function(e,t,r,s,i){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.withRouter=void 0,t.withRouter=function(e){const t=e.displayName||e.name||"Component";class n extends s.Component{constructor(e){super(e),this.ref=this.ref.bind(this)}ref(e){this._$child=e}render(){return(0,r.jsx)(e,{...this.props,ref:this.ref,Router:this.context})}}return n.contextType=i.default,n.displayName=`withRouter(${t})`,n.getDefaultOptions=e.getDefaultOptions,n._getDefaultOptions=e._getDefaultOptions,n.defaultProps=e.defaultProps,n.getOptionTypes=e.getOptionTypes,n},t}(0,{},t,r,R),I=j,M=function(e,t,r,s,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryParams=t.PathParams=t.UrlParamsGetter=void 0;const o="traverse",a=`*${o}`;t.UrlParamsGetter=class{constructor(e,t){this.urlParts=new n.UrlParts(t),this.maskTypes=(0,s.calculateMaskType)(e,this.urlParts)}get(){let e=[];this.maskTypes.forEach((t=>{switch(t.maskType){case s.MaskType.Path:e=[...e,...l.calculateParams(t.mask,this.urlParts.getPath())];break;case s.MaskType.Query:e=[...e,...u.createQueryObject().calculateParams(t.mask,this.urlParts.getQuery())];break;case s.MaskType.PathFragment:e=[...e,...l.calculateParams(t.mask,this.urlParts.getFragment())];break;case s.MaskType.QueryFragment:e=[...e,...u.createFragmentObject().calculateParams(t.mask,this.urlParts.getFragment())]}}));const t={};return e.forEach((e=>{if(e.maskId)t[e.maskId]=(0,i.decodeParam)(e.urlValue)})),t}};class l{static calculateParams(e,t){const r=[],s=t.replace(/^\//,"").split(/[#\/]/),i=Array.from(l._parseMask(e).entries());
5return i.forEach((([e,t],n)=>{let u;for(let e=n+1;e<i.length;e++)if(void 0!==i[e][0]){u=i[e][0];break}const{urlValues:c,urlIdIndex:h}=l._getUrlValue(s,e,t.length,u);t.forEach(((t,i)=>{if(t===a){let e;if(h&&h>=0)e=[c[i],...s.slice(h)].join("/");else e=[c[i],...s].join("/");return void r.push({maskId:o,urlValue:e,urlId:void 0})}const n={maskId:t,urlValue:c[i],urlId:0===i?e:void 0};r.push(n)}))})),r}static _parseMask(e){const t=e.split(/[#/]/),s=new Map;let i,n=!1;return t.forEach((e=>{var t,o;if(e)if(!n){if(!e.startsWith(":")&&e!==a)return s.set(e,[]),void(i=e);if(void 0===i&&!s.has(i))s.set(i,[]);if(e===a)null===(t=s.get(i))||void 0===t||t.push(e),n=!0;else null===(o=s.get(i))||void 0===o||o.push(e.slice(1))}else r.logger.error('Правило маски "*traverse" необходимо для получения хвоста url-адреса. Нельзя в маске после него задавать другие правила маски!')})),s}static _getUrlValue(e,t,r,s){let i,n;if(void 0===t){let t=0;if(void 0!==s){const i=e.indexOf(s);if(i>0)t=Math.max(0,i-r)}i=e.splice(t,r)}else{if(n=e.indexOf(t),!e.length||n<0)return{urlValues:[]};i=e.splice(n,r+1),i.splice(0,1)}if(!i.length)return{urlValues:[""]};else return{urlValues:i,urlIdIndex:n}}}t.PathParams=l;class u{constructor(e){this.queryStringParams=e}calculateParams(e,t){const r=this.queryStringParams.getParamsFromQueryMaskString(e),s=this.queryStringParams.getParamsFromQueryString(t),i=[],n=[];return[s,r].forEach((e=>{for(const t in e)if(e.hasOwnProperty(t)&&!(n.indexOf(t)>-1))i.push({maskId:r[t],urlValue:s[t],urlId:t}),n.push(t)})),i}static createQueryObject(){return new u(c.createQueryObject())}static createFragmentObject(){return new u(c.createFragmentObject())}}t.QueryParams=u;class c{constructor(e){this.splitRegexp=e}getParamsFromQueryString(e){return this._getQueryParams(e,(e=>e))}getParamsFromQueryMaskString(e){return this._getQueryParams(e,(e=>0===e.indexOf(":")?e.slice(1):e))}_getQueryParams(e,t){const r={},s=e.split(this.splitRegexp);for(let e=0;e<s.length;e++){if(!s[e])continue;if(-1===s[e].indexOf("="))continue;const i=s[e].split("=");r[i[0]]=t(i[1])}return r}static createQueryObject(){return new c(c.QUERY_REGEXP)}static createFragmentObject(){return new c(c.FRAGMENT_REGEXP)}}return c.QUERY_REGEXP=/[?&]/,c.FRAGMENT_REGEXP=/[#&]/,t}(0,{},l,S,f,d),N=function(e,t,r){"use strict";function s(e,t,s){if(!e)if(t&&t.state&&t.href)return t;else return{state:r.default.getInstance().get(s),href:s};if(t&&t.state&&t.href)return t;else return e}return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("undefined"==typeof window)return;let t=!1;window.onpopstate=r=>{if(t)return void(t=!1);if(!r.state)return;if(r.state&&!r.state.id&&!r.state.state&&!r.state.href)return;const i=e(),n=i.history.getCurrentState(),o=i.history.getPrevState();if(!r.state&&!o||r.state&&r.state.id<n.id){const e=s(o,r.state,r.state||o?i.url.getStateUrl():i.url.getUrl());i.navigate(e,(()=>i.history.back(e)))}else{const e=s(i.history.getNextState(),r.state,i.url.getStateUrl());i.navigate(e,(()=>i.history.forward(e)),(()=>{t=!0,window.history.back()}))}}},t}(0,{},k),Q=N,E=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s={get:e=>r.default.getInstance().get(e),getReverse:e=>r.default.getInstance().getReverse(e)};return t.default=s,t}(0,{},k),T=E,F=function(e,t,r,s,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UrlQueryModifier=t.UrlModifier=void 0;t.UrlModifier=class{constructor(e,t,s){if(this.mask=e,this.urlParts=new n.UrlParts(s),this.maskTypes=(0,r.calculateMaskType)(e,this.urlParts,t.trailingSlash),this.keepQuery=!!t.keepQuery,this.cfg=t.clear?{}:{...t},this.cfg.replace){const e=this.urlParts.getExtQuery();this.urlParts=new n.UrlParts(""),this.urlParts.setExtQuery(e),delete this.cfg.replace}}modify(){const e={},t=this.mask.startsWith("/");let s=!1;if(this.maskTypes.forEach((i=>{switch(i.maskType){case r.MaskType.Path:e.path=o.modify(i.mask,this.cfg,this.urlParts.getPath()),s=!!i.hasTrailingSlash;break;case r.MaskType.Query:e.query=a.createQueryObject().modify(i.mask,this.cfg,t?"":this.urlParts.getQuery());break;case r.MaskType.PathFragment:e.fragment=o.modify(i.mask,this.cfg,t?"":this.urlParts.getFragment());break;case r.MaskType.QueryFragment:e.fragment=a.createFragmentObject().modify(i.mask,this.cfg,t?"":this.urlParts.getFragment())}})),t){(this.keepQuery?["path","fragment"]:["path","query","fragment"]).forEac
5h((t=>{if(void 0===e[t])e[t]=""}))}return this.urlParts.join(e,s)}};t.UrlQueryModifier=class{constructor(e,t){if(this.urlParts=new n.UrlParts(t),this.cfg={...e},this.cfg.replace){const e=this.urlParts.getExtQuery();this.urlParts.clearQuery(),this.urlParts.setExtQuery(e),delete this.cfg.replace}if(this.cfg.clearFragment)this.urlParts.clearFragment(),delete this.cfg.clearFragment;this.mask="?"+Object.keys(this.cfg).map((e=>`${e}=:${e}`)).join("&")}modify(){const e={};return e.query=a.createQueryObject().modify(this.mask,this.cfg,this.urlParts.getQuery()),this.urlParts.join(e)}};class o{static modify(e,t,r){const n=i.PathParams.calculateParams(e,r),a=o._calculateNewUrlPart(r,e,n).replace(/^[#\/]+/,"").replace(/[#\/]+$/,"").split("/"),l=[];for(let e=0;e<n.length;e++){const r=n[e],i=t[r.maskId];if(void 0===i&&void 0===r.urlValue)continue;if(void 0===i){if(r.urlId){a.splice(o._getUrlIdIndex(a,r.urlId,r.urlValue,l),2);continue}a.splice(a.indexOf(r.urlValue),1);continue}const u=(0,s.encodeParam)(i);if(void 0===r.urlValue){if(r.urlId)a.push(r.urlId);a.push(u);continue}let c;if(r.urlId)c=o._getUrlIdIndex(a,r.urlId,r.urlValue,l)+1;else c=o._getReplaceIndex(a,r.urlValue,l);l.push(c),a[c]=u}return a.join("/")}static _calculateNewUrlPart(e,t,r){let s="",i="";const n=[];if(r.forEach((e=>{if(e.urlId){if(i)n.push(i);i=e.urlId+"(?=\\/|$)(\\/[^\\/?#]+)?\\/?",s+=e.urlId+"(\\/:[^\\/?#]+)\\/?"}else i+="([^\\/?#]+\\/?)?",s+="(:[^\\/?#]+\\/?)"})),i)n.push(i);let o=t.replace(new RegExp(s),"");if(o=o.replace(/[?#]/,""),!o)return e;let a=e.indexOf(o);if(!o.endsWith("/"))for(;-1!==a;){const t=e[a+o.length];if(void 0===t||"/"===t||"?"===t||"#"===t)break;a=e.indexOf(o,a+1)}if(-1===a)return o;let l=e.slice(0,a+o.length);const u=e.slice(a+o.length);return n.forEach((e=>{const t=u.match(new RegExp(e));if(t){const e=t.index,r=u[e+t[0].length],s=t[0][t[0].length-1];if(!(0!==e&&"/"!==u[e-1]||void 0!==r&&"/"!==s))l+=t[0]}})),l}static _getUrlIdIndex(e,t,r,s){let i=-1;for(;;){const n=e.indexOf(t,i+1);if(n<0)break;if(e[n+1]&&e[n+1]===r){if(s.includes(n))continue;return n}i=n}return i}static _getReplaceIndex(e,t,r){let s,i=-1;for(;;){if(s=e.indexOf(t,i+1),-1===s)return-1;if(!r.includes(s))break;else i=s}return s}}class a{constructor(e){this.queryParams=e}modify(e,t,r){const i=this.queryParams.calculateParams(e,r),n={};for(let e=0;e<i.length;e++){const r=i[e];if(void 0===r.maskId){n[r.urlId]=r.urlValue;continue}const o=t[r.maskId];if(void 0!==o)n[r.urlId]=(0,s.encodeParam)(o)}const o=[];for(const e in n)if(n.hasOwnProperty(e))o.push([e,n[e]].join("="));return o.join("&")}static createQueryObject(){return new a(i.QueryParams.createQueryObject())}static createFragmentObject(){return new a(i.QueryParams.createFragmentObject())}}return t}(0,{},S,f,M,d),A=function(e,t,r,s,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAppNameByUrl=void 0,t.getAppNameByUrl=function(e){let t;try{t=decodeURIComponent(e)}catch(s){r.logger.warn(`Ошибка при обработке строки URI "${e}"`,s),t=e}let i=s.default.getInstance().get(t)||"";if(-1!==i.indexOf("?"))i=i.replace(/\?.*/,"");if(-1!==i.indexOf("#"))i=i.replace(/#.*/,"");if(-1!==i.indexOf("/"))i=i.split("/")[1];return i+"/Index"};return t.default=class{constructor(e,t){this._urlRewriter=e,this._routerUrl=t}calculateUrlParams(e,t){const r=t||this._routerUrl.getStateUrl();return new i.UrlParamsGetter(e,r).get()}calculateState(e,t,r){const s=r||this._routerUrl.getStateUrl();return new n.UrlModifier(e,t,s).modify()}calculateHref(e,t,r){return this.calculateState(e,t,r)}calculateUrl(e,t,r){const s=this.calculateState(e,t,r);if(r)return s;const i=this._urlRewriter.getReverse(this.calculateState(e,t,r));return this._routerUrl.getRealUrl(i)}calculateQueryState(e,t){const r=t||this._routerUrl.getStateUrl();return new n.UrlQueryModifier(e,r).modify()}calculateQueryHref(e,t){return this.calculateQueryState(e,t)}calculateQueryUrl(e,t){const r=this.calculateQueryState(e,t);if(t)return r;const s=this._urlRewriter.getReverse(this.calculateQueryState(e,t));return this._routerUrl.getRealUrl(s)}},t}(0,{},l,k,M,F),D=A,L=function(e,t,r,s,i,n,o,a,l,u){"use strict";function c(e,t,r){const l=s.default.getInstance(),u=new i.default(e,l),c=new n.default(l,u),h=new o.default(l,u,t,r),d=new a.default;return new f(l,u,c,h,d)}
5Object.defineProperty(t,"__esModule",{value:!0}),t.createNewRouter=t.getRootRouter=void 0;const h="undefined"==typeof window;class f{constructor(e,t,r,s,i){this.urlRewriter=e,this.url=t,this.maskResolver=r,this.history=s,this._manager=i,this._isNavigating=!1,this._instId=f._instIdCounter++}navigate(e,t,s){const i=this.urlRewriter.get(e.state),n=e.href||this.url.getRealUrl(this.urlRewriter.getReverse(i)),o=this.history.getCurrentState();if(o.state===i||this._isNavigating)return;const a={state:i,href:n};this._isNavigating=!0;const l=e=>{if(this._isNavigating=!1,e){if(t){if(!0===t())this.history.push(a)}else this.history.push(a);this._manager.callAfterUrlChange(a,o)}else if(s)s()},u=e=>{if(this._isNavigating=!1,s)s(e);else r.logger.error("Ошибка при вызове IRouter.navigate - "+e.message,e)};let c;try{c=this._tryApplyNewState(a)}catch(e){return void u(e)}if(!(c instanceof Promise))l(c);else c.then(l,u)}navigatePushState(e){this.callBeforeUrlChangeAndCallback(e,(()=>{this.history.push(e)}))}navigateReplaceState(e){this.callBeforeUrlChangeAndCallback(e,(()=>{this.history.replaceState(e)}))}callBeforeUrlChangeAndCallback(e,t){if(this._isNavigating)return;this._isNavigating=!0;const s=e=>{this._isNavigating=!1,t()},i=e=>{this._isNavigating=!1,r.logger.error("Ошибка при вызове IRouter.navigate - "+e.message,e)};let n;try{n=this._tryApplyNewState(e,!0)}catch(e){return void i(e)}if(!(n instanceof Promise))s();else n.then(s,i)}replaceState(e,t){const r=this.urlRewriter.get(e.state),s={state:r,href:e.href||this.url.getRealUrl(this.urlRewriter.getReverse(r))};this.navigate(s,(()=>{this.history.replaceState(s),null==t||t(s)}))}get instId(){return this._instId}_tryApplyNewState(e,t){const s=this.history.getCurrentState(),i=(0,n.getAppNameByUrl)(e.state),o=(0,n.getAppNameByUrl)(s.state),a=t=>{if(i===o)return t;if(h)return r.logger.warn("Переход может привести к редиректу на СП. Это вероятно сломает потоковое построение.","Текущий state: "+s.state,"Новый state: "+e.state),t;else return this.url.location.href=e.href,!1},l=this._manager.callBeforeUrlChange(e,s,t);if(l instanceof Promise)return l.then((e=>a(e)));else return a(l)}}return f._instIdCounter=0,t.default=f,t.getRootRouter=function(e=!1,t){if(e){const e=new Error("Вызов getRootRouter там, где это не нужно. Варианты исправления:\n            1) перейти на использование API роутера из контекста;\n            2) возможно забыли прокинуть Router из метода getDataToRender модуля Index.");r.logger.warn(e)}const s=(0,r.getStore)("ROOT_ROUTER");let i=s.get("instance");if(!i)i=c(r.location,"undefined"!=typeof window?window.history:new u.default(new l.default),t),s.set("instance",i);return i},t.createNewRouter=function(e="/",t){const r=new l.default(e);return c(r,new u.default(r),t)},t}(0,{},l,k,p,A,h,g,x,y),V=L,$=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.removeRoute=t.addRoute=t.replaceState=t.navigate=void 0,t.navigate=function(e,t,s){(0,r.getRootRouter)().navigate(e,t,s)},t.replaceState=function(e,t){(0,r.getRootRouter)().replaceState(e,t)},t.addRoute=function(e,t,s){(0,r.getRootRouter)()._manager.addRoute(e,t,s)},t.removeRoute=function(e){(0,r.getRootRouter)()._manager.removeRoute(e)},t}(0,{},L),B=$,q=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.getVisibleRelativeUrl=t.getRelativeUrl=t.getRelativeUrlWithService=t.getHistoryPosition=t.getHistory=void 0,t.getHistory=function(){return(0,r.getRootRouter)().history.getHistory()},t.getHistoryPosition=function(){return(0,r.getRootRouter)().history.getHistoryPosition()},t.getRelativeUrlWithService=function(e){return(0,r.getRootRouter)().url.getServiceUrl(e)},t.getRelativeUrl=function(){return(0,r.getRootRouter)().url.getStateUrl()},t.getVisibleRelativeUrl=function(){return(0,r.getRootRouter)().url.getUrl()},t}(0,{},L),W=q,G=function(e,t,r){"use strict";
5return Object.defineProperty(t,"__esModule",{value:!0}),t.replaceState=t.push=t.forward=t.back=t.getNextState=t.getCurrentState=t.getPrevState=void 0,t.getPrevState=function(){return(0,r.getRootRouter)().history.getPrevState()},t.getCurrentState=function(){return(0,r.getRootRouter)().history.getCurrentState()},t.getNextState=function(){return(0,r.getRootRouter)().history.getNextState()},t.back=function(e){(0,r.getRootRouter)().history.back(e)},t.forward=function(e){(0,r.getRootRouter)().history.forward(e)},t.push=function(e){(0,r.getRootRouter)().history.push(e)},t.replaceState=function(e){(0,r.getRootRouter)().history.replaceState(e)},t}(0,{},L),X=G,Y=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.calculateQueryHref=t.calculateHref=t.calculateUrlParams=void 0,t.calculateUrlParams=function(e,t){return(0,r.getRootRouter)().maskResolver.calculateUrlParams(e,t)},t.calculateHref=function(e,t,s){return(0,r.getRootRouter)().maskResolver.calculateHref(e,t,s)},t.calculateQueryHref=function(e,t){return(0,r.getRootRouter)().maskResolver.calculateQueryHref(e,t)},t}(0,{},L),K=Y,J=function(e,t,r,s,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=(0,s.forwardRef)((function(e,t){const a=(0,s.useMemo)((()=>e.Router||(0,n.getRootRouter)(!0)),[e.Router]),l=!t?e.children:(0,s.cloneElement)(e.children,{ref:t}),u=!0===e.forwardRouter?(0,r.jsx)(i.WasabyContextManager,{Router:a,children:l}):l;return(0,r.jsx)(o.default.Provider,{value:a,children:u})}));return a.displayName="Router/router:ContextProvider",t.default=a,t}(0,{},t,r,n,L,R),z=J,Z=function(e,t,r,s,i,n,o,a,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Reference=void 0;let c=0;class h extends s.Component{constructor(e,t){super(e),this._instId="reference_"+c++,this.state=(0,u.calculateReferenceHref)(e,t||(0,o.getRootRouter)(!0)),this._mousedownHandler=this._mousedownHandler.bind(this),this._clickHandler=this._clickHandler.bind(this),this._mouseoverHandler=this._mouseoverHandler.bind(this)}getInstanceId(){return this._instId}componentDidMount(){this.Router._manager.addReference(this,(()=>(this.setState((0,u.calculateReferenceHref)(this.props,this.Router)),!0)))}componentDidUpdate(e,t){const r=(0,u.calculateReferenceHref)(this.props,this.Router);if(t.state!==r.state||t.href!==r.href)this.setState(r)}componentWillUnmount(){this.Router._manager.removeReference(this)}render(){const e={};if((0,s.isValidElement)(this.props.children)&&"string"!=typeof this.props.children.type)e.onMouseOverCallback=this._mouseoverHandler;if("data-qa"in this.props)e["data-qa"]=this.props["data-qa"];const t={...this.props.children&&"props"in this.props.children?this.props.children.props:{},className:this.props.className,href:this.state.href||this.state.state,onMouseDown:this._mousedownHandler,onClick:this._clickHandler,onMouseOver:this._mouseoverHandler,...e,ref:this.props.forwardedRef};return(0,s.cloneElement)(this.props.children,t)}get Router(){return this.context||(0,o.getRootRouter)(!0)}_mousedownHandler(e){var t,r;if(0!==e.nativeEvent.button)return;if(e.nativeEvent.ctrlKey||i.detection.isMacOSDesktop&&e.nativeEvent.metaKey)return;if(!1===(null===(r=(t=this.props).onMouseDown)||void 0===r?void 0:r.call(t,e)))return;const s={state:this.state.state,href:this.state.href};if(e.routerReferenceNavigation=!0,!this.props.onNavigate||!1!==this.props.onNavigate(s,e))this.Router.navigate(s)}_clickHandler(e){if(!(e.nativeEvent.ctrlKey||i.detection.isMacOSDesktop&&e.nativeEvent.metaKey))if(0===e.nativeEvent.button)e.preventDefault()}_mouseoverHandler(){if(this.props.recalcUrlBeforeNavigate)this.setState((0,u.calculateReferenceHref)(this.props,this.Router,this.Router.url.getLogicUrl()))}}t.Reference=h,h.contextType=l.default,h.displayName="Router/router:Reference";const f=(0,s.forwardRef)((function(e,t){const i=(0,s.useContext)(l.default),o=(0,s.useContext)((0,n.getWasabyContext)());if(o.Router&&(!i||o.Router.instId>i.instId))return(0,r.jsx)(a.default,{Router:o.Router,children:(0,r.jsx)(h,{...e,forwardedRef:t})});else return(0,r.jsx)(h,{...e,forwardedRef:t})}));return f.displayName=`wrapToContext(${h.displayName})`,t.default=f,t}(0,{},t,r,a,n,L,J,R,w),ee=Z,te=function(e,t,r,s,i,n,o,a,l,u){"use strict";
5Object.defineProperty(t,"__esModule",{value:!0}),t.Route=void 0;let c=0;class h extends s.Component{constructor(e,t){super(e),this._urlOptions={},this._isResolved=!1,this._urlOptionsFields=[],this._needLoadData=!1,this._instId="activator_"+c++,this._urlOptions={},this._progressBar=e.progressBar,this._applyNewUrl(e.mask,t||(0,o.getRootRouter)(!0),e)}componentDidMount(){if("undefined"!=typeof window)this._register();this._checkUrlResolved()}render(){var e,t,i,n,o;return this._applyNewUrl(this.props.mask,this.Router,this.props,null===(e=this._newLoc)||void 0===e?void 0:e.state),this.props.children?(0,s.cloneElement)(this.props.children,{...this._urlOptions,pageConfig:this._pageConfig,forwardedRef:this.props.forwardedRef,children:null===(i=null===(t=this.props.children)||void 0===t?void 0:t.props)||void 0===i?void 0:i.children,content:null===(o=null===(n=this.props.children)||void 0===n?void 0:n.props)||void 0===o?void 0:o.content,logInvalidProps:!1}):(0,r.jsx)("span",{})}componentDidUpdate(e){if(e.contentWidth!==this.props.contentWidth)this._needLoadData=!0,this._afterApplyNewUrl()}componentWillUnmount(){if(this._unregister(),this._isResolved&&this.props.onLeave)this.props.onLeave(this._newLoc,this._oldLoc)}getInstanceId(){return this._instId}get Router(){return this.context||(0,o.getRootRouter)(!0)}_register(){this.Router._manager.addRoute(this,((e,t,r)=>this._beforeApplyNewUrl(e,t,r)),(()=>(this._afterApplyNewUrl(),!0)))}_unregister(){this.Router._manager.removeRoute(this)}_beforeApplyNewUrl(e,t,r=!1){var s,n;this._needLoadData=!1,this._newLoc=e,this._oldLoc=t;const o=s=>{var i,n,o,a,l;if(!1===s)return!1;let u=!0;const c=this._urlOptions,h=this._applyNewUrl(this.props.mask,this.Router,this.props,e.state);if(r)return s||u;if(h&&!this._isResolved)u=null===(n=(i=this.props).onEnter)||void 0===n?void 0:n.call(i,e,t),this._isResolved=!0;else if(!h&&this._isResolved)u=null===(a=(o=this.props).onLeave)||void 0===a?void 0:a.call(o,e,t),this._isResolved=!1;if(this._didOptionsChange(this._urlOptions,c))null===(l=this.props.onUrlChange)||void 0===l||l.call(this,this._urlOptions,c),this._needLoadData=!0;return s||u},a=null===(n=(s=this.props).onBeforeChange)||void 0===n?void 0:n.call(s,e,t);if(a&&a.then)return a.then((e=>o(e))).catch((e=>(i.logger.error(e),!1)));else return o(a)}_afterApplyNewUrl(){var e;if(!this.props.getDataToRender)return void this.setState({updated:{}});if(!this._needLoadData)return;null===(e=this._progressBar)||void 0===e||e.show();const t=this._urlOptions;this.props.getDataToRender(this._urlOptions).then((e=>{if(!this._didOptionsChange(this._urlOptions,t))this._pageConfig=e,this._needLoadData=!1,this.setState({updated:{}})})).catch((e=>(i.logger.warn("Ошибка при загрузке данных",e),e)))}_applyNewUrl(e,t,r,s){this._setUrlOptions(t.maskResolver.calculateUrlParams(e,s));const i=this._hasResolvedParams(this._urlOptions);return this._fillUrlOptionsFromOptions(r),i}_hasResolvedParams(e){let t=!1;for(const r in e)if(e.hasOwnProperty(r)&&void 0!==e[r]){t=!0;break}return t}_fillUrlOptionsFromOptions(e){this._urlOptions={...this._urlOptions,...(0,u.getUrlOptionsFromProps)(e,this._urlOptions)}}_checkUrlResolved(){var e,t;const r=this.Router,s=r.url.getStateUrl(),i=r.maskResolver.calculateUrlParams(this.props.mask,s),n=this._hasResolvedParams(i);this._fillUrlOptionsFromOptions(this.props);const o=r.history.getCurrentState();let a=r.history.getPrevState();if(n){if(this._didOptionsChange(i,this._urlOptions))this._setUrlOptions(i);if(this._isResolved=!0,!a)a={state:r.maskResolver.calculateState(this.props.mask,{clear:!0})};null===(e=this.props.onEnter)||void 0===e||e.call(this,o,a),null===(t=this.props.onUrlChange)||void 0===t||t.call(this,this._urlOptions,{})}}_setUrlOptions(e){this._urlOptions=e,this._urlOptionsFields=Object.keys(e)}_didOptionsChange(e,t){let r;for(r in e)if(e.hasOwnProperty(r))if(!t.hasOwnProperty(r)||e[r]!==t[r]){if("pageUrl"===r&&(void 0===e[r]&&"main"===t[r]||"main"===e[r]&&void 0===t[r]))continue;return!0}for(r in t)if(t.hasOwnProperty(r)&&(0===this._urlOptionsFields.length||this._urlOptionsFields.indexOf(r)>=0)&&!e.hasOwnProperty(r))return!0;return!1}}t.Route=h,h.contextType=l.default,h.displayName="Router/router:Route";const f=(0,s.forwardRef)((function(e,t){const i=(0,s.useContext)(l.default),o=(0,s.useContext)((0,n.getWasabyContext)());if(o.Router&&(!i||o.Router.instId>i.instId))return(0,r.jsx)(a.default,{Router:o.Router,children:(0,r.jsx)(h,{...e,forwardedRef:t,ref:e.instanceRef})});else return(0,r.jsx)(h,{...e,forwardedRef:t,ref:e.instanceRef})}));return f.displayName=`wrapToContext(${h.displayName})`,t.default=f,t}(0,{},t,r,l,n,L,J,R,U),re=te,c.calculateReferenceHref=c.getUrlOptionsFromProps=c.disableParti
5alSend=c.enablePartialSend=c.createNewRouter=c.getRootRouter=c.getAppNameByUrl=c.UrlRewriter=c.MaskResolver=c.History=c.Data=c.Controller=c.withRouter=c.useRouter=c.ContextProvider=c.Context=c.BaseRoute=c.Route=c.BaseReference=c.Reference=void 0,Object.defineProperty(c,"getRootRouter",{enumerable:!0,get:function(){return V.getRootRouter}}),Object.defineProperty(c,"createNewRouter",{enumerable:!0,get:function(){return V.createNewRouter}}),(0,Q.default)(V.getRootRouter),c.Controller=B,c.Data=W,c.UrlRewriter=T.default,c.History=X,c.MaskResolver=K,Object.defineProperty(c,"getAppNameByUrl",{enumerable:!0,get:function(){return D.getAppNameByUrl}}),Object.defineProperty(c,"Reference",{enumerable:!0,get:function(){return ee.default}}),Object.defineProperty(c,"BaseReference",{enumerable:!0,get:function(){return ee.Reference}}),Object.defineProperty(c,"Route",{enumerable:!0,get:function(){return re.default}}),Object.defineProperty(c,"BaseRoute",{enumerable:!0,get:function(){return re.Route}}),Object.defineProperty(c,"Context",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(c,"ContextProvider",{enumerable:!0,get:function(){return z.default}}),Object.defineProperty(c,"useRouter",{enumerable:!0,get:function(){return C.useRouter}}),Object.defineProperty(c,"withRouter",{enumerable:!0,get:function(){return I.withRouter}}),Object.defineProperty(c,"enablePartialSend",{enumerable:!0,get:function(){return P.enablePartialSend}}),Object.defineProperty(c,"disablePartialSend",{enumerable:!0,get:function(){return P.disablePartialSend}}),Object.defineProperty(c,"getUrlOptionsFromProps",{enumerable:!0,get:function(){return b.getUrlOptionsFromProps}}),Object.defineProperty(c,"calculateReferenceHref",{enumerable:!0,get:function(){return O.calculateReferenceHref}}),c}));
6define("I18n/i18n",["require","exports","I18n/singletonI18n","i18n!controller?I18n/controller"],(function(e,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.TranslatableString=r.Controller=r.controller=r.Loader=r.Translator=void 0,Object.defineProperty(r,"Translator",{enumerable:!0,get:function(){return n.Translator}}),Object.defineProperty(r,"Loader",{enumerable:!0,get:function(){return n.Loader}}),Object.defineProperty(r,"controller",{enumerable:!0,get:function(){return n.controller}}),Object.defineProperty(r,"Controller",{enumerable:!0,get:function(){return n.Controller}}),Object.defineProperty(r,"TranslatableString",{enumerable:!0,get:function(){return n.TranslatableString}})}));
7define("Controls/scrollbar",["react/jsx-runtime","react","UICore/Jsx","Env/Env","Controls/sizeUtils","Controls/dragnDrop","require","exports","css!Controls/scrollbar"],(function(e,t,r,n,o,l,i,s){var c,a,u,d,f;return Object.defineProperty(s,"__esModule",{value:!0}),c=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.usePreviousScrollbarProps=void 0,t.usePreviousScrollbarProps=function(e){const t=r.useRef();return r.useEffect((()=>{t.current=e})),t.current},t}(0,{},t),a=function(e,t,r){"use strict";function n(){const e=document.createElement("div");e.setAttribute("style","position: absolute;\n   width: 100px;\n   height: 100px;\n   overflow: scroll;\n   top: -9999px;"),document.body.appendChild(e);const t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}Object.defineProperty(t,"__esModule",{value:!0}),t.getScrollbarWidthByMeasuredBlock=t.getScrollbarWidth=void 0;return t.getScrollbarWidth=function(e){if(e.webkit||e.chrome)return 0;else if(e.isIE12)return e.IEVersion<17?12:16;else if(e.isIE10||e.isIE11)return 17;else if(r.constants.isBrowserPlatform)return n()},t.getScrollbarWidthByMeasuredBlock=n,t}(0,{},n),u=a,d=function(e,t,r,n,o,l,i,s,c,a){"use strict";function u(e,t){let r;const n=t===f.Vertical?"pageY":"pageX";if(e instanceof MouseEvent)r=e[n];else r=e.touches[0][n];return r}function d(e,t,r,n,o){let l;return l=r-t-o,l=Math.max(0,l),l=Math.min(l,e-n),l}var f;Object.defineProperty(t,"__esModule",{value:!0}),t.ScrollbarComponent=void 0,function(e){e.Vertical="vertical",e.Horizontal="horizontal"}(f||(f={}));const h=(0,n.forwardRef)(((e,t)=>{const o=(0,n.useRef)();return(0,n.useImperativeHandle)(e.thumbRef,(()=>o.current)),(0,n.useImperativeHandle)(t,(()=>o.current)),(0,r.jsx)("div",{ref:o,className:`controls-VScrollbar__thumbWrapper controls-VScrollbar__thumbWrapper_size-${e.thumbThickness} controls-VScrollbar__thumbWrapper_${e.direction} `+e.getPaddingClasses(),style:e.style,onMouseDown:e.onMouseDown,children:(0,r.jsx)("div",{className:`controls-VScrollbar__thumb controls-VScrollbar__thumb_${e.thumbStyle} controls-VScrollbar__thumb_size-${e.thumbThickness} controls-VScrollbar__thumb_${e.thumbStyle} controls-VScrollbar__thumb_${e.thumbStyle}_${e.direction} controls-VScrollbar__thumb_${e.direction} controls-VScrollbar__thumb_${e.direction}_size-${e.thumbThickness} `+(e.dragging?"controls-VScrollbar__thumb_dragging_size-"+e.thumbThickness+" controls-VScrollbar__thumb_dragging_"+e.thumbStyle:""),"data-qa":"VScrollbar__thumb"})})}));return t.ScrollbarComponent=(0,n.forwardRef)(((e,t)=>{function g(e,t,r,n){if(void 0===e||void 0===t)return 0;return n*(r-e)/(e-t)}function b(e){j("vertical"===C?e[0].contentRect.height:e[0].contentRect.width)}function m(e){let t,r;const n=M.current.getBoundingClientRect();if(e===f.Vertical)t=n.top,r=n.height;else t=n.left,r=n.width;return{offset:t,size:r}}function p(e){const t=C===f.Vertical,r=$.current.getBoundingClientRect()[t?"top":"left"],n=u(e.nativeEvent,C),o=m(C);B({...o,dragPointOffset:n-r}),k.current.startDragNDrop({shouldNotUpdateBodyClass:z,cursorType:"scroll"},e)}function _(){const e=[];
7if(C===f.Vertical)e.push("controls-padding_top-"+(x.start?"m":"3xs")),e.push("controls-padding_bottom-"+(x.end?"m":"3xs"));else e.push("controls-padding_left-"+(x.start?"m":"3xs")),e.push("controls-padding_right-"+(x.end?"m":"3xs"));return e.join(" ")}function v(){return{["vertical"===C?"height":"width"]:O+"px",transform:`translate${"vertical"===C?"Y":"X"}(`+R+"px)"}}const{position:S=0,contentSize:y,direction:C="vertical",thumbThickness:V="l",thumbStyle:P="accented",shouldNotUpdateBodyClass:z=!1,paddings:x={start:!1,end:!1}}=e,M=(0,n.useRef)(null),$=(0,n.useRef)(null),k=(0,n.useRef)(null),[D,j]=(0,n.useState)(0),[W,w]=(0,n.useState)(!1),[E,B]=(0,n.useState)({}),O=(0,n.useMemo)((()=>{if(!$.current||!M.current)return;const e=a.DimensionsMeasurer.getBoundingClientRect(M.current)[C===f.Vertical?"height":"width"],t=e*(e/y),r=parseFloat(getComputedStyle($.current)[C===f.Vertical?"minHeight":"minWidth"])||36;return Math.max(r,t)}),[D,y]),R=function(e,t,r,n){if(void 0===e||void 0===t)return 0;else return n*(e-t)/(r-e)}(D,O,y,S);(0,n.useImperativeHandle)(t,(()=>M.current));const{userAttrs:N}=(0,s.delimitProps)(e),T=(0,n.useMemo)((()=>new o.ResizeObserverUtil(void 0,b.bind(this))),[]),I=(0,c.usePreviousScrollbarProps)({contentSize:y});return(0,n.useLayoutEffect)((()=>(T.observe(M.current),()=>{T.unobserve(M.current)})),[]),(0,n.useLayoutEffect)((()=>{if(i.detection.isIE&&(null==I?void 0:I.contentSize)!==y){const e=M.current;j("vertical"===C?e.clientHeight:e.clientWidth)}})),(0,r.jsx)("div",{ref:M,className:function(){const t=[];if(N&&N.className)t.push(N.className);if(e.className)t.push(e.className);if(t.push(`controls_scroll_theme-${e.theme} controls-VScrollbar`),t.push(`controls-VScrollbar_${C} controls-VScrollbar_${C}_size-${V}`),t.push(`controls-VScrollbar_horizontal-track_size-${V}`),e.shouldSetMarginTop)t.push(`controls-VScrollbar_horizontal_margin-top_size-${V}`);if(W)t.push(`controls-VScrollbar_${C}_dragging`),t.push(`controls-VScrollbar_${C}_dragging_size-${V}`);if(!O)t.push("tw-invisible-important");if("horizontal"===C&&e.trackVisible)t.push("controls-VScrollbar_horizontal-track controls-VScrollbar_horizontal-track");return t.join(" ")}(),style:{...N&&N.style||{},...e.style||{}},"data-qa":`VScrollbar_${C}`,onMouseDown:function(t){var r;if(e.readOnly)return;const n=m(C),o=u(t.nativeEvent,C),l=d(n.size,n.offset,o,O,O/2),i=g(n.size,O,y,l);null===(r=e.onPositionChanged)||void 0===r||r.call(e,i,C)},onTouchStart:function(t){if(!e.readOnly)if(C===f.Horizontal)p(t)},onWheel:function(t){var r;if(e.readOnly||"horizontal"===e.direction&&!t.shiftKey)return;let n=function(){if(void 0===O||!D)return S;const e=$.current,t=null==e?void 0:e.style.transform;if(!t)return S;const r=/translate[XY]\((-?[\d.]+)px\)/.exec(t);if(!r)return S;const n=parseFloat(r[1]);return g(D,O,y,n)}()+function(e){if(i.detection.firefox){const t=100;return Math.sign(e)*t}return e}(t.nativeEvent.deltaY);const o=y-D;if(n<0)n=0;else if(n>o)n=o;null===(r=e.onPositionChanged)||void 0===r||r.call(e,n,C)},children:e.readOnly?(0,r.jsx)(h,{ref:$,direction:C,style:v(),getPaddingClasses:_,thumbThickness:V,thumbStyle:P}):(0,r.jsx)(l.Container,{ref:k,onCustomdragStart:function(){if(w(!0),e.onDraggingChanged)e.onDraggingChanged(!0,C)},onDragMove:function(t){var r;const n=u(t.domEvent,C),o=d(E.size,E.offset,n,O,E.dragPointOffset),l=g(E.size,O,y,o);null===(r=e.onPositionChanged)||void 0===r||r.call(e,l,C)},onDocumentDragEnd:function(){if(W)if(w(!1),e.onDraggingChanged)e.onDraggingChanged(!1,C)},children:(0,r.jsx)(h,{thumbRef:$,direction:C,getPaddingClasses:_,style:v(),onMouseDown:function(e){e.preventDefault(),e.stopPropagation(),p(e)},thumbStyle:P,thumbThickness:V,dragging:W})})})})),t.default=(0,n.forwardRef)(((e,o)=>{const l=(0,n.useCallback)(((t,r)=>{var n;null===(n=e.onPositionChanged)||void 0===n||n.call(e,void 0,t,r)}),[e.onPositionChanged]),i=(0,n.useCallback)(((t,r)=>{var n;null===(n=e.onDraggingChanged)||void 0===n||n.call(e,void 0,t,r)}),[e.onDraggingChanged]);return(0,r.jsx)(t.ScrollbarComponent,{...e,ref:o,readOnly:!1,onPositionChanged:l,onDraggingChanged:i})})),t}(0,{},e,t,o,l,n,r,c,o,"undefined"==typeof css_Controls_scrollbar||css_Controls_scrollbar),f=d,s.ScrollbarComponent=s.Scrollbar=s.getScrollbarWidthByMeasuredBlock=s.get
7ScrollbarWidth=void 0,Object.defineProperty(s,"Scrollbar",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(s,"ScrollbarComponent",{enumerable:!0,get:function(){return f.ScrollbarComponent}}),Object.defineProperty(s,"getScrollbarWidth",{enumerable:!0,get:function(){return u.getScrollbarWidth}}),Object.defineProperty(s,"getScrollbarWidthByMeasuredBlock",{enumerable:!0,get:function(){return u.getScrollbarWidthByMeasuredBlock}}),s}));
8define("Controls/scroll",["react/jsx-runtime","react","UICore/Jsx","UICommon/Utils","UI/NodeCollector","UI/Events","UI/Base","UI/Adaptive","Types/util","Types/entity","EnvTouch/EnvTouch","Env/Event","Env/Env","Core/core-instance","Controls/stickyBlock","Controls/sizeUtils","Controls/scrollLiteExt","Controls/event","Controls/Container/Async","Compiler/IR","Browser/Storage","Application/Env","require","exports","UI/HotKeys","css!Controls/scroll"],(function(t,e,i,o,l,s,r,n,a,c,h,d,_,u,S,g,p,v,f,C,b,O,m,I){var y,w,T,L,H,R,E,M,P,V,z,B,A,D,k,N,x,W,U,F,j,Y,$,K,Z,G,X,q,J,Q,tt,et,it,ot,lt,st,rt,nt,at,ct,ht,dt,_t,ut,St,gt,pt,vt,ft,Ct,bt,Ot,mt,It,yt,wt,Tt,Lt,Ht,Rt;return Object.defineProperty(I,"__esModule",{value:!0}),y=function(t,e,i,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class l extends((0,i.mixin)(o.VersionableMixin)){constructor(){super(...arguments),this._isTopVisible=!1,this._isBottomVisible=!1,this.isTopFixed=!1,this.isBottomFixed=!1,this._isLeftVisible=!1,this._isRightVisible=!1,this.isLeftFixed=!1,this.isRightFixed=!1}set isTopVisible(t){if(t!==this._isTopVisible)this._isTopVisible=t,this._nextVersion()}get isTopVisible(){return this._isTopVisible}set isBottomVisible(t){if(t!==this._isBottomVisible)this._isBottomVisible=t,this._nextVersion()}get isBottomVisible(){return this._isBottomVisible}set isLeftVisible(t){if(t!==this._isLeftVisible)this._isLeftVisible=t,this._nextVersion()}get isLeftVisible(){return this._isLeftVisible}set isRightVisible(t){if(t!==this._isRightVisible)this._isRightVisible=t,this._nextVersion()}get isRightVisible(){return this._isRightVisible}}return e.default=l,e}(0,{},a,c),w=function(t,e){"use strict";return Object.defineProperty(e,"__esModule",{value:!0}),e.getDefaultOptions=void 0,e.getDefaultOptions=function(){return{horizontalScrollMode:"scrollbar",verticalScrollMode:"scrollbar"}},e}(0,{}),T=function(t,e){"use strict";var i,o;return Object.defineProperty(e,"__esModule",{value:!0}),e.getDefaultOptions=e.SHADOW_MODE=e.SHADOW_VISIBILITY=void 0,function(t){t.HIDDEN="hidden",t.VISIBLE="visible",t.AUTO="auto",t.GRIDAUTO="gridauto"}(i||(e.SHADOW_VISIBILITY=i={})),function(t){t.JS="js",t.MIXED="mixed",t.CSS="css",t.BLUR="blur",t.ROUNDED="rounded"}(o||(e.SHADOW_MODE=o={})),e.getDefaultOptions=function(){return{topShadowVisibility:i.AUTO,bottomShadowVisibility:i.AUTO,leftShadowVisibility:i.AUTO,rightShadowVisibility:i.AUTO,shadowMode:o.MIXED,shadowStyle:"default"}},e}(0,{}),L=T,H=T,R=function(t,e){"use strict";var i,o,l,s;return Object.defineProperty(e,"__esModule",{value:!0}),e.OverscrollBehavior=e.ScrollShadowVisibility=e.SCROLL_MODE=e.POSITION=void 0,function(t){t.TOP="top",t.BOTTOM="bottom",t.LEFT="left",t.RIGHT="right"}(i||(e.POSITION=i={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal",t.VERTICAL_HORIZONTAL="verticalHorizontal",t.NONE="none"}(o||(e.SCROLL_MODE=o={})),function(t){t.Hidden="hidden",t.Visible="visible",t.Auto="auto",t.Gridauto="gridauto"}(l||(e.ScrollShadowVisibility=l={})),function(t){t.Auto="auto",t.Contain="contain"}(s||(e.OverscrollBehavior=s={})),e}(0,{}),E=R,M=function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListScrollContext=void 0;const o=i.createContext(void 0);return e.ListScrollContext=o,e}(0,{},e),P=M,V=function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollContext=void 0;const o=i.createContext({pagingVisible:!1});return e.ScrollContext=o,e}(0,{},e),z=function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});return e.default=class{constructor(t,e){this.nativeEntry=t,this.data=e}},e}(0,{}
8),B=z,A=function(t,e,i){"use strict";const o={calcHeightFixFn(t){if(i.constants.isBrowserPlatform&&t)if(i.detection.firefox)return t.scrollHeight===t.offsetHeight&&t.scrollHeight<35;return!1}};return{_private:o,calcHeightFix:o.calcHeightFixFn}}(0,0,_),D=function(t,e,i){"use strict";function o(t,e=a.VERTICAL){let i;if(e===a.VERTICAL)i=t.scrollTop||0;else if(e===a.HORIZONTAL)i=t.scrollLeft||0;return i}function l(t,e=a.VERTICAL){let i;if(e===a.VERTICAL)i=t.clientHeight;else if(e===a.HORIZONTAL)i=t.clientWidth;return i}function s(t,e=a.VERTICAL){var i;let o;if(e===a.VERTICAL)o=Math.min((null===(i=t.content)||void 0===i?void 0:i.scrollHeight)||t.scrollHeight,t.scrollHeight);else if(e===a.HORIZONTAL)o=t.scrollWidth;return o}function r(t,e,i){let o;if(t<=0)o=c.START;else if(t+e+1.5>=i)o=c.END;else o=c.MIDDLE;return o}function n(t,e){return Math.floor(e-t)>1}var a,c;Object.defineProperty(e,"__esModule",{value:!0}),e.isCursorAtScrollPoint=e.getScrollContainerPageCoords=e.canScrollByState=e.canScroll=e.getScrollPositionTypeByState=e.getScrollPositionType=e.SCROLL_POSITION=e.getContentSizeByState=e.getViewportSizeByState=e.getScrollPositionByState=e.scrollTo=e.SCROLL_DIRECTION=void 0,function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(a||(e.SCROLL_DIRECTION=a={})),e.scrollTo=function(t,e,i=a.VERTICAL){if(i===a.VERTICAL)t.scrollTop=e;else if(i===a.HORIZONTAL)t.scrollLeft=e},e.getScrollPositionByState=o,e.getViewportSizeByState=l,e.getContentSizeByState=s,function(t){t.START="start",t.END="end",t.MIDDLE="middle"}(c||(e.SCROLL_POSITION=c={}));return e.getScrollPositionType=r,e.getScrollPositionTypeByState=function(t,e=a.VERTICAL){return r(o(t,e),l(t,e),s(t,e))},e.canScroll=n,e.canScrollByState=function(t,e=a.VERTICAL){return n(l(t,e),s(t,e))},e.getScrollContainerPageCoords=function(t){const e=i.DimensionsMeasurer.getBoundingClientRect(t),o=i.DimensionsMeasurer.getElementDimensions(document.documentElement),l=i.DimensionsMeasurer.getElementDimensions(document.body),s=i.DimensionsMeasurer.getWindowDimensions(t),r=s.pageYOffset||o.scrollTop||l.scrollTop,n=s.pageXOffset||o.scrollLeft||l.scrollLeft,a=o.clientTop||l.clientTop||0,c=o.clientLeft||l.clientLeft||0;return{top:e.top+r-a,left:e.left+n-c,bottom:e.bottom+r-a,right:e.right+n-c}},e.isCursorAtScrollPoint=function(t,e,i,o=a.VERTICAL){let l=null,s=null;if(o===a.VERTICAL)l={start:t.top,end:t.bottom,cursor:e.pageY},s={start:t.left,end:t.right,cursor:e.pageX};else l={start:t.left,end:t.right,cursor:e.pageX},s={start:t.top,end:t.bottom,cursor:e.pageY};const r=l.cursor>l.start&&l.cursor<l.end,n=s.cursor<s.end&&s.cursor>s.start,c=l.cursor<l.start,h=l.cursor>l.end,d=l.cursor>l.start&&l.cursor<l.start+i,_=l.cursor<l.end&&l.cursor>l.end-i,u=l.cursor-l.start<i&&l.cursor-l.start>0?l.cursor-l.start:void 0,S=l.end-l.cursor<i&&l.end-l.cursor>0?l.end-l.cursor:void 0;return{nearStart:d||c,nearEnd:_||h,near:r&&(d||_),coordsToInternalBorder:u||S,inContainer:r,inScrollLine:n}},e}(0,{},g),k=D,N=function(t,e,i){"use strict";return Object.defineProperty(e,"__esModule",{value:!0}),e.getScrollContentElement=void 0,e.getScrollContentElement=function(t){let e=t.closest(".controls-Scroll-ContainerBase__content");if((0,i.getStore)("AdaptiveInitializer").get("isScrollOnBody")){const i=window.screen.height,o=t.closest(".controls-Scroll-Container");if(e&&o&&e.getBoundingClientRect().height>i&&o.scrollHeight>i){if(!e.isScrollOnBody)e.isScrollOnBody=!0;e=document.scrollingElement}if(e&&e.isScrollOnBody)e=document.scrollingElement}return e},e}(0,{},O),x=N,W=function(t,e,i){"use strict";return Object.defineProperty(e,"__esModule",{value:!0}),e.hasHorizontalScroll=void 0,e.hasHorizontalScroll=function(t){const e=getComputedStyle(t);if("right"===e.textAlign&&i.detection.chrome&&t!==document.activeElement){t.style.direction="rtl",t.style.textAlign="left";const i=Math.abs(parseFloat(e.width)-t.scrollWidth)>=1;return t.style.direction="",t.style.textAlign="",i}const o=parseFloat(e.width);return t.scrollWidth>Math.ceil(o)},e}(0,{},_),U=W,F=function(t,e,i){"use strict";return Object.defineProperty(e,"__esModule",{value:!0}),e.default=i.forwardRef((function(t,e){const[o,l]=i.useState(!0);i.useEffect((()=>{const e=t.register(((e,i)=>{if(e===t.position)l(!i)}));return()=>e()}),[]);const s=o?"":"tw-hidden-important";return i.cloneElement(t.children,{className:s,ref:e})})),e}(0,{},e),j=function(t){"use strict";function e(){return this}var i="undefined"==typeof window,o=["_selectedKeysChanged","_excludedKeysChanged","_listSelectedKeysCountChanged","_tmplNotify","_itemClick","_getContentDirectionClass","_contentWrapperCssClass","_scrollCssClass","_initialScrollPositionCssClass","_overscrollBehavior","_scrollHandler","_wheelHandler","_doScrollHandler","_doHorizontalScrollHandler","_registerIt","_unRegisterIt","_scrollToElement","_horizontalScrollToElement","_updatePlaceholdersSize","_controlResizeHandler","_enableVirtualNavigationHandler","_disableVirtualNavigationHandler","_onTouchMove","_onMouseLeave","_onMouseMove","theme","_options","scroll","customscroll","wheel","doScroll","doHorizontalScroll","register","unregister","scrollToElement","horizontalScrollToElement","updatePlaceholdersSize","controlResize","enableVirtualNavigation","disableVirtualNavigation","touchmove","touchleave","mousemove","mouseleave","scrollOrientation","content","selectedKeysChanged","excludedKeysChanged","listSelectedKeysCountChanged","beforeSelectionChanged","itemClick","itemMouseDown","rootChanged","sortingChanged","expandedItemsChanged","collapsedItemsChanged","checkBoxClick","markedKeyChanged","beforeMarkedKeyChanged","actionClick","editArrowClick","navigationParamsChanged"];
8return t.g({v:1,m:"wml!Controls/_scroll/ContainerBase/ContainerBase",t:[t.r(((t,l)=>[t.g(l,"div",{K:"0_",A:{class:"controls-Scroll-ContainerBase controls_scroll_theme-"+t.e(t.x(l,0))+" controls-Scroll__content "+t.e(t.x(l,1))+" "+t.e(t.x(l,2)),style:"overscroll-behavior-y: "+t.e(t.x(l,3))+";",name:"content","data-qa":"controls-Scroll__content"},E:i?{}:{"on:scroll":[{value:o[10],originalName:o[27],viewController:l.v}],"on:customscroll":[{value:o[10],originalName:o[28],viewController:l.v}],"on:wheel":[{value:o[11],originalName:o[29],viewController:l.v}],"on:doscroll":[{value:o[12],originalName:o[30],viewController:l.v}],"on:dohorizontalscroll":[{value:o[13],originalName:o[31],viewController:l.v}],"on:register":[{value:o[14],originalName:o[32],viewController:l.v}],"on:unregister":[{value:o[15],originalName:o[33],viewController:l.v}],"on:scrolltoelement":[{value:o[16],originalName:o[34],viewController:l.v}],"on:horizontalscrolltoelement":[{value:o[17],originalName:o[35],viewController:l.v}],"on:updateplaceholderssize":[{value:o[18],originalName:o[36],viewController:l.v}],"on:controlresize":[{value:o[19],originalName:o[37],viewController:l.v}],"on:enablevirtualnavigation":[{value:o[20],originalName:o[38],viewController:l.v}],"on:disablevirtualnavigation":[{value:o[21],originalName:o[39],viewController:l.v}],"on:touchmove":[{value:o[22],originalName:o[40],viewController:l.v}],"on:touchleave":[{value:o[23],originalName:o[41],viewController:l.v}],"on:mousemove":[{value:o[24],originalName:o[42],viewController:l.v}],"on:mouseleave":[{value:o[23],originalName:o[43],viewController:l.v}],meta:{isControl:!1,context:e,handler:t.M(l,4)}},r:!0,c:!0},[t.g(l,"div",{K:"0_0_",A:{name:"userContent",class:"controls-Scroll-ContainerBase__content controls-Scroll-ContainerBase__content__"+t.e(t.x(l,5))+" "+t.e(t.x(l,6))+" "+t.e(t.x(l,7))}},[t.P(l,t.m(l,8),{K:"0_0_0_",A:{class:"controls-Scroll-containerBase_userContent"},E:{"on:selectedkeyschanged":[{value:o[0],originalName:o[46],viewController:l.v}],"on:excludedkeyschanged":[{value:o[1],originalName:o[47],viewController:l.v}],"on:listselectedkeyscountchanged":[{value:o[2],originalName:o[48],viewController:l.v}],"on:beforeselectionchanged":[{value:o[3],originalName:o[49],viewController:l.v,args:[o[49]]}],"on:itemclick":[{value:o[4],originalName:o[50],viewController:l.v}],"on:itemmousedown":[{value:o[3],originalName:o[51],viewController:l.v,args:[o[51]]}],"on:rootchanged":[{value:o[3],originalName:o[52],viewController:l.v,args:[o[52]]}],"on:sortingchanged":[{value:o[3],originalName:o[53],viewController:l.v,args:[o[53]]}],"on:expandeditemschanged":[{value:o[3],originalName:o[54],viewController:l.v,args:[o[54]]}],"on:collapseditemschanged":[{value:o[3],originalName:o[55],viewController:l.v,args:[o[55]]}],"on:checkboxclick":[{value:o[3],originalName:o[56],viewController:l.v,args:[o[56]]}],"on:markedkeychanged":[{value:o[3],originalName:o[57],viewController:l.v,args:[o[57]]}],"on:beforemarkedkeychanged":[{value:o[3],originalName:o[58],viewController:l.v,args:[o[58]]}],"on:actionclick":[{value:o[3],originalName:o[59],viewController:l.v,args:[o[59]]}],"on:editarrowclick":[{value:o[3],originalName:o[60],viewController:l.v,args:[o[60]]}],"on:navigationparamschanged":[{value:o[3],originalName:o[61],viewController:l.v,args:[o[61]]}],meta:{isControl:!1,context:e,handler:t.M(l,4)}},O:t.s(l,{_contentWrapperCssClass:void 0,_scrollCssClass:void 0,_overscrollBehavior:void 0,_initialScrollPositionCssClass:void 0},t.m(l,9)),m:"none",i:0})])])]))],p:o.slice(0,25),e:[(t,e)=>t.g(e,[o[26],o[25]]),(t,e)=>t.g(e,[o[7]]),(t,e)=>t.g(e,[o[8]]),(t,e)=>t.g(e,[o[9]]),function(t,e,i,o,l,s){return t.g(this,[s])},(t,e)=>t.g(e,[o[26],o[44]]),(t,e,i)=>t.c(i,e,[o[5]]),(t,e)=>t.g(e,[o[6]]),(t,e)=>t.g(e,[o[26],o[45]]),(t,e)=>t.g(e,[o[26]])],i:[[[9]]]})}(C),Y=function(t){"use strict";function e(){return this}var i=["_defaultActions","_keyDown","content","_options","keyDown"];return t.g({v:1,m:"wml!Controls/_scroll/HotKeysContainer",d:t.d(["UI/HotKeys"],arguments,1),t:[t.c(((t,o)=>[t.P(o,t.m(o,1),{K:"0_0_0_",E:{"on:keydown":[{value:i[1],originalName:i[4],viewController:o.v}],meta:{isControl:!1,context:e,handler:t.M(o,2)}},O:t.s(o,{},t.m(o,3)),g:!0,m:"attribute",i:0})])),t.r(((t,e)=>[t.C(e,{library:"UI/HotKeys",module:["KeyHook"]},{K:"0_",O:{esc:!1,defaultActions:t.m(e,0),content:t.o(e,0,1)},m:"attribute",c:!0})]))],p:i.slice(0,2),e:[(t,e)=>t.g(e,[i[0]]),(t,e)=>
8t.g(e,[i[3],i[2]]),function(t,e,i,o,l,s){return t.g(this,[s])},(t,e)=>t.g(e,[i[3]])],i:[[[3]],[[1],[3]]]})}(C,"undefined"==typeof UI_HotKeys?null:UI_HotKeys),$=function(t){"use strict";var e=["content","_options"];return t.g({v:1,m:"wml!Controls/_scroll/IntersectionObserver/Container",t:[t.r(((t,e)=>[t.P(e,t.m(e,0),{K:"0_",O:t.s(e,{},t.m(e,1)),m:"attribute",c:!0,i:0})]))],e:[(t,i)=>t.g(i,[e[1],e[0]]),(t,i)=>t.g(i,[e[1]])],i:[[[1]]]})}(C),K=function(t){"use strict";function e(){return this}var i=["_registerHandler","_unregisterHandler","content","_options","intersectionObserverRegister","intersectionObserverUnregister"];return t.g({v:1,m:"wml!Controls/_scroll/IntersectionObserver/Controller",t:[t.r(((t,o)=>[t.P(o,t.m(o,0),{K:"0_",E:{"on:intersectionobserverregister":[{value:i[0],originalName:i[4],viewController:o.v}],"on:intersectionobserverunregister":[{value:i[1],originalName:i[5],viewController:o.v}],meta:{isControl:!1,context:e,handler:t.M(o,1)}},O:t.s(o,{observerName:null},t.m(o,2)),m:"attribute",c:!0,i:0})]))],p:i.slice(0,2),e:[(t,e)=>t.g(e,[i[3],i[2]]),function(t,e,i,o,l,s){return t.g(this,[s])},(t,e)=>t.g(e,[i[3]])],i:[[[2]]]})}(C),Z=function(t){"use strict";var e=["topOffset","_options","content","bottomOffset"];return t.g({v:1,m:"wml!Controls/_scroll/IntersectionObserver/EdgeIntersectionContainer",t:[t.r(((t,e)=>[t.g(e,"div",{K:"0_",A:{class:"controls-EdgeIntersectionContainer"},r:!0,c:!0},[t.m(e,0)?[t.g(e,"div",{K:"0_0_0_",A:{class:"controls-EdgeIntersectionContainer__trigger",name:"topTrigger",style:"top:"+t.e(t.x(e,1))+"px;"}})]:t.t(),t.P(e,t.m(e,2),{K:"0_1_",O:t.s(e,{},t.m(e,3)),m:"none",i:0}),t.m(e,4)?[t.g(e,"div",{K:"0_2_0_",A:{class:"controls-EdgeIntersectionContainer__trigger",name:"bottomTrigger",style:"bottom:"+t.e(t.x(e,5))+"px;"}})]:t.t()])]))],e:[(t,i)=>void 0!==t.g(i,[e[1],e[0]]),(t,i)=>t.g(i,[e[1],e[0]]),(t,i)=>t.g(i,[e[1],e[2]]),(t,i)=>t.g(i,[e[1]]),(t,i)=>void 0!==t.g(i,[e[1],e[3]]),(t,i)=>t.g(i,[e[1],e[3]])],i:[[[3]]]})}(C),G=function(t,e,i,o,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class s extends((0,i.mixin)(o.VersionableMixin)){constructor(){super(...arguments),this._arrowState={},this._isVisible=!1,this._pagingMode="hidden"}update(t){if(this._position!==t.verticalPosition){if(this._position=t.verticalPosition,t.verticalPosition===l.SCROLL_POSITION.START)this._arrowState={begin:"readonly",prev:"readonly",next:"visible",end:"hidden"};else if(t.verticalPosition===l.SCROLL_POSITION.END)this._arrowState={begin:"visible",prev:"visible",next:"readonly",end:"hidden"};else this._arrowState={begin:"visible",prev:"visible",next:"visible",end:"hidden"};if(this._isVisible)this._nextVersion()}}set isVisible(t){if(t!==this._isVisible)this._isVisible=t,this._nextVersion()}get isVisible(){return this._isVisible}get arrowState(){switch(this.pagingMode){case"edge":if("visible"===this._arrowState.next||"visible"===this._arrowState.end)this._arrowState.begin="hidden",this._arrowState.end="visible";else if("visible"===this._arrowState.begin)this._arrowState.end="hidden";this._arrowState.prev="hidden",this._arrowState.next="hidden";break;case"edges":if("visible"===this._arrowState.next)this._arrowState.end="visible";if("visible"===this._arrowState.prev)this._arrowState.begin="visible";this._arrowState.prev="hidden",this._arrowState.next="hidden";break;case"end":if("visible"===this._arrowState.next||"visible"===this._arrowState.end)this._arrowState.end="visible";else this._arrowState.end="hidden";this._arrowState.prev="hidden",this._arrowState.next="hidden",this._arrowState.begin="hidden";break;case"begin":if("visible"===this._arrowState.prev||"visible"===this._arrowState.begin)this._arrowState.begin="visible";else this._arrowState.begin="hidden";this._arrowState.prev="hidden",this._arrowState.next="hidden",this._arrowState.end="hidden"}return this._arrowState}set pagingMode(t){this._pagingMode=t}get pagingMode(){return this._pagingMode||"basic"}}return e.default=s,e}(0,{},a,c,D),X=function(t,e,i,o,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class r extends((0,o.mixin)(l.VersionableMixin)){get offsets(){return this._offsets}constructor(t,e){super(e),this._canScroll=!1,this._position=0,this._virtualPosition=0,this._offsets={top:0,bottom:0,left:0,right:0},this._placeholders={start:0,end:0},this._style="",this._enabled=!0,this._options=e,this._useNativeScrollbar=i.detection.isMobileIOS||i.detection.isMobileAndroid,this._direction=t}get isVisible(){return Boolean(!this._useNativeScrollbar&&this._options.scrollbarVisible&&this._canScroll)}get position(){return this._virtualPosition}get contentSize(){return this._contentSize}get enabled(){return this._enabled}updateOptions(t){this._options=t}updatePosition(t){let e=!1;const i=(0,s.canScrollByState)(t,this._direction),o=(0,s.getScrollPositionByState)(t,this._direction);if(i!==this._canScroll||o!==this._position)this._canScroll=i,this._position=o,this._updatePosition(),e=!0;if(e)this._nextVersion();return e}updateContentSize(t){let e=!1;const i=(0,s.getContentSizeByState)(t,this._direction);if(i!==this._originalContentSize)e=!0,this._originalContentSize=i,this._updateContentSize();if(e)this._nextVersion();return e}updatePlaceholdersSize(t){let e=!1;for(const i of Object.keys(t))if("number"==typeof t[i]&&t[i]!==this._placeholders[i])this._placeholders[i]=t[i],e=!0;if(e)this._updateContentSize(),this._updatePosition();return e}setOffsets(t){let e,i;if(this._offsets={...this._offsets,...t},e=this._updateContentSize(),this._direction===s.SCROLL_DIRECTION.VERTICAL)i=`top: ${t.top||0}px; bottom: ${t.bottom||0}px;`;else i=`left: ${t.left||0}px; right: ${t.right||0}px;`;if(i!==this._style)this._style=i,e=!0;if(e)this._nextVersion();return e}setEnabled(t){this._enabled=t}get style(){return this._style}_updateContentSize(){const t=this._contentSize,e=this._originalContentSize||0,i=this._direction===s.SCROLL_DIRECTION.VERTICAL?this._offsets.top+this._offsets.bottom:this._offsets.left+this._offsets.right;return this._contentSize=e-i+this._placeholders.start+this._placeholders.end,this._contentSize!==t}_updatePosition(){this._virtualPosition=this._position+this._placeholders.start}}return e.default=r,e}(0,{}
8,_,a,c,D),q=function(t,e,i,o,l,s,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const a={hidden:!1,visible:!0,auto:!0};var c;!function(t){t.BEFORE="before",t.AFTER="after"}(c||(c={}));const h={vertical:"Vertical",horizontal:"Horizontal"};class d extends((0,i.mixin)(o.VersionableMixin)){constructor(t,e){if(super(e),this._isEnabled=!1,this._isVisible=!1,this._isStickyFixed=!1,this._scrollState={canVerticalScroll:!1,canHorizontalScroll:!1},this._visibilityByInnerComponents=l.ScrollShadowVisibility.Auto,this._position=t,t===l.POSITION.TOP||t===l.POSITION.BOTTOM)this._direction=r.SCROLL_DIRECTION.VERTICAL;else if(t===l.POSITION.LEFT||t===l.POSITION.RIGHT)this._direction=r.SCROLL_DIRECTION.HORIZONTAL;if(t===l.POSITION.TOP||t===l.POSITION.LEFT)this._type=c.BEFORE;else if(t===l.POSITION.BOTTOM||t===l.POSITION.RIGHT)this._type=c.AFTER;this._options=e,this.updateScrollState(this._scrollState)}get isEnabled(){if(n.detection.isPhone&&"vertical"===this._direction)return!1;else return this._isEnabled}get isVisible(){if(n.detection.isPhone&&"vertical"===this._direction)return!1;else return this._isVisible}get isVisibleShadowOnCSS(){if(this._visibilityByInnerComponents!==s.SHADOW_VISIBILITY.AUTO)return this._visibilityByInnerComponents;const t=this._options[`${this._position}ShadowVisibility`];if(t!==s.SHADOW_VISIBILITY.AUTO)return t;else return"auto"}updateOptions(t){this._options=t,this.updateScrollState(this._scrollState)}updateScrollState(t){let e=!1;this._scrollState=t,e=this._updateEnabled();let i=!1;if(this._isEnabled)if(i=this._getVisibleByOptions(),void 0===i)i=this._getVisibleByState(t);if(i!==this._isVisible)this._isVisible=i,e=!0;return e}updateVisibilityByInnerComponents(t){let e=!1;if(this._visibilityByInnerComponents!==t)this._visibilityByInnerComponents=t,e=this.updateScrollState(this._scrollState);return e}getVisibilityByInnerComponents(){return this._visibilityByInnerComponents}_updateEnabled(){const t=this._getContainerShadowEnable();let e=!1;if(t!==this._isEnabled)this._isEnabled=t,e=!0;return e}_getVisibleByOptions(){if(this._visibilityByInnerComponents!==s.SHADOW_VISIBILITY.AUTO)return a[this._visibilityByInnerComponents];const t=this._options[`${this._position}ShadowVisibility`];if(t!==s.SHADOW_VISIBILITY.AUTO)return a[t];else return}_getVisibleByState(t){const e=t[`${this._direction}Position`];return this._type===c.BEFORE&&e!==r.SCROLL_POSITION.START||this._type===c.AFTER&&e!==r.SCROLL_POSITION.END}setStickyFixed(t){let e=!1;if(this._isStickyFixed!==t)this._isStickyFixed=t,e=this._updateEnabled();return e}isStickyHeadersShadowsEnabled(){if(n.detection.isPhone&&"vertical"===this._direction)return!1;else return this._getShadowEnable()}getStickyHeadersShadowsVisibility(){if(n.detection.isPhone&&"vertical"===this._direction)return l.ScrollShadowVisibility.Hidden;let t=l.ScrollShadowVisibility.Auto;if(this._visibilityByInnerComponents!==l.ScrollShadowVisibility.Auto)t=this._visibilityByInnerComponents;else if(!this._getShadowEnable()||!this._getVisibleByState(this._scrollState))t=l.ScrollShadowVisibility.Hidden;return t}_canScrollByScrollState(){return!!this._scrollState[`can${h[this._direction]}Scroll`]}_getContainerShadowEnable(){if(this._isStickyFixed)return!1;else return this._getShadowEnable()}_getShadowEnable(){var t,e;if(this._options[`${this._position}ShadowVisibility`]!==s.SHADOW_VISIBILITY.AUTO)return this._isShadowEnable();if("vertical"===this._direction&&"number"==typeof(null===(t=this._options.initialScrollPosition)||void 0===t?void 0:t.vertical)&&this._options.initialScrollPosition.vertical>0)return!0;if("horizontal"===this._direction&&"number"==typeof(null===(e=this._options.initialScrollPosition)||void 0===e?void 0:e.horizontal)&&this._options.initialScrollPosition.horizontal>0)return!0;const i=this._canScrollByScrollState();if(this._visibilityByInnerComponents!==s.SHADOW_VISIBILITY.AUTO&&i)return a[this._visibilityByInnerComponents];else return i}_isShadowEnable(){return a[this._options[`${this._position}ShadowVisibility`]]}}return e.default=d,e}(0,{},a,c,R,T,D,_),J=function(t,e,i,o){"use strict";
8Object.defineProperty(e,"__esModule",{value:!0}),e.WAIT_DELAY=e.DELAY=e.AUTOSCROLL_SIZE=e.AUTOSCROLL_DELTA=void 0,e.AUTOSCROLL_DELTA=15,e.AUTOSCROLL_SIZE=70,e.DELAY=20,e.WAIT_DELAY=200;return e.default=class{constructor(t,e,i){this._waitAutoScroll=null,this._skipHorizontalAutoscroll=!1,this._skipVerticalAutoscroll=!1,this._scrollContainer=t,this._setScrollTop=e,this._horizontalScrollTo=i}updateOptions(t){this._scrollOrientation=t.scrollOrientation,this._topPlaceholderSize=t.topPlaceholderSize,this._scrollTop=t.scrollTop,this._scrollLeft=t.scrollLeft}getCursorPosition(t){var e,i;const o=t.nativeEvent||t;return{pageX:void 0!==o.pageX?o.pageX:null===(e=o.targetTouches)||void 0===e?void 0:e[0].clientX,pageY:void 0!==o.pageY?o.pageY:null===(i=o.targetTouches)||void 0===i?void 0:i[0].clientY}}onMouseMove(t,e,o){if(!e&&!o)return;const l=this.getCursorPosition(t);this._scrollContainerCoords=(0,i.getScrollContainerPageCoords)(this._scrollContainer),this.startAutoScroll(l,e,o)}onMouseLeave(){this.stopWaitAutoScroll(),this.stopAutoScroll()}startAutoScroll(t,o=!0,l=!0,s=void 0,r){let n=!1,a=!1;if(l)this._cursorOnHorizontalBorder=(0,i.isCursorAtScrollPoint)(this._scrollContainerCoords,t,e.AUTOSCROLL_SIZE,i.SCROLL_DIRECTION.HORIZONTAL),n=this._updateProcessScroll(this._cursorOnHorizontalBorder,i.SCROLL_DIRECTION.HORIZONTAL);if(o)this._cursorOnVerticalBorder=(0,i.isCursorAtScrollPoint)(this._scrollContainerCoords,t,e.AUTOSCROLL_SIZE,i.SCROLL_DIRECTION.VERTICAL),a=this._updateProcessScroll(this._cursorOnVerticalBorder,i.SCROLL_DIRECTION.VERTICAL);const c=n||a;if(c&&!this._autoScrollInterval&&!this._waitAutoScroll)this._waitAutoScroll=setTimeout((()=>{this._autoScrollInterval=setInterval((()=>{if(s)s.bind(r)();if(o)this._processScroll(this._cursorOnVerticalBorder,i.SCROLL_DIRECTION.VERTICAL);if(l)this._processScroll(this._cursorOnHorizontalBorder,i.SCROLL_DIRECTION.HORIZONTAL)}),e.DELAY)}),e.WAIT_DELAY);else if(!c)this.stopWaitAutoScroll(),this.stopAutoScroll()}stopAutoScroll(){if(this._autoScrollInterval)clearInterval(this._autoScrollInterval),this._autoScrollInterval=null}stopWaitAutoScroll(){if(this._waitAutoScroll)clearTimeout(this._waitAutoScroll),this._waitAutoScroll=null}_processScroll(t,e){if(!this._isSupportScrollDirection(this._scrollOrientation,e))return;const o=e===i.SCROLL_DIRECTION.VERTICAL,l=o?this._scrollTop+this._topPlaceholderSize:this._scrollLeft,s=(o?this._setScrollTop:this._horizontalScrollTo).bind(this),r=this._calcAutoScrollDelta(t);if(t.nearStart&&t.inScrollLine)s(l-r);if(t.nearEnd&&t.inScrollLine)s(l+r)}_calcAutoScrollDelta(t){let i;if(t.near)i=this._deltaLinearFunction(t.coordsToInternalBorder);else i=e.AUTOSCROLL_DELTA;return i}_deltaLinearFunction(t){return-9/70*t+10}_updateProcessScroll(t,e){if(!t.inContainer)return!0;const o=`_skip${e===i.SCROLL_DIRECTION.VERTICAL?"Vertical":"Horizontal"}Autoscroll`;if(!t.near||this[o]){if(!t.near)this[o]=!1;return!1}return!0}_isSupportScrollDirection(t,e){if(e===i.SCROLL_DIRECTION.VERTICAL)return t===o.SCROLL_MODE.VERTICAL_HORIZONTAL||t===o.SCROLL_MODE.VERTICAL;else return t===o.SCROLL_MODE.VERTICAL_HORIZONTAL||t===o.SCROLL_MODE.HORIZONTAL}destroy(){this.stopWaitAutoScroll(),this.stopAutoScroll()}},e}(0,{},D,R),Q=function(t,e,i,o,l,s,r,n,a){"use strict";function c(t){var e,o,l,s;let r;if(t.offsetTop)r={top:t.offsetTop};return(0,i.jsxs)(i.Fragment,{children:[(null===(e=t.shadows.top)||void 0===e?void 0:e.isEnabled)&&!t.isOptimizeShadowEnabled&&(0,i.jsx)("div",{className:`controls-Scroll__shadow ${t.getShadowClasses("horizontal","top")} ${!t.shadows.top.isVisible?"tw-invisible-important":""}`,"data-qa":"Scroll__shadow_top"}),(null===(o=t.shadows.bottom)||void 0===o?void 0:o.isEnabled)&&!t.isOptimizeShadowEnabled&&(0,i.jsx)("div",{className:`controls-Scroll__shadow ${t.getShadowClasses("horizontal","bottom")} ${!t.shadows.bottom.isVisible?"tw-invisible-important":""}`,"data-qa":"Scroll__shadow_bottom"}),(null===(l=t.shadows.left)||void 0===l?void 0:l.isEnabled)&&"blur"!==t.shadowMode&&(0,i.jsx)("div",{className:`controls-Scroll__shadow ${t.getShadowClasses("vertical","left")} ${!t.shadows.left.isVisible?"tw-invisible-important":""}`,style:r,"data-qa":"Scroll__shadow_left"}),(null===(s=t.shadows.right)||void 0===s?void 0:s.isEnabled)&&"blur"!==t.shadowMode&&(0,i.jsx)("div",{className:`controls-Scroll__shadow ${t.getShadowClasses("vertical","right")} ${!t.shadows.right.isVisible?"tw-invisible-important":""}`,style:r,"data-qa":"Scroll__shadow_right"})]})}function h(t){const e=t.direction,l="up"===e||"down"===e?"vertical":"horizontal",s="down"===e||"right"===e?"next":"prev",r=t.buttonsSize,n=t.buttonsViewMode;return(0,i.jsx)(o.default,{templateName:"Controls/extButtons:ArrowButton",templateOptions:{direction:e,viewMode:n,translucent:"dark",inlineHeight:r,className:`controls-ArrowButton_stretched_scroll controls-ArrowButton_stretched_scroll-${l} controls-ArrowButton_stretched_scroll_direction-${e} controls-ArrowButton_stretched_scroll_offset-${r}`+("hover"===t.buttonsMode?" controls-scroll_scrollButton__hovered":""),"data-qa":`controls_Scroll__ArrowButton_direction_${"horizontal"===l?s:e}`,onClick:()=>t.handleArrowButton(s,l),readOnly:!1}})}function d(t){return(0,i.jsxs)(i.Fragment,{children:[t.arrowButtons&&t.arrowButtons.isTopVisible&&(0,i.jsx)(h,{handleArrowButton:t.handleArrowButton,buttonsMode:t.buttonsMode,buttonsViewMode:t.buttonsViewMode,buttonsSize:t.buttonsSize,direction:"up"}),t.arrowButtons&&t.arrowButtons.isBottomVisible&&(0,i.jsx)(h,{handleArrowButton:t.handleArrowButton,buttonsMode:t.buttonsMode,buttonsViewMode:t.buttonsViewMode,buttonsSize:t.buttonsSize,direction:"down"}),t.arrowButtons&&t.arrowButtons.isLeftVisible&&(0,i.jsx)(h,{handleArrowButton:t.handleArrowButton,buttonsMode:t.buttonsMode,buttonsViewMode:t.buttonsViewMode,buttonsSize:t.buttonsSize,direction:"left"}),t.arrowButtons&&t.arrowButtons.isRightVisible&&(0,i.jsx)(h,{handleArrowButton:t.handleArrowButton,buttonsMode:t.buttonsMode,buttonsViewMode:t.buttonsViewMode,buttonsSize:t.buttonsSize,direction:"right"})]})}function _(t,e){var l,s,r,n;return(null===(l=t.scrollbars)||void 0===l?void 0:l.isVisible)&&(0,i.jsxs)(i.Fragment,{children:[(null===(s=t.scrollbars.vertical)||void 0===s?void 0:s.isVisible)&&(0,i.jsx)(o.default,{templateName:"Controls/scrollbar:Scrollbar",templateOptions:{className:"controls-Scroll__scrollbar "+(!t.dragging?"controls-Scroll__scrollbar_hidden":""),style:e.verticalScrollbarStyles,position:t.scrollbars.vertical.position,contentSize:t.scrollbars.vertical.contentSize,paddings:t.verticalScrollbarPaddings,onPositionChanged:t.scrollbarPositionChangedH
8andler,onDraggingChanged:t.scrollbarDraggingChangedHandler}}),(null===(r=t.scrollbars.horizontal)||void 0===r?void 0:r.isVisible)&&(0,i.jsx)(o.default,{templateName:"Controls/scrollbar:Scrollbar",templateOptions:{className:"controls-Scroll__scrollbar "+(!t.dragging?"controls-Scroll__scrollbar_hidden":""),style:e.horizontalScrollbarStyles,position:t.scrollbars.horizontal.position,contentSize:t.scrollbars.horizontal.contentSize,direction:"horizontal",paddings:t.horizontalScrollbarPaddings,hasOppositeScrollbar:null===(n=t.scrollbars.vertical)||void 0===n?void 0:n.isVisible,onPositionChanged:t.scrollbarPositionChangedHandler,onDraggingChanged:t.scrollbarDraggingChangedHandler}})]})}return Object.defineProperty(e,"__esModule",{value:!0}),e.default=r.memo(r.forwardRef((function(t,e){var o,h,u,S,g,p;const{clearProps:v,userAttrs:f}=(0,s.delimitProps)(t),C=r.useContext(n.ScrollContext),[b,O]=r.useReducer((t=>t+1),0),m=r.useRef({}),I=r.useRef({});r.useEffect((()=>{if(t.getContextValue)t.getContextValue(null==C?void 0:C.pagingVisible)}),[C]);const y=(t,e,i,o=!0)=>{const l={...t,models:{}};for(const e in t.models)if(t.models.hasOwnProperty(e))l.models[e]={...t.models[e]};m.current=l;let s={scrollTop:(null==i?void 0:i._scrollTop)||0,horizontalPosition:(null==i?void 0:i._horizontalPosition)||a.SCROLL_POSITION.START,horizontalScrollMode:(null==i?void 0:i.horizontalScrollMode)||"default"};if(JSON.stringify(I.current.scrollState)===JSON.stringify(s))s=I.current.scrollState;if(I.current={...e,scrollState:s},o)O()};if(t.setStickyContextUpdater(y),!Object.keys(m.current).length)y(v.stickyModels,v.stickyGroupModels,{horizontalScrollMode:t.horizontalScrollMode},!1);const w=(null===(u=(0,s.wasabyAttrsToReactDom)({style:null===(h=null===(o=t.scrollbars)||void 0===o?void 0:o.vertical)||void 0===h?void 0:h.style}))||void 0===u?void 0:u.style)||{},T=(null===(p=(0,s.wasabyAttrsToReactDom)({style:null===(g=null===(S=t.scrollbars)||void 0===S?void 0:S.horizontal)||void 0===g?void 0:g.style}))||void 0===p?void 0:p.style)||{};if(t.scrollbarOffsetTop)w.top=t.scrollbarOffsetTop;return(0,i.jsx)(l.StickyContext.Provider,{value:m.current,children:(0,i.jsx)(l._StickyGroupContext.Provider,{value:I.current,children:(0,i.jsxs)(i.Fragment,{children:[v.content.isWasabyTemplate?(0,i.jsx)(v.content,{forwardedRef:e,...f}):r.cloneElement(v.content,{...f,forwardedRef:e}),c(t),d(t),_(t,{verticalScrollbarStyles:w,horizontalScrollbarStyles:T})]})})})}))),e}(0,{},t,f,S,i,e,V,D,"undefined"==typeof css_Controls_scroll||css_Controls_scroll),tt=function(t,e,i,o,l){"use strict";return Object.defineProperty(e,"__esModule",{value:!0}),e.default=o.forwardRef((function(t,e){const s=o.useContext(l.ListScrollContext);return o.useEffect((()=>{if(t.getContextValue)t.getContextValue(s)}),[s]),(0,i.jsx)(t.content,{...s,...t})})),e}(0,{},t,e,M),et=tt,it=function(t,e,i,o,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class s extends o.Component{constructor(t){super(t),this.horizontalScrollMode="scrollbar",this.state=this.getNewOptions(this.props)}componentDidUpdate(){const t=this.getNewOptions(this.props);if(this.state.horizontalScrollMode!==t.horizontalScrollMode||this.state.setHorizontalScrollMode!==t.setHorizontalScrollMode||this.state.canHorizontalScroll!==t.canHorizontalScroll||this.state.setArrowButtonClickCallback!==t.setArrowButtonClickCallback||this.state.removeArrowButtonClickCallback!==t.removeArrowButtonClickCallback||this.state.intersectionObserverRegister!==t.intersectionObserverRegister||this.state.intersectionObserverUnregister!==t.intersectionObserverUnregister||this.state.updatePlaceholdersSize!==t.updatePlaceholdersSize||this.state.updateShadowVisibility!==t.updateShadowVisibility||this.state.contextEvent!==t.contextEvent)this.setState(t)}getNewOptions(t){if("canHorizontalScroll"in t&&t.canHorizontalScroll!==this.canHorizontalScroll)this.canHorizontalScroll=t.canHorizontalScroll;if("setHorizontalScrollMode"in t&&t.setHorizontalScrollMode!==this._setHorizontalScrollModeCallback)this._setHorizontalScrollModeCallback(t.setHorizontalScrollMode),this._setHorizontalScrollModeCallback=t.setHorizontalScrollMode;return{setArrowButtonClickCallback:t.setArrowButtonClickCallback,removeArrowButtonClickCallback:t.removeArrowButtonClickCallback,intersectionObserverRegister:t.intersectionObserverRegister,intersectionObserverUnregister:t.intersectionObserverUnregister,updatePlaceholdersSize:t.updatePlaceholdersSize,updateShadowVisibility:t.updateShadowVisibility,contextEvent:t.contextEvent,canHorizontalScroll:t.canHorizontalScroll,setHorizontalScrollMode:this.setHorizontalScrollMode,horizontalScrollMode:this.horizontalScrollMode,getVerticalScrollPosition:t.getVerticalScrollPosition,getHorizontalScrollPosition:t.getHorizontalScrollPosition,scrollTo:t.scrollTo,getViewportRect:t.getViewportRect}}_setHorizontalScrollModeCallback(t){this._setHorizontalScrollModeFromOptions=t,this.setHorizontalScrollMode=t=>{this.horizontalScrollMode=t,this._setHorizontalScrollModeFromOptions(t)}}render(){return(0,i.jsx)(l.ListScrollContext.Provider,{value:this.state,children:(0,i.jsx)(this.props.content,{...this.props})})}}return e.default=s,e}(0,{}
8,t,e,M),ot=function(t,e,i,o,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class s extends o.Component{constructor(t){super(t),this.state={pagingVisible:t.pagingVisible,setPagingVisible:t=>{this.setState({pagingVisible:t})}}}componentDidUpdate(t){if(this.props.pagingVisible!==t.pagingVisible)this.state.setPagingVisible(this.props.pagingVisible)}render(){return(0,i.jsx)(l.ScrollContext.Provider,{value:this.state,children:o.cloneElement(this.props.children,{...this.props,children:this.props.children.props.children})})}}return e.default=s,e}(0,{},t,e,V),lt=ot,st=function(t,e,i,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class l extends i.Control{constructor(){super(...arguments),this._template=o,this._defaultActions=[{keyCode:32},{keyCode:33},{keyCode:34},{keyCode:35},{keyCode:36},{keyCode:38},{keyCode:40}]}_keyDown(t){const e=this._defaultActions.map((t=>t.keyCode));if(e.includes(t.nativeEvent.keyCode))t.preventDefault()}}return e.default=l,e}(0,{},r,Y),rt=st,nt=function(t,e,i,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class l extends i.Control{constructor(){super(...arguments),this._template=o,this._observerData={}}_beforeMount(t){this._observerData={instId:this.getInstanceId(),observerName:null==t?void 0:t.observerName,element:this._currentContainer,threshold:null==t?void 0:t.threshold,rootMargin:null==t?void 0:t.rootMargin,data:null==t?void 0:t.data,handler:this._observeHandler.bind(this)}}_beforeUpdate(t){if(this._options.data!==t.data)this._observerData.data=t.data}_registerObserver(){this._notify("intersectionObserverRegister",[this._observerData],{bubbling:!0})}_unregisterObserver(){this._notify("intersectionObserverUnregister",[this.getInstanceId(),this._options.observerName],{bubbling:!0})}_afterMount(){this._currentContainer=this._container.get?this._container.get(0):this._container,this._observerData.element=this._currentContainer,this._registerObserver()}_afterRender(t){super._afterRender(t);const e=this._container.get?this._container.get(0):this._container;if(e!==this._currentContainer)this._unregisterObserver(),this._currentContainer=e,this._registerObserver()}_observeHandler(t){this._notify("intersect",[t])}_beforeUnmount(){this._unregisterObserver()}}return e.default=l,e}(0,{},r,$),at=nt,ct=function(t,e,i,o,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class s extends i.Control{constructor(){super(...arguments),this._template=l}_afterMount(){this._observer=new o.EdgeIntersectionObserver(this,this._observeHandler.bind(this),this._children.topTrigger,this._children.bottomTrigger)}_observeHandler(t){this._notify(t)}_beforeUnmount(){this._observer.destroy(),this._observer=null}}return e.default=s,e}(0,{},r,p,Z,"undefined"==typeof css_Controls_scroll||css_Controls_scroll),ht=ct,dt=function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});return e.default=class{constructor(t,e){this._observers={},this._items={},this._handler=t,this._options=e||{threshold:[1],rootMargin:"0px 0px 0px 0px"}}register(t,e){if(e.observerName!==this._options.observerName)return;const i={...e,threshold:e.threshold||this._options.threshold,rootMargin:e.rootMargin||this._options.rootMargin};this._items[e.instId]=i,this._observe(t,i.element,i.threshold,i.rootMargin)}unregister(t,e){if(e!==this._options.observerName)return;const i=this._items[t];if(i)this._unobserve(i.element,i.threshold,i.rootMargin),delete this._items[t]}_observe(t,e,i,o){const l=this._getObserverKey(i,o);if(this._observers.hasOwnProperty(l))this._observers[l].observer.observe(e),this._observers[l].count++;else{const s=this._createObserver(t,i,o);s.observe(e),this._observers[l]={count:1,observer:s}}}_unobserve(t,e,i){const o=this._getObserverKey(e,i),l=this._observers[o];if(l.observer.unobserve(t),l.count--,!l.count)delete this._observers[o]}_getObserverKey(t,e){return`t${t.join("_")}_rm${e.replace(/ /g,"_")}`}_createObserver(t,e,i){return new IntersectionObserver(this._intersectionObserverHandler.bind(this),{root:t,threshold:e,rootMargin:i})}_intersectionObserverHandler(t){const e=[];let o;
8for(const l of t)if(o=Object.keys(this._items).find((t=>this._items[t].element===l.target)),o){const t=new i.default(l,this._items[o].data);e.push(t),this._items[o].handler(t)}if(e.length)this._handler(e)}destroy(){for(const t of Object.keys(this._observers))this._observers[t].observer.disconnect();this._observers=null}},e}(0,{},z),_t=function(t,e,i,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListCompatible=void 0;class l extends i.DestroyableMixin{constructor({notifyUtil:t}){super(),this._scrollMoveTimer={[o.SCROLL_DIRECTION.VERTICAL]:null,[o.SCROLL_DIRECTION.HORIZONTAL]:null},this._notifyUtil=t}generateCompatibleEvents(t,e,i){if(e.clientHeight!==i.clientHeight||e.scrollHeight!==i.scrollHeight||e.contentClientHeight!==i.contentClientHeight)this.sendByListScrollRegistrar(t,"scrollResize",{scrollHeight:e.scrollHeight,clientHeight:e.clientHeight});if(e.clientWidth!==i.clientWidth||e.scrollWidth!==i.scrollWidth)this.sendByListScrollRegistrar(t,"horizontalScrollResize",{scrollWidth:e.scrollWidth,clientWidth:e.clientWidth});if(e.clientHeight!==i.clientHeight)this.sendByListScrollRegistrar(t,"viewportResize",{scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,clientHeight:e.clientHeight,clientWidth:e.clientWidth,rect:e.viewPortRect});if(e.clientWidth!==i.clientWidth)this.sendByListScrollRegistrar(t,"horizontalViewportResize",{scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,clientWidth:e.clientWidth,clientHeight:e.clientHeight,rect:e.viewPortRect});if(e.scrollTop!==i.scrollTop)this.sendByListScrollRegistrar(t,"scrollMoveSync",{scrollTop:e.scrollTop,position:e.verticalPosition,clientHeight:e.clientHeight,scrollHeight:e.scrollHeight}),this._sendScrollMoveAsync(t,e,o.SCROLL_DIRECTION.VERTICAL);if(e.scrollLeft!==i.scrollLeft)this.sendByListScrollRegistrar(t,"horizontalScrollMoveSync",{scrollLeft:e.scrollLeft,position:e.horizontalPosition,clientWidth:e.clientWidth,scrollWidth:e.scrollWidth}),this._sendScrollMoveAsync(t,e,o.SCROLL_DIRECTION.HORIZONTAL);if(e.canVerticalScroll!==i.canVerticalScroll)this.sendByListScrollRegistrar(t,e.canVerticalScroll?"canScroll":"cantScroll",{clientHeight:e.clientHeight,scrollHeight:e.scrollHeight,viewPortRect:e.viewPortRect});if(e.canHorizontalScroll!==i.canHorizontalScroll)this.sendByListScrollRegistrar(t,e.canHorizontalScroll?"canHorizontalScroll":"cantHorizontalScroll",{clientWidth:e.clientWidth,scrollWidth:e.scrollWidth,viewPortRect:e.viewPortRect})}onRegisterNewListScrollComponent(t,e,i){if(this._sendByListScrollRegistrarToComponent(t,i,e.canVerticalScroll?"canScroll":"cantScroll",{clientHeight:e.clientHeight,scrollHeight:e.scrollHeight,viewPortRect:e.viewPortRect}),this._sendByListScrollRegistrarToComponent(t,i,e.canHorizontalScroll?"canHorizontalScroll":"cantHorizontalScroll",{clientWidth:e.clientWidth,scrollWidth:e.scrollWidth,viewPortRect:e.viewPortRect}),this._sendByListScrollRegistrarToComponent(t,i,"viewportResize",{scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,clientHeight:e.clientHeight,clientWidth:e.clientWidth,rect:e.viewPortRect}),e.scrollTop)this._sendByListScrollRegistrarToComponent(t,i,"scrollMoveSync",{scrollTop:e.scrollTop,position:e.verticalPosition,clientHeight:e.clientHeight,scrollHeight:e.scrollHeight});this._sendByListScrollRegistrarToComponent(t,i,"horizontalViewportResize",{scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,clientWidth:e.clientWidth,clientHeight:e.clientHeight,rect:e.viewPortRect})}sendByListScrollRegistrar(t,e,i){t.start(e,i),this._notifyUtil(e,[i])}_sendScrollMoveAsync(t,e,i){if(this._scrollMoveTimer[i])clearTimeout(this._scrollMoveTimer[i]);this._scrollMoveTimer[i]=setTimeout((()=>{if(!this.destroyed){if(i===o.SCROLL_DIRECTION.VERTICAL)this.sendByListScrollRegistrar(t,"scrollMove",{scrollTop:e.scrollTop,position:e.verticalPosition,clientHeight:e.clientHeight,scrollHeight:e.scrollHeight});else this.sendByListScrollRegistrar(t,"horizontalScrollMove",{scrollLeft:e.scrollLeft,position:e.horizontalPosition,clientWidth:e.clientWidth,scrollWidth:e.scrollWidth}
8);this._scrollMoveTimer[i]=null}}),0)}_sendByListScrollRegistrarToComponent(t,e,i,o){t.startOnceTarget(e,i,o)}destroy(...t){if(this._scrollMoveTimer.vertical)clearTimeout(this._scrollMoveTimer.vertical);if(this._scrollMoveTimer.horizontal)clearTimeout(this._scrollMoveTimer.horizontal);super.destroy(...t)}}return e.ListCompatible=l,e}(0,{},c,D),ut=function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class o{constructor(t,e,i){var o,l;if(this._content=t,this._scrollTop=e.scrollTop,this._scrollLeft=e.scrollLeft,this._clientHeight=e.clientHeight,this._scrollHeight=e.scrollHeight,this._clientWidth=e.clientWidth,this._scrollWidth=e.scrollWidth,this._contentClientHeight=e.contentClientHeight,this._hasUnrenderedContent={top:(null===(o=e.hasUnrenderedContent)||void 0===o?void 0:o.top)||!1,bottom:(null===(l=e.hasUnrenderedContent)||void 0===l?void 0:l.bottom)||!1},i)this._canVerticalScroll=i.canVerticalScroll,this._canHorizontalScroll=i.canHorizontalScroll,this._verticalPosition=i.verticalPosition,this._horizontalPosition=i.horizontalPosition;else this._updateCalculatedState()}_updateCalculatedState(){this._canVerticalScroll=(0,i.canScrollByState)(this,i.SCROLL_DIRECTION.VERTICAL),this._canHorizontalScroll=(0,i.canScrollByState)(this,i.SCROLL_DIRECTION.HORIZONTAL),this._verticalPosition=(0,i.getScrollPositionTypeByState)(this,i.SCROLL_DIRECTION.VERTICAL),this._horizontalPosition=(0,i.getScrollPositionTypeByState)(this,i.SCROLL_DIRECTION.HORIZONTAL)}_isUndefined(t){return void 0===t}get hasUnrenderedContent(){return this._hasUnrenderedContent}get scrollTop(){return this._scrollTop}get scrollLeft(){return this._scrollLeft}get clientHeight(){return this._clientHeight}get clientWidth(){return this._clientWidth}get scrollHeight(){return this._scrollHeight}get scrollWidth(){return this._scrollWidth}get contentClientHeight(){return this._contentClientHeight}get canVerticalScroll(){if(this._isUndefined(this._canVerticalScroll))this._canVerticalScroll=(0,i.canScrollByState)(this,i.SCROLL_DIRECTION.VERTICAL);return this._canVerticalScroll}get canHorizontalScroll(){if(this._isUndefined(this._canHorizontalScroll))this._canHorizontalScroll=(0,i.canScrollByState)(this,i.SCROLL_DIRECTION.HORIZONTAL);return this._canHorizontalScroll}get verticalPosition(){if(this._isUndefined(this._verticalPosition))this._verticalPosition=(0,i.getScrollPositionTypeByState)(this,i.SCROLL_DIRECTION.VERTICAL);return this._verticalPosition}get horizontalPosition(){if(this._isUndefined(this._horizontalPosition))this._verticalPosition=(0,i.getScrollPositionTypeByState)(this,i.SCROLL_DIRECTION.HORIZONTAL);return this._horizontalPosition}get viewPortRect(){return this._content.getBoundingClientRect()}get content(){return this._content}clone(){const t={scrollTop:this._scrollTop,scrollLeft:this._scrollLeft,clientHeight:this._clientHeight,scrollHeight:this._scrollHeight,clientWidth:this._clientWidth,scrollWidth:this._scrollWidth,hasUnrenderedContent:this._hasUnrenderedContent,contentClientHeight:this._contentClientHeight},e={canVerticalScroll:this._canVerticalScroll,canHorizontalScroll:this._canHorizontalScroll,verticalPosition:this._verticalPosition,horizontalPosition:this._horizontalPosition};return new o(this._content,t,e)}}return e.default=o,e}(0,{},D),St=function(t,e,i,o,l,s,r,n){"use strict";function a(t,e,i,o){const l=[];let s=t.parentElement;const n=i===r.SCROLL_DIRECTION.HORIZONTAL?"overflowX":"overflowY";for(;s;){const t=window.getComputedStyle(s);if(("auto"===t[n]||"scroll"===t[n]||s.className.indexOf("controls-Scroll__content_hidden")>=0)&&(a=s,(i===r.SCROLL_DIRECTION.VERTICAL?a.scrollHeight>a.clientHeight:a.scrollWidth>a.clientWidth)||e||o))if(l.push(s),o)return l;s=s.parentElement}var a;return l}function c(t){const e="controls-StickyBlock";let i;if(t.classList.contains(e))i=t;else{if("contents"===window.getComputedStyle(t).display&&t.children[0].classList.contains(e))i=t.children[0]}return i}function h(t){const e=t.style.top,i=t.style.left;t.style.position="relative",t.style.top="0px",t.style.left="0px";let{top:l,height:s,left:r,width:n}=(0,o.getDimensions)(t);l=Math.round(l),r=Math.round(r);const a=o.DimensionsMeasurer.getWindowDimensions(t);return t.style.position="sticky",t.style.top=e,t.style.left=i,{top:l+a.pageYOffset,bottom:l+s+a.pageYOffset,left:r+a.pageXOffset,right:r+n+a.pageXOffset}}function d(t){if(t===document.body||t===document.documentElement){const e=o.DimensionsMeasurer.getElementDimensions(t),i=o.DimensionsMeasurer.getElementDimensions(document.body);return{top:i.scrollTop,bottom:e.clientHeight,left:i.scrollLeft,right:e.clientWidth}}else{let{top:e,height:i,left:l,width:s}=(0,o.getDimensions)(t);e=Math.round(e),l=Math.round(l);const r=o.DimensionsMeasurer.getWindowDimensions(t);return{top:e+r.pageYOffset,bottom:e+i+r.pageYOffset,left:l+r.pageXOffset,right:l+s+r.pageXOffset}}}function _(t){return(0,s.goUpByControlTree)(t).find((t=>i.instanceOfModule(t,"Controls/scroll:_ContainerBase")))}function u(t,e,i,o){if(t.classList.contains("controls-StickyHeader__isolatedGroup"))return{top:0,bottom:0,topWithOffset:0,left:0,right:0,leftWithOffset:0};const s=e.closest(".controls-Scroll, .controls-Scroll-Container");if(s){const t=_(s);if(t){t.syncRegisterDelayedBlocks();const e=function(t,e){let i=0,o=0;for(const l of e)if(l.rect.left+l.rect.width>t.left)i+=l.rect.height+l.block.props.offsetTop,o+=l.rect.height;else break;return{top:i,topWithOffset:o}}(o,t.getHeadersRects(l.StickyPosition.Top,l.TypeFixedBlocks.Fixed));if(i===r.SCROLL_DIRECTION.VERTICAL)return{top:e.top,topWithOffset:e.topWithOffset,bottom:t.getHeadersHeight(l.StickyPosition.Bottom,l.TypeFixedBlocks.Fixed)};else{const e=t.getHeadersWidth(l.StickyPosition.Left,l.TypeFixedBlocks.Fixed);return{left:e,right:0,leftWithOffset:e}}}}return{top:0,bottom:0,topWithOffset:0,left:0,right:0,leftWithOffset:0}}function S(t,e,i,l){if(t===r.SCROLL_DIRECTION.VERTICAL)return((0,o.getDimensions)(e).height-(0,o.getDimensions)(i).height)/2;else return((0,o.getDimensions)(e).width-(0,o.getDimensions)(i).width-l)/2}function g(t,e,i,o,s=!1,v=0,f=!1,C=!1,b=!1){var O,m,I;
8if((0,l.isStickyHidden)(t))return;const y=function(t){const e=!!t.closest(".controls-StickyBlock");return!!t.closest(".headers-Layout")&&!!t.closest(".controls-MasterDetail_master")||e}(t),w=a(t,y,e,C),T=function(t){return t===r.SCROLL_DIRECTION.VERTICAL?{stickyElementSize:"offsetHeight",headerDimensions:["top","topWithOffset","bottom"],stickyElementOffsetToEndEdge:"topWithOffset",startPosition:"top",endPosition:"bottom",scroll:"scrollTop"}:{stickyElementSize:"offsetWidth",headerDimensions:["left","leftWithOffset","right"],stickyElementOffsetToEndEdge:"leftWithOffset",startPosition:"left",endPosition:"right",scroll:"scrollLeft"}}(e);if(s){const l=[];for(const r of w){const n=_(r);if(n)if(!0===n.containerLoaded){const t=n.initHeaderController();if(void 0!==t)l.push(t)}else return new Promise((()=>{n.containerLoaded.then((()=>{g(t,e,i,o,s,v,f,C)}))}))}if(l.length)return Promise.all(l).then((()=>{g(t,e,i,o,s,v,f,C)}))}for(const l of w){const s=l===document.documentElement?document.scrollingElement:l;let a=_(s);if(!a)if((null===(I=null===(m=null===(O=(0,n.getAdaptiveModeForLoaders)())||void 0===O?void 0:O.device)||void 0===m?void 0:m.isPhone)||void 0===I?void 0:I.call(m))&&(l===document.documentElement||l===document.body))a={scrollTo:(e,i)=>{const o=t.closest(".controls-Scroll-Container");if(o)e-=Math.abs(o.getBoundingClientRect().top);l.scrollTop=e,window.scrollTo({[i===r.SCROLL_DIRECTION.VERTICAL?"top":"left"]:e,behavior:f?"smooth":"auto"})},getBlocksHeightByScrollTop:t=>{const e=document.body.querySelector(".controls-Scroll-Container");if(e){const i=_(e);if(i)return i.getBlocksHeightByScrollTop(t,!0)}return 0}};else return;const g=d(l),C=c(t),w=C?h(C):d(t),L=u(t,l,e,w),H=C&&C[T.stickyElementSize];if(H){const t=T.headerDimensions;for(const e of t)if(L[e]-H>=0)L[e]-=H}let R;if(o||g[T.endPosition]<w[T.endPosition]){if(i===p.center){const i=L[T.stickyElementOffsetToEndEdge],o=S(e,l,t,i);R=s[T.scroll]+Math.floor(w[T.startPosition]-g[T.startPosition]-i-o+v),a.scrollTo(R,e,f)}else if(i===p.bottom||i===p.right)R=s[T.scroll]+Math.ceil(w[T.endPosition]-g[T.endPosition]+L[T.endPosition]+v),a.scrollTo(R,e,f);else if(!o||w[T.startPosition]<g[T.startPosition]+L[T.stickyElementOffsetToEndEdge]||w[T.startPosition]>g[T.startPosition]+L[T.startPosition]){const i=Math.floor(w[T.startPosition]-g[T.startPosition]-L[T.startPosition]+v);if(R=s[T.scroll]+i,!t.classList.contains("controls-StickyHeader__isolatedGroup")&&"top"===T.startPosition&&!H){const t=Math.round(a.getBlocksHeightByScrollTop(i>0?i:R))||0;R-=Math.abs(L[T.startPosition]-t)}a.scrollTo(R,e,f)}o=b}else if(g[T.startPosition]+L[T.startPosition]>w[T.startPosition]-v)if(i===p.center){const i=L[T.stickyElementOffsetToEndEdge],o=S(e,l,t,i);R=s[T.scroll]-Math.max(g[T.startPosition]-w[T.startPosition]+i+o+v,0),a.scrollTo(R,e,f)}else if(i===p.bottom||i===p.right)R=s[T.scroll]-Math.max(g[T.endPosition]-w[T.endPosition]+L[T.endPosition]+v,0),a.scrollTo(R,e,f);else R=s[T.scroll]-Math.max(g[T.startPosition]-w[T.startPosition]+L[T.stickyElementOffsetToEndEdge]+v,0),a.scrollTo(R,e,f);if(y)return}}Object.defineProperty(e,"__esModule",{value:!0}),e.getScrollPosition=e.horizontalScrollToElement=e.scrollToElement=e.getScrollContainerByElement=e.getScrollableParents=void 0;var p;return function(t){t.top="top",t.bottom="bottom",t.left="left",t.right="right",t.center="center"}(p||(p={})),e.getScrollableParents=a,e.getScrollContainerByElement=_,e.scrollToElement=function(t,e,i,o=!1,l=0,s=!1,n=!1,a=!1){return g(t,r.SCROLL_DIRECTION.VERTICAL,e,i,o,l,s,n,a)},e.horizontalScrollToElement=function(t,e,i,o=!1,l=0){return g(t,r.SCROLL_DIRECTION.HORIZONTAL,e,i,o,l)},e.getScrollPosition=function(t,e=r.SCROLL_DIRECTION.VERTICAL,i){const l=i?[i]:a(t,!1,e,!0),s=e===r.SCROLL_DIRECTION.VERTICAL?p.top:p.left;if(l.length){const i=(0,o.getDimensions)(t),n=(0,o.getDimensions)(l[0]),a=e===r.SCROLL_DIRECTION.VERTICAL?p.bottom:p.right;if(i[s]-n[s]<0)return s;else if(i[a]>n[a])return a;else{return n[e===r.SCROLL_DIRECTION.VERTICAL?"height":"width"]/2>=i[s]-n[s]?s:a}}return s},e}(0,{},u,g,S,l,D,n),gt=St,pt=function(t){"use strict";var e=["_registerUtil","_isContentVisible","react1189933746","_options","content","tw-hidden-important"];
8return t.g({v:1,m:"wml!Controls/_scroll/VirtualScrollContainer/VirtualScrollContainer",d:t.d(["Controls/_scroll/VirtualScrollContainerReact"],arguments,1),t:[t.r(((t,e)=>[t.m(e,0)?[t.C(e,"ws:Controls/_scroll/VirtualScrollContainerReact",{K:"0_0_",O:t.s(e,{register:t.m(e,2)},t.m(e,1)),m:"attribute",c:!0,i:0})]:[t.P(e,t.m(e,3),{K:"1_0_",A:{class:t.e(t.m(e,4))},m:"attribute",c:!0})]]))],p:e.slice(0,2),e:[(t,i)=>t.g(i,[e[3],e[2]]),(t,i)=>t.g(i,[e[3]]),(t,i)=>t.g(i,[e[0]]),(t,i)=>t.g(i,[e[3],e[4]]),(t,i)=>!t.g(i,[e[1]])?e[5]:""],i:[[[1]]]})}(C,F),vt=function(t,e,i,o,l,s,r,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class c extends((0,o.mixin)(l.VersionableMixin)){constructor(t){super(t),this._showScrollbarOnHover=!0,this._models={},this._canScroll=!1,this._options=t,this._forceScrollbarVisible=t.forceScrollbarVisible,this._overflowHidden=r.calcHeightFix(),this._useNativeScrollbar=i.detection.isMobileIOS||i.detection.isMobileAndroid,this.updateScrollbarsModels(t)}updateScrollbarsModels(t){const e=e=>{if(-1!==t.scrollOrientation.toLowerCase().indexOf(e)){if(!this._models[e])this._models[e]=new n.default(s.SCROLL_DIRECTION[e.toUpperCase()],{...t,scrollbarVisible:this._isVisibleByOptions(t,e)})}else delete this._models[e]};e("vertical"),e("horizontal")}updateOptions(t){this._options=t;for(const e of Object.keys(this._models)){const i=this._isVisibleByOptions(t,e),o=!1!==this._forceScrollbarVisible&&(i||!c.wheelEventHappened&&!this._useNativeScrollbar);if(this._models[e].updateOptions({...t,scrollbarVisible:o}),!i&&c.wheelEventHappened)this._models[e].setEnabled(!1)}}_isVisibleByOptions(t,e){if("object"==typeof t.scrollbarVisible)return"boolean"==typeof t.scrollbarVisible[e]?!!t.scrollbarVisible[e]:!0;else return!!t.scrollbarVisible}_updateContainerSizes(){let t=!1;if(this._newState)for(const e of Object.keys(this._models))if(this._models[e].enabled)t=this._models[e].updatePosition(this._newState)||t;if(this._updateScrollState(),this._updatePlaceholdersSize(),t)this._nextVersion()}updateScrollState(t,e){if(!1===this._forceScrollbarVisible)return;this._newState=t,this._container=e;let o=!1;const l=this._options.scrollOrientation!==a.SCROLL_MODE.NONE&&(t.canVerticalScroll||t.canHorizontalScroll);let s=!1;if(l!==this._canScroll)this._canScroll=l,o=!0,s=!0;const n=this._options.scrollOrientation===a.SCROLL_MODE.VERTICAL&&!i.detection.firefox,c=r.calcHeightFix({scrollHeight:t.scrollHeight,offsetHeight:n?t.clientHeight:this._container.offsetHeight});if(c!==this._overflowHidden)this._overflowHidden=c,o=!0;if(o)this._nextVersion();if(this._canScroll||s)this._updateContainerSizes()}_updateScrollState(){if(!this._newState)return;let t=!1;for(const e of Object.keys(this._models))t=this._models[e].updateContentSize(this._newState)||t;if(this._newState=null,t)this._nextVersion()}updatePlaceholdersSize(t){this._newPlaceholderSizes=t,this._updateContainerSizes()}_updatePlaceholdersSize(){if(!this._newPlaceholderSizes)return;let t=!1,e=this._models[s.SCROLL_DIRECTION.VERTICAL];if(e)t=e.updatePlaceholdersSize({start:this._newPlaceholderSizes.top,end:this._newPlaceholderSizes.bottom});if(e=this._models[s.SCROLL_DIRECTION.HORIZONTAL],e)t=e.updatePlaceholdersSize({start:this._newPlaceholderSizes.left,end:this._newPlaceholderSizes.right})||t;if(this._newPlaceholderSizes=null,t)this._nextVersion()}setOffsets(t,e=!0){let i=!1;for(const e of Object.keys(this._models))i=this._models[e].setOffsets(t)||i;if(i&&e)this._nextVersion()}getScrollContainerClasses(t){let e="";if(this._useNativeScrollbar){if(e+=this._getOverflowClass(t),!this._options.scrollbarVisible||!this._options.scrollbarVisible.vertical&&!this._options.scrollbarVisible.horizontal)e+=this._getHideNativeScrollbarCssClass()}else if(e+=this._getHideNativeScrollbarCssClass(),this._overflowHidden)e+=" controls-Scroll__content_hidden";else e+=this._getOverflowClass(t);return e}_getHideNativeScrollbarCssClass(){return" controls-Scroll__content_hideNativeScrollbar controls-Scroll__content_hideNativeScrollbar_ff-ie-edge"}_getOverflowClass(t){switch(t.scrollOrientation){case a.SCROLL_MODE.VERTICAL:return" controls-Scroll-ContainerBase__scroll_vertical";case a.SCROLL_MODE.HORIZONTAL:return" controls-Scroll-ContainerBase__scroll_horizontal";case a.SCROLL_MODE.NONE:return" controls-Scroll-ContainerBase__scroll_none";default:return" controls-Scroll-ContainerBase__scroll_verticalHorizontal"}}take(){if(this._showScrollbarOnHover&&this._canScroll&&!1!==this._forceScrollbarVisible)return!0}taken(){if(this._showScrollbarOnHover)this._showScrollbarOnHover=!1,this._nextVersion()}release(){if(this._showScrollbarOnHover)return!0}released(){if(!this._showScrollbarOnHover)return this._showScrollbarOnHover=!0,this._nextVersion(),!0;else return!1}get isVisible(){return!this._useNativeScrollbar&&this._showScrollbarOnHover}get horizontal(){return this._models.horizontal}get vertical(){return this._models.vertical}}return c.wheelEventHappened=!1,e.default=c,e}(0,{}
8,_,a,c,D,A,X,R),ft=function(t,e,i,o,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class r extends i.Control{constructor(){super(...arguments),this._template=l}_registerHandler(t,e){this._initObserver(),this._observer.register(this._container,e),t.stopImmediatePropagation()}_unregisterHandler(t,e,i){this._observer.unregister(e,i),t.stopImmediatePropagation()}_intersectHandler(t){this._notify("intersect",[t])}_beforeUnmount(){if(this._observer)this._observer.destroy(),this._observer=null}_initObserver(){if(!this._observer)this._observer=new o.default(this._intersectHandler.bind(this),this._options)}static getOptionTypes(){return{threshold:(0,s.descriptor)(Array),rootMargin:(0,s.descriptor)(String)}}static getDefaultOptions(){return{threshold:[1],rootMargin:"0px 0px 0px 0px"}}}return e.default=r,e}(0,{},r,dt,K,c),Ct=ft,bt=function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class o extends i.default{updateState(t){let e=!1;if(Object.keys(t).forEach((i=>{let o;if(-1===i.indexOf("_"))o="_"+i;const l="object"==typeof this[o],s="object"==typeof t[i];let r=t[i],n=this[o];if(l&&s)r=JSON.stringify(t[i]),n=JSON.stringify(this[o]);if(r!==n)this[o]=t[i],e=!0})),e)this._updateCalculatedState();return e}}return e.default=o,e}(0,{},ut),Ot=function(t,e,i,o,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class s extends i.Control{constructor(){super(...arguments),this._template=o,this._isContentVisible=!0,this._registerUtil=t=>((0,l.RegisterUtil)(this,"virtualNavigation",t),()=>{(0,l.UnregisterUtil)(this,"virtualNavigation")})}_afterMount(){if(!this._options.react1189933746)(0,l.RegisterUtil)(this,"virtualNavigation",this._onVirtualNavigationChanged.bind(this))}_onVirtualNavigationChanged(t,e){if(t===this._options.position)this._isContentVisible=!e}_beforeUnmount(){if(!this._options.react1189933746)(0,l.UnregisterUtil)(this,"virtualNavigation")}static getDefaultOptions(){return{position:"top"}}}return e.default=s,e}(0,{},r,pt,v),mt=Ot,It=function(t,e,i,o,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0});return e.default=class{constructor(t){this._requiredAutoScroll=!1,this._destroyed=!1,this._autoScroll=t}updateOptions(t){this._autoScroll.updateOptions(t),this._onMouseMove=this.onMouseMove.bind(this)}onDragStart(t){var e;const s=t.domEvent.target.closest(".controls-Scroll-Container");if(this._dragObject={...t,parentScrollContainerRect:s?s.getBoundingClientRect():null},this._requiredAutoScroll=!!(null===(e=t.entity)||void 0===e?void 0:e.allowAutoscroll),this._autoScroll._scrollContainerCoords=(0,i.getScrollContainerPageCoords)(this._autoScroll._scrollContainer),this._requiredAutoScroll&&l.detection.isMobileIOS)document.addEventListener("touchmove",this._onMouseMove);const r=(0,i.getScrollContainerPageCoords)(this._autoScroll._scrollContainer);this._skipVerticalAutoscroll=(0,i.isCursorAtScrollPoint)(r,t.domEvent,o.AUTOSCROLL_SIZE).near,this._skipHorizontalAutoscroll=(0,i.isCursorAtScrollPoint)(r,t.domEvent,o.AUTOSCROLL_SIZE,i.SCROLL_DIRECTION.HORIZONTAL).near}onDragEnd(){this._dragObject=null,document.removeEventListener("mousemove",this._onMouseMove),document.removeEventListener("touchmove",this._onMouseMove),this._requiredAutoScroll=!1,this._autoScroll.stopAutoScroll()}dndScrollHandler(){if(this._requiredAutoScroll);else this._autoScroll.stopAutoScroll()}onMouseMove(t,e,i){if(this._destroyed)return this.destroy();const o=this._autoScroll.getCursorPosition(t);if(this._requiredAutoScroll){if(this._dragObject.parentScrollContainerRect){const t=this._dragObject.domEvent.target.closest(".controls-Scroll-Container")===this._autoScroll._scrollContainer;if(this._dragObject.parentScrollContainerRect.left<o.pageX&&this._dragObject.parentScrollContainerRect.right>o.pageX&&this._dragObject.parentScrollContainerRect.top<o.pageY&&this._dragObject.parentScrollContainerRect.bottom>o.pageY&&!t)return}this._autoScroll.startAutoScroll(o,!0,!0,this.dndScrollHandler,this)}else this._autoScroll.onMouseMove(t,e,i)}onMouseLeave(){if(!this._destroyed){if(this._requiredAutoScroll)document.addEventListener("mousemove",this._onMouseMove),document.addEventListener("touchmove",this._onMouseMove);else this._autoScroll.onMouseLeave();this._autoScroll._skipVerticalAutoscroll=!1,this._autoScroll._skipHorizontalAutoscroll=!1}}destroy(){this._destroyed=!0,this._autoScroll.stopAutoScroll(),this._autoScroll.destroy(),document.removeEventListener("mousemove",this._onMouseMove),document.removeEventListener("touchmove",this._onMouseMove)}},e}(0,{},D,J,_),yt=function(t){"use strict";function e(){return this}var i="undefined"==typeof window,o=["_setHorizontalScrollMode","_horizontalScrollMode","_setArrowButtonClickCallback","_intersectionObserverRegisterHandler","_intersectionObserverUnregisterHandler","_updatePlaceholdersSize","_updateShadowVisibility","_removeArrowButtonClickCallback","_getVerticalScrollPosition","_getHorizontalScrollPosition","registerEvent","_getViewportRect","_contextEvent","scrollTo","_canHorizontalScroll","_stickyModelsContext","_stickyGroupModelsContext","_setStickyContextUpdaterCallback","_setPagingVisibleCallback","_shadows","_getShadowClassesCallback","_isOptimizeShadowEnabled","_arrowButtons","_arrowButtonHandlerCallback","_scrollbars","_dragging","_offsetTop","_scrollbarOffsetTop","_verticalScrollbarPadding","_horizontalScrollbarPadding","_positionChangedH
8andlerCallback","_draggingChangedHandlerCallback","_getBlurClasses","_optimizeShadowClass","_initialScrollPositionStyle","_getStyleForCorrectWorkBlur","_keydownHandler","_scrollCssClass","_contentWrapperCssClass","_initialScrollPositionCssClass","_overscrollBehavior","_getContentDirectionClass","_baseTemplate","_paging","_isScrollOnBody","_arrowClickHandler","_isClipScrollContainer","_scrollPosition","_fixIOSShadow","_onWheelHandler","_mouseenterHandler","_mouseoverHandler","_mouseleaveHandler","_scrollbarTakenHandler","_scrollbarReleasedHandler"," controls-Scroll-ClipContainer","theme","_options"," controls-Scroll-Container_fixShadow","wheel","mouseenter","mouseover","mouseleave","scrollbarTaken","scrollbarReleased","shadowMode","buttonsMode","buttonsViewMode","buttonsSize","intersectionObserverRegister","intersectionObserverUnregister","keydown","updateShadowMode","isVisible","resolvedTemplate","content","controls-Scroll__paging-adaptive","","pagingPosition","left","right","onArrowClick","pagingMode","pagingContentTemplate","arrowState"];return t.g({v:1,m:"wml!Controls/_scroll/Container/Container",d:t.d(["Controls/_scroll/Contexts/ListScrollContextProvider","Controls/_scroll/ContainerReact/ContainerReact","Controls/Container/Async"],arguments,1),t:[t.c(((t,i)=>[t.P(i,t.m(i,41),{K:"0_0_0_0_0_0_",A:{class:"controls-Scroll-Container__base controls-BlockLayout__blockGroup "+t.e(t.m(i,42))+" "+t.e(t.m(i,43)),style:t.e(t.m(i,44))+" "+t.e(t.m(i,45))},E:{"on:intersectionobserverregister":[{value:o[3],originalName:o[69],viewController:i.v}],"on:intersectionobserverunregister":[{value:o[4],originalName:o[70],viewController:i.v}],"on:keydown":[{value:o[36],originalName:o[71],viewController:i.v}],"on:updateshadowmode":[{value:o[6],originalName:o[72],viewController:i.v}],meta:{isControl:!1,context:e,handler:t.M(i,4)}},O:t.s(i,{"data-qa":void 0,topShadowVisibility:void 0,bottomShadowVisibility:void 0,_scrollCssClass:t.m(i,47),_contentWrapperCssClass:t.m(i,48),_initialScrollPositionCssClass:t.m(i,49),_horizontalScrollMode:t.m(i,6),_overscrollBehavior:t.m(i,50),_getContentDirectionClass:t.m(i,51)},t.m(i,46)),g:!0,m:"attribute",i:0})])),t.c(((t,i)=>[t.P(i,t.m(i,53),{K:"0_0_0_1_0_0_0_",A:{class:"controls-Scroll__paging "+t.e(t.m(i,54))+" controls-Scroll__paging_position-"+t.e(t.m(i,55))},E:{"on:onarrowclick":[{value:o[45],originalName:o[81],viewController:i.v}],meta:{isControl:!1,context:e,handler:t.M(i,4)}},O:{pagingMode:t.m(i,56),contentTemplate:t.m(i,57),contrastBackgroun
8d:!0,arrowState:t.m(i,58)},g:!0,m:"attribute"})])),t.c(((t,e)=>[t.C(e,"ws:Controls/_scroll/ContainerReact/ContainerReact",{K:"0_0_0_0_",O:{esc:!1,stickyModels:t.m(e,20),stickyGroupModels:t.m(e,21),setStickyContextUpdater:t.m(e,22),horizontalScrollMode:t.m(e,6),getContextValue:t.m(e,23),shadows:t.m(e,24),shadowMode:t.m(e,25),buttonsMode:t.m(e,26),buttonsViewMode:t.m(e,27),buttonsSize:t.m(e,28),getShadowClasses:t.m(e,29),isOptimizeShadowEnabled:t.m(e,30),arrowButtons:t.m(e,31),handleArrowButton:t.m(e,32),scrollbars:t.m(e,33),dragging:t.m(e,34),offsetTop:t.m(e,35),scrollbarOffsetTop:t.m(e,36),verticalScrollbarPaddings:t.m(e,37),horizontalScrollbarPaddings:t.m(e,38),scrollbarPositionChangedHandler:t.m(e,39),scrollbarDraggingChangedHandler:t.m(e,40),content:t.o(e,0,1)},g:!0,m:"attribute"}),t.m(e,52)?[t.C(e,"ws:Controls/Container/Async",{K:"0_0_0_1_0_",O:{esc:!1,templateName:"Controls/paging:Paging",content:t.o(e,1,2)},g:!0,m:"attribute"})]:t.t()])),t.r(((t,l)=>[t.g(l,"div",{K:"0_",A:{class:"controls-Scroll-Container"+t.e(t.x(l,0))+" controls-Scroll controls_scroll_theme-"+t.e(t.x(l,1))+" controls-Scroll-Container_"+t.e(t.x(l,2))+"-position"+t.e(t.x(l,3))},E:i?{}:{"on:wheel":[{value:o[49],originalName:o[59],viewController:l.v}],"on:mouseenter":[{value:o[50],originalName:o[60],viewController:l.v}],"on:mouseover":[{value:o[51],originalName:o[61],viewController:l.v}],"on:mouseleave":[{value:o[52],originalName:o[62],viewController:l.v}],"on:scrollbartaken":[{value:o[53],originalName:o[63],viewController:l.v}],"on:scrollbarreleased":[{value:o[54],originalName:o[64],viewController:l.v}],meta:{isControl:!1,context:e,handler:t.M(l,4)}},r:!0,c:!0},[t.C(l,"ws:Controls/_scroll/Contexts/ListScrollContextProvider",{K:"0_0_",O:{esc:!1,setHorizontalScrollMode:t.m(l,5),horizontalScrollMode:t.m(l,6),setArrowButtonClickCallback:t.m(l,7),intersectionObserverRegister:t.m(l,8),intersectionObserverUnregister:t.m(l,9),updatePlaceholdersSize:t.m(l,10),updateShadowVisibility:t.m(l,11),removeArrowButtonClickCallback:t.m(l,12),getVerticalScrollPosition:t.m(l,13),getHorizontalScrollPosition:t.m(l,14),registerEvent:t.m(l,15),getViewportRect:t.m(l,16),contextEvent:t.m(l,17),scrollTo:t.m(l,18),canHorizontalScroll:t.m(l,19),content:t.o(l,2,3)}})])]))],p:o.slice(0,55),e:[(t,e)=>t.g(e,[o[46]])?o[55]:"",(t,e)=>t.g(e,[o[57],o[56]]),(t,e)=>t.g(e,[o[47]]),(t,e)=>t.g(e,[o[48]])?o[58]:"",function(t,e,i,o,l,s){return t.g(this,[s])},(t,e)=>t.g(e,[o[0]]),(t,e)=>t.g(e,[o[1]]),(t,e)=>t.g(e,[o[2]]),(t,e)=>t.g(e,[o[3]]),(t,e)=>t.g(e,[o[4]]),(t,e)=>t.g(e,[o[5]]),(t,e)=>t.g(e,[o[6]]),(t,e)=>t.g(e,[o[7]]),(t,e)=>t.g(e,[o[8]]),(t,e)=>t.g(e,[o[9]]),(t,e)=>t.g(e,[o[10]]),(t,e)=>t.g(e,[o[11]]),(t,e)=>t.g(e,[o[12]]),(t,e)=>t.g(e,[o[13]]),(t,e,i)=>t.c(i,e,[o[14]]),(t,e)=>t.g(e,[o[15]]),(t,e)=>t.g(e,[o[16]]),(t,e)=>t.g(e,[o[17]]),(t,e)=>t.g(e,[o[18]]),(t,e)=>t.g(e,[o[19]]),(t,e)=>t.g(e,[o[57],o[65]]),(t,e)=>t.g(e,[o[57],o[66]]),(t,e)=>t.g(e,[o[57],o[67]]),(t,e)=>t.g(e,[o[57],o[68]]),(t,e)=>t.g(e,[o[20]]),(t,e)=>t.g(e,[o[21]]),(t,e)=>t.g(e,[o[22]]),(t,e)=>t.g(e,[o[23]]),(t,e)=>t.g(e,[o[24]]),(t,e)=>t.g(e,[o[25]]),(t,e)=>t.g(e,[o[26]]),(t,e)=>t.g(e,[o[27]]),(t,e)=>t.g(e,[o[28]]),(t,e)=>t.g(e,[o[29]]),(t,e)=>t.g(e,[o[30]]),(t,e)=>t.g(e,[o[31]]),(t,e)=>t.g(e,[o[42]]),(t,e,i)=>t.c(i,e,[o[32]]),(t,e)=>t.g(e,[o[33]]),(t,e)=>t.g(e,[o[34]]),(t,e,i)=>t.c(i,e,[o[35]]),(t,e)=>t.g(e,[o[57]]),(t,e)=>t.g(e,[o[37]]),(t,e)=>t.g(e,[o[38]]),(t,e)=>t.g(e,[o[39]]),(t,e)=>t.g(e,[o[40]]),(t,e)=>t.g(e,[o[41]]),(t,e)=>t.g(e,[o[43],o[73]]),(t,e)=>t.g(e,[o[75],o[74]]),(t,e)=>t.g(e,[o[44]])?o[76]:o[77],(t,e)=>t.g(e,[o[57],o[78]])===o[79]?o[79]:o[80],(t,e)=>t.g(e,[o[43],o[82]]),(t,e)=>t.g(e,[o[57],o[83]]),(t,e)=>t.g(e,[o[43],o[84]])],i:[[[46]],[[6],[41,51]],[[53,58]],[[6],[20,52],[54,58]]]})}(C,it,Q,f),wt=function(t,e,i,o,l,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class n extends((0,i.mixin)(o.VersionableMixin)){constructor(t){super(t),this._models={};const e=t.scrollOrientation.toLowerCase();if(-1!==e.indexOf("vertical"))this._models.top=new s.default(l.POSITION.TOP,t),this._models.bottom=new s.default(l.POSITION.BOTTOM,t);if(-1!==e.indexOf("horizontal"))this._models.left=new s.default(l.POSITION.LEFT,t),this._models.right=new s.default(l.POSITION.RIGHT,t)}updateOptions(t){for(const e of Object.keys(this._models))this._models[e].updateOptions(t)}updateScrollState(t,e=!0){let i=!1;for(const o of Object.keys(this._models)){const l=this._models[o].isVisible;if(this._models[o].updateScrollState(t)&&e||l!==this._models[o].isVisible)i=!0}if(i)this._nextVersion()}updateVisibilityByInnerComponents(t,e=!0){let i=!1;for(const e of Object.keys(this._models)){const o=t[e];if(o)i=this._models[e].updateVisibilityByInnerComponents(o)||i}if(i&&e)this._nextVersion()}setStickyFixed(t,e,i,o,l=!0){var s,n,a,c;let h=!1,d=!1,_=!1,u=!1;if(this._models.top)h=this._models.top.setStickyFixed(t);if(this._models.bottom)d=this._models.bottom.setStickyFixed(e);if(this._models.left)_=this._models.left.setStickyFixed(i);if(this._models.right)u=this._models.right.setStickyFixed(o);if((h||d||_||u)&&(l||(null===(s=this._models.top)||void 0===s?void 0:s.getVisibilityByInnerComponents())===r.SHADOW_VISIBILITY.V
8ISIBLE&&h||(null===(n=this._models.bottom)||void 0===n?void 0:n.getVisibilityByInnerComponents())===r.SHADOW_VISIBILITY.VISIBLE&&d||(null===(a=this._models.left)||void 0===a?void 0:a.getVisibilityByInnerComponents())===r.SHADOW_VISIBILITY.VISIBLE&&_||(null===(c=this._models.right)||void 0===c?void 0:c.getVisibilityByInnerComponents())===r.SHADOW_VISIBILITY.VISIBLE&&u))this._nextVersion()}hasVisibleShadow(){let t=!1;for(const e in this._models)if(this._models[e].isVisible){t=!0;break}return t}get top(){return this._models.top}get bottom(){return this._models.bottom}get left(){return this._models.left}get right(){return this._models.right}}return e.default=n,e}(0,{},a,c,R,q,T),Tt=function(t,e,i,o,l,s,r,n,a,c,h,d,_,u,S,g,p,v,f,C,b,O){"use strict";var m,I;Object.defineProperty(e,"__esModule",{value:!0});!function(t){t.regular="regular",t.notScrollable="notScrollable",t.restricted="restricted"}(m||(m={})),function(t){t.verticalEnd="controls-Scroll-ContainerBase__scrollPosition-vertical-end",t.horizontalEnd="controls-Scroll-ContainerBase__scrollPosition-horizontal-end",t.regular="
8controls-Scroll-ContainerBase__scrollPosition-regular"}(I||(I={}));class y extends n.Control{constructor(...t){super(...t),this._template=O,this._container=null,this._registrars={},this._observedElements=[],this._scrollLockedPosition=null,this._contentWrapperCssClass="",this._overscrollBehavior=u.OverscrollBehavior.Auto,this._isCustomScroll=!1,this._isClipScrollContainer=!1,this._tmplNotify=S.EventUtils.tmplNotify,this._topPlaceholderSize=0,this._bottomPlaceholderSize=0,this._leftPlaceholderSize=0,this._rightPlaceholderSize=0,this._virtualNavigationState={top:!1,bottom:!1},this._contextEvent=null,this._contentType=m.regular,this._isFirstUpdateState=!0,this._scrollToElementCalled=!1,this._lastLogState={top:0,left:0},this._listCompatible=new d.ListCompatible({notifyUtil:(...t)=>{this._notify(...t)}}),this.scrollTo=this.scrollTo.bind(this)}_beforeMount(t){var e;if(this._virtualNavigationRegistrar=new r.RegisterClass({register:"virtualNavigation"}),!this._isHorizontalScroll(t.scrollOrientation)||t.forceInitResizeObserver)this._resizeObserver=new a.ResizeObserverUtil(this,this._resizeObserverCallback,this._resizeHandler);if(this._resizeObserverSupported=null===(e=this._resizeObserver)||void 0===e?void 0:e.isResizeObserverSupported(),this._registrars.scrollStateChanged=new r.RegisterClass({register:"scrollStateChanged"}),this._registrars.viewportResize=new r.RegisterClass({register:"viewportResize"}),this._registrars.scrollResize=new r.RegisterClass({register:"scrollResize"}),this._registrars.scrollMove=new r.RegisterClass({register:"scrollMove"}),this._registrars.virtualScrollMove=new r.RegisterClass({register:"virtualScrollMove"}),this._scrollCssClass=this._getScrollContainerCssClass(t),this._updateContentWrapperCssClass(),this._registrars.listScroll=new r.RegisterClass({register:"listScroll"}),this._registrars.customscroll=new r.RegisterClass({register:"customscroll"}),window&&window.history&&"scrollRestoration"in window.history)window.history.scrollRestoration="manual";if(t._notScrollableContent)this._updateContentType(m.restricted);this._initialScrollPositionInit(t)}_componentDidMount(){var t,e,i;if((!this._options.initialScrollPosition||!(null===(t=this._options.initialScrollPosition)||void 0===t?void 0:t.vertical)||(null===(e=this._options.initialScrollPosition)||void 0===e?void 0:e.vertical)===c.SCROLL_POSITION.START)&&!p.location.hash&&(null===(i=this._container.dataset)||void 0===i?void 0:i.scrollContainerNode)&&!this._scrollToElementCalled)this._children.content.scrollTop=0;this._initialScrollPositionResetAfterInitialization()}_$react_componentDidMount(){setTimeout((()=>{this._notify("createChildrenScroll",[{"on:scroll":this._scrollHandler,"on:customscroll":this._scrollHandler,"on:wheel":this._wheelHandler,"on:doScroll":this._doScrollHandler,"on:doHorizontalScroll":this._doHorizontalScrollHandler,"on:registerScroll":this._registerIt,"on:unregisterScroll":this._unRegisterIt,"on:scrollToElement":this._scrollToElement,"on:horizontalScrollToElement":this._horizontalScrollToElement,"on:updatePlaceholdersSize":this._updatePlaceholdersSize,"on:controlResize":this._controlResizeHandler,"on:enableVirtualNavigation":this._enableVirtualNavigationHandler,"on:disableVirtualNavigation":this._disableVirtualNavigationHandler}],{bubbling:!0})}),0)}_setIsClipScrollContainer(){if(this._container&&!this._destroyed)this._isClipScrollContainer=i.detection.isPhone&&this.context.isScrollOnBody&&!this._container.closest(".controls-Popup")&&this._container.offsetHeight>window.innerHeight}_afterMount(){var t;const e=this._options.scrollOrientation;if(!this._scrollModel)this._createScrollModel();if(!(null===(t=this._resizeObserver)||void 0===t?void 0:t.isResizeObserverSupported())||this._isHorizontalScroll(e))(0,r.RegisterUtil)(this,"controlResize",this._controlResizeHandler,{listenAll:!0});else if(e===u.SCROLL_MODE.VERTICAL_HORIZONTAL)this._observeElementSize(this._children.userContent.children[0]);if(this._controlResizeHandler(),this._observeElementSize(this._children.content),this._updateContentType(),this._contentType===m.regular)this._observeElementSize(this._children.userContent);else this._observeContentSize();if(i.detection.isMobileIOS)this._lockScrollPositionUntilKeyboardShown=this._lockScrollPositionUntilKeyboardShown.bind(this),o.Bus.globalChannel().subscribe("MobileInputFocus",this._lockScrollPositionUntilKeyboardShown);
8this._autoScroll=new C.default(this._container,this._setScrollTop.bind(this),this.horizontalScrollTo.bind(this)),this._dnDAutoScroll=new f.default(this._autoScroll),this._notify("register",["documentDragStart",this,this._onDragStart],{bubbling:!0}),this._notify("register",["documentDragEnd",this,this._onDragEnd],{bubbling:!0}),this._hasOuterContainer=!!this._container.closest(".controls-Scroll-Container"),this._setIsClipScrollContainer()}_beforeUpdate(t){if(t.scrollOrientation!==this._options.scrollOrientation)this._scrollCssClass=this._getScrollContainerCssClass(t);this._dnDAutoScroll.updateOptions({scrollOrientation:t.scrollOrientation,topPlaceholderSize:this._topPlaceholderSize,scrollTop:this._scrollModel.scrollTop,scrollLeft:this._scrollModel.scrollLeft})}_afterUpdate(t){if(this._updateContentType(),this._contentType!==m.regular)this._observeContentSize(),this._unobserveDeleted();if(!this._resizeObserverSupported)this._updateStateAndGenerateEvents(this._getFullStateFromDOM())}_beforeUnmount(){var t,e;if(this._listCompatible.destroy(),this._container.dataset.scrollContainerNode="true",!(null===(t=this._resizeObserver)||void 0===t?void 0:t.isResizeObserverSupported()))(0,r.UnregisterUtil)(this,"controlResize",{listenAll:!0});null===(e=this._resizeObserver)||void 0===e||e.terminate();for(const t in this._registrars)if(this._registrars.hasOwnProperty(t))this._registrars[t].destroy();if(i.detection.isMobileIOS)o.Bus.globalChannel().unsubscribe("MobileInputFocus",this._lockScrollPositionUntilKeyboardShown);this._scrollModel=null,this._oldScrollState=null,this._notify("unregister",["documentDragStart",this],{bubbling:!0}),this._notify("unregister",["documentDragEnd",this],{bubbling:!0}),this._dnDAutoScroll.destroy(),this._notify("destroyChildrenScroll",[],{bubbling:!0})}_isHorizontalScroll(t){return-1!==t.toLowerCase().indexOf("horizontal")}_initialScrollPositionInit(t){var e,i;if((null===(e=t.initialScrollPosition)||void 0===e?void 0:e.vertical)===c.SCROLL_POSITION.END)this._initialScrollPositionCssClass=I.verticalEnd;else if((null===(i=t.initialScrollPosition)||void 0===i?void 0:i.horizontal)===c.SCROLL_POSITION.END)this._initialScrollPositionCssClass=I.horizontalEnd;else this._initialScrollPositionCssClass=I.regular}_initialScrollPositionResetAfterInitialization(){var t,e,i,o;if((null===(t=this._options.initialScrollPosition)||void 0===t?void 0:t.vertical)===c.SCROLL_POSITION.END||(null===(e=this._options.initialScrollPosition)||void 0===e?void 0:e.horizontal)===c.SCROLL_POSITION.END){const t=this._children.content;if(this._initialScrollPositionCssClass=I.regular,t.classList.add(I.regular),(null===(i=this._options.initialScrollPosition)||void 0===i?void 0:i.vertical)===c.SCROLL_POSITION.END)t.classList.remove(I.verticalEnd),t.scrollTop=t.scrollHeight;else if((null===(o=this._options.initialScrollPosition)||void 0===o?void 0:o.horizontal)===c.SCROLL_POSITION.END)t.classList.remove(I.horizontalEnd),t.scrollLeft=t.scrollWidth}}_controlResizeHandler(){if(!this._destroyed){if(this._isCustomScroll=!0,this._resizeObserver)this._resizeObserver.controlResizeHandler();else this._resizeHandler();this._setIsClipScrollContainer()}}_observeContentSize(){for(const t of this._getElementsForHeightCalculation())if(!this._observedElements.includes(t))this._observeElementSize(t),this._observedElements.push(t)}_unobserveDeleted(){const t=this._getElementsForHeightCalculation();this._observedElements=this._observedElements.filter((e=>{var i;if(!t.includes(e))return null===(i=this._resizeObserver)||void 0===i||i.unobserve(e),!1;else return!0}))}_observeElementSize(t){var e;null===(e=this._resizeObserver)||void 0===e||e.observe(t,{box:a.RESIZE_OBSERVER_BOX.borderBox})}_isObserved(t){return this._observedElements.includes(t)}_getScrollNotifyConfig(){return[this._scrollModel.scrollTop,this._scrollModel.scrollLeft]}_resizeHandler(){this._onResizeContainer(this._getFullStateFromDOM())}_canScrollByWheel(t,e=this._options){switch(typeof e.canScrollByWheel){case"boolean":return e.canScrollByWheel;case"object":return"boolean"==typeof e.canScrollByWheel[t]?e.canScrollByWheel[t]:!0;default:return!0}}_wheelHandler(t){var e;const i=t.shiftKey||(null===(e=t.nativeEvent)||void 0===e?void 0:e.shiftKey)?c.SCROLL_DIRECTION.HORIZONTAL:c.SCROLL_DIRECTION.VERTICAL;if(!this._canScrollByWheel(i))t.preventDefault(),t.stopPropagation()}_scrollHandler(t,e){var i,o,l;if(!this._destroyed)if(this._dnDAutoScroll){if(this._options.disableScrollReaction)return;let e=t.currentTarget.scrollTop,s=t.currentTarget.scrollLeft;if((0,p.getStore)("AdaptiveInitializer").get("isScrollOnBody")){const i=t.currentTarget===document;e=i?document.scrollingElement.scrollTop:e,s=i?document.scrollingElement.scrollLeft:s}if(this._logScrollPosition(e,s),null!==this._scrollLockedPosition)return void(this._children.content.scrollTop=this._scrollLockedPosition);const r={scrollTop:e,scrollLeft:s};if((null===(i=this._children)||void 0===i?void 0:i.userContent)&&this._scrollModel.scrollHeight!==(null===(l=null===(o=this._children)||void 0===o?void 0:o.userContent)||void 0===l?void 0:l.scrollHeight))r.scrollHeight=this._children.userContent.scrollHeight;this.onScrollContainer(r),this._dnDAutoScroll.updateOptions({scrollOrientation:this._options.scrollOrientation,topPlaceholderSize:this._topPlaceholderSize,scrollTop:this._scrollModel.scrollTop,scrollLeft:this._scrollModel.scrollLeft}),this._isCustomScroll=!1}}_registerIt(t,e,i,o,l){if(!this._destroyed)switch(e){case"scrollStateChanged":this._registrars.scrollStateChanged.register(t,e,i,o),this._onRegisterNewComponent(i);break;case"listScroll":if(this._registrars.listScroll.register(t,e,i,o,l),!this._scrollModel)this._createScrollModel();this._listCompatible.onRegisterNewListScrollComponent(this._registrars.listScroll,this._scrollModel,i);break;case"virtualScrollMove":this._registrars.virtualScrollMove.register(t,e,i,o);break;case"customscroll":this._registrars.customscroll.register(t,e,i,o,{listenAll:!0,id:null==l?void 0:l.id});break;case"virtualNavigation":this._virtualNavigationRegistrar.register(t,e,i,o),o("bottom",this._virtualNavigationState.bottom);break;case"viewportResize":this._registrars.viewportResize.register(t,e,i,o)}}_unRegisterIt(t,e,i,o){if(!this._destroyed)switch(e){case"scrollStateChanged":this._registrars.scrollStateChanged.unregister(t,e,i);break;case"listScroll":this._registrars.listScroll.unregister(t,e,i,o);break;case"virtualScrollMove":this._registrars.virtualScrollMove.unregister(t,e,i);break;case"customscroll":this._registrars.customscroll.unregister(t,e,i,{listenAll:!0,id:null==o?void 0:o.id});break;case"virtualNavigation":this._virtualNavigationRegistrar.unregister(t,e,i);break;case"viewportResize":this._registrars.viewportResize.unregister(t,e,i)}}registerEvent(...t){this._registerIt(...t)}unregisterEvent(...t){this._unRegisterIt(...t)}_enableVirtualNavigationHandler(t,e){if(!this._destroyed)t.stopImmediatePropagation(),this._virtualNavigationState[e]=!0,this._virtualNavigationRegistrar.start(e,!0),this._updateOverscrollBehavior()}_disableVirtualNavigationHandler(t,e){if(!this._destroyed)t.stopImmediatePropagation(),this._virtualNavigationState[e]=!1,this._virtualNavigationRegistrar.start(e,!1),this._updateOverscrollBehavior()}_fixInertialScroll(){if(i.detection.isMobileIOS)this._setOverflowScrolling("hidden"),this._container.getBoundingClientRect(),this._children.content.scrollTop=Math.max(0,this._children.content.scrollTop),this._setOverflowScrolling("")}scrollTo(t,e=c.SCROLL_DIRECTION.VERTICAL,i=!1){this._fixInertialScroll(),this._scrollTo(t,e,i)}canScrollTo(t){return t<=this._scrollModel.scrollHeight-this._scrollModel.clientHeight}horizontalScrollTo(t){this.scrollTo(t,c.SCROLL_DIRECTION.HORIZONTAL)}scrollToTop(t=!1){if(i.detection.isMobileIOS)this._setOverflowScrolling("hidden"),this._children.content.scrollTop=Math.max(0,this._children.content.scrollTop);if(this._setScrollTop(0,t),i.detection.isMobileIOS)this._setOverflowScrolling("")}scrollToLeft(t=!1){this.scrollTo(0,c.SCROLL_DIRECTION.HORIZONTAL,t)}scrollToBottom(t=!1){if(this._options.scrollOrientation!==u.SCROLL_MODE.HORIZONTAL)this._setScrollTop(this._children.content.scrollHeight-this._children.content.clientHeight+this._topPlaceholderSize,t)}scrollToRight(t=!1){if(this._options.scrollOrientation!==u.SCROLL_MODE.VERTICAL)this.scrollTo(this._scrollModel.scrollWidth-this._scrollModel.clientWidth,c.SCROLL_DIRECTION.HORIZONTAL,t)}onScrollContainer(t){this._updateStateAndGenerateEvents(t)}
8_onRegisterNewComponent(t){if(!this._scrollModel)this._createScrollModel();const e=this._scrollModel.clone(),i=this._oldScrollState.clone();this._registrars.scrollStateChanged.startOnceTarget(t,e,i)}_onResizeContainer(t){if(this._resizeObserverSupported)this._updateStateAndGenerateEvents(t);else if(t.clientHeight||t.clientWidth)this._updateStateAndGenerateEvents(this._getFullStateFromDOM())}_updateStateAndGenerateEvents(t){const e=this._updateState(t),i=this._scrollModel.clone(),o=this._oldScrollState.clone();if(e){if(this._logSizes(i,o),i.isCustomScroll=this._isCustomScroll,this._generateEvent("scrollStateChanged",[i,o]),i.scrollHeight!==o.scrollHeight)this._generateEvent("scrollResize",[{scrollHeight:i.scrollHeight,clientHeight:i.clientHeight}]);if(o.clientHeight!==i.clientHeight||o.clientWidth!==i.clientWidth)this._generateEvent("viewportResize",[{scrollHeight:i.scrollHeight,scrollWidth:i.scrollWidth,scrollTop:i.scrollTop,scrollLeft:i.scrollLeft,clientHeight:i.clientHeight,clientWidth:i.clientWidth,rect:i.viewPortRect}]);if(o.scrollTop!==i.scrollTop)this._generateEvent("scrollMove",[{scrollTop:i.scrollTop,position:i.verticalPosition,clientHeight:i.clientHeight,scrollHeight:i.scrollHeight}]);if(o.scrollTop!==i.scrollTop||o.scrollLeft!==i.scrollLeft)this._generateEvent("customscroll",[new s.SyntheticEvent(null,{type:"customscroll",target:this._children.content,currentTarget:this._children.content,_bubbling:!1}),i.scrollTop,i.scrollLeft],this._getScrollNotifyConfig());this._listCompatible.generateCompatibleEvents(this._registrars.listScroll,this._scrollModel,this._oldScrollState),this._updateOverscrollBehavior()}else if(this._isFirstUpdateState)this._generateEvent("scrollStateChanged",[i,o]),this._isFirstUpdateState=!1}_sendViaContext(t){this._contextEvent=t}_generateEvent(t,e,i=e){this._registrars[t].start(...e),this._notify(t,i)}_generateCompatibleEvent(t){this._listCompatible.sendByListScrollRegistrar(this._registrars.listScroll,t,{})}_resizeObserverCallback(t){if((0,g.isStickyHidden)(this._container)||this._container.closest(".controls-Popup__hidden"))return;const e={};for(const i of t)if(i.target===this._children.content)e.clientHeight=i.contentRect.height,e.clientWidth=i.contentRect.width;else{if(this._updateContentType(),i.borderBoxSize){const t={scrollHeight:"blockSize"};for(const o of Object.keys(t)){const l=t[o];e[o]=void 0===i.borderBoxSize[l]?i.borderBoxSize[0][l]:i.borderBoxSize[l]}}else e.scrollHeight=i.contentRect.height;if(this._contentType===m.restricted)e.scrollHeight=this._getContentHeightByChildren()}if(e.scrollWidth=this._children.content.scrollWidth,e.scrollHeight<e.clientHeight)e.scrollHeight=e.clientHeight;if(e.scrollWidth<e.clientWidth)e.scrollWidth=e.clientWidth;if(e.clientHeight)e.clientHeight=this._getMobileClientHeight(e.clientHeight);this._updateStateAndGenerateEvents(e)}_updateContentType(t){const e=t||this._getContentType();if(this._contentType!==e)this._contentType=e,this._updateContentWrapperCssClass()}_getContentType(){var t;let e=m.regular;const i=null===(t=this._children.userContent.children)||void 0===t?void 0:t[0];if(i){const t=i.classList;if(t.contains("controls-Scroll-Container__notScrollable"))e=m.notScrollable;else if(t.contains("Hint-ListWrapper"))e=m.restricted}return e}_getContentHeightByChildren(){let t=0;for(const e of this._getElementsForHeightCalculation())t+=this._calculateScrollHeight(e);return t}_getElementsForHeightCalculation(t){const e=[],i=t||this._children.userContent;for(const t of i.children){const i=this._getIgnoredChild(t);if(i)for(const t of i)e.push(t);else e.push(t)}return e}_getIgnoredChild(t){if(t.classList.contains("Hint-ListWrapper"))return t.children;else return null}_calculateScrollHeight(t){return t.offsetHeight+parseFloat(window.getComputedStyle(t).marginTop)+parseFloat(window.getComputedStyle(t).marginBottom)}_getFullStateFromDOM(){if(this._children.content){let t=this._children.content.getBoundingClientRect();if(t.width+10<this._children.content.clientWidth)t.width=this._children.content.clientWidth;if(t.height+10<this._children.content.clientHeight)t.height=this._children.content.clientHeight;let e=t.height;if(this._children.content.scrollHeight===t.height)e=this._getContentHeight();let i=this._children.content.scrollTop,o=this._children.content.scrollLeft,l=this._children.content.scrollHeight;if((0,p.getStore)("AdaptiveInitializer").get("isScrollOnBody")&&e>window.screen.height)t=document.scrollingElement.getBoundingClientRect(),i=document.scrollingElement.scrollTop,o=document.scrollingElement.scrollLeft,l=document.scrollingElement.scrollHeight;return{contentClientHeight:e,scrollTop:i,scrollLeft:o,clientHeight:this._getMobileClientHeight(t.height),scrollHeight:l,clientWidth:t.width,scrollWidth:this._children.content.scrollWidth,canVerticalScroll:(0,c.canScrollByState)({clientHeight:t.height,scrollHeight:l}
8,c.SCROLL_DIRECTION.VERTICAL),canHorizontalScroll:(0,c.canScrollByState)({clientWidth:t.width,scrollWidth:this._children.content.scrollWidth},c.SCROLL_DIRECTION.HORIZONTAL),verticalPosition:0===this._children.content.scrollTop?"start":"middle",horizontalPosition:0===this._children.content.scrollLeft?"start":"middle"}}return{contentClientHeight:0,scrollTop:0,scrollLeft:0,clientHeight:0,scrollHeight:0,clientWidth:0,scrollWidth:0,canVerticalScroll:(0,c.canScrollByState)({clientHeight:0,scrollHeight:0},c.SCROLL_DIRECTION.VERTICAL),canHorizontalScroll:(0,c.canScrollByState)({clientWidth:0,scrollWidth:0},c.SCROLL_DIRECTION.HORIZONTAL),verticalPosition:c.SCROLL_POSITION.START,horizontalPosition:c.SCROLL_POSITION.START}}_getMobileClientHeight(t){if(this.props.isAdaptive&&t>window.screen.height)return window.screen.height;else return t}_getContentHeight(){const t=Array.from(this._children.userContent.querySelectorAll(".controls-Scroll-containerBase_userContent")).filter((t=>t.parentNode===this._children.userContent));let e,i=0;for(let o=0;o<t.length;o++){let l=t[o];if(t[o].classList.contains("Hint-ListWrapper"))l=t[o].children[0];e=l.getBoundingClientRect(),i+=e.height}return i}_createScrollModel(){const t=this._getFullStateFromDOM(),{content:e}=this._children;this._scrollModel=new _.default(e,t),this._oldScrollState=new _.default(e,{})}_updateState(t){if(!this._scrollModel)this._createScrollModel();else this._oldScrollState=this._scrollModel.clone();return this._scrollModel.updateState(t)}_lockScrollPositionUntilKeyboardShown(){var t;this._scrollLockedPosition=(null===(t=this._scrollModel)||void 0===t?void 0:t.scrollTop)||0,setTimeout((()=>{this._scrollLockedPosition=null}),500)}_doScrollHandler(t,e,i){if(!this._destroyed)this.isProgrammScroll=!0,this._doScrollBaseHandler(t,c.SCROLL_DIRECTION.VERTICAL,e,i)}_doHorizontalScrollHandler(t,e){if(this._options.disableScrollReaction)return;let i;if("string"==typeof e){const t=this._scrollModel.scrollLeft,o=this._scrollModel.clientWidth,l=(0,g.getStickyHeadersWidth)(this._container,g.StickyPosition.Left,g.TypeFixedBlocks.AllFixed),s=t=>Math.max(Math.min(t,this._scrollModel.scrollWidth),0);i="pageUp"===e?s(t-o+l):s(t+o-l)}else i=e;this._doScrollBaseHandler(t,c.SCROLL_DIRECTION.HORIZONTAL,i)}_doScrollBaseHandler(t,e,i,o){if(this._fixInertialScroll(),e===c.SCROLL_DIRECTION.VERTICAL)this._doScroll(i,o);else this._scrollTo(i,c.SCROLL_DIRECTION.HORIZONTAL,this._options.smoothScrolling);t.stopPropagation()}_doScroll(t,e){if("top"===t)this._setScrollTop(0);else{const i=(0,g.getStickyHeadersHeight)(this._container,g.StickyPosition.Top,g.TypeFixedBlocks.AllFixed)||0,o=this._scrollModel.clientHeight-i,l=this._scrollModel.scrollHeight+(this._isVirtualPlaceholderMode()?this._topPlaceholderSize:0),s=this._scrollModel.scrollTop+(this._isVirtualPlaceholderMode()?this._topPlaceholderSize:0);if("bottom"===t)this._setScrollTop(l-o);else if("pageUp"===t)this._setScrollTop(s-o);else if("pageDown"===t)this._setScrollTop(s+o);else if("number"==typeof t)this._setScrollTop(t,!1,e)}}_getScrollContainerCssClass(t){switch(t.scrollOrientation){case u.SCROLL_MODE.VERTICAL:return"controls-Scroll-ContainerBase__scroll_vertical";case u.SCROLL_MODE.HORIZONTAL:return"controls-Scroll-ContainerBase__scroll_horizontal";case u.SCROLL_MODE.NONE:return"controls-Scroll-ContainerBase__scroll_none";default:return"controls-Scroll-ContainerBase__scroll_verticalHorizontal"}}_updateContentWrapperCssClass(){if(this._getContentWrapperCssClass()!==this._contentWrapperCssClass)this._contentWrapperCssClass=this._getContentWrapperCssClass()}_getContentWrapperCssClass(){return this._contentType!==m.regular?"controls-Scroll-ContainerBase__contentNotScrollable":""}_scrollToElement(t,{itemContainer:e,position:i,force:o,offset:l,smooth:s,onlyFirstScrollableParent:r}){return this._isCustomScroll=!0,this._scrollToElementByOrientation(t,c.SCROLL_DIRECTION.VERTICAL,e,i,o,l,s,r)}_horizontalScrollToElement(t,{itemContainer:e,position:i,force:o,offset:l,smooth:s,onlyFirstScrollableParent:r}){return this._scrollToElementByOrientation(t,c.SCROLL_DIRECTION.HORIZONTAL,e,i,o,l,s,r)}
8_scrollToElementByOrientation(t,e,i,o,l,s,r,n){var a;this._scrollToElementCalled=!0,t.stopPropagation();const d=(e===c.SCROLL_DIRECTION.VERTICAL?h.scrollToElement:h.horizontalScrollToElement)(i,o,l,!0,s,r,n);return null===(a=this._autoScroll)||void 0===a||a.stopAutoScroll(),this.onScrollContainer({scrollTop:this._children.content.scrollTop,scrollLeft:this._children.content.scrollLeft}),d}_onDragStart(t){if(this._dnDAutoScroll.onDragStart(t),b.TouchDetect.getInstance().isTouch())this._children.content.style.overflow="hidden"}_onDragEnd(){if(this._dnDAutoScroll.onDragEnd(),b.TouchDetect.getInstance().isTouch())this._children.content.style.overflow=""}_onMouseMove(t){const e="buttonsArea"===this._options.horizontalScrollMode&&"verticalHorizontal"!==this._options.scrollOrientation,i="buttonsArea"===this._options.verticalScrollMode&&"verticalHorizontal"!==this._options.scrollOrientation;this._dnDAutoScroll.onMouseMove(t,i,e)}_onTouchMove(t){let e=!1;const i=t.nativeEvent;for(let t=0;t<i.touches.length;t++){const o=i.touches[t],l=document.elementFromPoint(o.clientX,o.clientY);if(l===this._container||this._container.contains(l)){e=!0;break}}if(e)this._onMouseLeave();else this._onMouseMove(t)}_onMouseLeave(){this._dnDAutoScroll.onMouseLeave()}_isVirtualPlaceholderMode(){return!!(this._topPlaceholderSize||this._bottomPlaceholderSize||this._leftPlaceholderSize||this._rightPlaceholderSize)}updatePlaceholdersSize(t){const e=(t,e)=>void 0!==t?t:e;this._topPlaceholderSize=e(t.top,this._topPlaceholderSize),this._bottomPlaceholderSize=e(t.bottom,this._bottomPlaceholderSize),this._leftPlaceholderSize=e(t.left,this._leftPlaceholderSize),this._rightPlaceholderSize=e(t.right,this._rightPlaceholderSize)}_scrollTo(t,e=c.SCROLL_DIRECTION.VERTICAL,i){this._isCustomScroll=!0;const o=this._children.content;let l;if(i)return l=e===c.SCROLL_DIRECTION.VERTICAL?"top":"left",o.scrollTo({[l]:t,behavior:"smooth"}),t;else if(l=e===c.SCROLL_DIRECTION.VERTICAL?"scrollTop":"scrollLeft",(0,p.getStore)("AdaptiveInitializer").get("isScrollOnBody")&&o.offsetHeight>window.screen.height)return document.scrollingElement.scrollTop=t,document.scrollingElement.scrollTop;else return o[l]=t,o[l]}_setScrollTop(t,e=!1,i){if(this._isCustomScroll=!0,this._options.scrollOrientation!==u.SCROLL_MODE.NONE)if(this._isVirtualPlaceholderMode()&&!i){const i=this._scrollModel,o=t,l=t-this._topPlaceholderSize,s=i.scrollHeight-l-i.clientHeight<0,r=()=>(this._contextEvent=null,this._scrollTo(o-this._topPlaceholderSize,c.SCROLL_DIRECTION.VERTICAL,e));if(l>=0&&!s)this._scrollTo(l,c.SCROLL_DIRECTION.VERTICAL,e);else if(0===this._topPlaceholderSize&&l<0||s&&0===this._bottomPlaceholderSize)r();else{const e=this._scrollModel.clone();this._contextEvent={type:"virtualScrollMove",params:{scrollTop:t,scrollState:e,callback:r}},this._generateEvent("virtualScrollMove",[{scrollTop:t,scrollState:e,applyScrollTopCallback:r}]),this._listCompatible.sendByListScrollRegistrar(this._registrars.listScroll,"virtualScrollMove",{scrollTop:t,scrollHeight:e.scrollHeight,clientHeight:e.clientHeight,applyScrollTopCallback:r})}}else{const i=this._scrollTo(t,c.SCROLL_DIRECTION.VERTICAL,e);this._updateStateAndGenerateEvents({scrollTop:i})}}_updatePlaceholdersSize(t,e){this.updatePlaceholdersSize(e)}_setOverflowScrolling(t){if(this._children.content)this._children.content.style.overflow=t,this._children.content.classList["hidden"===t?"add":"remove"]("controls-Scroll__content_hidden")}_updateOverscrollBehavior(){if(this._hasOuterContainer&&this._options.scrollOrientation===u.SCROLL_MODE.VERTICAL)if(this._virtualNavigationState.top&&this._virtualNavigationState.bottom||this._scrollModel.verticalPosition===c.SCROLL_POSITION.START&&this._virtualNavigationState.top||this._scrollModel.verticalPosition===c.SCROLL_POSITION.END&&this._virtualNavigationState.bottom)this._overscrollBehavior=u.OverscrollBehavior.Contain;else this._overscrollBehavior=u.OverscrollBehavior.Auto;else this._overscrollBehavior=u.OverscrollBehavior.Auto}_getContentDirectionClass(){if("custom"===this._horizontalScrollMode)return"";if(this._options.scrollOrientation===u.SCROLL_MODE.HORIZONTAL)return"contain"===this._options.horizontalContentFit?"controls-Scroll-ContainerBase__content-direction_column":"";else return"controls-Scroll-ContainerBase__content-direction_column"}_selectedKeysChanged(t){this._proxyEvent(t,"selectedKeysChanged",Array.prototype.slice.call(arguments,1
8))}_excludedKeysChanged(t){this._proxyEvent(t,"excludedKeysChanged",Array.prototype.slice.call(arguments,1))}_listSelectedKeysCountChanged(t){this._proxyEvent(t,"listSelectedKeysCountChanged",Array.prototype.slice.call(arguments,1))}_itemClick(t){return this._proxyEvent(t,"itemClick",Array.prototype.slice.call(arguments,1))}_proxyEvent(t,e,i){if(!t.propagating())return this._notify(e,i)||t.result}_logScrollPosition(t,e){if(y._debug){let i="Controls/scroll:ContainerBase: изменение положения скролла.";if(this._lastLogState.top!==t)i+=` По вертикали: новое ${t}, старое ${this._lastLogState.top}.`;if(this._lastLogState.left!==e)i+=` По горизонтали: новое ${e}, старое ${this._lastLogState.left}.`;this._lastLogState.top=t,this._lastLogState.left=e,v.Logger.warn(i,this)}}_logSizes(t,e){if(y._debug){let i="";for(const o of["clientHeight","scrollHeight","clientWidth","scrollWidth"])if(t[o]!==e[o])i+=` ${o}: новое ${t[o]}, старое ${e[o]}.`;if(i)v.Logger.warn(`Controls/scroll:ContainerBase: изменение размеров. ${i}`,this)}}static setDebug(t){y._debug=t}static getOptionTypes(){return{scrollOrientation:(0,l.descriptor)(String).oneOf([u.SCROLL_MODE.VERTICAL,u.SCROLL_MODE.HORIZONTAL,u.SCROLL_MODE.VERTICAL_HORIZONTAL,u.SCROLL_MODE.NONE])}}static getDefaultOptions(){return{scrollOrientation:"vertical",disableScrollReaction:!1}}}return y._debug=!1,e.default=y,e}(0,{},_,d,c,s,v,r,g,D,St,_t,bt,R,s,S,O,o,It,J,h,j,"undefined"==typeof css_Controls_scroll||css_Controls_scroll),Lt=Tt,Ht=function(t,e,i,o,l,s,r,n,a,c,h,d,_,u,S,g,p,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BUTTONS_SCROLL_STEP=void 0,e.BUTTONS_SCROLL_STEP=300;class f extends l.default{constructor(){super(...arguments),this["[Controls/_scroll/Container/Interface/IShadows]"]=!0,this["[Controls/_scroll/Container/Interface/IScrollMode]"]=!0,this._moduleName="Controls/scroll:Container",this._template=p,this._baseTemplate=v,this._dragging=!1,this._dispatchStickyContextCallback=this._dispatchStickyContext.bind(this),this._verticalScrollbarPadding={start:!1,end:!1},this._horizontalScrollbarPadding={start:!1,end:!1},this._wasMouseEnter=!1,this._isScrollEventFired=!1,this._gridAutoShadows=!0,this._arrowButtonClickCallback=null,this._isFirstUpdateState=!0,this._mouseEnterHandled=!1,this._offsetTop=0,this._scrollbarOffsetTop=0,this._scrollPosition="start",this._isScrollOnBody=!1,this._fixIOSShadow=!1,this._$isScrollContainer=!0}get containerLoaded(){return this._containerLoaded}_beforeMount(t){var e;if(this._fixIOSShadow=r.detection.isMobileIOS&&r.detection.IOSVersion<=15,this._isScrollOnBody=null===(e=this.context)||void 0===e?void 0:e.isScrollOnBody,this._stickyController=new s._StickyController(this._dispatchStickyContextCallback,this._stickyFixedCallback.bind(this),this._headersResizeHandler.bind(this)),this._horizontalScrollMode=t.horizontalScrollMode,this._setHorizontalScrollMode=this._setHorizontalScrollMode.bind(this,[t]),this._setArrowButtonClickCallback=this._setArrowButtonClickCallback.bind(this),this._removeArrowButtonClickCallback=this._removeArrowButtonClickCallback.bind(this),this._intersectionObserverRegisterHandler=this._intersectionObserverRegisterHandler.bind(this),this._intersectionObserverUnregisterHandler=this._intersectionObserverUnregisterHandler.bind(this),this._updatePlaceholdersSize=this._updatePlaceholdersSize.bind(this),this._updateShadowVisibility=this._updateShadowVisibility.bind(this),this._shadows=new _.default({initialScrollPosition:t.initialScrollPosition,...this._getShadowsModelOptions(t)}),this._scrollbars=new d.default(t),this._shouldDisplayArrowButtons(t))this._arrowButtons=new o.default;this._isOptimizeShadowEnabled=f._isCssShadowsSupported()&&(t.shadowMode===c.SHADOW_MODE.CSS||t.shadowMode===c.SHADOW_MODE.MIXED&&(t.topShadowVisibility===c.SHADOW_VISIBILITY.AUTO||t.bottomShadowVisibility===c.SHADOW_VISIBILITY.AUTO||t.topShadowVisibility===c.SHADOW_VISIBILITY.GRIDAUTO||t.bottomShadowVisibility===c.SHADOW_VISIBILITY.GRIDAUTO)),this._optimizeShadowClass=this._getOptimizeShadowClass(t),this._containerLoaded=new Promise((t=>{this._containerLoadedResolve=t})),this._setStickyContextUpdaterCallback=this._setStickyContextUpdater.bind(this),this._initialScrollPositionStyle=this._getInitialScrollPositionStyle(t),this._setPagingVisibleCallback=this._setPagingVisible.bind(this),this._getShadowClassesCallback=this._getShadowClasses.bind(this),this._arrowButtonHandlerCallback=this._arrowButtonHandler.bind(this),this._positionChangedH
8andlerCallback=this._positionChangedHandler.bind(this),this._draggingChangedHandlerCallback=this._draggingChangedHandler.bind(this),this._getVerticalScrollPosition=this._getVerticalScrollPosition.bind(this),this._getHorizontalScrollPosition=this._getHorizontalScrollPosition.bind(this),this._getViewportRect=this._getViewportRect.bind(this),super._beforeMount(...arguments)}_afterMount(t){var e;const o="true"===i.LocalStorageNative.getItem("scrollContainerWheelEventHappened");if(this._initScrollbar(o,t),this._switchInitialScrollPosition(t),this._isPagingVisible(this._options))this._paging=new h.default,this._scrollCssClass=this._getScrollContainerCssClass(t),this._paging.pagingMode=this._options.pagingMode;if(super._afterMount(),"hover"!==this._options.buttonsMode)this._updateScrollButtons();if(r.compatibility.touch||this._stickyController.hasBottomBlocks()||this._shadows.hasVisibleShadow())this.initHeaderController();if(this._updateShadowsScrollState(),this._stickyController.scrollStateChanged(this._scrollModel),this._containerLoadedResolve(),this._containerLoaded=!0,this._scrollbars.updateOptions({...t,scrollbarVisible:!t.disableScrollReaction&&(this._scrollbarVisible||this._resolveScrollbarVisibility(t))}),this._updateScrollbarsPadding(),this._updateShadowVisibilityInStickyController(),r.detection.isMac)null===(e=this._paging)||void 0===e||e.update(this._scrollModel)}_beforeUpdate(t){var e;if(super._beforeUpdate(...arguments),this._isScrollOnBody=null===(e=this.context)||void 0===e?void 0:e.isScrollOnBody,!this._isHorizontalScrollModeSetFromCallback&&t.horizontalScrollMode!==this._horizontalScrollMode)this._horizontalScrollMode=t.horizontalScrollMode;if(this._shouldDisplayArrowButtons(t)){if(!this._arrowButtons)this._arrowButtons=new o.default;this._updateScrollButtons()}else if(this._arrowButtons)this._arrowButtons=null;if(this._isPagingVisible(t)){if(!this._paging)this._paging=new h.default;if(this._paging.isVisible=this._scrollModel.canVerticalScroll&&"none"!==this._options.scrollOrientation,this._options.pagingMode!==t.pagingMode)this._paging.pagingMode=t.pagingMode;this._updateContentWrapperCssClass()}else if(this._paging)this._paging=null,this._updateContentWrapperCssClass();if(t.scrollOrientation!==this._options.scrollOrientation)this._scrollbars.updateScrollbarsModels(t),this._shadows=new _.default(this._getShadowsModelOptions(t)),this._shadows.setStickyFixed(this._stickyController.hasFixed(s.StickyPosition.Top)&&this._stickyController.hasShadowVisible(s.StickyPosition.Top),this._stickyController.hasFixed(s.StickyPosition.Bottom)&&this._stickyController.hasShadowVisible(s.StickyPosition.Bottom),this._stickyController.hasFixed(s.StickyPosition.Left),this._stickyController.hasFixed(s.StickyPosition.Right),!0);this._updateShadows(this._scrollModel,t),this._isOptimizeShadowEnabled=this._getIsOptimizeShadowEnabled(t),this._optimizeShadowClass=this._getOptimizeShadowClass(),this._updateScrollContainerPaigingSccClass(t),this._scrollbars.updateOptions({...t,scrollbarVisible:!t.disableScrollReaction&&(this._scrollbarVisible||this._resolveScrollbarVisibility(t))}),this._updateScrollbarsPadding(),this._shadows.updateOptions(this._getShadowsModelOptions(t))}_afterUpdate(){super._afterUpdate(...arguments)}_beforeUnmount(){if(this._intersectionObserverController)this._intersectionObserverController.destroy(),this._intersectionObserverController=null;this._stickyController.destroy(),super._beforeUnmount()}_isPagingVisible(t){if(void 0!==t.pagingMode)return"hidden"!==t.pagingMode;else return this._pagingVisible}initHeaderController(){if(!this._isControllerInitialized)this._isControllerInitialized=!0,this._stickyController.init()}_initScrollbar(t,e){const i=this._shouldDisplayArrowButtons(e),o=!1===e.forceScrollbarVisible||i||t;if(d.default.wheelEventHappened!==o)d.default.wheelEventHappened=o,this._scrollbars.updateOptions({...e,scrollbarVisible:!e.disableScrollReaction&&(this._scrollbarVisible||this._resolveScrollbarVisibility(e))})}_setStickyContextUpdater(t){this._updateStickyContext=t}_dispatchStickyContext(t,e){var i,o;if(!this._stickyModelsContext)this._stickyModelsContext={...t,models:{},initialScrollPosition:this.props.initialScrollPosition},this._stickyGroupModelsContext={...e,scrollState:{scrollTop:null===(i=this._scrollModel)||void 0===i?void 0:i.scrollTop,horizontalPosition:null===(o=this._scrollModel)||void 0===o?void 0:o.horizontalPosition}};else this._updateStickyContext(t,e,{...this._scrollModel,horizontalScrollMode:this._horizontalScrollMode})}_setPagingVisible(t=!1){this._pagingVisible=t}_resolveScrollbarVisibility(t){if("custom"===this._horizontalScrollMode)return{vertical:!!(this._options&&this._options.scrollbarVisible||t&&t.scrollbarVisible),horizontal:!1};let e;if(t.scrollOrientation===u.SCROLL_MODE.VERTICAL)e="scrollbar"===t.verticalScrollMode;else if(t.scrollOrientation===u.SCROLL_MODE.HORIZONTAL)e="scrollbar"===t.horizontalScrollMode;else e="scrollbar";return e&&!!t.scrollbarVisible&&!1!==t.forceScrollbarVisible}_updateScrollbarsPadding(){var t,e,i,o;if(this._wasMouseEnter){if(this._verticalScrollbarPadding.end!==(null===(t=this._scrollbars.horizontal)||void 0===t?void 0:t.isVisible))this._verticalScrollbarPadding={start:!1,end:null===(e=this._scrollbars.horizontal)||void 0===e?void 0:e.isVisible};
8if(this._horizontalScrollbarPadding.end!==(null===(i=this._scrollbars.vertical)||void 0===i?void 0:i.isVisible))this._horizontalScrollbarPadding={start:!1,end:null===(o=this._scrollbars.vertical)||void 0===o?void 0:o.isVisible}}}_updateShadowMode(t){let e=!1;const i=this._getIsOptimizeShadowEnabled(t||this._options);if(this._isOptimizeShadowEnabled!==i)this._isOptimizeShadowEnabled=i,this._optimizeShadowClass=this._getOptimizeShadowClass(),e=!0;return e}_updateShadows(t,e){if(this._updateShadowMode(e))this._shadows.updateScrollState(t||this._scrollModel)}_getShadowsModelOptions(t){const e={...t};if(t.disableScrollReaction)e.topShadowVisibility=c.SHADOW_VISIBILITY.HIDDEN,e.bottomShadowVisibility=c.SHADOW_VISIBILITY.HIDDEN;else{if(t.topShadowVisibility===c.SHADOW_VISIBILITY.GRIDAUTO)e.topShadowVisibility=this._gridAutoShadows?c.SHADOW_VISIBILITY.VISIBLE:c.SHADOW_VISIBILITY.AUTO;if(t.bottomShadowVisibility===c.SHADOW_VISIBILITY.GRIDAUTO)e.bottomShadowVisibility=this._gridAutoShadows?c.SHADOW_VISIBILITY.VISIBLE:c.SHADOW_VISIBILITY.AUTO}return e}_scrollHandler(t){var e;if(!this._destroyed){if(!this._isScrollEventFired&&this._isOptimizeShadowEnabled&&this._options.shadowMode===c.SHADOW_MODE.MIXED)this._updateShadows(this._scrollModel,this._options),this._isOptimizeShadowEnabled=this._getIsOptimizeShadowEnabled(this._options),this._optimizeShadowClass=this._getOptimizeShadowClass();if(this._isScrollEventFired=!0,super._scrollHandler(t),this._scrollModel.scrollTop>0||(null===(e=this._virtualNavigationState)||void 0===e?void 0:e.top))this._scrollPosition="scroll";else this._scrollPosition="start";this.initHeaderController()}}_controlResizeHandler(){super._controlResizeHandler()}_getVerticalScrollPosition(){return this._scrollModel?this._scrollModel.scrollTop:0}_getHorizontalScrollPosition(){return this._scrollModel?this._scrollModel.scrollLeft:0}_getViewportRect(){var t,e;if(this._isScrollOnBody&&(null===(t=this._scrollModel)||void 0===t?void 0:t.viewPortRect.height)>(null===(e=null===window||void 0===window?void 0:window.visualViewport)||void 0===e?void 0:e.height))return null===window||void 0===window?void 0:window.visualViewport;else return this._scrollModel?this._scrollModel.viewPortRect:{}}_updateState(...t){var e,i,o,l;const s=super._updateState(...t);if(s){if(this._wasMouseEnter&&(null===(e=this._scrollModel)||void 0===e?void 0:e.canVerticalScroll)&&!this._oldScrollState.canVerticalScroll)this._updateShadowMode();if(this._updateShadowsScrollState(),this._scrollModel&&this._isInitializationDelayed())this._scrollbars.updateScrollState(this._scrollModel,this._container);if(null===(i=this._paging)||void 0===i||i.update(this._scrollModel),this._updateScrollButtons(),this._updateShadowVisibilityInStickyController(),this._updateScrollContainerPaigingSccClass(this._options),this._scrollModel.clientHeight!==this._oldScrollState.clientHeight)this._updateScrollbar();if(!(null===(l=null===(o=this._container)||void 0===o?void 0:o.closest)||void 0===l?void 0:l.call(o,".controls-Popup__hidden")))this._stickyController.scrollStateChanged(this._scrollModel)}return s}_updateShadowsScrollState(){if(!this._isOptimizeShadowEnabled||this._stickyController.hasFixed(u.POSITION.TOP)||this._stickyController.hasFixed(u.POSITION.BOTTOM))this._shadows.updateScrollState(this._scrollModel)}_updateScrollContainerPaigingSccClass(t){const e=this._getScrollContainerCssClass(t);if(this._scrollCssClass!==e)this._scrollCssClass=e,this._updateContentWrapperCssClass(t)}_getScrollContainerCssClass(t){return this._scrollbars.getScrollContainerClasses(t)}_getContentWrapperCssClass(){var t;let e=super._getContentWrapperCssClass();if(null===(t=this._paging)||void 0===t?void 0:t.isVisible)e+=` controls-Scroll__content_paging controls_paging_theme-${this._options.theme}`;return e}_draggingChangedHandler(t,e){this._dragging=e}
8_positionChangedHandler(t,e,i){if(i===g.SCROLL_DIRECTION.VERTICAL)this._setScrollTop(e);else this.scrollTo(e,i)}_updateShadowVisibility(t,e){var i,o;null==t||t.stopImmediatePropagation();let l=!1;for(const t in e)if(e.hasOwnProperty(t))if(this._shadows[t]&&this._shadows[t].getVisibilityByInnerComponents()!==e[t])l=!0;if(this._arrowButtons){const t=e.left===c.SHADOW_VISIBILITY.VISIBLE,s=e.right===c.SHADOW_VISIBILITY.VISIBLE;l=t!==(null===(i=this._arrowButtons)||void 0===i?void 0:i.isLeftFixed)||s!==(null===(o=this._arrowButtons)||void 0===o?void 0:o.isRightFixed)}if(!l)return;if(this._gridAutoShadows){this._gridAutoShadows=!1;const t=this._getShadowsModelOptions(this._options);if(t.bottomShadowVisibility!==e.bottom&&e.bottom===c.SHADOW_VISIBILITY.VISIBLE)t.bottomShadowVisibility=e.bottom,this._gridAutoShadows=!0;if(t.topShadowVisibility!==e.top&&e.top===c.SHADOW_VISIBILITY.VISIBLE)t.topShadowVisibility=e.top,this._gridAutoShadows=!0;this._shadows.updateOptions(t)}const s=this._wasMouseEnter||!this._isOptimizeShadowEnabled;if(this._shadows.updateVisibilityByInnerComponents(e,s),this._updateScrollButtonsByShadowVisibility(e),this._shadows.hasVisibleShadow())this.initHeaderController();this._updateShadowVisibilityInStickyController(),this._updateStateAndGenerateEvents(this._scrollModel)}_getBlurClasses(){if(this._options.shadowMode!==c.SHADOW_MODE.BLUR)return;let t="";const e=this._shadows.left.isEnabled&&this._shadows.left.isVisible,i=this._shadows.right.isEnabled&&this._shadows.right.isVisible;if(e&&i)t="controls-Scroll-Container__blur__leftRight";else if(e)t="controls-Scroll-Container__blur__left";else if(i)t="controls-Scroll-Container__blur__right";return t}_getStyleForCorrectWorkBlur(){if(this._options.shadowMode===c.SHADOW_MODE.BLUR)return"will-change: transform;";else return""}_getInitialScrollPositionStyle(t){var e,i,o,l;let s="";if("number"==typeof(null===(e=t.initialScrollPosition)||void 0===e?void 0:e.vertical))s=`margin-top: ${-(null===(i=t.initialScrollPosition)||void 0===i?void 0:i.vertical)}px;`;if("number"==typeof(null===(o=t.initialScrollPosition)||void 0===o?void 0:o.horizontal))s+=`margin-left: ${-(null===(l=t.initialScrollPosition)||void 0===l?void 0:l.horizontal)}px;`;return s}_switchInitialScrollPosition(t){var e,i,o,l;if(this._initialScrollPositionStyle="",this._children.content.style.margin="","number"==typeof(null===(e=t.initialScrollPosition)||void 0===e?void 0:e.vertical))this.scrollTo(null===(i=t.initialScrollPosition)||void 0===i?void 0:i.vertical),setTimeout((()=>{var e;this.scrollTo(null===(e=t.initialScrollPosition)||void 0===e?void 0:e.vertical)}),0);if("number"==typeof(null===(o=t.initialScrollPosition)||void 0===o?void 0:o.horizontal))this.scrollTo(null===(l=t.initialScrollPosition)||void 0===l?void 0:l.horizontal,g.SCROLL_DIRECTION.HORIZONTAL),setTimeout((()=>{var e;this.scrollTo(null===(e=t.initialScrollPosition)||void 0===e?void 0:e.horizontal,g.SCROLL_DIRECTION.HORIZONTAL)}),0)}_updateScrollButtonsByShadowVisibility(t){if(this._arrowButtons){if(t.left===c.SHADOW_VISIBILITY.VISIBLE)this._arrowButtons.isLeftVisible=this._arrowButtons.isLeftFixed=!0;else this._arrowButtons.isLeftFixed=!1;if(t.right===c.SHADOW_VISIBILITY.VISIBLE)this._arrowButtons.isRightVisible=this._arrowButtons.isRightFixed=!0;else this._arrowButtons.isRightFixed=!1;if(t.left===c.SHADOW_VISIBILITY.AUTO||t.right===c.SHADOW_VISIBILITY.AUTO)this._updateScrollButtons()}}_updateScrollButtons(){if(this._arrowButtons){if("buttons"===this._options.horizontalScrollMode||"buttonsArea"===this._options.horizontalScrollMode){if(!this._arrowButtons.isLeftFixed)this._arrowButtons.isLeftVisible=this._scrollModel.canHorizontalScroll&&this._scrollModel.horizontalPosition!==g.SCROLL_POSITION.START;if(!this._arrowButtons.isRightFixed)this._arrowButtons.isRightVisible=this._scrollModel.canHorizontalScroll&&this._scrollModel.horizontalPosition!==g.SCROLL_POSITION.END}if("buttons"===this._options.verticalScrollMode||"buttonsArea"===this._options.verticalScrollMode){if(!this._arrowButtons.isTopFixed)this._arrowButtons.isTopVisible=this._scrollModel.canVerticalScroll&&this._scrollModel.verticalPosition!==g.SCROLL_POSITION.START;if(!this._arrowButtons.isBottomFixed)this._arrowButtons.isBottomVisible=this._scrollModel.canVerticalScroll&&this._scrollModel.verticalPosition!==g.SCROLL_POSITION.END}}}_setArrowButtonClickCallback(t){this._arrowButtonClickCallback=this._arrowButtonClickCallback||t}_removeArrowButtonClickCallback(t){if(t===this._arrowButtonClickCallback)this._arrowButtonClickCallback=null}_arrowButtonHandler(t,i){var o;if(!1!==(null===(o=this._arrowButtonClickCallback)||void 0===o?void 0:o.call(this,t))){const o="next"===t?1:-1,l=(0,g.getScrollPositionByState)(this._scrollModel,i);this.scrollTo(l+o*e.BUTTONS_SCROLL_STEP,i,this._options.smoothScrolling)}}_shouldDisplayArrowButtons(t){return"verticalHorizontal"!==t.scrollOrientation&&("buttons"===t.horizontalScrollMode||"buttonsArea"===t.horizontalScrollMode||"buttons"===t.verticalScrollMode||"buttonsArea"===t.verticalScrollMode)}_updateShadowVisibilityInStickyController(){var t,e;this._stickyController.setShadowVisibility(null===(t=this._shadows.top)||void 0===t?void 0:t.getStickyHeadersShadowsVisibility(),null===(e=this._shadows.bottom)||void 0===e?void 0:e.getStickyHeadersShadowsVisibility())}_getHasUnrenderedContentState(){var t,e;return{top:this._gridAutoShadows&&"gridauto"===this._options.topShadowVisibility||(null===(t=this._shadows.top)||void 0===t?void 0:t.getVisibilityByInnerComponents())===c.SHADOW_VISIBILITY.V
8ISIBLE,bottom:this._gridAutoShadows&&"gridauto"===this._options.bottomShadowVisibility||(null===(e=this._shadows.bottom)||void 0===e?void 0:e.getVisibilityByInnerComponents())===c.SHADOW_VISIBILITY.VISIBLE}}_getFullStateFromDOM(){return{...super._getFullStateFromDOM(),hasUnrenderedContent:this._getHasUnrenderedContentState()}}_getShadowClasses(t,e){const i="rounded"===this._options.shadowMode?"-rounded":"";return`controls-Scroll__shadow_${t}${i} controls-Scroll__shadow_${e}${i} controls-Scroll__shadow_${e}_style-${this._getShadowStyle(t,e)}${i}`}_getShadowStyle(t,e){if("vertical"===t&&"right"===e)return"custom"===this._horizontalScrollMode?"custom":this._options.shadowStyle;else return this._options.shadowStyle}_updateStateAndGenerateEvents(t){var e;if(this._scrollbars.release()&&0===t.clientHeight&&0===t.clientWidth)this._notify("scrollbarReleased",[],{bubbling:!0});if(!this._isCustomScroll&&void 0!==(null===(e=this._scrollModel)||void 0===e?void 0:e.scrollTop)&&void 0!==(null==t?void 0:t.scrollTop)&&this._scrollModel.scrollTop!==t.scrollTop)this._stickyController.updateDynamicPosition(this._scrollModel.scrollTop-t.scrollTop>0,t.scrollTop-this._scrollModel.scrollTop);super._updateStateAndGenerateEvents({...t,hasUnrenderedContent:this._getHasUnrenderedContentState()})}_getScrollNotifyConfig(){var t,e;const i=super._getScrollNotifyConfig(),o=(null===(t=this._shadows.top)||void 0===t?void 0:t.getVisibilityByInnerComponents())===c.SHADOW_VISIBILITY.VISIBLE,l=(null===(e=this._shadows.bottom)||void 0===e?void 0:e.getVisibilityByInnerComponents())===c.SHADOW_VISIBILITY.VISIBLE;return i.push(o,l),i}_keydownHandler(t){if(!t.nativeEvent.isTrusted){let e;const i=this._scrollModel.clientHeight,o=this._scrollModel.scrollTop,l=this._scrollModel.scrollHeight-this._scrollModel.clientHeight;if(t.nativeEvent.which===r.constants.key.pageDown)e=o+i;if(t.nativeEvent.which===r.constants.key.down)e=o+40;if(t.nativeEvent.which===r.constants.key.pageUp)e=o-i;if(t.nativeEvent.which===r.constants.key.up)e=o-40;if(e>l)e=l;if(e<0)e=0;if(void 0!==e&&e!==o)this.scrollTo(e),t.preventDefault();if(t.nativeEvent.which===r.constants.key.home&&0!==o)this.scrollToTop(),t.preventDefault();if(t.nativeEvent.which===r.constants.key.end&&o!==l)this.scrollToBottom(),t.preventDefault()}}_arrowClickHandler(t,e){let i;switch(e){case"Begin":i="top";break;case"End":i="bottom";break;case"Prev":i="pageUp";break;case"Next":i="pageDown"}this._doScroll(i)}_onWheelHandler(t){if(!d.default.wheelEventHappened)i.LocalStorageNative.setItem("scrollContainerWheelEventHappened","true"),d.default.wheelEventHappened=!0;if(Array.isArray(null==t?void 0:t.target.className)&&(null==t?void 0:t.target.className.includes("controls-VScrollbar")))t.preventDefault()}_mouseoverHandler(t){if(!this._mouseEnterHandled)this._mouseenterHandler(t)}_mouseenterHandler(t){var e;if(this._mouseEnterHandled=!0,this._gridAutoShadows&&(null===(e=this._scrollModel)||void 0===e?void 0:e.canVerticalScroll))this._gridAutoShadows=!1,this._shadows.updateOptions(this._getShadowsModelOptions(this._options)),this._updateShadows();if(!this._wasMouseEnter){if("hover"===this._options.buttonsMode)this._updateScrollButtons();if(this._wasMouseEnter=!0,this._updateScrollbar(),this._scrollModel)this._scrollbars.updateScrollState(this._scrollModel,this._container);if(!r.compatibility.touch)this.initHeaderController()}if(this._scrollbars.take())this._notify("scrollbarTaken",[],{bubbling:!0})}_mouseleaveHandler(t){if(this._scrollbars.release())this._notify("scrollbarReleased",[],{bubbling:!0})}_scrollbarTakenHandler(){this._scrollbars.taken()}_scrollbarReleasedHandler(t){if(this._scrollbars.released())t.preventDefault()}_updatePlaceholdersSize(t,e){if(!this._destroyed)super._updatePlaceholdersSize(...arguments),this._scrollbars.updatePlaceholdersSize(e)}_isInitializationDelayed(){return this._wasMouseEnter}_initIntersectionObserverController(){if(!this._intersectionObserverController)this._intersectionObserverController=new S.default(this._intersectHandler.bind(this))}_intersectionObserverRegisterHandler(t,e){if(this._initIntersectionObserverController(),this._intersectionObserverController.register(this._container,e),!e.observerName)null==t||t.stopImmediatePropagation()}_intersectionObserverUnregisterHandler(t,e,i){if(this._intersectionObserverController&&!this._destroyed)this._intersectionObserverController.unregister(e,i);if(!i)null==t||t.stopImmediatePropagation()}_intersectHandler(t){this._notify("intersect",[t])}_getOptimizeShadowClass(t){var e,i,o,l;const s=t||this._options;let r="";if(this._isOptimizeShadowEnabled)if("horizontal"===this._options.scrollOrientation)r+=`controls-Scroll__backgroundShadow__horizontal controls-Scroll__background-Shadow__horizontal__style-${s.backgroundStyle} controls-Scroll__background-Shadow_left-${null===(e=this._shadows.left)||void 0===e?void 0:e.isVisibleShadowOnCSS}_right-${null===(i=this._shadows.right)||void 0===i?void 0:i.isVisibleShadowOnCSS}_style-${s.shadowStyle}`;else r+=`controls-Scroll__backgroundShadow controls-Scroll__background-Shadow_style-${s.backgroundStyle} controls-Scroll__background-Shadow_top-${null===(o=this._shadows.top)||void 0===o?void 0:o.isVisibleShadowOnCSS}_bottom-${null===(l=this._shadows.bottom)||void 0===l?void 0:l.isVisibleShadowOnCSS}_style-${s.shadowStyle}`;return r}_getIsOptimizeShadowEnabled(t){return t.shadowMode===c.SHADOW_MODE.CSS&&f._isCssSha
8dowsSupported()}_stickyFixedCallback(){if(this._isOptimizeShadowEnabled)this._shadows.updateScrollState(this._scrollModel||this._getFullStateFromDOM(),!1);this._headersResizeHandler();const t=this._wasMouseEnter||this._isScrollEventFired||this._options.shadowMode===c.SHADOW_MODE.JS;this._shadows.setStickyFixed(this._stickyController.hasFixed(s.StickyPosition.Top)&&this._stickyController.hasShadowVisible(s.StickyPosition.Top),this._stickyController.hasFixed(s.StickyPosition.Bottom)&&this._stickyController.hasShadowVisible(s.StickyPosition.Bottom),this._stickyController.hasFixed(s.StickyPosition.Left),this._stickyController.hasFixed(s.StickyPosition.Right),t),this._updateShadowVisibilityInStickyController(),this._offsetTop=this._stickyController.getBlocksHeight(s.StickyPosition.Top,s.TypeFixedBlocks.InitialFixed,!0)}_headersResizeHandler(){this._updateScrollbar()}_updateScrollbar(){if(!this._isInitializationDelayed())return;let t=0;const e=this._stickyController.getBlocksSizes(s.StickyPosition.Top,s.TypeFixedBlocks.InitialFixed,!0,!0);
8if(e.sizes.length)t=e.totalHeight,e.sizes.forEach((e=>{if(e.rect.top>this._container.clientHeight)t-=e.rect.height}));else t=e.totalHeight;this._offsetTop=t,this._scrollbarOffsetTop=t;const i=this._stickyController.getBlocksHeight(s.StickyPosition.Bottom,s.TypeFixedBlocks.InitialFixed,!0);this._scrollbars.setOffsets({top:t,bottom:i},!0)}getHeadersHeight(t,e=s.TypeFixedBlocks.InitialFixed,i=!0){return this._stickyController.getBlocksHeight(t,e,i)}getHeadersWidth(t,e=s.TypeFixedBlocks.InitialFixed){return this._stickyController.getBlocksWidth()}getHeadersRects(t,e=s.TypeFixedBlocks.InitialFixed){return this._stickyController.getBlocksRects(t,e)}syncRegisterDelayedBlocks(){this._stickyController.syncRegisterDelayed()}getBlocksHeightByScrollTop(t,e=!1){return this._stickyController.getFixedBlocksHeightByScrollTop(t,e)}getScrollTop(){var t;return(null===(t=this._children.content)||void 0===t?void 0:t.scrollTop)||0}getScrollLeft(){var t;return(null===(t=this._children.content)||void 0===t?void 0:t.scrollLeft)||0}_setHorizontalScrollMode(t,e){var i;if(e!==this._horizontalScrollMode)this._isHorizontalScrollModeSetFromCallback=!0,this._horizontalScrollMode=e,this._scrollbarVisible=this._resolveScrollbarVisibility(t),null===(i=this._scrollbars)||void 0===i||i.updateOptions({...t,scrollbarVisible:this._scrollbarVisible||t.scrollbarVisible})}_canHorizontalScroll(){var t;return"custom"===this._horizontalScrollMode?!!(null===(t=this._scrollModel)||void 0===t?void 0:t.canHorizontalScroll):!1}_getHorizontalPosition(){var t;return(null===(t=this._scrollModel)||void 0===t?void 0:t.horizontalPosition)||g.SCROLL_POSITION.START}isHorizontalScroll(){return Math.round(this._scrollModel.clientWidth)!==Math.round(this._scrollModel.scrollWidth)}static setDebug(t){l.default.setDebug(t)}static _isCssShadowsSupported(){return!r.detection.isMobileIOS&&!r.detection.isMobileAndroid}static getOptionTypes(){return{...l.default.getOptionTypes(),topShadowVisibility:(0,n.descriptor)(String).oneOf([c.SHADOW_VISIBILITY.AUTO,c.SHADOW_VISIBILITY.HIDDEN,c.SHADOW_VISIBILITY.VISIBLE,"gridauto"]),bottomShadowVisibility:(0,n.descriptor)(String).oneOf([c.SHADOW_VISIBILITY.AUTO,c.SHADOW_VISIBILITY.HIDDEN,c.SHADOW_VISIBILITY.VISIBLE,"gridauto"]),shadowMode:(0,n.descriptor)(String).oneOf([c.SHADOW_MODE.CSS,c.SHADOW_MODE.JS,c.SHADOW_MODE.MIXED,c.SHADOW_MODE.BLUR,c.SHADOW_MODE.ROUNDED])}}static getDefaultOptions(){return{...l.default.getDefaultOptions(),...(0,a.getDefaultOptions)(),...(0,c.getDefaultOptions)(),smoothScrolling:!1,shadowStyle:"default",backgroundStyle:"default",buttonsSize:"xl",buttonsViewMode:"stretched",syncDomOptimization:!0,horizontalContentFit:"contain",scrollbarVisible:!0,buttonsMode:"always",overflowAnchorFix:!0}}}return e.default=f,e}(0,{},b,y,Tt,S,_,c,w,T,G,vt,wt,R,dt,D,yt,j,"undefined"==typeof css_Controls_scroll||css_Controls_scroll),Rt=Ht,I.SHADOW_VISIBILITY=I._ContainerBase=I.VirtualScrollContainer=I.IntersectionObserverSyntheticEntry=I.EdgeIntersectionObserverContainer=I.IntersectionObserverContainer=I.IntersectionObserverController=I.HotKeysContainer=I._ListScrollContext=I._ListScrollContextConsumer=I.ScrollContextProvider=I.Container=I.SCROLL_MODE=I.SHADOW_MODE=I.getScrollContentElement=I.hasHorizontalScroll=I.SCROLL_POSITION=I.SCROLL_DIRECTION=I.getScrollableParents=I.getScrollContainerByElement=I.horizontalScrollToElement=I.getScrollPosition=I.scrollToElement=void 0,I.Container=Rt.default,I.ScrollContextProvider=lt.default,I.IntersectionObserverController=Ct.default,I.IntersectionObserverContainer=at.default,I.EdgeIntersectionObserverContainer=ht.default,I.IntersectionObserverSyntheticEntry=B.default,I._ContainerBase=Lt.default,I.VirtualScrollContainer=mt.default,Object.defineProperty(I,"SHADOW_VISIBILITY",{enumerable:!0,get:function(){return L.SHADOW_VISIBILITY}}),I.HotKeysContainer=rt.default,Object.defineProperty(I,"_ListScrollContextConsumer",{enumerable:!0,get:function(){return et.default}}),Object.defineProperty(I,"_ListScrollContext",{enumerable:!0,get:function(){return P.ListScrollContext}}),Object.defineProperty(I,"scrollToElement",{enumerable:!0,get:function(){return gt.scrollToElement}}),Object.defineProperty(I,"getScrollPosition",{enumerable:!0,get:function(){return gt.getScrollPosition}}),Object.defineProperty(I,"horizontalScrollToElement",{enumerable:!0,get:function(){return gt.horizontalScrollToElement}}
8),Object.defineProperty(I,"getScrollContainerByElement",{enumerable:!0,get:function(){return gt.getScrollContainerByElement}}),Object.defineProperty(I,"getScrollableParents",{enumerable:!0,get:function(){return gt.getScrollableParents}}),Object.defineProperty(I,"SCROLL_DIRECTION",{enumerable:!0,get:function(){return k.SCROLL_DIRECTION}}),Object.defineProperty(I,"SCROLL_POSITION",{enumerable:!0,get:function(){return k.SCROLL_POSITION}}),Object.defineProperty(I,"hasHorizontalScroll",{enumerable:!0,get:function(){return U.hasHorizontalScroll}}),Object.defineProperty(I,"getScrollContentElement",{enumerable:!0,get:function(){return x.getScrollContentElement}}),Object.defineProperty(I,"SHADOW_MODE",{enumerable:!0,get:function(){return H.SHADOW_MODE}}),Object.defineProperty(I,"SCROLL_MODE",{enumerable:!0,get:function(){return E.SCROLL_MODE}}),I}));
9define("Controls/popupTemplate",["react/jsx-runtime","react","i18n!Controls","clsx","WasabyLoader/ModulesLoader","WasabyLoader/Library","UICore/Executor","UICore/Events","UICore/Contexts","UICommon/Utils","UI/Utils","UI/Focus","UI/Events","UI/Contexts","UI/Base","UI/Async","UI/Adaptive","Types/function","Types/entity","Types/collection","I18n/i18n","Env/Env","Controls/sizeUtils","Controls/event","Controls/error","Controls/dragnDrop","Controls/dataSource","Controls/Pending","Controls/Application/SettingsController","Compiler/IR","require","exports","Controls/popup","Controls/popup","Controls/popupConfirmation","Controls/Container/Async","Controls/buttons","Controls/extButtons","Controls/heading","Controls/icon","css!Controls/CommonClasse
9s","css!Controls/dragnDrop","css!Controls/popupTemplate"],(function(e,t,o,i,n,s,r,l,a,d,c,_,p,u,m,h,g,f,v,C,b,y,T,x,S,w,P,O,k,W,M,z,A,B,D){var I,E,N,R,H,L,V,K,j,F,U,$,G,q,Z,X,Y,Q,J,ee,te,oe,ie,ne,se,re,le,ae,de,ce,_e,pe,ue,me,he,ge,fe,ve,Ce,be,ye,Te,xe,Se,we,Pe,Oe,ke,We,Me,ze,Ae,Be,De,Ie,Ee,Ne,Re,He,Le,Ve,Ke,je,Fe,Ue,$e,Ge,qe,Ze,Xe,Ye,Qe;return Object.defineProperty(z,"__esModule",{value:!0}),I=function(e,t,o,i){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{children:(e.message||e.messageContentTemplate)&&(()=>{var t;const n={hasDetails:e.details||e.detailsContentTemplate,content:e.message||e.messageContentTemplate,messageOptions:e.messageOptions,hasMarkup:e.hasMarkup};if("function"==typeof e.message||(null===(t=e.message)||void 0===t?void 0:t.isWasabyTemplate))i.Logger.error("Опция message имеет неверный тип, используйте опцию messageContentTemplate для отображения шаблона основного текста диалога подтверждения",this);return(0,o.jsx)(e.messageTemplate,{...n})})()}),(0,o.jsx)("div",{children:(e.details||e.detailsContentTemplate)&&(()=>{var t;const n={content:e.details||e.detailsContentTemplate,detailsOptions:e.detailsOptions};if("function"==typeof e.details||(null===(t=e.details)||void 0===t?void 0:t.isWasabyTemplate))i.Logger.error("Опция details имеет неверный тип, используйте опцию detailsContentTemplate для отображения шаблона дополнительного текста диалога подтверждения",this);return(0,o.jsx)(e.detailsTemplate,{...n})})()})]})},t}(0,{},e,d),E=function(e,t,o,i){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.jsx)("div",{className:"controls-ConfirmationDialog__details","data-qa":"controls-ConfirmationDialog__details",children:(0,o.jsx)("div",{className:"controls-ConfirmationDialog__message-centered",children:"string"==typeof e.content||i.isValidElement(e.content)?e.content:(0,o.jsx)(e.content,{...e.detailsOptions})})})},t}(0,{},e,t),N=function(e,t,o,i,n,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=(0,n.lazy)((()=>(0,n.importer)("Controls/markup:Decorator")));return t.default=function(e){const t=(0,i.useCallback)(((t,o)=>{if(o)return t;const{htmlToJson:i}=(0,s.loadSync)("Controls/markup:Converter");return i(`<div><span>${e.content}</span></div>`)}),[e.content]);return(0,o.jsx)(r,{tagResolver:t})},t}(0,{},e,t,h,n),R=function(e,t,o,i,n,s,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.POPUP_STACK_CLASSNAME=void 0,t.POPUP_STACK_CLASSNAME="controls-Stack__content-wrapper",t.default=(0,i.forwardRef)((function(e,t){var l;const a=(0,n.useTheme)(e),d=(0,i.useMemo)((()=>e.stackPosition||s.Controller.getStackPosition()),[]),c=(0,i.useMemo)((()=>(0,i.cloneElement)(e.children,{})),[e.children]);return(0,o.jsxs)(r.FocusRoot,{as:"div",cycling:!0,ref:t,"data-name":e["data-name"],templatename:null===(l=e.attrs)||void 0===l?void 0:l.templatename,className:`controls_popupTemplate_theme-${a} controls-StackTemplate controls_outer-padding ${e.className||""}`,"ws-tab-cycling":"true",onKeyDown:e.onKeyDown,"data-qa":e.dataQa||e["data-qa"],style:e.style,children:[!e.isWorkspacePopup?(0,o.jsx)("div",{className:`controls-StackTemplate-shadow__container ${e.leftContentTemplate?"controls-StackTemplate-shadow_zIndex":""} controls-StackTemplate-shadow_direction-${d}__container`,children:(0,o.jsx)("div",{className:`controls-StackTemplate-shadow controls-StackTemplate-shadow_direction-${d}`,children:(0,o.jsx)("div",{className:"controls-StackTemplate-shadow__content"})})}):null,c]})})),t}(0,{},e,t,u,A,_),H=R,L=function(e,t,o,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Context=void 0;const s=(0,i.createContext)(null);return t.Context=s,t.default=function(e){const t=(0,i.useContext)(n.Context),r=(0,i.useMemo)((()=>({maximized:null==t?void 0:t.maximized,maximizeButtonVisible:e.maximizeButtonVisible})),[t,e.maximizeButtonVisible]),l={...e};return delete l.children,(0,o.jsx)(s.Provider,{value:r,children:(0,i.cloneElement)(e.children,{...l})})},t}(0,{},e,t,A),V=function(e,t,o,i){"use strict";
9Object.defineProperty(t,"__esModule",{value:!0}),t.Context=void 0;const n=(0,i.createContext)(null);return t.Context=n,t.default=function(e){const t=(0,i.useMemo)((()=>({close:e.close})),[e.close]),s={...e};return delete s.children,(0,o.jsx)(n.Provider,{value:t,children:(0,i.cloneElement)(e.children,{...s})})},t}(0,{},e,t),K=V,j=function(e,t){"use strict";function o(e,t,o){const i=t&&document.querySelector(t);if(i&&e){const{left:t,top:n,width:s,height:r}=i.getBoundingClientRect(),{left:l,top:a}=null==e?void 0:e.getBoundingClientRect(),d=n+r/2;let c=t+s/2-l;if(l<t)c=Math.abs(c);let _=d-a;if(a<n)_=Math.abs(_);return{diffX:c+(o?e.clientWidth/2:0),diffY:_+(o?e.clientHeight/2:0)}}}function i(e,t,o,i,n){e.style.setProperty("transform-origin",t),e.style.setProperty("transition",o),e.style.setProperty("transition-timing-function",i),e.style.setProperty("scale",n)}Object.defineProperty(t,"__esModule",{value:!0}),t.animateStart=t.hidePopupTemplateBeforeMoveInViewport=t.TIMEOUT_FOR_ANIMATION=t.animateClose=void 0;return t.TIMEOUT_FOR_ANIMATION=500,t.animateClose=function(e,t){const i=o(e,t);if(i&&e)e.style.transformOrigin=`${i.diffX}px ${i.diffY}px`,e.classList.add("controls-PopupTemplate-animateClose")},t.hidePopupTemplateBeforeMoveInViewport=function(e){e.style.setProperty("scale","0")},t.animateStart=function(e,t){const n=o(e,t,!0);if(n)i(e,`${n.diffX}px ${n.diffY}px`,"scale 0.5s","ease-in","1"),setTimeout((()=>{i(e,"","","","")}),500)},t}(0,{}),F=j,U=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.getRoundClass=void 0,t.getRoundClass=function({hasRoundedBorder:e,options:t,type:o}){if(e)if("header"===o){if(!t.bodyContentTemplate&&!t.footerContentTemplate)return`controls-PopupTemplate__roundBorder_bottom controls_border-radius-${t.borderRadius||"s"}`}else if("body"===o)if(!t.headingCaption&&!t.headerContentTemplate)if(t.footerContentTemplate)return`controls-PopupTemplate__roundBorder_top controls_border-radius-${t.borderRadius||"s"}`;else return`controls-PopupTemplate__roundBorder controls_border-radius-${t.borderRadius||"s"}`;else if(!t.footerContentTemplate)return`controls-PopupTemplate__roundBorder_bottom  controls_border-radius-${t.borderRadius||"s"}`},t}(0,{}),$=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_MIN_OFFSET_WIDTH=t.DEFAULT_MIN_OFFSET_HEIGHT=void 0;t.DEFAULT_MIN_OFFSET_WIDTH=100;return t.DEFAULT_MIN_OFFSET_HEIGHT=50,t}(0,{}),G=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o="sliding",i="fullscreen",n="dialog",s="stack";return t.default=(e,t)=>{switch(e){case o:return n;case i:return s}return t},t}(0,{}),q=G,Z=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=e=>{const t=e.split(":"),o=t[0],i=t[1];return requirejs(o)[i]},t}(0,{}),X=Z,Y=function(e,t,o,i){"use strict";function n(e,t,i){return((e,t)=>{if(!o.constants.isBrowserPlatform)return{};const i={},n=document.createElement("div");n.setAttribute("class",e),n.setAttribute("style","position: absolute; top: -1000px; left: -1000px;"),document.body.appendChild(n);const s=getComputedStyle(n);for(const e in t)if(t.hasOwnProperty(e))i[e]=parseInt(s.getPropertyValue(t[e]),10);return n.parentNode.removeChild(n),i})(t,i)}Object.defineProperty(t,"__esModule",{value:!0});return t.default=function(t,s){let r;if(!r)r=new Promise(((r,l)=>{if(!o.constants.isBrowserPlatform)return r({});new Promise(((t,o)=>{e(["Controls/popupTemplate"],t,o)})).then((({InfoBox:e})=>e.loadCSS())).then((()=>{r(n(i.Controller.getTheme(),t,s))})).catch((function(e){requirejs.onError(e)}))}));return r},t}(M,{},y,A),Q=Y,J=function(e,t){"use strict";var o;return Object.defineProperty(t,"__esModule",{value:!0}),t.IResizingArrowPosition=void 0,function(e){e.LEFT_TOP="left-top",e.RIGHT_TOP="right-top",e.RIGHT_BOTTOM="right-bottom",e.LEFT_BOTTOM="left-bottom"}(o||(t.IResizingArrowPosition=o={})),t}(0,{}),ee=J,te=function(e,t){"use strict";function o(){return this}var i=["close","_headingMousedownHandler","_getCaptionClass","_getIconClass","_applyButtonClickHandler","_getBackgroun
9dClass","closeButtonVisible","_options","resolvedTemplate","content","closeButtonSize","m","closeButtonViewMode","external","_headerSize-","headerSize","_closeButtonSize-","click","draggable","controls-DialogTemplate__top-area-","dragState","headerBorderVisible","controls-DialogTemplate__top-area-border","maximize","controls-PopupTemplate__roundBorder_top controls_border-radius-","borderRadius","includes","toolbarContentTemplate","applyButtonVisible"," controls-margin_right-m","imageContentTemplate","headerContentTemplate","headingCaption","mousedown","headingFontColorStyle","headingFontSize","headingFontWeight","headerIcon","headerIconStyle","secondary","default","null","topAreaOptions","externalWide"," controls-DialogTemplate-Button__apply_external"];return e.g({v:1,m:"wml!Controls/_popupTemplate/Dialog/Template/Header",d:e.d(["Controls/Container/Async","Controls/heading","Controls/icon","Controls/buttons"],arguments,2),t:[e.c(((e,t)=>[e.P(t,e.m(t,1),{K:"0_0_0_0_0_",A:{class:"controls-DialogTemplate__close_button controls-DialogTemplate__close_button_size-"+e.e(e.m(t,2))+" controls-DialogTemplate__close_"+e.e(e.m(t,3))+" controls-DialogTemplate__close_"+e.e(e.m(t,3))+e.e(e.m(t,4))},E:{"on:click":[{value:i[0],originalName:i[17],viewController:t.v}],meta:{isControl:!1,context:o,handler:e.M(t,5)}},O:{name:"closeButton",size:e.m(t,6),viewMode:e.m(t,3)},g:!0,m:"attribute"})])),e.t("CloseButton",((e,t)=>[e.m(t,0)?[e.C(t,"ws:Controls/Container/Async",{K:"0_0_0_",O:{esc:!1,templateName:"Controls/extButtons:CloseButton",content:e.o(t,0,0)},g:!0,m:"attribute"})]:e.t()])),e.r(((e,n)=>[e.g(n,"div",{K:"1_",A:{class:"controls-DialogTemplate__top-area "+e.e(e.x(n,7))+" controls-DialogTemplate__top-area_size-"+e.e(e.x(n,8))+" "+e.e(e.x(n,9))+" "+e.e(e.x(n,10))+" "+e.e(e.x(n,11))},r:!0,c:!0},[e.g(n,"div",{K:"1_0_",A:{class:"controls-DialogTemplate__top-area-content"+e.e(e.x(n,12))}},[e.m(n,13)?[e.g(n,"div",{K:"1_0_0_0_",A:{class:"controls-margin_top-s tw-self-start controls-margin_left-m"+e.e(e.x(n,14))}},[e.P(n,e.m(n,13),{K:"1_0_0_0_0_",O:e.s(n,{},e.m(n,15)),m:"none",i:1})])]:e.t(),e.m(n,16)?[e.g(n,"div",{K:"1_0_1_0_",A:{class:"controls-DialogTemplate__caption "+e.e(e.x(n,17))}},[e.C(n,{library:"Controls/heading",module:["Title"]},{K:"1_0_1_0_0_",A:{class:"controls-DialogTemplate__caption_text"},E:{"on:mousedown":[{value:i[1],originalName:i[33],viewController:n.v}],meta:{isControl:!1,context:o,handler:e.M(n,5)}},O:{caption:e.m(n,16),fontColorStyle:e.m(n,18),fontSize:e.m(n,19),fontWeight:e.m(n,20),readOnly:!0,tooltip:e.m(n,16)}})])]:e.t(),e.m(n,21)?[e.C(n,{library:"Controls/icon",module:["Icon"]},{K:"1_0_2_0_",A:{class:"controls-DialogTemplate__headerIcon "+e.e(e.m(n,22)),"data-qa":"popup__header-icon"},O:{iconSize:"m",iconStyle:e.m(n,23),icon:e.m(n,21)}})]:e.t(),e.m(n,24)?[e.g(n,"div",{K:"1_0_3_0_",A:{class:"controls-DialogTemplate__headerContentTemplate controls-DialogTemplate__headerContentTemplate_margin-right-"+e.e(e.x(n,25))}},[e.P(n,e.m(n,24),{K:"1_0_3_0_0_",O:e.S(n,{bodyContentTemplate:null,headerContentTemplate:null,footerContentTemplate:null},e.m(n,26)),m:"none",i:2})])]:e.t(),e.m(n,27)?[e.g(n,"div",{K:"1_0_4_0_",A:{class:"controls-margin_right-m controls-DialogTemplate-toolbarContentTemplate"}},[e.P(n,e.m(n,27),{K:"1_0_4_0_0_",O:e.s(n,{direction:"horizontal"},e.m(n,15)),m:"none",i:1})])]:e.t(),e.m(n,28)?[e.C(n,{library:"Controls/buttons",module:["Button"]},{K:"1_0_5_0_",A:{"data-qa":"controls-stack-Button__apply",tabindex:"-1",class:"controls-margin_right-m controls-DialogTemplate-Button__apply tw-self-start"+e.e(e.m(n,29))},E:{"on:click":[{value:i[4],originalName:i[17],viewController:n.v}],meta:{isControl:!1,context:o,handler:e.M(n,5)}},O:{icon:"icon-Yes",iconStyle:"contrast",iconSize:"s",viewMode:"filled",buttonStyle:"success",inlineHeight:"l",tooltip:t("Применить"),readOnly:!1}})]:e.t(),e.m(n,30)?[e.I(n,1,{K:"1_0_6_0_"})]:e.t()]),e.m(n,31)?[e.I(n,1,{K:"1_1_0_"})]:e.t()])]))],p:i.slice(0,6),e:[(e,t)=>e.g(t,[i[7],i[6]]),(e,t)=>e.g(t,[i[9],i[8]]),(e,t)=>e.g(t,[i[7],i[10]])||i[11],(e,t)=>e.g(t,[i[7],i[12]]),(e,t)=>e.g(t,[i[7],i[12]])===i[13]?i[14]+e.g(t,[i[7],i[15]])+i[16]+e.g(t,[i[7],i[10]]):"",function(e,t,o,i,n,s){return e.g(this,[s])},(e,t)=>e.g(t,[i[7],i[10]]),(e,t,o)=>e.c(o,t,[i[5]]),(e,t)=>e.g(t,[i[7],i[15]])||i[11],(e,t)=>e.g(t,[i[7],i[18]])?i[19]+e.g(t,[i[7],i[20]]):"",(e,t)=>e.g(t,[i[7],i[21]])?i[22]:"",(e,t)=>!e.g(t,[i[7],i[23]])?i[24]+e.g(t,[i[7],i[25]]):"",(e,t)=>e.C(t,[i[7],i[12],i[26]],[i[13]])&&!e.g(t,[i[7],i[27]])&&!e.g(t,[i[7],i[28]])&&e.g(t,[i[7],i[6]])?i[29]:"",(e,t)=>e.g(t,[i[7],i[30]]),(e,t)=>e.g(t,[i[7],i[31]])||e.g(t,[i[7],i[31]])?i[29]:"",(e,t)=>e.g(t,[i[7]]),(e,t)=>e.g(t,[i[7],i[32]]),(e,t,o)=>
9e.c(o,t,[i[2]]),(e,t)=>e.g(t,[i[7],i[34]]),(e,t)=>e.g(t,[i[7],i[35]]),(e,t)=>e.g(t,[i[7],i[36]]),(e,t)=>e.g(t,[i[7],i[37]]),(e,t,o)=>e.c(o,t,[i[3]]),(e,t)=>e.g(t,[i[7],i[38]])||i[39],(e,t)=>e.g(t,[i[7],i[31]]),(e,t)=>!e.C(t,[i[7],i[12],i[26]],[i[13]])?i[40]:i[41],(e,t)=>e.g(t,[i[7],i[42]]),(e,t)=>e.g(t,[i[7],i[27]]),(e,t)=>e.g(t,[i[7],i[28]]),(e,t)=>e.g(t,[i[7],i[12]])===i[43]?i[44]:"",(e,t)=>!e.C(t,[i[7],i[12],i[26]],[i[13]]),(e,t)=>e.C(t,[i[7],i[12],i[26]],[i[13]])],i:[[[1,4],[6]],[[15]],[[26]]]})}(W,o,"undefined"==typeof Controls_Container_Async?null:Controls_Container_Async,"undefined"==typeof Controls_heading?null:Controls_heading,"undefined"==typeof Controls_icon?null:Controls_icon,"undefined"==typeof Controls_buttons?null:Controls_buttons),oe=function(e){"use strict";function t(){return this}var o="undefined"==typeof window,i=["_onDragMove","_onDragEnd","_touchMoveHandler","_closeClick","_useOldGradient","_isAdaptive","_getShadowClass","_backgroundStyle","_onMouseDown","_onClick","dragMove","documentDragEnd","touchmove","theme","_options","controls-Notification_oldGradient","controls-Notification_adaptive","closeButtonViewMode","external","controls-Notification__external-offset","mousedown","touchstart","click","closeButtonVisible","backgroundStyle","none","controls-Notification__content-spacing","controls-Notification__content-padding","bodyContentTemplate","resolvedTemplate","content"];return e.g({v:1,m:"wml!Controls/_popupTemplate/Notification/Template/Base/Base",d:e.d(["Controls/dragnDrop","Controls/Container/Async"],arguments,1),t:[e.c(((e,t)=>[e.P(t,e.m(t,12),{K:"0_0_0_1_0_0_0_0_",O:{viewMode:e.m(t,11),offset:"null"},g:!0,m:"attribute"})])),e.c(((e,n)=>[e.g(n,"div",{K:"0_0_0_",A:{class:"controls_popupTemplate_theme-"+e.e(e.x(n,1))+" controls-Notification tw-cursor-move "+e.e(e.x(n,2))+" "+e.e(e.x(n,3))+" "+e.e(e.x(n,4))+" "+e.e(e.x(n,5))+" controls-Notification__"+e.e(e.x(n,6))+" controls-Popup__isolatedFocusingContext"},E:o?{}:{"on:mousedown":[{value:i[8],originalName:i[20],viewController:n.v}],"on:touchstart":[{value:i[8],originalName:i[21],viewController:n.v}],"on:click":[{value:i[9],originalName:i[22],viewController:n.v}],meta:{isControl:!1,context:t,handler:e.M(n,0)}},r:!0},[e.g(n,"div",{K:"0_0_0_0_",A:{class:"controls-Notification__content tw-flex-grow "+e.e(e.x(n,7))+" "+e.e(e.x(n,8))}},[e.m(n,9)?[e.P(n,e.m(n,9),{K:"0_0_0_0_0_0_",m:"none"})]:e.t()]),e.m(n,10)?[e.g(n,"div",{K:"0_0_0_1_0_",A:{class:"controls-Notification__closeButton controls-Notification__closeButton__style-"+e.e(e.x(n,11))},E:o?{}:{"on:click":[{value:i[3],originalName:i[22],viewController:n.v}],meta:{isControl:!1,context:t,handler:e.M(n,0)}}},[e.C(n,"ws:Controls/Container/Async",{K:"0_0_0_1_0_0_",O:{esc:!1,templateName:"Controls/extButtons:CloseButton",content:e.o(n,0,0)}})])]:e.t()])])),e.r(((e,o)=>[e.C(o,{library:"Controls/dragnDrop",module:["Container"]},{K:"0_",E:{"on:dragmove":[{value:i[0],originalName:i[10],viewController:o.v}],"on:documentdragend":[{value:i[1],originalName:i[11],viewController:o.v}],"on:touchmove":[{value:i[2],originalName:i[12],viewController:o.v}],meta:{isControl:!1,context:t,handler:e.M(o,0)}},O:{esc:!1,name:"dragNDrop",content:e.o(o,1,1)},m:"attribute",c:!0})]))],p:i.slice(0,10),e:[function(e,t,o,i,n,s){return e.g(this,[s])},(e,t)=>e.g(t,[i[14],i[13]]),(e,t)=>e.g(t,[i[4]])?i[15]:"",(e,t)=>e.g(t,[i[5]])?i[16]:"",(e,t)=>e.g(t,[i[14],i[17]])===i[18]?i[19]:"",(e,t,o)=>e.c(o,t,[i[6]]),(e,t)=>e.g(t,[i[7]]),(e,t)=>e.g(t,[i[14],i[23]])&&e.g(t,[i[14],i[24]])!==i[25]?i[26]:"",(e,t)=>e.g(t,[i[14],i[24]])!==i[25]?i[27]:"",(e,t)=>e.g(t,[i[14],i[28]]),(e,t)=>e.g(t,[i[14],i[23]]),(e,t)=>e.g(t,[i[14],i[17]]),(e,t)=>e.g(t,[i[30],i[29]])],i:[[[11,12]],[[1,11]]]})}(W,w,"undefined"==typeof Controls_Container_Async?null:Controls_Container_Async),ie=function(e){"use strict";function t(){return this}var o=["_preloadItemsByKeysHandler","_prefetchData","pageTemplate","_options","resolvedTemplate","content","preloadItemsByKeys","pageId","pageTemplateOptions"];return e.g({v:1,m:"wml!Controls/_popupTemplate/Page/Page",d:e.d(["Controls/Container/Async"],arguments,1
9),t:[e.c(((e,i)=>[e.P(i,e.m(i,1),{K:"0_0_0_",E:{"on:preloaditemsbykeys":[{value:o[0],originalName:o[6],viewController:i.v}],meta:{isControl:!1,context:t,handler:e.M(i,2)}},O:e.S(i,{prefetchResult:e.m(i,3),pageId:e.m(i,4),isPrefetchDataMode:!0},e.m(i,5)),g:!0,m:"attribute",i:0})])),e.r(((e,t)=>[e.C(t,"ws:Controls/Container/Async",{K:"0_",O:{esc:!1,templateName:e.m(t,0),content:e.o(t,0,1)},m:"attribute",c:!0})]))],p:o.slice(0,2),e:[(e,t)=>e.g(t,[o[3],o[2]]),(e,t)=>e.g(t,[o[5],o[4]]),function(e,t,o,i,n,s){return e.g(this,[s])},(e,t)=>e.g(t,[o[1]]),(e,t)=>e.g(t,[o[3],o[7]]),(e,t)=>e.g(t,[o[3],o[8]])],i:[[[5]],[[1],[3,5]]]})}(W,"undefined"==typeof Controls_Container_Async?null:Controls_Container_Async),ne=function(e){"use strict";function t(){return this}var o="undefined"==typeof window,i=["_getTemplateName","_sendResult","mousedown","mouseover","mouseenter","mouseleave","template","_options","templateOptions","loadResult"];return e.g({v:1,m:"wml!Controls/_popupTemplate/Previewer/PreviewerTemplate",t:[e.r(((e,n)=>[e.g(n,"div",{K:"0_",A:{template:e.e(e.x(n,0))},E:o?{}:{"on:mousedown":[{value:i[1],originalName:i[2],viewController:n.v}],"on:mouseover":[{value:i[1],originalName:i[3],viewController:n.v}],"on:mouseenter":[{value:i[1],originalName:i[4],viewController:n.v}],"on:mouseleave":[{value:i[1],originalName:i[5],viewController:n.v}],meta:{isControl:!1,context:t,handler:e.M(n,1)}},r:!0,c:!0},[e.P(n,e.m(n,2),{K:"0_0_",O:e.S(n,{loadResult:e.m(n,4)},e.m(n,3)),m:"none",i:0})])]))],p:i.slice(0,2),e:[(e,t,o)=>e.c(o,t,[i[0]]),function(e,t,o,i,n,s){return e.g(this,[s])},(e,t)=>e.g(t,[i[7],i[6]]),(e,t)=>e.g(t,[i[7],i[8]]),(e,t)=>e.g(t,[i[7],i[9]])],i:[[[3]]]})}(W),se=function(e){"use strict";function t(){return this}var o="undefined"==typeof window,i=["_isResizing","_dragging","_styleArea","_onDragHandler","_onStartDragHandler","_onEndDragHandler","_beginDragHandler","minOffset","_options","maxOffset","theme","horizontalStyle","areaStyle","verticalStyle","position","dragMove","customdragStart","documentDragEnd","borderRadius","style","mousedown","touchstart"];return e.g({v:1,m:"wml!Controls/_popupTemplate/ResizingArrow/ResizingArrow",d:e.d(["Controls/dragnDrop"],arguments,1),t:[e.c(((e,n)=>[e.g(n,"div",{K:"0_0_0_1_0_0_",A:{class:"controls-ResizingArrow__border controls_border-radius-"+e.e(e.x(n,8))+" controls-ResizingArrow__border_position-"+e.e(e.x(n,6))+" controls-ResizingArrow__border_style-"+e.e(e.x(n,9))},E:o?{}:{"on:mousedown":[{value:i[6],originalName:i[20],viewController:n.v}],"on:touchstart":[{value:i[6],originalName:i[21],viewController:n.v}],meta:{isControl:!1,context:t,handler:e.M(n,7)}},r:!0})])),e.r(((e,o)=>[e.m(o,0)?[e.g(o,"div",{K:"0_0_",A:{class:"controls-ResizingArrow controls_dragnDrop_theme-"+e.e(e.x(o,1))},r:!0,c:!0},[e.g(o,"div",{K:"0_0_0_",A:{class:"controls-ResizingLine__wrapper"}},[e.g(o,"div",{K:"0_0_0_0_",A:{class:"controls-ResizingLine__areaWrapper"}},[e.m(o,2)?[e.g(o,"div",{K:"0_0_0_0_0_0_",A:{style:e.e(e.x(o,3)),class:"controls-ResizingLine__area controls-ResizingLine__area_horizontal controls-ResizingLine__area controls-ResizingLine__area_style-"+e.e(e.x(o,4))}}),e.g(o,"div",{K:"0_0_0_0_0_1_",A:{style:e.e(e.x(o,5)),class:"controls-ResizingLine__area controls-ResizingLine__area_vertical controls-ResizingLine__area controls-ResizingLine__area_style-"+e.e(e.x(o,4))}}),e.g(o,"div",{K:"0_0_0_0_0_2_",A:{class:"controls-ResizingLine__cursor controls-ResizingArrow__cursor-"+e.e(e.x(o,6))}})]:e.t()]),e.C(o,{library:"Controls/dragnDrop",module:["Container"]},{K:"0_0_0_1_",E:{"on:dragmove":[{value:i[3],originalName:i[15],viewController:o.v}
9],"on:customdragstart":[{value:i[4],originalName:i[16],viewController:o.v}],"on:documentdragend":[{value:i[5],originalName:i[17],viewController:o.v}],meta:{isControl:!1,context:t,handler:e.M(o,7)}},O:{esc:!1,name:"dragNDrop",content:e.o(o,0,0)}})])])]:[e.g(o,"invisible-node",{K:"1_0_",r:!0,c:!0})]]))],p:i.slice(0,7),e:[(e,t,o)=>e.c(o,t,[i[0]],[e.g(t,[i[8],i[7]]),e.g(t,[i[8],i[9]])]),(e,t)=>e.g(t,[i[8],i[10]]),(e,t)=>e.g(t,[i[1]]),(e,t)=>e.g(t,[i[2],i[11]]),(e,t)=>e.g(t,[i[8],i[12]]),(e,t)=>e.g(t,[i[2],i[13]]),(e,t)=>e.g(t,[i[8],i[14]]),function(e,t,o,i,n,s){return e.g(this,[s])},(e,t)=>e.g(t,[i[8],i[18]]),(e,t)=>e.g(t,[i[8],i[19]])],i:[[[6],[8,9]]]})}(W,w),re=function(e,t){"use strict";function o(){return this}var i=["_applyButtonClickHandler","changeMaximizedState","close","headerBorderVisible","_options","controls-StackTemplate__top-area-border","headerBackgroundStyle","controls-StackTemplate_headerBackgroundColor","controls-background-","headingCaption","headerIcon"," controls-StackTemplate__caption__withIcon","headingFontSize","headingFontColorStyle","headingFontWeight","headerIconStyle","secondary","headerContentTemplate","hasRightPanel","rightBorderVisible","none","right","stackOptions","theme","leftContentTemplateVisible","applyButtonVisible","click","maximizeButtonVisibility","_maximizeButtonTitle","closeButtonVisible","resolvedTemplate","content","closeButtonViewMode","toolButton","functionalButton","null"];return e.g({v:1,m:"wml!Controls/_popupTemplate/Stack/Template/Header/Header",d:e.d(["Controls/heading","Controls/icon","Controls/buttons","Controls/Container/Async"],arguments,2),t:[e.c(((e,t)=>[e.P(t,e.m(t,20),{K:"0_0_4_0_1_0_0_0_",A:{class:"controls-StackTemplate__close_button","data-qa":"controls-stack-Button__close","data-name":"controls-stack-Button__close"},E:{"on:click":[{value:i[2],originalName:i[26],viewController:t.v}],meta:{isControl:!1,context:o,handler:e.M(t,15)}},O:{offset:e.m(t,21),viewMode:e.m(t,22)},g:!0,m:"attribute"})])),e.r(((e,n)=>[e.g(n,"div",{K:"0_",A:{class:"controls-StackTemplate__top-area "+e.e(e.x(n,0))+" "+e.e(e.x(n,1)),"data-qa":"controls-StackTemplate__header"},r:!0,c:!0},[e.g(n,"div",{K:"0_0_",A:{class:"controls-StackTemplate__top-area-content"}},[e.m(n,2)?[e.g(n,"div",{K:"0_0_0_0_",A:{class:"controls-StackTemplate__caption "+e.e(e.x(n,3))}},[e.C(n,{library:"Controls/heading",module:["Title"]},{K:"0_0_0_0_0_",A:{class:"controls-StackTemplate__caption_text"},O:{caption:e.m(n,2),fontSize:e.m(n,4),fontColorStyle:e.m(n,5),fontWeight:e.m(n,6),readOnly:!0,tooltip:e.m(n,2)}})])]:e.t(),e.m(n,7)?[e.C(n,{library:"Controls/icon",module:["Icon"]},{K:"0_0_1_0_",A:{class:"controls-StackTemplate__headerIcon","data-qa":"popup__header-icon"},O:{iconSize:"m",iconStyle:e.m(n,8),icon:e.m(n,7)}})]:e.t(),e.m(n,9)?[e.g(n,"div",{K:"0_0_2_0_",A:{class:"controls-StackTemplate__headerContentTemplate controls-StackTemplate__headerContentTemplate_padding-"+e.e(e.x(n,10)),"data-qa":"controls-StackTemplate__headerContentTemplate"}},[e.P(n,e.m(n,9),{K:"0_0_2_0_0_",O:e.S(n,{onClose:void 0,theme:e.m(n,12),leftContentTemplateVisible:e.m(n,13),hasRightTemplate:!0,bodyContentTemplate:null,headerContentTemplate:null,footerContentTemplate:null},e.m(n,11)),m:"none",i:0})])]:e.t(),e.m(n,14)?[e.C(n,{library:"Controls/buttons",module:["Button"]},{K:"0_0_3_0_",A:{"data-qa":"controls-stack-Button__apply",tabindex:"-1",class:"controls-margin_right-m controls-margin_left-m"},E:{"on:click":[{value:i[0],originalName:i[26],viewController:n.v}],meta:{isControl:!1,context:o,handler:e.M(n,15)}}
9,O:{icon:"icon-Yes",iconStyle:"contrast",iconSize:"m",viewMode:"filled",buttonStyle:"success",inlineHeight:"xl",tooltip:t("Применить"),readOnly:!1}})]:e.t(),e.m(n,16)?[e.g(n,"div",{K:"0_0_4_0_",A:{class:"controls-StackTemplate__command_buttons"}},[e.m(n,17)?[e.C(n,{library:"Controls/buttons",module:["Button"]},{K:"0_0_4_0_0_0_",A:{tabindex:"-1","data-qa":"controls-StackTemplate__maximized_button",class:"controls-StackTemplate__maximized_button__header controls-StackTemplate__rightPanel__maximized"},E:{"on:click":[{value:i[1],originalName:i[26],viewController:n.v}],meta:{isControl:!1,context:o,handler:e.M(n,15)}},O:{icon:"icon-CollapseExpand",iconStyle:"secondary",buttonStyle:"pale",iconSize:"s",viewMode:"outlined",inlineHeight:"xl",tooltip:e.m(n,18),readOnly:!1}})]:e.t(),e.m(n,19)?[e.C(n,"ws:Controls/Container/Async",{K:"0_0_4_0_1_0_",O:{esc:!1,templateName:"Controls/extButtons:CloseButton",content:e.o(n,0,1)}})]:e.t()])]:e.t()])])]))],p:i.slice(0,3),e:[(e,t)=>e.g(t,[i[4],i[3]])?i[5]:"",(e,t)=>void 0===e.g(t,[i[4],i[6]])?i[7]:i[8]+e.g(t,[i[4],i[6]]),(e,t)=>e.g(t,[i[4],i[9]]),(e,t)=>e.g(t,[i[4],i[10]])?i[11]:"",(e,t)=>e.g(t,[i[4],i[12]]),(e,t)=>e.g(t,[i[4],i[13]]),(e,t)=>e.g(t,[i[4],i[14]]),(e,t)=>e.g(t,[i[4],i[10]]),(e,t)=>e.g(t,[i[4],i[15]])||i[16],(e,t)=>e.g(t,[i[4],i[17]]),(e,t)=>e.g(t,[i[4],i[18]])&&!e.g(t,[i[4],i[19]])?i[20]:i[21],(e,t)=>e.g(t,[i[4],i[22]]),(e,t)=>e.g(t,[i[4],i[23]]),(e,t)=>e.g(t,[i[4],i[24]]),(e,t)=>e.g(t,[i[4],i[25]]),function(e,t,o,i,n,s){return e.g(this,[s])},(e,t)=>!e.g(t,[i[4],i[18]]),(e,t)=>e.g(t,[i[4],i[27]]),(e,t)=>e.g(t,[i[4],i[28]]),(e,t)=>e.g(t,[i[4],i[29]]),(e,t)=>e.g(t,[i[31],i[30]]),(e,t)=>e.g(t,[i[4],i[32]])!==i[33]&&e.g(t,[i[4],i[32]])!==i[34]?i[35]:"",(e,t)=>e.g(t,[i[4],i[32]])],i:[[[11]],[[20,22]]]})}(W,o,"undefined"==typeof Controls_heading?null:Controls_heading,"undefined"==typeof Controls_icon?null:Controls_icon,"undefined"==typeof Controls_buttons?null:Controls_buttons,"undefined"==typeof Controls_Container_Async?null:Controls_Container_Async),le=function(e){"use strict";function t(){return this}var o="undefined"==typeof window,i=["_close","_maximizeButtonClickHandler","_rightBottomTemplate","_visible","_isOutsidePanel","controls-StackTemplate__rightPanel-outside","rightBorderVisible","_options","rightPanelBackgroundStyle","transparent","_transparent","_hided","controls-StackTemplate_rightPanelBackgroundColor","controls-background-","closeButtonVisible","click","maximizeButtonVisibility","maximizeButtonTitle","toolbarContentTemplate","rightPanelOptions","resolvedTemplate","content","isCompatiblePopup","getTemplateName"];return e.g({v:1,m:"wml!Controls/_popupTemplate/Stack/Template/RightPanel/RightPanel",d:e.d(["Controls/extButtons","Controls/Container/Async"],arguments,1),t:[e.c(((e,t)=>[e.P(t,e.m(t,12),{K:"0_0_1_0_0_0_",O:{isCompatiblePopup:e.m(t,13),getTemplateName:e.m(t,14),stack:!0},g:!0,m:"attribute"})])),e.r(((e,n)=>[e.g(n,"div",{K:"0_",A:{class:"controls-StackTemplate__rightPanel "+e.e(e.x(n,0))+" controls-StackTemplate__rightBorder"+e.e(e.x(n,1))+" "+e.e(e.x(n,2))+" ","data-qa":"controls-StackTemplate__rightPanel"},r:!0,c:!0},[e.g(n,"div",{K:"0_0_",A:{class:"tw-flex tw-flex-col tw-min-h-0 tw-justify-between tw-grow-0 tw-shrink-0 tw-grow controls-StackTemplate__rightPanel-wrapper"}},[e.g(n,"div",{K:"0_0_0_",A:{class:"tw-flex tw-flex-col tw-min-h-0 tw-shrink-0 tw-items-center tw-grow",tabindex:"-1"}},[e.m(n,3)?[e.C(n,{library:"Controls/extButtons",module:["CloseButton"]},{K:"0_0_0_0_0_",A:{class:"controls-StackTemplate__close_button controls-stack-Button__rightPanel__close tw-shrink-0","data-qa":"controls-stack-Button__close","data-name":"controls-stack-Button__close"},E:{"on:click":[{value:i[0],originalName:i[15],viewController:n.v}],meta:{isControl:!1,context:t,handler:e.M(n,4)}},O:{viewMode:"functionalButton",size:"l",offset:"null",readOnly:!1}})]:e.t(),e.m(n,5)?[e.g(n,"div",{K:"0_0_0_1_0_",A:{class:"controls-StackTemplate__maximized_button controls-StackTemplate__rightPanel__maximized tw-flex tw-items-center tw-justify-center controls-icon_size-s controls-icon_style-secondary icon-CollapseExpand","data-qa":"controls-StackTemplate__maximized_button",title:e.e(e.x(n,6))},E:o?{}:{"on:click":[{value:i[1],originalName:i[15],viewController:n.v}],meta:{isControl:!1,context:t,handler:e.M(n,4)}}})]:e.t(),e.m(n,7)?[e.P(n,e.m(n,7),{K:"0_0_0_2_0_",A:{class:"controls-StackTemplate__toolbar"},O:e.s(n,{direction:"vertical"},e.m(n,8)),m:"none",i:0})]:e.t()]),e.m(n,9)?[e.C(n,"ws:Controls/Container/Async",{K:"0_0_1_0_",A:{class:"controls-padding_bottom-xs"},O:{esc:!1,templateName:e.m(n,10),templateOptions:e.m(n,11),content:e.o(n,0,1)}})]:e.t()])])]))],p:i.slice(0,5),e:[(e,t)=>e.g(t,[i[4]])?i[5]:"",(e,t)=>e.g(t,[i[7],i[6]])?i[3]:e.g(t,[i[7],i[8]])===i[9]?i[10]:i[11],(e,t)=>!e.g(t,[i[7],i[8]])?i[12]:i[13]+e.g(t,[i[7],i[8]]),(e,t)=>!(!1===e.g(t,[i[7],i[14]])),function(e,t,o,i,n,s){return e.g(this,[s])},(e,t)=>e.g(t,[i[7],i[16]]),(e,t)=>e.g(t,[i[7],i[17]]),(e,t)=>e.g(t,[i[7],i[18]]),(e,t)=>e.g(t,[i[7]]),(e,t)=>e.g(t,[i[2]])&&e.g(t,[i[3]]),(e,t)=>e.g(t,[i[2]]),(e,t)=>e.g(t,[i[7],i[19]]),(e,t)=>e.g(t,[i[21],i[20]]),(e,t)=>e.g(t,[i[7],i[22]]),(e,t)=>e.g(t,[i[7],i[23]])],i:[[[8]],[[12,14]]]})}
9(W,"undefined"==typeof Controls_extButtons?null:Controls_extButtons,"undefined"==typeof Controls_Container_Async?null:Controls_Container_Async),ae=function(e){"use strict";function t(){return this}var o="undefined"==typeof window,i=["_maximizeHandler","_closeStackWrapper","_getLeftContentVisible","_registerPendingHandler","_finishPendingOperationsHandler","_cancelFinishingPendingHandler","_canResize","_dragMoveHandler","_offsetHandler","_getResizeDirection","_minOffset","_maxOffset","_close","_registerPendingEventHandler","_cancelFinishingPendingEventHandler","_finishPendingOperationsEventHandler","_isTablet","_maximized","_templateWorkSpaceWidth","_sizesClass","_getContentStyle","_registerHandler","_unregisterHandler","_onKeyDownHandler","theme","_options","adaptiveMode","register","unregister","keyDown","left","dragMove","offset","reverse","content","maximized","close","registerPending","cancelFinishingPending","finishPendingOperations","right","direct"];return e.g({v:1,m:"wml!Controls/_popupTemplate/Stack/Template/StackPageWrapper/StackPageWrapper",d:e.d(["Controls/popup","Controls/Pending","Controls/dragnDrop"],arguments,1),t:[e.c(((e,n)=>[e.g(n,"div",{K:"0_0_0_0_0_",A:{class:"controls-PageTemplate controls_popupTemplate_theme-"+e.e(e.x(n,6))+" "+e.e(e.x(n,7)),style:e.e(e.x(n,8))},E:o?{}:{"on:register":[{value:i[21],originalName:i[27],viewController:n.v}],"on:unregister":[{value:i[22],originalName:i[28],viewController:n.v}],"on:keydown":[{value:i[23],originalName:i[29],viewController:n.v}],meta:{isControl:!1,context:t,handler:e.M(n,9)}},r:!0},[e.m(n,10)?[e.C(n,{library:"Controls/dragnDrop",module:["ResizingLine"]},{K:"0_0_0_0_0_0_0_",A:{class:"controls-PageTemplate__resizingLine controls-PageTemplate__resizingLine-left"},E:{"on:dragmove":[{value:i[7],originalName:i[31],viewController:n.v,args:[i[30]]}],"on:offset":[{value:i[8],originalName:i[32],viewController:n.v}],meta:{isControl:!1,context:t,handler:e.M(n,9)}},O:{direction:e.m(n,11),name:"leftResizingLine",minOffset:e.m(n,12),maxOffset:e.m(n,13)}})]:e.t(),e.P(n,e.m(n,14),{K:"0_0_0_0_0_1_",E:{"on:maximized":[{value:i[0],originalName:i[35],viewController:n.v}],"on:close":[{value:i[12],originalName:i[36],viewController:n.v}],"on:registerpending":[{value:i[13],originalName:i[37],viewController:n.v}],"on:cancelfinishingpending":[{value:i[14],originalName:i[38],viewController:n.v}],"on:finishpendingoperations":[{value:i[15],originalName:i[39],viewController:n.v}],meta:{isControl:!1,context:t,handler:e.M(n,9)}},O:e.s(n,{isTablet:e.m(n,16),maximized:e.m(n,17),stackWidth:e.m(n,18),workspaceWidth:e.m(n,18)},e.m(n,15)),m:"none",i:0}),e.m(n,10)?[e.C(n,{library:"Controls/dragnDrop",module:["ResizingLine"]},{K:"0_0_0_0_0_2_0_",A:{class:"controls-PageTemplate__resizingLine controls-PageTemplate__resizingLine-right"},E:{"on:dragmove":[{value:i[7],originalName:i[31],viewController:n.v,args:[i[40]]}],"on:offset":[{value:i[8],originalName:i[32],viewController:n.v}],meta:{isControl:!1,context:t,handler:e.M(n,9)}},O:{minOffset:e.m(n,12),direction:e.m(n,19),name:"rightResizingLine",maxOffset:e.m(n,13)}})]:e.t()])])),e.c(((e,t)=>[e.C(t,{library:"Controls/Pending",module:["ContextProvider"]},{K:"0_0_0_",O:{esc:!1,registerPending:e.m(t,3),finishPendingOperations:e.m(t,4),cancelFinishingPending:e.m(t,5),content:e.o(t,0,1)},g:!0,m:"attribute"})])),e.r(((e,t)=>[e.C(t,{library:"Controls/popup",module:["ContextProvider"]},{K:"0_",O:{esc:!1,maximized:e.m(t,0),isPopup:!1,closeStackWrapper:e.m(t,1),getLeftContentVisible:e.m(t,2),content:e.o(t,1,2)},m:"attribute",c:!0})]))],p:i.slice(0,24),e:[(e,t)=>e.g(t,[i[0]]),(e,t)=>e.g(t,[i[1]]),(e,t)=>e.g(t,[i[2]]),(e,t)=>e.g(t,[i[3]]),(e,t)=>e.g(t,[i[4]]),(e,t)=>e.g(t,[i[5]]),(e,t)=>e.g(t,[i[25],i[24]]),(e,t)=>e.g(t,[i[19]])?e.g(t,[i[19]]):"",(e,t,o)=>e.c(o,t,[i[20]],[e.g(t,[i[25],i[26]])]),function(e,t,o,i,n,s){return e.g(this,[s])},(e,t)=>e.g(t,[i[6]]),(e,t,o)=>e.c(o,t,[i[9]],[i[33]]),(e,t)=>e.g(t,[i[10]]),(e,t)=>e.g(t,[i[11]]),(e,t)=>e.g(t,[i[25],i[34]]),(e,t)=>e.g(t,[i[25]]),(e,t)=>e.g(t,[i[16]]),(e,t)=>e.g(t,[i[17]]),(e,t)=>e.g(t,[i[18]]),(e,t,o)=>e.c(o,t,[i[9]],[i[41]])],i:[[[15]],[[6,8],[10,19]],[[3,8],[10,19]]]})}(W,A,O,w),de=function(e){"use strict";function t(){return this}var o=["close","roundBorder","_options","controls-PopupTemplate__roundBorder_top controls_border-radius-","borderRadius","headerBackgroun
9dStyle","default","controls-StickyTemplate-backgroundColor","controls-background-","closeButtonVisible","withClose","withoutClose","_","closeButtonViewMode","headingIcon","headingIconSize","headingIconStyle","headingCaption","headingFontColorStyle","headingFontSize","headingTextTransform","headingFontWeight","headerContentTemplate","stickyOptions","theme","resolvedTemplate","content","closeBtnPosition","verticalDirection","top","controls-StickyTemplate__close_button-","link","external","-without-header_top-spacing-","closeButtonTopSpacing","none","-with-header","click","closeButtonOffset"];return e.g({v:1,m:"wml!Controls/_popupTemplate/Sticky/Template/Header",d:e.d(["Controls/icon","Controls/heading","Controls/Container/Async"],arguments,1),t:[e.c(((e,i)=>[e.P(i,e.m(i,16),{K:"0_0_3_0_0_0_",A:{class:"controls-StickyTemplate__close_button controls-StickyTemplate__close_button_position-"+e.e(e.m(i,17))+" controls-StickyTemplate__close_button-"+e.e(e.m(i,18))+" "+e.e(e.m(i,19))},E:{"on:click":[{value:o[0],originalName:o[37],viewController:i.v}],meta:{isControl:!1,context:t,handler:e.M(i,20)}},O:{viewMode:e.m(i,18),offset:e.m(i,21),name:"closeButton"},g:!0,m:"attribute"})])),e.r(((e,t)=>[e.g(t,"div",{K:"0_",A:{class:"controls-StickyTemplate__top-area "+e.e(e.x(t,0))+" "+e.e(e.x(t,1))+" controls-StickyTemplate__top-area-"+e.e(e.x(t,2))+e.e(e.x(t,3))},r:!0,c:!0},[e.g(t,"div",{K:"0_0_",A:{class:"controls-StickyTemplate__top-area-content"}},[e.m(t,4)?[e.g(t,"div",{K:"0_0_0_0_",A:{class:"controls-StickyTemplate__top-area-icon"}},[e.C(t,{library:"Controls/icon",module:["Icon"]},{K:"0_0_0_0_0_",O:{icon:e.m(t,4),iconSize:e.m(t,5),iconStyle:e.m(t,6)}})])]:e.t(),e.m(t,7)?[e.g(t,"div",{K:"0_0_1_0_",A:{class:"controls-StickyTemplate__caption"}},[e.C(t,{library:"Controls/heading",module:["Title"]},{K:"0_0_1_0_0_",A:{class:"tw-text-ellipsis tw-truncate"},O:{caption:e.m(t,7),fontColorStyle:e.m(t,8),fontSize:e.m(t,9),textTransform:e.m(t,10),readOnly:!0,fontWeight:e.m(t,11),tooltip:e.m(t,7)}})])]:e.t(),e.m(t,12)?[e.P(t,e.m(t,12),{K:"0_0_2_0_",O:e.S(t,{borderStyle:null,theme:e.m
9(t,14)},e.m(t,13)),m:"none",i:0})]:e.t(),e.m(t,15)?[e.C(t,"ws:Controls/Container/Async",{K:"0_0_3_0_",O:{esc:!1,templateName:"Controls/extButtons:CloseButton",content:e.o(t,0,1)}})]:e.t()])])]))],p:o.slice(0,1),e:[(e,t)=>e.g(t,[o[2],o[1]])?o[3]+e.g(t,[o[2],o[4]]):"",(e,t)=>e.g(t,[o[2],o[5]])===o[6]?o[7]:o[8]+e.g(t,[o[2],o[5]]),(e,t)=>e.g(t,[o[2],o[9]])?o[10]:o[11],(e,t)=>e.g(t,[o[2],o[9]])?o[12]+e.g(t,[o[2],o[13]]):"",(e,t)=>e.g(t,[o[2],o[14]]),(e,t)=>e.g(t,[o[2],o[15]]),(e,t)=>e.g(t,[o[2],o[16]]),(e,t)=>e.g(t,[o[2],o[17]]),(e,t)=>e.g(t,[o[2],o[18]]),(e,t)=>e.g(t,[o[2],o[19]]),(e,t)=>e.g(t,[o[2],o[20]]),(e,t)=>e.g(t,[o[2],o[21]]),(e,t)=>e.g(t,[o[2],o[22]]),(e,t)=>e.g(t,[o[2],o[23]]),(e,t)=>e.g(t,[o[2],o[24]]),(e,t)=>e.g(t,[o[2],o[9]]),(e,t)=>e.g(t,[o[26],o[25]]),(e,t)=>e.g(t,[o[2],o[27]]),(e,t)=>e.g(t,[o[2],o[13]]),(e,t)=>e.g(t,[o[2],o[28]])===o[29]?o[30]+(e.g(t,[o[2],o[13]])!==o[31]?o[32]:o[6])+o[33]+(e.g(t,[o[2],o[34]])===o[35]?o[35]:o[6]):o[30]+(e.g(t,[o[2],o[13]])!==o[31]?o[32]:o[6])+o[36],function(e,t,o,i,n,s){return e.g(this,[s])},(e,t)=>e.g(t,[o[2],o[38]])],i:[[[13]],[[16,19],[21]]]})}(W,"undefined"==typeof Controls_icon?null:Controls_icon,"undefined"==typeof Controls_heading?null:Controls_heading,"undefined"==typeof Controls_Container_Async?null:Controls_Container_Async),ce=function(e,t,o,i,n,s){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=(0,s.useAdaptiveMode)().device.isPhone();return(0,o.jsx)("div",{className:"controls-ConfirmationDialog__message\n            "+(e.hasDetails?"controls-ConfirmationDialog__message_withDetails":""),"data-qa":"controls-ConfirmationDialog__message",children:(0,o.jsx)("div",{className:"controls-ConfirmationDialog__message-centered"+(t?" controls-padding_bottom-2xs":""),children:(()=>{if(e.hasMarkup)return(0,o.jsx)(n.default,{content:e.content});else return"string"==typeof e.content||i.isValidElement(e.content)?e.content:(0,o.jsx)(e.content,{...e.messageOptions,messageOptions:e.messageOptions})})()})})},t}(0,{},e,t,N,g),_e=function(e,t,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n="controls-DialogTemplate__margin-right-";class s extends o.Control{constructor(){super(...arguments),this._template=i}_headingMousedownHandler(e){e.nativeEvent.processed=!0}_getBackgroundClass(){return"default"===this._options.headerBackgroundStyle?"controls-DialogTemplate_backgroundStyle-default":"controls-background-"+this._options.headerBackgroundStyle}_applyButtonClickHandler(e){if(this._options.applyButtonCallback)this._options.applyButtonCallback(e)}_getIconClass(){if(!this._options.headerContentTemplate)return n+"auto";else return n+"default"}_getCaptionClass(){if(this._options.headerIcon)return n+"st";else if(!this._options.headerContentTemplate)return n+"auto";return n+"default"}close(){this._notify("close",[],{bubbling:!0})}}return t.default=s,t}(0,{},m,te,"undefined"==typeof css_Controls_popupTemplate||css_Controls_popupTemplate),pe=_e,ue=function(e,t,o,i,n,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationWithoutWrapper=void 0;class l extends o.Control{constructor(){super(...arguments),this._template=i,this._wasDragged=!1}_beforeMount(e){var t;if(this._useOldGradient=n.detection.chrome&&n.detection.chromeVersion<=110||n.detection.isIE||n.detection.IOSVersion&&n.detection.IOSVersion<17||n.detection.safariVersion&&n.detection.safariVersion<17,this._backgroundStyle=l._prepareBackgroundStyle(e),void 0!==e.borderStyle)s.Logger.warn(`${this._moduleName}: Используется устаревшая опция borderStyle, нужно использовать backgroundStyle`,this);this._isAdaptive=null===(t=e.adaptiveMode)||void 0===t?void 0:t.device.isPhone()}_beforeUpdate(e){this._backgroundStyle=l._prepareBackgroundStyle(e)}_closeClick(e){e.stopPropagation(),this._notify("close",[])}_touchMoveHandler(e){e.preventDefault()}_onDragEnd(){this._notify("popupDragEnd",[],{bubbling:!0})}_onDragMove(e,t){this._wasDragged=!0,this._notify("popupDragStart",[t.offset],{bubbling:!0})}_onClick(e){if(this._wasDragged)e.preventDefault(),e.stopPropagation()}_onMouseDown(e){if(this._wasDragged=!1,this._needStartDrag(e))this._children.dragNDrop.startDragNDrop(null,e)}_needStartDrag(e){const{target:t}=e;
9return!(e.nativeEvent.processed||t.closest(".no-draggable")||t.closest(".controls-CloseButton__close")||t.closest(".controls-BaseButton"))}_getShadowClass(){if("none"!==this._backgroundStyle)return"controls-Notification__shadow"}static _prepareBackgroundStyle(e){switch(e.style||e.borderStyle||e.backgroundStyle){case"warning":return"warning";case"success":return"success";case"danger":return"danger";case"none":return"none";default:return"secondary"}}static getDefaultOptions(){return{backgroundStyle:"secondary",closeButtonVisible:!0,closeButtonViewMode:"linkButton"}}}return t.NotificationWithoutWrapper=l,t.default=(0,r.withAdaptiveMode)(l),t}(0,{},m,oe,y,c,g,"undefined"==typeof css_Controls_popupTemplate||css_Controls_popupTemplate),me=ue,he=function(e,t,o,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends o.Control{constructor(){super(...arguments),this._template=i,this._processingLoaders=[]}_beforeMount(e){if(e.prefetchResult)this._processPreloadResult(e.pageId,e.prefetchResult)}_beforeUpdate(e){if(e.prefetchResult&&this._options.prefetchResult!==e.prefetchResult)this._cancelCurrentLoading(),this._prefetchData=null,this._processPreloadResult(e.pageId,e.prefetchResult)}_beforeUnmount(){this._cancelCurrentLoading()}_preloadItemsByKeysHandler(t,o){const i={},s=o.map((t=>new Promise(((t,o)=>{e(["Controls/dataSource"],t,o)})).then((({PageController:e})=>e.getPageConfig(t).then((o=>e.loadData(o,this._options.pageTemplateOptions).then((e=>{i[t]=e})).catch((e=>{})))))).catch((function(e){requirejs.onError(e)})))),r=new n.CancelablePromise(Promise.all(s));this._processingLoaders.push(r),r.promise.then((()=>{this._prefetchData={...this._prefetchData,...i},this._processingLoaders.splice(this._processingLoaders.indexOf(r),1)}))}_cancelCurrentLoading(){if(this._processingLoaders)this._processingLoaders.forEach((e=>{e.cancel()})),this._processingLoaders=[]}_processPreloadResult(e,t){if(t instanceof Promise)t.then((t=>{this._prefetchData=this._getPrefetchData(e,t)}));else this._prefetchData=this._getPrefetchData(e,t)}_getPrefetchData(e,t){const o={[e]:t};return Object.keys(t).forEach((e=>{const i=t[e];
9if(i&&i._isAdditionalDependencies)Object.keys(i).forEach((e=>{if("_isAdditionalDependencies"!==e)o[e]=i[e]}))})),o}}return t.default=s,t}(M,{},m,ie,v),ge=he,fe=function(e,t,o,i,n,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class l extends o.Control{constructor(){super(...arguments),this._template=i}_beforeMount(e){if(s.constants.isBrowserPlatform&&this._needRequireModule(e.template))return(0,n.load)(e.template).catch((e=>(0,r.process)({error:e})))}_needRequireModule(e){return"string"==typeof e&&!requirejs.defined(e)}_sendResult(e){this._notify("sendResult",[e],{bubbling:!0})}_getTemplateName(){if("string"==typeof this._options.template)return this._options.template;else return""}}return t.default=l,t}(0,{},m,ne,s,y,S,"undefined"==typeof Controls_Container_Async||Controls_Container_Async),ve=fe,Ce=function(e,t,o,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends i.ResizingBase{constructor(){super(...arguments),this._template=o,this._styleArea={}}_onDragHandler(e,t){this.drag(t.offset),t.entity.offset=this._offset(t.offset)}_getEntityOffset(e){return{x:e.entity.offset.x.value,y:e.entity.offset.y.value}}_clearStyleArea(){this._styleArea={}}_getMinMaxOffsetValue(e,t){if(e>0)return Math.min(e,t[0]);else return-Math.min(Math.abs(e),t[1])}drag(e){const t=this._offset(e);let o,i,n=t.x.value,s=t.y.value;if(s=this._getMinMaxOffsetValue(s,[this._options.maxHeightOffset,this._options.minHeightOffset]),n=this._getMinMaxOffsetValue(n,[this._options.maxWidthOffset,this._options.minWidthOffset]),this._options.position.includes("top"))e.y=-1*s;else e.y=s;if(this._options.position.includes("left"))e.x=-1*n;else e.x=n;if(n>0){if(o=`width: calc( 100% + ${n}px); height: ${Math.abs(s)}px;`+t.y.style,this._options.position.includes("left"))o+=`left: -${n}px`}else o=`width: 100%; height: ${Math.abs(s)}px;`+t.y.style;if(s>0)i=`height: 100%; width: ${Math.abs(n)}px;`+t.x.style;else if(i=`height: calc( 100% + ${s}px); width: ${Math.abs(n)}px;`+t.x.style,this._options.position.includes("top"))i+=`top: ${-1*s}px`;this._styleArea={horizontalStyle:o,verticalStyle:i}}_getOffset(e,t){if(this._options.position.includes("top"))t*=-1;if(this._options.position.includes("left"))e*=-1;return{xValue:e-e%this._options.step,yValue:t-t%this._options.step}}_offsetValue(e,t){const{minOffset:o,maxOffset:i}=this._getMinMaxOffset(t[0]);if(e>0)if(this._options.position.includes(t[0]))return{style:`${t[1]}: 100%;${t[0]}: auto;`,value:-Math.min(-e,Math.abs(o))};else return{style:`${t[0]}: 100%;${t[1]}: auto;`,value:Math.min(e,Math.abs(i))};if(e<0)if(this._options.position.includes(t[0]))return{style:`${t[0]}: 0;${t[1]}: auto;`,value:Math.min(e,Math.abs(i))};else return{style:`${t[1]}: 0; ${t[0]}: auto;`,value:-Math.min(-e,Math.abs(o))};return{style:"",value:0}}_getMinMaxOffset(e){const{maxWidthOffset:t=this._options.maxOffset,maxHeightOffset:o=this._options.maxOffset,minWidthOffset:i=this._options.minOffset,minHeightOffset:n=this._options.minOffset}=this._options;if(["left","right"].includes(e))return{maxOffset:t,minOffset:i};else return{maxOffset:o,minOffset:n}}_offset(e){const{xValue:t,yValue:o}=this._getOffset(e.x,e.y);return{x:this._offsetValue(t,["left","right"]),y:this._offsetValue(o,["top","bottom"])}}}return s.defaultProps={...i.ResizingBase.getDefaultOptions(),position:n.IResizingArrowPosition.RIGHT_BOTTOM,step:1,borderRadius:"s",minWidthOffset:1e3,maxWidthOffset:1e3,minHeightOffset:1e3,maxHeightOffset:1e3},t.default=s,t}(0,{},se,w,J,"undefined"==typeof css_Controls_dragnDrop||css_Controls_dragnDrop,"undefined"==typeof css_Controls_popupTemplate||css_Controls_popupTemplate),be=Ce,ye=function(e,t,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends o.Control{constructor(){super(...arguments),this._template=i}changeMaximizedState(){this._notify("maximized",[])}_applyButtonClickHandler(e){if(this._options.applyButtonCallback)this._options.applyButtonCallback(e)}close(){this._notify("close",[],{bubbling:!0})}}return t.default=n,t}(0,{},m,re,"undefined"==typeof css_Controls_popupTemplate||css_Controls_popupTemplate),Te=function(e,t,o,i,n){"use strict";
9Object.defineProperty(t,"__esModule",{value:!0});class s extends o.Control{constructor(){super(...arguments),this._template=i,this._isOutsidePanel=!0}_beforeMount(e){if(this._rightBottomTemplate=n.Controller.getRightPanelBottomTemplate(),this._visible=n.Controller.getRightPanelBottomTemplateVisible(),!n.Controller.hasRightPanel()&&e.toolbarContentTemplate)this._isOutsidePanel=!1}_maximizeButtonClickHandler(){if(this._options.maximizeButtonClickCallback)this._options.maximizeButtonClickCallback()}_close(){this._notify("close",[],{bubbling:!0})}}return t.default=s,t}(0,{},m,le,A,"undefined"==typeof css_Controls_popupTemplate||css_Controls_popupTemplate),xe=function(e,t,o,i,n,s,r,l,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const d={icon:"icon-CollapseExpand",iconStyle:"secondary",tooltip:a("Свернуть/Развернуть"),title:a("Свернуть/Развернуть"),showType:1,id:"stackToggleButton"},c=(0,l.lazy)((()=>(0,l.importer)("Controls/toolbars:View")));return t.default=(0,i.forwardRef)((function(e,t){const l=(0,i.useContext)(r.Context),a=(t,o)=>{var i,r;if(!(null==l?void 0:l.maximizeButtonVisible)||!1===e.maximizeButtonVisible)return t;if(!t)return new s.RecordSet({rawData:[{...d,showType:null!==(i=e.maximizeButtonShowType)&&void 0!==i?i:d.showType}]});let a=t;if(o)a=t.clone();const c=new n.Record({rawData:{...d,showType:null!==(r=e.maximizeButtonShowType)&&void 0!==r?r:d.showType}});return a.add(c,0),a},_=(0,i.useMemo)((()=>a(e.items,!0)),[e.items]),p=(0,i.useCallback)(((t,o,i)=>{var n;if(o.get("id")===d.id)l.maximized();else null===(n=e.onItemClick)||void 0===n||n.call(e,t,o,i)}),[]),u=(0,i.useCallback)((e=>a(e,!1)),[]);return(0,o.jsx)(c,{ref:t,...e,className:e.className,onItemClick:p,direction:"vertical",fontColorStyle:"secondary",items:_,menuLoadCallback:u})})),t}(0,{},e,t,v,C,L,h,o),Se=xe,we=function(e,t,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends o.Control{constructor(){super(...arguments),this._template=i}close(){this._notify("close",[])}}return t.default=n,t}(0,{},m,de,"undefined"==typeof css_Controls_popupTemplate||css_Controls_popupTemplate),Pe=function(e,t,o,i,n,s){"use strict";function r(){return o.Controller.hasRightPanel()?54:0}function l(e,t,o){const i=o||e.popupOptions.maxWidth||t;if(e.popupOptions.minWidth)if(e.popupOptions.minWidth>a||i<a)return(e.popupOptions.minWidth+i)/2;else return a;return 0}Object.defineProperty(t,"__esModule",{value:!0}),t.getMiddleWidth=t.getMaximizedState=t.MIN_MAXIMIZED_WIDTH=t.RIGHT_PANEL_WIDTH=t.ACCORDION_WIDTH=t.BASE_WIDTHS_POPUP=t.BASE_WIDTH_SIZES=t.initializationPopupConstants=t.initializationConstants=t.getPopupWidth=t.getRightPanelWidth=void 0;t.RIGHT_PANEL_WIDTH=54;t.ACCORDION_WIDTH=54;const a=899;t.MIN_MAXIMIZED_WIDTH=a;t.BASE_WIDTH_SIZES=["a","b","c","d","e","f","g","h"],t.getPopupWidth=function(e){return new Promise((t=>{if(e)(0,i.getSettings)([e]).then((o=>{t(o&&o[e])}));else t()}))},t.getRightPanelWidth=r,t.initializationConstants=function(){const e=`controls-StackTemplate__themeConstants controls_popupTemplate_theme-${o.Controller.getTheme()}`;return(0,n.default)(e,{a:"margin-right",b:"margin-left",c:"margin-bottom",d:"margin-top",e:"padding-top",f:"padding-right",g:"padding-bottom",h:"padding-left"}).then((e=>e))};const d=["a","b","c","d","e","f","g","h","i","j","k","l","m"];return t.BASE_WIDTHS_POPUP=d,t.initializationPopupConstants=function(){const e={};d.forEach((t=>{e[t]=`--content_width_${t}_dialog`}));const t=`controls_popupTemplate_theme-${o.Controller.getTheme()}`;return(0,n.default)(t,e).then((e=>e))},t.getMiddleWidth=l,t.getMaximizedState=function(e,t=!0,o){if(s.constants.isServerSide){const{width:t}=e.popupOptions;return t-l(e,e.popupOptions.maxWidth,o)>0}return function(e,t,o){if(!e.popupOptions.minimizedWidth&&e.popupOptions.minWidth&&e.popupOptions.maxWidth){const i=l(e,t,o);let n=e.popupOptions.width;if(t&&n>t&&e.popupOptions.minWidth<=a)n=t;return n-i>0}return e.popupOptions.templateOptions.maximized}(e,function(e,t=!0){if(!t)return document.body.clientWidth-r()}(0,t),o)},t}(0,{},A,k,Y,y),Oe=Pe,ke=function(e,t,o,i,n,s,r,l,a,d,c,_){"use strict";
9Object.defineProperty(t,"__esModule",{value:!0});const p=i.forwardRef((function({type:e="yesno",markerStyle:t="default",primaryAction:p="yes",yesCaption:u=_("Да"),noCaption:m=_("Нет"),cancelCaption:h=_("Отмена"),okCaption:g=_("ОК"),...f},v){var C;const b={type:e,markerStyle:t,primaryAction:p,yesCaption:u,noCaption:m,cancelCaption:h,okCaption:g,...f},[y,T]=i.useState(!1),x=i.useRef(void 0);i.useEffect((()=>{if(void 0!==b.style)n.Logger.warn("Controls.popup:Confirmation: Используется устаревшая опция style, нужно использовать markerStyle",this);if(void 0!==b.borderStyle)n.Logger.warn("Controls.popup:Confirmation: Используется устаревшая опция borderStyle,  нужно использовать markerStyle",this);return()=>{var e;if(!x.current)null===(e=b.closeHandler)||void 0===e||e.call(b)}}),[]);const S=e=>{if(b.onSendResult)b.onSendResult(e);if(b.closeHandler)x.current=e,b.closeHandler(e);if(b.onClose)b.onClose()},w=e=>{S(e)},P=()=>{if(O())n.Logger.warn("Confirmation: В тексте сообщения присутствует ссылка. Рекомендуем делать вывод html-теговчерез задание шаблона.",this);return b.message},O=()=>{const e=b.message;return"string"==typeof e&&e.indexOf("<a")>-1&&e.indexOf("</a>")>-1},k=()=>{if("no"===p)S(!1);else S(!0)};return(0,o.jsx)(d.Template,{ref:v,onKeyDown:e=>{if(e.nativeEvent.keyCode===s.constants.key.esc)T(!0);if(!e.nativeEvent.altKey&&!e.nativeEvent.shiftKey&&(e.nativeEvent.ctrlKey||e.nativeEvent.metaKey)&&e.nativeEvent.keyCode===s.constants.key.enter)e.stopPropagation(),k()},onClose:b.onClose,onResult:b.onResult,onKeyUp:e=>{if(y)if(T(!1),e.nativeEvent.keyCode===s.constants.key.esc)S(void 0),e.stopPropagation()},className:(null===(C=b.attrs)||void 0===C?void 0:C.className)||b.className,theme:(0,c.useTheme)(b),markerStyle:t,borderStyle:b.style||b.borderStyle,closeButtonVisible:b.closeButtonVisible,width:b.width,size:(()=>{if(b.size)return b.size;if((b.message&&b.message.length)>100||(b.details&&b.details.length)>160)return"l";else return"m"})(),bodyContentTemplate:(0,o.jsx)(r.default,{message:P(),messageOptions:b.messageOptions,messageTemplate:l.default,messageContentTemplate:b.messageContentTemplate,hasMarkup:O(),details:b.details,detailsOptions:b.detailsOptions,detailsTemplate:a.default,detailsContentTemplate:b.detailsContentTemplate}),footerContentTemplate:(0,o.jsx)(d.Footer,{type:e,buttons:b.buttons,yesCaption:u,noCaption:m,cancelCaption:h,okCaption:g,markerStyle:b.style||b.borderStyle||t,primaryAction:p,onResult:w})})}));return t.default=p,t}(0,{},e,t,d,y,I,ce,E,D,u,o),We=ke,Me=function(e,t,o,i,n,s,r,l,a,d,c,_,p,u,m,h,g,f,v,C){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const b=(0,l.lazy)((()=>(0,l.importer)("Controls/extButtons:CloseButton")));return t.default=(0,i.forwardRef)((function(e,t){var y,T,x,S;const w=(0,i.useContext)((0,C.getWasabyContext)()),P={headingFontSize:"4xl",headingFontColorStyle:"default",closeButtonVisible:!0,closeButtonViewMode:"functionalButton",headerBorderVisible:!0,...e,backgroundStyle:null!==(y=e.backgroundStyle)&&void 0!==y?y:"default",footerBackgroundStyle:null!==(T=e.footerBackgroundStyle)&&void 0!==T?T:"default",rightBorderVisible:null!==(x=e.rightBorderVisible)&&void 0!==x?x:!0},O={...P};delete O.attrs,delete O.className,delete O.style,delete O["data-qa"],delete O.$wasabyRef,delete O.forwardedRef;const k=(0,i.useRef)(),W=(0,i.useContext)(d.Context),[M,z]=(0,i.useState)(),A=(0,f.useTheme)(e.theme),B=(0,i.useRef)(),D=(0,i.useRef)();(0,i.useEffect)((()=>{var t,o,i,s;const r=new n.ResizeObserverUtil(null,(()=>{z(I())}));if(e.onLeftContentVisibleChanged&&e.leftContentTemplate&&!K&&B.current)z(I()),r.observe(B.current);return null===(s=null===(o=null===(t=d.Controller.getController())||void 0===t?void 0:t.find(e.popupId))||void 0===o?void 0:(i=o.controller).updateElementsVisibility)||void 0===s||s.call(i),()=>{r.terminate()}}),[]),(0,i.useImperativeHandle)(t,(()=>({close:Q,toggleMaximizeState:Y})),[]),(0,i.useEffect)((()=>{var t,o,i,n,s;if(k.current){const r=null===(t=d.Controller.getController())||void 0===t?void 0:t.find(e.popupId);if(r){if(null===(i=(o=r.controller).onTemplateUpdated)||void 0===i?void 0:i.call(o,r,null===(n=k.current)||void 0===n?void 0:n.closest(".controls-Popup")))null===(s=d.Controller.getController())||void 0===s||s.update(r.id,r.popupOptions)}}}),[e]);const I=()=>
9{if(!e.leftContentTemplate)return!1;if(!e.onLeftContentVisibleChanged)return!0;if(!(null==W?void 0:W.isPopup)){const t=null==W?void 0:W.getLeftContentVisible();if(D.current!==t)if(D.current=t,e.onLeftContentVisibleChanged)e.onLeftContentVisibleChanged(t);return t}if(B.current){const t=h.DimensionsMeasurer.getBoundingClientRect(B.current),o=Math.ceil(t.left)>=48&&!!t.width;if(D.current!==o)if(D.current=o,e.onLeftContentVisibleChanged)e.onLeftContentVisibleChanged(o);return o}},E=(0,i.useMemo)((()=>{if(!e.isCompoundTemplate&&!e.isPopup)return d.Controller.getAccordionTemplate()}),[]),N=(0,i.useMemo)((()=>d.Controller.hasRightPanel()||!!e.toolbarContentTemplate),[e.toolbarContentTemplate]),R=(0,i.useMemo)((()=>d.Controller.getRightPanelBottomTemplate()),[]),H=(0,a.useAdaptiveMode)().device.isPhone(),L=(0,a.useAdaptiveMode)().device.isTablet(),V=(0,i.useMemo)((()=>{if(!H)return;let t=e.width||e.minWidth||e.maxWidth||700;if(e.maxWidth)t=Math.min(e.maxWidth,t);if(e.minWidth)t=Math.max(e.minWidth,t);if(!_.constants.isServerSide)return Math.max(t,document.body.clientWidth);else return t}),[e.width,e.minWidth,e.maxWidth,null===(S=null===document||void 0===document?void 0:document.body)||void 0===S?void 0:S.clientWidth]),K=(0,i.useMemo)((()=>{var t;return(null!==(t=e.allowAdaptive)&&void 0!==t?t:!1!==w.isAdaptive)&&H&&d.Controller.getIsAdaptive()}),[]),j=(0,i.useMemo)((()=>{var e,t;const o={height:"100%",position:"bottom",desktopMode:"stack"};if(null===(e=o.adaptiveOptions)||void 0===e?void 0:e.viewMode)o.desktopMode=(0,c.default)(null===(t=o.adaptiveOptions)||void 0===t?void 0:t.viewMode,"stack");return o}),[]),F=(0,i.useMemo)((()=>"default"===P.backgroundStyle?"controls-StackTemplate_backgroundColor":"controls-background-"+P.backgroundStyle),[e.backgroundStyle]),U=(0,i.useMemo)((()=>"default"===P.footerBackgroundStyle?"controls-StackTemplate__bottomArea-backgroundColor":"controls-background-"+P.footerBackgroundStyle),[e.footerBackgroundStyle]),$=(0,i.useCallback)((()=>{var e;const t=null===(e=k.current)||void 0===e?void 0:e.closest(".controls-Popup");return t?t.getAttribute("templateName"):""}),[]),G=(0,i.useMemo)((()=>{var e;return!!E||(null!==(e=P.closeButtonVisible)&&void 0!==e?e:!0)}),[E,P.closeButtonVisible]),q=(0,i.useMemo)((()=>`${g("Свернуть","окно")}/${g("Развернуть","окно")}`),[]),Z=(0,i.useMemo)((()=>{if(e.maxWidth-e.minWidth<100||H)return!1;else return!L||(null==W?void 0:W.isPopup)}),[e.maxWidth,e.minWidth]),X=(0,i.useMemo)((()=>!!e.maximizeButtonVisibility&&Z),[Z,e.maximizeButtonVisibility]),Y=(0,i.useCallback)((e=>{null==W||W.maximized(e)}),[]),Q=(0,i.useCallback)((()=>{null==W||W.close()}),[]),J=(0,i.useCallback)((()=>{if(e.isCompatiblePopup)e.onClose();else null==W||W.close()}),[]),ee=(0,i.useMemo)((()=>{const e={...P};return delete e.attrs,delete e.className,delete e.style,e}),[e]),te=(0,i.useMemo)((()=>(0,l.lazy)((()=>(0,l.importer)(R)))),[]),oe=(0,i.useMemo)((()=>(0,l.lazy)((()=>(0,l.importer)("Controls/popupSliding:Template")))),[]),ie=(0,i.useMemo)((()=>(0,l.lazy)((()=>(0,l.importer)(E)))),[]),ne=(0,i.useMemo)((()=>{if(!e.bodyContentTemplate)return null;if(!e.bodyContentTemplate.props)return(0,o.jsx)(e.bodyContentTemplate,{...O,onClose:e.onClose,hasRightTemplate:N,leftContentTemplateVisible:I(),bodyContentTemplate:null,headerContentTemplate:null,footerContentTemplate:null});const t=(0,s.isReactElement)(e.bodyContentTemplate)?{}:{...O,onClose:e.onClose,hasRightTemplate:N,leftContentTemplateVisible:I(),bodyContentTemplate:null,headerContentTemplate:null,footerContentTemplate:null};return(0,i.cloneElement)(e.bodyContentTemplate,t)}),[e]),se=(0,i.useMemo)((()=>{if(!e.footerContentTemplate)return null;if(!e.footerContentTemplate.props)return(0,o.jsx)(e.footerContentTemplate,{...O,hasRightTemplate:N,leftContentTemplateVisible:I(),bodyContentTemplate:null,headerContentTemplate:null,footerContentTemplate:null});const t=(0,s.isReactElement)(e.footerContentTemplate)?{}:{...O,hasRightTemplate:N,leftContentTemplateVisible:I(),bodyContentTemplate:null,headerContentTemplate:null,footerContentTemplate:null};return(0,i.cloneElement)(e.footerContentTemplate,t)}),[e]),re=(0,i.useMemo)((()=>
9{if(!e.leftContentTemplate)return null;if(!e.leftContentTemplate.props)return(0,o.jsx)(e.leftContentTemplate,{...O,leftContentTemplateVisible:I(),bodyContentTemplate:null,headerContentTemplate:null,footerContentTemplate:null});const t=(0,s.isReactElement)(e.leftContentTemplate)?{}:{...O,hasRightTemplate:N,leftContentTemplateVisible:I(),bodyContentTemplate:null,headerContentTemplate:null,footerContentTemplate:null};return(0,i.cloneElement)(e.leftContentTemplate,t)}),[e]),le=e.onLeftContentVisibleChanged&&(null===document||void 0===document?void 0:document.body.clientWidth),ae=(0,i.useMemo)((()=>(0,o.jsxs)(o.Fragment,{children:[(e.leftContentTemplate||E)&&!K?(0,o.jsx)("div",{className:"controls-StackTemplate__leftArea",children:(0,o.jsxs)("div",{className:"controls-StackTemplate__leftArea-wrapper "+(!I()?"controls-StackTemplate__leftArea-wrapper_hidden":""),ref:B,children:[E?(0,o.jsx)(ie,{theme:A}):null,e.leftContentTemplate?re:null]})}):null,(0,o.jsxs)("div",{ref:k,className:`controls-StackTemplate-content_wrapper ${e.isTablet?"controls-StackTemplate-content_wrapper_zIndex":""} ${F}`,style:{width:`${V}px`},children:[N?(0,o.jsx)(p.default,{...O,getTemplateName:$,rightBorderVisible:P.rightBorderVisible,closeButtonVisible:G,maximizeButtonVisibility:X,maximizeButtonTitle:q,maximizeButtonClickCallback:Y,bodyContentTemplate:null,headerContentTemplate:null,footerContentTemplate:null}):null,(0,o.jsxs)("div",{className:"controls-StackTemplate-content hint-HelpMainLayout_workspace",children:[(0,o.jsx)("div",{className:"controls-StackTemplate__header__fakeRightTemplate",children:R&&!N?(0,o.jsx)(te,{...e.rightPanelOptions,isCompatiblePopup:e.isCompatiblePopup,getTemplateName:$,stack:!0}):null}),e.caption||e.headingCaption||e.topArea||e.headerContentTemplate||e.applyButtonVisible?(0,o.jsx)(u.default,{...O,stackOptions:ee,_maximizeButtonTitle:q,changeMaximizedState:Y,hasRightPanel:N,_maximizeButtonVisibility:X,leftContentTemplateVisible:I()}):!N?(0,o.jsxs)("div",{className:"controls-StackTemplate__command_buttons_without_head",children:[X?(0,o.jsx)("div",{className:"controls-StackTemplate__maximized_button tw-flex tw-items-center tw-justify-center controls-margin_right-m controls-icon_size-s controls-icon_style-secondary icon-CollapseExpand","data-qa":"controls-StackTemplate__maximized_button",onClick:Y,title:q}):null,G?(0,o.jsx)(b,{offset:"offset",className:"controls-StackTemplate__close_button",dataQa:"controls-stack-Button__close",dataName:"controls-stack-Button__close",viewMode:P.closeButtonViewMode,onClick:J}):null]}):null,e.bodyContentTemplate?(0,o.jsx)("div",{className:`controls-StackTemplate__content-area ${F}`,children:ne}):null,e.footerContentTemplate?(0,o.jsx)("div",{className:`controls-StackTemplate__bottomArea ${U}`,children:se}):null]})]})]})),[X,q,e,A,le,M,V]),de=(0,i.useMemo)((()=>(0,r.clsx)(`${e.className||""}`,{"controls-StackTemplate__with-right-panel":N})),[e.className]);if(K)return(0,o.jsx)(oe,{slidingPanelOptions:j,...P,className:de,ref:t,closeButtonVisible:G});else return(0,o.jsx)(v.default,{maximizeButtonVisible:Z,children:(0,o.jsx)(m.default,{...P,ref:t,className:de,children:H?(0,o.jsx)("div",{className:`controls-StackTemplate__wrapper ${F}`,children:ae}):ae})})})),t}(0,{},e,t,T,r,i,h,g,A,G,y,Te,ye,R,T,o,u,L,a),ze=function(e,t,o,i,n,s,r,l,a,d,c,_,p,u,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let h={};class g extends o.Control{constructor(){super(...arguments),this["[Controls/_interface/IPropStorage]"]=!0,this._moduleName="Controls/popupTemplate:StackPageWrapper",this._template=i,this._maximized=!1,this._sizesClass="",this._resizeObserverInitialized=!1,this._wasResized=!1,this._leftContentTemplateWidth=0}_beforeMount(e,t,o){var i,l,a,d;const c={notifyHandler:(e,t)=>this._notify(e,t,{bubbling:!0})};this._pendingController=new u.PendingClass(c),this._isTablet=null===(i=e.adaptiveMode)||void 0===i?void 0:i.device.isTablet(),this._maximizeHandler=this._maximizeHandler.bind(this),this._resizeWindow=this._resizeWindow.bind(this),this._registerPendingHandler=this._registerPendingHandler.bind(this),this._cancelFinishingPendingHandler=this._cancelFinishingPendingHandler.bind(this),this._finishPendingOperationsHandler=this._finishPendingOperationsHandler.bind(this),this._closeStackWrapper=this._closeStackWrapper.bind(this),this._getLeftContentVisible=this._getLeftContentVisible.bind(this),this._debounceSaveWorkSpaceWidth=(0,p.debounce)(this._saveWorkSpaceWidth,150),this._leftContentTemplateWidth=e.leftContentTemplateWidth||0;
9const m=this._validateWidth(e,e.width||(null==o?void 0:o.width));if(this._resizeRegister=new r.RegisterClass({register:"controlResize"}),"number"==typeof m)this._setSavedSizes(e.minSavedWidth,e.maxSavedWidth);else this._calcSizesClass(e),this._setSavedSizes(null==o?void 0:o.minSavedWidth,null==o?void 0:o.maxSavedWidth);if(!this._sizesClass){this._setWorkSpaceWidth(m,!0,e.adaptiveMode,e.minWidth);const t=null===(l=(0,_.getSettingsSync)())||void 0===l?void 0:l[e.propStorageId];if(null==t?void 0:t.bodyWidth){if(this._workspaceWidth=Math.min(this._workspaceWidth,t.bodyWidth-2*this._leftContentTemplateWidth-(s.Controller.getAccordionTemplate()?2*n.ACCORDION_WIDTH:0)),e.minWidth)this._workspaceWidth=Math.max(this._workspaceWidth,e.minWidth+n.RIGHT_PANEL_WIDTH);this._templateWorkSpaceWidth=this._workspaceWidth-n.RIGHT_PANEL_WIDTH}if(this._leftContentTemplateWidth)this._updateWidthWithLeftContentWidth(e);if(this._setLeftContentTemplateVisible(null===(d=null===(a=e.adaptiveMode)||void 0===a?void 0:a.width)||void 0===d?void 0:d.value),this._updateOffset(e.minWidth,e.maxWidth,e.adaptiveMode),!this._minOffset&&!this._maxOffset)this._minOffset=Math.max(this._minOffset,1);this._updateProperties(e.propStorageId,e.adaptiveMode,e.minWidth,e.maxWidth,e.width)}if(!o&&e.propStorageId&&!m)return new Promise((t=>{(0,n.getPopupWidth)(e.propStorageId).then((o=>{let i=o;if(o){if("number"==typeof o)i={width:o};if(!this._sizesClass){if(void 0!==i.width||this._workspaceWidth)this._setWorkSpaceWidth(i.width,!0,e.adaptiveMode);this._setSavedSizes(i.minSavedWidth,i.maxSavedWidth),this._updateOffset(e.minWidth,e.maxWidth,e.adaptiveMode)}}if(!this._sizesClass)this._updateProperties(e.propStorageId,e.adaptiveMode,e.minWidth,e.maxWidth,e.width),this._maximized=this._getMaximizeState(e);this._maximized=this._getMaximizeState(e),t(i)}))}));else this._maximized=this._getMaximizeState(e)}_afterMount(){this._resizeObserver=new a.ResizeObserverUtil(this,this._resizeObserverCallback.bind(this)),this._resizeObserver.observe(this._container),window.addEventListener("resize",this._resizeWindow)}_beforeUnmount(){window.removeEventListener("resize",this._resizeWindow)}async _getStackController(){if(this._stackController)return this._stackController;const t=await new Promise(((t,o)=>{e(["Controls/popupTemplateStrategy"],t,o)}));return this._stackController=t.StackController,t.StackController}_resizeObserverCallback(e){let t=e[0].contentRect.width;if(!this._options.adaptiveMode.device.isPhone())t-=n.RIGHT_PANEL_WIDTH;if(this._templateWorkSpaceWidth=t,this._maximized=this._getMaximizeState(this._options),!this._resizeObserverInitialized)this._resizeObserverInitialized=!0;else this._wasResized=!0}_resizeWindow(){const e=this._container.getBoundingClientRect(),t=this._workspaceWidth;if(this._templateWorkSpaceWidth=e.width,!this._options.adaptiveMode.device.isPhone())this._templateWorkSpaceWidth-=n.RIGHT_PANEL_WIDTH;if(s.Controller.getAccordionTemplate()||this._leftContentTemplateWidth){this._workspaceWidth=Math.min(this._workspaceWidth,document.body.clientWidth-2*this._leftContentTemplateWidth-(s.Controller.getAccordionTemplate()?2*n.ACCORDION_WIDTH:0));const e=this._isLiteralWidth(this._options.minWidth)?this._getNumberWidth(this._options.minWidth):this._options.minWidth;if(e)if(e+n.RIGHT_PANEL_WIDTH>this._workspaceWidth)this._workspaceWidth=e+n.RIGHT_PANEL_WIDTH}if(t!==this._workspaceWidth)this._debounceSaveWorkSpaceWidth();this._wasResized=!0,this._updateOffset(),this._maximized=this._getMaximizeState(this._options),this._setLeftContentTemplateVisible(document.body.offsetWidth)}_componentDidMount(e){if(this._sizesClass||"string"==typeof e.minWidth||"string"==typeof e.maxWidth)(0,n.initializationConstants)().then((t=>{this._sizesClass="",h=t;const o=this._isLiteralWidth(e.width)?this._getNumberWidth(e.width):e.width,i=this._isLiteralWidth(e.minWidth)?this._getNumberWidth(e.minWidth):e.minWidth,n=this._isLiteralWidth(e.maxWidth)?this._getNumberWidth(e.maxWidth):e.maxWidth;if(!this._workspaceWidth)this._setWorkSpaceWidth(o||n||i,!0,this._options.adaptiveMode,i);this._updateOffset(i,n),this._updateProperties(e.propStorageId,e.adaptiveMode,i,n,o)}));this._updateWidthWithLeftContentWidth(e)}
9_afterRender(){if(this._offsetChanged)this._offsetChanged=!1,this._notify("controlResize",[],{bubbling:!0}),this._notify("workspaceResize",[this._workspaceWidth],{bubbling:!0}),this._resizeRegister.start(new l.SyntheticEvent({}))}_beforeUpdate(e){if(this._options.width!==e.width||this._options.minWidth!==e.minWidth||this._options.maxWidth!==e.maxWidth||this._isTablet){const t=this._validateWidth(e,e.width);this._setWorkSpaceWidth(t,!0,e.adaptiveMode),this._updateOffset(e.minWidth,e.maxWidth),this._updateProperties(e.propStorageId,e.adaptiveMode,e.minWidth,e.maxWidth)}}_updateWidthWithLeftContentWidth(e){if(this._leftContentTemplateWidth||s.Controller.getAccordionTemplate()){const{maxWidth:t}=this._getMaxAndMinWidth(e),o=this._workspaceWidth;if(this._workspaceWidth=Math.min(this._workspaceWidth,t),this._updateProperties(e.propStorageId,e.adaptiveMode,e.minWidth,e.maxWidth),this._updateOffset(e.minWidth,e.maxWidth,e.adaptiveMode),o!==this._workspaceWidth&&!m.constants.isServerSide){const t={width:this._templateWorkSpaceWidth,minSavedWidth:this._minSavedWidth,maxSavedWidth:this._maxSavedWidth};if(e.propStorageId)(0,_.setSettings)({[e.propStorageId]:t})}}}_getLeftContentVisible(e=this._options.adaptiveMode){var t;const o=this._leftContentTemplateWidth;if(!e.device.isPhone()&&this._container)this._leftContentTemplateWidth=(null===(t=this._container.querySelector(".controls-StackTemplate__leftArea-wrapper"))||void 0===t?void 0:t.offsetWidth)-(s.Controller.getAccordionTemplate()?n.ACCORDION_WIDTH:0)||0;if(this._options.leftContentTemplateWidth&&!this._wasResized&&(o===this._options.leftContentTemplateWidth||o===this._leftContentTemplateWidth))return this._leftContentTemplateVisible;if(this._wasResized=!0,!this._leftContentTemplateWidth)return!0;if(m.constants.isServerSide)return this._leftContentTemplateVisible;else return document.body.offsetWidth>=this._workspaceWidth+2*this._leftContentTemplateWidth}_getContentStyle(e){var t,o;if(null==e?void 0:e.device.isPhone())return"width:calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right))";let i=this._minWidth;if(!(null===(t=null==e?void 0:e.device)||void 0===t?void 0:t.isPhone()))i+=n.RIGHT_PANEL_WIDTH;const s=`min-width: ${i}px; max-width: ${this._workspaceWidth}px;`;if(this._isTablet&&this._workspaceWidth===(null===(o=null==e?void 0:e.width)||void 0===o?void 0:o.value))return"width:100vw;";if(this._isTablet||!this._sizesClass)return"width:100vw;"+s;else return s}_getResizeDirection(e){if("rtl"===d.controller.currentLocaleConfig.directionality)if("reverse"===e)return"direct";else return"reverse";return e}
9_isLiteralWidth(e){return n.BASE_WIDTH_SIZES.includes(e)}_getNumberWidth(e){return h[e]}_calcSizesClass(e){if(this._isLiteralWidth(e.width))this._sizesClass+=`controls-PageTemplate_content_width_${e.width}`;if(this._isLiteralWidth(e.minWidth))this._sizesClass+=` controls-PageTemplate_content_minWidth_${e.minWidth}`;if(this._isLiteralWidth(e.maxWidth))this._sizesClass+=` controls-PageTemplate_content_maxWidth_${e.maxWidth}`}_registerHandler(e,t,o,i,n){this._resizeRegister.register(e,t,o,i,n)}_unregisterHandler(e,t,o,i){this._resizeRegister.unregister(e,t,o,i)}async _onKeyDownHandler(e){var t,o;if(e.nativeEvent.ctrlKey&&e.nativeEvent.altKey&&"KeyR"===e.nativeEvent.code){if(this._options.propStorageId){if(await s.Confirmation.openPopup({message:"Вы уверены, что хотите сбросить сохраненную ширину карточки?",type:"yesno"},this._container))(0,_.setSettings)({[this._options.propStorageId]:{bodyWidth:document.body.clientWidth}}),null===(o=(t=this._options).onBeforeResetSizes)||void 0===o||o.call(t),setTimeout((()=>{window.location.reload()}),1e3)}e.preventDefault(),e.stopPropagation()}}_dragMoveHandler(e,t,o){const i=-o.offset.x;if("right"===t)this._children.leftResizingLine.fakeDrag(i);else this._children.rightResizingLine.fakeDrag(i)}_offsetHandler(e,t){this._getStackController().then((e=>{var o,i;const n=2*t,s=Math.min(this._workspaceWidth,document.body.clientWidth)+n,r=this._generateControllerItem();e.popupMovingSize(r,{x:n}),this._minSavedWidth=r.minSavedWidth,this._maxSavedWidth=r.maxSavedWidth,this._setWorkSpaceWidth(s,!1,this._options.adaptiveMode),this._setLeftContentTemplateVisible(null===(i=null===(o=this._options.adaptiveMode)||void 0===o?void 0:o.width)||void 0===i?void 0:i.value),this._notify("offsetChanged",[n]),this._updateOffset(),this._maximized=this._getMaximizeState(this._options),this._offsetChanged=!0}))}_setLeftContentTemplateVisible(e){if(this._leftContentTemplateWidth&&e)this._leftContentTemplateVisible=e>=this._workspaceWidth+2*this._leftContentTemplateWidth;else this._leftContentTemplateVisible=!1}_maximizeHandler(){this._getStackController().then((e=>{const t=this._generateControllerItem();e.elementMaximized(t,!1,null,!1),this._offsetChanged=!0,this._setWorkSpaceWidth(t.popupOptions.width,!0,this._options.adaptiveMode),this._updateOffset(),this._maximized=this._getMaximizeState(this._options)}))}_getMaximizeState(e){const t=this._generateControllerItem(e),o=this._isLiteralWidth(e.maxWidth)?this._getNumberWidth(e.maxWidth):e.maxWidth;return(0,n.getMaximizedState)(t,!1,o)}_generateControllerItem(e=this._options){const t=this._getMaxAndMinWidth(e,!1),o=t.minWidth;let i=t.maxWidth;if(!m.constants.isServerSide)i=Math.min(i,document.body.clientWidth-2*this._leftContentTemplateWidth-(s.Controller.getAccordionTemplate()?2*n.ACCORDION_WIDTH:0)-n.RIGHT_PANEL_WIDTH);return i=Math.max(o,i),{minSavedWidth:this._minSavedWidth,maxSavedWidth:this._maxSavedWidth,popupOptions:{minWidth:this._isLiteralWidth(e.minWidth)?h[e.minWidth]:e.minWidth,maxWidth:i||(this._isLiteralWidth(e.maxWidth)?h[e.maxWidth]:e.maxWidth),width:this._templateWorkSpaceWidth,propStorageId:e.propStorageId,templateOptions:{}},position:{}}}_updateProperties(e,t,o,i,s){if(this._canResize=g._canResize(e,t,this._workspaceWidth,o,i),this._minWidth=o,!t.device.isPhone())this._minWidth=Math.min(o,this._workspaceWidth-n.RIGHT_PANEL_WIDTH);if(this._workspaceWidth&&!o&&!i||this._workspaceWidth&&o&&this._workspaceWidth<o)this._minWidth=s}_updateOffset(e=this._options.minWidth,t=this._options.maxWidth,o=this._options.adaptiveMode){if(this._isLiteralWidth(e))e=this._getNumberWidth(e);if(this._isLiteralWidth(t))t=this._getNumberWidth(t);t=Math.min(null===document||void 0===document?void 0:document.body.offsetWidth,t+n.RIGHT_PANEL_WIDTH);const i=((null===document||void 0===document?void 0:document.body.offsetWidth)-this._workspaceWidth)/2-(this._getLeftContentVisible(o)?this._leftContentTemplateWidth:0)-(s.Controller.getAccordionTemplate()?n.ACCORDION_WIDTH:0);if(t+2*((this._getLeftContentVisible(o)?this._leftContentTemplateWidth:0)+(s.Controller.getAccordionTemplate()?n.ACCORDION_WIDTH:0))>(null===document||void 0===document?void 0:document.body.offsetWidth))this._maxOffset=Math.max(i,0);else this._maxOffset=(t-this._workspaceWidth)/2;this._minOffset=Math.max(this._workspaceWidth-(e+n.RIGHT_PANEL_WIDTH),0)/2}_getMaxAndMinWidth(e=this._options,t=!0){var o,i;
9const s=this._isLiteralWidth(e.maxWidth)?this._getNumberWidth(e.maxWidth):e.maxWidth,r=this._isLiteralWidth(e.minWidth)?this._getNumberWidth(e.minWidth):e.minWidth;let l=s||(null===document||void 0===document?void 0:document.body.offsetWidth);if(!e.adaptiveMode.device.isPhone()&&t)l+=n.RIGHT_PANEL_WIDTH;if(l=Math.min((null===(i=null===(o=e.adaptiveMode)||void 0===o?void 0:o.width)||void 0===i?void 0:i.value)-2*this._leftContentTemplateWidth,l),r)l=Math.max(r+n.RIGHT_PANEL_WIDTH,l);return{maxWidth:l,minWidth:r}}_validateWidth(e,t){if(t<e.minWidth)t=e.minWidth;if(t>e.maxWidth)t=e.maxWidth;return t||e.minWidth||e.maxWidth}_setWorkSpaceWidth(e,t=!0,o,i=this._options.minWidth){let s=this._isTablet?o.width.value:e;if(!t||this._isTablet)s-=n.RIGHT_PANEL_WIDTH;const r="number"==typeof i?i:this._minWidth;if(s&&r)s=Math.max(s,r);if(this._workspaceWidth=s?s:void 0,!o.device.isPhone()&&this._workspaceWidth)this._workspaceWidth+=n.RIGHT_PANEL_WIDTH;this._templateWorkSpaceWidth=s}_saveWorkSpaceWidth(){const e={width:this._templateWorkSpaceWidth,minSavedWidth:this._minSavedWidth,maxSavedWidth:this._maxSavedWidth};(0,_.setSettings)({[this._options.propStorageId]:e})}_setSavedSizes(e,t){this._maxSavedWidth=t,this._minSavedWidth=e}static _canResize(e,t,o,i,n){return!!(e&&o&&i&&n&&n!==i&&!(null==t?void 0:t.device.isTablet()))}_close(){this._closeStackWrapper().then((()=>{var e,t;null===(t=null===(e=this._options._stackPageWrapperContext)||void 0===e?void 0:e.close)||void 0===t||t.call(e)}))}_closeStackWrapper(){if(this._pendingController.hasPendings())return this._pendingController.finishPendingOperations(void 0,"stackPageWrapper");else return Promise.resolve(!0)}_registerPendingEventHandler(e){const t=this._prepareEventArs(e,arguments);return this._registerPendingHandler(...t)}_registerPendingHandler(...e){const t=e[1]||{};return t.root="stackPageWrapper",this._pendingController.registerPending(e[0],t)}_finishPendingOperationsEventHandler(e){const t=this._prepareEventArs(e,arguments);return this._finishPendingOperationsHandler(...t)}_finishPendingOperationsHandler(...e){return e[1]=e[1]||"stackPageWrapper",this._pendingController.finishPendingOperations(...e)}_cancelFinishingPendingEventHandler(e){const t=this._prepareEventArs(e,arguments);return this._cancelFinishingPendingHandler(...t)}_cancelFinishingPendingHandler(...e){return e[0]=e[0]||"stackPageWrapper",this._pendingController.cancelFinishingPending(...e)}_prepareEventArs(e,t){return null==e||e.stopPropagation(),Array.prototype.slice.call(t,1)}}return t.default=(0,c.withAdaptiveMode)(g),t}(M,{},m,ae,Pe,A,x,p,T,b,g,k,f,O,y),Ae=function(e){"use strict";function t(){return this}var o="undefined"==typeof window,i=["_getIcon","_iconStyle","_getTextLines","_mousedownHandler","closeButtonVisible","_options","closeButtonViewMode","style","borderStyle","backgroundStyle","mousedown","index","element"];return e.g({v:1,m:"wml!Controls/_popupTemplate/Notification/Template/Simple/Simple",d:e.d(["Controls/_popupTemplate/Notification/Template/Base"],arguments,1),t:[e.c(((e,n)=>[e.g(n,"div",{K:"0_0_",A:{class:"controls-Notification__simpleTemplate"},E:o?{}:{"on:mousedown":[{value:i[3],originalName:i[10],viewController:n.v}],meta:{isControl:!1,context:t,handler:e.M(n,3)}},r:!0},[e.g(n,"div",{K:"0_0_0_",A:{class:e.e(e.x(n,4))+" controls-Notification__simpleTemplate-icon controls-Notification__simpleTemplate-icon-size controls-icon_style-"+e.e(e.x(n,5))}}),e.g(n,"div",{K:"0_0_1_",A:{class:"controls-Notification__simpleTemplate-message"}},[e.h(n,0,["element","index"],6,((e,t)=>[e.m(t,7)?[e.g(t,"br",{K:"0_0_"})]:e.t(),e.t(e.e(e.x(t,8)),"1_")]))])])]),"bodyContentTemplate"),e.r(((e,t)=>[e.C(t,"ws:Controls/_popupTemplate/Notification/Template/Base",{K:"0_",O:{esc:!1,closeButtonVisible:e.m(t,0),closeButtonViewMode:e.m(t,1),backgroundStyle:e.m(t,2),bodyContentTemplate:e.o(t,0,0)},m:"attribute",c:!0})]))],p:i.slice(0,4),e:[(e,t)=>e.g(t,[i[5],i[4]]),(e,t)=>e.g(t,[i[5],i[6]]),(e,t)=>e.g(t,[i[5],i[7]])||e.g(t,[i[5],i[8]])||e.g(t,[i[5],i[9]]),function(e,t,o,i,n,s){return e.g(this,[s])},(e,t,o)=>e.c(o,t,[i[0]]),(e,t)=>e.g(t,[i[1]]),(e,t,o)=>
9e.c(o,t,[i[2]]),(e,t)=>0!==e.g(t,[i[11]]),(e,t)=>e.g(t,[i[12]])],i:[[[4,6]]]})}(W,ue),Be=function(e,t,o,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends o.Control{constructor(){super(...arguments),this._template=i}_beforeMount(e){if(this._iconStyle=s._prepareIconStyle(e),void 0!==e.style)n.Logger.warn(`${this._moduleName}: Используется устаревшая опция style, нужно использовать backgroundStyle`,this);if(void 0!==e.borderStyle)n.Logger.warn(`${this._moduleName}: Используется устаревшая опция borderStyle, нужно использовать backgroundStyle`,this)}_beforeUpdate(e){this._iconStyle=s._prepareIconStyle(e)}_mousedownHandler(e){e.nativeEvent.processed=!0}_getTextLines(){var e,t;return(null===(t=null===(e=this._options)||void 0===e?void 0:e.text)||void 0===t?void 0:t.split("\n"))||[]}_getIcon(){if(this._options.icon)return this._options.icon;switch(this._iconStyle){case"warning":case"danger":return"icon-Alert";case"success":return"icon-Yes"}}static _prepareIconStyle(e){switch(e.style||e.borderStyle||e.backgroundStyle){case"warning":return"warning";case"success":return"success";case"danger":return"danger";default:return"secondary"}}static getDefaultOptions(){return{backgroundStyle:"secondary",closeButtonVisible:!0}}}return t.default=s,t}(0,{},m,Ae,c,"undefined"==typeof css_Controls_popupTemplate||css_Controls_popupTemplate,"undefined"==typeof css_Controls_CommonClasses||css_Controls_CommonClasses),De=Be,Ie=function(e){"use strict";function t(){return this}var o=["_isAdaptive","_getSlidingCloseButtonVisible","_slidingPanelOptions","_onDragMove","_onDragEnd","_getRoundedClass","_onMouseDown","_onMouseUp","_dragState","close","_getBackgroundColor","_onResizingOffset","_minWidthOffset","_maxWidthOffset","_minHeightOffset","_maxHeightOffset","_dragMoveHandler","resolvedTemplate","content","_options","dragMove","documentDragEnd","theme","maximize","controls-PopupTemplate__roundBorder controls_border-radius-","borderRadius","draggable","ws-window-draggable","data-name","headingCaption","headerContentTemplate","header"," tw-cursor-move","mousedown","mouseup","touchstart","closeButtonVisible","closeButtonSize","closeButtonViewMode","external","_headerSize-","headerSize","_closeButtonSize-","click","toolButton","null","bodyContentTemplate","body","contentAreaOptions","footerContentTemplate","footerBorderVisible","controls-DialogTemplate__footer-area-border","backgroundStyle","controls-DialogTemplate__footerBackgroundColor","controls-background-","controls-PopupTemplate__roundBorder_bottom controls_border-radius-","resizable","position","resizingOptions","right","all","offset","step","bottom","left-right","left"];return e.g({v:1,m:"wml!Controls/_popupTemplate/Dialog/Template/Dialog",d:e.d(["Controls/Container/Async","Controls/dragnDrop","Controls/_popupTemplate/Dialog/Template/Header","Controls/_popupTemplate/ResizingArrow"],arguments,1),t:[e.c(((e,t)=>[e.P(t,e.m(t,1),{K:"0_0_0_0_",O:e.s(t,{footerVisibility:!0,closeButtonVisible:e.m(t,3),slidingPanelOptions:e.m(t,4)},e.m(t,2)),g:!0,m:"attribute",i:0})])),e.c(((e,i)=>[e.P(i,e.m(i,1),{K:"1_0_0_0_1_0_0_0_0_0_",A:{class:"controls-DialogTemplate__close_button controls-DialogTemplate__close_button_size-"+e.e(e.m(i,16))+" controls-DialogTemplate__close_"+e.e(e.m(i,17))+" controls-DialogTemplate__close_"+e.e(e.m(i,17))+e.e(e.m(i,18))},E:{"on:click":[{value:o[9],originalName:o[43],viewController:i.v}],meta:{isControl:!1,context:t,handler:e.M(i,5)}}
9,O:{offset:e.m(i,19),name:"closeButton",size:e.m(i,16),viewMode:e.m(i,17)},g:!0,m:"attribute"})])),e.c(((e,i)=>[e.g(i,"div",{K:"1_0_0_0_",A:{class:"controls_popupTemplate_theme-"+e.e(e.x(i,6))+" controls-DialogTemplate "+e.e(e.x(i,7))+" "+e.e(e.x(i,8))+" "+e.e(e.x(i,9)),"ws-tab-cycling":"true","data-name":e.e(e.x(i,10))},r:!0},[e.m(i,11)?[e.C(i,"ws:Controls/_popupTemplate/Dialog/Template/Header",{K:"1_0_0_0_0_0_",A:{class:e.e(e.m(i,12))+e.e(e.m(i,13))},E:{"on:mousedown":[{value:o[6],originalName:o[33],viewController:i.v}],"on:mouseup":[{value:o[7],originalName:o[34],viewController:i.v}],"on:touchstart":[{value:o[6],originalName:o[35],viewController:i.v}],meta:{isControl:!0,context:t,handler:e.M(i,5)}},O:e.s(i,{dragState:e.m(i,14)},e.m(i,2)),i:0})]:[e.g(i,"div",{K:"1_0_0_0_1_0_",A:{class:"controls-DialogTemplate__close-button_without_head"}},[e.m(i,15)?[e.C(i,"ws:Controls/Container/Async",{K:"1_0_0_0_1_0_0_0_",O:{esc:!1,templateName:"Controls/extButtons:CloseButton",content:e.o(i,1,2)}})]:e.t()])],e.m(i,20)?[e.g(i,"div",{K:"1_0_0_0_2_0_",A:{class:"controls-DialogTemplate__content-area "+e.e(e.x(i,7))+" "+e.e(e.x(i,21))}},[e.P(i,e.m(i,20),{K:"1_0_0_0_2_0_0_",O:e.S(i,{bodyContentTemplate:null,headerContentTemplate:null,footerContentTemplate:null},e.m(i,22)),m:"none",i:3})])]:e.t(),e.m(i,23)?[e.P(i,e.m(i,23),{K:"1_0_0_0_3_0_",A:{class:"controls-DialogTemplate__footer "+e.e(e.m(i,24))+" "+e.e(e.m(i,25))+" "+e.e(e.m(i,26))},m:"none"})]:e.t(),e.m(i,27)?[e.m(i,28)?[e.C(i,{library:"Controls/dragnDrop",module:["ResizingLine"]},{K:"1_0_0_0_4_0_0_",A:{class:"controls-DialogTemplate__resizingLine-right"},E:{"on:offset":[{value:o[11],originalName:o[61],viewController:i.v}],meta:{isControl:!1,context:t,handler:e.M(i,5)}}
9,O:{minOffset:e.m(i,29),maxOffset:e.m(i,30),direction:"direct",position:"right",orientation:"horizontal",step:e.m(i,31)}})]:e.t(),e.m(i,32)?[e.C(i,{library:"Controls/dragnDrop",module:["ResizingLine"]},{K:"1_0_0_0_4_1_0_",A:{class:"controls-DialogTemplate__resizingLine-bottom"},E:{"on:offset":[{value:o[11],originalName:o[61],viewController:i.v}],meta:{isControl:!1,context:t,handler:e.M(i,5)}},O:{minOffset:e.m(i,33),maxOffset:e.m(i,34),direction:"direct",position:"bottom",orientation:"vertical",step:e.m(i,31)}})]:e.t(),e.m(i,35)?[e.C(i,{library:"Controls/dragnDrop",module:["ResizingLine"]},{K:"1_0_0_0_4_2_0_",A:{class:"controls-DialogTemplate__resizingLine-left"},E:{"on:dragmove":[{value:o[16],originalName:o[20],viewController:i.v,args:[o[65]]}],"on:offset":[{value:o[11],originalName:o[61],viewController:i.v}],meta:{isControl:!1,context:t,handler:e.M(i,5)}},O:{name:"leftResizingLine",minOffset:e.m(i,29),maxOffset:e.m(i,30),direction:"reverse",position:e.m(i,36),orientation:"horizontal",step:e.m(i,31)}}),e.C(i,{library:"Controls/dragnDrop",module:["ResizingLine"]},{K:"1_0_0_0_4_2_1_",A:{class:"controls-DialogTemplate__resizingLine-right"},E:{"on:dragmove":[{value:o[16],originalName:o[20],viewController:i.v,args:[o[59]]}],"on:offset":[{value:o[11],originalName:o[61],viewController:i.v}],meta:{isControl:!1,context:t,handler:e.M(i,5)}}
9,O:{name:"rightResizingLine",minOffset:e.m(i,29),maxOffset:e.m(i,30),direction:"direct",position:e.m(i,36),orientation:"horizontal",step:e.m(i,31)}})]:[e.m(i,37)?[e.C(i,"ws:Controls/_popupTemplate/ResizingArrow",{K:"1_0_0_0_4_3_0_0_",A:{class:"controls-DialogTemplate__resizingArrow"},E:{"on:offset":[{value:o[11],originalName:o[61],viewController:i.v}],meta:{isControl:!0,context:t,handler:e.M(i,5)}},O:{minWidthOffset:e.m(i,29),maxWidthOffset:e.m(i,30),minHeightOffset:e.m(i,33),maxHeightOffset:e.m(i,34),borderRadius:e.m(i,38),position:"right-bottom",step:e.m(i,31)}})]:[e.C(i,"ws:Controls/_popupTemplate/ResizingArrow",{K:"1_0_0_0_4_3_1_0_",A:{class:"controls-DialogTemplate__resizingArrow"},E:{"on:offset":[{value:o[11],originalName:o[61],viewController:i.v}],meta:{isControl:!0,context:t,handler:e.M(i,5)}},O:{minWidthOffset:e.m(i,29),maxWidthOffset:e.m(i,30),minHeightOffset:e.m(i,33),maxHeightOffset:e.m(i,34),borderRadius:e.m(i,38),position:e.m(i,36),step:e.m(i,31)}})]]]:e.t()])])),e.r(((e,i)=>[e.m(i,0)?[e.C(i,"ws:Controls/Container/Async",{K:"0_0_",O:{esc:!1,templateName:"Controls/popupSliding:Template",content:e.o(i,0,1)},m:"attribute",c:!0})]:[e.C(i,{library:"Controls/dragnDrop",module:["Container"]},{K:"1_0_",E:{"on:dragmove":[{value:o[3],originalName:o[20],viewController:i.v}],"on:documentdragend":[{value:o[4],originalName:o[21],viewController:i.v}],meta:{isControl:!1,context:t,handler:e.M(i,5)}}
9,O:{esc:!1,name:"dragNDrop",content:e.o(i,2,4)},m:"attribute",c:!0})]]))],p:o.slice(0,17),e:[(e,t)=>e.g(t,[o[0]]),(e,t)=>e.g(t,[o[18],o[17]]),(e,t)=>e.g(t,[o[19]]),(e,t,i)=>e.c(i,t,[o[1]]),(e,t)=>e.g(t,[o[2]]),function(e,t,o,i,n,s){return e.g(this,[s])},(e,t)=>e.g(t,[o[19],o[22]]),(e,t,i)=>e.c(i,t,[o[10]]),(e,t)=>!e.g(t,[o[19],o[23]])?o[24]+e.g(t,[o[19],o[25]]):"",(e,t)=>e.g(t,[o[19],o[26]])?o[27]:"",(e,t)=>e.g(t,[o[19],o[28]]),(e,t)=>e.g(t,[o[19],o[29]])||e.g(t,[o[19],o[30]]),(e,t,i)=>e.c(i,t,[o[5]],[e.g(t,[o[19]]),o[31]]),(e,t)=>e.g(t,[o[19],o[26]])?o[32]:"",(e,t)=>e.g(t,[o[8]]),(e,t)=>e.g(t,[o[19],o[36]]),(e,t)=>e.g(t,[o[19],o[37]]),(e,t)=>e.g(t,[o[19],o[38]]),(e,t)=>e.g(t,[o[19],o[38]])===o[39]?o[40]+e.g(t,[o[19],o[41]])+o[42]+e.g(t,[o[19],o[37]]):"",(e,t)=>e.g(t,[o[19],o[38]])!==o[44]?o[45]:"",(e,t)=>e.g(t,[o[19],o[46]]),(e,t,i)=>e.c(i,t,[o[5]],[e.g(t,[o[19]]),o[47]]),(e,t)=>e.g(t,[o[19],o[48]]),(e,t)=>e.g(t,[o[19],o[49]]),(e,t)=>e.g(t,[o[19],o[50]])?o[51]:"",(e,t)=>!e.g(t,[o[19],o[52]])?o[53]:o[54]+e.g(t,[o[19],o[52]]),(e,t)=>!e.g(t,[o[19],o[23]])?o[55]+e.g(t,[o[19],o[25]]):"",(e,t)=>e.g(t,[o[19],o[56]]),(e,t)=>e.g(t,[o[19],o[58],o[57]])===o[59]||e.g(t,[o[19],o[58],o[57]])===o[60],(e,t)=>e.g(t,[o[12]]),(e,t)=>e.g(t,[o[13]]),(e,t)=>e.g(t,[o[19],o[58],o[62]]),(e,t)=>e.g(t,[o[19],o[58],o[57]])===o[63]||e.g(t,[o[19],o[58],o[57]])===o[60],(e,t)=>e.g(t,[o[14]]),(e,t)=>e.g(t,[o[15]]),(e,t)=>e.g(t,[o[19],o[58],o[57]])===o[64],(e,t)=>e.g(t,[o[19],o[58],o[57]]),(e,t)=>e.g(t,[o[19],o[58],o[57]])===o[60],(e,t)=>e.g(t,[o[19],o[25]])],i:[[[2]],[[1,4]],[[1],[16,19]],[[22]],[[2],[6,38]]]})}(W,"undefined"==typeof Controls_Container_Async?null:Controls_Container_Async,w,_e,Ce),Ee=function(e){"use strict";function t(){return this}var o=["_arrowSide","_arrowPosition","_close","_onResizingOffset","_minWidthOffset","_maxWidthOffset","_minHeightOffset","_maxHeightOffset","_isResized","_isVisible","_getBackgroundStyle","_borderStyle","_horizontalDirection","theme","_options","tw-invisible","controls-InfoBoxTemplate__content-maxWidth","borderRadius","backgroundStyle","arrowVisible"," controls-InfoBoxTemplate__line_withArrow","content","closeButtonVisible","resolvedTemplate","click","resizable","position","resizingOptions","right","left","bottom","offset","reverse","direct","vertical","horizontal","step"];return e.g({v:1,m:"wml!Controls/_popupTemplate/InfoBox/Template/InfoBox",d:e.d(["Controls/Container/Async","Controls/dragnDrop","Controls/_popupTemplate/ResizingArrow"],arguments,1),t:[e.c(((e,i)=>[e.P(i,e.m(i,13),{K:"0_0_2_0_0_0_0_",A:{class:"controls-InfoBoxTemplate__closeButton"},E:{"on:click":[{value:o[2],originalName:o[24],viewController:i.v}],meta:{isControl:!1,context:t,handler:e.M(i,14)}},O:{viewMode:"link",offset:"null"},g:!0,m:"attribute"})])),e.r(((e,i)=>[e.g(i,"div",{K:"0_",A:{class:"controls_popupTemplate_theme-"+e.e(e.x(i,0))+" "+e.e(e.x(i,1))+" controls-InfoBoxTemplate controls-InfoBoxTemplate__arrow-side-position-"+e.e(e.x(i,2))+" controls-InfoBoxTemplate__arrow-side-"+e.e(e.x(i,3))+" "+e.e(e.x(i,4))+" controls-InfoBoxTemplate__borderGradientStyle-"+e.e(e.x(i,5))+" controls-InfoBoxTemplate_horizontal-direction-"+e.e(e.x(i,6))},r:!0,c:!0},[e.g(i,"div",{K:"0_0_",A:{class:"controls-InfoBoxTemplate__backgroundGradientPosition-"+e.e(e.x(i,2))+"-"+e.e(e.x(i,3))+" controls-InfoBoxTemplate__content "+e.e(e.x(i,7))+" controls_border-radius-"+e.e(e.x(i,8))+" controls-InfoBoxTemplate__borderGradientPosition-"+e.e(e.x(i,2))+"-"+e.e(e.x(i,3))+" controls-InfoBoxTemplate__backgroundStyle-"+e.e(e.x(i,9))}},[e.g(i,"div",{K:"0_0_0_",A:{class:"controls-InfoBoxTemplate__line"+e.e(e.x(i,10))+" controls-InfoBoxTemplate__line-arrowSide-"+e.e(e.x(i,2))+" controls-InfoBoxTemplate__line-arrowPosition-"+e.e(e.x(i,3))+" controls-InfoBoxTemplate__arrowBackgroundStyle-"+e.e(e.x(i,9))}}),e.m(i,11)?[e.P(i,e.m(i,11),{K:"0_0_1_0_",A:{class:"controls-InfoBoxTemplate__content-area controls_border-radius-"+e.e(e.m(i,8))},m:"none"})]:e.t(),e.m(i,12)?[e.g(i,"div",{K:"0_0_2_0_",A:{"ws-no-focus":"true"}},[e.C(i,"ws:Controls/Container/Async",{K:"0_0_2_0_0_",O:{esc:!1,templateName:"Controls/extButtons:CloseButton",content:e.o(i,0,0)}})])]:e.t(),e.m(i,15)?[e.m(i,16)?[e.C(i,{library:"Controls/dragnDrop",module:["ResizingLine"]},{K:"0_0_3_0_0_",A:{class:"controls-StickyTemplate__resizingLine-"+e.e(e.m(i,17))},E:{"on:offset":[{value:o[3],originalName:o[31],viewController:i.v}],meta:{isControl:!1,context:t,handler:e.M(i,14)}},O:{minOffset:e.m(i,18),maxOffset:e.m(i,19),direction:e.m(i,20),position:e.m(i,17),orientation:e.m(i,21),step:e.m(i,22)}})]:[e.C(i,"ws:Controls/_popupTemplate/ResizingArrow",{K:"0_0_3_1_0_",A:{class:"controls-StickyTemplate__resizingLine"},E:{"on:offset":[{value:o[3],originalName:o[31],viewController:i.v}],meta:{isControl:!0,context:t,handler:e.M(i,14)}},O:{minWidthOffset:e.m(i,18),maxWidthOffset:e.m(i,19),minHeightOffset:e.m(i,23),maxHeightOffset:e.m(i,24),borderRadius:e.m(i,8),position:e.m(i,17),step:e.m(i,22)}})]]:e.t()])])]))],p:o.slice(0,13),e:[(e,t)=>e.g(t,[o[14],o[13]]),(e,t)=>!e.g(t,[o[9]])?o[15]:"",(e,t)=>e.g(t,[o[0]]),(e,t)=>e.g(t,[o[1]]),(e,t,i)=>e.c(i,t,[o[10]]),(e,t)=>e.g(t,[o[11]]),(e,t)=>e.g(t,[o[12]]),(e,t)=>!e.g(t,[o[8]])?o[16]:"",(e,t)=>e.g(t,[o[14],o[17]]),(e,t)=>e.g(t,[o[14],o[18]]),(e,t)=>e.g(t,[o[14],o[19]])?o[20]:"",(e,t)=>e.g(t,[o[14],o[21]]),(e,t)=>e.g(t,[o[14],o[22]]),(e,t)=>e.g(t,[o[21],o[23]]),function(e,t,o,i,n,s){return e.g(this,[s])},(e,t)=>e.g(t,[o[14],o[25]]),(e,t)=>e.g(t,[o[14],o[27],o[26]])===o[28]||e.g(t,[o[14],o[27],o[26]])===o[29]||e.g(t,[o[14],o[27],o[26]])===o[30],(e,t)=>e.g(t,[o[14],o[27],o[26]]),(e,t)=>e.g(t,[o[4]]),(e,t)=>e.g(t,[o[5]]),(e,t)=>e.g(t,[o[14],o[27],o[26]])===o[29]?o[32]:o[33],(e,t)=>e.g(t,[o[14],o[27],o[26]])===o[30]?o[34]:o[35],(e,t)=>e.g(t,[o[14],o[27],o[36]]),(e,t)=>e.g(t,[o[6]]),(e,t)=>e.g(t,[o[7]])],i:[[[13]]]})}
9(W,"undefined"==typeof Controls_Container_Async?null:Controls_Container_Async,w,Ce),Ne=function(e){"use strict";function t(){return this}var o="undefined"==typeof window,i=["_isAdaptive","_slidingPanelOptions","_getSlidingCloseButtonVisible","_onDragMove","_onDragEnd","_getRoundedClass","_proxyEvent","close","_verticalDirection","_closeBtnPosition","_dragging","_getBackgroundColor","_getFooterBackgroundColor","_onResizingOffset","_minWidthOffset","_maxWidthOffset","_dragMoveHandler","_minHeightOffset","_maxHeightOffset","_onMouseDown","_mouseOut","_click","resolvedTemplate","content","_options","data-name","dragMove","documentDragEnd","theme","borderVisible","controls-StickyTemplate__border","roundBorder","controls-PopupTemplate__roundBorder controls_border-radius-","borderRadius","borderStyle","hoverBorderStyle","borderSize","shadowVisible","controls-StickyTemplate-shadow","draggable","ws-window-draggable","mousedown","touchstart","mouseout","click","headingCaption","headerContentTemplate","header"," tw-cursor-move","headerMouseEnter","mouseenter","headerClick","verticalDirection","closeButtonVisible","closeButtonViewMode","link","null","default","controls-StickyTemplate_roundBorder__close_button_position-","controls-StickyTemplate__close_button_position-","external","closeButtonTopSpacing","none","closeButtonOffset","closeButtonSize","bodyContentTemplate","body","footerContentTemplate","footerClick","resizable","position","resizingOptions","right","left","bottom","offset","reverse","direct","vertical","horizontal","step","left-right"];return e.g({v:1,m:"wml!Controls/_popupTemplate/Sticky/Template/Sticky",d:e.d(["Controls/Container/Async","Controls/dragnDrop","Controls/_popupTemplate/Sticky/Template/Header","Controls/_popupTemplate/ResizingArrow"],arguments,1),t:[e.c(((e,t)=>[e.P(t,e.m(t,1),{K:"0_0_0_0_",O:e.s(t,{slidingPanelOptions:e.m(t,2),footerVisibility:!0,closeButtonVisible:e.m(t,4)},e.m(t,3)),g:!0,m:"attribute",i:0})])),e.c(((e,o)=>[e.P(o,e.m(o,1),{K:"1_0_0_0_1_0_0_0_0_",A:{class:"controls-StickyTemplate__close_button "+e.e(e.m(o,23))+e.e(e.m(o,20))+" controls-StickyTemplate__close_button-"+e.e(e.m(o,24))+" controls-StickyTemplate__close_button-"+e.e(e.m(o,25))+"-without-header_top-spacing-"+e.e(e.m(o,26))+" "},E:{"on:click":[{value:i[7],originalName:i[44],viewController:o.v}],meta:{isControl:!1,context:t,handler:e.M(o,6)}},O:{viewMode:e.m(o,24),offset:e.m(o,27),name:"closeButton",size:e.m(o,28)},g:!0,m:"attribute"})])),e.c(((e,n)=>[e.g(n,"div",{K:"1_0_0_0_",A:{class:"controls_popupTemplate_theme-"+e.e(e.x(n,7))+" controls-StickyTemplate "+e.e(e.x(n,8))+" "+e.e(e.x(n,9))+" controls-StickyTemplate-borderStyle-"+e.e(e.x(n,10))+" controls-StickyTemplate-hoverBorderStyle-"+e.e(e.x(n,11))+" controls-StickyTemplate-borderSize-"+e.e(e.x(n,12))+" "+e.e(e.x(n,13))+" "+e.e(e.x(n,14))+" "+e.e(e.x(n,15)),"ws-tab-cycling":"true"},E:o?{}:{"on:mousedown":[{value:i[19],originalName:i[41],viewController:n.v}],"on:touchstart":[{value:i[19],originalName:i[42],viewController:n.v}],"on:mouseout":[{value:i[20],originalName:i[43],viewController:n.v}],"on:click":[{value:i[21],originalName:i[44],viewController:n.v}],meta:{isControl:!1,context:t,handler:e.M(n,6)}},r:!0},[e.m(n,16)?[e.C(n,"ws:Controls/_popupTemplate/Sticky/Template/Header",{K:"1_0_0_0_0_0_",A:{class:e.e(e.m(n,17))+e.e(e.m(n,18))},E:{"on:mouseenter":[{value:i[6],originalName:i[50],viewController:n.v,args:[i[49]]}],"on:click":[{value:i[6],originalName:i[44],viewController:n.v,args:[i[51]]}],"on:close":[{value:i[7],originalName:i[7],viewController:n.v}],meta:{isControl:!0,context:t,handler:e.M(n,6)}},O:e.s(n,{verticalDirection:e.m(n,19),closeBtnPosition:e.m(n,20),closeButtonVisible:e.m(n,21),closeButtonOffset:e.m(n,22),stickyOptions:e.m(n,3)},e.m(n,3)),i:0})]:[e.m(n,21)?[e.C(n,"ws:Controls/Container/Async",{K:"1_0_0_0_1_0_0_",O:{esc:!1,templateName:"Controls/extButtons:CloseButton",content:e.o(n,1,2)}})]:e.t()],e.m(n,29)?[e.g(n,"div",{K:"1_0_0_0_2_0_",A:{class:"controls-StickyTemplate__content-area "+e.e(e.x(n,30))+" "+e.e(e.x(n,15))}},[e.P(n,e.m(n,29),{K:"1_0_0_0_2_0_0_",O:e.s(n,{headerContentTemplate:null,headerBackgroun
9dStyle:null,footerContentTemplate:null,stickyPosition:null,borderStyle:void 0,isDragging:e.m(n,31)},e.m(n,3)),m:"none",i:0})])]:e.t(),e.m(n,32)?[e.P(n,e.m(n,32),{K:"1_0_0_0_3_0_",A:{"data-qa":"controls-StickyTemplate__footer",class:"controls-StickyTemplate__footer controls-PopupTemplate__roundBorder_bottom controls_border-radius-"+e.e(e.m(n,33))+" "+e.e(e.m(n,34))},E:{"on:click":[{value:i[6],originalName:i[44],viewController:n.v,args:[i[68]]}],meta:{isControl:!1,context:t,handler:e.M(n,6)}},O:e.s(n,{headerContentTemplate:null,footerContentTemplate:null},e.m(n,3)),m:"none",i:0})]:e.t(),e.m(n,35)?[e.m(n,36)?[e.C(n,{library:"Controls/dragnDrop",module:["ResizingLine"]},{K:"1_0_0_0_4_0_0_",A:{class:"controls-StickyTemplate__resizing controls-StickyTemplate__resizingLine-"+e.e(e.m(n,37))},E:{"on:offset":[{value:i[13],originalName:i[75],viewController:n.v}],meta:{isControl:!1,context:t,handler:e.M(n,6)}},O:{minOffset:e.m(n,38),maxOffset:e.m(n,39),direction:e.m(n,40),position:e.m(n,37),orientation:e.m(n,41),step:e.m(n,42)}})]:e.t(),e.m(n,43)?[e.C(n,{library:"Controls/dragnDrop",module:["ResizingLine"]},{K:"1_0_0_0_4_1_0_",A:{class:"controls-StickyTemplate__resizing controls-StickyTemplate__resizingLine-left"},E:{"on:dragmove":[{value:i[16],originalName:i[26],viewController:n.v,args:[i[73]]}],"on:offset":[{value:i[13],originalName:i[75],viewController:n.v}],meta:{isControl:!1,context:t,handler:e.M(n,6)}},O:{name:"leftResizingLine",minOffset:e.m(n,38),maxOffset:e.m(n,39),direction:"reverse",position:e.m(n,37),orientation:"horizontal",step:e.m(n,42)}}),e.C(n,{library:"Controls/dragnDrop",module:["ResizingLine"]},{K:"1_0_0_0_4_1_1_",A:{class:"controls-StickyTemplate__resizing controls-StickyTemplate__resizingLine-right"},E:{"on:dragmove":[{value:i[16],originalName:i[26],viewController:n.v,args:[i[72]]}],"on:offset":[{value:i[13],originalName:i[75],viewController:n.v}],meta:{isControl:!1,context:t,handler:e.M(n,6)}},O:{name:"rightResizingLine",minOffset:e.m(n,38),maxOffset:e.m(n,39),direction:"direct",position:e.m(n,37),orientation:"horizontal",step:e.m(n,42)}})]:[e.C(n,"ws:Controls/_popupTemplate/ResizingArrow",{K:"1_0_0_0_4_2_0_",A:{class:"controls-StickyTemplate__resizing controls-StickyTemplate__resizingLine"},E:{"on:offset":[{value:i[13],originalName:i[75],viewController:n.v}],meta:{isControl:!0,context:t,handler:e.M(n,6)}},O:{minWidthOffset:e.m(n,38),maxWidthOffset:e.m(n,39),minHeightOffset:e.m(n,44),maxHeightOffset:e.m(n,45),borderRadius:e.m(n,33),position:e.m(n,37),step:e.m(n,42)}})]]:e.t()])])),e.r(((e,o)=>[e.m(o,0)?[e.C(o,"ws:Controls/Container/Async",{K:"0_0_",O:{esc:!1,templateName:"Controls/popupSliding:Template",content:e.o(o,0,1)},m:"attribute",c:!0})]:[e.C(o,{library:"Controls/dragnDrop",module:["Container"]},{K:"1_0_",A:{"data-name":e.e(e.m(o,5))},E:{"on:dragmove":[{value:i[3],originalName:i[26],viewController:o.v}],"on:documentdragend":[{value:i[4],originalName:i[27],viewController:o.v}],meta:{isControl:!1,context:t,handler:e.M(o,6)}},O:{esc:!1,name:"dragNDrop",content:e.o(o,2,3)},m:"attribute",c:!0})]]))],p:i.slice(0,22),e:[(e,t)=>e.g(t,[i[0]]),(e,t)=>e.g(t,[i[23],i[22]]),(e,t)=>e.g(t,[i[1]]),(e,t)=>e.g(t,[i[24]]),(e,t,o)=>e.c(o,t,[i[2]]),(e,t)=>e.g(t,[i[24],i[25]]),function(e,t,o,i,n,s){return e.g(this,[s])},(e,t)=>e.g(t,[i[24],i[28]]),(e,t)=>e.g(t,[i[24],i[29]])?i[30]:"",(e,t)=>e.g(t,[i[24],i[31]])?i[32]+e.g(t,[i[24],i[33]]):"",(e,t)=>e.g(t,[i[24],i[34]]),(e,t)=>e.g(t,[i[24],i[35]]),(e,t)=>e.g(t,[i[24],i[36]]),(e,t)=>!0===e.g(t,[i[24],i[37]])?i[38]:"",(e,t)=>e.g(t,[i[24],i[39]])?i[40]:"",(e,t,o)=>e.c(o,t,[i[11]]),(e,t)=>e.g(t,[i[24],i[45]])||e.g(t,[i[24],i[46]]),(e,t,o)=>e.c(o,t,[i[5]],[e.g(t,[i[24]]),i[47]]),(e,t)=>e.g(t,[i[24],i[39]])?i[48]:"",(e,t)=>e.g(t,[i[24],i[52]])||e.g(t,[i[8]]),(e,t)=>e.g(t,[i[9]]),(e,t)=>e.g(t,[i[24],i[53]]),(e,t)=>e.g(t,[i[24],i[54]])===i[55]?i[56]:void 0,(e,t)=>!1!==e.g(t,[i[24],i[31]])&&e.g(t,[i[9]])===i[57]?i[58]:i[59],(e,t)=>e.g(t,[i[24],i[54]]),(e,t)=>e.g(t,[i[24],i[54]])!==i[55]?i[60]:i[57],(e,t)=>e.g(t,[i[24],i[61]])===i[62]?i[62]:i[57],(e,t)=>e.g(t,[i[24],i[63]]),(e,t)=>e.g(t,[i[24],i[64]]),(e,t)=>e.g(t,[i[24],i[65]]),(e,t,o)=>e.c(o,t,[i[5]],[e.g(t,[i[24]]),i[66]]),(e,t)=>e.g(t,[i[10]]),(e,t)=>e.g(t,[i[24],i[67]]),(e,t)=>e.g(t,[i[24],i[33]]),(e,t,o)=>e.c(o,t,[i[12]]),(e,t)=>e.g(t,[i[24],i[69]]),(e,t)=>e.g(t,[i[24],i[71],i[70]])===i[72]||e.g(t,[i[24],i[71],i[70]])===i[73]||e.g(t,[i[24],i[71],i[70]])===i[74],(e,t)=>e.g(t,[i[24],i[71],i[70]]),(e,t)=>e.g(t,[i[14]]),(e,t)=>e.g(t,[i[15]]),(e,t)=>e.g(t,[i[24],i[71],i[70]])===i[73]?i[76]:i[77],(e,t)=>e.g(t,[i[24],i[71],i[70]])===i[74]?i[78]:i[79],(e,t)=>e.g(t,[i[24],i[71],i[80]]),(e,t)=>e.g(t,[i[24],i[71],i[70]])===i[81],(e,t)=>e.g(t,[i[17]]),(e,t)=>e.g(t,[i[18]])],i:[[[3]],[[1,4]],[[1],[20],[23,28]],[[3],[7,45]]]})}
9(W,"undefined"==typeof Controls_Container_Async?null:Controls_Container_Async,w,we,Ce),Re=function(e,t,o,i,n,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class l extends o.Control{constructor(){super(...arguments),this._template=i,this._isResized=!1,this._isVisible=!1}_beforeMount(e){var t,o;if(!(null===(t=e.stickyPosition.position)||void 0===t?void 0:t.left)&&!(null===(o=e.stickyPosition.position)||void 0===o?void 0:o.right))this._isVisible=!0;if(this._updateOffset(e),this._setPositionSide(e.stickyPosition),this._borderStyle=l._setBorderStyle(e.style||e.borderStyle,e.validationStatus),void 0!==e.style)n.Logger.warn(`${this._moduleName}: Используется устаревшая опция style, нужно использовать borderStyle`,this)}_beforeUpdate(e){this._isVisible=!0,this._updateOffset(e),this._setPositionSide(e.stickyPosition),this._borderStyle=l._setBorderStyle(e.style||e.borderStyle,e.validationStatus)}_setPositionSide(e){const{direction:t}=e;if("left"===t.horizontal&&"left"===e.targetPoint.horizontal)this._arrowSide="right",this._arrowPosition=l._getArrowPosition(t.vertical);else if("right"===t.horizontal&&"right"===e.targetPoint.horizontal)this._arrowSide="left",this._arrowPosition=l._getArrowPosition(t.vertical);else if("top"===t.vertical&&"top"===e.targetPoint.vertical)this._arrowSide="bottom",this._arrowPosition=l._getArrowPosition(t.horizontal);else if("bottom"===t.vertical&&"bottom"===e.targetPoint.vertical)this._arrowSide="top",this._arrowPosition=l._getArrowPosition(t.horizontal);else this._arrowSide="bottom"===t.vertical?"top":"bottom",this._arrowPosition=l._getArrowPosition(t.horizontal);this._horizontalDirection=t.horizontal||"right"}_close(){this._notify("close",[],{bubbling:!0})}_getBackgroundStyle(){let e=this._options.backgroundStyle;if("invalid"===this._borderStyle||"invalidAccent"===this._borderStyle)e="danger";return` controls-InfoBoxTemplate__backgroundGradientStyle-${e}`}_onResizingOffset(e,t,o){this._isResized=!0,this._notify("popupMovingSize",[t,o],{bubbling:!0})}_updateOffset(e){var t,o,i,n,s,l,a,d,c,_,p,u;if(e.stickyPosition)this._maxWidthOffset=Math.max(((null===(t=e.stickyPosition.position)||void 0===t?void 0:t.maxWidth)||r.DEFAULT_MIN_OFFSET_WIDTH)-((null===(o=e.stickyPosition.position)||void 0===o?void 0:o.width)||(null===(i=e.stickyPosition.sizes)||void 0===i?void 0:i.width)||r.DEFAULT_MIN_OFFSET_WIDTH),0),this._minWidthOffset=Math.max(((null===(n=e.stickyPosition.position)||void 0===n?void 0:n.width)||(null===(s=e.stickyPosition.sizes)||void 0===s?void 0:s.width)||r.DEFAULT_MIN_OFFSET_WIDTH)-((null===(l=e.stickyPosition.position)||void 0===l?void 0:l.minWidth)||r.DEFAULT_MIN_OFFSET_WIDTH),0),this._maxHeightOffset=Math.max(((null===(a=e.stickyPosition.position)||void 0===a?void 0:a.maxHeight)||r.DEFAULT_MIN_OFFSET_HEIGHT)-((null===(d=e.stickyPosition.position)||void 0===d?void 0:d.height)||(null===(c=e.stickyPosition.sizes)||void 0===c?void 0:c.height)||r.DEFAULT_MIN_OFFSET_HEIGHT),0),this._minHeightOffset=Math.max(((null===(_=e.stickyPosition.position)||void 0===_?void 0:_.height)||(null===(p=e.stickyPosition.sizes)||void 0===p?void 0:p.height)||r.DEFAULT_MIN_OFFSET_HEIGHT)-((null===(u=e.stickyPosition.position)||void 0===u?void 0:u.minHeight)||r.DEFAULT_MIN_OFFSET_HEIGHT),0)}static _getArrowPosition(e){if("left"===e||"top"===e)if("rtl"===s.controller.currentLocaleConfig.directionality)return"start";else return"end";if("right"===e||"bottom"===e)if("rtl"===s.controller.currentLocaleConfig.directionality)return"end";else return"start";return"center"}static _setBorderStyle(e,t){if("valid"!==t)return t;else return e}}return l.defaultProps={closeButtonVisible:!0,validationStatus:"valid",borderStyle:"secondary",backgroundStyle:"secondary",borderRadius:"xs",resizable:!1,arrowVisible:!0,resizingOptions:{step:1,position:"right-bottom"}},t.default=l,t}(0,{},m,Ee,c,b,$,"undefined"==typeof css_Controls_popupTemplate||css_Controls_popupTemplate),He=Re,Le=function(e,t,o,i,n,s){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=(0,i.forwardRef)((function(e,t){const r=(0,i.useContext)(s.Context);return(0,o.jsx)(n.default,{...e,forwardedRef:t,_stackPageWrapperContext:r})})),t}(0,{},e,t,ze,V),Ve=Le,Ke=function(e,t,o,i,n,s,r,l,a){"use strict";
9Object.defineProperty(t,"__esModule",{value:!0});class d extends o.Control{constructor(){super(...arguments),this["[Controls/_popupTemplate/interface/IPopupTemplate]"]=!0,this._template=a,this._slidingPanelOptions={position:"bottom",desktopMode:"dialog"},this._resizingArrowValues=["left-top","right-top","left-bottom","right-bottom"]}_beforeMount(e){var t,o,i;if(e.setThis(this),this._isAdaptive=(null===(t=e.adaptiveMode)||void 0===t?void 0:t.device.isPhone())&&!1!==e.allowAdaptive&&s.Controller.getIsAdaptive(),this._slidingPanelOptions={...this._slidingPanelOptions,...e.slidingPanelOptions},null===(o=e.adaptiveOptions)||void 0===o?void 0:o.viewMode){const t=(0,r.default)(null===(i=e.adaptiveOptions)||void 0===i?void 0:i.viewMode,"stack");this._slidingPanelOptions.desktopMode=t}this._updateOffset(e),this._setDragStateByOptions(e)}_onResizingOffset(e,t,o){let i=t;if("left-right"===o)i=2*t;this.props.onPopupMovingSize(i,o)}_dragMoveHandler(e,t,o){const i=-o.offset.x;if("right"===t)this._children.leftResizingLine.fakeDrag(i);else this._children.rightResizingLine.fakeDrag(i)}_beforeUpdate(e){if(this._updateOffset(e),e.draggable!==this._options.draggable)this._setDragStateByOptions(e)}_getRoundedClass(e,t){return(0,i.getRoundClass)({options:e,type:t,hasRoundedBorder:!e.maximize})}_getSlidingCloseButtonVisible(){var e;if("boolean"==typeof(null===(e=this._options.slidingPanelOptions)||void 0===e?void 0:e.closeButtonVisible))return this._options.slidingPanelOptions.closeButtonVisible;else return this._options.closeButtonVisible}_onDragEnd(){this._setDragStateByOptions(this._options),this._notify("popupDragEnd",[],{bubbling:!0})}_onDragMove(e,t){this._dragState="dragging",this._notify("popupDragStart",[t.offset],{bubbling:!0})}close(){this._notify("close",[],{bubbling:!0})}_setDragStateByOptions(e){this._dragState=e.draggable?"draggable":"not-draggable"}_onMouseDown(e){if(this._needStartDrag(e))this._dragState="drag-start",this._startDragNDrop(e)}_onMouseUp(){this._setDragStateByOptions(this._options)}_getBackgroundColor(){return!this._options.backgroundStyle?"controls-DialogTemplate_backgroundStyle-default":"controls-background-"+this._options.backgroundStyle}_needStartDrag(e){const{target:t}=e,o=e.nativeEvent.processed;return this._options.draggable&&"INPUT"!==t.tagName&&!t.closest(".controls-BaseButton")&&!t.closest(".extControls-doubleButton")&&!t.closest(".controls-CloseButton__close")&&!o}_startDragNDrop(e){this._children.dragNDrop.startDragNDrop({shouldNotUpdateBodyClass:!0},e)}_updateOffset(e){var t;if(e.dialogPosition){if(this._maxWidthOffset=Math.max((e.dialogPosition.maxWidth||l.DEFAULT_MIN_OFFSET_WIDTH)-(e.dialogPosition.width||l.DEFAULT_MIN_OFFSET_WIDTH),0),this._minWidthOffset=Math.max((e.dialogPosition.width||l.DEFAULT_MIN_OFFSET_WIDTH)-(e.dialogPosition.minWidth||l.DEFAULT_MIN_OFFSET_WIDTH),0),"left-right"===(null===(t=e.resizingOptions)||void 0===t?void 0:t.position))this._maxWidthOffset/=2,this._minWidthOffset/=2;this._maxHeightOffset=Math.max((e.dialogPosition.maxHeight||l.DEFAULT_MIN_OFFSET_HEIGHT)-(e.dialogPosition.height||l.DEFAULT_MIN_OFFSET_HEIGHT),0),this._minHeightOffset=Math.max((e.dialogPosition.height||l.DEFAULT_MIN_OFFSET_HEIGHT)-(e.dialogPosition.minHeight||l.DEFAULT_MIN_OFFSET_HEIGHT),0)}}static getDefaultOptions(){return{headingFontColorStyle:"default",headerBackgroundStyle:"default",closeButtonSize:"m",headerBorderVisible:!1,headerSize:"m",footerBorderVisible:!0,headingFontSize:"3xl",closeButtonVisible:!0,closeButtonViewMode:"linkButton",borderRadius:"s",resizable:!1,resizingOptions:{step:1,position:"right-bottom"}}}}return t.default=(0,n.withAdaptiveMode)(d),t}(0,{},m,U,g,A,G,$,Ie,"undefined"==typeof css_Controls_popupTemplate||css_Controls_popupTemplate),je=function(e,t,o,i,n,s,r,l,a){"use strict";var d;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.RIGHT="right",e.LEFT="left",e.DEFAULT="default"}(d||(d={}));class c extends o.Control{constructor(){super(...arguments),this._template=i,this._closeBtnPosition=d.DEFAULT,this._dragging=!1,this._animationState={hide:!1,open:!1}}_beforeMount(e){var t,o,i;if(this._slidingPanelOptions={...e.slidingPanelOptions,position:"bottom",desktopMode:"dialog"},this._isAdaptive=(null===(t=e.adaptiveMode)||void 0===t?void 0:t.device.isPhone())&&!1!==e.allowAdaptive&&a.Controller.getIsAdaptive(),this._slidingPanelOptions={...this._slidingPanelOptions,...e.slidingPanelOptions},null===(o=e.adaptiveOptions)||void 0===o?void 0:o.viewMode){const t=(0,l.default)(null===(i=e.adaptiveOptions)||void 0===i?void 0:i.viewMode,"stack");this._slidingPanelOptions.desktopMode=t}if(this._updateOffset(e),"external"===e.closeButtonViewMode)this._closeBtnPosition=d.RIGHT}_beforeUpdate(e){var t;if(this._options.slidingPanelOptions!==e.slidingPanelOptions)this._slidingPanelOptions={...e.slidingPanelOptions,position:"bottom",desktopMode:"dialog"};if(this._updateOffset(e),e.stickyPosition&&e.stickyPosition.direction&&this._options.stickyPosition.direction!==e.stickyPosition.direction)this._verticalDirection=e.stickyPosition.direction.vertical;if((null===(t=e.animationSettings)||void 0===t?void 0:t.startElementSelector)&&!this._animationState.hide)(0,n.hidePopupTemplateBeforeMoveInViewport)(this._container),this._animationState.hide=!0}_afterUpdate(e){var t;if((null===(t=e.animationSettings)||void 0===t?void 0:t.startElementSelector)&&!this._animationState.o
9pen)(0,n.animateStart)(this._container,e.animationSettings.startElementSelector),this._animationState.open=!0}_getRoundedClass(e,t){return(0,s.getRoundClass)({options:e,type:t,hasRoundedBorder:e.roundBorder})}_getSlidingCloseButtonVisible(){var e;if("boolean"==typeof(null===(e=this._options.slidingPanelOptions)||void 0===e?void 0:e.closeButtonVisible))return this._options.slidingPanelOptions.closeButtonVisible;else return this._options.closeButtonVisible}_getCloseButtonWidth(){var e;if(this._children.hasOwnProperty("closeButton"))return null===(e=this._children.closeButton._container)||void 0===e?void 0:e.offsetWidth;else return 0}_onDragEnd(){this._notify("popupDragEnd",[],{bubbling:!0})}_onDragMove(e,t){this._dragging=!0,this._notify("popupDragStart",[t.offset],{bubbling:!0})}_dragMoveHandler(e,t,o){const i=-o.offset.x;if("right"===t)this._children.leftResizingLine.fakeDrag(i);else this._children.rightResizingLine.fakeDrag(i)}_onMouseDown(e){if(this._needStartDrag(e))this._startDragNDrop(e)}_click(){this._dragging=!1}_mouseOut(){this._dragging=!1}_needStartDrag(e){const{target:t}=e,o=e.nativeEvent.processed;return this._options.draggable&&!t.closest(".controls-StickyTemplate__resizing")&&"INPUT"!==t.tagName&&!o}_startDragNDrop(e){this._children.dragNDrop.startDragNDrop(null,e)}getWindowInnerWidth(){return null===window||void 0===window?void 0:window.innerWidth}close(e){var t,o;e.stopPropagation();const i=null===(o=null===(t=this._options)||void 0===t?void 0:t.animationSettings)||void 0===o?void 0:o.endElementSelector;if(i)(0,n.animateClose)(this._container,i),setTimeout((()=>{this._notify("close",[],{bubbling:!0})}),n.TIMEOUT_FOR_ANIMATION);else this._notify("close",[],{bubbling:!0})}_proxyEvent(e,t){this._notify(t,[e])}_getBackgroundColor(){return"default"===this._options.backgroundStyle?"controls-StickyTemplate-backgroundColor":"controls-background-"+this._options.backgroundStyle}_getFooterBackgroundColor(){return"default"===this._options.footerBackgroundStyle?"controls-StickyTemplate-backgroundColor":"controls-background-"+this._options.footerBackgroundStyle}_onResizingOffset(e,t,o){let i=t;if("left-right"===o)i=2*t;this._notify("popupMovingSize",[i,o],{bubbling:!0})}_updateOffset(e){var t,o,i,n,s,l,a,d,c;if(e.stickyPosition){if(this._maxWidthOffset=Math.max(((null===(t=e.stickyPosition.position)||void 0===t?void 0:t.maxWidth)||r.DEFAULT_MIN_OFFSET_WIDTH)-((null===(o=e.stickyPosition.sizes)||void 0===o?void 0:o.width)||r.DEFAULT_MIN_OFFSET_WIDTH),0),this._minWidthOffset=Math.max(((null===(i=e.stickyPosition.sizes)||void 0===i?void 0:i.width)||r.DEFAULT_MIN_OFFSET_WIDTH)-((null===(n=e.stickyPosition.position)||void 0===n?void 0:n.minWidth)||r.DEFAULT_MIN_OFFSET_WIDTH),0),"left-right"===(null===(s=e.resizingOptions)||void 0===s?void 0:s.position))this._maxWidthOffset/=2,this._minWidthOffset/=2;this._maxHeightOffset=Math.max(((null===(l=e.stickyPosition.position)||void 0===l?void 0:l.maxHeight)||r.DEFAULT_MIN_OFFSET_HEIGHT)-((null===(a=e.stickyPosition.sizes)||void 0===a?void 0:a.height)||r.DEFAULT_MIN_OFFSET_HEIGHT),0),this._minHeightOffset=Math.max(((null===(d=e.stickyPosition.sizes)||void 0===d?void 0:d.height)||r.DEFAULT_MIN_OFFSET_HEIGHT)-((null===(c=e.stickyPosition.position)||void 0===c?void 0:c.minHeight)||r.DEFAULT_MIN_OFFSET_HEIGHT),0)}}static getDefaultOptions(){return{headingFontSize:"l",headingFontColorStyle:"secondary",closeButtonVisible:!0,backgroundStyle:"default",headerBackgroundStyle:"default",footerBackgroundStyle:"default",closeButtonViewMode:"link",borderStyle:"default",borderSize:"default",roundBorder:!0,borderRadius:"s",borderVisible:!0,resizable:!1,shadowVisible:!0,resizingOptions:{step:1,position:"right-bottom"}}}}return t.default=c,t}(0,{},m,Ne,j,U,$,G,A,"undefined"==typeof css_Controls_popupTemplate||css_Controls_popupTemplate),Fe=function(e){"use strict";function t(){return this}var o=["_getTemplateName","_sendResult","_close","mouseenter","mouseleave","stickyPosition","_options","borderStyle","validationStatus","backgroundStyle","theme","verticalPadding","xs"," controls-InfoBox__verticalPadding","","horizontalPadding","closeButtonVisible","resolvedTemplate","content","click","floatCloseButton","
9null","template","controls-InfoBox__message_margin","loadResult","templateOptions","message"];return e.g({v:1,m:"wml!Controls/_popupTemplate/InfoBox/Template/Simple/template",d:e.d(["Controls/_popupTemplate/InfoBox/Template/InfoBox","Controls/Container/Async"],arguments,1),t:[e.c(((e,i)=>[e.P(i,e.m(i,10),{K:"0_0_0_0_0_0_0_0_",A:{class:"controls-InfoBoxTemplate__closeButton"},E:{"on:click":[{value:o[2],originalName:o[19],viewController:i.v}],meta:{isControl:!1,context:t,handler:e.M(i,1)}},O:{viewMode:"link",offset:"null"},g:!0,m:"attribute"})])),e.c(((e,t)=>[e.g(t,"div",{K:"0_0_0_",A:{class:"controls_popupTemplate_theme-"+e.e(e.x(t,6))+" controls-InfoBox"+e.e(e.x(t,7))+" controls-InfoBox__horizontal-padding-"+e.e(e.x(t,8))},r:!0},[e.m(t,9)?[e.g(t,"div",{K:"0_0_0_0_0_",A:{"ws-no-focus":"true"}},[e.C(t,"ws:Controls/Container/Async",{K:"0_0_0_0_0_0_",O:{esc:!1,templateName:"Controls/extButtons:CloseButton",content:e.o(t,0,0)}})]),e.m(t,11)?[e.g(t,"div",{K:"0_0_0_0_1_0_",A:{class:"controls-InfoBox_floatElement"}})]:e.t()]:e.t(),e.m(t,12)?[e.P(t,e.m(t,12),{K:"0_0_0_1_0_",A:{class:"controls-InfoBox__content controls-InfoBox__message "+e.e(e.m(t,13))},O:e.S(t,{loadResult:e.m(t,14)},e.m(t,15)),m:"none",i:1})]:[e.g(t,"div",{K:"0_0_0_2_0_",A:{class:"controls-InfoBox__message "+e.e(e.x(t,16))}},[e.t(e.e(e.x(t,17)),"0_0_0_2_0_0_")])]])])),e.r(((e,i)=>[e.C(i,"ws:Controls/_popupTemplate/InfoBox/Template/InfoBox",{K:"0_",A:{template:e.e(e.m(i,0))},E:{"on:mouseenter":[{value:o[1],originalName:o[3],viewController:i.v}],"on:mouseleave":[{value:o[1],originalName:o[4],viewController:i.v}],meta:{isControl:!0,context:t,handler:e.M(i,1)}},O:{esc:!1,stickyPosition:e.m(i,2),closeButtonVisible:!1,borderStyle:e.m(i,3),validationStatus:e.m(i,4),backgroundStyle:e.m(i,5),content:e.o(i,1,2)},m:"attribute",c:!0})]))],p:o.slice(0,3),e:[(e,t,i)=>e.c(i,t,[o[0]]),function(e,t,o,i,n,s){return e.g(this,[s])},(e,t)=>e.g(t,[o[6],o[5]]),(e,t)=>e.g(t,[o[6],o[7]]),(e,t)=>e.g(t,[o[6],o[8]]),(e,t)=>e.g(t,[o[6],o[9]]),(e,t)=>e.g(t,[o[6],o[10]]),(e,t)=>e.g(t,[o[6],o[11]])===o[12]?o[13]:o[14],(e,t)=>e.g(t,[o[6],o[15]]),(e,t)=>e.g(t,[o[6],o[16]]),(e,t)=>e.g(t,[o[18],o[17]]),(e,t)=>e.g(t,[o[6],o[20]])&&e.g(t,[o[6],o[15]])!==o[21],(e,t)=>e.g(t,[o[6],o[22]]),(e,t)=>!e.g(t,[o[6],o[20]])&&e.g(t,[o[6],o[15]])!==o[21]&&e.g(t,[o[6],o[16]])?o[23]:"",(e,t)=>e.g(t,[o[6],o[24]]),(e,t)=>e.g(t,[o[6],o[25]]),(e,t)=>!e.g(t,[o[6],o[20]])&&e.g(t,[o[6],o[16]])?o[23]:"",(e,t)=>e.g(t,[o[6],o[26]])],i:[[[10]],[[15]],[[6,9],[11,17]]]})}(W,Re,"undefined"==typeof Controls_Container_Async?null:Controls_Container_Async),Ue=function(e,t,o,i,n,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class l extends o.Control{constructor(){super(...arguments),this._template=i,this._animationState={hide:!1,open:!1}}_beforeMount(e,t,o){if(s.constants.isBrowserPlatform&&l._needRequireModule(e.template))return(0,n.load)(e.template)}_beforeUpdate(e){var t;if((null===(t=e.animationSettings)||void 0===t?void 0:t.startElementSelector)&&!this._animationState.hide)(0,r.hidePopupTemplateBeforeMoveInViewport)(this._container),this._animationState.hide=!0}_afterUpdate(e){var t;if((null===(t=e.animationSettings)||void 0===t?void 0:t.startElementSelector)&&!this._animationState.open)(0,r.animateStart)(this._container,e.animationSettings.startElementSelector),this._animationState.open=!0}_close(){var e,t;const o=null===(t=null===(e=this._options)||void 0===e?void 0:e.animationSettings)||void 0===t?void 0:t.endElementSelector;if(o)(0,r.animateClose)(this._container,o),setTimeout((()=>{this._notify("sendResult",[{type:"close"}],{bubbling:!0}),this._notify("close")}),r.TIMEOUT_FOR_ANIMATION);else this._notify("sendResult",[{type:"close"}],{bubbling:!0}),this._notify("close")}_sendResult(e){this._notify("sendResult",[e,this],{bubbling:!0})}_getTemplateName(){if("string"==typeof this._options.template)return this._options.template;else return""}static _needRequireModule(e){return"string"==typeof e&&!requirejs.defined(e)}}return l.defaultProps={horizontalPadding:"m",verticalPadding:"xs"},t.default=l,t}(0,{},m,Fe,s,y,j,"undefined"==typeof css_Controls_popupTemplate||css_Controls_popupTemplate),$e=Ue,Ge=function(e,t,o,i,n,s,r,l,a,d){"use strict";
9Object.defineProperty(t,"__esModule",{value:!0});const{ErrorBoundary:c}=d.error;class _ extends c{render(){if(void 0!==this.state.errorViewConfig){const e=super.render();return(0,o.jsx)(i.default,{bodyContentTemplate:e})}return this.props.children}}class p extends n.Component{constructor(e){super(e),this._onClose=this._onClose.bind(this)}_onClose(e){var t,o,i,n,s;if(!e||(null===(t=e.isBubbling)||void 0===t?void 0:t.call(e)))if(!this.props.isPopup)if(this.props.closeStackWrapper)null==e||e.stopPropagation(),this.props.closeStackWrapper().then((()=>{var t,o,i,n;null===(o=null===(t=this.context)||void 0===t?void 0:t.close)||void 0===o||o.call(t),null===(n=(i=this.props).onClose)||void 0===n||n.call(i,e,!0)}));else if(this.context)this.context.close();else null===(i=(o=this.props).onClose)||void 0===i||i.call(o,e,!0);else null===(s=(n=this.props).onClose)||void 0===s||s.call(n,e);else e.stopImmediatePropagation()}render(){return(0,o.jsx)(_,{children:(0,o.jsx)(i.default,{...this.props,customEvents:null,isPopup:this.props.isPopup,popupId:this.props.popupId,ref:this.props.setRef,allowAdaptive:this.props.allowAdaptive,onClose:(0,r.withWasabyEventObject)(this._onClose)})})}}p.contextType=l.Context;class u extends n.Component{constructor(e){super(e),this._stackRef=(0,n.createRef)(),this._onClose=this._onClose.bind(this),this._setRef=this._setRef.bind(this),this._onMaximized=this._onMaximized.bind(this)}_startDragNDrop(...e){var t;null===(t=this._stackRef.current)||void 0===t||t._startDragNDrop(...e)}_setRef(e){var t,o;if(void 0!==e)if(this._stackRef.current=e,e instanceof HTMLElement||null===e)if("function"==typeof this.props.forwardedRef)this.props.forwardedRef(e);else if(null===(o=null===(t=this.props.forwardedRef)||void 0===t?void 0:t.hasOwnProperty)||void 0===o?void 0:o.call(t,"current"))this.props.forwardedRef.current=e}_onClose(e,t){var o,i;if(this.props.onClose){if(!e||(0,a.checkWasabyEvent)(this.props.onClose)||t){if(!1===this.props.onClose())null==e||e.stopPropagation()}}else if(null===(o=this.context)||void 0===o?void 0:o.isPopup)null===(i=this.context)||void 0===i||i.close()}_onMaximized(e){var t;if(this.props.onMaximized){if((0,a.checkWasabyEvent)(this.props.onMaximized)){if(!1===this.props.onMaximized())null==e||e.stopPropagation()}}else null===(t=this.context)||void 0===t||t.maximized()}close(){this._stackRef.current.close()}toggleMaximizeState(e){this._stackRef.current.toggleMaximizeState(e)}render(){var e,t,i,n;return(0,o.jsx)(p,{...this.props,isPopup:(null===(e=this.context)||void 0===e?void 0:e.isPopup)||this.props.isPopup,allowAdaptive:null===(t=this.context)||void 0===t?void 0:t.allowAdaptive,closeStackWrapper:null===(i=this.context)||void 0===i?void 0:i.closeStackWrapper,popupId:null===(n=this.context)||void 0===n?void 0:n.popupId,setRef:this._setRef,onClose:this._onClose,onMaximized:this._onMaximized})}}return u.contextType=s.Context,t.default=u,t}(0,{},e,Me,t,A,l,V,p,P),qe=Ge,Ze=function(e,t,o,i,n,s,r,l,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class d extends n.Component{constructor(e){super(e),this._onClose=this._onClose.bind(this),this._onPopupDragStart=this._onPopupDragStart.bind(this),this._onPopupDragEnd=this._onPopupDragEnd.bind(this),this._onPopupMovingSize=this._onPopupMovingSize.bind(this),this._setThis=this._setThis.bind(this)}_startDragNDrop(...e){this._dialogThis._startDragNDrop(...e)}_onClose(e){var t;if(this.props.onClose){if((0,l.checkWasabyEvent)(this.props.onClose)){if(!1===this.props.onClose())null==e||e.stopPropagation()}}else null===(t=this.context)||void 0===t||t.close()}close(){a.Logger.error('Controls/popupTempalte:Dialog: Используется устаревший метод close.Для корректной работы компонента перейдите на контексты: https://online.sbis.ru/news/04ee3fac-ec84-4824-ab4b-95c27a01a321,либо воспользуйтесь _notfy("close"), если вставляете шаблон в wasaby-компонент'),this._dialogThis.close()}getContainer(){return this._dialogThis._container}_onPopupDragStart(e,t){var o;null===(o=this.context)||void 0===o||o.popupDragStart(e,t)}_onPopupDragEnd(){var e;null===(e=this.context)||void 0===e||e.popupDragEnd()}_onPopupMovingSize(e,t){var o;if(this.props.onPopupMovingSize)this.props.onPopupMovingSize(e,t);else null===(o=this.context)||void 0===o||o.popupMovingSize(e,t)}_setThis(e){this._dialogThis=e}componentWillUnmount(){this._dialogThis=null}render(){return(0,o.jsx)(i.default,{...this.props,customEvents:null,setThis:this._setThis,onClose:(0,r.withWasabyEventObject)(this._onClose),onPopupDragStart:this._onPopupDragStart,onPopupDragEnd:this._onPopupDragEnd,onPopupMovingSize:this._onPopupMovingSize})}}return d.contextType=s.Context,t.default=d,t}(0,{},e,Ke,t,A,l,p,c),Xe=Ze,Ye=function(e,t,o,i,n,s,r,l){"use strict";
9return Object.defineProperty(t,"__esModule",{value:!0}),t.default=(0,n.forwardRef)((function(e,t){const a=(0,n.useContext)(r.Context),d=(0,s.useAdaptiveMode)();return(0,o.jsx)(i.default,{...e,customEvents:null,ref:t,adaptiveMode:d,onPopupDragStart:null==a?void 0:a.popupDragStart,onPopupDragEnd:null==a?void 0:a.popupDragEnd,onClose:(0,n.useCallback)((()=>{if(e.onClose){if((0,l.checkWasabyEvent)(e.onClose))e.onClose()}else null==a||a.close()}),[e.onClose])})})),t}(0,{},e,je,t,g,A,p),Qe=Ye,z.DialogHeader=z.ResizingArrow=z.IResizingArrowPosition=z.NotificationSimple=z.NotificationWithoutWrapper=z.Notification=z.templateInfoBox=z.PreviewerTemplate=z.InfoBox=z.ConfirmationDialog=z.Confirmation=z.Page=z.Sticky=z.Dialog=z.POPUP_STACK_CLASSNAME=z.BaseStack=z.Stack=z.StackToolbar=z.getAdaptiveDesktopMode=z.getPopupComponent=z.themeInitConstants=z.StackPageWrapperContextProvider=z.StackPageWrapper=z.TIMEOUT_FOR_ANIMATION=z.animateClose=z.getMiddleWidth=z.getMaximizedState=z.MIN_MAXIMIZED_WIDTH=z.RIGHT_PANEL_WIDTH=z.BASE_WIDTHS_POPUP=z.BASE_WIDTH_SIZES=z.initializationPopupConstants=z.initializationConstants=z.getPopupWidth=z.getRightPanelWidth=z.ContextConsumer=z.Context=z.ContextProvider=void 0,Object.defineProperty(z,"ContextProvider",{enumerable:!0,get:function(){return A.ContextProvider}}),Object.defineProperty(z,"Context",{enumerable:!0,get:function(){return A.Context}}),Object.defineProperty(z,"ContextConsumer",{enumerable:!0,get:function(){return B.ContextConsumer}}),Object.defineProperty(z,"getRightPanelWidth",{enumerable:!0,get:function(){return Oe.getRightPanelWidth}}),Object.defineProperty(z,"getPopupWidth",{enumerable:!0,get:function(){return Oe.getPopupWidth}}),Object.defineProperty(z,"initializationConstants",{enumerable:!0,get:function(){return Oe.initializationConstants}}),Object.defineProperty(z,"initializationPopupConstants",{enumerable:!0,get:function(){return Oe.initializationPopupConstants}}),Object.defineProperty(z,"BASE_WIDTH_SIZES",{enumerable:!0,get:function(){return Oe.BASE_WIDTH_SIZES}}),Object.defineProperty(z,"BASE_WIDTHS_POPUP",{enumerable:!0,get:function(){return Oe.BASE_WIDTHS_POPUP}}),Object.defineProperty(z,"RIGHT_PANEL_WIDTH",{enumerable:!0,get:function(){return Oe.RIGHT_PANEL_WIDTH}}),Object.defineProperty(z,"MIN_MAXIMIZED_WIDTH",{enumerable:!0,get:function(){return Oe.MIN_MAXIMIZED_WIDTH}}),Object.defineProperty(z,"getMaximizedState",{enumerable:!0,get:function(){return Oe.getMaximizedState}}),Object.defineProperty(z,"getMiddleWidth",{enumerable:!0,get:function(){return Oe.getMiddleWidth}}),Object.defineProperty(z,"animateClose",{enumerable:!0,get:function(){return F.animateClose}}),Object.defineProperty(z,"TIMEOUT_FOR_ANIMATION",{enumerable:!0,get:function(){return F.TIMEOUT_FOR_ANIMATION}}),Object.defineProperty(z,"StackPageWrapper",{enumerable:!0,get:function(){return Ve.default}}),Object.defineProperty(z,"StackPageWrapperContextProvider",{enumerable:!0,get:function(){return K.default}}),Object.defineProperty(z,"themeInitConstants",{enumerable:!0,get:function(){return Q.default}}),Object.defineProperty(z,"getPopupComponent",{enumerable:!0,get:function(){return X.default}}),Object.defineProperty(z,"getAdaptiveDesktopMode",{enumerable:!0,get:function(){return q.default}}),Object.defineProperty(z,"StackToolbar",{enumerable:!0,get:function(){return Se.default}}),Object.defineProperty(z,"Stack",{enumerable:!0,get:function(){return qe.default}}),Object.defineProperty(z,"BaseStack",{enumerable:!0,get:function(){return H.default}}),Object.defineProperty(z,"POPUP_STACK_CLASSNAME",{enumerable:!0,get:function(){return H.POPUP_STACK_CLASSNAME}}),Object.defineProperty(z,"Dialog",{enumerable:!0,get:function(){return Xe.default}}),Object.defineProperty(z,"Sticky",{enumerable:!0,get:function(){return Qe.default}}),Object.defineProperty(z,"Page",{enumerable:!0,get:function(){return ge.default}}),Object.defineProperty(z,"Confirmation",{enumerable:!0,get:function(){return D.Template}}),Object.defineProperty(z,"ConfirmationDialog",{enumerable:!0,get:function(){return We.default}}),Object.defineProperty(z,"InfoBox",{enumerable:!0,get:function(){return He.default}}),Object.defineProperty(z,"PreviewerTemplate",{enumerable:!0,get:function(){return ve.default}}),Object.defineProperty(z,"templateInfoBox",{enumerable:!0,get:function(){return $e.default}}),Object.defineProperty(z,"Notification",{enumerable:!0,get:function(){return me.default}}),Object.defineProperty(z,"NotificationWithoutWrapper",{enumerable:!0,get:function(){return me.NotificationWithoutWrapper}}),Object.defineProperty(z,"NotificationSimple",{enumerable:!0,get:function(){return De.default}}),Object.defineProperty(z,"IResizingArrowPosition",{enumerable:!0,get:function(){return ee.IResizingArrowPosition}}),Object.defineProperty(z,"ResizingArrow",{enumerable:!0,get:function(){return be.default}}),Object.defineProperty(z,"DialogHeader",{enumerable:!0,get:function(){return pe.default}}),z}));
10define("Controls/markup",["UICommon/Executor","UI/Utils","UI/Executor","UI/Base","Types/util","Types/shim","Types/entity","Env/Env","Core/validHtml","Core/core-merge","Browser/Transport","require","exports","css!Controls/markup"],(function(u,D,e,F,t,n,r,o,i,s,C,E,l){var a,c,f,B,d,p,A,g,h,m,y,v,k,b,_,L,x,O,N,M,P,$,j;
10return Object.defineProperty(l,"__esModule",{value:!0}),a=function(u,D){"use strict";return Object.defineProperty(D,"__esModule",{value:!0}),D.default=function(u,D,e){if("string"!=typeof u&&!(u instanceof String)||!e.textToHighlight)return u;const F=e.textToHighlight,t=function(u,D){let e=u.indexOf(D);const F=[];for(;-1!==e;)F.push(e),e+=D.length,e=u.indexOf(D,e);return F}(u.toLowerCase(),F.toLowerCase());if(!t.length)return u;const n=[[]];let r,o,i=0;for(let D=0;D<t.length;++D){if(r=u.substring(i,t[D]),i=t[D]+F.length,o=u.substr(t[D],F.length),r)n.push(r);n.push(["span",{class:"controls-MarkupDecorator_highlight"},o])}if(r=u.substring(i),r)n.push(r);return n},D}(0,{}),c=a,f=function(u,D,e){"use strict";Object.defineProperty(D,"__esModule",{value:!0});const F="MarkupDecorator__iframe";return D.default=function(u){var D;if("iframe"===e.JSONML.getNodeName(u)){e.JSONML.removeAttribute(u,"style");const t=null!==(D=e.JSONML.getAttribute(u,"class"))&&void 0!==D?D:"";if(!t.includes(F))e.JSONML.setAttribute(u,"class",`${t} ${F}`)}return u},D}(0,{},r),B=function(u,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0});const e=["p","br","h1","h2","h3","h4","h5","h6","li"],F=function u(D,F){if("string"==typeof D)return F?D:[[],D];if(Array.isArray(D)){let t="";if(Array.isArray(D[0]))t=u(D[0],D);for(let e=1;e<D.length;++e)t+=u(D[e],D);if(e.includes(D[0]))t+="\n";return F?t:[[],t]}return""};return F.__noNeedEscapeString=!0,D.default=F,D}(0,{}),d=B,p=function(u,D){"use strict";return Object.defineProperty(D,"__esModule",{value:!0}),D.default=function(u,D){if(!D&&"div"===u[0])u[0]=[];return u},D}(0,{}),A=p,g=function(u,D){"use strict";return Object.defineProperty(D,"__esModule",{value:!0}),D.default=/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,D}(0,{}),h=g,m=function(u,D,e,F,t,n,r){"use strict";function o(u){return"object"==typeof u&&!Array.isArray(u)}function i(u){return Array.isArray(u)&&"string"==typeof u[0]}function s(u){return"string"==typeof u}function C(u){let D;if(i(u)&&o(u[1]))D=u[1];else D={};return D}function E(u){let D;if(i(u))D=u[0];else D="";return D}function l(u,D=u,e=!1){const F={href:e?"mailto:"+u:u};if(!e)F.class="asLink",F.target="_blank",F.rel="noreferrer noopener";return["a",F,D]}function a(u,D=u,e,F=!1){return{href:F?"mailto:"+u:u,text:D,position:e}}function c(u,D=u){return["a",{class:"asLink",target:"_blank","data-open-file":u,href:""},D]}function f(u){const D=C(u),e=function(u){let D;if(i(u))if(o(u[1]))D=u[2];else D=u[1];if(!D)D="";return D}(u),F=D.href?D.href.toLowerCase():"";let t;try{t=decodeURI(F)}
10catch(u){r.Logger.warn('ошибка "'+u.message+'" при попытке декодировать URI '+F),t=""}const n=s(e)?e.toLowerCase():"";return!!F&&F.length<=g()&&0===F.indexOf("http")&&(F===n||t===n)}function B(u){const D=u.split(""),e=["(","[","<","{",'"',"'"],F=[")","]",">","}",'"',"'"],t=F.map(((u,D)=>[u,e[D]])),n=new Map(t),r=[];for(const[t,o]of Array.from(D.entries()))if(F.includes(o)){if(!r.length)return u.slice(t);const D=r[r.length-1].bracket;if(n.get(o)!==D){const[D]=r;return u.slice(D.index)}r.pop()}else if(e.includes(o))r.push({index:t,bracket:o});if(r.length){const[D]=r;return u.slice(D.index)}}function d(u,D){const e=B(D?u.href:u[1].href);if(!e)return[u,""];let F=u;if(D)F={...u,href:u.href.slice(0,-e.length),text:u.text.slice(0,-e.length)};else F[1]={...u[1],href:u[1].href.slice(0,-e.length)},F[2]=u[2].slice(0,-e.length);return[F,e]}function p(){return N}function A(){return F.constants.decoratedLinkService}function g(){return 1499}function h(u,D,e){if(Array.isArray(u)&&D)for(let e=u.length-1;e>0;--e){const F=u[e];if(s(F))D=D&&_.test(F)||L.test(F);else if(D=D&&f(F))u[e]=m(F)}else D=D&&_.test(e)||L.test(e);return D}function m(u){if(s(u))return G.shift();const D=C(u),n=t({},D,{clone:!0}),r=p();if(n.class=((n.class?n.class.replace("asLink","")+" ":"")+r.link).trim(),n.target="_blank",!n.rel||-1===n.rel.indexOf("noopener"))n.rel="noopener";const o=F.constants.decoratedLinkHost+A()+"?method=LinkDecorator.DecorateSVG&params="+encodeURIComponent(e.base64.encode('{"Link":"'+n.href.replace(O,"\\$1")+'"}'))+"&id=0&srv=1";return["span",{class:r.wrap},["a",n,["img",{class:r.image,alt:n.href,src:o}]]]}function y(u,D,e=!0){let F=[],t=!1;if("a"===E(D))F=u;else if("true"!==C(D)["data-richeditor-unlinked"])[F,t]=v(u,!0,e);return t?F:u}function v(u,e,F=!0){let t=D.linkParseRegExp.exec(u),n=[],r=!1;for(n.push([]);null!==t;){let[F,o,i,s,C,E,c,f]=t;const B=t.index;let p;t=D.linkParseRegExp.exec(u);let A="";if(F.length>=$)p=F;else if(s){let u=!1;if([u,p]=b(s,E,c,C,F,e),u&&!e)p=a(p,F,B,!1);if(u)[p,A]=d(p,!e);r=r||u}else if(o){if(T.test(c))i+=c,o+=c;else A=c;const u=-1===P.indexOf(i);if(r=r||!u,r&&!e)p=a(o,F,B,!0);else p=u?F:l(o,void 0,!0)}else p=f;if(r&&!e)n.push(p);else if("string"==typeof p&&"string"==typeof n[n.length-1])n[n.length-1]+=p;else n.push(p);if(A)n.push(A)}let o=!1;if(F)[n,o]=k(n,e,r);return[n,r||o]}function k(u,D,e){let F,t=e;if(Array.isArray(u))F=[],u.forEach((u=>{if("string"==typeof u){let n=U.exec(u);if(null!==n){let r=0;for(t=!0;null!==n;
10){const t='"'===n[0].charAt(0),o=t?n.index+1:n.index,i=t?n[0].slice(1):n[0],s=D?c(i):{text:e=i,position:o,attributes:{class:"asLink",target:"_blank","data-open-file":e,href:""}},C=u.slice(r,o);if(C.length)F.push(C);F.push(s),r=o+i.length,n=U.exec(u)}const o=u.slice(r,u.length);if(o)F.push(o)}else F.push(u)}else F.push(u);var e}));else if("string"==typeof F)F=u;return[F,t]}function b(u,D,e,F,t,n){if(T.test(e)&&u===F)D+=e;const r=D&&-1===P.indexOf(D),o=!r;if(u+=e,n){return[o,r?t:l((F?"http://":"")+u,u)]}return[o,r?t:F?"http://"+u:""+u]}Object.defineProperty(D,"__esModule",{value:!0}),D.clearNeedDecorateGlobals=D.normalizeLink=D.getLinks=D.parseFolderLinks=D.parseLinks=D.wrapLinksInString=D.getDecoratedLink=D.needDecorate=D.getUndecoratedLink=D.isDecoratedLink=D.getHrefMaxLength=D.getService=D.getClasses=D.removeHrefAfterExtraBracket=D.linkParseRegExp=void 0;const _=/^\s+$/,L=/^\s*\n/,x=/^(p(re)?|div|blockquote|li|span|td)$/,O=/([\\"])/g,N={wrap:"LinkDecorator__wrap",link:"LinkDecorator__linkWrap",image:"LinkDecorator__image"},M="__needDecorate",P=["ru","com","edu","org","net","int","info","рф","рус","kz","uz","dev","pre-dev","pre-test","test","fix","local","дети","москва","онлайн","орг","сайт"],$=8192,j="\\s\\ud800-\\udfff",w=`(${`(?:${`(?:${["http:(?://|\\\\\\\\)","https:(?://|\\\\\\\\)","ftp:(?://|\\\\\\\\)","file:(?://|\\\\\\\\)","smb:(?://|\\\\\\\\)","Notes:(?://|\\\\\\\\)","notes:(?://|\\\\\\\\)"].join("|")})`.replace(/[a-z]/g,(u=>`[${u+u.toUpperCase()}]`))}${`[^\\{\\}\\[\\]\\(\\)${j}]`}|([\\w\\-а-яёА-ЯЁ]{1,8192}(?:\\.[a-zA-Zа-яёА-ЯЁ]{1,8192}){0,8192}\\.([a-zA-Zа-яёА-ЯЁ-]{1,8192})(?::[0-9]{1,8192})?))`}(?:[^${j}]{0,8192}))`,T=/[\wа-яёА-ЯЁ]/,R="[a-zA-Z]:",S='^\\.\\?\\<\\>\\|:\\*\\"\\\\\\/',J=`[${S}]+(\\.[${S}]+)*)+`,I=`[${S}\\s]+(\\.[${S}\\s]+)*)+`,H="\\\\",U=new RegExp(`${`(((\\"${R})(${H}{1,2}${J})(?=\\"))|(((\\"[${H}])(${H}${J})(?=\\"))`}|${`((${R})(${H}{1,2}${I})|(([${H}])(${H}${I})`}|(((file:\\/\\/\\/)?[a-zA-Z]:)(\\/[^\\.\\?\\<\\>\\|:\\*\\"\\/\\/\\/\\s]+(\\.[^\\.\\?\\<\\>\\|:\\*\\"\\/\\/\\/\\s]+)*)+)`,"g");D.linkParseRegExp=new RegExp(`(?:(?:([\\wа-яёА-ЯЁ!#$%&'*+\\-/=?^\`{|}~.]{1,8192}@[^\\s@()\\ud800-\\udfff]{1,8192}\\.([\\wа-яёА-ЯЁ]{1,8192}))|${w})([^.,:\\s(\\ud800-\\udfff"'<]))|(.|\\s)`,"g");const z=new n.Set;let G=[];return D.removeHrefAfterExtraBracket=d,D.getClasses=p,D.getService=A,D.getHrefMaxLength=g,D.isDecoratedLink=function(u,D){let e;if("span"===u){const u=E(D),F=C(D);e="a"===u&&!!F.href&&!!F.class&&-1!==F.class.split(" ").indexOf(p().link)}else e=!1;return e},D.getUndecoratedLink=function(u){const D=C(u),e=t({},D,{clone:!0});return e.class=D.class.replace(p().link,"asLink"),["a",e,e.href]},D.needDecorate=function(u,D){if(!A())return!1;if(!x.test(E(D)))return function(u,D,e){if(s(D))return u.unshift(y(D,e)),!0;else return!1}(G,u,D);const e=!z.has(D);if(z.add(D),e){let u=!0;const e=o(D[1])?2:1,F=[];for(let t=D.length-1;t>=e;--t){const e=D[t];if(s(e)){const t=y(e,D);F.unshift(t),u=h(t,u,e);continue}const n=E(e);if("a"===n){const D=C(e);u=u&&f(e),D[M]=String(u)}else u="br"===n}G=F.concat(G)}if(s(u))return!0;const F=C(u);if(F.hasOwnProperty(M))return function(u,D){const e=u[D];if(delete u[D],"string"==typeof e)return"true"===e;return e}(F,M);else return!1},D.getDecoratedLink=m,D.wrapLinksInString=y,D.parseLinks=v,D.parseFolderLinks=k,D.getLinks=function(u){const e=[];let F=!1,t=D.linkParseRegExp.exec(u);for(;null!==t;){const[n,,,r,o,i,s]=t;let C;if(r)if([F,C]=b(r,i,s,o,n,!1),F&&"string"==typeof C){const u=B(C);if(u)C=C.slice(0,-u.length);e.push(C)}t=D.linkParseRegExp.exec(u)}return e},D.normalizeLink=b,D.clearNeedDecorateGlobals=function(){z.clear(),G=[]},D}(0,{},C,o,s,n,D),y=m,v=function(u,D,e){"use strict";Object.defineProperty(D,"__esModule",{value:!0});return D.default=(u,D,F)=>(e.JSONML.iterateJSONML(u,((u,t)=>{if(!t){const n=D(u,t,F);e.JSONML.replaceNode(n,u)}if(!e.JSONML.hasChildNodes(u))return;const n=e.JSONML.getChildren(u).map((e=>D(e,u,F)));e.JSONML.removeChildNodes(u),e.JSONML.append(u,...n)})),u),D}(0,{},r),k=v,b=function(u,D,e,F){"use strict";function t(u){return"string"==typeof u||u instanceof String}Object.defineProperty(D,"__esModule",{value:!0});const n="LinkDecorator__emoji";return D.default=function(u){var D,r,o;let i=1;const s=t(u[1]),C=Array.isArray(u[1]);if(u[1]&&!s&&!C)i=2;const E=F.object.clone(u);let l=!1;for(let F=i;F<u.length;F++){const i=u[F]&&t(u[F]),s=t(null===(D=u[1])||void 0===D?void 0:D.class)&&(null===(o=null===(r=u[1])||void 0===r?void 0:r.class)||void 0===o?void 0:o.includes(n));if(i&&!s){E[F]=[];const D=u[F],t=/\uFE0F/g,r="";let o,i=0;const s=new RegExp(e.default);for(;null!==(o=s.exec(D));){l=!0;const u=o[0],e=o.index,t=D.slice(i,e);if(t.length)E[F].push(["span",t]);const r=["span",{class:n+" richEditor_Base-RichEditor__noneditable"},u];E[F].push(r),i=e+u.length}if(l){let u=D.slice(i,D.length);if(u=u.replace(t,r),u.length)E[F].push(["span",u])}if(!E[F].length)E[F]=u[F]}}return l?E:u},D}(0,{},g,t),_=function(u,D,e){"use strict";return Object.defineProperty(D,"__esModule",{value:!0}
10),D.default=function(u,D){if(!D)(0,e.clearNeedDecorateGlobals)();let F;if((0,e.needDecorate)(u,D))F=(0,e.getDecoratedLink)(u);else F=u;return F},D}(0,{},m),L=_,x=function(u,D,e){"use strict";return Object.defineProperty(D,"__esModule",{value:!0}),D.default=function(u,D,F){if("string"==typeof u)return(0,e.wrapLinksInString)(u,D,null==F?void 0:F.needParseFolderLinks);else return u},D}(0,{},m),O=x,N=function(u,D,e,F,t,n,r,o){"use strict";function i(u){return"string"==typeof u||u instanceof String}function s(u,D=""){const e=Object.keys(u).map((u=>u.toLowerCase())),F=D.toLowerCase();return e.includes(F)?u[F]||u[D]:!1}function C(u,D){let e;try{e=JSON.stringify(D)}catch(u){e='"Невалидный Json узел"'}t.Logger.error(`UI/Executor:TClosureОшибка разбора JsonML: ${u}. Ошибочный узел: ${e}`,g)}function E(u,D,F){if(!u[D])u[D]=[];u[D].push(function(u){return{name:"event",args:[],value:u,fn:function(D){const F=function(){arguments[0].result=e.TClosure.getter(this,[u]).apply(this,arguments)}.bind(D);return F.control=D,F.isControlEvent=!1,F}(g)}}(F))}function l(u,D){const e="string"!=typeof D?D:D.substring(0,2048);return k[u]&&!b.test(e)}function a(u,D,e,F,n,E,c,f,B){var k,b;let L,O,N=n,M=n,P=0;if(N&&Array.isArray(N))N=(0,o.default)((0,r.default)(N)),M=N;if(N=y&&h?h(N,f,m):N,i(N)){if(!h||!h.__noNeedEscapeString)N=p.escape(N);return N=N.toString(),p.createText(N,c)}if(!N)return[];const $=N[0];if(i($)&&$.includes(d)&&$!==`${d}Controls/markup:Decorator`){const n=N[0].split(":").slice(1).join(":");if(!1===F&&"undefined"!=typeof window)return void t.Logger.error("Controls/markup: Компонент на клиенте строится в текстовом формате! Обратитесь к Шипину Андрею. Компонент: "+(null!==(k=B[n])&&void 0!==k?k:n));else return p.createControlNew("resolver",null!==(b=B[n])&&void 0!==b?b:n,{},{},N[1],{attr:u,data:D,ctx:this,isVdom:F,defCollection:{id:[],def:void 0},depsLocal:{},includedTemplates:{},viewController:this,context:F?e+"part_"+P++:e,key:c+"0_",internal:{}})}if(!Array.isArray(N))return C("Узел в JsonML должен быть строкой или массивом",N),[];L=M!==N,y^=L;const j=[];if(Array.isArray(N[0])){for(O=0;O<N.length;++O)j.push(a(u,D,e,F,N[O],E,c+O+"_",N,B));return y^=L,j}let w=1;const T=N[0],R={attributes:{},events:{},key:c},S=s(v.validNodes,T);let J;if(!S)return y^=L,[];if("object"==typeof S)J=S;if(N[1]&&!i(N[1])&&!Array.isArray(N[1]))w=2,function(u,D,e){const F=v.validAttributes;for(const t in D){if(!D.hasOwnProperty(t))continue;const n=s(D,t);if("onError"!==t&&!i(n)){C(`Невалидное значение атрибута ${t}, ожидается строковое значение`,D);continue}const r=s(F,t),o=e&&s(e,t);if(r||o||_.test(t))if(!l(t,n))if(x.includes(t))u[t]=n;else u[t]=p.escape(n)}}(R.attributes,N[1],J);for(O=w;O<N.length;++O)j.push(a(u,D,e,F,N[O],{},c+O+"_",N,B));return y^=L,[p.createTag(T,R,j,E,A,g,c)]}const c=Object.assign(...Object.keys(F.validNodes).map((u=>({[u.toLowerCase()]:F.validNodes[u]})))),f=Object.assign(...Object.keys(F.validAttributes).map((u=>({[u.toLowerCase()]:F.validAttributes[u]})))),B={validNodes:c,validAttributes:f},d="component:";let p,A,g,h,m,y,v,k={action:!0,background:!0,cite:!0,codebase:!0,formaction:!0,href:!0,icon:!0,longdesc:!0,manifest:!0,poster:!0,profile:!0,src:!0,usemap:!0},b=new RegExp(`^(${['data:image(//|/)[^;]+;base64[^"]+','data:image(//|/)[^;]+;charset=[^"]+',"http:(//|\\\\)","https:(//|\\\\)","ftp:(//|\\\\)","file:(//|\\\\)","smb:(//|\\\\)","mailto:","tel:","skype:","viber:(//|\\\\)","sbisplugin:(//|\\\\)","Notes:(//|\\\\)","notes:(//|\\\\)","#","./","/"].join("|")})`.replace(/[a-z]/g,(u=>`[${u+u.toUpperCase()}]`))),_=/^data-(?!component$|bind$)([\w-]*[\w])+$/,L=/(\u00a0)|(&#)/g;const x=["style"],O=function(u,D,F,r,o,s,C){var l,c,f,d;p=e.TClosure.createGenerator(r,s,C),A={id:[],def:void 0},g=u,h=g._options.tagResolver,m=g._options.resolverParams||{},y=1,v=g._options.validHtml||B;const k=D.events||{};if(n.constants.isBrowserPlatform)E(k,"on:contextmenu","_contextMenuHandler"),E(k,"on:copy","_copyHandler");let b,_=[],x=D&&D.key||"_",O={_isRootElement:D._isRootElement,refForContainer:D.refForContainer,attributes:D.attributes,events:k,context:D.context},N=g._options.value;if(N=(null==N?void 0:N.i18n)?null!==(l=N.translate())&&void 0!==l?l:N.value:N,N&&N.length)if(Array.isArray(N)&&1===N.length&&i(N[0]))N=[null!==(c=g._options.rootTagName)&&void 0!==c?c:"div",N[0].split("\n").map((function(u){return["p",u]}))];else N=[null!==(f=g._options.rootTagName)&&void 0!==f?f:"div",N];if(!r)b=p.escape,p.escape=function(u){return b(u).replace(L,(u=>"&"===u[0]?"&amp;#":"&nbsp;"))};try{_=a(D,u,F,r,N,O,x+"0_",null,g._options)}
10catch(u){t.Logger.error("UI/Executor:TClosure: "+u.message,void 0,u)}finally{if(!r)p.escape=b}if(!_.length)_=[!g._isMarkupConverter?p.createTag(null!==(d=g._options.rootTagName)&&void 0!==d?d:"div",{key:x+Date.now()+"_"},[],O,A,g,x+"0_"):""];return g=null,h=null,m=null,y=null,v=null,p.joinElements(_,x,A)};return O.stable=!0,O}(0,0,e,i,D,o,b,f),M=function(u,D,e,F,t){"use strict";Object.defineProperty(D,"__esModule",{value:!0});class n extends e.Control{constructor(){super(...arguments),this._template=F}_contextMenuHandler(u){if("a"===u.target.tagName.toLowerCase())u.stopImmediatePropagation()}_copyHandler(u){const D=u.currentTarget.getElementsByClassName(t.getClasses().link);Array.prototype.forEach.call(D,(u=>{const D=u.getElementsByTagName("img")[0].cloneNode(!0),e=document.createElement("span");if(e.innerHTML=u.href,u.contains(D))u.replaceChild(e,D)}))}}return D.default=n,D}(0,{},F,N,m,"undefined"==typeof css_Controls_markup||css_Controls_markup),P=M,$=function(u,D,e,F,t,n,r,o){"use strict";function i(u){if(u.nodeType===Node.TEXT_NODE){const D=u.nodeValue;return null==D?void 0:D.replaceAll("¶","&para")}if(u.nodeType===Node.ELEMENT_NODE){let D=[];const e=u.nodeName.toLowerCase();D[0]=e;const t=u.attributes;if(t.length){const u={};for(let D=0;D<t.length;++D)u[t[D].name]=t[D].value;D[1]=u}let n;if(u.hasChildNodes()){const e=u.childNodes;let F;for(let u=0;u<e.length;++u){if(F=i(e[u]),!u)n=F;D.push(F)}}if(F.isDecoratedLink(e,n))D=F.getUndecoratedLink(n);return D}return[]}const s=/<[a-zA-Z]+.*?>/;return{htmlToJson:u=>{if(!n.constants.isBrowserPlatform)return n.IoC.resolve("ILogger").error("Controls/_decorator/Markup/Converter","htmlToJson method doesn't work on server-side"),[];if(u.trim()&&!s.test(u))return[[],u];let D,e,F=document.createElement("div");F.innerHTML=u.trim();const t="<"===F.innerHTML[0],r=i(F).slice(1);if(!t&&F.innerHTML)r.unshift([]);F=null;const o=r[0];if(t){if("object"==typeof o[1]&&!Array.isArray(o[1]))e=o[1];else e={},D=o.shift(),o.unshift(e),o.unshift(D);e.version="2"}return r},jsonToHtml:(u,D,F)=>{let t;try{(0,o.setDisableCompatForMarkupDecorator)(!0);const n=(0,r.getGeneratorConfig)();t=e({_options:{value:u,tagResolver:D,resolverParams:F},_isMarkupConverter:!0,_moduleName:"Controls/markup:Converter"},{},{},!1,void 0,!1,n),(0,o.setDisableCompatForMarkupDecorator)(!1)}catch(u){n.IoC.resolve("ILogger").error("Controls/_decorator/Markup/Converter",u.message)}finally{(0,o.setDisableCompatForMarkupDecorator)(!1)}return t},deepCopyJson:u=>t([],u,{clone:!0})}}(0,0,N,m,s,o,F,u),j=$,l.modifyJsonRecursively=l.EMOJI_REGEX=l.clearNeedDecorateGlobals=l.needDecorate=l.parseFolderLinks=l.linkParseRegExp=l.parseLinks=l.getLinks=l.Converter=l.linkWrapResolver=l.linkDecorate=l.noOuterTag=l._highlightResolver=l.InnerText=l.Decorator=void 0,Object.defineProperty(l,"Decorator",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(l,"InnerText",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(l,"_highlightResolver",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(l,"noOuterTag",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(l,"linkDecorate",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(l,"linkWrapResolver",{enumerable:!0,get:function(){return O.default}}),l.Converter=j,Object.defineProperty(l,"getLinks",{enumerable:!0,get:function(){return y.getLinks}}),Object.defineProperty(l,"parseLinks",{enumerable:!0,get:function(){return y.parseLinks}}),Object.defineProperty(l,"linkParseRegExp",{enumerable:!0,get:function(){return y.linkParseRegExp}}),Object.defineProperty(l,"parseFolderLinks",{enumerable:!0,get:function(){return y.parseFolderLinks}}),Object.defineProperty(l,"needDecorate",{enumerable:!0,get:function(){return y.needDecorate}}),Object.defineProperty(l,"clearNeedDecorateGlobals",{enumerable:!0,get:function(){return y.clearNeedDecorateGlobals}}),l.EMOJI_REGEX=h.default,Object.defineProperty(l,"modifyJsonRecursively",{enumerable:!0,get:function(){return k.default}}),l}));
11define("Controls/icon",["react/jsx-runtime","react","RequireJsLoader/loadFont","RequireJsLoader/conduct","Env/Env","Controls/Utils/Icon","Application/Page","require","exports","css!Controls/CommonClasse
11s","css!Controls/icon"],(function(e,o,n,t,a,s,i,l,c){var r,d;return Object.defineProperty(c,"__esModule",{value:!0}),r=function(e,o,n,t,a,s,i,l,c){"use strict";function r(e){if("undefined"==typeof window)i.Head.getInstance().createTag("link",{rel:"preload",type:"image/svg+xml",as:"image",href:e,crossorigin:"anonymous"})}function d(e){if(e&&-1!==f.indexOf(e))return e;else return"s"}Object.defineProperty(o,"__esModule",{value:!0});const u="FONT:",f=["s","st","m"],v={SVG:function(e){const o=t.useMemo((()=>{const o=(0,a.getIconData)(e.icon);if(o.svgUrl)return r(o.svgUrl),o.svgUrl;const n=`${s.constants.resourceRoot}${o.iconModule}/${o.iconPackage}.svg`,t=(0,l.getResourceUrl)(n,void 0,!0,void 0,!0);return r(t),`${t}#${o.icon}`}),[e.icon]);return(0,n.jsxs)("svg",{tabIndex:e.tabIndex,...e.eventHandlers,"data-qa":e["data-qa"],"data-qa-key":e["data-qa-key"],ref:e.forwardedRef,className:`controls-icon_svg ${e.className||""}`,fillRule:"evenodd",children:[e.title?(0,n.jsx)("title",{children:e.title}):null,(0,n.jsx)("use",{xlinkHref:o})]})},OLD_FONT:function(e){return(0,n.jsx)("span",{tabIndex:e.tabIndex,...e.eventHandlers,"data-qa":e["data-qa"],"data-qa-key":e["data-qa-key"],title:e.title,ref:e.forwardedRef,className:`${e.className||""} ${e.icon} controls-icon`})},FONT:function(e){const o=t.useMemo((()=>{const o=(0,a.getIconData)(e.icon.split(u)[1]),n=`${o.iconModule}/${o.iconPackage}`,t=(0,c.isCompatibleMode)();return{...(0,a.getIconData)(e.icon.split(u)[1]),loadPath:n,isCompatibleMode:t}}),[e.icon]),s=t.useRef(""),i=t.useRef(e.iconSize);if(s.current!==o.loadPath||i.current!==e.iconSize)(0,c.default)(o.loadPath,e.iconSize),s.current=o.loadPath,i.current=e.iconSize;return(0,n.jsx)("span",{tabIndex:e.tabIndex,translate:"no",...e.eventHandlers,"data-qa":e["data-qa"],"data-qa-key":e["data-qa-key"],title:e.title,ref:e.forwardedRef,className:`${e.className} controls-icon_font_visibility controls-icon controls-icon_lineHeight-strict ${o.isCompatibleMode?o.icon:""} ${o.iconPackage}_${d(e.iconSize)}`,children:!o.isCompatibleMode?o.icon:""})}},m=t.forwardRef((function({iconSize:e="m",...o},s){const i=t.useMemo((()=>{var e;if(null===(e=o.icon)||void 0===e?void 0:e.startsWith(u))return"FONT";else return(0,a.isSVGIcon)(o.icon)?"SVG":"OLD_FONT"}),[o.icon]),l=v[i],c=t.useMemo((()=>({onClick:e=>{var n;null===(n=o.onClick)||void 0===n||n.call(o,e)},onMouseEnter:e=>{var n;null===(n=o.onMouseEnter)||void 0===n||n.call(o,e)},onMouseDown:e=>{var n;null===(n=o.onMouseDown)||void 0===n||n.call(o,e)},onMouseUp:e=>{var n;null===(n=o.onMouseUp)||void 0===n||n.call(o,e)},onMouseLeave:e=>{var n;null===(n=o.onMouseLeave)||void 0===n||n.call(o,e)},onMouseMove:e=>{var n;null===(n=o.onMouseMove)||void 0===n||n.call(o,e)},onTouchStart:e=>{var n;null===(n=o.onTouchStart)||void 0===n||n.call(o,e)}})),[o.onClick,o.onMouseEnter,o.onMouseDown,o.onMouseUp,o.onMouseLeave,o.onMouseMove,o.onTouchStart]),r=o.attrs||{},d=`${e?"controls-icon_size-"+e:""} ${o.iconStyle?"controls-icon_style-"+o.iconStyle:""} ${r.className||o.className||""}`;if(!r.title)r.title=o.tooltip;return r["data-qa"]=r["data-qa"]||o.dataQa,(0,n.jsx)(l,{icon:o.icon,attrs:r,title:r.title,className:d,"data-qa":r["data-qa"],"data-qa-key":o.dataQaKey,eventHandlers:c,forwardedRef:s,iconSize:e,tabIndex:o.tabIndex})}));return o.default=m,o}(0,{},e,o,s,a,i,t,n,"undefined"==typeof css_Controls_CommonClasses||css_Controls_CommonClasses,"undefined"==typeof css_Controls_icon||css_Controls_icon),d=r,c.Icon=void 0,Object.defineProperty(c,"Icon",{enumerable:!0,get:function(){return d.default}}),c}));
12define("Controls/Store",["require","exports","Application/Env"],(function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n="--",o="pageState",r="global";class i{getState(){return i._getState()[i._getContextName(!1)]||{}}get(t,e){const a=null==e?void 0:e.ignoreContext,n=i._getState()[i._getContextName(!1,a)]||{};return n.hasOwnProperty(t)?n[t]:(i._getState()[i._getContextName(!0,a)]||{})[t]}dispatch(t,e,a,n){const o=null==n?void 0:n.ignoreContext;this._setValue(t,e,a,o),this._notifySubscribers(t,void 0,a,o)}sendCommand(t,e){return(i._getState()[i._getContextName(!1)]||{}).hasOwnProperty(t)?this._notifySubscribers(t,e,!1):this._notifySubscribers(t,e,!0)}onPropertyChanged(t,e,a,n){const o=null==n?void 0:n.ignoreContext;return this._addCallback(t,e,a,o)}declareCommand(t,e,a){return this._addCallback(t,e,a)}unsubscribe(t){this._removeCallback(t)}updateStoreContext(t,e){if(t!==i._getActiveContext()){if(i._getState()[i._getContextName(!1)]&&i._getActiveContext()!==r&&!e)delete i._getState()[i._getContextName(!1)];
12i._setActiveContext(t),this._notifySubscribers("_contextName",void 0,!0,!1)}}setGlobalContextName(t,e){if(i._appContext&&e)delete i._getState()[i._getContextName(!1)],delete i._getState()[i._getContextName(!0)];i._appContext=t}getGlobalContextName(){return i._appContext}_setValue(t,e,a,n){const o=i._getState()[i._getContextName(a,n)]||{};if(!o.hasOwnProperty(t))this._defineProperty(o,t,a,n);o["_"+t].value=e,i._setState(o,i._getContextName(a,n))}_defineProperty(t,e,a,n){Object.defineProperty(t,"_"+e,{value:{value:void 0,callbacks:[]},enumerable:!1}),Object.defineProperty(t,e,{set(){},get(){return this["_"+e].value},enumerable:!0}),i._setState(t,i._getContextName(a,n))}_addCallback(t,e,a,o){const r=i._getContextName(a,o),s=i._getState()[r]||{};if(!s.hasOwnProperty(t))this._defineProperty(s,t,a,o);const _=s["_"+t].callbacks,l=[r,"_"+t,+(_.length>0?_[_.length-1].id.split(n)[2]:0)+1].join(n);return _.push({id:l,callbackFn:e}),i._setState(s,r),l}_removeCallback(t){var e;const a=i._getState(),[o,r]=t.split(n);if(a&&a[o]&&(null===(e=a[o][r])||void 0===e?void 0:e.callbacks))a[o][r].callbacks=a[o][r].callbacks.reduce(((e,a)=>{if(a.id!==t)e.push(a);return e}),[]),i._setState(a[o],o)}_notifySubscribers(t,e,a,n){var o;const r=i._getState()[i._getContextName(a,n)]||{};if(null===(o=r["_"+t])||void 0===o?void 0:o.callbacks)r["_"+t].callbacks.forEach((a=>a.callbackFn(void 0!==e?e:r[t])))}static _getState(){return(0,a.getStore)(o).get("value")||{}}static _setState(t,e){const n=(0,a.getStore)(o).get("value")||{};n[e]=t,(0,a.getStore)(o).set("value",n)}static _getActiveContext(){return(0,a.getStore)(o).get("activeContext")||r}static _setActiveContext(t){const e=(t||"").split("@@")[0];return(0,a.getStore)(o).set("activeContext",e)}static _getContextName(t,e){return(t?r:i._getActiveContext())+(e?"":i._getAppContextName())}static _getAppContextName(){return i._appContext?"@@"+i._appContext:""}}i._appContext="",e.default=new i}));
13define("Controls-DataEnv/slice",["Types/entity","Application/Env","require","exports"],(function(e,t,s,i){var r,n,o,l;return Object.defineProperty(i,"__esModule",{value:!0}),r=function(e,t,s,i){"use strict";function r(e){return e instanceof Object}Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{get dataContext(){var e;return null===(e=this._$dataContext)||void 0===e?void 0:e.call(this)}constructor(e){var t;this["[ISlice]"]=!0,this._isExecuting=!1,this._queue=[],this._$dataContext=e.dataContext,this._name=e.name||"";try{this.state=this._initState(e.loadResult,e.config)}catch(s){this.state={},null===(t=null==e?void 0:e.onInitError)||void 0===t||t.call(e,s)}if(this.state instanceof Object)Object.keys(this.state).forEach((e=>{Object.defineProperty(this,e,{enumerable:!1,get(){return this.state[e]}})}));this._onChange=e.onChange,this._onCompleteBeforeApplyState=e.onCompleteBeforeApplyState,this._$onNotifySubscribers=e.onNotifySubscribers}destroy(){if(this._beforeApplyReject)this._beforeApplyReject(new s.PromiseCanceledError("slice has been destroyed"));this._onChange=void 0,this._destroyed=!0,this._$dataContext=void 0,this._$onNotifySubscribers=null,this._onCompleteBeforeApplyState=null}isDestroyed(){return this._destroyed}_beforeApplyState(e){return e}_notifySubscribers(e){var t;null===(t=this._$onNotifySubscribers)||void 0===t||t.call(this,e)}_applyState(e){this._setState({...this.state,...e})}_onRejectBeforeApplyState(){}_needRejectBeforeApply(e,t){return!1}_rejectBeforeApplyPromise(){var e;null===(e=this._beforeApplyReject)||void 0===e||e.call(this,new s.PromiseCanceledError(""))}_executeQueueIfNeed(){if(!this._destroyed)if(this._queue.length){let e={};this._queue.forEach((t=>{e={...e,...t}})),this._queue=[],this.setState(e)}}_setState(e){var t;if(this.isDestroyed())i.logger.error("Controls-DataEnv/slice:AbstractSlice::Произошла попытка установить состояние в уничтоженный экземпляр слайса");const s=this._onSnapshot(e)||e;this._notifySubscribers(s),this.state=s,null===(t=this._onChange)||void 0===t||t.call(this,this.state)}_onSnapshot(e){return e}_getStateFromQueue(){return this._queue.reduce(((e,t)=>({...e,...t})),{})}setState(e){if(this._destroyed)return;const t="function"==typeof e?e({...this.state,...this._stateForApply,...this._getStateFromQueue()}):e;if(this._isExecuting){let e=t;if(this._beforeApplyReject&&this._needRejectBeforeApply(t,this._stateForApply))e={...this._stateForApply,...t},this._stateForApply=null,this._rejectBeforeApplyPromise();return void this._queue.push(e)}if(0===Object.keys(t).length)return;let s;if(r(this.state)&&r(t))s=Object.keys(t).every((e=>this.state[e]===t[e]));else s=this.state===t;if(s)return this._isExecuting=!1,void this._executeQueueIfNeed();this._isExecuting=!0;const i={...this.state,...t},n=this._beforeApplyState(i);if(n instanceof Promise){this._stateForApply=t;return new Promise(((e,t)=>(this._beforeApplyReject=t,n.then((t=>e(t))).catch((e=>t(e)))))).then((e=>{this._stateForApply=null,this._setState(e)})).catch((e=>{if(!e.isCanceled)return Promise.reject(e);else return Promise.resolve(this._onRejectBeforeApplyState()).then((()=>{})).catch((()=>{}))})).finally((()=>{var e;this._beforeApplyReject=null,this._isExecuting=!1,this._stateForApply=null,null===(e=this._onCompleteBeforeApplyState)||void 0===e||e.call(this),this._executeQueueIfNeed()}))}else if(0)throw new Error("Из обработчика _beforeApplyState не вернулось новое состояние");else this._setState(n),this._isExecuting=!1,this._executeQueueIfNeed()}getData(){return this.state}},t}(0,{},e,t),n=r,o=function(e,t,s){"use strict";
13Object.defineProperty(t,"__esModule",{value:!0});class i extends s.default{_initState(e,t){return e}}return t.default=i,t}(0,{},r),l=o,i.AbstractSlice=i.Slice=void 0,Object.defineProperty(i,"Slice",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(i,"AbstractSlice",{enumerable:!0,get:function(){return n.default}}),i}));
14define("Controls-DataEnv/dataLoader",["WasabyLoader/ModulesLoader","UICommon/Deps","UI/Utils","UI/Deps","Types/util","Types/source","Types/object","Types/guards","Types/entity","Types/collection","Types/chain","Router/router","Env/Constants","Core/PromiseLib/PromiseLib","Controls-DataEnv/dataFactory","Controls-DataEnv/context","Browser/Transport","Application/Env","require","exports"],(function(e,t,a,o,n,r,i,s,l,d,c,u,f,_,h,g,m,p,C,E){var $,y,T,v,O,b,D,x,P,F,N,I,L,M,R,S,j,w;return Object.defineProperty(E,"__esModule",{value:!0}),$=function(e,t,a){"use strict";var o;return Object.defineProperty(t,"__esModule",{value:!0}),t.LOAD_STATUS=t.GET_CONFIG_TIMEOUT=t.CLIENT_GET_CONFIG_TIMEOUT=t.SERVER_GET_CONFIG_TIMEOUT=void 0,t.SERVER_GET_CONFIG_TIMEOUT=3e3,t.CLIENT_GET_CONFIG_TIMEOUT=15e3,t.GET_CONFIG_TIMEOUT=a.constants.isServerSide?t.SERVER_GET_CONFIG_TIMEOUT:t.CLIENT_GET_CONFIG_TIMEOUT,function(e){e.LOADING="LOADING",e.READY="READY",e.ERROR="ERROR"}(o||(t.LOAD_STATUS=o={})),t}(0,{},f),y=$,T=function(e,t,a,o){"use strict";function n(e){return e.map((e=>{const t=(0,a.normalizeContextField)(e),n=function(e){if("UserData"===e.name)return"Frame-DataEnv/dataLoader:UserDataFactory";if(!e.metatype)return r[a.FIELD_TYPE.ApplicationObject];else return r[e.metatype]}(e);if(n)return{name:e.name,data:t.value,dataFactoryName:n,field:t};else o.Logger.warn(`Попытка инициализации неподдерживаемого метатипа ${e.metatype}. Он не будет загружен в dataContext.`)})).filter(Boolean)}Object.defineProperty(t,"__esModule",{value:!0}),t.initContext=t.initContextSync=void 0;const r={[a.FIELD_TYPE.ApplicationObject]:"Frame-DataEnv/dataLoader:DataObjectFactory",[a.FIELD_TYPE.Primitive]:"Frame-DataEnv/dataLoader:PrimitiveFieldFactory",[a.FIELD_TYPE.Object]:"Frame-DataEnv/dataLoader:ObjectFieldFactory",[a.FIELD_TYPE.DataSet]:"Frame-DataEnv/dataLoader:DataSetFieldFactory"};return t.initContextSync=n,t.initContext=async function(e,t,r=a.FetchPolicyEnum.LocalFirst,i){const s=e.map(a.normalizeContextField);return n(await a.DataContextAPI.fillContextFields(t,s,{fetchPolicy:r,dataMode:i}).catch((e=>(o.Logger.error(`Произошла ошибка при инициализации контекста. ${e}`),s))))},t}(0,{},g,a),v=T,O=function(e,t,a){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.deserializeContext=void 0,t.deserializeContext=function(e){return(0,a.factory)(e).map((e=>(0,a.factory)(e).toObject())).value()},t}(0,{},c),b=function(e,t,a){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.mergeContext=void 0,t.mergeContext=function(e,t=[]){if(0===t.length)return e;const o=new Map(e.map((e=>[e.name,e])));for(const n of t){const t=o.get(n.name);if(t){if((0,a.isRecord)(t.value)&&(0,a.isRecord)(n.value))t.value.deepMerge(n.value);else if(!(t.value instanceof Error))t.value=n.value}else e.push(n),o.set(n.name,n)}return e},t}(0,{},s),D=function(e,t,a,o,n){"use strict";function r(e){if(!(0,n.isRecord)(e))return null;else return e}return Object.defineProperty(t,"__esModule",{value:!0}),t.toFullObject=t.toObjectReference=t.serializeContext=void 0,t.serializeContext=function(e,t={}){const n=new o.RecordSet({adapter:new a.adapter.Sbis});return e.forEach((e=>{n.add(function(e,t=r){return new a.Model({adapter:new a.adapter.Sbis,format:[{name:"name",type:"string",defaultValue:e.name},{name:"value",type:"record",defaultValue:t(e.value)}]})}(e,t.valueTransform))})),n},t.toObjectReference=function(e){if(!(0,n.isRecord)(e))return null;const t="Id",o=e.get("Id"),r=e.getTypeName();if("Filter"===r)return e;else return new a.Model({adapter:"adapter.sbis",typeName:r,format:{[t]:{type:(0,a.getValueType)(o),defaultValue:o}}})},t.toFullObject=r,t}(0,{},l,d,s),x=function(e,t,a,o,n,r){"use strict";function i(e,t){if(e instanceof Error){(function(e){let t=n.logger.error;if(e instanceof r.RPC.Error)t="warning"===e.errType?n.logger.warn:n.logger.error;return t})(e)(`${t}`,e)}}
14return Object.defineProperty(t,"__esModule",{value:!0}),t.loadErrorHandler=t.loadModule=void 0,t.loadModule=async function(e){try{const t=await(0,a.loadAsync)(e);return(0,o.addPageDeps)([e]),t}catch(t){i(t,`Controls-DataEnv/dataLoader::Ошибка при загрузке модуля ${e}`)}},t.loadErrorHandler=i,t}(0,{},e,o,p,m),P=function(e,t,a,o,n,r,i,s){"use strict";function l(e,t){if(i.query.get.logDataFactoryLoader){const a=new Date,o=`${a.toLocaleTimeString()}.${a.getMilliseconds()}`;i.logger.warn(`DataFactoryLoader ${t.dataFactoryName} ${e} ${o}`)}}function d(e,t){(0,a.loadErrorHandler)(e,t)}Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e){var t,a;this._$config={...e.config},this._$config.dataFactoryArguments=this._$config.dataFactoryArguments||{},this._$router=e.router,this._$loadTimeout=e.loadTimeout||(t=this._$config,(null===(a=t.dataFactoryArguments)||void 0===a?void 0:a.loadDataTimeout)||(o.constants.isServerSide?1e4:null)),this._$name=e.name,this._$dependencies=e.dependencies,this._$errorHandler=e.errorHandler||d,this._$data=e.data,this._$parent=e.parent}async _load(){var e,t,o;let d,c;if(l("Начало загрузки фабрики",this._$config),(0,n.isLoaded)(this._$config.dataFactoryName))d=(0,n.loadSync)(this._$config.dataFactoryName),(0,s.addPageDeps)([this._$config.dataFactoryName]);else d=await(0,a.loadModule)(this._$config.dataFactoryName).catch((e=>(i.logger.error(e),Promise.resolve())));if(l("Завершение загрузки статики",this._$config),!d)return new Error(`Не удалось загрузить фабрику ${this._$config.dataFactoryName}`);try{if(void 0!==this._$data)c=this._$data;else{const e=function(e,t,a,o,n){let r={...t.dataFactoryArguments};if(e.getDataFactoryArguments)r=e.getDataFactoryArguments(r,a,n);if(o&&!(null==r?void 0:r.loadDataTimeout))r.loadDataTimeout=o;const i=r.loaderExtraValues;if(i){const e={};i.forEach((({propName:t,dependencyName:o,dependencyPropName:n,prepare:i})=>{let s=null==a?void 0:a[o];if(s instanceof Object)s=s[n];if(i)e[t]=i(s,e.hasOwnProperty(t)?e[t]:r[t]);else e[t]=s})),r={...r,...e}}return r}(d,this._$config,this._$dependencies,this._$loadTimeout,this._$router);l("Вызов loadData",this._$config);const t=d.loadData(e,this._$dependencies,this._$router,!1,this._$name);if(this._$loadTimeout&&!d.isHandlingTimeoutError)c=await(0,r.wrapTimeout)(t,null==e?void 0:e.loadDataTimeout);else c=await t;if(l("Завершение loadData",this._$config),this._$config.afterLoadCallback){l("Начало загрузки afterLoadCallback",this._$config);const e=await(0,a.loadModule)(this._$config.afterLoadCallback);if(!e)this._$errorHandler(new Error(`Не удалось загрузить модуль afterLoadCallback ${this._$config.afterLoadCallback}`));else this._callAfterLoadCallback(this._$name,e,c),l("Завершение afterLoadCallback",this._$config)}}}catch(a){this._$errorHandler(a,`Controls-DataEnv/dataLoader:DataFactoryLoader::Произошла ошибка во время выполнения метода loadData у фабрики ${this._$config.dataFactoryName} с ключом ${this._$name}\n             и параметрами ${this._$config.dataFactoryArguments}. Узел контекста ${this._$parent} Страница: ${null===(o=null===(t=null===(e=this._$router)||void 0===e?void 0:e.maskResolver)||void 0===t?void 0:t.calculateUrlParams("page/:pageId"))||void 0===o?void 0:o.pageId}`),c=a}return c}_callAfterLoadCallback(e,t,a){try{t(a)}catch(t){this._$errorHandler(t,`DataLoader: Ошибка вызова afterLoadCallback в загрузчике ${e}`)}}isLoading(){return!!this._loadPromise}async load(){if(!this.isLoading())this._loadPromise=this._load();return this._loadPromise}getName(){return this._$name}getDataFactoryName(){return this._$config.dataFactoryName}},t}(0,{},x,f,e,_,p,t),F=function(e,t,a,o,n,r,i,s,l,d,c,u,f,_,h){"use strict";function g(e,t){return t.each((t=>{const o=t.get("Name"),n=e.find((e=>e.name===o)),r=t.get("Field").split(".");if(n){const e=n.value;if(e instanceof a.Model)!function(e,t,o){if(!o.length)return;let n=e;for(let e=0;e<o.length;e++){const r=o[e];if(e===o.length-1&&!n.has(r))return void n.addField({name:r,type:"record",defaultValue:t});let i=n.get(r);if(!(i instanceof a.Model))i=new a.Model({rawData:t.getRawData(),adapter:n.getAdapter()}),n.addField({name:r,type:"record",defaultValue:i});n=i}}(e,t.get("Value"),r)}})),e}function m(e){const t=new o.RecordSet({adapter:"adapter.sbis"});return e.forEach((e=>{var o;if(!e.value)return;const n=new a.Model({adapter:"adapter.sbis",format:[{name:"Name",type:"string",defaultValue:e.name},{name:"Type",type:"string",defaultValue:null===(o=e.value)||void 0===o?void 0:o.getTypeName()}]});t.add(n)})),t}
14function p(e){return new _.RPC.Error({classid:e.class_uuid,user_hint:e.user_hint,message:e.user_msg,details:e.details,url:"",errType:e.type,error_code:e.error_code})}function C(e){const t=new o.RecordSet({adapter:"adapter.sbis"});return e.forEach((e=>{t.add(a.Record.fromObject({contextName:e.contextName,name:e.name,type:e.type,params:e.params instanceof a.Record?e.params:a.Record.fromObject(e.params||{},"adapter.sbis")},"adapter.sbis"))})),t}function E(e){const t=e.getRow(),a=null==t?void 0:t.get("Context"),o=(0,u.deserializeContext)(a),r=null==t?void 0:t.get("UnresolvedFields"),i={};if((0,l.isRecord)(r))r.each(((e,t)=>{i[e]=p((0,n.factory)(t.get("error")).toObject())}));else if((0,l.isRecordSet)(r))r.forEach((e=>{i[e.get("contextName")]=p((0,n.factory)(e.get("error")).toObject())}));return o.forEach((e=>{if(i[e.name])e.value=i[e.name]})),{context:o,errors:i}}function $(e){return"DataSet"===e.type||"Function"===e.type}function y(e){return"Action"===e.type}Object.defineProperty(t,"__esModule",{value:!0}),t.CONTEXT_EXECUTE_TIMEOUT=t.CLIENT_CONTEXT_EXECUTE_TIMEOUT=t.SERVER_CONTEXT_EXECUTE_TIMEOUT=void 0,t.SERVER_CONTEXT_EXECUTE_TIMEOUT=3e3,t.CLIENT_CONTEXT_EXECUTE_TIMEOUT=15e3,t.CONTEXT_EXECUTE_TIMEOUT=h.constants.isServerSide?t.SERVER_CONTEXT_EXECUTE_TIMEOUT:t.CLIENT_CONTEXT_EXECUTE_TIMEOUT;class T{constructor(){}static getSource(){return new r.SbisService}static async executeMethods(e,o,n){const r={Timeout:t.CONTEXT_EXECUTE_TIMEOUT};if(n)r.DistrName=n;return E(await T.getSource().call("DataContext.Execute",{Fields:C(e),Context:(0,c.serializeContext)(o,{valueTransform:c.toFullObject}),Parameters:a.Record.fromObject(r,"adapter.sbis")}))}static serializeContext(e,t={}){return(0,c.serializeContext)(e,t)}static async fillContextFields(e,t,o={}){const{fetchPolicy:n,dataMode:r,distribution:l}=o,u=Object.fromEntries(t.map((({name:e,value:t})=>[e,t]))),_=[],h=[],p=[],C=[],v={},O="demo"===r&&!function(e){return e.every((e=>!!e.value&&e.value instanceof a.Model&&null!==e.value.getKey()))}(t);if(e.forEach((e=>{if($(e))h.push(e);if(function(e){return!$(e)&&!y(e)}(e)&&function(e,t){const a="string"==typeof t?t:t.name;return!s.object.hasValue(e,a)}(u,e))p.push(e);if(y(e))C.push(e)})),h.length>0&&n!==d.FetchPolicyEnum.LocalOnly){const e=T.executeMethods(h,t,l).then((e=>{v.execute=e.context}));_.push(e)}if(p.length>0&&n!==d.FetchPolicyEnum.LocalOnly){const e=(O?"DemoContext":"DataContext")+".Read",a=T.getSource().call(e,{Fields:p,Context:(0,c.serializeContext)(t,{valueTransform:n===d.FetchPolicyEnum.NetworkOnly?c.toObjectReference:c.toFullObject})}).then((e=>{v.read=E(e).context}));_.push(a)}if(C.length>0&&n!==d.FetchPolicyEnum.LocalOnly){const e=T.getSource().call("DataContext.Find",{Context:m(t),Fields:C.map((e=>e.name)),Params:a.Model.fromObject({DereferencingComplexTypes:!0,MetaType:"applicationobject"},"adapter.sbis")}).then((e=>{v.actions=e.getAll()}));_.push(e)}if(_.length>0)return Promise.all(_).then((()=>{let e=t;if(v.execute)e=v.execute;if(v.read)e=(0,i.merge)(v.execute||[],v.read);if(e=(0,f.mergeContext)(t,e),v.actions)e=g(e,v.actions);return e}));else return t}static async execute(e,t,a={}){const o=`MethodResult.${e}`,n={type:"Function",params:a,name:e,contextName:o},r=await T.executeMethods([n],t);if(r.errors[o])return Promise.reject(r.errors[o]);else return new d.DataContextAPI(r.context).getByPath(o)}}return t.default=T,t}(0,{},l,d,c,r,i,n,s,g,D,O,b,m,f),N=F,I=function(e,t,a,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e){this._$pendingElements={},this._$validateErrors=[],this._$router=e.router,this._$validateErrors=function(e){const t=[];return Object.entries(e).forEach((([o,n])=>{const r=a.DataConfigResolver.calcAllDependencies(n,"load");if(r){const a=[],n=[];if(r.forEach((t=>{var r;if(!Object.prototype.hasOwnProperty.call(e,t))a.push(t);else if(null===(r=e[t].dependencies)||void 0===r?void 0:r.includes(o))n.push(t)})),a.length)t.push(`Отсутствуют фабрики с ключами ${a.join(", ")} для загрузчика ${o}`);if(n.length)t.push(`Циклические зависимости у фабрики ${o}: ${n.join(", ")}`)}})),t}(e.configs),this._$data=e.data,this._$loadTimeout=e.loadTimeout,this._$parent=e.parent,this._$startedLoaders=[],this._$loadStartedCallback=e.loadStartedCallback;const t=Object.entries(e.configs);t.sort((([e,t],[a,o])=>{var n,r,i,s;const l=Number.isFinite(null===(n=t.dataFactoryArguments)||void 0===n?void 0:n.priority)?null===(r=t.dataFactoryArguments)||void 0===r?void 0:r.priority:0,d=Number.isFinite(null===(i=o.dataFactoryArguments)||void 0===i?void 0:i.priority)?null===(s=o.dataFactoryArguments)||void 0===s?void 0:s.priority:0;if(d!==l)return d-l;else return e.localeCompare(a)})),this._$configs=new Map(t)}
14_isAllLoadersStarted(){return this._$startedLoaders.length===this._$configs.size}async _callLoader(e,t){var n,r,i;let s={};const l=null!==(n=a.DataConfigResolver.calcAllDependencies(e,"load"))&&void 0!==n?n:[];if(l.length)s=await this._loadDependencies(l);if(!this._$pendingElements[t])this._$startedLoaders.push(t),this._$pendingElements[t]=new o.default({config:e,router:this._$router,dependencies:s,parent:this._$parent,name:t,loadTimeout:this._$loadTimeout,data:null===(r=this._$data)||void 0===r?void 0:r[t]});const d=this._$pendingElements[t].load();if(this._isAllLoadersStarted())null===(i=this._$loadStartedCallback)||void 0===i||i.call(this);return d}async _loadDependencies(e){const t=[],a={};return e.forEach(((e,o)=>{const n=this._$configs.get(e);if(!n)return;const r=this._callLoader(n,e);r.then((t=>{a[o]=t,a[e]=t})),t.push(r)})),await Promise.all(t),a}getPendingContextElementsInfo(){const e=Object.keys(this._$pendingElements);if(e.length>0)return e.map(((e,t)=>{const a=this._$pendingElements[e];return`${t}. Название зависшей фабрики: ${a.getDataFactoryName()}\nКлюч в конфигурации контекста: ${a.getName()}`})).join("\n");else return""}hasPendingContextElements(){return Object.keys(this._$pendingElements).length>0}async load(){if(this._$validateErrors.length)return Promise.reject(this._$validateErrors.join(", "));const e={},t=this.loadEvery(),a=[];for(const[o,n]of Object.entries(t))a.push(n.then((t=>{e[o]=t,delete this._$pendingElements[o]})));return await Promise.all(a),e}loadEvery(e=Array.from(this._$configs.keys())){var t;const a={};e.forEach((e=>{if(this._$configs.has(e))a[e]=this._callLoader(this._$configs.get(e),e)}));for(const[t,o]of this._$configs)if(!e.includes(t))a[t]=this._callLoader(o,t);if(0===this._$configs.size)null===(t=this._$loadStartedCallback)||void 0===t||t.call(this);return a}},t}(0,{},h,P),L=I,M=function(e,t,a,o,n,r,i,s,l,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e){this._$dataContext=e.dataContext,this._$config=e.config,this._$router=e.router,this._$path=e.path||[],this._$loadTimeout=e.loadTimeout,this._$loadStartedCallback=e.loadStartedCallback}
14async _getLoader(){if(this._$loaderPromise)return this._$loaderPromise;if(!this._$loader)return this._$loaderPromise=this.resolveDataConfigs().then((e=>{const t={router:this._$router,data:this._$config.data,loadTimeout:this._$loadTimeout,configs:e,parent:this.getName(),loadStartedCallback:this._$loadStartedCallback};return this._$loader=new o.default(t),this._$loaderPromise=null,this._$loader})),this._$loaderPromise;else return this._$loader}_checkDependencies(){return!0}async loadConfigGetter(){if(!this._checkDependencies());if((0,a.isDataNodeConfigGetter)(this._$config)){let e;if((0,l.isLoaded)(this._$config.configGetter))e=(0,l.loadSync)(this._$config.configGetter),(0,d.addPageDeps)([this._$config.configGetter]);else e=await(0,s.loadModule)(this._$config.configGetter);let t,o={},c=!1;if(e){try{const t=(0,a.callGetConfig)(e,this._$config,this._$dataContext);if(c=!!t.then,c)o=await(0,r.wrapTimeout)(t,i.GET_CONFIG_TIMEOUT);else o=t;if(!(o&&o instanceof Object))(0,s.loadErrorHandler)(new Error(`Из модуля ${this._$config.configGetter} метод getConfig вернул неподдерживаемый формат данных\n                                 Вместо объекта с фабриками вернулось ${o}. Узел контекста будет создан пустым`),""),o={}}catch(e){if(e instanceof Error)t=e;(0,s.loadErrorHandler)(e,`Ошибка при получении конфигурации предзагрузки из модуля ${this._$config.configGetter}`)}if(!a.DataConfigResolver.isOldDataFormat(o)){if(c)n.logger.warn(`Controls-DataEnv/dataLoader:Loader.loadConfigGetter::Метод getConfig у модуля ${this._$config.configGetter} должен быть синхронным!`),a.DataConfigResolver.addCompatibleDepsToPage()}else o=a.DataConfigResolver.convertLoadResultsToFactory(o)}else t=new Error(`Произошла ошибка при загрузке модуля ${this._$config.configGetter}. Узел контекста будет создан пустым`);return this._$dataConfigs=o,this._$resolvedConfig={isAsyncConfigGetter:c,error:t,...this._$config},{dataConfigs:o,isAsyncConfigGetter:c,error:t}}else return Promise.reject("Передан неверный конфиг в loadConfigGetter")}getName(){return this._$path.join(", ")||"root"}async load(){return(await this._getLoader()).load()}async loadEvery(e=[]){return(await this._getLoader()).loadEvery(e)}async resolveDataConfigs(){if(this._$dataConfigs)return this._$dataConfigs;if("configs"in this._$config)this._$dataConfigs=this._$config.configs;else if("configGetter"in this._$config){const e=await this.loadConfigGetter();if(e.dataConfigs)this._$dataConfigs=e.dataConfigs}else this._$dataConfigs={};return this._$dataConfigs}getDataConfigs(){return this._$dataConfigs}getPendingContextElementsInfo(){var e;return(null===(e=this._$loader)||void 0===e?void 0:e.getPendingContextElementsInfo())||""}isReady(){var e;return!(null===(e=this._$loader)||void 0===e?void 0:e.hasPendingContextElements())}getResolvedConfig(){return this._$resolvedConfig}},t}(0,{},h,I,p,_,$,x,e,t),R=function(e,t,a,o,n,r){"use strict";function i(e){if(!e)return 0;const t=e.priority;return Number.isFinite(t)?t:0}Object.defineProperty(t,"__esModule",{value:!0});const s={keyProperty:"id",parentProperty:"parentId",childrenProperty:"children"};return t.default=class{constructor(e){var t;this._loadPromises=new Map,this._$contextNodes=new Map,this._$context=[],this._$startedLoadersCount=0,this._$nodesCount=0,this._$configs=e.configs,this._$dataContextDescription=e.dataContextDescription,this._$dataContextDescriptionMap=this._makeDataContextFieldsMap(null===(t=e.dataContextDescription)||void 0===t?void 0:t.fields),this._$tree=new a.relation.Tree(s),this._$loadTimeout=e.loadTimeout,this._$tree.parseTree(this._$configs),this._$router=e.router,this._$loadStartedCallback=e.loadStartedCallback,this._startLoadCallback=this._startLoadCallback.bind(this)}_findRootTreeItem(){let e;return this._$tree.each(((t,a,o)=>{if(!e&&"root"===a)e=o})),e}async _loadNode(e,t){var a;const r=t.getPath(!0),i=r.toString();this._addToContext(t.value.data||{},!1);const s=this._$contextNodes.get(i)||new n.default({config:e,dataContext:new o.DataContextAPI(this._$context),router:this._$router,path:r,loadTimeout:this._$loadTimeout,loadStartedCallback:this._startLoadCallback});this._$contextNodes.set(i,s);const l=await s.load();return this._addToContext(l,!0),t.value.data=l,t.value.isAsyncConfigGetter=!!(null===(a=s.getResolvedConfig())||void 0===a?void 0:a.isAsyncConfigGetter),l}_collectNodesInPriorityOrder(){const e=[];return this._$tree.each(((t,a,o)=>{const n=o.getPath(!0).toString();e.push({value:t,nodeName:a,node:o,pathStr:n})})),e.sort(((e,t)=>{const a=i(e.value),o=i(t.value);if(o!==a)return o-a;else return e.pathStr.localeCompare(t.pathStr)})),e}_addToContext(e,t=!1){const a=this._$dataContextDescriptionMap;Object.entries(e).forEach((([e,n])=>{const r=null==a?void 0:a[e];if((0,o.isDataContextField)(n,r)){const a=function(e,t){return t.find((t=>t.name===e))}(e,this._$context);if(t&&a)a.value=n;else{const t=(0,o.makeField)(e,n,r);if(t)this._$context.unshift(t)}}}))}async _loadNodeWithRootDeps(e,t){var a;let r=this._$contextNodes.get("root");
14if(!r){const e=this._findRootTreeItem();if(e){const t=e.getPath(!0),a=t.toString();r=new n.default({config:e.value,dataContext:new o.DataContextAPI(this._$context),router:this._$router,path:t,loadTimeout:this._$loadTimeout,loadStartedCallback:this._startLoadCallback}),this._$contextNodes.set(a,r)}}if(!r)return this._loadNode(e,t);const i=await r.loadEvery(e.rootDependencies),s=e.rootDependencies.map((e=>i[e])),l=await Promise.all(s).then((t=>Object.fromEntries(e.rootDependencies.map(((e,a)=>[e,t[a]])))));if((null===(a=e.configGetterArgumentsArray)||void 0===a?void 0:a[0])instanceof Object)e.configGetterArgumentsArray[0].dependenciesData=l;return this._loadNode(e,t)}_startLoadCallback(){var e;if(this._$startedLoadersCount++,this._$startedLoadersCount===this._$nodesCount)null===(e=this._$loadStartedCallback)||void 0===e||e.call(this)}_makeDataContextFieldsMap(e){if(e)return e.reduce(((e,t)=>(e[t.name]=t,e)),{})}async load(){var e;const t=this._collectNodesInPriorityOrder();this._$nodesCount=t.length;for(const{value:a,node:o,pathStr:n}of t)if(null===(e=a.rootDependencies)||void 0===e?void 0:e.length)this._loadPromises.set(n,this._loadNodeWithRootDeps(a,o));else this._loadPromises.set(n,this._loadNode(a,o));await Promise.all([...this._loadPromises.values()]),this._loadPromises.clear();const a={...this._$tree.toObject()};if(this._$dataContextDescription)a[o.CONTEXT_DATA_CONFIG_FIELD]=this._$dataContextDescription;return a}async loadCompatible(e,t){const a=function(e){const t=[];return Object.entries(e).forEach((([e,a])=>{t.push({id:e,...a})})),t}(e);this._$tree.parseTree(a),await this.load();const o={},n={},r={};return this._$tree.each(((e,a,i)=>{const s=this._$contextNodes.get(i.getPath(!0).toString());if(o[a]=e.data,s)if(r[a]=null==s?void 0:s.getResolvedConfig(),t)n[a]=(null==s?void 0:s.getDataConfigs())||{}})),{loadResults:o,dataConfigs:n,configs:r}}getPendingPromisesInfo(){const e=Array.from(this._$contextNodes.values()).filter((e=>!e.isReady()));if(e.length>0){return e.map((e=>`Узел контекста, в котором завис промис: ${e.getName()}, \nЭлементы, которые зависли во время загрузки: \n${e.getPendingContextElementsInfo()}`)).join("\n")}return""}logPendingPromises(){const e=this.getPendingPromisesInfo();if(e)(0,r.loadErrorHandler)(new Error(`Во время загрузки данных остались незавершенные промисы загрузки:\n${e}\n`),"Controls-DataEnv/dataLoader:DataContextLoader:")}},t}(0,{},l,g,M,x),S=R,j=function(e,t,a,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{static async load(e,t=void 0,n=(0,a.getRootRouter)()){return new o.default({configs:e,router:n,loadTimeout:t,parent:"root"}).load()}static loadEvery(e,t,a){return new o.default({configs:e,router:a,loadTimeout:t,parent:"root"}).loadEvery()}static async loadByConfigs(e,t=void 0,o=(0,a.getRootRouter)(),r,i){return new n.default({configs:{},router:o,loadTimeout:t,loadStartedCallback:i}).loadCompatible(e,r)}},t}(0,{},u,I,R),w=j,E.CLIENT_GET_CONFIG_TIMEOUT=E.SERVER_GET_CONFIG_TIMEOUT=E.GET_CONFIG_TIMEOUT=E.initContextSync=E.initDataContext=E.DataContextServiceAPI=E.DataConfigsLoader=E.DataContextLoader=E.Loader=void 0,Object.defineProperty(E,"Loader",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(E,"DataContextLoader",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(E,"DataConfigsLoader",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(E,"DataContextServiceAPI",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(E,"initDataContext",{enumerable:!0,get:function(){return v.initContext}}),Object.defineProperty(E,"initContextSync",{enumerable:!0,get:function(){return v.initContextSync}}),Object.defineProperty(E,"GET_CONFIG_TIMEOUT",{enumerable:!0,get:function(){return y.GET_CONFIG_TIMEOUT}}),Object.defineProperty(E,"SERVER_GET_CONFIG_TIMEOUT",{enumerable:!0,get:function(){return y.SERVER_GET_CONFIG_TIMEOUT}}),Object.defineProperty(E,"CLIENT_GET_CONFIG_TIMEOUT",{enumerable:!0,get:function(){return y.CLIENT_GET_CONFIG_TIMEOUT}}),E}));
15define("Controls-DataEnv/dataFactory",["i18n!Controls-DataEnv","i18n!Controls","WasabyLoader/ModulesLoader","UI/Focus","UI/Deps","Types/util","Types/guards","Types/entity","Types/chain","Controls-DataEnv/slice","Browser/Transport","Application/Env","require","exports"],(function(e,t,r,i,n,o,a,s,c,l,u,d,h,f){var _,g,p,v,y,A,m,D,T,E,C,O,P,b,S,R,F,w,j,L,M,U,I,N,x,V,Y,G,$,k,z,X,W;
15return Object.defineProperty(f,"__esModule",{value:!0}),function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.CONTEXT_DATA_CONFIG_FIELD=t.CONTEXT_NODE_PATH=t.CONTEXT_STORE_FIELD=t.STORE_ROOT_NODE_KEY=void 0,t.STORE_ROOT_NODE_KEY="root",t.CONTEXT_STORE_FIELD=Symbol.for("ContextStoreField"),t.CONTEXT_NODE_PATH=Symbol("$_CONTEXT_NODE_PATH_$"),t.CONTEXT_DATA_CONFIG_FIELD="$_CONTEXT_DATA_CONFIG_$",t}(0,{}),_=function(e,t,r,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class o extends r.Slice{load(e,t){const r=e.config.configs[t];if(r){const n=(0,i.loadSync)("Controls-DataEnv/dataLoader").Loader.load(r);if(n instanceof Promise)return new Promise(((r,i)=>{this._promiseReject=i,n.then((i=>{this._promiseReject=null;const o={...this.state.results,[t]:i};if(!this.isDestroyed())this.setState({results:o});r({...n,config:e.config,results:o})}))}))}else n.logger.error("Area:Initializer: Указан не существующий ключ.");return Promise.resolve(e)}_initState(e,t){return{...e,config:t}}destroy(){var e;null===(e=this._promiseReject)||void 0===e||e.call(this),super.destroy()}}return t.default=o,t}(0,{},l,r,d),g=_,p=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i{static loadData(e,t,r){if(!(null==e?void 0:e.loadDataMethod))return Promise.resolve(void 0);else return e.loadDataMethod(e.loadDataMethodArguments,t,r)}}return i.slice=r.Slice,t.default=i,t}(0,{},l),v=p,y=function(e,t,r,i,n){"use strict";function o(e,t,r){const i=e instanceof Function?e:e.getConfig;let n=t.configGetterArgumentsArray||[t.configGetterArguments];return n=[...n],n.push(r),i.apply(null,n)}Object.defineProperty(t,"__esModule",{value:!0}),t.callGetConfig=void 0;const a="Controls-DataEnv/dataFactory:DataConfigResolver",s={list:"Controls-DataEnv/compatibleList:CompatibleList",custom:"Controls-DataEnv/dataFactory:CompatibleCustom",area:"Controls-DataEnv/dataFactory:CompatibleArea"};t.callGetConfig=o;class c{static getConfigFromLoaderSync(e,t){if(e.isResolvedConfigGetter)return c.normalizeConfigs(e.configGetter);if(!(0,r.isLoaded)(e.configGetter))throw new Error(`${a}::configGetter с именем ${e.configGetter} не загружен`);else{const i=(0,r.loadSync)(e.configGetter);if(!i)throw new Error(`${a} Модуль ${e.configGetter} ничего не экспортирует`);else{let r=o(i,e,t);if(!(r instanceof Object))n.logger.error(`Метод getConfig из модуля ${e.configGetter} должен возвращать объект с набором фабрик данных, сейчас возвращается\n                    ${i}`),r={};return c.normalizeConfigs(r)}}}static isDataFactory(e){return Object.values(e).every((e=>e.hasOwnProperty("dataFactoryName")))}static isDataConfigs(e){return c.isDataFactory(e)}static isFlatContextConfig(e){return e instanceof Object&&!!e.loadResults&&c.isDataConfigs(e.configs)}static isFlatObjectTree(e){return"object"==typeof e&&Object.values(e).some((e=>e.hasOwnProperty("parentId")&&!!e.parentId))}static isIHierarchyContextConfig(e){return e instanceof Object&&!!e.loadResults&&c.isFlatObjectTree(e.configs)}static normalizeConfigs(e){const t={};return Object.entries(e).forEach((([e,r])=>{if(!c.isDataFactory([r]))t[e]=c.convertToDataConfig(r);else t[e]=r})),t}static convertToDataConfig(e){const t=e,r=e.type||"list";return{dataFactoryName:s[r],dataFactoryArguments:{...t,loadDataTimeout:t.loadDataTimeout||t.loadTimeout},dependencies:e.dependencies,afterLoadCallback:e.afterLoadCallback}}static async loadConfigGetter(e,t){const s=await async function(e){try{const t=await(0,r.loadAsync)(e);return(0,i.addPageDeps)([e]),t}catch(t){if(t instanceof Error)n.logger.error(`${a} Ошибка при загрузке модуля ${e}`,0,t)}}(e.configGetter);let l={};if(!s)throw new Error(`${a}:: Не удалось загрузить модуль ${e.configGetter}`);else{const r=o(s,e,t),i=!!r.then;if(i)l=await r;else l=r;if(c.isDataFactory(l)){if(i)throw new Error(`${a} Метод для получения конфига у модуля ${e.configGetter} должен быть синхронным, загрузка с асинхронным методом невозможна`)}else l=c.normalizeConfigs(l)}return l}static addCompatibleDepsToPage(){(0,i.addPageDeps)(Object.values(s))}static isOldDataFormat(e){return Object.values(e).some((e=>!e.dataFactoryName))}static convertLoadResultsToFactory(e,t){const r={};return Object.entries(e).forEach((([e,i])=>{const n=i instanceof Object;let o=n&&i.dataFactoryName;if(!o){o=n&&i.type&&!!s[i.type]?s[i.type]:s.custom}const a=t&&t[e],l=a&&!c.isOldDataFormat({[e]:a}),u=n&&!c.isOldDataFormat({[e]:i}),d=n&&i.key;if(l||u)r[d||e]=a?t[e]:i;else r[d||e]={dataFactoryName:o,dataFactoryArguments:i,afterLoadCallback:n?i.afterLoadCallback:void 0,dependencies:n&&i.dependencies?i.dependencies:[]};if(d)r[e]=r[d]})),r}static resolveRootDeps(e,t){const r={};for(const[i,n]of Object.entries(e))for(const[,e]of Object.entries(n)){const o=c.calcAllDependencies(e,t),a=[];
15if(o.forEach((e=>{if(!n.hasOwnProperty(e))a.push(e)})),a.length)r[i]=a}return r}static calcAllDependencies(e,t){let r=e.dependencies||[];const i=e.dataFactoryArguments||{},n="load"===t?i.loaderExtraValues:i.sliceExtraValues;if(n){const e=n.map((({dependencyName:e})=>e));r=r.concat(e.filter((e=>!r.includes(e))))}return r}}return t.default=c,t}(0,{},r,n,d),A=y,m=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionManager=void 0;return t.ActionManager=class{constructor(){this._actions={}}startAction(e,t=[]){const r=this._actions[e];return Promise.resolve(null==r?void 0:r(...t))}registerAction(e,t){this._actions[e]=t}unregisterAction(e){delete this._actions[e]}hasRegisterAction(e){return!!this._actions[e]}},t}(0,{}),D=function(e,t,r,i){"use strict";function n(e){return!(!e||!e.isChanged())}Object.defineProperty(t,"__esModule",{value:!0}),t.ConfirmationManager=void 0;return t.ConfirmationManager=class{constructor(e){this._isDisplayed=!1,this._options=function(e={}){return{message:(null==e?void 0:e.message)||r("Сохранить изменения?"),needShowConfirmationCallback:(null==e?void 0:e.needShowConfirmationCallback)||n}}(e)}confirmSave(e){if(this._isDisplayed)return Promise.resolve();if(this._needShowConfirmation(e))this._showPopup().then((e=>{if(this._isDisplayed=!1,!0===e)return Promise.resolve(!0);else return Promise.reject()})).catch((()=>{this._isDisplayed=!1}));else return Promise.resolve(!0);return Promise.resolve(!0)}reset(){this._isDisplayed=!1}_needShowConfirmation(e){return this._options.needShowConfirmationCallback(e)}async _showPopup(){this._isDisplayed=!0;const{Confirmation:e}=await(0,i.loadAsync)("Controls/popup");return e.openPopup({message:this._options.message,type:"yesno"},null)}},t}(0,{},e,r),T=function(e,t,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorManager=void 0;return t.ErrorManager=class{async processSourceError(e){return(await this._getErrorController()).process({error:e}).then((t=>{if(t)this._showError(t);if(e instanceof i.RPC.Error)throw e}))}async _showError(e){(await this._getDialogOpener()).open(e,{opener:null,modal:!1})}async _getErrorController(){if(this._errorController)return Promise.resolve(this._errorController);const{ErrorController:e}=await(0,r.loadAsync)("Controls/error");return new e}async _getDialogOpener(){if(this._dialogOpener)return Promise.resolve(this._dialogOpener);const{DialogOpener:e}=await(0,r.loadAsync)("Controls/error");return new e}},t}(0,{},r,u),E=function(e,t){"use strict";var r;return Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_USERDATA_PROPERTY=t.DEFAULT_DATA_PROPERTY=t.FormSliceActionType=void 0,function(e){e.Save="fullSave",e.PartialUpdate="partial"}(r||(t.FormSliceActionType=r={})),t.DEFAULT_DATA_PROPERTY="record",t.DEFAULT_USERDATA_PROPERTY="UserData",t}(0,{}),C=E,O=function(e,t,r,i,n){"use strict";function o(e){return!0===e?s.valid:s.invalid}var a,s;Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationSlice=t.VALIDATION_STATE=t.TValidationStatus=void 0,function(e){e.Valid="valid",e.Invalid="invalid",e.InvalidAccent="invalidAccent"}(a||(t.TValidationStatus=a={})),function(e){e.valid="valid",e.invalid="invalid",e.invalidAccent="invalidAccent"}(s||(t.VALIDATION_STATE=s={}));class c extends r.Slice{constructor(){super(...arguments),this._validators={}}get validationState(){return this.state.validationState||{}}get(e){}registerValidators(e,t,r){if(!(null==r?void 0:r.current))i.logger.warn(`Ошибка регистрации валидатора: не указан ref на виджет для ${e}. Фокус при валидации невозможен.`);this._validators[e]={ref:r,callbacks:t}}unRegisterValidators(e){delete this._validators[e]}async validate(e,t=!0){const r=await this._validate(e,t);return this.setState({validationState:{...this.validationState,[e]:o(r)}}),r}resetValidation(e){if(this.validationState[e]&&this.validationState[e]!==a.Valid)this._closeInfobox(),this.setState({validationState:{...this.validationState,[e]:a.Valid}})}
15validateAll(){return this.validateSome(Object.keys(this._validators))}validateSome(e){this._closeInfobox();const t=[];return e.forEach((e=>{t.push(this._validate(e,!1))})),Promise.all(t).then((t=>{var r;const i={},n=[];for(let c=0;c<t.length;c++){const l=t[c],u=o(l);if((u===a.Invalid||u===a.InvalidAccent)&&((s=l)&&(null==s?void 0:s.msg)))if(null===(r=l.validator.ref)||void 0===r?void 0:r.current)n.push(t[c]);i[e[c]]=u}var s;if(n.length){const[e]=n;this._activateValidatorInput(null==e?void 0:e.validator),this._showInfobox(e.validator,e.msg)}return this.setState({validationState:i}),t}))}isValid(){let e=!0;for(const t of Object.values(this.validationState))if(t===a.Invalid||t===a.InvalidAccent)e=!1;return e}focus(e){let t=!1;for(const r in this.validationState)if(r===e){if(this.validationState[r]!==a.Valid&&this.validationState[r]!==a.InvalidAccent)t=!0,this.setState({validationState:{...this.validationState,[r]:a.InvalidAccent}})}else if(this.validationState[r]!==a.Valid)this.setState({validationState:{...this.validationState,[r]:s.invalid}});return t}_activateValidatorInput(e){var t,r;if(!(null===(t=e.ref)||void 0===t?void 0:t.current));else(0,n.activate)(null===(r=e.ref)||void 0===r?void 0:r.current,{enableScrollToElement:!0})}_validate(e,t=!0){if(t)this._closeInfobox();if(this._validators[e]){let r=!0;const i=[];let n;return this._validators[e].callbacks.map((t=>{const o=t({value:this.get(e)});if(o instanceof Promise)return o.then((e=>{if(!0!==e)if(r=!1,!n)n=e})),i.push(o);if(!0!==o){if(r=!1,!n)n=o;i.push(Promise.resolve(o))}})),Promise.all(i).then((()=>
15{if(t&&n)this._showInfobox(this._validators[e],n);return r?r:{msg:n,validator:this._validators[e]}}))}return Promise.resolve(!0)}_showInfobox(e,t){this._infoboxOpenerCb((()=>{var r;if(t&&(null===(r=e.ref)||void 0===r?void 0:r.current)){const r=function(e){if(!e)return null;else return e}(e.ref.current);if(r)this._infoboxOpener.openPopup({target:r,message:t,...this._getInfoboxPopupOptions()})}}))}_getInfoboxPopupOptions(){return{closeOnOutsideClick:!1,borderStyle:"danger"}}_closeInfobox(){this._infoboxOpenerCb((()=>{this._infoboxOpener.closePopup()}))}_infoboxOpenerCb(t){if(this._infoboxOpener)t();else new Promise(((t,r)=>{e(["Controls/popup"],t,r)})).then((({Infobox:e})=>{this._infoboxOpener=e,t()})).catch((function(e){requirejs.onError(e)}))}}return t.ValidationSlice=c,t}(h,{},l,d,i),P=O,b=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.createLoader=void 0,t.createLoader=function(e){const{source:t,sourceOptions:r}=e;if(t)if(function(e){const t={construct:()=>t};try{return!!new new Proxy(e,t)}catch(e){return!1}}(t))return new t(r);else return t(r)},t}(0,{}),S=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.getFieldDeclaration=void 0,t.getFieldDeclaration=function(e,t){const i=(0,r.getValueType)(t);if(null!==i&&"object"==typeof i)return{name:e,...i};else return{name:e,type:i}},t}(0,{},s),R=function(e,t,r,i){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.resolveActionFunction=void 0,t.resolveActionFunction=async function(e,t){if(e){if("function"==typeof e)return e;const t=await(0,r.loadAsync)(e).catch((e=>{throw i.logger.error(e),e}));if("function"==typeof t)return t;else{const t=new Error(`Модуль ${e} должен возвращать функцию.`);throw i.logger.error(t),t}}if(!t)return i.logger.error("Не передана реализация по умолчанию"),Promise.reject();else return t},t}(0,{},r,d),F=function(e,t,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{static loadData(e,t,r){const n=[];return e.initialKeys.forEach((t=>{n.push((0,i.loadSync)("Controls-DataEnv/dataLoader").Loader.load(e.configs[t],void 0,r).then((e=>({[t]:e}))))})),Promise.all(n).then((e=>{let t={};return e.forEach((e=>{t={...t,...e}})),{results:t,type:"area"}}))}}return n.slice=r.default,t.default=n,t}(0,{},_,r),w=F,j=function(e,t,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends i.Slice{constructor(){super(...arguments),this["[ICompatibleSlice]"]=!0}}class o extends r.default{}return o.slice=n,t.default=o,t}(0,{},p,l),L=j,M=function(e,t,r,i,n,o,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_FORM_SLICE_NAME=t.NewFormSlice=void 0;class c extends r.ValidationSlice{constructor(){super(...arguments),this._dataContextChanged=!1}_initState(e,t){var r;return this._dataContextUnsubscribe=null===(r=this.dataContext)||void 0===r?void 0:r.onChange((e=>{this._dataContextChanged=!0,this.resetValidation(e)})),this._customSubmit=t.submit,this._submitArguments=t.submitArguments,this._router=t.router,this._errorManager=new i.ErrorManager,this._actionManager=new o.ActionManager,{validationState:{}}}get(e){var t;return null===(t=this.dataContext)||void 0===t?void 0:t.getByPath(e)}async submit(){const e=await this.startAction("save");if(null==e?void 0:e.canceled)return Promise.resolve({canceled:!0});else return this._submit()}async delete(){return this._delete()}hasChanges(){return!!this._dataContextChanged}destroy(){var e,t;null===(e=this._dataContextUnsubscribe)||void 0===e||e.call(this),null===(t=this._pe
15ndingResolveFunction)||void 0===t||t.call(this)}registerAction(e,t){this._actionManager.registerAction(e,t)}hasRegisterAction(e){return this._actionManager.hasRegisterAction(e)}unregisterAction(e){this._actionManager.unregisterAction(e)}startAction(e){return this._actionManager.startAction(e)}initChangePending(){if(!this._actionManager.hasRegisterAction("registerPending"))throw new Error("Функция регистрации пендинга не определена на слайсе.");const e=new Promise((e=>{this._pendingResolveFunction=e}));this._actionManager.startAction("registerPending",[e,{showLoadingIndicator:!1,validate:()=>(this._actionManager.startAction("beforeCancel"),this.hasChanges()),onPendingFail:e=>{this._actionManager.startAction("cancel").then((()=>{this._showConfirmDialog(e)}))}}])}_showConfirmDialog(e){if(void 0!==e)this._confirmDialogResult(e);else this._showConfirmPopup("yesnocancel",s("Чтобы продолжить редактирование, нажмите «Отмена»")).then((e=>(this._confirmDialogResult(e),e)))}async _confirmDialogResult(e){if(!0===e){if(await this.validateAll(),!this.isValid())return this._actionManager.startAction("cancelFinishingPending");this.submit().then((e=>{if(this._pendingResolveFunction)this._pendingResolveFunction(),this._pendingResolveFunction=void 0;return e}),(()=>{this._actionManager.startAction("cancelFinishingPending")}))}else if(!1===e){if(this._pendingResolveFunction)this._pendingResolveFunction(),this._pendingResolveFunction=void 0}else this._actionManager.startAction("cancelFinishingPending")}async _showConfirmPopup(e,t){const{Confirmation:r}=await(0,a.loadAsync)("Controls/popup");return r.openPopup({message:s("Сохранить изменения?"),details:t,type:e})}async _submit(){return this._callWithLongOperationTracking(this._customSubmit,this._defaultSubmit,[this.dataContext,this._router,this._submitArguments]).catch((e=>(this._errorManager.processSourceError(e),Promise.reject(e))))}async _delete(){return this._callWithLongOperationTracking(this._customSubmit,this._defaultDelete,[this.dataContext,this._router])}async _callWithLongOperationTracking(e,t,r){const i=await(0,n.resolveActionFunction)(e,t.bind(this));return this._withLongOperationTracking((()=>i(...r)))}_withLongOperationTracking(e){this.startAction("longOperationStart");const t=e();return Promise.resolve(t).then((e=>(this._dataContextChanged=!1,e))).finally((()=>{this.startAction("longOperationEnd")}))}async _defaultDelete(){var e;try{return await(null===(e=this.dataContext)||void 0===e?void 0:e.execute("Destroy",{}))}catch(e){return this._errorManager.processSourceError(e)}}async _defaultSubmit(){var e;const t=await(null===(e=this.dataContext)||void 0===e?void 0:e.execute("Send",{}));return this._dataContextChanged=!1,t}}return t.NewFormSlice=c,t.DEFAULT_FORM_SLICE_NAME="NewFormSlice",t}(0,{},O,T,R,m,r,t),U=M,I=function(e,t,r,i,n,o){"use strict";function a(e){return"object"==typeof e&&!e["[Types/_entity/IObject]"]}function s(e){return"object"==typeof e&&!!e["[Types/_entity/IObject]"]}return Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeValueToSet=t.isPlainObject=t.isIObject=t.setPropertyValue=void 0,t.setPropertyValue=function(e,t,r){if(s(e))return function(e,t,r){if(!e.has(t))e.addField((0,n.getFieldDeclaration)(t,r));return i.object.setPropertyValue(e,t,r),r}(e,t,r);if(a(e))return function(e,t,r){return e[t]=r}(e,t,r);else return},t.normalizeValueToSet=function(e,t){let i=t;if(t instanceof r.Record&&e instanceof r.Record&&(n=e.getAdapter(),a=t.getAdapter(),!Object.getPrototypeOf(n).isPrototypeOf(a)))i=function(e,t){const r=(0,o.factory)(e).toObject();return e.constructor.fromObject(r,t,e.getTypeName())}(t,e.getAdapter());var n,a;return i},t.isPlainObject=a,t.isIObject=s,t}(0,{},s,o,S,c),N=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.isDataNodeConfigs=t.isDataNodeConfigGetter=void 0,t.isDataNodeConfigGetter=function(e){return e instanceof Object&&!!e.configGetter},t.isDataNodeConfigs=function(e){return e instanceof Object&&!!e.configs},t}(0,{}),x=N,V=function(e,t,r,i){"use strict";
15Object.defineProperty(t,"__esModule",{value:!0});class n extends i.default{constructor(){super(...arguments),this["[ICompatibleSlice]"]=!0}}class o extends r.default{}return o.slice=n,t.default=o,t}(0,{},F,_),Y=V,G=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i{static loadData(){return Promise.resolve({})}}return i.slice=r.NewFormSlice,t.default=i,t}(0,{},M),$=G,k=function(e,t,r,i,n,o,a,s,c,l,u,d){"use strict";function h(e,t,r){if(!e||0===t.length)return;let n=e;for(let e=0;e<t.length-1;e++)if(n=i.object.getPropertyValue(n,t[e]),!n)return;const o=t[t.length-1];return(0,l.setPropertyValue)(n,o,r)}Object.defineProperty(t,"__esModule",{value:!0}),t.injectValue=t.DataWrapper=void 0;const f=".",_={create:"Create",read:"Read",update:"Write",destroy:"Destroy"};class g extends d.NewFormSlice{constructor(){super(...arguments),this._isChanges=!1,this._moduleName="Controls-DataEnv/dataFactory:FormSlice"}_initState(e,t){super._initState(e,t),this._config=t;const r=new v(this._normalizeLoadResults(e),{newRecord:!t.id});return this._onDataSave=t.onDataSave||p,this._onDataLoad=t.onDataLoad||p,this._onDataChange=t.onDataChange||p,this._confirmationManager=new a.ConfirmationManager(null==t?void 0:t.confirmationOptions),this._errorManager=new s.ErrorManager,this._onDataLoad(r,this),{key:t.id||r.getId(),store:r,readOnly:t.readOnly,loader:(0,o.createLoader)(t),validationState:{},version:0,crudContract:(i=t.crudContract,{..._,...i}),error:this._getErrorState(e)};var i}_beforeApplyState(e){if(e.store.getStore()&&this.store.getStore()!==e.store.getStore())this._beforeRecordClose();if(e.record&&e.record!==this.store.getStore())e.store=new v(this._normalizeLoadResults(e.record));return super._beforeApplyState(e)}setEditing(e){this.setState({editing:e})}get readOnly(){return this.state.readOnly}setReadOnly(e){if(this.state.readOnly!==e)this.setState({readOnly:e})}async send(){var e;const t=await this.startAction("save");if(null==t?void 0:t.canceled)return Promise.reject();else return null===(e=this.dataContext)||void 0===e?void 0:e.execute("Send",{}).then((e=>(this._isChanges=!1,e))).catch((e=>(this._errorManager.processSourceError(e),e)))}async contextDestroy(){var e;return null===(e=this.dataContext)||void 0===e?void 0:e.execute(this.state.crudContract.destroy).catch((e=>(this._errorManager.processSourceError(e),e)))}hasChanges(){return this._isChanges}create(e){if(this._isLocalData)throw new Error(`${this._moduleName} Не задан источник в опции source.`);return this.loader.create(e||this._config.createMetaData).then((e=>{this.setState({store:new v(e),error:this._getErrorState(e)}),this._isChanges=!1})).catch((e=>this._errorManager.processSourceError(e)))}read(e){if(this._isLocalData)throw new Error(`${this._moduleName} Не задан источник в опции source.`);return this._beforeRecordClose().then((()=>this.loader.read(this.key,e||this._config.readMetaData).then((e=>{this.setState({store:new v(e),error:this._getErrorState(e)}),this._isChanges=!1})).catch((e=>this._errorManager.processSourceError(e)))))}async update(e=c.FormSliceActionType.PartialUpdate,t){var r;if(this._isLocalData)return null===(r=this._onDataSave)||void 0===r||r.call(this,this._getStoreRecord(),e),Promise.resolve();const i=this.store.get(c.DEFAULT_USERDATA_PROPERTY)?this.store.getStore():this.store.get(c.DEFAULT_DATA_PROPERTY);return await this.startAction("save"),this.loader.update(i,t).then((()=>{var t;return null===(t=this._onDataSave)||void 0===t||t.call(this,this._getStoreRecord(),e),this._isChanges=!1,!0})).catch((e=>this._errorManager.processSourceError(e)))}async delete(e){if(this._isLocalData)throw new Error(`${this._moduleName} Не задан источник в опции source.`);return this.loader.destroy(this.key,e||this._config.destroyMetaData).catch((e=>this._errorManager.processSourceError(e)))}async submit(){return this.send()}initChangeRecordPending(){this.initChangePending()}get(e){return this.store.get(e)}set(e,t){var r,i;const n=this.store.get(e),o=this.store.set(e,t);if(o)this._isChanges=!0,null===(r=this._onDataChange)||void 0===r||r.call(this,this,o,{property:e,previousValue:n,nextValue:t}),null===(i=this._onChange)||void 0===i||i.call(this),this._upVersion()}has(e){return this.store.has(e)}isApplicationObject(){return this._getStoreRecord().isTyped()}isChanged(){return this._getStoreRecord().isChanged()}destroy(){this._onDataChange=null,this._onDataSave=null,this._onDataLoad=null,
15super.destroy()}getCloneRecord(){var e;return null===(e=this._getStoreRecord())||void 0===e?void 0:e.clone()}getData(){return this._getStoreRecord()}mergeData(e){this._getStoreRecord().merge(e)}deepMergeData(e){this._getStoreRecord().deepMerge(e),this._upVersion()}_upVersion(){if(void 0!==this.state.version)this.setState({version:this.state.version+1})}get _isLocalData(){return!this.loader}_normalizeLoadResults(e){if(!e||e instanceof Error)return new r.Model({});if((null==e?void 0:e.has(c.DEFAULT_DATA_PROPERTY))||(null==e?void 0:e.has(c.DEFAULT_USERDATA_PROPERTY))&&e.getTypeName()!==c.DEFAULT_USERDATA_PROPERTY)return e;const t=new r.Model({adapter:e.getAdapter()});return t.addField({name:c.DEFAULT_DATA_PROPERTY,type:"record"}),t.set(c.DEFAULT_DATA_PROPERTY,e),t.acceptChanges([c.DEFAULT_DATA_PROPERTY]),t}_getStoreRecord(){return this.store.getStore().get(c.DEFAULT_DATA_PROPERTY)}_beforeRecordClose(){if(!this.store.getStore())return Promise.resolve();else return this._confirmationManager.confirmSave(this.store.getStore()).then((async()=>{if(await this.validateAll(),!this.isValid())throw Error("Некорректно заполнены обязательные поля");return this.update()})).catch((()=>{if(this.store.needDestroy())return this.loader.destroy(this.store.getId())}))}_getErrorState(e){return e instanceof Error?e:void 0}}t.default=g;const p=()=>{};class v{constructor(e,t){this._newRecord=!1,this._store=this._normalizeStore(e),this._newRecord=!!(null==t?void 0:t.newRecord)}set(e,t){const{path:r,binding:i,root:n}=this._normalizeBinding(e),o=n===c.DEFAULT_USERDATA_PROPERTY,a=this.get(e);if(o)return this._setUserData(i,t),this._isChanged(t,a);if(this._store.has(i))return this._store.set(i,(0,l.normalizeValueToSet)(this._store,t)),this._isChanged(this._store.get(i),a);const s=this._store.get(n);if(null==s?void 0:s.has(i))return s.set(i,(0,l.normalizeValueToSet)(s,t)),this._isChanged(s.get(i),a);const u=h(this._store,r,(0,l.normalizeValueToSet)(s,t));return this._isChanged(u,a)}get(e){const{path:t,binding:r,root:o}=this._normalizeBinding(e);if(this._store.has(r))return this._store.get(r);const a=this._store.get(o);if(null==a?void 0:a.has(r))return a.get(r);else return function(e,t){let r=e;for(const e of t){if(!r)return;if(o=r,(0,n.isRecord)(o)&&"variant"===o.getMetaType())r=r.get("data");r=i.object.getPropertyValue(r,e)}var o;return r}(this._store,t)}has(e){return!!this.get(e)}getCount(){return this._store.get(c.DEFAULT_USERDATA_PROPERTY).getFormat().getCount()+this._store.get(c.DEFAULT_DATA_PROPERTY).getFormat().getCount()}getStore(){return this._store}getId(){const e=this._store.get(c.DEFAULT_DATA_PROPERTY);if(e)return e.getKey();else return this._store.getKey()}getType(e){if(!this.has(e))return;const{root:t,binding:r}=this._normalizeBinding(e);if(this._store.has(r))return this._getType(this._store,r);const i=this._store.get(t);if(null==i?void 0:i.has(r))return this._getType(i,r);const[n,o]=[e.slice(0,e.length-1),...e.slice(e.length-1)];return this._getType(this.get(n),o)}needDestroy(){return this._newRecord&&!!this.getId()}_getType(e,t){var r;const i=null===(r=null==e?void 0:e.getFormat)||void 0===r?void 0:r.call(e);if(!i)return;const n=i.getFieldIndex(t);if(!(null==n||n<0))return i.at(n)}_normalizeStore(e){if(e&&e["[Types/_entity/Record]"])return e;else return new r.Model({adapter:new r.adapter.Sbis})}_normalizeBinding(e){if(!Array.isArray(e))e=e.split(f);const t=e[0];if(this._store.has(t))return{binding:e.join(f),path:[t,...e],root:t};if(t===c.DEFAULT_USERDATA_PROPERTY)return{binding:e.join(f),path:e,root:c.DEFAULT_USERDATA_PROPERTY};else return{binding:e.join(f),path:[c.DEFAULT_DATA_PROPERTY,...e],root:c.DEFAULT_DATA_PROPERTY}}_setUserData(e,t){if(!this._store.has(c.DEFAULT_USERDATA_PROPERTY))this._store.addField({name:c.DEFAULT_USERDATA_PROPERTY,type:"record"});let i=this._store.get(c.DEFAULT_USERDATA_PROPERTY);if(!i)this._store.set(c.DEFAULT_USERDATA_PROPERTY,new r.Model({adapter:this._store.getAdapter()})),this._store.acceptChanges([c.DEFAULT_USERDATA_PROPERTY]),i=this._store.get(c.DEFAULT_USERDATA_PROPERTY);
15if(void 0===i.get(e)&&i.has(e))i.removeField(e);if(i.has(e))i.set(e,t);else i.addField((0,u.getFieldDeclaration)(e,t)),i.set(e,t);return!0}_isChanged(e,t){return e!==t}}return t.DataWrapper=v,t.injectValue=h,t}(0,{},s,o,a,b,D,T,E,I,S,M),z=k,X=function(e,t,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{static loadData(e){const t=(0,i.createLoader)(e);if(e.record)return Promise.resolve(e.record);if(void 0===e.id||null===e.id&&!e.nullableKeyIsAllowed)return t.create(e.createMetaData);else return t.read(e.id,e.readMetaData||e.sourceOptions)}}return n.slice=r.default,t.default=n,t}(0,{},k,b),W=X,f.callGetConfig=f.DataConfigResolver=f.DEFAULT_USERDATA_PROPERTY=f.FormSliceActionType=f.VALIDATION_STATE=f.injectValue=f.FormSlice=f.DEFAULT_FORM_SLICE_NAME=f.NewFormSlice=f.NewFactory=f.Form=f.CompatibleCustom=f.Custom=f.CompatibleArea=f.Area=f.AreaSlice=f.isDataNodeConfigs=f.isDataNodeConfigGetter=void 0,Object.defineProperty(f,"isDataNodeConfigGetter",{enumerable:!0,get:function(){return x.isDataNodeConfigGetter}}),Object.defineProperty(f,"isDataNodeConfigs",{enumerable:!0,get:function(){return x.isDataNodeConfigs}}),Object.defineProperty(f,"AreaSlice",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(f,"Area",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(f,"CompatibleArea",{enumerable:!0,get:function(){return Y.default}}),Object.defineProperty(f,"Custom",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(f,"CompatibleCustom",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(f,"Form",{enumerable:!0,get:function(){return W.default}}),Object.defineProperty(f,"NewFactory",{enumerable:!0,get:function(){return $.default}}),Object.defineProperty(f,"NewFormSlice",{enumerable:!0,get:function(){return U.NewFormSlice}}),Object.defineProperty(f,"DEFAULT_FORM_SLICE_NAME",{enumerable:!0,get:function(){return U.DEFAULT_FORM_SLICE_NAME}}),Object.defineProperty(f,"FormSlice",{enumerable:!0,get:function(){return z.default}}),Object.defineProperty(f,"injectValue",{enumerable:!0,get:function(){return z.injectValue}}),Object.defineProperty(f,"VALIDATION_STATE",{enumerable:!0,get:function(){return P.VALIDATION_STATE}}),Object.defineProperty(f,"FormSliceActionType",{enumerable:!0,get:function(){return C.FormSliceActionType}}),Object.defineProperty(f,"DEFAULT_USERDATA_PROPERTY",{enumerable:!0,get:function(){return C.DEFAULT_USERDATA_PROPERTY}}),Object.defineProperty(f,"DataConfigResolver",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(f,"callGetConfig",{enumerable:!0,get:function(){return A.callGetConfig}}),f}));
16define("Controls-DataEnv/context",["react/jsx-runtime","react-dom","react","WasabyLoader/ModulesLoader","UICore/Jsx","UICore/Events","UICore/Contexts","UICommon/Utils","UICommon/Deps","UI/Focus","UI/Contexts","Types/util","Types/object","Types/guards","Types/entity","Env/Env","Controls/LoadingIndicator","Controls-DataEnv/slice","Controls-DataEnv/dataFactory","Application/Initializer","Application/Env","require","exports"],(function(e,t,n,r,o,i,s,a,l,u,c,d,f,h,_,g,v,p,C,y,m,E,O){var x,b,P,$,D,N,T,S,R,j,F,I,A,M,B,V,w,L,k,X,Y,K,G,U,z,q,H,W,J,Q,Z,ee,te,ne,re,oe,ie,se,ae,le,ue,ce,de,fe,he,_e,ge,ve,pe,Ce,ye,me,Ee,Oe,xe,be,Pe,$e,De,Ne,Te,Se,Re,je,Fe,Ie,Ae,Me,Be,Ve,we;
16return Object.defineProperty(O,"__esModule",{value:!0}),x=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.CONTEXT_DATA_CONFIG_FIELD=t.CONTEXT_NODE_PATH=t.CONTEXT_STORE_FIELD=t.STORE_ROOT_NODE_KEY=void 0,t.STORE_ROOT_NODE_KEY="root",t.CONTEXT_STORE_FIELD=Symbol.for("ContextStoreField"),t.CONTEXT_NODE_PATH=Symbol("$_CONTEXT_NODE_PATH_$"),t.CONTEXT_DATA_CONFIG_FIELD="$_CONTEXT_DATA_CONFIG_$",t}(0,{}),b=x,P=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n.createContext({readOnly:!1});return r.displayName="Controls-DataEnv/context:FormContext",t.default=r,t}(0,{},n),$=P,D=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=(0,n.createContext)({});return r.displayName="Controls-DataEnv/context:IsolatedContext",t.default=r,t}(0,{},n),N=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n.createContext(void 0);return r.displayName="Controls-DataEnv/context:DataContext",t.default=r,t}(0,{},n),T=N,S=function(e,t){"use strict";var n;return Object.defineProperty(t,"__esModule",{value:!0}),t.FetchPolicyEnum=void 0,function(e){e.LocalOnly="local-only",e.LocalFirst="local-first",e.NetworkFirst="network-first",e.NetworkOnly="network-only"}(n||(t.FetchPolicyEnum=n={})),t}(0,{}),R=S,j=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultResolver=void 0;const n="value",r=e=>e.charAt(0).toUpperCase()+e.slice(1),o=(e,t)=>{const{prop:o=n,mode:i="rw",path:s}=e;if("rw"!==i||!(null==t?void 0:t.dataContext))return{};else return{[`on${r(o)}Changed`]:e=>{var n;if(s)null===(n=t.dataContext)||void 0===n||n.setValue(s,e)}}};return t.defaultResolver=(e,t,r)=>({[e.prop||n]:t,...o(e,r)}),t}(0,{}),F=function(e,t,n){"use strict";function r(e){return null!=e}function o(e){return"value"in e?e.value:void 0}function i(e,t){const o=r(t)?(0,n.getValueType)(t):e.type,i="string"==typeof o?o:(null==o?void 0:o.type)||e.type||"record";return new n.Record({adapter:"adapter.sbis",format:[{name:"value",type:i,defaultValue:t}],typeName:`${e.metatype}:${e.type}`})}function s(e){const t=o(e),s=r(t)?t:function(e){const t=e.defaultValue;if(r(t))return t instanceof n.Record?t:i(e,t)}(e);return{...e,value:s}}return Object.defineProperty(t,"__esModule",{value:!0}),t.makeField=t.normalizeContextField=t.makeFieldValueRecord=t.isDataContextField=void 0,t.isDataContextField=function(e,t){return!!t||e instanceof n.Record&&e.isTyped()},t.makeFieldValueRecord=i,t.normalizeContextField=s,t.makeField=function(e,t,n){var i,a,l;if(n){const i=r(t)?t:o(n);return s({...n,name:e,value:i})}return{name:e,value:t,type:t.getTypeName(),metatype:null===(l=null===(a=(i=t).getMetaType)||void 0===a?void 0:a.call(i))||void 0===l?void 0:l.toLowerCase()}},t}(0,{},_),I=F,A=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.FIELD_TYPE=void 0,t.FIELD_TYPE={ApplicationObject:"applicationobject",Primitive:"primitive",Object:"object",DataSet:"dataset"},t}(0,{}),M=A,B=function(e,t,n,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServerContext=void 0;class i extends((0,o.mixin)(r.OptionsToPropertyMixin,r.SerializableMixin)){constructor(e){super(e),this._node=null,this._$storeName="",this._$path=[],r.OptionsToPropertyMixin.initMixin(this,e);const t=(0,n.getStore)("context").get(this._$storeName);if(t)this._node=t.getNodeByPath(this._$path);else throw Error(`Не найден контекст с именем ${this._$storeName}`)}useSlice(e){var t,n;return null===(n=null===(t=this._node)||void 0===t?void 0:t.getElement(e))||void 0===n?void 0:n.getValue()}}return t.ServerContext=i,t.default=function(e,t){return new i({path:t,storeName:e.getName()})},t}(0,{},m,_,d),V=B,w=function(e,t,n){"use strict";function r(e){return(0,n.isPlainObject)(e)}return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(Object.is(e,t))return!0;if(!r(e)||!r(t))return!1;const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const r of n)if(!Object.is(e[r],t[r]))return!1;return!0},t}(0,{},f),L=function(e,t,n,r,o,i,s){"use strict";function a(e){const t=l(e.dataFactoryName),n=t.slice;return t.getContextConfig||(null==n?void 0:n.getContextConfig)}function l(e){let t;try{t=(0,o.loadSync)(e)||{}}catch(e){t={}}return t}function u(e,t){const n=null==e?void 0:e.sliceExtraValues;if(!n)return;const r={},o={};
16return null==n||n.forEach((({propName:n,dependencyPropName:i,dependencyName:s,prepare:a})=>{var l;const u=t[s],d=null==u?void 0:u.getValue();let f,h;if(o[s]=null===(l=null==u?void 0:u.getParent())||void 0===l?void 0:l.getName(),c(d)){if(h=d.state,!(h instanceof Object))throw Error("ContextElement:::Указаны sliceExtraValues от слайса, состояние которого не является объектом, дальнейшая работа невозможна");f=h[i]}if(a)f=a(f,r.hasOwnProperty(n)?r[n]:e[n],h);r[n]=f})),{properties:r,extraValuesDependencies:o}}function c(e){return e instanceof r.Slice}Object.defineProperty(t,"__esModule",{value:!0});class d{constructor(e){var t,n;if(this._$destroyed=!1,this._$extraValuesDependencies={},this._$props=e,this._$name=e.name,this._$parentNode=e.parentNode,n=e.config.dataFactoryName,["Controls-DataEnv/dataFactory:Custom","Controls-DataEnv/dataFactory:CompatibleCustom"].includes(n))this._$value=e.loadResult;else this._$value=this._initSlice();this._$extraValues=null===(t=this._$props.config.dataFactoryArguments)||void 0===t?void 0:t.sliceExtraValues}getLoadResult(){return this._$props.loadResult}getValue(){return this._$value}getName(){return this._$name}getParent(){return this._$parentNode}setState(e){if(c(this._$value))this._$value.setState(e);else this._$value=e}getData(){if(c(this._$value))return this._$value.getData();else return this._$value}hasDependencyFromNode(e){var t;return!!(null===(t=this._$extraValuesDependencies)||void 0===t?void 0:t[e])}getExtraValues(){return this._$extraValues}hasContextConfigs(){return!!a(this._$props.config)}getContextConfigs(){const e=this._$props.config,t=l(e.dataFactoryName),r=a(e);if(r){const e=r(this._$props.loadResult,this._resolveDataFactoryArguments(t,this._$props.config,this._$props.router));if(!e)return;if(n.DataConfigResolver.isFlatContextConfig(e))return{configs:e.configs,data:e.loadResults,onChange:e.onChange};else if(n.DataConfigResolver.isIHierarchyContextConfig(e)){const t=new i.relation.Tree({parentProperty:"parentId",childrenProperty:"children",keyProperty:"name"});return Object.entries(e.configs).forEach((([t,n])=>{var r;n.data=(null===(r=e.loadResults)||void 0===r?void 0:r[t])||{}})),t.parseTree(e.configs),{...t.toObject(),onChange:e.onChange}}else return e}}_resolveDataFactoryArguments(e,t,n){let r=t.dataFactoryArguments;const o={},i=d.getValuesDependencies(t),s={};if(i.forEach((e=>{s[e]=this.getParent().getElement(e)})),t.dependencies)t.dependencies.forEach((e=>{o[e]=this.getParent().getLoadResult(e)}));if(e.getDataFactoryArguments)r=e.getDataFactoryArguments(t.dataFactoryArguments,o,n);const a=u(r,s);if(a)r={...r,...a.properties},this._$extraValuesDependencies=a.extraValuesDependencies;return r}_onElementInitError(e){var t;if(e instanceof Error)s.IoC.resolve("ILogger").error("Controls-DataEnv/context:ContextElement",`Произошла ошибка при инициализации слайса ${this._$n
16ame} из фабрики ${this._$props.config.dataFactoryName}.\n             Узел контекста ${null===(t=this.getParent())||void 0===t?void 0:t.getName()}.\n             Состояние слайса будет заменено на пустой объект.\n             Ошибка: ${e.message}`,e)}_notifySubscribers(e){if(c(this._$value))this._$props.onSnapshot(this._$props.name,e)}_initSlice(e=this._$props.name,t=this._$props.loadResult,o=this._$props.config,i=this._$props.onChange,s=this._$props.router){const a=l(o.dataFactoryName),u=a.slice||n.Custom.slice,c=this._resolveDataFactoryArguments(a,o,s),d=t instanceof Object&&(null==t?void 0:t.constructor)===Object&&Object.getPrototypeOf(t)===Object.prototype;return function(e,t,n){if(e===r.AbstractSlice.prototype.constructor)throw new Error(`Controls-DataEnv/context.createSlice::slice с именем ${n} не будет создан.\n             В качестве слайса у фабрики ${t.dataFactoryName} задан абстрактный класс Controls-DataEnv/slice:AbstractSlice.\n             Создание экземпляра абстрактного класса невозможно. Используйте Controls-DataEnv/slice:Slice`)}(u,o,e),new u({config:c||{},loadResult:d?{...t}:t,dataContext:this._$props.dataContext,onChange:i,onInitError:this._onElementInitError.bind(this),onNotifySubscribers:this._notifySubscribers.bind(this),name:e})}destroy(){if(c(this._$value))this._$value.destroy();this._$value=null,this._$destroyed=!0}isDestroyed(){return this._$destroyed}static getDependencies(e){const t=e.dependencies||[],n=d.getValuesDependencies(e);return t.concat(n)}static getValuesDependencies(e){var t,n;const r=[];return null===(n=null===(t=e.dataFactoryArguments)||void 0===t?void 0:t.sliceExtraValues)||void 0===n||n.forEach((({dependencyName:e})=>{if(!r.includes(e))r.push(e)})),r}static getExtraValueByName(e,t){var n,r;return null===(r=null===(n=e.dataFactoryArguments)||void 0===n?void 0:n.sliceExtraValues)||void 0===r?void 0:r.find((({dependencyName:e})=>e===t))}}return t.default=d,t}(0,{},C,p,r,_,g),k=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n.createContext(void 0);return r.displayName="Controls-DataEnv/context:RootDataContext",t.default=r,t}(0,{},n),X=k,Y=function(e,t,n,r,o){"use strict";function i(e){const t=(e=>{var t;return null===(t=e.type)||void 0===t?void 0:t.toLowerCase()})(e);return t&&s[t]||n.defaultResolver}Object.defineProperty(t,"__esModule",{value:!0}),t.resolveBinding=t.getBindingResolver=t.registerBindingResolver=void 0;const s={};return t.registerBindingResolver=function(e,t,n){const i=e.toLowerCase(),a=s[i];if(!a)s[i]=t;if((!a||a===t)&&(0,r.isInit)())(0,o.addPageDeps)([n.moduleName])},t.getBindingResolver=i,t.resolveBinding=function(e,t,n){return i(e)(e,t,n)},t}(0,{},j,y,l),K=Y,G=function(e,t,n,r,o,i){"use strict";function s(e){return(0,o.isRecord)(e)&&e.has("data")&&e.has("element_id")&&"variant"===e.getMetaType()}function a(e,t){return l(e.get("data"),t)}function l(e,t){if(!t.length)return{found:!0,value:e};if(null==e)return u;const[n,...o]=t;let i;if(e instanceof r.Model)return function(e,t,n,r){if(e.has(t))return l(e.get(t),n);else return s(e)?a(e,r):u}(e,n,o,t);else if(s(e))return a(e,t);else if("object"==typeof e){if(!function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(e,n))return u;i=e[n]}else return u;return l(i,o)}Object.defineProperty(t,"__esModule",{value:!0});const u={found:!1};return t.default=class{constructor(e){this._field=e,this._name=e.name,this._value=e.value,this._type=e.type,this._metatype=e.metatype}get type(){return this._type}get metatype(){return this._metatype}get name(){return this._name}set value(e){if(this._isRecordValueType())this._value=e;else if(this._value instanceof r.Record)this._value.set("value",e);else this._value=(0,i.makeFieldValueRecord)(this._field,e)}get value(){if(this._isRecordValueType())return this._value;const e=this._value;if(e instanceof r.Record)return e.get("value");else return e}resolveByName(e){const t=this.value;if(e===this.name)return{found:!0,value:t};if(t instanceof r.Model&&t.has(e))return{found:!0,value:t.get(e)};else return u}resolveByPath(e){const[t,...n]=e,r=this.resolveByName(t);return r.found?l(r.value,n):u}resolveByType(e){const t=this.value;if(this._isRecordValueType()&&t instanceof r.Model){if(t.getTypeName()===e)return{found:!0,value:t};const n=function(e,t){let n;
16return e.getFormat().forEach((o=>{const i=o.getName(),s=e.get(i);if(s instanceof r.Model&&s.getTypeName()===t)n=i})),n}(t,e);if(n)return{found:!0,value:t.get(n)}}else if(this.type===e)return{found:!0,value:t};return u}toObject(){return{...this._field,name:this._name,value:this._value,type:this._type,metatype:this._metatype}}_isRecordValueType(){return!this.metatype||this._metatype===n.FIELD_TYPE.ApplicationObject||this._metatype===n.FIELD_TYPE.DataSet}},t}(0,{},A,_,h,F),U=function(e,t,n,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return(0,r.useContext)(n.default).path},t}(0,{},D,n),z=function(e,t,n,r,o){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.useContextEdit=void 0,t.useContextEdit=function(e){const t=(0,n.useContext)(r.default);return(0,n.useCallback)((n=>{var r;const i=t.readOnly;if(null===(r=null==t?void 0:t.edit)||void 0===r||r.call(t),i&&(null==e?void 0:e.current)){const t=n.currentTarget||e.current;setTimeout((()=>{(0,o.activate)(t,{enableScrollToElement:!0,enableScreenKeyboard:!0})}),100)}}),[t])},t}(0,{},n,P,u),q=z,H=function(e,t,n,r,o){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.useFormReadonly=void 0,t.useFormReadonly=function(){const e=(0,r.useContext)(o.default);return(0,n.useReadonly)({readOnly:null==e?void 0:e.readOnly})},t}(0,{},c,n,P),W=H,J=function(e,t,n,r,o,i){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e;const t=(0,n.default)(),s=(0,r.useContext)(o.default),a=(0,r.useRef)(null==s?void 0:s[i.CONTEXT_STORE_FIELD]);return a.current=null==s?void 0:s[i.CONTEXT_STORE_FIELD],null===(e=a.current)||void 0===e?void 0:e.getDataContext(t)},t}(0,{},U,n,k,x),Q=function(e,t,n,r,o,i,s){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=!0){const a=(0,r.useContext)(s.default),l=null==a?void 0:a[o.CONTEXT_STORE_FIELD],u=(0,n.default)(),c=(0,r.useRef)(),d=(0,r.useCallback)((()=>{if(!e)return void(c.current=void 0);const n=null==l?void 0:l.getElement(e,u||[o.STORE_ROOT_NODE_KEY]);if(c.current=n,t)return null==n?void 0:n.state;else return n}),[u,e,l,t]),f=(0,r.useCallback)((()=>{if(!e)return;const n=null==l?void 0:l.getElement(e,u||[o.STORE_ROOT_NODE_KEY]);if(t)return null==n?void 0:n.state;else return n}),[u,e,l,t]),h=(0,r.useCallback)((t=>{if(l&&e)return l.subscribe(t);else return()=>{}}),[l,e]);if((0,i.useSyncExternalStore)(h,d,f),void 0!==c.current)return c.current;else return null==l?void 0:l.getElement(e,u||[o.STORE_ROOT_NODE_KEY])},t}(0,{},U,n,x,o,k),Z=function(e,t,n,r,o,i){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=(0,i.useContext)(o.default),t=(0,i.useContext)(n.default),s=(0,i.useRef)(null==e?void 0:e[r.CONTEXT_STORE_FIELD]);return s.current=null==e?void 0:e[r.CONTEXT_STORE_FIELD],(0,i.useMemo)((()=>({execute:async(e,n)=>{var r;return(null===(r=null==s?void 0:s.current)||void 0===r?void 0:r.getDataContext(t.path)).execute(e,n)},getCurrentDataContext:()=>{var e;return null===(e=null==s?void 0:s.current)||void 0===e?void 0:e.getDataContext(t.path)}})),[t.path])},t}(0,{},D,x,k,n),ee=Z,te=function(e,t,n,r,o,i){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=(0,r.useContext)(n.default),t=(0,r.useContext)(o.default),s=(0,r.useRef)(null==e?void 0:e[i.CONTEXT_STORE_FIELD]);return s.current=null==e?void 0:e[i.CONTEXT_STORE_FIELD],(0,r.useMemo)((()=>({[i.CONTEXT_NODE_PATH]:t.path,hasChildren(e){var n;if(null==t?void 0:t.path){const r=[...t.path,e];return!!(null===(n=s.current)||void 0===n?void 0:n.getNodeByPath(r))}return!1},getElement(e){var n;return null===(n=s.current)||void 0===n?void 0:n.getElement(e,t.path)},createElement(e,n){var r;return null===(r=s.current)||void 0===r?void 0:r.createElement(t.path,e,n)},async createNode(e,n){var r;const o={...n};return null===(r=s.current)||void 0===r?void 0:r.createNode(t.path,e,o)},createElementSync(e,n,r){var o;return null===(o=s.current)||void 0===o?void 0:o.createElementSync(t.path,e,n,r)},createElements(e){var n;return null===(n=s.current)||void 0===n?void 0:n.createElements(t.path,e)},createElementsSync(e,n){var r;return null===(r=s.current)||void 0===r?void 0:r.createElementsSync(t.path,e,n)},createNodeSync(e,n,r){var o;const i={...n};return null===(o=s.current)||void 0===o?void 0:o.createNodeSync(t.path,e,i,r)},updateElements(e,n){var r;return null===(r=s.current)||void 0===r?void 0:r.updateNodeElements(t.path,e,n)},update(e){var n;return null===(n=s.current)||void 0===n?void 0:n.updateNode(t.path,e)},destroy(){var e;null===(e=s.current)||void 0===e||e.destroyNode(t.path)},async reloadElement(e,n,r){var o;return null===(o=s.current)||void 0===o?void 0:o.reloadElement(t.path,e,n,r)},unsafe__getElementsByTree(){var e;return(null===(e=s.current)||void 0===e?void 0:e.getElementsFromPath(t.path))||{}},getDataContext(){var e;return(null===(e=s.current)||void 0===e?void 0:e.getDataContext(t.path))||null}})),[t])},t}(0,{},k,n,D,x),ne=te,re=function(e,t,n,r,o,i,s,a){"use strict";
16return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=(0,n.default)(),l=(0,i.useContext)(s.default),u=null==l?void 0:l[a.CONTEXT_STORE_FIELD],c=(0,i.useCallback)((()=>null==u?void 0:u.getElementsFromPath(t,!0)),[u,t]),d=(0,i.useCallback)((()=>null==u?void 0:u.getElementsFromPath(t,!0)),[u,t]),f=(0,i.useCallback)((e=>{if(u)return u.subscribe(e);else return()=>{}}),[u]);return(0,r.useSyncExternalStoreWithSelector)(f,c,e,o.default,d)},t}(0,{},U,o,w,n,k,x),oe=re,ie=function(e,t,n,r,o,i,s,a,l,u,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const d={};return t.default=r.forwardRef((function(e,t){const f=(0,s.useContext)(u.default),h=null==f?void 0:f[c.CONTEXT_STORE_FIELD],_=(0,l.default)(),g=r.useMemo((()=>{if(e.dataLayoutId){if(_)return[..._,e.dataLayoutId]}else return _;return[e.dataLayoutId]}),[e.dataLayoutId,_]),v=r.useMemo((()=>!!(null==h?void 0:h.getNodeByPath(g))),[h,g]),p=r.useMemo((()=>({dataLayoutId:e.dataLayoutId||"",path:v?g:_})),[g,e.dataLayoutId,_,v]),C=(0,s.useCallback)((()=>{var e;return null===(e=null==h?void 0:h.getNodeByPath(p.path))||void 0===e?void 0:e.getValue()}),[p.path,h]),y=(0,s.useCallback)((()=>{var e;return null===(e=null==h?void 0:h.getNodeByPath(p.path))||void 0===e?void 0:e.getValue()}),[p.path,h]),m=(0,s.useCallback)((e=>{if(h)return h.subscribe(e);else return()=>{}}),[h]),E=(0,a.useSyncExternalStore)(m,C,y),O=r.useMemo((()=>{const n={};if(t)n.ref=t;if(e.attrs)n.attrs=e.attrs;return n}),[t,e.attrs]);return(0,n.jsx)(o.default.Provider,{value:p,children:(0,n.jsx)(i.default.Provider,{value:E||d,children:r.cloneElement(e.children,O)})})})),t}(0,{},e,n,D,N,n,o,U,k,x),se=function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e=[],t){this._destroyed=!1,this._getParentContext=t,this._setContext(e)}get parentContext(){var e;return null===(e=this._getParentContext)||void 0===e?void 0:e.call(this)}getDescription(){var e;return[...this._context.map((e=>e.toObject())),...(null===(e=this.parentContext)||void 0===e?void 0:e.getDescription())||[]]}destroy(){this._getParentContext=void 0,this._destroyed=!0}_setContext(e){this._context=e.map((e=>e instanceof n.default?e:new n.default((0,r.normalizeContextField)(e))))}},t}(0,{},G,F),ae=function(e,t,n,r,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s={found:!1};class a extends o.default{constructor(e=[],t){var n;super(e,t),this._changeCallbacks={},this._recordChangeCallbacks={},this._isRecordSubscriptionRequired=!1,this._isRecordSubscriptionRequired=!!this._getParentContext,this._subscribeToFieldsChange(this._context),this._parentContextChangeUnsubscribe=null===(n=this.parentContext)||void 0===n?void 0:n.onChange(this._onParentContextChanged.bind(this))}setValue(e,t){var n;const r=this._getByPath(e);if(r.found&&r.value===t)return!0;const o=this._setValue(e,t);if(o)return this._notifyChanges(e,t),o;else return!!(null===(n=this.parentContext)||void 0===n?void 0:n.setValue(e,t))}getByPath(e=""){var t;const n=this._getByPath(e);return n.found?n.value:null===(t=this.parentContext)||void 0===t?void 0:t.getByPath(e)}getByName(e){var t;const n=this._getByName(e);return n.found?n.value:null===(t=this.parentContext)||void 0===t?void 0:t.getByName(e)}onChange(e,t="all"){if(!this._changeCallbacks[t])this._changeCallbacks[t]=[];return this._changeCallbacks[t].push(e),()=>{var n;this._changeCallbacks[t]=null===(n=this._changeCallbacks[t])||void 0===n?void 0:n.filter((t=>t!==e))}}getByType(e){var t;const n=this._getByType(e);return n.found?n.value:null===(t=this.parentContext)||void 0===t?void 0:t.getByType(e)}getByConf(e,t){var n;if(!(e=>!(!e.path&&!e.type))(e))return;const r=e.path?this._getByPath(e.path):this._getByType(e.type||"");return r.found?(0,i.resolveBinding)(e,r.value,t):null===(n=this.parentContext)||void 0===n?void 0:n.getByConf(e,t)}destroy(){var e;this._unsubscribeToFieldsChange(this._context),null===(e=this._parentContextChangeUnsubscribe)||void 0===e||e.call(this),this._changeCallbacks={},this._parentContextChangeUnsubscribe=void 0}updateContext(e=[]){const t=this._context;this._unsubscribeToFieldsChange(this._context),this._setContext(e),this._subscribeToFieldsChange(this._context),t.forEach((e=>{const t=this._getByName(e.name).value;if(e.value!==t)this._notifyChanges(e.name,t)}))}_subscribeToFieldsChange(e){if(this._isRecordSubscriptionRequired)for(const{name:t,value:r}of e)if(r instanceof n.Record){const e=this._onRecordChangeCallback.bind(this,t);r.subscribe("onPropertyChange",e),this._recordChangeCallbacks[t]=e}}_unsubscribeToFieldsChange(e){if(this._isRecordSubscriptionRequired)for(const{name:t,value:r}of e){const e=this._recordChangeCallbacks[t];if(e&&r instanceof n.Record)r.unsubscribe("onPropertyChange",e),this._recordChangeCallbacks[t]=void 0}}_onRecordChangeCallback(e,t,n){const r=Object.keys(n);for(const t of r)this._notifyChanges([e,t].join("."),n[t])}_onParentContextChanged(e,t){this._notifyChanges(e,t)}_getByPath(e=""){const t=e.split(".");for(const e of this._context){const n=e.resolveByPath(t);if(n.found)return n}return s}_getByType(e){for(const t of this._context){const n=t.resolveByType(e);if(n.found)return n}return s}_getByName(e){for(const t of this._context){const n=t.resolveByName(e);
16if(n.found)return n}return s}_notifyChanges(e,t){const n=this._getTriggerKeys(e);for(const r of n){const n=this._changeCallbacks[r];if(n)for(const r of n)r(e,t)}}_setValue(e,t){const[o,...i]=e.split("."),s=(o,i)=>{if(!e.length&&o.value instanceof n.Model&&t instanceof n.Model)this._unsubscribeToFieldsChange([o]),this._subscribeToFieldsChange([{...o,value:t}]);return r.object.implantValue(o,["value",...i],t)};for(const e of this._context){const{name:t,value:r}=e;if(o===t)return s(e,[...i]);if(r instanceof n.Model&&r.has(o))return s(e,[o,...i])}return!1}_getTriggerKeys(e){return["all",...Object.keys(this._changeCallbacks).filter((t=>t.includes(e)))]}}return t.default=a,t}(0,{},_,d,se,Y),le=function(e,t,n,r,o,i,s,a,l){"use strict";function u(e,t,n,r){const o={},i={dataContext:t,reloadCallableBindings:e=>{var t;const o=n.getElement("UserData",r||[s.STORE_ROOT_NODE_KEY]);return null===(t=null==o?void 0:o.reloadBindings)||void 0===t?void 0:t.call(o,e)}};return e.forEach((e=>{const n=t.getByConf(e,i);if(n)Object.assign(o,n)})),o}Object.defineProperty(t,"__esModule",{value:!0}),t.useBind=void 0;const c={};return t.useBind=function(e){var t;const d=(0,o.useContext)(i.default),f=null==d?void 0:d[s.CONTEXT_STORE_FIELD],h=(0,r.default)(),_=(0,n.default)(),g=(0,o.useMemo)((()=>{if(!e)return[];else return Array.isArray(e)?e:[e]}),[e]),v=(0,o.useMemo)((()=>g.map((e=>e.path)).filter(Boolean)),[g]),p=(0,o.useCallback)((e=>{if(_||f){const t=null==_?void 0:_.onChange(((t,n)=>{if(v.some((e=>t.includes(e))))e(t,n)})),n=null==f?void 0:f.subscribe(e);return()=>{null==n||n(),null==t||t()}}else return()=>{}}),[f,_,v]),C=(0,o.useRef)(),y=(0,o.useCallback)((()=>{if(!f)return c;const e=C.current,t=u(g,_,f,h);if(((e,t)=>{if(!e||!t)return!0;const n=e,r=t;if(Object.keys(n).length!==Object.keys(r).length)return!0;return Object.entries(r).filter((([e,t])=>!("function"==typeof t))).some((([e,t])=>!n.hasOwnProperty(e)||n[e]!==t&&!(0,l.isEqual)(n[e],t)))})(e,t))C.current=t;return C.current}),[f,g,_,h]),m=(0,o.useCallback)((()=>{if(!f)return c;else return u(g,_,f,h)}),[f,g,_,h]);return(0,a.useSyncExternalStore)(p,y,m),null!==(t=C.current)&&void 0!==t?t:m()},t}(0,{},J,U,n,k,x,o,f),ue=le,ce=function(e,t,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return(0,n.default)().getDescription()},t}(0,{},J),de=ce,fe=function(e,t,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e)},t}(0,{},Q),he=fe,_e=function(e,t,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e,!1)},t}(0,{},Q),ge=_e,ve=function(e,t,n,r,o,i,s,a,l,u,c){"use strict";function d(e){var t;const u=e.storeId||(null===(t=e.name)||void 0===t?void 0:t[0]),d=(0,i.default)(u),f=(0,s.default)(o.DEFAULT_FORM_SLICE_NAME),h=(0,r.useContext)(e.PendingContext),[_,g]=(0,r.useState)(e.initialReadOnly||!1),v=(0,r.useRef)(),p=f||d,C=(0,r.useMemo)((()=>({readOnly:_,setReadOnly:g,canEdit:e.canEdit,edit:()=>{if(_)if(e.canEdit)g(!1)}})),[_]),y=(0,r.useCallback)((()=>{const e=c.IndicatorOpener.show();v.current=e}),[]),m=(0,r.useCallback)((()=>{if(v.current)c.IndicatorOpener.hide(v.current)}),[]);(0,r.useEffect)((()=>{if(p&&h)p.registerAction("registerPending",h.registerPending),p.registerAction("cancelFinishingPending",h.cancelFinishingPending),p.initChangePending();return null==p||p.registerAction("longOperationStart",y),null==p||p.registerAction("longOperationEnd",m),()=>{null==p||p.unregisterAction("registerPending"),null==p||p.unregisterAction("cancelFinishingPending")}}),[p,h]);const E=(0,r.useCallback)(((e,t={})=>{if(p)Object.entries(t).forEach((([e,t])=>{p.registerAction(e,t)}))}),[p]),{children:O,forwardedRef:x}=e,b=(0,r.useMemo)((()=>{if(!O||!x)return O;else return(0,r.cloneElement)(O,{forwardedRef:x})}),[O,x]);return(0,n.jsx)(a.default.Provider,{value:C,children:(0,n.jsx)(l.EventSubscriber,{onRegisterFormOperation:E,children:b})})}Object.defineProperty(t,"__esModule",{value:!0});const f="Controls/Pending:Context";return t.default=(0,r.forwardRef)((function(e,t){const[o,i]=(0,r.useState)((0,u.isLoaded)(f)?(0,u.loadSync)(f):null);if((0,r.useEffect)((()=>
16{if(o)return;let e=!1;const t=()=>{e=!0};return(0,u.loadAsync)(f).then((t=>{if(!e)i(t)}),t),t}),[o]),!o)return null;else return(0,n.jsx)(d,{...e,PendingContext:o,forwardedRef:t})})),t}(0,{},e,n,C,_e,fe,P,i,r,v),pe=ve,Ce=function(e,t,n,r,o){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=(0,r.useContext)(n.default),i=(0,o.default)(e);return(null==t?void 0:t[e])?t[e]:i},t}(0,{},N,n,fe),ye=Ce,me=function(e,t,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=(0,n.default)(e);if(!t)throw Error(`В контексте данных отсутствует слайс с идентификатором - ${e}`);return t},t}(0,{},fe),Ee=me,Oe=function(e,t,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=(0,n.default)(e);if(!t)throw Error(`В контексте данных отсутствует слайс с идентификатором - ${e}`);return t},t}(0,{},_e),xe=Oe,be=function(e,t,n,r,o,i,s){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.useDataContextProxyValue=void 0,t.useDataContextProxyValue=function(){const e=(0,r.useContext)(s.default),t=(0,r.useContext)(o.default);return(0,r.useMemo)((()=>({rootContext:e,pathContext:t})),[e,t])},t.default=function(e){if(!e.proxyContextValues)return e.children;else return(0,n.jsx)(s.default.Provider,{value:e.proxyContextValues.rootContext,children:(0,n.jsx)(o.default.Provider,{value:e.proxyContextValues.pathContext,children:(0,n.jsx)(i.default,{children:e.children})})})},t}(0,{},e,n,D,ie,k),Pe=be,$e=function(e,t,n,r,o){"use strict";async function i(){return(await(0,o.loadAsync)("Controls-DataEnv/dataLoader")).DataContextServiceAPI}Object.defineProperty(t,"__esModule",{value:!0});class s extends r.default{constructor(e=[],t,r){super(e,t),this._localAPI=new n.default(this._context,t),this._dataContextDescription=r}getByPath(e=""){return this._localAPI.getByPath(e)}getByName(e=""){return this._localAPI.getByName(e)}getByType(e=""){return this._localAPI.getByType(e)}getByConf(e,t){return this._localAPI.getByConf(e,t)}getValue(e){return this.getByName(e)}getObject(e){return this.getByName(e)||this.getByType(e)||null}setValue(e,t){return this._localAPI.setValue(e,t)}onChange(e,t){return this._localAPI.onChange(e,t)}async execute(e,t={}){const n=this.getDescription();return(await i()).execute(e,n,t)}toObject(){const e={};return this._context.forEach((t=>{e[t.name]=t.value})),e}destroy(){super.destroy(),this._localAPI.destroy()}static async fillContextFields(e,t,n){if(!e.length)return t;return(await i()).fillContextFields(e,t,n)}}return t.default=s,t}(0,{},ae,se,r),De=$e,Ne=function(e,t,n,r,o,i,s,a,l){"use strict";function u(e,t){if(!t.length)return;let n=e;for(const e of t.slice(0,-1)){const t=n.get(e);if(!(t instanceof i.Model))return;n=t}const r=t[t.length-1],o=n.getFormat(),s=o.getFieldIndex(r);if(!(null==s||s<0))return o.at(s)}function c(e){if(e&&"object"==typeof e&&"name"in e)return e;else return{name:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.getSafeFieldType=t.getModelFieldType=t.clearProps=t.useConnectedValue=void 0;const d="FormData",f={get:()=>{},set:()=>{}},h=[];return t.useConnectedValue=function(e=h,t=null){const _=e||h,g=n.useMemo((()=>c(_).name),[_]),[v,...p]=g,C=n.useRef(null),y=(0,a.default)(d),m=(0,a.default)(v),E=m||y||f;let{value:O,onValueChanged:x}=(0,l.useBind)({path:g.join(".")})||{};if(g.length>1&&E instanceof r.FormSlice)O=void 0,x=void 0;const b=m?p:_,P=n.useCallback((e=>{var n;if(void 0!==O)return O;const r=(null==e?void 0:e[v])||(null==e?void 0:e[d]),o=0!==b.length?null===(n=null==r?void 0:r.store)||void 0===n?void 0:n.get(b):void 0;return void 0!==o?o:t}),[b,v,t,O]),$=n.useCallback((e=>{var t,n;const r=(null==e?void 0:e[v])||(null==e?void 0:e[d]),o=(E instanceof i.Model?u(E,b):null===(t=null==r?void 0:r.store)||void 0===t?void 0:t.getType(b))||function(e,t){const n=function(e,t){var n;const r=Array.isArray(e)?e.join("."):e,o=null===(n=null==t?void 0:t.fieldTypeStore)||void 0===n?void 0:n.find((e=>e.name===r));if(!o)return;try{return i.format.fieldsFactory({name:o.name,type:o.type})}catch{return i.format.fieldsFactory({name:o.name,type:"record"})}}(t,e);if(!n)return;return n}(null==e?void 0:e.TypeRepository,_);if((null==o?void 0:o.getType())!==(null===(n=C.current)||void 0===n?void 0:n.getType()))C.current=o;return C.current}),[b,v,_,E]),D=n.useCallback((e=>{var t,n;if(!Array.isArray(_))return;const r=null===(n=null===(t=null==e?void 0:e.TypeRepository)||void 0===t?void 0:t.fieldTypeStore)||void 0===n?void 0:n.find((e=>e.typeId===_.join(".")));return null==r?void 0:r.titlePath}),[_]),N=(0,s.default)(P),T=(0,s.default)($),S=(0,s.default)(D);return n.useMemo((()=>({value:N,onChange:e=>
16{if(!_.length)return o.Logger.warn("useConnectedValue: Не задана привязка name, запись значения невозможна.");if(x)return x(e);if(E instanceof i.Model)(0,r.injectValue)(E,b,e);else null==E||E.set(b,e)},type:T,decoratedValue:S})),[_,N,E,b,T,S,x])},t.clearProps=function(e){const{name:t,requiredIndicatorStyle:n,...r}=e;return r},t.getModelFieldType=u,t.getSafeFieldType=c,t}(0,{},n,C,a,_,re,_e,le),Te=Ne,Se=function(e,t,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e={}){return(0,n.useBind)(e)},t}(0,{},le),Re=Se,je=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends n.default{updateContext(e=[],t){if(this._setContext(e),this._localAPI.updateContext(this._context),t)this._dataContextDescription=t}}return t.default=r,t}(0,{},$e),Fe=function(e,t,n,r,o,i,s,a,l,u){"use strict";function c(e){const t=Object.entries(e),n=new Set,o=[];for(;t.length;){const i=t.shift();if(i){const[s,a]=i,l=r.default.getValuesDependencies(a),u=l.every((e=>n.has(e))),c=l.some((t=>{const n=e[t];return n&&r.default.getValuesDependencies(n).includes(s)}));if(u||c)n.add(s),o.push(s);else t.push([s,a])}}return o}function d(e,t){return!!t.find((t=>t.name===e))}Object.defineProperty(t,"__esModule",{value:!0});const f=Symbol.for("Controls-DataEnv/_context/store/ContextNode:sliceChildren");class h{constructor(e){this._$configs={},this._$isElementsDestroyed=!1,this._$elements={},this._$children=new Map,this._$elementOrder=[],this._$value={},this._$relatedElements={},this._$destroyListeners=[],this._$props=e,this._$parentNode=e.parentNode||null,this._onElementSnapshot=this._onElementSnapshot.bind(this),this._onChangeElement=this._onChangeElement.bind(this),this._initState(e.contextConfigs)}_createElementOrder(){this._$elementOrder=c(this._$configs)}getRelatedElements(e){const t={nodes:[],elements:[]};if("configs"in e)t.elements=Object.keys(e.configs);if(e.children)t.nodes=Object.keys(e.children);if("onChange"in e)t.onChange=e.onChange;return t}getRelatedValues(e){const t={};return e.elements.forEach((e=>{const n=this._$elements[e];if(n)t[e]=n.getValue()})),e.nodes.forEach((e=>{const n=this._$children.get(e);if(n)t[e]=n.toObject()})),t}updateSliceChildren(e,t){var n;const r=null===(n=this._$elements[e])||void 0===n?void 0:n.getValue();if((o=r)instanceof Object&&o["[ISlice]"])!function(e){if(!Object.getOwnPropertyDescriptor(e,"children"))Object.defineProperty(e,"children",{enumerable:!1,configurable:!0,get(){return this[f]||{}}})}(r),r[f]=this.getRelatedValues(t);var o}
16_getDataConfigs(e=this._$contextConfigs){if("configs"in e)return e.configs;else if("configGetter"in e){let t;try{let r=e;if(e.configGetterArgumentsArray){const t=[...e.configGetterArgumentsArray];t[2]=this._$props.router,r={...e,configGetterArgumentsArray:t}}t=!e.isAsyncConfigGetter?n.DataConfigResolver.getConfigFromLoaderSync(r,this.getDataContext()):n.DataConfigResolver.convertLoadResultsToFactory(e.data)}catch(n){if(t={},n instanceof Error)o.logger.error(`Произошла ошибка при вызове метода getConfig из модуля ${e.configGetter} ${n.message}`)}if(this._$props.getSlicesConfig&&this._$props.getSlicesConfigNode&&this._$name===this._$props.getSlicesConfigNode){const e=this._$props.getSlicesConfig(this._$data);return{...t,...e}}return t}return{}}_makeDataContextMap(e){if(e)return e.reduce(((e,t)=>(e[t.name]=t,e)),{})}initElements(){this._$isElementsDestroyed=!1,this._createElementOrder(),this._$elementOrder.forEach((e=>{this.addElement(e,this._$data[e],this._$configs[e])}))}_initState(e){var t,n,o;if(this._$contextConfigs={...e},this._$name=this._$contextConfigs.name||this._$props.name,this._$dataContextDescription=e[s.CONTEXT_DATA_CONFIG_FIELD]||this._$props.dataContextDescription,this._$dataContextFieldsMap=this._makeDataContextMap(null===(t=this._$dataContextDescription)||void 0===t?void 0:t.fields),this._$data=this._$contextConfigs.data||{},this._$configs=this._getDataConfigs(),n=this._$configs,o=this._$name,Object.entries(n).forEach((([e,t])=>{var i;if(null===(i=t.dataFactoryArguments)||void 0===i?void 0:i.sliceExtraValues)r.default.getValuesDependencies(t).forEach((i=>{const s=n[i];if(r.default.getValuesDependencies(s).includes(e)){const n=r.default.getExtraValueByName(s,e),a=r.default.getExtraValueByName(t,e);if((null==n?void 0:n.dependencyPropName)===(null==a?void 0:a.propName)&&(null==a?void 0:a.dependencyPropName)===(null==n?void 0:n.propName))throw new Error(`В конфигурации фабрик данных существует циклическая зависимость.\n                     В sliceExtraValues фабрики ${e} указана зависимость от ${i}. Узел ${o}`)}}))})),this.initElements(),this.initDataContext(),this._$contextConfigs.children)this.reInitChildren(this._$contextConfigs.children,this._$props.getSlicesConfig)}_onElementSnapshot(e,t){const n=this.getChanges(t,e);this._$props.onSnapshot(n,this.getPath())}_onChangeElement(){this._$value={...this._$value},this._$props.onChange(),this.initDataContext()}getParent(){return this._$parentNode}setParent(e){const t=this.getParent();if(null!==t)t.detachChildren(this.getName());this._$parentNode=e,e.registerChildren(this)}registerChildren(e){this._$children.set(e.getName(),e)}getConfigs(){return this._$configs}getState(){return this._$elements}getValue(){return this._$value}reInitChildren(e,t){Object.entries(e).forEach((([e,n])=>{const r=this._$children.get(e);if(r)r.reInitState(n);else this.addChild(e,n,void 0,!1,t)}))}getPath(e=!0){const t=[];let n=e?this:this.getParent();for(;n;)t.unshift(n.getName()),n=n.getParent();return t}getData(){const e={};return Object.entries(this._$elements).forEach((([t,n])=>{e[t]=n.getData()})),e}getDataContext(){if(this._$dataContext)return this._$dataContext;else return this.initDataContext()}getDataContextFields(){const e=[];return Object.entries(this._$data).forEach((([t,n])=>{var r;const o=null===(r=this._$dataContextFieldsMap)||void 0===r?void 0:r[t];if((0,u.isDataContextField)(n,o)&&!d(t,e)){const r=this._$elements[t]?this._$elements[t].getData():n,i=(0,u.makeField)(t,r,o);if(i)e.push(i)}})),Object.values(this._$dataContextFieldsMap||{}).forEach((t=>{const n=t.name;if(void 0!==t.defaultValue&&!d(n,e)){const r=(0,u.makeField)(n,void 0,t);if(r)e.push(r)}})),e}initDataContext(){const e=this.getDataContextFields();if(this._$dataContext)return this._$dataContext.updateContext(e,this._$dataContextDescription),this._$dataContext;else return this._$dataContext=new l.default(e,this.getParentContext.bind(this),this._$dataContextDescription),this._$dataContext}getParentContext(){var e;return null===(e=this.getParent())||void 0===e?void 0:e.getDataContext()}clearDataContext(){if(this._$dataContext)this._$dataContext.destroy();this._$dataContext=void 0}getLoadResults(){return this._$data}reInitState(e){this.destroy(!0),this._initState(e)}update(e,t=!1){const n=this._getDataConfigs(e);if(n)this.updateElements(n,e.data||{},t);if(e.children)this.updateChildren(e.children,t)}updateChildren(e,t=!1){Object.entries(e).forEach((([e,n])=>{const r=this._$children.get(e);if(r)r.update(n,t);else this.addChild(e,n)}))}hasAliveChildren(){if(this.isAlive())return!0;for(const e of this._$children.values())if(e.hasAliveChildren())return!0;return!1}getLoadResult(e){let t=this,n=this._$data.hasOwnProperty(e),r=this._$data[e];for(;!n&&(null==t?void 0:t.getParent());){t=null==t?void 0:t.getParent();const o=null==t?void 0:t.getLoadResults();n=!!(null==o?void 0:o.hasOwnProperty(e)),r=null==o?void 0:o[e]}return r}
16getName(){return this._$name}getElement(e,t=!0){const n=this.getState()[e];if(!n&&t){const n=this.getParent();if(n)return n.getElement(e,t)}return n}isRoot(){return!!this._$props.isRoot}getNodeByPath(e){const[t]=e;let n=this.getChild(t);for(let t=1;t<e.length;t++){if(null==n)return null;const r=e[t];n=n.getChild(r)}return n}getChild(e){return this._$name===e?this:this._$children.get(e)||null}onDestroy(e){return this._$destroyListeners.push(e),()=>{this._$destroyListeners=this._$destroyListeners.filter((t=>t!==e))}}async reloadElement(e,t,n=!0){const r=this._$elements[e];if(!r)throw new Error(`В узле контекста ${this.getName()} не найден элемент ${e} попытке его перезагрузить`);const o=Object.entries(this._$relatedElements).reduce(((t,n)=>{const[r,o]=n;if(o.elements.includes(e)&&o.onChange)return[...t,r];else return t}),[]),s=await async function(){return(await(0,i.loadAsync)("Controls-DataEnv/dataLoader")).Loader}(),a=this.getConfigs(),l={...a[e]};l.dataFactoryArguments={...l.dataFactoryArguments,...t};const u={[e]:l};if(l.dependencies&&n)l.dependencies.forEach((e=>{u[e]=a[e]}));else l.dependencies=[];const c=await s.load(u,void 0,this._$props.router);if(!r.isDestroyed()){if(l.dependencies)l.dependencies.forEach((e=>{this.addElement(e,c[e],u[e])}));if(o)o.forEach((t=>{var n;const r=this._$relatedElements[t],o=null===(n=this.getElement(t))||void 0===n?void 0:n.getValue();if(r.onChange)r.onChange(e,c[e],l,o)}));this.addElement(e,c[e],l),this._$props.onChange(),this.initDataContext()}}setState(e={}){this._$elementOrder.forEach((t=>{const n=e[t];if(n)this._$elements[t].setState(n)})),this._$value={...this._$value}}updateElements(e,t,n=!1){this._$configs={...this._$configs,...e};const r={...this._$data};this._$data={...this._$data,...t};c(this._$configs).filter((t=>e.hasOwnProperty(t))).forEach((o=>{if(!n||!(0,a.isEqual)(t[o],r[o]))this.addElement(o,t[o],e[o])}))}updateRelatedConfigs(e,t){const n=this.getRelatedElements(e),r=this._$relatedElements[t];if(!r)this.update(e);else{n.nodes.forEach((t=>{var n;if(null===(n=e.children)||void 0===n?void 0:n[t])this.addChild(t,e.children[t])}));if(r.nodes.filter((e=>!n.nodes.includes(e))).forEach((e=>{const t=this._$children.get(e);if(t)if(t.destroy(!0),!t.hasAliveChildren())this._$children.delete(e)})),r.elements.length)r.elements.forEach((e=>{this.removeElement(e)}));if("configs"in e||"configGetter"in e){const t=this._getDataConfigs(e);this.updateElements(t,e.data||{})}}this._$relatedElements[t]=n,this.updateSliceChildren(t,n)}addElement(e,t,n){this.removeElement(e),this._$configs[e]=n,this._$data[e]=t;
16const o=new r.default({name:e,onChange:this._onChangeElement,onSnapshot:this._onElementSnapshot,config:n,loadResult:t,parentNode:this,dataContext:()=>this.getDataContext(),router:this._$props.router});if(this._$elements[e]=o,this._$value={...this._$value},this._$value[e]=this._$elements[e].getValue(),o.hasContextConfigs()){const e=o.getContextConfigs();if(e)this.updateRelatedConfigs(e,o.getName())}this._createElementOrder()}createElementsSync(e,t){c({...this.getConfigs(),...e}).forEach((n=>{if(e[n])this.addElement(n,t[n],e[n])}))}addChild(e,t,n,r,o){var i;if(this._$children.get(e))return void(null===(i=this._$children.get(e))||void 0===i||i.reInitState(t));const a=new h({router:this._$props.router,parentNode:this,dataContextDescription:t[s.CONTEXT_DATA_CONFIG_FIELD]||this._$dataContextDescription,contextConfigs:t.hasOwnProperty(s.STORE_ROOT_NODE_KEY)?t[s.STORE_ROOT_NODE_KEY]:t,name:e,onChange:n?()=>{n(),this._$props.onChange()}:this._$props.onChange,onSnapshot:this._$props.onSnapshot,getSlicesConfigNode:this._$props.getSlicesConfigNode,getSlicesConfig:o,isRoot:r});this._$children.set(e,a)}removeElement(e){if(this._$elements[e])this._$elements[e].destroy(),this._$value={...this._$value},delete this._$value[e],delete this._$elements[e],this.initDataContext()}getChanges(e,t){var n,r,o,i;const s={[t]:e},a=this.getState(),l=null===(n=null==a?void 0:a[t])||void 0===n?void 0:n.getValue(),u=null==l?void 0:l.state;for(const[n,l]of Object.entries(this._$elements)){const c=null===(r=l.getExtraValues)||void 0===r?void 0:r.call(l);if(!(null==c?void 0:c.length))continue;const d=null===(o=null==a?void 0:a[n])||void 0===o?void 0:o.getValue();for(const{dependencyName:r,dependencyPropName:o,propName:a,prepare:l}of c){const c=r===t,f="object"==typeof u,h=(null==u?void 0:u[o])!==e[o];if(!c||!f||!h)continue;let _=e[o];if(l){const e=null==d?void 0:d.state,t=s[n];_=l(_,t&&t.hasOwnProperty(a)?t[a]:null==e?void 0:e[a],e,u)}null!==(i=s[n])&&void 0!==i||(s[n]={}),s[n][a]=_}}return delete s[t],s}toObject(){const e={};if(Object.entries(this._$elements).forEach((([t,n])=>{e[t]=n.getValue()})),this._$children.size)e.children={},this._$children.forEach(((t,n)=>{e.children[n]=t.toObject()}));return e}destroyElements(){this._$isElementsDestroyed=!0,Object.keys(this._$elements).forEach((e=>{this.removeElement(e)}))}destroy(e=!1){this.destroyElements(),this.clearDataContext();const t=[];if(this._$children.forEach((n=>{if(!n.isRoot()||!e)if(n.destroy(e),!n.hasAliveChildren())t.push(n.getName())})),t.forEach((e=>{this.detachChildren(e)})),!e)this._$children.clear();if(!e&&!this._$children.size)this.detachFromParent(),this._$parentNode=null;this._$destroyListeners.forEach((e=>e()))}isAlive(){return!this._$isElementsDestroyed}detachFromParent(){const e=this.getParent();if(e){const t=this.getName();null==e||e.detachChildren(t),this.clearDataContext()}}detachChildren(e){var t;if(this._$children.has(e))null===(t=this._$children.get(e))||void 0===t||t.clearDataContext(),this._$children.delete(e)}static getDependencies(e){const t=Object.values(e).flatMap((e=>r.default.getDependencies(e)));return[...new Set(t)]}}return t.default=h,t}(0,{},C,L,m,r,x,f,je,F),Ie=function(e,t,n,r,o,i,s,a,l){"use strict";async function u(){return(await(0,s.loadAsync)("Controls-DataEnv/dataLoader")).Loader}Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e){var t;let n;if(this.version=0,this.listeners=[],this._$props=e,this._onContextSnapshot=this._onContextSnapshot.bind(this),this._onChange=this._onChange.bind(this),this._$root=e.root||"root",function(e){return!!e.configs}(e))n={configs:(null===(t=e.getSlicesConfig)||void 0===t?void 0:t.call(e,{...e.loadResults}))||{...e.configs},data:{...e.loadResults}};else if(e.dataConfigs.configs&&e.dataConfigs.loadResults){const t=new a.relation.Tree({parentProperty:"parentId",childrenProperty:"children",keyProperty:"name"}),r={...e.dataConfigs.configs},i={...e.dataConfigs.loadResults};if(Object.entries(e.dataConfigs.configs).forEach((([e,t])=>{const n={...t};if(!n.parentId&&"root"!==e)n.parentId="root";n.data=(null==i?void 0:i[e])||{},r[e]=n})),!r[o.STORE_ROOT_NODE_KEY])r[o.STORE_ROOT_NODE_KEY]={};let s;if(1===Object.keys(r).length)s=r;else t.parseTree(r),s=t.toObject();n=s[o.STORE_ROOT_NODE_KEY]||{}}else n={...e.dataConfigs.contextConfigs||e.dataConfigs};this._$value=new r.default({name:this._$root,contextConfigs:n.hasOwnProperty(o.STORE_ROOT_NODE_KEY)?n[o.STORE_ROOT_NODE_KEY]:n,dataContextDescription:n[o.CONTEXT_DATA_CONFIG_FIELD],router:e.router,parentNode:null,onSnapshot:this._onContextSnapshot,onChange:this._onChange,getSlicesConfig:e.getSlicesConfig,getSlicesConfigNode:e.getSlicesContextNodeName})}_onContextSnapshot(e,t){const n=this.getNodeByPath(t);if(n)n.setState(e)}setState(){this._$value.setState()}notifyOnChange(){this._onChange()}toObject(){return this._$value.toObject()}getDataContext(e){const t=this.getNodeByPath(e);if(!t)throw new Error("Получение контекста данных невозможно, возможно вы делаете вызов вне контекста");return t.getDataContext()}onNodeDestroy(e,t){const n=this.getNodeByPath(e);if(n)return n.onDestroy(t);else return()=>{}}getName(){return this._$props.name||""}
16getNodeValueByPath(e){var t;return(null===(t=this._$value.getNodeByPath(e))||void 0===t?void 0:t.getValue())||null}async reloadElement(e,t,n={},r=!0){const o=this._$value.getNodeByPath(e);if(!o)throw new Error(`Узел контекста ${e.join(". ")}  не найден при попытке перезагрузить слайс ${t}`);const i=o.getElement(t),s=null==i?void 0:i.getParent();if(s)return s.reloadElement(t,n,r)}async createNode(e,t,n){const r=await async function(){return(await(0,s.loadAsync)("Controls-DataEnv/dataLoader")).DataContextLoader}();if(this._$value.getNodeByPath(e)){const o=await new r({configs:n,router:this._$props.router}).load();this.createNodeSync(e,t,o)}}createNodeSync(e,t,n,r){const o=this._$value.getNodeByPath(e);if(!o)return s=t,a="createNode",void i.logger.error(`RootContext:${a}::Элемент контекста с именем ${s} уже существует`);var s,a;if(o.addChild(t,n),!r)this.notifyOnChange()}createRoot(e,t,n,r,o){const i=this._$value.getNodeByPath(e);if(i)i.addChild(t,n,r,!0,o)}async createElement(e,t,n){const r=await u(),o=await r.load({[t]:n},void 0,this._$props.router);this.createElementSync(e,t,n,o)}createElementSync(e,t,n,r){const o=this._$value.getNodeByPath(e);if(o)o.addElement(t,r,n),this.notifyOnChange()}async createElements(e,t){const n=await u(),r=await n.load(t);this.createElementsSync(e,t,r)}createElementsSync(e,t,n){const r=this._$value.getNodeByPath(e);if(r)r.createElementsSync(t,n),this.notifyOnChange()}subscribe(e){return this.listeners.push(e),()=>{const t=this.listeners.indexOf(e);if(-1!==t)this.listeners.splice(t,1)}}getElementsFromPath(e,t=!1){let r={};if(e){r={};let o=this.getNodeByPath(e);const i=[];for(;o;){const e=o.getValue();if(t){const t={};Object.entries(e).forEach((([e,r])=>{t[e]=r instanceof n.Slice?r.state:r})),i.push(t)}else i.push(e);o=o.getParent()}if(i.length)i.reverse().forEach((e=>{r={...r,...e}}))}return r}_onChange(){this.version=this.version+=1,(0,l.unstable_batchedUpdates)((()=>{this.listeners.forEach((e=>{e.apply(this,[])})),this._$props.onChange({})}))}getState(e=this._$root){var t;return(null===(t=this._$value.getNodeByPath([e]))||void 0===t?void 0:t.getValue())||{}}getElement(e,t){var n;const r=this.getNodeByPath(t);if(r)return null===(n=r.getElement(e))||void 0===n?void 0:n.getValue()}getNodeByPath(e){return this._$value.getNodeByPath(e)}getNode(e){return this.getNodeByPath([e])||this.getNodeByPath([this._$root])}update(e){this._$value.update(e,!0),this.notifyOnChange()}getVersion(){return this.version}updateNodeElements(e,t,n){const r=this._$value.getNodeByPath(e);if(r)r.updateElements(t,n);this.notifyOnChange()}updateNode(e,t){const n=this._$value.getNodeByPath(e);if(n)n.update(t)}updateRoot(e,t,n=!1){const r=this._$value.getNodeByPath(e);if(r)if(n)r.update(t,n);else r.reInitState(t)}replaceRoot(e,t){const n=this.getNodeByPath(t),r=this.getNodeByPath(e);if(n&&r)n.setParent(r)}destroyNode(e){const t=this._$value.getNodeByPath(e);if(t)t.destroy()}destroy(){this._$value.destroy(),this.listeners=[]}},t}(0,{},p,Fe,x,m,r,_,t),Ae=function(e,t,n,r,o,i,s,a,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const c=[];return t.default=function(e,t,d,f,h=!1){const _=(0,n.useContext)(o.default),g=(0,n.useContext)((0,l.getWasabyContext)()),v=(0,r.default)(),p=(0,n.useRef)(),C=v[i.CONTEXT_NODE_PATH]||c,[y,m]=(0,n.use
16State)(_&&C.length?`${s.applied.Guid.create()}__root`:i.STORE_ROOT_NODE_KEY),E=(0,n.useRef)([]),O=(0,n.useMemo)((()=>{const e=[...C,y];if(!(0,u.isEqual)(E.current,e))return e;else return E.current}),[C,y]);if(!E.current.length)E.current=O;const x=(0,n.useRef)();let b=x.current;if(!b)b=(null==_?void 0:_[i.CONTEXT_STORE_FIELD])||new a.default({dataConfigs:e,onChange:t,router:g.Router,getSlicesConfig:d,getSlicesContextNodeName:f});x.current=b;const P=(0,n.useMemo)((()=>{const t=e.contextConfigs||e,n=t.hasOwnProperty(i.STORE_ROOT_NODE_KEY)?t[i.STORE_ROOT_NODE_KEY]:t,r={};if(t.hasOwnProperty(i.CONTEXT_DATA_CONFIG_FIELD))r[i.CONTEXT_DATA_CONFIG_FIELD]=t[i.CONTEXT_DATA_CONFIG_FIELD];return{...n,...r}}),[e]);if(!p.current){if(C.length)b.createRoot(C,y,P,t,d)}else if(p.current!==e)b.updateRoot(O,P,h);if(E.current!==O)b.replaceRoot(C,E.current),E.current=O;return p.current=e,(0,n.useEffect)((()=>()=>{null==b||b.destroyNode(O)}),[O,b]),{store:b,rootKey:y}},t}(0,{},n,te,k,x,_,Ie,s,f),Me=function(e,t,n,r,o,i,s,a,l,u){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=o.forwardRef((function({dataConfigs:e,getSlicesConfig:t,isPartialUpdateMode:c,attrs:d,children:f,getSlicesContextNodeName:h},_){const g=o.useCallback((()=>{}),[]),v=o.useContext(l.default),p=o.useMemo((()=>{if("string"==typeof t)return(0,i.loadSync)(t);else return t}),[t]),C=o.useMemo((()=>{let t={};if(e.configs&&e.loadResults){const n=new u.relation.Tree({parentProperty:"parentId",childrenProperty:"children",keyProperty:"name"}),r={...e.configs},o={...e.loadResults};if(Object.entries(r).forEach((([e,t])=>{const n={...t};if(!n.parentId&&"root"!==e)n.parentId="root";n.data=(null==o?void 0:o[e])||{},r[e]=n})),!r[s.STORE_ROOT_NODE_KEY])r[s.STORE_ROOT_NODE_KEY]={};let i;if(1===Object.keys(r).length)i=r;else n.parseTree(r),i=n.toObject();t=i[s.STORE_ROOT_NODE_KEY]||{}}else t={...e.contextConfigs||e};return t}),[e]),{store:y,rootKey:m}=(0,a.default)(C,g,p,h,c),E=o.useMemo((()=>{var e;if(null===(e=null==v?void 0:v.path)||void 0===e?void 0:e.length)return[...v.path,m];else return[m]}),[v.path,m]),O=o.useMemo((()=>({dataLayoutId:m,path:E})),[E,m]),x=o.useMemo((()=>({[s.CONTEXT_STORE_FIELD]:y,rootKey:m,configs:C})),[y,m,C]),b=o.useMemo((()=>{const e={};if(_)e.ref=_;if(d)e.attrs=d;return e}),[_,d]);return(0,n.jsx)(l.default.Provider,{value:O,children:(0,n.jsx)(r.default.Provider,{value:x,children:o.cloneElement(f,b)})})})),t}(0,{},e,k,n,r,x,Ae,D,_),Be=Me,Ve=function(e,t,n,r,o,i,s){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.DataContextProvider=void 0,t.DataContextProvider=i.forwardRef((function({children:e,loadResults:t,configs:a,dataLayoutId:l,value:u,getSlicesConfig:c,...d},f){const h=i.useMemo((()=>{if(u&&(!t||!a))return{contextConfigs:{configs:r.DataConfigResolver.convertLoadResultsToFactory(u),data:u}};else return{contextConfigs:{configs:a||{},data:t||{}}}}),[a,t,u]);return l?(0,n.jsx)(s.default,{dataLayoutId:l,ref:f,attrs:d.attrs,children:e}):(0,n.jsx)(o.default,{isRoot:!1,dataConfigs:h,getSlicesConfig:c,attrs:d.attrs,children:(0,n.jsx)(s.default,{ref:f,children:i.cloneElement(e,{...d,...e.props})})})})),t}(0,{},e,C,Me,n,ie),we=Ve,O.FIELD_TYPE=O.normalizeContextField=O.makeField=O.isDataContextField=O.ServerContext=O.getServerContext=O.FormContext=O.useContextDescription=O.useContextActionExecutor=O.useStrictSliceActions=O.FetchPolicyEnum=O.DataContextAPI=O.useSliceActions=O.useSelector=O.FormContainer=O.useDataContextProxyValue=O.DataContextProxy=O.registerBindingResolver=O.useDataAggregator=O.useBind=O.clearProps=O.useConnectedValue=O.useContextEdit=O.useFormReadonly=O.useContextNode=O.useStrictSlice=O.useSliceOld=O.useSlice=O.RootContext=O.RootContextProvider=O.CONTEXT_DATA_CONFIG_FIELD=O.STORE_ROOT_NODE_KEY=O.DataContext=O.Provider=void 0,Object.defineProperty(O,"Provider",{enumerable:!0,get:function(){return we.DataContextProvider}}),Object.defineProperty(O,"DataContext",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(O,"STORE_ROOT_NODE_KEY",{enumerable:!0,get:function(){return b.STORE_ROOT_NODE_KEY}}),Object.defineProperty(O,"CONTEXT_DATA_CONFIG_FIELD",{enumerable:!0,get:function(){return b.CONTEXT_DATA_CONFIG_FIELD}}),Object.defineProperty(O,"RootContextProvider",{enumerable:!0,get:function(){return Be.default}}),Object.defineProperty(O,"RootContext",{enumerable:!0,get:function(){return X.default}}),Object.defineProperty(O,"useSlice",{enumerable:!0,get:function(){return he.default}}),Object.defineProperty(O,"useSliceOld",{enumerable:!0,get:function(){return ye.default}}),Object.defineProperty(O,"useStrictSlice",{enumerable:!0,get:function(){return Ee.default}}),Object.defineProperty(O,"useContextNode",{enumerable:!0,get:function(){return ne.default}}),Object.defineProperty(O,"useFormReadonly",{enumerable:!0,get:function(){return W.useFormReadonly}}),Object.defineProperty(O,"useContextEdit",{enumerable:!0,get:function(){return q.useContextEdit}}),Object.defineProperty(O,"useConnectedValue",{enumerable:!0,get:function(){return Te.useConnectedValue}}),Object.defineProperty(O,"clearProps",{enumerable:!0,get:function(){return Te.clearProps}}),Object.defineProperty(O,"useBind",{enumerable:!0,get:function(){return ue.useBind}}),Object.defineProperty(O,"useDataAggregator",{enumerable:!0,get:function(){return Re.default}}),Object.defineProperty(O,"registerBindingResolver",{enumerable:!0,get:function(){return K.registerBindingResolver}}),Object.defineProperty(O,"DataContextProxy",{enumerable:!0,get:function(){return Pe.default}}),Object.defineProperty(O,"useDataContextProxyValue",{enumerable:!0,get:function(){return Pe.useDataContextProxyValue}}),Object.defineProperty(O,"FormContainer",{enumerable:!0,get:function(){return pe.default}}),Object.defineProperty(O,"useSelector",{enumerable:!0,get:function(){return oe.default}}),Object.defineProperty(O,"useSliceActions",{enumerable:!0,get:function(){return ge.default}}),Object.defineProperty(O,"DataContextAPI",{enumerable:!0,get:function(){return De.default}}),Object.defineProperty(O,"FetchPolicyEnum",{enumerable:!0,get:function(){return R.FetchPolicyEnum}}
16),Object.defineProperty(O,"useStrictSliceActions",{enumerable:!0,get:function(){return xe.default}}),Object.defineProperty(O,"useContextActionExecutor",{enumerable:!0,get:function(){return ee.default}}),Object.defineProperty(O,"useContextDescription",{enumerable:!0,get:function(){return de.default}}),Object.defineProperty(O,"FormContext",{enumerable:!0,get:function(){return $.default}}),Object.defineProperty(O,"getServerContext",{enumerable:!0,get:function(){return V.default}}),Object.defineProperty(O,"ServerContext",{enumerable:!0,get:function(){return V.ServerContext}}),Object.defineProperty(O,"isDataContextField",{enumerable:!0,get:function(){return I.isDataContextField}}),Object.defineProperty(O,"makeField",{enumerable:!0,get:function(){return I.makeField}}),Object.defineProperty(O,"normalizeContextField",{enumerable:!0,get:function(){return I.normalizeContextField}}),Object.defineProperty(O,"FIELD_TYPE",{enumerable:!0,get:function(){return M.FIELD_TYPE}}),O}));

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.