"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[906],{9688:function(e,o,t){t.d(o,{$_:function(){return n},G0:function(){return u},R2:function(){return m},Tz:function(){return p},d9:function(){return r},kU:function(){return a},qN:function(){return c},re:function(){return i},uF:function(){return l}});var r=.5,i=1.5,a=4.5,n=3,l=1.5,s=[{BackgroundColor:"#eee6f2",BackgroundImage:null,Name:"CV_HBG_Professional",PrimaryColor:"#21052e",SecondaryColor:"#0f0214",Thumbnail:null},{BackgroundColor:"#e6eff2",BackgroundImage:null,Name:"CV_HBG_Friendly",PrimaryColor:"#185b75",SecondaryColor:"#13475b",Thumbnail:null},{BackgroundColor:"#e6f2eb",BackgroundImage:null,Name:"CV_HBG_Playful",PrimaryColor:"#237547",SecondaryColor:"#1b5b38",Thumbnail:null},{BackgroundColor:"#f2ece6",BackgroundImage:null,Name:"CV_HBG_Relaxed",PrimaryColor:"#68503c",SecondaryColor:"#4f3c2d",Thumbnail:null},{BackgroundColor:"#e6ecf2",BackgroundImage:null,Name:"CV_HBG_3DMolecules",PrimaryColor:"#416083",SecondaryColor:"#344d6a",Thumbnail:null},{BackgroundColor:"#e6f2f1",BackgroundImage:null,Name:"CV_HBG_Travel",PrimaryColor:"#334241",SecondaryColor:"#1f2928",Thumbnail:null},{BackgroundColor:"#f2ebe6",BackgroundImage:null,Name:"CV_HBG_HappyChildren",PrimaryColor:"#663d22",SecondaryColor:"#4d2e1a",Thumbnail:null},{BackgroundColor:"#f2f2f2",BackgroundImage:null,Name:"CV_HBG_HeartSymbol",PrimaryColor:"#717475",SecondaryColor:"#585b5b",Thumbnail:null},{BackgroundColor:"#e6f1f2",BackgroundImage:null,Name:"CV_HBG_GroupOfPeople",PrimaryColor:"#507075",SecondaryColor:"#3f585b",Thumbnail:null},{BackgroundColor:"#f2f0e6",BackgroundImage:null,Name:"CV_HBG_CoffeeCup",PrimaryColor:"#756412",SecondaryColor:"#5b4e0e",Thumbnail:null},{BackgroundColor:"#f2f2f2",BackgroundImage:null,Name:"CV_HBG_Covid",PrimaryColor:"#757371",SecondaryColor:"#5b5a58",Thumbnail:null}];s.forEach((function(e,o){e=Object.freeze(e),s[o]=e}));var c,u,m,d=[{BackgroundColor:"#eee6f2",BackgroundImage:null,Name:"CV_ProfessionalStyle",PrimaryColor:"#21052e",SecondaryColor:"#0f0214",Thumbnail:null},{BackgroundColor:"#e6eff2",BackgroundImage:null,Name:"CV_FriendlyStyle",PrimaryColor:"#185b75",SecondaryColor:"#13475b",Thumbnail:null},{BackgroundColor:"#e6f2eb",BackgroundImage:null,Name:"CV_PlayFullStyle",PrimaryColor:"#237547",SecondaryColor:"#1b5b38",Thumbnail:null},{BackgroundColor:"#f2ece6",BackgroundImage:null,Name:"CV_RelaxedStyle",PrimaryColor:"#68503c",SecondaryColor:"#4f3c2d",Thumbnail:null},{BackgroundColor:"#E9F0FE",BackgroundImage:null,Name:"CV_SimpleStyle",PrimaryColor:"#2266E3",SecondaryColor:"#1F5BCC",Thumbnail:null},{BackgroundColor:"#f2e6f2",BackgroundImage:null,Name:"CV_CompactStyle",PrimaryColor:"#B62DB2",SecondaryColor:"#9d2799",Thumbnail:null}];d.forEach((function(e,o){e=Object.freeze(e),d[o]=e})),function(e){e.Left="Left",e.Mid="Mid",e.Right="Right"}(c||(c={})),function(e){e.Top="Top",e.Mid="Mid",e.Down="Down"}(u||(u={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large"}(m||(m={}));var p=["".concat(c.Left).concat(u.Top),"".concat(c.Mid).concat(u.Top),"".concat(c.Right).concat(u.Top),"".concat(c.Left).concat(u.Mid),"".concat(c.Mid).concat(u.Mid),"".concat(c.Right).concat(u.Mid),"".concat(c.Left).concat(u.Down),"".concat(c.Mid).concat(u.Down),"".concat(c.Right).concat(u.Down)]},16297:function(e,o,t){t.r(o),t.d(o,{CVTitleContainer:function(){return F},createCVTitleContainer:function(){return B}});var r=t(34629),i=t(41594),a=t(87578),n=t(84239),l=t(17280),s=t(38826),c=t(75187),u=t(33471),m=t(33589),d=t(46976),p=t(67003),h=t(331),g=t(46519),f=t(63662),C=t(11709),T=t(9688),y=t(22224),M=t(53013),b=t(16038),S=t(30873),I=t(87083),v=t(71683),L=t(50793),H=t(72982),_=function(e){function o(o){var t=e.call(this,o)||this;return t.subTitleRef=i.createRef(),t.titleRef=i.createRef(),t.uxStateMaster=(0,a.nu)(),t.form=t.uxStateMaster.Model.FormMaster,t.update=function(){t.forceUpdate()},t.isLogoUp=t.isLogoUp.bind(t),t.isLogoDown=t.isLogoDown.bind(t),t.isTitleSubtitleMissing=t.isTitleSubtitleMissing.bind(t),t.form.observe(t.update,[n.z.Schema.OtherInfo,n.z.Schema.HeaderOtherInfo,n.z.Schema.Title,n.z.Schema.Description,n.z.Schema.HeaderImageFocalPointEnabled]),t}return(0,r.C6)(o,e),o.prototype.componentDidMount=function(){return(0,r.sH)(this,void 0,void 0,(function(){return(0,r.YH)(this,(function(e){return(0,S.X)($(this.subTitleRef.current)),(0,S.X)($(this.titleRef.current)),[2]}))}))},o.prototype.componentDidUpdate=function(){(0,S.X)($(this.subTitleRef.current)),(0,S.X)($(this.titleRef.current))},o.prototype.componentWillUnmount=function(){this.form.unobserve(this.update)},o.prototype.isLogoUp=function(){if(this.isTitleSubtitleMissing())return!1;var e=this.form.HeaderThemeMaster.Model.LogoPositionX||this.form.isFieldReady(n.z.Schema.LogoPositionX)&&this.form.Model.LogoPositionX||H.qN.Left,o=this.form.HeaderThemeMaster.Model.LogoPositionY||this.form.isFieldReady(n.z.Schema.LogoPositionY)&&this.form.Model.LogoPositionY||H.G0.Mid,t=this.form.HeaderThemeMaster.Model.TitlePositionX||this.form.isFieldReady(n.z.Schema.TitlePositionX)&&this.form.Model.TitlePositionX||H.qN.Left,r=this.form.HeaderThemeMaster.Model.TitlePositionY||this.form.isFieldReady(n.z.Schema.TitlePositionY)&&this.form.Model.TitlePositionY||H.G0.Mid,i="".concat(e).concat(o),a="".concat(t).concat(r);return T.Tz.indexOf(i)<=2&&T.Tz.indexOf(a)>2||T.Tz.indexOf(i)<=5&&T.Tz.indexOf(a)>5},o.prototype.isTitleSubtitleMissing=function(){return!(this.props.Title&&this.props.Title.trim().length||this.props.SubTitle&&this.props.SubTitle.trim().length)},o.prototype.isLogoDown=function(){if(this.isTitleSubtitleMissing())return!1;var e=this.form.HeaderThemeMaster.Model.LogoPositionX||this.form.isFieldReady(n.z.Schema.LogoPositionX)&&this.form.Model.LogoPositionX||H.qN.Left,o=this.form.HeaderThemeMaster.Model.LogoPositionY||this.form.isFieldReady(n.z.Schema.LogoPositionY)&&this.form.Model.LogoPositionY||H.G0.Mid,t=this.form.HeaderThemeMaster.Model.TitlePositionX||this.form.isFieldReady(n.z.Schema.TitlePositionX)&&this.form.Model.TitlePositionX||H.qN.Left,r=this.form.HeaderThemeMaster.Model.TitlePositionY||this.form.isFieldReady(n.z.Schema.TitlePositionY)&&this.form.Model.TitlePositionY||H.G0.Mid,i="".concat(e).concat(o),a="".concat(t).concat(r);return T.Tz.indexOf(a)<=2&&T.Tz.indexOf(i)>2||T.Tz.indexOf(a)<=5&&T.Tz.indexOf(i)>5},o.prototype.render=function(){var e=y.extend({},this.props.HTMLAttributes);return e.className=(0,s.x)(e.className,"office-form-title-container"),i.createElement("div",(0,r.Cl)({},e),this.isLogoUp()?this.renderMediaUpOrDown():null,this.createTitleContainer(),this.isLogoDown()?this.renderMediaUpOrDown():null,"Bottom"===this.props.MediaLayout?this.props.children:void 0,this.createOverflowMenu())},o.prototype.renderMediaUpOrDown=function(){var e;return e=this.props.children,i.createElement("div",{className:"cv-title-logo-flex"},e)},o.prototype.createTitleContainer=function(e){var o,t="office-form-title-box";return"Bottom"!==this.props.MediaLayout&&(t="".concat(t," ").concat(this.props.MediaLayout.toLowerCase()),o=this.props.children),i.createElement("div",{className:t},this.isLogoDown()||this.isLogoUp()?null:o,this.createTitle())},o.prototype.createTitle=function(){var e=y.extend({},this.props.HTMLPropsForInnerElement);e.className=(0,s.x)("office-form-title",e.className,"heading-".concat(this.props.HTMLPropsForInnerElement["aria-level"]),2===this.props.Heading&&"office-form-theme-secondary-color",!this.props.Title&&"empty-title");var o=this.props.RichTitle||this.props.Title;return i.createElement("div",{tabIndex:0},i.createElement("div",(0,r.Cl)({},e),i.createElement(v.xs.RichtTextControl,{HTMLContent:o}),e.children),this.createSubTitle())},o.prototype.createOverflowMenu=function(){return(0,b.lT)()||(0,M._x)()||this.props.Heading>1?null:(0,I.y)({ImmersiveReaderToggleProps:(0,r.Cl)({},this.props.ImmersiveReaderToggleProps)})},o.prototype.createSubTitle=function(){if(this.props.SubTitle){var e={RenderMode:"RichText",Text:this.props.RichSubtitle||this.props.SubTitle,ContainsHtml:!0};return i.createElement("div",{className:"office-form-subtitle heading-".concat(this.props.Heading||1),role:"heading","aria-level":2,ref:this.subTitleRef},i.createElement(L.K,(0,r.Cl)({},e)))}},o}(l.h);var P=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return(0,r.C6)(o,e),o.prototype.componentWillMount=function(){var e=this;this.update=function(){return e.forceUpdate()};var o=n.z.Schema;this.props.Form.observe(this.update,[o.Title,o.Description]);var t=this.props.Form.getImageSettingsMaster(n.z.Schema.LogoInfo),r=(0,a.W1)().Schema;t.observe(this.update,[r.NaturalWidth,r.NaturalHeight]);var i=this.props.Form.getImageMaster(n.z.Schema.Logo),l=(0,a.Ti)().Schema;i.observe(this.update,[l.ImageProcessingStatus,l.UploadParameters])},o.prototype.componentWillUnmount=function(){this.props.Form.unobserve(this.update),this.props.Form.getImageSettingsMaster(n.z.Schema.LogoInfo).unobserve(this.update),this.props.Form.getImageMaster(n.z.Schema.Logo).unobserve(this.update)},o.prototype.render=function(){var e,o=this.props.Form,t=this.props.Form.Model,a=this.props.Form.HeaderThemeMaster.Model,l=this.props.LocaleId,u=l?f.h.getFormResourceMaster(l,this.props.Form):void 0,d=(null==u?void 0:u.Model.title)||t.Title,p=(null==u?void 0:u.Model.subtitle)||t.Description,g=!!a.HeaderBackgroundImage&&a.HeaderBackgroundImage.trim().length,y=!!a.HeaderBackgroundImage&&a.HeaderBackgroundImage.indexOf("lists.office")>-1,M=o.getImageMaster(n.z.Schema.HeaderBGImage).Model.AltText,b=g?y?M:function(e){try{var o=e.match(/[\w-]+\.(jpg|png)/g);if(!o||1!==o.length)return null;switch(o[0].toLowerCase()){case"libimage1.jpg":case"styleimage_professional.jpg":return(0,m.qn)().CH_Professional_Style;case"libimage2.jpg":case"styleimage_friendly.jpg":return(0,m.qn)().CH_Friendly_Style;case"libimage3.jpg":case"styleimage_playful.jpg":return(0,m.qn)().CH_Playful_Style;case"libimage4.jpg":case"styleimage_relaxed.jpg":return(0,m.qn)().CH_Relaxed_Style;case"libimage7.jpg":return(0,m.qn)().CH_3DMolecule_Ariatext;case"libimage12.jpg":return(0,m.qn)().CH_Travel_Ariatext;case"libimage13.jpg":return(0,m.qn)().CH_HappyChildren_Ariatext;case"libimage15.jpg":return(0,m.qn)().CH_HeartSymbol_Ariatext;case"libimage17.jpg":return(0,m.qn)().CH_GroupPeople_Ariatext;case"libimage18.jpg":return(0,m.qn)().CH_CoffeeCup_Ariatext;case"libimage19.jpg":return(0,m.qn)().CH_Covid_Ariatext;default:return(0,m.qn)().CH_backgroundImage_text}}catch(e){return null}}(a.HeaderBackgroundImage):null,S=p?"".concat(d," ").concat(p):"".concat(d);b&&(S=S?"".concat(S," ").concat((0,m.qn)().CH_Image_Button_Aria," ").concat(b):"".concat(b));var I={className:(0,s.x)("__title__ office-form-form-title",!this.props.IsReadOnlyOnMobile&&"office-form-theme-primary-background"),tabIndex:-1,"aria-label":S};g&&(I={className:(0,s.x)("__title__ office-form-form-title",!this.props.IsReadOnlyOnMobile&&"office-form-theme-primary-background")});var v,L={"aria-level":(null===(e=(0,c.Db)())||void 0===e?void 0:e.embed)?2:1,role:"heading"},H=o.getImageMaster(n.z.Schema.Logo),P=o.getImageSettingsMaster(n.z.Schema.LogoInfo),F=H.Model;if(!F.ErrorType&&(F.ImageProcessingStatus!==h.Tc.Idle||(0,h.e_)(F))){var B=this.calcImageLayout(P),R=B.Width,k=B.Height,x=a.LogoSize||this.props.Form.isFieldReady(n.z.Schema.LogoSize)&&this.props.Form.Model.LogoSize||T.R2.Medium;x===T.R2.Small?(R=B.Width*T.d9,k=B.Height*T.d9):x===T.R2.Large&&(R=B.Width*T.re,k=B.Height*T.re),v=i.createElement(C.d,{ImageWidth:R,ImageHeight:k,ImageInfoMaster:H,ImageSettingMaster:P,ImageType:"Logo"})}return this.isCustomCSSFileNotExistOrToggleEnabled()&&o.isFieldReady(o.Schema.HeaderEnabled)&&"false"===o.Model.HeaderEnabled?i.createElement("div",{className:"cv-responsepage-header-off"}):i.createElement(_,(0,r.Cl)({HTMLAttributes:I,HTMLPropsForInnerElement:L,MediaLayout:"Left",ImmersiveReaderToggleProps:(0,r.Cl)({},this.props.ImmersiveReaderToggleProps),IsMobile:this.props.IsMobile},this.calcTitle()),i.createElement("div",null,v))},o.prototype.isCustomCSSFileNotExistOrToggleEnabled=function(){return!(!this.props.Form.isFieldReady(n.z.Schema.CustomCssFileName)||!(!this.props.Form.Model.CustomCssFileName||this.props.Form.Model.CustomCssFileName&&this.props.Form.isFieldReady(n.z.Schema.CustomCSSInLineHeaderToggle)&&"true"===this.props.Form.Model.CustomCSSInLineHeaderToggle))},o.prototype.calcTitle=function(){var e,o,t,r,i=this.props.Form.Model,a=this.props.LocaleId,n=a?f.h.getFormResourceMaster(a,this.props.Form):void 0;return e=(null==n?void 0:n.Model.title)||i.Title,t=(null==n?void 0:n.Model.subtitle)||i.Description,o=(0,p.Eq)((null==n?void 0:n.Model.formsprortlocaletitle)||i.FormsProRTTitle),r=(0,p.Eq)((null==n?void 0:n.Model.formsprortlocalesubtitle)||i.FormsProRTDescription),{Title:(0,d.getIoCModifiedTextField)(e,!0),SubTitle:(0,d.getIoCModifiedTextField)(t,!0),RichTitle:(0,d.getIoCModifiedTextField)(o,!0),RichSubtitle:(0,d.getIoCModifiedTextField)(r,!0)}},o.prototype.calcImageLayout=function(e){if(e.Model.NaturalWidth){var o=e.calcLogoLayout({isMobile:this.props.IsMobile});return{Height:o.ActualHeight,ImageLayout:o.Layout===g.oL.Vertical?"Top":"Left",Width:o.ActualWidth}}return{Height:(0,u.Vh)()/4,ImageLayout:"Left",Width:(0,u.aV)()/4}},o}(l.h),F=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return(0,r.C6)(o,e),o.prototype.componentWillMount=function(){var e=this;this.update=function(){return e.forceUpdate()};var o=n.z.Schema;this.props.Form.observe(this.update,[o.Title,o.Description]);var t=this.props.Form.getImageSettingsMaster(n.z.Schema.LogoInfo),r=(0,a.W1)().Schema;t.observe(this.update,[r.NaturalWidth,r.NaturalHeight]);var i=this.props.Form.getImageMaster(n.z.Schema.Logo),l=(0,a.Ti)().Schema;i.observe(this.update,[l.ImageProcessingStatus,l.UploadParameters])},o.prototype.componentWillUnmount=function(){this.props.Form.unobserve(this.update),this.props.Form.getImageSettingsMaster(n.z.Schema.LogoInfo).unobserve(this.update),this.props.Form.getImageMaster(n.z.Schema.Logo).unobserve(this.update)},o.prototype.render=function(){return i.createElement(P,(0,r.Cl)({},this.props))},o}(l.h);function B(e){return i.createElement(P,(0,r.Cl)({},e))}}}]); //# sourceMappingURL=https://artifacts.dev.azure.com/office/_apis/symbol/symsrv/response-page-pro.chunk.cvtitlerender.5c3a6c8.js.map/600d9ebfb72a93ad6f46c97bfe2bd1ac9c6a4d1c00fd39369449e1c8e2d2f8dd/response-page-pro.chunk.cvtitlerender.5c3a6c8.js.map