PageSourceSearch

https://www.appsheet.com/assets/2764f1a04f389f071c891c1676a7af688937360b74d16666be6e2266b8d7aaa7.js

js appsheet.com collected 2026-10-01 08:36:03 UTC 986,886 bytes, 2 lines download raw bytes

1(self.webpackChunkappsheet_app=self.webpackChunkappsheet_app||[]).push([["components_app_types_displays_index_ts"],{112963:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.scrollCooldown=t.default=void 0;var n=o(i(525965));t.scrollCooldown=100;t.default=n.default},779467:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.AppErrorBoundary=void 0;var n=i(249492),a=o(i(667294)),r=o(i(593186)),s=i(503567),l=o(i(571524)),d=i(278965),c=i(148521);const u=(e,t)=>(0,c.jsx)(n.Button,{color:"primary",variant:"contained","aria-label":"Copy error id",onClick:()=>{navigator.clipboard.writeText("Error id: "+e+"\n\nStack: "+(null==t?void 0:t.stack))},style:(0,d.convertToRtlWhenNecessary)({marginTop:"12px"}),children:"Copy error information"});class p extends a.default.Component{constructor(e){super(e),this.renderDefaultOnError=e=>{const t=(0,c.jsx)("a",{className:"link",href:s.SupportLink,target:"_blank",rel:"noopener noreferrer",children:"consult AppSheet’s help resources"});return(0,c.jsxs)("div",{style:(0,d.convertToRtlWhenNecessary)({padding:"24px"}),children:[(0,c.jsxs)("b",{style:(0,d.convertToRtlWhenNecessary)({fontSize:"16px"}),children:["An unexpected error occurred (id: ",this.state.frontendErrorTraceId,")."]}),(0,c.jsx)("br",{}),(0,c.jsx)("br",{}),"Please ",t," with the error information so it can be fixed.",(0,c.jsx)("br",{}),u(this.state.frontendErrorTraceId,this.state.error),(0,c.jsx)("br",{})," ",(0,c.jsx)("br",{}),window.DEBUG_MODE&&e.stack]})},this.state={error:void 0,frontendErrorTraceId:void 0}}componentDidCatch(e,t){let{componentStack:i}=t;if(l.default.IsStorybookPreview())throw new Error("Error boundary triggered in storybook");const o=Math.round(1e6*Math.random()),n=this.props.errorMessagePrefix?"".concat(this.props.errorMessagePrefix," "):"",a=e&&e.message?": ".concat(e.message):"",s="".concat(n,"ErrorBoundary.componentDidCatch").concat(a);r.default.ReportError(Object.assign({errorMessage:s,error:e,componentStack:i,frontendErrorTraceId:o},this.props.errorInfo)),null==this.state.error&&this.setState({error:e,frontendErrorTraceId:o})}render(){const{error:e}=this.state,{children:t,renderOnError:i}=this.props;return e?i?i(e):this.renderDefaultOnError(e):t}}t.AppErrorBoundary=p},944762:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ButtonSelectTestIds=void 0;var n,a=o(i(496486)),r=i(667294),s=o(i(386010)),l=o(i(112963)),d=i(803583),c=o(i(365914)),u=o(i(593186)),p=i(557310),h=i(148521);!function(e){e.Button="button-select-button"}(n||(t.ButtonSelectTestIds=n={}));class m extends r.Component{constructor(e){super(e),this.resizeButtons=this.resizeButtons.bind(this)}resizeButtons(){if(!this.wrapper||this.wrapper.className.includes("ButtonSelect--colorMode"))return;const e=this.wrapper.offsetWidth,t=[].slice.call(this.wrapper.children),i=t.map((e=>{if(e.className.includes("--blockMode"))return 80;let t=e.getAttribute("data-initialwidth");return t||(t=e.offsetWidth,e.setAttribute("data-initialwidth",t)),t}));i.push(60);const o=1.2*Math.max.apply(Math.max,i),n=100/Math.min(t.length,Math.floor(e/o))+"%";t.forEach((e=>{e.style.width=n}))}componentDidMount(){}componentDidUpdate(){}componentWillUnmount(){}onItemSelected(e,t){if(this.props.appModel&&this.props.appModel.inRollout("orderedEnumListSelection")){if(this.props.readOnly)return;let i=this.props.selected||[];a.default.isArray(i)||(i=[i]);const o=this.props.options.map(String),n=new Array(o.length);let r=!1;if(i.forEach((t=>{if(this.props.multiselect){const e=o.indexOf(t);e>=0?n[e]=t:n.push(t)}t===e&&(r=!0)})),this.props.listAttribute&&this.props.listAttribute.isRequired()&&!this.props.multiselect&&r)return;return n[t]=r?void 0:e,void(this.props.onChange&&this.props.onChange(n.filter((e=>null!=e))))}if(this.props.readOnly)return;let i=this.props.selected||[];a.default.isArray(i)||(i=[i]);const o=a.default.includes(i,e);if(this.props.listAttribute&&this.props.listAttribute.isRequired()&&!this.props.multiselect&&o)return;const n=c.default.arrayToggle(i,e,this.props.multiselect);this.props.onChange&&this.props.onChange(n)}enumOptionStats(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];try{const t=e.map((e=>e.length)),i=e.length,o=a.default.mean(t),n=i>1?a.default.sum(t.map((e=>
1Math.pow(o-e,2))))/(i-1):0;return{AverageLength:o,DistinctCount:a.default.uniq(e).length,EmptyRecordPercent:0,LongestValue:a.default.maxBy(e,(e=>e.length)),MaxLength:a.default.max(t),MinLength:a.default.min(t),MostFrequentValues:e,RecordCount:i,StdDevLength:Math.sqrt(n)}}catch(e){return u.default.ReportErrorOnce({errorMessage:"Error in enumOptionStats",error:e}),null}}render(){let e,t=this.props.selected;this.props.ignoreCase&&(t=t.map((e=>null==e?e:e.toString().toLowerCase()))),e=this.props.colorMode?d.TypeDisplaysApi.Color:this.props.elementAttribute?d.TypeDisplaysApi.lookup(this.props.elementAttribute):d.TypeDisplaysApi.Text;const i=(0,s.default)("ButtonSelect",{"ButtonSelect--read-only":this.props.readOnly,"ButtonSelect--large-text":this.props.largeText,"ButtonSelect--colorMode":this.props.colorMode,"ButtonSelect--color-mode-scale":this.props.colorModeScaleToFit,"ButtonSelect--stack":this.props.stack}),o=this.props.options.map(String).filter((e=>{"string"!=typeof e&&"number"!=typeof e&&u.default.warnToDevConsole("ButtonSelect was given a invalid option",e),this.props.ignoreCase&&e&&(e=e.toString().toLowerCase());const i=t&&t.indexOf(e)>=0;return!this.props.readOnly||i}));return(0,h.jsx)("div",{className:i,ref:e=>{this.wrapper=e},children:o.map(((i,o)=>{this.props.ignoreCase&&i&&(i=i.toString().toLowerCase());const n=t&&t.indexOf(i)>=0;return(0,h.jsx)(f,{option:i,id:i,index:o,isSelected:n,onSelect:this.onItemSelected.bind(this),colorMode:this.props.colorMode,attribute:this.props.elementAttribute,table:this.props.table,dataContext:this.props.dataContext,appModel:this.props.appModel,TypeDisplay:e},i)}))})}}m.defaultProps={selected:[]};class f extends r.Component{onTap(){this.props.onSelect&&this.props.onSelect(this.props.id,this.props.index)}render(){let e=null;if(this.props.dataContext){const t={};t[this.props.attribute.name()]=this.props.option,e=this.props.dataContext.augmentWithRowData(t)}const t=this.props.colorMode,i=this.props.TypeDisplay&&this.props.TypeDisplay.isBlock();let o=(0,s.default)("ButtonSelectButton",{"ButtonSelectButton--selected":this.props.isSelected,"ButtonSelectButton--read-only":this.props.readOnly,"ButtonSelectButton--color-mode":t,"ButtonSelectButton--text-mode":!t,"ButtonSelectButton--block-mode":i}),r=null;t&&a.default.isString(this.props.option)?(r=(0,h.jsx)("span",{className:"ButtonSelectButton__text"}),o+=" ButtonSelectButton--color-mode--"+this.props.option.toLowerCase()):r=(0,h.jsx)(this.props.TypeDisplay,{attribute:this.props.attribute,value:this.props.option,appModel:this.props.appModel,allowTaps:!1,ignoreFormatRuleColors:!0,imageDisplayType:"full",table:this.props.table,dataContext:e||this.props.dataContext,displayMode:"inline",isBasic:!0});let d=null;this.props.isSelected&&(i||t)&&(d=(0,h.jsx)("div",{className:(0,s.default)({"ButtonSelectButton__selection-indicator":i,"ButtonSelectButton__color-selection-indicator":t,"ButtonSelectButton__color-selection-indicator--dark":t&&"black"!==this.props.option}),children:(0,h.jsx)("span",{children:(0,h.jsx)("i",{className:"fa fa-check"})})}));let c=t?this.props.option:void 0;t&&this.props.isSelected&&(c+=" - selected");const u=!p.ReactRootUIConfig.isReactRoot()||t||i?{}:{paddingBottom:"0.6em",height:"2.667rem",alignItems:"center",display:"flex",justifyContent:"center"};return(0,h.jsx)("div",{className:(0,s.default)("ButtonSelectButton__wrapper",{"ButtonSelectButton__wrapper--colorMode":t,"ButtonSelectButton__wrapper--blockMode":i}),children:(0,h.jsxs)(l.default,{enabled:!this.props.readOnly,className:o,onTap:this.onTap.bind(this),title:c,"data-testid":n.Button,innerStyle:u,children:[r,d]})})}}t.default=m},388884:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.isDesktopDropdown=t.DesktopDropdown=void 0;var n=o(i(238416)),a=i(249492),r=o(i(925465)),s=o(i(407613)),l=o(i(185961)),d=o(i(329826)),c=o(i(363957)),u=o(i(289039)),p=o(i(62810)),h=o(i(317149)),m=o(i(735996)),f=o(i(459067)),g=P(i(12330)),y=o(i(386010)),v=o(i(618446)),b=o(i(393386)),w=P(i(667294)),S=i(74281),x=i(56749),C=i(557310),T=i(351101),I=i(700386),R=i(670759),O=i(496486),D=i(760629),N=i(775148),j=o(i(674823)),E=i(148521);function A(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(A=function(e){return e?i:t})(e)}
1function P(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=A(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}function M(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function k(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?M(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):M(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var _=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};const B="| APPSHEET_DEV_ADD_BUTTON |",L="| APPSHEET_DEV_NEW_BUTTON |",V="| APPSHEET_DEV_SELECT_ALL_BUTTON |",F=new Set([B,L,V]),W=e=>{null==e||e.preventDefault(),null==e||e.stopPropagation()},H=e=>{let t=[];return e&&(t=Array.isArray(e)?e:[e]),t},U=e=>{let t=0;for(let i=0;i<F.size;i++)F.has(e[i])&&t++;return e.length-t},G=(e,t,i,o)=>e.localizeWireValue(t,{transaction:i,noRefKeyFallback:o}),z=(0,a.makeStyles)((e=>({autocompleteRoot:{width:"100%",height:"100%"},autocompleteRootFocusedTableQuickEdit:{height:"fit-content !important"},specialDropdownOption:{color:e.palette.primary.main,width:"100%",padding:"".concat(e.spacing(.75,2,.75,1.5)," !important"),display:"flex",justifyContent:"start",fontSize:".8888rem","&:hover":{backgroundColor:e.palette.action.hover},textAlign:"left"},specialDropdownOptionBorder:{borderBottom:"".concat((0,x.themeColor)("dropdownSpecialOptionBorderColor")," 1px solid")},selectAllOption:{padding:"0px ".concat(e.spacing(2),"px 0px ").concat(e.spacing(2),"px !important")},optionBase:{pointerEvents:"auto !important",height:"52px !important",padding:"".concat(e.spacing(.75),"px 0px ").concat(e.spacing(.75),"px 0px"),borderRadius:0,'&[aria-selected="true"]':{backgroundColor:"inherit"},'&[data-focus="true"]':{backgroundColor:"".concat(e.palette.action.hover," !important")},"&:hover":{backgroundColor:"".concat(e.palette.action.hover," !important")}},option:{display:"flex",padding:"0px ".concat(e.spacing(.75),"px 0px ").concat(e.spacing(2),"px"),width:"100%",height:"inherit"},listbox:{overflowX:"hidden",padding:"0px",maxHeight:"".concat(364,"px !important")},popupIndicator:{marginRight:e.spacing(.75)},chipsRootReadOnly:{height:"auto !important",display:"flex",justifyContent:"left",flexWrap:"wrap",listStyle:"none",padding:0,margin:0},iconContainer:{display:"flex",width:"inherit"},icon:{marginRight:e.spacing(1)},iconMultiselect:{marginRight:"".concat(e.spacing(2),"px !important")},checkboxColored:{color:"".concat(e.palette.primary.main," !important")},checkboxDisabled:{color:"".concat(e.palette.action.disabled," !important")},dropdownInput:{minHeight:"2.222rem !important",border:"none !important",paddingLeft:"".concat(e.spacing(.5),"px !important"),padding:"0 12px 0 4px !important",width:"0 !important",textOverflow:"ellipsis",textAlign:"left !important"},dropdownInputTableQuickEdit:{fontSize:".722rem !important"},dropdownInputTableQuickEditFocused:{width:"auto !important",paddingLeft:"".concat(e.spacing(1.5),"px !important")},dropdownInputTableQuickEditNoFocus:{minWidth:"0 !important",width:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"},tagOverflowNumber:{marginLeft:"2px",fontSize:".722rem !important",color:(0,x.themeColor)("dropdownOverflowNumberColor"),display:"flex",justifyContent:"center",alignItems:"center"},endAdornment:{top:"inherit"},notchedOutlineFocused:{borderColor:"".concat(e.palette.primary.main," !important"),borderWidth:"2px"},notchedOutlineTableQuickEdit:{border:"none !important"},inputBase:{minHeight:"3em",lineHeight:"inherit",padding:"".concat(e.spacing(1,8.125,1,1.5)," !important"),"&:hover $notchedOutline":{borderColor:""}},inputBaseNoFocus:{borderColor:"#80868b !important"},inputBaseTableQuickEdit:{height:"fit-content !important",width:"auto !important",padding:"0 !important",textOverflow:"ellipsis",fontSize:"1em"},inputBaseTableQuickEditNoFocus:{flexWrap:"nowrap"},inputBaseTableQuickEditFocused:{position:"relative !important",border:"1px solid ".concat(e.palette.primary.main),background:(0,x.themeColor)("dropdownInputBaseTableQuickEditFocusedColor")},inputBaseTableQuickEditFocusedMultiselect:{overflowY:"auto",maxHeight:"10rem"},selectedCount:{fontSize:".8888rem",fontWeight:"bold",display:"flex",alignItems:"center"},labelsContainer:{display:"flex",alignItems:"center",justifyContent:"start",maxWidth:"fit-content",width:"inherit"}
1,ellipsisOverflow:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",width:"inherit"},readOnlyText:{width:"100%",height:"100%",display:"flex",alignItems:"center",marginLeft:e.spacing(1.5),textOverflow:"ellipsis"},selectAllRoot:{width:"100%"},dropdownContainerTableQuickEdit:{display:"flex",width:"100%",textOverflow:"ellipsis",fontSize:".722rem !important"},dropdownContainerTableQuickEditFocused:{height:"fit-content",width:"fit-content",zIndex:100,position:"fixed !important",minWidth:"300px",maxWidth:"500px",marginLeft:"-12px"},tagsContainer:{textAlign:"start",maxHeight:"10rem",overflowY:"scroll"},tagsContainerTableQuickEditFocused:{display:"contents",overflowY:"scroll",maxHeight:"20px"},tagsContainerTableQuickEditNoFocus:{display:"inherit"},tagsContainerNonTableQuickEditFocused:{paddingTop:"9px",paddingBottom:"9px"},formControlLabelRoot:{marginRight:"0",width:"inherit"},formControlLabelLabel:{width:"inherit"},displayGrid:{display:"grid"},textFieldRoot:{minHeight:"3em",justifyContent:"space-evenly"}}))),K=(0,a.makeStyles)((()=>({paper:{marginTop:0,marginBottom:0}}))),Y=e=>{const t=K();return(0,E.jsx)(s.default,k(k({},e),{},{elevation:8,className:(0,y.default)(t.paper,e.className)}))},q=e=>(0,E.jsx)(a.Popper,k({},e)),X=w.default.forwardRef((function(e,t){var i;const{children:o,autocompleteRef:n}=e,a=_(e,["children","autocompleteRef"]),r=(null==o?void 0:o.length)||0;return(0,E.jsx)("div",{ref:t,children:(0,E.jsx)("div",k(k({},a),{},{role:void 0,children:(0,E.jsx)(S.List,{role:"listbox",width:(null===(i=null==n?void 0:n.current)||void 0===i?void 0:i.offsetWidth)||500,height:Math.min(52*r,364),rowHeight:52,estimatedRowSize:52,overscanCount:0,rowCount:r,rowRenderer:e=>{let{index:t,key:i,style:n}=e;const a=o[t];return w.default.cloneElement(a,{style:n,key:i,tabIndex:"inherit"})}})}))})})),Q=e=>{const{inputString:t,onAddClick:i,isDisabled:o,multiselect:n,shouldRenderBottomBorder:r}=e,s=z(),l=t?"":(0,T.mapActionName)("Add a new option by typing"),d=t?"".concat((0,T.mapActionName)("Add")," '").concat(t,"'"):(0,T.mapActionName)("Add");return(0,E.jsx)(I.ASTooltip,{title:l,arrow:!0,placement:"left",enterDelay:1e3,enterNextDelay:1e3,leaveDelay:250,children:(0,E.jsx)(a.Button,{color:"primary",className:(0,y.default)(s.specialDropdownOption,s.optionBase,{[s.specialDropdownOptionBorder]:r}),disabled:o,"aria-disabled":o,onClick:i,"data-testid":"Dropdown-AddButton",children:(0,E.jsxs)("div",{className:s.iconContainer,children:[(0,E.jsx)(c.default,{className:(0,y.default)(s.icon,{[s.iconMultiselect]:n}),titleAccess:l}),(0,E.jsx)("span",{className:s.ellipsisOverflow,children:d})]})})})},$=e=>{const{onNewClick:t,label:i,isDisabled:o,multiselect:n,shouldRenderBottomBorder:r}=e,s=z(),l="".concat((0,T.mapActionName)("Create a new")," '").concat(i,"'"),d=(0,T.mapActionName)("New");return(0,E.jsx)(I.ASTooltip,{title:l,arrow:!0,placement:"left",enterDelay:1e3,enterNextDelay:1e3,leaveDelay:250,children:(0,E.jsx)(a.Button,{color:"primary",className:(0,y.default)(s.specialDropdownOption,s.optionBase,{[s.specialDropdownOptionBorder]:r}),disabled:o,"aria-disabled":o,onClick:t,"data-testid":"Dropdown-NewButton",children:(0,E.jsxs)("div",{className:s.iconContainer,children:[(0,E.jsx)(f.default,{className:(0,y.default)(s.icon,{[s.iconMultiselect]:n}),"aria-label":l}),d]})})})};function Z(e,t){return(0,g.createFilterOptions)({ignoreAccents:!1,stringify:function(e){return(0,j.default)(t.getOptionLabel(e))}})(e,t)}function J(e){let{existingSelection:t,allOptions:i,inputString:o,getOptionLabel:n}=e;const a=(0,O.difference)(Z(i,{inputValue:o,getOptionLabel:n}),[...F]),r=(0,b.default)(t,a);return r.length-t.length===a.length?r:(0,O.difference)(t,a)}const ee=e=>{const{options:t,selection:i,isDisabled:o,numSpecialOptions:n,shouldRenderBottomBorder:s,inputString:l,getOptionLabel:c}=e,u=z(),m=0===i.length,f=i.length+n===t.length,g=i.length,v=!m,b=!m&&!f,w=J({existingSelection:i,allOptions:t,inputString:l,getOptionLabel:c}).length<i.length?(0,T.mapActionName)("Clear all"):(0,T.mapActionName)("Select all");return(0,E.jsx)("div",{onClick:e.onSelectAllClick,"data-testid":"Dropdown-SelectAll",className:u.selectAllRoot,children:(0,E.jsx)(I.ASTooltip,{title:w,arrow:!0,placement:"left",enterDelay:1e3,enterNextDelay:1e3,leaveDelay:250,children:(0,E.jsx)(a.Button,{color:"primary",className:(0,y.default)({[u.specialDropdownOptionBorder]:s},u.specialDropdownOption,u.selectAllOption,u.optionBase),disabled:o,"aria-disabled":o,children:(0,E.jsx)(a.FormControl
1Label,{label:(0,E.jsx)("span",{className:u.selectedCount,children:0===g?w:"".concat(g," ").concat((0,T.mapActionName)("Selected"))}),control:(0,E.jsx)(r.default,{icon:(0,E.jsx)(h.default,{fontSize:"small"}),indeterminateIcon:(0,E.jsx)(d.default,{}),checkedIcon:(0,E.jsx)(p.default,{fontSize:"small"}),color:"primary",className:(0,y.default)({[u.checkboxDisabled]:o}),classes:{checked:u.checkboxColored,indeterminate:u.checkboxColored},checked:v&&!b,indeterminate:v&&b,inputProps:{"aria-label":w}})})})})})};t.isDesktopDropdown=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:C.ReactRootUIConfig.isInDesktopExperience();const i="ref"===e.type().toLowerCase(),o="Buttons"!==e.auxData().InputMode&&i,n=(e.isValidityEnum()||e.hasSuggestedValues()||["Enum","EnumList"].includes(e.type()))&&!e.shouldUseButtonSelect(e.enumValues()||[],e.allowOtherValues(),"enumlist"===e.type().toLowerCase(),e.isScannable());return t&&(o||n)};const te=e=>{const{setIsOpen:t}=e,i=(0,T.mapActionName)("Clear");return(0,E.jsx)(I.ASTooltip,{title:i,arrow:!0,placement:"bottom",enterDelay:1e3,enterNextDelay:1e3,leaveDelay:250,children:(0,E.jsx)(m.default,{fontSize:"medium",titleAccess:i,onClick:()=>{t(!1)}})})},ie=e=>{const t=z(),{multiselect:i,option:o,optionState:n,table:s,attribute:l,dataContext:d,transaction:c,imageOnlyDropdown:u,isTableQuickEdit:m}=e,f=(0,R.getPseudoTypeDisplayProperties)(o,s,l,d,c,u),g=f.textLabel||"",v=(0,E.jsxs)("div",{className:(0,y.default)(t.labelsContainer,t.ellipsisOverflow),children:[(0,E.jsx)(R.PseudoTypeDisplayAdornment,{formattingSettings:f.formattingSettings,table:s,attribute:l,dataContext:d,transaction:c,value:o,isTableQuickEdit:m,variant:"square"}),(0,E.jsx)(R.PseudoTypeDisplay,k(k({},f),{},{overflowLineCount:m?"1":"2"}))]},g);if(i){const e=(0,E.jsx)(a.FormControlLabel,{control:(0,E.jsx)(I.ASTooltip,{title:n.selected?(0,T.mapActionName)("Deselect"):(0,T.mapActionName)("Select"),arrow:!0,enterDelay:1e3,enterNextDelay:1e3,leaveDelay:250,children:(0,E.jsx)(r.default,{icon:(0,E.jsx)(h.default,{fontSize:"small"}),checkedIcon:(0,E.jsx)(p.default,{fontSize:"small"}),checked:n.selected,classes:{checked:t.checkboxColored}})}),className:t.formControlLabelRoot,classes:{label:t.formControlLabelLabel},label:v});return(0,E.jsx)("span",{"aria-label":g,className:(0,y.default)(t.option),onClickCapture:e=>{e.preventDefault()},children:e},g)}return(0,E.jsx)("span",{"aria-label":g,className:(0,y.default)(t.option),children:v},g)};t.DesktopDropdown=w.default.forwardRef(((e,t)=>{var i,o,n;const{table:a,attribute:r,dataContext:s,transaction:d,savedSelection:p,isTableQuickEdit:h,multiselect:m,onChange:f}=e,S=(0,w.useRef)(null),x=(0,w.useRef)(null);(0,w.useImperativeHandle)(t,(()=>S.current));const[C,O]=w.default.useState(!1),[A,P]=w.default.useState(null),[M,K]=w.default.useState([]),[oe,ne]=w.default.useState(null),[ae,re]=w.default.useState(!1),[se,le]=w.default.useState(),[de,ce]=w.default.useState(),ue=!!r.referencedTableName,pe=!(null===(i=e.tableSchema)||void 0===i?void 0:i.labelBasicAttribute())&&!!(null===(o=e.tableSchema)||void 0===o?void 0:o.labelImageAttribute()),he=null!==(n=null!=A?A:p)&&void 0!==n?n:"",me=null!=oe?oe:!m&&G(r,he,d,pe)||"",fe=e=>G(r,e,d,!1);(0,w.useEffect)((()=>{var e;const t=null!=A&&!(0,v.default)(A,p);if(!C){if("escape"===se)P(null);else if(t)return void f(he||(m?[]:""));null!=A&&P(null),null!=oe&&ne(null)}("clear"===de||null!=se&&document.activeElement===document.body)&&(null===(e=S.current)||void 0===e||e.focus()),se&&le(void 0),de&&ce(void 0)}),[se,de,C,m,f,p,he,oe,A,S]);const ge=e.allowAdds&&!!me,ye=ge&&!M.includes(me),ve=e.allowAddsThroughRef,be=ve,we=m&&!!U(M);(0,w.useEffect)((()=>{const t=[...ge?[B]:[],...ve?[L]:[],...we?[V]:[]],i=e.options.map(String),o=H(p),n=H(A);K((0,b.default)(t,i,o,n))}),[e.options,p,ge,ve,we,A]);const Se=M.length-U(M),xe=z(),Ce=C?(0,T.mapActionName)("Close"):(0,T.mapActionName)("Open"),Te=m?c.default:u.default,Ie=(0,E.jsx)(I.ASTooltip,{title:Ce,arrow:!0,placement:"bottom",enterDelay:1e3,enterNextDelay:1e3,leaveDelay:250,children:(0,E.jsx)(Te,{fontSize:"medium",titleAccess:Ce})}),Re=e=>{if(W(e),!me||M.includes(me))return;const t=m?[...he,me]:me;P(t),m?ne(null):O(!1)},Oe=t=>{var i;W(t),null===(i=e.addNewRefHandler)||void 0===i||i.call(e),O(!1),le("select-option")},De=e=>{W(e);const t=H(he);P(J({existingSelection:t,allOptions:M,inputString:me,getOptionLabel:fe}))},Ne=e=>()=>{re(e),e&&h&&O(!1)};return e.readOnly?(0,E.jsx)("div",{"data-testid":p,children:(0,E.jsx)("ul",{className:(0,y.default)(xe.chipsRootReadOnly,xe.ellipsisOverflow),children:H(he).map(((t,i)=>(0,E.jsx)("li",{"aria-label":G(r,t,d,pe),className:xe.displayGrid,children:(0,E.jsx)(N.EnumListChip,{index:i,option:t,table:a,attribute:r,dataContext:s,transaction:d,isTableQuickEdit:e.isTableQuickEdit,readOnly:e.readOnly,imageOnlyDropdown:pe},i)},i)))})}):(0,E.jsx)("div",{"data-testid":r.name(),className:(0,y.default)("DesktopDropdownContainer",{[xe.dropdownContainerTableQuickEdit]:h,[xe.dropdownContainerTableQuickEditFocused]:h&&ae}),children:(0,E.jsx)(g.default,{tabIndex:-1,innerRef:x,options:M,limitTags:h?1:12,value:he||null,inputValue:me,autoHighlight:!0,popupIcon:Ie,closeIcon:te({setIsOpen:O}),open:C,disableClearable:!he||h,multiple:m,blurOnSelect:!1,freeSolo:e.allowAdds,disableCloseOnSelect:m,forcePopupIcon:!h,getOptionLabel:fe,filterOptions:(e,t)=>{let i=t;if(t.inputValue){const e=(o=t.inputValue,(0,j.default)(o));e!==t.inputValue&&(i=Object.assign(Object.assign({},t),{inputValue:e}))}var o;const n=Z(e,i),a=[...ge?[B]:[],...ve?[L]:[],...we?[V]:[]];return a?(0,b.default)(a,n):n},renderOption:(t,i)=>{switch(t){case B:return(0,E.jsx)(Q,{inputString:me,isDisabled:!ye,onAddClick:Re,multiselect:m,shouldRenderBottomBorder:!we});case L:return(0,E.jsx)($,{isDisabled:!be,onNewClick:Oe,multiselect:m,label:e.label,shouldRenderBottomBorder:!we&&!!U(M)});case V:return(0,E.jsx)(ee,{onSelectAllClick:De,options:M,selection:H(he),isDisabled:!we,isTableQuickEdit:e.isTableQuickEdit,numSpecialOptions:Se,shouldRenderBottomBorder:!0,inputString:me,getOptionLabel:fe});default:return(0,E.jsx)(ie,{multiselect:m,option:t,optionState:i,table:a,attribute:r,dataContext:s,transaction:d,imageOnlyDropdown:pe,isTableQuickEdit:h})}},renderInput:t=>{var i;const o=(0,y.default)({[xe.notchedOutlineFocused]:ae,[xe.notchedOutlineTableQuickEdit]:h}),n=(0,y.default)(xe.inputBase,{[xe.inputBaseNoFocus]:!ae,[xe.inputBaseTableQuickEdit]:h,[xe.inputBaseTableQuickEditNoFocus]:h&&!ae,[xe.inputBaseTableQuickEditFocused]:h&&ae,[xe.inputBaseTableQuickEditFocusedMultiselect]:h&&ae&&m}),c=Object.assign(Object.assign({},t.InputProps),{className:(0,y.default)(t.InputProps.className,n),classes:{root:n,notchedOutline:o},readOnly:e.readOnly});let u;if(!m&&ue&&he){const e=(0,R.getPseudoTypeDisplayProperties)(he,a,r,s,d,pe,!0),{formattingSettings:t}=e;u=_(e,["formattingSettings"]).formatRulesClassNameAndStyles,ae&&!pe||(c.startAdornment=(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(R.PseudoTypeDisplayAdornment,{table:a,attribute:r,dataContext:s,transaction:d,value:he,variant:"square",isTableQuickEdit:h,formattingSettings:t}),(0,E.jsx)(D.FormattingRulesIcons,{formattingSettings:t,inDropdown:!0})," "]}))}let p="";(ae||C)&&(p=(0,T.mapActionName)("Search"),e.allowAdds&&(p=(0,T.mapActionName)("Add or search"))),ae&&(u={});const f=(0,E.jsx)(l.default,k(k({inputRef:S},t),{},{autoComplete:"off",variant:"outlined",InputProps:c,value:me,onChange:e=>ne(e.target.value),placeholder:p,classes:{root:xe.textFieldRoot},inputProps:Object.assign(Object.assign({},t.inputProps),{style:Object.assign(Object.assign({},t.inputProps),null==u?void 0:u.style),"aria-label":e.label,className:(0,y.default)("DesktopDropdownInputElement",null===(i=t.inputProps)||void 0===i?void 0:i.className,null==u?void 0:u.className,xe.dropdownInput,{[xe.dropdownInputTableQuickEdit]:h,[xe.dropdownInputTableQuickEditFocused]:h&&ae,[xe.dropdownInputTableQuickEditNoFocus]:h&&!ae}),onFocus:e=>{var i;null===(i=t.inputProps)||void 0===i||i.onFocus(e),Ne(!0)()},onBlur:e=>{var i;null===(i=t.inputProps)||void 0===i||i.onBlur(e),Ne(!1)()},onKeyDown:e=>{var i;"onKeyDown"in t.inputProps&&t.inputProps.onKeyDown(e),"Escape"===e.key&&!C&&h&&(null===(i=S.current)||void 0===i||i.blur())}})}));if(m)return f;const g=G(r,e.savedSelection,d,pe);return(0,E.jsx)(I.ASTooltip,{title:ae?"":g,arrow:!0,placement:h?"bottom":"bottom-start",enterDelay:1e3,enterNextDelay:1e3,leaveDelay:250,children:f})},onChange:(e,t)=>
1{if(t){const i=Array.isArray(t)?t[t.length-1]:t;switch(i){case B:Re(e);break;case L:Oe(e);break;case V:De(e)}if(F.has(i))return}P(null==t?m?[]:"":t)},onOpen:()=>{O(!0)},onClose:(e,t)=>{O(!1),le(t)},onKeyDown:e=>{["ArrowDown","ArrowUp","Enter"].includes(e.key)&&W(e)},classes:{root:(0,y.default)(xe.autocompleteRoot,{[xe.autocompleteRootFocusedTableQuickEdit]:ae&&h}),popupIndicator:xe.popupIndicator,option:xe.optionBase,endAdornment:xe.endAdornment,listbox:xe.listbox},PopperComponent:q,PaperComponent:Y,getOptionDisabled:e=>{switch(e){case B:return!ye;case L:return!be;case V:return!we;default:return!1}},ListboxComponent:X,ListboxProps:{autocompleteRef:x},onInputChange:(e,t,i)=>{""!==t||m||P(""),ce(i)},renderTags:(t,i)=>{let o=h?1:10;return ae&&(o=12),(0,E.jsxs)(E.Fragment,{children:[t.slice(0,o).map(((t,o)=>(0,E.jsx)(N.EnumListChip,{index:o,option:t,table:a,attribute:r,dataContext:s,transaction:d,isTableQuickEdit:e.isTableQuickEdit,readOnly:e.readOnly,getTagProps:i,imageOnlyDropdown:pe},o))),t.length>o&&(0,E.jsxs)("span",{className:xe.tagOverflowNumber,children:["+",t.length-o]})]})},openText:"",closeText:"",clearText:""})})}))},148448:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyView=void 0;var n=o(i(386010)),a=i(695386),r=i(278965),s=i(148521);const l=(0,a.makeStyles)((()=>({centeredContainer:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:"0.778rem",whiteSpace:"normal",maxWidth:200,minHeight:100}})));t.EmptyView=e=>{let{message:t="",className:i,height:o,width:a}=e;const d=l({});return(0,s.jsx)("div",{"data-testid":"empty-view",className:(0,n.default)("EmptyView",i,d.centeredContainer),style:(0,r.convertToRtlWhenNecessary)({margin:"auto",padding:0,height:o,width:a}),children:t})}},318927:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.Fab=void 0;var n=o(i(238416)),a=i(249492),r=o(i(386010)),s=i(303622),l=i(56749),d=i(700386),c=i(557310),u=i(148521);function p(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function h(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?p(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):p(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var m=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};const f=(0,a.makeStyles)({roundedFab:{borderRadius:"16px"}});t.Fab=e=>{var{title:t,className:i,children:o,tableName:n,actionName:p,controlName:g,root:y}=e,v=m(e,["title","className","children","tableName","actionName","controlName","root"]);const b=f();return(0,u.jsx)(s.EmulatorComponentWrapper,{containerClassName:i,dataVFEValues:{action:p,table:n,control:g,root:y,context:"OverlayFab"},isInteractive:!!n&&!!p,children:(0,u.jsx)(l.ASThemeProvider,{children:(0,u.jsx)(d.ASTooltip,{title:t,placement:"left",arrow:!0,children:(0,u.jsx)(a.Fab,h(h({color:"primary",className:(0,r.default)("circle-button-fab",i,{[b.roundedFab]:c.ReactRootUIConfig.isInMobileExperience()}),"aria-label":t},v),{},{children:o}))})})})}},92329:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FormEntryDataTestids=void 0;var n,a=o(i(238416)),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=O(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}(i(496486)),s=i(667294),l=i(264317),d=o(i(386010)),c=o(i(365914)),u=i(278965),p=o(i(150198)),h=i(462485),m=o(i(839999)),f=i(557310),g=i(593186),y=i(300431),v=i(388884),b=i(303622),w=i(157479),S=i(351101),x=i(725592),C=o(i(596091)),T=i(714067),I=o(i(832705)),R=i(148521);function O(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(O=function(e){return e?i:t})(e)}function D(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function N(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};
1t%2?D(Object(i),!0).forEach((function(t){(0,a.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):D(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}!function(e){e.Container="form-entry"}(n||(t.FormEntryDataTestids=n={}));class j extends y.ViewAwareComponent{constructor(e){super(e),this.mainRef=e=>{this.$domNode=e||void 0},this.handleSingleEnumClick=()=>{var e;const t=this.props.attribute;let i=this.props.value;i&&t.isRequired()||(i=i||null===(e=t.auxData().EnumValues)||void 0===e?void 0:e[0],this.props.onEntryValueChange(t,i,{}))},this.originalEditingState=window.IsEditing,this.onValueChange=(e,t)=>{this.props.onEntryValueChange&&this.props.onEntryValueChange(this.props.attribute,e,t)},this.onFocus=e=>{window.IsEditing=!0,this.props.onEntryFocus&&this.props.onEntryFocus(this.props.attribute,e)},this.onBlur=e=>{window.IsEditing=this.originalEditingState,this.props.onEntryBlur&&this.props.onEntryBlur(this.props.attribute,e)},this.onKeyDown=e=>{this.props.onEntryKeyDown&&this.props.onEntryKeyDown(this.props.attribute,e)},this.onTouchStart=e=>{this.props.onEntryTouchStart&&this.props.onEntryTouchStart(this.props.attribute,e)}}componentDidUpdate(e){f.ReactRootUIConfig.isReactRoot()&&e.attribute.isListOfRefs()&&(this.referencedTableTimestamps=e.attribute.appFormulaEvalTree().referencedTableTimestamps())}shouldComponentUpdate(e){const t=!!c.default.compareObjs(this.props,e).length,{attribute:i}=e;return t||!i.isListOfRefs()||!f.ReactRootUIConfig.isReactRoot()||this.isBehindFormOverlay||(0,r.isEqual)(this.referencedTableTimestamps,i.appFormulaEvalTree().referencedTableTimestamps())?t:((0,g.logToDevConsole)("Updating ".concat(i.name()," because dependent table changed")),!0)}inputId(){const e=this.props.screenId;return c.default.makeElementId("__"+(null!=e?e:"")+this.props.attribute.name())}get tableMode(){return"table"===this.props.viewType}focus(e){this.typeInput.focus(e)}scrollPosition(){return this.$domNode?this.$domNode.offsetTop:null}reserveSpaceForIcons(){let e=0;return this.props.attribute.isScannable()&&e++,this.props.attribute.isNfcScannable()&&e++,e||1}isSingleEnumOption(e){if("Color"===e.type()){return 1===(e.auxData().EnumValues||[]).length}return!1}get table(){const{appModel:e,tableName:t}=this.props;let{table:i}=this.props;return null==i&&({table:i}=e.findTableCollection(t)),i}get missingRequired(){const{value:e,attribute:t,required:i}=this.props;return i&&!p.default.valueExists(e,t.type())}get shouldShowInvalidErrorState(){const{shouldShowInvalidErrorState:e,modified:t,valid:i}=this.props;return Boolean((e||t)&&!i)}get shouldShowRequiredErrorState(){const{missingRequired:e}=this,{shouldShowRequiredErrorState:t,modified:i}=this.props;return Boolean((t||i)&&e)}get shouldShowUnsavedErrorState(){const{unsaved:e,shouldShowInvalidErrorState:t,modified:i}=this.props;return Boolean((t||i)&&e)}renderErrorMessage(){const{attribute:e,dataContext:t,value:i}=this.props,o=e.shouldUseImageGallery()&&e.splitEnumListValue(i).length>T.MAX_IMAGES,n=t=>{if(o){const o=e.splitEnumListValue(i).length-T.MAX_IMAGES;t="Images to remove: ".concat(o)}return(0,R.jsxs)("div",{className:(0,d.default)("ErrorMessageText"),"data-testid":"error-message-text",children:[(0,R.jsx)(C.default,{fontSize:"small"}),t]})};if(!this.tableMode){let i="";if(this.shouldShowInvalidErrorState){i="This entry is invalid";const o=e.invalidMessageEvalTree();if(o)return(0,R.jsx)(s.Suspense,{fallback:null,children:(0,R.jsx)(w.QueryRollout,{query:(0,x.queryExpressionAndLocalize)(o,t),children:e=>n(e||(0,S.mapActionName)(i))})})}else this.shouldShowRequiredErrorState?i="This entry is required":this.shouldShowUnsavedErrorState&&(i="Unable to save changes");if(i)return n((0,S.mapActionName)(i))}}renderInput(e){const{value:t,attribute:i,dataContext:o,entryId:a,itemNumber:s,required:l,valid:c,editable:p,focused:h,modified:m,usePlaceholderLabel:g,displayName:y,description:b,yesNoMode:w,refreshId:S,maxNestedRows:x,formStyle:C,width:T,height:O,hideLabel:D}=this.props,{table:j,tableMode:E}=this;if(null==j)return null;const A=this.renderErrorMessage();let P;null!=s&&(P=(0,R.jsx)("span",{className:"FieldCount",children:s+": "}));const M=b||i.description(o)||y||i.displayName(o);let k,_=null;if(!D){const e=b?"FieldDescription":"FieldName",t={paddingRight:g?"".concat(2.25*this.reserveSpaceForIcons(),"em"):void 0};_=(0,R.jsxs)("div",{className:(0,d.default)("FormEntryLabel","control-label",{ReactRootDetailVie
1wFont:f.ReactRootUIConfig.isReactRoot()}),style:(0,u.convertToRtlWhenNecessary)(t),children:[P,(0,R.jsx)("span",{className:e,children:M})]})}let B=T;const L=O;E&&(k=r.default.pick(this.props,["height","width","paddingLeft","paddingRight"]),k.width&&(B=k.width-(this.props.paddingLeft||0)-(this.props.paddingRight||0)));const V={};"Yes/No"===i.type()&&w&&"yes/no"!==w&&(V.display="flex",V.flexDirection="row",V.alignItems="center");const F=(0,d.default)("FormEntry","control-group",a,{"FormEntry--invalid":this.shouldShowInvalidErrorState||this.shouldShowUnsavedErrorState,"FormEntry--required":l,"FormEntry--missingRequired":this.shouldShowRequiredErrorState,"FormEntry--modified":m,"FormEntry--disabled":E&&!p,PlaceholderLabel:g,FocusedInput:h,TableMode:E,DesktopDropdownMode:(0,v.isDesktopDropdown)(this.props.attribute)});if(this.isSingleEnumOption(i))return(0,R.jsx)(I.default,{attribute:i,value:t,onEntryValueChange:this.props.onEntryValueChange,className:F,style:(0,u.convertToRtlWhenNecessary)(k),label:_,hasErrorMessage:!!A,yesNoDisplayStyle:V,mainRef:this.mainRef});let W;const H=this.shouldShowInvalidErrorState||this.shouldShowRequiredErrorState||this.shouldShowUnsavedErrorState;E&&(m||H)&&(W=(0,R.jsx)("div",{className:"FormEntry--indicator",style:(0,u.convertToRtlWhenNecessary)({position:"absolute",width:0,height:0})}));const U=f.ReactRootUIConfig.isInDesktopExperience()?{}:V;return(0,R.jsxs)("div",{className:F,ref:this.mainRef,style:(0,u.convertToRtlWhenNecessary)(k),"data-testid":n.Container,children:[(0,R.jsx)("div",{className:A?"ErrorMessage":null,children:(0,R.jsxs)("div",{className:"FormEntryContent",style:(0,u.convertToRtlWhenNecessary)(U),children:[_,(0,R.jsxs)("div",{className:"FormEntryValue",style:(0,u.convertToRtlWhenNecessary)({flex:1}),children:[(0,R.jsx)("div",{id:this.inputId(),className:"EditableAttributeValue controls",onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onTouchStart:this.onTouchStart,children:(0,R.jsx)(e,N(N({},this.props),{},{ref:e=>{this.typeInput=e},label:M,value:t,yesNoMode:w,table:j,tableSchema:j.tableSchema,editable:p,valid:c,required:l,refreshId:S,onValueChange:this.onValueChange,width:B,height:L,maxNestedRows:x,formStyle:C}))}),A]})]})}),W]})}render(){var e,t,i,o;const{attribute:n}=this.props,{table:a}=this;if(null==a)return null;let r;if(!this.props.hidden&&n.hasInputMethod()){const e=n.type();if("Show"===e)r=(0,R.jsx)(m.default,N(N({},this.props),{},{table:a}));else{const t=h.TypeInputsApi.lookup(e,n);r=this.renderInput(t)}}return r?(0,R.jsx)(l.TransitionGroup,{children:(0,R.jsx)(l.CSSTransition,{classNames:"form-entry",timeout:{enter:250,exist:250},children:(0,R.jsx)(b.EmulatorComponentWrapper,{margin:"0 -8px",dataVFEValues:{root:this.props.viewType,table:null!==(e=this.props.tableName)&&void 0!==e?e:void 0,control:null!==(i=null===(t=this.currentUIState)||void 0===t?void 0:t.ControlName)&&void 0!==i?i:void 0,column:null!==(o=null==n?void 0:n.name())&&void 0!==o?o:void 0,context:"FormEntry"},isInteractive:"Show"===n.type()||"form"===this.props.viewType,children:r})})}):null}}t.default=j},59775:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FormFooterButtonText=void 0;var n,a=i(667294),r=o(i(112963)),s=i(21870),l=i(278965),d=i(249492),c=i(557310),u=i(148521);!function(e){e.Cancel="Cancel",e.Delete="Delete",e.Done="Done",e.Next="Next",e.Prev="Prev",e.Save="Save"}(n||(t.FormFooterButtonText=n={}));class p extends a.Component{constructor(e){super(e)}getFontStyle(){return c.ReactRootUIConfig.isInMobileExperience()?{fontSize:"0.889rem"}:{}}renderPrevButton(){const{onPrevious:e}=this.props;return e?(0,u.jsx)(r.default,{innerStyle:this.getFontStyle(),"data-testid":"footer-button-prev",className:"FormView__footer-button FormView__footer-prevButton",onTap:e,children:this.mapActionName(n.Prev)}):null}renderNextButton(){const{onNext:e}=this.props;return e?(0,u.jsx)(r.default,{innerStyle:this.getFontStyle(),"data-testid":"footer-button-next",className:"FormView__footer-button FormView__footer-nextButton",onTap:e,children:this.mapActionName(n.Next)}):null}renderCancelButton(){const{onCancel:e,onDelete:t,onPrevious:i}=this.props,o=null!=t?t:e;if(!o)return null;const a=t?n.Delete:n.Cancel,s=i?{position:"relative"}:{left:"21px"};return(0,u.jsx)(r.default,{"data-testid":"footer-button-cancel",className:"FormView__footer-button FormView__footer-cancelButton",innerStyle:Object.assign(Object.assign({},s),this.getFontStyle()),onTap:o,children:this.mapActionName(a)})}renderSaveButton(){const{onSave:e,onDone:t}=this.props,i=null!=t?t:e;if(!i)return null;const o=t?n.Done:n.Save;return(0,u.jsx)(r.default,{"data-testid":"footer-button-save",className:"FormView__footer-button FormView__footer-saveButton",onTap:i,innerStyle:this.getFontStyle(),children:this.mapActionName(o)})}renderPlaceholderButton(){const{onNext:e,onSave:t,onDone:i}=this.props;return e||t||i?null:(0,u.jsx)(r.default,{"data-testid":"footer-button-save",className:"FormView__footer-button FormView__footer-saveButton",innerStyle:this.getFontStyle(),children:this.mapActionName(n.Save)})}mapActionName(e){return this.props.appModel.MapActionName(e)}render(){const{moveToTop:e,scrollbarWidth:t,appModel:i}=this.props,o=e?"TopPosition":"BottomPosition",n=e?"down":"up",a=(0,u.jsx)("div",{className:"FormView__footer ".concat(o),style:(0,l.convertToRtlWhenNecessary)({paddingRight:t,height:s.DEFAULT_FOOTER_HEIGHT}),children:(0,u.jsxs)("div",{className:"FormView__footer-buttonWrapper",children:[this.renderPrevButton(),this.renderCancelButton(),this.renderNextButton(),this.renderSaveButton(),this.renderPlaceholderButton()]})});return c.ReactRootUIConfig.isInMobileExperience()?(0,u.jsx)(d.Slide,{direction:n,in:!!i,children:a}):a}}t.default=p},106375:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(386010)),a=o(i(496486)),r=o(i(112963)),s=i(10311),l=i(218546),d=i(318926),c=i(557310),u=o(i(173861)),p=i(664583),h=i(300431),m=i(303622),f=i(278965),g=i(365914),y=i(148521);const v={"Map Sidebar":"MapSlideshowViewAction","TableView GroupedHeaderRow Inline":"TableViewGroupedHeaderRowAction","Table Row":"TableRow","Deck Row":"DeckActionBarAction","Slideshow Inline":"DetailField","Slideshow Body":"DetailBodyAction","Gantt View":"GanttView"};class b extends h.ViewAwareComponent{handleTap(){const{action:e,appModel:t,rowId:i,sourceLocationName:o,sourceTable:n,shouldBeHidden:a}=this.props;a&&d.logger.logAppEvent({eventName:l.AppEventName.HiddenActionButton}),(0,p.runAppAction)(e,{appModel:t,rowId:i,sourceLocationName:o,sourceTable:n},void 0,this.viewStackKey)}get displayName(){const{action:e,appModel:t,tableSchema:i,rowValues:o}=this.props;return e.displayName(t,i,o,{viewStackKey:this.viewStackKey})}get textMode(){var e;const{displayMode:t}=this.props;return(null===(e=this.displayName)||void 0===e?void 0:e.trim())?"large"===t?"label":"tooltip":"none"}updateFormattingRules(e){const t=(0,s.getActionFormattingRules)(e.appModel,e.action,e.rowId);this.setState({formattingSettings:t,lastDataStamp:e.appModel.DataStamp})}UNSAFE_componentWillMount(){this.updateFormattingRules(this.props)}UNSAFE_componentWillReceiveProps(e){e.rowId===this.props.rowId&&e.appModel.DataStamp===this.state.lastDataStamp||this.updateFormattingRules(e)}get colorStyles(){var e;const{displayMode:t,invertColors:i}=this.props,o=null!==(e=this.state.formattingSettings.highlightColor)&&void 0!==e?e:void 0,n={};return i||"large"===t?n.backgroundColor=o:"small"===t&&(n.color=o),n}render(){var e,t,i,o,s;const l=(0,n.default)("GenericActionButton",this.props.appModel.rolloutClassNames,{"GenericActionButton--small-mode":"small"===this.props.displayMode,"GenericActionButton--large-mode":"large"===this.props.displayMode,"GenericActionButton--large-mode-react-root":"large"===this.props.displayMode&&c.ReactRootUIConfig.isReactRoot(),"GenericActionButton--disabled":this.props.disabled,"GenericActionButton--max-height":!c.ReactRootUIConfig.isInDesktopExperience()&&"Slideshow Body"===this.props.sourceLocationName}),d=u.default.cssStylesForText(this.state.formattingSettings);let p={};d.color&&(p={color:d.color});let h=this.props.action.icon();this.state.formattingSettings.icon.length&&(h=this.state.formattingSettings.icon[0]);const{textMode:b,displayName:w}=this;return h=(0,g.getFontAwesomeIconNameWithPrefix)(h),(0,y.jsx)(m.EmulatorComponentWrapper,{containerStyles:{width:"100%",height:"100%"},dataVFEValues:{action:this.props.action.name(),table:null!==(t=null===(e=this.props.sourceTable)||void 0===e?void 0:e.name())&&void 0!==t?t:void 0,rowId:this.props.rowId,control:null===(i=this.currentUIState)||void 0===i?void 0:i.ControlName,root:null===(o=this.currentUIState)||void 0===o?void 0:o.Root,column:null!==(s=this.props.attributeName)&&void 0!==s?s:void 0,context:v[this.props.sourceLocationName]},isInteractive:"Unknown"!==this.props.action.createdBy(),children:(0,y.jsxs)(r.default,{className:l,onTap:this.handleTap.bind(this),enabled:!this.props.disabled,stopPropagation:!0,href:this.props.href,asyncTap:!1,innerStyle:a.default.extend({paddingLeft:this.props.paddingLeft+"px"},d),title:(null==w?void 0:w.trim())||void 0,"data-testonly-action":this.props.action.name(),"data-testid":this.props.action.name(),children:[(0,y.jsxs)("div",{className:"GenericActionButton__paddington"+(this.props.invertColors?" Inverted":""),style:(0,f.convertToRtlWhenNecessary)(this.colorStyles),children:[(0,y.jsx)("i",{className:(0,n.default)("GenericActionButton__icon",h)}),(0,y.jsx)("span",{className:"sr-only",children:w})]}),(0,y.jsx)("div",{className:"GenericActionButton__text","aria-hidden":!0,style:(0,f.convertToRtlWhenNecessary)(p),children:"label"===b?w:null})]})})}}t.default=b},299354:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(667294),a=i(249492),r=i(669968),s=i(646514),l=o(i(581937)),d=o(i(953463)),c=o(i(150198)),u=o(i(386010)),p=i(365914),h=i(975811),m=i(351101),f=i(714067),g=o(i(895466)),y=i(618583),v=i(148521),b=function(e,t,i,o){return new(i||(i=Prom
1ise))((function(n,a){function r(e){try{l(o.next(e))}catch(e){a(e)}}function s(e){try{l(o.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,s)}l((o=o.apply(e,t||[])).next())}))};const w=r.Responsive,S=(0,a.makeStyles)((e=>({container:{padding:"".concat(e.spacing(1),"px"),border:"1px solid ".concat(s.GOOGLE_GREY_300),borderRadius:"4px"},imagesContainer:{"& .react-grid-item":{background:"transparent"}},errorContainer:{border:"1px solid ".concat(s.GOOGLE_RED_300)},image:{width:"100%",height:"100%",objectFit:"cover",cursor:"pointer",borderRadius:"4px"},cameraInput:{border:"1px dashed ".concat(s.GOOGLE_GREY_600),width:"100%",height:"100%",borderRadius:"4px",display:"flex",justifyContent:"center",alignItems:"center","&& .FileUploadUtils":{position:"absolute",top:0,left:0,"& .FileUploadForm":{margin:0,"& .FileUploadInput":{height:"".concat(108,"px"),cursor:"pointer",opacity:0,border:"none"}}}},disabledCameraInput:{backgroundColor:"".concat(s.GOOGLE_GREY_100," !important")},uploadUtils:{opacity:0,position:"absolute"},maxImagesText:{color:s.GOOGLE_GREY_700,display:"flex",justifyContent:"start",marginTop:"".concat(e.spacing(1),"px"),padding:"3px"},noPhotographyIcon:{width:"1em",height:"1em",display:"inline-block",fontSize:"1.33rem"},photoIcon:{color:s.GOOGLE_GREY_600},clearIconButton:{position:"absolute",top:"3px",right:"3px",backgroundColor:"rgba(0, 0, 0, 0.38)",color:s.GOOGLE_WHITE,transform:"translate(-2px, 2px)",borderRadius:"50%",cursor:"pointer","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.40)"}},clearAllButton:{display:"flex",gap:e.spacing(1),justifyContent:"center",cursor:"pointer",color:s.GOOGLE_GREY_700,padding:"10px"},imageItemContainer:{border:"1px solid ".concat(s.GOOGLE_GREY_400),borderRadius:"4px"}})));t.default=e=>{let{onChange:t,onPhotoControlClick:i,renderUploadUtils:o,imageHandles:r,clearImage:s,clearAllImages:x,handleMouseUp:C,handleMouseDown:T}=e;const I=(0,n.useRef)(null),[R,O]=(0,n.useState)(1),[D,N]=(0,n.useState)(108),[j,E]=(0,n.useState)(),[A,P]=(0,n.useState)([]),M=j||r,k=S(),_={lg:5,md:4,sm:3,xs:2,xxs:1};(0,n.useEffect)((()=>{b(void 0,void 0,void 0,(function*(){const e=yield Promise.all(r.map((e=>e.getFlattenedUrlForImageSrc())));P(e)}))}),[r]),(0,n.useEffect)((()=>{if(t&&j){const e=j.map((e=>JSON.stringify(e))).join(c.default.listDelimiter);t(e),E(void 0)}}),[j]),(0,n.useLayoutEffect)((()=>{if(I.current){const e=I.current.clientWidth;N((e-8*(R+1))/R)}else N(108)}),[I.current,R]);const B={lg:(0,p.generateLayout)(M,_.lg),md:(0,p.generateLayout)(M,_.md),sm:(0,p.generateLayout)(M,_.sm),xs:(0,p.generateLayout)(M,_.xs),xxs:(0,p.generateLayout)(M,_.xxs)},L=M.length<f.MAX_IMAGES&&o&&o(),{width:V}=(0,y.useComponentSize)(I,window.innerWidth,window.innerHeight);return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)("div",{className:(0,u.default)(k.container,{[k.errorContainer]:M.length>f.MAX_IMAGES}),children:[(0,v.jsx)("div",{ref:I,className:k.imagesContainer,children:(0,v.jsxs)(w,{className:"layout ImageGallery",layouts:B,breakpoints:{lg:560,md:490,sm:300,xs:220,xxs:80},cols:_,rowHeight:D,width:V,compactType:"horizontal",onLayoutChange:e=>{e.some((e=>"camera"!==e.i))&&(0,p.updateImagePositions)(e,R);const t=e.slice(1).map((e=>g.default.from({id:e.i})));E(t)},onBreakpointChange:(e,t)=>
1{O(t)},isBounded:!0,margin:[8,8],children:[(0,v.jsxs)("div",{className:(0,u.default)(k.cameraInput,{[k.disabledCameraInput]:M.length>=f.MAX_IMAGES}),id:"camera","data-grid":{x:0,y:0,w:1,h:1,static:!0},"aria-label":"upload",onClick:()=>i(M.length>=f.MAX_IMAGES),children:[(0,v.jsx)("label",{children:(0,v.jsx)("div",{className:k.photoIcon,children:M.length>=f.MAX_IMAGES?(0,v.jsx)(h.NoPhotographyIcon,{className:k.noPhotographyIcon}):(0,v.jsx)(l.default,{})})}),L]},"camera"),M.map(((e,t)=>(0,v.jsxs)("div",{className:k.imageItemContainer,children:[(0,v.jsx)(a.IconButton,{className:k.clearIconButton,onClick:()=>s(t,M),onTouchStart:()=>s(t,M),size:"small","aria-label":(0,m.mapActionName)("Clear"),children:(0,v.jsx)(d.default,{})}),(0,v.jsx)("img",{"aria-label":"image item",src:A[t],alt:"",draggable:"false",className:k.image,onMouseDown:T,onMouseUp:()=>C(t),onTouchStart:T,onTouchEnd:()=>C(t)})]},e.id())))]})}),M.length>=2&&(0,v.jsxs)("div",{"aria-label":(0,m.mapActionName)("Clear all"),className:k.clearAllButton,onClick:x,children:[(0,v.jsx)(d.default,{}),(0,v.jsx)(a.Typography,{variant:"body1",children:(0,m.mapActionName)("Clear all")})]})]}),(0,v.jsx)("div",{className:k.maxImagesText,children:(0,v.jsxs)(a.Typography,{variant:"caption",children:["Max images: ",f.MAX_IMAGES]})})]})}},367397:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(667294),a=o(i(386010)),r=o(i(496486)),s=i(249492),l=o(i(105041)),d=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=b(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}(i(365914)),c=i(278965),u=o(i(571524)),p=o(i(593186)),h=o(i(480952)),m=i(166089),f=i(351101),g=i(874940),y=i(354632),v=i(148521);function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(b=function(e){return e?i:t})(e)}class w extends n.Component{static isValidUrl(e){return!!(0,d.fastTrim)(e)}constructor(e){super(e),this._imageRef=(0,n.createRef)(),this._rootRef=(0,n.createRef)(),this.state={loading:w.isValidUrl(this.props.src),error:!1,timerThresholdExceeded:!1,imageCrop:{}},this.resizeHandler=r.default.throttle((()=>this.setupContainer(this.props)),100)}get imageElement(){return this._imageRef.current}get rootElement(){return this._rootRef.current}get error(){return this.state.error}get loading(){return this.state.loading}get renderedSrc(){return this.shouldUseIOSCache()&&this.state.src?this.state.src:this.props.src}componentDidMount(){this.setupContainer(this.props),this.setupImage(this.props.src),window.addEventListener("resize",this.resizeHandler)}componentWillUnmount(){this.cleanupImage(),window.removeEventListener("resize",this.resizeHandler)}UNSAFE_componentWillReceiveProps(e){this.hasImageChanged(e)&&(this.cleanupImage(),this.setState({imageWidth:null,imageHeight:null}),this.setupImage(e.src)),this.isContainerResized(e)&&this.setupContainer(e)}hasImageChanged(e){return e.src!==this.props.src||e.cropMode!==this.props.cropMode}isContainerResized(e){return e.width!==this.props.width||e.height!==this.props.height}setup(){this.setupContainer(this.props),this.setupImage(this.props.src)}setupContainer(e){let t,i;e.width&&(t=e.width),e.height&&(i=e.height);const o=this.rootElement;null!=t&&null!=i||null==o||(t=null!=t?t:o.offsetWidth,i=null!=i?i:o.offsetHeight),(t&&this.state.containerWidth!==t||i&&this.state.containerHeight!==i)&&this.setState({containerWidth:t,containerHeight:i})}shouldUseIOSCache(){return u.default.InIOSWebView()&&u.default.InWKWebView()&&r.default.get(window,"AppModel.AppTemplate.Behavior.FullOfflineCaching")}setupImage(e){if(!w.isValidUrl(e))return;(0,g.checkForDeprecatedDriveMedia)(e,"ImageWithSpinner"),this.spinnerTimeout=setTimeout((()=>{this.state.loading&&this.setState({timerThresholdExceeded:!0}),this.spinnerTimeout=null}),1e3),this.sizingInterval&&p.default.warnToDevConsole("Overwrote sizingInterval! (bad)"),this.sizingInterval=setInterval((()=>
1{if(!this.loadingImage)return p.default.warnToDevConsole("Image with spinner sizing poll wasnt cleaned up"),void this.cancelSizingInterval();if(this.loadingImage.height||this.loadingImage.width){if(this.setState({imageWidth:this.loadingImage.width,imageHeight:this.loadingImage.height}),this.props.onImageSize){const e=this.sizing();this.props.onImageSize({loading:!1,width:this.loadingImage.width,height:this.loadingImage.height,scaledWidth:e.scaledWidth,scaledHeight:e.scaledHeight})}this.cancelSizingInterval()}}),150);const t=()=>{this.loadingImage=(0,h.default)(e,null,(()=>{const e=!this.state.imageWidth;if(this.loadingImage&&(this.setState({loading:!1,error:!1,src:this.loadingImage.src,imageWidth:this.loadingImage.width,imageHeight:this.loadingImage.height}),e&&this.props.onImageSize)){const e=this.sizing();this.props.onImageSize({loading:!1,width:this.loadingImage.width,height:this.loadingImage.height,scaledWidth:e.scaledWidth,scaledHeight:e.scaledHeight})}this.cancelSizingInterval(),this.loadingImage=null}),((t,i)=>{p.default.ReportErrorOnce({errorMessage:"ImageWithSpinner failed to load",nestedErrorMessage:i,errorStatusCode:t,src:e}),this.cancelSizingInterval(),this.setState({loading:!1,error:!0,errorStatusCode:t,errorMessage:i}),this.loadingImage=null,this.props.onImageSize&&this.props.onImageSize({loading:!1,error:!0})}))};!0===this.props.zeroImageLoadDelay?(this.loadTimeout=null,t()):this.loadTimeout=setTimeout((()=>{this.loadTimeout=null,t()}),100)}cleanupImage(){this.cancelSizingInterval(),this.loadingImage&&(this.loadingImage.onload=null,this.loadingImage.onerror=null,this.loadingImage.removeAttribute("src"),this.loadingImage=null),this.spinnerTimeout&&(clearTimeout(this.spinnerTimeout),this.spinnerTimeout=null),this.loadTimeout&&(clearTimeout(this.loadTimeout),this.loadTimeout=null)}cancelSizingInterval(){null!=this.sizingInterval&&(clearInterval(this.sizingInterval),this.sizingInterval=null)}sizing(){var e,t;const i=Math.min(this.state.containerWidth,this.state.containerHeight),o=null!==(e=this.state.imageWidth)&&void 0!==e?e:i,n=null!==(t=this.state.imageHeight)&&void 0!==t?t:i,a="full"===this.props.cropMode||"full-centered"===this.props.cropMode?"contain":"cover";return d.default.computeImageSizing({containerWidth:this.state.containerWidth,containerHeight:this.state.containerHeight,imageWidth:o,imageHeight:n,mode:a,centerHorizontal:"full"!==this.props.cropMode})}renderTextAvatar(e){let t=m.AppGlobals.ViewManager.theme.getThemeColor("mainBackgroundVariantExtra"),i=m.AppGlobals.ViewManager.theme.getThemeColor("secondaryText");const o=this.props.formattingSettings;o&&o.textColor&&(i=o.textColor),o&&o.highlightColor&&(t=o.highlightColor);const n=this.sizing(),a=e.length>
14?"inherit":void 0,r={top:n.top||0,left:this.props.alignment===f.DisplayMode.Centered?void 0:n.left||0,width:n.scaledWidth,height:n.scaledHeight,background:t,color:i,fontSize:a,textAlign:"center"},l="square"===this.props.cropMode?"square":"circular";return this.renderRootWith((0,v.jsx)(s.Avatar,{className:"ImageWithSpinner__image",style:(0,c.convertToRtlWhenNecessary)(r),variant:l,children:e}))}renderLoader(){return this.renderRootWith((0,v.jsx)(l.default,{className:"ImageWithSpinner__spinner",lines:11,length:5,width:2,radius:3,color:"#737373",zIndex:"auto"}))}renderImage(){const{alignment:e,customStyle:t,isBasic:i,src:o}=this.props;let n=t;if(null==n&&!i){const{top:t,left:i,scaledWidth:o,scaledHeight:a}=this.sizing();n={top:t,left:e===f.DisplayMode.Centered?"auto":i,width:o,height:a}}const a=performance.now();return this.renderRootWith((0,v.jsx)("img",{src:this.renderedSrc,className:"ImageWithSpinner__image",style:(0,c.convertToRtlWhenNecessary)(n),ref:this._imageRef,onLoad:()=>function(e,t){const i=performance.now()-t;try{const{pathname:t}=new URL(e);"/image/getimageurl"===t?y.remoteImageLatencyMetric.record(i,{Endpoint:"getimageurl"}):"/image/getremoteimageurl"===t&&y.remoteImageLatencyMetric.record(i,{Endpoint:"getremoteimageurl"})}catch(e){p.default.ReportErrorOnce({errorMessage:"Error parsing URL in recordImageLatencyMetrics",error:e})}}(this.renderedSrc,a),alt:""},o))}renderError(){const{errorStatusCode:e,errorMessage:t}=this.state,i=r.default.compact([e,t]).join(": ");return this.renderRootWith((0,v.jsx)("div",{className:"ImageWithSpinner__error",title:i,children:(0,v.jsx)("i",{className:"ImageWithSpinner__error-icon fa fa-exclamation-triangle"})}))}renderEmpty(){return this.renderRootWith((0,v.jsx)("div",{className:"ImageWithSpinner","data-testonly-src":(0,d.fastTrim)(this.props.src)}))}renderRootWith(e){const{src:t,className:i="",solidBackgroundColor:o,cropMode:n,imageBorderRadius:r,testId:s,alignment:l}=this.props,{imageWidth:u,imageHeight:p}=this.state,h=u>p,m=l===f.DisplayMode.Centered,g=(0,a.default)("ImageWithSpinner",{"ImageWithSpinner--solid-background-color":o,"ImageWithSpinner--crop-mode-round":"round"===n,"ImageWithSpinner--landscape":h,"ImageWithSpinner--p
1ortrait":!h,"ImageWithSpinner--centered":m,[i]:!m}),y={borderRadius:"round"===n?void 0:r};return(0,v.jsx)("div",{ref:this._rootRef,className:g,style:(0,c.convertToRtlWhenNecessary)(y),"data-testonly-src":(0,d.fastTrim)(t),"data-testid":s,children:e})}render(){const{src:e}=this.props,{containerWidth:t,containerHeight:i,error:o,loading:n,timerThresholdExceeded:a}=this.state;if(t&&i){const t=d.default.extractTextFromPlaceholderUrl(e);if(null!=t)return this.renderTextAvatar(t);if(n)return a?this.renderLoader():this.renderEmpty();if(o)return this.renderError();if(w.isValidUrl(e))return this.renderImage()}return this.renderEmpty()}}w.defaultProps={cropMode:"full"};t.default=w},803444:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.LegacyInlineView=void 0;var n=o(i(667294)),a=i(779467),r=i(698739),s=i(557310),l=i(351101),d=i(888861),c=i(29827),u=o(i(819433)),p=o(i(330702)),h=o(i(114871)),m=o(i(324675)),f=i(663767),g=i(148521);class y extends n.default.Component{getView(){return this.realView}render(){var e,t,i,o,n,r,y,v,b,w,S,x,C,T,I,R,O,D,N,j,E,A,P,M,k,_,B,L,V,F,W,H,U,G,z,K,Y,q,X,Q,$,Z,J,ee,te;const ie=(0,l.getAppModel)(),{table:oe,tableSchema:ne}=ie.findTableCollection(this.props.tableName),ae=(0,f.getInlineViewComponentByType)(this.props.viewType),re=ae===p.default||ae===m.default||ae===h.default,se=!s.ReactRootUIConfig.isInDesktopExperience()&&re?this.props.maxRows:null,le=(0,d.createAnd)(this.props.filterExpr?this.props.filterExpr:null===(e=this.props.viewState)||void 0===e?void 0:e.FilterExpr,this.context.query.toExpression());let de;if(s.ReactRootUIConfig.isInDesktopExperience()){const{tableName:e,parentViewStackKey:t}=this.props,i=(0,c.selectViewStack)((0,u.default)().getState());if(t){const o=i[(0,c.findViewStackIndex)(i,t)+1],n=o?(0,c.getTableName)(o):void 0,a=o?(0,c.getViewType)(o):void 0;de=e===n&&"detail"===a?o.mutableState.RowKey:void 0}}return(0,g.jsx)(a.AppErrorBoundary,{children:(0,g.jsx)(ae,{disableRowSwipe:this.props.disableRowSwipe,isInline:!0,uiState:this.props.viewState,view:this.props.view,useCardLayout:null===(t=this.props.viewState)||void 0===t?void 0:t.UseCardLayout,interactiveDashboardMode:this.props.interactiveDashboardMode,interactiveRowIds:this.props.interactiveRowIds,coupledViews:this.props.coupledViews,quickEditMode:this.props.quickEditMode,disableNavigation:this.props.disableNavigation,controlName:this.props.controlName,table:oe,tableSchema:ne,filterExpr:le,filterDefaults:this.props.filterDefaults||(null===(i=this.props.viewState)||void 0===i?void 0:i.DefaultValues),rowLimit:se,visibleMaxRowCount:this.props.maxRows,width:this.props.width,height:this.props.height,translucentMode:this.props.translucentMode,columnOrder:null===(o=this.props.viewState)||void 0===o?void 0:o.ColumnOrder,columnWidth:null===(n=this.props.viewState)||void 0===n?void 0:n.ColumnWidth,groupBy:null===(r=this.props.viewState)||void 0===r?void 0:r.GroupBy,sortBy:null===(y=this.props.viewState)||void 0===y?void 0:y.SortBy,imageDisplayType:null===(v=this.props.viewState)||void 0===v?void 0:v.ImageDisplayType,invokeAction:null===(b=this.props.viewState)||void 0===b?void 0:b.InvokeAction,galleryImageSize:(null===(w=this.props.viewState)||void 0===w?void 0:w.GalleryImageSize)||"Small",sidewaysScroll:this.props.sidewaysScroll,chartType:null===(S=this.props.viewState)||void 0===S?void 0:S.ChartType,maxNestedRows:null===(x=this.props.viewState)||void 0===x?void 0:x.MaxNestedRows,chartColumns:null===(C=this.props.viewState)||void 0===C?void 0:C.ChartColumns,trendLine:null===(T=this.props.viewState)||void 0===T?void 0:T.TrendLine,showLegend:null===(I=this.props.viewState)||void 0===I?void 0:I.ShowLegend,labelType:null===(R=this.props.viewState)||void 0===R?void 0:R.LabelType,colorCodes:null===(O=this.props.viewState)||void 0===O?void 0:O.ColorCodes,showMap:this.props.showMap,mapType:null===(D=this.props.viewState)||void 0===D?void 0:D.MapType,mapColumn:null===(N=this.props.viewState)||void 0===N?void 0:N.MapCol,secondaryTableName:null===(j=this.props.viewState)||void 0===j?void 0:j.SecondaryTable,secondaryColumn:null===(E=this.props.viewState)||void 0===E?void 0:E.SecondaryColumn,selectedTable:null!==(A=this.props.selectedTable)&&void 0!==A?A:null!=this.props.rowId?this.props.tableName:void 0,selectedColumn:this.props.selectedColumn,locationMode:null===(P=this.props.viewState)||void 0===P?void 0:P.LocationMode,groupAggregate:null===(M=this.props.viewState)||void 0===M?void 0:M.groupAggregate,headerColumns:null===(k=this.props.viewState)||void 0===k?void 0:k.headerColumns,mapMode:this.props.mapMode,mainDeckImageColumn:null===(_=this.props.viewState)||void 0===_?void 0:_.mainDeckImageColumn,primaryDeckHeaderColumn:null===(B=this.props.viewState)||void 0===B?void 0:B.primaryDeckHeaderColumn,layout:null===(L=this.props.viewState)||void 0===L?void 0:L.Layout,clickOverride:this.props.clickOverride,secondary
1DeckHeaderColumn:null===(V=this.props.viewState)||void 0===V?void 0:V.secondaryDeckHeaderColumn,deckSummaryColumn:null===(F=this.props.viewState)||void 0===F?void 0:F.deckSummaryColumn,startDateColumn:null===(W=this.props.viewState)||void 0===W?void 0:W.startDateColumn,endDateColumn:null===(H=this.props.viewState)||void 0===H?void 0:H.endDateColumn,startTimeColumn:null===(U=this.props.viewState)||void 0===U?void 0:U.startTimeColumn,endTimeColumn:null===(G=this.props.viewState)||void 0===G?void 0:G.endTimeColumn,labelColumn:null===(z=this.props.viewState)||void 0===z?void 0:z.labelColumn,categoryColumn:null===(K=this.props.viewState)||void 0===K?void 0:K.categoryColumn,defaultCalendarView:null===(Y=this.props.viewState)||void 0===Y?void 0:Y.defaultCalendarView,showActionBar:!this.props.disableAllActions&&(null===(q=this.props.viewState)||void 0===q?void 0:q.showActionBar),actionColumns:null===(X=this.props.viewState)||void 0===X?void 0:X.actionColumns,actionBarEntries:null===(Q=this.props.viewState)||void 0===Q?void 0:Q.actionBarEntries,rowId:this.props.rowId||(null===($=this.props.viewState)||void 0===$?void 0:$.RowKey)||de,parentId:this.props.parentId,searchQuery:this.props.searchQuery?this.props.searchQuery:null===(Z=this.props.viewState)||void 0===Z?void 0:Z.SearchTerm,mainSlideshowImageColumn:null===(J=this.props.viewState)||void 0===J?void 0:J.mainSlideshowImageColumn,detailContentColumn:null===(ee=this.props.viewState)||void 0===ee?void 0:ee.detailContentColumn,slideshowDisplayMode:null===(te=this.props.viewState)||void 0===te?void 0:te.SlideshowDisplayMode,onRowOpened:this.props.onRowOpened,disableSearchOnDrilldown:!0,disableAllActions:this.props.disableAllActions,overrideStateChangeMode:this.props.overrideStateChangeMode,ref:e=>this.realView=e,actionButtonContainer:this.props.actionButtonContainer,listContainerRef:this.props.listContainerRef})})}}t.LegacyInlineView=y,y.contextType=r.FilterContext},638157:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(667294)),a=o(i(973935)),r=o(i(112963)),s=i(318926),l=i(218546),d=i(44617),c=i(148521);class u extends n.default.Component{constructor(e){super(e),this.state={boxIsFocused:!1,isComposing:!1},this.handleOnChange=this.handleOnChange.bind(this),this.handleOnFocus=this.handleOnFocus.bind(this),this.handleOnBlur=this.handleOnBlur.bind(this),this.onKeyDown=this.onKeyDown.bind(this)}focus(){this.refs.input.focus()}checkShowBox(){const e=a.default.findDOMNode(this);let t;setTimeout((()=>{t=$.contains(e,document.activeElement),this.mounted&&this.setState({boxIsFocused:t})}))}positionDropdown(){const e=a.default.findDOMNode(this.refs.input),t=$(e),i=t.position();i.top+=t.outerHeight(),i.width=t.outerWidth();$(a.default.findDOMNode(this.refs.box)).css(i)}componentDidMount(){this.positionDropdown(),this.mounted=!0}componentDidUpdate(){this.positionDropdown()}componentWillUnmount(){this.mounted=!1}handleOnChange(e){"function"==typeof this.props.onChange&&this.props.onChange(e.target.value)}handleOnFocus(e){this.checkShowBox(),"function"==typeof this.props.onFocus&&this.props.onFocus(e)}handleOnBlur(e){this.checkShowBox(),"function"==typeof this.props.onBlur&&this.props.onBlur(e)}handleSelectItem(e){"function"==typeof this.props.onValue&&(s.logger.logAppEvent({eventName:l.AppEventName.AutoCompleteItemSelect}),this.props.onValue(e))}onKeyDown(e){d.dynamicRollouts.includeByOwnerId("InputsWithIMEWorkaround")&&"Enter"===e.key&&this.state.isComposing&&e.stopPropagation()}render(){var e;let t;if(null==this.props.value||""===this.props.value||this.props.noFilter)t=this.props.values.filter((e=>null!=e&&""!==e));else{const e=this.props.value.toString().toLowerCase();t=this.props.values.filter((t=>null!=t&&""!==t&&0===t.toString().toLowerCase().indexOf(e)))}const i=t.sort().slice(0,7),o=this.props.value&&this.props.values.indexOf(this.props.value)>=0,n=this.state.boxIsFocused&&!o&&i.length>0;return(0,c.jsxs)("div",{className:"InputWithAutocomplete",children:[(0,c.jsx)("input",{className:"InputWithAutocomplete__input",ref:"input",type:this.props.type,value:this.props.value||"",disabled:this.props.readOnly,onChange:this.handleOnChange,onFocus:this.handleOnFocus,onBlur:this.handleOnBlur,onCompositionStart:()=>{this.setState({isComposing:!0})},onCompositionEnd:()=>{this.setState({isComposing:!1})},onKeyDown:this.onKeyDown,"aria-label":null===(e=this.props)||void 0===e?void 0:e.attributeName}),n?(0,c.jsx)("div",{className:"InputWithAutocomplete__box",ref:"box",children:i.map((e=>(0,c.jsx)(r.default,{className:"InputWithAutocomplete__item",onTap:this.handleSelectItem.bind(this,e),preventDefault:!0,children:e},e)))}):null]})}}t.default=u},901711:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(667294),a=o(i(386010)),r=o(i(496486)),s=o(i(571524)),l=i(278965),d=i(148521);const c="appsheet-cache://url=",u=e=>!(!e||0!==e.indexOf(c));class p extends n.Component{constructor(e){super(e),this.state={loading:p.isValidUrl(this.props.src),error:!1},this.imgRef=e=>{this._imageElement=e},this.onImageLoad=this.onImageLoad.bind(this),this.onImageError=this.onImageError.bind(this)}static isValidUrl(e){return!!r.default.trim(e)}objectFit(){return"full"===this.props.cropMode||"full-centered"===this.props.cropMode?"contain":"cover"}get imageElement(){return this._imageElement}get error(){return this.state.error}get loading(){return this.state.loading}onImageLoad(){this.imageElement&&this.setState({loading:!1,error:!1})}onImageError(){const e=r.default.get(this,"imageElement.src");e&&u(e)&&!u(this.props.src)?this.imageElement.src=this.props.src:(this.setState({loading:!1,error:!0}),this.props.onImageError&&this.props.onImageError())}render(){const{error:e,loading:t}=this.state,{className:i,solidBackgroundColor:o,cropMode:n,width:h,height:m,isBasic:f,imageBorderRadius:g}=this.props;let{src:y}=this.props;s.default.InIOSWebView()&&s.default.InWKWebView()&&r.default.get(window,"AppModel.AppTemplate.Behavior.FullOfflineCaching")&&!u(y)&&(y=c+encodeURIComponent(y));const v=(0,a.default)(i,"LightweightImageWithSpinner",{"LightweightImageWithSpinner--solid-background-color":o,"LightweightImageWithSpinner--crop-mode-round":"round"===n,"LightweightImageWithSpinner--errored":e});let b,w,S;if(e||!p.isValidUrl(y))S=e&&(0,d.jsx)("i",{className:"LightweightImageWithSpinner__error-icon fa fa-exclamation-triangle"});else{const i={objectFit:this.objectFit(),maxWidth:"100%",maxHeight:"100%",opacity:t?0:1};h&&(i.width=h),m&&(i.height=m),b=(0,d.jsx)("img",{src:y,alt:e?"Failed to load image":"Image",onLoad:this.onImageLoad,onError:this.onImageError,className:"LightweightImageWithSpinner__image",style:f?null:(0,l.convertToRtlWhenNecessary)(i),ref:this.imgRef},y),t&&this.props.useLoadingSpinner&&(w=(0,d.jsx)("div",{className:"LightweightImageWithSpinner__spinner"}))}const x={borderRadius:"round"===n?void 0:g};return(0,d.jsxs)("div",{className:v,style:(0,l.convertToRtlWhenNecessary)(x),"data-testonly-src":r.default.trim(y),children:[S,w,b]})}}p.defaultProps={cropMode:"full"};t.default=p},605161:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(238416)),a=o(i(496486)),r=o(i(667294)),s=o(i(386010)),l=i(249492),d=o(i(571524)),c=o(i(593186)),u=i(557310),p=o(i(112963)),h=i(803583),m=i(299119),f=o(i(327755)),g=i(278965),y=i(148521);function v(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function b(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?v(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):v(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}class w extends r.default.Component{constructor(e){super(e),this.$modal=null,this.$popup=null,this.$tappable=null,this.modalRef=e=>{this.$modal=e},this.popupRef=e=>{this.$popup=e},this.tappableRef=e=>{this.$tappable=e},this.onTap=()=>{this.$tappable&&$(this.$tappable).focus(),this.$modal&&this.$modal.setAnchorElement(document.body),!1!==this.props.preventImmediateClose&&(this.closeTimeout=d.default.IsStorybookPreview()?null:setTimeout((()=>{this.closeTimeout=null}),500)),this.setState({open:!0})},this.onFinish=(e,t,i)=>{const o=this.state.currentSelection,n=this.props.onChange;null==this.closeTimeout||o!==this.props.selected?this.setState({open:!1},(()=>{setTimeout((()=>{void 0!==o&&n&&n(o,i),t&&t()}),m.Modal.closeTimeout()+50)})):c.default.logToDevConsole("timeout block!")},this.onChange=e=>{this.setState({currentSelection:e})},this.onModalOpen=()=>{!d.default.IsTouchEnabled()&&this.$popup&&this.$popup.focusInput()},this.onButtonKeyDown=e=>{!e||"Enter"!==e.key||d.default.IsMobileBrowser()||this.state.open||this.onTap()},this.state={}}UNSAFE_componentWillMount(){this.setState({currentSelection:this.props.selected})}UNSAFE_componentWillReceiveProps(e){a.default.isEqual(this.props.selected,e.selected)||this.setState({currentSelection:e.selected})}selectedArray(e){return e||(e=this.props),null==e.selected?[]:e.selected instanceof Array?e.selected:e.selected?[e.selected]:[]}
1tableMode(){return this.props.typeInput&&this.props.typeInput.tableMode()}render(){let e;const{appModel:t,listAttribute:i,optionAttribute:o,table:n,displayMode:a,width:r,height:d,dataContext:c,title:v,renderInlineButtons:w,getInputStyleWithInlineButtons:S}=this.props,x=i&&i.itemSeparator()||", ";if(o){const i=h.TypeDisplaysApi.lookup(o),s=this.selectedArray().map(((e,s)=>(0,y.jsx)(i,{attribute:o,value:e,allowTaps:!1,table:n,appModel:t,minimalView:!1,inlineModeBlockWidth:this.tableMode()?d:60,inlineModeBlockHeight:this.tableMode()?d:60,dataContext:c,displayMode:a||"block",height:d,width:r},s))),l=[];s.forEach(((e,t)=>{const i=t===s.length-1;l.push(e),i||l.push((0,y.jsx)("span",{className:"ListSelect__separator",children:x},"separator-"+t))})),e=l}else e=this.selectedArray().join(x);e&&e.length||(e=(0,y.jsx)("div",{className:"BaseTypeDisplay ListSelect--empty-spacer"}));const C=(0,s.default)("ListSelect",{"ListSelect--read-only":!!this.props.readOnly}),T=w&&w(),I=S&&S(T)||{};let R,O;this.tableMode()&&this.selectedArray().length||(null==T?void 0:T.length)>0||(R=(0,y.jsx)("i",{className:"icon DropdownCaret fa fa-fw "+(this.props.multiselect?"fa-plus":"fa-caret-down"),"aria-hidden":"true"})),null!=this.props.height&&(O={lineHeight:"".concat(this.props.height,"px")});const D=(0,y.jsx)(f.default,b(b({ref:this.popupRef},this.props),{},{isOpen:!!this.state.open,selected:this.state.currentSelection,onChange:this.onChange,onFinish:this.onFinish}));let N;return N=u.ReactRootUIConfig.isInMobileExperience()?(0,y.jsx)(l.Dialog,{open:!!this.state.open,onClose:this.onFinish,title:this.props.title,ref:this.modalRef,PaperProps:{style:{width:"100%",height:"calc(100% - 32px)",maxWidth:600,maxHeight:800,margin:16}},children:D}):(0,y.jsx)(m.Modal,{isOpen:!!this.state.open,onRequestClose:this.onFinish,onAfterOpen:this.onModalOpen,contentLabel:this.props.title,ref:this.modalRef,anchoredMode:"auto",children:D}),(0,y.jsxs)("article",{className:C,style:(0,g.convertToRtlWhenNecessary)(O),children:[(0,y.jsxs)(p.default,{onTappableMount:this.tappableRef,className:"ListSelect__button",enabled:!this.props.readOnly,onTap:this.onTap,onKeyDown:this.onButtonKeyDown,innerStyle:I,"data-testid":"".concat(v,"-list-select"),ariaLabel:v,"aria-haspopup":"listbox","aria-expanded":this.state.open,children:[e,R]}),T&&(0,y.jsx)("div",{className:"ListSelect__inline-buttons",children:T}),N]})}}t.default=w},327755:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(496486)),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=w(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}(i(667294)),r=o(i(676970)),s=i(249492),l=o(i(735996)),d=o(i(365914)),c=i(278965),u=o(i(593186)),p=o(i(674823)),h=o(i(962553)),m=i(56749),f=o(i(626537)),g=o(i(112963)),y=i(303622),v=i(700482),b=i(148521);function w(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(w=function(e){return e?i:t})(e)}const S=Symbol("ADD NEW"),x=Symbol("ADD REF");class C extends a.Component{constructor(e){super(e),this.optionsRef=e=>{this.$options=e||void 0},this.inputRef=e=>{this.$input=e||void 0},this.modalRef=e=>{this.$modal=e||void 0},this.state={options:[],textBoxValue:""},this.handleHardwareScannerBound=this.handleHardwareScanner.bind(this),this.onTextKeyDown=this.onTextKeyDown.bind(this),this.clearTextBox=this.clearTextBox.bind(this),this.addTextBoxValue=this.addTextBoxValue.bind(this),this.textBoxChanged=this.textBoxChanged.bind(this),this.onClear=this.onClear.bind(this),this.onItemSelected=this.onItemSelected.bind(this),this.onSelectAll=this.onSelectAll.bind(this),this.renderOption=this.renderOption.bind(this),this.onFinish=this.onFinish.bind(this)}renderOption(e){let t,i,o,n=this._linesToRender?this._linesToRender[e]:this.linesToRender()[e];return n===S?(i="add",o=this.addTextBoxValue,n=this.state.textBoxValue):n===x?(i="add-ref",o=this.props.addNewRefHandler,n="New",this.props.appModel&&(n=this.props.appModel.MapActionName("New"))):(t=this.selectedArray().indexOf(n)>=0,i=null,o=this.onItemSelected),(0,b.jsx)(f.default,{option:n,index:e,special:i,isSelected:t,attribute:this.props.optionAttribute,appModel:this.props.appModel,table:this.props.table,multiselect:this.props.multiselect,dataContext:this.props.dataContext,onSelected:o},n||e)}clearTextBox(){this.$options&&$(this.$options).scrollTop(0),this.setState({textBoxValue:""}),this.focusInput()}textBoxChanged(e){const t=e.target.value;this.$options&&$(this.$options).scrollTop(0),this.setState({textBoxValue:t})}selectOptionIfOnlyOption(){const e=this.currentItems();1===e.length&&(this.onItemSelected(e[0],0),this.props.multiselect?this.setState({textBoxValue:""}):this.finishAfterDelay())}selectOption(e){switch(e){case x:this.props.addNewRefHandler();break;case S:this.addTextBoxValue(this.state.textBoxValue);break;default:this.onItemSelected(e),this.props.multiselect?this.setState({textBoxValue:""}):this.finishAfterDelay()}}onTextKeyDown(e){if("Enter"===e.key)this.props.allowAdds?(this.addTextBoxValue(),this.props.multiselect&&e.stopPropagation()):this.selectOptionIfOnlyOption()}addTextBoxValue(){this.props.allowAdds&&(this.textBoxValueAlreadyExists()||(this.onItemSelected(this.state.textBoxValue),this.props.multiselect?this.setState({textBoxValue:""}):this.finishAfterDelay()))}finishAfterDelay(){this.clearFinishDelay(),this.finishDelay=setTimeout((()=>{this.onFinish()}),100)}onItemSelected(e,t){if(this.props.appModel&&this.props.appModel.inRollout("orderedEnumListSelection")&&null!=t){const i=this.linesToRender(),o=this.selectedArray();let n=new Array(i.length),a=!1;
1if(o.forEach((t=>{if(this.props.multiselect){const e=i.indexOf(t);e>=0?n[e]=t:n.push(t)}t===e&&(a=!0)})),this.props.multiselect)n[t]=a?void 0:e,n=n.filter((e=>null!=e)),this.props.onChange&&this.props.onChange(n);else{n[t]=e,n=n.filter((e=>null!=e));const i=n[0];this.props.onChange&&this.props.onChange(i),this.finishAfterDelay()}}else if(this.props.multiselect){const t=d.default.arrayToggle(this.selectedArray(),e,this.props.multiselect);this.props.onChange&&this.props.onChange(t)}else{const t=e;this.props.onChange&&this.props.onChange(t),this.finishAfterDelay()}}onClear(){this.props.multiselect?this.props.onChange&&this.props.onChange([]):this.props.onChange&&this.props.onChange(""),this.finishAfterDelay()}onSelectAll(){this.props.multiselect?this.props.onChange&&this.props.onChange(this.currentItems()):u.default.ReportError({errorMessage:"Cannot select all on non-multiselect"})}focusInput(){this.$input?this.$input.focus():this.$modal&&this.$modal.focus()}onFinish(){this.props.onFinish&&this.props.onFinish()}clearFinishDelay(){this.finishDelay&&(clearTimeout(this.finishDelay),this.finishDelay=null)}handleHardwareScanner(e,t){this.setState({textBoxValue:t}),this.selectOptionIfOnlyOption()}textBoxValueAlreadyExists(){return n.default.includes(this.state.options,this.state.textBoxValue)}includeAddNew(){return this.props.allowAdds&&this.state.textBoxValue&&!this.textBoxValueAlreadyExists()}includeAddRef(){return this.props.allowAddRef&&this.props.optionAttribute.type()===v.TABLEREF_TYPE}showClearButton(){return!this.state.textBoxValue&&this.selectedArray().length>0}showBottomLeftButton(){return!this.showClearButton()&&this.props.multiselect}selectedArray(e){return e||(e=this.props),null==e.selected?[]:e.selected instanceof Array?e.selected:e.selected?[e.selected]:[]}UNSAFE_componentWillMount(){this.setState({options:n.default.union(this.props.options,this.selectedArray())}),$(JeeneeNamespace).on("hw-barcode-scan",this.handleHardwareScannerBound)}UNSAFE_componentWillReceiveProps(e){let t;if(n.default.isEqual(e.options,this.props.options)){t=n.default.clone(this.state.options);this.selectedArray(e).forEach((e=>{n.default.includes(t,e)||t.unshift(e)})),t=t.filter((e=>!!e))}else t=n.default.union(e.options,this.selectedArray(e));this.setState({options:t})}componentWillUnmount(){this.clearFinishDelay(),$(JeeneeNamespace).off("hw-barcode-scan",this.handleHardwareScannerBound)}getRefTableName(){if(this.props.optionAttribute){return this.props.optionAttribute.auxData().ReferencedTableName}return""}refTable(){const e=this.getRefTableName();return e?h.default.findByName(e,this.props.appModel):{}}currentItems(){let e=this.state.options;const t=e=>(0,p.default)(String(e).toLowerCase());if(this.state.textBoxValue){const i=t(this.state.textBoxValue),o=this.refTable().table;let n={};o&&(n=o.keyLabelMap(this.props.appModel,this.props.dataContext)),e=e.filter((e=>{const o=n[e]||e;return o&&"string"==typeof o?t(o).indexOf(i)>=0:(u.default.warnToDevConsole("ListSelectPopup encountered a weird option",o),!1)}))}return e}linesToRender(){let e=this.currentItems();return this.includeAddNew()&&(e=[S].concat(e)),this.includeAddRef()&&(e=[x].concat(e)),e}renderInput(){const{allowAdds:e,appModel:t,isOpen:i}=this.props,{textBoxValue:o}=this.state,n=null==t?void 0:t.MapActionName(e?"Add or search":"Search"),a=o?(0,b.jsx)(s.InputAdornment,{position:"end",children:(0,b.jsx)(s.IconButton,{className:"ListSelectPopup__input-clear-button","aria-label":"clear search",size:"small",onClick:this.clearTextBox,children:(0,b.jsx)(l.default,{})})}):null;return(0,b.jsx)("div",{className:"ListSelectPopup__input",children:(0,b.jsx)(s.TextField,{variant:"outlined",size:"small",label:n,inputRef:this.inputRef,className:"ListSelectPopup__input-box",value:o,disabled:!i,onChange:this.textBoxChanged,onKeyDown:this.onTextKeyDown,InputProps:{endAdornment:a}})})}render(){var e,t,i,o;const n=e=>this.props.appModel?this.props.appModel.MapActionName(e):e;let a;this._linesToRender=this.linesToRender(),this.showClearButton()?a=(0,b.jsx)(g.default,{className:"ListSelectPopup__clear-button",navigationDelay:!0,onTap:this.onClear,children:n("Clear")}):this.showBottomLeftButton()&&(a=(0,b.jsx)(g.default,{className:"ListSelectPopup__select-all-button",onTap:this.onSelectAll,children:n("Select All")}));const s=this.props.optionAttribute&&this.props.optionAttribute.basestType(),l=this._linesToRender.length>6||this.props.allowAdds||this.state.textBoxValue||"LongText"===s?this.renderInput():null,d=(0,b.jsx)("section",{className:"ListSelectPopup disableLegacyStyles",ref:this.modalRef,"data-testid":"list-select-popup",children:(0,b.jsxs)(m.ASThemeProvider,{children:[(0,b.jsx)("div",{className:"ListSelectPopup__title",children:this.props.title}),l,(0,b.jsx)("div",{className:"ListSelectPopup__options",ref:this.optionsRef,style:(0,c.convertToRtlWhenNecessary)({height:l?"calc(100% - 50px - 40px - 54px)":"calc(100% - 50px - 54px)"}),children:(0,b.jsx)(r.default,{length:this._linesToRender.length,itemRenderer:this.renderOption,threshold:600,itemSizeEstimator:()=>46,type:window.APPSHEET_TEST_CONTEXT?"simple":"variable"})}),(0,b.jsxs)("div",{className:"ListSelectPopup__bottom",children:[a,(0,b.jsx)(g.default,{className:"ListSelectPopup__finish-button",navigationDelay:!0,onTap:this.onFinish,children:n("Done")})]})]})});return(0,b.jsx)(y.EmulatorComponentWrapper,{containerStyles:{height:"100%"},dataVFEValues:{root:"form",table:null!==(t=null===(e=this.props.table)||void 0===e?void 0:e.name())&&void 0!==t?t:void 0,column:null!==(o=null===(i=this.props.optionAttribute)||void 0===i?void 0:i.name())&&void 0!==o?o:void 0,context:"FormEntry"},children:d})}}t.default=C},626537:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(496486)),a=i(667294),r=o(i(386010)),s=o(i(112963)),l=i(803583),d=o(i(385857)),c=i(714611),u=i(351101),p=i(148521);class h extends a.PureComponent{constructor(){super(...arguments),this.handleTap=()=>{const{index:e,option:t,onSelected:i}=this.props;i(t,e)}}renderAdd(){const e=(0,r.default)("ListSelectPopupOption ListSelectPopupOption--special-add",{});return(0,p.jsxs)(s.default,{onTap:this.props.onSelected,className:e,children:[(0,p.jsx)("div",{className:"ListSelectPopupOption__icon-container",children:(0,p.jsx)("i",{className:"fa fa-plus"})}),(0,p.jsx)("div",{className:"ListSelectPopupOption__value",children:"".concat(this.props.multiselect?(0,u.mapActionName)("Add"):"Use"," '").concat(this.props.option,"'")})]})}renderAddRef(){const e=(0,r.default)("ListSelectPopupOption ListSelectPopupOption--special-add",{});return(0,p.jsxs)(s.default,{onTap:this.props.onSelected,className:e,children:[(0,p.jsx)("div",{className:"ListSelectPopupOption__icon-container",children:(0,p.jsx)("i",{className:"fa fa-edit"})}),(0,p.jsx)("div",{className:"ListSelectPopupOption__value",children:this.props.option})]})}renderNormal(){let e,t=null;const i=this.props,o=i.dataContext;if(i.attribute){if(o){const e=n.default.clone(o.rowData);e[i.attribute.name()]=i.option,t=new d.default(i.appModel,o.tableSchema,e,o.formState,void 0,void 0,o.uiContext)}e=l.TypeDisplaysApi.lookup(i.attribute,i.option)}else e=l.TypeDisplaysApi.Text;let a=200,u=0;i.attribute&&null!=i.attribute.firstNestedOfType("Ref")&&(a=60,u=c.columnPadding);const h=(0,p.jsx)(e,{attribute:i.attribute,value:i.option,appModel:i.appModel,allowTaps:!1,imageDisplayType:"full",table:i.table,inlineModeBlockWidth:a+u,inlineModeBlockHeight:a,dataContext:t||i.dataContext,displayMode:"inline"}),m=(0,r.default)("ListSelectPopupOption",{"ListSelectPopupOption--selected":i.isSelected,"ListSelectPopupOption--multiselect":!!i.multiselect,"ListSelectPopupOption--singleselect":!i.multiselect});return(0,p.jsxs)(s.default,{className:m,onTap:this.handleTap,children:[(0,p.jsx)("div",{className:"ListSelectPopupOption__icon-container",children:(0,p.jsx)("div",{className:"ListSelectPopupOption__icon"})}),(0,p.jsx)("div",{className:"ListSelectPopupOption__value",children:h})]})}render(){return"add"===this.props.special?this.renderAdd():"add-ref"===this.props.special?this.renderAddRef():this.renderNormal()}}t.default=h},105041:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(238416)),a=i(667294),r=o(i(973935)),s=o(i(491035)),l=i(333222),d=i(148521);function c(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function u(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?c(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}const p=["className","color","component","corners","direction","fps","hwaccell","left","length","lines","loadedClassName","opacity","parentClassName","position","radius","rotate","scale","shadow","speed","top","trail","width","zIndex"];class h extends a.Component{constructor(e){super(e),this.state={loaded:!1,options:{}},this.updateState=this.updateState.bind(this),this.spin=this.spin.bind(this)}componentDidMount(){this.updateState(this.props)}UNSAFE_componentWillReceiveProps(e){this.updateState(e)}componentWillUnmount(){this.setState({loaded:!1})}updateState(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t="options"in e?e.options:e,i="loaded"in t?!!t.loaded:this.state.loaded,o=this.state.options;for(const e of p)e in t&&(o[e]=t[e]);this.setState({loaded:i,options:o},this.spin)}spin(){if(!("undefined"==typeof window||!window.document||!window.document.createElement)&&!this.state.loaded){const e=new s.default(this.state.options),t=r.default.findDOMNode(this.refs.loader);t&&(t.innerHTML=l.EMPTY_HTML,e.spin(t))}}render(){let e,t;return this.state.loaded?(e={key:"content",className:this.props.loadedClassName},t=this.props.children):e={key:"loader",ref:"loader",className:this.props.parentClassName},(0,d.jsx)("div",u(u({},e),{},{children:t}))}}t.default=h},299119:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.getModalContentWidth=t.default=t.ReactiveModal=t.Modal=void 0;var n=o(i(238416)),a=o(i(183253)),r=o(i(496486)),s=o(i(667294)),l=o(i(45697)),d=o(i(386010)),c=o(i(21870)),u=i(351101),p=i(318926),h=i(862858),m=i(281294),f=i(166089),g=i(278965),y=i(148521);function v(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function b(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?v(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):v(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}a.default.defaultStyles.overlay={},a.default.defaultStyles.content={},a.default.setAppElement(document.body);t.getModalContentWidth=()=>c.default.windowWidth>=768?600:c.default.windowWidth-32;class w extends s.default.Component{static closeTimeout(){return 300}constructor(e){super(e),this.state={},this._cachedAnchorPosition=null,this.handleResizeBound=this.handleResize.bind(this)}onTap(){this.setState({open:!0})}onFinish(){this.setState({open:!1})}type(){return"local"===this.props.type?"local":"fullscreen"}allItems(){return r.default.union(this.props.options,this.props.selected)}setAnchorElement(e){this.setState({anchorElement:e})}getAnchorPosition(){return this.state.anchorElement&&this.props.isOpen?(this._cachedAnchorPosition||(this._cachedAnchorPosition=this.getAnchorCenter(this.state.anchorElement)),this._cachedAnchorPosition):this._cachedAnchorPosition||{anchorX:0,anchorY:0}}getAnchorCenter(e){const t=$(e),i=t.offset();return{anchorX:i.left+t.width()/2,anchorY:i.top+t.height()/2}}handleResize(){this._cachedAnchorPosition=null,this.props.isOpen&&this.forceUpdate()}componentDidMount(){$(window).on("resize",this.handleResizeBound)}componentWillUnmount(){$(window).off("resize",this.handleResizeBound)}render(){var e;const t=c.default.windowWidth>=768,i=c.default.windowHeight-40;let o={};if("fullscreen"===this.type())if("auto"===this.props.anchoredMode)if(t){const{anchorX:e,anchorY:t}=this.getAnchorPosition(),n=Math.min(800,i);o={left:e-300-16,top:Math.max(t-n,10),width:600,height:n,position:"absolute"}}else o={height:i};else o={position:"absolute",right:0,top:0,left:"50%",transform:"translate(-50%)",marginLeft:0,maxWidth:this.props.maxWidth,width:"80%",height:i};else o={position:"absolute",right:0,top:0,maxWidth:this.props.width||220,height:this.props.height};const n=(0,u.getAppModel)(),r=(null==n?void 0:n.isReady())&&n.inRollout("materialDatePicker"),s=(0,d.default)("Modal",{"Modal--local":"local"===this.type(),"Modal--rollout":r},this.props.className,null===(e=f.AppGlobals.AppModel)||void 0===e?void 0:e.rolloutClassNames),l=(0,d.default)("Modal__contents",{"Modal--anchored-mode":t},this.props.className);return(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(a.default,b(b({closeTimeoutMS:300},this.props),{},{onRequestClose:e=>{p.logger.endScenario({result:h.ScenarioResult.Abandon,abandonReason:h.ScenarioEndReason.ClosedModal}),this.props.onRequestClose&&this.props.onRequestClose(e)},overlayClassName:s,className:l,style:{content:(0,g.convertToRtlWhenNecessary)(o),overlay:{}},ref:e=>{this.portal=e&&e.portal},children:this.props.children}))})}}t.Modal=w,w.propTypes=r.default.extend({},a.default.propTypes,{type:l.default.string});t.ReactiveModal=(0,m.observer)(w);t.default=w},525153:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(901711)),a=i(66249),r=i(48422),s=i(249492),l=i(148521);const d=(0,s.makeStyles)({image:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"180px"},arrowFontSize:{fontSize:"30px"},arrowButton:{boxShadow:"none"},carouselInner:{transition:"none"},carouselItem:{opacity:0,transition:"opacity 0.2s ease-in-out"},carouselActiveItem:{opacity:1}});t.default=e=>
1{let{imageUrls:t,className:i,cropMode:o,solidBackgroundColor:s,onImageError:c,imageBorderRadius:u,zeroImageLoadDelay:p,useLoadingSpinner:h,imageWidth:m,imageHeight:f,isBasic:g,onCarouselImageClick:y}=e;const v=d(),b=t.map(((e,t)=>(0,l.jsx)("div",{role:"button","aria-label":"image card",onClick:()=>y(t),children:(0,l.jsx)(n.default,{src:e,className:(0,a.clsx)(v.image,i),cropMode:o,solidBackgroundColor:s,onImageError:c,imageBorderRadius:u,zeroImageLoadDelay:p,useLoadingSpinner:h,width:m,height:f,isBasic:g})},t)));return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(r.Carousel,{cards:b,showDots:!1,showPagination:!0,classes:{arrowIcon:v.arrowFontSize,arrowButton:v.arrowButton,inner:v.carouselInner,item:v.carouselItem,activeItem:v.carouselActiveItem}})})}},281262:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(249492),n=i(667294),a=i(56749),r=i(66249),s=i(148521);const l=(0,o.makeStyles)((e=>({imagesContainer:{gap:e.spacing(.25),display:"flex",height:"100%",whiteSpace:"nowrap",overflow:"hidden",position:"relative"},columnContainer:{display:"flex",alignItems:"center",width:"100%",height:"100%"},verticalFade:{width:"".concat(12,"px"),height:"100%",background:(0,a.themeColor)("imageListOverflowFadeRightBackgroun
1d"),position:"absolute",right:0,top:0}})));t.default=e=>{let{imageUrls:t}=e;const i=(0,n.useRef)(null),o=l();return(0,s.jsx)("div",{"data-testid":"column-wrapper",ref:i,className:o.columnContainer,children:(0,s.jsxs)("div",{className:(0,r.clsx)("imageContainer",o.imagesContainer),children:[t.map(((e,t)=>(0,s.jsx)("img",{src:e,alt:"image-".concat(t)},t))),(0,s.jsx)("div",{className:o.verticalFade})]})})}},525965:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.scrollCooldown=t.default=void 0;var n=o(i(238416)),a=i(667294),r=o(i(973935)),s=o(i(386010)),l=o(i(527274)),d=o(i(593186)),c=i(700386),u=i(166089),p=i(278965),h=i(557310),m=i(148521);function f(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function g(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?f(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):f(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}const y=t.scrollCooldown=200,v="Tappable-active",b="Tappable-tapped";let w=!1;function S(e,t){const i=Math.abs(e.x-t.x),o=Math.abs(e.y-t.y);return Math.max(i,o)}class x extends a.Component{static get ACTIVE_DELAY(){return 50}static get NAVIGATION_DELAY(){return 1200}constructor(e){super(e),this.lastScrollTime=0,this.handleDown=this.handleDownUnbound.bind(this),this.handleClick=this.handleClickUnbound.bind(this),this.handleMove=this.handleMoveUnbound.bind(this),this.handleUp=this.handleUpUnbound.bind(this),this.handleScroll=this.handleScrollUnbound.bind(this),this.handleNativeDragStart=this.handleNativeDragStartUnbound.bind(this),this.handleTouchCancel=this.handleTouchCancelUnbound.bind(this),this.onKeyDown=this.handleKeyDownUnbound.bind(this)}static computeSpeed(e){if(e.length<2)return 0;const t=e[0],i=e[e.length-1];return Math.abs(S(i,t))/((i.time-t.time)/1e3)}static computeDirection(e){if(e.length<2)return{};const t=e[0],i=e[e.length-1],o=i.x-t.x,n=i.y-t.y,a=Math.abs(o)>Math.abs(n)?"x":"y";return{n:"y"===a&&n<0,e:"x"===a&&o>0,s:"y"===a&&n>0,w:"x"===a&&o<0,greatestAxis:a}}get spanMode(){return!0}componentDidMount(){const e=r.default.findDOMNode(this);if(this.bindPrimaryHandlers(e),null==this.scrollParent){const t=this.props.scrollParent||(0,l.default)(e);this.scrollParent=t!==document.body&&t}this.scrollParent&&this.scrollParent.addEventListener("scroll",this.handleScroll,!1)}componentDidUpdate(){const e=r.default.findDOMNode(this);e!==this.primaryBoundElement&&(this.finishInteraction(),this.primaryBoundElement&&this.resetActiveState(this.primaryBoundElement),e&&this.resetActiveState(e),this.clearResetActiveStateTimeout(),this.bindPrimaryHandlers(e))}bindPrimaryHandlers(e){this.unbindPrimaryHandlers(),e&&(e.addEventListener("touchstart",this.handleDown,{capture:!1,passive:!1}),e.addEventListener("mousedown",this.handleDown,!1),e.addEventListener("click",this.handleClick,!1),this.primaryBoundElement=e)}unbindPrimaryHandlers(){this.primaryBoundElement&&(this.primaryBoundElement.removeEventListener("touchstart",this.handleDown,{capture:!1,passive:!1}),this.primaryBoundElement.removeEventListener("mousedown",this.handleDown,!1),this.primaryBoundElement.removeEventListener("click",this.handleClick,!1),this.primaryBoundElement=null)}runOnTap(e){const t=r.default.findDOMNode(this),{onTap:i,href:o,stopPropagation:n,preventDefault:a,navigationDelay:s}=this.props;if(i){const{shiftKey:o,altKey:n,ctrlKey:a}=this.currentInteraction||{};this.asyncTapMode()&&!e.astappableTriggerSync?setTimeout((()=>{e.isCancelled||(t.focus(),i({shiftKey:o,altKey:n,ctrlKey:a}))}),0):e.isCancelled||(t.focus(),i({shiftKey:o,altKey:n,ctrlKey:a}))}else o&&n&&!a&&u.AppGlobals.InputHandler.handleLinkClick($(t),o,e);s?(this.setActiveState(t,{transition:!1}),this.clearResetActiveStateTimeout(),this.resetActiveStateTimeout=setTimeout((()=>{this.resetActiveState(t),this.setTappedState(t)}),1200)):(this.resetActiveState(t),this.setTappedState(t))}preventStuff(e){this.props.preventDefault&&e.preventDefault(),this.props.stopPropagation&&e.stopPropagation()}trimRecentMoves(){if(!this.currentInteraction)return;const e=Date.now();for(let t=0;t<this.currentInteraction.recentMoves.length;t++){if(!(e-this.currentInteraction.recentMoves[t].time>200))break;this.currentInteraction.recentMoves.splice(t,1),t--}}handleDownUnbound(e){const t="touchstart"===e.type;if(!this.isEnabled())return;if("mousedown"===e.type&&2===e.button)return;this.preventStuff(e);const i=r.default.findDOMNode(this);let o,n;if(t){w=!window.APPSHEET_TEST_CONTEXT;if(Date.now()-this.lastScrollTime<y)return;const t=e.changedTouches[0];o=t.clientX,n=t.clientY}else{if(w)return w=!1,e.preventDefault(),void e.stopPropagation();o=e.clientX,n=e.clientY}
1this.currentInteraction={isTouch:t,exceededTapThreshold:!1,x:o,y:n,lastX:o,lastY:n,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,originalTransitonStyle:i.style.transition,recentMoves:[{time:Date.now(),x:o,y:n}]},this.resetTappedState(i),this.setActiveState(i,{transition:!0}),this.props.onLongPress&&(this.longPressTimeoutStart=Date.now(),this.longPressTimeout=setTimeout((()=>{let e=!1,t=document.elementFromPoint(o,n);if(null!=t)do{if(t===i){e=!0;break}t=t.parentNode}while(t!==document.documentElement&&null!=t);this.resetActiveState(i),this.finishInteraction(),(e||window.APPSHEET_TEST_CONTEXT)&&"function"==typeof this.props.onLongPress&&this.props.onLongPress()}),this.props.longPressTime||600)),t?(document.addEventListener("touchmove",this.handleMove,{capture:!1,passive:!1}),document.addEventListener("touchend",this.handleUp,!1),document.addEventListener("touchcancel",this.handleTouchCancel,!1)):(document.addEventListener("mousemove",this.handleMove,!1),document.addEventListener("mouseup",this.handleUp,!1)),document.addEventListener("dragstart",this.handleNativeDragStart,!1)}handleClickUnbound(e){this.preventStuff(e),e.preventDefault()}handleMoveUnbound(e){if(!this.currentInteraction)return void d.default.warnToDevConsole("ASTappable Move called with no interaction");const t="touchmove"===e.type;this.preventStuff(e);const i=r.default.findDOMNode(this);let o,n;if(t){const t=e.changedTouches[0];o=t.clientX,n=t.clientY}else o=e.clientX,n=e.clientY;if(!this.currentInteraction.exceededTapThreshold){if(S(this.currentInteraction,{x:o,y:n})>12){this.currentInteraction.exceededTapThreshold=!0;const e=x.computeDirection([this.currentInteraction,{x:o,y:n}]);if(this.props.dragAxis&&e.greatestAxis!==this.props.dragAxis)return this.resetActiveState(i),void this.finishInteraction();if(this.props.onDragStart&&(this.props.onDragStart(),!this.currentInteraction))return}}if(this.currentInteraction.exceededTapThreshold)if(this.clearLongPressTimeout(),this.props.onDrag||this.props.onDragEnd){this.trimRecentMoves(),this.currentInteraction.recentMoves.push({time:Date.now(),x:o,y:n});const t=o-this.currentInteraction.lastX,i=n-this.currentInteraction.lastY;this.currentInteraction.lastX=o,this.currentInteraction.lastY=n,this.props.onDrag&&this.props.onDrag({event:e,x:o,y:n,deltaX:t,deltaY:i,speed:()=>x.computeSpeed(this.currentInteraction.recentMoves),direction:()=>x.computeDirection(this.currentInteraction.recentMoves)})}else this.resetActiveState(i),this.finishInteraction()}handleUpUnbound(e){if(!this.currentInteraction)return void d.default.warnToDevConsole("ASTappable Up called with no interaction");const t="touchend"===e.type;this.preventStuff(e);const i=r.default.findDOMNode(this);let o,n;if(t){const t=e.changedTouches[0];o=t.clientX,n=t.clientY}else o=e.clientX,n=e.clientY;const a=S(this.currentInteraction,{x:o,y:n})>12;this.clearLongPressTimeout(),this.currentInteraction.exceededTapThreshold&&(this.trimRecentMoves(),this.currentInteraction.recentMoves.push({time:Date.now(),x:o,y:n}),this.props.onDragEnd&&this.props.onDragEnd({event:e,x:o,y:n,speed:()=>x.computeSpeed(this.currentInteraction.recentMoves),direction:()=>x.computeDirection(this.currentInteraction.recentMoves)})),this.currentInteraction&&(this.currentInteraction.exceededTapThreshold||a?this.resetActiveState(i):(this.runOnTap(e),e.preventDefault()),this.finishInteraction())}finishInteraction(){this.currentInteraction&&(this.currentInteraction.isTouch?(document.removeEventListener("touchmove",this.handleMove,{capture:!1,passive:!1}),document.removeEventListener("touchend",this.handleUp,!1),document.removeEventListener("touchcancel",this.handleTouchCancel,!1)):(document.removeEventListener("mousemove",this.handleMove,!1),document.removeEventListener("mouseup",this.handleUp,!1)),document.removeEventListener("dragstart",this.handleNativeDragStart,!1),this.currentInteraction=null)}
1handleScrollUnbound(){if(this.lastScrollTime=Date.now(),this.isActive){const e=r.default.findDOMNode(this);this.resetActiveState(e)}this.props.ignoreScrollEvent||this.finishInteraction(),this.clearLongPressTimeout()}handleNativeDragStartUnbound(e){this.props.onDrag&&e.preventDefault()}handleTouchCancelUnbound(){const e=r.default.findDOMNode(this);this.resetActiveState(e),this.finishInteraction()}handleKeyDownUnbound(e){if("Enter"===e.key&&this.props.onTap){const{shiftKey:t,altKey:i,ctrlKey:o}=e;this.props.onTap({shiftKey:t,altKey:i,ctrlKey:o})}}setActiveState(e,t){let{transition:i}=t;this.clearResetActiveStateTimeout(),this.isActive||h.ReactRootUIConfig.isInMobileExperience()||(this.isActive=!0,e.style.transition=i?"background 30ms linear 50ms":"",d.default.Test()||(e.className+=" "+v))}resetActiveState(e){this.isActive&&(this.isActive=!1,window.removeEventListener("scroll",this.handleScroll,!0),e&&(e.style.transition="",e.className=e.className.toString().replace(v,"")))}clearLongPressTimeout(){this.longPressTimeout&&(clearTimeout(this.longPressTimeout),this.longPressTimeout=null)}setTappedState(e){d.default.Test()||(e.className+=" "+b)}resetTappedState(e){e.className=e.className.toString().replace(b,"")}clearResetActiveStateTimeout(){this.resetActiveStateTimeout&&(clearTimeout(this.resetActiveStateTimeout),this.resetActiveStateTimeout=null)}componentWillUnmount(){this.unbindPrimaryHandlers(),this.finishInteraction(),this.clearResetActiveStateTimeout(),window.removeEventListener("scroll",this.handleScroll,!0),this.scrollParent&&this.scrollParent.removeEventListener("scroll",this.handleScroll,!1)}isEnabled(){return!1!==this.props.enabled}asyncTapMode(){return!1!==this.props.asyncTap}render(){var e;let t=this.props.href;t||(t="#");const i={};for(const e in this.props)0===e.indexOf("data-")&&(i[e]=this.props[e]);const o=(0,s.default)("ASTappable",this.props.className,{"ASTappable--pointer":this.isEnabled()&&!!this.props.onTap&&!this.props.noPointer});if(this.isEnabled()){const n=this.spanMode?"span":"a",a=(0,m.jsx)(n,g(g({},i),{},{ref:this.props.onTappableMount,id:this.props.id?this.props.id.split(" ").join("_"):null,className:o,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onKeyDown:this.props.onKeyDown||this.onKeyDown,style:(0,p.convertToRtlWhenNecessary)(this.props.innerStyle),href:t,tabIndex:0,role:"button","aria-label":null!==(e=this.props.ariaLabel)&&void 0!==e?e:this.props.title,children:this.props.children}));if(this.props.title){const e={popperOptions:{modifiers:{preventOverflow:{enabled:!0,boundariesElement:"viewport"}}}};return(0,m.jsx)(c.ASTooltip,{arrow:!0,PopperProps:e,title:this.props.title||"",children:a})}return a}return(0,m.jsx)("div",g(g({},i),{},{ref:this.props.onTappableMount,className:o,title:this.props.title,style:(0,p.convertToRtlWhenNecessary)(this.props.innerStyle),children:this.props.children}))}}t.default=x},750812:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(667294),a=o(i(977314)),r=i(249492),s=o(i(386010)),l=i(56749),d=o(i(21870)),c=o(i(385857)),u=o(i(155345)),p=i(166089),h=i(557310),m=o(i(819433)),f=i(692479),g=i(134117),y=i(303622),v=i(278965),b=i(803583),w=i(375155),S=i(148521);const x=(0,r.createStyles)({root:{color:"inherit",textDecoration:"inherit","&:hover":{textDecoration:"underline"}},shrinkHiddenPanes:{'& [aria-hidden="true"]':{height:0}},removeBoxShadow:{boxShadow:"none"},disabledOutlined:{},image:()=>({maxWidth:"calc(100% - 30px)",maxHeight:"600px",marginBottom:40}),closeButton:{fontSize:15,width:40,height:40,fontWeight:"normal"},closeButtonContainer:{width:"100%",display:"flex",justifyContent:"flex-end"}}),C=(0,l.cacheMuiTheme)((()=>({overrides:{MuiMobileStepper:{dotActive:{backgroundColor:(0,l.themeColor)("actionIcon")},dot:{backgroundColor:(0,l.themeColor)("mainBackgroundVariantExtra")},root:{backgroundColor:"transparent"}},MuiTypography:{h2:{lineHeight:1.33,wordWrap:"break-word"}}},palette:{secondary:{main:(0,l.themeColor)("actionIcon"),contrastText:(0,l.themeColor)("actionButtonText")}}})));class T extends u.default{constructor(e){super(e),this.handleStepCh
1ange=e=>{var t;this.setState({activeStep:e}),null===(t=this.scrollPaneRef.current)||void 0===t||t.scrollTo(0,0)},this.state={activeStep:0},this.okClick=this.okClick.bind(this),this.scrollPaneRef=(0,n.createRef)(),this.contentHolderRef=(0,n.createRef)()}static goToFinishView(e,t){var i;const o=null===(i=e.appTemplate)||void 0===i?void 0:i.getView(t);o?h.ReactRootUIConfig.isReactRoot()?(0,m.default)().dispatch((0,f.newViewStack)({Identifier:{Type:"Control",Name:o.name()}})):d.default.navigateToView(o):d.default.navigateToPreviousHashState()}okClick(){this.props.onClose&&this.props.onClose(),T.goToFinishView(this.appModel,this.props.viewDefn.finishView)}renderActionButtonPortal(){const{actionButtonContainer:e}=this.props;return e?(0,S.jsx)(r.Portal,{container:e,children:(0,S.jsx)(w.NavBarButtons,{childrenOnly:!0})}):null}getLayoutForRow(e,t,i){const o=this.props.viewDefn||{};let n=e[o.image];const a=o.title,s=o.firstBlurb,d=o.secondBlurb,c=this.props.table,u=e[this.props.tableSchema.keyAttribute().name()],m=this.props.classes;if(p.AppGlobals.AppModel){const e=p.AppGlobals.AppModel.ResolveFile(n,c.rootName());n=(0,g.flexImageUrl)(e)}const f=this.props.tableSchema.findAttributeByName(a),y=this.props.tableSchema.findAttributeByName(s),w=this.props.tableSchema.findAttributeByName(d),x=b.TypeDisplaysApi.lookup(f),C=b.TypeDisplaysApi.lookup(y),T=b.TypeDisplaysApi.lookup(w),I=h.ReactRootUIConfig.isReactRoot()||window.innerWidth<1024;return(0,S.jsxs)("div",{style:(0,v.convertToRtlWhenNecessary)({overflowWrap:"anywhere",textAlign:"left",display:"flex",flexDirection:I?"column":"row",height:"100%",alignItems:"center"}),children:[o.image&&(0,S.jsx)("img",{className:m.image,src:n,alt:"",style:(0,v.convertToRtlWhenNecessary)({boxSizing:"border-box",paddingTop:t?0:40})}),(0,S.jsx)("div",{style:(0,v.convertToRtlWhenNecessary)({marginLeft:I?0:40,paddingBottom:h.ReactRootUIConfig.isReactRoot()&&!o.image?0:24,marginTop:h.ReactRootUIConfig.isReactRoot()&&!o.image?24:0,boxSizing:"border-box",flexGrow:1,display:I?void 0:"flex",flexDirection:"column",justifyContent:"center",width:I?"100%":void 0,height:I?void 0:"100%"}),children:(0,S.jsxs)("div",{style:(0,v.convertToRtlWhenNecessary)({overflowY:I?void 0:"scroll"}),children:[a&&(0,S.jsx)(r.Typography,{style:(0,v.convertToRtlWhenNecessary)({color:(0,l.themeColor)("primaryText"),padding:"0 15px 8px",fontSize:"1.333rem",lineHeight:"1.333rem"}),variant:"h5",children:(0,S.jsx)(x,{attribute:f,value:e[a],table:c,dataContext:i,appModel:this.appModel,rowId:u})}),(0,S.jsxs)("div",{children:[s&&(0,S.jsx)(r.Typography,{style:(0,v.convertToRtlWhenNecessary)({fontWeight:500,color:(0,l.themeColor)("secondaryText"),padding:"0 15px 15px",lineHeight:"1.333rem",fontSize:"0.889rem",whiteSpace:"pre-wrap"}),variant:"subtitle1",children:(0,S.jsx)(C,{attribute:y,value:e[s],table:c,dataContext:i,appModel:this.appModel,rowId:u})}),d&&(0,S.jsx)(r.Typography,{style:(0,v.convertToRtlWhenNecessary)({color:(0,l.themeColor)("secondaryText"),padding:"0 15px",fontSize:"0.778rem",lineHeight:"1.222rem",whiteSpace:"pre-wrap"}),variant:"body2",children:(0,S.jsx)(T,{attribute:w,value:e[d],table:c,dataContext:i,appModel:this.appModel,rowId:u})})]})]})})]},"onboarding-"+u)}render(){let e,t=[];return this.props.table&&(e=new c.default(this.appModel,this.props.tableSchema,void 0,void 0,void 0,void 0,{viewStackKey:this.viewStackKey}),t=this.props.table.queryRowValues({},this.appModel,e)),this.renderRows(t,e)}renderRows(e,t){var i,o,n;const c=this.props.classes,u=p.AppGlobals.AppModel;if(!u)return null;const m=this.appModel.appTemplate.getView(this.props.controlName);if(null==m)return null;let f,g=!0;(h.ReactRootUIConfig.isInDesktopExperience()||p.AppGlobals.AppModel.POSITIONS_ORDERED.includes(m.position()))&&(g=!1);const b=window.innerWidth<1024?600:800,w=window.innerWidth<768?"16px 18px":h.ReactRootUIConfig.isInDesktopExperience()?"16px 24px":"16px 10% 32px",x=window.innerWidth>=768?"0 7%":"20% 7%",T=d.default.windowWidth<d.default.widescreenBreakpoint?8:40;g&&(f=(0,S.jsx)("div",{style:(0,v.convertToRtlWhenNecessary)({height:56}),className:c.closeButtonContainer,children:(0,S.jsx)(r.IconButton,{"data-testid":"onboarding-view-close-button",className:c.closeButton,style:(0,v.convertToRtlWhenNecessary)({margin:T,color:(0,l.themeColor)("primaryText")}),onClick:this.okClick,"aria-label":u.MapActionName("Close"),children:(0,S.jsx)("i",{className:"fal fa-times"})})}));const I=g?"100%":this.props.height;let R=(0,S.jsx)(y.EmulatorComponentWrapper,{applyStyleType:g?void 0:"topLevelView",dataVFEValues:{root:"deck",table:null!==(o=null===(i=this.props.table)||void 0===i?void 0:i.name())&&void 0!==o?o:void 0,control:null!==(n=this.props.controlName)&&void 0!==n?n:void 0},containerStyles:{height:I},children:(0,S.jsxs)("div",{className:this.appModel.rolloutClassNames,style:(0,v.convertToRtlWhenNecessary)({height:I,maxWidth:this.props.width,zIndex:1e3,background:(0,l.themeColor)("mainContentBackgroun
1d"),display:"flex",flexDirection:"column",outline:"none"}),"data-testid":"onboarding-view-container",ref:this.props.listContainerRef,children:[f,(0,S.jsx)("div",{ref:e=>{this.scrollPaneRef=e},style:(0,v.convertToRtlWhenNecessary)({minHeight:48,flexGrow:1}),children:(0,S.jsx)("div",{ref:e=>{this.contentHolderRef=e},style:(0,v.convertToRtlWhenNecessary)({height:"100%",maxWidth:b,textAlign:"center",margin:"0 auto",padding:window.innerWidth<768?"0":x}),children:(0,S.jsx)(a.default,{style:(0,v.convertToRtlWhenNecessary)({height:"100%",maxWidth:"100%"}),containerStyle:(0,v.convertToRtlWhenNecessary)({height:"100%"}),slideStyle:(0,v.convertToRtlWhenNecessary)({height:"100%"}),index:this.state.activeStep,onChangeIndex:this.handleStepChange,children:e.map((e=>this.getLayoutForRow(e,g,t)))})})}),(0,S.jsx)("div",{className:"elevation_2",style:(0,v.convertToRtlWhenNecessary)(Object.assign({alignItems:"center",padding:w},h.ReactRootUIConfig.isInMobileExperience()&&{boxShadow:"none"})),children:(0,S.jsxs)("div",{style:(0,v.convertToRtlWhenNecessary)({display:"flex",justifyContent:e.length>1?"space-between":"center",width:"100%"}),children:[(0,S.jsx)(r.Button,{disabled:0===this.state.activeStep,style:(0,v.convertToRtlWhenNecessary)({display:e.length>1?void 0:"none"}),onClick:()=>
1this.handleStepChange(this.state.activeStep-1),variant:"outlined",color:"secondary",classes:{disabled:c.disabledOutlined},children:u.MapActionName("Back")}),(0,S.jsx)(r.MobileStepper,{variant:"dots",steps:e.length,position:"static",style:(0,v.convertToRtlWhenNecessary)({display:e.length>5||e.length<=1?"none":void 0,paddingBottom:0}),activeStep:this.state.activeStep}),(0,S.jsx)(r.Button,{disabled:this.state.activeStep===e.length-1,style:(0,v.convertToRtlWhenNecessary)({display:this.state.activeStep===e.length-1?"none":void 0}),onClick:()=>this.handleStepChange(this.state.activeStep+1),variant:"contained",color:"secondary",className:(0,s.default)({[c.removeBoxShadow]:h.ReactRootUIConfig.isInMobileExperience()}),children:u.MapActionName("Next")}),(0,S.jsx)(r.Button,{style:(0,v.convertToRtlWhenNecessary)({display:this.state.activeStep===e.length-1?void 0:"none"}),onClick:this.okClick,variant:"contained",color:"secondary",className:(0,s.default)({[c.removeBoxShadow]:h.ReactRootUIConfig.isInMobileExperience()}),children:u.MapActionName("Done")}),this.renderActionButtonPortal()]})})]})});return g&&(R=(0,S.jsx)(r.Modal,{style:(0,v.convertToRtlWhenNecessary)({outline:"none",overflowY:"auto",overflowX:"hidden",width:"100%",height:"100%"}),disableEnforceFocus:!0,open:this.props.open,children:R})),(0,S.jsx)(r.MuiThemeProvider,{theme:C(),children:R})}}const I=(0,r.withStyles)(x)(T);t.default=I},480952:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=m,t.getFallbackUrlOrTryPreload=function(e,t){const i=h.get(e);null==i&&u()&&p()&&m(e,t,(t=>{h.set(e,t.src)}));return i};var n=o(i(496486)),a=o(i(571524)),r=i(263198),s=o(i(593186)),l=i(629503),d=i(318926),c=i(218546);function u(){return a.default.InIOSWebView()&&a.default.InWKWebView()}function p(){return n.default.get(window,"AppModel.AppTemplate.Behavior.FullOfflineCaching")}const h=new Map;function m(e,t,i,o){const n=new Image;if(!e)return s.default.ReportError({errorMessage:"Tried to preload image with blank url"}),o&&o(),n;let h=e;const m=[],f=()=>{const e=m.shift();e&&e()};return u()&&h&&0!==h.indexOf("data")&&(p()&&0!==h.indexOf("appsheet")&&(h="appsheet-cache://url="+encodeURIComponent(e)),(null==t?void 0:t.isIosHandle())?m.push((()=>{d.logger.logAppEvent({eventName:c.AppEventName.IosCustomSchemeFailedPreview}),l.Common.processImage(t,(e=>{n.src=e}),f)})):p()&&m.push((()=>{r.JeeneeBrowserAPI.getBase64PhotoFromCacheIOS(e,(e=>{e?n.src=e:f()}))})),m.push((()=>{n.src=e}))),o&&(a.default.IsEditorIFramePreview()&&"function"==typeof window.fetch?m.push((()=>{fetch(n.src).then((e=>o(e.status,e.statusText))).catch((()=>o()))})):m.push(o)),n.onload=()=>i(n),n.onerror=f,n.src=h,n}},372380:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(310434)),a=o(i(856690)),r=o(i(689728)),s=o(i(994993)),l=o(i(861655)),d=i(667294),c=o(i(386010)),u=o(i(571524)),p=i(557310),h=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&(i[o[n]]=e[o[n]])}return i};const m=function(e){function t(){return(0,a.default)(this,t),(0,s.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,l.default)(t,e),(0,r.default)(t,[{key:"shouldComponentUpdate",value:function(e){return e.shouldUpdate}},{key:"render",value:function(){return(0,d.createElement)("div",null,this.props.render())}}]),t}(d.Component);function f(e,t){e.transform!==t&&(e.transform=t,e.webkitTransform=t,e.MozTransform=t,e.transition=""===t?"transform .2s ease-out":"")}const g="undefined"!=typeof navigator&&/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(navigator.userAgent),y="down",v="up",b={activate:"release",deactivate:"pull",release:"loading",finish:"finish"};let w=!1;try{const e=Object.defineProperty({},"passive",{get:function(){w=!0}});window.addEventListener("test",null,e)}catch(e){}const S=!!w&&{passive:!1},x=function(e){function t(){(0,a.default)(this,t);const e=(0,s.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.state={currSt:"deactivate",dragOnEdge:!1},e._lastScreenY=0,e._isMounted=!1,e.shouldUpdateChildren=!1,e.triggerPullToRefresh=function(){!e.state.dragOnEdge&&e._isMounted&&(e.props.refreshing?(e.props.direction===v&&(e._lastScreenY=-e.props.distanceToRefresh-1),e.props.direction===y&&(e._lastScreenY=e.props.distanceToRefresh+1),e.setState({currSt:"release"},(function(){return e.setContentStyle(e._lastScreenY)}))):e.setState({currSt:"finish"},(function(){return e.reset()})))},e.init=function(t){t&&(e._to={touchstart:e.onTouchStart.bind(e,t),touchmove:e.onTouchMove.bind(e,t),touchend:e.onTouchEnd.bind(e,t),touchcancel:e.onTouchEnd.bind(e,t)}
1,Object.keys(e._to).forEach((function(i){t.addEventListener(i,e._to[i],S)})))},e.destroy=function(t){e._to&&t&&Object.keys(e._to).forEach((function(i){t.removeEventListener(i,e._to[i])}))},e.onTouchStart=function(t,i){e._ScreenY=e._startScreenY=i.touches[0].screenY,e._lastScreenY=e._lastScreenY||0},e.isEdge=function(t,i){const o=e.scrollContainer;if(o&&o===document.body){const e=document.scrollingElement?document.scrollingElement:document.body;if(i===v)return e.scrollHeight-e.scrollTop<=window.innerHeight;if(i===y)return e.scrollTop<=0}return i===v?t.scrollHeight-t.scrollTop===t.clientHeight:i===y?t.scrollTop<=0:void 0},e.damping=function(t){if(Math.abs(e._lastScreenY)>e.props.damping)return 0;return t*=.6*(1-Math.abs(e._ScreenY-e._startScreenY)/window.screen.height)},e.onTouchMove=function(t,i){const o=i.touches[0].screenY,n=e.props.direction;if(n===v&&e._startScreenY<o||n===y&&e._startScreenY>o||e.props.refreshing||e.props.disabled)e.state.dragOnEdge&&(e.setContentStyle(0),this.setState({dragOnEdge:!1}));else if(e.isEdge(t,n)){e.state.dragOnEdge||(e._ScreenY=e._startScreenY=i.touches[0].screenY,e.setState({dragOnEdge:!0}));const t=Math.round(o-e._ScreenY);e._ScreenY=o,e._lastScreenY+=e.damping(t),e.setContentStyle(e._lastScreenY),Math.abs(e._lastScreenY)<e.props.distanceToRefresh?"deactivate"!==e.state.currSt&&e.setState({currSt:"deactivate"}):"deactivate"===e.state.currSt&&e.setState({currSt:"activate"}),g&&i.changedTouches[0].clientY<0&&e.onTouchEnd()}},e.onTouchEnd=function(){e.state.dragOnEdge&&e.setState({dragOnEdge:!1}),"activate"===e.state.currSt?(e.setState({currSt:"release"}),e._timer=setTimeout((function(){e.props.refreshing||e.setState({currSt:"finish"},(function(){return e.reset()})),e._timer=void 0}),1e3),e.props.onRefresh()):e.props.refreshing||e.reset()},e.reset=function(){e._lastScreenY=0,e.setContentStyle(0)},e.setContentStyle=function(t){e.contentRef&&(e.props.useTranslate3d?f(e.contentRef.style,0===t?"":"translate3d(0px, "+t+"px, 0px)"):f(e.contentRef.style,0===t?"":"translate(0px, "+t+"px)"))},e}return(0,l.default)(t,e),(0,r.default)(t,[{key:"shouldComponentUpdate",value:function(e){return this.shouldUpdateChildren=this.props.children!==e.children,!0}},{key:"componentDidUpdate",value:function(e){e!==this.props&&(setTimeout((()=>{const e=this.props.getScrollContainer();e!==this.scrollContainer&&(this.destroy(this.scrollContainer),this.scrollContainer=e,this.init(this.scrollContainer))})),this.props.refreshing&&this.props.refreshing===e.refreshing||this.triggerPullToRefresh())}},{key:"componentDidMount",value:function(){const e=this;setTimeout((function(){const t=e.props.getScrollContainer();t&&(e.scrollContainer=t,e.init(e.scrollContainer),e.triggerPullToRefresh()),e._isMounted=!0}))}},{key:"componentWillUnmount",value:function(){this.destroy(this.scrollContainer)}},{key:"render",value:function(){const e=this,t=(0,n.default)({},this.props);delete t.damping;const i=t.className,o=t.prefixCls,a=t.children,r=t.direction,s=t.indicator,l=h(t,["useTranslate3d","scrollContainer","className","prefixCls","children","getScrollContainer","direction","onRefresh","refreshing","indicator","distanceToRefresh"]),f=(0,c.default)(i,o,o+"-"+r);let g=o+"-content";return this.scrollContainer&&(g+=" "+o+"-"+r),(0,d.createElement)("div",(0,n.default)({className:f},l),function(t){const i=(0,d.createElement)(m,{shouldUpdate:e.shouldUpdateChildren,render:function(){return a}}),n=(0,c.default)(t,!e.state.dragOnEdge&&o+"-transition",{["".concat(o,"-flickerfix")]:!u.default.IsChromeBrowser()});return(0,d.createElement)("div",{className:o+"-content-wrapper"},(0,d.createElement)("div",{className:n,style:p.ReactRootUIConfig.isReactRoot()?{position:"absolute",inset:0}:void 0,ref:function(t){return e.contentRef=t}}
1,r===v?i:null,(0,d.createElement)("div",{className:o+"-indicator"},s[e.state.currSt]||b[e.state.currSt]),r===y?i:null))}(g))}}]),t}(d.Component);t.default=x;x.defaultProps={prefixCls:"rmc-pull-to-refresh",getScrollContainer:function(){},direction:y,distanceToRefresh:25,damping:100,indicator:b}},609135:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.VERTICALLY_EXPANDABLE_VIEW=t.ReactAppInlineView=t.InlineViewForEnvironment=void 0;var n=o(i(238416)),a=o(i(667294)),r=i(779467),s=i(351101),l=i(888861),d=i(557310),c=i(698739),u=i(14042),p=i(538678),h=i(803444),m=i(29827),f=i(173399),g=i(673275),y=i(696916),v=i(302873),b=i(155345),w=i(347453),S=i(618583),x=i(663767),C=i(148521);function T(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function I(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?T(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):T(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var R=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};const O=t.VERTICALLY_EXPANDABLE_VIEW=new Set(["deck","table","fasttable","gallery"]),D=e=>{var t,i,o,n,a;const{viewType:h,maxRows:T,filterExpr:D,applyUserDefinedFilters:N,searchQuery:j,selectedTable:E,rowId:A,disableAllActions:P,inlineStatePath:M,filterDefaults:k=[],dynamicHeightMode:_,width:B,height:L}=e,V=R(e,["viewType","maxRows","filterExpr","applyUserDefinedFilters","searchQuery","selectedTable","rowId","disableAllActions","inlineStatePath","filterDefaults","dynamicHeightMode","width","height"]),{viewStackKey:F,interactiveDashboardMode:W}=e,H=(0,u.useDataContext)(),U=(0,u.usePendingTransaction)(),G=(0,c.useFilterContext)({disabled:!N}),z=(0,s.getAppModel)(),K=(0,u.useReactAppSelector)((e=>(0,m.getParentViewType)(e,F,!0))),{control:Y,navState:q,tableName:X,viewState:Q}=(0,u.useReactAppSelector)((e=>{const t=(0,m.selectViewStateById)(e,F);return Object.assign({viewState:t},(0,f.mapViewStackToControl)(t))})),$=(0,u.useReactAppSelector)((e=>{const{index:t}=(0,m.getClosestAncestorInStack)(e,F),i=e.uiState.viewStack[t+1];if(!i)return;const o=(0,m.selectViewStateById)(e,i.viewStackKey),n=(0,m.getTableName)(o),a=(0,m.getViewType)(o);return X===n&&"detail"===a?o.mutableState.RowKey:void 0}));let Z=A||!(W&&("detail"===h||"slideshow"===h))&&(null==q?void 0:q.RowKey)||$;const{table:J,tableSchema:ee}=z.findTableCollection(X),te=O.has(h),ie=!d.ReactRootUIConfig.isInDesktopExperience()&&te?T:null,oe=q?(0,g.generateFilterExpressions)(q,!0):null,ne=(0,l.createAnd)(D||(null!=oe?oe:null),null!==(t=null==G?void 0:G.query.toExpression())&&void 0!==t?t:null),ae=(0,p.useViewSpecificPropsForView)({appModel:z,viewType:h,control:Y,tableName:X,viewState:null!=q?q:void 0,searchState:{}}),re=[...k,...(null==ae?void 0:ae.filterDefaults)||[]],se={isInline:!0,table:J,tableSchema:ee,filterExpr:ne,filterDefaults:re,rowLimit:ie,searchQuery:j||(null==q?void 0:q.SearchTerm)},le=(0,x.getInlineViewComponentByType)(h),de=(e,t)=>(0,C.jsx)(le,I(I(I(I({},ae),V),se),{},{width:e,height:t,uiState:Q,visibleMaxRowCount:T,selectedTable:null!=E?E:null!=Z?X:void 0,showActionBar:!P&&(null==q?void 0:q.showActionBar),rowId:Z,disableSearchOnDrilldown:!0})),ce=_?de(B):B&&L?de(B,L):(0,C.jsx)(S.AbsoluteSizeWrapper,{children:de}),{controlGroupBy:ue}=ae,pe=(0,y.shouldUseDrilldownView)(h,ue)?(0,C.jsx)(y.DrilldownView,I(I(I(I({dynamicHeightMode:_,width:B},ae),V),se),{},{children:ce})):ce,he=W&&!!(null===(i=e.coupledViews)||void 0===i?void 0:i.length);if("detail"===h&&!Z&&!he){const e=(null==J?void 0:J.queryRows({searchQuery:j,filterExpr:D,filterDefaults:k,sortRules:ae.sortBy,transaction:U}))||[];Z=null===(o=e[0])||void 0===o?void 0:o.keyValue}const me=Z?[Z]:[];let fe;fe="detail"!==h||Z?Z?(0,v.getRowScopeActions)(X,me,H,!1):(0,v.getTableScopeActions)({tableName:(null==J?void 0:J.name())||"",appModel:z}):[];const ge=null===(a=null===(n=null==z?void 0:z.AppTemplate)||void 0===n?void 0:n.Presentation)||void 0===a?void 0:a.ShowOverlayActionsInSubViews,ye="dashboard"===K&&ge,ve=(0,b.getFabActions)({isInline:!0,actionsInScope:fe,shouldShowInlineFabActions:ye});return(0,C.jsx)(r.AppErrorBoundary,{children:(0,C.jsxs)(u.ViewStackKeyContextProvider,{viewStackKey:null!=F?F:"",inlineStatePath:M,children:[(0,C.jsx)(w.MobileOverlayActions,{viewName:null==Y?void 0:Y.Name,sourceTable:J,actions:ve,rowId:null!=Z?Z:void 0,filterExpr:D||void 0,filterDefaults:re}),pe]})})};t.ReactAppInlineView=D;t.InlineViewForEnvironment=a.default.forwardRef((function(e,t){return d.ReactRootUIConfig.isReactRoot()&&e.viewStackKey?(0,C.jsx)(D,I(I({},e),{},{viewStackKey:e.viewStackKey})):(0,C.jsx)(h.LegacyInlineView,I({ref:t},e))}))},538161:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.ReactFormButtons=void 0;var n=i(249492),a=i(695386),r=o(i(466735)),s=o(i(389875)),l=i(59775),d=i(351101),c=i(148521);const u=(0,a.makeStyles)((e=>({actionButton:{fontSize:"0.778rem",height:"100%",letterSpacing:"0.3px",marginLeft:e.spacing(1)}})));t.ReactFormButtons=e=>{let{actionButtonContainer:t,onCancel:i,onDelete:o,onNext:a,onSave:p,onDone:h,onPrevious:m}=e;const f=u(),g=(0,d.getAppModel)();if(!t)return null;const y={prev:{actionName:l.FormFooterButtonText.Prev,shouldShow:!!m,startIcon:(0,c.jsx)(s.default,{}),onClick:m},cancel:{actionName:l.FormFooterButtonText.Cancel,shouldShow:!!i,onClick:i},delete:{actionName:l.FormFooterButtonText.Delete,shouldShow:!!o,onClick:o},next:{actionName:l.FormFooterButtonText.Next,shouldShow:!!a,endIcon:(0,c.jsx)(r.default,{}),variant:"contained",onClick:a},save:{actionName:l.FormFooterButtonText.Save,shouldShow:!!p,variant:"contained",onClick:p},done:{actionName:l.FormFooterButtonText.Done,shouldShow:!!h,variant:"contained",onClick:h},placeholder:{actionName:l.FormFooterButtonText.Save,variant:"contained",shouldShow:!p&&!a&&!h}},v=["prev","cancel","delete","next","save","done","placeholder"].filter((e=>y[e].shouldShow)).map((e=>{const{actionName:t,onClick:i,startIcon:o=null,endIcon:a=null,variant:r="outlined"}=y[e];return(0,c.jsxs)(n.Button,{variant:r,size:"small",disableElevation:!0,color:"primary",onClick:i,classes:{root:f.actionButton},children:[o,g.MapActionName(t),a]},e)}));return(0,c.jsx)(n.Portal,{container:t,children:v})}},832705:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(695386),a=o(i(853240)),r=o(i(805227)),s=o(i(652401)),l=o(i(828471)),d=o(i(925465)),c=o(i(386010)),u=i(278965),p=i(667294),h=i(148521);const m=(0,n.makeStyles)((e=>({list:{paddingLeft:0,paddingRight:0},checkbox:{"&$checked":{color:e.palette.primary.main},marginRight:-16},checked:{}})));t.default=e=>{const{attribute:t,value:i,onEntryValueChange:o,className:f,style:g,label:y,hasErrorMessage:v,yesNoDisplayStyle:b,mainRef:w}=e,S=m(),x=()=>{var e;let n=i;n&&t.isRequired()||(n=n||null===(e=t.auxData().EnumValues)||void 0===e?void 0:e[0],o(t,n,{}))},C=(0,p.useMemo)((()=>(e=>{const t={red:"#fa5252",orange:"#ff922b",yellow:"#ffd43b",green:"#51cf66",blue:"#329af0",purple:"#cc5de8",black:"#444",white:"#eee",brown:"#8B4513"};return(0,n.createTheme)({palette:{primary:{main:t[e?String(e).toLowerCase():"green"]||t.green}}})})(i)),[i]);return(0,h.jsx)(n.MuiThemeProvider,{theme:C,children:(0,h.jsx)("div",{className:f,ref:w,style:(0,u.convertToRtlWhenNecessary)(g),children:(0,h.jsx)("div",{className:(0,c.default)({ErrorMessage:v}),children:(0,h.jsx)("div",{className:"FormEntryContent",style:(0,u.convertToRtlWhenNecessary)(b),children:(0,h.jsx)(a.default,{className:S.list,children:(0,h.jsxs)(r.default,{button:!0,className:S.list,onClick:x,children:[(0,h.jsx)(l.default,{primary:y}),(0,h.jsx)(s.default,{children:(0,h.jsx)(d.default,{onClick:x,classes:{root:S.checkbox,checked:S.checked},checked:!!i})})]})})})})})})}},283002:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.Slider=void 0;var n=i(667294),a=i(249492),r=i(695386),s=o(i(386010)),l=i(56749),d=i(714067),c=i(646514),u=i(148521);const p=(0,r.makeStyles)((e=>({sliderContainer:e=>{let{formStyle:t}=e;return{padding:t===d.FORMSTYLE_SXS?"6px 4px 0 0":"12px 4px 0 4px"}},root:{color:(0,l.themeColor)("themeMainColor"),height:e.spacing(1),display:"flex",alignItems:"center"},thumb:{height:e.spacing(3),width:e.spacing(3),backgroundColor:"dark"===e.palette.type?c.GOOGLE_GREY_300:c.GOOGLE_WHITE,border:"3px solid ".concat((0,l.themeColor)("themeMainColor")),marginTop:-2,"&:focus, &:hover, &$active":{boxShadow:"inherit"}},valueLabel:e=>{let{type:t}=e;return{whiteSpace:"nowrap",color:"".concat((0,l.themeColor)("primaryText")),left:"percentage"===t?"calc(-50% + 6px)":"calc(-50% + 3px)",top:-22,"& *":{color:"".concat((0,l.themeColor)("primaryText")),background:"transparent"},fontSize:"0.889em"}},track:{height:14,borderRadius:"10px 0 0 10px"},rail:{height:e.spacing(1),borderRadius:10,opacity:1,backgroundColor:"dark"===e.palette.type?c.GOOGLE_GREY_700:c.GOOG
1LE_GREY_300}})));t.Slider=e=>{const t=p(e),{value:i,disabled:o,step:r,min:l,max:d,onChangeCommitted:c,valueDisplayFunction:h}=e,[m,f]=(0,n.useState)(i);return(0,n.useEffect)((()=>{f(i)}),[i]),(0,u.jsx)("div",{className:(0,s.default)("Slider",t.sliderContainer),children:(0,u.jsx)(a.Slider,{classes:{root:t.root,thumb:"".concat(t.thumb," Slider-thumb"),valueLabel:"".concat(t.valueLabel," Slider-valueLabel"),track:"".concat(t.track," Slider-track"),rail:t.rail},step:r,min:l,max:d,disabled:o,value:m,onChangeCommitted:c,onChange:(e,t)=>f(t),valueLabelFormat:h,"aria-labelledby":"slider-input",valueLabelDisplay:"on"})})}},300431:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.ViewAwareComponent=t.PureViewAwareComponent=void 0;var n=i(496486),a=i(667294),r=i(957831),s=i(673275),l=i(14042),d=i(557310),c=o(i(819433)),u=i(692479),p=i(173399),h=i(29827),m=i(783252),f=i(166089),g=i(521671),y=i(573553),v=i(44617);class b extends a.Component{constructor(){super(...arguments),this.launchRelatedForm=(e,t,i,o,a)=>{const r=f.AppGlobals.AppModel.FindControlsForTable(e,"form",!1)[0],s=(0,n.pickBy)({RowKey:t,defaultValues:i,launchedByAttributeName:o.name(),referenceRelationship:a,transactionId:a&&this.mutableViewState.transactionId,isInEditMode:!0});(0,c.default)().dispatch((0,u.pushView)({Identifier:r?{Type:"Control",Name:r.Name||""}:{Type:"View",Action:"form",TableName:e},ViewState:s}))},this.createInlineStatePath=e=>{let{rowId:t,columnName:i,controlName:o,tableName:n,viewType:a=""}=e;if(d.ReactRootUIConfig.isReactRoot()){const e=(0,y.generateInlineViewKey)({controlName:o,rowId:t,columnName:i,tableName:n,viewType:a});return[...this.inlineStatePath||[this.viewStackKey],e]}}}get viewStackKey(){var e;return null===(e=this.context)||void 0===e?void 0:e.viewStackKey}get transactionOwningViewStackKey(){var e,t;return v.dynamicRollouts.includeByOwnerId("FixChildFormContext")&&null!==(t=null===(e=this.pendingTransaction)||void 0===e?void 0:e.owningViewStackKey)&&void 0!==t?t:this.viewStackKey}get inlineStatePath(){var e;return null===(e=this.context)||void 0===e?void 0:e.inlineStatePath}get appState(){return this.props.appState||(0,r.getAppState)()}get currentUIState(){var e;return d.ReactRootUIConfig.isReactRoot()?(0,s.getUIStateByKey)(this.viewStackKey):null===(e=this.appState)||void 0===e?void 0:e.CurrentUIState}setCurrentUIState(e,t){if(d.ReactRootUIConfig.isReactRoot()){const i=(0,h.selectViewStateById)((0,c.default)().getState(),this.viewStackKey),{action:o}=(0,p.mapViewStackToControl)(i);let n=e[m.SPECIFIC_STATE_NAME_MAP[o]];n.FilterExpr&&(n=Object.assign(Object.assign({},n),{filterExprString:JSON.stringify(n.FilterExpr.toJSON()),FilterExpr:void 0})),(0,c.default)().dispatch((0,u.replaceView)({ViewState:n,ViewStackKey:this.viewStackKey,options:{mobileTransitionType:"slide",mobileTransitionDirection:t}}))}else this.appState.ReplaceState(e,!1)}runViewStateSelector(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"self";if(d.ReactRootUIConfig.isReactRoot())try{const i="self"===t?this.viewStackKey:(0,y.getClosestNonInlineAncestor)(this.viewStackKey),o=(0,c.default)().getState();return(0,h.createViewStateSelector)(i,e)(o)}catch(e){return}}get mutableViewState(){var e;return null!==(e=this.runViewStateSelector(h.getMutableState))&&void 0!==e?e:{}}get nonInlineMutableViewState(){var e;return null!==(e=this.runViewStateSelector(h.getMutableState,"noninline"))&&void 0!==e?e:{}}get isBehindFormOverlay(){return this.runViewStateSelector(h.isBehindFormOverlay)}get pendingTransaction(){var e;if(d.ReactRootUIConfig.isReactRoot())return null!==(e=this.runViewStateSelector(h.getPendingTransaction,"self"))&&void 0!==e?e:this.runViewStateSelector(h.getPendingTransaction,"noninline")}pushInlineView(e,t){(0,c.default)().dispatch((0,u.pushInlineView)({viewStackKey:e,ViewState:t}))}pushView(e){let{viewType:t,useAnyRefs:i,newState:o,retainSearch:n,viewControl:a,overrideStateChangeMode:r,inlineStatePath:s}=e;if(d.ReactRootUIConfig.isReactRoot()){o.FilterExpr&&(o.filterExprString=JSON.stringify(o.FilterExpr.toJSON()));const e=a?{Type:"Control",Name:a.Name}:{Type:"View",Action:t,TableName:o.TableName};(0,c.default)().dispatch((0,u.pushView)({Identifier:e,ViewState:Object.assign(Object.assign({},o),{FilterExpr:void 0}),ViewStackKey:this.viewStackKey,InlineStatePath:s}))}else this.appState.PushView(t,i,o,n,a,r)}pushState(e,t){if(d.ReactRootUIConfig.isReactRoot()){const t=e.ControlName?{Type:"Control",Name:e.ControlName}:{Type:"View",Action:e.Root,TableName:e.TableName};(0,c.default)().dispatch((0,u.pushView)({Identifier:t,ViewState:e,ViewStackKey:this.viewStackKey}))}else this.appState.PushState(e,t)}get topStackUIState(){var e;return null===(e=this.appState)||void 0===e?void 0:e.CurrentUIState}canLaunchRelatedForm(e){if(!d.ReactRootUIConfig.isReactRoot())return!1;if(e){const t=this.runViewStateSelector(h.getViewStackIndex);if(!(0,g.findExistingViewInViewStack)(f.AppGlobals.AppModel,e,"form",t))return!0}return!1}}t.ViewAwareComponent=b,b.contextType=l.ViewStackKeyContext;class w extends b{}t.PureViewAwareComponent=w,w.isPureReactComponent=!0},73859:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(667294),a=i(281294),r=i(168949),s=o(i(669968)),l=i(708935),d=o(i(386010)),c=o(i(21870)),u=i(56749),p=i(496854),h=i(278965),m=i(278965),f=i(148521);class g extends n.Component{constructor(e){super(e),this.onLayoutChange=e=>{const t=this.props.entries.map((e=>e.view.name())),i=c.default.localStorageState.get(this.props.controlName),o=this.generateLayout();i&&this.loaded?i.layoutSettings&&this.sameLayout(e,(0,r.toJS)(i.layoutSettings.layout))||c.default.localStorageState.set(this.props.controlName,{entryNames:t,layoutSettings:{layout:e,columns:o.columns,rows:o.rows}}):this.loaded&&c.default.localStorageState.set(this.props.controlName,{entryNames:t,layoutSettings:{layout:o.layout,columns:o.columns,rows:o.rows}})},c.default.initStateFromLocalStorage(this.initializeLayout.bind(this))}entriesHaveChanged(e){const t=this.props.entries;if(!e.entryNames||e.entryNames.length!==t.length)return!0;let i=!1;return e.entryNames.forEach(((e,o)=>{e!==t[o].view.name()&&(i=!0)})),i}hasValidLayout(e){var t;if(!(e&&(null===(t=e.layoutSettings)||void 0===t?void 0:t.layout)&&e.entryNames&&this.props.entries))return!1;const i=e.layoutSettings.layout.length;return i===e.entryNames.length&&i===this.props.entries.length}initializeLayout(){this.loaded=!0}shouldRegenerate(e){return!(e&&this.hasValidLayout(e)&&!this.entriesHaveChanged(e))}generateLayout(){const e=(0,p.computeLayoutPacked)({entries:this.props.entries,height:this.props.dashHeight,width:this.props.size.width||0});return{layout:e.entries.map((e=>({x:2*e.x,y:4*e.y,w:2*e.w,h:4*e.h,i:e.view.name(),isDraggable:void 0,isResizeable:void 0,minH:void 0,maxH:void 0,minW:void 0,maxW:void 0,moved:!1,static:!1}))),cellHeight:e.cellHeight,rows:e.rows,columns:e.columns}}generateDOM(e,t,i){const o=this.props,n={height:"100%",position:"relative",backgroundColor:(0,u.themeColor)("mainContentBackground"),display:"flex",flexDirection:"column"};return t.map((function(t){const a=(o.size.width||0)/e.columns/2,r=t.w*a-10-1.1*t.w,s=o.renderEntry({entry:t,cellWidth:r,cellHeight:Math.round(t.h*i+10*(t.h-1)-15),sidewaysScroll:!1,key:"entry-"+t.view.name(),styles:n,displayMode:"tiled"});return(0,f.jsx)("div",{className:(0,d.default)({"react-grid-item-rtl":(0,m.shouldApplyRtlStyles)()}),style:(0,h.convertToRtlWhenNecessary)({position:"relative"}),children:s},t.view.name())}))}sameLayout(e,t){if(e.length!==t.length)return!1;let i=!0;return e.forEach(((e,o)=>{const n=t[o];e.x===n.x&&e.y===n.y&&e.w===n.w&&e.h===n.h&&e.i===n.i||(i=!1)})),i}resetButtonClick(){c.default.localStorageState.delete(this.props.controlName)}createEntries(e){return e.map((e=>{const t=this.props.entries.find((t=>t.view.name()===e.i));return t?{x:e.x,y:e.y,w:e.w,h:e.h,view:t.view,inlineStatePath:t.inlineStatePath,viewStackKey:t.viewStackKey}:null})).filter((e=>null!==e))}render(){const e=c.default.localStorageState.get(this.props.controlName);let t;t=this.shouldRegenerate(e)?this.generateLayout():e.layoutSettings;const i=(0,r.toJS)(t.layout),o=this.createEntries(i),n=Math.floor((this.props.dashHeight-10*(t.rows+1/4)*4)/t.rows/4);return(0,f.jsx)(s.default,{className:"layout",layout:i,cols:2*t.columns,rowHeight:n,width:this.props.size.width||0,draggableHandle:".DashboardView__entry-header",onLayoutChange:this.onLayoutChange.bind(this),children:this.generateDOM(t,o,n)})}}t.default=(0,l.withSize)()((0,a.observer)(g))},155345:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.getFabActions=t.default=t.GROUPED_HEADER_ROW_HEIGHT=t.DRILLDOWN_HEADER_ROW_HEIGHT=void 0;var n=o(i(496486)),a=i(249492),r=i(166089),s=i(623834),l=o(i(209491)),d=j(i(146913)),c=o(i(571524)),u=o(i(593186)),p=i(263198),h=i(557310),m=o(i(19849)),f=j(i(365914)),g=o(i(454852)),y=i(351101),v=i(375155),b=i(242896),w=i(692479),S=o(i(819433)),x=i(300431),C=i(347453),T=j(i(186189)),I=i(347055),R=i(302873),O=i(901545),D=i(148521);function N(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(N=function(e){return e?i:t})(e)}
1function j(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=N(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}const E=t.DRILLDOWN_HEADER_ROW_HEIGHT=38,A=t.GROUPED_HEADER_ROW_HEIGHT=48,P="localhost"===location.hostname?u.default.logToDevConsole:n.default.noop,M=e=>{let{disableAllActions:t,quickEditMode:i,isInline:o,shouldShowInlineFabActions:n,actionsInScope:a}=e;const r=h.ReactRootUIConfig.isInMobileExperience()?C.SPEED_DIAL_FAB_LIMIT:T.FAB_LIMIT;return!h.ReactRootUIConfig.isInDesktopExperience()&&!t&&!i&&(!o||n)?a.filter((e=>e.prominence()===g.default.DISPLAY_OVERLAY)).slice(0,r):[]};t.getFabActions=M;class k extends x.ViewAwareComponent{constructor(e){super(e),this.shouldDisableEmulatorComponentWrapper=()=>{var e;return h.ReactRootUIConfig.isInMobileExperience()&&((null===(e=this.props.controlGroupBy)||void 0===e?void 0:e.length)||0)>1},this.reactListScrollParentGetter=()=>{},this.commitTransaction=this.commitTransaction.bind(this),this.exitEditMode=this.exitEditMode.bind(this),this.onScrollContainerMount=this.onScrollContainerMount.bind(this),this.getScrollContainer=this.getScrollContainer.bind(this),this.getViewportHeight=this.getViewportHeight.bind(this),this.state={},this.debugLog=P.bind(window,this.constructor.name)}get appModel(){return this.props.appModel||r.AppGlobals.AppModel}dataContext(){var e;const t=(null!==(e=this.props.dataContext)&&void 0!==e?e:this.appModel.dataContext()).copy();return t.uiContext={viewStackKey:this.viewStackKey},t.tableSchema=this.props.tableSchema,t}shouldShow(){var e;return!(!this.appModel||!1===(null===(e=this.appModel.AppTemplate)||void 0===e?void 0:e.IsValid))&&(!this.props.signature||this.props.signature===this.appModel.signature||(u.default.logToDevConsole(this,"render bailed because of signature mismatch"),!1))}componentDidMount(){this.restoreScrollPosition(),this.disableScrollBounce()}componentDidUpdate(e,t){h.ReactRootUIConfig.isReactRoot()||this.restoreScrollPosition(),this.disableScrollBounce(),this.inSelectionMode()||delete this._lastRowToggled}componentWillUnmount(){h.ReactRootUIConfig.isReactRoot()||this.endTransaction()}disableScrollBounce(){c.default.IsIOSBrowser()&&!this.props.isInline&&document.addEventListener("touchstart",p.JeeneeBrowserAPI.disableScrollBounceIOS,{once:!0,capture:!0})}allowsUpdate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;const{table:t}=e;return!(!t||!this.appModel)&&t.allowsUpdate(this.appModel)}getTransaction(){var e,t;return null===(t=null===(e=this.appModel)||void 0===e?void 0:e.dataManager)||void 0===t?void 0:t.currentTransaction}inMultiRowEditMode(){return!!this.props.quickEditMode&&this.allowQuickEditMode()}commitTransaction(){const e=this.getTransaction();h.ReactRootUIConfig.isReactRoot()&&this.viewStackKey?(0,S.default)().dispatch((0,b.saveAndCloseEditMode)(this.viewStackKey)):e.modifiedData&&!e.closed?e.commit((t=>{if(t)return this.debugLog("the commit failed with message:",t.message),void r.AppGlobals.ViewManager.ShowInfoDialog(this.appModel.MapActionName("Unable to save changes"),t.message);this.debugLog("committed transaction with records",e.logRecords),this.appModel.ShouldDelaySync()||window.InputHandler.ProcessSync(),this.exitEditMode()})):this.exitEditMode()}useCardLayout(){const e=this.getView();if(e){return e.definition().UseCardLayout}return!1}autoLayout(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.large,i=arguments.length>2?arguments[2]:void 0;if(this.props.tableSchema){let o=this.props.tableSchema.allAttributes().map((e=>e.model));o=o.filter((e=>{var t;return!(null===(t=this.props.groupBy)||void 0===t?void 0:t.find((t=>t.Column===e.Name)))}));const n=this.props.table.name();let a=this.appModel.appTemplate.actions().actionsForTable(n,this.appModel,!1,this.dataContext()).map((e=>e.action));return i&&(a=a.concat({Name:"Go to details",Icon:"far fa-indent"})),m.default.getSmartDefaults(t,o,a,e)}return null}themeDataChanged(){var e;return this.themeData!==(null===(e=r.AppGlobals.ViewManager)||void 0===e?void 0:e.theme.themeData)||this.fontFamily!==this.appModel.AppTemplate.Presentation.FontFamily||this.fontSize!==this.appModel.appTemplate.normalizedFontSize()}setupCurrentLayout(){let{autoDefaults:e=!1,autoLayoutOverrides:t=null,includeGotoDetail
1s:i=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var o,n,a,d;const c=null===(n=null===(o=this.getView())||void 0===o?void 0:o.definition())||void 0===n?void 0:n.Layout,u="string"==typeof c?c:JSON.stringify(c),p=h.ReactRootUIConfig.isReactRoot()&&u!==this.viewDefnLayoutString;if(this.props.tableSchema&&(!this.customLayout||this.themeDataChanged())||p){let o=(0,f.getJSONFromString)(c);if(e&&(!(null==o?void 0:o.name)||"auto"===o.type)){const e=(null==o?void 0:o.name)?l.default[o.name]:l.default.large;o=this.autoLayout(t,e,i)}const n=null!==(d=null===(a=r.AppGlobals.ViewManager)||void 0===a?void 0:a.theme.themeData)&&void 0!==d?d:{},p=this.appModel.AppTemplate.Presentation.FontFamily,h=this.appModel.appTemplate.normalizedFontSize();this.themeData=n,this.fontFamily=p,this.fontSize=h,this.viewDefnLayoutString=u;const m=Object.assign(Object.assign({},n),{fontFamily:p,fontSize:h}),g=s.CardLayoutNode.getThemeNode(m);g.name=(null==o?void 0:o.name)||"large",g.children.push(o),this.customLayout=s.CardLayoutNode.build(g)}}endTransaction(){const e=this.getTransaction();e&&e.started&&!this.props.isInline&&(this.debugLog("endTransaction"),e.abort(),r.AppGlobals.StateChangeHandler.ShowUIState(!0))}exitEditMode(){if(h.ReactRootUIConfig.isReactRoot()&&this.viewStackKey)(0,S.default)().dispatch((0,b.cancelEditMode)(this.viewStackKey));else if(this.inMultiRowEditMode()&&r.AppGlobals.AppState){const e=this.getTransaction();e.started&&(this.debugLog("aborting transaction"),e.abort()),this.debugLog("exiting edit mode"),r.AppGlobals.AppState.AugmentCurrentState("quickedit",!1)}}isOverflowYInline(e){return null!=this.props.visibleMaxRowCount&&e>this.props.visibleMaxRowCount}getVisibleBodyHeight(e){let{isExpandedDrilldown:t,inDrilldownMode:i,rowHeight:o,annotatedRows:n,headerHeight:a=0,viewType:r,isDesktopInlineViewHorizScroll:s=!1}=e;const{height:l}=this.props,d=t?A:0,c=this.props.visibleMaxRowCount||Number.POSITIVE_INFINITY,u=Math.min(c,n.length);switch(!0){case!!l:return Number(l)-d;case!h.ReactRootUIConfig.isInDesktopExperience():case!this.isOverflowYInline(n.length):case s:return"auto";case i:return d+a+Number(u)*E+E/2;default:{const e=n.slice(0,u),t="table"===r?this.appModel.GetTableRowHeight():A,i=e.filter((e=>Array.isArray(e))).length;return a+d+i*t+o*(Number(u)-i)+(i>0?t/2:o/2)}}}scrollbarVisible(){const e=this.getScrollContainer();return e&&e.scrollHeight>e.clientHeight}scrollbarWidth(){return this.scrollbarVisible()?c.default.scrollbarWidth():0}onScrollContainerMount(e){this.scrollContainer=e}getScrollContainer(){var e,t,i;return null!==(i=null!==(t=null===(e=this.props.listContainerRef)||void 0===e?void 0:e.current)&&void 0!==t?t:this.scrollContainer)&&void 0!==i?i:null}getViewportHeight(){return this.props.height}restoreScrollPosition(){setTimeout((()=>{if(r.AppGlobals.AppState&&r.AppGlobals.AppState.restoreScrollPosition&&!this.props.isInline){const e=this.getScrollContainer();e&&(e.scrollTop=r.AppGlobals.AppState.restoreScrollPosition,delete r.AppGlobals.AppState.restoreScrollPosition)}}),0)}fixedHeightMode(){return!!this.props.height}containerWidth(){const e=this.props.width;if(null!=e&&!isNaN(e))return this.fixedHeightMode()?e-c.default.scrollbarWidth():e}getView(){const{controlName:e}=this.props,t=this.appModel;return t&&t.appTemplate&&e?t.appTemplate.getView(e):null}findTable(){return this.props.table}get paging(){var e,t;const i=this.getView();return null!=i?i.paging:null===(t=null===(e=this.findTable())||void 0===e?void 0:e.tableSchema)||void 0===t?void 0:t.paging}toggleRowSelected(e){let t,{shiftKey:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t=h.ReactRootUIConfig.isReactRoot()?this.props.selectedRows||[]:r.AppGlobals.AppState.GetCurrentStateSelection()||[],i&&this.renderedRowIds){const i={},o={};this.renderedRowIds.forEach(((e,t)=>{i[e]=t,o[t]=e}));const a=n.default.keyBy(t,(e=>i[e])),r=i[this._lastRowToggled],s=i[e];if(s!==r){const i=!n.default.includes(t,e);if(s>r)for(let e=r;e<=s;e++){null!=a[e]!==i&&(t=f.default.arrayToggle(t,o[e],!0))}else for(let e=r;e>=s;
1e--){null!=a[e]!==i&&(t=f.default.arrayToggle(t,o[e],!0))}}else t=f.default.arrayToggle(t,e,!0)}else t=f.default.arrayToggle(t,e,!0);this._lastRowToggled=e,h.ReactRootUIConfig.isReactRoot()?(0,S.default)().dispatch((0,w.mutateView)({ViewState:{selected:t},ViewStackKey:this.viewStackKey})):r.AppGlobals.AppState.AugmentCurrentStateWithSelection(t)}handleRowLongPress(e){this.allowSelectionMode()&&this.toggleRowSelected(e)}allowQuickEditMode(){return!1}get rowId(){return this.props.rowId}get actionsInScope(){var e;return(0,R.getTableScopeActions)({tableName:null===(e=this.props.table)||void 0===e?void 0:e.name(),appModel:this.appModel})}get fabActions(){const{disableAllActions:e,quickEditMode:t,isInline:i}=this.props,o=this.actionsInScope;return M({disableAllActions:e,quickEditMode:t,isInline:i,shouldShowInlineFabActions:this.shouldShowInlineFabActions(),actionsInScope:o})}isInDashboard(){const{topStackUIState:e}=this,{parentId:t}=this.props;return"dashboard"===(null==e?void 0:e.Root)&&(null==e?void 0:e.ControlName)===t}shouldShowInlineFabActions(){var e,t,i;const o=null===(i=null===(t=null===(e=this.appModel)||void 0===e?void 0:e.AppTemplate)||void 0===t?void 0:t.Presentation)||void 0===i?void 0:i.ShowOverlayActionsInSubViews;return this.isInDashboard()&&o}renderFabs(){var e,t;const{table:i}=this.props,{fabActions:o}=this;if(h.ReactRootUIConfig.isInMobileExperience())return null;if(o.length){const t=null===(e=this.getView())||void 0===e?void 0:e.name(),n=this.groupByState?this.groupByState.filterDefaults():this.props.filterDefaults,a=this.groupByState?this.groupByState.filterExpr():this.props.filterExpr;return(0,D.jsx)(T.default,{name:t,sourceTable:i,actions:o,filterExpr:a,filterDefaults:n,rowId:this.rowId})}return!this.props.isInline||this.shouldShowInlineFabActions()?(0,D.jsx)(I.GhostButton,{containerClassName:"LegacyOverlayActionsContainer",dataVFEValues:{root:null===(t=this.currentUIState)||void 0===t?void 0:t.Root,table:null==i?void 0:i.name(),context:"OverlayFab"}}):null}getNavControls(){return{left:null,right:null}}renderActionButtonPortal(){const{actionButtonContainer:e}=this.props,t=this.groupByState?this.groupByState.filterDefaults():this.props.filterDefaults,i=this.groupByState?this.groupByState.filterExpr():this.props.filterExpr,o=this.getNavControls();if(e){if(this.inMultiRowEditMode()&&!this.props.isInline&&h.ReactRootUIConfig.isInDesktopExperience())return(0,D.jsx)(a.Portal,{container:e,children:(0,D.jsxs)(v.NavBarButtons,{childrenOnly:!0,navControls:o,children:[(0,D.jsx)(O.UpperCamelCaseButton,{"aria-label":(0,y.mapActionName)("Cancel"),variant:"outlined",onClick:()=>this.exitEditMode(),children:(0,y.mapActionName)("Cancel")}),(0,D.jsx)(O.UpperCamelCaseButton,{"aria-label":(0,y.mapActionName)("Save"),variant:"contained",onClick:()=>this.commitTransaction(),children:(0,y.mapActionName)("Save")})]})});{const n=this.allowSelectionMode(),r=this.allowQuickEditMode();return(0,D.jsx)(a.Portal,{container:e,children:(0,D.jsx)(v.NavBarButtons,{navControls:o,allowSelectionMode:n,allowQuickEditMode:r,usedActions:this.fabActions,filterExpr:i,filterDefaults:t,tableName:this.props.isInline?this.props.table.name():void 0,isInline:this.props.isInline})})}}return null}allowSelectionMode(){const e=this.props;if(!e.table)return!1;if(this.props.isInline&&!this.isInDashboard())return!1;const t=this.appModel.appTemplate.actions().actionsForTable(e.table.name(),this.appModel,!1,this.dataContext()).filter((e=>!e.tableScope()&&e.isBulkRunnable()&&e.prominence()!==g.default.DO_NOT_DISPLAY));return e.allowBulkSelect&&t.length>0}inSelectionMode(){return Array.isArray(this.props.selectedRows)}rowIsSelected(e){return(this.props.selectedRows||[]).indexOf((0,f.fastTrim)(e))>=0}rowIsLastToggled(e){return this._lastRowToggled===e}id(){const{parentId:e,controlName:t}=this.props;return t?e?e+"___"+t:t:""}handleRowTap(e,t,i){const{table:o,tableSchema:n,onRowOpened:a,disableSearchOnDrilldown:s,groupBy:l,sortBy:c,filterExpr:u,filterDefaults:p}=this.props,h=this.appModel;let m,f;if(this.state.selectedTable&&o&&this.state.selectedTable!==o.name()?({table:m,tableSchema:f}=this.appModel.findTableCollection(this.state.selectedTable)):(m=o,f=n),this.inSelectionMode())return void this.toggleRowSelected(e,t);if(!m||!f)return;const g=m.findRow(e);if(f.isAppLauncherSchema()){const e=f.findAttributesByType("App");if(e.length){const t=g[e[0].name()];return void StateReflector.SwitchApp(t)}}else if(f.isUrlLauncherSchema()){const e=f.findAttributesByType("Url");if(e.length){const t=e[0],i=g[t.name()];let{url:o}=t.valueFromWireFormat(i);if(o&&!o.match(/\w+\:/)&&(o="http://"+o),o)return void r.AppGlobals.InputHandler.switchToUrl(o,t.launchExternal())}}if(a)return void a(m.rootName(),e);const y=this.getView();if(y){const t=d.eventTypes.ROW_SELECTED,i=y.getEventByType(t);if(i){const o=m,n="".concat(y.name(),"|").concat(t.name);return void d.default.handle(i,{appModel:h,table:m,rowId:e,sourceLocationName:n,sourceTable:o},void 0,this.viewStackKey)}}let v=!0;
1s&&(v=!1),this.pushView({viewType:"detail",useAnyRefs:!1,newState:{TableName:m.name(),RowKey:e,GroupBy:l,SortBy:c,FilterExpr:u,DefaultValues:p},retainSearch:v,overrideStateChangeMode:this.props.overrideStateChangeMode})}renderRows(e){return null}}t.default=k},675671:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.legacyCalendarLocalizer=t.fixedCalendarLocalizer=t.default=t.CalendarViewDataTestids=void 0;var n,a=o(i(496486)),r=o(i(45697)),s=o(i(155345)),l=i(455684),d=o(i(730381)),c=o(i(385857)),u=o(i(301940)),p=o(i(266522)),h=i(56749),m=i(249492),f=o(i(401890)),g=o(i(150198)),y=i(646514),v=i(166089),b=i(303622),w=i(700482),S=i(278965),x=i(562858),C=i(557310),T=o(i(819433)),I=i(692479),R=o(i(571524)),O=i(44617),D=i(148521);!function(e){e.Container="calendar-view-container"}(n||(t.CalendarViewDataTestids=n={}));const N=t.fixedCalendarLocalizer=(0,l.momentLocalizer)(d.default);N.segmentOffset=0;const j=t.legacyCalendarLocalizer=(0,l.momentLocalizer)(d.default);function E(e){return"string"!=typeof e||/\d[\sT]\d{1,2}:\d{2}/.test(e)}class A extends u.default{getOuterView(){var e,t,i,o;const n="ViewTab";return(0,D.jsxs)("div",{className:"rbc-toolbar-view-nav-small",children:[(0,D.jsx)("div",{onClick:()=>this.view("day"),className:"day"===this.props.view?n+" Selected":n,children:null===(e=v.AppGlobals.AppModel)||void 0===e?void 0:e.MapActionName("Day")}),(0,D.jsx)("div",{onClick:()=>this.view("week"),className:"week"===this.props.view?n+" Selected":n,children:null===(t=v.AppGlobals.AppModel)||void 0===t?void 0:t.MapActionName("Week")}),(0,D.jsx)("div",{onClick:()=>{this.view("month")},className:"month"===this.props.view?n+" Selected":n,children:null===(i=v.AppGlobals.AppModel)||void 0===i?void 0:i.MapActionName("Month")}),(0,D.jsx)("div",{style:(0,S.convertToRtlWhenNecessary)({minWidth:"45%",textAlign:"right",padding:"0 0px 4px 0",marginLeft:"auto"}),children:(0,D.jsx)(m.Button,{className:"Today",onClick:()=>{this.navigate("TODAY")},children:null===(o=v.AppGlobals.AppModel)||void 0===o?void 0:o.MapActionName("Today")})})]})}getIconButton(e){let t="PREV";return"left"!==e&&(t="NEXT"),(0,D.jsx)(f.default,{onClick:()=>this.navigate(t),size:"medium",children:(0,D.jsx)(x.DirectionAwareIcon,{icon:(0,D.jsx)("i",{className:"CalendarLeftRightButton fal fa-angle-"+e})})})}render(){const e=this.getOuterView();return(0,D.jsxs)("div",{children:[e,(0,D.jsxs)("div",{className:"rbc-toolbar",children:[this.getIconButton("left"),(0,D.jsx)("div",{className:"rbc-toolbar-label",children:this.props.label}),this.getIconButton("right")]})]})}}const P="month";class M extends s.default{constructor(e){super(e),this.eventStyle=e=>{const t=this.getEventColorBasedOnCategory(e),i="#ffffff"===t?y.GOOGLE_BLACK:y.GOOGLE_WHITE;return this.selectedCalendarView===P?{style:{background:this.getEventColorBasedOnCategory(e),width:"100%",verticalAlign:(this.props.height||0)<360?"":"middle",height:(this.props.height||0)>450?"15px":"5px",color:(this.props.height||0)>450?i:"transparent",paddingBottom:2}}:{style:{background:t,color:i}}},this.state=Object.assign(Object.assign({},this.state||{}),{canPulldown:!0,allowRowSwipe:!0}),this.defaultEventColor=v.AppGlobals.ViewManager.theme.getThemeColor("actionIcon"),this.backgroundColor=v.AppGlobals.ViewManager.theme.getThemeColor("mainContentBackground"),this.possibleEventColors=["red","orange","yellow","green","cyan","blue","purple","pink","white","black"]}getCalendarEventsRollout(e){var t;const i=this.props.viewDefn;let o,n,a,r,s;if(i?(o=i.StartDateColumn,n=i.EndDateColumn,a=i.StartTimeColumn,r=i.EndTimeColumn,s=i.LabelColumn):(o=this.props.startDateColumn,n=this.props.endDateColumn,a=this.props.startTimeColumn,r=this.props.endTimeColumn,s=this.props.labelColumn),o){const i=null===(t=this.props.tableSchema)||void 0===t?void 0:t.findAttributeByName(s);return e.map(((e,t)=>{let l=e[o],d=l;n&&e[n]&&(d=e[n]);const c=Boolean(r&&"**none**"!==r&&"**auto**"!==r&&n!==r&&null!=e[r]&&""!==String(e[r]).trim()),u=Boolean(a&&"**none**"!==a&&"**auto**"!==a&&a!==o&&null!=e[a]&&""!==String(e[a]).trim());u&&(l=l+" "+e[a]),c&&(d=d+" "+e[r]);const p=g.default.valueFromWireFormat(l,"DateTime");if(!p||isNaN(p.getTime()))return null;let h=g.default.valueFromWireFormat(d,"DateTime")||p;h&&!isNaN(h.getTime())||(h=p);const m=!u&&!E(l),f=!c&&!E(d),y=new Date(p.getFullYear(),p.getMonth(),p.getDate()),v=new Date(h.getFullYear(),h.getMonth(),h.getDate());f&&(m||v.getTime()>y.getTime())&&(h=new Date(h.getFullYear(),h.getMonth(),h.getDate()+1));const b=i&&C.ReactRootUIConfig.isReactRoot()?i.localizeWireValue(e[s]):e[s];return{id:t,row:e,start:p,end:h,title:s?b:void 0}})).filter((e=>null!=e))}return[]}getCalendarEvents(e){if(O.dynamicRollouts.includeByOwnerId("FixCalendarViewEventTruncation"))return this.getCalendarEventsRollout(e);const t=this.props.viewDefn;let i,o,n,a,r;
1if(t?(i=t.StartDateColumn,o=t.EndDateColumn,n=t.StartTimeColumn,a=t.EndTimeColumn,r=t.LabelColumn):(i=this.props.startDateColumn,o=this.props.endDateColumn,n=this.props.startTimeColumn,a=this.props.endTimeColumn,r=this.props.labelColumn),i){return e.map(((e,t)=>{var s;let l=e[i],d=l;o&&(d=e[o]),n&&"**none**"!==n&&"**auto**"!==n&&n!==i&&(l=l+" "+e[n]),a&&"**none**"!==a&&"**auto**"!==a&&o!==a&&(d=d+" "+e[a]);const c=null===(s=this.props.tableSchema)||void 0===s?void 0:s.findAttributeByName(r),u=c&&C.ReactRootUIConfig.isReactRoot()?c.localizeWireValue(e[r]):e[r];return{id:t,row:e,start:new Date(l),end:new Date(d),title:r?u:void 0}}))}return[]}getDefaultView(){let e=this.props.defaultCalendarView||P;return this.props.viewDefn&&(e=this.props.viewDefn.DefaultCalendarView||P),e.toLowerCase()}get selectedCalendarView(){return(C.ReactRootUIConfig.isReactRoot()?this.props.currentView:this.state.currentView)||this.getDefaultView()}get selectedDate(){const e=C.ReactRootUIConfig.isReactRoot()?this.props.date:this.state.date;if(null==e||""===e)return;const t=e instanceof Date?e:new Date(e);return isNaN(t.getTime())?void 0:t}updateNavState(e){C.ReactRootUIConfig.isReactRoot()?this.viewStackKey&&(0,T.default)().dispatch((0,I.mutateView)({ViewState:e,ViewStackKey:this.viewStackKey})):this.setState(e)}toSafeIsoString(e){if(null==e||""===e)return null;const t=e instanceof Date?e:new Date(e);return isNaN(t.getTime())?null:t.toISOString()}handleSelectEvent(e){if(this.selectedCalendarView!==P){const t=this.props.tableSchema.keyAttribute(),i=e.row[t.name()];this.handleRowTap(i,{})}else this.updateNavState({date:this.toSafeIsoString(e.start),currentView:"day"})}handleNavigate(e){this.updateNavState({date:this.toSafeIsoString(e)})}handleViewChange(e){this.updateNavState({currentView:e})}initializeColors(){const e=this.categoryColumn();if(e){const t=this.props.tableSchema.findAttributeByName(e);if(this.colorHash={},this.colorIndex=0,t&&(t.type()===w.COLORENUM_TYPE||t.type()===w.ENUM_TYPE)){t.auxData().EnumValues.forEach((e=>{this.setColorBasedOnValue(t,e)}))}}}categoryColumn(){return this.props.viewDefn?this.props.viewDefn.CategoryColumn:this.props.categoryColumn}setColorBasedOnValue(e,t){let i=t;e.type()!==w.COLORENUM_TYPE&&(i=this.possibleEventColors[this.colorIndex],this.colorIndex++,this.colorIndex=this.colorIndex%this.possibleEventColors.length);const o=v.AppGlobals.AppModel.AppTemplate.Presentation.DisplayTheme;this.colorHash[t]=p.default.getFormattingColorForTheme(o,i.toLowerCase())}getEventColorBasedOnCategory(e){const t=this.categoryColumn();if(t){const i=e.row[t];if(!i)return this.defaultEventColor;if(!this.colorHash[i]){const e=this.props.tableSchema.findAttributeByName(t);e&&this.setColorBasedOnValue(e,i)}return this.colorHash[i]}return this.defaultEventColor}render(){if(!this.shouldShow())return null;const{table:e,tableSchema:t,searchQuery:i,rowLimit:o,filterExpr:n,filterDefaults:a}=this.props;let r=[];if(e&&t){const s=new c.default(this.appModel,t,void 0,void 0,void 0,void 0,{viewStackKey:this.viewStackKey});r=e.queryRowValues({searchQuery:i,limit:o,filterExpr:n,filterDefaults:a,transaction:this.pendingTransaction},this.appModel,s)}return this.renderRows(r)}renderRows(e){var t,i,o;this.dayHash={},this.props.table&&(this.colorHash||this.initializeColors()),R.default.detectIfNeeded();const s=R.default.Locale()||window.navigator.language,d=O.dynamicRollouts.includeByOwnerId("FixCalendarViewEventTruncation")?N:j,c=this.getCalendarEvents(e),u=e=>(0,D.jsxs)("div",{children:[(0,D.jsx)("div",{style:(0,S.convertToRtlWhenNecessary)({fontSize:"1.5em",color:(0,h.themeColor)("secondaryText")}),children:e.localizer.format(e.date,"D")}),(0,D.jsx)("div",{style:(0,S.convertToRtlWhenNecessary)({color:(0,h.themeColor)("secondaryText")}),children:e.label})]});u.propTypes={localizer:r.default.shape({format:r.default.func}),date:r.default.object,label:r.default.string};let p=this.props.height;p||(p=350);const m=a.default.get(v.AppGlobals.AppModel,"AppTemplate.Presentation.DisplayTheme"),f=a.default.isString(m)&&m.includes("-")?(0,h.themeColor)("mainContentBackgroun
1d"):"white";return(0,D.jsx)(b.EmulatorComponentWrapper,{applyStyleType:"topLevelView",dataVFEValues:{root:"calendar",table:null!==(i=null===(t=this.props.table)||void 0===t?void 0:t.name())&&void 0!==i?i:void 0,control:null!==(o=this.props.controlName)&&void 0!==o?o:void 0},children:(0,D.jsxs)("div",{className:v.AppGlobals.AppModel.rolloutClassNames,"data-testid":n.Container,style:(0,S.convertToRtlWhenNecessary)({height:p,backgroundColor:f}),ref:this.props.listContainerRef,children:[(0,D.jsx)(l.Calendar,{components:{toolbar:A,week:{header:u}},formats:{weekdayFormat:(e,t,i)=>i.format(e,"dd",t),dayFormat:(e,t,i)=>i.format(e,"dd",t),timeGutterFormat:(e,t,i)=>0===e.getHours()?"":i.format(e,"h A",t)},showMultiDayTimes:!1,localizer:d,culture:s,scrollToTime:new Date,onSelectEvent:this.handleSelectEvent.bind(this),eventPropGetter:this.eventStyle,events:c,onNavigate:this.handleNavigate.bind(this),onView:e=>this.handleViewChange(e),view:this.selectedCalendarView,date:this.selectedDate,defaultDate:this.selectedDate||new Date}),this.renderFabs(),this.renderActionButtonPortal()]})})}}t.default=M},748741:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(238416)),a=o(i(227361)),r=i(281294),s=i(249492),l=o(i(676970)),d=o(i(386010)),c=o(i(155345)),u=o(i(385857)),p=o(i(571524)),h=o(i(593186)),m=o(i(409022)),f=o(i(702671)),g=i(714611),y=o(i(17926)),v=o(i(526382)),b=i(56749),w=o(i(21870)),S=i(334500),x=i(623834),C=i(166089),T=i(148448),I=i(557310),R=i(303622),O=i(278965),D=i(148521),N=i(667294);function j(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function E(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?j(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):j(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}const A={photo:350,backdrop:350,large:400},P=(0,b.cacheMuiTheme)((()=>{const e={primary:{main:(0,b.themeColor)("headerBackground"),contrastText:(0,b.themeColor)("interfaceText")},secondary:{light:"#ff6600",main:"#ff4400",contrastText:"#fff"}};let t={};return I.ReactRootUIConfig.isReactRoot()||(t=e),{palette:t,overrides:{MuiDrawer:{paper:{background:(0,b.themeColor)("elevationTone3"),"& .MuiPaper-root":{background:(0,b.themeColor)("elevationTone3")}}},MuiPaper:{elevation16:{background:(0,b.themeColor)("elevationTone3")}}},typography:{useNextVariants:!0,fontFamily:"inherit"}}}));class M extends c.default{constructor(e){super(e);const t=e=>{this.scrollContainer&&this.state.currentInteraction!==e.name&&this.setState({currentInteraction:e.name})};let i;const o={name:"PULLING_DOWN",allowPullToSync:!0,allowScroll:!1,handleDragEnd:()=>t(i)};i={name:"IDLE",allowPullToSync:!0,allowScroll:!0,handleDrag:()=>{this.pullRef&&this.pullRef.isPullingDown()&&t(o)}},this.stateMachine={PULLING_DOWN:o,IDLE:i},this.state.currentInteraction=i.name}get currentInteractionState(){return this.stateMachine[this.state.currentInteraction]||this.stateMachine.IDLE}componentDidMount(){super.componentDidMount(),p.default.IsTouchEnabled()&&(this.scrollBlocker=e=>{!this.currentInteractionState.allowScroll&&e.cancelable&&(e.preventDefault(),e.stopPropagation())},document.addEventListener("touchmove",this.scrollBlocker,{passive:!1}))}handleRowTap(e,t,i){this.groupByState.drilldownMode()?this.groupByState.drillDown(e,i,"card"):super.handleRowTap(e,t)}UNSAFE_componentWillMount(){this.groupByState=new f.default(this.props,this.viewStackKey)}componentWillUnmount(){super.componentWillUnmount(),this.scrollBlocker&&document.removeEventListener("touchmove",this.scrollBlocker)}UNSAFE_componentWillReceiveProps(e){this.groupByState.updateProps(e)}drilldownAllSelected(){this.groupByState.drillDownAll("card")}getCardChildrenFromCustomLayout(){return(0,a.default)(this.customLayout,["children","0","children","0","children"],[])}customizeCardLayoutBasedOnContext(){var e,t;const i={},o=(null===(e=this.props)||void 0===e?void 0:e.width)||0,n=null===(t=this.customLayout)||void 0===t?void 0:t.name;if("list"===n&&(o<w.default.widescreenBreakpoint||this.props.isInline)?i.c
1ardHoverBackground={type:"variable",value:"cardHoverBackgroundNarrowscreen"}:(i.cardBorderStyle={type:"variable",value:"cardBorderStyleDefault"},i.cardBorderRadius={type:"variable",value:"cardBorderRadiusDefault"},i.cardOutline={type:"variable",value:"cardOutlineDefault"},i.cardHoverShadow={type:"variable",value:"cardHoverShadowDefault"},i.cardHoverBackground={type:"variable",value:"cardHoverBackgroundDefault"}),"photo"===n){const e=this.getCardChildrenFromCustomLayout(),t=(0,S.isNodeEmpty)({},e[0],this.viewStackKey);i.cardImageBorderRadius={type:"variable",value:t?"cardBorderRadiusDefault":"cardBottomBorderRadiusLarge"}}if("large"===n){const e=this.getCardChildrenFromCustomLayout(),t=(0,S.isNodeEmpty)({},e[0],this.viewStackKey),o=e.slice(2).every((e=>(0,S.isNodeEmpty)({},e,this.viewStackKey)));let n="";t&&o?n="cardBorderRadiusDefault":t?n="cardTopBorderRadiusLarge":o&&(n="cardBottomBorderRadiusLarge"),i.cardImageBorderRadius={type:"variable",value:n}}const a=(0,x.getVariableAssignmentsNode)(i,n);return a.children=[this.customLayout],a}renderItem(e,t){var i;const{annotatedRows:o,groupingColumn:n,nearestHeadings:a,drilldownColumn:r,dataContext:s,isDesktopInlineViewHoriz:l}=e,d=this.props.tableSchema,c=n?this.props.tableSchema.findAttributeByName(n):void 0,u=!!a&&a[t]===t;if(o[t]===this.groupByState.DRILLDOWN_ALL_SYMBOL())return(0,D.jsx)(v.default,{text:this.appModel.MapActionName("All"),onSelect:this.drilldownAllSelected.bind(this),index:t},"special-all"+r);if(c&&u){const e="list"===(null===(i=this.customLayout)||void 0===i?void 0:i.name),n=this.props.width>w.default.widescreenBreakpoint,a="1px solid ".concat((0,b.themeColor)("dividerColor")),r=0===t,s=!n&&e,l={padding:n&&e?0:"auto",paddingTop:n&&r?"16px":"8px"},d={height:r?40:32,padding:r?"20px 16px 0 16px":"4px 16px 0px 16px"},u=Object.assign(Object.assign({background:"transparent",fontSize:18,lineHeight:"24px",borderTop:n||!e||r?"none":a,borderBottom:!n&&e?a:"none"},!I.ReactRootUIConfig.isInDesktopExperience()&&l),I.ReactRootUIConfig.isInDesktopExperience()&&!s&&d),p=o[t],h=p.length&&p[0][c.name()],m="".concat(h,"_gh_").concat(t,"_").concat(this.groupByState.inlinePosition());return(0,N.createElement)(y.default,E(E({},this.props),{},{appModel:this.appModel,rows:p,attribute:c,tableSchema:this.props.tableSchema,groupAggregate:this.props.groupAggregate,selectionMode:this.inSelectionMode(),index:t,key:m,disableAllActions:!1,innerStyle:u,viewType:"card"}))}{const e=o[t],i=this.props.tableSchema.keyAttribute().name(),n=e[i],a="".concat(n,"_").concat(t,"_").concat(this.groupByState.inlinePosition());if(Array.isArray(e)&&h.default.warnToDevConsole("Table View: row passed in is an array! --- 
1should be an object"),r){const i=this.props.tableSchema.findAttributeByName(r);if(i)return(0,N.createElement)(y.default,E(E({},this.props),{},{appModel:this.appModel,rows:[e],disableNavigation:this.props.disableNavigation,attribute:i,tableSchema:d,groupAggregate:this.props.groupAggregate,selectionMode:this.inSelectionMode(),index:t,key:a,onTap:t=>this.handleRowTap(n,t,e),drilldownColumn:r,viewType:"card"}))}const c=this.customizeCardLayoutBasedOnContext();return this.renderCard({rowId:n,dataContext:s,key:a,nodeToRender:c,isDesktopInlineViewHoriz:l})}}renderCard(e){let{rowId:t,dataContext:i,key:o,nodeToRender:n,isDesktopInlineViewHoriz:a}=e;var r;const s=(0,D.jsx)(S.ReactCardLayoutNode,{table:this.props.table.name(),rowId:t,node:n,dataContext:i,onRowTap:this.handleRowTap.bind(this),highlighted:this.props.rowId===t},o);return a?(0,D.jsx)("span",{className:"InlineCardNodeContainer",style:(0,O.convertToRtlWhenNecessary)({width:A[null===(r=this.customLayout)||void 0===r?void 0:r.name]}),children:s},o):s}getPreviousGroupByValue(e){const t=C.AppGlobals.AppState.getPreviousGroupByColumnName();return t&&e.length>0&&this.groupByState.filterExpr()?e[0][t]:null}guessRowHeight(){var e;if(this.groupByState.drilldownMode())return 38;switch(null===(e=this.customLayout)||void 0===e?void 0:e.name){case"list":return 86;case"large":return 560;case"backdrop":return 180;case"image":case"photo":return 240;default:return 100}}getNumberOfColumnsBasedOnBreakPoint(){const e=this.props.width;return e<600?1:e<960?2:e<1280?3:e<1920?4:6}constructTwoDimensionalArrayForGridLayout(e){const t=this.getNumberOfColumnsBasedOnBreakPoint(),i=[];let o=0;return e.forEach(((e,n)=>{const a=Array.isArray(e);if(a||0===o){const e=[n];i.push(e),o=a?0:1}else i[i.length-1].push(n),o=(o+1)%t})),i}render(){var e,t,i,o,n,a,r;if(!this.shouldShow())return null;this.setupCurrentLayout({autoDefaults:!0,autoLayoutOverrides:null,includeGotoDetails:!0});const{tableSchema:c,table:h,searchQuery:f,rowLimit:y,filterExpr:b,groupAggregate:S,isInline:x,sortBy:N,translucentMode:j}=this.props;if(!c||!h)return(0,D.jsx)("div",{});const M=new u.default(this.appModel,c,void 0,void 0,void 0,void 0,{viewStackKey:this.viewStackKey});let k,_,B;if(this.groupByState.drilldownMode())k=this.groupByState.currentDrilldownColumn(),_=this.groupByState.getDrilldownRows(this.pendingTransaction);else{const e={searchQuery:f,sortRules:[],limit:y,filterExpr:b,filterDefaults:this.groupByState.filterDefaults(),transaction:this.pendingTransaction};S&&delete e.limit;const t=this.groupByState.groupBy();t&&t.length&&"_RowNumber"!==t[0].Column&&(e.sortRules.push(t[0]),B=t[0].Column),N&&(e.sortRules=e.sortRules.concat(N)),_=h.queryRowValues(e,this.appModel,M)}const{nearestHeadings:L,annotatedRows:V}=this.groupByState.annotateRows(_,B),F=this.getPreviousGroupByValue(_);let W;if(F&&C.AppGlobals.ViewManager.appHeader.setState({overrideTitle:F}),x){const e=this.groupByState.inlineFilterDisplayValue();null!=e&&(W=(0,D.jsx)(v.default,{text:e,expanded:!0,onSelect:()=>{this.groupByState.drillUp()}},"special-back-"+this.groupByState.inlinePosition()))}const{allowPullToSync:H,handleDrag:U,handleDragEnd:G}=this.currentInteractionState,z=this.props.isInline||I.ReactRootUIConfig.isInMobileExperience(),K=!H,Y=I.ReactRootUIConfig.isInDesktopExperience()&&this.props.isInline&&this.props.sidewaysScroll,q=!(!Y||this.groupByState.drilldownMode()||B||!A[null===(e=this.customLayout)||void 0===e?void 0:e.name]),X=Y&&!q,Q={annotatedRows:V,groupingColumn:B,drilldownColumn:k,nearestHeadings:L,dataContext:M,isDesktopInlineViewHoriz:q},$=this.getVisibleBodyHeight({isExpandedDrilldown:!!W,inDrilldownMode:this.groupByState.drilldownMode(),rowHeight:this.guessRowHeight(),annotatedRows:V,viewType:"card",isDesktopInlineViewHorizScroll:q});let Z;if(this.props.width>w.default.widescreenBreakpoint&&!this.groupByState.drilldownMode()){const e=this.constructTwoDimensionalArrayForGridLayout(V),i="list"===(null===(t=this.customLayout)||void 0===t?void 0:t.name)?2:void 0,o={margin:0,width:"100%",padding:I.ReactRootUIConfig.isInDesktopExperience()?"0 8px":"8px",justifyContent:"flex-start",alignItems:"stretch"},n=this.getNumberOfColumnsBasedOnBreakPoint();Z=(0,D.jsx)(l.default,{length:e.length,threshold:400,useStaticSize:!1,type:"variable",scrollParentGetter:this.reactListScrollParentGetter(),itemSizeEstimator:(t,i)=>Array.isArray(V[e[t][0]])?(0,g.rowHeight)():i[1]||this.guessRowHeight(),useTranslate3d:p.default.Supports3dTransform(),itemRenderer:t=>{const a=Array.isArray(V[e[t][0]]);return(0,D.jsx)(s.Grid,{container:!0,spacing:i,direction:"row",justifyContent:B?"flex-start":"center",style:(0,O.convertToRtlWhenNecessary)(Object.assign(Object.assign({},o),I.ReactRootUIConfig.isInDesktopExperience()&&a&&{paddingLeft:0})),alignItems:"stretch",children:e[t].map((e=>{var t;const i=a?12:12/n,o={xs:i,sm:i,md:i,lg:i,xl:i},r=I.ReactRootUIConfig.isInDesktopExperience()&&a;return(0,D.jsx)(s.Grid,E(E({item:!0},o),{},{classes:{item:r?null===(t=this.props.classes)||void 0===t?void 0:t.gridGroupedRow:""},children:this.renderItem(Q,e)}),"grid-item-"+e)}
1))},"grid-row-"+t)}})}else Z=(0,D.jsx)(l.default,{length:V.length,scrollParentGetter:this.reactListScrollParentGetter(),itemRenderer:e=>this.renderItem(Q,e),threshold:q?600:400,useStaticSize:q,type:q?"uniform":"variable",itemSizeEstimator:(e,t)=>Array.isArray(V[e])?(0,g.rowHeight)():t[1]||this.guessRowHeight(),useTranslate3d:p.default.Supports3dTransform(),axis:q?"x":"y"});const J=0===V.length?this.appModel.MapActionName("No items"):null,ee={height:$,maxHeight:I.ReactRootUIConfig.isInDesktopExperience()&&this.isOverflowYInline(V.length)?$:"none"},te=(null===(i=this.topStackUIState)||void 0===i?void 0:i.DashboardUIState)&&x;return(0,D.jsx)(R.EmulatorComponentWrapper,{applyStyleType:te?"dashboardContent":"topLevelView",dataVFEValues:{root:"card",table:null!==(n=null===(o=this.props.table)||void 0===o?void 0:o.name())&&void 0!==n?n:void 0,control:null!==(a=this.props.controlName)&&void 0!==a?a:void 0},isInteractive:!this.shouldDisableEmulatorComponentWrapper(),children:(0,D.jsxs)(s.MuiThemeProvider,{theme:P(),children:[J?(0,D.jsx)(T.EmptyView,{message:J,width:this.props.width,height:this.props.height}):(0,D.jsx)("div",{className:(0,d.default)("BasePrimaryView CardView",{"CardView--fixed-height-mode":this.fixedHeightMode(),"CardView--translucent-mode":j||q}),ref:null!==(r=this.props.listContainerRef)&&void 0!==r?r:this.onScrollContainerMount,onTouchMove:U,onTouchEnd:G,onTouchCancel:G,style:(0,O.convertToRtlWhenNecessary)({draggable:!0,width:this.props.width,height:this.props.height}),children:(0,D.jsxs)(D.Fragment,{children:[W,(0,D.jsx)(m.default,{innerRef:e=>this.pullRef=e,disabled:z,paused:K,getScrollContainer:this.getScrollContainer,appModel:this.appModel,children:(0,D.jsx)("div",{style:(0,O.convertToRtlWhenNecessary)({display:X?"block":"inline-block",minWidth:"100%",maxWidth:"100%",paddingTop:W?(0,g.rowHeight)():0}),"data-testid":"card-view-container",children:(0,D.jsx)("div",{className:(0,d.default)("CardView__list",{InlineShowAllVert:X,InlineShowAllHoriz:q}),style:(0,O.convertToRtlWhenNecessary)(ee),children:Z})})})]})}),this.renderFabs(),this.renderActionButtonPortal()]})})}}const k=(0,s.withStyles)((()=>({gridGroupedRow:{padding:"0 !important"}})))((0,r.observer)(M));t.default=k},182788:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ChartViewDataTestIds=void 0;var n=o(i(238416)),a=o(i(386010)),r=o(i(496486)),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=B(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}(i(667294)),l=o(i(528482)),d=o(i(864122)),c=o(i(386036)),u=o(i(593186)),p=o(i(21870)),h=o(i(498967)),m=o(i(266522)),f=o(i(454852)),g=i(150198),y=i(888861),v=o(i(112963)),b=o(i(155345)),w=i(656912),S=i(408077),x=i(957831),C=i(552179),T=i(578400),I=i(211305),R=i(56749),O=i(218546),D=i(318926),N=i(351101),j=i(664583),E=i(851982),A=i(303622),P=i(700482),M=i(278965),k=i(302873),_=i(148521);function B(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(B=function(e){return e?i:t})(e)}function L(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function V(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?L(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):L(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var F=function(e,t,i,o){return new(i||(i=Promise))((function(n,a){function r(e){try{l(o.next(e))}catch(e){a(e)}}function s(e){try{l(o.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,s)}l((o=o.apply(e,t||[])).next())}))};const W=s.default.lazy((()=>Promise.all([i.e("vendors-node_modules_echarts_index_js"),i.e("vendors-node_modules_echarts-for-react_esm_index_js")]).then(i.bind(i,601958))));var H;!function(e){e.Container="chart-view-container"}(H||(t.ChartViewDataTestIds=H={}));const U="[blank]";const G=r.default.once((function(){return F(this,void 0,void 0,(function*(){(yield i.e("vendors-node_modules_echarts_index_js").then(i.bind(i,62504))).registerTheme("dark",(()=>{const e="#eee",t=()=>
1({axisLine:{lineStyle:{color:e}},axisTick:{lineStyle:{color:e}},axisLabel:{textStyle:{color:e}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:e}}}),i=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],o={color:i,backgroundColor:(0,R.themeColor)("mainContentBackground"),tooltip:{axisPointer:{lineStyle:{color:e},crossStyle:{color:e},label:{color:"#000"}}},legend:{textStyle:{color:e},pageTextStyle:{color:e}},title:{textStyle:{color:e}},toolbox:{iconStyle:{normal:{borderColor:e}}},dataZoom:{dataBackgroundColor:"#eee",fillerColor:"rgba(200,200,200,0.2)",handleColor:"#dd6b66"},timeline:{itemStyle:{color:i[1]},lineStyle:{color:e},controlStyle:{color:e,borderColor:e},label:{color:e}},timeAxis:t(),logAxis:t(),valueAxis:t(),categoryAxis:t(),line:{symbol:"circle"},graph:{color:i},gauge:{axisLine:{lineStyle:{color:[[.2,"#dd6b66"],[.8,"#759aa0"],[1,"#ea7e53"]],width:8}}},candlestick:{itemStyle:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}};return o.categoryAxis.splitLine.show=!1,o})())}))}));class z extends b.default{constructor(e){var t;super(e),this.showHeader=()=>this.props.table&&(this.props.includeActionButtons||this.props.viewDefn),this.hideHeader=()=>!this.showHeader(),this.getShowDataAction=e=>r.default.find(e||(0,k.getTableScopeActions)({tableName:this.props.table.name()}),(e=>0===e.name().indexOf("Chart Data for")&&e.isAutoCreated())),this.shouldShowDataAction=e=>!e||e.prominence()!==f.default.DO_NOT_DISPLAY,this.runAction=e=>{var t;(0,j.runAppAction)(e,{appModel:(0,N.getAppModel)(),table:this.props.table,sourceLocationName:null===(t=this.getView())||void 0===t?void 0:t.name(),filterExpr:this.props.filterExpr,defaultValues:this.props.filterDefaults,rowId:this.rowId},void 0,this.viewStackKey)},this.checkIfUsingNewChartExperience=()=>{var e,t,i;return(null===(e=this.appModel)||void 0===e?void 0:e.inRollout("NewChartsRollout"))&&(null===(i=null===(t=this.getView())||void 0===t?void 0:t.definition())||void 0===i?void 0:i.UseNewChartExperience)},this.getShowDataButton=e=>{var t;const i=e?()=>this.runAction(e):this.showData.bind(this);return this.checkIfUsingNewChartExperience()?(null===(t=this.getView())||void 0===t?void 0:t.definition().ChartConfig.HideDataButton)?null:(0,_.jsx)(l.default,{size:"small",color:"primary",onClick:i,startIcon:(0,_.jsx)(d.default,{}),children:this.appModel.MapActionName("Data")}):(0,_.jsx)(v.default,{className:"ChartView__button",onTap:i,children:this.appModel.MapActionName("Data")})},this.getGraphAttributes=e=>{let{tableSchema:t,chartColumns:i,groupBy:o}=e;return o&&o.length?t.findAttributesByNames(o):i&&i.length?t.findAttributesByNames(i):[]},this.mapRange=(e,t,i)=>{if(t[0]===t[1])return i[0];const o=i[0]+(e-t[0])*(i[1]-i[0])/(t[1]-t[0]);return Math.max(Math.min(o,i[1]),i[0])},this.echartsTooltipPositioner=(e,t,i,o,n)=>{const a={left:e[0]+10,top:e[1]-i.clientHeight-10};return a.left+i.clientWidth>n.viewSize[0]&&(a.left=Math.max(10,n.viewSize[0]-i.clientWidth-10)),a.top=Math.max(10,a.top),a},this.echartsLabelFormatter=e=>((e="".concat(e||"")).length>20&&(e=e.slice(0,17)+"..."),e),this.getEchartsColor=e=>{const t=this.colorCodes();if(t&&t.length>0){const e=this.themeColorCodes().filter((e=>!t.includes(e)));return t.concat(e)}if(e.length>0&&P.COLORENUM_TYPE===e[0].type()){const t=e[0].auxData().EnumValues,i=this.themeColorCodes().filter((e=>!t.includes(e)));return t.concat(i)}return["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"]},this.getEchartsOption=(e,t)=>{var i;const o=this.getViewDefn();if(!o)return{};const{groupAggregate:n,chartType:a,labelType:s,trendLine:l}=o,{tableSchema:d}=this.props;if(!d)return{};if(this.checkIfUsingNewChartExperience()){const t=null===(i=this.getView())||void 0===i?void 0:i.definition().ChartConfig;if(t){const i=d.findAttributesByNames(["**all other columns**"],{includeHidden:!0});return(0,T.createChartOption)((0,C.convertSavedConfig)(t,i),e,(0,I.transformColumnsToDataset)(i,e,this.dataContext()),this.props.width)}}const c=a!==w.ChartOption.Scatter&&o.showLegend,u=c&&[w.ChartOption.Row,w.ChartOption.RowStacked,w.ChartOption.RowLine,w.ChartOption.AggregatePieChart,w.ChartOption.AggregateDonutChart,w.ChartOption.PieChart,w.ChartOption.DonutChart].includes(a),p=d.keyAttribute(),h=d.labelBasicAttribute()||p,m=this.getGraphAttributes(o),f={color:this.getEchartsColor
1(m),tooltip:{position:this.echartsTooltipPositioner,transitionDuration:0},title:[{text:"",show:u,top:0,left:"left",textStyle:{fontWeight:"normal",fontSize:14}}],grid:{containLabel:!0,top:c?u?75:55:30,bottom:t?80:10,left:35,right:35},legend:{show:c,type:"scroll",orient:"horizontal",top:u?20:0,left:10,right:10},animation:!window.APPSHEET_TEST_CONTEXT},g=this.chartHeight()-f.grid.top-f.grid.bottom-85,y=Math.min(5,Math.max(1,Math.round(g/12)));switch(a){case w.ChartOption.Col:case w.ChartOption.ColStacked:case w.ChartOption.ColLine:{const t=m.filter((e=>e.isNumericType())),i=this.colSeriesGraphData(e,d,t,!1).data,o=0===i.length?[]:i[0].values.map((e=>e.label)),n=h.displayName(this.dataContext());r.default.merge(f,{xAxis:{name:n,nameRotate:90,nameTextStyle:{fontSize:10},type:"category",data:o,axisLabel:{rotate:45,formatter:this.echartsLabelFormatter,fontSize:10}},yAxis:{type:"value",splitNumber:y,axisLabel:{fontSize:10},nameTextStyle:{fontSize:10},min:a===w.ChartOption.ColLine?e=>{let{min:t}=e;return r.default.isFinite(t)?t:void 0}:void 0,max:a===w.ChartOption.ColLine?e=>{let{max:t}=e;return r.default.isFinite(t)?t:void 0}:void 0},series:i.map((e=>({name:e.key,data:e.values,type:a===w.ChartOption.ColLine?"line":"bar",stack:a===w.ChartOption.ColStacked?"stack":void 0}))),tooltip:{trigger:"axis"}});break}case w.ChartOption.Row:case w.ChartOption.RowStacked:case w.ChartOption.RowLine:{const t=m.filter((e=>e.isNumericType())),i=this.rowSeriesGraphData(e,d,t,!1),o=h.displayName(this.dataContext()),n=0===i.length?[]:i[0].values.map((e=>e.label));r.default.merge(f,{title:[{text:o}],yAxis:{type:"value",splitNumber:y,axisLabel:{fontSize:10},nameTextStyle:{fontSize:10},min:a===w.ChartOption.RowLine?e=>{let{min:t}=e;return r.default.isFinite(t)?t:void 0}:void 0,max:a===w.ChartOption.RowLine?e=>{let{max:t}=e;return r.default.isFinite(t)?t:void 0}:void 0},xAxis:{nameRotate:90,nameTextStyle:{fontSize:10},type:"category",data:n,axisLabel:{rotate:45,formatter:this.echartsLabelFormatter,fontSize:10}},series:i.map((e=>({name:e.key,data:e.values,type:a===w.ChartOption.RowLine?"line":"bar",stack:a===w.ChartOption.RowStacked?"stack":void 0})))});break}case w.ChartOption.Scatter:{const t=this.scatterData(e,d,m).data[0].values;t.forEach((e=>{e.value=[e.x,e.y,e.size]}));const i=t.map((e=>e.size)),o=[Math.min(...i),Math.max(...i)],n=[5,25];r.default.merge(f,{xAxis:{name:m.length>0?m[0].displayName(this.dataContext()):"",type:"value",nameRotate:90,nameTextStyle:{fontSize:10},axisLabel:{rotate:45,fontSize:10}},yAxis:{name:m.length>1?m[1].displayName(this.dataContext()):"",splitNumber:y,nameTextStyle:{fontSize:10},type:"value",axisLabel:{fontSize:10}},tooltip:{axisPointer:{type:"cross"},formatter:e=>{let{value:t}=e;return t.length>=m.length?m.map(((e,i)=>"".concat(e.displayName(this.dataContext()),": ").concat(t[i]))).join("<br/>"):""}},series:[{dimensions:m.map((e=>e.displayName(this.dataContext()))),type:"scatter",symbolSize:e=>this.mapRange(e[2],o,n),data:t}]});break}case w.ChartOption.Histogram:case w.ChartOption.HorizontalHistogram:{const t=m.length>0?this.aggrGraphData(e,d,m[0],n).data[0].values:[];a===w.ChartOption.HorizontalHistogram&&t.reverse();const i={name:m.length>0?m[0].displayName(this.dataContext()):"",nameTextStyle:{fontSize:10},type:"category",data:t.map((e=>e.label)),axisLabel:{formatter:this.echartsLabelFormatter}},o=d.findAttributeByName(null==n?void 0:n.column),s=o?n.func+" "+o.displayName(this.dataContext()):"Count",l={name:c?void 0:s,nameTextStyle:{fontSize:10},type:"value"};a===w.ChartOption.Histogram?r.default.merge(f,{xAxis:i,yAxis:l}):r.default.merge(f,{xAxis:l,yAxis:i}),r.default.merge(f,{xAxis:{nameRotate:90,axisLabel:{rotate:45,fontSize:10}},yAxis:{splitNumber:y,axisLabel:{fontSize:10}},series:[{type:"bar",name:s,data:t}]});break}case w.ChartOption.AggregatePieChart:case w.ChartOption.AggregateDonutChart:case w.ChartOption.PieChart:case w.ChartOption.DonutChart:{const t=[w.ChartOption.AggregatePieChart,w.ChartOption.AggregateDonutChart].includes(a),i=[w.ChartOption.AggregateDonutChart,w.ChartOption.DonutChart].includes(a);let o;o=t?m.length>0?m[0].displayName(this.dataContext()):"":h?h.displayName(this.dataContext()):"";let l=[];
1if(m.length>0)if(t)l=this.aggrGraphData(e,d,m[0],n).data[0].values;else{const t=m.filter((e=>e.isNumericType()));l=this.colSeriesGraphData(e,d,t,!1).data[0].values}l.forEach((e=>{e.name=e.label})),r.default.merge(f,{title:[{text:o}],series:[{type:"pie",data:l,radius:[i?"50%":"0%","100%"],top:f.grid.top,bottom:f.grid.bottom,left:10,right:10,minShowLabelAngle:5,label:{show:"None"!==s,position:"inside",formatter:e=>{let{name:t,value:i,percent:o}=e;switch(s){case"Key":return t;case"Value":return i;default:return"".concat(Math.round(o),"%")}}}}]});break}}if(a===w.ChartOption.Col&&h.isNumericType()){const t=e.map((e=>this.normalizeValue(e[h.name()],h))),i=(0,S.getContinuousDomain)(t);if(i){const e=f.series[0].data.map((e=>e.value)),o=this.getTrendLine({attribute:m[0],trendLine:l,labels:t,values:e,domain:i});o&&f.series.push({name:"Trend Line",type:"line",data:o.values})}}else if([w.ChartOption.Histogram,w.ChartOption.HorizontalHistogram].includes(a)&&m[0]){let e;if(m[0].isNumericType()){const t=f.series[0].data.map((e=>this.normalizeValue(e.label,m[0])));"number"==typeof t[0]&&(e=t)}const t=e?(0,S.getContinuousDomain)(e):null;if(t){const i=f.series[0].data.map((e=>e.value)),o=this.getTrendLine({attribute:m[0],trendLine:l,labels:e,values:i,domain:t});o&&f.series.push({name:"Trend Line",type:"line",data:o.values})}}return f},this.cycleSelectedKeys=e=>{const{oldKeys:t,lastKey:i}=this.state;if(e.length===(null==t?void 0:t.size)&&e.every((e=>t.has(e)))){const t=(i+1)%e.length;return this.setState({lastKey:t}),e[t]}return this.setState({oldKeys:new Set(e),lastKey:0}),e[0]},this.handleEchartsClick=e=>{var t;if("Trend Line"===e.seriesName)return;if(this.checkIfUsingNewChartExperience()){if(null===(t=this.getView())||void 0===t?void 0:t.definition().ChartConfig.DisableClickThrough)return;const i=this.cycleSelectedKeys(e.data.rowKeys);return void this.handleColSeriesChartClick(null,null,i,null,this.props)}const i=this.getViewDefn();switch(i.chartType){case w.ChartOption.Row:case w.ChartOption.RowStacked:case w.ChartOption.RowLine:case w.ChartOption.Col:case w.ChartOption.ColStacked:case w.ChartOption.ColLine:case w.ChartOption.PieChart:case w.ChartOption.DonutChart:case w.ChartOption.Scatter:this.handleColSeriesChartClick(null,null,e.data.rowId,null,this.props);break;case w.ChartOption.Histogram:case w.ChartOption.HorizontalHistogram:case w.ChartOption.AggregatePieChart:case w.ChartOption.AggregateDonutChart:this.handleHistogramClick(this.getGraphAttributes(i),e.data.originalValue,null,this.props)}},this.getEchartsTheme=()=>this.appModel.AppTemplate.Presentation.DisplayTheme.toLowerCase().startsWith("dark")?"dark":"light",this.echart=null,this.observer=new ResizeObserver((()=>{null!=this.echart&&this.echart.resize()})),this.containerRef=null!==(t=this.props.listContainerRef)&&void 0!==t?t:s.default.createRef()}componentDidMount(){var e;(null===(e=this.containerRef)||void 0===e?void 0:e.current)&&this.observer.observe(this.containerRef.current)}componentWillUnmount(){this.observer.disconnect()}colorCodes(){return(this.getViewDefn().colorCodes||[]).map((e=>{if(m.default.isDynamicFormattingColor(e)){const t=this.appModel.AppTemplate.Presentation.DisplayTheme;return m.default.getFormattingColorForTheme(t,e)}return e}))}themeColorCodes(){const e=m.default.dynamicFormattingColors(),t=this.appModel.AppTemplate.Presentation.DisplayTheme;return e.map((e=>m.default.getFormattingColorForTheme(t,e)))}getTrendLine(e){let{attribute:t,trendLine:i,labels:o,values:n,domain:a}=e,r=t.auxData().DecimalDigits;("number"!=typeof r||isNaN(r))&&(r=2);let s=null;if("Linear"===i?s=c.default.linearRegression(o,n,r):"Exponential"===i?s=c.default.exponentialRegression(o,n,r):"Logarithmic"===i?s=c.default.logarithmicRegression(o,n,r):"Power"===i?s=c.default.powerRegression(o,n,r):"Polynomial"===i&&(s=c.default.polynomialRegression(o,n,r)),s){return{values:a.map((e=>({label:c.default.round(e,r),value:s(e)}))),bar:!1,key:"Trend Line",color:"#2ca02c"}}return null}sortChartData(e,t){const i="Date"===t.model.Type||"DateTime"===t.model.Type,o=t.valueComparer(g.ValueFormat.Wire);for(let t=0;t<e.length;t++)h.default.sort(e[t].values,(function(e,t){const n=i?e.originalValue:e.label,a=i?t.originalValue:t.label;return o(n,a)}))}computeAggregateValue(e,t){return t&&t.column?this.props.tableSchema.computeAggregate({aggregationFunction:t.func,targetColumnName:t.column,rows:e,tableName:this.props.table.name(),appModel:this.appModel}):e.length}aggrGraphData(e,t,i,o){const n=(0,N.getAppModel)(),a=[],r={key:i.displayName(this.dataContext())+" "+(o?o.func:"Count"),values:[]},s={};let l,d;if(a.push(r),i.type()===P.TABLEREF_TYPE){const{table:e,tableSchema:t}=n.findTableCollection(i.referencedTableName());e&&t&&(l=e,d=t.labelBasicAttribute())}const c=e=>{let t;l&&e[i.name()]?(t=l.labelTextForId(e[i.name()]),t=t?this.normalizeValue(t,d):this.normalizeValue(e[i.name()],i)):t=this.normalizeValue(e[i.name()],i);const o=s[t&&t.toLowerCase?t.toLowerCase():t];if(o)o.rows.push(e);else{let o=t.toString();i.isBooleanType()&&t!==U&&(o=i.localizeWireValue(t,{dataContext:this.dataContext}));const n={label:o,rows:[e],originalValue:e[i.name()]};r.values.push(n),s[t&&t.toLowerCase?t.toLowerCase():t]=n}};if(P.ENUM_TYPE===i.type()||P.COLORENUM_TYPE===i.type()||P.PROGRESSENUM_TYPE===i.type()){const e=i.auxData().EnumValues;if(e)for(let t=0;t<e.length;t++){const i={label:e[t],rows:[],originalValue:e[t]};r.values.push(i);const o=e[t];s[o&&o.toLowerCase?o.toLowerCase():o]=i}}if(null!=e)for(let t=0;t<e.length;t++)c(e[t]);let u=0,p=0;const h=(null==o?void 0:o.column)?null==t?void 0:t.findAttributeByName(o.column):null;for(const e in s){let t=this.computeAggregateValue(s[e].rows,o);(null==h?void 0:h.isDecimalType())&&"COUNT"!==o.func&&(t=this.normalizeValue(t,h)),isNaN(t)&&(t=0),s[e].value=t,s[e].rows=null,u=t<u?t:u,p=t>p?t:p}return this.sortChartData(a,i),{data:a,min:u,max:p}}normalizeValue(e,t){var i;let o="number"==typeof e?e:t.valueFromWireFormat(e);if(null!=o&&""!==o&&!isNaN(o)&&(P.PERCENT_TYPE===t.basestType()&&(o*=100),t.isDecimalType())){const e=null!==(i=t.basestAttribute().decimalDigits())&&void 0!==i?i:2;o=r.default.round(o,e)}if(null!=o&&""!==o||(o=t.isNumericType()?0:U),o instanceof Date)switch(t.basestType()){case P.DATE_TYPE:case P.DATETIME_TYPE:case P.CHANGETIMESTAMP_TYPE:case P.TIME_TYPE:return t.basestAttribute().localizeWireValue(e)}return o}colSeriesGraphData(e,t,i,o){const n=t.keyAttribute(),a=t.labelBasicAttribute()||n,r=[];let s=null,l=null;
1return i.forEach((t=>{const i={key:t.displayName(this.dataContext()),values:[]};null!=e&&e.forEach(((e,r)=>{const d=this.normalizeValue(e[t.name()],t);i.values.push({label:o?r:this.normalizeValue(e[a.name()],a),value:d,originalValue:e[a.name()],rowId:e[n.name()]}),isNaN(d)||((!s||d<s)&&(s=d),(!l||d>l)&&(l=d))})),r.push(i)})),{data:r,min:s,max:l}}rowSeriesGraphData(e,t,i,o){const n=t.keyAttribute(),a=t.labelBasicAttribute()||n,r=[],s=e=>{const t={key:this.normalizeValue(e[a.name()],a),values:[]},s=e[n.name()];for(let n=0;n<i.length;n++){const a=i[n];t.values.push({label:o?n:a.displayName(this.dataContext()),value:this.normalizeValue(e[a.name()],a),originalValue:e[a.name()],rowId:s})}r.push(t)};if(null!=e)for(let t=0;t<e.length;t++)s(e[t]);return r}scatterData(e,t,i){const o=[];let n=null,a=null,r=null,s=null;const l={key:"",values:[]};o.push(l);const d=i.length>0?i[0]:null,c=i.length>1?i[1]:null,u=i.length>2?i[2]:null,p=t.keyAttribute(),h=e=>{const t=this.normalizeValue(e[d.name()],d),i=this.normalizeValue(e[c.name()],c),o=u?this.normalizeValue(e[u.name()],u):1;isNaN(t)||((!n||t<n)&&(n=t),(!a||t>a)&&(a=t)),isNaN(i)||((!r||i<r)&&(r=i),(!s||i>s)&&(s=i)),l.values.push({x:t,y:i,size:o,shape:"circle",rowId:e[p.name()]})};if(null!=e&&i.length>=2)for(let t=0;t<e.length;t++)h(e[t]);
1return{data:o,minX:n?n-1:0,maxX:a?a+1:0,minY:r?r-1:0,maxY:s?s+1:0}}handleHistogramClick(e,t,i){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.props;u.default.AddTraceContext("chartView.handleHistogramClick");let n,a,r=t;P.PERCENT_TYPE===e[0].type()&&(r/=100),null!=o.filterExpr?(n=(0,y.createColFilter)(r,o.tableSchema,e[0]),n=(0,y.createAnd)(n,o.filterExpr)):(a=o.filterDefaults||[],e.length&&(a=[...a,{ColumnName:e[0].name(),ColumnValue:r}]));const s=o.table.name(),l=this.getViewDefn();if(e.length>1){const i=!0;this.pushView({viewType:"graph",useAnyRefs:!1,newState:{TableName:s,FilterExpr:n,DefaultValues:a,GroupBy:e.slice(1).map((function(e){return e.name()})),groupAggregate:l.groupAggregate,ChartColumns:l.chartColumns,ColorCodes:this.colorCodes(),ChartType:l.chartType,TrendLine:l.trendLine,ShowLegend:l.showLegend,SortBy:l.sortBy,LabelType:l.labelType,GraphTitle:t,ControlName:o.controlName},retainSearch:i})}else{const e=this.getRefView(s);if(e){const t=!1;this.pushView({viewType:e.Action,useAnyRefs:!1,newState:{TableName:s,RowKey:null,FilterExpr:n,DefaultValues:a},retainSearch:t,viewControl:e})}else{const e=!0;this.pushView({viewType:"fastTable",useAnyRefs:!1,newState:{TableName:s,RowKey:null,FilterExpr:n,DefaultValues:a},retainSearch:e})}}}handleColSeriesChartClick(e,t,i,o,n){if(u.default.AddTraceContext("chartView.handleColSeriesChartClick"),n.onRowOpened)n.onRowOpened(n.table.name(),i);else{const e=!0;this.pushView({viewType:"detail",useAnyRefs:!1,newState:{TableName:n.table.name(),RowKey:i,FilterExpr:n.filterExpr,DefaultValues:n.filterDefaults},retainSearch:e})}}getViewDefn(){if(!this.props.viewDefn||this.checkIfUsingNewChartExperience())return this.props;{const e=this.props.viewDefn;return{chartType:e.ChartType,chartColumns:e.ChartColumns,trendLine:e.TrendLine,showLegend:e.ShowLegend,labelType:e.LabelType,graphTitle:e.GraphTitle,colorCodes:e.ChartColors,groupAggregate:e.GroupAggregate,groupBy:e.GroupBy,sortBy:e.SortBy}}}getActions(){const e=this.props.disableAllActions?[]:(0,k.getTableScopeActions)({tableName:this.props.table.name()});return{overlayActions:e.filter((e=>e.prominence()===f.default.DISPLAY_OVERLAY)),prominentActions:e.filter((e=>e.prominence()===f.default.DISPLAY_PROMINENTLY)),hasActionsV2:!!this.getShowDataAction(e)}}componentDidUpdate(e,t){if(super.componentDidUpdate(e,t),this.showHeader()){const e=this.getActions(),t=this.currentUIState;(0,x.getAppState)()&&t.GraphUIState&&t.ControlName===this.props.controlName&&e.hasActionsV2?p.default.headerActionButtons=e.prominentActions:p.default.headerActionButtons=[]}}height(){return this.props.height||300}headerHeight(){return this.props.includeActionButtons||this.props.viewDefn?50:0}chartHeight(){return this.height()-this.headerHeight()}getRefView(e){const t=["deck","table","fastTable"],i=(0,N.getAppModel)().FindControlsForTable(e,t,!1);if(!(null==i?void 0:i.length))return null;return r.default.sortBy(i,(e=>{const i=t.indexOf(e.Action);return"ref"===e.Position?i:i+10}))[0]}showData(){if(u.default.AddTraceContext(".ShowDataButton"),D.logger.logAppEvent({eventName:O.AppEventName.ShowDataButton}),null==this.props.table)return;const e=this.props.table.name(),t=this.props.filterExpr,i=this.props.filterDefaults,o=this.getRefView(e);if(o){const n=!1;this.pushView({viewType:o.Action,useAnyRefs:!1,newState:{TableName:e,RowKey:null,FilterExpr:t,DefaultValues:i},retainSearch:n,viewControl:o})}else{const o=!0;this.pushView({viewType:"fastTable",useAnyRefs:!1,newState:{TableName:e,RowKey:null,FilterExpr:t,DefaultValues:i},retainSearch:o})}}renderHeader(){var e,t;if(this.hideHeader())return null;const i=this.checkIfUsingNewChartExperience()&&(null===(e=this.getView())||void 0===e?void 0:e.definition().ChartConfig.HideTitle)?"":null===(t=this.getView())||void 0===t?void 0:t.displayName(this.appModel,void 0,void 0,{viewStackKey:this.viewStackKey}),o=this.getShowDataAction();return(0,_.jsxs)("div",{className:"ChartView__header",style:(0,M.convertToRtlWhenNecessary)({height:this.headerHeight()}),children:[(0,_.jsx)("p",{className:"title",children:i}
1),this.shouldShowDataAction(o)&&this.getShowDataButton(o)]})}render(){var e;return this.shouldShow()?this.renderRows((null===(e=this.props.table)||void 0===e?void 0:e.queryRowValues({sortRules:this.props.sortBy,filterExpr:this.props.filterExpr,filterDefaults:this.props.filterDefaults,transaction:this.pendingTransaction}))||[]):null}renderRows(e){var t,i,o;const n={height:this.height(),width:this.props.width},r={height:this.chartHeight()},s=(0,a.default)("BasePrimaryView ChartView",{"ChartView--translucent-mode":this.props.translucentMode,"ChartView--sm":this.props.width<480,"ChartView--md":this.props.width>=480&&this.props.width<768,"ChartView--lg":this.props.width>=768}),l=this.renderFabs();return(0,_.jsx)(A.EmulatorComponentWrapper,{applyStyleType:"topLevelView",dataVFEValues:{root:"chart",table:null!==(i=null===(t=this.props.table)||void 0===t?void 0:t.name())&&void 0!==i?i:void 0,control:null!==(o=this.props.controlName)&&void 0!==o?o:void 0},children:(0,_.jsxs)("div",{className:s,style:(0,M.convertToRtlWhenNecessary)(n),"data-testid":H.Container,ref:this.containerRef,children:[this.renderHeader(),(0,_.jsx)(W,{onChartReady:e=>{this.echart=e},option:this.getEchartsOption(e,!!this.fabActions.length),notMerge:!0,style:(0,M.convertToRtlWhenNecessary)(r),onEvents:{click:this.handleEchartsClick},theme:this.getEchartsTheme()}),l,this.renderActionButtonPortal()]})})}}t.default=function(e){return(0,s.useEffect)((()=>{G()}),[]),(0,_.jsx)(s.Suspense,{fallback:(0,_.jsx)(E.LoadingSpinner,{}),children:(0,_.jsx)(z,V({},e))})}},330702:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.DeckViewDataTestids=void 0;var n,a=o(i(238416)),r=E(i(155345)),s=o(i(676970)),l=o(i(386010)),d=i(894440),c=o(i(385857)),u=E(i(146913)),p=o(i(571524)),h=o(i(593186)),m=o(i(409022)),f=o(i(702671)),g=i(714611),y=o(i(17926)),v=o(i(526382)),b=i(281294),w=i(56749),S=i(148448),x=i(557310),C=i(318926),T=i(218546),I=i(365914),R=i(303622),O=i(278965),D=i(148521),N=i(667294);function j(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(j=function(e){return e?i:t})(e)}function E(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=j(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}function A(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function P(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?A(Object(i),!0).forEach((function(t){(0,a.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):A(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}!function(e){e.Container="deck-view-container"}(n||(t.DeckViewDataTestids=n={}));class M extends r.default{constructor(e){super(e);const t=e=>{this.state.currentInteraction!==e.name&&this.setState({currentInteraction:e.name})},i=this.handleRowTap.bind(this),o=this.handleRowLongPress.bind(this),n=this.handleRowSwiped.bind(this,u.ROW_SWIPED_LEFT),a=this.handleRowSwiped.bind(this,u.ROW_SWIPED_RIGHT);let r;const s={name:"PULLING_DOWN",allowPullToSync:!0,allowSwipe:!1,allowScroll:!1,handleDragEnd:()=>t(r)},l={name:"SWIPING",allowPullToSync:!1,allowSwipe:!0,allowScroll:!1,handleRowSwipedLeft:n,handleRowSwipedRight:a,handleChildDragEnd:()=>t(r)};r={name:"IDLE",allowPullToSync:!0,allowSwipe:!0,allowScroll:!0,handleRowTap:i,handleRowLongPress:o,handleChildDrag:()=>t(l),handleDrag:()=>{this.pullRef&&this.pullRef.isPullingDown()&&t(s)}},this.stateMachine={PULLING_DOWN:s,SWIPING:l,IDLE:r},this.state.currentInteraction=r.name,this.drilldownAllSelected=this.drilldownAllSelected.bind(this)}get currentInteractionState(){return this.stateMachine[this.state.currentInteraction]||this.stateMachine.IDLE}componentDidMount(){super.componentDidMount(),p.default.IsTouchEnabled()&&(this.scrollBlocker=e=>{!this.currentInteractionState.allowScroll&&e.cancelable&&(e.preventDefault(),e.stopPropagation())},document.addEventListener("touchmove",this.scrollBlocker,{passive:!1}))}handleRowTap(e,t,i){this.groupByState.drilldownMode()?this.groupByState.drillDown(e,i,"deck"):super.handleRowTap(e,t)}UNSAFE_componentWillMount(){this.groupByState=new f.default(this.props,this.viewStackKey)}componentWillUnmount(){super.componentWillUnmount(),this.scrollBlocker&&document.removeEventListener("touchmove",this.scrollBlocker)}UNSAFE_componentWillReceiveProps(e){this.groupByState.updateProps(e)}drilldownAllSelected(){this.groupByState.drillDownAll("deck")}renderItem(e,t,i,o,n,a,r,s,l){var c;const[u,p]=n,m=t.tableSchema,{handleChildDrag:f,handleChildDragEnd:g,handleRowSwipedLeft:b,handleRowSwipedRight:S,handleRowTap:x,handleRowLongPress:C}=this.currentInteractionState,T=a?m.findAttributeByName(a):void 0,I=!!s&&s[l]===l;
1if(e[l]===this.groupByState.DRILLDOWN_ALL_SYMBOL())return(0,D.jsx)(v.default,{text:this.appModel.MapActionName("All"),onSelect:this.drilldownAllSelected,index:l},"special-all"+r);if(T&&I){const t=e[l],i=t.length&&t[0][T.name()],o="".concat(i,"_gh_").concat(l,"_").concat(this.groupByState.inlinePosition());return(0,N.createElement)(y.default,P(P({},this.props),{},{appModel:this.appModel,rows:t,attribute:T,tableSchema:m,groupAggregate:this.props.groupAggregate,selectionMode:this.inSelectionMode(),index:l,key:o,disableAllActions:!1,innerStyle:{borderBottom:"1px solid ".concat((0,w.themeColor)("dividerColor"))},viewType:"deck"}))}{const n=e[l],a=n[this.props.tableSchema.keyAttribute().name()],s=t.lookupTableRow(a),y=s&&s.timestamp,v="".concat(a,"_").concat(l,"_").concat(this.groupByState.inlinePosition());return Array.isArray(n)&&h.default.warnToDevConsole("Table View: row passed in is an array! --- should be an object"),(0,N.createElement)(d.DeckRow,P(P({},this.props),{},{appModel:this.appModel,forceUpdate:y,rowValues:n,onDrag:f,onDragEnd:g,layout:i,deckRowHeight:o,tableSchema:m,highlighted:a===this.props.rowId||(null===(c=this.props.interactiveRowIds)||void 0===c?void 0:c[t.rootName()])===a,onRowSwipeLeft:b,onRowSwipeRight:S,onRowLongPress:C,onRowTap:x,isLastToggled:this.rowIsLastToggled(a),isSelected:this.rowIsSelected(a),selectionMode:this.inSelectionMode(),translucentMode:this.props.translucentMode,groupAggregate:this.props.groupAggregate,groupBy:this.groupByState.groupBy(),filterExpr:this.groupByState.filterExpr(),filterDefaults:this.groupByState.filterDefaults(),key:v,index:l,swipeLeftAction:u,swipeRightAction:p,drilldownColumn:r}))}}handleRowSwiped(e,t){const i=this.getView();if(i){const o=i.getEventByType(e);if(o){const n=t.rowId(),a=this.props.table,r=a,s=this.appModel,l="".concat(i.name(),"|").concat(e.name),d={appModel:s,table:a,rowId:n,sourceLocationName:l,sourceTable:r};e===u.ROW_SWIPED_LEFT?C.logger.logAppEvent({eventName:T.AppEventName.RowSwipeLeftDeck}):C.logger.logAppEvent({eventName:T.AppEventName.RowSwipeRightDeck}),u.default.handle(o,d,(e=>{e.actionModifiedData&&!s.ShouldDelaySync()&&window.InputHandler.ProcessSync(),e.actionModifiedData&&!e.actionNavigatedApp&&s.ShouldDelaySync()&&StateReflector.ShowUIState(!0)}),this.viewStackKey)}}}renderDeckRow(e){return(0,D.jsx)(d.DeckRow,P(P(P({},this.props),e),{},{appModel:this.appModel,forceUpdate:void 0}))}computeLayoutForGenericView(){let e;return this.props.table&&this.props.tableSchema&&(e=d.DeckRow.computeLayout({appModel:this.appModel,table:this.props.table,tableSchema:this.props.tableSchema,mainDeckImageColumn:this.props.mainDeckImageColumn,primaryDeckHeaderColumn:this.props.primaryDeckHeaderColumn,secondaryDeckHeaderColumn:this.props.secondaryDeckHeaderColumn,nestedTableColumn:this.props.deckNestedTableColumn,deckSummaryColumn:this.props.deckSummaryColumn,showActionBar:this.props.showActionBar,actionColumns:this.props.actionColumns,actionBarEntries:this.props.actionBarEntries})),e}getActions(e){return e.map((e=>this.appModel.appTemplate.actions().findByName(this.props.table.rootName(),e)))}render(){var e,t,i;if(!this.shouldShow())return null;const o=this.appModel,{table:a,tableSchema:h,groupAggregate:f,sortBy:y,isInline:b,width:w,height:N,deckNestedTableColumn:j,controlGroupBy:E,controlName:A,listContainerRef:P}=this.props,M=this.isInDashboard()&&b;if(!h||!a)return(0,D.jsx)("div",{});if(this.props.deckNestedTableColumn){const e=h.findAttributeByName(this.props.deckNestedTableColumn);if(e){const t=e.listElementAttribute(),i=null==t?void 0:t.referencedTableName(),{viewType:o}=(0,I.chooseInlineViewType)({tableSchema:h,tableName:i});C.logger.logAppEvent({eventName:T.AppEventName.DeckViewNestedTableColumnRender,props:{viewType:o,controlName:A}})}}const k=new c.default(o,h,void 0,void 0,void 0,void 0,{viewStackKey:this.viewStackKey});let _,B,L,V,F;if(this.groupByState.drilldownMode())_=this.groupByState.currentDrilldownColumn(),B=this.groupByState.getDrilldownRows(this.pendingTransaction),L=(0,g.computeDrilldownLayout)({attributeName:_,tableSchema:this.props.tableSchema,width:this.containerWidth()}),F=(0,g.rowHeight)();else{const e={searchQuery:this.props.searchQuery,sortRules:[],limit:this.props.rowLimit,filterExpr:this.groupByState.filterExpr(),filterDefaults:this.groupByState.filterDefaults(),transaction:this.pendingTransaction};f&&delete e.limit;const t=this.groupByState.groupBy();t&&t.length&&"_RowNumber"!==t[0].Column&&(e.sortRules.push(t[0]),V=t[0].
1Column),y&&(e.sortRules=e.sortRules.concat(y)),B=a.queryRowValues(e,o,k),L=d.DeckRow.computeLayout({appModel:o,table:a,tableSchema:h,mainDeckImageColumn:this.props.mainDeckImageColumn,primaryDeckHeaderColumn:this.props.primaryDeckHeaderColumn,secondaryDeckHeaderColumn:this.props.secondaryDeckHeaderColumn,nestedTableColumn:this.props.deckNestedTableColumn,deckSummaryColumn:this.props.deckSummaryColumn,showActionBar:this.props.showActionBar,actionColumns:this.props.actionColumns,actionBarEntries:this.props.actionBarEntries}),F=d.DeckRow.getDeckRowHeight(L)}const{nearestHeadings:W,annotatedRows:H}=this.groupByState.annotateRows(B,V),{allowSwipe:U,allowPullToSync:G,handleDrag:z,handleDragEnd:K}=this.currentInteractionState;let Y=[];if(U){const e=this.getView(),t=o.appTemplate.actions();Y=[u.ROW_SWIPED_LEFT,u.ROW_SWIPED_RIGHT].map((i=>{const o=e&&e.getEventByType(i);return o&&t.findByName(a.rootName(),o.actionName())||void 0}))}const q=(0,l.default)(this.appModel.rolloutClassNames,"BasePrimaryView DeckView",{"DeckView--fixed-height-mode":this.fixedHeightMode(),"DeckView--translucent-mode":this.props.translucentMode});let X;if(b){const e=this.groupByState.inlineFilterDisplayValue();null!=e&&(X=(0,D.jsx)(v.default,{text:e,expanded:!0,onSelect:()=>{this.groupByState.drillUp()}},"special-back-"+this.groupByState.inlinePosition()))}const Q=b||x.ReactRootUIConfig.isInMobileExperience(),$=!G;this.renderedRowIds=B.map((e=>e[a.keyAttribute().name()]));const Z=j?390:90,J=V?"variable":"uniform",ee=this.appModel.MapActionName("No items"),te=this.getVisibleBodyHeight({isExpandedDrilldown:!!X,inDrilldownMode:this.groupByState.drilldownMode(),rowHeight:F,annotatedRows:H,viewType:"deck"}),ie=!!x.ReactRootUIConfig.isReactRoot()&&(E&&E.length>1),oe=x.ReactRootUIConfig.isInDesktopExperience()?{maxHeight:te}:{height:te};return(0,D.jsx)(R.EmulatorComponentWrapper,{applyStyleType:M?"dashboardContent":"topLevelView",dataVFEValues:{root:"deck",table:null!==(t=null===(e=this.props.table)||void 0===e?void 0:e.name())&&void 0!==t?t:void 0,control:null!==(i=this.props.controlName)&&void 0!==i?i:void 0},isInteractive:!this.shouldDisableEmulatorComponentWrapper(),children:(0,D.jsxs)("div",{"data-testid":n.Container,className:q,id:this.id(),onTouchMove:z,onTouchEnd:K,onTouchCancel:K,style:(0,O.convertToRtlWhenNecessary)({draggable:!0,width:w,height:N}),children:[X,(0,D.jsx)(m.default,{innerRef:e=>this.pullRef=e,disabled:Q,paused:$,getScrollContainer:this.getScrollContainer,appModel:o,children:(0,D.jsx)("div",{style:(0,O.convertToRtlWhenNecessary)(Object.assign({paddingTop:0},oe)),className:(0,l.default)("DeckView__list",{InlineShowAllVert:x.ReactRootUIConfig.isInDesktopExperience()&&this.props.isInline&&this.isOverflowYInline(H.length)}),ref:null!=P?P:this.onScrollContainerMount,children:H.length>0?(0,D.jsx)(s.default,{length:H.length,scrollParentGetter:this.reactListScrollParentGetter(),itemRenderer:this.renderItem.bind(this,H,a,L,F,Y,V,_,W),threshold:400,type:J,useTranslate3d:p.default.Supports3dTransform(),useStaticSize:!ie&&!V&&!b,itemSizeEstimator:(e,t)=>{const i=x.ReactRootUIConfig.isInDesktopExperience()?F:Z,o=x.ReactRootUIConfig.isInDesktopExperience()?r.GROUPED_HEADER_ROW_HEIGHT:(0,g.rowHeight)();return Array.isArray(H[e])?o:t[1]||i}},J):null!==ee?(0,D.jsx)(S.EmptyView,{message:ee}):""})}),this.renderFabs(),this.renderActionButtonPortal()]})})}}t.default=(0,b.observer)(M)},114871:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.GalleryViewDataTestIds=void 0;var n,a=o(i(238416)),r=o(i(386010)),s=o(i(155345)),l=o(i(676970)),d=o(i(217738)),c=o(i(385857)),u=o(i(409022)),p=o(i(21870)),h=i(148448),m=i(557310),f=i(303622),g=i(278965),y=i(148521),v=i(667294);function b(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function w(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?b(Object(i),!0).forEach((function(t){(0,a.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):b(Object(i)).forEac
1h((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}!function(e){e.Container="gallery-view-container",e.Line="gallery-view-line",e.ListContainer="gallery-view-list-container"}(n||(t.GalleryViewDataTestIds=n={}));class S extends s.default{constructor(){super(...arguments),this.renderRows=e=>{var t,i,o,a,s,c;const v=d.default.computeLayout({tableSchema:this.props.tableSchema,width:this.containerWidth(),galleryImageSize:this.props.galleryImageSize,sidewaysScroll:this.props.sidewaysScroll}),b=null!=v.imagesPerLine?Math.ceil(e.length/v.imagesPerLine):1,w=(0,r.default)(this.appModel.rolloutClassNames,"BasePrimaryView GalleryView",{"GalleryView--sideways-scroll":!!v.sidewaysScroll,"GalleryView--fixed-height-mode":this.fixedHeightMode(),"GalleryView--translucent-mode":!!this.props.translucentMode||m.ReactRootUIConfig.isInDesktopExperience()&&this.props.isInline}),S=(null!==(t=this.props.width)&&void 0!==t?t:0)>p.default.widescreenBreakpoint,x=this.containerHPadding(),C=(v.sidewaysScroll?this.renderRow:this.renderLine).bind(this,e,v);this.renderedRowIds=e.map((e=>e[this.props.table.keyAttribute().name()]));const T=S&&!this.props.isInline?16:8,I=this.appModel.MapActionName("No items"),R=(null===(i=this.currentUIState)||void 0===i?void 0:i.DashboardUIState)&&this.props.isInline;return(0,y.jsx)(f.EmulatorComponentWrapper,{applyStyleType:R?"dashboardContent":"topLevelView",dataVFEValues:{root:"gallery",table:null!==(a=null===(o=this.props.table)||void 0===o?void 0:o.name())&&void 0!==a?a:void 0,control:null!==(s=this.props.controlName)&&void 0!==s?s:void 0},children:(0,y.jsxs)("div",{className:w,"data-testid":n.Container,children:[(0,y.jsx)(u.default,{getScrollContainer:this.getScrollContainer,disabled:this.props.isInline||S||m.ReactRootUIConfig.isInMobileExperience(),appModel:this.appModel,children:(0,y.jsxs)("div",{"data-testid":n.ListContainer,ref:null!==(c=this.props.listContainerRef)&&void 0!==c?c:this.onScrollContainerMount,className:"GalleryView__list",style:(0,g.convertToRtlWhenNecessary)({width:this.props.width,height:this.props.height,paddingLeft:x+"px",paddingRight:x+"px"}),children:[(0,y.jsx)("section",{className:"GalleryView__spacer",style:(0,g.convertToRtlWhenNecessary)({height:v.sidewaysScroll?2:T})}),e.length>0?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(l.default,{length:v.sidewaysScroll?e.length:b,scrollParentGetter:this.reactListScrollParentGetter(),itemRenderer:C,threshold:v.sidewaysScroll?600:1200,type:"uniform",axis:v.sidewaysScroll?"x":"y"}),(0,y.jsx)("section",{className:"GalleryView__spacer",style:(0,g.convertToRtlWhenNecessary)({height:v.sidewaysScroll?2:64})})]}):null!==I?(0,y.jsx)(h.EmptyView,{message:I}):null]})}),this.renderFabs(),this.renderActionButtonPortal()]})})}}renderRow(e,t,i){var o;const n=e[i],a=this.props.table,r=n[a.tableSchema.keyAttribute().name()],s=a.lookupTableRow(r),l=s&&s.timestamp;return(0,v.createElement)(d.default,w(w({},this.props),{},{appModel:this.appModel,timestamp:l,layout:t,rowValues:n,highlighted:r===this.props.rowId||(null===(o=this.props.interactiveRowIds)||void 0===o?void 0:o[a.rootName()])===r,onRowLongPress:this.handleRowLongPress.bind(this),onRowTap:this.handleRowTap.bind(this),isSelected:this.rowIsSelected(r),selectionMode:this.inSelectionMode(),key:i,index:i}))}renderLine(e,t,i){const o=[],a=i*t.imagesPerLine;let r=a+t.imagesPerLine;r=Math.min(r,e.length);for(let i=a;i<r;i++)o.push(this.renderRow(e,t,i));return(0,y.jsx)("div",{className:"GalleryView__line","data-testid":n.Line,children:o},i)}render(){if(!this.shouldShow())return null;if(!this.props.tableSchema||!this.props.table)return(0,y.jsx)("div",{});const e=new c.default(this.appModel,this.props.tableSchema,void 0,void 0,void 0,void 0,{viewStackKey:this.viewStackKey}),t={searchQuery:this.props.searchQuery,sortRules:[],limit:this.props.rowLimit,filterExpr:this.props.filterExpr,filterDefaults:this.props.filterDefaults,transaction:this.pendingTransaction};this.props.sortBy&&(t.sortRules=t.sortRules.concat(this.props.sortBy));const i=this.props.table.queryRowValues(t,this.appModel,e);return this.renderRows(i)}containerHPadding(){var e;return(null!==(e=this.props.width)&&void 0!==e?e:0)>
1p.default.widescreenBreakpoint&&!this.props.sidewaysScroll?16:0}containerWidth(){var e;return(null!==(e=super.containerWidth())&&void 0!==e?e:0)-2*this.containerHPadding()}}t.default=S},627076:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.GanttTableCell=void 0;var n=i(667294),a=i(19461),r=i(157479),s=i(93089),l=i(666331),d=o(i(571524)),c=i(271114),u=i(545970),p=i(148521);t.GanttTableCell=(0,n.memo)((e=>{const{task:t,column:i,index:o,attribute:h,table:m,transaction:f,viewStackKey:g,action:y,inTableEditMode:v,isCompact:b,paging:w}=e,S=m.lookupTableRow(t.id,f),x=null==S?void 0:S.keyValue,C=(0,n.useMemo)((()=>({onEntryValueChange:(e,t)=>{x&&(null==f||f.update(m.name(),x,e.name(),t,"gantt",null==w?void 0:w.rowStateColumnNames))},onEntryKeyDown:(e,t)=>{t.target instanceof HTMLInputElement&&("Enter"===t.key||d.default.InMobileWebView()&&"Tab"===t.key)&&t.target.blur()}})),[w,x,m,f]);if(!S)return null;const T=S.dataContext;if(y){const e=!!v;return(0,p.jsx)(a.ActionCell,{table:m,attribute:h,action:y,dataContext:T,isFrozen:!1,width:i.width,height:i.height,classes:"",disableActions:e,sourceLocationName:"Gantt View"},o)}return v&&h.supportsEditsInTableView()?(0,p.jsx)(n.Suspense,{fallback:null,children:(0,p.jsx)(r.QueryRollout,{query:(0,s.queryDynamicFormEntryProps)({attribute:h,rowState:S.getRowState({paging:w}),viewStackKey:g,transaction:f}),children:e=>(0,p.jsx)(l.FormEntryCell,{attribute:h,width:i.width,height:i.height,dynamicFormEntryProps:e,columnPadding:u.GANTT_COLUMN_PADDING_PX/(0===o?2:1),tableRowPassthroughProps:{},isCompact:b,isFrozen:!1,classes:"",table:m,dataContext:T,formEntryHandlers:C})})},o):(0,p.jsx)(c.TypeDisplayCell,{dataContext:S.dataContext,attribute:h,table:m,width:i.width,height:i.height,isCompact:b,isFrozen:!1,columnPadding:u.GANTT_COLUMN_PADDING_PX/(0===o?2:1),classes:""})}))},408203:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.GanttPrimaryView=void 0;var n=o(i(238416)),a=i(667294),r=o(i(155345)),s=i(398171),l=o(i(819433)),d=i(692479),c=i(14042),u=i(545970),p=i(89499),h=i(714611),m=i(557310),f=o(i(150198)),g=o(i(496486)),y=i(700482),v=o(i(888861)),b=o(i(730381)),w=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=j(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}(i(450539)),S=i(562858),x=i(351101),C=o(i(525965)),T=o(i(593186)),I=o(i(59775)),R=i(21870),O=i(627076),D=i(166089),N=i(148521);function j(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(j=function(e){return e?i:t})(e)}function E(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function A(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?E(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):E(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}const P=new Set(["Image","Thumbnail","Drawing","Signature","File","Video","Show"]),M=(e,t,i)=>{if(e.type()===y.TABLEREF_TYPE&&e.auxData()){const o=e.auxData(),{rootTable:n}=t.findTableCollection(o.ReferencedTableName);return(null==n?void 0:n.name())===i.sourceTableName()}return!1},k=(e,t,i)=>{let o=M(e,t,i);if(e.type()===y.ENUM_TYPE&&e.auxData()){const n=e.auxData();if((null==n?void 0:n.BaseType)===y.TABLEREF_TYPE){const e=JSON.parse(n.BaseTypeQualifier),{rootTable:a}=t.findTableCollection(e.ReferencedTableName);o=(null==a?void 0:a.name())===i.sourceTableName()}}return o},_=e=>!P.has(e.type()),B={ParentTask:{filter:k,sort:(e,t)=>{const i=e.type()===y.TABLEREF_TYPE,o=t.type()===y.TABLEREF_TYPE;return Number(o)-Number(i)}},StartDate:{filter:e=>e.type()===y.DATE_TYPE||e.type()===y.DATETIME_TYPE},Duration:{filter:e=>e.type()===y.NUMBER_TYPE},WritableStartDate:{filter:e=>!(!e.isEditable()||e.type()!==y.DATE_TYPE&&e.type()!==y.DATETIME_TYPE)},WritableDuration:{filter:e=>!(!e.isEditable()||e.type()!==y.NUMBER_TYPE)},Label:{filter:_,sort:(e,t)=>Number(t.isLabel())-Number(e.isLabel())},SecondaryLabel:{filter:_,sort:(e,t)=>Number(t.type()===y.PERCENT_TYPE)-Number(e.type()===y.PERCENT_TYPE)},PercentComplete:{filter:e=>e.type()===y.PERCENT_TYPE},CriticalPath:{filter:e=>e.type()===y.BOOLEAN_TYPE},PredecessorTasks:{filter:(e,t,i)=>{if(e.type()===y.LIST_TYPE&&e.auxData()){const o=e.auxData();if((null==o?void 0:o.ElementType)===y.TABLEREF_TYPE){const e=JSON.parse(o.ElementTypeQualifier),{rootTable:n}=t.findTableCollection(e.ReferencedTableName);return(null==n?void 0:n.name())===i.sourceTableName()}}if(e.type()===y.ENUMLIST_TYPE&&e.auxData()){const o=e.auxData();if((null==o?void 0:o.BaseType)===y.TABLEREF_TYPE){const e=JSON.parse(o.BaseTypeQualifier),{rootTable:n}=t.findTableCollection(e.ReferencedTableName);return(null==n?void 0:n.name())===i.sourceTableName()}}return k(e,t,i)},sort:(e,t)=>{const i=e=>e.type()===y.LIST_TYPE||e.type()===y.ENUMLIST_TYPE;return Number(i(t))-Number(i(e))}},JoinPredecessor:{filter:(e,t,i,o)=>M(e,t,o)},JoinSuccessor:{filter:(e,t,i,o)=>M(e,t,o)},PredecessorJoinType:{filter:e=>e.type()===y.TEXT_TYPE||e.type()===y.ENUM_TYPE},PredecessorJoinLag:{filter:e=>e.type()===y.NUMBER_TYPE||e.type()===y.DURATION_TYPE}}
1,L=2*u.GANTT_COLUMN_PADDING_PX,V=e=>{let{table:t,tableSchema:i,onRowTap:o,columnOrder:n,dataContext:r,zoomLevel:l,ganttRef:d,searchQuery:y,rowLimit:w,filterExpr:x,filterDefaults:I,sortBy:R,paging:j,transaction:E,height:A,inTableEditMode:P,viewStackKey:M,StartDateColumn:k,DurationColumn:_,WritableDurationColumn:V,WritableStartDateColumn:F,LabelColumn:W,ParentTaskColumn:H,SecondaryLabelColumn:U,PercentCompleteColumn:G,PredecessorTasksColumn:z,SSPredecessorTasksColumn:K,SFPredecessorTasksColumn:Y,FFPredecessorTasksColumn:q,BaselineStartDateColumn:X,BaselineEndDateColumn:Q,CriticalPathColumn:$,onSwitchTab:Z,activeCompactView:J,isDenseView:ee,showBaseline:te,scrollToDate:ie,inSelectionMode:oe,rowIsSelected:ne,onRenderedRowIdsChange:ae,disabledWeekdays:re,disabledDatesExpressionString:se,handleSelectAllTasks:le,selectedRows:de}=e;const ce=(0,c.useReactAppSelector)(s.getAppModelHook),[ue,pe]=(0,a.useState)(),[he,me]=(0,a.useState)(ie||new Date),fe=(0,a.useMemo)((()=>{if(se)try{const e=v.default.create(JSON.parse(se)).run(r);if(Array.isArray(e))return e.map((e=>{const t=(0,b.default)(e);return t.isValid()?t.toDate():null})).filter((e=>null!=e))}catch(e){return void T.default.ReportErrorOnce({error:e,errorMessage:"Error parsing disabledDatesExpressionString"})}}),[se,r]),ge=(0,a.useMemo)((()=>{const e={fontWeight:u.GANTT_HEADER_FONT_WEIGHT,fontSize:u.GANTT_HEADER_FONT_SIZE},i=2*u.GANTT_COLUMN_PADDING_PX+u.GANTT_SORT_HANDLE_WIDTH_PX,o=(0,h.calculateIntrinsicColumnLayouts)({appModel:ce,tableSchema:t.tableSchema,table:t,columnOrder:n,columnWidthPreference:"Normal",dataContext:r,headerStyle:e,headerExtraWidth:i}),a=new Map;return o.forEach((e=>{(0,h.isAttributeColumnLayout)(e)&&a.set(e.attribute.name(),e)})),a}),[ce,n,r,t]),[ye,ve]=(0,a.useState)(),{resolvedParentTask:be,resolvedStartDate:we,resolvedDuration:Se,resolvedLabel:xe,resolvedSecondaryLabel:Ce,resolvedPercentComplete:Te,resolvedCriticalPath:Ie,resolvedPredecessorTasks:Re,resolvedWritableDuration:Oe,resolvedWritableStartDate:De}=(0,a.useMemo)((()=>{var e,t,o,n,a,r,s,l;const d=new Set,c=[W,U];i.findAttributesByNames(c.filter((e=>Boolean(e&&"**none**"!==e)))).map((e=>d.add(e.name())));const u=(e,t,i,o,n)=>function(e,t,i,o){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new Set,a=arguments.length>5?arguments[5]:void 0;if("**none**"===i)return;if(i)return e.findAttributeByName(i);let r=e.visibleAttributesWithoutShowTypes().filter((i=>o.filter(i,t,e,a)));return n.size>0&&(r=r.filter((e=>!n.has(e.name())))),o.sort&&r.sort(o.sort),g.default.head(r)}(e,ce,t,B[i],o,null!=n?n:e),p=u(i,W,"Label",d);p&&d.add(p.name());const h=u(i,U,"SecondaryLabel",d);return h&&d.add(h.name()),{resolvedParentTask:null===(e=u(i,H,"ParentTask"))||void 0===e?void 0:e.name(),resolvedStartDate:null===(t=u(i,k,"StartDate"))||void 0===t?void 0:t.name(),resolvedDuration:null===(o=u(i,_,"Duration"))||void 0===o?void 0:o.name(),resolvedLabel:null==p?void 0:p.name(),resolvedSecondaryLabel:null==h?void 0:h.name(),resolvedPercentComplete:null===(n=u(i,G,"PercentComplete"))||void 0===n?void 0:n.name(),resolvedCriticalPath:null===(a=u(i,$,"CriticalPath"))||void 0===a?void 0:a.name(),resolvedPredecessorTasks:null===(r=u(i,z,"PredecessorTasks"))||void 0===r?void 0:r.name(),resolvedWritableStartDate:null===(s=u(i,F,"WritableStartDate"))||void 0===s?void 0:s.name(),resolvedWritableDuration:null===(l=u(i,V,"WritableDuration"))||void 0===l?void 0:l.name()}}),[ce,i,H,k,_,W,U,G,$,z,V,F]),Ne=(0,a.useMemo)((()=>{const e=[];return be&&e.push({Column:be,Order:"Ascending"}),ye?e.push({Column:ye.columnId,Order:ye.ascending?"Ascending":"Descending"}):R?e.push(...R):we&&e.push({Column:we,Order:"Ascending"}),e}),[be,we,ye,R]),je=t.queryRows({searchQuery:y,sortRules:Ne,limit:w,filterExpr:x,filterDefaults:I,transaction:E},ce),Ee=(0,a.useMemo)((()=>{const e=new Map;return je.forEach(((t,i)=>{e.set(t.rowId,i)})),e}),[je]),Ae=(0,a.useCallback)(((e,t)=>{const i=Ee.get(String(e.id)),o=Ee.get(String(t.id));return void 0===i||void 0===o?0:i-o}),[Ee]),Pe=(0,a.useMemo)((()=>je.map((e=>{const[i,o,n,a,r,s,l,d,c]=[we,Se,xe,be,Ce,Te,X,Q,Ie].map((t=>e.get(null!=t?t:""))),u=xe?t.tableSchema.findAttributeByName(xe):null,p=Ce?t.tableSchema.findAttributeByName(Ce):null,{startDate:h,endDate:m,isDurationNonPositive:f}=((e,t)=>{const i=e?(0,b.default)(e):b.default.invalid(),o=b.default.duration({days:Number(t)}),n=i.clone().add(o);return{startDate:i.isValid()?i.toDate():void 0,endDate:n.isValid()?n.toDate():void 0,isDurationNonPositive:o.isValid()&&o.asMilliseconds()<=0}})(i,o),g=l?(0,b.default)(l):b.default.invalid(),y=d?(0,b.default)(d):b.default.invalid();return{id:e.rowId,name:u?u.localizeWireValue(n):n,start:h,end:m,parent:a,type:f?"milestone":"task",progress:Number(s),secondaryText:p?p.localizeWireValue(r):r,baselineStart:g.isValid()?g.toDate():void 0,baselineEnd:y.isValid()?y.toDate():void 0,isOnCriticalPath:"Y"===c}}))),[je,we,Se,xe,be,Ce,Te,Ie,t,X,Q]),Me=(0,a.useMemo)((()=>{const e=[{type:"FS",columnName:null!=Re?Re:null},{type:"SS",columnName:"**none**"!==K?K:null},{type:"SF",columnName:"**none**"!==Y?Y:null},{type:"FF",columnName:"**none**"!==q?q:null}].filter((e=>e.columnName));if(0===e.length)return[];const i=e.map((e=>{const i=e.columnName?t.tableSchema.findAttributeByName(e.columnName):null;return Object.assign(Object.assign({},e),{attribute:i})}
1)).filter((e=>e.attribute));if(0===i.length)return[];const o=[];return je.forEach((e=>{i.forEach((t=>{let{type:i,columnName:n,attribute:a}=t;if(n&&a){const t=e.values[n];if(t){a.splitEnumListValue(t).forEach((t=>{var n,a;o.push({id:"".concat(t,"-").concat(e.rowId,"-").concat(i),source:t,target:e.rowId,type:i,isCriticalPath:(null===(n=Pe.find((e=>e.id===t)))||void 0===n?void 0:n.isOnCriticalPath)&&(null===(a=Pe.find((t=>t.id===e.rowId)))||void 0===a?void 0:a.isOnCriticalPath)})}))}}}))})),o}),[q,Y,K,Re,t.tableSchema,je,Pe]),ke=(0,a.useCallback)(((e,t)=>{var i;e&&(me(e.start),pe(e.id),o&&o(String(e.id),{shiftKey:null!==(i=null==t?void 0:t.shiftKey)&&void 0!==i&&i}))}),[o]),_e=(0,a.useCallback)(((e,i)=>{const o=ce.dataManager.currentTransaction;o&&De&&(o.update(t.name(),String(e.id),De,(0,b.default)(i).format("MM/DD/YYYY")),o.commitAsync().catch((e=>{o.abort(),D.AppGlobals.ViewManager.ShowInfoDialog(ce.MapActionName("Unable to save changes"),e.message)})))}),[ce,t,De]),Be=(0,a.useCallback)(((e,i,o)=>{const n=ce.dataManager.currentTransaction;n&&De&&Oe&&(n.update(t.name(),String(e.id),De,(0,b.default)(i).format("MM/DD/YYYY")),n.update(t.name(),String(e.id),Oe,String(o)),n.commitAsync().catch((e=>{n.abort(),D.AppGlobals.ViewManager.ShowInfoDialog(ce.MapActionName("Unable to save changes"),e.message)})))}),[ce,t,De,Oe]),Le=(0,a.useCallback)((e=>{me(e.start),Z&&Z("timeline"),pe(e.id)}),[Z]),Ve=(0,a.useCallback)((e=>{switch(e){case"SS":return"**none**"!==K?K:null;case"SF":return"**none**"!==Y?Y:null;case"FF":return"**none**"!==q?q:null;case"FS":return null!=Re?Re:null}}),[Re,K,Y,q]),Fe=(0,a.useCallback)(((e,i,o)=>{const n=ce.dataManager.currentTransaction,a=Ve(o);if(!a)return;const r=t.tableSchema.findAttributeByName(a),s=je.find((e=>e.rowId===i)),l=(null==s?void 0:s.values[a])||"",d=r.splitEnumListValue(l);d.push(String(e));const c=Array.from(d).join(f.default.listDelimiter);n.update(t.name(),String(i),a,c),n.commitAsync().catch((e=>{n.abort(),D.AppGlobals.ViewManager.ShowInfoDialog(ce.MapActionName("Unable to save link"),e.message)}))}),[ce,t,je,Ve]),We=(0,a.useCallback)(((e,t)=>{if(t){if("s"===e)return[K,Y];if("e"===e)return[Re,q]}else{if("s"===e)return[Re,K];if("e"===e)return[Y,q]}return[]}),[Re,K,Y,q]),He=(0,a.useCallback)(((e,t)=>{let o=null;if("s"===t&&"s"===e?o="SS":"s"===t&&"e"===e?o="SF":"e"===t&&"s"===e?o="FS":"e"===t&&"e"===e&&(o="FF"),!o)return!1;const n=Ve(o);return!(!n||"**none**"===n)&&!!i.findAttributeByName(n)}),[i,Ve]),Ue=(0,a.useCallback)(((e,t)=>{if(!t){return We(e,!0).some((e=>!(!e||"**none**"===e)&&!!i.findAttributeByName(e)))}return He(e,t)}),[i,We,He]),Ge=(0,a.useMemo)((()=>(0,h.getColumnsToShow)({appModel:t.appModel,tableSchema:t.tableSchema,table:t,dataContext:r,columnOrder:n,disableAllActions:!1})),[n,r,t]),ze=(0,a.useMemo)((()=>{const e=Ge.map(((e,i)=>{var o;const n=e.attribute,a=e.isAction?e.action:void 0,s=e.isAction?null===(o=e.action)||void 0===o?void 0:o.name():n.name(),l=ge.get(n.name()),d=l.isCompact;
1let c;return c=e.isAction?0===i?oe?(ee?p.DENSE_CHECKBOX_WIDTH:p.CHECKBOX_WIDTH)+p.INDENT_WIDTH_PX+90:90:L:l.columnWidth,{id:s,header:a?"":n.displayName(r),width:c,renderCell:(e,i,o)=>(0,N.jsx)(O.GanttTableCell,{task:e,column:i,index:o,attribute:n,table:t,transaction:E,viewStackKey:M,action:a,inTableEditMode:P,isCompact:d,paging:j}),isSortable:!e.isAction,isAction:e.isAction}}));return m.ReactRootUIConfig.isInMobileExperience()&&e.push({id:"navigateToTimeline",header:"",renderCell:(e,t)=>{var i;return(0,N.jsxs)(C.default,{innerStyle:{position:"absolute",width:t.width,height:t.height,display:"flex",left:0,top:0,alignItems:"center",justifyContent:"center"},onTap:()=>Le(e),stopPropagation:!0,asyncTap:!1,title:(null===(i=e.name)||void 0===i?void 0:i.trim())||void 0,children:[(0,N.jsx)(S.DirectionAwareIcon,{icon:(0,N.jsx)("i",{className:"fal fa-chevron-right"})}),(0,N.jsx)("span",{className:"sr-only",children:e.name})]})},isSortable:!1,isFrozen:!0,isAction:!0,width:L}),e}),[ge,Ge,r,Le,oe,P,ee,j,t,E,M]),Ke=(0,a.useCallback)(((e,t)=>{ve({columnId:e,ascending:t})}),[]);return(0,N.jsx)(u.Gantt,{height:null!=A?A:"100%",tasks:Pe,links:Me,showProgress:null!=z,columns:ze,onTimelineTaskClick:ke,onTaskFocus:ke,onTaskMove:_e,onTaskResize:Be,onLinkCreate:Fe,onLinkDelete:e=>{const i=e.split("-"),[o,n,a]=i,r=ce.dataManager.currentTransaction,s=Ve(a);if(!s)return;const l=t.tableSchema.findAttributeByName(s),d=je.find((e=>e.rowId===n)),c=(null==d?void 0:d.values[s])||"",u=l.splitEnumListValue(c).filter((e=>e&&e!==o)).join(f.default.listDelimiter);r.update(t.name(),String(n),s,u),r.commitAsync().catch((e=>{r.abort(),D.AppGlobals.ViewManager.ShowInfoDialog(ce.MapActionName("Unable to delete link"),e.message)}))},sortBy:ye,onSort:Ke,taskComparator:Ae,zoomLevel:l,tabsMode:!m.ReactRootUIConfig.isInDesktopExperience(),activeCompactView:m.ReactRootUIConfig.isInDesktopExperience()?void 0:J,onActiveCompactViewChange:Z,focusedTaskId:ue,ganttRef:d,scrollToDate:he,setScrollToDate:me,isDenseView:!!m.ReactRootUIConfig.isInDesktopExperience()&&ee,showBaseline:!!m.ReactRootUIConfig.isInDesktopExperience()&&te,inSelectionMode:oe,inTableEditMode:P,rowIsSelected:ne,disabledWeekdays:null!=re?re:[],disabledDates:fe,handleSelectAllTasks:le,selectedRows:de,onRenderedRowIdsChange:ae,isLinkCreationSupported:Ue})};class F extends r.default{constructor(e){super(e),this.ganttRef=(0,a.createRef)(),this.boundHandleRowTap=this.handleRowTap.bind(this),this.handleGanttZoomChange=e=>{const t="string"==typeof e.target.value?this.getValidatedZoomLevel(e.target.value):"day";this.setState({zoomLevel:t})},this.handleSwitchTab=e=>{this.state.activeCompactView!==e&&this.setState({activeCompactView:e})},this.handleSelectAllTasks=()=>{var e,t;(0,l.default)().dispatch((0,d.mutateView)({ViewState:{selected:(null!==(t=null===(e=this.props.selectedRows)||void 0===e?void 0:e.length)&&void 0!==t?t:0)>0?[]:this.renderedRowIds},ViewStackKey:this.viewStackKey}))},this.getNavControls=()=>{const e=[{type:"button",name:(0,x.mapActionName)("Today"),onClick:()=>{this.ganttRef.current&&this.ganttRef.current.jumpToDate((0,b.default)(new Date).startOf("day").toDate())},side:w.SideOfNavBar.RIGHT},{type:"dropdown",name:"Zoom Level",value:this.getCurrentZoomLevel(),options:[{label:(0,x.mapActionName)("Day"),value:"day"},{label:(0,x.mapActionName)("Week"),value:"week"},{label:(0,x.mapActionName)("Month"),value:"month"}],onChange:this.handleGanttZoomChange,side:w.SideOfNavBar.RIGHT},{type:"button",name:"Compact View",onClick:()=>{this.setState({isDenseView:!this.state.isDenseView})},side:w.SideOfNavBar.LEFT,isActive:this.state.isDenseView},{type:"button",name:this.state.showBaseline?"Hide baseline":"Show Baseline",onClick:()=>{this.setState({showBaseline:!this.state.showBaseline})},side:w.SideOfNavBar.LEFT,isActive:this.state.showBaseline}];return{left:(0,N.jsx)(w.default,{controls:e.filter((e=>e.side===w.SideOfNavBar.LEFT))}),right:(0,N.jsx)(w.default,{controls:e.filter((e=>e.side===w.SideOfNavBar.RIGHT))})}},this.handleRenderedRowIdsChange=e=>{this.renderedRowIds=e},this.state={zoomLevel:this.getDefaultTimeframe(),activeCompactView:"grid",isDenseView:!1,showBaseline:!1}}allowQuickEditMode(){return this.props.table.allowsUpdate(this.appModel)}inMultiRowEditMode(){return!!this.props.quickEditMode&&this.allowQuickEditMode()}getValidatedZoomLevel(e){if(e){const t=e.toLowerCase();if("day"===t||"week"===t||"month"===t)return t}return"day"}getDefaultTimeframe(){return this.getValidatedZoomLevel(this.props.defaultTimeframe)}getCurrentZoomLevel(){return m.ReactRootUIConfig.isInDesktopExperience()&&this.state.zoomLevel||this.getDefaultTimeframe()}handleRowTap(e,t){this.inMultiRowEditMode()||super.handleRowTap(e,t)}render(){const{isInline:e,height:t}=this.props,i=this.inMultiRowEditMode();let o;m.ReactRootUIConfig.isInDesktopExperience()||!i||e||(o=(0,N.jsx)(I.default,{appModel:this.appModel,onCancel:this.exitEditMode,onSave:this.commitTransaction}));let n=t;return m.ReactRootUIConfig.isInMobileExperience()&&i&&!e&&"number"==typeof n&&(n-=R.DEFAULT_FOOTER_HEIGHT),(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(V,A(A({},this.props),{},{height:n,transaction:this.pendingTransaction,paging:this.paging,ganttRef:this.ganttRef,onRowTap:this.boundHandleRowTap,dataContext:this.dataContext(),zoomLevel:this.getCurrentZoomLevel(),viewStackKey:this.viewStackKey,onSwitchTab:this.handleSwitchTab,activeCompactView:this.state.activeCompactView,focusedGanttTaskId:this.state.focusedGanttTaskId,isDenseView:this.state.isDenseView,showBaseline:this.state.showBaseline,inSelectionMode:this.inSelectionMode(),inTableEditMode:i,rowIsSelected:this.rowIsSelected.bind(this),onRenderedRowIdsChange:this.handleRenderedRowIdsChange,handleSelectAllTasks:this.handleSelectAllTasks})),this.renderFabs(),this.renderActionButtonPortal(),o]})}}
1t.GanttPrimaryView=F},101993:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(238416)),a=i(700482),r=o(i(386010)),s=o(i(571524)),l=o(i(190644)),d=i(302443),c=o(i(315847)),u=o(i(152200)),p=i(46239),h=o(i(593186)),m=o(i(962553)),f=o(i(888861)),g=o(i(496486)),y=o(i(155345)),v=o(i(368142)),b=o(i(106375)),w=i(814394),S=o(i(303055)),x=o(i(454852)),C=o(i(385857)),T=o(i(21870)),I=i(318927),R=i(557310),O=i(166089),D=i(664583),N=i(303622),j=i(278965),E=i(351101),A=i(148521);function P(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function M(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?P(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):P(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}const k={opacity:.75};let _,B;const L=e=>e.filter((e=>(0,d.isValidLatLng)(e.Latitude,e.Longitude)));class V extends y.default{constructor(e){super(e),this.updateLayout=()=>{const e=(this.props.width||$(window).width())<=512;this.state.compactView!==e&&this.setState({compactView:e})},this.state=this.initialState(e),this.mapPaneRef=e=>{this.mapPane=e},this._isMounted=!1,this.handleRowTap=this.handleRowTap.bind(this),this.placePinsConfirm=this.placePinsConfirm.bind(this),this.placePinsCancel=this.placePinsCancel.bind(this),this.placePinsStart=this.placePinsStart.bind(this),this.newRowHandler=this.newRowHandler.bind(this),this.closeDetailHandler=this.closeDetailHandler.bind(this),this.onPendingPinClick=this.onPendingPinClick.bind(this),this.onPinCl
1ick=this.onPinClick.bind(this),this.onMapClick=this.onMapClick.bind(this),this.onMapDragEnd=this.onMapDragEnd.bind(this),this.onMapTypeChanged=this.onMapTypeChanged.bind(this),this.onMapZoomChanged=this.onMapZoomChanged.bind(this),this.onPinDragStart=this.onPinDragStart.bind(this),this.onPinDragEnd=this.onPinDragEnd.bind(this)}initialState(e){var t;this.hideInfoWindow();const i=(e=e||this.props).width||$(window).width(),o=u.default.normalizeMapType(e.mapType);let n=null;return(null===(t=this.appModel)||void 0===t?void 0:t.inRollout("multiplePinDrop"))&&(n=[]),{mapType:o,pendingPins:n,compactView:i<=512,placingNewPin:null,newPinLatLng:null,newPinAddress:null,rowId:e.rowId||null,lastSelectedRowId:e.rowId||null,zoom:null,centerLat:null,centerLng:null,selectedTable:null,selectedColumn:null,infoWindow:null}}componentDidMount(){super.componentDidMount(),this._isMounted=!0,this.updateLayout(),window.addEventListener("resize",this.updateLayout);const e=this.customMapType();e&&!e.isReady()&&e.whenReady(this.updateLayout)}componentWillUnmount(){clearTimeout(_),this._isMounted=!1,window.removeEventListener("resize",this.updateLayout)}componentDidUpdate(e,t){super.componentDidUpdate(e,t);const i=this.customMapType();i&&!i.isReady()&&i.whenReady(this.updateLayout)}UNSAFE_componentWillReceiveProps(e){var t,i;let o=this.state.rowId,n=this.state.zoom,a=this.state.centerLat,r=this.state.centerLng,s=this.state.selectedTable,l=this.state.selectedColumn,d=this.state.lastSelectedRowId,c=this.state.mapType||e.mapType;e.viewAppState?(o=e.rowId,n=e.zoom,a=e.centerLat,r=e.centerLng,s=e.selectedTable,l=e.selectedColumn,c=e.mapType):e.rowId!==this.props.rowId&&(o=e.rowId,null!=o&&(s=e.selectedTable||s,l=e.selectedColumn||l,a=null,r=null,s?d=o:o=null),null==o&&(s=null,l=null)),(!this.props.table||e.table&&e.table.name()===this.props.table.name())&&e.mapColumn===this.props.mapColumn||this.placePinsCancel(),(null===(t=this.props.filterExpr)||void 0===t?void 0:t.hash)!==(null===(i=e.filterExpr)||void 0===i?void 0:i.hash)&&(d=void 0),this.setState({showMap:e.showMap,mapType:u.default.normalizeMapType(c),rowId:o,lastSelectedRowId:d,zoom:n,centerLat:a,centerLng:r,selectedTable:s,selectedColumn:l})}mapColumnAttribute(){const e=this.props;return e.tableSchema&&e.mapColumn?e.tableSchema.findAttributeByName(e.mapColumn):null}get map(){return g.default.get(this,"mapPane.mapInstance.map")}activeTable(){const{table:e}=this.props,{selectedTable:t}=this.state;let i=e;return e&&t&&t!==e.name()&&(i=this.appModel.findTableCollection(t,!0).table),i}activeAttribute(){const{mapColumn:e}=this.props,{selectedColumn:t}=this.state,i=this.activeTable();let o=e;return t&&t!==e&&(o=t),i&&i.tableSchema?i.tableSchema.findAttributeByName(o):null}selectedRowValues(e,t){let i;return e&&null!=t&&(i=e.findRow(t)),i}dataContext(){var e,t;const{filterExpr:i,filterDefaults:o,searchQuery:n}=this.props,a=this.appModel,{rowId:r,lastSelectedRowId:s}=this.state,l=this.activeTable(),d=l&&l.tableSchema,c=d&&d.name();let u=this._dataContext||(null===(e=this.props.dataContext)||void 0===e?void 0:e.augmentWithViewContext(this.viewStackKey));(!u||d&&u.schemaName()!==c||(null===(t=this._dataContext)||void 0===t?void 0:t.appModel)!==a)&&(u=this._dataContext=new C.default(a,d,void 0,void 0,void 0,void 0,{viewStackKey:this.viewStackKey}));let p=null;if(r)p=this.selectedRowValues(l,r);else if(this.isCustomMap()){const e=this.activeAttribute().baseImageEvalTree(),t=e&&e.columnsReferenced();if(t&&t.length&&(p=this.selectedRowValues(l,s),p||(p=l.queryRowValues({filterExpr:i,filterDefaults:o,searchQuery:n,limit:1,transaction:this.pendingTransaction},a,u)[0]),!p)){p={};g.default.concat(f.default.getFilterDefaults(this.props.filterExpr),f.default.getFilterDefaults(l.sliceFilterEvalTree())).forEach((e=>{let{ColumnName:t,ColumnValue:i}=e;p[t]=i}))}}return p&&d&&c===u.schemaName()&&u.replaceRowData(p),u}baseImage(){const e=this.activeAttribute();if(this.isCustomMap()&&e){const t=this.dataContext(),i=e.baseImage(t);i&&(this._baseImage=i)}else e&&(this._baseImage=null);return this._baseImage}isCustomMap(){const e=this.activeAttribute();
1return e&&"XY"===e.basestType()}customMapType(){const e=this.baseImage();return e?p.ImageMapType.getForUrl(e):null}fixedMode(){return"fixed"===this.props.mapMode}fullMode(){return"full"===this.props.mapMode}compactView(){return this.state.compactView}showDetailView(){return this.fullMode()&&null!=this.state.rowId}showAdd(){return this.fullMode()&&!this.showDetailView()&&this.props.table&&this.props.table.allowsAdd()}showEdit(e){return this.fullMode()&&this.showDetailView()&&e&&e.allowsUpdate()}showDelete(e){return this.fullMode()&&this.showDetailView()&&e&&e.allowsDelete()}getNewState(e){return R.ReactRootUIConfig.isReactRoot()?{Root:"google-map",ControlName:e?e.ControlName:null,MapUIState:e,TableName:null==e?void 0:e.TableName,RowKey:null==e?void 0:e.RowKey}:O.AppGlobals.AppState.GoogleMapStateDef.CreateRootState(e)}showAddPin(){if(!this.showAdd())return!1;if(!this.props.tableSchema||!this.props.mapColumn)return!1;const e=this.mapColumnAttribute();return!(!e||e.appFormula()||e.hasFormula()||e.isReadOnly())}onPendingPinClick(e,t,i,o,n){const a=[...this.state.pendingPins];a.splice(n,1),this.hideInfoWindow(),this.setState({pendingPins:a,infoWindow:null})}onPinClick(e,t){if(this.placingNewPins())return;const i=this.props,o=i.viewAppState;let n;const a=t.appsheetItem,r=a.TableName,s=a.MapCol,l=this.state.selectedColumn,d=this.appModel.inRollout("interactiveMapsFix");if(o)n=this.getNewState({TableName:i.table.name(),MapCol:i.mapColumn,SecondaryTable:i.secondaryTableName,SecondaryColumn:i.secondaryColumn,RowKey:t.appsheetItem.Id,SelectedTable:r,SelectedColumn:s,MapType:this.state.mapType,CurrentLat:t.position.lat(),CurrentLng:t.position.lng(),FilterExpr:i.filterExpr,DefaultValues:i.filterDefaults,Zoom:t.map.getZoom(),ControlName:i.controlName,UserDefinedFilters:o.UserDefinedFilters,UserDefinedFilterExpression:o.UserDefinedFilterExpression}),n.SearchTerm=this.currentUIState.SearchTerm,this.setCurrentUIState(n);else if(this.fixedMode())n=this.getNewState({TableName:i.table.name(),MapCol:i.mapColumn,SecondaryTable:i.secondaryTableName,SecondaryColumn:i.secondaryColumn,RowKey:t.appsheetItem.Id,SelectedTable:r,SelectedColumn:s,MapType:this.state.mapType,CurrentLat:t.position.lat(),CurrentLng:t.position.lng(),FilterExpr:i.filterExpr,DefaultValues:i.filterDefaults,Zoom:t.map.getZoom()}),n.SearchTerm=this.currentUIState.SearchTerm,this.pushState(n,!0);else{if(d&&i.onRowOpened&&i.interactiveRowIds){const e=this.appModel.findTableCollection(r,!0).rootTable,t=this.appModel.findTableCollection(this.state.selectedTable).rootTable;if(t&&t!==e){const e=this.state.rowId;i.interactiveRowIds[t.name()]===e&&i.onRowOpened(t.name(),e)}const o=a.Id;i.interactiveRowIds[e.name()]!==o&&i.onRowOpened(e.name(),o)}this.setState({rowId:t.appsheetItem.Id,selectedTable:r,selectedColumn:s,zoom:t.map.getZoom(),centerLat:t.position.lat(),centerLng:t.position.lng()})}this.placePinsCancel(),d||i.onRowOpened&&i.table&&i.table.name()===r&&(this.state.rowId===a.Id&&l&&l!==a.MapCol||i.onRowOpened(i.table.rootName(),t.appsheetItem.Id)),B=!0,setTimeout((function(){B=!1}),200)}onMapClick(e,t){var i;if(B)return;if(this.placingNewPins())return void(this.allowMultiRowAdd()&&this.placePin(e.latLng.lat(),e.latLng.lng()));s.default.IsMobileBrowser()&&document.activeElement.blur();const o=this.props,n=o.viewAppState;let a;if(n)null!=(null===(i=this.currentUIState.MapUIState)||void 0===i?void 0:i.RowKey)&&(a=this.getNewState({TableName:n.TableName,RowKey:null,MapCol:o.mapColumn,MapType:this.state.mapType,CurrentLat:u.default.getCenterLat(t),CurrentLng:u.default.getCenterLng(t),FilterExpr:o.filterExpr,DefaultValues:o.filterDefaults,Zoom:t.getZoom(),ControlName:o.controlName,UserDefinedFilters:n.UserDefinedFilters,UserDefinedFilterExpression:n.UserDefinedFilterExpression}),a.SearchTerm=this.currentUIState.SearchTerm,this.setCurrentUIState(a));else if(this.fixedMode())a=this.getNewState({TableName:o.table.name(),RowKey:null,MapCol:o.mapColumn,MapType:this.state.mapType,CurrentLat:u.default.getCenterLat(t),CurrentLng:u.default.getCenterLng(t),FilterExpr:o.filterExpr,DefaultValues:o.filterDefaults,Zoom:t.getZoom()}),this.pushState(a,!0);else{const{rowId:e,selectedTable:i,selectedColumn:n}=this.state;
1if(null!=e||null!=i||null!=n)if(this.setState({rowId:null,selectedTable:null,selectedColumn:null,zoom:t.getZoom(),centerLat:u.default.getCenterLat(t),centerLng:u.default.getCenterLng(t)}),this.appModel.inRollout("interactiveMapsFix")){const{onRowOpened:e,interactiveRowIds:t}=this.props;if(e&&t){const{rootTable:e}=this.appModel.findTableCollection(i,!0),n=t[e.name()];null!=n&&o.onRowOpened&&o.onRowOpened(e.name(),n)}}else o.onRowOpened&&o.onRowOpened(o.table.rootName(),null)}}onMapZoomChanged(e,t){this._isMounted&&(clearTimeout(_),_=setTimeout((()=>{this.updateInfoWindow(t.getZoom());const e=this.props,i=e.viewAppState;if(i){const o=this.currentUIState;if("google-map"===o.Root&&g.default.isEqual(e.viewAppState,o.MapUIState)){const n=this.getNewState({TableName:i.TableName,RowKey:i.RowKey||null,MapCol:e.mapColumn,MapType:this.state.mapType,CurrentLat:u.default.getCenterLat(t),CurrentLng:u.default.getCenterLng(t),SelectedTable:i.SelectedTable,SelectedColumn:i.SelectedColumn,FilterExpr:e.filterExpr,DefaultValues:e.filterDefaults,Zoom:t.getZoom(),UserDefinedFilters:i.UserDefinedFilters,UserDefinedFilterExpression:i.UserDefinedFilterExpression});n.SearchTerm=o.SearchTerm,n.ControlName=e.controlName,this.setCurrentUIState(n)}}else this.setState({zoom:t.getZoom(),centerLat:u.default.getCenterLat(t),centerLng:u.default.getCenterLng(t)})}),1e3),this.hideInfoWindow())}onMapTypeChanged(e,t){if(this._isMounted){const e=t.mapTypeId,i=this.props,o=i.viewAppState;let n;o?(n=this.getNewState({TableName:o.TableName,RowKey:o.RowKey||null,MapCol:i.mapColumn,MapType:e,CurrentLat:o.CurrentLat,CurrentLng:o.CurrentLng,FilterExpr:i.filterExpr,DefaultValues:i.filterDefaults,Zoom:o.Zoom,ControlName:i.controlName,UserDefinedFilters:o.UserDefinedFilters,UserDefinedFilterExpression:o.UserDefinedFilterExpression}),n.SearchTerm=this.currentUIState.SearchTerm,this.setCurrentUIState(n)):this.state.mapType!==e&&this.setState({mapType:e})}}closeDetailHandler(){const e=this.props,t=e.viewAppState;if(t){const i=t.CurrentLat,o=t.CurrentLng,n=this.getNewState({TableName:t.TableName,RowKey:null,MapCol:e.mapColumn,MapType:this.state.mapType,CurrentLat:i,CurrentLng:o,FilterExpr:e.filterExpr,DefaultValues:e.filterDefaults,Zoom:t.Zoom,UserDefinedFilters:t.UserDefinedFilters,UserDefinedFilterExpression:t.UserDefinedFilterExpression});n.SearchTerm=this.currentUIState.SearchTerm,n.ControlName=e.controlName,this.setCurrentUIState(n)}else this.setState({rowId:null,selectedTable:null,selectedColumn:null});if(this.appModel.inRollout("interactiveMapsFix")){const{selectedTable:t}=this.state,{onRowOpened:i,interactiveRowIds:o}=this.props;if(i&&o&&t){const{rootTable:i}=this.appModel.findTableCollection(t,!0),n=o[i.name()];null!=n&&e.onRowOpened&&e.onRowOpened(i.name(),n)}}else e.onRowOpened&&e.onRowOpened(e.table.rootName(),null)}placePin(e,t,i){if(null!=e&&null!=t){const o=this.mapColumnAttribute();if(o){const n={lat:e,lng:t};o.basestType()===a.ADDRESS_TYPE&&c.default.lookupAddress(e,t,{interactive:!0}).then((i=>{let{results:o}=i;if(o&&o.length){this.hideInfoWindow(),n.address=o[0].formattedAddress;const i=this.newInfoWindow(n.address,e,t);this.setState({infoWindow:i})}})).catch(h.default.warnToDevConsole);const r=[...this.state.pendingPins||[],n];null!=i&&r.splice(i,1),this.setState({pendingPins:r})}}}placePinsConfirm(){if(this.state.placingNewPin)return this.hideInfoWindow(),void this.newRowHandler();const{filterDefaults:e,filterExpr:t}=this.props,i=[];let o=!0;const n=C.default.getLookupValues(e,t),r=this.mapColumnAttribute();if(r){o=!1;const e=r.name();this.state.pendingPins.forEach((t=>{let{lat:s,lng:l,address:d}=t;switch(r.basestType()){case a.ADDRESS_TYPE:d?i.push(g.default.extend({},n,{[e]:d,["_geo_"+e]:"".concat(s,", ").concat(l),["_latitude"+e]:String(s),["_longitude"+e]:String(l)})):o=!0;break;case a.LATLONG_TYPE:i.push(g.default.extend({},n,{[e]:s+", "+l}));break;case a.XY_TYPE:i.push(g.default.extend({},n,{[e]:p.ImageMapType.fromLatLngToXYString(s,l)}))}}))}o||(this.pushView({viewType:"form",useAnyRefs:!1,newState:{TableName:this.props.table.name(),DefaultValues:i}}),this.placePinsCancel())}placePinsCancel(){this.hideInfoWindow(),this.state.pendingPins?this.setState({pen
1dingPins:[],infoWindow:null}):this.setState({placingNewPin:null,newPinLatLng:null,newPinAddress:null,infoWindow:null})}placePinsStart(){var e;if(null===(e=this.appModel)||void 0===e?void 0:e.inRollout("multiplePinDrop")){let e=this.state.centerLat,t=this.state.centerLng;null!=e&&null!=t||null==this.map||(e=u.default.getCenterLat(this.map),t=u.default.getCenterLng(this.map)),this.placePin(e,t)}else this.setState({placingNewPin:!0})}getDraggablePinEventHandlers(){return this.placingNewPins()?{dragend:this.onPinDragEnd,dragstart:this.onPinDragStart,click:this.onPendingPinClick}:this.state.placingNewPin?{dragend:this.onPinDragEnd,dragstart:this.onPinDragStart}:null}onPinDragStart(){this.hideInfoWindow()}onPinDragEnd(e,t,i,o,n){let r={};if(this.props.mapColumn){const t=this.mapColumnAttribute(),i=e.latLng.lat(),o=e.latLng.lng();if(t)if(this.state.pendingPins)this.placePin(i,o,n);else{let e,n,s;switch(t.basestType()){case a.ADDRESS_TYPE:c.default.lookupAddress(i,o,{interactive:!0}).then((e=>{let{results:t}=e;t&&t.length&&(s=t[0].formattedAddress,this.hideInfoWindow(),n=this.newInfoWindow(s,i,o),this.setState({newPinLatLng:i+", "+o,newPinAddress:t[0],infoWindow:n}))})).catch(h.default.warnToDevConsole);break;case a.LATLONG_TYPE:case a.XY_TYPE:this.hideInfoWindow(),e=i+", "+o,n=this.newInfoWindow(e,i,o),r={newPinLatLng:e,newPinAddress:null,infoWindow:n}}}}this.onMapDragEnd(e,i,o,r)}onMapDragEnd(e,t,i,o){const n=this.props,a=n.viewAppState;if(o=o&&(o.pendingPins||o.newPinLatLng)?o:null,a){const e=this.getNewState({TableName:a.TableName,RowKey:a.RowKey||null,MapCol:n.mapColumn,MapType:this.state.mapType,CurrentLat:u.default.getCenterLat(t),CurrentLng:u.default.getCenterLng(t),SelectedTable:a.SelectedTable,SelectedColumn:a.SelectedColumn,FilterExpr:n.filterExpr,DefaultValues:n.filterDefaults,Zoom:t.getZoom(),ControlName:n.controlName,UserDefinedFilters:a.UserDefinedFilters,UserDefinedFilterExpression:a.UserDefinedFilterExpression});e.SearchTerm=this.currentUIState.SearchTerm,this.setCurrentUIState(e),o&&this.setState(o)}else this.setState(g.default.extend(o,{zoom:t.getZoom(),centerLat:u.default.getCenterLat(t),centerLng:u.default.getCenterLng(t)}))}hideInfoWindow(){const e=this.state&&this.state.infoWindow;e&&e.close()}infoWindowOffset(e){let t=this.state.pendingPins?.0015:.0025;return 15!==e&&(t=t/u.default.zoomScaling[15]*u.default.zoomScaling[e]),t}newInfoWindow(e,t,i){const o=this.map,n=u.default.api,a=o&&o.getZoom();if(!this.isCustomMap()&&a&&a<21){const r=new n.maps.InfoWindow({content:'<div class="AddressInfoWindow">'+e+"</div>",maxWidth:250,disableAutoPan:!0});return r.currentOffset=this.infoWindowOffset(a),r.setPosition(new n.maps.LatLng({lat:t+r.currentOffset,lng:i})),r.open(o),r}return null}updateInfoWindow(e){const t=this.state.infoWindow;if(t&&t.position&&this.map){const i=t.position.lat(),o=t.position.lng(),n=t.currentOffset;t.currentOffset=this.infoWindowOffset(e),t.setPosition({lat:i-n+t.currentOffset,lng:o}),t.open(this.map)}}placingNewPins(){return this.state.pendingPins&&this.state.pendingPins.length}allowMultiRowAdd(){return this.props.table.hasUniqueComputedKey()}newRowHandler(){const e=this.props.mapColumn,{filterDefaults:t,filterExpr:i}=this.props,o=C.default.getLookupValues(t,i)||{};if(e){const t=this.mapColumnAttribute(),i=this.state.newPinAddress,n=this.state.newPinLatLng,r=n?n.split(", "):[];if(n&&2===r.length&&t)switch(t.basestType()){case a.ADDRESS_TYPE:i&&(o[e]=i.formattedAddress,o["_geo_"+e]=n,o["_latitude"+e]=r[0],o["_longitude"+e]=r[1]);break;case a.LATLONG_TYPE:o[e]=n;break;case a.XY_TYPE:o[e]=p.ImageMapType.fromLatLngToXYString(r[0],r[1])}}this.pushView({viewType:"form",useAnyRefs:!1,newState:{TableName:this.props.table.name(),DefaultValues:o}}),this.placePinsCancel()}getDirectionsUrl(e,t){let i="";if(null!=e&&!this.isCustomMap()){let o="";if(!s.default.IsMobileBrowser()&&null!=l.default.lastPosition){const{latitude:e,longitude:t}=l.default.lastPosition.coords;o="".concat(e,",").concat(t)}let n="";null!=e.Latitude&&null!=e.Longitude?n="".concat(e.Latitude,",").concat(e.Longitude):t&&(n=encodeURIComponent(t));const a="saddr="+o+"&daddr="+n;i=s.default.IsIOSBrowser()||s.default.InIOSWebView()?"comgooglemapsurl://maps?"+a:"http://maps.google.com/maps?"+a}return i}makeAddRowControl(e){const t="LegacyOverlayActionsContainer GoogleMapView__legacy-overlay-action-container";if(this.state.placingNewPin||this.placingNewPins())return(0,A.jsxs)("div",{className:t,children:[(0,A.jsx)(I.Fab,{className:"add-row-cancel",onClick:this.placePinsCancel,t
1itle:this.appModel.MapActionName("Cancel"),children:(0,A.jsx)("i",{className:"fa fa-remove"})}),this.state.newPinLatLng||this.placingNewPins()?(0,A.jsx)(I.Fab,{className:"add-row-confirm",onClick:this.placePinsConfirm,title:this.appModel.MapActionName("Confirm"),navigationDelay:!0,children:(0,A.jsx)("i",{className:"fa fa-check"})}):null]});let i;const{table:o,filterDefaults:n,filterExpr:a}=this.props,s=this.appModel;if(!R.ReactRootUIConfig.isInDesktopExperience())if(o&&s&&e.hasSystemAddActions()){const t=(e.actionsForTable(o.name(),s,void 0,this.dataContext())||[]).filter((e=>"ADD_RECORD"===e.type()&&e.isAutoCreated()))[0];if(t&&t.prominence()===x.default.DISPLAY_OVERLAY){const e=()=>{const e=C.default.getLookupValues(n,a);(0,D.runAppAction)(t,{appModel:s,sourceLocationName:"Map Overlay",sourceTable:o,defaultValues:e},void 0,this.viewStackKey)};i=(0,A.jsx)(I.Fab,{className:"add-row-start",onClick:e,title:t.displayName(s,o.tableSchema),navigationDelay:!0,tableName:o.name(),actionName:t.name(),controlName:this.currentUIState.ControlName,root:"map",children:(0,A.jsx)("i",{className:"fa "+t.icon()})})}}else i=(0,A.jsx)(I.Fab,{className:"add-row-start",onClick:this.newRowHandler,title:"Add",navigationDelay:!0,children:(0,A.jsx)("i",{className:"fa fa-plus"})});return(0,A.jsxs)("div",{className:t,children:[i,this.showAddPin()&&(0,A.jsx)(I.Fab,{className:(0,r.default)({"place-pin-start":!R.ReactRootUIConfig.isInDesktopExperience()}),onClick:this.placePinsStart,title:this.appModel.MapActionName("Place pin"),children:(0,A.jsx)("i",{className:"fa fa-map-marker"})})]})}renderSlideshowPage(e,t){const i=O.AppGlobals.AppModel.FindControlsForTable(t.name(),"detail",!1);let o=null;i.length&&(o=i[0]);let n,a={};if(o){const e=O.AppGlobals.AppModel.FindTable(t.name());a=O.AppGlobals.AppModel.NavStateForView(o,e?e.Name:void 0),n=g.default.get(o,"ViewDefinition.QuickEditColumns")}return(0,A.jsx)(w.SlideshowPage,{isInline:!0,quickEditColumns:n,appModel:this.appModel,table:t,tableSchema:t.tableSchema,rowId:this.state.rowId,rowValues:e,width:400,height:this.props.height-40,fixedHeightMode:!0,slideshowDisplayMode:a.SlideshowDisplayMode,headerColumns:a.headerColumns,imageDisplayType:a.ImageDisplayType,mainSlideshowImageColumn:a.mainSlideshowImageColumn,columnOrder:a.ColumnOrder,maxNestedRows:a.MaxNestedRows,scrollbarWidth:this.scrollbarWidth.bind(this)})}rowDetailHeight(){return S.default.computeHeight(this.props)}makeDetailView(e,t){const i=this.appModel,o=t&&t.tableSchema;if(!e||!t||!o)return null;const n=this.selectedRowValues(t,e.Id);if(null==n)return null;let a;const r=n[e.MapCol];if(this.compactView()){let i=null;const s=O.AppGlobals.AppModel.FindControlsForTable(t.name(),"deck",!1);let l=null;s.length&&(l=s[0]);let d={};l&&(d=O.AppGlobals.AppModel.NavStateForView(l,t.name()));const c=this.handleRowTap;i=(0,A.jsx)(S.default,M(M({},this.props),{},{appModel:this.appModel,table:t,tableSchema:o,rowValues:n,onRowTap:c,closeHandler:this.closeDetailHandler,directionsUrl:this.getDirectionsUrl(e,r),actionColumns:d.actionColumns,actionBarEntries:d.actionBarEntries,deckSummaryColumn:d.deckSummaryColumn,imageDisplayType:d.ImageDisplayType,mainDeckImageColumn:d.mainDeckImageColumn,primaryDeckHeaderColumn:d.primaryDeckHeaderColumn,secondaryDeckHeaderColumn:d.secondaryDeckHeaderColumn,showActionBar:d.showActionBar}));const u={bottom:0};this.showDetailView()||(u.transform="translate(0, 100%)",u.MsTransform=u.transform,u.WebkitTransform=u.transform),a=(0,A.jsx)("div",{className:"GoogleMapView__detail",style:(0,j.convertToRtlWhenNecessary)(u),children:i})}else{const o=this.renderSlideshowPage(n,t),s=i.appTemplate.actions().actionsForTable(t.name(),i,void 0,this.dataContext()),l=[],d=this.getDirectionsUrl(e,r);d&&l.push(new x.default({ActionType:"NAVIGATE_URL",Icon:"fa-car",IsValid:!0,Name:(0,E.mapActionName)("Get driving directions"),Table:t.name(),ValueEvaluatable:f.default.createConcatenate(f.default.createConstantValue(d,"Url")).model}));const c=this.dataContext();if(c){if(this.showDelete(t)){const e=s.filter((e=>"DELETE_RECORD"===e.type()&&e.prominence()!==x.default.DO_NOT_DISPLAY&&e.isValidForRow(n,c))),t=e.filter((e=>e.isAutoCreated())).concat(e)[0];t&&l.push(t)}if(this.showEdit(t)){const e=s.filter((e=>"EDIT_RECORD"===e.type()&&e.isAutoCreated()&&e.prominence()!==x.default.DO_NOT_DISPLAY&&e.prominence()!==x.default.DISPLAY_PROMINENTLY&&e.isValidForRow(n,c)))[0];e&&l.push(e)}}const u=l.map((o=>(0,A.jsx)("li",{children:(0,A.jsx)("div",{className:"button-container",children:(0,A.jsx)(b.default,{appModel:i,action:o,rowId:e.Id,sourceLocationName:"Map Sidebar",sourceTable:t,displayMode:"small"})})},o.name()))),p=R.ReactRootUIConfig.isReactRoot()?{left:"".concat(this.props.width-400,"px")}
1:{};a=(0,A.jsxs)("div",{className:"GoogleMapView__sidebar",style:(0,j.convertToRtlWhenNecessary)(p),children:[(0,A.jsxs)("div",{className:"GoogleMapView__sidebar-header",style:(0,j.convertToRtlWhenNecessary)({height:40}),children:[(0,A.jsx)("ul",{className:"group-left",children:u}),(0,A.jsx)("ul",{className:"group-right",children:(0,A.jsx)("li",{children:(0,A.jsx)("span",{className:"button-container",onClick:this.closeDetailHandler,children:(0,A.jsx)("i",{className:"button fa fal fa-close"})})})})]}),o]})}return a}render(){var e,t,i,o;if(!this.shouldShow())return null;const n=this.props,a=this.appModel,{table:s,mapColumn:l,filterExpr:d,filterDefaults:c,searchQuery:p}=this.props,{rowId:h,centerLat:f,centerLng:y,selectedTable:b,selectedColumn:w,showMap:S}=this.state,x=this.rowDetailHeight(),C=this.activeTable(),I=this.activeAttribute(),O=this.baseImage(),D=this.customMapType();if(this.isCustomMap()&&!O)return null;const E=u.default.getMapItems(l,h,s,a,d,c,p,O,this.pendingTransaction),P=L(E.all);let _;C===s&&I&&I.name()===l&&(_=E.selected);const B=[],V={};if(n.isInline||(V.top=T.default.headerHeight+1,V.bottom=T.default.footerHeight),n.secondaryTableName&&n.secondaryColumn){const t={tableName:n.secondaryTableName,mapColumn:n.secondaryColumn};let i,o;i=s&&n.secondaryTableName===s.name()?s:m.default.findByName(n.secondaryTableName,a).table,i&&(o=u.default.getMapItems(n.secondaryColumn,h,i,a,d,c,p,O,this.pendingTransaction)),t.mapItems=L(null!==(e=null==o?void 0:o.all)&&void 0!==e?e:[]),n.secondaryTableName===b&&n.secondaryColumn===w&&(_=null==o?void 0:o.selected),B.push(t)}n.viewAppState||(n.width&&(V.width=n.width,V.height=n.height||250),this.fixedMode()&&(V.cursor="pointer")),R.ReactRootUIConfig.isReactRoot()&&(V.height=n.height||250);const F={click:this.onPinClick},W={click:this.onMapClick,dragend:this.onMapDragEnd,maptypeid_changed:this.onMapTypeChanged,zoom_changed:this.onMapZoomChanged};let H={};this.fixedMode()&&(H={disableDefaultUI:!0,draggable:!1,scrollwheel:!1,zoomControl:!0,disableDoubleClickZoom:!0,gestureHandling:"greedy"}),this.fullMode()&&(H={disableDefaultUI:!!this.showDetailView(),draggable:!0,scrollwheel:!0,disableDoubleClickZoom:!1,gestureHandling:"greedy"}),D&&(H=g.default.extend(H,D.mapOptions()));const U=this.appModel.appTemplate.actions();let G;this.showAdd()&&(G=this.makeAddRowControl(U));let z=null;this.showDetailView()&&null!=_&&(z=this.makeDetailView(_,C));const K=this.showDetailView()&&this.compactView()?"translate(0, -"+Math.floor(x/2)+"px)":null,Y=R.ReactRootUIConfig.isReactRoot()?{}:{transform:K,MsTransform:K,WebkitTransform:K};let q=!(this.fixedMode()||"None"===n.locationMode);const X=g.default.get(this.appModel,"AppTemplate.Presentation.HidePointsOfInterest");S&&!D||(q=!1);let Q=this.state.zoom;null==Q&&(D?Q=D.defaultZoom({focused:null!=_}):S&&(Q=15)),this.placingNewPins()&&this.allowMultiRowAdd()&&(H.draggableCursor="crosshair");const $=this.getView();let Z=$&&$.definition().MinimumClusterSize||0;return 1===Z?Z=2:Z<1&&(Z=1e8),(0,A.jsx)("div",{style:(0,j.convertToRtlWhenNecessary)(V),className:(0,r.default)("".concat(this.appModel.rolloutClassNames," BasePrimaryView GoogleMapView"),{ShowDetailView:this.showDetailView(),CompactView:this.compactView(),ReactRootMapPane:R.ReactRootUIConfig.isReactRoot()}),children:(0,A.jsxs)(N.EmulatorComponentWrapper,{applyStyleType:"topLevelView",dataVFEValues:{root:"map",table:null!==(i=null===(t=this.props.table)||void 0===t?void 0:t.name())&&void 0!==i?i:void 0,control:null!==(o=this.props.controlName)&&void 0!==o?o:void 0},useStaticPosition:!0,children:[(0,A.jsx)("div",{className:"GoogleMapView__map-pane",style:(0,j.convertToRtlWhenNecessary)(Y),children:(0,A.jsx)(v.default,M(M({},this.props),{},{appModel:this.appModel,ref:this.mapPaneRef,showMap:S,items:P,layers:B,mapOptions:H,mapType:this.state.mapType,customMapType:D,blockLinkToMaps:!!D,locationMode:n.locationMode,minimumClusterSize:Z,selectedItem:_,selectedTable:b,selectedColumn:w,zoom:Q,centerLat:f,centerLng:y,showCurrentLocation:q,hidePointsOfInterest:X,draggablePinCoordinates:this.state.pendingPins,draggablePinOptions:k,draggablePinEventHandlers:this.getDraggablePinEventHandlers(),mapEventHandlers:W,pinEventHandlers:F}))}),z,G,this.renderActionButtonPortal()]})})}}V.defaultProps={mapMode:"full"};t.default=V},488386:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.IFrameView=void 0;var n=o(i(155345)),a=i(44617),r=o(i(150198)),s=i(278965),l=i(148521);class d extends n.default{constructor(e){super(e),this.state||(this.state={})}render(){var e,t,i,o,n,d,c,u,p,h;const m=null===(t=null===(e=this.getView())||void 0===e?void 0:e.definition())||void 0===t?void 0:t.UrlColumn,f=null===(o=null===(i=this.getView())||void 0===i?void 0:i.definition())||void 0===o?void 0:o.AllowScripts,g=null===(d=null===(n=this.getView())||void 0===n?void 0:n.definition())||void 0===d?void 0:d.AllowForms,y=null===(u=null===(c=this.getView())||void 0===c?void 0:c.definition())||void 0===u?void 0:u.AllowSameOrigin;if(!this.shouldShow())return null;const v="".concat(g?"allow-forms":""," ").concat(f?"allow-scripts":""," ").concat(y?"allow-same-origin":"");if(!(null===a.dynamicRollouts||void 0===a.dynamicRollouts?void 0:a.dynamicRollouts.includeByOwnerId("AllowIFrameView")))return(0,l.jsx)("div",{});let b;const{isInline:w,table:S,rowId:x}=this.props;if(w&&x&&S){const e=S.lookupTableRow(x);b=r.default.toHttpsUrl(r.default.urlValueFromWireFormat(null==e?void 0:e.get(m)).url)}else b=r.default.toHttpsUrl(null===(h=null===(p=this.getView())||void 0===p?void 0:p.definition())||void 0===h?void 0:h.IFrameUrl);return b&&(null===a.dynamicRollouts||void 0===a.dynamicRollouts?void 0:a.dynamicRollouts.includeByOwnerId("AllowIFrameView"))?(0,l.jsx)("iframe",{src:b,sandbox:v,style:(0,s.c
1onvertToRtlWhenNecessary)({width:this.props.width,height:this.props.height,border:0})}):(0,l.jsx)("div",{children:"No URL set"})}}t.IFrameView=d},186189:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.LegacyOverlayActionsDataTestids=t.FAB_LIMIT=void 0;var n,a=o(i(385857)),r=o(i(571524)),s=i(318927),l=i(351101),d=i(300431),c=i(664583),u=i(278965),p=i(148521);!function(e){e.Fab="overlay-actions-fab"}(n||(t.LegacyOverlayActionsDataTestids=n={}));const h=t.FAB_LIMIT=4;class m extends d.ViewAwareComponent{constructor(e){super(e),this.actionButtonClick=e=>{const t=(0,l.getAppModel)(),{name:i,sourceTable:o,filterDefaults:n,filterExpr:r,rowId:s}=this.props,d=a.default.getLookupValues(n,r);(0,c.runAppAction)(e,{appModel:t,sourceTable:o,sourceLocationName:i+" Overlay",defaultValues:d,rowId:s},void 0,this.viewStackKey)},this.state={iosZindexHack:!1}}componentDidMount(){var e;(null===(e=(0,l.getAppModel)())||void 0===e?void 0:e.inRollout("iosActionButtonFix"))&&r.default.InIOSWebView()&&!1===this.state.iosZindexHack&&requestAnimationFrame((()=>{this.setState({iosZindexHack:!0})}))}render(){var e;const t=(0,l.getAppModel)(),{actions:i,sourceTable:o,rowId:a}=this.props,r=null===(e=null==o?void 0:o.lookupTableRow(a,this.pendingTransaction))||void 0===e?void 0:e.values,d=this.state.iosZindexHack?{zIndex:6}:void 0;return(0,p.jsx)("div",{className:"LegacyOverlayActionsContainer",children:i.slice(0,h).map(((e,i)=>{var a;return(0,p.jsx)(s.Fab,{"data-testid":"".concat(n.Fab,"-").concat(e.name()),style:(0,u.convertToRtlWhenNecessary)(d),onClick:()=>this.actionButtonClick(e),title:e.displayName(t,null==o?void 0:o.tableSchema,r),actionName:e.name(),tableName:null==o?void 0:o.name(),controlName:this.props.name,root:null===(a=this.currentUIState)||void 0===a?void 0:a.Root,children:(0,p.jsx)("i",{className:"fa "+e.icon()})},i)}))})}}t.default=m},347453:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.SPEED_DIAL_FAB_LIMIT=t.NORMAL_FAB_LIMIT=t.MobileOverlayActionsDataTestids=t.MobileOverlayActions=void 0;var n,a=i(667294),r=o(i(386010)),s=i(249492),l=o(i(480366)),d=o(i(378513)),c=i(425910),u=i(56749),p=o(i(385857)),h=i(351101),m=i(664583),f=i(318927),g=i(14042),y=i(29827),v=i(303622),b=i(148521);!function(e){e.MobileFab="overlay-actions-fab"}(n||(t.MobileOverlayActionsDataTestids=n={}));const w=t.NORMAL_FAB_LIMIT=2,S=t.SPEED_DIAL_FAB_LIMIT=6,x=new Set(["form","onboarding","dashboard","map"]),C=(0,s.makeStyles)((e=>{const t=e=>{let{isSpeedDialOpen:t}=e;return t?(0,u.themeColor)("speedDialOpenFabColor"):(0,u.themeColor)("themeMainColor")};return{addRowControl:{position:"absolute",bottom:0,right:0,zIndex:5,WebkitTransform:"translate3d(0,0,0)","& > .button-position-0":{bottom:"16px",position:"absolute",right:"18px"},"& > .button-position-1":{bottom:"86px",right:"18px",position:"absolute"}},speedDial:{position:"absolute",bottom:"16px",right:"18px"},tooltipLabel:{whiteSpace:"nowrap",maxWidth:"60vw",textOverflow:"ellipsis",overflow:"hidden",textAlign:"center",fontSize:"0.778rem",height:"40px",lineHeight:"40px",padding:"0px 16px",backgroundColor:(0,u.themeColor)("speedDialActionTooltipLabelColor"),color:(0,u.themeColor)("speedDialTooltipLabelColor")},backdrop:{zIndex:1001},speedDialActionFab:{borderRadius:"8px",height:"44px",width:"44px",color:e.palette.primary.contrastText,backgroundColor:(0,u.themeColor)("themeMainColor"),"&:hover":{backgroundColor:(0,u.themeColor)("themeMainColor")}},speedDialFab:{borderRadius:"16px","&:hover":{backgroundColor:t},background:t},speedDialOpenIcon:{color:(0,u.themeColor)("speedDialOpenIconColor")},fabIcon:{fontSize:"24px"},buttonEEOutline:{margin:"-10px -17px",width:"47px",height:"44px"},tooltipEEOutline:{margin:"0 -16px"}}}));t.MobileOverlayActions=e=>{let{actions:t,sourceTable:i,filterDefaults:o,filterExpr:u,rowId:T,viewName:I}=e;var R;const O=(0,h.getAppModel)(),{viewStackKey:D}=(0,a.useContext)(g.ViewStackKeyContext),[N,j]=(0,a.useState)(!1),E=C({isSpeedDialOpen:N}),A=(0,g.useViewStateSelector)(y.getViewType),P=(0,g.useReactAppSelector)(y.getViewInEditMode);if(x.has(A||"")||P)return null;const M=(e,t)=>{"toggle"===t&&j(!0)},k=(e,t)=>{"blur"!==t&&"toggle"!==t&&"escapeKeyDown"!==t||j(!1)},_=null===(R=null==i?void 0:i.lookupTableRow(T))||void 0===R?void 0:R.values,B=e=>{const t=p.default.getLookupValues(o,u);(0,m.runAppAction)(e,{appModel:O,sourceTable:i,sourceLocationName:"".concat(I," Overlay"),defaultValues:t,rowId:T},void 0,D),j(!1)};if(t.length<=w){const e=t.slice(0,w);return(0,b.jsx)("div",{className:"LegacyOverlayActionsContainer",children:e.map(((e,t)=>(0,b.jsx)(f.Fab,{"data-testid":"".concat(n.MobileFab,"-").concat(e.name()),onClick:()=>B(e),title:e.displayName(O,null==i?void 0:i.tableSchema,_),actionName:e.n
1ame(),tableName:null==i?void 0:i.name(),controlName:I,root:A,children:(0,b.jsx)("i",{className:(0,r.default)("fa ".concat(e.icon()),E.fabIcon)})},t)))})}{const e=t.slice(0,S);return(0,b.jsxs)("div",{children:[(0,b.jsx)(v.EmulatorComponentWrapper,{shouldClearHoveredElement:!0,dataVFEValues:{},children:(0,b.jsx)(s.Backdrop,{open:N,className:E.backdrop})}),(0,b.jsx)(c.SpeedDial,{className:E.speedDial,classes:{fab:E.speedDialFab},ariaLabel:"Actions Control",icon:(0,b.jsx)(c.SpeedDialIcon,{icon:(0,b.jsx)(d.default,{}),openIcon:(0,b.jsx)(l.default,{classes:{root:E.speedDialOpenIcon}})}),onClose:k,onOpen:M,open:N,children:e.map(((e,t)=>{const o=e.displayName(O,null==i?void 0:i.tableSchema,_);return(0,b.jsx)(c.SpeedDialAction,{color:"primary",tooltipOpen:!0,"data-testid":"".concat(n.MobileFab,"-").concat(e.name()),onClick:()=>B(e),"aria-label":o,"aria-hidden":!N,title:o,icon:(0,b.jsx)(v.EmulatorComponentWrapper,{dataVFEValues:{action:e.name(),table:null==i?void 0:i.name()},outlineDivClassName:E.buttonEEOutline,children:(0,b.jsx)("i",{className:"fa ".concat(e.icon())})}),tooltipTitle:(0,b.jsx)(v.EmulatorComponentWrapper,{dataVFEValues:{action:e.name(),table:null==i?void 0:i.name()},outlineDivClassName:E.tooltipEEOutline,children:o}),classes:{staticTooltipLabel:E.tooltipLabel,fab:E.speedDialActionFab}},t)}))})]})}}},409022:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(496486)),a=i(667294),r=i(695386),s=i(281294),l=o(i(401890)),d=i(56749),c=o(i(372380)),u=o(i(571524)),p=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=v(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}(i(21870)),h=o(i(593186)),m=i(166089),f=i(278965),g=i(557310),y=i(148521);function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(v=function(e){return e?i:t})(e)}const b=(0,d.cacheMuiTheme)((()=>({palette:{primary:{main:(0,d.themeColor)("actionIcon")},secondary:{light:"#ff6600",main:"#ff4400",contrastText:"#fff"}},typography:{useNextVariants:!0,fontFamily:"inherit"}})));class w extends a.Component{constructor(e){super(e),this.lastUpdate=new Date,this.getScrollContainerOrDefault=()=>{let e;return this.props.getScrollContainer&&(e=this.props.getScrollContainer()),e||$("#ControlWarehouse").get(0)},this.handleRef=e=>{this.pullToRefreshRef=e},this.handleRefresh=this.handleRefresh.bind(this)}get appModel(){return this.props.appModel||m.AppGlobals.AppModel}disabled(){return this.props.disabled||!n.default.get(this,"appModel.AppTemplate.Behavior.PullToSync")}shouldShow(){return p.default.syncState.ui===p.SyncUI.Detailed}handleRefresh(){this.disabled()||m.AppGlobals.StateChangeHandler.RefreshAppData({preferredUI:p.SyncUI.Detailed,initiatedBy:"User"})}getMinutesSincePreviousUpdate(){const e=new Date-this.lastUpdate;return Math.round(e%864e5%36e5/6e4)}getPreviousUpdateString(){return 0===this.getMinutesSincePreviousUpdate()?"Last updated less than 1m ago.":"Last updated "+this.getMinutesSincePreviousUpdate()+"m ago."}getActivateState(){return(0,y.jsx)("div",{className:"Inner",children:(0,y.jsxs)("div",{className:"TextAndIcons",children:[(0,y.jsx)("i",{className:"far fa-long-arrow-alt-up",style:(0,f.convertToRtlWhenNecessary)({fontSize:30,opacity:.4,marginRight:5})}),(0,y.jsxs)("div",{style:(0,f.convertToRtlWhenNecessary)({marginLeft:5}),children:[(0,y.jsx)("div",{className:"Text",children:"Release to sync."}),(0,y.jsx)("div",{className:"SmallText",children:this.getPreviousUpdateString()})]})]})})}getFinishedState(){return(0,y.jsx)("div",{className:"Inner"})}getReleaseState(){var e;const{classes:t}=this.props;return(0,y.jsx)("div",{className:"Inner",children:(0,y.jsxs)("div",{className:"TextAndIcons",children:[(0,y.jsxs)("div",{style:(0,f.convertToRtlWhenNecessary)({marginLeft:5}),children:[(0,y.jsx)("div",{className:"Text",children:null!==(e=p.default.syncState.message)&&void 0!==e?e:""}),(0,y.jsx)("div",{className:"SmallText",children:this.getPreviousUpdateString()})]}),(0,y.jsx)(l.default,{className:t.button,style:(0,f.convertToRtlWhenNecessary)({position:"absolute",right:15}),onClick:()=>p.default.syncState.close(),children:(0,y.jsx)("i",{className:"far fa-times",style:(0,f.convertToRtlWhenNecessary)({fontSize:18,opacity:.4})})})]})})}getDeactivateState(){return(0,y.jsx)("div",{className:"Inner",children:(0,y.jsxs)("div",{className:"TextAndIcons",children:[(0,y.jsx)("i",{className:"far fa-long-arrow-alt-down",style:(0,f.convertToRtlWhenNecessary)({fontSize:30,opacity:.4,marginRight:5})}),(0,y.jsxs)("div",{style:(0,f.convertToRtlWhenNecessary)({marginLeft:5}),children:[(0,y.jsx)("div",{className:"Text",children:"Pull to sync."}),(0,y.jsx)("div",{className:"SmallText",children:this.getPreviousUpdateString()})]})]})})}getErrorStatus(){if(p.default.syncState.error&&this.shouldShow()){const e=p.default.syncState.error.split("\n");return(0,y.jsxs)("div",{className:"Error",children:[(0,y.jsxs)("div",{className:"ErrorText",onClick:()=>{2===e.length?m.AppGlobals.ViewManager.ShowInfoDialog(e[0],e[1]):m.AppGlobals.ViewManager.ShowInfoDialog("Error syncing data",p.default.syncState.error),p.default.syncState.error=void 0},children:[(0,y.jsx)("i",{className:"ErrorIcon far fa-exclamation-triangle"}),e[0]]}),(0,y.jsx)("i",{className:"ErrorClose far fa-times",onClick:()=>p.default.syncState.error=void 0})]})}return(0,y.jsx)("div",{})}isPullingDown(){return!!n.default.get(this,"pullToRefreshRef.contentRef.style.transform")&&!this.isPulledDown()}isPulledDown(){return p.default.syncState.refreshing&&this.shouldShow()}render(){const{paused:e,children:t}=this.props;let i="PullToSyncView";return this.disabled()?g.ReactRootUIConfig.isInMobileExperience()?(0,y.jsx)(y.Fragment,{children:t}):(i+=i+"--disabled",(0,y.jsx)(r.MuiThemeProvider,{theme:b(),children:(0,y.jsx)("div",{className:"PullToSyncView PullToSyncView--disabled",children:t})})):(h.default.Debug()&&(window.pullToSync=this.handleRefresh.bind(this)),(0,y.jsx)(r.MuiThemeProvider,{theme:b(),children:(0,y.jsx)(c.default,{ref:this.handleRef,refreshing:this.isPulledDown(),disabled:e,onRefresh:this.handleRefresh,damping:500,indicator:{deactivate:this.getDeactivateState(),activate:this.getActivateState(),release:this.getReleaseState(),finish:this.getFinis
1hedState()},getScrollContainer:this.getScrollContainerOrDefault,scrollContainer:this.getScrollContainerOrDefault(),prefixCls:i,useTranslate3d:u.default.Supports3dTransform(),distanceToRefresh:55,children:(0,y.jsxs)("div",{style:(0,f.convertToRtlWhenNecessary)(g.ReactRootUIConfig.isReactRoot()?void 0:(0,f.convertToRtlWhenNecessary)({position:"relative"})),children:[this.getErrorStatus(),t]})})}))}}t.default=(0,r.withStyles)((()=>({root:{flexGrow:1},progress:{margin:13},button:{color:"inherit"}})))((0,s.observer)(w))},730234:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SearchViewDataTestIds=t.SEARCH_VIEW_SUGGEST_DEBOUNCE_MS=void 0;var n=o(i(496486)),a=o(i(155345)),r=o(i(386010)),s=o(i(112963)),l=i(803444),d=o(i(797193)),c=o(i(571524)),u=o(i(112368)),p=o(i(593186)),h=i(318926),m=i(218546),f=i(263198),g=i(557310),y=i(166089),v=i(149313),b=i(303622),w=i(148521);const S=t.SEARCH_VIEW_SUGGEST_DEBOUNCE_MS=1e3;var x;!function(e){e.Form="search-view-form"}(x||(t.SearchViewDataTestIds=x={}));class C extends a.default{constructor(e){super(e),this._isMounted=!1,this.suggestDebounced=n.default.debounce(this._suggest.bind(this),S),this.speechRecognition=new d.default,this.handleChange=this.handleChange.bind(this),this.handleSubmit=this.handleSubmit.bind(this),this.speechToText=this.speechToText.bind(this),this.runSearch=this.runSearch.bind(this),this.track=this.track.bind(this),this.startSpeech=this.startSpeech.bind(this),this.stopSpeech=this.stopSpeech.bind(this),this.onSpeechCompletedMobile=this.onSpeechCompletedMobile.bind(this),this.onSpeechPartialResult=this.onSpeechPartialResult.bind(this),this.state={query:"",midInput:!1,resultIsCurrent:!1,resultAppLink:"",resultDescription:"",relatedResults:null,recording:!1,currentState:null,searchPending:!1,suggestions:[],promptForFeedback:!0,previousQuery:""}}track(e){h.logger.logAppEvent({eventName:e})}componentDidMount(){super.componentDidMount(),this._isMounted=!0,this.suggestDebounced()}componentDidUpdate(e,t){super.componentDidUpdate(e,t);const i=y.AppGlobals.AppState.ParseStateFromHash(t.resultAppLink),o=y.AppGlobals.AppState.ParseStateFromHash(this.state.resultAppLink);o&&"form"===o.Root&&(i&&"form"===i.Root||((0,v.$TSFixMeMaybeNull)(o.FormUIState),o.TableName=o.FormUIState.TableName,y.AppGlobals.StateChangeHandler.SwitchApp("#"+this.state.resultAppLink),this.setState({resultAppLink:""})))}componentWillUnmount(){this._isMounted=!1}UNSAFE_componentWillReceiveProps(e){e.resultAppLink&&this.setState({resultAppLink:e.resultAppLink})}_suggest(){const e="/api/template/"+this.appModel.AppTemplate.Id+"/suggestions",t={query:this.state.query,deepLink:this.state.resultAppLink,appId:this.appModel.AppTemplate.Id,currentState:this.state.currentState};$.postJSON(e,t,(e=>{this._isMounted&&this.setState({suggestions:e})}),(e=>{p.default.ReportErrorOnce({errorMessage:"Error calling suggestions in SearchView:suggest()",responseText:e})}))}startSpeech(){this.setState({recording:!0});try{this.speechRecognition.start().then((e=>{this.setState({query:e}),this.runSearch(e,"Speech"),this.stopSpeech()})).catch(this.stopSpeech)}catch(e){this.stopSpeech()}}stopSpeech(){this.setState({recording:!1});try{this.speechRecognition.stop()}catch(e){}}speechToText(){c.default.InAndroidWebView()||c.default.InIOSWebView()?this.state.recording?(this.setState({recording:!1}),f.JeeneeBrowserAPI.stopSpeechRecognition()):(this.setState({recording:!0}),f.JeeneeBrowserAPI.startSpeechRecognition(this.onSpeechCompletedMobile,this.onSpeechPartialResult)):this.state.recording?this.stopSpeech():this.startSpeech()}onSpeechCompletedMobile(e){this.state.recording&&(this.setState({recording:!1}),e.length>1&&(this.setState({query:e}),this.runSearch(e,"Speech")))}onSpeechPartialResult(e){this.state.recording&&e.length>1&&this.setState({query:e})}makeRequest(e){return{query:e,deepLink:this.state.resultAppLink,appId:this.appModel.AppTemplate.Id,currentState:this.state.currentState}}runSearch(e,t){if(!e||!e.trim())return;this.track(m.AppEventName.SearchView),this.setState({searchPending:!0});const i=this,o="/api/template/"+this.appModel.AppTemplate.Id+"/query",n=this.makeRequest
1(e);$.postJSON(o,n,(t=>{if(this.setState({searchPending:!1}),t&&t.length>0){const o=t[0];i.setState({midInput:!1,resultAppLink:o.DeepLink,currentState:o.CurrentState,resultDescription:o.Description,relatedResults:t.slice(1),previousState:n.currentState,previousQuery:e,promptForFeedback:!0}),i.suggestDebounced(),this.track(m.AppEventName.SearchViewSuccess)}else this.track(m.AppEventName.SearchViewFailure)}),(()=>{this.setState({searchPending:!1}),this.track(m.AppEventName.SearchViewFailure)}))}handleChange(e){this.setState({query:e.target.value,midInput:!0})}handleSubmit(e){e.preventDefault();const t=this.state.query;this.setState({query:""}),this.runSearch(t,"Text")}navigateToView(e,t,i){let o;o=e?y.AppGlobals.InputHandler.rootStateForControl(e,i):y.AppGlobals.InputHandler.rootStateForViewType(t,i),y.AppGlobals.AppState.MutateState(o,"push-retain-search")}renderRelatedResults(){const e=this.state.suggestions;if(!e||0===e.length)return"";const t=e.map(((e,t)=>t>2?"":(0,w.jsx)("span",{className:"SearchView__related-result",children:e.Description},t)));return(0,w.jsxs)("div",{className:"SearchView__related-results",children:[(0,w.jsx)("span",{children:"Some things you could ask: "}),t]})}renderQueryResult(e){let t,i,{appLink:o,cellWidth:n}=e;if(!o)return"";const a=y.AppGlobals.AppState.ParseStateFromHash(o);if((0,v.$TSFixMeMaybeNull)(a),a.Root&&!g.ReactRootUIConfig.isReactRoot()){y.AppGlobals.AppState.KnownStates[a.Root].PopulateState(a)}const r=y.AppGlobals.AppState.GetSpecificState(a),d=a.ControlName,c=this.appModel.appTemplate.getView(d);if(c?(t=c.table(),i=c.viewType()):(t=r&&r.TableName,i=a.Root||"table"),t&&i){if("form"===i)return null;const e="SearchView__entry";return(0,w.jsxs)("div",{className:e,children:[(0,w.jsx)("div",{className:"SearchView__entry-header",children:(0,w.jsx)(s.default,{className:"SearchView__entry-title",navigationDelay:!0,onTap:this.navigateToView.bind(this,undefined,i,r),children:this.state.resultDescription})}),(0,w.jsx)("div",{className:"SearchView__view",children:(0,w.jsx)(l.LegacyInlineView,{disableRowSwipe:"detail"===i,tableName:t,controlName:d,view:c,viewType:i,viewState:r,width:n,height:this.props.height-100,parentId:this.id(),parentViewStackKey:this.viewStackKey})})]})}return(0,w.jsx)("div",{children:"Hmm! Something wrong."})}render(){var e;if(!this.shouldShow())return null;let t=null,i="";this.state.searchPending?(t=(0,w.jsx)("i",{className:"fa fa-ellipsis-h fa-fw","aria-hidden":"true"}),i="Processing voice input"):this.state.recording?(t=(0,w.jsx)("i",{className:"fa fa-circle fa-fw","aria-hidden":"true"}),i="Stop recording"):(t=(0,w.jsx)("i",{className:"fa fa-microphone fa-fw","aria-hidden":"true"}),i="Start recording");let o="";return o=this.state.suggestions&&0!==this.state.suggestions.length?this.state.suggestions[0].Description:"what are you looking for?",(0,w.jsx)(b.EmulatorComponentWrapper,{containerStyles:{height:"100%"},dataVFEValues:{root:"search",control:null!==(e=this.currentUIState.ControlName)&&void 0!==e?e:void 0},children:(0,w.jsxs)("div",{className:(0,r.default)(this.appModel.rolloutClassNames,"BasePrimaryView","SearchView"),children:[(0,w.jsx)("form",{onSubmit:this.handleSubmit,"data-testid":x.Form,children:(0,w.jsxs)("div",{className:"SearchView__search-box",children:[(0,w.jsx)("input",{placeholder:o,type:"text",value:this.state.query,onChange:this.handleChange}),window.webkitSpeechRecognition||u.default.SupportsSpeechRecognition()?(0,w.jsx)("button",{type:"button",className:"SearchView__search-box-speech",onClick:this.speechToText,tabIndex:"2","aria-label":i,children:t}):"",(0,w.jsx)("button",{className:"SearchView__search-box-search",type:"button",onClick:this.handleSubmit,"aria-label":"Search",children:(0,w.jsx)("i",{className:"fa fa-search","aria-label":"Search","aria-hidden":"true"})})]})}),this.renderRelatedResults({relatedResults:this.state.suggestions}),this.renderQueryResult({appLink:this.state.resultAppLink,cellWidth:this.containerWidth()})]})})}}t.default=C},791899:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TableSubscriptionAPI=void 0;var o=i(351101);t.TableSubscriptionAPI=new class{constructor(){this.subscriptions={}}subscribeToColumn(e,t,i,n){var a;if(!e||!t||!i)return void(n&&n(null));const{rootTable:r,rootTableSchema:s}=(null===(a=(0,o.getAppModel)())||void 0===a?void 0:a.findTableCollection(e))||{},l=null==r?void 0:r.lookupTableRow(t),d=null==s?void 0:s.findAttributeByName(i);if(d&&l){const e={columnValue:l.get(i),row:l,attribute:d,rowState:l.rowState};null==n||n(e)}else null==n||n(null)}unsubscribeFromColumn(e,t,i,o){delete this.subscriptions[e+"/"+t+"/"+i],null==o||o(null)}}},324675:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.allowTableEditMode=G,t.default=void 0;var n=o(i(238416)),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=V(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}(i(667294)),r=o(i(386010)),s=o(i(496486)),l=o(i(138138)),d=o(i(621673)),c=o(i(329594)),u=o(i(401890)),p=i(281294),h=o(i(112963)),m=o(i(59775)),f=i(21870),g=o(i(385857)),y=o(i(155345)),v=o(i(676970)),b=o(i(367418)),w=i(714611),S=o(i(17926)),x=o(i(526382)),C=o(i(409022)),T=o(i(702671)),I=o(i(571524)),R=o(i(593186)),O=i(56749),D=i(57846),N=i(166089),j=i(148448),E=i(557310),A=i(303622),P=i(278965),M=i(44617),k=i(692479),_=o(i(819433)),B=i(580655),L=i(148521);function V(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(V=function(e){return e?i:t})(e)}function F(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function W(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?F(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):F(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}let H=!E.ReactRootUIConfig.isInMobileExperience();const U=e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()};function G(e,t){if(!e||!t)return!1;const i=t.appTemplate.getView(e);if(!i)return!1;const o=i.definition(),{table:n}=t.findTableCollection(i.table());return!(!n||!t)&&!(!o.EnableQuickEdit||!n.allowsUpdate(t))}class z{get draggingX(){return Math.abs(this.deltaX)>this.HORIZONTAL_SCROLLING_THRESHOLD_PX}get draggingY(){return Math.abs(this.deltaY)>this.HORIZONTAL_SCROLLING_THRESHOLD_PX}get onlyDraggingX(){return this.draggingX&&!this.draggingY}get onlyDraggingY(){return this.draggingY&&!this.draggingX}constructor(){this.HORIZONTAL_SCROLLING_THRESHOLD_PX=10,this.reset()}reset(){this.deltaX=0,this.deltaY=0,this.dx=0,this.dy=0,this.lastX=null,this.lastY=null}update(e){const t=this,i=e.touches[0].clientX,o=e.touches[0].clientY,n=null!=t.lastX?i-t.lastX:0,a=null!=t.lastY?o-t.lastY:0;t.dx=n,t.dy=a,t.deltaX+=n,t.deltaY+=a,t.lastX=i,t.lastY=o}}class K extends y.default{constructor(e){super(e),this.onHorizontalScrollContainerMount=e=>{this.horizontalScrollContainer=e},this.freezeColumnEnabled=(e,t,i)=>{const o=this.props.width;return this.appModel.inRollout("freezeFirstColumn")&&0===e&&i.length>2&&(t.isKey()||t.isLabel())&&"number"==typeof o&&i[0].columnWidth<o/2},this.handleAndroidBackClick=()=>!!this.inSelectionMode()&&((0,_.default)().dispatch((0,k.mutateView)({ViewState:{selected:this.inSelectionMode()?void 0:[]},ViewStackKey:this.viewStackKey})),!0),this.state={deltaColumnWidth:[]},this.tableRowComponents=[],this.focusRowByRowIndex=this.focusRowByRowIndex.bind(this),this.drilldownAllSelected=this.drilldownAllSelected.bind(this),this.handleRowTap=this.handleRowTap.bind(this),this.handleRowLongPress=this.handleRowLongPress.bind(this),this.handleResize=this.handleResize.bind(this);const t=e=>{this.scrollContainer&&this.state.currentInteraction!==e.name&&(R.default.logToDevConsole("transition from",this.currentInteractionState.name,"to",e.name),this.setState({currentInteraction:e.name}))},i=new z,o=this.handleRowTap.bind(this),n=this.handleRowLongPress.bind(this);let a;const r={name:"PULLING_DOWN",allowPullToSync:!0,allowSwipe:!1,allowScroll:!1,handleDragEnd:()=>t(a)},s={name:"HORIZONTAL_SCROLLING",allowPullToSync:!1,allowSwipe:!0,allowScroll:!0,handleDragEnd:()=>{i.reset(),t(a)}};a={name:"IDLE",allowPullToSync:!0,allowSwipe:!0,allowScroll:!0,handleRowTap:o,handleRowLongPress:n,handleDrag:e=>{i.update(e),this.pullRef&&this.pullRef.isPullingDown()&&i.onlyDraggingY?t(r):i.onlyDraggingX&&t(s)},handleDragEnd:()=>{i.reset()}},this.stateMachine={PULLING_DOWN:r,HORIZONTAL_SCROLLING:s,IDLE:a},this.state.currentInteraction=a.name,this.scrollBlocker=e=>{!this.currentInteractionState.allowScroll&&e.cancelable&&(e.preventDefault(),e.stopPropagation())},document.addEventListener("touchmove",this.scrollBlocker,{passive:!1}),this.registerAndroidBackOverride()}get currentInteractionState(){return this.stateMachine[this.state.currentInteraction]||this.stateMachine.IDLE}componentDidMount(){super.componentDidMount(),H&&(this.deferTimeout=setTimeout((()=>{H=!1,this.setState(this.state)}),100))}componentWillUnmount(){clearTimeout(this.deferTimeout),E.ReactRootUIConfig.isReactRoot()&&B.backNavigation.removeOverride(this.handleAndroidBackClick)}UNSAFE_componentWillReceiveProps(e){if(!E.ReactRootUIConfig.isReactRoot()&&this.props.quickEditMode&&!e.quickEditMode){this.getTransaction().started&&this.endTransaction()}this.groupByState.updateProps(e)}
1onRowMount(e,t){this.tableRowComponents[e]=t}allowQuickEditMode(){const{controlName:e}=this.props;return G(e,this.appModel)&&!this.groupByState.drilldownMode()}allowSelectionMode(){return super.allowSelectionMode()&&!this.groupByState.drilldownMode()&&!this.inMultiRowEditMode()}drilldownAllSelected(){this.groupByState.drillDownAll("fastTable")}sortByHeaderSelected(e){const t=e.name(),i=this.getCurrentSortObject();let o="Ascending";i&&i.Column===t&&(o="Ascending"===i.Order?"Descending":"Ascending"),this.groupByState.sort(t,o)}getCurrentSortObject(){const e=this.groupByState.groupBy();let t;if(!e||!e.length){const e=this.groupByState.sortBy();e&&(t=e[0])}return t}handleResize(e,t){const i=Object.assign({},this.state.deltaColumnWidth);i[e]=(0,P.shouldApplyRtlStyles)()?(i[e]||0)-t.deltaX:(i[e]||0)+t.deltaX,this.setState({deltaColumnWidth:i})}renderItem(e,t,i,o,n,r,s){var l;const{handleRowTap:d,handleRowLongPress:c}=this.currentInteractionState;let u=null;const p=n.tableSchema;let h,m;if(i&&(u=p.findAttributeByName(i),u||R.default.warnToDevConsole("Could not find groupingAttribute with name",i)),t){const e=t[s];h=e===s,m=(s-e)%2==1}else h=!1,m=s%2==0;if(e[s]===this.groupByState.DRILLDOWN_ALL_SYMBOL())return(0,L.jsx)(x.default,{text:this.appModel.MapActionName("All"),onSelect:this.drilldownAllSelected,index:s},"special-all"+o);if(u&&h){const t=e[s],i=t.length&&t[0][u.name()],o="".concat(i,"_gh_").concat(s,"_").concat(this.groupByState.inlinePosition()),n=this.props.width;let l=n||window.innerWidth;"number"==typeof l&&(l-=(I.default.scrollbarWidth()||0)+1);const d=(0,w.isAttributeColumnLayout)(r[0])&&this.freezeColumnEnabled(0,r[0].attribute,r)?{position:"sticky",left:0,zIndex:20,width:l+"px"}:null;return(0,a.createElement)(S.default,W(W({},this.props),{},{innerStyle:Object.assign(Object.assign({},d),{height:(0,w.rowHeight)()}),appModel:this.appModel,rows:t,attribute:u,tableSchema:p,groupAggregate:this.props.groupAggregate,selectionMode:this.inSelectionMode(),index:s,key:o,viewType:"table"}))}{const t=e[s],i=t[this.props.tableSchema.keyAttribute().name()],u=n.lookupTableRow(i,this.pendingTransaction),h=u&&u.timestamp,f="".concat(i,"_").concat(s,"_").concat(this.groupByState.inlinePosition());Array.isArray(t)&&R.default.warnToDevConsole("Table View: row passed in is an array! --- 
1should be an object");const g=this.getTransaction(),y=!!(null==g?void 0:g.wasModified(this.props.table.rootName(),i));return(0,a.createElement)(b.default,W(W({},this.props),{},{view:this.appModel.appTemplate.getView(this.props.controlName),appModel:this.appModel,forceUpdate:h,ref:this.onRowMount.bind(this,s),layout:r,rowValues:t,rowId:i,rowIndex:s,tableSchema:p,minimalView:!o,allowTaps:!o,quickEditMode:this.inMultiRowEditMode(),disableNavigation:this.props.disableNavigation||this.inMultiRowEditMode(),useTransactions:!0,wasModified:y,entryAttributes:p.allAttributes(),groupAggregate:this.props.groupAggregate,groupBy:this.groupByState.groupBy(),filterExpr:this.groupByState.filterExpr(),filterDefaults:this.groupByState.filterDefaults(),highlighted:i===this.props.rowId||(null===(l=this.props.interactiveRowIds)||void 0===l?void 0:l[n.rootName()])===i,translucentMode:this.props.translucentMode,onRowLongPress:c,focusRowByRowIndex:this.focusRowByRowIndex,onRowTap:d,isSelected:this.rowIsSelected(i),isLastToggled:this.rowIsLastToggled(i),selectionMode:this.inSelectionMode(),key:f,index:s,isOdd:m,drilldownColumn:o,isFreezingEnabled:this.freezeColumnEnabled}))}}focusRowByRowIndex(e,t){const i=this.tableRowComponents[e];if(i&&i.formEntries){const e=i.formEntries[t.name()];if(e)return void e.focus()}document.activeElement.blur()}handleRowTap(e,t,i){this.groupByState.drilldownMode()?this.groupByState.drillDown(e,i):super.handleRowTap(e,t)}getPreviousGroupByValue(e){const t=N.AppGlobals.AppState.getPreviousGroupByColumnName();return t&&e.length>0&&this.groupByState.filterExpr()?e[0][t]:null}UNSAFE_componentWillMount(){this.groupByState=new T.default(this.props,this.viewStackKey)}renderSortArrow(e){let{visible:t,sortOrder:i}=e;return(0,L.jsx)("span",{style:(0,P.convertToRtlWhenNecessary)({visibility:t?"visible":"hidden"}),children:(0,L.jsx)(u.default,{"aria-label":"arrow",style:(0,P.convertToRtlWhenNecessary)({padding:"3px"}),children:"Ascending"===i?(0,L.jsx)(c.default,{titleAccess:t?"Ascending sort arrow":void 0,fontSize:"small",style:(0,P.convertToRtlWhenNecessary)({verticalAlign:"middle",fontSize:"0.8125rem",color:(0,O.themeColor)("primaryText")})}):(0,L.jsx)(d.default,{titleAccess:t?"Descending sort arrow":void 0,fontSize:"small",style:(0,P.convertToRtlWhenNecessary)({verticalAlign:"middle",fontSize:"0.8125rem",color:(0,O.themeColor)("primaryText")})})})})}renderHeaderColumn(e){let{index:t,attributeName:i,actionName:o,headerHeight:n,columnWidth:s,isCompact:l,isSortedColumn:d,isFilterable:c,sortOrder:u,text:p,shouldRightAlign:m,onTap:f,onResize:g,isFrozenColumn:y}=e;const v=(0,r.default)("TableView__header-column",{"TableView--header-column-compact":l,"TableView__header-frozen-shadow":y&&!I.default.IsIOSBrowser()}),b=null!=u,S=(0,w.computeFinalCellWidth)({layoutWidth:s,isFilterable:c,isSortable:b}),x=l?w.columnPadding/2:0,C=w.columnPadding-x,T=M.dynamicRollouts.includeByOwnerId("FilterFromTableHeader");return{headerColumn:(0,L.jsx)(a.default.Fragment,{children:(0,L.jsxs)("span",{className:(0,r.default)({"TableView__header-column-frozen":y}),children:[(0,L.jsx)(h.default,{enabled:null!=f,onTap:f,className:v,innerStyle:{width:S,paddingLeft:C,paddingRight:x,textAlign:m?"right":void 0,display:T?"inline-flex":void 0},"data-testonly-column":i,"data-testonly-action":o,"aria-label":"Frozen column ".concat(i),children:T?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("span",{style:(0,P.convertToRtlWhenNecessary)({flexGrow:1,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}),children:p}),(u||c)&&(0,L.jsxs)("span",{style:(0,P.convertToRtlWhenNecessary)({flexShrink:0,paddingRight:w.columnPadding}),onMouseUp:U,children:[u&&this.renderSortArrow({visible:!!d,sortOrder:u}),c&&(0,L.jsx)(D.FilterAttributeButton,{tableSchema:this.props.tableSchema,attributeName:i})]})]}):(0,L.jsxs)(L.Fragment,{children:[p,u&&this.renderSortArrow({visible:!!d,sortOrder:u})]})},t),null!=g&&(0,L.jsx)(h.default,{spanMode:!0,onDrag:g,dragAxis:"x",className:"TableView__header-column-resizer","data-testid":"table-view-header-column-resizer",ariaLabel:"Resize column",innerStyle:{height:n}},"".concat(t," _resizer"))]})},t),finalWidth:S}}renderHeaderRow(e,t){var i,o,n;if(0===t){const t=M.dynamicRollouts.includeByOwnerId("FilterFromTableHeader");return{header:null,finalRowLayout:e.map((e=>{const{columnWidth:i,attribute:o}=e,n=i;let a=!1,r=!1;return(0,w.isValueColumnLayout)(e)&&(r=!0,a=!(!t||!(null==o?void 0:o.isSearchable()))),Object.assign(Object.assign({},e),{finalWidth:(0,w.computeFinalCellWidth)({layoutWidth:n,isFilterable:a,isSortable:r})})}))}}const a=Boolean(null===(o=null===(i=this.topStackUIState)||void 0===i?void 0:i.DashboardUIState)||void 0===o?void 0:o.interactiveMode),s=this.inMultiRowEditMode(),l=new g.default(this.appModel,this.props.tableSchema,void 0,void 0,void 0,void 0,{viewStackKey:this.viewStackKey}),d=e.filter(w.isSpecialColumnLayout).length,c=!(null===(n=this.appModel.AppTemplate.Presentation)||void 0===n?void 0:n.DisableUserSorting),u=e.map(((i,o)=>{const n=0===o,r=o===e.length-d-1;if((0,w.isSpecialColumnLayout)(i)){if(!(!n&&!a&&!s))return{headerColumn:null,finalWidth:0};const e=i.columnWidth+w.columnPadding-1;return{headerColumn:(0,L.jsx)("span",{children:(0,L.jsx)("span",{style:(0,P.convertToRtlWhenNecessary)({width:e,display:"inline-block"})})},o),finalWidth:e}}if((0,w.isActionColumnLayout)(i)){const{columnWidth:e,action:n}=i,a={index:o,isLastColumn:r,headerHeight:t,columnWidth:e,actionName:n.name(),isCompact:!0,shouldRightAlign:!1,isSortedColumn:!1,isFrozenColumn:!1,isFilterable:!1};return this.renderHeaderColumn(a)}{const{attribute:n,columnWidth:a,isCompact:s}=i,d=!r,u=this.getCurrentSortObject(),p=(null==u?void 0:u.Order)||"Ascending",h=n.name()===(null==u?void 0:u.Column),m=this.freezeColumnEnabled(o,n,e),f={index:o,isLastColumn:r,headerHeight:t,attributeName:n.name(),columnWidth:a,isCompact:s,isSortedColumn:h,isFilterable:Boolean(M.dynamicRollouts.includeByOwnerId("FilterFromTableHeader")&&n.isSearchable()),sortOrder:p,text:n.displayName(l),shouldRightAlign:n.shouldRightAlign(),onTap:c&&!this.groupByState.drilldownMode()?this.sortByHeaderSelected.bind(this,n):void 0,onResize:d?e=>this.handleResize(n.name()||"",e):void 0,isFrozenColumn:m};return this.renderHeaderColumn(f)}})),p=(0,r.default)("TableView__header","TableView__header-underlined","TableView__header-seperator",{"TableViewRow--selection-mode":this.inSelectionMode()});return{header:(0,L.jsx)("div",{className:p,style:(0,P.convertToRtlWhenNecessary)({height:t}),children:u.map((e=>{let{headerColumn:t}=e;return t}))}),finalRowLayout:e.map(((e,t)=>Object.assign(Object.assign({},e),{finalWidth:u[t].finalWidth})))}}registerAndroidBackOverride(){E.ReactRootUIConfig.isReactRoot()&&B.backNavigation.override(this.handleAndroidBackClick)}
1render(){if(!this.shouldShow())return null;const e=this.props;if(!e.tableSchema||!e.table||H)return(0,L.jsx)("div",{});if(this.groupByState.drilldownMode())return this.renderRows(this.groupByState.getDrilldownRows(this.pendingTransaction));const t={searchQuery:e.searchQuery,limit:e.groupAggregate?void 0:e.rowLimit,filterExpr:this.groupByState.filterExpr(),filterDefaults:this.groupByState.filterDefaults(),transaction:this.pendingTransaction};let i=[];const o=this.groupByState.groupBy();o&&o.length&&"_RowNumber"!==o[0].Column&&i.push(o[0]);const n=this.groupByState.sortBy();n&&n.length&&(i=[...i,...n]),t.sortRules=i;const a=this.appModel,r=new g.default(a,e.tableSchema,void 0,void 0,void 0,void 0,{viewStackKey:this.viewStackKey}),s=e.table.queryRowValues(t,a,r);return this.renderRows(s)}renderRows(e){var t,i,o,n,a;let d,c,u=null;const{allowPullToSync:p,handleDrag:h,handleDragEnd:g}=this.currentInteractionState,y=this.props,b=this.appModel;if(this.groupByState.drilldownMode())u=this.groupByState.currentDrilldownColumn(),d=(0,w.computeDrilldownLayout)({attributeName:u,tableSchema:y.tableSchema,width:this.containerWidth()});else{const t=this.groupByState.groupBy();t&&t.length&&"_RowNumber"!==t[0].Column&&(c=t[0].Column);const i={quickEditMode:this.inMultiRowEditMode(),appModel:b,tableSchema:y.tableSchema,table:y.table,width:this.containerWidth()-1,columnOrder:y.columnOrder,columnWidthPreference:y.columnWidth,disableAllActions:y.disableAllActions,dataContext:this.dataContext()},o=this.props.table?this.props.table.name():null,n={dataStamp:b.DataStamp,width:i.width,tableName:o};
1this._layoutCache&&(0,l.default)(n,this._layoutCache.key)?d=this._layoutCache.layout:e.length?(d=(0,w.computeLayout)(i),this._layoutCache={key:n,layout:d}):d=[]}const{nearestHeadings:S,annotatedRows:T}=this.groupByState.annotateRows(e,c);d=d.map((e=>{var t;const i=this.state.deltaColumnWidth[(null===(t=e.attribute)||void 0===t?void 0:t.model.Name)||""]||0;return Object.assign(Object.assign({},e),{columnWidth:e.columnWidth+i})}));const R=e.length>0&&s.default.get(this,"appModel.AppTemplate.Presentation.ShowColumnNames"),O=this.appModel.GetTableRowHeight(),D=R?O:0,N=this.getVisibleBodyHeight({isExpandedDrilldown:this.groupByState.inlineFilterDisplayValue(),inDrilldownMode:this.groupByState.drilldownMode(),rowHeight:O,annotatedRows:T,headerHeight:D,viewType:"table"}),M=(0,r.default)(this.appModel.rolloutClassNames,"BasePrimaryView TableView","TableView--horizontal-scroll-mode",{TableScroll:!0,"TableView--fixed-height-mode":this.fixedHeightMode(),"TableView--translucent-mode":y.translucentMode});let k,_;if(E.ReactRootUIConfig.isInDesktopExperience()||!this.inMultiRowEditMode()||y.isInline||(k=(0,L.jsx)(m.default,{appModel:this.appModel,onCancel:this.exitEditMode,onSave:this.commitTransaction})),this.props.isInline){const e=this.groupByState.inlineFilterDisplayValue();null!=e&&(_=(0,L.jsx)(x.default,{text:e,expanded:!0,onSelect:()=>{this.groupByState.drillUp()}},"special-back-"+this.groupByState.inlinePosition()))}const B=this.props.isInline||E.ReactRootUIConfig.isInMobileExperience(),V=!p||this.inMultiRowEditMode(),F=y.width?y.width:window.innerWidth,W=this.props.isInline&&!this.props.height,H=E.ReactRootUIConfig.isInDesktopExperience()?{maxHeight:W?N:void 0,height:W?void 0:"100%",width:"".concat(F,"px"),overflowY:"auto"}:{width:"".concat(F,"px"),height:N,overflowY:!this.props.height&&this.props.isInline?"hidden":void 0};this.renderedRowIds=e.map((e=>e[y.table.keyAttribute().name()]));const{header:U,finalRowLayout:G}=this.renderHeaderRow(d,D),z=(0,L.jsx)(v.default,{style:(0,P.convertToRtlWhenNecessary)({width:"100%"}),length:T.length,itemRenderer:this.renderItem.bind(this,T,S,c,u,y.table,G),scrollParentGetter:this.reactListScrollParentGetter(),scrollParentViewportSizeGetter:this.props.height?this.getViewportHeight:void 0,threshold:200,type:"uniform",useTranslate3d:I.default.Supports3dTransform()}),K=this.appModel.MapActionName("No items");let Y=y.height;if(E.ReactRootUIConfig.isInMobileExperience()&&this.inMultiRowEditMode()&&!y.isInline&&y.height&&"number"==typeof y.height){Y=y.height-f.DEFAULT_FOOTER_HEIGHT}y.isInline&&_&&Y&&E.ReactRootUIConfig.isInDesktopExperience()&&(Y-=this.appModel.GetTableRowHeight());const q=(null===(t=this.currentUIState)||void 0===t?void 0:t.DashboardUIState)&&this.props.isInline;return(0,L.jsx)(A.EmulatorComponentWrapper,{applyStyleType:q?"dashboardContent":"topLevelView",dataVFEValues:{root:"table",table:null!==(o=null===(i=this.props.table)||void 0===i?void 0:i.name())&&void 0!==o?o:void 0,control:null!==(n=this.props.controlName)&&void 0!==n?n:void 0},isInteractive:!this.shouldDisableEmulatorComponentWrapper(),children:(0,L.jsxs)("div",{className:M,style:(0,P.convertToRtlWhenNecessary)({width:y.width,height:y.height}),onTouchMove:h,onTouchEnd:g,onTouchCancel:g,id:this.id(),children:[_,(0,L.jsx)(C.default,{innerRef:e=>this.pullRef=e,disabled:B,paused:V,getScrollContainer:this.getScrollContainer,appModel:this.appModel,children:(0,L.jsx)("div",{className:"TableView__horizontal-scroll-container","data-testid":"table-view-container",ref:this.onHorizontalScrollContainerMount,style:(0,P.convertToRtlWhenNecessary)({overflowX:"hidden",overflowY:"hidden",width:y.width,height:Y}),children:(0,L.jsx)("div",{style:(0,P.convertToRtlWhenNecessary)({display:"inline-block",minWidth:"100%",paddingTop:0,height:"100%"}),children:(0,L.jsxs)("div",{ref:null!==(a=this.props.listContainerRef)&&void 0!==a?a:this.onScrollContainerMount,className:"TableView__list",style:(0,P.convertToRtlWhenNecessary)(H),children:[U,T.length>0?(0,L.jsx)("div",{className:"TableView__reactListWrapper",children:z}):null!=K?(0,L.jsx)(j.EmptyView,{message:K}):""]})})})}),this.renderFabs(),this.renderActionButtonPortal(),k]})})}}t.default=(0,p.observer)(K)},867895:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FormViewDataTestids=void 0;var n=i(667294),a=o(i(496486)),r=o(i(386010)),s=i(695386),l=o(i(572063)),d=i(75212),c=o(i(155345)),u=o(i(751892)),p=o(i(365914)),h=i(278965),m=o(i(571524)),f=o(i(59775)),g=i(318926),y=i(218546),v=W(i(593186)),b=i(646317),w=W(i(146913)),S=i(21870),x=i(714067),C=i(166089),T=i(557310),I=i(538161),R=i(692479),O=o(i(819433)),D=i(862858),N=i(629503),j=i(306593),E=i(249492),A=i(937020),P=i(695354),M=i(969312),k=i(805583),_=i(157479),B=i(303622),L=i(56749),V=i(148521);function F(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(F=function(e){return e?i:t})(e)}function W(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=F(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}var H,U=function(e,t,i,o){return new(i||(i=Promise))((function(n,a){function r(e){try{l(o.next(e))}catch(e){a(e)}}function s(e){try{l(o.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,s)}l((o=o.apply(e,t||[])).next())}))};!function(e){e.Circle="form-view-circle",e.Stepper="form-view-stepper",e.Tabs="form-view-tabs"}(H||(t.FormViewDataTestids=H={}));const G=(0,s.createStyles)((e=>({disabledIcon:{color:"lightgrey"},errorIcon:{color:"#d32f2f"},stepperContainer:{padding:e.spacing(2)},stepperLabel:{whiteSpace:"nowrap"},stepConnector:{minWidth:"20px"},scrollableContainerDiv:{position:"relative",margin:"auto",maxWidth:"600px"},formViewContainer:{display:"flex",flexDirection:"column"},formViewContainerReactRoot:{backgroundColor:(0,L.themeColor)("mainContentBackground"),"&  .FormView__scrollParent":{"& .TableEntryScreen":{boxShadow:"none",padding:0,overflow:"visible","& .IsInline":{padding:0}}}}})));class z extends c.default{constructor(e){super(e),this.getTableRow=()=>{const{rootTable:e}=this.findTableCollection(),{rowKey:t,rowKeys:i,stableId:o}=this.formState;let n;if(e){const a=this.getTransaction();o?n=e.lookupTableRow(o,a):this.isAddRowForm?i&&i.length&&(n=e.lookupTableRow(i[0],a)):n=e.lookupTableRow(t,a)}return n},this.getErrorStateForPage=e=>{const t=this.paging;if(!t)return{};const i=t.attributesOnPage(e);return this.rowState&&this.rowState.getErrorState(i,this.viewStackKey)||{}},this.showPage=e=>{if(document.activeElement.blur(),null==e||!this.isPageVisible(e))return;const t=this.formState.onPage||1;let i={},o=this.state.tabScrollPosition;if(this.pagingIsSequential()&&e>t&&(i=this.getErrorStateForPage(t)),i.error)this.showErrorState(i);else{const n=Object.assign({},this.state.visitedPages);n[e]=!0,this.pagingIsSequential()&&e<t&&(n[t]=!1),o=this.tabScrollPositionForPage(e),this.setFormState({errorState:i,onPage:e,tabScrollPosition:o,visitedPages:n},(()=>this.scrollTo(0)))}g.logger.logAppEvent({eventName:y.AppEventName.ShowFormPage})},this.registerUploadRequest=this.registerUploadRequest.bind(this),this.unregisterUploadRequest=this.unregisterUploadRequest.bind(this),this.getVisitedDataContext=this.getVisitedDataContext.bind(this),this.showPrevPage=this.showPrevPage.bind(this),this.showNextPage=this.showNextPage.bind(this),this.saveForm=this.saveForm.bind(this),this.tryAdvanceForm=()=>U(this,void 0,void 0,(function*(){if(this.appModel){const e=a.default.get(this,"appModel.AppTemplate.Presentation.AutoAdvanceForms"),t=yield this.findNextPage(),i=this.getViewSettings();e&&null!=t?yield this.showNextPage():i.AutoSave&&null==t&&this.saveForm()}})),this.refreshPagingState=()=>{T.ReactRootUIConfig.isReactRoot()||this.setState(this.state)},this.onPageMount=e=>{this.formPage=e,T.ReactRootUIConfig.isReactRoot()&&this.setState(this.state)},this.state=this.initialState(e)}get keyValue(){return null!=this.formState.rowKey?this.formState.rowKey:this.formState.rowKeys&&this.formState.rowKeys.length?this.formState.rowKeys[0]:null}get rowState(){const e=this.getTableRow();return T.ReactRootUIConfig.isReactRoot()?e&&e.getRowState({paging:this.paging}):e&&e.rowState}setFormState(e,t){return U(this,void 0,void 0,(function*(){T.ReactRootUIConfig.isInMobileExperience()&&!this.isModalForm?(yield(0,O.default)().dispatch((0,R.mutateView)({ViewState:e,ViewStackKey:this.viewStackKey})),t&&t()):this.setState(e,t)}))}unloaded(){return a.default.isEmpty(a.default.pickBy(this.state,(e=>!a.default.isNil(e))))}
1shouldComponentUpdate(){var e;return!(null===(e=this.pendingTransaction)||void 0===e?void 0:e.closed)}componentDidUpdate(){this.unloaded()||T.ReactRootUIConfig.isReactRoot()&&null!=this.formState.rowKeys||this.initRowData()}componentDidMount(){(!T.ReactRootUIConfig.isInMobileExperience()||T.ReactRootUIConfig.isInMobileExperience()&&null==this.props.stableId)&&this.initRowData(),g.logger.startScenario(D.Scenarios.CompleteForm),g.logger.logAppEvent({eventName:y.AppEventName.StartForm});const e=g.logger.getScenario();e&&(this.scenario=e)}componentWillUnmount(){var e;T.ReactRootUIConfig.isReactRoot()||this.endTransaction(),this.scenario&&g.logger.hasScenario(this.scenario.scenarioId)&&(null===(e=g.logger.getScenario())||void 0===e?void 0:e.scenarioName)!==D.Scenarios.CompleteForm&&(g.logger.logAppEvent({eventName:y.AppEventName.AbandonForm}),g.logger.endScenario({scenario:this.scenario,result:D.ScenarioResult.Abandon,abandonReason:D.ScenarioEndReason.UserNavigatedAway,name:D.Scenarios.CompleteForm}))}initialState(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;v.default.Debug()&&(window.formViewComponent=this);const t=e.defaultValues||{},{tableName:i,rowKey:o,tempId:n,isInline:r}=e,s=r?e.rowKeys:void 0;if(!i)return{};const{table:l,tableSchema:d}=this.findTableCollection(e);if(!l||!d)return{};const c=a.default.mapValues(t,(()=>!0)),u={},p=(null==o||""===o)&&null==s;(p&&!l.allowsAdd()||!p&&!l.allowsUpdate())&&(u.error=!0,u.message="Table ".concat(l.name()," does not allow ").concat(p?"new entries":"updates","."));return{tempId:n,tableName:i,rowKey:o,rowKeys:s,onPage:1,scrollPosition:0,tabScrollPosition:1,defaultValues:t,userEdited:c,pendingUploadRequests:{},errorState:u,visitedPages:[null,!0]}}getTransaction(){var e;return null!==(e=this.pendingTransaction)&&void 0!==e?e:this.appModel.dataManager.currentTransaction}get ownsTransaction(){const{pendingTransaction:e,viewStackKey:t}=this;return t&&(null==e?void 0:e.owningViewState)?e.owningViewState.viewStackKey===t:!this.getTransaction().inNestedTransactionGroup}get formState(){if(T.ReactRootUIConfig.isInMobileExperience()&&!this.isModalForm){const{onPage:e=1,scrollPosition:t=0,userEdited:i=a.default.mapValues(this.props.defaultValues,(()=>!0)),pendingUploadRequests:o={}}=this.props;return Object.assign(Object.assign({},this.props),{onPage:e,scrollPosition:t,userEdited:i,pendingUploadRequests:o})}return this.state}initRowData(){let{rowKeys:e,defaultValues:t,stableId:i}=this.formState;const{tableName:o,rowKey:n}=this.formState,r=this.getTransaction(),{pendingTransaction:s,viewStackKey:l}=this;l?(0,O.default)().dispatch((0,A.startFormTransactionGroup)(l,s,this.props.referenceRelationship)):this._started&&r.started||(r.startGroup(),this._started=!0);const{rootTable:d}=this.findTableCollection();if(o&&d&&!e){if(this.isAddRowForm)if(Array.isArray(t)&&t.length>0)(0,v.doWeEverHitThis)("Multi-row add case in TransactionalFormView"),d.hasUniqueComputedKey()||(t=[t[0]]),e=a.default.compact(t.map((e=>{const t=r.create(o,e);return t&&t.rowId})));else{const n=r.create(o,t,Object.assign(Object.assign({},this.props.referenceRelationship),{rowStateColumnNames:this.paging.rowStateColumnNames}));i=n&&n.stableId,e=[]}else{const t=d.lookupTableRow(n,r);t&&t.isNewRow()?i=t.stableId:t&&r.recompute(o,n),e=[]}this.setFormState({rowKeys:e,stableId:i})}}findTableRow(){let{table:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;const{stableId:t}=this.formState;return e.rootTable().lookupTableRow(t,this.getTransaction())}UNSAFE_componentWillReceiveProps(e){const{tempId:t,stableId:i}=this.formState;e.nextState&&e.nextState.tempId!==t?this.replaceState(e.nextState,e):e.tempId&&e.tempId!==t||i&&!this.findTableRow(e)?this.replaceState(this.initialState(e),e):null==e.tempId?this.replaceState({},e):e.tempId&&e.tempId===t&&this.refreshPagingState()}replaceState(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.default.noop;e=a.default.extend(a.default.mapValues(this.formState,(()=>{})),e),this.setFormState(e,(()=>{null!=e.scrollPosition&&this.scrollTo(e.scrollPosition),i()}))}allowsUpdate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;const{table:t}=this.findTableCollection(e);return!!t&&t.allowsUpdate()}inMultiRowEditMode(){return!0}getFooterHandlers(e){const{onCancel:t}=this.props,i=this.formState.onPage||1,{tableName:o,stableId:n,userEdited:r,triedToSave:s}=this.formState,{pendingTransaction:l}=this,d={};let c;return this.revising&&l&&o&&n?(c="onDone",d.onDelete=()=>{(0,O.default)().dispatch((0,A.cancelChildFormAndDeleteRow)(l,o,n))}):(c="onSave",d.onCancel=()=>function(){let{formPage:e,onCancel:t,isUserEdited:i=!1,scenario:o}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var n;if(T.ReactRootUIConfig.isReactRoot()&&null==t)return void(0,O.default)().dispatch((0,A.cancelCurrentForm)());const a=C.AppGlobals.AppModel,r=null===(n=null==a?void 0:a.dataManager)||void 0===n?void 0:n.currentTransaction,s=()=>{g.logger.logAppEvent({eventName:y.AppEventName.CancelForm}),g.logger.endScenario({scenario:o,result:D.ScenarioResult.Failure,name:D.Scenarios.CompleteForm}),e&&e.clearQueuedFocus(),t?(r.endGroup(),r.undo(),t()):(r.inNestedTransactionGroup?(r.endGroup(),r.undo()):r.abort(),C.AppGlobals.AppState.ChoosePreviousState())};r.activeRecords.find((e=>"UPDATE"===e.type))&&T.ReactRootUIConfig.isReactRoot()||i?C.AppGlobals.ViewManager.ShowDynamicReactModal({title:a.MapActionName("Discard changes?"),message:a.MapActionName("Any edits will be lost"),buttons:[{name:a.MapActionName("No"),dismiss:!0}
1,{name:a.MapActionName("Discard"),callback:s,classes:"btn-danger",dismiss:!0}]}):s()}({formPage:this.formPage,onCancel:t,isUserEdited:a.default.keys(r).length>1,scenario:this.scenario})),null==e||this.isModalForm||s&&!this.pagingIsSequential()?d[c]=this.saveForm:"pending"!==e&&(d.onNext=this.showNextPage),i>1&&(d.onPrevious=this.showPrevPage),d}registerUploadRequest(e,t){let{cacheForAttribute:i,callback:o=p.default.noop}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(N.Common.registerUploadRequest(e,t),i){const t=Object.assign({},this.formState),n=Object.assign({},t.pendingUploadRequests);n[i]=e,T.ReactRootUIConfig.isInMobileExperience()&&!this.isModalForm?((0,O.default)().dispatch((0,R.mutateView)({ViewState:{pendingUploadRequests:n},ViewStackKey:this.viewStackKey})),o()):(t.pendingUploadRequests=n,this.replaceState(t,this.props,o))}else o()}unregisterUploadRequest(e,t){N.Common.unregisterUploadRequest(e);const{pendingUploadRequests:i}=this.formState;if(i&&i[t]===e){const e=Object.assign({},this.formState);e.pendingUploadRequests=Object.assign({},e.pendingUploadRequests),delete e.pendingUploadRequests[t],this.replaceState(e)}}get isAddRowForm(){const e=this.formState;return null==e.rowKey||""===e.rowKey}findTableCollection(){let{tableName:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.formState;return this.appModel.findTableCollection(e)}tryFocusFirstEntry(){this.formPage&&this.formPage.tryFocusFirstEntry()}getContext(){const e=this.getTableRow();return null==e?void 0:e.dataContext.augmentWithViewContext(this.viewStackKey)}getVisitedDataContext(){return this.getContext()}get isModalForm(){return!!this.props.isInline}getView(){var e;if(null===(e=this.appModel)||void 0===e?void 0:e.appTemplate){const e=this.appModel.appTemplate;let t=this.props.controlName;if(t){const i=e.getView(t);if(i&&"form"===i.viewType()&&i.table()===this.formState.tableName)return i}else if(!T.ReactRootUIConfig.isReactRoot()||!this.isModalForm){const i=e.findControl
1sForTable(this.formState.tableName,"form")[0];if(i)return t=i.Name,e.getView(t)}}return null}getViewSettings(){const e=this.getView();return e?e.definition():{}}get paging(){var e,t;if(T.ReactRootUIConfig.isReactRoot()&&this.isModalForm){const{tableName:e,columns:t}=this.props,{rootTableSchema:i}=this.appModel.findTableCollection(e);return i&&t?new j.Paging(i.findAttributesByNames(t)):void 0}const i=this.getView();return null!=i?i.paging:null===(t=null===(e=this.findTable())||void 0===e?void 0:e.tableSchema)||void 0===t?void 0:t.paging}screenId(e,t){const i=t.model.Name,o=e.isSlice()?e.name():"";return p.default.makeElementId("TableEntryScreen"+i+o)}scrollTo(e){this.scrollContainer&&(this.scrollContainer.scrollTop=e,T.ReactRootUIConfig.isInMobileExperience()?this.setFormState({scrollPosition:null}):delete this.state.scrollPosition)}get nextPageQuery(){const{rowState:e,paging:t,formState:i,viewStackKey:o}=this,n=i.onPage||1;return(0,k.queryNextPage)({currentPageNum:n,paging:t,rowState:e,viewStackKey:o})}findNextPage(){return this.nextPageQuery.syncFn()}findPrevPage(){const e=this.paging;if(!e)return null;let t;for(let i=(this.formState.onPage||1)-1;i>1;i--)if(t=e.attributesOnPage(i)[0],this.rowState&&!this.rowState.isHiddenPage(t,this.viewStackKey))return i;return 1}getErrorState(){return this.rowState&&this.rowState.getErrorState(void 0,this.viewStackKey)||{}}showErrorState(e){if(e.error){const t=a.default.union(e.invalid,e.missingRequired),i=this.formPage&&this.formPage.formEntries||{},o=t.map((e=>i[e])).filter((e=>null!=e)).map((e=>e.scrollPosition())),n=a.default.min(o)||0,r=a.default.min(e.pages);if(null!=r){const t=this.tabScrollPositionForPage(r);this.setFormState({errorState:e,tabScrollPosition:t,onPage:r},(()=>this.scrollTo(n)))}else this.setFormState({errorState:e},(()=>{this.scrollTo(n)}))}}showNextPage(){return U(this,void 0,void 0,(function*(){document.activeElement.blur();const e=yield this.findNextPage();if(g.logger.logAppEvent({eventName:y.AppEventName.NextFormPage}),null!=e)return void this.showPage(e);const t=this.getErrorState();if(t.error)this.showErrorState(t);else{const i=Object.assign({},this.state.visitedPages);this.setFormState({errorState:t,onPage:e||void 0,tabScrollPosition:e,visitedPages:i},(()=>this.scrollTo(0)))}}))}showPrevPage(){document.activeElement.blur();const e=this.findPrevPage();this.showPage(e)}tabScrollPositionForPage(e){if(this.pageStyle()!==x.PAGESTYLE_TABS)return 1;const t=this.paging;if(!t)return 1;const i=t.formPageCount,o=Math.floor(1.5);return Math.max(Math.min(i+1-3,e-o),1)}saveForm(){return U(this,void 0,void 0,(function*(){var e,t,i;const{onSave:o}=this.props;if(this.saving)return;const{table:n,tableSchema:a}=this.findTableCollection();if(null==n||null==a)return;const{errorState:r}=null!==(t=null===(e=this.rowState)||void 0===e?void 0:e.validateSave({usedTransactions:!0,transaction:this.getTransaction(),viewStackKey:this.transactionOwningViewStackKey,attributes:this.props.columns?a.findAttributesByNames(this.props.columns):void 0}))&&void 0!==t?t:{};if(r&&r.error)return this.showErrorState(r),this.setFormState({triedToSave:!0}),void(this.saving=!1);if(this.saving=!0,document.activeElement.blur(),this.formPage&&this.formPage.clearQueuedFocus(),o)return o(),void(this.saving=!1);const s=this.getTransaction();if(!this.ownsTransaction){s.endGroup();const e=null===(i=s.getRecordsOfTypeForRow(n.rootName(),this.formState.stableId,"CREATE")[0])||void 0===i?void 0:i.stableReference;return!!e&&s.hasStableReverseRef(e)&&this.isAddRowForm&&this.getViewSettings().AutoReopen?yield(0,O.default)().dispatch((0,A.closeAndAutoReopen)(this.currentUIState)):yield(0,O.default)().dispatch((0,R.popView)().onConfirmAction),void(this.saving=!1)}const l=this.getTableRow().keyValue;s.commit(((e,t)=>{var i,o;if(e){this.saving=!1,this.setFormState({triedToSave:!0});let t=this.getErrorState();if(!t.error){const n=this.props.table.rootName(),a=null===(i=this.getTableRow())||void 0===i?void 0:i.stableId,{invalid:r,missingRequired:s}=null!==(o=e.for(n).get(a))&&void 0!==o?o:{};t={error:!0,invalid:r,missingRequired:s,message:e.message}}this.showErrorState(t)}else this.onTransactionCommitted(l,t),g.logger.logAppEvent({eventName:y.AppEventName.FinishForm}),g.logger.endScenario({scenario:this.scenario,result:D.ScenarioResult.Success,name:D.Scenarios.CompleteForm})}))}))}onTransactionCommitted(e,t){var i=this;if(T.ReactRootUIConfig.isReactRoot())return void this.onTransactionCommittedRR(e,t);const{immediateSync:o}=null!=t?t:{},n=this.props.appState||C.AppGlobals.AppState,a=this.appModel,{tableName:r}=this.state,s=this.getView(),{table:l}=this.findTableCollection();a.ClearControlState();const c=n.NavigationStack.pop();setTimeout((()=>{this.saving=!1}),x.FADE_OUT_DURATION_MS),g.logger.logAppEvent({eventName:y.AppEventName.SaveEntryButton});const u=function(){for(var t=arguments.length,o=new Array(t),u=0;u<t;u++)o[u]=arguments[u];return U(i,[...o],void 0,(function(){var t=this;let i=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return function*(){var o;const u=t.appModel.inRollout("autoReopenFix"),p=e=>i&&u?e():$("#FormPage").oneTrackFadeOut(e),h=s?s.definition():{},m=a.appTemplate.getView(h.FinishView);if(m){const i=a.findTableCollection(m.table()).table,n=a.NavStateForView(m.control(),null==i?void 0:i.name()),r=Object.assign({},n);(null==i?void 0:i.rootName())===(null==l?void 0:l.rootName())&&"form"!==m.viewType()&&(r.RowKey=e);const s=null===(o=window.InputHandler)||void 0===o?void 0:o.rootStateForControl(m.control(),r);return void("form"===(null==s?void 0:s.Root)?p((()=>{t.pushState(s),$("#FormPage").oneTrackFadeIn()})):t.pushState(s))}const f=t.currentUIState;if(h.AutoReopen&&t.isAddRowForm){if(u)return void p((()=>{t.pushState(f)}));{const e="webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend";$("#FormPage").on(e,(i=>
1{"FormPage"===i.target.id&&($("#FormPage").off(e),t.pushState(f))}))}}const g=n.NavigationStack[n.NavigationStack.length-1],y=g&&g.HashState||"",v=(0,d.parseHash)(y);if("detail"===v.page&&v.table&&v.row!==e){let t=v.table===r;if(!t){const e=a.findTableCollection(v.table).table;e&&e.rootName()===r&&(t=!0)}if(t){v.row=e;const t=(0,b.sortedParams)(v),i=Object.assign({},g);i.HashState=t,n.NavigationStack.push(i)}}n.NavigationStack.push(c);n.ChoosePreviousState(!0)}()}))},p=()=>{!o&&a.ShouldDelaySync()||window.InputHandler.ProcessSync({initiatedBy:"PushedChanges",preferredUI:o?S.SyncUI.Blocking:S.SyncUI.Subtle})};if(s){const t=s.getEventByType(w.eventTypes.FORM_SAVED);if(t){const i=e,o="".concat(s.name(),"|").concat(t.type()),n=l,r=()=>{w.default.handle(t,{appModel:a,rowId:i,sourceLocationName:o,sourceTable:n},(e=>{e&&e.actionNavigatedApp||u(!0),p()}),this.viewStackKey)};return void $("#FormPage").oneTrackFadeOut(r)}}u(),p()}onTransactionCommittedRR(e,t){return U(this,void 0,void 0,(function*(){const{immediateSync:i}=null!=t?t:{},o=this.appModel,n=this.getView(),{table:a}=this.findTableCollection();let r=!0;o.ClearControlState(),setTimeout((()=>{this.saving=!1}),x.FADE_OUT_DURATION_MS),g.logger.logAppEvent({eventName:y.AppEventName.SaveEntryButton});const s=this.currentUIState;if(n){const t=n.getEventByType(w.eventTypes.FORM_SAVED);if(t){const i=e,s="".concat(n.name(),"|").concat(t.type()),l=a,d=yield w.default.handleAsync(t,{appModel:o,rowId:i,sourceLocationName:s,sourceTable:l},this.viewStackKey);(null==d?void 0:d.actionNavigatedApp)&&(r=!1)}}if(r){const t=n?n.definition():{},i=o.appTemplate.getView(t.FinishView);if(i){const t=o.findTableCollection(i.table()).table,n=o.NavStateForView(i.control(),null==t?void 0:t.name()),r=Object.assign({},n);(null==t?void 0:t.rootName())===(null==a?void 0:a.rootName())&&"form"!==i.viewType()&&(r.RowKey=e),yield(0,O.default)().dispatch((0,R.newViewStack)({Identifier:{Type:"Control",Name:i.name()},ViewState:r||void 0}).onConfirmAction)}else t.AutoReopen&&this.isAddRowForm?yield(0,O.default)().dispatch((0,A.closeAndAutoReopen)(s)):yield(0,O.default)().dispatch((0,R.popView)().onConfirmAction)}(i||!o.ShouldDelaySync())&&window.InputHandler.ProcessSync({initiatedBy:"PushedChanges",preferredUI:i?S.SyncUI.Blocking:S.SyncUI.Subtle})}))}scrollbarWidth(){const e=this.scrollContainer;return e&&e.scrollHeight>e.offsetHeight?m.default.scrollbarWidth():0}renderGeneralErrorMessage(e){if(!e){const t=this.formState.errorState;(null==t?void 0:t.error)&&t.message&&(e=t.message)}return e?(0,V.jsx)("div",{className:"ErrorMessage PageErrorMessage",children:(0,V.jsx)("div",{className:"ErrorMessageText",children:e})}):null}renderLegacyHeader(){const e=this.pageStyle();if(e===x.PAGESTYLE_SIMPLE)return null;const{tableSchema:t}=this.findTableCollection();if(!t)return null;const i=this.paging;if(!i)return null;const o=i.formPageCount;if(1===o)return null;const n=a.default.range(1,o+1),r=this.formState.onPage||1;return e===x.PAGESTYLE_PAGECOUNT?this.renderPageCounter(r,o,n):e===x.PAGESTYLE_TABS?this.renderTabs(r,o,n):null}renderReactRootHeader(){const e=this.pageStyle(),t=e===x.PAGESTYLE_TABS,i=e===x.PAGESTYLE_PAGECOUNT;return t||i?(0,V.jsx)(_.QueryRollout,{query:this.pagePresentationInfoQuery,children:e=>{if(e.length>=1){if(t)return this.renderMaterialTabs(e);if(i)return this.renderStepperHeader(e)}return null}}):null}renderPageCounter(e,t,i){(0,v.doWeEverHitThis)("Legacy renderPageCounter in TransactionalFormView");return t>7?(0,V.jsxs)("div",{className:"FormView__pageCount FormView__pageCount-numeric",children:[(0,V.jsx)("span",{className:"FormView__pageCount-numeric__current",children:e}),(0,V.jsx)("span",{className:"FormView__pageCount-numeric__outOf",children:"/"}),(0,V.jsx)("span",{className:"FormView__pageCount-numeric__total",children:t})]}):(0,V.jsx)("div",{className:"FormView__pageCount FormView__pageCount-graphical",children:i.map((t=>{const i=(0,r.default)("FormView__pageCount-graphical__page",{"FormView__pageCount-graphical__current":t===e}),o=this.getErrorStateForPage(t).error;return(0,V.jsxs)("div",{className:"FormView__pageCount-errorContainer",children:[(0,V.jsx)(l.default,{titleAccess:"Page ".concat(t," has an error"),className:"FormView__pageCount-errorIcon",style:(0,h.convertToRtlWhenNecessary)({visibility:o?"initial":"hidden"})}
1),(0,V.jsx)("span",{"data-testid":H.Circle,className:i})]},t)}))})}get pagePresentationInfoQuery(){const{rowState:e,paging:t,viewStackKey:i}=this;return(0,k.queryPagingPresentationInfo)({paging:t,rowState:e,viewStackKey:i})}isPageVisible(e){var t;const{rowState:i,paging:o,viewStackKey:n}=this;if(i&&o){const a=null===(t=o.attributesOnPage(e))||void 0===t?void 0:t[0];if(a)return!i.isHiddenPage(a,n)}return 1===e}renderStepperHeader(e){return(0,V.jsx)(P.StepperHeader,{pagePresentationInfo:e,activePage:this.formState.onPage||1,getErrorStateForPage:this.getErrorStateForPage,showPage:this.showPage})}renderMaterialTabs(e){const t=this.formState.onPage||1;return(0,V.jsx)(M.MaterialTabsHeader,{value:t-1,indicatorColor:"primary",textColor:"primary",onChange:(e,t)=>this.showPage(t+1),variant:"scrollable",scrollButtons:"auto",renderTabs:()=>e.map(((e,t)=>{let{title:i,isHiddenPage:o}=e;return(0,V.jsx)(E.Tab,{"aria-label":i,label:i,disabled:o},t)}))})}renderTabs(e,t,i){(0,v.doWeEverHitThis)("Legacy renderTabs in TransactionalFormView");const o=this.state.tabScrollPosition,n=Math.min(t,o+3-1);let s=i.slice();t>3&&(s=a.default.range(o,n+1));const l=()=>{const e=o-1;e>=1&&this.setState({tabScrollPosition:e})},d=()=>{const e=o+1;n<=t&&this.setState({tabScrollPosition:e})};return(0,V.jsx)(_.QueryRollout,{query:this.pagePresentationInfoQuery,children:i=>{const c=a.default.keyBy(i,(e=>{let{pageNum:t}=e;return t}));return(0,V.jsxs)("div",{className:"FormView__tabs","data-testid":H.Tabs,children:[1===o?"":(0,V.jsx)("button",{type:"button",className:"FormView__tabs__scroll-left",onClick:l,children:(0,V.jsx)("i",{className:"fa fa-caret-left"})}),s.map((t=>{const{title:i,isHiddenPage:o}=c[t];return(0,V.jsx)("button",{type:"button",onClick:o?void 0:()=>this.showPage(t),disabled:o,className:(0,r.default)("FormView__tabs__tab",{"FormView__tabs__tab--selected":t===e}),children:i},t)})),n>=t?"":(0,V.jsx)("button",{type:"button",className:"FormView__tabs__scroll-right",onClick:d,children:(0,V.jsx)("i",{className:"fa fa-caret-right"})})]})}})}get revising(){const{rowKey:e,stableId:t}=this.formState;return Boolean(T.ReactRootUIConfig.isReactRoot()&&e&&t&&e!==t)}renderFormButtons(){const e=e=>{const{onPrevious:t,onNext:i,onSave:o,onDone:n,onCancel:a,onDelete:r}=this.getFooterHandlers(e);if(T.ReactRootUIConfig.isInDesktopExperience()||T.ReactRootUIConfig.isReactRoot()&&this.isModalForm)return(0,V.jsx)(I.ReactFormButtons,{actionButtonContainer:this.props.actionButtonContainer,onPrevious:t,onNext:i,onSave:o,onDone:n,onCancel:a,onDelete:r});{const e=this.appModel;return e?(0,V.jsx)(f.default,{appModel:e,onPrevious:t,onNext:i,onSave:o,onDone:n,onCancel:a,onDelete:r,moveToTop:this.formFooterStyle()===x.FORMFOOTERSTYLE_TOP,scrollbarWidth:this.scrollbarWidth()}):null}};return(0,V.jsx)(n.Suspense,{fallback:e("pending"),children:(0,V.jsx)(_.QueryRollout,{query:this.nextPageQuery,children:e})})}formFooterStyle(){return this.getViewSettings().FormFooterStyle}formStyle(){const e=this.getViewSettings(),t=a.default.get(this,"appModel.AppTemplate.Presentation.FormStyle");let i=e.FormStyle||t;return i&&i!==x.FORMSTYLE_AUTO||(i=t),i}pageStyle(){if(this.isModalForm)return x.PAGESTYLE_SIMPLE;const e=this.getViewSettings(),t=a.default.get(this,"appModel.AppTemplate.Presentation.FormPageStyle")||x.PAGESTYLE_SIMPLE,i=e.PageStyle||x.PAGESTYLE_AUTO;return i===x.PAGESTYLE_AUTO?t:i}pagingIsSequential(){return this.pageStyle()!==x.PAGESTYLE_TABS}render(){var e,t,i,o,a;if(!this.shouldShow())return null;const s=this.props,l=this.formState,{table:d,tableSchema:c}=this.findTableCollection();if(!d||!c||!l.rowKeys)return(0,V.jsx)("div",{});const p=this.screenId(d,c),m=this.pagingIsSequential()?this.getVisitedDataContext:void 0,f=this.getViewSettings(),g=this.pageStyle(),y=this.formStyle(),v=Math.min(600,s.width-this.scrollbarWidth())-20,b=T.ReactRootUIConfig.isReactRoot()&&this.isModalForm?{width:"100%",height:"auto"}:{width:s.width,height:"100%"},w=this.formFooterStyle(),C={height:T.ReactRootUIConfig.isInDesktopExperience()||T.ReactRootUIConfig.isReactRoot()&&this.isModalForm?"100%":"calc(100% - ".concat(S.DEFAULT_FOOTER_HEIGHT,"px)")};let I,R;s.columns?(I=c.findAttributesByNames(s.columns),R=I):(I=(null===(e=this.paging)||void 0===e?void 0:e.attributes)||c.allAttributes(),R=(null===(t=this.paging)||void 0===t?void 0:t.attributesOnPage(l.onPage||1))||I);const O=this.getTableRow();let D=this.props.errorMessage;O||(D="Could not find row with key "+this.keyValue);const N=this.renderGeneralErrorMessage(D),j=!this.isAddRowForm||!!(null===(i=l.errorState)||void 0===i?void 0:i.error),E=O?(0,V.jsx)(u.default,{useTransactions:!0,tableRow:O,rowIds:l.rowKeys,ref:this.onPageMount,appModel:this.appModel,appState:s.appState,screenId:p,table:d,tableSchema:c,view:this.getView(),getTableRow:this.getTableRow,getRowState:()=>this.rowState,getVisitedDataContext:m,shouldShowInvalidErrorState:!0,shouldShowRequiredErrorState:j,tryAdvanceForm:this.tryAdvanceForm,refreshPagingState:this.refreshPagingState,entryAttributes:I,attributesOnPage:R,onPage:l.onPage,tempId:l.tempId,rowKey:l.rowKey,width:v,height:s.height,pageStyle:g,formStyle:y,maxNestedRows:f.MaxNestedRows,pendingUploadRequests:l.pendingUploadRequests,registerUploadRequest:this.registerUploadRequest,unregisterUploadRequest:this.unregisterUploadRequest,isInline:this.props.isInline},l.onPage):(0,V.jsx)("div",{}),A=this.renderFormButtons();return(0,V.jsx)(n.Suspense,{fallback:null,children:(0,V.jsx)(B.EmulatorComponentWrapper,{applyStyleType:"topLevelView",dataVFEValues:{root:"form",table:null!==(o=this.props.tableName)&&void 0!==o?o:void 0,control:null!==(a=this.props.controlName)&&void 0!==a?a:void 0},containerStyles:{height:"100%",width:"100%"},children:(0,V.jsxs)("div",{className:(0,r.default)(this.appModel.rolloutClassNames,"BasePrimaryView","FormView",s.classes.formViewContainer,{[s.classes.formViewContainerReactRoot]:T.ReactRootUIConfig.isReactRoot()}),style:(0,h.convertToRtlWhenNecessary)(b),children:[w===x.FORMFOOTERSTYLE_TOP&&A,T.ReactRootUIConfig.isReactRoot()&&this.renderReactRootHeader(),(0,V.jsxs)("div",{className:"FormView__scrollParent",ref:this.onScrollContainerMount,style:(0,h.convertToRtlWhenNecessary)(C),children:[!T.ReactRootUIConfig.isReactRoot()&&this.renderLegacyHeader(),(0,V.jsxs)("div",{className:(0,r.default)("TableEntryScreen","ShowErrorState",{"FormStyle--sidebyside":y===x.FORMSTYLE_SXS,IsInline:this.props.isInline}),id:p,children:[N,E]})]}),w!==x.FORMFOOTERSTYLE_TOP&&A]})})})}}t.default=(0,s.withStyles)(G)(z)},392870:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.isNodeEmpty=t.ReactCardLayoutNode=void 0;var n=o(i(238416)),a=i(249492),r=i(695386),s=o(i(960162)),l=o(i(378513)),d=o(i(386010)),c=o(i(373303)),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=k(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}(i(667294)),p=i(700386),h=o(i(367397)),m=i(791899),f=i(750311),g=i(803583),y=i(957831),v=o(i(571524)),b=i(56749),w=o(i(152200)),S=o(i(21870)),x=i(557310),C=o(i(454852)),T=i(351101),I=i(664583),R=i(14042),O=i(692479),D=o(i(819433)),N=i(134117),j=i(303622),E=i(278965),A=i(618583),P=i(365914),M=i(148521);function k(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(k=function(e){return e?i:t})(e)}function _(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function B(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?_(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):_(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}const L="Go to details";class V{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;this._symbols={},this.enclosingScope=e,this.scopeLevel=0,e&&(this.scopeLevel=e.scopeLevel+1)}insert(e,t){this._symbols[e]=t}lookup(e){return this._symbols[e]?this._symbols[e]:this.enclosingScope?this.enclosingScope.lookup(e):void 0}}const F=function(e,t){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3?arguments[3]:void 0;x.ReactRootUIConfig.isReactRoot()?(0,D.default)().dispatch((0,O.pushView)({Identifier:{Type:"View",Action:"detail",TableName:e},ViewState:{TableName:e,RowKey:t},ViewStackKey:o})):(0,y.getAppState)().PushView("detail",!1,{TableName:e,RowKey:t,GroupBy:null,SortBy:null,FilterExpr:null,DefaultValues:null},i)},W=e=>e.node.id+e.table+e.rowId,H=(e,t)=>{var i;const o={},{ignoreEvents:n,node:a,rowId:r,sourceLocationName:s,onRowTap:l}=e,d=e.table;if(n)return o;const c=Object.keys(a);for(const e of c){const i=a[e];i&&"action"===i.type&&i.value&&(o[e]=e=>{if(i.value===L)if(l){const{shiftKey:t,altKey:i,ctrlKey:o}=e;l(r,{shiftKey:t,altKey:i,ctrlKey:o})}else F(d,r,!0,t);else{const e=(0,T.getAppModel)();if(e){const o=e.appTemplate.actions(),{table:n}=e.findTableCollection(d);if(n){const a=o.findByName(n.rootName(),i.value);a&&(0,I.runAppAction)(a,{appModel:e,rowId:r,sourceLocationName:s,sourceTable:n},void 0,t)}}}e.preventDefault(),e.stopPropagation()})}if(null===(i=a._inspection)||void 0===i?void 0:i.isInspectable){const e=a._inspection.eventHandlers;for(const t in e){const i=e[t];if("function"==typeof i)if(o[t]){const e=o[t];o[t]=t=>{e(t),i(t,a)}}else o[t]=e=>i(e,a)}}return o},U=(e,t)=>{if(null==e)return null;if("variable"!==e.type)return e;const i=t.lookup(e.value);return U(i,t)},G=(e,t)=>{if(null==e)return{};if(Array.isArray(e)){const i={};for(const o of e)Object.assign(i,G(o,t));return i}const i={};if("style"===e.type){const o=Object.keys(e);for(const n of o)"id"!==n&&"type"!==n&&(i[n]=U(e[n],t))}else if("variable"===e.type){const i=U(e,t);return G(i,t)}return i},z=e=>e.style||G(e.node.style,e.currentScope),K=new class{constructor(){this._components={}}add(e,t){this._components[e]=t}get(e){return this._components[e]}},Y=e=>{let{innerStyle:t}=e;return(0,M.jsx)(s.default,{variant:"rect",style:(0,E.convertToRtlWhenNecessary)(t),"data-testid":"skeleton-card"})},q=e=>{if(!e.node||e.node.ignore)return null;const t=(e=>{const t=e.node;let i=e.currentScope||new V;if(e.node.variables){i=new V(i);for(const e of t.variables)i.insert(e.name,e.value)}return i})(e),i=K.get(e.node.type);return i?(0,M.jsx)(i,B(B({},e),{},{currentScope:t})):null};
1t.ReactCardLayoutNode=q;const X=(e,t)=>(e&&(!0===e.bold&&(t.fontWeight="bold"),!0===e.italic&&(t.fontStyle="italic"),!0===e.underline&&(t.textDecoration="underline"),!0===e.strikethrough&&(t.textDecoration=t.textDecoration?t.textDecoration+" line-through":"line-through"),!0===e.uppercase&&(t.textTransform="uppercase"),e.textSize>1&&(t.fontSize?t.fontSize=t.fontSize*e.textSize:t.fontSize=e.textSize+"rem"),null!=e.textColor&&(t.color=e.textColor)),t),Q=(e,t)=>{const i=x.ReactRootUIConfig.isReactRoot();return t.icons.map(((o,n)=>{const{color:a,name:r}=o;return(0,M.jsx)("i",{style:(0,E.convertToRtlWhenNecessary)({color:i?a||t.highlightColor||void 0:t.highlightColor||void 0,height:"1em",marginRight:4,fontSize:"0.8em"}),className:(0,P.getFontAwesomeIconNameWithPrefix)(r)},"formatruleIcon-"+e.rowId+"-"+n)}))},$=e=>{var t,i,o,n;const a=(0,T.getAppModel)();if(null==a||"container"===e.node.type||!(null===(t=e.bindingMeta)||void 0===t?void 0:t.attribute)&&!(null===(i=e.node.onClick)||void 0===i?void 0:i.value))return{icon:[],icons:[]};return a.appTemplate.formattingRules().getFormatting({tableOrSlice:e.table,column:null===(o=e.bindingMeta)||void 0===o?void 0:o.attribute.name(),actionName:null===(n=e.node.onClick)||void 0===n?void 0:n.value,rowKey:e.rowId})},Z=(e,t)=>{const i=(0,T.getAppModel)();if(i){const o=i.appTemplate.actions(),{table:n}=i.findTableCollection(e.table);if(n)return o.findByName(n.rootName(),t)}return null},J=(e,t)=>{const i=Z(e,t),o=(0,T.getAppModel)();if(o)if(i){const{table:n,tableSchema:a}=o.findTableCollection(e.table),r=null==n?void 0:n.lookupTableRow(e.rowId);t=i.displayName(o,a,null==r?void 0:r.values)}else if(t===L)return o.MapActionName(L);return t},ee=(e,t,i)=>{if(!t.onClick||"container"===t.type)return!0;const o=Z(e,t.onClick.value);if(o){const t=(0,T.getAppModel)();if(t){const{table:n,tableSchema:a}=t.findTableCollection(e.table),r=null==n?void 0:n.lookupTableRow(e.rowId);if(r){const e=r.dataContext.augmentWithViewContext(i);return o.isValidForTable(n,a,t,e)&&o.isValidForRow(r.values,e)&&o.prominence()!==C.default.DO_NOT_DISPLAY}}}return!0},te=(e,t,i)=>{if(t.ignore||!ee(e,t,i)||t.child&&t.child.ignore)return!0;if("container"!==t.type)return!1;const o=t.children;return!o||!!o.every((t=>te(e,t,i)))};t.isNodeEmpty=te;const ie=e=>{const t=e.childShape||"";return(0,M.jsx)("span",{className:"BadgeDot "+t,style:(0,E.convertToRtlWhenNecessary)(Object.assign({backgroundColor:e.color},e.customStyle))})},oe=e=>(0,M.jsxs)("span",{"data-testid":"badge",className:"BadgeRoot",children:[e.children,(0,M.jsx)(ie,B({},e))]});function ne(e){const{viewStackKey:t}=(0,u.useContext)(R.ViewStackKeyContext),i=$(e),o=ee(e,e.node,t),n=Object.assign({},G(e.node.style,e.currentScope)),[a,r]=(0,u.useState)("default"),s=n[a];if(!o)return null;const l=H(e,t),c=x.ReactRootUIConfig.isInDesktopExperience();let p=s;if(e.highlighted)if(c||"default"!==a){if(c&&("default"===a||"hover"===a)){const e=n.highlightedUpdate||n.highlighted;p=Object.assign(Object.assign({},s),e)}}else p=n.highlighted;p&&Object.assign(n,G(p,e.currentScope)),X(i,n);const h=l.onMouseOver;l.onMouseOver=e=>{v.default.IsMobileBrowser()||r("hover"),h&&h(e)};const m=l.onMouseDown;l.onMouseDown=e=>{r("down"),m&&m(e)};const f=l.onMouseUp;l.onMouseUp=e=>{r("default"),f&&f(e)};const g=l.onMouseLeave;l.onMouseLeave=e=>{r("default"),g&&g(e)};let y=e.children;const b=Q(e,i);return!b.length&&i.highlightColor&&(y=(0,M.jsx)(oe,{color:i.highlightColor,children:y})),(0,M.jsxs)("div",B(B({role:e.role,"aria-label":e.ariaLabel,"data-testid":"div-with-input-handling",id:W(e),style:(0,E.convertToRtlWhenNecessary)(n)},l),{},{className:(0,d.default)({selected:e.inspectionSelectedNodeId===e.node.id&&!e.inspectionHoverNodeId,highlighted:e.inspectionHoverNodeId===e.node.id}),children:[b,y]}))}const ae=e=>{if(!e.open)return null;return(0,M.jsx)(a.ClickAwayListener,{onClickAway:t=>{e.onClickAway&&e.onClickAway(t)},children:(0,M.jsx)("div",{style:(0,E.convertToRtlWhenNecessary)({position:"absolute",background:"white",borderRadius:5,marginLeft:-120,marginTop:-120,boxShadow:"0px 5px 5px -3px rgba(0,0,0,0.2), 0px 8px 10px 1px rgba(0,0,0,0.14), 0px 3px 14px 2px rgba(0,0,0,0.12)"}),children:e.children})})},re=(0,r.makeStyles)((()=>({iconButton:{color:e=>{let{style:t}=e;return t?(0,b.themeColor)("defaultFooterText"):void 0},width:30,height:30,padding:9,paddingTop:6}})));function se(e){const{viewStackKey:t}=(0,u.useContext)(R.ViewStackKeyContext),i=(0,P.getFontAwesomeIconNameWithPrefix)(U(e.node.icon.value));if(!i)return null;const o=H(e,t),n=z(e);return(0,M.jsx)(a.IconButton,B(B({},o),{},{style:(0,E.convertToRtlWhenNecessary)({color:n?n.color:void 0,fontSize:16,width:30,height:30,padding:9,paddingTop:6}),children:(0,M.jsx)("i",{className:i})}),e.node.id)}K.add("card",q),K.add("systemAction",(e=>{var t;const i=(0,P.getFontAwesomeIconNameWithPrefix)(U(null===(t=e.node.icon)||void 0===t?void 0:t.value)),o=U(e.node.text.value),n=J(e,o),a=i?(0,M.jsx)("i",{"data-testid":"icon",className:i,style:(0,E.convertToRtlWhenNecessary)({marginRight:8,color:(0,b.themeColor)("bottomDrawerIcon")})}):null;return(0,M.jsxs)(ne,B(B({},e),{},{role:"button",ariaLabel:n,children:[a,n]}))})),K.add("ellipsisMenu",(e=>{const{viewStackKey:t}=(0,u.useContext)(R.ViewStackKeyContext),i=H(e,t),[o,n]=u.default.useState(null),r=z(e),s=re({style:r}),d=t=>{i.onBeforeClose&&!i.onBeforeClose(t,e.node)||(n(null),t&&(t.stopPropagation(),t.preventDefault()))},p=e.node.items,h=e.node._inspection&&e.node._inspection.isInspectable,m=Boolean(o);if(0===p.length)return null;const g=(0,c.default)(p,"ignore");if(g===p.length)return null;if(g===p.length-1){const t=p.find((e=>!e.ignore));return(0,M.jsx)(se,B(B({},e),{},{node:t}))}let y,v,w={},C=!1;
1if(h?(w={onClickAway:d,anchorEl:o},y=ae):S.default.windowWidth>S.default.widescreenBreakpoint?(w={anchorEl:o},y=a.Popover):x.ReactRootUIConfig.isInMobileExperience()?(C=!0,y=a.Drawer):y=a.Drawer,C){const i=p.filter((i=>!te(e,i,t))).map((i=>{var o;const n=U(i.text.value),a=J(e,n),s=(0,P.getFontAwesomeIconNameWithPrefix)(U(null===(o=i.icon)||void 0===o?void 0:o.value)),l=Object.assign(Object.assign({},e),{node:i}),c=H(l,t),u=$(l),p=Q(l,u),m=Object.assign({},r);return X(u,m),{id:n,icon:s&&(0,M.jsx)("i",{"data-testid":"icon",className:s}),displayText:(0,M.jsxs)("div",{style:(0,E.convertToRtlWhenNecessary)(m),children:[p,a]}),onClick:e=>{c.onClick&&c.onClick(e),h||d(e)}}}));v=(0,M.jsx)(f.MobileBottomSheet,{open:m,onClose:d,listItemContents:i})}else v=(0,M.jsx)(y,B(B({open:m,anchor:"bottom",onClose:d},w),{},{PaperProps:{style:{backgroundColor:(0,b.themeColor)("elevationTone3")}},children:p.map(((i,o)=>{if(te(e,i,t))return null;const n=H(Object.assign(Object.assign({},e),{node:i}),t),r=Object.assign({},n);r.onClick=e=>{n.onClick&&n.onClick(e),h||d(e)};const s=(0,M.jsx)(a.MenuItem,B(B({style:(0,E.convertToRtlWhenNecessary)({color:(0,b.themeColor)("bottomDrawerText")})},r),{},{children:(0,M.jsx)(q,B(B({},e),{},{ignoreEvents:!0,node:i}))}),e.table+e.rowId+e.node.id+o);return(0,M.jsx)(j.EmulatorComponentWrapper,{dataVFEValues:{action:i.text.value,table:null==e?void 0:e.table,root:"card",context:"CardListAction"},children:s},"".concat(e.node.id,"-").concat(o))}))}));return(0,M.jsxs)("div",{style:(0,E.convertToRtlWhenNecessary)(r),id:W(e),children:[(0,M.jsx)(a.IconButton,{onClick:e=>{n(e.currentTarget),i.onClick&&i.onClick(e),e.stopPropagation(),e.preventDefault()},onMouseOver:t=>{i.onMouseOver&&i.onMouseOver(t,e.node),t.stopPropagation(),t.preventDefault()},className:s.iconButton,"aria-label":"Show more menu items",children:(0,M.jsx)(l.default,{"data-testid":"icon-button"})}),v]})})),K.add("circleProgress",(e=>{var t;const i=z(e);if(i.position="relative",null===e.value)return(0,M.jsx)(Y,{innerStyle:i});const o=e.value;let n=i.color||"#3c9ee5";100===parseInt(o)&&(n=i.color||"green");const a=(0,M.jsx)("div",{style:(0,E.convertToRtlWhenNecessary)({position:"absolute",width:"100%",height:"100%",fontSize:i.height/5||"90%",display:"flex",justifyContent:"center",alignItems:"center",top:0}),children:o}),r=Number(null===(t=e.bindingMeta)||void 0===t?void 0:t.columnValue);return e.value&&!isNaN(r)?(0,M.jsxs)("div",{style:(0,E.convertToRtlWhenNecessary)(i),"data-testid":"circle-progress-card",children:[(0,M.jsxs)("svg",{viewBox:"0 0 36 36",style:(0,E.convertToRtlWhenNecessary)({stroke:n}),children:[(0,M.jsx)("path",{style:(0,E.convertToRtlWhenNecessary)({fill:"none",stroke:"#eee",strokeWidth:3.8}),d:"M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"}),(0,M.jsx)("path",{style:(0,E.convertToRtlWhenNecessary)({fill:"none",strokeWidth:2.8,strokeLinecap:"round",animation:"progress 1s ease-out forwards"}),strokeDasharray:100*r+", 100",d:"M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"})]}),a]}):null})),K.add("staticMap",(e=>{const{viewStackKey:t}=(0,u.useContext)(R.ViewStackKeyContext),i=z(e);if(null===e.value)return(0,M.jsx)(Y,{innerStyle:i});const o=w.default.getStaticImageURLMultipleLatLongs([{name:"",value:e.value}],500,308),n=H(e,t);return(0,M.jsx)("div",B(B({id:W(e),style:(0,E.convertToRtlWhenNecessary)(i)},n),{},{"data-testid":"static-map-card",children:(0,M.jsx)("img",{src:o,style:(0,E.convertToRtlWhenNecessary)(i),alt:""})}))})),K.add("text",(e=>{let t=e.value;const i=z(e);return null===t?(i.borderRadius=5,i.minHeight=18,i.minWidth=90,i.margin=3,t=(0,M.jsx)(Y,{innerStyle:i})):void 0!==(null==t?void 0:t.url)&&(t=t.linkText||t.url),(0,M.jsx)(ne,B(B({},e),{},{children:t}))})),K.add("icon",(e=>{const t=z(e);if(null===e.value)return(0,M.jsx)(Y,{innerStyle:t});const i=(0,P.getFontAwesomeIconNameWithPrefix)(e.value||"");return(0,M.jsx)(ne,B(B({},e),{},{children:(0,M.jsx)("i",{className:i,"data-testid":"icon"})}))})),K.add("image",(e=>{var t;const{viewStackKey:i}=(0,u.useContext)(R.ViewStackKeyContext);let o=e.value;const n=z(e),a=$(e);if(null==o)return(0,M.jsx)(Y,{innerStyle:n});const r=H(e,i),s=(0,T.getAppModel)(),l=null===(t=e.bindingMeta)||void 0===t?void 0:t.attribute;if("LatLong"===(null==l?void 0:l.type())||"Address"===(null==l?void 0:l.type()))o=w.default.getStaticImageURLMultipleLatLongs([{name:l.name(),value:o}],500,308);else if(s){if(!l)return null;const{table:t}=s.findTableCollection(e.table);if(t){o=(0,N.flexImageUrl)(s.ResolveFile(o,t.rootName()))||void 0;let i=(0,M.jsx)("div",B(B({style:(0,E.convertToRtlWhenNecessary)(n)},r),{},{children:(0,M.jsx)(h.default,{useLoadingSpinner:!0,zeroImageLoadDelay:!0,src:o,className:"",customStyle:n,height:n.height,width:n.width,testId:"card-app-image"})}));if(!Q(e,a).length&&n.width<100&&a.highlightColor){const e="50%"===n.borderRadius?"CircleImageChild":"RectangleImageChild";i=(0,M.jsx)(oe,{color:a.highlightColor,childShape:e,customStyle:{marginRight:n.marginRight},children:i})}return i}}const{node:c,inspectionSelectedNodeId:p,inspectionHoverNodeId:m}=e;return(0,M.jsx)("img",B(B({id:W(e)},r),{},{src:o,style:(0,E.convertToRtlWhenNecessary)(n),className:(0,d.default)({selected:p===c.id&&!m,highlighted:m===c.id}),"data-testid":"image-card",alt:""}))})),K.add("variable",(e=>{const t=e.currentScope,i=U(e.node,t),o=e.node.child||i;
1return e.node.child?(0,M.jsx)(q,B(B({},e),{},{value:i,node:o})):(0,M.jsx)(q,B(B({},e),{},{node:o}))})),K.add("constant",(e=>{var t,i,o;const n=(0,T.getAppModel)(),{viewStackKey:a}=(0,u.useContext)(R.ViewStackKeyContext);let r="";if(n){const{table:s,tableSchema:l}=n.findTableCollection(e.table),d=null==s?void 0:s.lookupTableRow(e.rowId);if(d){const s=d.dataContext.augmentWithViewContext(a).rowData,c=Z(e,(null===(o=null===(i=null===(t=e.node)||void 0===t?void 0:t.child)||void 0===i?void 0:i.onClick)||void 0===o?void 0:o.value)||"");c&&(r=c.displayName(n,l,s,{viewStackKey:a}))}}return(0,M.jsx)(p.ASTooltip,{title:r,arrow:!0,children:(0,M.jsx)("div",{children:(0,M.jsx)(q,B(B({},e),{},{value:e.node.value,node:e.node.child},r&&{role:"button",ariaLabel:r}))})})})),K.add("actionDisplayText",(e=>{const t=U(e.node.value),i=J(e,t);return(0,M.jsx)(p.ASTooltip,{title:i,arrow:!0,children:(0,M.jsx)("div",{children:(0,M.jsx)(q,B(B({},e),{},{node:e.node.child,value:i,role:"button",ariaLabel:i}))})})})),K.add("binding",(e=>{const{viewStackKey:t}=(0,u.useContext)(R.ViewStackKeyContext),i=e.node.value,o=((e,t,i)=>{var o;const[n,a]=(0,u.useState)(null);return(0,u.useEffect)((()=>{const o=e=>{a(e)};return m.TableSubscriptionAPI.subscribeToColumn(e,t,i,o),()=>{m.TableSubscriptionAPI.unsubscribeFromColumn(e,t,i,o)}}),[e,t,i,null===(o=(0,T.getAppModel)())||void 0===o?void 0:o.DataStamp]),n})(e.table,e.rowId,i);if(!o)return(0,M.jsx)(q,B(B({},e),{},{value:null,node:e.node.child}));if(!o.rowState.isHidden(o.attribute,t)){let t=o.columnValue;const i=o.attribute.type();if("Ref"===i){const e=o.attribute.derefRow(t);t=e?e.labelValue:t}else t="Url"===i?o.attribute.valueFromWireFormat(t):o.attribute.localizeWireValue(t,{dataContext:e.dataContext});return(0,M.jsx)(q,B(B({},e),{},{value:t,bindingMeta:o,node:e.node.child}))}return null})),K.add("container",(e=>{const{viewStackKey:t}=(0,u.useContext)(R.ViewStackKeyContext),i=e.node.children.map(((t,i)=>(0,u.createElement)(q,B(B({},e),{},{key:e.table+"/"+e.rowId+"/"+i,node:t}))));return te(e,e.node,t)?null:(0,M.jsx)(ne,B(B({},e),{},{children:i}))})),K.add("legacyInline",(e=>{var t;const{viewStackKey:i}=(0,u.useContext)(R.ViewStackKeyContext),o=(0,u.useRef)(null),{width:n,height:a}=(0,A.useComponentSize)(o),{value:r,bindingMeta:s,node:l,rowId:d}=e,c=null==s?void 0:s.attribute,p=z(e),h=(0,T.getAppModel)(),{table:m}=null!==(t=null==h?void 0:h.findTableCollection(e.table))&&void 0!==t?t:{},f=g.TypeDisplaysApi.lookup(c),y=null==s?void 0:s.rowState.dataContext,v=H(e,i);return(0,M.jsx)("div",{ref:o,style:(0,E.convertToRtlWhenNecessary)(p),children:n&&a&&h&&null!=r?(0,M.jsx)(f,{id:W(e),table:m,appModel:h,rowId:d,dataContext:y,attribute:c,showContent:null,showListInline:!0,clickOverride:e=>{v.onClick&&v.onClick(e,l)},height:a,width:n,disableNavigation:!1,imageDisplayType:"full-centered",value:r}):(0,M.jsx)(Y,{innerStyle:p})},"cardLegacyTypeDisplay-"+l.id)}))},623834:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}
1),t.CardLayoutNode=void 0,t.getVariableAssignmentsNode=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;const i=Object.keys(e).map((t=>({id:"variableAssignment-"+t,type:"variableAssignment",name:t,value:e[t]})));return{type:"container",style:Object.assign(Object.assign({type:"style",width:"100%",height:"100%"},"backdrop"===t&&{padding:8}),{boxSizing:"border-box"}),variables:i}};var n=o(i(496486)),a=o(i(365914));class r{constructor(){}static build(e){const t=r.clone(e);return r._assignMissingIDs(t),t}static makeEdits(e){return new s(e)}static getThemeNode(e){const t=Object.keys(e).map((t=>({id:"variableAssignment-"+t,type:"variableAssignment",name:t,value:e[t]}))),i={type:"style"};return i.fontFamily=e.fontFamily||"Rubik, sans-serif",i.fontSize=e.fontSize||21,i.width="100%",i.height="100%",{type:"container",children:[],variables:t,style:i}}static hasClickAction(e){return null!=e.onClick}static hasBinding(e,t){return this.findNodes(e,(e=>"binding"===e.type&&e.value===t)).length>0}static findNodes(e,t){const i=[];return this.findNodesHelper(e,t,i),i}static findNodesHelper(e,t,i){if(null!=e)if(t(e)&&i.push(e),Array.isArray(e))for(const o of e)r.findNodesHelper(o,t,i);else if(e.type){const o=Object.keys(e);for(const n of o)r.findNodesHelper(e[n],t,i)}}static findNode(e,t){if(t(e))return e;if(null==e)return null;if(Array.isArray(e)){for(const i of e){const e=r.findNode(i,t);if(e)return e}return null}if(e.type){const i=Object.keys(e);for(const o of i){const i=r.findNode(e[o],t);if(i)return i}return null}return null}static getClosestAncestor(e,t,i){const o=r.getParent(e,t);return r.getClosestAncestorHelper(e,o,t,i)}static getClosestAncestorHelper(e,t,i,o){if(o(t))return t;if(null==t)return null;const n=r.getParent(e,t.id);return null==n&&o(n)?n:r.getClosestAncestorHelper(e,n,i,o)}static contains(e,t){return null!==r.getNodeById(e,t)}static getParent(e,t){return r.findNode(e,(e=>{if(!e)return!1;return Object.keys(e).some((i=>{const o=e[i];return!(!o||o.id!==t)||!!Array.isArray(o)&&o.some((e=>e.id===t))}))}))}static getNodeById(e,t){return r.findNode(e,(e=>e&&e.id===t))}static getNodeByPath(e,t){const i=t.split(".");let o=r.getNodeById(e,i.shift())||e;for(const e of i)if(o=o[e],!o)return null;return o}static toJS(e){const t={};if(Array.isArray(e))return e.map((e=>r.toJS(e)));if(null==e||"object"!=typeof e)return e;const i=Object.keys(e);for(const o of i)o.startsWith("_")?t[o.substring(1)]=r.toJS(e[o]):o.startsWith("$")||(t[o]=r.toJS(e[o]));return t}static clone(e){return n.default.cloneDeep(e)}static _assignMissingIDs(e){if(null==e)return null;if(Array.isArray(e))return e.map((e=>r._assignMissingIDs(e)));if(!e.type)return e;e.id=e.id||a.default.makeGuid();const t=Object.keys(e);for(const i of t)"id"!==i&&r._assignMissingIDs(e[i]);return e}}
1t.CardLayoutNode=r;class s{constructor(e){this.edits=[],this.root=e}ignoreNodesWithoutDataBinding(){return this.setAll((e=>("variable"===e.type||"constant"===e.type)&&e.child&&(!e.child.onClick||!e.child.onClick.value)),"ignore",!0)}setAll(e,t,i){return this.edits.push({type:"setAll",criteria:e,field:t,value:i}),this}setType(e,t){return this.setField(e,"type",t),this}setField(e,t,i){return this.edits.push({nodeId:e,type:"setField",field:t,value:i}),this}setFieldByPath(e,t){const i=e.split("."),o=i.pop(),n=i.join("."),a=r.getNodeByPath(this.root,n);this.setField(a.id,o,t)}setStyle(e,t,i){this.edits.push({nodeId:e,field:t,value:i})}removeClickAction(e){return e.onClick&&this.setField(e.onClick.id,"value",void 0),this}clearValue(e){return this.setField(e,"value",void 0),this}convertParentToBindingNode(e,t){const i=r.getParent(this.root,e);return i?this.convertToBindingNode(i.id,t):this}convertToBindingNode(e,t){const i=this.edits;return i.push({nodeId:e,type:"setField",field:"type",value:"binding"}),i.push({nodeId:e,type:"setField",field:"value",value:t}),this}convertToAction(e,t){const i=this.root,o=r.getNodeById(this.root,e);o.onClick&&(e=o.onClick.id);const n=r.getParent(i,e),a=r.getParent(i,n.id),s=this.edits;return s.push({nodeId:e,type:"setField",field:"value",value:t.Name}),"text"===n.type?(s.push({nodeId:a.id,type:"setField",field:"type",value:"actionDisplayText"}),s.push({nodeId:a.id,type:"setField",field:"value",value:t.Name})):"icon"===n.type?(s.push({nodeId:a.id,type:"setField",field:"type",value:"constant"}),s.push({nodeId:a.id,type:"setField",field:"value",value:t.Icon})):"systemAction"===n.type&&n.icon&&n.text&&(s.push({nodeId:n.icon.id,type:"setField",field:"type",value:"constant"}),s.push({nodeId:n.icon.id,type:"setField",field:"value",value:t.Icon}),s.push({nodeId:n.text.id,type:"setField",field:"type",value:"actionDisplayText"}),s.push({nodeId:n.text.id,type:"setField",field:"value",value:t.Name})),this}convertUIElementToSupportColumnType(e,t){let i;switch(t.Type){case"Percent":i=r.getNodeById(this.root,e),i&&"image"===i.type&&this.edits.push({nodeId:e,type:"setField",field:"type",value:"circleProgress"});break;case"LatLong":case"Address":i&&"image"===i.type&&this.edits.push({nodeId:e,type:"setField",field:"type",value:"staticMap"});break;case"Image":case"Drawing":case"Thumbnail":this.edits.push({nodeId:e,type:"setField",field:"type",value:"image"});break;case"List":this.edits.push({nodeId:e,type:"setField",field:"type",value:"legacyInline"})}return this}ignore(e){return this.edits.push({nodeId:e,type:"setField",field:"ignore",value:!0}),this}dontIgnore(e){return this.edits.push({nodeId:e,type:"setField",field:"ignore",value:!1}),this}apply(){const e=r.clone(this.root),t=this.edits.filter((e=>null!==e));for(const i of t){let t,o=r.getNodeById(e,i.nodeId);if(o)switch(i.type){case"setField":o[i.field]=i.value;break;case"setStyle":if(Array.isArray(o.style)){const e=o.style.lastIndexOf((e=>e[i.field]));e>0?o[e][i.field]=i.value:o.style.push({[i.field]:i.value})}else o.style[i.field]=i.value;break;case"setAll":for(o of(t=r.findNodes(e,i.criteria),t))o[i.field]=i.value}}return this.edits=[],e}}},209491:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(677888)),a=o(i(754531)),r=o(i(934250)),s=o(i(572650));const l={},d=e=>{l[e.name]=e};d(n.default),d(a.default),d(r.default),d(s.default);t.default=l},334500:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ReactCardLayoutNode",{enumerable:!0,get:function(){return o.ReactCardLayoutNode}}),Object.defineProperty(t,"isNodeEmpty",{enumerable:!0,get:function(){return o.isNodeEmpty}});var o=i(392870)},801622:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DashboardTabs=void 0;var o=i(695386),n=i(249492),a=i(56749),r=i(166089),s=i(365914),l=i(148521);const d=(0,o.makeStyles)((()=>({tabs:{fontSize:14,minHeight:36,color:()=>(0,a.themeColor)("headerText"),backgroundColor:()=>(0,a.themeColor)("headerBackground"),borderBottom:()=>"1px solid ".concat((0,a.themeColor)("mainBorderColor"))},tab:{fontSize:14,minHeight:36,textTransform:"none"}})));t.DashboardTabs=e=>{let{entries:t,selectedTabIndex:i,setSelectedTabIndex:o}=e;const c=d(),u=t.map((e=>{const t=e.view;return t.shouldBeShown(r.AppGlobals.AppModel)?(0,s.makePrettyTitle)(t.displayName(r.AppGlobals.AppModel),t):null})).filter((e=>null!=e));return(0,l.jsx)(a.ASThemeProvider,{header:!0,children:(0,l.jsx)(n.Tabs,{classes:{root:c.tabs},variant:"scrollable",scrollButtons:"auto",indicatorColor:"secondary",onChange:(e,t)=>
1o(t),value:i,children:u.map(((e,t)=>(0,l.jsx)(n.Tab,{classes:{root:c.tab},label:e},"header-tab-".concat(t))))})})}},152035:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.DashboardViewDataTestids=void 0,t.allowDashboardEditMode=G,t.default=void 0;var n=o(i(238416)),a=o(i(667294)),r=o(i(386010)),s=o(i(496486)),l=i(281294),d=i(249492),c=o(i(155345)),u=o(i(112963)),p=o(i(593186)),h=i(803444),m=o(i(59775)),f=o(i(888861)),g=o(i(962553)),y=o(i(409022)),v=o(i(73859)),b=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=V(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}(i(21870)),w=i(351101),S=i(375155),x=i(778947),C=i(557310),T=i(166089),I=i(496854),R=i(365914),O=i(278965),D=i(692479),N=o(i(819433)),j=i(324675),E=i(425435),A=i(44617),P=i(801622),M=i(303622),k=i(573553),_=i(901545),B=i(995090),L=i(148521);function V(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(V=function(e){return e?i:t})(e)}function F(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function W(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?F(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):F(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var H,U=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};!function(e){e.Container="dashboard-view-container"}(H||(t.DashboardViewDataTestids=H={}));function G(e,t){return s.default.some(null==e?void 0:e.map((e=>{let{ViewName:i}=e;return(0,j.allowTableEditMode)(i,t)})))}class z extends c.default{constructor(e){super(e),this.inlineRefs={},this.legacyScrollContainerRef={current:null},this.setSelectedTabIndex=e=>{C.ReactRootUIConfig.isReactRoot()?(0,N.default)().dispatch((0,B.setSelectedTabIndex)(this.viewStackKey,e)):this.setState({selectedTabIndex:e})},this.setInteractiveRowState=(e,t)=>{C.ReactRootUIConfig.isReactRoot()?(0,N.default)().dispatch((0,B.setInteractiveRowState)(this.viewStackKey,{selectedRowIds:e,tableSelectionHistory:t})):this.setState({selectedRowIds:e,tableSelectionHistory:t})},this.navigateToView=(e,t,i)=>{var o,n,a,r;const l={};l.RowKey=this.interactiveRowIdForEntry(e),l.FilterExpr=i;const d=e.view.name(),c=e.view.viewType(),u=null===(r=null===(a=null===(n=null===(o=this.inlineRefs[d])||void 0===o?void 0:o.current)||void 0===n?void 0:n.realView)||void 0===a?void 0:a.groupByState)||void 0===r?void 0:r.currentInlineItem();if(s.default.isEmpty(u)||"table"!==c&&"fastTable"!==c&&"deck"!==c&&"card"!==c||(l.GroupBy=null==u?void 0:u.groupBy,l.DefaultValues=null==u?void 0:u.filterDefaults,l.FilterExpr=null==u?void 0:u.filterExpr),C.ReactRootUIConfig.isReactRoot())l.FilterExpr&&(l.filterExprString=JSON.stringify(l.FilterExpr.toJSON()),delete l.FilterExpr),e.viewStackKey?this.pushInlineView(e.viewStackKey,l):(0,N.default)().dispatch((0,D.pushView)({ViewStackKey:this.viewStackKey,Identifier:{Type:"Control",Name:d},ViewState:l,InlineStatePath:e.inlineStatePath}));else{Object.assign(t,l);const i=T.AppGlobals.InputHandler.rootStateForControl(e.view.control(),t);T.AppGlobals.AppState.MutateState(i,"push-retain-search",void 0,this.viewStackKey)}},this.slideshowNavigate=(e,t)=>
1{var i;const o=this.inlineRefs[e];if(!o||!o.current)return void p.default.ReportErrorOnce({errorMessage:"Could not find inline view to slideshowNavigate",viewName:e});1!==t&&-1!==t&&p.default.ReportErrorOnce({errorMessage:"Invalid direction for slideshowNavigate",direction:t});const n=o.current.getView();if(null===(i=null==n?void 0:n.state)||void 0===i?void 0:i.transitioning)return;const a=n.findNewRowId(t,{wrap:!0});if(null!=a)if(this.interactiveMode()){const{table:t}=g.default.findByName(this.appModel.FindControl(e).TableOrFolderName,this.appModel);t&&this.toggleSharedRowId(t.rootName(),a)}else n.transitionStateToRowId(a)},this.toggleSharedRowId=(e,t)=>{var i;const o=s.default.clone(null!==(i=this.dashboardState.selectedRowIds)&&void 0!==i?i:{});let n=s.default.without(this.dashboardState.tableSelectionHistory,e);o[e]===t?o[e]=null:(o[e]=t,n=[...n,e],s.default.keys(o).forEach((t=>{const i=o[t];if(!i||t===e)return;const{rowIsVisible:n}=this.isSelectedRowVisible(t,i,o);n||(o[t]=null)}))),this.setInteractiveRowState(o,n)},this.interactiveRowIdForEntry=e=>{var t;const{table:i}=this.appModel.findTableCollection(e.view.table());if(!i)return null;const o=this.findReferencedRowToTable(i.rootName());return(null===(t=this.dashboardState.selectedRowIds)||void 0===t?void 0:t[i.rootName()])||o},this.isSelectedRowVisible=(e,t,i)=>{i=i||this.dashboardState.selectedRowIds;const{table:o,tableSchema:n}=g.default.findByName(e,this.appModel,!0),a=s.default.pickBy(i,(e=>null!=e)),r=f.default.createRefsFilter(a,n,this.appModel);let l=!1;if(t&&o){const e=o.queryRowValues({filterExpr:r,transaction:this.pendingTransaction}),i=n.keyAttribute().name();l=!!e.find((e=>e[i]===t))}return{rowIsVisible:l,filterExpr:r}},this.state={selectedRowIds:{},selectedTabIndex:0}}get dashboardState(){return C.ReactRootUIConfig.isReactRoot()?this.mutableViewState:this.state}UNSAFE_componentWillReceiveProps(e){if(!C.ReactRootUIConfig.isReactRoot()){if(this.props.quickEditMode&&!e.quickEditMode){this.getTransaction().started&&this.endTransaction()}this.setRowIdToSelection(e)}}setRowIdToSelection(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;var t,i;if(C.ReactRootUIConfig.isReactRoot()){const e=this.currentUIState;if((null==e?void 0:e.ControlName)===this.props.controlName&&(null===(t=null==e?void 0:e.DashboardUIState)||void 0===t?void 0:t.RowKey)){const t=e.DashboardUIState,{RowKey:o,TableName:n}=t,a=U(t,["RowKey","TableName"]),r=n&&(null===(i=this.appModel.findTableCollection(n))||void 0===i?void 0:i.rootTable),s=r?[r]:this.getRootTablesForViews();a.selectedRowIds={};for(const e of s)null!=e.lookupTableRow(o)&&(a.selectedRowIds[e.rootName()]=o);this.setCurrentUIState(Object.assign(Object.assign({},e),{DashboardUIState:a}))}}else{const{rowId:t,table:i}=e;if(t){const o=i?[i.rootTable()]:this.getRootTablesForViews(e);if(o.length){const e=void 0===this.props.rowId&&t?{}:Object.assign({},this.dashboardState.selectedRowIds);o.forEach((i=>{null!=i.lookupTableRow(t)&&(e[i.rootName()]=t)})),this.setInteractiveRowState(e)}}}}componentDidMount(){C.ReactRootUIConfig.isReactRoot()&&this.setRowIdToSelection()}componentDidUpdate(){var e;if(C.ReactRootUIConfig.isReactRoot())this.setRowIdToSelection();else{const t=this.currentUIState;(null==t?void 0:t.ControlName)===this.props.controlName&&(null===(e=null==t?void 0:t.DashboardUIState)||void 0===e?void 0:e.RowKey)&&setTimeout((()=>{this.setCurrentUIState(Object.assign(Object.assign({},t),{DashboardUIState:s.default.omit(t.DashboardUIState,"RowKey")}))}),0)}}renderActionButtonPortal(){const{actionButtonContainer:e}=this.props,t=this.getView();if(e&&t){if(this.inMultiRowEditMode())return C.ReactRootUIConfig.isInMobileExperience()?null:(0,L.jsx)(d.Portal,{container:e,children:(0,L.jsxs)(S.NavBarButtons,{childrenOnly:!0,children:[(0,L.jsx)(_.UpperCamelCaseButton,{"aria-label":(0,w.mapActionName)("Cancel"),variant:"outlined",onClick:()=>this.exitEditMode(),children:(0,w.mapActionName)("Cancel")}),(0,L.jsx)(_.UpperCamelCaseButton,{"aria-label":(0,w.mapActionName)("Save"),variant:"contained",onClick:()=>this.commitTransaction(),children:(0,w.mapActionName)("Save")})]})});{const i=this.allowQuickEditMode();return(0,L.jsx)(d.Portal,{container:e,children:(0,L.jsx)(S.NavBarButtons,{childrenOnly:!0,allowQuickEditMode:i,usedActions:[],children:b.default.isWideScreen&&(0,L.jsxs)(x.NavBarIconButton,{"aria-label":(0,w.mapActionName)("Reset Dashboard"),onClick:()=>b.default.localStorageState.set(t.name(),{}),children:[(0,L.jsx)("i",{className:"fas fa-th-large"}),(0,L.jsx)("span",{className:"sr-only",children:(0,w.mapActionName)("Reset Dashboard")})]})})})}}return null}allowQuickEditMode(){const{viewEntries:e}=this.props;return G(e,this.appModel)}allowsUpdate(){return!0}getViews(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;const{viewEntries:t}=e,i=this.appModel;return t&&i?s.default.compact(t.map((e=>i.appTemplate.getView(e.ViewName)))):[]}getRootTablesForViews(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return s.default.uniq(s.default.compact(this.getViews(e).map((e=>this.appModel.findTableCollection(null==e?void 0:e.table()).rootTable))))}getNestedViewComponents(){const e=s.default.values(this.refs);return s.default.compact(e.map((e=>e.getView())))}inlineViewRef(e){return"inlineview-"+e}findReferencedRowToTable(e){var t;for(const i in this.dashboardState.selectedRowIds){const o=this.dashboardState.selectedRowIds[i];if(!o)continue;const n=this.appModel,{table:a,tableSchema:r}=g.default.findByName(i,n);if(a&&r){const i=r.refAttributesToTable(e);if(i.length){const e=null===(t=a.lookupTableRow(o,this.pendingTransaction))||void 0===t?void 0:t.values;if(e)for(let t=0;t<i.length;t++){const o=e[i[t].name()];if(o)return o}}}}return null}interactiveMode(){return this.props.viewDefn?this.props.viewDefn.InteractiveMode:this.props.interactiveMode}renderEntry(e){var t,i;if(!C.ReactRootUIConfig.isReactRoot())return this.renderEntryLegacy(e);
1const{entry:o,styles:n,sidewaysScroll:a,key:r,displayMode:s,cellWidth:l}=e,d=o.view,c=(0,R.makePrettyTitle)(d.displayName(this.appModel),d),{table:u}=this.appModel.findTableCollection(d.table()),p=T.AppGlobals.AppModel.NavStateForView(d.control());return u&&!p.RowKey&&(p.RowKey=null===(t=this.dashboardState.selectedRowIds)||void 0===t?void 0:t[u.rootName()]),(0,L.jsx)(E.DashboardViewEntry,{listContainerRef:this.props.listContainerRef,entryKey:r,entry:o,styles:n,cellWidth:l,sidewaysScroll:a,displayName:c,interactiveMode:this.interactiveMode(),dashboardState:this.dashboardState,inMultiRowEditMode:this.inMultiRowEditMode(),displayMode:s,widthIsBelowBreakpoint:this.widthIsBelowBreakpoint(),parentId:this.id(),rowId:null!==(i=p.RowKey)&&void 0!==i?i:void 0,searchQuery:this.props.searchQuery,coupledViews:this.getViews().filter((e=>e.table()===d.table()&&e.name()!==d.name())),parentViewStackKey:this.viewStackKey,showMap:this.props.showMap,ref:this.inlineRefs[d.name()],interactiveRowIdForEntryFn:this.interactiveRowIdForEntry,isSelectedRowVisibleFn:this.isSelectedRowVisible,toggleSharedRowIdFn:this.toggleSharedRowId,navigateToViewFn:this.navigateToView})}renderEntryLegacy(e){let{entry:t,styles:i,cellWidth:o,cellHeight:n,sidewaysScroll:a,key:l,displayMode:d}=e;var c,p;const m=t.view,f=(0,R.makePrettyTitle)(m.displayName(this.appModel),m),{table:g}=this.appModel.findTableCollection(m.table()),y=T.AppGlobals.AppModel.NavStateForView(m.control());g&&!y.RowKey&&(y.RowKey=null===(c=this.dashboardState.selectedRowIds)||void 0===c?void 0:c[g.rootName()]);const v="detail"===m.viewType(),b=m.definition().SlideshowMode;let S=null;v&&b&&(S=(0,L.jsxs)("div",{className:"DashboardView__slideshow-arrows",children:[(0,L.jsx)(u.default,{className:"DashboardView__slideshow-arrow",onTap:this.slideshowNavigate.bind(this,m.name(),-1),children:(0,L.jsx)("i",{className:"fa fa-caret-left"})}),(0,L.jsx)(u.default,{className:"DashboardView__slideshow-arrow",onTap:this.slideshowNavigate.bind(this,m.name(),1),children:(0,L.jsx)("i",{className:"fa fa-caret-right"})})]}));let x,C,I={};if(this.interactiveMode()&&g){let e=this.interactiveRowIdForEntry(t);const i=this.isSelectedRowVisible(g.rootName(),e);x=i.rowIsVisible,C=i.filterExpr,x||(e=null);const{selectedRowIds:o}=this.dashboardState;if(I={rowId:e,filterExpr:C,onRowOpened:this.toggleSharedRowId,interactiveRowIds:o},"map"===m.viewType()&&(null===(p=this.appModel)||void 0===p?void 0:p.inRollout("interactiveMapsFix"))){const{tableSelectionHistory:e}=this.dashboardState,{MapColumn:t,SecondaryTable:i,SecondaryColumn:n}=m.definition(),a=e=>{var t;return null==o?void 0:o[null!==(t=null==e?void 0:e.rootName())&&void 0!==t?t:""]},r=e=>null!=a(e),l=this.appModel.findTableCollection(m.table()).table,d=this.appModel.findTableCollection(i).table,c=()=>Object.assign(I,l&&{rowId:a(l),selectedTable:l.name(),selectedColumn:t}),u=()=>Object.assign(I,d&&{rowId:a(d),selectedTable:d.name(),selectedColumn:n}),p=(t,i)=>s.default.indexOf(e,t.rootName())>s.default.indexOf(e,i.rootName());r(l)&&!r(d)?c():!r(l)&&r(d)?u():r(l)&&r(d)&&l.rootName()!==d.rootName()&&(p(l,d)?c():p(d,l)&&u())}}const D=(0,r.default)("DashboardView__entry",{}),N=(!this.appModel.inRollout("adjustableDash")||this.widthIsBelowBreakpoint())&&!this.inMultiRowEditMode();let j;this.appModel.inRollout("adjustableDash")&&!this.widthIsBelowBreakpoint()&&(j=(0,L.jsx)(u.default,{innerStyle:{opacity:1},onTap:this.navigateToView.bind(this,t,y,C),ariaLabel:(0,w.mapActionName)("Expand"),children:(0,L.jsx)("i",{style:(0,O.convertToRtlWhenNecessary)({fontSize:14,marginRight:3}),className:"fal fa-expand-alt"})}));const P="tabs"!==d&&(0,L.jsxs)("div",{className:"DashboardView__entry-header",style:(0,O.convertToRtlWhenNecessary)({height:"tiled"===d?36:void 0}),children:[(0,L.jsx)(u.default,{className:"DashboardView__entry-title",innerStyle:{maxWidth:"100%"},navigationDelay:!0,enabled:N,onTap:this.navigateToView.bind(this,t,y,C),children:f}),S,j]});let M=n;"tabs"!==d&&null!=M&&(M-=36);let k=this.props.searchQuery;const _="rowId"in I?I.rowId:void 0;k&&this.interactiveMode()&&"detail"===m.viewType()&&_&&g&&A.dynamicRollouts.includeByOwnerId("InteractiveDashDetailSearchFix")&&(0,E.isInteractiveSelectionWithinSearch)(this.appModel,g,_,this.dashboardState.selectedRowIds,k,this.pendingTransaction)&&(k=void 0);const B=(0,L.jsx)("div",{className:"DashboardView__view",children:(0,L.jsx)(h.LegacyInlineView,W({disableRowSwipe:"detail"===m.viewType(),view:m,quickEditMode:this.inMultiRowEditMode(),disableNavigation:this.inMultiRowEditMode(),interactiveDashboardMode:this.interactiveMode(),coupledViews:this.getViews().filter((e=>e.table()===m.table()&&e.name()!==m.name())),controlName:m.name(),tableName:m.table(),viewType:m.viewType(),viewState:y,rowId:this.props.rowId,searchQuery:k,width:o,height:M,sidewaysScroll:a,mapMode:a?"fixed":"full",showMap:this.props.showMap,ref:this.inl
1ineRefs[m.name()],parentId:this.id(),parentViewStackKey:this.viewStackKey,listContainerRef:this.legacyScrollContainerRef},I))},"DashboardInlineView"+m.name());if("tabs"===d)return B;const V=(0,L.jsxs)(L.Fragment,{children:[P,B]});return(0,L.jsx)("div",{className:D,style:(0,O.convertToRtlWhenNecessary)(i),role:"region","aria-label":m.displayName(this.appModel),children:V},l)}viewEntries(){return this.props.viewEntries?this.props.viewEntries||[]:this.props.viewDefn&&this.props.viewDefn.ViewEntries||[]}renderTabsLegacy(e){var t,i;const o=null!==(t=this.dashboardState.selectedTabIndex)&&void 0!==t?t:0,n=e[o];let a=null,s=null;if(n){s=n.view.viewType();const e="table"===s?this.props.width:this.containerWidth();let t;switch(s){case"chart":case"calendar":case"map":t=this.props.height-10;break;case"table":default:t=this.props.height;break;case"onboarding":case"detail":t=void 0}a=this.renderEntry({entry:n,styles:null,cellHeight:t,cellWidth:e,sidewaysScroll:!1,key:"tab_"+o+"_"+n.view.name(),displayMode:"tabs"})}const l=(0,r.default)("BasePrimaryView DashboardView DashboardView--tabs-mode",{"DashboardView--scroll-mode":"table"!==s,"DashboardView--no-scroll-mode":"table"===s});let d;return this.inMultiRowEditMode()&&(d=(0,L.jsx)(m.default,{appModel:this.appModel,onCancel:this.exitEditMode,onSave:this.commitTransaction},"footer")),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(P.DashboardTabs,{entries:e,selectedTabIndex:null!==(i=this.dashboardState.selectedTabIndex)&&void 0!==i?i:0,setSelectedTabIndex:this.setSelectedTabIndex}),(0,L.jsx)("div",{ref:this.onScrollContainerMount,className:l,style:(0,O.convertToRtlWhenNecessary)({height:this.props.height,width:this.props.width}),children:a},"dashboard"),d,this.renderActionButtonPortal()]})}renderTabs(e){var t,i;if(C.ReactRootUIConfig.isReactRoot()){const o=null!==(t=this.dashboardState.selectedTabIndex)&&void 0!==t?t:0,n=e[o],a=(0,r.default)("BasePrimaryView DashboardView DashboardView--tabs-mode","DashboardView--no-scroll-mode");let s;return this.inMultiRowEditMode()&&(s=(0,L.jsx)(m.default,{appModel:this.appModel,onCancel:this.exitEditMode,onSave:this.commitTransaction},"footer")),(0,L.jsxs)("div",{className:a,style:(0,O.convertToRtlWhenNecessary)({flexGrow:1,width:"100%",display:"flex",flexDirection:"column"}),children:[(0,L.jsx)(P.DashboardTabs,{entries:e,selectedTabIndex:null!==(i=this.dashboardState.selectedTabIndex)&&void 0!==i?i:0,setSelectedTabIndex:this.setSelectedTabIndex}),n&&this.renderEntry({entry:n,styles:{display:"flex",flexDirection:"column",flexGrow:1,width:"100%"},sidewaysScroll:!1,key:"tab_"+o+"_"+n.view.name(),displayMode:"tabs"}),s,this.renderActionButtonPortal()]},"dashboard")}return this.renderTabsLegacy(e)}renderScroll(e){var t;const i=e.map(((e,t)=>this.renderEntry({entry:e,styles:null,cellWidth:this.containerWidth(),sidewaysScroll:!0,key:"tab_"+t+"_"+e.view.name(),displayMode:"scroll"})));let o;return this.inMultiRowEditMode()&&(o=(0,L.jsx)(m.default,{appModel:this.appModel,onCancel:this.exitEditMode,onSave:this.commitTransaction})),[(0,L.jsx)("div",{ref:null!==(t=this.props.listContainerRef)&&void 0!==t?t:this.onScrollContainerMount,className:"BasePrimaryView DashboardView DashboardView--scroll-mode",style:(0,O.convertToRtlWhenNecessary)({height:this.props.height,width:this.props.width}),children:i},"dashboard"),o,this.renderActionButtonPortal()]}renderPacked(e){const t=(0,I.computeLayoutPacked)({entries:e,width:this.props.width,height:this.props.height}),i=t.entries.map(((e,i)=>{const o=0===e.y,n=e.x+e.w===t.columns,a=e.y+e.h===t.rows,r=0===e.x,s=o?t.padding:t.padding/2,l=n?t.padding:t.padding/2,d=a?t.padding:t.padding/2,c=r?t.padding:t.padding/2,u=t.cellWidth*e.w-c-l,p=t.cellHeight*e.h-s-d,h={top:s+e.y*t.cellHeight,left:c+e.x*t.cellWidth,width:u,height:p};return this.renderEntry({entry:e,styles:h,cellHeight:p,cellWidth:u,sidewaysScroll:!1,key:"layout_entry_"+i+"_"+e.view.name(),displayMode:"tiled"})}));let o;return this.inMultiRowEditMode()&&(o=(0,L.jsx)(m.default,{appModel:this.appModel,onCancel:this.exitEditMode,onSave:this.commitTransaction})),(0,L.jsxs)("div",{className:"BasePrimaryView DashboardView DashboardView--packed-mode",style:(0,O.convertToRtlWhenNecessary)({height:this.props.height}),children:[i,o,this.renderActionButtonPortal()]})}widthIsBelowBreakpoint(){return this.props.width<768}get tabsMode(){var e;return!C.ReactRootUIConfig.isInDesktopExperience()&&this.widthIsBelowBreakpoint()&&(null===(e=this.getView())||void 0===e?void 0:e.definition().ShowTabs)}renderAdjustable(e){const{height:t,width:i,quickEditMode:o,controlName:n}=this.props;let a,r="100%",s=t;return!C.ReactRootUIConfig.isInDesktopExperience()&&this.inMultiRowEditMode()&&(a=(0,L.jsx)(m.default,{appModel:this.appModel,onCancel:this.exitEditMode,onSave:this.commitTransaction},"footer"),r=o?"calc(100% - ".concat(b.DEFAULT_FOOTER_HEIGHT,"px)"):r,s&&o&&C.ReactRootUIConfig.isInMobileExperience()&&(s-=b.DEFAULT_FOOTER_HEIGHT)),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("div",{className:"BasePrimaryView DashboardView DashboardView--packed-mode",style:(0,O.convertToRtlWhenNecessary)({height:r,width:i}),children:(0,L.jsx)(v.default,{controlName:n,entries:e,dashHeight:s,renderEntry:this.renderEntry.bind(this)})},"dashboard"),a,this.renderActionButtonPortal()]})}getViewsToRender(e){const t=[];return e.forEach((e=>{if(!e.ViewName)return;const i=this.appModel.appTemplate.getView(e.ViewName);if(null==i)return;
1this.inlineRefs[e.ViewName]||(this.inlineRefs[e.ViewName]=a.default.createRef());const{tableSchema:o,table:n}=this.appModel.findTableCollection(i.table());if(!o||!n)return void p.default.warnToDevConsole("Dashboard couldnt find table named ".concat(i.table()," on view named ").concat(e.ViewName));const r=i.shouldBeShown(this.appModel),s=this.createInlineStatePath({controlName:i.name(),viewType:i.viewType(),tableName:i.table()||void 0});let l;if(C.ReactRootUIConfig.isReactRoot()){const e=this.viewStackKey;if(!e)throw new Error("ViewStackKey not found");const t={Type:"Control",Name:i.name(),InlineInfo:{parentViewStackKey:e}};l=(0,k.generateViewStackKey)(t)}r&&t.push({view:i,ViewSize:e.ViewSize||null,inlineStatePath:s,viewStackKey:l})})),t}render(){var e;if(!this.shouldShow())return null;const t=this.viewEntries();if(!t)return(0,L.jsx)("div",{});this.inlineRefs||(this.inlineRefs={});const i=this.getViewsToRender(t);let o;if(this.widthIsBelowBreakpoint()){const e=this.getViews().filter((e=>"table"===e.viewType())).length>0;o=(0,L.jsx)(y.default,{disabled:C.ReactRootUIConfig.isInMobileExperience()||this.inMultiRowEditMode()||e,appModel:this.appModel,getScrollContainer:this.getScrollContainer,children:this.tabsMode?this.renderTabs(i):this.renderScroll(i)})}else{o=this.appModel&&this.appModel.inRollout("adjustableDash")?this.renderAdjustable(i):this.renderPacked(i)}return(0,L.jsx)(M.EmulatorComponentWrapper,{applyStyleType:this.tabsMode?"dashboardContent":"topLevelView",containerStyles:{height:"100%"},dataVFEValues:{root:"dashboard",control:null!==(e=this.props.controlName)&&void 0!==e?e:void 0},children:(0,L.jsx)("div",{"data-testid":H.Container,style:(0,O.convertToRtlWhenNecessary)({height:"100%",display:"flex",flexDirection:"column"}),children:o})})}getScrollContainer(){var e,t;return null!==(t=(null!==(e=this.props.listContainerRef)&&void 0!==e?e:this.legacyScrollContainerRef).current)&&void 0!==t?t:super.getScrollContainer()}}t.default=(0,l.observer)(z)},425435:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.DashboardViewEntry=void 0,t.isInteractiveSelectionWithinSearch=N;var n=o(i(238416)),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=R(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}(i(667294)),r=o(i(496486)),s=o(i(480366)),l=i(609135),d=i(698739),c=i(686801),u=i(790594),p=i(557310),h=o(i(112963)),m=i(778947),f=o(i(962553)),g=i(14042),y=i(398171),v=i(149313),b=i(351101),w=i(278965),S=i(29827),x=i(173399),C=i(692479),T=i(44617),I=i(148521);function R(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(R=function(e){return e?i:t})(e)}function O(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function D(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?O(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):O(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function N(e,t,i,o,n,a){if(!o||!i||!(null==n?void 0:n.trim()))return!1;const r=n.trim(),s=t.rootName(),l=t.lookupTableRow(i,a);if(o[s]===i){if(!!l&&t.evaluateSearch([l],r,e).length>0)return!0}for(const[n,d]of Object.entries(o)){if(!d||n===s)continue;const{table:o,tableSchema:c}=f.default.findByName(n,e);if(!o||!c)continue;const u=o.lookupTableRow(d,a);if(!u)continue;const p=c.refAttributesToTable(s).some((e=>u.values[e.name()]===i)),h=(l?t.tableSchema.refAttributesToTable(o.rootName()):[]).some((e=>l.values[e.name()]===d));
1if((p||h)&&o.evaluateSearch([u],r,e).length>0)return!0}return!1}t.DashboardViewEntry=a.default.forwardRef((function(e,t){let{listContainerRef:i,entryKey:o,entry:n,styles:f,cellWidth:R,sidewaysScroll:O,displayName:E,interactiveMode:A,inMultiRowEditMode:P,widthIsBelowBreakpoint:M,dashboardState:k,displayMode:_,parentId:B,rowId:L,coupledViews:V,parentViewStackKey:F,searchQuery:W,showMap:H,interactiveRowIdForEntryFn:U,isSelectedRowVisibleFn:G,toggleSharedRowIdFn:z,navigateToViewFn:K}=e;const[Y,q]=(0,a.useState)(null),X=n.view,{selectedRowIds:Q,tableSelectionHistory:$}=k,Z=(0,g.useReactAppSelector)(y.getAppModelHook),{table:J}=Z.findTableCollection(X.table()),ee=n.viewStackKey,te=(0,g.useDispatchForView)(ee),ie=(0,g.useReactAppSelector)((e=>{if(ee){const t=(0,S.selectViewStateById)(e,ee);return(0,x.mapViewStackToControl)(t).navState}return Z.NavStateForView(X.control())}));(0,v.$TSFixMeMaybeNull)(ie);let oe,ne,ae={};if(A&&J){let e=U(n);const t=G(J.rootName(),e);if(oe=t.rowIsVisible,ne=t.filterExpr,oe||(e=null),ae={rowId:e,filterExpr:ne,onRowOpened:z,interactiveRowIds:Q},"map"===X.viewType()&&(null==Z?void 0:Z.inRollout("interactiveMapsFix"))){const{MapColumn:e,SecondaryTable:t,SecondaryColumn:i}=X.definition(),o=e=>{var t;return null==Q?void 0:Q[null!==(t=null==e?void 0:e.rootName())&&void 0!==t?t:""]},n=e=>null!=o(e),a=Z.findTableCollection(X.table()).table,s=Z.findTableCollection(t).table,l=()=>Object.assign(ae,a&&{rowId:o(a),selectedTable:a.name(),selectedColumn:e}),d=()=>Object.assign(ae,s&&{rowId:o(s),selectedTable:s.name(),selectedColumn:i}),c=(e,t)=>r.default.indexOf($,e.rootName())>r.default.indexOf($,t.rootName());n(a)&&!n(s)?l():!n(a)&&n(s)?d():n(a)&&n(s)&&a.rootName()!==s.rootName()&&(c(a,s)?l():c(s,a)&&d())}}const re=(!Z.inRollout("adjustableDash")||M)&&!P;let se,le;if(Z.inRollout("adjustableDash")&&!M&&(se=(0,I.jsx)(h.default,{innerStyle:{opacity:1},onTap:()=>K(n,ie,ne),children:(0,I.jsx)("i",{style:(0,w.convertToRtlWhenNecessary)({fontSize:14,marginRight:3}),className:"fal fa-expand-alt"})})),"tabs"!==_)if(p.ReactRootUIConfig.isInDesktopExperience()){const e=[];se&&e.push((0,I.jsx)(m.NavBarIconButton,{"aria-label":(0,b.mapActionName)("Expand"),onClick:()=>K(n,ie,ne),children:(0,I.jsx)("i",{className:"fa fa-expand-alt"})},"expand"));const t=null!=ie.selected;let i;if(t){const e=(0,b.mapActionName)("Cancel Selection");i=(0,I.jsx)(m.NavBarIconButton,{onClick:()=>te((0,C.mutateView)({ViewState:{selected:t?void 0:[]}})),"aria-label":e,children:(0,I.jsx)(s.default,{})})}le=(0,I.jsx)("div",{className:"DashboardView__entry-header with-subnav",children:(0,I.jsx)(u.SubNavBar,{leftChildren:i,title:t?"".concat(ie.selected.length," Selected"):(0,I.jsx)(h.default,{navigationDelay:!0,enabled:re,onTap:()=>K(n,ie,ne),children:E}),ref:e=>q(e),children:e})})}else le=(0,I.jsxs)("div",{className:"DashboardView__entry-header",children:[(0,I.jsx)(h.default,{className:"DashboardView__entry-title",innerStyle:{maxWidth:"100%"},navigationDelay:!0,enabled:re,onTap:()=>K(n,ie,ne),children:E}),se]});const de=(0,g.usePendingTransaction)(),ce="rowId"in ae?ae.rowId:void 0,ue=(0,a.useMemo)((()=>{if(!(W&&A&&"detail"===X.viewType()&&ce&&J&&T.dynamicRollouts.includeByOwnerId("InteractiveDashDetailSearchFix")&&N(Z,J,ce,Q,W,de)))return W}),[Z,null==Z?void 0:Z.DataStamp,A,ce,W,Q,J,de,X]),pe=(0,I.jsx)("div",{className:"DashboardView__view",style:(0,w.convertToRtlWhenNecessary)({flex:"1 1 0",position:"relative"}),children:(0,I.jsx)(l.InlineViewForEnvironment,D({disableRowSwipe:"detail"===X.viewType(),listContainerRef:i,dynamicHeightMode:"scroll"===_,view:X,ref:t,quickEditMode:P,disableNavigation:P,interactiveDashboardMode:A,applyUserDefinedFilters:!0,coupledViews:V,controlName:X.name(),tableName:X.table(),viewType:X.viewType(),viewState:ie,rowId:L,searchQuery:ue,width:R,sidewaysScroll:O,mapMode:O?"fixed":"full",showMap:H,actionButtonContainer:Y,parentId:B,viewStackKey:ee,parentViewStackKey:F},ae))},"DashboardInlineView"+X.name());return(0,I.jsx)("div",{className:"DashboardView__entry",style:(0,w.convertToRtlWhenNecessary)(f),role:"region","aria-label":X.displayName(Z),children:p.ReactRootUIConfig.isInDesktopExperience()?(0,I.jsx)(j,{viewStackKey:ee,children:(0,I.jsxs)(d.InlineFilterContextProvider,{tableName:X.table(),viewType:X.viewT
1ype(),children:[le,pe,(0,I.jsx)(c.FilterDrawer,{})]})}):(0,I.jsxs)(I.Fragment,{children:[le,pe]})},o)}));function j(e){let{children:t,viewStackKey:i}=e;return i?(0,I.jsx)(g.ViewStackKeyContextProvider,{viewStackKey:i,children:t}):(0,I.jsx)(I.Fragment,{children:t})}},497797:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.BaseSlideshowView=void 0;var n=o(i(238416)),a=i(166089),r=o(i(386010)),s=o(i(112963)),l=o(i(303055)),d=i(814394),c=i(680462),u=i(735894),p=o(i(496486)),h=o(i(973935)),m=o(i(571524)),f=o(i(593186)),g=o(i(21870)),y=i(557310),v=i(318926),b=i(218546),w=o(i(150198)),S=i(916230),x=o(i(155345)),C=i(632606),T=i(41389),I=i(278965),R=i(562858),O=i(148521);function D(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function N(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?D(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):D(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}const j=400,E=c.SLIDESHOW_PAGE_MAX_WIDTH+156,A=e=>{const{activeElement:t}=document,i=((null==t?void 0:t.tagName)||"").toLowerCase(),o="button"===(null==t?void 0:t.role),n=-1===(null==t?void 0:t.tabIndex),r=o&&n;return a.AppGlobals.AppState&&a.AppGlobals.AppState.CurrentUIState&&"detail"===a.AppGlobals.AppState.CurrentUIState.Root&&!p.default.includes(["input","textarea"],i)&&!r&&!e};class P extends x.default{constructor(e){super(e),this.resizeHandler=()=>{this.forceUpdate()},this.handleRowTap=this.handleRowTap.bind(this),this.handleKey=this.handleKeyUnbound.bind(this),this.commitTransaction=this.commitTransaction.bind(this)}get isInDesktopEditMode(){return(0,C.isInDesktopEditMode)(Boolean(this.props.isInline),Boolean(this.mutableViewState.isInEditMode))}componentDidMount(){var e;super.componentDidMount(),(0,T.isInEditingEmulatorEditMode)()&&v.logger.logAppEvent({eventName:b.AppEventName.DetailViewMounted}),$(window).on("resize",this.resizeHandler),"detail"===(null===(e=this.topStackUIState)||void 0===e?void 0:e.Root)&&$(document).on("keyup",this.handleKey),this.swipeElement=new S.SwipeElement({$selectorRoot:$(h.default.findDOMNode(this)),selector:".ReactSlideshowView__page",denylist:".GalleryView, .TableView, .BaseScribbleTypeInput, .Slider, .GoogleMapPane",rightSwipeHandler:()=>{f.default.AddTraceContext("SlideshowView swipePrev"),v.logger.logAppEvent({eventName:b.AppEventName.SlideshowViewSwipePrev}),this.handleNavigate(-1)},leftSwipeHandler:()=>{f.default.AddTraceContext("SlideshowView swipeNext"),v.logger.logAppEvent({eventName:b.AppEventName.SlideshowViewSwipeNext}),this.handleNavigate(1)}})}componentWillUnmount(){super.componentWillUnmount(),$(window).off("resize",this.resizeHandler),$(document).off("keyup",this.handleKey),this.swipeElement.reset()}getViewSettings(){const{table:e,controlName:t}=this.props,i=this.appModel;if(e&&i){const o=i.appTemplate;let n=o.findControl(t);if(n&&"detail"===n.Action||(n=o.findControlsForTable(e.name(),"detail")[0]),n)return o.getViewDefinition(n.Name)}return{}}quickEditColumns(){return this.getViewSettings().QuickEditColumns}page(e,t,i,o,n,a){const r={marginLeft:n?"-100%":0,height:"100%",transform:i?"translate("+i+"px, 0)":"translate(0, 0)"};let s;return s=this.showDetailContent()?this.renderDetailContentView(e,t,a):this.renderDetailListView(e,t,o,a),(0,O.jsx)("div",{className:"ReactSlideshowView__page",style:(0,I.convertToRtlWhenNecessary)(r),children:s},e)}showDetailContent(){return this.props.detailContentColumn&&"**none**"!==this.props.detailContentColumn}onScrollContainerMount(e){super.onScrollContainerMount(e),this.forceUpdate()}get slideshowPageExtraProps(){return{}}renderDetailListView(e,t,i,o){var n;const a=this.props.columnOrder||[],r=!a.length||p.default.includes(a,"**all other columns**"),s=this.props.tableSchema.nonCosmeticAttributes().filter((e=>r||p.default.includes(a,e.name()))),l=y.ReactRootUIConfig.isReactRoot();"string"==typeof i&&(i=g.default.windowWidth||document.body.clientWidth);const c=null!==(n=this.props.listContainerRef)&&void 0!==n?n:this.onScrollContainerMount,u=this.getScrollC
1ontainer();return(0,O.jsx)(d.SlideshowPage,N(N({},this.props),{},{appModel:this.appModel,layout:this.customLayout,useCardLayout:this.useCardLayout(),quickEditColumns:this.quickEditColumns(),useDesktopMultiColumn:this.getViewSettings().UseDesktopMultiColumn,parentId:this.id(),useTransactions:l,fixedHeightMode:this.fixedHeightMode(),rowId:e,width:i,height:this.props.height,onScrollContainerMount:o?c:void 0,scrollContainer:u,interactiveRowIds:this.props.interactiveRowIds,isPrimaryPage:o,isSingleRow:this.isSingleRow(),allowNavigation:this.allowNavigation(),onPrev:this.isFirst()?void 0:()=>this.transition(-1),onNext:this.isLast()?void 0:()=>this.transition(1),view:this.getView(),entryAttributes:s,scrollbarWidth:this.scrollbarWidth.bind(this),fabActions:this.fabActions,rowValues:t||{}},this.slideshowPageExtraProps))}renderDetailContentView(e,t,i){const o=this.props,n=this.isCompactView();let a;a=n?this.renderDetailBottomBar(t):this.renderDetailSideBar(e,t,i);const r={};o.isInline||(r.bottom=g.default.footerHeight),o.width&&(r.width=o.width,r.height=o.height);const s=this.renderDetailContent(t),d=Math.floor(l.default.computeHeight(this.props)),c={position:"absolute",top:"58px",width:o.width-(n?0:j),height:o.height-(n?d:0),left:n?0:j};return(0,O.jsxs)("div",{style:(0,I.convertToRtlWhenNecessary)(r),className:"BasePrimaryView DetailContent"+(n?" BottomBar":" SideBySide"),children:[(0,O.jsx)("div",{className:"DetailContent-pane",style:(0,I.convertToRtlWhenNecessary)(c),children:s}),a]})}detailContentColumnAttribute(){return this.showDetailContent()?this.props.tableSchema.findAttributeByName(this.props.detailContentColumn):null}isCompactView(){return this.props.width<=512}renderDetailContent(e){const t=this.detailContentColumnAttribute();return"url"===(null==t?void 0:t.type().toLowerCase())?this.renderDetailContentIframe(w.default.toHttpsUrl(w.default.urlValueFromWireFormat(e[t.name()]).url)):null}renderDetailContentEmbeddedFile(e){return(0,O.jsx)(u.EmbeddedFileObject,{displayURL:e})}renderDetailContentIframe(e){return(0,O.jsx)("iframe",{src:e,sandbox:"",name:"iframe_pane",frameBorder:"0",style:(0,I.convertToRtlWhenNecessary)({width:"100%",height:"100%",margin:0,padding:0})})}renderDetailBottomBar(e){const{table:t}=this.props,i=a.AppGlobals.AppModel.FindControlsForTable(t.name(),"deck",!1);let o=null;i.length&&(o=i[0]);let n={};o&&(n=a.AppGlobals.AppModel.NavStateForView(o,t.name()));const r=this.handleRowTap,s=(0,O.jsx)(l.default,N(N({},this.props),{},{appModel:this.appModel,table:t,tableSchema:this.props.tableSchema,rowValues:e,onRowTap:r,actionColumns:n.actionColumns,actionBarEntries:n.actionBarEntries,deckSummaryColumn:n.deckSummaryColumn,imageDisplayType:n.ImageDisplayType,mainDeckImageColumn:n.mainDeckImageColumn,primaryDeckHeaderColumn:n.primaryDeckHeaderColumn,secondaryDeckHeaderColumn:n.secondaryDeckHeaderColumn,showActionBar:n.showActionBar})),d={position:"absolute",bottom:0,width:this.props.width};return(0,O.jsx)("div",{className:"DetailContent-BottomBar",style:(0,I.convertToRtlWhenNecessary)(d),children:s})}renderDetailSideBar(e,t,i){const o=this.renderDetailListView(e,t,j,i),n={position:"absolute",width:j,height:this.props.height,left:0,top:0};return(0,O.jsx)("div",{className:"DetailContent-SideBar",style:(0,I.convertToRtlWhenNecessary)(n),children:o})}handleKeyUnbound(e){switch(e.key){case"ArrowLeft":A(this.isInDesktopEditMode)&&(this.handleNavigate(-1),e.preventDefault());break;case"ArrowRight":A(this.isInDesktopEditMode)&&(this.handleNavigate(1),e.preventDefault())}}handleNavigate(e){this.transition(e)}isSmallScreen(){return this.props.width<=E+this.scrollbarWidth()}allowNavigation(){const e=this.getView();return!e||e.definition().SlideshowMode}shouldAlwaysShowArrows(){return!(this.isSingleRow()||!this.props.showNavigationArrows)&&!this.isSmallScreen()}shouldShowArrowsOnHover(){return!(this.isSingleRow()||!this.props.showNavigationArrows)&&(this.isSmallScreen()&&!m.default.IsTouchEnabled())}renderArrows(e){if(!((this.shouldAlwaysShowArrows()||this.shouldShowArrowsOnHover())&&this.allowNavigation()))return null;const t=this.isSmallScreen(),i=t?32:56,o=t?80:56,n=!t;let a={left:0},l={left:this.showDetailContent()&&!this.isCompactView()?j-i:"calc(100% - "+i+"px)"};const d=(0,O.jsx)(R.DirectionAwareIcon,{icon:(0,O.jsx)("i",{className:"fal fa-chevron-left"})}),u=(0,O.jsx)(R.DirectionAwareIcon,{icon:(0,O.jsx)("i",{className:"fal fa-chevron-right"})});if(n){const e=this.props.height&&this.scrollbarWidth()||0,t=10;a={left:"calc(50% - ".concat(c.SLIDESHOW_PAGE_MAX_WIDTH/2+56+e+t,"px")},l={left:"calc(50% + ".concat(c.SLIDESHOW_PAGE_MAX_WIDTH/2+t,"px")}}else l={left:"calc(100% - "+(i+(this.scrollbarWidth()||0))+"px)"};
1this.showDetailContent()&&(a={left:0},l={left:"calc(100% - ".concat(i,"px)")});const p={width:i,height:o,top:"calc(50% - 40px)",position:"absolute",borderRadius:n?"50%":"0"},h="Background"===this.props.imageDisplayType&&!!e;return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(s.default,{className:(0,r.default)("ReactSlideshowView__previous",{"slideshow-arrow-wide-mode":n&&!h,"slideshow-arrow-wide-background-image-mode":n&&h}),onTap:this.handleNavigate.bind(this,-1),innerStyle:Object.assign(Object.assign({},p),a),children:[d,(0,O.jsx)("span",{className:"sr-only",children:"Previous Page"})]},"previous"),(0,O.jsxs)(s.default,{className:(0,r.default)("ReactSlideshowView__next",{"slideshow-arrow-wide-mode":n&&!h,"slideshow-arrow-wide-background-image-mode":n&&h}),onTap:this.handleNavigate.bind(this,1),innerStyle:Object.assign(Object.assign({},p),l),children:[u,(0,O.jsx)("span",{className:"sr-only",children:"Next Page"})]},"next")]})}}t.BaseSlideshowView=P},159747:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.LegacySlideshowView=void 0;var n=o(i(496486)),a=o(i(386010)),r=o(i(365914)),s=o(i(571524)),l=o(i(385857)),d=o(i(962553)),c=o(i(888861)),u=o(i(593186)),p=i(803583),h=i(814394),m=i(148448),f=o(i(409022)),g=o(i(21870)),y=i(260493),v=i(557310),b=i(497797),w=i(303622),S=i(278965),x=i(148521);class C extends b.BaseSlideshowView{constructor(e){super(e),this.state=this.makeStateFromProps(e)}transitionStateToRowId(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.endTransaction();const i=v.ReactRootUIConfig.isInDesktopExperience();!s.default.IsAndroid4()&&!i?this.setState({extraScreenId:e},(()=>{setTimeout((()=>{this.setState({currentRowId:e,extraScreenId:this.state.currentRowId,transitioning:!0},(()=>{setTimeout((()=>{this.setState(n.default.extend(t,{currentRowId:e,extraScreenId:null,transitioning:!1}))}),300)}))}),16)})):this.setState(n.default.extend(t,{currentRowId:e}))}UNSAFE_componentWillReceiveProps(e){const t=this.makeStateFromProps(e);if(e.table&&null!=t.currentRowId&&null!=this.state.currentRowId&&this.state.currentRowId!==t.currentRowId){const e=t.currentRowId;t.currentRowId=this.state.currentRowId,this.transitionStateToRowId(e,t)}else this.setState(t)}makeStateFromProps(e){const t={};let i=e.rowId,o=this.queryRows(e);const a=e.tableSchema&&e.tableSchema.keyAttribute();if(null==i&&o.length&&a){e.interactiveDashboardMode&&e.coupledViews&&e.coupledViews.length||(i=o[0][a.name()])}t.currentRowId=i;let s=-1;if(null!=i?s=n.default.findIndex(o,(t=>this.rowIdForRow(e,t)===i)):t.splitViewExpanded=!1,i&&-1===s)if(this.props.interactiveDashboardMode)t.currentRowId=null;else{const n=this.findRowInSourceTable(e,i);if(n){const t=this.sourceTableRows(e);o=r.default.arrayInsertSorted(o,n,t,this.rowIdForRow.bind(this,e))}else t.currentRowId=null}return t.rows=o,t.rowIds=o.map(this.rowIdForRow.bind(this,e)),t.rowsById=n.default.zipObject(t.rowIds,o),t}calculateNewIndex(e){let{wrap:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=this.currentIndex()+e;return i<0||i>=this.state.rows.length?t&&this.state.rows.length>0?i<0?this.state.rows.length-1:0:null:i}findNewRowId(e){let{wrap:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=this.calculateNewIndex(e,{wrap:t});return null==i?null:this.rowIdAtIndex(i)}transition(e){if(!this.allowNavigation())return;const t=this.calculateNewIndex(e);if(null===t)return;const i=this.rowIdAtIndex(t),o=n.default.extend(this.currentUIState,{SlideshowUIState:n.default.extend(this.currentUIState.SlideshowUIState,{RowKey:i})});this.setCurrentUIState(o)}nearbyRowKey(){const e=this.currentIndex();let t;return t=e<=0?e+1:e-1,this.rowIdAtIndex(t)}rowIdForRow(e,t){return t[e.tableSchema.keyAttribute().name()]}isEmpty(){return 0===this.state.rows.length||null==this.state.currentRowId}isSingleRow(){return 1===this.state.rows.length}isFirst(){return this.currentIndex()<=0}isLast(){return this.currentIndex()>=this.state.rows.length-1}queryRows(e){if(e||(e=this.props),!e.table)return[];const t={sortRules:[],filterExpr:e.filterExpr,filterDefaults:e.filterDefaults,searchQuery:e.searchQuery};!v.ReactRootUIConfig.isInDesktopExperience()&&e.groupBy&&(t.sortRules=t.sortRules.concat(e.groupBy)),e.sortBy&&e.sortBy.length&&(t.sortRules=t.sortRules.concat(e.sortBy));return e.table.queryRowValues(t,this.appModel)}findRowInSourceTable(e,t){let i;i=e.tableSchema.isSlice()?e.tableSchema.sourceTableName():e.table.name();const{table:o,tableSchema:n}=d.default.findByName(i,this.appModel,!0),a=o.queryRowValues({filterExpr:c.default.createColFilter(t,n,n.keyAttribute())||void 0},this.appModel)[0];if(!a)return null;const r={};for(const t in a)e.tableSchema.isInSlice(t)&&(r[t]=a[t]);return r}sourceTableRows(e){let t;t=e.tableSchema.isSlice()?e.tableSchema.sourceTableName():e.table.name();const{table:i}=d.default.findByName(t,this.appModel,!0),o={sortRules:[]};return e.groupBy&&(o.sortRules=o.sortRules.concat(e.groupBy)),e.sortBy&&e.sortBy.length&&(o.sortRules=o.sortRules.concat(e.sortBy)),i.queryRowValues(o,this.appModel)}findRow(e){return this.state.rows.find((t=>this.rowIdForRow(this.props,t)===e))}currentIndex(){return this.indexOfRowId(this.state.currentRowId)}currentRowKey(){return null!=this.state.currentRowId?this.state.currentRowId:this.state.rows.length?this.rowIdForRow(this.props,this.state.rows[0]):null}rowIdAtIndex(e){return this.state.rowIds[e]}indexOfRowId(e){return this.state.rowIds.indexOf(e)}renderPrefetch(e){if(!e)return null;const t=this.props.tableSchema.keyAttribute(),i=this.currentIndex();if(i<0)return null;const o=[];if(null==this.state.extraScreenId||this.state.transitioning){if(!this.allowNavigation())return null;{const e=this.state.rows[i-1],t=this.state.rows[i+1];e&&o.push(e),t&&o.push(t)}}else{const e=this.state.rowsById[this.state.extraScreenId];e&&o.push(e)}const n=p.TypeDisplaysApi.lookup(e),a=o.map((i=>{if(!i)return null;const o=i[e.name()];if(!o)return null;const a=i[t.name()];return(0,x.jsx)(n,{renderPlainImage:!0,attribute:e,value:o,table:this.props.table,dataContext:new l.default(this.appModel,this.props.tableSchema,i,void 0,void 0,void 0,{viewStackKey:this.viewStackKey}),appModel:this.appModel,rowId:a},a)}));return(0,x.jsx)("div",{className:"ReactSlideshowView__prefetch-container",children:a})}allowNavigation(){return!this.state.transitioning&&super.allowNavigation()}get rowId(){return this.rowIdAtIndex(this.currentIndex())}get actionsInScope(){var e;const t=this.appModel.appTemplate.actions(),i=n.default.clone(this.findRow(this.rowId));return i&&t.actionsForRow(i,null===(e=this.props.table)||void 0===e?void 0:e.name(),this.appModel,this.dataContext())||[]}render(){var e,t,i,o,r,s,l;if(this.useCardLayout()&&this.setupCurrentLayout({autoDefaults:!0}),!this.shouldShow())return null;if(!this.props.tableSchema||!this.props.table)return(0,x.jsx)("div",{className:"ReactSlideshowView ReactSlideshowView--no-table-schema"});if(this.isEmpty())return(0,x.jsx)(w.EmulatorComponentWrapper,{margin:"0 0 1px 0",dataVFEValues:{root:"detail",table:null!==(t=null===(e=this.props.table)||void 0===e?void 0:e.name())&&void 0!==t?t:void 0,control:null!==(i=this.props.controlName)&&void 0!==i?i:void 0},children:(0,x.jsx)(m.EmptyView,{className:"ReactSlideshowView",width:this.props.width,height:this.props.height,message:this.appModel.MapActionName("No items selected")})});this.props.width||u.default.warnToDevConsole("SlideshowView needs a width");const d=this.currentIndex();let c=this.indexOfRowId(this.state.extraScreenId);(c<0||c===d)&&(c=null);let p;p=d<(null!=c?c:0)?this.props.width:-this.props.width;
1const b=[null,null],C=d<(null!=c?c:0)?0:1,T=1===C?0:1,I=this.rowIdAtIndex(d);if(I){const e=n.default.clone(this.findRow(I)),t=1===C&&null!=c,i=!0;b[C]=this.page(I,e,0,this.props.width,t,i)}if(null!=c){const e=this.rowIdAtIndex(c);if(e){const t=n.default.clone(this.findRow(e)),i=1===T&&null!=I;b[T]=this.page(e,t,p,this.props.width,i)}}const R=(0,a.default)(this.appModel.rolloutClassNames,"BasePrimaryView ReactSlideshowView",{NoMaterialOverrides:v.ReactRootUIConfig.isInDesktopExperience(),Widescreen:!this.isSmallScreen(),"ReactSlideshowView--first-slide":this.isFirst(),"ReactSlideshowView--last-slide":this.isLast(),"ReactSlideshowView--transitioning":!!this.state.transitioning,"ReactSlideshowView--show-arrows-always":this.shouldAlwaysShowArrows(),"ReactSlideshowView--show-arrows-hover":this.shouldShowArrowsOnHover(),"ReactSlideshowView--inset-arrows":this.isSmallScreen()}),O=g.default.widescreenBreakpoint,{width:D,height:N,isInline:j}=this.props,E=this.isCompactView()&&this.showDetailContent()?null:this.renderFabs(),A=this.fabActions.length,P=(0,h.getPrimaryImageAttribute)({mainSlideshowImageColumn:this.props.mainSlideshowImageColumn,tableSchema:this.props.tableSchema});return(0,x.jsx)("div",{className:R,style:(0,S.convertToRtlWhenNecessary)({width:D,height:v.ReactRootUIConfig.isInDesktopExperience()?void 0:N,display:"flex"}),"data-fab-count":A,"data-testid":"legacy-slideshow-view",children:(0,x.jsx)(w.EmulatorComponentWrapper,{margin:"0 0 1px 0",dataVFEValues:{root:"detail",table:null!==(r=null===(o=this.props.table)||void 0===o?void 0:o.name())&&void 0!==r?r:void 0,control:null!==(s=this.props.controlName)&&void 0!==s?s:void 0},children:(0,x.jsxs)("div",{style:(0,S.convertToRtlWhenNecessary)({width:this.props.width}),children:[(0,x.jsxs)(f.default,{getScrollContainer:this.getScrollContainer.bind(this),paused:(null!==(l=g.default.windowWidth)&&void 0!==l?l:D)>O,disabled:j,appModel:this.appModel,children:[b,this.renderPrefetch(P),v.ReactRootUIConfig.isInDesktopExperience()?(0,x.jsx)(y.IfScreenIs,{narrow:!0,children:this.renderArrows(P)}):this.renderArrows(P)]}),E]})})})}}t.LegacySlideshowView=C},34384:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.ReactAppSlideshowView=void 0;var n=o(i(238416)),a=i(667294),r=o(i(496486)),s=o(i(386010)),l=o(i(593186)),d=o(i(21870)),c=i(557310),u=i(148448),p=i(497797),h=i(680462),m=o(i(409022)),f=i(260493),g=i(14042),y=i(278965),v=i(303622),b=i(148521);function w(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function S(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?w(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):w(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}class x extends p.BaseSlideshowView{calculateNewIndex(e){let{wrap:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=this.currentIndex()+e,o=this.props.tableRows.length;return i<0||i>=o?t&&o>0?i<0?o-1:0:-1:i}transition(e){if(this.allowNavigation()){const t=this.calculateNewIndex(e),i=this.rowIdAtIndex(t);if(i){const e=r.default.extend(this.currentUIState,{SlideshowUIState:r.default.extend(this.currentUIState.SlideshowUIState,{RowKey:i})}),o=t>this.currentIndex()?"left":"right";this.setCurrentUIState(e,o),this.props.onRowOpened&&this.props.onRowOpened(this.props.table.name(),i)}}}isSingleRow(){return 1===this.props.tableRows.length}isFirst(){return this.currentIndex()<=0}isLast(){return this.currentIndex()>=this.props.tableRows.length-1}currentIndex(){const{props:e,rowId:t}=this;return e.tableRows.findIndex((e=>e.keyValue===t))}currentRow(){return this.props.tableRows[this.currentIndex()]}rowIdAtIndex(e){var t;return null===(t=this.props.tableRows[e])||void 0===t?void 0:t.keyValue}dataContext(){const{viewStackKey:e}=this;return this.currentRow().dataContext.augmentWithViewContext(e)}get rowId(){const{rowId:e,tableRows:t,interactiveDashboardMode:i,coupledViews:o}=this.props;if(null==e&&t.length){if(!(i&&(null==o?void 0:o.length)))return t[0].keyValue}return e}get actionsInScope(){var e,t;const i=this.appModel.appTemplate.actions(),o=null===(e=this.currentRow())||void 0===e?void 0:e.values;return o&&i.actionsForRow(o,null===(t=this.props.table)||void 0===t?void 0:t.name(),this.appModel,this.dataContext())||[]}get slideshowPageExtraProps(){return{rowValues:void 0,tableRows:void 0,dataContext:this.dataContext()}}render(){var e,t,i,o,n,a,r,p;if(this.useCardLayout()&&this.setupCurrentLayout({autoDefaults:!0}),!this.shouldShow())return null;const{table:g,tableSchema:w,width:S,height:x,isInline:C}=this.props;if(!w||!g)return(0,b.jsx)("div",{className:"ReactSlideshowView ReactSlideshowView--no-table-schema"});const T=null===(e=this.currentRow())||void 0===e?void 0:e.values,I=this.rowId;if(null==T||null==I)return(0,b.jsx)(v.EmulatorComponentWrapper,{dataVFEValues:{root:"detail",table:null!==(i=null===(t=this.props.table)||void 0===t?void 0:t.name())&&void 0!==i?i:void 0,control:null!==(o=this.props.controlName)&&void 0!==o?o:void 0},children:(0,b.jsx)(u.EmptyView,{className:"ReactSlideshowView",width:S,height:x,message:this.appModel.MapActionName("No items selected")})});S||l.default.warnToDevConsole("SlideshowView needs a width");const R=this.page(I,T,0,S,!1,!0),O=(0,s.default)(this.appModel.rolloutClassNames,"BasePrimaryView ReactSlideshowView",{NoMaterialOverrides:c.ReactRootUIConfig.isInDesktopExperience(),Widescreen:!this.isSmallScreen(),"ReactSlideshowView--first-slide":this.isFirst(),"ReactSlideshowView--last-sl
1ide":this.isLast(),"ReactSlideshowView--show-arrows-always":this.shouldAlwaysShowArrows(),"ReactSlideshowView--show-arrows-hover":this.shouldShowArrowsOnHover(),"ReactSlideshowView--inset-arrows":this.isSmallScreen()}),D=d.default.widescreenBreakpoint,N=this.isCompactView()&&this.showDetailContent()?null:this.renderFabs(),j=this.fabActions.length,E=(0,h.getPrimaryImageAttribute)({mainSlideshowImageColumn:this.props.mainSlideshowImageColumn,tableSchema:this.props.tableSchema});return(0,b.jsx)(v.EmulatorComponentWrapper,{dataVFEValues:{root:"detail",table:null!==(a=null===(n=this.props.table)||void 0===n?void 0:n.name())&&void 0!==a?a:void 0,control:null!==(r=this.props.controlName)&&void 0!==r?r:void 0},children:(0,b.jsx)("div",{className:O,style:(0,y.convertToRtlWhenNecessary)({width:S,display:"flex"}),"data-fab-count":j,children:(0,b.jsxs)("div",{style:(0,y.convertToRtlWhenNecessary)({width:this.props.width}),children:[(0,b.jsxs)(m.default,{getScrollContainer:this.getScrollContainer.bind(this),paused:(null!==(p=d.default.windowWidth)&&void 0!==p?p:S)>D,disabled:C||c.ReactRootUIConfig.isInMobileExperience(),appModel:this.appModel,children:[R,(0,b.jsx)(f.IfScreenIs,{narrow:!0,children:this.renderArrows(E)})]}),N]})})})}}t.ReactAppSlideshowView=e=>{const{searchQuery:t,filterExpr:i,filterDefaults:o,sortBy:n,table:r,rowId:s,interactiveDashboardMode:l}=e,d=(0,g.usePendingTransaction)();(0,a.useEffect)((()=>{if(d&&s){0===d.getRecordsForRow(r.rootName(),s).length&&d.recompute(r.rootName(),s)}}),[s,r,d]);let c=r.queryRows({searchQuery:t,filterExpr:i,filterDefaults:o,sortRules:n,transaction:d});const u=r.isSlice()||i||o||t;if(s&&!l&&u){const e=r.rootTable().lookupTableRow(s,d);e&&!c.includes(e)&&(c=[...c,e])}return(0,b.jsx)(x,S(S({},e),{},{tableRows:c}))}},113473:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LegacySlideshowView",{enumerable:!0,get:function(){return o.LegacySlideshowView}}),Object.defineProperty(t,"ReactAppSlideshowView",{enumerable:!0,get:function(){return n.ReactAppSlideshowView}});var o=i(159747),n=i(34384)},632606:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isInDesktopEditMode=void 0;var o=i(557310);t.isInDesktopEditMode=(e,t)=>o.ReactRootUIConfig.isInDesktopExperience()&&t},969312:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.MaterialTabsHeader=function(e){var{renderTabs:t}=e,i=u(e,["renderTabs"]);const o=p();return(0,l.jsx)(a.Box,{display:"flex",justifyContent:"center",width:"100%",className:o.box,children:(0,l.jsx)(a.Tabs,c(c({},i),{},{classes:{root:o.tabsRoot,indicator:o.tabsIndicator},children:t()}))})};var n=o(i(238416)),a=i(249492),r=i(229752),s=i(56749),l=i(148521);function d(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function c(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?d(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):d(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var u=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};const p=(0,r.makeStyles)((()=>({box:{backgroundColor:(0,s.themeColor)("mainContentBackground"),borderBottom:"1px solid ".concat((0,s.themeColor)("dividerColor"))},tabsRoot:{backgroundColor:(0,s.themeColor)("mainContentBackground")},tabsIndicator:{height:"6px",borderRadius:"3px",bottom:"-3px"}})))},695354:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.StepperHeader=function(e){let{pagePresentationInfo:t,activePage:i,getErrorStateForPage:o,showPage:n}=e;const r=g();return(0,h.jsx)("div",{className:(0,a.default)(r.scrollableContainerDiv,{[r.reactScrollableContainerDiv]:p.ReactRootUIConfig.isReactRoot()}),children:(0,h.jsx)(d.ScrollableHContainer,{children:(0,h.jsx)(l.Stepper,{activeStep:i-1,nonLinear:!0,"data-testid":c.FormViewDataTestids.Stepper,classes:{root:r.stepperContainer},connector:(0,h.jsx)(l.StepConnector,{classes:{root:r.stepConnector}}),children:t.map(((e,t)=>{let{title:d,isHiddenPage:c}=e;const u=t+1,p=i===u,m=o(u).error,g=c,y=m&&!p?{icon:(0,h.jsx)(s.default,{className:m?r.errorIcon:"",titleAccess:"Step ".concat(u," has an error")})}:{};return(0,h.jsx)(l.Step,{completed:!1,children:(0,h.jsx)(l.StepButton,f(f({"aria-label":"Step ".concat(u,": ").concat(d),onClick:g?void 0:()=>n(u),completed:!1,disabled:g},y),{},{children:(0,h.jsx)(l.StepLabel,{classes:{label:r.stepperLabel},StepIconProps:{classes:{root:(0,a.default)({[r.disabledIcon]:g})}},children:d})}))},t)}))})})})};var n=o(i(238416)),a=o(i(386010)),r=i(695386),s=o(i(572063)),l=i(249492),d=i(215471),c=i(867895),u=i(56
1749),p=i(557310),h=i(148521);function m(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function f(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?m(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):m(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}const g=(0,r.makeStyles)((e=>({disabledIcon:{color:"lightgrey"},errorIcon:{color:"#d32f2f"},stepperContainer:{padding:e.spacing(2),background:(0,u.themeColor)("mainContentBackground")},stepperLabel:{whiteSpace:"nowrap"},stepConnector:{minWidth:"20px"},scrollableContainerDiv:{position:"relative",margin:"auto",maxWidth:"600px"},reactScrollableContainerDiv:{width:"fit-content",maxWidth:"100%"}})))},663767:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.getViewComponentByType=t.getInlineViewComponentByType=t.DRILLDOWN_ENABLED_VIEW=void 0;var n=i(557310),a=o(i(750812)),r=o(i(675671)),s=o(i(748741)),l=o(i(182788)),d=o(i(330702)),c=o(i(114871)),u=o(i(101993)),p=i(488386),h=o(i(730234)),m=o(i(324675)),f=o(i(867895)),g=o(i(152035)),y=i(113473),v=o(i(593186)),b=i(408203);t.DRILLDOWN_ENABLED_VIEW=new Set(["card","table","deck"]);const w=()=>{const e=n.ReactRootUIConfig.isReactRoot()?y.ReactAppSlideshowView:y.LegacySlideshowView;return{calendar:r.default,card:s.default,onboarding:a.default,deck:d.default,detail:e,slideshow:e,chart:l.default,graph:l.default,gallery:c.default,fastTable:m.default,table:m.default,map:u.default,"google-map":u.default,iframe:p.IFrameView,gantt:b.GanttPrimaryView}};t.getViewComponentByType=e=>Object.assign(Object.assign({},w()),{form:f.default,dashboard:g.default,search:h.default})[e];t.getInlineViewComponentByType=e=>{let t=w()[e];return t||(v.default.ReportErrorOnce({errorMessage:"Attempted to use unsupported InlineViewType",viewType:e}),t=m.default),t}},578914:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(496486)),a=o(i(385857)),r=o(i(150198)),s=o(i(494012)),l=o(i(593186)),d=o(i(192137)),c=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=S(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}(i(365914)),u=o(i(571524)),p=o(i(962553)),h=o(i(389549)),m=i(300431),f=i(557310),g=i(166089),y=i(725592),v=i(44617),b=i(772598),w=i(148521);function S(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(S=function(e){return e?i:t})(e)}class x extends m.PureViewAwareComponent{constructor(e){var t;super(e),t=this,this.formEntries={},this.wasRecentlyTouched=()=>!1,this.onEntryTouchStart=e=>{const t=(new Date).getTime();this.wasRecentlyTouched=i=>{if(e.name()===i.name()){if((new Date).getTime()-t<1e3)return!0}return!1}},this.showContent=function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.rowState;return"Show"===e.type()?(i||(i=t.makeNewRowState(t.props)),i.showContent(e,t.transactionOwningViewStackKey)):null};const i=e.table&&e.tableSchema&&this.supportsEdits(e)?this.initializeEditableState(e):{};this.state=i}get rowState(){var e,t;if(this.props.tableRow)return this.props.tableRow.rowState;if(this.props.useTransactions){const i=this.rowId(this.props),o=this.props.table.rootTable().lookupTableRow(i,this.pendingTransaction);if(o)return f.ReactRootUIConfig.isReactRoot()&&(null===(e=this.props.view)||void 0===e?void 0:e.paging)?o.getRowState({paging:null===(t=this.props.view)||void 0===t?void 0:t.paging}):o.rowState}return this._rowState}set rowState(e){this._rowState=e}get tableRow(){var e;return null===(e=this.props.table)||void 0===e?void 0:e.lookupTableRow(this.props.rowId,this.pendingTransaction)}get updateMechanism(){}get transaction(){var e;const{appModel:t,useTransactions:i}=this.props;if(i)return p.default.usePendingChangesStore&&this.pendingTransaction?this.pendingTransaction:null===(e=null==t?void 0:t.dataManager)||void 0===e?void 0:e.currentTransaction}initializeEditableState(e){const t=(e=e||this.props).table.name();if(this.lastUpdateValues=n.default.clone(this.dataContext(e).rowData)||{},this.lastSavedValues=n.default.clone(this.dataContext(e).rowData)||{},this.getAsyncCallback=e=>i=>{var o;e.needsAsyncCallback()&&(i=e.coerceValue(i),i=e.valueToWireFormat(i),this.transaction?this.transaction.update(t,e.name(),this.stableId(this.props),i,this.updateMechanism,null===(o=this.props.view)||void 0===o?void 0:o.paging.rowStateColumnNames):(this.dataContext().setValue(e.name(),i),this.updateInfluencedEntries(e,{noAsync:!0})))},this.formEntries={},this.onEntryMount=this.onEntryMount.bind(this),this.onEntryValueChange=this.onEntryValueChange.bind(this),this.onEntryFocus=this.onEntryFocus.bind(this),this.onEntryBlur=this.onEntryBlur.bind(this),this.onEntryKeyDown=this.onEntryKeyDown.bind(this),!e.useTransactions){const t=this.rowState=this.makeNewRowState(e);this.initialErrorState=t?t.validateSave({viewStackKey:this.viewStackKey}).errorState:{}}return this.initialState(e)}onTransactionUpdated(e){document.activeElement.blur(),g.AppGlobals.StateChangeHandler.ShowUIState(!0)}onEntryMount(e,t){t?this.formEntries[e.name()]=t:delete this.formEntries[e.name()]}onEntryValueChange(e,t){let{forceUpdate:i,noAutoAdvance:o}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var a;const{rowIds:s,userEdited:l,table:d}=this.props,u=this.transaction,p=e.name(),h=this.lastUpdateValues[p],m=this.dataContext(),f=!o;let g=!0;if("string"==typeof t&&(t=(0,c.fastTrim)(t)),u){if(i||f){const e=(null==s?void 0:s.length)?s:[this.stableId()];let i=!1;for(const o of e){u.update(d.name(),o,p,t,this.updateMechanism,null===(a=this.props.view)||void 0===a?void 0:a.paging.rowStateColumnNames)&&(i=!0)}i&&this.onTransactionUpdated(u),g=!1}else f||(this.refreshEntryState([e]),g=!1);const o=this.isRequired(e)&&!r.default.valueExists(t,e.type());null!=n.default.get(window,"AppState.CurrentUIState.FormUIState")&&!o&&f&&(this.queueFocusAfter(p,{requireAutoAdvance:!0}),g=!0)}else{const o=h!==t;m.setValue(p,t),l&&o&&(l[p]=!0),i||o&&f?(this.updateInfluencedEntries(e),g=!1):f||(this.refreshEntryState([e]),g=!1);const a=this.isRequired(e)&&!r.default.valueExists(t,e.type());null!=n.default.get(window,"AppState.CurrentUIState.FormUIState")&&!a&&f&&(this.queueFocusAfter(p,{requireAutoAdvance:!0}),g=!0)}g&&this.setState(n.default.extend({},this.state,{refreshId:Math.floor(1e9*Math.random()).toString()}))}onEntryFocus(e){u.default.IsAndroidBrowser()&&!this.wasRecentlyTouched(e)||this.clearQueuedFocus(),this.setState({focused:e})}onEntryBlur(e){this.state.focused===e&&this.setState({focused:null})}
1onEntryKeyDown(e,t){"input"===t.target.tagName.toLowerCase()&&("Enter"===t.key||u.default.InMobileWebView()&&"Tab"===t.key)&&(this.queueFocusAfter(e.name()),document.activeElement.blur())}makeNewRowState(e){const t={editableColumnAllowlist:this.editableColumnAllowlist(e),editableColumnDenylist:this.editableColumnDenylist(e),getVisitedDataContext:e.getVisitedDataContext,view:e.view};return new s.default(e.appModel,e.table,this.dataContext(e),this.rowKey(e),e.entryAttributes,t)}initialState(e){return{invalidatesRow:{},lastDataStamp:e.appModel?e.appModel.DataStamp:null,focused:null}}supportsEdits(e){return!1}editableColumnAllowlist(e){return null}editableColumnDenylist(e){return e.editableColumnDenylist}fullRefreshCondition(e){return this.state.lastDataStamp!==e.appModel.DataStamp||(this.props.rowId!==e.rowId||(this.rowId(this.props)!==this.rowId(e)||(!!e.fullRefresh||this.props.quickEditMode!==e.quickEditMode)))}UNSAFE_componentWillReceiveProps(e){if(e.appModel){let t,{invalidatesRow:i}=this.state;this.fullRefreshCondition(e)&&(this.resetDataContext(e),this.supportsEdits(e)&&(this.supportsEdits(this.props)?(this.lastUpdateValues=n.default.clone(this.rowValues(e)),this.lastSavedValues=n.default.clone(this.rowValues(e)),e.useTransactions||(this.rowState=this.makeNewRowState(e))):t=this.initializeEditableState(e)),i={}),this.setState(n.default.extend(t,{lastDataStamp:e.appModel.DataStamp,invalidatesRow:i}))}}showInvalidErrorStateFromProps(){return!("shouldShowInvalidErrorState"in this.props)||this.props.shouldShowInvalidErrorState}showRequiredErrorStateFromProps(){return!("shouldShowRequiredErrorState"in this.props)||this.props.shouldShowRequiredErrorState}queueFocusAfter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._focusAfter={attrName:e,params:t}}clearQueuedFocus(){delete this._focusFirst,delete this._focusAfter,delete this._focusPending}rowValues(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return t.rowValues?e=t.rowValues:t.dataContext&&(e=t.dataContext.rowData),e||{}}stableId(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return f.ReactRootUIConfig.isReactRoot()&&e.tableRow instanceof h.default?e.tableRow.stableId:this.rowId(e)}rowId(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;const t=e.tableSchema.keyAttribute().name();return this.rowValues(e)[t]}respectShowIf(){var e;return!!(null===(e=g.AppGlobals.AppModel)||void 0===e?void 0:e.appTemplate.respectShowIf)}shouldShowQuery(e){return null!=e.showIfEvalTree()&&this.respectShowIf()?(0,y.queryShouldShow)({attribute:e,table:this.props.table,transaction:this.pendingTransaction,viewStackKey:this.viewStackKey,rowId:this.rowId()}):{passthrough:!e.isHidden()}}rowCssSelector(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return("_RowElement_"+this.props.table.name()+"_"+this.rowId(e)).replace(/~|!|@|\$|%|\^|&|\*|\(|\)|\+|=|,|\.|\/|'|;|:|"|\?|>|<|\[|\]|\\|{|}|\||`|#/g,"_")}dataContext(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;var t,i;if(e.dataContext)return e.dataContext.augmentWithViewContext(this.viewStackKey);if(null==this._dataContext){const t={rowData:{},tableName:e.table.name(),rootTableName:e.table.rootName(),keyAttrName:e.tableSchema.keyAttribute().name(),tempId:Math.floor(1e9*Math.random()).toString()};this._dataContext=new a.default(e.appModel,e.tableSchema,{},t,void 0,void 0,{viewStackKey:this.viewStackKey}),this.resetDataContext(e)}return(null===(i=null===(t=this._dataContext)||void 0===t?void 0:t.uiContext)||void 0===i?void 0:i.viewStackKey)||(this._dataContext=this._dataContext.augmentWithViewContext(this.viewStackKey)),this._dataContext}resetDataContext(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;var t,i;if(this._dataContext&&this.rowValues(e)){let o=this.rowValues(e);if(e.table.isSlice()){const n=this.rowId(e),a=e.table.rootTable();o=null!==(i=null===(t=null==a?void 0:a.lookupTableRow(n,this.pendingTransaction))||void 0===t?void 0:t.values)&&void 0!==i?i:o}this.supportsEdits(e)&&(o=n.default.clone(o)),this._dataContext.replaceRowData(o),e.appModel&&(this._dataContext.appModel=e.appModel)}}isEntryAttribute(e){var t;return n.default.includes(null===(t=this.props.entryAttributes)||void 0===t?void 0:t.map((e=>e.name())),e.name())}updateInfluencedEntries(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(this.props.useTransactions)return;if(this.POSSIBLE_INFINITE_LOOP){if(i>0)return;this.POSSIBLE_INFINITE_LOOP=!1}const o=this.props,a=this.dataContext(),r=o.tableSchema,s=n.default.keys(o.userEdited),l=d.default.attributeNames(r.changeTriggeredAttributes()),c=new Date,u={recomputeContext:new b.RecomputeContext,noAsync:t.noAsync,getAsyncCallback:this.getAsyncCallback,computeDefaults:this.isNewRow(o),skipTheseDefaults:n.default.keyBy(s.concat(l)),skipLeafAttrs:!0,initialData:o.initialData||this.lastSavedValues,nowDate:c};e.isKey()&&a.resolveParentRefs(),a.recomputeInfluencedAttributes(e,u),this.updateV
1alidityEnums(e,t,i);const p=n.default.unionBy(r.influencedAttributes(e),[e],(e=>e.name())).filter((e=>this.isEntryAttribute(e)));this.refreshEntryState(p)}updateValidityEnums(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const o=this.props.tableSchema.influencedValidityEnums(e),a=this.dataContext(),r=[];let s;const d=e.inFullDependentChain(o);for(let t=0;t<o.length;t++){const l=o[t];let c=a.getValue(l),u=this.validOptions(l)||[];const p=v.dynamicRollouts.includeByOwnerId("DynamicValidityEnums")?l.isDynamic():l.hasAppFormula();if(!this.isEntryAttribute(l)||l===e||p||d&&0===t&&(0===i&&u.length||i>0&&""===c)){s=c;continue}if(d&&t>0&&(null==s||""===s))u=[];else{const e=l.validIfEvalTree(),{values:t,elementAttribute:i}=e.getInConditionListInformation(a);u=i.valuesToWireFormat(t).map((e=>i.getNormalizedLookupValue(e)))}let h=Array.isArray(c)?c:[c],m=l;"EnumList"===l.type()&&(h=l.splitEnumListValue(c,u),m=l.nestedAttribute());let f=!0;const g=h.map((e=>{var t;return null!==(t=null==m?void 0:m.getNormalizedLookupValue(e))&&void 0!==t?t:e}));for(const e of g)if(""!==e&&null!=e&&!n.default.includes(u,e)){f=!1;break}null==u||f||""===a.getValue(l)||(c="",a.setValue(l.name(),c),r.push({attr:l})),s=c}r.forEach((o=>{const n=o.attr;if(e.name()!==n.name())if(i<20)this.updateInfluencedEntries(n,t,i+1);else if(!this.POSSIBLE_INFINITE_LOOP){this.POSSIBLE_INFINITE_LOOP=!0;const e="Possible infinite loop in onEntryValueChange";l.default.ReportErrorOnce({errorMessage:e}),l.default.warnToDevConsole(e)}}))}refreshEntryState(e){var t;null===(t=this.rowState)||void 0===t||t.refreshState(e),this.setState({refreshId:Math.floor(1e9*Math.random()).toString()})}isNewRow(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return null==this.rowKey(e)||""===this.rowKey(e)}isValid(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rowState;var i,o;return!(t&&!t.isValid(e,this.viewStackKey))&&!(null===(o=null===(i=this.transaction)||void 0===i?void 0:i.refCycleErrorState)||void 0===o?void 0:o.isInvalid(this.props.table.rootName(),this.stableId(),e.name()))}isHidden(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rowState;return!!t&&t.isHidden(e,this.transactionOwningViewStackKey)}isRequired(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rowState;return!!t&&t.isRequired(e,this.transactionOwningViewStackKey)}isEditable(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rowState;return!!t&&t.isEditable(e,this.transactionOwningViewStackKey)}validOptions(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rowState;return t?t.validOptions(e,this.transactionOwningViewStackKey):null}suggestedValues(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rowState;return t?t.suggestedValues(e,this.transactionOwningViewStackKey):null}displayName(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rowState;return t?t.displayName(e,this.transactionOwningViewStackKey):null}description(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rowState;return t?t.description(e,this.transactionOwningViewStackKey):null}baseImage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rowState;return t?t.baseImage(e,this.transactionOwningViewStackKey):""}rowKey(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return null!=e.rowKey&&""!==e.rowKey?e.rowKey:e.rowId}usePlaceholderLabel(e){if(f.ReactRootUIConfig.isInDesktopExperience())return!1;const t=this.dataContext().getValue(e);if(e.hasAppFormula())return!1;if(null!=t&&""!==t)return!1;const i=document.activeElement;if(i&&this.state.focused&&this.state.focused.name()===e.name()&&!e.isEnumerated()&&("INPUT"===i.tagName||"TEXTAREA"===i.tagName))return!1;const o=!this.isValid(e)||this.isRequired(e)&&!r.default.valueExists(t,e.type());if((this.showInvalidErrorStateFromProps()||this.showRequiredErrorStateFromProps())&&o)return!1;if(e.isNumericType()&&!e.isEnumerated())return!1;const n=e.type().toLowerCase();if(e.isValidityEnum()&&this.rowState){const t=!1,i=this.validOptions(e);return!e.shouldUseButtonSelect(i,t,"enumlist"===n,e.isScannable())}switch(n){case"date":case"time":case"datetime":case"changetimestamp":case"changecounter":case"changeLocation":case"image":case"drawing":case"signature":case"thumbnail":case"file":case"yes/no":case"progress":case"color":case"url":return!1;case"enum":case"enumlist":{const{EnumValues:t,AllowOtherValues:i}=e.auxData();return!e.shouldUseButtonSelect(t,i,"enumlist"===n)}case"ref":return"Buttons"!==e.auxData().InputMode;default:return!0}}makeEntryId(e){return c.default.makeElementId("Attr_"+e.name())}render(){return(0,w.jsx)("div",{})}}const C={useTransactions:f.ReactRootUIConfig.isReactRoot()};x.defaultProps=C;t.default=x},866610:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.DeckRowDataTestids=t.DeckRow=void 0;var n,a=o(i(238416)),r=i(667294),s=o(i(386010)),l=o(i(496486)),d=o(i(578914)),c=o(i(112963)),u=i(803583),p=o(i(454852)),h=o(i(593186)),m=o(i(17926)),f=i(10311),g=i(714067),y=i(234902),v=i(278965),b=i(157479),w=i(148521);function S(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function x(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?S(Object(i),!0).forEach((function(t){(0,a.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):S(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}!function(e){e.Container="deck-row-container"}(n||(t.DeckRowDataTestids=n={}));const C=100;class T extends d.default{constructor(e){super(e),this.handleSelect=e=>{this.props.onRowTap&&0===this.state.dragPosition&&this.props.onRowTap(this.rowId(),e,this.rowValues())},this.handleRef=e=>{this.slideRef=e},this.state.dragging=!1,this.state.dragPosition=0,this.handleDragStart=this.handleDragStart.bind(this),this.handleDragEnd=this.handleDragEnd.bind(this),this.handleDrag=this.handleDrag.bind(this),this.dragState={dragDeltaX:0,outOfBounds:!1}}handleDragStart(){this.props.onDragStart&&this.props.onDragStart()}handleDrag(e){if(!this.slideRef)return;if(!this.state.dragging){if(this.dragState.dragDeltaX=e.deltaX+(this.dragState.dragDeltaX||0),Math.abs(this.dragState.dragDeltaX)<=20)return;const{top:t,bottom:i,left:o,right:n}=this.slideRef.getBoundingClientRect(),{x:a,y:r}=e;if(this.dragState.outOfBounds||a<o||a>n||r<t||r>i)return void(this.dragState.outOfBounds=!0)}let t=this.state.dragPosition;t||(t=0);let i=Math.round(24*Math.abs(t)/C);i>24&&(i=24);let o=e.deltaX+t;o>C?o=C:o<-100&&(o=-100),!this.allowRowSwipe()||o<0&&!this.props.swipeLeftAction||o>0&&!this.props.swipeRightAction?this.setState({dragging:!1,dragPosition:0,dragIconHeight:0}):(this.setState({dragging:!0,dragPosition:o,dragIconHeight:i}),"function"==typeof this.props.onDrag&&this.props.onDrag(this))}handleDragEnd(){const{onRowSwipeLeft:e,onRowSwipeRight:t,onDragEnd:i}=this.props,{dragPosition:o}=this.state,n=o>=C,a=o<=-100,r=()=>{this.slideRef&&(this.setState({dragging:!1,dragPosition:0}),this.dragState.dragDeltaX=0,this.dragState.outOfBounds=!1)};n||a?setTimeout(r,g.FADE_OUT_DURATION_MS):r(),n&&t?t(this):a&&e&&e(this),i&&i(this)}UNSAFE_componentWillReceiveProps(e){let t=null,i=null;e.swipeLeftAction&&(t=(0,f.getActionFormattingRules)(e.appModel,e.swipeLeftAction,this.rowId()),this.setState({leftFormattingRules:t})),e.swipeRightAction&&(i=(0,f.getActionFormattingRules)(e.appModel,e.swipeRightAction,this.rowId()),this.setState({rightFormattingRules:i})),!this.allowRowSwipe(e)&&this.allowRowSwipe(this.props)&&this.setState({dragging:!1,dragPosition:0,dragIconHeight:0}),super.UNSAFE_componentWillReceiveProps(e)}allowRowSwipe(){let{swipeRightAction:e,swipeLeftAction:t,disableRowSwipe:i=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return!(!e&&!t||i)}render(){const{drilldownColumn:e,tableSchema:t,rowValues:i,disableNavigation:o,groupAggregate:a,selectionMode:l,index:d,appModel:u,layout:p,table:h,imageDisplayType:f,width:g,swipeLeftAction:S,swipeRightAction:C,onRowLongPress:T}=this.props;if(e){const n=t.findAttributeByName(e);if(n)return(0,w.jsx)(m.default,x(x({},this.props),{},{rows:[i],disableNavigation:o,attribute:n,tableSchema:t,groupAggregate:a,selectionMode:l,index:d,onTap:this.handleSelect,viewType:"deck"}))}const{dragPosition:I,dragging:R,leftFormattingRules:O,rightFormattingRules:D}=this.state,N=I<0;let j;O&&R&&N?j=O.highlightColor:D&&R&&!N&&(j=D.highlightColor);const E=N?S:C,A=this.allowRowSwipe()?this.handleDrag:void 0,P=this.allowRowSwipe()?this.handleDragStart:void 0,M=this.allowRowSwipe()?this.handleDragEnd:void 0,k=e=>{const t=(0,s.default)("DeckRow",{WithNestedTable:null!=e,Dragging:R,Left:R&&N,Right:R&&!N});return(0,w.jsxs)(c.default,{"data-testid":n.Container,id:"Deck"+this.rowCssSelector(),"data-testonly-row-index":d,spanMode:!0,navigationDelay:!0,className:t,innerStyle:{background:j,display:"flex",flexDirection:"column"},onTap:this.handleSelect,onDragEnd:M,onDragStart:P,onDrag:A,onLongPress:null==T?void 0:T.bind(null,this.rowId()),children:[(0,w.jsx)(y.DeckRowContents,x({handleRef:this.handleRef,dragPosition:I,showContent:this.showContent.bind(this),getDataContext:this.dataContext.bind(this),rowCssSelector:this.rowCssSelector.bind(this),getRowId:this.rowId.bind(this),draggingLeft:N,dragIconHeight:this.state.dragIconHeight,swipeAction:E},this.props)),e]})};if(p.nestedTable){const{TypeDisplay:e,attribute:t}=p.nestedTable,o=()=>(0,w.jsx)("div",{className:"DeckRow_nested-table",style:(0,v.convertToRtlWhenNecessary)({position:"relative",flex:"1 1 0"}),children:(0,w.jsx)(e,{attribute:t,value:i[t.name()],showContent:this.showContent(t),table:h,showListInline:!0,dataContext:this.dataContext(),appModel:u,imageDisplayType:f,rowId:this.rowId(),width:g})});return(0,w.jsx)(r.Suspense,{fallback:k(null),children:(0,w.jsx)(b.QueryOrPassthroughRollout,{query:this.shouldShowQuery(t),children:e=>k(e?o():null)})})}return k(null)}static primaryImageAttribute(e){let{tableSchema:t,mainDeckImageColumn:i}=e;return"**none**"===i?null:i?t.findAttributeByName(i):t.labelImageAttribute(!0)}static primaryTextAttribute(e){let{tableSchema:t,primaryDeckHeaderColumn:i,usedAttributes:o}=e;if("**none**"===i)return null;if(i)return t.findAttributeByName(i);const n=t.labelBasicAttribute();if(!l.default.includes(o,n))return n;const a=t.basicAttributesByImportance(),r=l.default.difference(a,o);return l.default.head(r)}
1static secondaryTextAttribute(e){let{tableSchema:t,secondaryDeckHeaderColumn:i,usedAttributes:o}=e;if("**none**"===i)return null;if(i)return t.findAttributeByName(i);const n=t.basicTypeAttributes(),a=l.default.difference(n,o);return l.default.head(a)}static nestedTableAttribute(e){let{tableSchema:t,nestedTableColumn:i}=e;return"**none**"===i?null:i?t.findAttributeByName(i):null}static summaryAttribute(e){let{tableSchema:t,deckSummaryColumn:i,usedAttributes:o}=e;if("**none**"===i)return null;if(i)return t.findAttributeByName(i);const n=t.summaryFormulaAttributesByImportance(),a=l.default.difference(n,o);return l.default.head(a)}static computeLayout(e){let{appModel:t,table:i,tableSchema:o,mainDeckImageColumn:n,primaryDeckHeaderColumn:a,secondaryDeckHeaderColumn:r,deckSummaryColumn:s,nestedTableColumn:l,showActionBar:d,actionBarEntries:c,actionColumns:m,swipeLeftEvent:f,swipeRightEvent:g,dataContext:y}=e,v=[],b=[n,a,r,s];m&&(b=b.concat(m));v=o.findAttributesByNames(b.filter((e=>Boolean(e&&"**none**"!==e))));const w={actionButtons:[],imageBorderRadius:o.isAppLauncherSchema()?16:4},S=this.primaryImageAttribute({tableSchema:o,mainDeckImageColumn:n});S&&(v.push(S),w.primaryImage={TypeDisplay:u.TypeDisplaysApi.lookup(S),attribute:S});const x=this.primaryTextAttribute({tableSchema:o,primaryDeckHeaderColumn:a,usedAttributes:v});x&&(v.push(x),w.primaryText={TypeDisplay:u.TypeDisplaysApi.lookup(x),attribute:x});const C=this.summaryAttribute({tableSchema:o,deckSummaryColumn:s,usedAttributes:v});C&&(v.push(C),w.topRight={TypeDisplay:u.TypeDisplaysApi.lookup(C),attribute:C});const T=this.secondaryTextAttribute({tableSchema:o,secondaryDeckHeaderColumn:r,usedAttributes:v});T&&(v.push(T),w.secondaryText={TypeDisplay:u.TypeDisplaysApi.lookup(T),attribute:T});const I=this.nestedTableAttribute({tableSchema:o,nestedTableColumn:l,usedAttributes:v});if(I&&(v.push(I),w.nestedTable={TypeDisplay:u.TypeDisplaysApi.lookup(I),attribute:I}),!1!==d){if(c&&c.length)c.forEach((e=>{const n=t.appTemplate.actions().findByName(i.rootName(),e);n?n.isValidForTable(i,o,t,y)?w.actionButtons.push(n):h.default.warnToDevConsole("action specified in deck row is not valid for table"):h.default.warnToDevConsole("Could not find action specified in Deck view",e)}));else if(m&&m.length){o.findAttributesByNames(m).forEach((e=>{const n=p.default.createFromAttribute(t,o,i.name(),e);w.actionButtons=w.actionButtons.concat(n)}))}else{const e=t.appTemplate.actions().actionsForTable(i.name(),t).filter((e=>!e.tableScope()));w.actionButtons=w.actionButtons.concat(e)}w.actionButtons=w.actionButtons.filter((e=>e.prominence()!==p.default.DO_NOT_DISPLAY))}return f&&(w.swipeLeftActionIcon=t.appTemplate.actions().findByName(i.rootName(),f.EventAction)),g&&(w.swipeRightAction=t.appTemplate.actions().findByName(i.rootName(),g.EventAction)),w}static getDeckRowHeight(e){if(!!e.primaryImage)return 90;const t=e.actionButtons||[],i=!!e.primaryText,o=!!e.secondaryText,n=!!e.topRight,a=o&&!i&&!n;return(t.length>0?30:0)+(i||a||n&&!i&&!o||!i&&o&&n?38:0)+(!a&&o?22:0)}}t.DeckRow=T},234902:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.DeckRowContents=t.DECK_ROW_IMAGE_WIDTH=void 0;var n=o(i(386010)),a=i(695386),r=o(i(106375)),s=i(303622),l=i(41389),d=i(278965),c=i(148521);const u=t.DECK_ROW_IMAGE_WIDTH=70,p=(0,a.makeStyles)((e=>{const t={minHeight:"14px",minWidth:"60px"},i=Object.assign(Object.assign({},t),{minWidth:"20px"});return{DeckRowSlide:e=>({height:e.deckRowHeight,display:"flex",alignItems:e.hasActionButtons?"":"center"}),mainContent:{boxSizing:"border-box",display:"inline-block",verticalAlign:"top",width:"100%",marginTop:e=>e.hasActionButtons?10:0},mainContentWithImage:{width:"calc(100% - 94px)"},topRowContainer:{display:"flex",justifyContent:"space-between",alignItems:"center"},primaryText:e=>Object.assign({fontWeight:500,fontSize:"0.778rem",maxWidth:e.shouldLimitPrimaryTextWidth?"70%":"100%"},t),secondaryText:Object.assign({maxWidth:"100%"},t),primaryImage:{boxSizing:"border-box",display:"inline-block",verticalAlign:"top",marginTop:e=>e.hasActionButtons?10:0,padding:"0 ".concat(e.spacing(1.5),"px"),width:94},topRightText:i,topRightTextNotInEditor:{maxWidth:"30%"},actionButtonContainer:e=>({fontSize:"0.9em",position:"absolute",right:"2px",overflow:"hidden",maxWidth:"calc(100% - ".concat(94,"px)"),top:"calc(".concat(e.deckRowHeight,"px - ").concat(38,"px)"),display:"flex",flexWrap:"wrap",flexDirection:"row-reverse"}),actionButton:{marginBottom:e.spacing(.2),display:"inline-block",height:38,verticalAlign:"top",width:38}}}));t.DeckRowContents=e=>{let{handleRef:t,rowCssSelector:i,dragPosition:o,appModel:a,layout:h,deckRowHeight:m=90,rowValues:f,getRowId:g,getDataContext:y,imageDisplayType:v,showContent:b,table:w,controlName:S,additionalActions:x=[],translucentMode:C,isSelected:T,isLastToggled:I,highlighted:R,collapseBlankImage:O,swipeAction:D,draggingLeft:N,dragIconHeight:j}=e;var E,A,P,M,k,_,B,L;const V=(h.actionButtons||[]).concat(x).filter((e=>e.isValidForRow(f,y()))),F=!(0,l.isInEditingEmulator)()&&!!h.topRight,W=V.length>0,H=p({shouldLimitPrimaryTextWidth:F,hasActionButtons:W,deckRowHeight:m}),U=a.AppTemplate.Presentation.RespectShowIfEverywhere;let G,z=null,K=!1;if(h.primaryImage){const{TypeDisplay:e,attribute:t}=h.primaryImage;G=f[t.name()],K=!!G||!O;
1if((U&&t.showIfEvalTree()?t.showIfEvalTree().run(y()):!t.isHidden())&&K){let i=v;"Thumbnail"===t.type()&&(i="full-centered");const o=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(e,{className:"DeckRow__primary-image-display",attribute:t,value:G,showContent:b(t),table:w,dataContext:y(),appModel:a,imageDisplayType:i,imageBorderRadius:h.imageBorderRadius,useLoadingSpinner:!0,allowTaps:!1,width:u,height:u,rowId:g()}),T?(0,c.jsx)("aside",{className:"DeckRow__selection-indicator",style:(0,d.convertToRtlWhenNecessary)({width:"70px",height:"70px",borderRadius:"Round Image"===i?"400px":h.imageBorderRadius+"px"}),children:(0,c.jsx)("i",{className:"fa fa-check"})}):null]}),r=(0,c.jsx)(s.EmulatorComponentWrapper,{dataVFEValues:{root:"deck",table:null!==(E=null==w?void 0:w.name())&&void 0!==E?E:void 0,control:null!=S?S:void 0,rowId:g(),column:null!==(A=null==t?void 0:t.name())&&void 0!==A?A:void 0,context:"DeckMainImage"},children:o});z=(0,c.jsx)("div",{className:(0,n.default)("DeckRow__primary-image",H.primaryImage),children:r},g())}}let Y=null;if(h.topRight){const{TypeDisplay:e,attribute:t}=h.topRight;if(U&&t.showIfEvalTree()?t.showIfEvalTree().run(y()):!t.isHidden()){const i=(0,c.jsx)("div",{className:(0,n.default)("DeckRow__top-right-text",H.topRightText,{[H.topRightTextNotInEditor]:F}),children:(0,c.jsx)(e,{attribute:t,value:f[t.name()],showContent:b(t),table:w,dataContext:y(),appModel:a,imageDisplayType:v,rowId:g()})});Y=(0,c.jsx)(s.EmulatorComponentWrapper,{dataVFEValues:{root:"deck",table:null!==(P=null==w?void 0:w.name())&&void 0!==P?P:void 0,control:null!=S?S:void 0,rowId:g(),column:null!==(M=null==t?void 0:t.name())&&void 0!==M?M:void 0,context:"DeckSummaryText"},containerStyles:{maxWidth:"30%"},margin:"-2px 0 -2px -2px",children:i})}}let q=null;if(h.primaryText){const{TypeDisplay:e,attribute:t}=h.primaryText;if(U&&t.showIfEvalTree()?t.showIfEvalTree().run(y()):!t.isHidden()){const i=(0,c.jsx)("div",{className:(0,n.default)("DeckRow__primary-text",H.primaryText),children:(0,c.jsx)(e,{attribute:t,value:f[t.name()],showContent:b(t),table:w,dataContext:y(),appModel:a,imageDisplayType:v,rowId:g()})});q=(0,c.jsx)(s.EmulatorComponentWrapper,{dataVFEValues:{root:"deck",table:null!==(k=null==w?void 0:w.name())&&void 0!==k?k:void 0,control:null!=S?S:void 0,rowId:g(),column:null!==(_=null==t?void 0:t.name())&&void 0!==_?_:void 0,context:"DeckPrimaryHeaderText"},containerStyles:{maxWidth:h.topRight?"70%":"100%"},margin:"-2px 0 -2px -2px",children:i})}}let X=null;if(h.secondaryText){const{TypeDisplay:e,attribute:t}=h.secondaryText;if(!(!U||!t.showIfEvalTree())?t.showIfEvalTree().run(y()):!t.isHidden()){const i=(0,c.jsx)("div",{className:(0,n.default)("DeckRow__secondary-text",H.secondaryText),children:(0,c.jsx)(e,{attribute:t,value:f[t.name()],showContent:b(t),table:w,dataContext:y(),appModel:a,imageDisplayType:v,rowId:g()})});X=(0,c.jsx)(s.EmulatorComponentWrapper,{dataVFEValues:{root:"deck",table:null!==(B=null==w?void 0:w.name())&&void 0!==B?B:void 0,control:null!=S?S:void 0,rowId:g(),column:null!==(L=null==t?void 0:t.name())&&void 0!==L?L:void 0,context:"DeckSecondaryHeaderText"},margin:"-2px 0 -2px -2px",children:i})}}const Q=V.map(((e,t)=>(0,c.jsx)("div",{className:H.actionButton,children:(0,c.jsx)(r.default,{appModel:a,action:e,rowId:g(),sourceLocationName:"Deck Row",sourceTable:w,displayMode:"small",rowValues:f})},"".concat(e.name(),"-").concat(t)))).reverse();let $;D&&($=(0,c.jsx)(r.default,{appModel:a,action:D,disabled:!0,rowId:g(),sourceLocationName:"Deck Row",sourceTable:w,displayMode:"small",invertColors:!0,rowValues:f}));const Z=(0,n.default)("DeckRowSlide",H.DeckRowSlide,{"DeckRow--has-top-right-text":!!Y,"DeckRow--translucent-mode":C,"DeckRow--selected":T,"DeckRow--last-toggled":I,"DeckRow--highlighted":R});return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:"DeckRow__swipe-action-button",style:(0,d.convertToRtlWhenNecessary)({position:"absolute",left:N?void 0:55,right:N?51:void 0,marginTop:Math.floor(m/2),verticalAlign:"middle",fontSize:j}),children:$}),(0,c.jsxs)("div",{ref:t,className:Z,id:"draggable"+i(),"data-testid":"deck-row-slide-".concat(i()),style:(0,d.convertToRtlWhenNecessary)({position:"relative",left:o,paddingLeft:K?void 0:"16px"}),children:[K?z:null,(0,c.jsxs)("div",{className:(0,n.default)(H.mainContent,{[H.mainContentWithImage]:K}),children:[(0,c.jsxs)("div",{className:H.topRowContainer,children:[q,Y]}),X,(0,c.jsx)("div",{className:H.actionButtonContainer,children:Q})]})]})]})}},894440:(e,t,i)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DECK_ROW_IMAGE_WIDTH",{enumerable:!0,get:function(){return n.DECK_ROW_IMAGE_WIDTH}}),Object.defineProperty(t,"DeckRow",{enumerable:!0,get:function(){return o.DeckRow}});var o=i(866610),n=i(234902)},751892:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(238416)),a=o(i(496486)),r=i(667294),s=i(166089),l=o(i(571524)),d=i(557310),c=o(i(150198)),u=o(i(92329)),p=o(i(578914)),h=i(278965),m=i(157479),f=i(93089),g=i(148521);function y(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}var v=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};class b extends p.default{constructor(e){super(e);if(a.default.get(e,"appModel.AppTemplate.Presentation.AutoAdvanceForms")&&e.onPage>1&&!d.ReactRootUIConfig.isReactRoot()){this.firstVisibleEntryAttribute(e)&&(this._focusFirst=!0)}}get updateMechanism(){return"form"}get rowState(){return this.props.getRowState?this.props.getRowState():super.rowState}set rowState(e){this._rowState=e}dataContext(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;if(e.getTableRow){const t=e.getTableRow();if(t)return t.dataContext.augmentWithViewContext(this.transactionOwningViewStackKey)}return super.dataContext(e)}rowValues(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;var t;return null!==(t=e.rowValues)&&void 0!==t?t:this.dataContext(e).rowData}replaceState(e){a.default.isEmpty(e)&&(e=a.default.mapValues(this.state,(()=>{}))),this.setState(e),this.refreshPagingState()}UNSAFE_componentWillReceiveProps(e){if(super.UNSAFE_componentWillReceiveProps(e),(e.onPage!==this.props.onPage||e.tempId&&e.tempId!==this.props.tempId)&&(this.lastUpdateValues=a.default.clone(this.dataContext(e).rowData)||{},e.useTransactions||(this.rowState=this.makeNewRowState(e)),this.replaceState(this.initialState(e)),!d.ReactRootUIConfig.isReactRoot())){this.firstVisibleEntryAttribute(e)&&e.onPage>1&&(this._focusFirst=!0)}}componentDidUpdate(){(0,m.asyncControlFlowEnabled)()||this.manageFocus()}componentDidMount(){this._unmounted=!1,d.ReactRootUIConfig.isReactRoot()&&(this._focusFirst=!0),(0,m.asyncControlFlowEnabled)()||this.manageFocus()}componentWillUnmount(){this._unmounted=!0}manageFocus(){const e=this._focusAfter,t=this._focusFirst,i=(e,t)=>{setTimeout((()=>{this._unmounted||this._focusPending!==t||e()}),0)};if(e){const{attrName:t,params:o}=e;l.default.InWKWebView()?this.tryFocusEntryAfter(t,o):(this._focusPending=e,i((()=>this.tryFocusEntryAfter(t,o)),this._focusPending)),delete this._focusAfter}else t&&(this._focusPending=t,i((()=>this.tryFocusFirstEntry()),this._focusPending),delete this._focusFirst)}supportsEdits(){return!0}respectShowIf(){return!0}firstVisibleEntryAttribute(e){return(e=e||this.props).attributesOnPage.filter((e=>!e.isShowType()&&!this.isHidden(e)))[0]}tryFocusFirstEntry(){const e=this.firstVisibleEntryAttribute();if(e&&this.isEditable(e)&&(this.isNewRow()||this.isRequired(e))){const t=this.dataContext().rowData[e.name()];c.default.valueExists(t,e.type())||this.focusEntry(e,1===this.props.onPage)}}tryFocusEntryAfter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=this.props.attributesOnPage,o=a.default.findIndex(i,(t=>t.name()===e)),n=i.slice(o+1).filter((e=>!e.isShowType()&&!this.isHidden(e)))[0];if(n){const e=this.props.appModel.AppTemplate.Presentation.AutoAdvanceForms,i=this.dataContext().rowData[n.name()];!this.isEditable(n)||!e&&t.requireAutoAdvance||c.default.valueExists(i,n.type())||this.focusEntry(n)}else"function"==typeof this.props.tryAdvanceForm&&this.props.tryAdvanceForm()}focusEntry(e,t){const i=this.formEntries[e.name()],o=this.props.appModel.AppTemplate.Presentation.AutoAdvanceForms,n=!(!s.AppGlobals.ViewManager||!s.AppGlobals.ViewManager.fadingIn&&!s.AppGlobals.ViewManager.fadingOut);if(i&&!n&&!this.isHidden(e)){const n=o&&this.isRequired(e),a=n&&(l.default.InIOSWebView()||l.default.InAndroidWebView());i.focus({openCamera:a,openListSelect:n,isFirstEntry:t})}}updateInfluencedEntries(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;super.updateInfluencedEntries(e,t,i),this.lastUpdateValues=a.default.clone(this.dataContext().rowData),this.refreshPagingState()}refreshPagingState(){this.props.refreshPagingState&&this.props.refreshPagingState()}refreshEntryState(e){e=e||this.props.entryAttributes||[],super.refreshEntryState(e)}render(){const{rowState:e}=this,{attributesOnPage:t}=this.props,i=this.pendingTransaction;return(0,g.jsx)(r.Suspense,{fallback:null,children:(0,g.jsx)(m.QueryRollout,{query:(0,f.queryDynamicFormEntryPropsForAttributes)({rowState:e,attributes:t,viewStackKey:null==i?void 0:i.owningViewStackKey,transaction:i}),children:e=>{this.formEntries={};const{appModel:t,table:i,tableSchema:o,useTransactions:a,width:r,formStyle:s,pageStyle:l,tempId:c,maxNestedRows:p,initialData:f,isInline:b}=this.props,S=t.AppTemplate.Presentation.HideFormNumbering;let x=r<412?10:20;d.ReactRootUIConfig.isInDesktopExperience()&&b&&(x=0);let C=r-2*x;if("Side-by-side"===s){C-=.28*C+20}const T=[];e.forEach((e=>{var{attribute:t}=e,r=v(e,["attribute"]);const d=t.name(),h=this.makeEntryId(t);let m;if(S||(m=o.formItemNumber(d)),t.isPageHeader()&&"Tabs"===l)return null;
1const b="Side-by-side"!==s&&this.usePlaceholderLabel(t),w=this.dataContext().rowData[d],x=null!=f&&f[d]!==w,I=Object.assign(Object.assign(Object.assign(Object.assign({},this.props),{dataContext:this.dataContext(),entryId:h,refreshId:c,attribute:t,itemNumber:m,table:null,tableName:i.name(),row:a?null:this.rowState,value:w,viewType:"form",formStyle:s,maxNestedRows:p,launchNestedForm:this.props.launchNestedForm,focused:!(!this.state.focused||this.state.focused.name()!==d),modified:x}),r),{usePlaceholderLabel:b,isNewRow:this.isNewRow(),onEntryValueChange:this.onEntryValueChange,onEntryFocus:this.onEntryFocus,onEntryBlur:this.onEntryBlur,onEntryKeyDown:this.onEntryKeyDown,onEntryTouchStart:this.onEntryTouchStart,width:C,height:void 0});T.push((0,g.jsx)(u.default,function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?y(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):y(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({ref:this.onEntryMount.bind(this,t)},I),d))}));const I={margin:x+"px"};return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"EntryScreenAttributes EntryForm",style:(0,h.convertToRtlWhenNecessary)(I),children:[T,(0,m.asyncControlFlowEnabled)()&&(0,g.jsx)(w,{manageFocus:()=>this.manageFocus()})]})})}})})}}t.default=b;function w(e){let{manageFocus:t}=e;return(0,r.useEffect)((()=>{t()})),null}},217738:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.GalleryRowDataTestIds=void 0;var n,a=o(i(578914)),r=i(667294),s=o(i(496486)),l=o(i(386010)),d=o(i(112963)),c=i(803583),u=i(557310),p=i(278965),h=i(157479),m=i(148521);!function(e){e.Container="gallery-row-container"}(n||(t.GalleryRowDataTestIds=n={}));const f={Tiny:{screenSm:{width:72,fontSizeMultiplier:.667,accentLine:!1,margin:16,titleHPadding:8},screenMd:{width:90,fontSizeMultiplier:.667,accentLine:!1,margin:16,titleHPadding:8},screenLg:{width:140,fontSizeMultiplier:.667,accentLine:!1,margin:16,titleHPadding:8}},Small:{screenSm:{width:140,fontSizeMultiplier:.778,accentLine:!0,margin:16,titleHPadding:8},screenMd:{width:180,fontSizeMultiplier:.778,accentLine:!0,margin:16,titleHPadding:8},screenLg:{width:198,fontSizeMultiplier:.778,accentLine:!0,margin:16,titleHPadding:8}},Medium:{screenSm:{width:150,fontSizeMultiplier:.778,accentLine:!0,margin:16,titleHPadding:8},screenMd:{width:220,fontSizeMultiplier:.778,accentLine:!0,margin:16,titleHPadding:8},screenLg:{width:315,fontSizeMultiplier:.778,accentLine:!0,margin:16,titleHPadding:8}},Large:{screenSm:{width:600,fontSizeMultiplier:.778,accentLine:!0,margin:16,titleHPadding:8},screenMd:{width:600,fontSizeMultiplier:.778,accentLine:!0,margin:16,titleHPadding:8},screenLg:{width:600,fontSizeMultiplier:.778,accentLine:!0,margin:16,titleHPadding:8}}};class g extends a.default{handleSelect(e){var t,i;null===(i=(t=this.props).onRowTap)||void 0===i||i.call(t,this.rowId(),e)}renderImage(e){const{layout:t,table:i,rowValues:o,appModel:n,isSelected:a}=this.props,r=t.image;if(r){const{attribute:t,typeDisplay:s}=r;return(0,m.jsx)(h.QueryOrPassthroughRollout,{query:this.shouldShowQuery(t),children:r=>{if(r){let{imageDisplayType:r="square"}=this.props;return"Image"!==t.type()&&(r="full-centered"),"full"===r&&(r="full-centered"),(0,m.jsxs)("div",{className:"GalleryRow__image",children:[(0,m.jsx)(s,{attribute:t,value:o[t.name()],table:i,appModel:n,rowId:this.rowId(),dataContext:this.dataContext(),allowTaps:!1,imageDisplayType:r,minimalView:!1,useLoadingSpinner:!0,width:e,height:e}),a?(0,m.jsx)("div",{className:"GalleryRow__selection-indicator",style:(0,p.convertToRtlWhenNecessary)({width:e+"px",height:e+"px"}),children:(0,m.jsx)("span",{children:(0,m.jsx)("i",{className:"fa fa-check"})})}):null]})}return null}})}return null}renderTitle(){const{layout:e,table:t,rowValues:i,appModel:o}=this.props,n=e.title;if(n){const{attribute:e,typeDisplay:a}=n;return(0,m.jsx)(h.QueryOrPassthroughRollout,{query:this.shouldShowQuery(e),children:e=>e?(0,m.jsx)(a,{attribute:n.attribute,value:i[n.attribute.name()],table:t,appModel:o,allowTaps:!1,rowId:this.rowId(),dataContext:this.dataContext(),minimalView:!1,showTooltip:!0}):null})}return null}render(){const{layout:e,isSelected:t,highlighted:i,index:o,onRowLongPress:a}=this.props,s=e.boxWidth-2,c=u.ReactRootUIConfig.isInDesktopExperience(),h={width:e.boxWidth,height:c?38+s:"auto",margin:e.margin/2+"px"},f={height:38,fontSize:e.fontSizeMultiplier+"em",paddingLeft:e.titleHPadding+"px",paddingRight:e.titleHPadding+"px"}
1,g=(0,l.default)("GalleryRow",{"GalleryRow--include-accent-line":e.accentLine,"GalleryRow--selected":t,"GalleryRow--highlighted":i&&!c,"GalleryRow--highlighted-update":i&&c});return(0,m.jsx)("span",{"data-testid":n.Container,children:(0,m.jsx)(d.default,{navigationDelay:!0,onTap:this.handleSelect.bind(this),onLongPress:null==a?void 0:a.bind(null,this.rowId()),className:g,innerStyle:h,"data-testonly-row-index":o,id:"Gallery".concat(this.rowCssSelector(),"_Index_").concat(o),children:(0,m.jsxs)(r.Suspense,{fallback:null,children:[this.renderImage(s),(0,m.jsx)("div",{className:"GalleryRow__title",style:(0,p.convertToRtlWhenNecessary)(f),children:this.renderTitle()})]})})})}static computeLayout(e){let{tableSchema:t,width:i,galleryImageSize:o="Medium",sidewaysScroll:n}=e;!n||"Medium"!==o&&"Large"!==o||(o="Small");const a=t.labelImageAttribute(!0);let r=null;a&&(r={attribute:a,typeDisplay:c.TypeDisplaysApi.lookup(a)});const l=t.labelBasicAttribute();let d=null;l&&(d={attribute:l,typeDisplay:c.TypeDisplaysApi.lookup(l)});let u;u=i<=480?"screenSm":i<=768?"screenMd":"screenLg";const p=(f[o]||f.Medium)[u];let h=Math.min(p.width,i||p.width);const m=n?null:Math.max(Math.floor(i/h),1);return null!==m&&(h=(i-m*p.margin)/m),s.default.extend({},p,{image:r,title:d,boxWidth:h,sidewaysScroll:n,imagesPerLine:m})}}t.default=g},303055:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(386010)),a=i(803583),r=i(894440),s=o(i(578914)),l=o(i(888861)),d=o(i(454852)),c=i(278965),u=i(351101),p=i(148521);class h extends s.default{handleSelect(){this.pushView({viewType:"detail",useAnyRefs:!1,newState:{TableName:this.props.table.name(),RowKey:this.rowId()},retainSearch:!0})}render(){const e=this.props,t=e.table,i=e.tableSchema,o=e.rowValues,s=e.appModel,m=e.mapColumn,f=i.findAttributeByName(m),g=null!=f&&!f.isHidden()?(0,p.jsx)(a.TypeDisplaysApi.Text,{className:"GoogleMapRow__address-text",attribute:f,value:o[m],table:t,dataContext:this.dataContext(),appModel:s,rowId:this.rowId()}):null,y=[];this.props.directionsUrl&&y.push(new d.default({ActionType:"NAVIGATE_URL",Icon:"fa-car",IsValid:!0,Name:(0,u.mapActionName)("Get driving directions"),Table:this.props.table.name(),ValueEvaluatable:l.default.createConcatenate(l.default.createConstantValue(this.props.directionsUrl,"Url")).model}));const v=r.DeckRow.computeLayout({appModel:this.props.appModel,table:this.props.table,tableSchema:this.props.tableSchema,actionColumns:this.props.actionColumns,actionBarEntries:this.props.actionBarEntries,deckSummaryColumn:this.props.deckSummaryColumn,mainDeckImageColumn:this.props.mainDeckImageColumn,primaryDeckHeaderColumn:this.props.primaryDeckHeaderColumn,secondaryDeckHeaderColumn:this.props.secondaryDeckHeaderColumn,showActionBar:this.props.showActionBar}),b=(0,n.default)("GoogleMapRow"),w={height:h.computeHeight(this.props)};return(0,p.jsxs)("div",{className:b,style:(0,c.convertToRtlWhenNecessary)(w),children:[g,(0,p.jsx)(r.DeckRow,{onRowTap:this.props.onRowTap||this.handleSelect.bind(this),layout:v,rowValues:this.props.rowValues,table:this.props.table,appModel:this.props.appModel,tableSchema:this.props.tableSchema,additionalActions:y,actionColumns:this.props.actionColumns,actionBarEntries:this.props.actionBarEntries,deckSummaryColumn:this.props.deckSummaryColumn,imageDisplayType:this.props.imageDisplayType,mainDeckImageColumn:this.props.mainDeckImageColumn,primaryDeckHeaderColumn:this.props.primaryDeckHeaderColumn,secondaryDeckHeaderColumn:this.props.secondaryDeckHeaderColumn,showActionBar:this.props.showActionBar,collapseBlankImage:!0})]})}static computeHeight(e){let{tableSchema:t,mapColumn:i}=e;if(null==t)return 90;const o=t.findAttributeByName(i);return null!=o&&!o.isHidden()?118:90}}t.default=h},17926:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.GroupedHeaderRowTestIds=void 0;var n,a=o(i(238416)),r=i(667294),s=o(i(386010)),l=i(803583),d=o(i(578914)),c=i(714611),u=o(i(454852)),p=o(i(150198)),h=o(i(112963)),m=o(i(106375)),f=o(i(385857)),g=i(593186),y=i(563479),v=i(664583),b=i(557310),w=i(278965),S=i(562858),x=i(351101),C=i(674061),T=i(157479),I=i(148521);function R(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function O(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};
1t%2?R(Object(i),!0).forEach((function(t){(0,a.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):R(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}!function(e){e.Container="grouped-header-row-container",e.DrillArrow="grouped-header-row-drill-arrow"}(n||(t.GroupedHeaderRowTestIds=n={}));const D=e=>{const{groupAggregate:t,appModel:i,tableSchema:o,drilldownColumn:n,table:a,groupBy:s,searchQuery:l,rowLimit:d,filterExpr:c,filterDefaults:u,transaction:p,viewStackKey:h}=e,m=o.findAttributeByName(t.column);t.column&&!m&&(0,g.doWeEverHitThis)("No targetAttribute for group aggregate");const v=(0,r.useMemo)((()=>function(e){let{appModel:t,tableSchema:i,drilldownColumn:o,table:n,searchQuery:a,limit:r,groupBy:s,filterExpr:l,filterDefaults:d,transaction:c,viewStackKey:u}=e;if(o){const e={searchQuery:a,limit:r,sortRules:[{Column:o,Order:s[0].Order}],filterExpr:l,filterDefaults:d,groupBy:o,transaction:c},p=new f.default(t,i,void 0,void 0,void 0,void 0,{viewStackKey:u});return(0,C.queryRowValuesGroupBy)(n,e,p)}return{passthrough:void 0}}({appModel:i,tableSchema:o,drilldownColumn:n,table:a,searchQuery:l,limit:d,groupBy:s,filterExpr:c,filterDefaults:u,transaction:p,viewStackKey:h})),[i,o,n,a,l,d,s,c,u,p,h]);return(0,I.jsx)(r.Suspense,{fallback:null,children:(0,I.jsx)(T.QueryOrPassthroughRollout,{query:v,children:t=>(0,I.jsx)(y.Badge,{attribute:m,value:j(e,t)})})})};class N extends d.default{inlineTextSelected(e){e&&(0,v.runAppAction)(e,{appModel:this.props.appModel,rowId:this.rowId(),sourceLocationName:"Slideshow Inline",sourceTable:this.props.table},void 0,this.viewStackKey)}rowValues(){var e;return null!==(e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props).rows[0])&&void 0!==e?e:{}}render(){let e=(0,s.default)("TableViewRow",{"TableViewRow--translucent-mode":this.props.translucentMode,"TableViewRow--selection-mode":this.props.selectionMode,"TableViewRow--highlighted":this.props.highlighted,"TableViewRow--no-selection-mode":!this.props.selectionMode,"TableViewRow--selected":this.props.isSelected});const t=(0,x.getAppModel)(),i=this.props.attribute,o=this.props.tableSchema.keyAttribute().name(),a=this.props.rows[0],r=this.dataContext(),d=a[o],p=a[i.name()],f=l.TypeDisplaysApi.lookup(i,p);let g=null,y=null;if(this.props.groupAggregate&&(y=(0,I.jsx)(D,O(O({},this.props),{},{transaction:this.transaction,viewStackKey:this.viewStackKey}))),this.props.drilldownColumn||null!=p&&""!==p){const o=t.appTemplate.actions();let l=[];l=(this.props.disableAllActions?[]:o.actionsForRow(a,this.props.table.name(),t,this.dataContext())).filter((e=>{if(e.prominence()!==u.default.DISPLAY_INLINE)return!1;const t=e.columnAttachment();return t&&t===i.name()})).filter((e=>{if("Ref"===i.type()&&"NAVIGATE_APP"===e.type()&&e.isAutoCreated()){if(null!=t.findReferencedRow(i,r))return!0}return!1})).slice(0,1);const v=f.isBlock(i),x=(this.props.onTap||l.length>0&&!this.props.disableNavigation)&&!v;let C=(0,I.jsx)(f,{attribute:i,value:p,table:this.props.table,imageDisplayType:this.props.imageDisplayType,inlineModeBlockHeight:(0,c.rowHeight)(),inlineModeBlockWidth:(0,c.rowHeight)(),dataContext:r,appModel:t,rowId:d});if(!b.ReactRootUIConfig.isInDesktopExperience()&&x&&(C=(0,I.jsx)(h.default,{className:e,navigationDelay:!0,stopPropagation:!0,onTap:this.props.onTap?this.props.onTap:this.inlineTextSelected.bind(this,l[0]),spanMode:!0,children:C})),this.props.drilldownColumn){const e={paddingLeft:c.columnPadding/2,paddingRight:c.columnPadding/2};g=(0,I.jsxs)(h.default,{className:"GroupedHeaderRow__type-view",navigationDelay:!0,stopPropagation:!0,onTap:this.props.onTap?this.props.onTap:this.inlineTextSelected.bind(this,l[0]),spanMode:!0,children:[C,y,(0,I.jsx)("div",{className:"TableViewRow__drill-arrow",style:(0,w.convertToRtlWhenNecessary)(e),"data-testid":n.DrillArrow,children:(0,I.jsx)(S.DirectionAwareIcon,{icon:(0,I.jsx)("i",{className:"fa fa-angle-right"})})},"drill-arrow")]})}else g=(0,I.jsxs)("div",{className:(0,s.default)("GroupedHeaderRow__type-view",{"GroupedHeaderRow__desktop-ui":b.ReactRootUIConfig.isInDesktopExperience()&&"table"!==this.props.viewType}),children:[C,y,!b.ReactRootUIConfig.isInDesktopExperience()&&(0,I.jsx)("div",{className:"GroupedHeaderRow__inline-actions",children:l.map(((e,i)=>(0,I.jsx)("div",{className:"GroupedHeaderRow__inline-action "+(0===i?"GroupedHeaderRow__inline-action--first":""),children:(0,I.jsx)(m.default,{appModel:t,disabled:this.props.disableNavigation,action:e,rowId:d,sourceLocationName:"TableView GroupedHeaderRow Inline",sourceTable:this.props.table,displayMode:"small",href:null})},i)))})]})}else g=(0,I.jsxs)("div",{className:(0,s.default)("GroupedHeaderRow__empty",{"GroupedHeaderRow__desktop-ui":b.ReactRootUIConfig.isInDesktopExperience()&&"table"!==this.props.viewType}),children:[(0,I.jsx)("div",{className:(0,s.default)("GroupedHeaderRow__empty-text",{"GroupedHeaderRow__desktop-ui-table-view":b.ReactRootUIConfig.isInDesktopExperience()&&"table"===this.props.viewType}),children:(0,I.jsx)("i",{children:(0,x.mapActionName)("blank")})}),y]});return e=(0,s.default)("GroupedHeaderRow","GroupedHeaderRow--FlexRollout",{DesktopUI:b.ReactRootUIConfig.isInDesktopExperience()&&"table"!==this.props.viewType,"GroupedHeaderRow--MultiLine":!b.ReactRootUIConfig.isInDesktopExperience(),"GroupedHeaderRow--selection-mode":this.props.selectionMode,"GroupedHeaderRow--translucent-mode":this.props.translucentMode,"GroupedHeaderRow--tall":this.props.tall}),this.props.drilldownColumn&&(e=(0,s.default)("GroupedHeaderRow Drilldown","GroupedHeaderRow--FlexRollout",{"GroupedHeaderRow--selection-mode":this.props.selectionMode,"GroupedHeaderRow--translucent-mode":this.props.translucentMode,"GroupedHeaderRow--highlighted":this.props.highlighted,"GroupedHeaderRow--no-selection-mode":!this.props.selectionMode,"GroupedHeaderRow--selected":this.props.isSelected,"GroupedHeaderRow--tall":this.props.tall})),(0,I.jsx)("div",{"data-testid":"".concat(n.Container,"-").concat(p),className:e,style:(0,w.convertToRtlWhenNecessary)(this.props.innerStyle),"data-testonly-row-index":this.props.index,children:g})}}t.default=N;function j(e,t){var i;let o=e.rows;const{appModel:n,tableSchema:a,drilldownColumn:r,table:s,groupAggregate:l}=e;if(r&&t){const e=a.findAttributeByName(r);if("EnumList"===(null==e?void 0:e.type())){const e=new Map(t);for(const[t]of e){const i=p.default.splitEnumListValue(t);i.length>
11&&i.forEach((i=>{var o,n;e.set(i,[...null!==(o=e.get(i))&&void 0!==o?o:[],...null!==(n=e.get(t))&&void 0!==n?n:[]])}))}t=e}const n=o[0][r];o=null!==(i=t.get(n))&&void 0!==i?i:[]}return a.computeAggregate({aggregationFunction:l.func,targetColumnName:l.column,rows:o,tableName:s.name(),appModel:n})}},400219:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.NonCardHeader=void 0;var n=o(i(386010)),a=i(695386),r=i(803583),s=i(398171),l=i(14042),d=i(216437),c=i(56749),u=i(646514),p=i(278965),h=i(148521);const m=(0,a.makeStyles)((e=>({headerContainer:{overflow:"hidden"},notBackgroundHeaderContainer:{boxSizing:"border-box",position:"relative",padding:"0 ".concat(e.spacing(2))},backgroundImageMode:{backgroundColor:(0,c.themeColor)("detailBackground")},hasBodyActions:{marginBottom:e.spacing(2)},hText:{lineHeight:"1.2rem","&:not(:last-child)":{marginBottom:"6px"}},h1Text:{fontSize:"1.556rem",fontWeight:500,lineHeight:"1.833rem"},h2Text:{fontSize:"1.333rem",fontWeight:400,lineHeight:"1.556rem"},h3Text:{fontSize:"1.222rem",fontWeight:400,lineHeight:"1.333rem"},h4Text:{fontSize:"1.111rem",fontWeight:400,lineHeight:"1.333rem"},h5Text:{fontSize:"1rem",fontWeight:400,lineHeight:"1.333rem"},h6Text:{fontSize:"0.889rem",fontWeight:400,lineHeight:"1.333rem"},headerItems:{padding:e.spacing(2)},headerItemsOverlay:t=>{let{headerItemAttributesCount:i}=t;return{position:"absolute",bottom:i>10?"auto":0,left:0,right:0,paddingTop:e.spacing(3),background:(0,c.themeColor)("nonCardHeaderTextOverlay"),color:u.GOOGLE_WHITE}}})));t.NonCardHeader=e=>{let{isBackgroundImageMode:t,primaryImageAttribute:i,headerItemAttributes:o,imageHeaderHeight:a,dataContext:c,imageDisplayType:u,table:f,rowId:g,rowState:y,bodyActionsView:v,onImageSize:b,showContentFn:w}=e;const S=(0,l.useReactAppSelector)(s.getAppModelHook),x=m({headerItemAttributesCount:o.length});let C=null;if(i&&!t){const e=c.rowData[i.name()],t=r.TypeDisplaysApi.lookup(i,e);if(e){let o;o="Thumbnail"===i.type()||"Fit"===u?"full-centered":"square",C=(0,h.jsx)("div",{className:"SlideshowPage__header-image",children:(0,h.jsx)(t,{attribute:i,value:e,table:f,appModel:S,dataContext:c,imageDisplayType:o,zeroImageLoadDelay:!0,height:a,rowId:g,onImageSize:b})})}}if(!C&&0===o.length&&!v)return null;let T=a;if(o.length>10){T=34*(o.length-5)+152}const I=t?"auto":T,R=o.filter((e=>!!("Show"===e.type()?w(e,y):c.rowData[e.name()]))).map(((e,t)=>{const i=c.rowData[e.name()],o=r.TypeDisplaysApi.lookup(e,i),a={0:x.h1Text,1:x.h2Text,2:x.h3Text,3:x.h4Text,4:x.h5Text,5:x.h6Text};return(0,h.jsx)("div",{className:(0,n.default)(x.hText,a[t]||x.h6Text),"data-testonly-column":e.name(),children:(0,h.jsx)(o,{attribute:e,value:i,table:f,appModel:S,dataContext:c,displayMode:"inline",rowId:g,showContent:w(e,y),suppressShowTypeStyles:!0})},"header-item-".concat(e.name(),"-").concat(t))}));return(0,h.jsxs)("div",{children:[(0,h.jsxs)("div",{"data-testid":d.SlideshowPageDataTestIds.Header,className:(0,n.default)(x.headerContainer,{[x.notBackgroundHeaderContainer]:!t,[x.hasBodyActions]:!t&&v,[x.backgroundImageMode]:t}),style:(0,p.convertToRtlWhenNecessary)({height:I||"auto"}),children:[C,!!R.length&&(0,h.jsx)("div",{"data-testid":"non-card-header-overlay",className:(0,n.default)(x.headerItems,{[x.headerItemsOverlay]:!!C}),children:R})]},"head"),v]})}},680462:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.getPrimaryImageAttribute=t.SlideshowPage=t.SLIDESHOW_PAGE_MAX_WIDTH=void 0;var n=o(i(238416)),a=o(i(496486)),r=o(i(386010)),s=i(249492),l=Z(i(365914)),d=o(i(92329)),c=o(i(888861)),u=o(i(385857)),p=o(i(494012)),h=Z(i(150198)),m=o(i(454852)),f=o(i(593186)),g=o(i(112963)),y=o(i(106375)),v=i(803583),b=o(i(578914)),w=i(334500),S=i(623834),x=o(i(21870)),C=i(216437),T=i(515801),I=i(557310),R=i(166089),O=i(375155),D=i(778947),N=i(351101),j=i(664583),E=i(242896),A=o(i(819433)),P=i(29827),M=o(i(962553)),k=i(400219),_=i(632606),B=i(134117),L=i(303622),V=i(347055),F=i(41389),W=i(278965),H=i(573553),U=i(302873),G=i(901545),z=i(779281),K=i(44617),Y=i(563479),q=i(56749),X=i(148521);function Q(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(Q=function(e){return e?i:t})(e)}
1function Z(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=Q(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}function J(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function ee(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?J(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):J(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function te(e){return void 0===e.lines}function ie(e){return te(e)||e.lines.length>0}function oe(e){return e.sections.some(ie)}const ne=t.SLIDESHOW_PAGE_MAX_WIDTH=768,ae=ne;const re=x.default.widescreenBreakpoint,se=(0,s.createStyles)((e=>({columnsContainer:{display:"flex",padding:e.spacing(2),justifyContent:"center"},contentColumns:{display:"flex",boxSizing:"border-box",overflow:"hidden",flexGrow:1},column:{flex:"1 1 0",minWidth:0,maxWidth:"700px","&:not(:last-of-type)":{marginRight:e.spacing(2)}},card:{padding:e.spacing(2,0),"&:not(:last-of-type)":{marginBottom:e.spacing(2)}},divider:{marginBottom:e.spacing(1)},lineSideBySide:{marginBottom:4},linePageHeader:{marginBottom:0},showTypeEntry:{marginBottom:"6px"},headerContainer:{display:"flex",flexDirection:"column"},headerItemsContainer:{padding:e.spacing(2)},actionBarContainer:{display:"flex",flexWrap:"wrap",padding:e.spacing(0,2),paddingBottom:e.spacing(2)},inlineCard:{paddingBottom:e.spacing(1)},headerCard:{padding:0},regularCard:{padding:"".concat(e.spacing(2),"px 0")},reactCardBorder:{"&&:not(:last-of-type)":{borderBottom:"6px solid ".concat((0,q.themeColor)("detailSectionDivider"))}},showTypeHeaderLabelClamp:{overflow:"hidden",display:"-webkit-box","-webkit-line-clamp":2,"-webkit-box-orient":"vertical"},line:{position:"relative"},mobileLine:{marginBottom:0,paddingBottom:"14px !important","&:last-of-type":{paddingBottom:"0 !important"}},quickEdit:{paddingBottom:"0 !important"},headerMargin:{marginBottom:2},inlineAction:{height:30}}))),le=function(){return{lines:[],inlineMode:arguments.length>0&&void 0!==arguments[0]&&arguments[0],sectionLabel:arguments.length>1?arguments[1]:void 0}},de=e=>{let t,{mainSlideshowImageColumn:i,tableSchema:o}=e;if("**none**"===i)t=null;else if(null==i||"**auto**"===i){const e=o.labelAttributes(!1),i=o.labelImageAttribute(!1);i?t=i:e.length||(t=a.default.find(o.visibleAttributesWithoutShowTypes(),(e=>e.isPresentableImageType())))}else t=o.findAttributeByName(i);return t};t.getPrimaryImageAttribute=de;class ce extends b.default{constructor(e){super(e),this.getBodyActionsView=e=>{let{useCardLayout:t,actions:i}=e;var o,n;return t?null:i.length?(0,X.jsx)("div",{className:"SlideshowPage__action-bar",children:i.map(((e,t)=>(0,X.jsx)("div",{className:(0,r.default)("SlideshowPage__header-action",{"SlideshowPage__header-action-react-root":I.ReactRootUIConfig.isReactRoot()}),children:(0,X.jsx)(y.default,{appModel:this.props.appModel,action:e,rowId:this.rowId(),disabled:this.props.disableNavigation,sourceLocationName:"Slideshow Body",sourceTable:this.props.table,displayMode:"large",tableSchema:this.props.tableSchema,rowValues:this.allRowValues()})},t)))},"as-action-bar"):(0,F.isInEditingEmulatorEditMode)()&&K.dynamicRollouts.includeByUserId("VFEActionCreationDetailViewsExperiment")?(0,X.jsx)(V.GhostButton,{containerClassName:"SlideshowPage__action-bar",dataVFEValues:{root:"detail",control:null!==(o=this.props.controlName)&&void 0!==o?o:void 0,table:null!==(n=this.props.table.name())&&void 0!==n?n:void 0,context:"DetailBodyAction"}},"as-action-bar"):null},this.state=Object.assign(Object.assign({},this.state),{topImageLoading:!0,lastActionInvoked:null,scrollbarVisible:!1})}get updateMechanism(){return this.isInDesktopEditMode?"form":"quickedit"}supportsEdits(){return!0}allRowValues(){return this.dataContext().rowData}UNSAFE_componentWillReceiveProps(e){super.UNSAFE_componentWillReceiveProps(e),this.fullRefreshCondition(e)&&this.refreshEntryState()}onTransactionUpdated(e){document.activeElement.blur();const t=()=>R.AppGlobals.StateChangeHandler.ShowUIState(!0),{viewStackKey:i,pendingTransaction:o}=this;this.props.quickEditMode||this.isInDesktopEditMode?t():e.commitAsync().then((()=>{M.default.usePendingChangesStore&&i&&e===o?(0,A.default)().dispatch((0,E.setPendingTransaction)(i,void 0)):t()})).catch((()=>{M.default.usePendingChangesStore&&i&&e!==o?(0,A.default)().dispatch((0,E.setPendingTransaction)(i,e.id)):t()}))}inlineTextSelected(e){this.runAction(e,"Slideshow Inline")}updateInfluencedEntries(e){const t={initialData:this.lastSavedValues,noAsync:!0};if((e.resetsEachUpdate()||e.hasResetExpression())&&(t.skipTheseDefaults={[e.name()]:!0}),this.dataContext().recomputeAppFormulas(t),this.refreshEntryState(this.props.entryAttributes),!this.rowState)return;const i=this.rowState.values();this.lastUpdateValues=a.default.clone(i);const{errorState:o}=this.rowState.validateSave({viewStackKey:this.viewStackKey,transaction:this.pendingTransaction});
1if(p.default.changeInvalidatesRow(e,this.initialErrorState,o)){const t=a.default.clone(this.state.invalidatesRow);t[e.name()]=!0,this.setState({invalidatesRow:t})}else{if(!a.default.isEqual(this.lastSavedValues,i)){const{appModel:e,table:t}=this.props,o={tableName:t.name(),row:a.default.clone(i),appName:e.AppTemplate.Name,appId:e.AppTemplate.Id,appVersion:e.AppTemplate.Version,userSettings:e.GetUserSettings(),mechanism:"QuickEdit",viewName:this.props.controlName};if(e.UpdateTableRow(o),this.lastSavedValues=a.default.clone(i),this.initialErrorState=this.rowState.validateSave({viewStackKey:this.viewStackKey,transaction:this.pendingTransaction}).errorState,e.ShouldDelaySync()){const e=!0;R.AppGlobals.StateChangeHandler.ShowUIState(e)}else window.InputHandler.ProcessSync()}this.setState({invalidatesRow:{}})}}editableColumnAllowlist(e){return(e=e||this.props).table.allowsUpdate(e.appModel)?this.isInDesktopEditMode?null:e.quickEditColumns||[]:[]}isEditable(e,t){const i=t||this.rowState;return!!i&&(!!this.props.table.allowsUpdate(this.props.appModel)&&(!(!this.isInDesktopEditMode&&!a.default.includes(this.props.quickEditColumns,e.name()))&&i.isEditable(e,this.viewStackKey)))}refListButtonSelected(e,t){var i;const{appModel:o,table:n}=this.props,a=t.listElementAttribute(),r=a.auxData().ReferencedTableName,s=this.dataContext(),{tableSchema:d}=o.findTableCollection(r);let p,h=t.refListFilterDefaults(s);if(h||(p=t.refListFilter(s)),"new"===e){h=h||c.default.getFilterDefaults(p);const e=u.default.getLookupValues(h);if(I.ReactRootUIConfig.isReactRoot()){const{ReferencingColumnName:o}=null!==(i=t.internalQualifier().Properties)&&void 0!==i?i:{},a=this.tableRow;this.launchRelatedForm(r,null,e,t,o&&n&&a&&this.isInDesktopEditMode?{hasReferenceTo:{refColumnName:o,referencedTableName:n.rootName(),referencedStableId:a.stableId,rowStateColumnNames:this.props.view.paging.rowStateColumnNames}}:void 0)}else this.pushView({viewType:"form",useAnyRefs:!1,newState:{TableName:r,DefaultValues:e}})}else{let{viewType:e,viewControl:t}=(0,l.chooseInlineViewType)({tableSchema:d,tableName:r});"table"===e&&(e="fastTable");const i=this.createInlineStatePath({controlName:t?t.Name:void 0,rowId:this.props.rowId,columnName:null==a?void 0:a.name(),tableName:r,viewType:e}),o={TableName:r,FilterExpr:p,DefaultValues:h};if(I.ReactRootUIConfig.isReactRoot()){const i=Object.assign(Object.assign({},o),{filterExprString:JSON.stringify(null==p?void 0:p.toJSON()),FilterExpr:void 0}),n=this.viewStackKey;if(!n)throw new Error("ViewStackKey not found");const s={parentColumn:null==a?void 0:a.name(),parentRow:this.props.rowId,parentViewStackKey:n},l=t?{Type:"Control",Name:t.Name,InlineInfo:s}:{Type:"View",Action:e,TableName:r,InlineInfo:s};this.pushInlineView((0,H.generateViewStackKey)(l),i)}else this.pushView({viewType:e,useAnyRefs:!1,newState:o,retainSearch:!1,viewControl:null!=t?t:void 0,inlineStatePath:i})}}actionSelected(e){this.runAction(e,"Slideshow Body")}renderRefListButtons(e,t){const i=this.props.appModel,o=e.listElementAttribute().auxData().ReferencedTableName,{table:n}=i.findTableCollection(o),a=[],s=(0,r.default)("SlideshowPage__list-ref-button","DefaultButton",{"SlideshowPage__list-ref-button-desktop-detail":I.ReactRootUIConfig.isInDesktopExperience()});if(!this.props.disableNavigation){if(t){const t=I.ReactRootUIConfig.isInDesktopExperience()?i.MapActionName("Expand"):i.MapActionName("View");a.push((0,X.jsx)(g.default,{className:s,navigationDelay:!0,onTap:this.refListButtonSelected.bind(this,"all",e),ariaLabel:t,children:t},I.ReactRootUIConfig.isInDesktopExperience()?"expand":"view"))}if(n&&n.allowsAdd(i)&&(!I.ReactRootUIConfig.isReactRoot()||this.canLaunchRelatedForm(n.name()))){let t=[];if(t=(0,U.getTableScopeActions)({tableName:n.rootName()}).filter((e=>"ADD_RECORD"===e.type()&&e.prominence()!==m.default.DO_NOT_DISPLAY)),t.length){const o=t[0].displayName(i);a.push((0,X.jsx)(g.default,{className:s,navigationDelay:!0,onTap:this.refListButtonSelected.bind(this,"new",e),ariaLabel:o,children:o},"new"))}}}return a}maxNestedRows(){return null!=this.props.maxNestedRows?this.props.maxNestedRows:this.props.appModel.AppTemplate.Presentation.MaxNestedRows||0}onTopImageSize(e){let{loading:t,error:i,scaledWidth:o,scaledHeight:n}=e;this.setState({topImageWidth:o,topImageHeight:n,topImageLoading:t,topImageError:i})}renderAttributeLine(e){let{attribute:t,allRowActions:i,usedRowActions:o,skippedRowActions:n,pageWidth:s,showHeadings:c,displayMode:u,rowState:p,transactionErrorState:m}=e;var f,b,w,S,x,C;const{appModel:T,table:R,tableSchema:O,rowId:D,quickEditMode:j,disableNavigation:E,classes:A}=this.props,P=this.transaction,M=this.dataContext(),k=t.isListOfRefs(),_=M.rowData[t.name()],B=v.TypeDisplaysApi.lookup(t,_),V=k?t.valueFromWireFormat(_).length:void 0,F=this.maxNestedRows(),H=k&&F>0,U=this.isEditable(t,p),G=u===N.DisplayMode.SideBySide,K=G&&U,q="Show"===t.type(),Q=this.showContent(t,p),$=Q||t.displayNameField(M)||t.description(M);if(I.ReactRootUIConfig.isInDesktopExperience()&&q&&null==$)return{showValuesInline:H,view:null};const Z=(0,r.default)({[A.mobileLine]:!(I.ReactRootUIConfig.isInDesktopExperience()||I.ReactRootUIConfig.isInMobileExperience()&&t.isShowType()),[A.quickEdit]:U}),J=(0,r.default)("SlideshowPage__line",A.line,Z,{"SlideshowPage__line--reflist-inline":k&&H,"SlideshowPage__line--align-right":K,"SlideshowPage__line--edit":U,"SlideshowPage__line--showtype":q,[A.lineSideBySide]:I.ReactRootUIConfig.isInDesktopExperience()&&G,[A.linePageHeader]:I.ReactRootUIConfig.isInDesktopExperience()&&t.isPageHeader(),[A.
1showTypeEntry]:I.ReactRootUIConfig.isReactRoot()&&t.isShowType()});let te=[];"List"!==t.type()&&(te=a.default.difference(i,o).filter((e=>e.showInlineFor(t))).filter((e=>{if("Ref"===t.type()&&"NAVIGATE_APP"===e.type()&&e.isAutoCreated()){if(null==T.findReferencedRow(t,this.dataContext()))return n.push(e),!1}return!0})).slice(0,3));let ie=G?.68*(s-16)-20:s-40;H&&(ie=s);let oe,ne=null;if(c)if(oe=t.displayName(this.dataContext()),I.ReactRootUIConfig.isReactRoot())ne=(0,X.jsx)(z.SlideshowPageSectionHeader,{headingDisplayName:oe,badgeCount:V,isRefList:k,columnName:t.name(),tableRow:this.tableRow});else{const e=I.ReactRootUIConfig.isReactRoot()?"SlideshowPage__heading-label":"SlideshowPage__heading-label-legacy";ne=(0,X.jsx)("div",{className:(0,r.default)("SlideshowPage__heading",{"SlideshowPage__heading-desktop-detail-view":I.ReactRootUIConfig.isReactRoot(),[A.headerMargin]:I.ReactRootUIConfig.isReactRoot()&&!k}),children:(0,X.jsxs)("span",{className:e,children:[(0,X.jsx)("span",{className:(0,r.default)({[A.showTypeHeaderLabelClamp]:I.ReactRootUIConfig.isInDesktopExperience()}),children:oe}),k&&(0,X.jsx)(Y.Badge,{value:String(V)})]})})}let ae=null;const re=m&&!m.isValid(),se=null==m?void 0:m.for(R.name()).get(D),le=se&&(a.default.includes(se.invalid,t.name())||a.default.includes(se.missingRequired,t.name()));if(H||!k)if(U||le||t.isShowType()||k&&this.isInDesktopEditMode){const e=this.dataContext();k||(ne=null);const i=(0,r.default)("SlideshowPage__value",{ShowErrorState:this.showInvalidErrorStateFromProps()||this.showRequiredErrorStateFromProps(),"SlideshowPage__value--legacy-rollout-mode":!1,"SlideshowPage__value-react-detail-view":I.ReactRootUIConfig.isReactRoot()}),o=(0,r.default)("SlideshowPage__value-display",{NoPaddingValueDisplay:I.ReactRootUIConfig.isReactRoot()&&(t.isShowType()||k)});let n,a;null!=P?P.started&&!P.closed&&(n=null!=D&&P.wasModified(R.name(),D,t.name()),a=n&&!j&&re):a=null===(f=this.state.invalidatesRow)||void 0===f?void 0:f[t.name()],ae=(0,X.jsx)("div",{className:i,style:(0,W.convertToRtlWhenNecessary)({overflow:"visible"}),children:(0,X.jsx)("div",{className:o,children:(0,X.jsx)(d.default,ee(ee({},this.props),{},{tableRow:this.tableRow,classes:void 0,yesNoMode:t.isBooleanWithCustomLabel()?void 0:"Switch",ref:this.onEntryMount.bind(this,t),dataContext:e,table:null,tableName:R.name(),row:P?null:this.rowState,tableSchema:O,screenId:D,viewType:"detail",hideLabel:t.isListOfRefs(),shouldShowInvalidErrorState:this.showInvalidErrorStateFromProps(),shouldShowRequiredErrorState:this.showRequiredErrorStateFromProps(),usePlaceholderLabel:!G&&this.usePlaceholderLabel(t),attribute:t,appModel:T,entryId:l.default.makeElementId("Attr_"+t.name()),value:_,modified:n,unsaved:a,editable:U&&!this.isAnotherViewInEditMode,valid:this.isValid(t,p),required:this.isRequired(t,p),hidden:this.isHidden(t,p),validOptions:this.validOptions(t,p),suggestedValues:this.suggestedValues(t,p),displayName:this.displayName(t,p),description:this.description(t,p),showContent:Q,baseImage:this.baseImage(t,p),onEntryValueChange:this.onEntryValueChange,onEntryFocus:this.onEntryFocus,onEntryBlur:this.onEntryBlur,onEntryKeyDown:this.onEntryKeyDown,width:ie,height:null}))})})}else{const e=B.isBlock(t,_);let i;"Phone"===t.type()&&_&&(i=l.default.phoneUrl(_));let n="full";this.displayMode()===N.DisplayMode.Centered&&(n="full-centered");const a=H&&!I.ReactRootUIConfig.isInDesktopExperience()?ie:null;ae=(0,X.jsxs)("div",{className:(0,r.default)("SlideshowPage__value",{"SlideshowPage__value--block":e,"SlideshowPage__value--legacy-rollout-mode":!1,"SlideshowPage__value--white-space":!k,[A.textHeight]:I.ReactRootUIConfig.isReactRoot()}),children:[(0,X.jsx)(g.default,{className:(0,r.default)("SlideshowPage__value-display",{"LongTextType-HTML":t.longTextFormatting()===h.LongTextFormatting.HTML,NoPaddingValueDisplay:I.ReactRootUIConfig.isInDesktopExperience()&&c&&k}),enabled:1===te.length&&!e,href:i,onTap:this.inlineTextSelected.bind(this,te[0]),innerStyle:t.isShowVideo()||"LatLong"===t.type()?{width:"100%"}:void 0,ariaLabel:t.name(),children:(0,X.jsx)(B,{attribute:t,parentId:this.props.parentId,quickEditMode:j,disableNavigation:E,value:_,table:R,appModel:T,dataStamp:T.DataStamp,dataContext:this.dataContext(),imageDisplayType:n,rowId:D,maxNestedRows:F,translucentMode:this.backgroundImageMode(),showListInline:!0,actions:te,alignment:u,viewType:null===(b=this.props.view)||void 0===b?void 0:b.viewType(),width:a,interactiveRowIds:this.props.interactiveRowIds})}),(0,X.jsx)("div",{className:"SlideshowPage__inline-action-container",children:"LatLong"!==t.type()?te.map(((e,n)=>(o.push(e),(0,X.jsx)("div",{className:(0,r.default)("SlideshowPage__inline-action ",{"SlideshowPage__inline-action--first":0===n,[A.inlineAction]:I.ReactRootUIConfig.isReactRoot()}),children:(0,X.jsx)(y.default,{attributeName:t.name(),appModel:T,action:e,disabled:E,rowId:this.rowId(),sourceLocationName:"Slideshow Inline",sourceTable:R,displayMode:"small",href:i,tableSchema:O,rowValues:this.allRowValues()})}
1,n)))):null})]})}else k&&(ae=(0,X.jsx)("div",{className:"SlideshowPage__value ",children:(0,X.jsx)("div",{className:"SlideshowPage__ref-list-buttons-above",children:this.renderRefListButtons(t,V)})}));let de;H&&k&&(de=this.renderRefListButtons(t,V),de.length&&(de=(0,X.jsx)("div",{className:"SlideshowPage__ref-list-buttons-below",children:de})));const ce="".concat(D,"-").concat(t.name());return{showValuesInline:H,sectionLabel:H?oe:void 0,view:(0,X.jsx)(L.EmulatorComponentWrapper,{contentsClassName:U?A.quickEdit:"",margin:H&&k?"-8px 0":"",dataVFEValues:{root:"detail",control:null!==(w=this.props.controlName)&&void 0!==w?w:void 0,table:null!==(S=this.props.table.name())&&void 0!==S?S:void 0,column:null!==(x=t.name())&&void 0!==x?x:void 0,columnType:null!==(C=t.type())&&void 0!==C?C:void 0,context:"DetailField"},children:(0,X.jsxs)("div",{className:J,"data-testonly-column":t.name(),"data-testid":t.name(),children:[ne,ae,de]},ce)},ce)}}columnOrder(){return a.default.uniq(this.props.columnOrder)}allAttributes(){const{appModel:e,tableSchema:t,layout:i,useCardLayout:o}=this.props,n=e.AppTemplate.Presentation.ShowTypesInSlideshow;if(this.columnOrder().length)return t.findAttributesByNames(this.columnOrder(),{includeHidden:n}).filter((e=>!e.isHidden()));{let e;return e=n&&I.ReactRootUIConfig.isInDesktopExperience()?t.visibleAttributes():n?t.visibleAttributesWithoutPageHeaders():t.visibleAttributesWithoutShowTypes(),o&&(e=e.filter((e=>!S.CardLayoutNode.hasBinding(i,e.name())))),a.default.sortBy(e,(e=>e.isLabel()?1:2))}}visibleAttributes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.rowState;return this.allAttributes().filter((t=>{if(this.props.appModel.AppTemplate.Presentation.RespectShowIfEverywhere&&t.showIfEvalTree()){return t.showIfEvalTree().run(this.dataContext())}if(t.isShowType())return!0;const i=this.dataContext().rowData[t.name()];let o;if("Progress"===t.type())o=!1;else if("List"===t.type()){const e=t.listElementAttribute();if(e&&"Ref"===e.type()){const n=t.valueFromWireFormat(i).length,a=e.auxData().ReferencedTableName,{table:r}=this.props.appModel.findTableCollection(a),s=r&&r.allowsAdd(this.props.appModel);o=0===n&&!s}else o=!1}else o=!this.isEditable(t,e)&&!h.default.valueExists(i,t.type());return!o}))}imageDisplayType(){return this.props.imageDisplayType||this.props.appModel.AppTemplate.Presentation.SlideshowImageStyle}backgroundImageMode(){return"Background"===this.imageDisplayType()&&!!this.primaryImageAttribute()}primaryImageAttribute(){return de({mainSlideshowImageColumn:this.props.mainSlideshowImageColumn,tableSchema:this.props.tableSchema})}legacyTotalHeaderItemsHeight(){return this.state.headerSizing?this.state.headerSizing.reduce(((e,t)=>e+t.height),0):0}headHeight(e,t,i,o){let n=0;if(e)if(this.backgroundImageMode()){const e=I.ReactRootUIConfig.isInDesktopExperience()?.5:.6666;n=o.length?this.props.height*e:20}else if(t){let t;t="Thumbnail"===e.type()?100:i?400:320,n="Fit"===this.imageDisplayType()&&this.state.topImageHeight?Math.min(t,this.state.topImageHeight):t}const a=this.legacyTotalHeaderItemsHeight();return n=Math.max(n,a),n}getImageHeight(e,t,i){if(!e||!t)return null;let o;return o="Thumbnail"===e.type()?100:i?400:320,"Fit"===this.imageDisplayType()&&this.state.topImageHeight?Math.min(o,this.state.topImageHeight):o}getContentColumnsLegacy(e){let{outsideHeadView:t,bodyActionsView:i,headView:o,attributesToDisplay:n,usedRowActions:a,skippedRowActions:r,pageWidth:s,showHeadings:l,displayMode:d,rowState:c}=e;var u;const p=this.rowActions();let h={lines:[],inlineMode:!1};const m={flex:!1,sections:[h]};!t&&o&&(this.props.useCardLayout?(m.sections.pop(),m.sections.push(o),m.sections.push(h)):h.lines.push(o)),i&&h.lines.push(i);const f=null===(u=this.transaction)||void 0===u?void 0:u.validate([this.tableRow]);return n.forEach((e=>{const{view:t,showValuesInline:i,sectionLabel:o}=this.renderAttributeLine({attribute:e,allRowActions:p,usedRowActions:a,skippedRowActions:r,pageWidth:s,showHeadings:l,displayMode:d,rowState:c,transactionErrorState:f});(!h||i||h.inlineMode)&&(h={lines:[],inlineMode:i,sectionLabel:i?o:void 0},m.sections.push(h)),t&&h.lines.push(t)})),[m]}getContentColumns(e){let{headView:t,canRenderMultiColumns:i,attributesToDisplay:o,usedRowActions:n,skippedRowActions:a,pageWidth:r,showHeadings:s,displayMode:l,rowState:d,maxColumnCount:c,headerColumnEnabled:u}=e;const p=this.transaction;let h=0,m=le();const f=[{flex:!1,sections:[]}],g=this.rowActions();!u&&t&&f[0].sections.unshift(t);const y=null==p?void 0:p.validate([this.tableRow]);return o.forEach((e=>{const{view:t,showValuesInline:o,sectionLabel:u}=this.renderAttributeLine({attribute:e,allRowActions:g,usedRowActions:n,skippedRowActions:a,pageWidth:r,showHeadings:s,displayMode:l,rowState:d,transactionErrorState:y});(e.isPageHeader()||o||m.inlineMode)&&ie(m)&&(f[h].sections.push(m),m=le(o,u),i&&(h=(h+1)%c,f[h]||
1(f[h]={flex:!1,sections:[]}))),t&&m.lines.push(t)})),ie(m)&&f[h].sections.push(m),f}renderCardHeadHeaderInEditMode(e){let{pageWidth:t,showHeadings:i,displayMode:o,rowState:n}=e;var a;const{tableSchema:r,layout:s}=this.props,l=S.CardLayoutNode.findNodes(s,(e=>"binding"===e.type&&!!e.value)).map((e=>e.value)).map((e=>r.findAttributeByName(e))).filter((e=>e)),d=null===(a=this.transaction)||void 0===a?void 0:a.validate([this.tableRow]);return(0,X.jsx)(X.Fragment,{children:l.map((e=>this.renderAttributeLine({attribute:e,allRowActions:[],usedRowActions:[],skippedRowActions:[],pageWidth:t,showHeadings:i,displayMode:o,rowState:n,transactionErrorState:d}).view))})}renderCardHeader(e){let{pageWidth:t,showHeadings:i,displayMode:o,rowState:n}=e;const{table:a,rowId:r,layout:s}=this.props;return this.isInDesktopEditMode?this.renderCardHeadHeaderInEditMode({pageWidth:t,showHeadings:i,displayMode:o,rowState:n}):(0,X.jsx)(w.ReactCardLayoutNode,{node:s,table:a.name(),rowId:r,dataContext:this.dataContext()})}renderHeadInEditMode(e){let{pageWidth:t,showHeadings:i,displayMode:o,rowState:n,primaryImageAttribute:a,isBackgroundImageMode:r}=e;var s;const l=this.headerItemAttributes(),d=a&&!r?[a,...l]:l,c=null===(s=this.transaction)||void 0===s?void 0:s.validate([this.tableRow]);return 0===d.length?null:(0,X.jsx)(X.Fragment,{children:d.map((e=>this.renderAttributeLine({attribute:e,allRowActions:[],usedRowActions:[],skippedRowActions:[],pageWidth:t,showHeadings:i,displayMode:o,rowState:n,transactionErrorState:c}).view))})}renderHead(e){let{isBackgroundImageMode:t,primaryImageAttribute:i,headerAttributes:o,primaryImageUrl:n,wideMode:a,pageWidth:r,showHeadings:s,displayMode:l,rowState:d,bodyActionsView:c}=e;if(this.props.useCardLayout)return this.renderCardHeader({pageWidth:r,showHeadings:s,displayMode:l,rowState:d});if(this.isInDesktopEditMode)return this.renderHeadInEditMode({pageWidth:r,showHeadings:s,displayMode:l,rowState:d,primaryImageAttribute:i,isBackgroundImageMode:t});const u=this.headHeight(i,n,a,o);if(I.ReactRootUIConfig.isReactRoot()){return(i?this.dataContext().rowData[i.name()]:null)||0!==this.headerItemAttributes().length||c?(0,X.jsx)(k.NonCardHeader,{isBackgroundImageMode:t,headerItemAttributes:this.headerItemAttributes(),primaryImageAttribute:i,imageHeaderHeight:u,dataContext:this.dataContext(),imageDisplayType:this.imageDisplayType(),table:this.props.table,rowId:this.props.rowId,showContentFn:this.showContent,rowState:this.rowState,bodyActionsView:c,onImageSize:this.onTopImageSize.bind(this)}):null}return this.renderHeadLegacy({isBackgroundImageMode:t,primaryImageAttribute:i,primaryImageUrl:n,pageWidth:r,headerHeight:u})}renderHeadLegacy(e){let{isBackgroundImageMode:t,primaryImageAttribute:i,primaryImageUrl:o,pageWidth:n,headerHeight:a}=e;const{appModel:s,table:l,rowId:d}=this.props;let c=null;if(i&&!t){const e=this.dataContext().rowData[i.name()],t=v.TypeDisplaysApi.lookup(i,e);if(e){let o;o="Thumbnail"===i.type()||"Fit"===this.imageDisplayType()?"full-centered":"square",c=(0,X.jsx)("div",{className:"SlideshowPage__header-image",children:(0,X.jsx)(t,{attribute:i,value:e,table:l,appModel:s,dataContext:this.dataContext(),imageDisplayType:o,zeroImageLoadDelay:!0,width:n,height:a,rowId:d,onImageSize:this.onTopImageSize.bind(this)})})}}let u="Fit"===this.imageDisplayType()&&i&&o&&this.state.topImageLoading;this.state.topImageError&&(u=!1);const p=this.renderHeaderItemsLegacy(a,!0),h=this.renderHeaderItemsLegacy(a,!1),m=c&&!this.state.topImageError||!u&&p.length>0;return(0,X.jsxs)("div",{className:(0,r.default)("SlideshowPage__header",{hasHeaderImage:!!c&&!this.state.topImageError}),style:(0,W.convertToRtlWhenNecessary)({height:a}),ref:e=>this.headerItems=e,"data-testid":C.SlideshowPageDataTestIds.Header,role:"heading","aria-level":3,"aria-hidden":!m,children:[c,u?null:p,(0,X.jsx)("div",{className:"SlideshowPage__header-measurer",children:h})]},"head")}headerItemAttributes(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{headerColumns:t,tableSchema:i}=this.props;if(!t||!t.length)return[];const o=[];if(t.forEach((e=>{const t=i.findAttributeByName(e);t?o.push(t):f.default.warnToDevConsole("Unknown header attribute",e)}
1)),e&&!o.length){const e=i.labelBasicAttribute();e&&o.push(e)}return o}renderHeaderItemsLegacy(e,t){let i=[];const o=this.state.headerSizing;if(t&&!o)return[];const n=this.legacyTotalHeaderItemsHeight(),a=(Math.max(320,Math.min(re,this.props.width))-320)/(re-320);return i=this.headerItemAttributes().map(((i,r)=>{const s=0===r,l=this.dataContext().rowData[i.name()],d=v.TypeDisplaysApi.lookup(i,l);let c;if(0===r){const e=2.2;c=a*(5-e)+e}else{const e=1.8;c=a*(2.5-e)+e}const u=o&&o[r];let p=1;u&&(p=u.scaleDownFactor);let h=0;t&&u&&s&&(h=e/2-n/2);const m={marginTop:h,fontWeight:c<3?"bold":"normal",fontSize:(t&&p?c*p:c)-.16+"em",height:t&&u?u.height:"auto"};return(0,X.jsx)("div",{className:"SlideshowPage__header-item",style:(0,W.convertToRtlWhenNecessary)(m),"data-testonly-column":i.name(),children:(0,X.jsx)(d,{attribute:i,value:l,table:this.props.table,appModel:this.props.appModel,dataContext:this.dataContext(),displayMode:"inline",rowId:this.props.rowId,showContent:this.showContent(i),interactiveRowIds:this.props.interactiveRowIds})},"header-item-".concat(i.name(),"-").concat(r))})),i}hashStateForHeaderSizing(){return[this.props.rowId,this.props.headerColumns,this.props.width,this.props.height,this.state.topImageLoading,this.state.topImageError]}legacyUpdateHeaderSizing(){if(this.headerItems){if(a.default.isEqual(this.state.headerSizingCacheKey,this.hashStateForHeaderSizing()))return;const e=10,t=$(this.headerItems).width();let i;i=this.state.topImageWidth?Math.min(t,this.state.topImageWidth-2*e):t;const o=$(this.headerItems).find(".SlideshowPage__header-measurer .SlideshowPage__header-item").map(((e,t)=>{const o=$(t).outerHeight(),n=$(t).children().first().outerWidth();let a=Math.min(i/n,1)||0,r=a*o;return a<.4&&(a=.4),a<=.6&&(a+=.3,r=a*o*2),{scaleDownFactor:a,height:r}})).get();this.state.headerSizing&&a.default.isEqual(this.state.headerSizing,o)||this.setState({headerSizing:o,headerSizingCacheKey:this.hashStateForHeaderSizing()})}}runAction(e,t){(0,j.runAppAction)(e,{appModel:this.props.appModel,rowId:this.rowId(),sourceLocationName:t,sourceTable:this.props.table},void 0,this.viewStackKey)}invokeActionAndSetState(){const{lastActionInvoked:e}=this.state,{invokeAction:t}=this.props;if(!t)return;if(e===t)return;const i=this.rowActions().find((e=>e.name()===t));i&&(this.runAction(i,"Slideshow Direct"),this.setState({lastActionInvoked:t,actionToInvoke:null}))}componentDidUpdate(){this.invokeActionAndSetState(),this.legacyUpdateHeaderSizing()}componentDidMount(){this.legacyUpdateHeaderSizing()}displayMode(){const e=this.props.appModel.AppTemplate.Presentation.SlideshowDisplayMode,t=this.props.slideshowDisplayMode;return t&&t!==N.DisplayMode.Automatic?t:e}rowActions(){const e=this.props.appModel.appTemplate.actions();if(this.props.disableAllActions)return[];const t=this.allRowValues(),i=this.props.table.name();return e.actionsForRow(t,i,this.props.appModel,this.dataContext())||[]}getActionsForAttributes(e){return this.rowActions().filter((t=>void 0!==e.find((e=>e.name()===t.columnAttachment()))))}get isAnotherViewInEditMode(){if(!I.ReactRootUIConfig.isInDesktopExperience())return!1;const e=(0,P.getViewInEditMode)((0,A.default)().getState());return!this.isInDesktopEditMode&&e}get isInDesktopEditMode(){var e;return(0,_.isInDesktopEditMode)(Boolean(this.props.isInline),Boolean(this.mutableViewState.isInEditMode))&&"detail"===(null===(e=this.currentUIState)||void 0===e?void 0:e.Root)}saveAndCloseEditMode(){var e,t;const{errorState:i}=null!==(t=null===(e=this.rowState)||void 0===e?void 0:e.validateSave({usedTransactions:!0,transaction:this.transaction,viewStackKey:this.viewStackKey}))&&void 0!==t?t:{};i&&i.error?this.scrollToValidationError(i):(0,A.default)().dispatch((0,E.saveAndCloseEditMode)(this.viewStackKey))}cancelEditMode(){(0,A.default)().dispatch((0,E.cancelEditMode)(this.viewStackKey))}scrollToValidationError(e){const{scrollContainer:t}=this.props,{formEntries:i}=this;if(t&&i){const o=a.default.union(e.invalid,e.missingRequired),n=a.default.compact(o.map((e=>{var t,o,n;return null===(n=null===(o=null===(t=i[e])||void 0===t?void 0:t.$domNode)||void 0===o?void 0:o.offsetParent)||void 0===n?void 0:n.offsetTop})));n.length&&(t.scrollTop=Math.min(...n))}}render(){const{appModel:e,width:t,table:i,onScrollContainerMount:o,useCardLayout:n,isPrimaryPage:d,isSingleRow:c,allowNavigation:u,onPrev:p,onNext:h,classes:f}=this.props,g=this.displayMode(),y=g!==N.DisplayMode.NoHeadings,v=e.AppTemplate.Presentation.RespectShowIfEverywhere,b=this.backgroundImageMode(),w=this.mainWidth(),S=Number(t)>re,x=(S?ne:w)-(b?20:0),j=(w-x)/2,E=this.dataContext(),A=this.rowState;let P=this.primaryImageAttribute(),M=!0;
1v&&(null==P?void 0:P.showIfEvalTree())&&(M=P.showIfEvalTree().run(this.dataContext())),M||(P=null);let k=null;if(P){const t=E.rowData[P.name()];t&&(k=(0,B.flexImageUrl)(e.ResolveFile(t,i.rootName())))}const _=this.rowActions(),L=this.bodyRowActions(),V=[],F=this.getBodyActionsView({useCardLayout:n,actions:L}),H=this.headerItemAttributes(),U=P?[P]:[],z=this.visibleAttributes(A),K=[...U,...H],Y=a.default.difference(z,K),q=n?[]:L,Q=this.renderHead({isBackgroundImageMode:b,primaryImageAttribute:P,headerAttributes:H,primaryImageUrl:k,wideMode:S,pageWidth:x,showHeadings:y,displayMode:g,rowState:A,bodyActionsView:F}),$=b&&!n&&!I.ReactRootUIConfig.isReactRoot(),Z=$?(0,X.jsx)(X.Fragment,{children:Q}):null;let J=a.default.difference(_,q).filter((e=>e.prominence()!==m.default.DISPLAY_INLINE&&(!a.default.includes(V,e)&&(!(e.columnAttachment()&&e.isAutoCreated()&&!a.default.includes(z.map((e=>e.name())),e.columnAttachment()))&&e.prominence()!==m.default.DO_NOT_DISPLAY)))),ee=null;if(I.ReactRootUIConfig.isReactRoot()&&d&&this.props.actionButtonContainer)if(this.isInDesktopEditMode)ee=(0,X.jsx)(s.Portal,{container:this.props.actionButtonContainer,children:(0,X.jsxs)(O.NavBarButtons,{childrenOnly:!0,children:[(0,X.jsx)(G.UpperCamelCaseButton,{"aria-label":(0,N.mapActionName)("Cancel"),variant:"outlined",onClick:()=>this.cancelEditMode(),children:(0,N.mapActionName)("Cancel")}),(0,X.jsx)(G.UpperCamelCaseButton,{"aria-label":(0,N.mapActionName)("Save"),variant:"contained",onClick:()=>{this.saveAndCloseEditMode()},children:(0,N.mapActionName)("Save")})]})});else{J=J.filter((e=>e.prominence()!==m.default.DISPLAY_OVERLAY));const e=[];!c&&u&&I.ReactRootUIConfig.isInDesktopExperience()&&e.push((0,X.jsx)(D.NavBarIconButton,{onClick:p,disabled:!p,"aria-label":(0,N.mapActionName)("Prev"),children:(0,X.jsx)("i",{className:"fa fa-chevron-left"})},"prev"),(0,X.jsx)(D.NavBarIconButton,{onClick:h,disabled:!h,"aria-label":(0,N.mapActionName)("Next"),children:(0,X.jsx)("i",{className:"fa fa-chevron-right"})},"next")),ee=(0,X.jsx)(s.Portal,{container:this.props.actionButtonContainer,children:(0,X.jsx)(O.NavBarButtons,{rowIds:[this.rowId()],extraActionsToShow:J,usedActions:[...q,...this.props.fabActions||[]],tableName:i.name(),children:e})})}else a.default.get(window,"AppState.CurrentUIState.SlideshowUIState")&&R.AppGlobals.AppState.CurrentUIState.ControlName===this.props.controlName&&R.AppGlobals.ViewManager.appHeader.setState({row:E.rowData,tableSchema:this.props.tableSchema,normalActionButtons:J});const se=P?this.dataContext().rowData[P.name()]:null,le=(0,r.default)("SlideshowPage",{"SlideshowPage--sidebyside-mode":g===N.DisplayMode.SideBySide,"SlideshowPage--align-center":g===N.DisplayMode.Centered,"SlideshowPage--show-headings":y,"SlideshowPage--hide-headings":!y,"SlideshowPage--billboard-image-mode":se&&!b,"SlideshowPage--background-image-mode":!!b,"SlideshowPage--missing-primary-image":!k,"SlideshowPage--fixed-height-mode":this.props.fixedHeightMode}),de={height:this.props.height};b&&k&&!this.props.useCardLayout&&(de.backgroundImage="url('"+k+"')");const ce=I.ReactRootUIConfig.isInDesktopExperience()&&S,ue=!!this.props.useDesktopMultiColumn&&ce,pe=n||null!=Q||null!=F,he=ue&&Number(t)>840&&pe&&Y.length>0,me=ue?function(e,t){const i=t?2:3,o=e-32-(t?T.HEADER_COLUMN_WIDTH+16:0);return Math.max(1,Math.min(Math.floor(o/440),i))}(w,he):1,fe=I.ReactRootUIConfig.isReactRoot()?this.getContentColumns({shouldRenderOutsideHeadView:$,bodyActionsView:F,headView:Q,attributesToDisplay:Y,usedRowActions:q,skippedRowActions:V,canRenderMultiColumns:ue,pageWidth:x,showHeadings:y,displayMode:g,rowState:A,maxColumnCount:me,headerColumnEnabled:he}):this.getContentColumnsLegacy({outsideHeadView:Z,bodyActionsView:F,headView:Q,attributesToDisplay:Y,usedRowActions:q,skippedRowActions:V,pageWidth:x,showHeadings:y,displayMode:g,rowState:A}),ge=ce?(0,X.jsxs)(X.Fragment,{children:[Z,(0,X.jsxs)("div",{className:f.columnsContainer,children:[(0,X.jsx)(T.HeaderColumn,{headerColumnEnabled:he,headView:Q}),fe.filter(oe).map(((e,t)=>(0,X.jsx)("div",{className:f.column,"data-testid":C.SlideshowPageDataTestIds.Column,children:e.sections.filter(ie).map(((e,i)=>{const o=0===t&&0===i;return(0,X.jsx)(s.Card,{variant:"outlined",className:(0,r.default)(f.card,{[f.inlineCard]:!te(e)&&e.inlineMode,[f.headerCard]:o&&pe&&!he}),"data-testid":C.SlideshowPageDataTestIds.Card,children:te(e)?e:e.lines},"card-section-".concat(i))}))},"column-".concat(t))))]})]}):(0,X.jsxs)(X.Fragment,{children:[Z,fe[0].sections.filter(ie).map(((e,t)=>{const i=0===t&&I.ReactRootUIConfig.isReactRoot()&&pe&&!he,o=te(e)?void 0:e.sectionLabel;return(0,X.jsx)("section",{className:(0,r.default)("SlideshowPage__section",{[f.headerCard]:i,[f.regularCard]:!i,[f.reactCardBorder]:I.ReactRootUIConfig.isReactRoot()&&(!i||F)}),"data-testid":C.SlideshowPageDataTestIds.Section,"aria-label":o,role:o&&"region",children:te(e)?e:e.lines},"section-".concat(t))}))]});let ye;if(ce){const e=he?T.HEADER_COLUMN_WIDTH:0,t=16*(fe.length-1),i=Math.min(w,fe.length*ae+t+e);ye=(0,X.jsx)("div",{className:"DesktopModeContainer",style:(0,W.convertToRtlWhenNecessary)({maxWidth:i}),children:ge})}else ye=(0,X.jsx)("div",{className:"WideModeContainer",children:ge});const ve=window.UI_AUTOMATION_TEST_CONTEXT?l.default.removeNewlines(this.props.rowId||""):void 0;return(0,X.jsxs)("div",{className:le,style:(0,W.convertToRtlWhenNecessary)(de),"data-testonly-row-id":ve,"data-testid":C.SlideshowPageDataTestIds.Container,children:[ee,(0,X.jsx)("div",{id:"scroller",className:"SlideshowPage__scroller",ref:o,children:(0,X.jsx)("div",{className:"SlideshowPage__main",style:(0,W.convertToRtlWhenNecessary)(ce?void 0:{height:this.props.height,paddingLeft:j,paddingRight:j,width:w}),"data-testid":C.SlideshowPageDataTestIds.Main,children:ye})})]})}mainWidth(){const{width:e,height:t}=this.props;let i;if(t){i=e-(this.props.scrollbarWidth?this.props.scrollbarWidth():0)}else i=e;return i}autoDeleteRowActions(){return this.rowActions().filter((e=>e.isAutoCreated()&&"DELETE_RECORD"===e.type()))}bodyRowActions(){const e=this.autoDeleteRowActions();return this.rowActions().filter((t=>{const i="DELETE_RECORD"===t.type(),o=t.isAutoCreated();return t.prominence()===m.default.DISPLAY_PROMINENTLY&&!(i&&o||i&&!e.length&&!this.props.isInline)}))}}t.SlideshowPage=(0,s.withStyles)(se)(ce)},216437:(e,t)=>{"use strict";var i;
1Object.defineProperty(t,"__esModule",{value:!0}),t.SlideshowPageDataTestIds=void 0,function(e){e.Card="slideshow-page-card",e.Column="slideshow-page-column",e.Columns="slideshow-page-columns",e.Container="slideshow-page-container",e.Header="slideshow-page-header",e.HeaderColumn="slideshow-page-header-column",e.Main="slideshow-page-main",e.OutsideHeadView="outside-head-view",e.Section="slideshow-page-section"}(i||(t.SlideshowPageDataTestIds=i={}))},515801:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeaderColumn=t.HEADER_COLUMN_WIDTH=void 0;var o=i(249492),n=i(695386),a=i(216437),r=i(148521);const s=t.HEADER_COLUMN_WIDTH=400,l=(0,n.makeStyles)((e=>({headerColumn:{width:"".concat(s,"px"),minWidth:"".concat(s,"px"),marginRight:e.spacing(2)},headerCard:{position:"fixed",width:"".concat(s,"px"),maxHeight:"100%",overflowY:"auto"}})));t.HeaderColumn=e=>{let{headerColumnEnabled:t,headView:i}=e;const n=l();return t?(0,r.jsx)("div",{className:n.headerColumn,"data-testid":a.SlideshowPageDataTestIds.HeaderColumn,children:(0,r.jsx)(o.Card,{variant:"outlined",classes:{root:n.headerCard},"data-testid":a.SlideshowPageDataTestIds.Card,children:i},"header-column-card-section")}):null}},779281:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.SlideshowPageSectionHeader=function(e){let{headingDisplayName:t,badgeCount:i,isRefList:o,columnName:h,tableRow:g}=e;const y=f(),v=e=>{const o=e?u.default.styleClassesForText(e):"",a=e?u.default.cssStylesForText(e):{};return(0,m.jsxs)("span",{className:c.ReactRootUIConfig.isReactRoot()?"SlideshowPage__heading-label":"SlideshowPage__heading-label-legacy",children:[e&&(0,m.jsx)(s.FormattingRulesIcons,{formattingSettings:e}),(0,m.jsx)("span",{style:(0,d.convertToRtlWhenNecessary)(a),className:(0,n.default)("SlideshowPage__heading-label-text",o,{[y.showTypeHeaderLabelClamp]:c.ReactRootUIConfig.isInDesktopExperience()}),children:t}),null!=i&&(0,m.jsx)(r.Badge,{value:String(i)})]})};return(0,m.jsx)("div",{className:(0,n.default)("SlideshowPage__heading",{[y.headerMargin]:c.ReactRootUIConfig.isReactRoot()&&!o,"SlideshowPage__heading-desktop-detail-view":c.ReactRootUIConfig.isReactRoot()}),children:o&&g?(0,m.jsx)(l.Suspense,{fallback:null,children:(0,m.jsx)(a.QueryRollout,{query:(0,p.queryTableRowColumnFormatting)(g,h),children:v})}):v(void 0)})};var n=o(i(386010)),a=i(157479),r=i(563479),s=i(760629),l=i(667294),d=i(278965),c=i(557310),u=o(i(173861)),p=i(511448),h=i(229752),m=i(148521);const f=(0,h.makeStyles)((()=>({showTypeHeaderLabelClamp:{overflow:"hidden",display:"-webkit-box","-webkit-line-clamp":2,"-webkit-box-orient":"vertical"},headerMargin:{marginBottom:2}})))},814394:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SlideshowPage",{enumerable:!0,get:function(){return n.SlideshowPage}}),Object.defineProperty(t,"SlideshowPageDataTestIds",{enumerable:!0,get:function(){return o.SlideshowPageDataTestIds}}),Object.defineProperty(t,"getPrimaryImageAttribute",{enumerable:!0,get:function(){return n.getPrimaryImageAttribute}});var o=i(216437),n=i(680462)},367418:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TableRowDataTestIds=void 0;var n,a=o(i(238416)),r=o(i(386010)),s=o(i(496486)),l=i(667294),d=o(i(112963)),c=i(557310),u=o(i(578914)),p=o(i(17926)),h=i(714611),m=i(278965),f=o(i(571524)),g=i(843391),y=i(19461),v=i(271114),b=i(666331),w=i(363678),S=i(157479),x=i(93089),C=i(148521);function T(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function I(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?T(Object(i),!0).forEach((function(t){(0,a.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):T(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}!function(e){e.Row="table-view-row"}(n||(t.TableRowDataTestIds=n={}));class R extends u.default{constructor(){super(...arguments),this.handleSelect=e=>{this.props.onRowTap&&this.props.onRowTap(this.rowId(),e,this.rowValues())},this.renderCell=(e,t)=>
1{const{isFreezingEnabled:i=()=>!1,layout:o,table:n,disableNavigation:a,quickEditMode:s}=this.props,d=this.dataContext(),c=s&&!this.drilldownMode(),u=!!(0,h.isAttributeColumnLayout)(e)&&i(t,e.attribute,o),{finalWidth:p}=e,m=(0,h.rowHeight)()-1,T=(0,r.default)("TableViewRow__column",{"TableViewRow__column--frozen":u,"TableViewRow__cell--frozen":u,"TableViewRow__column--frozen-shadow":u&&!f.default.IsIOSBrowser()}),R=(0,C.jsx)(w.PlaceholderCell,{width:p,height:m,isFrozen:u},t);if((0,h.isSpecialColumnLayout)(e))return(0,C.jsx)(g.ArrowCell,{width:p,columnPadding:h.columnPadding},t);if((0,h.isActionColumnLayout)(e)){const{action:i,attribute:o}=e,r=Boolean(c||a);return(0,C.jsx)(y.ActionCell,{table:n,action:i,attribute:o,dataContext:d,columnPadding:h.columnPadding,disableActions:r,isFrozen:u,width:p,height:m,classes:T},t)}if((0,h.isValueColumnLayout)(e)){const{attribute:i,isCompact:o}=e,a={attribute:i,isFrozen:u,width:p,height:m,isCompact:o,columnPadding:h.columnPadding,classes:T,table:n,dataContext:d};return c&&i.supportsEditsInTableView()&&!this.isHidden(i)?(0,C.jsx)(l.Suspense,{fallback:R,children:(0,C.jsx)(S.QueryRollout,{query:(0,x.queryDynamicFormEntryProps)({attribute:i,rowState:this.rowState,viewStackKey:this.viewStackKey,transaction:this.pendingTransaction}),children:e=>(0,C.jsx)(b.FormEntryCell,I(I({},a),{},{tableRowPassthroughProps:this.props,formEntryRef:this.onEntryMount.bind(this,i),dynamicFormEntryProps:e,formEntryHandlers:{onEntryValueChange:this.onEntryValueChange,onEntryFocus:this.onEntryFocus,onEntryBlur:this.onEntryBlur,onEntryKeyDown:this.onEntryKeyDown}}),t)})},t):(0,C.jsx)(l.Suspense,{fallback:R,children:(0,C.jsx)(S.QueryOrPassthroughRollout,{query:this.shouldShowQuery(i),children:e=>e?(0,C.jsx)(v.TypeDisplayCell,I({},a)):R})},t)}return R}}get updateMechanism(){return"table"}dataContext(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;const t=super.dataContext(e);return t.rowData!==e.rowValues&&t.replaceRowData(e.rowValues),t}supportsEdits(e){return e=e||this.props,Boolean(e.quickEditMode)}onEntryKeyDown(e,t){const i=t.target.tagName.toLowerCase(),{focusRowByRowIndex:o,rowIndex:n}=this.props;if("input"===i||"a"===i){if("Enter"===t.key){const i=t.shiftKey?n-1:n+1;o?o(i,e):document.activeElement.blur()}const i="ArrowUp"===t.key?-1:0,a="ArrowDown"===t.key?1:0;if((i||a)&&("number"===t.target.type&&t.preventDefault(),!s.default.includes(["datetime-local","time"],t.target.type))){o&&o(n+(i||a),e)}}}drilldownMode(){return this.props.groupBy&&this.props.groupBy.length>1}render(){var e;const{layout:t}=this.props,i=t.map(this.renderCell),o=this.props.selectionMode?(0,C.jsx)("div",{className:"TableViewRow__selection-indicator",children:(0,C.jsx)("i",{className:"fa fa-check TableViewRow__selection-indicator-icon"})}):null,a=c.ReactRootUIConfig.isInDesktopExperience(),s=(0,r.default)("TableViewRow",{"TableViewRow--translucent-mode":this.props.translucentMode,"TableViewRow--selection-mode":this.props.selectionMode,"TableViewRow--edit-mode":this.props.quickEditMode,"TableViewRow--hover-update":a,"TableViewRow--highlighted":this.props.highlighted&&!a,"TableViewRow--highlighted-update":this.props.highlighted&&a,"TableViewRow--no-selection-mode":!this.props.selectionMode,"TableViewRow--selected":this.props.isSelected,"TableViewRow--last-toggled":this.props.isLastToggled});if(this.props.drilldownColumn){const e=this.props.tableSchema.findAttributeByName(this.props.drilldownColumn);if(e)return(0,C.jsx)(p.default,I(I({},this.props),{},{rows:[this.props.rowValues],disableNavigation:this.props.disableNavigation,attribute:e,tableSchema:this.props.tableSchema,groupAggregate:this.props.groupAggregate,selectionMode:this.props.selectionMode,index:this.props.index,onTap:this.handleSelect,viewType:"table"}))}return this.props.quickEditMode?(0,C.jsxs)("div",{className:s,style:(0,m.convertToRtlWhenNecessary)({height:(0,h.rowHeight)(),display:"block"}),"data-testonly-row-index":this.props.index,"data-testid":n.Row,id:"Table"+this.rowCssSelector(),children:[i,o]}):(0,C.jsxs)(d.default,{spanMode:!0,navigationDelay:!this.props.selectionMode,enabled:!(this.props.quickEditMode||this.props.disableNavigation),onTap:this.handleSelect,onLongPress:null===(e=this.props.onRowLongPress)||void 0===e?void 0:e.b
1ind(null,this.rowId()),className:s,innerStyle:{height:(0,h.rowHeight)(),display:"block"},"data-testonly-row-index":this.props.index,"data-testid":n.Row,id:"Table"+this.rowCssSelector(),children:[i,o]})}}t.default=R},19461:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.ActionCell=void 0;var n=o(i(106375)),a=i(278965),r=i(363678),s=i(166089),l=i(148521);t.ActionCell=e=>{let{table:t,action:i,dataContext:o,isFrozen:d,width:c,height:u,classes:p,disableActions:h,sourceLocationName:m="Table Row"}=e;const f=s.AppGlobals.AppModel;return i.isValidForRow(o.rowData,o)?(0,l.jsx)("div",{className:p,style:(0,a.convertToRtlWhenNecessary)({width:c,height:u}),children:(0,l.jsx)(n.default,{appModel:f,action:i,rowId:o.rowId,sourceLocationName:m,sourceTable:t,displayMode:"small",disabled:h,rowValues:o.rowData})}):(0,l.jsx)(r.PlaceholderCell,{width:c,height:u,isFrozen:d})}},843391:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowCell=void 0;var o=i(278965),n=i(562858),a=i(148521);t.ArrowCell=e=>{let{width:t,columnPadding:i}=e;return t>0?(0,a.jsx)("div",{className:"TableViewRow__drill-arrow",style:(0,o.convertToRtlWhenNecessary)({width:t,paddingLeft:i/2,paddingRight:i/2}),children:(0,a.jsx)(n.DirectionAwareIcon,{icon:(0,a.jsx)("i",{className:"fa fa-angle-right"})})},"drill-arrow"):null}},666331:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.FormEntryCell=void 0;var n=o(i(238416)),a=o(i(667294)),r=o(i(92329)),s=o(i(365914)),l=i(278965),d=i(166089),c=i(148521);function u(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function p(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?u(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):u(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}t.FormEntryCell=a.default.memo((e=>{var t;const{dataContext:i,attribute:o,table:n,width:a,height:u,isCompact:h,columnPadding:m,classes:f,formEntryRef:g,tableRowPassthroughProps:y,dynamicFormEntryProps:v,formEntryHandlers:b}=e,w=d.AppGlobals.AppModel,S=i.rowData[o.name()],x=n.name(),C=i.rowId,T=null===(t=null==w?void 0:w.dataManager)||void 0===t?void 0:t.currentTransaction,I=null==T?void 0:T.wasModified(x,C,o.name()),R=h||o.isImageType()?m/2:0,O=m-R;return(0,c.jsx)("div",{className:f,style:(0,l.convertToRtlWhenNecessary)({width:a,height:u}),children:(0,c.jsx)(r.default,p(p(p({},y),{},{yesNoMode:"Checkbox",viewMode:"compact",viewType:"table",hideLabel:!0,modified:I,screenId:C,shouldShowInvalidErrorState:!0,shouldShowRequiredErrorState:!0,dataContext:i,table:null,tableName:x,attribute:o,appModel:w,entryId:s.default.makeElementId("Attr_"+o.name()),value:S,width:a,height:u,paddingLeft:O,paddingRight:R,ref:g},v),b))})}))},363678:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.PlaceholderCell=void 0;var n=o(i(386010)),a=o(i(571524)),r=i(278965),s=i(148521);t.PlaceholderCell=e=>{let{isFrozen:t,width:i,height:o}=e;const l=(0,n.default)("TableViewRow__column-placeholder",{"TableViewRow__column--frozen":t,"TableViewRow__column--frozen-shadow":t&&!a.default.IsIOSBrowser()});return(0,s.jsx)("div",{className:l,style:(0,r.convertToRtlWhenNecessary)({width:i,height:o})})}},271114:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDisplayCell=void 0;var o=i(278965),n=i(803583),a=i(166089),r=i(148521);t.TypeDisplayCell=e=>{let{dataContext:t,attribute:i,table:s,width:l,height:d,isCompact:c,columnPadding:u,classes:p}=e;const h=a.AppGlobals.AppModel,m=c||i.isImageType()?u/2:i.shouldRightAlign()?u:0,f=u-m,g=n.TypeDisplaysApi.lookup(i);return(0,r.jsx)("div",{className:p,style:(0,o.convertToRtlWhenNecessary)({width:l,height:d}),children:(0,r.jsx)(g,{attribute:i,value:t.rowData[i.name()],table:s,appModel:h,rowId:t.rowId,dataContext:t,allowTaps:!1,minimalView:!1,width:l,height:d,paddingLeft:f,paddingRight:m,viewType:"table"})})}},714611:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.calculateIntrinsicColumnLayouts=function(e){let{appModel:t,tableSchema:i,table:o,excludedColumns:n=[],columnOrder:a,columnWidthPreference:r,disableAllActions:s,dataContext:l,headerStyle:d,headerExtraWidth:c}=e;const u=w({appModel:t,tableSchema:i,table:o,excludedColumns:n,columnOrder:a,disableAllActions:s,dataContext:l});if(!u.length)return[];return S({models:u,appModel:t,table:o,columnWidthPreference:r,containerWidth:1/0,headerStyle:d,headerExtraWidth:c})},t.columnPadding=void 0,t.computeDrilldownLayout=T,t.computeFinalCellWidth=function(e){let{layoutWidth:t,isFilterable:i,isSortable:o}=e;const n=i?d.SORTHANDLE_WIDTH:0,a=o?d.SORTHANDLE_WIDTH:0,r=c.dynamicRollouts.includeByOwnerId("FilterFromTableHeader")&&(i||o)?g:0;return t+g+a+n+r},t.computeLayout=C,t.drillArrowWidth=t.default=void 0,t.getColumnsToShow=w,t.isValueColumnLayout=t.isSpecialColumnLayout=t.isAttributeColumnLayout=t.isActionColumnLayout=void 0,t.rowHeight=f,t.totalWidths=x;var n=o(i(496486)),a=o(i(365914)),r=o(i(593186)),s=i(803583),l=o(i(192137)),d=i(714067),c=i(44617);const u=56,p=85,h=10,m=30;function f(){var e,t;return null!==(t=null===(e=null===window||void 0===window?void 0:window.AppModel)||void 0===e?void 0:e.GetTableRowHeight())&&void 0!==t?t:Math.ceil(2.111*18)}const g=t.columnPadding=12,y=t.drillArrowWidth=8;t.isActionColumnLayout=e=>null!=(null==e?void 0:e.action);t.isValueColumnLayout=e=>null!=(null==e?void 0:e.attribute)&&null==(null==e?void 0:e.action);t.isAttributeColumnLayout=e=>null!=(null==e?void 0:e.attribute);t.isSpecialColumnLayout=e=>null!=(null==e?void 0:e.special);const v=function(e,t,i,o){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"Normal";if(o._cachedPreferredWidths)return o._cachedPreferredWidths;const r=o.columnStats(),l=((e,t)=>{let i;return i="Wide"===t||e.isMostlyNumberType()?11.5:7,i})(o,a),d=t.appTemplate.normalizedFontSize()/18,c=e.basePreferredWidth(o)*d,u=e.baseTightWidth(o)*d;let p;if(r&&!o.isImageType()){let e=(r.AverageLength+1.5*r.StdDevLength)*l;const t=r.MaxLength*l;e>t&&(e=t),p="Narrow"===a?{tightWidth:Math.min(e,u),cushyWidth:t+g}:{tightWidth:Math.min(c,e+g),cushyWidth:t+g}}else p="Narrow"===a?{tightWidth:u}:{tightWidth:c};const h=t.appTemplate.formattingRules(),m=h.computeWorstCaseFormatting(t,{tableOrSlice:i.name(),column:o.name()}),f=m.textSize||1;let y=m.icon.length||0,b=null;const w=o.referencedLabelCollection(),S=w.table,x=w.labelBasicAttribute;if(S&&x){y+=h.computeWorstCaseFormatting(t,{tableOrSlice:i.name(),column:x.name()}).icon.length||0;const e=s.TypeDisplaysApi.lookup(x);b=v(e,t,S,x,a)}let C=2;"Narrow"===a?C=1:"Wide"===a&&(C=3),y>C&&(y=C);const T=27*y*d*f;n.default.each(p,((e,t)=>{const i=Math.ceil(e*f+T);p[t]=i}));const I=b||p;return o._cachedPreferredWidths=I,I};function b(e,t,i){const o=i[e.name()]||[];0===o.length?t.push({isAction:!1,attribute:e}):o.forEach((i=>{t.push({isAction:!0,action:i,attribute:e})}))}function w(e){let t,{appModel:i,tableSchema:o,table:a,excludedColumns:r=[],columnOrder:d,disableAllActions:c,dataContext:p}=e;return t=d&&Array.isArray(d)&&d.length?function(e){let{tableSchema:t,appModel:i,table:o,excludedColumns:a=[],columnOrder:r,disableAllActions:s,dataContext:l}=e;const d=r&&r.indexOf("**all other columns**"),c=n.default.clone(r);if(null!=d&&d>=0){const e=n.default.map(t.visibleAttributesExcept(c),(e=>e.name()));c.splice(d,1,...e)}const u=t.findAttributesByNames(c),p=i.appTemplate.actions(),h=s?[]:p.actionsForTable(o.name(),i,void 0,l),m=n.default.mapValues(n.default.mapKeys(u,(e=>e.name())),(e=>"Ref"!==e.type()?h.filter((t=>t.showInlineFor(e))):[])),f=[];return u.forEach((e=>{a.indexOf(e.name())>=0||e.isHidden()||e.isShowType()||b(e,f,m)})),f}({tableSchema:o,appModel:i,table:a,excludedColumns:r,columnOrder:d,disableAllActions:c,dataContext:p}):function(e){let{tableSchema:t,appModel:i,table:o,excludedColumns:a=[],disableAllActions:r,dataContext:d}=e,c=[];const p=t.visibleAttributesWithoutShowTypes();t.labelBasicAttribute()&&p.indexOf(t.labelBasicAttribute())>=0&&(c=n.default.union(c,[t.labelBasicAttribute()]));const h=t.keyAttribute();h&&(t.hasCompoundKey()&&h.isHidden()?c=n.default.union(c,t.keyAttributes()):h.isHidden()||c.push(h));const m=i.appTemplate.actions(),f=r?[]:m.actionsForTable(o.name(),i,void 0,d),g=n.default.mapValues(n.default.mapKeys(p,(e=>
1e.name())),(e=>"Ref"!==e.type()?f.filter((t=>t.showInlineFor(e))):[])),y=p.filter((e=>1===g[e.name()].length||s.TypeDisplaysApi.lookup(e).basePreferredWidth(e)<=u&&!e.isImageType()&&"Yes/No"!==e.type())),v=l.default.reduceAttributesToUniqueTypes(y);c=n.default.union(c,v);const w=t.summaryFormulaAttributesByImportance();w.length&&(c=n.default.union(c,[w[0]])),c=n.default.union(c,p).filter((e=>-1===a.indexOf(e.name())&&!e.isHidden()));const S=[];return c.forEach((e=>{b(e,S,g)})),S}({tableSchema:o,appModel:i,table:a,excludedColumns:r,disableAllActions:c,dataContext:p}),t}function S(e){let{models:t,appModel:i,table:o,columnWidthPreference:n,containerWidth:r,headerStyle:l,headerExtraWidth:d}=e;return t.map((e=>e.isAction?{isAction:!0,action:e.action,attribute:e.attribute,tightWidth:m,columnWidth:m,isCompact:!0}:function(e){let{attribute:t,appModel:i,table:o,columnWidthPreference:n,containerWidth:r,headerStyle:l,headerExtraWidth:d}=e;const c=s.TypeDisplaysApi.lookup(t),h=c.basePreferredWidth(t)<=u&&!t.isImageType();let m=0;if(i.AppTemplate.Presentation.ShowColumnNames&&!h){const e=t.displayName(i.dataContext());m=l&&null!=d?a.default.measureText(e,"",l)+d:a.default.measureText(e,"TableView__header")+g+i.getSortHandleWidth()}let{tightWidth:f,cushyWidth:y}=v(c,i,o,t,n);const b=m-f;b>0&&(b>p?f+=p:f=m,f>y&&(y=f));const w=r-g;return f>w&&(f=w,y=w),{attribute:t,TypeDisplay:c,tightWidth:f,cushyWidth:y,columnWidth:f,isCompact:h}}({attribute:e.attribute,appModel:i,table:o,columnWidthPreference:n,containerWidth:r,headerStyle:l,headerExtraWidth:d})))}function x(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.reduce(((e,i)=>(isNaN(i.columnWidth)&&r.default.warnToDevConsole("NaN columnWidth, something went wrong with TableRow layout."),i.isAction||i.special?e+i.columnWidth+g:e+i.columnWidth+g+t)),0)}function C(e){let{appModel:t,tableSchema:i,table:o,width:n,excludedColumns:a=[],columnOrder:r,columnWidthPreference:s,disableAllActions:l,dataContext:d}=e;const c=w({appModel:t,tableSchema:i,table:o,excludedColumns:a,columnOrder:r,disableAllActions:l,dataContext:d});if(!c.length)return[];const u=y+g;let p=n-u;const h=S({models:c,appModel:t,table:o,columnWidthPreference:s,containerWidth:p}),m=t.getSortHandleWidth();p=Math.max(p,x(h,m)),function(e){let{columns:t,width:i,sortHandleWidth:o=0}=e;const n=i-x(t,o),a=[];let r=0,s=0;t.forEach((e=>{e.cushyWidth&&e.cushyWidth!==e.tightWidth&&(a.push(e),r+=e.tightWidth,s+=e.cushyWidth)}));let l=n/(s-r);l>1&&(l=1),a.forEach((e=>{e.columnWidth=Math.floor(e.tightWidth+(e.cushyWidth-e.tightWidth)*l)}))}({columns:h,width:p,sortHandleWidth:m}),function(e){let{columns:t,width:i,sortHandleWidth:o=0}=e;if(!t.length)return;const n=t[t.length-1];if(n.isCompact||n.attribute.shouldNotStretch())return;const a=i-x(t.slice(0,-1),o)-g-o;n.columnWidth=Math.max(a,n.columnWidth)}({columns:h,width:p,sortHandleWidth:m});const f=x(h,m);let v=y;const b=n-f;return b>u&&(v=b-g),h.push({special:"drill-arrow",columnWidth:v}),h}function T(e){let{tableSchema:t,attributeName:i,width:o}=e;const n=t.findAttributeByName(i);if(!n)return r.default.warnToDevConsole("Could not find attribute named",i,"on schema",t),[];return[{attribute:n,TypeDisplay:s.TypeDisplaysApi.lookup(n),columnWidth:o-g-y-h,isCompact:!1,iconNavigationOnly:!0},{special:"drill-arrow",columnWidth:y}]}t.default={computeLayout:C,computeDrilldownLayout:T,totalWidths:x,rowHeight:f,columnPadding:g}},526382:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(386010)),a=o(i(112963)),r=i(714611),s=i(278965),l=i(562858),d=i(148521);t.default=e=>{let t,{onSelect:i,text:o,expanded:c,index:u}=e;return t=c?(0,d.jsx)("div",{className:"TextRow__drill-arrow",style:(0,s.c
1onvertToRtlWhenNecessary)({float:"right",paddingRight:r.columnPadding}),children:(0,d.jsx)("i",{className:"fa fa-chevron-down"})}):(0,d.jsx)("div",{className:"TextRow__drill-arrow",style:(0,s.convertToRtlWhenNecessary)({float:"right",paddingLeft:r.columnPadding/2,paddingRight:r.columnPadding/2}),children:(0,d.jsx)(l.DirectionAwareIcon,{icon:(0,d.jsx)("i",{className:"fa fa-angle-right"})})}),(0,d.jsxs)(a.default,{spanMode:!0,navigationDelay:!0,onTap:i,asyncTap:!1,className:(0,n.default)("TextRow",{TextRow__expanded:c}),"data-testonly-row-index":u,children:[(0,d.jsx)("span",{className:"TextRow__text",children:o}),t]})}},563479:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.Badge=void 0;var n=i(695386),a=i(351101),r=i(803583),s=i(56749),l=o(i(386010)),d=i(557310),c=i(148521);const u=(0,n.makeStyles)((()=>({container:{fontSize:"0.7rem",backgroundColor:(0,s.themeColor)("groupedByAggregateBackground"),borderRadius:4,color:(0,s.themeColor)("groupedByAggregateContent"),padding:"1px 2px 0px 4px",margin:"auto 10px",flexShrink:0},reactRootStyles:{padding:"0px 2px 0px 4px",display:"flex",alignItems:"center"}})));t.Badge=e=>{let{attribute:t,value:i}=e;const o=u(),n=(0,a.getAppModel)();let s;if(t){const e=r.TypeDisplaysApi.lookup(t);s=(0,c.jsx)(e,{attribute:t,value:i,appModel:n})}else s=(0,c.jsx)(r.TypeDisplaysApi.Text,{value:i,appModel:n});return(0,c.jsx)("div",{className:(0,l.default)("GroupedHeaderRow__aggregate",o.container,{[o.reactRootStyles]:d.ReactRootUIConfig.isReactRoot()}),children:s})}},775148:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.EnumListChip=void 0;var n=o(i(238416)),a=o(i(386010)),r=i(249492),s=i(278965),l=i(670759),d=i(56749),c=i(148521);function u(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function p(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?u(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):u(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}const h=(0,r.makeStyles)((e=>({labelsContainer:{display:"flex",alignItems:"center",justifyContent:"start",maxWidth:"fit-content",width:"inherit"},chip:{backgroundColor:(0,d.themeColor)("dropdownChipBackgroundColor"),border:"1px solid ".concat((0,d.themeColor)("dropdownChipBorderColor")),margin:"".concat(e.spacing(.25),"px ").concat(e.spacing(.5),"px"),textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",width:"inherit",padding:"2px 4px"},nonTableQuickEditMode:{fontSize:".778rem"},tableQuickEditMode:{height:"1.667rem !important",margin:"2px 2px 3px 4px",fontSize:".72222rem",paddingLeft:"4px"},tableQuckEditReadOnly:{margin:"".concat(e.spacing(.25),"px ").concat(e.spacing(.5),"px"),display:"inline-flex !important",height:"auto !important",fontSize:".72222rem"},chipIcon:{marginRight:0},chipLabel:{width:"max-content",paddingLeft:0,paddingRight:0,display:"flex"}})));t.EnumListChip=e=>{let{index:t,option:i,table:o,attribute:n,dataContext:d,transaction:u,imageOnlyDropdown:m,isTableQuickEdit:f,readOnly:g,getTagProps:y=()=>{}}=e;var v,b;const w=h(),S=(0,l.getPseudoTypeDisplayProperties)(i,o,n,d,u,m,!0);return(0,c.jsx)(r.Chip,p(p({},y({index:t})),{},{icon:(0,c.jsx)(l.PseudoTypeDisplayAdornment,{table:o,attribute:n,dataContext:d,transaction:u,value:i,variant:"circle",isTableQuickEdit:f}),label:(0,c.jsx)(l.PseudoTypeDisplay,p(p({},S),{},{overflowLineCount:f?"1":"2"})),classes:{root:(0,a.default)(w.chip,{[w.nonTableQuickEditMode]:!f,[w.tableQuickEditMode]:f&&!g,[w.tableQuckEditReadOnly]:f&&g},w.labelsContainer),icon:w.chipIcon,label:w.chipLabel}
1,style:(0,s.convertToRtlWhenNecessary)({color:null===(b=null===(v=S.formatRulesClassNameAndStyles)||void 0===v?void 0:v.style)||void 0===b?void 0:b.color})}))}},760629:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.FormattingRulesIcons=void 0;var n=o(i(386010)),a=i(249492),r=o(i(173861)),s=i(557310),l=i(278965),d=i(148521);const c=(0,a.makeStyles)((()=>({container:{padding:"0 4px",height:"auto !important",display:"inline-flex",alignItems:"center"},formatRulesIcon:{color:"inherit",fontSize:"1em",paddingLeft:"4px",paddingRight:"8px",height:"unset",alignSelf:"center"},inDropdownIcon:{padding:"0 3px","&:first-child":{paddingLeft:0},"&:last-child":{paddingRight:"6px"}}})));t.FormattingRulesIcons=e=>{let{formattingSettings:t,ignoreFormatRuleColors:i=!1,inDropdown:o}=e;var a,u;const p=c();let h={},m=[];if(t){let e;h=r.default.cssStylesForText(t),i?h.color=e:e=t.highlightColor||void 0,m=s.ReactRootUIConfig.isReactRoot()?null===(a=null==t?void 0:t.icons)||void 0===a?void 0:a.map(((e,i)=>{const a=e.color||t.highlightColor||void 0;return(0,d.jsx)("i",{className:(0,n.default)(p.formatRulesIcon,e.name,"fa","icon",{[p.inDropdownIcon]:o}),style:(0,l.convertToRtlWhenNecessary)({color:a})},i)})):null===(u=null==t?void 0:t.icon)||void 0===u?void 0:u.map(((t,i)=>(0,d.jsx)("i",{className:(0,n.default)(p.formatRulesIcon,t,"fa","icon"),style:(0,l.convertToRtlWhenNecessary)({color:e})},i)));!t.icon.length&&t.highlightColor&&m.unshift((0,d.jsx)("span",{className:"BaseTypeDisplay__color-icon",style:(0,l.convertToRtlWhenNecessary)({backgroundColor:t.highlightColor})},"highlight-dot"))}return o?(0,d.jsx)("span",{className:p.container,children:m}):(0,d.jsx)(d.Fragment,{children:m})}},25084:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.ImageMarkupSlide=void 0;var n=o(i(238416)),a=i(667294),r=o(i(539479)),s=i(148521);function l(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function d(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?l(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):l(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var c=function(e,t,i,o){return new(i||(i=Promise))((function(n,a){function r(e){try{l(o.next(e))}catch(e){a(e)}}function s(e){try{l(o.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,s)}l((o=o.apply(e,t||[])).next())}))};t.ImageMarkupSlide=e=>{let{drawingPassThroughProps:t,setBrowserMarkupMode:i,imageHandle:o,inBrowserMarkupMode:n}=e;var l,u;const p=(0,a.useRef)(),[h,m]=(0,a.useState)("");return(0,a.useEffect)((()=>{c(void 0,void 0,void 0,(function*(){const e=yield o.getFlattenedUrlForImageSrc();m(e)}))}),[o]),(0,s.jsx)(s.Fragment,{children:n?(0,s.jsx)("div",{"aria-label":"draw-canvas",className:"RotateSignatureFix",onWheel:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),children:(0,s.jsx)(r.default,d(d({},t),{},{imgWidth:null===(l=p.current)||void 0===l?void 0:l.width,imgHeight:null===(u=p.current)||void 0===u?void 0:u.height,startUnlocked:!0,getBaseCanvasValue:()=>o,onSave:()=>i(!1)}))}):(0,s.jsx)("img",{className:"SlideImage",src:h,alt:"Slide image",onLoad:e=>{const t=e.target;p.current={width:t.offsetWidth,height:t.offsetHeight}}})})}},585081:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.Lightbox=void 0;var n=i(667294),a=o(i(66249)),r=i(166089),s=i(278965),l=i(646514),d=i(249492),c=o(i(386010)),u=i(562858),p=o(i(643471)),h=i(351101),m=i(56749),f=i(148521);const g=(0,d.makeStyles)((()=>({lightbox:{"& .yarl__button":{filter:"none",position:"absolute"},'& .yarl__button[title="Zoom out"]':{left:68,top:5},'& .yarl__button[title="Zoom in"]':{left:108,top:5},"& .yarl__slide":{margin:"64px 12px 12px",opacity:0,transition:"opacity 0.5s ease-in-out","&:not([inert])":{opacity:1}},"& .yarl__slide_image":{backgroundColor:(0,m.themeColor)("signatureBackgroun
1d")},"& .yarl__thumbnails_thumbnail":{border:"1px solid ".concat(l.GOOGLE_GREY_700),"& img":{width:"100%",height:"100%",objectFit:"cover"}},"& .yarl__thumbnails_thumbnail_active":{border:"3px solid ".concat(l.GOOGLE_WHITE)},"& .yarl__toolbar":{"& .CloseButton":{display:"flex",alignItems:"center",color:l.GOOGLE_WHITE}}}})));t.Lightbox=e=>{let{slides:t=[],className:i,isLightboxOpen:o,plugins:m,renderIcons:y,onClose:v,onMode:b,carousel:w,parentStyles:S,toolbar:x,index:C,controllerProps:T}=e;const I=g(),R=(0,n.useRef)(null),O={borderRadius:"50%",padding:"0.3rem",background:l.GOOGLE_GREY_900};return(0,f.jsx)(a.default,{className:(0,c.default)(i,I.lightbox,"Lightbox"),controller:Object.assign({ref:R},T),plugins:m,open:o,close:v,carousel:Object.assign(Object.assign({},w),{finite:!0}),on:Object.assign(Object.assign({},b),{entering:()=>r.AppGlobals.ViewManager.SetLightboxRef(R)}),index:C,animation:{swipe:0},render:y,styles:Object.assign(Object.assign({},S),{toolbar:(0,s.convertToRtlWhenNecessary)({left:0,right:"auto",flexDirection:"row-reverse"}),navigationPrev:(0,s.convertToRtlWhenNecessary)(Object.assign(Object.assign(Object.assign({},O),null==S?void 0:S.navigationPrev),{left:"20px",right:"unset"})),navigationNext:(0,s.convertToRtlWhenNecessary)(Object.assign(Object.assign(Object.assign({},O),null==S?void 0:S.navigationNext),{right:"20px",left:"unset"}))}),slides:t,zoom:{maxZoomPixelRatio:10,pinchZoomDistanceFactor:200},thumbnails:{vignette:!1},toolbar:{buttons:[null==x?void 0:x.buttons,(0,f.jsx)(d.Button,{"aria-label":(0,h.mapActionName)("Close"),"data-testid":"close-button-".concat(C),className:(0,c.default)("yarl__button","CloseButton"),onClick:v,children:(0,f.jsx)(u.DirectionAwareIcon,{icon:(0,f.jsx)(p.default,{fontSize:"medium"})})},"close-button")]}})}},750311:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MobileBottomSheet=void 0;var o=i(249492),n=i(695386),a=i(148521);const r=(0,n.makeStyles)((e=>({paper:{borderRadius:"".concat(e.spacing(1),"px ").concat(e.spacing(1),"px 0 0"),maxHeight:"90%"},listItemIcon:{justifyContent:"center",minWidth:"32px",marginRight:"12px"},contentsContainer:{paddingTop:e.spacing(2)},menuItem:{paddingLeft:"24px"}})));t.MobileBottomSheet=e=>{let{open:t,onClose:i,listItemContents:n,bottomSheetContents:s,container:l}=e;const d=r();let c=[];return n&&(c=n.filter((e=>{let{shouldHideListItem:t=!1}=e;return!t}))),(0,a.jsx)(o.Drawer,{anchor:"bottom",id:"MobileBottomSheet","data-testid":"mobile-bottom-sheet",open:t,onClose:i,classes:{paper:d.paper},ModalProps:{container:l},children:(0,a.jsx)("div",{className:d.contentsContainer,children:s||(0,a.jsx)(o.List,{children:c.map((e=>{let{id:t,icon:i,displayText:n,onClick:r,element:s}=e;return s||(0,a.jsxs)(o.ListItem,{role:"menuitem",button:!0,id:t,onClick:r,className:d.menuItem,children:[(0,a.jsx)(o.ListItemIcon,{classes:{root:d.listItemIcon},children:i}),(0,a.jsx)(o.ListItemText,{primary:n})]},t)}))})})})}},901545:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.UpperCamelCaseButton=void 0;var n=o(i(238416)),a=i(249492),r=o(i(386010)),s=i(148521);function l(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function d(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?l(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):l(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}const c=(0,a.makeStyles)((e=>({upperCamelCaseButton:{textTransform:"none",fontSize:"0.778rem",height:"100%","&+$upperCamelCaseButton":{marginLeft:e.spacing(1)}}})));t.UpperCamelCaseButton=e=>{const t=c();return(0,s.jsx)(a.Button,d(d({size:"small",color:"primary",role:"button",disableElevation:!0},e),{},{className:(0,r.default)(t.upperCamelCaseButton,e.className)}))}},818576:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(238416)),a=o(i(152200)),r=o(i(386010)),s=i(973128),l=i(235049),d=i(351101),c=i(278965),u=i(760629),p=i(148521);function h(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function m(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?h(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):h(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var f=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};class g extends s.BaseTypeDisplay{static basePreferredWidth(){return 180}render(){var e;const{value:t,attribute:i,actions:o,alignment:n}=this.props,s=null===(e=this.currentUIState)||void 0===e?void 0:e.Root;let h=null,g=(0,p.jsx)("span",{className:"AddressTypeDisplay__text",children:t});const y=n===d.DisplayMode.Centered?"auto":void 0;if(t&&!a.default.disabled&&"LatLong"===i.type()&&"deck"!==s&&(0,l.isConnected)()){const e=o&&o.length>0?o[0].name():null;h=(0,p.jsxs)("div",{className:"GenericActionButton","data-testonly-action":e,style:(0,c.convertToRtlWhenNecessary)({position:"relative",width:"100%",maxWidth:300,margin:y,marginTop:3,marginBottom:-18}),children:[(0,p.jsx)("img",{src:a.default.getStaticImageURL(t,800,200),style:(0,c.convertToRtlWhenNecessary)({objectFit:"cover",width:"100%",height:100,margin:"auto"}),alt:""}),(0,p.jsx)("i",{className:"GenericActionButton__icon fa fa-map-marker",style:(0,c.convertToRtlWhenNecessary)({position:"absolute",marginLeft:-3,marginTop:-16,top:"50%",left:"50%"})})]}),g=null}return(0,p.jsx)(this.FormattingSettingsProvider,{children:e=>{const i=this.getBaseProps({formatting:e}),{classes:o}=i,n=f(i,["classes"]);return(0,p.jsxs)("div",m(m({"data-testonly-value":t,className:(0,r.default)("AddressTypeDisplay",o)},n),{},{children:[(0,p.jsx)(u.FormattingRulesIcons,{formattingSettings:e}),g,h]}))}})}}t.default=g},118438:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(238416)),a=o(i(496486)),r=o(i(386010)),s=i(973128),l=i(760629),d=i(148521);function c(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function u(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?c(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var p=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};class h extends s.BaseTypeDisplay{hasValue(){return a.default.trim(this.props.value)}render(){const e=this.props.value;return(0,d.jsx)(this.FormattingSettingsProvider,{children:t=>{const i=this.getBaseProps({formatting:t}),{classes:o}=i,n=p(i,["classes"]);return(0,d.jsxs)("div",u(u({className:(0,r.default)("AppTypeDisplay",o)},n),{},{children:[(0,d.jsx)(l.FormattingRulesIcons,{formattingSettings:t}),(0,d.jsx)("span",{className:"AppTypeDisplay__text",children:e})]}))}})}}t.default=h},120224:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(238416)),a=o(i(667294)),r=o(i(386010)),s=o(i(735644)),l=i(973128),d=o(i(112963)),c=o(i(901711)),u=o(i(367397)),p=o(i(895466)),h=i(365914),m=o(i(143249)),f=i(134117),g=i(585081),y=i(148521);function v(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function b(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?v(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):v(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var w=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};class S extends l.BaseTypeDisplay{static basePreferredWidth(){return 50}static isImage(){return!0}static isBlock(){return!0}constructor(e){super(e),this.state={isLightboxOpen:!1},this.onImageError=this.onImageError.bind(this),this.onFlattenResult=(e,t)=>{t&&this.setState({url:t})},this.handleRef=e=>{this.domNode=e},this.imageWithSpinnerRef=a.default.createRef()}UNSAFE_componentWillMount(){super.UNSAFE_componentWillMount(),this.updateState(this.props)}UNSAFE_componentWillReceiveProps(e){super.UNSAFE_componentWillReceiveProps(e),this.updateState(e)}componentDidMount(){this.updateState(this.props)}getDomNodeWidth(){return this.domNode&&this.domNode.offsetWidth}imageWidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;const t=(e.paddingLeft||0)+(e.paddingRight||0);return(e.inlineModeBlockWidth||e.width)-t}imageHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return e.inlineModeBlockHeight||e.height}updateState(e){const t=e.table&&e.table.rootName(),i=p.default.from(e.value,t);this.updateImageState(i,e)}updateImageState(e,t){var i;if(e.isValid()&&e.nestedHandle()){let i=this.imageWidth(t),o=this.imageHeight(t);if(!i||!o){const e=this.getDomNodeWidth();i=i||e,o=o||e}if(i&&o)return void e.flatten(this.onFlattenResult,i,o)}("EnumList"===(null===(i=this.props.attribute.nestedAttribute())||void 0===i?void 0:i.type())?this.props.attribute.splitEnumListValue(t.value):[t.value]).map((e=>this.setImageUrl(e)))}setImageUrl(e){const t=this.normalizeOriginalImageUrl(e);t!==this.state.url&&this.setState({url:t,imageErrored:!1})}onImageError(){this.setState({imageErrored:!0})}isBlock(){return!0}allowTaps(){return super.allowTaps()&&!this.state.imageErrored}normalizeOriginalImageUrl(e){let t=e||this.props.value;return t=(0,h.normalizeTextIconUrl)(t),this.props.table?this.props.appModel.ResolveFile(t,this.props.table.rootName()):t}originalImageUrl(){return this.state.url}flexImageUrl(){return((0,f.flexImageUrl)(this.state.url)||"").trim()}additionalClasses(){return""}addSolidBackgroundColor(){return!1}imageDisplayType(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return e.imageDisplayType?"Full Image"===e.imageDisplayType||"Fit"===e.imageDisplayType?"full-centered":"Square Image"===e.imageDisplayType?"square":"Round Image"===e.imageDisplayType?"round":e.imageDisplayType:"full-centered"}render(){return(0,y.jsx)(this.FormattingSettingsProvider,{children:e=>{let t;const i=this.flexImageUrl();if(this.props.renderPlainImage)t=(0,y.jsx)("img",{src:i,alt:""});else{const o=!this.props.onImageSize&&m.default.inRollout(this.props.appModel,"imageWithSpinner")?c.default:u.default;t=(0,y.jsx)(o,{src:i,className:"BaseImageTypeDisplay__spinner-image",formattingSettings:e,cropMode:this.imageDisplayType(),solidBackgroundColor:this.addSolidBackgroundColor(),onImageSize:this.props.onImageSize,onImageError:this.onImageError,imageBorderRadius:this.props.imageBorderRadius,zeroImageLoadDelay:this.props.zeroImageLoadDelay,useLoadingSpinner:this.props.useLoadingSpinner,width:this.imageWidth(),height:this.imageHeight(),ref:this.imageWithSpinnerRef,isBasic:this.isBasic(),alignment:this.props.alignment})}const o=this.getBaseProps({shouldConvertRtlStyles:!1,includeInnerStyle:!0,formatting:e}),{classes:n}=o,a=w(o,["classes"]);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(d.default,b(b({onTappableMount:this.handleRef,enabled:this.allowTaps(),navigationDelay:!0,onTap:()=>this.setState({isLightboxOpen:!0}),className:(0,r.default)("BaseImageTypeDisplay",this.additionalClasses(),n),ariaLabel:"View image"},a),{},{children:t})),(0,y.jsx)(g.Lightbox,{controllerProps:{closeOnPullUp:!0,closeOnPullDown:!0,closeOnBackdropClick:!0},slides:[{src:i,alt:""}],plugins:[s.default],renderIcons:{buttonPrev:()=>null,buttonNext:()=>null},isLightboxOpen:this.state.isLightboxOpen,onClose:()=>this.setState({isLightboxOpen:!1})})]})}})}}t.default=S},973128:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.BaseTypeDisplay=void 0;var n=i(667294),a=o(i(496486)),r=o(i(386010)),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=f(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}(i(173861)),l=o(i(150198)),d=o(i(593186)),c=i(300431),u=i(278965),p=i(511448),h=i(157479),m=i(148521);function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(f=function(e){return e?i:t})(e)}const g=(e,t)=>{let{table:i,rowId:o}=e;return i&&i.rootTable().lookupTableRow(o,t)};class y extends c.ViewAwareComponent{static baseTightWidth(e){return this.basePreferredWidth(e)}static basePreferredWidth(e){return 125}static isImage(){return!1}static isBlock(e,t){return!1}isBlock(){return!1}isBasic(){return this.props.isBasic}constructor(e){super(e),this.FormattingSettingsProvider=e=>{let{children:t}=e;const{attribute:i,appModel:o,table:a,rowId:r,dataContext:l}=this.props,d=this.tableRow;if(!(null==a?void 0:a.formatting.hasRulesFor(i.name())))return t(s.emptyFormatting);let c;return i&&d?c=(0,p.queryTableRowColumnFormatting)(d,i.name()):a&&(0,h.asyncControlFlowEnabled)()&&(c=(0,p.queryGetFormatting)({allRules:o.appTemplate.formattingRules(),tableOrSlice:a.name(),column:i.name(),rowKey:r,dataContext:l})),c?(0,m.jsx)(n.Suspense,{fallback:null,children:(0,m.jsx)(h.QueryRollout,{query:c,children:e=>t(e)})}):t(this.formattingSettings)},this.state={}}get tableRow(){return g(this.props,this.pendingTransaction)}get formattingSettings(){const{attribute:e}=this.props,t=this.tableRow;return a.default.isNil(t)||a.default.isNil(e)?this.state.formattingSettings:t.getColumnFormatting(e.name())}UNSAFE_componentWillMount(){this.updateFormattingRules(this.props)}UNSAFE_componentWillReceiveProps(e){e.value===this.props.value&&e.rowId===this.props.rowId&&e.appModel.DataStamp===this.state.lastDataStamp||this.updateFormattingRules(e)}displayMode(){return this.props.displayMode||"block"}allowTaps(){return null==this.props.allowTaps||this.props.allowTaps}updateFormattingRules(e){if((0,h.asyncControlFlowEnabled)())return;const t=g(e,this.pendingTransaction);if(a.default.isNil(t)){let t;if(e.table&&e.attribute&&e.appModel){t=e.appModel.appTemplate.formattingRules().getFormatting({tableOrSlice:e.table.name(),column:e.attribute.name(),rowKey:e.rowId,dataContext:e.dataContext})}this.setState({formattingSettings:t,lastDataStamp:e.appModel.DataStamp})}else this.state.formattingSettings&&this.setState({formattingSettings:void 0,lastDataStamp:void 0})}getAdditionalStyles(e){let{height:t,width:i,paddingRight:o,paddingLeft:n,inlineModeBlockWidth:r,inlineModeBlockHeight:s,formatting:l}=e;if(this.isBasic())return null;{let e={lineHeight:t?"".concat(t-1,"px"):void 0,paddingRight:o?"".concat(o,"px"):void 0,paddingLeft:n?"".concat(n,"px"):void 0};(null==l?void 0:l.italic)&&!e.paddingRight&&(e.paddingRight="3px");const c=this.displayMode();if("flex"===c||"block"===c){const o={display:c,width:i?"".concat(i,"px"):void 0,height:t?"".concat(t,"px"):void 0};return a.default.merge(e,o)}if("inline-block"===c||"inline-flex"===c){const i={display:c,height:t?"".concat(t,"px"):void 0,verticalAlign:t?"top":"middle"};return e=a.default.merge(e,i),this.isBlock()&&(e.width=r?"".concat(r,"px"):"1.6em",e.height||(e.height=s?"".concat(s,"px"):"1.6em")),e}return e.verticalAlign="middle",this.isBlock()?(e.height=s?"".concat(s,"px"):"1.6em",e.width=r?"".concat(r,"px"):"1.6em",e.display="inline-block"):e.display="inline",i&&d.default.warnToDevConsole("TypeDisplay was given a width in inline mode"),t&&d.default.warnToDevConsole("TypeDisplay was given a height in inline mode"),e}}getBaseProps(e){let{formatting:t,shouldConvertRtlStyles:i=!0,includeInnerStyle:o=!1}=e;const n=t?s.default.styleClassesForText(t):"",d=t?s.default.cssStylesForText(t):{};this.props.ignoreFormatRuleColors&&(d.color=void 0);const c=this.additionalClassNames?this.additionalClassNames():"",p=(0,r.default)(this.props.className,c,n,"BaseTypeDisplay",{"BaseTypeDisplay--minimal-view":this.props.minimalView,"BaseTypeDisplay--empty-value":!l.default.valueExists(this.props.value,this.props.attribute&&this.props.attribute.type()),"BaseTypeDisplay--disallow-taps":!this.allowTaps(),"BaseTypeDisplay--basic":this.props.isBasic}),{height:h,width:m,paddingRight:f,paddingLeft:g,inlineModeBlockWidth:y,inlineModeBlockHeight:v}=this.props,b=this.getAdditionalStyles({height:h,width:m,paddingRight:f,paddingLeft:g,inlineModeBlockWidth:y,inlineModeBlockHeight:v,formatting:t}),w=a.default.extend({},d,b),S=i?(0,u.convertToRtlWhenNecessary)(w):w,x={classes:p,style:S,"data-testid":"base-type-display","data-testonly-column":this.props.attribute?this.props.attribute.name():"(no-attribute)"};return o&&(x.innerStyle=S),x}}t.BaseTypeDisplay=y},537430:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(238416)),a=o(i(386010)),r=i(973128),s=o(i(150198)),l=i(760629),d=i(148521);function c(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function u(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?c(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var p=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};class h extends r.BaseTypeDisplay{static basePreferredWidth(e){if(e){const{yesEvalTree:t,noEvalTree:i}=e.booleanEvalTrees();if(t||i)return r.BaseTypeDisplay.basePreferredWidth(e)}return 22}render(){const{attribute:e,dataContext:t,value:i}=this.props,{yesLabel:o,noLabel:n}=e.booleanTypeLabels(t),r=s.default.booleanValueFromWireFormat(i);let c,h;return!0===r?(c=o,h="BooleanTypeDisplay--yes"):!1===r?(c=n,h="BooleanTypeDisplay--no"):(c=" ",h="BooleanTypeDisplay--blank"),(0,d.jsx)(this.FormattingSettingsProvider,{children:e=>{const t=this.getBaseProps({formatting:e}),{classes:i}=t,o=p(t,["classes"]);return(0,d.jsxs)("div",u(u({className:(0,a.default)("BooleanTypeDisplay",h,i)},o),{},{children:[(0,d.jsx)(l.FormattingRulesIcons,{formattingSettings:e}),(0,d.jsx)("span",{className:"BooleanTypeDisplay__value",children:c})]}))}})}}t.default=h},714738:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ColorTypeDisplayDataTestIds=void 0;var n=o(i(238416)),a=o(i(386010)),r=i(973128),s=o(i(150198)),l=i(760629),d=i(148521);function c(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function u(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?c(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var p,h=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};!function(e){e.Span="color-type-display-span"}(p||(t.ColorTypeDisplayDataTestIds=p={}));class m extends r.BaseTypeDisplay{static basePreferredWidth(){return 10}render(){const e=s.default.getColor(this.props.value)||"";return(0,d.jsx)(this.FormattingSettingsProvider,{children:t=>{const i=this.getBaseProps({formatting:t}),{classes:o}=i,n=h(i,["classes"]);return(0,d.jsxs)("div",u(u({className:(0,a.default)("ColorTypeDisplay",o)},n),{},{children:[(0,d.jsx)(l.FormattingRulesIcons,{formattingSettings:t}),(0,d.jsx)("span",u(u({"data-testid":p.Span},this.props.value?{role:"img"}:{}),{},{"aria-label":this.props.value,className:"ColorTypeDisplay__value ColorTypeDisplay__value--"+e}))]}))}})}}t.default=m},726217:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CurrencyTypeDisplayDataTestIds=void 0;var n=o(i(238416)),a=o(i(496486)),r=o(i(386010)),s=i(973128),l=o(i(150198)),d=i(760629),c=i(148521);function u(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function p(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};
1t%2?u(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):u(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var h,m=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};!function(e){e.Symbol="currency-type-display-symbol",e.Value="currency-type-display-value"}(h||(t.CurrencyTypeDisplayDataTestIds=h={}));class f extends s.BaseTypeDisplay{static basePreferredWidth(){return 100}numberPrecision(){return this.props.attribute.decimalDigits()}numericDigits(){return this.props.attribute.numericDigits()}showThousandsSeparator(){return this.props.attribute.showThousandsSeparator()}currencySymbol(){return this.props.attribute.currencySymbol()||"$"}render(){const e=this.currencySymbol(),t=!!a.default.get(this,"props.appModel.AppTemplate.Presentation.RightAlignNumeric"),i=!!a.default.get(this,"props.appModel.AppTemplate.Presentation.UseAccountingFormat");let o=this.props.value;"string"==typeof o&&0===o.indexOf(e)&&(o=o.substr(1));let n,s,u,f=l.default.formatLocalizedNumber(o,{precision:this.numberPrecision(),numericDigits:this.numericDigits(),useGrouping:this.showThousandsSeparator()});if(f&&i){n=(0,c.jsx)("span",{className:"CurrencyTypeDisplay__left-parens",children:"("}),s=(0,c.jsx)("span",{className:"CurrencyTypeDisplay__right-parens",children:")"});const e=Number(o);u=e<0,0===e&&(f="  -      "),u&&(f=f.replace("-",""))}const g=(0,r.default)({CurrencyTypeDisplay:!0,"CurrencyTypeDisplay--right-align":t,"CurrencyTypeDisplay--accounting-format":i,"CurrencyTypeDisplay--negative":u}),y=f?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{className:"CurrencyTypeDisplay__symbol","data-testid":h.Symbol,children:e}),n,(0,c.jsx)("span",{className:"CurrencyTypeDisplay__value","data-testid":h.Value,dir:"ltr",children:f}),s]}):(0,c.jsx)("span",{className:"CurrencyTypeDisplay__value","data-testid":h.Value,dir:"ltr",children:this.props.value});return(0,c.jsx)(this.FormattingSettingsProvider,{children:e=>{const t=this.getBaseProps({formatting:e}),{classes:i}=t,o=m(t,["classes"]);return(0,c.jsxs)("div",p(p({className:(0,r.default)(g,i)},o),{},{children:[(0,c.jsx)(d.FormattingRulesIcons,{formattingSettings:e}),y]}))}})}}t.default=f},910880:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.DateTimeTypeDisplayDataTestIds=void 0;var n=o(i(238416)),a=o(i(386010)),r=i(973128),s=o(i(365914)),l=i(760629),d=i(148521);function c(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function u(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?c(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var p,h=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};!function(e){e.Value="date-time-type-display-span"}(p||(t.DateTimeTypeDisplayDataTestIds=p={}));class m extends r.BaseTypeDisplay{static basePreferredWidth(){return 168}render(){const e=this.props.attribute.ignoreSeconds(),t=this.props.attribute.useLongDateFormat(),i=this.props.value?s.default.localizeDateTime(this.props.value,e,t):"";
1return(0,d.jsx)(this.FormattingSettingsProvider,{children:e=>{const t=this.getBaseProps({formatting:e}),{classes:o}=t,n=h(t,["classes"]);return(0,d.jsxs)("div",u(u({className:(0,a.default)("DateTimeTypeDisplay",o)},n),{},{children:[(0,d.jsx)(l.FormattingRulesIcons,{formattingSettings:e}),(0,d.jsx)("span",{"data-testid":p.Value,children:i})]}))}})}}t.default=m},752255:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.DateTypeDisplayDataTestIds=void 0;var n=o(i(238416)),a=o(i(386010)),r=i(973128),s=o(i(365914)),l=i(760629),d=i(148521);function c(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function u(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?c(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var p,h=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};!function(e){e.Value="date-type-display-span"}(p||(t.DateTypeDisplayDataTestIds=p={}));class m extends r.BaseTypeDisplay{static basePreferredWidth(){return 90}render(){const e=this.props.value?s.default.toLocaleDateString(this.props.value,this.props.attribute.useLongDateFormat()):"";return(0,d.jsx)(this.FormattingSettingsProvider,{children:t=>{const i=this.getBaseProps({formatting:t}),{classes:o}=i,n=h(i,["classes"]);return(0,d.jsxs)("div",u(u({className:(0,a.default)("DateTypeDisplay",o)},n),{},{children:[(0,d.jsx)(l.FormattingRulesIcons,{formattingSettings:t}),(0,d.jsx)("span",{"data-testid":p.Value,children:e})]}))}})}}t.default=m},117017:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.DecimalTypeDisplayDataTestIds=void 0;var n=o(i(238416)),a=o(i(496486)),r=o(i(386010)),s=i(973128),l=o(i(150198)),d=i(760629),c=i(148521);function u(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function p(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?u(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):u(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var h,m=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};!function(e){e.Value="decimal-type-display-span"}(h||(t.DecimalTypeDisplayDataTestIds=h={}));class f extends s.BaseTypeDisplay{static basePreferredWidth(){return 60}numberPrecision(){return this.props.attribute.decimalDigits()}numericDigits(){return this.props.attribute.numericDigits()}showThousandsSeparator(){return this.props.attribute.showThousandsSeparator()}render(){const e=l.default.formatLocalizedNumber(this.props.value,{precision:this.numberPrecision(),numericDigits:this.numericDigits(),useGrouping:this.showThousandsSeparator()}),t=!!a.default.get(this,"props.appModel.AppTemplate.Presentation.RightAlignNumeric"),i=(0,r.default)({DecimalTypeDisplay:!0,"DecimalTypeDisplay--right-align":t});return(0,c.jsx)(this.FormattingSettingsProvider,{children:t=>{const o=this.getBaseProps({formatting:t}),{classes:n}=o,a=m(o,["classes"]);return(0,c.jsxs)("div",p(p({className:(0,r.default)(i,n)},a),{},{children:[(0,c.jsx)(d.FormattingRulesIcons,{formattingSettings:t}),(0,c.jsx)("span",{className:"DecimalTypeDisplay__text","data-testid":h.V
1alue,dir:"ltr",children:e})]}))}})}}t.default=f},3030:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(120224));class a extends n.default{addSolidBackgroundColor(){return!0}additionalClasses(){return"DrawingTypeDisplay"}}t.default=a},502956:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.DurationTypeDisplayDataTestIds=void 0;var n=o(i(238416)),a=o(i(386010)),r=i(973128),s=o(i(365914)),l=i(760629),d=i(148521);function c(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function u(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?c(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var p,h=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};!function(e){e.Value="duration-type-display-span"}(p||(t.DurationTypeDisplayDataTestIds=p={}));class m extends r.BaseTypeDisplay{static basePreferredWidth(){return 84}render(){const e=this.props.attribute.ignoreSeconds(),t=this.props.value?s.default.toDurationString(this.props.value,e):"";return(0,d.jsx)(this.FormattingSettingsProvider,{children:e=>{const i=this.getBaseProps({formatting:e}),{classes:o}=i,n=h(i,["classes"]);return(0,d.jsxs)("div",u(u({className:(0,a.default)("DurationTypeDisplay",o)},n),{},{children:[(0,d.jsx)(l.FormattingRulesIcons,{formattingSettings:e}),(0,d.jsx)("span",{"data-testid":p.Value,children:t})]}))}})}}t.default=m},380053:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.EmailTypeDisplayDataTestIds=void 0;var n=o(i(238416)),a=o(i(386010)),r=i(973128),s=i(760629),l=i(148521);function d(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function c(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?d(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):d(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var u,p=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};!function(e){e.Value="email-type-display-span"}(u||(t.EmailTypeDisplayDataTestIds=u={}));class h extends r.BaseTypeDisplay{static basePreferredWidth(){return 180}static baseTightWidth(){return 100}render(){var e;const t=null===(e=this.currentUIState)||void 0===e?void 0:e.Root;let i=(0,l.jsx)("span",{className:"EmailTypeDisplay__text","data-testid":u.Value,children:this.props.value||""});if(this.props.value&&"deck"!==t){const e=this.props.value.split("@");2===e.length&&(i=(0,l.jsxs)("span",{dir:"ltr",className:"EmailTypeDisplay__text","data-testid":u.Value,children:[e[0],(0,l.jsx)("wbr",{}),"@"+e[1]]}))}return(0,l.jsx)(this.FormattingSettingsProvider,{children:e=>{const t=this.getBaseProps({formatting:e}),{classes:o}=t,n=p(t,["classes"]);return(0,l.jsxs)("div",c(c({className:(0,a.default)("EmailTypeDisplay",o)},n),{},{children:[(0,l.jsx)(s.FormattingRulesIcons,{formattingSettings:e}),i]}))}})}}t.default=h},420210:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(238416)),a=o(i(386010)),r=i(973128),s=i(760629),l=i(148521);function d(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function c(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?d(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):d(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var u=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};class p extends r.BaseTypeDisplay{static basePreferredWidth(){return 180}static baseTightWidth(){return 100}render(){const e=this.props.attribute;let t=this.props.value;return e&&(t=e.localizeWireValue(t)),(0,l.jsx)(this.FormattingSettingsProvider,{children:e=>{const i=this.getBaseProps({formatting:e}),{classes:o}=i,n=u(i,["classes"]);return(0,l.jsxs)("div",c(c({className:(0,a.default)("TextTypeDisplay",o)},n),{},{children:[(0,l.jsx)(s.FormattingRulesIcons,{formattingSettings:e}),(0,l.jsx)("span",{className:"TextTypeDisplay__text",children:t})]}))}})}}t.default=p},753611:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(238416)),a=i(973128),r=i(803583),s=i(148521);function l(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function d(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?l(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):l(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}class c extends a.BaseTypeDisplay{static basePreferredWidth(e){const t=null==e?void 0:e.nestedAttribute();if(t){return r.TypeDisplaysApi.lookup(t).basePreferredWidth(t)}return r.TypeDisplaysApi.Text.basePreferredWidth()}static baseTightWidth(e){const t=null==e?void 0:e.nestedAttribute();if(t){return r.TypeDisplaysApi.lookup(t).baseTightWidth(t)}return r.TypeDisplaysApi.Text.baseTightWidth()}static isBlock(e,t){const i=null==e?void 0:e.nestedAttribute();if(i){return r.TypeDisplaysApi.lookup(i).isBlock(i,t)}return r.TypeDisplaysApi.Text.isBlock()}renderNestedAttribute(){const e=this.props.attribute.nestedAttribute(),t=this.props.value,i=r.TypeDisplaysApi.lookup(e,t);return e&&(0,s.jsx)(i,d(d({},this.props),{},{value:t,attribute:e}))}render(){return this.renderNestedAttribute()}}t.default=c},58921:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(238416)),a=o(i(386010)),r=i(973128),s=i(365914),l=i(895466),d=i(760629),c=i(148521);function u(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function p(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?u(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):u(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var h=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};class m extends r.BaseTypeDisplay{static basePreferredWidth(){return 24}render(){let e=this.props.value;if((0,l.isImageHandleInstanceOrModel)(e))e="Uploaded file";else{const t=(0,s.getTableFileQueryParsed)(e).fileName||e;e=(0,s.getFileNameFromPath)(t)||e}
1return(0,c.jsx)(this.FormattingSettingsProvider,{children:t=>{const i=this.getBaseProps({formatting:t}),{classes:o}=i,n=h(i,["classes"]);return(0,c.jsxs)("div",p(p({className:(0,a.default)("FileTypeDisplay",o)},n),{},{children:[(0,c.jsx)(d.FormattingRulesIcons,{formattingSettings:t}),(0,c.jsx)("span",{className:"FileTypeDisplay__text",children:e})]}))}})}}t.default=m},993446:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(120224));class a extends n.default{additionalClasses(){return"ImageTypeDisplay"}}t.default=a},729390:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(238416)),a=o(i(138138)),r=i(249492),s=o(i(386010)),l=i(973128),d=i(609135),c=i(365914),u=i(618583),p=i(557310),h=i(573553),m=i(760629),f=i(148521);function g(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function y(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?g(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):g(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var v=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};const b=(e,t)=>!(0,a.default)((0,c.stripEmptyItems)(e),(0,c.stripEmptyItems)(t));class w extends l.BaseTypeDisplay{constructor(){super(...arguments),this.shouldComponentUpdate=(e,t)=>b(e,this.props)||b(t,this.state)}static basePreferredWidth(){return 85}isBlock(){return!1}render(){var e;const{value:t,attribute:i,appModel:o,dataContext:n,showListInline:a,allowedViewTypes:l,sidewaysScroll:g=!0,rowId:b}=this.props,w=i.listElementAttribute();if("Ref"===(null==w?void 0:w.type())&&null!=t){const S=i.valueFromWireFormat(t),x=null==w?void 0:w.referencedTableName();let C=null,T="";if(x&&a&&null!=n){let t;T="ListTypeDisplay--ref-table";const a=i.refListFilterDefaults(n);a||(t=i.refListFilter(n));const{tableSchema:s}=o.findTableCollection(x),{viewState:m,viewType:y,viewControl:v}=(0,c.chooseInlineViewType)({tableSchema:s,tableName:x,allowedViewTypes:l});o.inRollout("enableGroupingForInlineTableView")||m&&m.GroupBy&&m.GroupBy.length>1&&(m.GroupBy=m.GroupBy.slice(-1));const I=new Set(["photo","backdrop","large"]),R=null===(e=(0,c.getJSONFromString)(null==m?void 0:m.Layout))||void 0===e?void 0:e.name,O=p.ReactRootUIConfig.isInDesktopExperience()&&"gallery"===y||"card"===y&&I.has(R);let D;if(p.ReactRootUIConfig.isReactRoot()){const e=this.viewStackKey;if(!e)throw new Error("ViewStackKey not found");const t={parentColumn:null==w?void 0:w.name(),parentRow:b,parentViewStackKey:e},i=(null==v?void 0:v.Name)?{Type:"Control",Name:v.Name,InlineInfo:t}:{Type:"View",Action:y,TableName:x,InlineInfo:t};D=(0,h.generateViewStackKey)(i)}const N=this.props.viewType,j=p.ReactRootUIConfig.isReactRoot()?S.length>0&&!O:!O,E=e=>(0,f.jsxs)(f.Fragment,{children:[j&&(0,f.jsx)(r.Divider,{}),(0,f.jsx)(d.InlineViewForEnvironment,{disableRowSwipe:"detail"===N,tableName:x,dynamicHeightMode:null==this.props.height,quickEditMode:this.props.quickEditMode,disableNavigation:this.props.disableNavigation,disableAllActions:this.props.disableAllActions,controlName:v?v.Name:void 0,viewType:y,viewState:m,clickOverride:this.props.clickOverride,width:e,height:this.props.height,onRowOpened:this.props.onRowOpened,maxRows:this.props.maxNestedRows,translucentMode:this.props.translucentMode,filterExpr:t,filterDefaults:a,applyUserDefinedFilters:!1,searchQuery:this.props.searchQuery,sidewaysScroll:g,mapMode:"fixed",interactiveRowIds:this.props.interactiveRowIds,parentId:this.props.parentId,viewStackKey:D,parentViewStackKey:this.viewStackKey})]});C=p.ReactRootUIConfig.isInDesktopExperience()?(0,f.jsx)(u.ContentSizeWrapper,{children:E}):E(this.props.width)}else C="".concat(i.displayName(n)," (").concat(S.length,")");if(p.ReactRootUIConfig.isReactRoot()){const e=this.getBaseProps({formatting:void 0}),{classes:t}=e,i=v(e,["classes"]);return(0,f.jsx)("div",y(y({className:(0,s.default)("ListTypeDisplay","ListTypeDisplay--ref",T,t)},i),{},{children:(0,f.jsx)("span",{className:"ListTypeDisplay__text",children:C})}))}
1return(0,f.jsx)(this.FormattingSettingsProvider,{children:e=>{const t=this.getBaseProps({formatting:e}),{classes:i}=t,o=v(t,["classes"]);return(0,f.jsxs)("div",y(y({className:(0,s.default)("ListTypeDisplay","ListTypeDisplay--ref",T,i)},o),{},{children:[(0,f.jsx)(m.FormattingRulesIcons,{formattingSettings:e}),(0,f.jsx)("span",{className:"ListTypeDisplay__text",children:C})]}))}})}return(0,f.jsx)(this.FormattingSettingsProvider,{children:e=>{const t=this.getBaseProps({formatting:e}),{classes:i}=t,o=v(t,["classes"]);return(0,f.jsxs)("div",y(y({className:(0,s.default)("ListTypeDisplay",i)},o),{},{children:[(0,f.jsx)(m.FormattingRulesIcons,{formattingSettings:e}),(0,f.jsx)("span",{className:"ListTypeDisplay__text",children:this.props.value})]}))}})}}t.default=w},937315:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(238416)),a=o(i(438456)),r=o(i(305239)),s=o(i(391036)),l=o(i(386010)),d=i(973128),c=i(150198),u=i(874940),p=i(760629),h=o(i(683426)),m=i(148521);function f(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function g(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?f(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):f(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var y=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};const v={allowedTags:["a","b","strong","i","u","em","mark","small","del","ins","sub","sup","p","li","ol","ul","br","hr","blockquote","img","h1","h2","h3","h4","h5","h6","table","tbody","tr","td","th"],disallowedTagsMode:"escape",allowedSchemes:["http","https"],allowedSchemesByTag:{img:["http","https","data"]}};class b extends d.BaseTypeDisplay{additionalClassNames(){return"LongTextTypeDisplay"}static basePreferredWidth(){return 180}static baseTightWidth(){return 100}render(){return(0,m.jsx)(this.FormattingSettingsProvider,{children:e=>{var t;const{value:i,attribute:o,viewType:n}=this.props,d=null===(t=this.currentUIState)||void 0===t?void 0:t.Root,f=this.getBaseProps({formatting:e}),{classes:b}=f,w=y(f,["classes"]),S=(0,m.jsxs)("div",g(g({className:(0,l.default)("TextTypeDisplay",b)},w),{},{children:[(0,m.jsx)(p.FormattingRulesIcons,{formattingSettings:e}),(0,m.jsx)("span",{className:"TextTypeDisplay__text",children:i})]}));if("detail"!==d&&"detail"!==n)return S;switch(o.longTextFormatting()){case c.LongTextFormatting.Markdown:const t=(0,m.jsx)(a.default,{skipHtml:!0,children:i});return(0,m.jsxs)("div",g(g({className:(0,l.default)("CommonLongTextRichTextDisplay","LongTextMarkdownDisplay",b)},w),{},{children:[(0,m.jsx)(p.FormattingRulesIcons,{formattingSettings:e}),t]}));case c.LongTextFormatting.HTML:{const t=r.default.sanitize((0,s.default)(i,v));return(0,u.checkForDeprecatedDriveMedia)(t,"LongTextTypeDisplay"),(0,m.jsxs)("span",g(g({className:(0,l.default)("CommonLongTextRichTextDisplay","LongTextHTMLDisplay",b)},w),{},{children:[(0,m.jsx)(p.FormattingRulesIcons,{formattingSettings:e}),(0,h.default)(t)]}))}default:return S}}})}}t.default=b},440629:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.mobileThumbnailSize=t.desktopThumbnailSize=t.default=void 0;var n=o(i(120224)),a=o(i(525153)),r=o(i(895466)),s=i(134117),l=i(585081),d=o(i(923685)),c=o(i(735644)),u=i(249492),p=i(892148),h=o(i(281262)),m=o(i(386010)),f=i(760629),g=i(148521);const y=t.desktopThumbnailSize="56px",v=t.mobileThumbnailSize="44px";class b extends n.default{constructor(e){super(e),this.state={currentLightboxIndex:-1}}additionalClasses(){return""}updateState(e){var t;const i=null===(t=this.props.table)||void 0===t?void 0:t.rootName();this.props.attribute.splitEnumListValue(this.props.value).map((e=>
1r.default.from(e,i))).map((t=>{this.updateImageState(t,e)}))}render(){return(0,g.jsx)(this.FormattingSettingsProvider,{children:e=>{var t;const i=null===(t=this.props.table)||void 0===t?void 0:t.rootName(),o=this.props.attribute.splitEnumListValue(this.props.value).map((e=>r.default.from(e,i))).map((e=>{var t,i;return e.nestedHandle()?null!==(t=e.cachedFlattened())&&void 0!==t?t:"":(0,s.flexImageUrl)(null!==(i=e.resolve())&&void 0!==i?i:"")})),{classes:n}=this.getBaseProps({shouldConvertRtlStyles:!1,includeInnerStyle:!0,formatting:e});if("table"===this.props.viewType)return(0,g.jsx)(h.default,{className:n,imageUrls:o});if("detail"!==this.props.viewType){const t=this.props.attribute.localizeWireValue(this.props.value);return(0,g.jsxs)("div",{className:(0,m.default)("TextTypeDisplay",n),children:[(0,g.jsx)(f.FormattingRulesIcons,{formattingSettings:e}),(0,g.jsx)("span",{className:"TextTypeDisplay__text",children:t})]})}return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(a.default,{className:n,imageUrls:o,cropMode:this.imageDisplayType(),solidBackgroundColor:this.addSolidBackgroundColor(),onImageError:this.onImageError,imageBorderRadius:this.props.imageBorderRadius,useLoadingSpinner:this.props.useLoadingSpinner,zeroImageLoadDelay:this.props.zeroImageLoadDelay,imageWidth:this.imageWidth(),imageHeight:this.imageHeight(),isBasic:this.isBasic(),onCarouselImageClick:e=>{this.setState({currentLightboxIndex:e,isLightboxOpen:!0})}}),(0,g.jsx)(l.Lightbox,{className:"MultiImageDisplayLightbox",slides:o.map((e=>({src:e,alt:""}))),plugins:[d.default,c.default],onMode:{view:e=>{let{index:t}=e;return this.setState({currentLightboxIndex:t})}},index:this.state.currentLightboxIndex,parentStyles:{container:{backgroundColor:"rgba(0, 0, 0, 0.8)"},thumbnailsContainer:{backgroundColor:"rgba(0, 0, 0, 0.8)"},thumbnail:{width:p.WindowWrapper.getInnerWidth()>768?y:v,height:p.WindowWrapper.getInnerWidth()>768?y:v,padding:0}},carousel:{preload:Math.ceil((o.length-1)/2)},isLightboxOpen:this.state.isLightboxOpen,onClose:()=>{this.setState({currentLightboxIndex:-1,isLightboxOpen:!1})},toolbar:{buttons:[(0,g.jsxs)(u.Typography,{variant:"h6","aria-label":"Slide index",className:"SlideIndexText",children:[this.state.currentLightboxIndex+1,"/",o.length]},"slide-index")]}})]})}})}}t.default=b},212286:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(117017));class a extends n.default{static basePreferredWidth(){return 80}numberPrecision(){return 0}}t.default=a},894761:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.PercentTypeDisplayDataTestIds=void 0;var n=o(i(238416)),a=o(i(496486)),r=o(i(386010)),s=i(973128),l=i(760629),d=i(148521);function c(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function u(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?c(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var p,h=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};!function(e){e.Value="percent-type-display-span"}(p||(t.PercentTypeDisplayDataTestIds=p={}));class m extends s.BaseTypeDisplay{static basePreferredWidth(){return 60}render(){const{attribute:e,value:t}=this.props,i=e.normalizePercentValueToString(t),o=!!a.default.get(this,"props.appModel.AppTemplate.Presentation.RightAlignNumeric"),n=(0,r.default)({PercentTypeDisplay:!0,"PercentTypeDisplay--right-align":o});
1return(0,d.jsx)(this.FormattingSettingsProvider,{children:e=>{const t=this.getBaseProps({formatting:e}),{classes:o}=t,a=h(t,["classes"]);return(0,d.jsxs)("div",u(u({className:(0,r.default)(n,o)},a),{},{children:[(0,d.jsx)(l.FormattingRulesIcons,{formattingSettings:e}),(0,d.jsx)("span",{className:"PercentTypeDisplay__text","data-testid":p.Value,dir:"ltr",children:i})]}))}})}}t.default=m},817902:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(238416)),a=o(i(386010)),r=i(973128),s=i(760629),l=i(148521);function d(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function c(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?d(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):d(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var u=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};class p extends r.BaseTypeDisplay{static basePreferredWidth(){return 125}static baseTightWidth(){return 105}render(){return(0,l.jsx)(this.FormattingSettingsProvider,{children:e=>{const t=this.getBaseProps({formatting:e}),{classes:i}=t,o=u(t,["classes"]);return(0,l.jsxs)("div",c(c({className:(0,a.default)("PhoneTypeDisplay",i)},o),{},{children:[(0,l.jsx)(s.FormattingRulesIcons,{formattingSettings:e}),(0,l.jsx)("div",{className:"PhoneTypeDisplay__number",children:(0,l.jsx)("span",{dir:"ltr",className:"PhoneTypeDisplay__value",children:this.props.value})})]}))}})}}t.default=p},799110:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(238416)),a=o(i(386010)),r=i(973128),s=i(278965),l=i(760629),d=i(148521);function c(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function u(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?c(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var p=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};class h extends r.BaseTypeDisplay{static basePreferredWidth(){return 20}fillPercent(){let e=0;switch(this.props.value&&this.props.value.toLowerCase()){case"empty":e=0;break;case"quarter":case"one quarter":e=.25;break;case"half":e=.5;break;case"three quarter":case"three quarters":e=.75;break;case"full":e=1}return e}render(){return(0,d.jsx)(this.FormattingSettingsProvider,{children:e=>{var t;const i=null===(t=this.currentUIState)||void 0===t?void 0:t.Root;let o={},n={};e&&(o={fill:e.textColor},n={fill:e.highlightColor});const r=50,c=this.fillPercent(),h="M ".concat(r," ").concat(r),m="L ".concat(r," 0");let f="A ".concat(r," ").concat(r," 0 ");0===c?f=null:c<=.25?f+="0 1 ".concat(100," ").concat(r):c<=.5?f+="0 1 ".concat(r," ").concat(100):c<=.75?f+="1 1 0 ".concat(r):f=null;const g=(0,d.jsxs)("svg",{className:(0,a.default)("ProgressTypeDisplay__canvas",{"ProgressTypeDisplay__canvas-deck-view":"deck"===i}),viewBox:"0 0 100 100",alt:this.props.value,children:[(0,d.jsx)("circle",{className:c<=.75?"ProgressTypeDisplay__unfilled":"ProgressTypeDisplay__filled",style:(0,s.c
1onvertToRtlWhenNecessary)(o),cx:r,cy:r,r:r}),f?(0,d.jsx)("path",{className:"ProgressTypeDisplay__filled",style:(0,s.convertToRtlWhenNecessary)(n),d:"".concat(h," ").concat(m," ").concat(f," Z")}):""]}),y=this.getBaseProps({formatting:e}),{classes:v}=y,b=p(y,["classes"]);return(0,d.jsxs)("div",u(u({className:(0,a.default)("ProgressTypeDisplay",v)},b),{},{value:this.fillPercent(),children:[(0,d.jsx)(l.FormattingRulesIcons,{formattingSettings:e}),g]}))}})}}t.default=h},670759:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.getPseudoTypeDisplayProperties=t.PseudoTypeDisplayTextLabel=t.PseudoTypeDisplayAdornment=t.PseudoTypeDisplay=void 0;var n=o(i(238416)),a=v(i(667294)),r=i(249492),s=o(i(386010)),l=i(700386),d=i(278965),c=o(i(173861)),u=o(i(895466)),p=i(166089),h=i(803583),m=i(760629),f=v(i(365914)),g=i(148521);function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(y=function(e){return e?i:t})(e)}function v(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=y(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}function b(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function w(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?b(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):b(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}t.getPseudoTypeDisplayProperties=function(e,t,i,o,n,a){let r=arguments.length>6&&void 0!==arguments[6]&&arguments[6];const s=null==t?void 0:t.lookupTableRow(o.keyValue,n),l=null==s?void 0:s.copy();l&&(l.values[i.name()]=e);const d=(null==l?void 0:l.getColumnFormatting(i.name(),{useRecursiveFormatting:!0}))||{icon:[],icons:[]},u=c.default.styleClassesForText(d),p=c.default.cssStylesForText(d);r&&(p.fontSize=void 0);const h={style:p,className:u},m=a;return{formattingSettings:d,textLabel:i.localizeWireValue(e,{transaction:n,noRefKeyFallback:m}),formatRulesClassNameAndStyles:h}};const S=(0,r.makeStyles)((e=>({avatarImageContainer:{display:"flex",justifyContent:"start",alignItems:"center",paddingRight:"6px"},squareImage:{width:"auto",height:"auto",maxWidth:"24px",maxHeight:"24px",borderRadius:"2px"},circularImage:{width:"22px",height:"22px !important"},leftMargin:{marginLeft:e.spacing(1)},dropdownAvatarMarginAdjustment:{"& img":{left:"0 !important"}}}))),x=e=>{let{formattingSettings:t,iconText:i,addLeftMargin:o,isTableQuickEdit:n}=e;const a=S(),l=t&&t.textColor?t.textColor:p.AppGlobals.ViewManager.theme.getThemeColor("secondaryText"),c={background:t&&t.highlightColor?t.highlightColor:p.AppGlobals.ViewManager.theme.getThemeColor("mainBackgroundVariantExtra"),color:l,fontSize:i.length>4?"inherit":void 0,textAlign:"center"};return(0,g.jsx)("div",{className:a.avatarImageContainer,children:(0,g.jsx)(r.Avatar,{variant:"circular",style:(0,d.convertToRtlWhenNecessary)(c),className:(0,s.default)(a.circularImage,{[a.leftMargin]:o,[a.dropdownAvatarMarginAdjustment]:n}),children:i})})};t.PseudoTypeDisplayAdornment=e=>{let{table:t,attribute:i,value:o,dataContext:n,transaction:a,addLeftMargin:l=!1,isTableQuickEdit:d,variant:c="square",formattingSettings:m}=e;const y=S();if("Progress"===(null==i?void 0:i.type())){const e=h.TypeDisplaysApi.lookup(i);return(0,g.jsx)(e,{attribute:i,value:o,allowTaps:!1,table:t,appModel:p.AppGlobals.AppModel,minimalView:!1,dataContext:n})}const v=null==i?void 0:i.getImageLabel(o,a),b=u.default.from(v).getUrlForImgSrc();if(!v||!b)return(0,g.jsx)(g.Fragment,{});const w=(0,f.normalizeTextIconUrl)(b),C=f.default.extractTextFromPlaceholderUrl(w);return C?(0,g.jsx)(x,{iconText:C,formattingSettings:m,isTableQuickEdit:d,addLeftMargin:l}):(0,g.jsx)("div",{className:y.avatarImageContainer,children:(0,g.jsx)(r.Avatar,{src:w,variant:c,className:(0,s.default)({[y.squareImage]:"square"===c,[y.circularImage]:"circle"===c,[y.leftMargin]:l,[y.dropdownAvatarMarginAdjustment]:d}),alt:v})})};const C=(0,r.makeStyles)((()=>({pseudoTypeDisplayTextLabelContainer:{display:"flex",alignItems:"center",minWidth:"0"},pseudoTypeDisplayTextLabel:{height:"auto !important",paddingRight:"2px"}
1,ellipsisOverflow:{textOverflow:"ellipsis",overflow:"hidden",width:"inherit",whiteSpace:"initial",lineHeight:"1.5em",maxHeight:"3em"},webkitOverflow:{"-webkit-box-orient":"vertical",wordBreak:"break-all",display:"-webkit-box"}}))),T=e=>{const{formatRulesClassNameAndStyles:t,textLabel:i}=e,o=C(),n=a.default.useRef(null),r=a.default.useRef(null),[c,u]=a.default.useState(!1),p=(0,a.useCallback)((()=>{r.current=setTimeout((()=>{var e;const t=n.current;if(t&&t.parentElement){const{width:i,height:o}=t.getBoundingClientRect(),n=.25,a=.5,r=null===(e=t.parentElement)||void 0===e?void 0:e.scrollWidth,s=t.scrollHeight;u(i>=r+n||s>o+a)}}),1e3)}),[]),h=(0,a.useCallback)((()=>{r.current&&clearTimeout(r.current),u(!1)}),[]);return(0,a.useEffect)((()=>()=>{r.current&&clearTimeout(r.current)})),(0,g.jsx)(l.ASTooltip,{title:c?i:"",placement:"bottom",arrow:!0,enterDelay:1e3,enterNextDelay:1e3,leaveDelay:250,children:(0,g.jsx)("div",w(w({},t),{},{className:(0,s.default)(null==t?void 0:t.className,o.pseudoTypeDisplayTextLabelContainer,"DesktopDropdownChipText"),onMouseEnter:p,onMouseLeave:h,children:(0,g.jsx)("span",{ref:n,className:(0,s.default)(o.pseudoTypeDisplayTextLabel,o.ellipsisOverflow,o.webkitOverflow),style:(0,d.convertToRtlWhenNecessary)({"-webkit-line-clamp":e.overflowLineCount||"1"}),children:i})}))})};t.PseudoTypeDisplayTextLabel=T;const I=(0,r.makeStyles)((()=>({container:{display:"flex",alignItems:"center",paddingLeft:"2px",paddingRight:"16px"}})));t.PseudoTypeDisplay=e=>{const t=I(),{formattingSettings:i,overflowLineCount:o,formatRulesClassNameAndStyles:n,textLabel:a}=e;return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:t.container,children:[(0,g.jsx)(m.FormattingRulesIcons,{formattingSettings:i,inDropdown:!0}),(0,g.jsx)(T,{formatRulesClassNameAndStyles:n,textLabel:a||"",overflowLineCount:o})]})})}},366231:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(238416)),a=o(i(496486)),r=o(i(386010)),s=i(714611),l=i(803583),d=o(i(571524)),c=i(557310),u=o(i(365914)),p=o(i(962553)),h=o(i(120224)),m=i(973128),f=i(760629),g=i(148521);function y(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function v(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?y(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):y(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var b=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};class w extends m.BaseTypeDisplay{getRefTableName(){return this.props.attribute.auxData().ReferencedTableName}refTable(){return p.default.findByName(this.getRefTableName(),this.props.appModel)}displayMode(){return this.props.displayMode||"flex"}renderBrokenMode(){const e=d.default.IsEditorIFramePreview()?(0,g.jsx)("i",{className:"BaseTypeDisplay__system-icon BaseTypeDisplay__system-icon-error icon fa fa-exclamation-triangle"}):null;return(0,g.jsx)(this.FormattingSettingsProvider,{children:t=>{const i=this.getBaseProps({formatting:t}),{classes:o}=i,n=b(i,["classes"]);return(0,g.jsxs)("div",v(v({className:(0,r.default)("RefTypeDisplay",o)},n),{},{"data-testonly-row-id":this.props.value,children:[(0,g.jsx)(f.FormattingRulesIcons,{formattingSettings:t}),a.default.trim(this.props.value),e]}))}})}render(){var e;const{table:t,tableSchema:i}=this.refTable();if(!t||!i)return this.renderBrokenMode();let o;const{dataContext:n,value:a}=this.props;if(n&&!c.ReactRootUIConfig.isReactRoot()){const e=i.keyAttribute().name();o=n.getTableRow(t,a,{keyAttrName:e})}else o=null===(e=t.lookupTableRow(this.props.value,this.pendingTransaction))||void 0===e?void 0:e.values;let d=i.labelAttributes(),p=!0;for(let e=0;e<d.length&&o;e++){const t=o[d[e].name()];if(null!=t&&""!==t){p=!1;break}}if(p&&(d=[i.keyAttribute()]),!o||!d.length)return this.renderBrokenMode();const m=[],y=this.props.appModel;let w;return d.forEach(((e,i)=>{var n,a;const r=o[e.name()];if(!r)return;let c;if("Ref"===e.type()){const t=y.findTableCollection(e.referencedTableName()).rootTable;t&&t.name()===this.props.table.rootName()&&(c=!0)}const u=c?l.TypeDisplaysApi.Text:l.TypeDisplaysApi.lookup(e,r);
1this.props.shouldNotRenderImagesForRefTypeDisplay&&u.prototype instanceof h.default||m.push((0,g.jsx)(u,{attribute:e,value:r,table:t,className:e.isImageType()?"RefTypeDisplay__ImageLabel":"RefTypeDisplay__TextLabel",appModel:y,rowId:this.props.value,inlineModeBlockWidth:null!==(n=this.props.inlineModeBlockWidth)&&void 0!==n?n:this.props.height,inlineModeBlockHeight:null!==(a=this.props.inlineModeBlockHeight)&&void 0!==a?a:this.props.height,paddingRight:i<d.length-1?s.columnPadding:0,allowTaps:!1,verticallyCenterTextInTextTypeDisplay:this.props.verticallyCenterTextInTextTypeDisplay,displayMode:"inline-flex",height:this.props.height},e.name()))})),window.UI_AUTOMATION_TEST_CONTEXT&&(w=u.default.removeNewlines(this.props.value)),(0,g.jsx)(this.FormattingSettingsProvider,{children:e=>{const t=this.getBaseProps({formatting:e}),{classes:i}=t,o=b(t,["classes"]);return(0,g.jsxs)("div",v(v({className:(0,r.default)("RefTypeDisplay",i)},o),{},{"data-testonly-row-id":w,children:[(0,g.jsx)(f.FormattingRulesIcons,{formattingSettings:e}),m]}))}})}}t.default=w},839999:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(496486)),a=o(i(386010)),r=i(973128),s=o(i(150198)),l=o(i(571524)),d=i(557310),c=i(134117),u=i(278965),p=o(i(173861)),h=i(148521);const m="https://www.appsheet.com/help/forms";class f extends r.BaseTypeDisplay{static basePreferredWidth(){return 50}constructor(e){super(e),this.onImageMount=e=>{e&&(l.default.IsIOSBrowser()||l.default.IsSafariBrowser())&&$(e).on("load",(()=>{$("body").hide().show(0)}))}}renderPageHeader(){const{attribute:e,dataContext:t,suppressShowTypeStyles:i=!1}=this.props;let o=this.props.showContent;null!=o&&""!==o||(o=e.displayNameField(t)||e.description(t)||"");const n=(0,a.default)("FormPageHeader","control-group",this.props.entryId,{ReactRootView:d.ReactRootUIConfig.isReactRoot(),SuppressShowTypeStyles:i});let r;return null!=o&&""!==o||(r={display:"none"}),(0,h.jsx)("div",{className:n,style:(0,u.convertToRtlWhenNecessary)(r),"data-testid":"form-page-header",children:(0,h.jsx)("span",{className:"ShowContent",children:o})},100)}renderSectionHeader(){const{attribute:e,dataContext:t,showContent:i}=this.props,o=(0,a.default)("ShowContent",{ReactRootView:d.ReactRootUIConfig.isReactRoot()}),n=null!=i?i:e.displayNameField(t)||e.verboseName(t)||"";return(0,h.jsx)("span",{className:o,children:n},100)}renderShowText(){const{attribute:e,dataContext:t,showContent:i}=this.props,o=null!=i?i:e.displayNameField(t)||e.verboseName(t)||"";return(0,h.jsx)("span",{className:"ShowContent",children:o},100)}renderShowUrl(){const{attribute:e,dataContext:t,showContent:i}=this.props,o=s.default.urlValueFromWireFormat(i||"");let n=o.url,a=e.displayNameField(t)||e.description(t)||o.linkText;return null!=i&&"object"==typeof i&&(n=i.url||"",a=i.linkText),(0,h.jsx)("a",{className:"ShowContent",target:"_blank",rel:"noopener noreferrer",href:n,"aria-hidden":!a,children:a},100)}renderShowImage(){const e=m;let t=this.props.showContent||"";const i=t;t.match(/^https:\/\/(?:www\.)?googledrive\.com\/.+\/.+$/)||t.match(/.+\.svg$/)||(t=(0,c.flexImageUrl)(this.props.appModel.ResolveFile(t,this.props.table.name())));let o=(0,h.jsx)("img",{className:"ShowContent",src:t,alt:"",ref:this.onImageMount},100);return"https://www.appsheet.com/Content/img/forms-addon/image_placeholder.png"===i&&(o=(0,h.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:o},100)),o}renderShowVideo(){const e=m,t=this.props.showContent||"";let i;return i="https://www.appsheet.com/Content/img/forms-addon/video_placeholder.png"===t?(0,h.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:(0,h.jsx)("img",{className:"ShowContent",src:(0,c.flexImageUrl)(t),ref:this.onImageMount,alt:""})},100):t.indexOf("youtu")>=0?(0,h.jsx)("iframe",{className:"ShowContent ShowContentVideo",src:t,allowFullScreen:!0,frameBorder:"0","data-testid":"show-content-iframe"},100):(0,h.jsx)("video",{className:"ShowContent ShowContentVideo",src:t,controls:!0,frameBorder:"0","data-testid":"show-content-video"},100),i}renderFormattingRules(e){let t={},i="",o=[];if(e){let n;t=p.default.cssStylesForText(e),i=p.default.styleClassesForText(e),this.props.ignoreFormatRuleColors?t.color=n:n=e.highlightColor,o=d.ReactRootUIConfig.isInDesktopExperience()?e.icons.map(((t,i)=>{const o=t.color||e.highlightColor||void 0;return(0,h.jsx)("i",{className:"BaseTypeDisplay__user-icon icon fa "+t.name,style:(0,u.convertToRtlWhenNecessary)({color:o})},i)})):e.icon.map(((e,t)=>(0,h.jsx)("i",{className:"BaseTypeDisplay__user-icon icon fa "+e,style:(0,u.convertToRtlWhenNecessary)({color:n})},t)));!e.icon.length&&e.highlightColor&&o.unshift((0,h.jsx)("span",{className:"BaseTypeDisplay__color-icon",style:(0,u.convertToRtlWhenNecessary)({backgroundColor:e.highlightColor})},"highlight-dot"))}return{formattingRuleClasses:i,formattingRuleStyles:t,iconElements:o}}
1render(){return(0,h.jsx)(this.FormattingSettingsProvider,{children:e=>{const{attribute:t,entryId:i,suppressShowTypeStyles:o}=this.props;let a=[];if(t.isPageHeader())return this.renderPageHeader();let r,s=["FormEntry","control-group","ShowTypeDisplay",i];const{formattingRuleClasses:l,formattingRuleStyles:c,iconElements:p}=this.renderFormattingRules(e);return""===l&&n.default.isEmpty(c)&&0===p.length||(s=s.concat(["CustomFormatting",l]),r=c),o&&s.push("SuppressShowTypeStyles"),t.isSectionHeader()?(a=p,a.push(this.renderSectionHeader()),s.push("SectionHeader")):t.isShowText()?(a=p,a.push(this.renderShowText()),s.push("ShowText")):t.isShowUrl()?(a=p,a.push(this.renderShowUrl()),s.push("ShowUrl")):t.isShowImage()?(a.push(this.renderShowImage()),s.push("ShowImage")):t.isShowVideo()&&(a.push(this.renderShowVideo()),s.push("ShowVideo")),d.ReactRootUIConfig.isReactRoot()&&s.push("ReactRootSpacing"),(0,h.jsx)("div",{className:s.join(" "),"data-testid":"show-type-display",children:(0,h.jsx)("div",{className:"ShowTypeContent FormEntryContent",style:(0,u.convertToRtlWhenNecessary)(r),children:a})})}})}}t.default=f},967220:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(120224));class a extends n.default{addSolidBackgroundColor(){return!0}additionalClasses(){return"SignatureTypeDisplay"}}t.default=a},683378:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TextTypeDisplayDataTestIds=void 0;var n=o(i(238416)),a=o(i(386010)),r=i(973128),s=i(760629),l=i(148521);function d(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function c(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?d(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):d(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var u,p=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};!function(e){e.Value="text-type-display-span"}(u||(t.TextTypeDisplayDataTestIds=u={}));class h extends r.BaseTypeDisplay{static basePreferredWidth(){return 180}static baseTightWidth(){return 100}render(){return(0,l.jsx)(this.FormattingSettingsProvider,{children:e=>{const t=this.getBaseProps({formatting:e}),{classes:i}=t,o=p(t,["classes"]);return(0,l.jsxs)("div",c(c({className:(0,a.default)("TextTypeDisplay",i)},o),{},{children:[(0,l.jsx)(s.FormattingRulesIcons,{formattingSettings:e}),(0,l.jsx)("span",{className:(0,a.default)("TextTypeDisplay__text",{"TextTypeDisplay__vertically-center-text":this.props.verticallyCenterTextInTextTypeDisplay}),"data-testid":u.Value,title:this.props.showTooltip?this.props.value:null,children:this.props.value})]}))}})}}t.default=h},772089:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(120224));class a extends n.default{additionalClasses(){return"ThumbnailTypeDisplay"}}t.default=a},257632:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TimeTypeDisplayDataTestIds=void 0;var n=o(i(238416)),a=o(i(386010)),r=i(973128),s=o(i(365914)),l=i(760629),d=i(148521);function c(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function u(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?c(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEac
1h((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var p,h=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};!function(e){e.Value="time-type-display-span"}(p||(t.TimeTypeDisplayDataTestIds=p={}));class m extends r.BaseTypeDisplay{static basePreferredWidth(){return 85}render(){const e=this.props.attribute.ignoreSeconds(),t=this.props.value?s.default.toLocaleTimeString(this.props.value,e):"";return(0,d.jsx)(this.FormattingSettingsProvider,{children:e=>{const i=this.getBaseProps({formatting:e}),{classes:o}=i,n=h(i,["classes"]);return(0,d.jsxs)("div",u(u({className:(0,a.default)("TimeTypeDisplay",o)},n),{},{children:[(0,d.jsx)(l.FormattingRulesIcons,{formattingSettings:e}),(0,d.jsx)("span",{"data-testid":p.Value,children:t})]}))}})}}t.default=m},885139:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(238416)),a=o(i(386010)),r=i(973128),s=o(i(150198)),l=o(i(21870)),d=i(351101),c=i(760629),u=i(148521);function p(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function h(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?p(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):p(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var m=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};class f extends r.BaseTypeDisplay{static basePreferredWidth(){return 180}static baseTightWidth(){return 100}render(){const e=this.props.attribute.valueFromWireFormat(this.props.value),{linkText:t}=e,i=!!t&&t!==e.url,o=s.default.normalizeUrlValue(e.url),n=(0,u.jsx)("span",{dir:i?void 0:"ltr",className:(0,a.default)("UrlTypeDisplay__text",{"UrlTypeDisplay__ellipsis-text":!i,"UrlTypeDisplay__mobile-side-by-side":!l.default.isWideScreen&&this.props.alignment===d.DisplayMode.SideBySide,"UrlTypeDisplay__mobile-normal":!l.default.isWideScreen&&this.props.alignment===d.DisplayMode.Normal}),children:t||o});return(0,u.jsx)(this.FormattingSettingsProvider,{children:e=>{const t=this.getBaseProps({formatting:e}),{classes:i}=t,o=m(t,["classes"]);return(0,u.jsxs)("div",h(h({className:(0,a.default)("UrlTypeDisplay",i)},o),{},{children:[(0,u.jsx)(c.FormattingRulesIcons,{formattingSettings:e}),n]}))}})}}t.default=f},223258:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(238416)),a=o(i(386010)),r=i(973128),s=o(i(112963)),l=i(895466),d=i(874940),c=i(278965),u=i(148521);function p(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function h(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?p(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):p(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var m=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};const f=["youtube.com","youtu.be"];class g extends r.BaseTypeDisplay{static basePreferredWidth(){return 50}static isImage(){return!0}constructor(){super()}handleSelect(){}render(){const e=this.props.value;let t=null;if(e)if((0,l.isImageHandleInstanceOrModel)(e)){const i="function"==typeof e.value?e.value():e.value;t=(0,u.jsx)("img",{src:"/jeenee_url?path=".concat(i),style:(0,c.convertToRtlWhenNecessary)({maxWidth:"100%"}),alt:""})}else(e=>{try{const t=new URL(e);return f.some((e=>t.hostname===e||t.hostname.endsWith(".".concat(e))))}catch(e){return!1}})(e)?t=(0,u.jsx)("iframe",{src:e,frameBorder:"0",allowFullScreen:!0,allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture; web-share",sandbox:"allow-scripts allow-same-origin"}):((0,d.checkForDeprecatedDriveMedia)(e,"VideoTypeDisplay"),t=(0,u.jsx)("video",{src:e+"#t=0.1",controls:!0,frameBorder:"0",preload:"metadata",style:(0,c.convertToRtlWhenNecessary)({maxWidth:"100%"})}));else t=(0,u.jsx)("div",{children:" "});const i=this.getBaseProps({shouldConvertRtlStyles:!1,formatting:void 0}),{classes:o}=i,n=m(i,["classes"]);return(0,u.jsx)(s.default,h(h({enabled:!0,navigationDelay:!0,onTap:this.handleSelect.bind(this),className:(0,a.default)("VideoTypeDisplay",o),ariaLabel:"View media"},n),{},{children:t}))}}t.default=g},803583:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDisplaysApi=void 0;var n=o(i(150198)),a=o(i(593186)),r=o(i(683378)),s=o(i(937315)),l=o(i(753611)),d=o(i(420210)),c=o(i(212286)),u=o(i(818576)),p=o(i(910880)),h=o(i(894761)),m=o(i(117017)),f=o(i(726217)),g=o(i(885139)),y=o(i(58921)),v=o(i(993446)),b=o(i(3030)),w=o(i(967220)),S=o(i(772089)),x=o(i(752255)),C=o(i(257632)),T=o(i(502956)),I=o(i(380053)),R=o(i(817902)),O=o(i(714738)),D=o(i(799110)),N=o(i(118438)),j=o(i(729390)),E=o(i(366231)),A=o(i(537430)),P=o(i(839999)),M=o(i(223258)),k=o(i(440629));const _={Text:r.default,Enum:l.default,EnumList:d.default,LongText:s.default,MultiColumnKey:r.default,Name:r.default,ChangeCounter:c.default,Number:c.default,PostalCode:c.default,Address:u.default,XY:u.default,LatLong:u.default,ChangeLocation:u.default,DateTime:p.default,ChangeTimestamp:p.default,Percent:h.default,Decimal:m.default,Price:f.default,Url:g.default,File:y.default,Image:v.default,Drawing:b.default,Signature:w.default,Thumbnail:S.default,Video:M.default,Date:x.default,Time:C.default,Duration:T.default,Email:I.default,Phone:R.default,Color:O.default,Progress:D.default,App:N.default,List:j.default,Ref:E.default,"Yes/No":A.default,Show:P.default,MultiImage:k.default};t.TypeDisplaysApi=Object.assign(Object.assign({},_),{lookup(e,t){if(t===n.default.SHEET_FORMULA_NEEDS_RECOMPUTE)return _.Text;if(null==e)return _.Text;const i=_[e.type()];return i||a.default.ReportError({errorMessage:"No TypeDisplay found for type",type:e.type()}),e.shouldUseImageGallery()?_.MultiImage:i||_.Text}})},617166:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(973935)),a=o(i(496486)),r=o(i(386010)),s=i(847494),l=o(i(150198)),d=o(i(315847)),c=o(i(638157)),u=i(166089),p=i(557310),h=o(i(593186)),m=i(148521);class f extends s.BaseTypeInput{constructor(e){super(e),this.state=this.initialState(),this.onValue=this.onValue.bind(this),this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this)}initialState(){let e="",t="";const i=this.props,o=i.dataContext&&i.dataContext.rowData;if(o){const n=i.attribute.name(),a="_geo_"+n;e=o[n],t=o[a]}return{suggested:[],initialValue:e,initialGeo:t,focused:!1,resultCache:{},writeCache:{}}}componentWillUnmount(){var e;null===(e=this.geocodeAbortController)||void 0===e||e.abort(),this.geocodeAbortController=void 0}focus(){this.renderReadOnly()||this.refs.inputWithAutocomplete.focus()}geocode(e){var t=this;if(d.default.disabled||e!==u.AppGlobals.AppState.CurrentUIState)return;const i=this.value();if(null!=i&&i.length>5&&i!==l.default.SHEET_FORMULA_NEEDS_RECOMPUTE){const o=function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(e!==u.AppGlobals.AppState.CurrentUIState)return;const n=o.slice(0,5),r={suggested:n,resultCache:t.state.resultCache};if(o.length){const e={};e[i]=n,r.resultCache=a.default.extend(e,t.state.resultCache)}t.setState(r,(()=>{t.renderReadOnly()||t.state.focused||!o.length||t.onValue(o[0].formattedAddress)}))};if(i in this.state.resultCache)o(this.state.resultCache[i]);else{let e;if(this.props.table){const{tableDefinition:t}=this.props.appModel.findTableCollection(this.props.table.name());t&&(e=t.LocaleName)}const t=d.default.region(e);console.log("geocoding",i),d.default.geocodeAddress(i,{region:t,interactive:!0}).then((e=>{let{results:t}=e;return o(t)})).catch(console.warn)}}}abortableGeocode(){var e=this;this.geocodeAbortController&&(this.geocodeAbortController.abort(),this.geocodeAbortController=void 0);const t=this.value();if(d.default.disabled||null==t||t.length<=5||t===l.default.SHEET_FORMULA_NEEDS_RECOMPUTE)return;let i=null;if(t in this.state.resultCache)i=Promise.resolve(this.state.resultCache[t]);else{const e=new AbortController;this.geocodeAbortController=e,i=new Promise((e=>setTimeout(e,800))).then((()=>
1{if(void 0===e||e.signal.aborted)throw{aborted:!0};let i;if(this.props.table){const{tableDefinition:e}=this.props.appModel.findTableCollection(this.props.table.name());e&&(i=e.LocaleName)}const o=d.default.region(i);return console.log("geocoding",t),d.default.geocodeAddress(t,{region:o,interactive:!0})})).then((t=>{if(void 0===e||e.signal.aborted)throw{aborted:!0};if(t.results)return t.results.slice(0,5);if("ZERO_RESULTS"===t.status)return[];throw t}))}i.then((function(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const o={suggested:i,resultCache:e.state.resultCache};if(i.length){const n={};n[t]=i,o.resultCache=a.default.extend(n,e.state.resultCache)}e.setState(o,(()=>{e.renderReadOnly()||e.state.focused||!i.length||e.onValue(i[0].formattedAddress)}))})).catch((e=>{(null==e?void 0:e.aborted)||h.default.ReportErrorOnce({errorMessage:"Error geocoding in AddressTypeInput",result:e})}))}onChange(e){this.setState({transientValue:e})}onFocus(e){super.onFocus(e),this.setState({focused:!0})}onBlur(e){super.onChange(e.target.value),this.setState({focused:!1,transientValue:null})}onValue(e){return super.onChange(e)}componentDidUpdate(e,t){if(this.state.transientValue){if(this.state.transientValue===t.transientValue)return}else if(t.transientValue){if(t.transientValue===this.props.value)return}else if(this.props.value===e.value)return;if(clearTimeout(this.timer),!this.props.attribute.geocodingEnabled())return;const i=this.value();if(i&&i.trim()){let t,o,r,s,l;const d=this.state.suggested.filter((e=>e.formattedAddress===i)).pop();if(d){const e=d.latitude,c=d.longitude,p=e+", "+c,h=d.formattedAddress;t=this.props.dataContext.rowData,o=this.props.attribute.name(),s="_latitude"+o,l="_longitude"+o,r="_geo_"+o,t[s]=String(e),t[l]=String(c),t[r]=p;const m=a.default.extend({},this.state.writeCache);return h in m||u.AppGlobals.AppModel.WriteGeocodeResults([{Address:h,LatLong:p}],(function(){m[h]=!0})),!this.renderReadOnly()&&this.state.focused||$(n.default.findDOMNode(this.refs.inputWithAutocomplete)).find("input").trigger("blur"),void this.setState({suggested:[],writeCache:m,initialGeo:p,initialValue:i})}if(i===this.state.initialValue&&""!==this.state.initialGeo)return;if(this.props.refreshId!==e.refreshId){let e="",n="";if(t=a.default.get(this,"props.dataContext.rowData"),t&&(o=this.props.attribute.name(),r="_geo_"+o,e=t[o],n=t[r]),e===i&&(this.setState({initialValue:e,initialGeo:n}),""!==n))return}p.ReactRootUIConfig.isReactRoot()?this.abortableGeocode():this.timer=setTimeout(this.geocode.bind(this,this.currentUIState),800)}else this.state.suggested.length&&this.setState({suggested:[]})}render(){var e;const t=this.value(),i=this.state.suggested.map((e=>e.formattedAddress)),o=this.getBaseClassNames();return(0,m.jsx)("div",{className:(0,r.default)("AddressTypeInput",o),children:(0,m.jsx)(c.default,{type:"text",ref:"inputWithAutocomplete",noFilter:!0,value:t,values:i,readOnly:this.renderReadOnly(),onChange:this.onChange,onValue:this.onValue,onFocus:this.onFocus,onBlur:this.onBlur,attributeName:null===(e=this.props)||void 0===e?void 0:e.attribute.name()})})}}t.default=f},645429:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.AndroidDrawingInputContent=void 0;var n=i(249492),a=o(i(665166)),r=o(i(590615)),s=o(i(735996)),l=o(i(386010)),d=i(278965),c=i(351101),u=i(56749),p=i(901545),h=i(646514),m=i(148521);const f=(0,n.makeStyles)((()=>({imageClearButton:{position:"absolute",top:0,right:0,backgroundColor:(0,u.themeColor)("imageClearBackground"),color:h.GOOGLE_WHITE,transform:"translate(-2px, 2px)","&:hover":{backgroundColor:(0,u.themeColor)("imageClearBackgroundHover")}},container:{padding:"0px !important"},androidCanvasContainer:{backgroundColor:h.GOOGLE_WHITE,pointerEvents:"none",position:"relative",width:"100%",borderTopLeftRadius:"2px",borderTopRightRadius:"2px",margin:"auto"},footerContainer:{height:"50px",boxSizing:"border-box",display:"flex",flexDirection:"row",justifyContent:"space-between",padding:"8px",marginTop:0},footerControl:{display:"flex",flexDirection:"row",alignItems:"center",textAlign:"center",position:"relative",padding:"7px",lineHeight:0,color:(0,u.themeColor)("minorText"),"& .FileUploadUtils":{position:"absolute",top:0,left:0,bottom:0,right:0,"& .FileUploadForm":{overflow:"hidden","& .FileUploadInput":{opacity:0,border:"none"}}},"& input[type=file]::-webkit-file-upload-button":{cursor:"pointer"}},imageContainer:{position:"absolute",top:0,left:0,width:"100%",display:"flex",alignItems:"center",justifyContent:"center","& img":{maxWidth:"100%",userSelect:"none"}},canvasContainer:{position:"relative",display:"block",width:"100%",outline:"1px solid ".concat((0,u.themeColor)("dividerColor"))}})));t.AndroidDrawingInputContent=e=>{let{baseClasses:t,imageHeight:i,imageWidth:o,canvasRef:u,backgroundImageComponent:h,fileUploadComponent:g,onPhotoControlClick:y,onEditMarkupClick:v,clearInput:b,isReadOnly:w}=e;const S=f(),x=!w&&(0,m.jsxs)("div",{className:S.footerContainer,children:[(0,m.jsxs)("div",{className:S.footerControl,children:[(0,m.jsx)(p.UpperCamelCaseButton,{color:"primary",startIcon:(0,m.jsx)(r.default,{}),onClick:()=>y(),children:(0,c.mapActionName)("Photo")}),g]}),(0,m.jsx)(p.UpperCamelCaseButton,{color:"primary",startIcon:(0,m.jsx)(a.default,{}),onClick:()=>v(),children:(0,c.mapActionName)("Draw")})]});return(0,m.jsxs)("div",{className:(0,l.default)(t,S.container),children:[(0,m.jsxs)("div",{className:S.androidCanvasContainer,children:[(0,m.jsx)("div",{className:S.imageContainer,style:(0,d.convertToRtlWhenNecessary)({height:i}),children:h}),(0,m.jsx)("canvas",{className:S.canvasContainer,ref:u,width:o,height:i})]}),h&&!w&&(0,m.jsx)(n.IconButton,{"aria-label":(0,c.mapActionName)("Clear"),className:S.imageClearButton,onClick:b,size:"small",children:(0,m.jsx)(s.default,{})}),x]})}},775381:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(872865));class a extends n.default{renderReadOnly(){return!0}}t.default=a},7975:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(386010)),a=o(i(112963)),r=i(847494),s=o(i(299119)),l=o(i(152200)),d=o(i(365914)),c=i(278965),u=i(148521);class p extends r.BaseTypeInput{constructor(e){super(e),this.mapPane=null,this.state=this.initialState(e),this.onMapMount=e=>{e&&(this.mapPane=e,setTimeout((()=>{this.mapPane===e&&this.setState(this.state)}),500))},this.onComponentMount=e=>{this._component=e,null==e&&(this.mapPane=null)},this.onOverlayTap=()=>{this.defaultValue()&&this.setValue(this.defaultValue())},this.onClearTap=()=>{document.activeElement.blur(),this.setValue("")},this.onExpand=()=>{setTimeout((()=>{this.refs.modal.setAnchorElement(this._component),this.closeTimeout=setTimeout((()=>{this.closeTimeout=null}),500),this.setState({modalOpen:!0})}),a.default.ACTIVE_DELAY+10)},this.onModalClose=()=>{null==this.closeTimeout&&this.setState({modalOpen:!1,centerLat:null,centerLng:null})},this.onInputChange=this.onInputChange.bind(this),this.onBlur=this.onBlur.bind(this),this.onMapZoomChanged=this.onMapZoomChanged.bind(this),this.onMapDragEnd=this.onMapDragEnd.bind(this),this.onMapTypeChanged=this.onMapTypeChanged.bind(this),this.onModalClose=this.onModalClose.bind(this)}initialState(e){return this.highAccuracy=!0,{zoom:17,accuracy:null,available:!0,pending:!1}}UNSAFE_componentWillReceiveProps(e){this.props.refreshId&&e.refreshId&&this.props.refreshId!==e.refreshId?(this.cancelPending({abort:!0}),this.setState(this.initialState(e))):this.value()&&!e.value&&this.setState(this.initialState(e))}shouldComponentUpdate(e,t){if(this.props.value!==e.value||this.state.transientValue!==t.transientValue)return!0;if(d.default.compareObjs(this.state,t).length)return!0;const i=d.default.compareObjs(this.props,e);return 1!==i.length||"focused"!==i[0]}cancelPending(e){this.state.pending&&("function"==typeof this._stopTrying&&(this._stopTrying(e),delete this._stopTrying),this.setState({pending:!1}))}onInputChange(e){this.cancelPending({abort:!0}),this.setState({transientValue:e.target.value})}onBlur(e){this.cancelPending(),this.setValue(e.target.value,this.state.accuracy),this.setState({transientValue:null})}componentWillUnmount(){this.cancelPending({abort:!0})}onPinDragStart(){}onPinDragEnd(){}onMapTypeChanged(e,t){const i=t.mapTypeId;this.state.mapType!==i&&this.setState({mapType:i})}mapEventHandlers(){return{zoom_changed:this.onMapZoomChanged,dragend:this.onMapDragEnd,maptypeid_changed:this.onMapTypeChanged}}onMapDragEnd(e,t){this.setState({zoom:t.getZoom(),centerLat:l.default.getCenterLat(t),centerLng:l.default.getCenterLng(t)})}onMapZoomChanged(e,t){clearTimeout(this._zoomTimer);const i=this.mapPane;this._zoomTimer=setTimeout((()=>{if(i===this.mapPane){const e={zoom:t.getZoom()};this.state.modalOpen&&(e.centerLat=l.default.getCenterLat(t),e.centerLng=l.default.getCenterLng(t)),this.setState(e)}}),1e3)}customMapType(){}setValue(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2?arguments[2]:void 0;return this.setState({accuracy:t}),super.onChange(e,i)}renderCornerButton(){return null}renderMap(){return null}renderModal(e){let t;return e&&this.state.modalOpen&&(t=(0,u.jsxs)("section",{className:"BaseCoordinateTypeInputModal",children:[(0,u.jsx)("div",{className:"BaseCoordinateTypeInputModal__title",children:this.props.attribute.displayName(this.props.dataContext)}),(0,u.jsx)("div",{className:"BaseCoordinateTypeInputModal__contents",ref:"modalList",style:(0,c.convertToRtlWhenNecessary)({height:"calc(100% - 50px - 54px)"}),children:e}),(0,u.jsx)("div",{className:"BaseCoordinateTypeInputModal__bottom",children:(0,u.jsx)(a.default,{className:"BaseCoordinateTypeInputModal__finish-button",navigationDelay:!0,onTap:this.onModalClose,children:this.props.appModel?this.props.appModel.MapActionName("Done"):"Done"})})]})),(0,u.jsx)(s.default,{isOpen:!!t,onRequestClose:this.onModalClose,contentLabel:"map",ref:"modal",anchoredMode:"auto",children:t})}extraClassNames(){return""}defaultValue(){return""}inlineMapOptions(){return{draggable:!1,scrollwheel:!1,disableDoubleClickZoom:!0,zoomControl:!0,mapTypeControl:!1,scaleControl:!1,streetViewControl:!1,rotateControl:!1,fullscreenControl:!1,gestureHandling:"greedy"}}modalMapOptions(){return{disableDefaultUI:!1,draggable:!0,scrollwheel:!0,disableDoubleClickZoom:!1,zoomControl:!0,mapTypeControl:!1,scaleControl:!1,streetViewControl:!1,rotateControl:!1,fullscreenControl:!1,gestureHandling:"greedy"}}renderExpandButton(){return null}render(){const e=String(this.value()||""),t="BaseCoordinateTypeInput BaseCoordinateBase "+this.extraClassNames();let i;this.renderReadOnly()||(i=this.renderCornerButton());const o={paddingRight:this.renderReadOnly()?void 0:this.state.accuracy?"5em":"2.5em",color:this.state.pending?"#aaa":void 0};let r,s=null;const l=this.renderMap();if(l)if(this.state.modalOpen)r=(0,u.jsx)("div",{className:"BaseCoordinateTypeInput__map-parent"}),s=l;else{let t,i;e&&this.props.attribute.validateValue(e)||(t=(0,u.jsx)(a.default,{className:"BaseCoordinateTypeInput__overlay",onTap:this.onOverlayTa
1p,children:(0,u.jsx)("span",{className:"BaseCoordinateTypeInput__overlay-icon fa fa-map-marker"})})),t||(i=this.renderExpandButton()),r=(0,u.jsxs)("div",{className:"BaseCoordinateTypeInput__map-parent",children:[l,i,t]})}const d=this.renderModal(s),p=this.getBaseClassNames();return(0,u.jsxs)("div",{className:(0,n.default)(t,p),ref:this.onComponentMount,children:[(0,u.jsx)("input",{dir:"ltr","aria-label":this.props.label,ref:"input",type:"text",style:(0,c.convertToRtlWhenNecessary)(o),className:"input-block-level BaseCoordinateInput",autoCorrect:"off",value:e,disabled:this.renderReadOnly(),onBlur:this.onBlur,onChange:this.onInputChange}),i,r,d]})}}t.default=p},901816:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(496486)),a=o(i(667294)),r=o(i(973935)),s=o(i(386010)),l=i(847494),d=i(557310),c=i(166089),u=o(i(571524)),p=o(i(593186)),h=o(i(150198)),m=o(i(962553)),f=o(i(605161)),g=o(i(944762)),y=i(388884),v=i(148521);class b extends l.BaseTypeInput{constructor(e){super(e),this.state=this.initialState(),this.onChange=this.onChange.bind(this),this.onScanResult=this.onScanResult.bind(this),this.addNewRef=this.addNewRef.bind(this),this.inputRef=a.default.createRef()}initialState(){return{forceShowOther:!1,defaultedShowingOther:!1}}onChange(e){const t="function"==typeof e.join?e.join(this.delimiter()):e||"";let i;this.allowMultiSelect()&&this.useButtonSelect()&&(i={noAutoAdvance:!0,forceUpdate:!0}),this.props.onValueChange(t,i)}onScanResult(e){const{validOptions:t,appModel:i}=this.props;if(this.allowMultiSelect())return p.default.ReportError({errorMessage:"Scanned input not supported with multiselect"});const o=this.options(),n=this.enumElementAttribute(),a=e=>alert(this.props.appModel.MapActionName(e));let r=o.indexOf(e);if(r>=0)return this.onChange(e);if(this.allowOtherValues())return null==t||t.indexOf(e)>=0?this.onChange(e):a("The scan result didn't match any known entries.");if("Ref"===n.type()){const t=n.referencedTableName(),{table:a}=m.default.findByName(t,i);if(a){if(r=o.map((e=>a.rowLabelValue(e))).indexOf(e),r>=0)return this.onChange(o[r])}}return a("The scan result didn't match any known entries.")}focus(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!d.ReactRootUIConfig.isReactRoot()&&$("#LaunchScreen").is(":visible");if(!this.valueReadOnly()&&!t){const t=this.showScannerButton(),i=this.showNfcScannerButton();t&&!i&&u.default.InMobileWebView()?e.openCamera&&this.scannerButtonSelected():!t&&i&&u.default.InMobileWebView()?e.openCamera&&this.nfcScannerButtonSelected():e&&e.openListSelect&&this.refs.listSelect&&!this.scanOnly()?this.refs.listSelect.onTap():!this.scanOnly()&&this.inputRef.current&&this.inputRef.current.focus()}}allowMultiSelect(){return!1}allowOtherValues(e){return(e=e||this.props).attribute.allowOtherValues()}autoCompleteOtherValues(e){return e=e||this.props,!!this.allowOtherValues(e)&&e.attribute.autoCompleteOtherValues()}allowedValues(e){e||(e=this.props);return e.attribute.enumValues()||[]}delimiter(){return h.default.listDelimiter}componentDidUpdate(e,t){this.state.forceShowOther&&!t.forceShowOther&&this.state.defaultedShowingOther===t.defaultedShowingOther&&setTimeout((()=>{const e=r.default.findDOMNode(this.refs.otherInput);e&&e.focus()}),0)}UNSAFE_componentWillMount(){this.cacheUniqueColumnValues();const e=this.allowedValues();null!=e&&0!==e.length||this.state.defaultedShowingOther||this.setState({forceShowOther:!0,defaultedShowingOther:!0})}UNSAFE_componentWillReceiveProps(e){this.cacheUniqueColumnValues(e)}cacheUniqueColumnValues(e){if(e=e||this.props,this.autoCompleteOtherValues(e)){const t=e.table;if(t){const i=this.allowedValues(e),o=this.props.refreshId+JSON.stringify(i),a=this._uniqueColumnValuesRefreshId!==o;if(!this._uniqueColumnValues||a){const a=i,r=e.attribute.name(),s=t?e.tableSchema.uniqueColumnValues(r,t.rowValues()):[];this._uniqueColumnValues=n.default.uniq(a.concat(s)),this._uniqueColumnValuesRefreshId=o}}}}options(){return this.autoCompleteOtherValues()?this._uniqueColumnValues:this.allowedValues()}enumElementAttribute(){return this.props.attribute.nestedAttribute()||this.props.attribute}useButtonSelect(){if(this.tableMode())return!1;const{attribute:e}=this.props;if(e.isValidityEnum()&&e.hasAppFormula())return!1;const t=this.allowedValues();if(0===t.length)return!1;const i=this.allowMultiSelect(),o=this.showScannerButton()||this.showNfcScannerButton();return this.props.attribute.shouldUseButtonSelect(t,this.allowOtherValues(),i,o)}useStackSelect(){return!this.tableMode()&&this.props.attribute.shouldUseStackSelect()}referencedTableName(){return this.enumElementAttribute().referencedTableName()}referencedTable(){const e=this.referencedTableName(),{appModel:t}=this.props;if(e&&t)return t.findTableCollection(e).table}addNewRef(){var e;const t=this.referencedTableName();if(null!=t&&""!==t){const i={noAutoAdvance:!0},o=()=>{var e,i,o;const{table:n,tableRow:a,rowId:r}=this.props,s=this.referencedTable();if(n&&s){const s=this.enumElementAttribute();
1if(d.ReactRootUIConfig.isReactRoot())this.launchRelatedForm(t,null,null,s,{referencedBy:{refColumnName:s.name(),tableName:n.rootName(),stableId:null!==(e=null==a?void 0:a.stableId)&&void 0!==e?e:r,multiselect:this.allowMultiSelect(),rowStateColumnNames:null===(o=null===(i=this.props.view)||void 0===i?void 0:i.paging)||void 0===o?void 0:o.rowStateColumnNames}});else if("form"===this.props.viewType)c.AppGlobals.ViewManager.KnownHandlers.form.LaunchNestedForm(t,null,null,this.enumElementAttribute());else{(this.props.appState||c.AppGlobals.AppState).PushViewForResult(this,"addNewRef","form",!1,{TableName:t})}}};this.refs.listSelect?null===(e=this.refs)||void 0===e||e.listSelect.onFinish(null,o,i):o()}}onPushViewResult(e,t){if("addNewRef"===e){const{attribute:e,appModel:i,rowId:o,table:a,useTransactions:r}=this.props;let{row:s,value:l}=this.props;if(t.rowId!==l)if(this.tableMode());else{if(!s&&r){const e=null==a?void 0:a.lookupTableRow(o);s=e&&e.copy().rowState}if(s){let o=t.rowId;"EnumList"===e.type()&&null!=o&&(l=e.valueFromWireFormat(l)||[],n.default.includes(l,o)||l.unshift(o),o=e.valueToWireFormat(l));if(!s.updateAndValidate(e,o)){const e={tableName:a.name(),row:s.values(),appName:i.AppTemplate.Name,appId:i.AppTemplate.Id,appVersion:i.AppTemplate.Version,userSettings:i.GetUserSettings()};i.UpdateTableRow(e)}}}}}render(){const e=this.allowedValues(),t=this.renderReadOnly(),i=this.useButtonSelect(),o=this.useStackSelect(),n=this.allowMultiSelect(),a=this.options(),r=this.getBaseClassNames();let l=this.props.value||"";const{attribute:c,appModel:u,dataContext:p,table:h,width:m,height:b}=this.props;n?l=l?c.splitEnumListValue(l,a):[]:i&&(l=l?[l]:[]);const w=this.enumElementAttribute();if(i)return(0,v.jsx)("div",{className:(0,s.default)("BaseEnumTypeInput",r),children:(0,v.jsx)(g.default,{readOnly:t,selected:l,listAttribute:c,elementAttribute:w,options:e,multiselect:n,table:h,dataContext:p,appModel:u,width:m,onChange:this.onChange,stack:o})});{let e=c.verboseName(p);c.evalTreeLookup("DisplayName")&&p&&(e=c.displayName(p)||e);let i=this.allowOtherValues(),o=!1;const m=this.referencedTable();return m&&(i=!1,o=this.allowAddRef(m)&&this.allowOtherValues()),(0,v.jsx)("div",{className:(0,s.default)("BaseEnumTypeInput",r),children:d.ReactRootUIConfig.isInDesktopExperience()?(0,v.jsx)(y.DesktopDropdown,{ref:this.inputRef,allowAdds:i,allowAddsThroughRef:o,addNewRefHandler:o?this.addNewRef:void 0,attribute:w,multiselect:n,options:a,label:e,savedSelection:l,table:h,tableSchema:m&&(null==m?void 0:m.tableSchema),onChange:this.onChange,readOnly:t,dataContext:p,isTableQuickEdit:this.tableMode(),transaction:this.pendingTransaction}):(0,v.jsx)(f.default,{typeInput:this,ref:"listSelect",title:e,readOnly:t,selected:l,listAttribute:c,options:a,optionAttribute:w,multiselect:n,allowAdds:i,allowAddRef:o,addNewRefHandler:o?this.addNewRef:void 0,table:h,dataContext:p,appModel:u,width:null,height:b,displayMode:"inline-block",renderInlineButtons:this.renderInlineButtons,getInputStyleWithInlineButtons:this.getInputStyleWithInlineButtons,onChange:this.onChange})})}}}t.default=b},581827:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(496486)),a=i(667294),r=i(847494),s=o(i(571524)),l=o(i(593186)),d=o(i(895466)),c=o(i(112368)),u=o(i(365914)),p=i(278965),h=i(263198),m=i(629503),f=i(646317),g=i(134117),y=o(i(150198)),v=i(218546),b=i(318926),w=i(947123),S=i(354632),x=i(148521),C=function(e,t,i,o){return new(i||(i=Promise))((function(n,a){function r(e){try{l(o.next(e))}catch(e){a(e)}}function s(e){try{l(o.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,s)}l((o=o.apply(e,t||[])).next())}))};class T extends r.BaseTypeInput{get preferredWidth(){}constructor(e){super(e),this._fileUploadInputRef=(0,a.createRef)(),this.state=this.initialState(this.props),this.onFlattenResult=(e,t)=>{t&&this.setState({url:t})},this.onFileUploadUtilsMount=t=>{if(t){const{attribute:t,pendingUploadRequests:i}=e;let o;if(i&&t&&(o=i[t.name()],null!=o)){l.default.logToDevConsole("restoring pending upload request with id ",o);const e=this.createUploadRequest(o);this.registerUploadRequest(o,e)}}else this.unregisterUploadRequest(this.state.requestId)},this.onImageMount=this.onImageMount.bind(this)}get fileUploadInput(){return this._fileUploadInputRef.current}shouldUseIOSPlaceholder(){return s.default.InIOSWebView()&&s.default.InWKWebView()}shouldUseIOSCache(){return s.default.InIOSWebView()&&s.default.InWKWebView()&&n.default.get(window,"AppModel.AppTemplate.Behavior.FullOfflineCaching")}focus(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!this.renderReadOnly()&&e&&e.openCamera&&!this.isFileType()&&this.onPhotoControlClick()}initialState(e){const{attribute:t,pendingUploadRequests:i}=e;
1let o=(0,f.makeGuid)();return i&&t&&(o=i[t.name()]||o),{requestId:o}}isFileType(){return!1}UNSAFE_componentWillMount(){this.updateState(this.props)}UNSAFE_componentWillReceiveProps(e){this.updateState(e)}updateState(e){const t=e.table?e.table.name():null,i=d.default.from(e.value,t);this.updateImageState(i,e)}updateImageState(e,t){const i={fileName:e.fileName()};this.isFileType()||(i.imageHandle=e,e.nestedHandle()?(i.url=e.cachedFlattened(),i.url||e.flatten(this.onFlattenResult)):i.url=(0,g.flexImageUrl)(e.resolve())),this.state.showIOSPlaceholder&&this.props.value!==t.value&&(i.showIOSPlaceholder=!1),this.setState(i)}componentDidUpdate(){!this.props.value&&this.fileUploadInput&&this.fileUploadInput.value&&$(this.fileUploadInput).val(null)}useNativePhotoInterface(){return!this.isFileType()&&(s.default.InIOSWebView()||s.default.InAndroidWebView()&&!s.default.IsUnsupportedAndroidVersion())}useNativeFileInterface(){return this.isFileType()&&(s.default.InAndroidWebView()&&c.default.IsAndroidAppWithMinVersion(12.3)||s.default.InIOSWebView()&&c.default.IsIOSAppWithMinVersion(10.6))}onImageMount(e){e&&(s.default.IsIOSBrowser()||s.default.IsSafariBrowser())&&$(e).on("load",(()=>{$("body").hide().show(0)})),this.img=e}createUploadRequest(e,t){return{RequestId:e,allowDrawing:this.props.attribute.allowDrawing(),preferredWidth:this.preferredWidth,CallbackFn:e=>{e&&(t&&e.setFileName(t),this.setImage(e))}}}registerUploadRequest(e,t){let{cacheForAttribute:i,callback:o=u.default.noop}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.props.registerUploadRequest?this.props.registerUploadRequest(e,t,{cacheForAttribute:i,callback:o}):(m.Common.registerUploadRequest(e,t),o())}unregisterUploadRequest(e){this.props.unregisterUploadRequest?this.props.unregisterUploadRequest(e,this.props.attribute.name()):m.Common.unregisterUploadRequest(e)}startNativeInput(e){h.JeeneeBrowserAPI.takePhoto(e)}onPhotoControlClick(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.blockClick)if(this.cooldown(),this.unsupported())this.blockAlert||(this.blockAlert=!0,setTimeout((()=>{this.blockAlert=!1}),1e4),alert("File upload is not supported on this device"));else if(!this.useNativePhotoInterface()&&!this.useNativeFileInterface()||e)l.default.AddTraceContext("photoControlClick (webfile)"),this.fileUploadInput&&$(this.fileUploadInput).click();else{const e=this.state.requestId;l.default.AddTraceContext("photoControlClick (native)",{fileUploadUtilsId:e,type:this.props.attribute.type()});const t=this.createUploadRequest(e),i=this.props.attribute.name();this.registerUploadRequest(e,t,{cacheForAttribute:i,callback:()=>this.startNativeInput(t)})}}supportsNativeImageMarkup(e){var t;return"function"==typeof(null===(t=window.JeeneeAndroid)||void 0===t?void 0:t.editImageMarkup)&&(c.default.IsAndroidAppWithMinVersion(17)||(null==e?void 0:e.isAndroidHandle()))}startNativeImageMarkup(e){const t=(0,f.makeGuid)(),i=this.createUploadRequest(t),o=this.props.attribute.name();this.registerUploadRequest(t,i,{cacheForAttribute:o,callback:()=>h.JeeneeBrowserAPI.editImageMarkup(i,e)})}clearInput(){this.setState({uploadError:void 0}),super.onChange(""),this.fileUploadInput&&$(this.fileUploadInput).val(null),this.cooldown()}cooldown(){this.blockClick=!0,setTimeout((()=>{this.blockClick=!1}),500)}setImage(e){var t;e=d.default.from(e,null===(t=this.props.table)||void 0===t?void 0:t.rootName()),this._lastUploadImage=e,super.onChange(e),this.shouldUseIOSPlaceholder()&&(this._showIOSPlaceholderOnError=!0)}isBlank(){return null==this.props.value||""===this.props.value}inputClick(e){this.blockClick&&(e.stopPropagation(),e.preventDefault())}unsupported(){return s.default.InMobileWebView()&&this.isFileType()&&!this.useNativeFileInterface()}onFilesChosen(e){const t=Object.create(null,{onChange:{get:()=>super.onChange}});return C(this,void 0,void 0,(function*(){this.setState({uploadError:void 0});const i=e.target.files,o=(yield Promise.all(Array.from(i).map(((e,t)=>new Promise((i=>{const o=e.name;if(null!=o&&""!==o){let n="";const a=o.match(/([^\\]*)$/);a&&a[1]&&(n=a[1]);const r={RequestId:this.state.requestId+"-"+String(t),preferredWidth:this.preferredWidth,CallbackFn:i};this.processFile(r,e,n)}else i(null)})))))).filter((e=>Boolean(e)));if(0===o.length)return;b.logger.logEvent(new w.AppMultiImageEvent(v.AppEventName.MultiImageWebUploadCount,{imageUploadCount:o.length}));const n=o.map((e=>JSON.stringify(e))).join(y.default.listDelimiter),a=this.props.value?"".concat(this.props.value).concat(y.default.listDelimiter).concat(n):n;
1t.onChange.call(this,a)}))}onFileChosen(e){this.setState({uploadError:void 0});const t=e.target.value;if(l.default.AddTraceContext("BaseImageTypeInput.onFileChosen"),null!=t&&""!==t){let i="";const o=t.match(/([^\\]*)$/);o&&o[1]&&(i=o[1]);const n=this.createUploadRequest(this.state.requestId,i),a=e.target.files[0];this.processFile(n,a,i)}}getFileSizeTier(e){return e<=100?"0-100MB":e<=200?">100-200MB":e<=300?">200-300MB":e<=400?">300-400MB":e<=500?">400-500MB":">500MB"}processFile(e,t,i){if(s.default.IsFileReaderEnabled()){const o=t;if(o&&o.size>=0){const e=o.size/1048576;S.webFileUploadSizeMetric.record(Math.round(e),{SizeTier:this.getFileSizeTier(e)})}const n=m.Common.makeFileInputHandle(o,this.isFileType(),this.preferredWidth);i&&n.setFileName(i),m.Common.processImage(n,(t=>{m.Common.finishImageReads(e,[n])}),(o=>{l.default.ReportErrorOnce({errorMessage:"Failed to fetch image into in-memory cache",errorDetails:o});const n=(null==t?void 0:t.name)||i||"file";let a='Unable to attach file "'.concat(n,'".');o.endsWith(m.ERROR_EMPTY_DATA_SUFFIX)?a+=" The file is too large for the web browser. Please select a smaller file.":o.startsWith(m.ERROR_FILEREADER_PREFIX)?a+=" The browser could not read the file from your computer. Please check file permissions and try again.":o.startsWith(m.ERROR_IMAGE_RESIZE_PREFIX)?a+=" The image format could not be processed. Please try selecting a different file or a smaller image.":a+=" ".concat(o),this.setState({uploadError:a}),e.CallbackFn&&e.CallbackFn(null)}))}}renderUploadError(){return this.state.uploadError?(0,x.jsx)("div",{className:"ErrorMessage",role:"alert","aria-live":"polite",children:(0,x.jsx)("div",{className:"ErrorMessageText",children:this.state.uploadError})}):null}renderUploadUtils(){const e={};(this.useNativePhotoInterface()||this.useNativeFileInterface()||this.unsupported())&&(e.visibility="hidden");const t=this.props.attribute.shouldUseImageGallery();return(0,x.jsx)("div",{id:"FileUploadUtils"+this.state.requestId,ref:this.onFileUploadUtilsMount,style:(0,p.convertToRtlWhenNecessary)(e),className:"FileUploadUtils",children:(0,x.jsx)("div",{className:"FileUploadForm",children:(0,x.jsx)("input",{"aria-label":this.props.label,className:"FileUploadInput",multiple:t,ref:this._fileUploadInputRef,onChange:t?this.onFilesChosen.bind(this):this.onFileChosen.bind(this),onClick:this.inputClick.bind(this),type:"file",disabled:this.unsupported(),name:"imageInputFile",accept:this.isFileType()?"*/*":"image/*"})})})}}t.default=T},325069:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BaseNumberInputDataTestIds=void 0;var n,a=o(i(593302)),r=o(i(479833)),s=o(i(797398)),l=o(i(386010)),d=o(i(112963)),c=i(847494),u=o(i(249e3)),p=o(i(571524)),h=o(i(150198)),m=i(283002),f=i(278965),g=i(148521);!function(e){e.Input="base-number-type-input"}(n||(t.BaseNumberInputDataTestIds=n={}));class y extends c.BaseTypeInput{constructor(e){super(e),this.state={},this.onChange=this.onChange.bind(this),this.onBlur=this.onBlur.bind(this),this.onWheel=this.onWheel.bind(this),this.executeSliderDrop=this.executeSliderDrop.bind(this),this.onScanResult=this.onScanResult.bind(this),this.renderInlineButtons=this.renderInlineButtons.bind(this),this.executePlus=this.executeStep.bind(this,"plus"),this.executeMinus=this.executeStep.bind(this,"minus")}renderInlineButtons(){if(this.tableMode())return null;const e=super.renderInlineButtons()||[];if(!e.length){const t=this.props.attribute.numberDisplayMode();this.renderReadOnly()||"Label"===t||(e.unshift((0,g.jsx)(d.default,{className:"BaseNumberTypeInput__stepping-button-plus",onTap:this.executePlus,ariaLabel:"Increase value",children:(0,g.jsx)("i",{className:"icon fa fa-fw fa-plus"})},"plus")),e.unshift((0,g.jsx)(d.default,{className:"BaseNumberTypeInput__stepping-button-minus",onTap:this.executeMinus,ariaLabel:"Decrease value",children:(0,g.jsx)("i",{className:"icon fa fa-fw fa-minus"})},"minus")))}return e}componentDidMount(){this.mounted=!0}componentWillUnmount(){this.mounted=!1}focus(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.valueReadOnly()){const t=this.showScannerButton()&&!this.useSlider(),i=this.showNfcScannerButton()&&!this.useSlider();t&&!i&&p.default.InMobileWebView()?e.openCamera&&this.scannerButtonSelected():!t&&i&&p.default.InMobileWebView()?e.openCamera&&this.nfcScannerButtonSelected():!this.scanOnly()&&this.refs.trueInput&&this.refs.trueInput.focus()}}onScanResult(e){e&&this.commitChange(e),$(document.activeElement).trigger("blur"),$(this.refs.input).trigger("blur",{autoAdvance:!0})}prefix(){return""}step(){let e=this.props.attribute.auxData().StepValue;if(!e){const t=this.digits();e=String(Math.pow(.1,t).toFixed(t))}return e}browserStep(){return this.step()}sliderStep(){return Number(this.step())}digits(){const e=this.props.attribute.auxData().DecimalDigits;return null==e?2:e}minValue(){return this.props.attribute.auxData().MinValue}browserMinValue(){return this.minValue()}sliderMinValue(){return Number(this.minValue()||0)}maxValue(){const e=this.props.attribute.auxData(),t=this.minValue()||0,i=this.step();let o;if(i&&null!=e.MaxValue){const n=0;
1o=new a.default(e.MaxValue).minus(t).div(i).round(void 0,n).times(i).plus(t).toString()}else o=e.MaxValue;return o}browserMaxValue(){return this.maxValue()}sliderMaxValue(){return Number(this.maxValue()||100)}executeStep(e,t){let i=parseFloat(this.delocalizedValue());(0,s.default)(i)||(i=(0,s.default)(t)?t:0);const o=new a.default(i),n=new a.default(this.step()),r=o[e](n),l=this.minValue()||0,d="plus"===e?0:3,c=r.minus(l).div(n).round(void 0,d).times(n).plus(l);let u;const p=this.minValue(),h=this.maxValue();u=null!=p&&c.lt(p)?p.toString():null!=h&&c.gt(h)?h.toString():c.toString(),clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout((()=>{const e=this.mounted?this.delocalizedValue():u;this.commitChange(e,{noAutoAdvance:!0,forceUpdate:!0})}),"detail"===this.props.viewType?1e3:250);const m=this.useTelType()?this.localizeValue(u):this.fromWireFormat(u);this.onChange(m),this.mounted&&$(this.refs.trueInput).blur()}executeSliderDrop(e,t){const i=t.toString();this.commitChange(i)}useTelType(e){return!this.useSlider()&&(p.default.IsDeviceWithNoDotOnNumericKeyboard()||this.renderReadOnly()||null!=e&&("Infinity"==e||isNaN(e)))}shouldSelectAllOnFocus(){return!0}localizedValue(){const{transientValue:e}=this.state;return e&&this.useTelType()?this.state.transientValue:this.localizeValue(this.value())}delocalizedValue(){const{transientValue:e}=this.state;return e&&this.useTelType()?this.delocalizeValue(e):this.value()}getNumDigits(e){const t=e.toString().split(".")[1];return null!=t?t.length:0}showThousandsSeparator(){return!1!==this.props.attribute.auxData().ShowThousandsSeparator}localizeValue(e){if(null==e||""===e)return"";const t=Number(e);return this.useTelType()&&this.renderReadOnly()?h.default.formatLocalizedNumber(e,{precision:this.digits(),numericDigits:this.props.attribute.numericDigits(),useGrouping:this.showThousandsSeparator()}):this.useTelType()&&u.default.decimal().supported&&!isNaN(t)?"string"==typeof e&&null!=e.match(/^[-−]?\d+[\.,]$/)?e:h.default.formatLocalizedNumber(e,{precision:this.getNumDigits(e),numericDigits:this.props.attribute.numericDigits(),useGrouping:this.showThousandsSeparator()}):e}delocalizeValue(e){if(null==e||""===e)return"";if(this.useTelType()&&u.default.decimal().supported){const t=u.default.decimal().fromLocaleStr
1ing(e);if(null!=t)return t}return e}toWireFormat(e){return e}fromWireFormat(e){return e}sliderDisplayValue(e){return isNaN(e)?"?":(0,r.default)(e)}onChange(e){const t=e&&e.type?e.target.value:e;this.setState({transientValue:t})}onBlur(e){const t=this.delocalizeValue(e.target.value);super.onChange(t),this.setState({transientValue:null})}onWheel(e){e.target.blur()}commitChange(e,t){super.onChange(e,t),this.mounted&&null!=this.state.transientValue&&this.setState({transientValue:null})}useSlider(){return"Range"===this.props.attribute.numberDisplayMode()&&!this.tableMode()}render(){let e,t,i;const o=this.renderReadOnly();let a;if(a=null!=this.state.transientValue?this.state.transientValue:this.localizedValue(),this.useTelType(a)?(e="tel",t=u.default.decimal().supported?u.default.decimal().pattern.source:void 0):e="number",!o)if(u.default.decimal().supported)i=u.default.decimal().toLocaleString(0,{minimumFractionDigits:this.digits()});else if(this.digits()>0){i="0.";for(let e=0;e<this.digits();e++)i+="0"}else i="0";const r=(0,l.default)("BaseNumberTypeInput",{PercentTypeInput:"Percent"===this.props.attribute.type()}),s=(0,l.default)("BaseNumberTypeInput__prefix",{PercentTypeInput__prefix:"Percent"===this.props.attribute.type()});let d=0,c=0,p=0;this.prefix()&&(d=this.prefix().replace(/&lrm;|\u200E|&rlm;|\u200F/gi,"").length,this.tableMode()?(c=.5,p=.5):(c=.65,p=1));const h=p+c*d,y={paddingLeft:h?"".concat(h,"em"):null},v=c*d,b={lineHeight:this.tableMode()&&this.props.height?"".concat(this.props.height,"px"):null,width:v?"".concat(v,"em"):null},w=this.prefix()?(0,g.jsx)("span",{className:s,style:(0,f.convertToRtlWhenNecessary)(b),children:this.prefix()}):null,S=this.getBaseClassNames();if(this.useSlider())return(0,g.jsx)("div",{className:(0,l.default)(r,S),children:(0,g.jsx)(m.Slider,{step:this.sliderStep(),min:this.sliderMinValue(),max:this.sliderMaxValue(),disabled:this.renderReadOnly(),value:parseFloat(this.value()),onChangeCommitted:this.executeSliderDrop,formStyle:this.props.formStyle,type:this.props.attribute.type(),valueDisplayFunction:this.sliderDisplayValue.bind(this)})});{const s=this.renderInlineButtons(),d=this.getInputStyleWithInlineButtons(s);return(0,g.jsxs)("div",{className:(0,l.default)(r,S),children:[w,(0,g.jsx)("input",{dir:"ltr","aria-label":this.props.label,"data-testid":n.Input,className:"input-block-level",style:(0,f.convertToRtlWhenNecessary)(Object.assign(Object.assign({},y),d)),type:e,ref:"trueInput",autoCorrect:"off",step:this.browserStep(),min:this.browserMinValue(),max:this.browserMaxValue(),lang:u.default.language(),pattern:t,placeholder:i,disabled:o,value:a,onChange:this.onChange,onBlur:this.onBlur,onWheel:this.onWheel,onFocus:this.onFocus},e),(0,g.jsx)("div",{className:"BaseNumberTypeInput__inline-buttons",children:s})]})}}}t.default=y},323409:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.BaseScribbleTypeInput=void 0;var n=o(i(496486)),a=i(667294),r=o(i(386010)),s=o(i(817218)),l=o(i(581827)),d=o(i(365914)),c=i(278965),u=o(i(112963)),p=o(i(895466)),h=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=S(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}(i(593186)),m=i(166089),f=i(351101),g=i(714067),y=i(429815),v=i(515128),b=o(i(944762)),w=i(148521);function S(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(S=function(e){return e?i:t})(e)}var x=function(e,t,i,o){return new(i||(i=Promise))((function(n,a){function r(e){try{l(o.next(e))}catch(e){a(e)}}function s(e){try{l(o.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,s)}l((o=o.apply(e,t||[])).next())}))};class C extends l.default{constructor(e){super(e),this._isMounted=!1,this.baseImageHeight=100,this.baseImageWidth=100,this.canvasRef=(0,a.createRef)(),this.imageRef=(0,a.createRef)(),this.clearMessage="",this.clearOnReset=!0,this.lockedIcon="fa-lock-alt",this.signaturePad=null,this.unlockedIcon="fa-unlock-alt",this.onBackgroun
1dImageLoad=()=>{this.rescaleCanvas()},this.handleResize=n.default.debounce((e=>{this.rescaleCanvas()}),1e3),this.state=this.initialState(e)}get preferredWidth(){var e;const t=(0,y.getMaxImageResolution)(),i=null!==(e=this.state.imageWidth)&&void 0!==e?e:0;return t===g.NO_RESIZE_WIDTH?g.NO_RESIZE_WIDTH:Math.max(t,i)}get tapToUnlock(){return!0}get deferPersistChanges(){return"form"!==this.props.viewType&&!this.supportsNativeImageMarkup()}get showSaveButton(){return null!=this.props.onSave||this.deferPersistChanges}get transaction(){const{useTransactions:e}=this.props;return e?m.AppGlobals.AppModel.dataManager.currentTransaction:void 0}get canvasDataUrl(){var e,t;return null!==(t=null===(e=this.signaturePad)||void 0===e?void 0:e.toDataURL())&&void 0!==t?t:""}shouldUseIOSPlaceholder(){return!1}focus(){}onEditMarkupClick(){const e=this.valueHandle.isBlank()?"BLANK":this.valueHandle.value();this.supportsNativeImageMarkup(this.valueHandle)&&e&&this.startNativeImageMarkup(encodeURIComponent(e))}initialState(e){return n.default.extend(super.initialState(e),{locked:!e.startUnlocked,color:"black",imageWidth:e.imgWidth,imageHeight:e.imgHeight})}get originalValueHandle(){const{attribute:e,table:t,rowKey:i,rowId:o}=this.props;if(this.state.transientValue)return p.default.from(this.props.value,
1null==t?void 0:t.name());const n=null==t?void 0:t.lookupTableRow(i||o,this.pendingTransaction);if(n){const i=this.transaction?this.transaction.getInitialRowValues(t.name(),n.stableId):n.values,o=null==i?void 0:i[e.name()];if(o)return p.default.from(o,null==t?void 0:t.name())}return null}getBaseCanvasValue(){var e,t,i;return null!==(i=null===(t=(e=this.props).getBaseCanvasValue)||void 0===t?void 0:t.call(e))&&void 0!==i?i:p.default.from("")}runInitialValueHandle(){return x(this,void 0,void 0,(function*(){const{table:e,attribute:t,dataContext:i}=this.props,o=null==e?void 0:e.name(),n=t.defaultExpressionEvalTree();if(n){const e=n.run(i);if(e)return p.default.from(e,o)}return this.getBaseCanvasValue()}))}componentDidMount(){this._isMounted=!0,this.initializeCanvas(),this.rescaleCanvas(),window.addEventListener("resize",this.handleResize)}componentWillUnmount(){this._isMounted=!1,this.signaturePad.off(),window.removeEventListener("resize",this.handleResize)}updateState(e){}shouldComponentUpdate(e,t){if(this.props.value!==e.value)return!0;if(d.default.compareObjs(this.state,t).length)return!0;const i=d.default.compareObjs(this.props,e);return 1!==i.length||"focused"!==i[0]}componentDidUpdate(){this.flattenIfNeeded(this.valueHandle).then((e=>{var t;e&&this.imageRef.current&&(this.imageRef.current.src=e),(null===(t=this.signaturePad)||void 0===t?void 0:t.isEmpty())||this.initializeCanvas(),this.rescaleCanvas()}))}imageWidth(){return this.state.imageWidth||this.baseImageWidth}imageHeight(){return this.state.imageHeight||this.baseImageHeight}initializeCanvas(){this.signaturePad&&this.teardownCanvas(),this.signaturePad=new s.default(this.canvasRef.current,{penColor:this.state.color,onEnd:()=>this.handleUserDrawEvent(this.canvasDataUrl)})}teardownCanvas(){this.signaturePad.off(),this.signaturePad=null}get valueHandle(){var e;const t=this.value(),i=null===(e=this.props.table)||void 0===e?void 0:e.name();return p.default.from(t,i)}setNextValue(e){return x(this,arguments,void 0,(function(e){var t=this;let{sendChanges:i=!this.deferPersistChanges}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){yield t.flattenIfNeeded(e),i?t.sendChanges(e):t.setState({transientValue:e})}()}))}rescaleCanvas(){var e,t,i;try{const o=this.canvasRef.current;if(!o)return;const n=parseInt(null!==(t=null===(e=o.attributes.getNamedItem("width"))||void 0===e?void 0:e.value)&&void 0!==t?t:"0"),a=parseFloat(window.getComputedStyle(o).width);if(n&&a){const e=n/a;null===(i=o.getContext("2d"))||void 0===i||i.setTransform(e,0,0,e,0,0);const t=this.imageRef.current;let r;if(t&&t.height&&t.width)r=t.height;else{const e=this.baseImageHeight/this.baseImageWidth;r=Math.floor(a*e)}const s=Math.floor(a);this.state.imageWidth===s&&this.state.imageHeight===r||this.setState({imageWidth:s,imageHeight:r})}}catch(e){h.default.ReportErrorOnce({errorMessage:"Unexpected Error in rescaleCanvas",error:(0,v.asError)(e)})}}normalScaleCanvas(){var e,t;null===(t=null===(e=this.canvasRef.current)||void 0===e?void 0:e.getContext("2d"))||void 0===t||t.setTransform(1,0,0,1,0,0)}handleResetTap(){return x(this,void 0,void 0,(function*(){this.renderReadOnly()||(this.clearOnReset&&this.setNextValue(yield this.runInitialValueHandle()),this.handleUnlock())}))}handleUndoTap(){return x(this,void 0,void 0,(function*(){const e=this.valueHandle,t=this.originalValueHandle,i=e.nestedHandle();let o;e.equals(t)&&!e.equals(o=yield this.runInitialValueHandle())?this.setNextValue(o):i?this.setNextValue(i):e.isBlank()?this.setNextValue(null!=t?t:yield this.runInitialValueHandle()):this.setNextValue(this.getBaseCanvasValue())}))}handleUnlock(){setTimeout((()=>{this._isMounted&&this.setState({locked:!1})}))}handleLock(){this.setState({locked:!0,transientValue:void 0})}handleUserDrawEvent(e){const t=p.default.from(e);this.valueHandle.isBlank()||t.setNestedHandle(this.valueHandle),this.setNextValue(t)}flattenIfNeeded(e){return new Promise((t=>{(e.nestedHandle()||e.isIosHandle())&&null==e.cachedFlattened()?e.flatten(((e,i)=>{e?((0,h.errorToDevConsole)(e),t(void 0)):t(i)})):t(void 0)}))}handleSave(){return x(this,void 0,void 0,(function*(){var e,t;yield this.setNextValue(this.valueHandle,{sendChanges:!0}),this.handleLock(),null===(t=(e=this.props).onSave)||void 0===t||t.call(e,this.valueHandle)}))}sendChanges(e){var t,i;null===(i=(t=this.props).onValueChange)||void 0===i||i.call(t,e,{noAutoAdvance:!0,forceUpdate:!0})}setImage(e){this.setNextValue(e)}
1setColor(e){this.signaturePad.penColor=e,this.signaturePad._ctx.fillStyle=e,this.setState({color:e})}showPhotoControl(){return!1}renderBlocker(){const e=this.state.locked||this.renderReadOnly(),t=(0,r.default)("BaseScribbleTypeInput__blocker",{"BaseScribbleTypeInput__blocker-transparent":!this.tapToUnlock}),i=this.tapToUnlock?()=>this.handleResetTap():null,o=this.props.appModel?this.props.appModel.MapActionName("Tap to unlock"):"Tap to unlock";return(0,w.jsx)(u.default,{className:t,preventDefault:!e,onTap:i,ariaLabel:o,children:o})}renderBackgroundImage(){var e,t;const i=this.valueHandle;if(!i.isBlank()){const o=i.nestedHandle()||i.isIosHandle()?null!==(e=i.cachedFlattened())&&void 0!==e?e:"":null!==(t=i.resolve())&&void 0!==t?t:"";return(0,w.jsx)("img",{style:(0,c.convertToRtlWhenNecessary)({height:this.props.imgHeight}),ref:this.imageRef,src:o,alt:"",onLoad:this.onBackgroundImageLoad})}}render(){const e=this.getBaseClassNames(),t=this.state.locked||this.renderReadOnly(),i=(0,r.default)(e,Object.assign({BaseScribbleTypeInput:!0,"BaseScribbleTypeInput--locked":t,"BaseScribbleTypeInput--tap-to-unlock":t&&this.tapToUnlock},this.classNames||null)),o=t?this.lockedIcon:this.unlockedIcon;let n,a="";if(t)a=this.renderReadOnly()?"":this.clearMessage;else if(this.showSaveButton&&!t){const e=(0,f.mapActionName)("Done");n=(0,w.jsx)(u.default,{className:"BaseScribbleTypeInput__save",onTap:()=>this.handleSave(),ariaLabel:e,children:e})}const s=this.colors&&(0,w.jsx)("div",{className:"BaseScribbleTypeInput__color-picker",children:(0,w.jsx)(b.default,{readOnly:this.renderReadOnly(),selected:this.state.color?[this.state.color.toLowerCase()]:[],options:this.colors,listAttribute:this.props.attribute,elementAttribute:this.props.attribute,colorMode:!0,colorModeScaleToFit:!0,ignoreCase:!0,width:this.props.width,onChange:e=>{const t=e[0]||"";this.setColor(t)}})}),l=!t&&this.showPhotoControl()&&(0,w.jsxs)("div",{className:"BaseScribbleTypeInput__photo-control",children:[(0,w.jsx)(u.default,{className:"fa fa-camera BaseScribbleTypeInput__photo-control--button",onTap:()=>this.onPhotoControlClick(),title:"Upload image"}),this.renderUploadUtils()]}),d=(null!=s?s:l)&&(0,w.jsxs)("div",{className:"BaseScribbleTypeInput__footer",children:[s,l]}),p=n||(0,w.jsxs)(u.default,{className:"BaseScribbleTypeInput__lock",onTap:()=>t?this.handleResetTap():this.handleLock(),ariaLabel:t?"Lock":"Unlock",children:[(0,w.jsx)("span",{className:"fa "+o,"aria-hidden":"true"}),a]}),h=(0,w.jsx)(u.default,{className:"BaseScribbleTypeInput__clear--button iconContainer",onTap:()=>this.handleUndoTap(),preventDefault:!0,title:"Undo",children:(0,w.jsx)("i",{className:"fa fa-rotate-left","aria-hidden":"true"})});return(0,w.jsxs)("div",{className:i,children:[(0,w.jsxs)("div",{className:"BaseScribbleTypeInput__top-menu",children:[p,h]}),(0,w.jsxs)("div",{className:"BaseScribbleTypeInput__canvas-container","data-testid":"scribble-canvas-container",children:[(0,w.jsx)("div",{className:"BaseScribbleTypeInput__image-container",style:(0,c.convertToRtlWhenNecessary)({height:this.imageHeight()}),children:this.renderBackgroundImage()}),(0,w.jsx)("canvas",{className:"BaseScribbleTypeInput__canvas resizable",ref:this.canvasRef,width:this.imageWidth(),height:this.imageHeight()})]}),this.renderBlocker(),d]})}}t.BaseScribbleTypeInput=C},847494:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.BaseTypeInput=void 0;var n=o(i(496486)),a=o(i(386010)),r=o(i(112963)),s=o(i(571524)),l=o(i(593186)),d=i(263198),c=i(300431),u=i(166089),p=i(557310),h=i(44617),m=i(148521);class f extends c.ViewAwareComponent{constructor(e){super(e),this.getInputStyleWithInlineButtons=e=>{if(!e||!e.length)return{};const t=e.length;return{paddingRight:"".concat(45*t,"px")}},this.renderInlineButtons=this.renderInlineButtons.bind(this),this.scannerButtonSelected=this.scannerButtonSelected.bind(this),this.nfcScannerButtonSelected=this.nfcScannerButtonSelected.bind(this),this.onFocus=this.onFocus.bind(this),this.onChange=this.onChange.bind(this),this.onKeyDown=this.onKeyDown.bind(this)}showScannerButton(){const{attribute:e,appModel:t}=this.props;return!this.valueReadOnly()&&e.isScannable()&&e.shouldShowScannerButtons()&&!t.appTemplate.scanningDisabled}showNfcScannerButton(){const e=this.props.attribute;return!this.valueReadOnly()&&e.isNfcScannable()&&e.shouldShowScannerButtons()}scannerButtonSelected(){this.onScanResult&&d.JeeneeBrowserAPI.openScanner(this.onScanResult)}nfcScannerButtonSelected(){this.onScanResult&&d.JeeneeBrowserAPI.startNfcScan(this.onScanResult)}tableMode(){return"table"===this.props.viewType}renderInlineButtons(){if(this.tableMode())return null;const e=[];return this.showScannerButton()&&e.push((0,m.jsx)(r.default,{className:"BaseTypeInput__scanner",title:"Open Scanner",onTa
1p:this.scannerButtonSelected,children:(0,m.jsx)("i",{className:"icon fa fa-fw fa-qrcode"})},0)),this.showNfcScannerButton()&&e.push((0,m.jsx)(r.default,{className:"BaseTypeInput__nfc-scanner",title:"Start NFC Scan",onTap:this.nfcScannerButtonSelected,children:(0,m.jsx)("i",{className:"icon fa fa-fw fa-wifi"})},1)),e}onChange(e,t){this.valueReadOnly()||this.props.onValueChange&&this.props.onValueChange(e,t)}shouldSelectAllOnFocus(){return!1}onFocus(e){if(!u.AppGlobals.AppModel||!u.AppGlobals.AppModel.inRollout("skipSetSelectionRange")){const e=this.refs.input||this.refs.trueInput;e&&"function"==typeof e.setSelectionRange&&this.shouldSelectAllOnFocus()&&n.default.includes(["text","search","url","tel","password"],e.type)&&e.setSelectionRange(0,e.value.length)}}value(){return this.state&&null!=this.state.transientValue?this.state.transientValue:this.props.value}valueReadOnly(){return!1===this.props.editable}scanOnly(){const{attribute:e,appModel:t}=this.props;return!(!e||!t)&&(!t.allowScanOverride()&&(e.isScannable()||e.isNfcScannable()))}renderReadOnly(){return this.valueReadOnly()||this.scanOnly()}allowAddRef(e){const{useTransactions:t,viewType:i,isInline:o}=this.props,n=p.ReactRootUIConfig.isReactRoot()&&this.canLaunchRelatedForm(e.name()),a=t&&"form"===i,r=a&&o;return e.allowsAdd()&&!this.tableMode()&&!r&&(!a||n)}focus(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.valueReadOnly()){const t=this.showScannerButton(),i=this.showNfcScannerButton();t&&!i&&s.default.InMobileWebView()?e.openCamera&&this.scannerButtonSelected():!t&&i&&s.default.InMobileWebView()?e.openCamera&&this.nfcScannerButtonSelected():!this.scanOnly()&&this.refs.input&&("function"==typeof this.refs.input.focus?this.refs.input.focus():l.default.warnToDevConsole("input ref has no method 'focus'"))}}getBaseClassNames(){const e=this.props.attribute,t=this.props.value,i=this.state&&this.state.transientValue;return(0,a.default)("BaseTypeInput",{"BaseTypeInput--invalid":!1===this.props.valid||null==i&&!e.validateValue(t),"BaseTypeInput--missingRequired":this.props.missingRequired||null!=i&&e.missingRequired(t),"BaseTypeInput--disabled":this.renderReadOnly()})}onKeyDown(e){h.dynamicRollouts.includeByOwnerId("InputsWithIMEWorkaround")&&"Enter"===e.key&&this.state.isComposing&&e.stopPropagation()}}t.BaseTypeInput=f,f.supportsValidOptions=!1},107221:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BooleanTypeInputDataTestIds=void 0;var n,a=o(i(685490)),r=o(i(925465)),s=o(i(386010)),l=o(i(150198)),d=i(847494),c=o(i(944762)),u=i(56749),p=i(557310),h=i(278965),m=i(148521);!function(e){e.Input="boolean-type-input"}(n||(t.BooleanTypeInputDataTestIds=n={}));class f extends d.BaseTypeInput{render(){const e="Y",t="N",i=l.default.booleanValueFromWireFormat(this.props.value);let o,d;o=!0===i?[e]:!1===i?[t]:[];let f={flex:1,textAlign:"right"};if("Switch"===this.props.yesNoMode)d=(0,m.jsx)("div",{className:(0,s.default)({SwitchContainerSideBySide:"Side-by-side"===this.props.slideshowDisplayMode&&p.ReactRootUIConfig.isInDesktopExperience()}),children:(0,m.jsx)(a.default,{disabled:this.renderReadOnly(),color:"primary",checked:!!i,onClick:()=>{const o=i?t:e;this.props.onValueChange&&this.props.onValueChange(o)},inputProps:{"aria-label":"Toggle button"}})});else if("Checkbox"===this.props.yesNoMode){const o={};"compact"===this.props.viewMode&&(o.padding=0,o.width="20px"),d=(0,m.jsx)(r.default,{style:(0,h.convertToRtlWhenNecessary)(o),color:"primary",disabled:this.renderReadOnly(),checked:!!i,onClick:()=>{const o=i?t:e;this.props.onValueChange&&this.props.onValueChange(o)},inputProps:{"aria-label":"Checkbox"}})}else f={},d=(0,m.jsx)(c.default,{readOnly:this.renderReadOnly(),selected:o,options:[t,e],largeText:!0,listAttribute:this.props.attribute,elementAttribute:this.props.attribute,table:this.props.table,dataContext:this.props.dataContext,appModel:this.props.appModel,width:this.props.width,onChange:e=>{this.props.onValueChange&&this.props.onValueChange(e[0]||"")}});const g=this.getBaseClassNames();return(0,m.jsx)("div",{"data-testid":n.Input,className:(0,s.default)("BooleanTypeInput","BooleanTypeInput-".concat(this.props.yesNoMode),g),style:(0,h.convertToRtlWhenNecessary)(f),children:(0,m.jsx)(u.ASThemeProvider,{children:d})})}}t.default=f},346516:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(954797));class a extends n.default{renderReadOnly(){return!0}}t.default=a},833494:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(138198)),a=o(i(190644));class r extends n.default{renderReadOnly(){return!0}isChangeTriggered(){return!0}componentDidMount(){a.default.ifAvailable()}}t.default=r},415664:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(948464));class a extends n.default{renderReadOnly(){return!0}isChangeTriggered(){return!0}}t.default=a},641810:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(847494),a=o(i(386010)),r=o(i(944762)),s=i(148521);class l extends n.BaseTypeInput{render(){const e=this.props.attribute.auxData().EnumValues||[],t=this.getBaseClassNames();return(0,s.jsx)("div",{className:(0,a.default)("ColorTypeInput",t),children:(0,s.jsx)(r.default,{readOnly:this.renderReadOnly(),selected:this.props.value?[this.props.value.toLowerCase()]:[],options:e,listAttribute:this.props.attribute,elementAttribute:this.props.attribute,colorMode:!0,ignoreCase:!0,width:this.props.width,onChange:e=>{const t=e[0]||"";this.props.onValueChange&&this.props.onValueChange(t)}})})}}t.default=l},29975:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(730381)),a=o(i(386010)),r=i(847494),s=o(i(150198)),l=o(i(249e3)),d=o(i(365914)),c=i(148521);const u=s.default.validators.DateTime,p="MM/DD/YYYY HH:mm:ss";class h extends r.BaseTypeInput{constructor(e){super(e),this.state={value:"",ISO:""};const t=new Date;t.setHours(12,0,0);const i=(0,n.default)(t).format(p);this.placeholder=this.localizeValue(i),this.onChange=this.onChange.bind(this),this.onBlur=this.onBlur.bind(this)}UNSAFE_componentWillMount(){this.updateISO(this.props)}UNSAFE_componentWillReceiveProps(e){this.updateISO(e)}updateISO(e){if(e.value!==this.state.value){const t=null!=e.value?e.value:"";let i="";if(null!=t&&""!==t&&u(t)){const e=new Date(t);i=d.default.getDateTimeString(e)}this.setState({value:t,ISO:i})}}normalizeValue(e){let t,i="";const o=e.match(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d(?::[0-5]\d(?:\.\d+)?)?([+-][0-2]\d:[0-5]\d|Z)?$/);return o&&null==o[1]?(e=e.split(/\.\d{3}$/)[0],this.props.attribute.ignoreSeconds()&&e.match(/\d{2}:\d{2}:\d{2}$/)&&(e=e.replace(/\d{2}$/,"00")),t=d.default.getDateFromDateTimeString(e),i=e):null!=o&&(t=new Date(e),i=d.default.getDateTimeString(t)),{value:e,rawDate:t,iso:i}}onChange(e){this.setState({transientValue:e.target.value})}onBlur(e){const t=e.target.value;let i="";if(t){const e=this.props.attribute,o=e.useLongDateFormat(),n=e.ignoreSeconds(),a=d.default.fromLocaleDateTimeString(t,o,n);i=this.props.attribute.valueToWireFormat(a)}super.onChange(i),this.setState({transientValue:null})}isChangeTriggered(){return!1}localizedValue(){return null!=this.state.transientValue?this.state.transientValue:this.localizeValue(this.props.value)}localizeValue(e){if(null==e||""===e)return"";const t=(0,n.default)(e,p,!0).toDate();if(isNaN(t.getTime()))return e;const i=this.props.attribute,o=i.useLongDateFormat(),a=i.ignoreSeconds();return d.default.toLocaleDateTimeString(t,o,a)}render(){const e=this.getBaseClassNames();return(0,c.jsx)("input",{"aria-label":this.props.label,type:"text",ref:"input",lang:l.default.language(),className:(0,a.default)("DateTimeTypeInput","input-block-level",e,{ChangeTriggeredValue:this.isChangeTriggered()}),autoComplete:"off",autoCorrect:"off",disabled:this.renderReadOnly(),placeholder:this.placeholder,value:this.localizedValue(),onBlur:this.onBlur,onChange:this.onChange})}}t.default=h},948464:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.DateTimeInputDataTestIds=void 0;var n,a=o(i(238416)),r=o(i(386010)),s=i(847494),l=o(i(150198)),d=o(i(571524)),c=o(i(365914)),u=o(i(29975)),p=i(278965),h=i(148521);function m(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}!function(e){e.Input="date-time-type-input"}(n||(t.DateTimeInputDataTestIds=n={}));const f=l.default.validators.DateTime;class g extends s.BaseTypeInput{constructor(e){super(e),this.state={value:"",ISO:""},this.onChange=this.onChange.bind(this),this.onBlur=this.onBlur.bind(this)}UNSAFE_componentWillMount(){this.updateISO(this.props)}UNSAFE_componentWillReceiveProps(e){this.updateISO(e)}updateISO(e){if(null==this.state.transientValue&&e.value!==this.state.value){const t=null!=e.value?e.value:"";let i="";if(null!=t&&""!==t&&f(t)){const e=new Date(t);i=c.default.getDateTimeString(e)}const o={value:t,ISO:i};this.setState(o)}}normalizeValue(e){let t,i="";const o=e.match(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d(?::[0-5]\d(?:\.\d+)?)?([+-][0-2]\d:[0-5]\d|Z)?$/);o&&null==o[1]?(e=e.split(/\.\d{3}$/)[0],this.props.attribute.ignoreSeconds()&&e.match(/\d{2}:\d{2}:\d{2}$/)&&(e=e.replace(/\d{2}$/,"00")),t=c.default.getDateFromDateTimeString(e),i=e):null!=o&&(t=new Date(e),i=c.default.getDateTimeString(t));return{value:e,rawDate:t,iso:i}}onChange(e){this.setState({transientValue:e.target.value});const t=e.nativeEvent.target;window.setTimeout((()=>{t.defaultValue=""}),0)}onBlur(e){const{value:t,rawDate:i,iso:o}=this.normalizeValue(e.target.value||"");if(o){const e=c.default.MDYHMSformat(i||null,!0);this.setState({ISO:o,value:e,transientValue:null},(()=>super.onChange(e)))}else this.setState({ISO:"",value:t,transientValue:null},(()=>super.onChange(t)))}isChangeTriggered(){return!1}step(){return this.props.attribute.ignoreSeconds()?60:1}
1componentDidMount(){if(d.default.SupportsDateTimeInputs()&&this.refs.input){const e=this.refs.input.value;this.refs.input.value="",this.refs.input.defaultValue="",this.refs.input.value=e}}componentDidUpdate(){this.refs.input&&(this.refs.input.defaultValue="")}render(){const e=this.getBaseClassNames();if(d.default.SupportsDateTimeInputs()){let t=this.state.transientValue;null==t&&(t=this.normalizeValue(this.state.ISO||this.state.value).value);const{MinValue:i,MaxValue:o}=this.props.attribute.auxData(),a=!d.default.IsFirefoxBrowser();return(0,h.jsxs)("div",{className:(0,r.default)("DateTimeTypeInput","input-block-level",e),children:[(0,h.jsx)("input",{className:(0,r.default)("DateTimeTypeInput","input-block-level",{ChangeTriggeredValue:this.isChangeTriggered(),DateOrTimeInputRtl:(0,p.shouldApplyRtlStyles)()}),"aria-label":this.props.label,"data-testid":n.Input,type:"datetime-local",ref:"input",max:o||"9999-12-31T00:00:00.0",min:i,step:this.step(),autoComplete:"off",autoCorrect:"off",disabled:this.renderReadOnly(),value:t,onBlur:this.onBlur,onChange:this.onChange}),a&&(0,h.jsx)("div",{className:"DateTimeTypeInput__inline-buttons","data-testid":"picker-indicator",children:(0,h.jsx)("i",{className:"far fa-calendar-alt"})})]})}return(0,h.jsx)(u.default,function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?m(Object(i),!0).forEach((function(t){(0,a.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):m(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},this.props))}}t.default=g},10428:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(667294),a=o(i(730381)),r=o(i(386010)),s=i(847494),l=o(i(571524)),d=o(i(249e3)),c=o(i(365914)),u=i(278965),p=i(148521);class h extends s.BaseTypeInput{constructor(e){super(e),this.state={transientValue:null},this.onChange=this.onChange.bind(this),this.onBlur=this.onBlur.bind(this),this.inputRef=(0,n.createRef)()}shouldSelectAllOnFocus(){return this.useTextType()}onChange(e){let t=e.target.value;const i=this.state.transientValue||"";if(this.useTextType()&&d.default.date().supported){const e=d.default.date().dateFormat;if(i.length===t.length-1){const o=e.slice(0,t.length),n=i[i.length-1],a=t[t.length-1],r=e[t.length];if(a===n&&a!==r&&!/\w/.test(a))return;if(!/\w/.test(r)){new RegExp(("^"+o).replace(/[DMY]/g,"\\d")).test(t)&&(t+=r)}}}this.setState({transientValue:t});const o=e.nativeEvent.target;window.setTimeout((()=>{o.defaultValue=""}),0)}onBlur(e){let t=e.target.value;if(this.useTextType())t=this.delocalizeValue(t);else{const e=(0,a.default)(t,"YYYY-MM-DD").toDate();isNaN(e.getTime())||(t=c.default.MDYformat(e,!0))}super.onChange(t),this.setState({transientValue:null})}isChangeTriggered(){return!1}step(){return 1}useTextType(){return!l.default.SupportsDateTimeInputs()}localizedValue(){if(null!=this.state.transientValue)return this.state.transientValue;const e=this.props.value;return null==e||""===e?"":this.localizeValue(e)}localizeValue(e){if(null==e||""===e)return"";const t=d.default.date().momentFromWireFormat(e).toDate();return isNaN(t.getTime())?e:this.useTextType()?c.default.toLocaleDateString(t):c.default.YMDformat(t,!0)}delocalizeValue(e){if(null==e||""===e)return"";
1if(this.useTextType()){const t=d.default.date().fromLocaleString(e);if(null!=t)return t}return e}componentDidMount(){if(!this.useTextType()&&this.inputRef){const e=this.inputRef.current.value;this.inputRef.current.value="",this.inputRef.current.defaultValue="",this.inputRef.current.value=e}}componentDidUpdate(){!this.useTextType()&&this.inputRef&&(this.inputRef.current.defaultValue="")}render(){let e,t=null;const i=this.localizedValue(),o=this.getBaseClassNames(),n=!l.default.IsFirefoxBrowser();if(this.useTextType()){e="text";const i=d.default.date();t=((null==i?void 0:i.dateFormat)||"mm/dd/yyyy").toLowerCase()}else e="date";return(0,p.jsxs)("div",{className:(0,r.default)("DateTypeInput","input-block-level",o),children:[(0,p.jsx)("input",{className:(0,r.default)({DateOrTimeInputRtl:(0,u.shouldApplyRtlStyles)()}),"aria-label":this.props.label,type:e,ref:this.inputRef,max:"9999-12-31",lang:d.default.language(),step:this.step(),autoComplete:"off",autoCorrect:"off",value:i,placeholder:t,disabled:this.renderReadOnly(),onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur}),n&&(0,p.jsx)("div",{className:"DateTimeTypeInput__inline-buttons",children:(0,p.jsx)("i",{className:"far fa-calendar-alt"})})]})}}t.default=h},256023:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(325069));class a extends n.default{}t.default=a},539479:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.DrawingTypeInput=void 0;var n=o(i(386010)),a=i(323409),r=i(645429),s=i(148521);class l extends a.BaseScribbleTypeInput{constructor(e){super(e),this.baseImageWidth=500,this.baseImageHeight=400,this.clearMessage="",this.clearOnReset=!1,this.colors=["black","red","orange","yellow","green","blue","purple"]}showPhotoControl(){return!0}render(){if(!this.supportsNativeImageMarkup())return super.render();const e=this.getBaseClassNames(),t=(0,n.default)(e,Object.assign({BaseScribbleTypeInput:!0},this.classNames||null));return(0,s.jsx)(r.AndroidDrawingInputContent,{baseClasses:t,imageHeight:this.imageHeight(),imageWidth:this.imageWidth(),canvasRef:this.canvasRef,backgroundImageComponent:this.renderBackgroundImage(),fileUploadComponent:this.renderUploadUtils(),onPhotoControlClick:this.onPhotoControlClick.bind(this),onEditMarkupClick:this.onEditMarkupClick.bind(this),clearInput:()=>{this.setNextValue(this.getBaseCanvasValue())},isReadOnly:this.valueReadOnly()})}}t.DrawingTypeInput=l;t.default=l},726134:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(386010)),a=i(847494),r=o(i(365914)),s=i(148521);class l extends a.BaseTypeInput{constructor(e){super(e),this.state=this.initialState(),this.onChange=this.onChange.bind(this),this.onBlur=this.onBlur.bind(this)}initialState(){return{transientValue:null}}normalizeValue(e){const t=this.props.attribute.ignoreSeconds();return r.default.fromDurationString(e,t)}onChange(e){this.setState({transientValue:e.target.value})}onBlur(e){const t=this.normalizeValue(e.target.value);super.onChange(t),this.setState({transientValue:null})}render(){const e=this.props.attribute.ignoreSeconds();let t=this.state.transientValue;null==t&&(t=r.default.toDurationString(this.props.value,e)||"");const i=this.getBaseClassNames();return(0,s.jsx)("div",{className:(0,n.default)("DurationTypeInput",i),children:(0,s.jsx)("input",{"aria-label":this.props.label,type:"text",ref:"input",className:"input-block-level",placeholder:e?"hh:mm":"hh:mm:ss",autoCorrect:"off",value:t,disabled:this.renderReadOnly(),onBlur:this.onBlur,onChange:this.onChange})})}}t.default=l},811123:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(238416)),a=o(i(386010)),r=i(847494),s=i(249492),l=o(i(12330)),d=i(166089),c=i(338590),u=i(496486),p=i(148521);function h(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function m(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};
1t%2?h(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):h(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}const f=e=>"string"==typeof e?e:e.label;class g extends r.BaseTypeInput{constructor(e){super(e),this.debouncedAutoComplete=(0,u.debounce)((e=>{var t,i;return(0,c.autoComplete)(e,null===(i=null===(t=d.AppGlobals.AppModel)||void 0===t?void 0:t.AppTemplate)||void 0===i?void 0:i.OwnerId).then((e=>{this.setState({candidates:e.suggestions})}))}),1e3,{leading:!0,trailing:!0,maxWait:3e3}),this.state=this.initialState()}initialState(){return{isOpen:!1,transientValue:null,candidates:[]}}onValueChange(e){super.onChange(e),this.setState({transientValue:null})}componentDidUpdate(){const{isOpen:e,transientValue:t}=this.state;e||null==t||(this.onValueChange(t),this.setState({transientValue:null}))}render(){const e=this.getBaseClassNames();return(0,p.jsx)(l.default,{className:(0,a.default)(e,"Control","TextControl","ComboBoxControl","email-autocomplete"),open:this.state.isOpen,freeSolo:!0,disableClearable:!0,autoSelect:!0,disabled:this.renderReadOnly(),onChange:(e,t,i)=>{"select-option"!==i&&"blur"!==i||this.setState({transientValue:t.emailAddress})},onOpen:()=>{this.setState({isOpen:!0})},onClose:()=>{this.setState({isOpen:!1})},onInputChange:(e,t,i)=>{"reset"!==i&&(this.setState({transientValue:t}),this.debouncedAutoComplete(t))},value:this.value()||"",options:this.state.candidates,getOptionLabel:f,getOptionSelected:(e,t)=>f(e)===f(t),filterOptions:e=>e.filter((e=>!!this.state.transientValue&&-1!==e.emailAddress.toLowerCase().indexOf(this.state.transientValue.toLowerCase()))),renderInput:e=>(0,p.jsx)(s.TextField,m(m({},e),{},{variant:"standard",value:this.value()||"",InputProps:Object.assign(Object.assign({},e.InputProps),{disableUnderline:!0,style:{paddingBottom:0}}),inputProps:Object.assign(Object.assign({},e.inputProps),{"aria-label":this.props.label,dir:"ltr"}),onCompositionStart:()=>{this.setState({isComposing:!0})},onCompositionEnd:()=>{this.setState({isComposing:!1})},onKeyDown:this.onKeyDown}))})}}t.default=g},318887:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(386010)),a=i(847494),r=i(148521);class s extends a.BaseTypeInput{constructor(e){super(e),this.state=this.initialState(),this.onChange=this.onChange.bind(this),this.onBlur=this.onBlur.bind(this)}initialState(){return{}}onChange(e){this.setState({transientValue:e.target.value})}onBlur(e){super.onChange(e.target.value),this.setState({transientValue:null})}render(){const e=this.value()||"",t=this.getBaseClassNames();return(0,r.jsx)("div",{className:(0,n.default)("EmailTypeInput",t),children:(0,r.jsx)("input",{dir:"ltr","aria-label":this.props.label,type:"email",ref:"input",className:"input-block-level",autoCorrect:"off",value:e,disabled:this.renderReadOnly(),onBlur:this.onBlur,onChange:this.onChange,onCompositionStart:()=>{this.setState({isComposing:!0})},onCompositionEnd:()=>{this.setState({isComposing:!1})},onKeyDown:this.onKeyDown})})}}t.default=s},352565:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(901816));class a extends n.default{allowMultiSelect(){return!0}}t.default=a},923769:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(901816));class a extends n.default{allowMultiSelect(){return!1}}t.default=a},734820:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(386010)),a=i(263198),r=o(i(581827)),s=o(i(525965)),l=i(365914),d=i(148521);class c extends r.default{isFileType(){return!0}useNativePhotoInterface(){return!1}startNativeInput(e){a.JeeneeBrowserAPI.chooseFile(e)}preloadImage(){}render(){const e=this.props.value,t=this.renderReadOnly()?null:this.renderUploadUtils(),i=!this.renderReadOnly()&&(0,d.jsx)(s.default,{onTap:()=>this.onPhotoControlClick(),className:(0,n.default)("PhotoInputControl","InputControl",{ClearInput:!this.isBlank(),disabled:this.unsupported()}
1),title:"Choose File",children:(0,d.jsx)("i",{className:"icon fa fa-fw fa-file-pdf"})});let o=e||"";if(e&&"object"==typeof e)o=this.state.fileName||this.props.appModel.MapActionName("Delete");else{const e=(0,l.getTableFileQueryParsed)(o).fileName||o;o=(0,l.getFileNameFromPath)(e)||o}let a=null;!o||!this.isFileType()&&this.renderReadOnly()||(a=(0,d.jsxs)("div",{className:"PhotoInputControlBase__selected",children:[(0,d.jsx)("span",{className:"FileName",children:o}),!this.renderReadOnly()&&(0,d.jsx)(s.default,{className:"ClearInput",onTap:this.clearInput.bind(this),title:"Clear File",children:(0,d.jsx)("i",{className:"icon fa fa-fw fa-close"})})]}));const r=this.getBaseClassNames();return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:(0,n.default)("PhotoInputControlBase","FileInputControlBase",r),children:[i,a,t]}),this.renderUploadError()]})}}t.default=c},656798:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(238416)),a=o(i(386010)),r=o(i(665166)),s=i(249492),l=o(i(735996)),d=o(i(820164)),c=o(i(581827)),u=o(i(112963)),p=o(i(480952)),h=o(i(895466)),m=i(351101),f=i(539479),g=i(901545),y=i(278965),v=i(148521);function b(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function w(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?b(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):b(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}class S extends c.default{constructor(){super(...arguments),this.preloaded=new Map}componentDidMount(){this.preloadImage()}componentDidUpdate(){super.componentDidUpdate(),this.preloadImage()}preloadImage(){const{url:e,imageHandle:t}=this.state;if(this.isBlank())this.preloaded.clear();else if(e&&!this.preloaded.has(e)){this.preloaded.set(e,void 0);const i=t=>{this.preloaded.set(e,t.src),this.img&&(this.img.src=t.src),this.state.imageErrored&&this.setState({imageErrored:!1})},o=()=>{this.setState({imageErrored:!0},(()=>{this.preloaded.delete(e)}))};(0,p.default)(e,t,i,o)}}onEditMarkupClick(e){const t=e.value();this.supportsNativeImageMarkup(e)&&t?this.startNativeImageMarkup(encodeURIComponent(t)):this.setState({inBrowserMarkupMode:!0})}render(){var e,t,i,o;const n=h.default.from(this.props.value),c=this.state.imageErrored||n.isBlank();if(!c&&this.state.inBrowserMarkupMode)return(0,v.jsx)(f.DrawingTypeInput,w(w({},this.props),{},{startUnlocked:!0,getBaseCanvasValue:()=>n,onSave:()=>{this.setState({inBrowserMarkupMode:!1})}}));const p=this.props.attribute.allowDrawing(),b=this.renderReadOnly()?null:this.renderUploadUtils(),S=!this.renderReadOnly()&&(0,v.jsx)(u.default,{onTap:()=>this.onPhotoControlClick(),className:(0,a.default)("PhotoInputControl","InputControl",{ClearInput:!this.isBlank(),disabled:this.unsupported()}),title:"Open Camera",children:(0,v.jsx)("i",{className:"icon fa fa-fw fa-camera"})}),x=(0,v.jsx)("img",{className:(0,a.default)({EmptyImage:this.isBlank()}),src:this.state.url&&this.preloaded.get(this.state.url),ref:this.onImageMount,alt:""},this.state.url),C=(null===(e=this.state.url)||void 0===e?void 0:e.includes("svg"))&&(null===(t=this.state.url)||void 0===t?void 0:t.includes("viewBox")),T=(null===(i=this.state.url)||void 0===i?void 0:i.includes("svg"))&&!(null===(o=this.state.url)||void 0===o?void 0:o.includes("width")),I=(0,v.jsxs)("div",{className:"ImageContainer",style:(0,y.convertToRtlWhenNecessary)(Object.assign({},(C||T)&&{width:this.props.width})),children:[x,!c&&!this.renderReadOnly()&&(0,v.jsx)(s.IconButton,{"aria-label":"clear",className:"ImageClearButton",onClick:this.clearInput.bind(this),size:"small",children:(0,v.jsx)(l.default,{})})]});let R=null;if(!c&&!this.renderReadOnly()){const e=!this.renderReadOnly()&&p;R=(0,v.jsxs)("div",{className:"PhotoInputControlBase__additional-control
1s",children:[(0,v.jsxs)(g.UpperCamelCaseButton,{color:"primary",startIcon:(0,v.jsx)(d.default,{}),onClick:()=>this.onPhotoControlClick(),children:[(0,m.mapActionName)("Retake"),b]}),e&&(0,v.jsx)(g.UpperCamelCaseButton,{color:"primary",startIcon:(0,v.jsx)(r.default,{}),onClick:()=>this.onEditMarkupClick(n),children:(0,m.mapActionName)("Edit")})]})}const O=c,D=this.getBaseClassNames();return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)("div",{className:(0,a.default)("PhotoInputControlBase",D),children:[O&&S,I,R,O&&b]}),this.renderUploadError()]})}}t.default=S},138198:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(238416)),a=o(i(496486)),r=o(i(112963)),s=o(i(7975)),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=g(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}(i(302443)),d=o(i(152200)),c=o(i(190644)),u=o(i(571524)),p=o(i(368142)),h=i(235049),m=i(351101),f=i(148521);function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(g=function(e){return e?i:t})(e)}function y(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function v(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?y(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):y(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}class b extends s.default{extraClassNames(){return"LatLongTypeInput"}defaultValue(){return(new l.default).toString()}getLocation(){if(!this.state.pending){if(this.highAccuracy&&u.default.IsMobileBrowser()){const e=e=>{const t=e.coords.latitude,i=e.coords.longitude,o=Math.round(e.coords.accuracy),n=(0,l.stringifyLatLng)(t,i);this.setValue(n,o),delete this._stopTrying,this.setState({accuracy:o,available:!0,pending:!1})},t=e=>{const t=e.coords.latitude,i=e.coords.longitude,o=Math.round(e.coords.accuracy),n=(0,l.stringifyLatLng)(t,i);this.setValue(n,o),this.setState({accuracy:o,available:!0})},i=()=>{alert("Unable to get current location. Please enable Location service on your device and then restart the app."),delete this._stopTrying,this.setState({accuracy:null,available:!1,pending:!1})};this._stopTrying=c.default.fetchAccurateLatLong(e,i,t)}else c.default.fetchLatLong(((e,t)=>{const i=(0,l.stringifyLatLng)(e,t);this.setValue(i),$(this.refs.input).trigger("blur"),this.setState({available:!0,pending:!1})}),(()=>{alert("Unable to get current location. Please enable Location service on your device and then restart the app."),this.setState({available:!1,pending:!1})}),{enableHighAccuracy:!0,maximumAge:0});this.setState({pending:!0})}}onPinDragEnd(e){const t=e.latLng.lat(),i=e.latLng.lng(),o=new l.default(t,i).toString();this.setValue(o),this.cancelPending({abort:!0})}renderCornerButton(){const e="LatLongInputControl InputControl"+(this.state.available?" LocationAvailable":null),t=this.state.pending?"fa-spinner fa-pulse":"fa-map-marker";let i,o;return i=this.state.pending?this.cancelPending.bind(this):this.getLocation.bind(this),this.highAccuracy&&(o=(0,f.jsx)("div",{className:"LatLongTypeInput__accuracy",children:this.state.accuracy?this.state.accuracy+"m":null})),(0,f.jsxs)("div",{className:e,children:[o,(0,f.jsx)(r.default,{onTap:i,title:(0,m.mapActionName)("Insert Current Location"),children:(0,f.jsx)("div",{className:"iconContainer",children:(0,f.jsx)("i",{className:"icon fa fa-fw "+t})})})]})}renderMap(){if(d.default.disabled)return null;const e=this.props,t=this.value(),i=l.default.fromString(t),o=(0,h.isConnected)()&&window.navigator&&navigator.onLine;if(i&&o){const t=e.attribute.name(),o=a.default.clone(e.dataContext.rowData),n=e.table,r=e.tableSchema;let s,l,c=[];const u={draggable:!1,scrollwheel:!1,disableDoubleClickZoom:!0,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!1,rotateControl:!1,fullscreenControl:!1,gestureHandling:"greedy"};return this.renderReadOnly()?c=a.default.compact([d.default.makeMapItem(o,n,r,t)]):(s={dragend:this.onPinDragEnd.bind(this),dragstart:this.onPinDragStart.bind(this)},l={latitude:i.latitude,longitude:i.longitude}),(0,f.jsx)(p.default,v(v({},this.props),{},{ref:this.onMapMount,centerLat:i.latitude,centerLng:i.longitude,items:c,zoom:this.state.zoom,mapType:this.state.mapType,mapColumn:t,draggablePinEventHandlers:s,draggablePinOptions:l,mapEventHandlers:this.mapEventHandlers(),showCurrentLocation:!1,mapOptions:u}))}return null}}t.default=b},685083:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(238416)),a=o(i(496486)),r=o(i(386010)),s=i(847494),l=o(i(571524)),d=o(i(454852)),c=o(i(365914)),u=i(278965),p=o(i(729390)),h=o(i(112963)),m=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=b(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}(i(299119)),f=i(814394),g=i(166089),y=i(557310),v=i(148521);function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(b=function(e){return e?i:t})(e)}function w(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function S(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?w(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):w(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}class x extends s.BaseTypeInput{renderReadOnly(){return!0}constructor(e){super(e),this.state={textBoxValue:"",modalOpen:!1,rowId:null}}shouldComponentUpdate(e,t){if(this.props.value!==e.value)return!0;if(c.default.compareObjs(this.state,t).length)return!0;const i=c.default.compareObjs(this.props,e);return 1!==i.length||"focused"!==i[0]}relatedTableCollection(){const e=this.referencedTableName();return e?this.props.appModel.findTableCollection(e):{}}isReverseDependentRef(){return this.props.attribute.isReverseDependentRef()}referencedTableName(){return this.props.attribute.nestedAttribute().referencedTableName()}allowAdds(){const{appModel:e}=this.props,{table:t}=this.relatedTableCollection();if(t&&t.allowsAdd(e)&&this.isReverseDependentRef()&&(y.ReactRootUIConfig.isReactRoot()?this.canLaunchRelatedForm(t.name()):"launchNestedForm"in this.props)){return e.appTemplate.actions().actionsAtTableScope(t.rootName(),e).filter((e=>"ADD_RECORD"===e.type()&&e.prominence()!==d.default.DO_NOT_DISPLAY)).length}return!1}allowUpdates(){if(this.isReverseDependentRef()){const{table:e,tableSchema:t}=this.relatedTableCollection();return!!(e&&t&&e.allowsUpdate(this.props.appModel)&&(y.ReactRootUIConfig.isReactRoot()?this.canLaunchRelatedForm(e.name()):"launchNestedForm"in this.props))}return!1}maxNestedRows(){return null!=this.props.maxNestedRows?this.props.maxNestedRows:this.props.appModel.AppTemplate.Presentation&&this.props.appModel.AppTemplate.Presentation.MaxNestedRows||0}onModalOpen(){l.default.IsMobileBrowser()||this.focusInput()}onFinish(){this.setState({modalOpen:!1,rowId:null})}focusInput(){this.refs.input&&this.refs.input.focus()}textBoxChanged(e){const t=e.target.value;$(this.refs.modalList).scrollTop(0),this.setState({textBoxValue:t})}clearTextBox(){$(this.refs.modalList).scrollTop(0),this.setState({textBoxValue:""}),this.focusInput()}get referenceRelationship(){var e,t,i;const{table:o,attribute:n,tableRow:a}=this.props,{ReferencingColumnName:r}=null!==(e=n.internalQualifier().Properties)&&void 0!==e?e:{};return r&&o&&a&&y.ReactRootUIConfig.isReactRoot()?{hasReferenceTo:{refColumnName:r,referencedTableName:o.rootName(),referencedStableId:a.stableId,rowStateColumnNames:null===(i=null===(t=this.props.view)||void 0===t?void 0:t.paging)||void 0===i?void 0:i.rowStateColumnNames}}:void 0}launchAddForm(){const{attribute:e,dataContext:t,launchNestedForm:i}=this.props,o=y.ReactRootUIConfig.isReactRoot()?this.launchRelatedForm:i,{table:n}=this.relatedTableCollection();if(n&&null!=o){const i=t.getFilterDefaultValues(e);o(n.name(),null,i,e,this.referenceRelationship)}}onRowSelected(e,t){this.allowUpdates()||this.allowAdds()&&a.default.includes(this.props.dataContext.pendingKeysForTable(e),t)?this.launchEditForm(t):this.viewSelectedRow(t)}launchEditForm(e){const{dataContext:t,attribute:i,launchNestedForm:o}=this.props,{table:n}=this.relatedTableCollection(),a=t.getFilterDefaultValues(i),r=y.ReactRootUIConfig.isReactRoot()?this.launchRelatedForm:o;if(n&&null!=r){const t=()=>
1r(n.name(),e,a,i,this.referenceRelationship);this.state.modalOpen?(clearTimeout(this.finishDelay),this.finishDelay=setTimeout((()=>{this.onFinish(),t()}),100)):t()}}viewSelectedRow(e){this.refs.modal.setAnchorElement(this.refs.inlineContainer),null!=e?this.setState({modalOpen:!0,rowId:e}):this.setState({modalOpen:!1,rowId:null})}viewAllRows(){this.refs.modal.setAnchorElement(this.refs.inlineContainer),this.setState({modalOpen:!0,rowId:null})}renderAddButton(){return(0,v.jsx)(h.default,{className:"ListTypeInput__button",navigationDelay:!0,onTap:this.launchAddForm.bind(this),children:this.props.appModel.MapActionName("New")},"new")}renderControls(e){if("detail"===this.props.viewType)return null;const t=[];if(e>this.maxNestedRows()){const i="".concat(this.props.appModel.MapActionName("View")," (").concat(e,")");t.push((0,v.jsx)(h.default,{className:"ListTypeInput__button",navigationDelay:!0,onTap:this.viewAllRows.bind(this),children:i},"view"))}this.allowAdds()&&t.push(this.renderAddButton());const i=(0,r.default)({ListTypeInput__controls:e>0,"ListTypeInput__controls-emptylist":0===e});return(0,v.jsx)("div",{className:i,children:t})}renderModal(e){let t;if(this.referencedTableName()&&this.state.modalOpen){const{table:i,tableSchema:o}=this.props.appModel.findTableCollection(this.referencedTableName());if(i&&o){const o=null==this.state.rowId,n=o?this.props.attribute.displayName(this.props.dataContext):i.labelTextForId(this.state.rowId)||this.state.rowId,a=o&&e>1,r=a&&this.state.textBoxValue?(0,v.jsx)(h.default,{className:"ListSelectPopup__input-clear",onTap:this.clearTextBox.bind(this),children:(0,v.jsx)("i",{className:"fa fa-times-circle"})}):null,s=a?(0,v.jsxs)("div",{className:"ListSelectPopup__input",children:[(0,v.jsx)("input",{"aria-label":this.props.label,ref:"input",type:"text",className:"ListSelectPopup__input-box",value:this.state.textBoxValue,placeholder:this.props.appModel.MapActionName("Search"),disabled:!this.state.modalOpen,onChange:this.textBoxChanged.bind(this)}),r]}):null;t=(0,v.jsxs)("section",{className:"ListTypeInputModal",children:[(0,v.jsx)("div",{className:"ListTypeInputModal__title",children:n}),s,(0,v.jsx)("div",{className:"ListTypeInputModal__contents",ref:"modalList",style:(0,u.convertToRtlWhenNecessary)({height:s?"calc(100% - 50px - 40px - 54px)":"calc(100% - 50px - 54px)"}),children:o?this.renderListModal():this.renderDetailsModal(i)}),(0,v.jsx)("div",{className:"ListTypeInputModal__bottom",children:(0,v.jsx)(h.default,{className:"ListTypeInputModal__finish-button",navigationDelay:!0,onTap:this.onFinish.bind(this),children:this.props.appModel?this.props.appModel.MapActionName("Done"):"Done"})})]})}}return(0,v.jsx)(m.default,{isOpen:!!t,onRequestClose:this.onFinish.bind(this),onAfterOpen:this.onModalOpen.bind(this),contentLabel:"view selected",ref:"modal",anchoredMode:"auto",children:t})}renderDetailsModal(e){var t,i,o,n,a,r;const s=null===(t=e.lookupTableRow(this.state.rowId,this.pendingTransaction))||void 0===t?void 0:t.values;if(s){const t=g.AppGlobals.AppModel.FindControlsForTable(e.name(),"detail",!1);let d=null;t.length&&(d=t[0]);const c=d&&this.props.appModel.NavStateForView(d,e.name());return(0,v.jsx)(f.SlideshowPage,{appModel:this.props.appModel,table:e,tableSchema:e.tableSchema,rowId:this.state.rowId,rowValues:s,width:(0,m.getModalContentWidth)()-(l.default.scrollbarWidth()||0),fixedHeightMode:!1,slideshowDisplayMode:null!==(i=null==c?void 0:c.SlideshowDisplayMode)&&void 0!==i?i:void 0,headerColumns:null!==(o=null==c?void 0:c.headerColumns)&&void 0!==o?o:void 0,imageDisplayType:null!==(n=null==c?void 0:c.ImageDisplayType)&&void 0!==n?n:void 0,mainSlideshowImageColumn:null!==(a=null==c?void 0:c.mainSlideshowImageColumn)&&void 0!==a?a:void 0,columnOrder:null!==(r=null==c?void 0:c.ColumnOrder)&&void 0!==r?r:void 0,maxNestedRows:null==c?void 0:c.MaxNestedRows,disableAllActions:!0})}return null}renderListModal(){return this.renderList(null,(0,m.getModalContentWidth)()-(l.default.scrollbarWidth()||0))}renderListInline(e){return e>0?(0,v.jsx)("div",{ref:"inlineContainer",className:"ListTypeInput__inline-container",children:this.renderList(this.maxNestedRows(),this.props.width)}):null}renderList(e,t){return(0,v.jsx)(p.default,S(S({},this.props),{},{parentId:this.props.parentId,showListInline:!0,disableAllActions:!0,maxNestedRows:e,onRowOpened:this.onRowSelected.bind(this),searchQuery:this.state.modalOpen?this.state.textBoxValue:void 0,sidewaysScroll:!this.state.modalOpen,allowedViewTypes:["gallery","deck","table"],width:t,height:null,rowId:this.state.rowId}))}render(){const e=this.getBaseClassNames();if(this.props.attribute.isListOfRefs()){const t=this.props.attribute.valueFromWireFormat(this.props.value).length,i=t;return(0,v.jsxs)("div",{className:(0,r.default)("ListTypeInput",e),children:[this.renderListInline(i),this.renderControls(t),this.renderModal(t)]})}{const t=this.props.attribute.localizeWireValue(this.props.value);return(0,v.jsx)("div",{className:(0,r.default)("TextTypeInput",e),children:(0,v.jsx)("input",{"aria-label":this.props.label,type:"text",ref:"input",className:"input-block-level",autoCorrect:"off",value:t,disabled:this.renderReadOnly()})})}}}t.default=x},238359:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(386010)),a=i(847494),r=i(278965),s=i(148521);class l extends a.BaseTypeInput{constructor(e){super(e),this.textarea=null,this.onChange=e=>{this.setState({shouldTryToUpdateHeight:!0,transientValue:e.target.value})},this.onBlur=e=>{super.onChange(e.target.value),this.setState({shouldTryToUpdateHeight:!0,transientValue:null})},this.onRef=e=>{this.textarea=e},this.state=this.initialState(e)}initialState(e){return{height:"compact"!==e.viewMode?20:void 0,shouldTryToUpdateHeight:!0}}focus(){!this.renderReadOnly()&&this.textarea&&this.textarea.focus()}updateHeight(e){const{height:t}=this.state;if(!e||void 0===t)return;let i=!1;0===e.scrollHeight&&(i=!0,$(e).closest(".FormEntry").show()),t<e.scrollHeight?this.setState({shouldTryToUpdateHeight:!1,height:e.scrollHeight}):t>20&&t>e.scrollHeight&&this.setState({shouldTryToUpdateHeight:!0,height:20}),i&&$(e).closest(".FormEntry").hide()}componentDidMount(){this.updateHeight(this.textarea)}componentDidUpdate(e){(this.state.shouldTryToUpdateHeight||this.props.value!==e.value)&&this.updateHeight(this.textarea)}render(){const e=this.value()||"",{height:t}=this.state,i=null!=t?{height:"".concat(Math.min(256,t),"px"),resize:"none",overflow:t>256?"auto":"hidden"}:{resize:"none"},o=this.getBaseClassNames();return(0,s.jsx)("div",{className:(0,n.default)("LongTextTypeInput",o),children:(0,s.jsx)("textarea",{ref:this.onRef,"aria-label":this.props.label,className:"input-block-level",style:(0,r.convertToRtlWhenNecessary)(i),disabled:this.renderReadOnly(),value:e,onBlur:this.onBlur,onChange:this.onChange})})}}t.default=l},279839:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(826728),a=o(i(775916)),r=o(i(386010)),s=i(847494),l=o(i(571524)),d=o(i(249e3)),c=o(i(365914)),u=i(278965),p=i(148521);class h extends s.BaseTypeInput{constructor(e){super(e),this.state={transientValue:null,hasTransientValue:!1}}useInlinePicker(){return!l.default.IsMobileBrowser()}getValue(){const{hasTransientValue:e,transientValue:t}=this.state;if(e)return t;const i=this.props.value;return null==i||""===i?null:d.default.date().momentFromWireFormat(i)}onAccept(e){this.setState({transientValue:e});const t=c.default.MDYformat(e.toDate(),!0);super.onChange(t)}onChange(e){this.setState({transientValue:e,hasTransientValue:!0})}onBlur(){const{transientValue:e,hasTransientValue:t}=this.state;if(t){if(null==(i=e)||i.parsingFlags().empty)super.onChange("");else{const t=e.toDate(),i=t?c.default.MDYformat(t,!0):t;super.onChange(i)}var i;(null==e||e.isValid())&&this.setState({transientValue:null,hasTransientValue:!1})}}isChangeTriggered(){return!1}render(){const e=this.useInlinePicker()?"inline":"dialog",t=this.getValue(),{dateFormat:i}=d.default.date(),o=this.getBaseClassNames();return(0,p.jsx)("div",{className:(0,r.default)("MaterialDateTypeInput","input-block-level",o),children:(0,p.jsx)(n.MuiPickersUtilsProvider,{utils:a.default,children:(0,p.jsx)(n.KeyboardDatePicker,{variant:e,value:t,format:i,onChange:e=>this.onChange(e),onBlur:()=>this.onBlur(),onAccept:e=>this.onAccept(e),InputProps:{disableUnderline:!0,fullWidth:!0},InputAdornmentProps:{style:{position:"absolute",right:0}},PopoverProps:{anchorOrigin:{horizontal:"right",vertical:"bottom"},transformOrigin:{horizontal:"right",vertical:"top"}},style:(0,u.convertToRtlWhenNecessary)({width:"100%"}),helperText:""})})})}}t.default=h},54592:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(872865));class a extends n.default{}t.default=a},863773:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(581827)),a=o(i(895466)),r=o(i(150198)),s=o(i(299354)),l=i(351101),d=i(249492),c=i(565261),u=o(i(386010)),p=o(i(68130)),h=i(585081),m=i(25084),f=o(i(735644)),g=o(i(923685)),y=i(440629),v=i(892148),b=i(148521);class w extends n.default{constructor(e){super(e),this.createUploadRequest=e=>({RequestId:e,allowDrawing:this.props.attribute.allowDrawing(),allowMultiUpload:!0,preferredWidth:this.preferredWidth,CallbackFn:e=>{e&&0!==e.length&&(this.state.lightboxOpen&&-1!==this.state.selectedImageIndex?this.replaceSelectedImage(e[0]):this.setImages(e))}}),this.handleLightboxClose=()=>{this.setState({lightboxOpen:!1,selectedImageIndex:-1,inBrowserMarkupMode:!1})},this.handleMouseDown=()=>{this.setState({mouseDownTime:Date.now()})},this.handleMouseUp=e=>{Date.now()-this.state.mouseDownTime<200&&this.setState({lightboxOpen:!0,selectedImageIndex:e})},this.state=Object.assign(Object.assign({},this.state),{lightboxOpen:!1,mouseDownTime:0,selectedImageIndex:-1,inBrowserMarkupMode:!1})}UNSAFE_componentWillMount(){this.updateState(this.props)}UNSAFE_componentWillReceiveProps(e){this.updateState(e)}updateState(e){const t=e.table?e.table.name():null;e.attribute.splitEnumListValue(e.value).map((e=>a.default.from(e,t))).map((t=>{this.updateImageState(t,e)}))}replaceSelectedImage(e){const t=this.props.value.split(r.default.listDelimiter);t.splice(this.state.selectedImageIndex,1,JSON.stringify(e));const i=t.join(r.default.listDelimiter);super.onChange(i),this.shouldUseIOSPlaceholder()&&(this._showIOSPlaceholderOnError=!0)}setImages(e){const t=e.map((e=>JSON.stringify(e))).join(r.default.listDelimiter),i=this.props.value?"".concat(this.props.value).concat(r.default.listDelimiter).concat(t):t;super.onChange(i),this.shouldUseIOSPlaceholder()&&(this._showIOSPlaceholderOnError=!0)}getImageHandles(e){return e.attribute.splitEnumListValue(e.value).map((t=>{var i;return a.default.from(t,null===(i=e.table)||void 0===i?void 0:i.name())}))}clearImage(e,t){this.setState({uploadError:void 0});const i=[...t];i.splice(e,1);const o=i.map((e=>JSON.stringify(e))).join(r.default.listDelimiter);super.onChange(o),this.state.lightboxOpen&&e===t.length-1&&this.setState({selectedImageIndex:0}),this.fileUploadInput&&this.fileUploadInput.value&&(this.fileUploadInput.value=null),this.cooldown()}onEditMarkupClick(e){const t=e.value();this.supportsNativeImageMarkup(e)&&t?this.startNativeImageMarkup(encodeURIComponent(t)):this.setState({inBrowserMarkupMode:!0})}render(){const e=this.getBaseClassNames(),{selectedImageIndex:t,inBrowserMarkupMode:i,lightboxOpen:o}=this.state,n=this.getImageHandles(this.props),a=n.length;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:(0,u.default)("MultiImageTypeInput",e),children:[(0,b.jsx)(s.default,{imageHandles:n,onPhotoControlClick:this.onPhotoControlClick.bind(this),renderUploadUtils:this.renderUploadUtils.bind(this),onChange:this.onChange.bind(this),clearImage:this.clearImage.bind(this),clearAllImages:this.clearInput.bind(this),handleMouseUp:this.handleMouseUp.bind(this),handleMouseDown:this.handleMouseDown.bind(this)}),(0,b.jsx)(h.Lightbox,{className:"MultiImageInputLightbox",controllerProps:{closeOnPullUp:!1,closeOnPullDown:!1,closeOnBackdropClick:!i},plugins:[f.default,g.default],isLightboxOpen:o,onClose:()=>this.handleLightboxClose(),onMode:{view:e=>{let{index:t}=e;return this.setState({selectedImageIndex:t})}},index:t,renderIcons:{slide:e=>{let{slide:t}=e;if(n.length>0){const e=n.find((e=>e.id()===t.alt));
1return e?(0,b.jsx)(m.ImageMarkupSlide,{drawingPassThroughProps:{pendingUploadRequests:this.props.pendingUploadRequests,attribute:this.props.attribute.nestedAttribute(),tableSchema:this.props.tableSchema,appModel:this.props.appModel,onValueChange:e=>{this.replaceSelectedImage(e)},value:e},setBrowserMarkupMode:e=>this.setState({inBrowserMarkupMode:e}),imageHandle:e,inBrowserMarkupMode:this.state.inBrowserMarkupMode}):null}this.handleLightboxClose()}},parentStyles:{container:{backgroundColor:"rgba(0, 0, 0, 0.8)"},navigationPrev:{display:i?"none":"flex"},navigationNext:{display:i?"none":"flex"},slide:{margin:i?"0px":"64px 12px 12px"},button:{position:"absolute",filter:"none",display:i?"none":"flex"},thumbnailsContainer:{backgroundColor:"rgba(0, 0, 0, 0.8)"},thumbnail:{display:i?"none":"flex",width:v.WindowWrapper.getInnerWidth()>768?y.desktopThumbnailSize:y.mobileThumbnailSize,height:v.WindowWrapper.getInnerWidth()>768?y.desktopThumbnailSize:y.mobileThumbnailSize,padding:0}},slides:n.map((e=>{var t,i;return{src:e.nestedHandle()?null!==(t=e.cachedFlattened())&&void 0!==t?t:"":null!==(i=e.resolve())&&void 0!==i?i:"",alt:e.id()}})),carousel:{finite:!0},toolbar:{buttons:[(0,b.jsxs)("div",{className:(0,u.default)({ImageMarkupButtons:!i,HideWhenInMarkupMode:i}),children:[(0,b.jsx)(d.Button,{"aria-label":(0,l.mapActionName)("Clear"),variant:"contained",startIcon:(0,b.jsx)(p.default,{fontSize:"small"}),onClick:()=>{this.clearImage(t,n)},className:(0,u.default)("yarl__button","ImageMarkupButton"),children:(0,l.mapActionName)("Clear")},"lightbox-clear-button"),(0,b.jsx)(d.Button,{"aria-label":(0,l.mapActionName)("Draw"),variant:"contained",startIcon:(0,b.jsx)(c.DrawIcon,{fontSize:"small"}),onClick:()=>this.onEditMarkupClick(n[t]),className:(0,u.default)("yarl__button","ImageMarkupButton"),children:(0,l.mapActionName)("Edit")},"draw-button")]},"image-markup"),(0,b.jsxs)(d.Typography,{variant:"h6","aria-label":"Slide index",className:(0,u.default)("SlideIndexText",{HideWhenInMarkupMode:i}),children:[t+1,"/",a]},"slide-index")]}})]}),this.renderUploadError()]})}}t.default=w},891012:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(386010)),a=i(847494),r=i(148521);class s extends a.BaseTypeInput{constructor(e){super(e),this.state=this.initialState(),this.onChange=this.onChange.bind(this),this.onBlur=this.onBlur.bind(this)}initialState(){return{}}onChange(e){this.setState({transientValue:e.target.value})}onBlur(e){super.onChange(e.target.value),this.setState({transientValue:null})}render(){const e=this.value()||"",t=this.getBaseClassNames();return(0,r.jsx)("div",{className:(0,n.default)("NameTypeInput",t),children:(0,r.jsx)("input",{"aria-label":this.props.label,type:"text",ref:"input",className:"input-block-level",autoCorrect:"on",value:e,disabled:this.renderReadOnly(),onBlur:this.onBlur,onChange:this.onChange,onCompositionStart:()=>{this.setState({isComposing:!0})},onCompositionEnd:()=>{this.setState({isComposing:!1})},onKeyDown:this.onKeyDown})})}}t.default=s},954797:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(325069));class a extends n.default{digits(){return 0}step(){let e=this.props.attribute.auxData().StepValue;return e||(e="1"),e}}t.default=a},807668:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(496486)),a=o(i(593302)),r=o(i(325069));class s extends r.default{toWireFormat(e){try{const t=new a.default(e);return t.div(100).toString()}catch(t){return e}}fromWireFormat(e){if(null==e||""===e)return"";let t=e.toString();if(n.default.endsWith(t,"%")){t=t.substr(0,t.length-1);const e=parseFloat(t);return isNaN(e)?null:e}try{const e=new a.default(t);return e.times(100).toString()}catch(e){return"?"}}sliderDisplayValue(e){const t=this.fromWireFormat(e);return"?"===t?t:t+"%"}step(){let e=this.props.attribute.auxData().StepValue;if(null==e){const t=this.percentDigits();e=String(Math.pow(.1,t).toFixed(t))}else{if(null==e||0===e)return e;e/=100}return e}browserStep(){return 100*Number(this.step())}prefix(){return"%"}percentDigits(){return this.digits()+2}digits(){const e=this.props.attribute.auxData().DecimalDigits;return null==e?0:e}localizeValue(e){return super.localizeValue(this.fromWireFormat(e))}delocalizeValue(e){return this.toWireFormat(super.delocalizeValue(e))}value(){return this.state&&null!=this.state.transientValue?this.toWireFormat(this.state.transientValue):this.props.value}minValue(){const e=super.minValue();return null==e||0===e?e:e/100}browserMinValue(){return super.minValue()}maxValue(){const e=super.maxValue();return null==e||0===e?e:Number(e)/100}browserMaxValue(){return super.maxValue()}}t.default=s},622444:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(386010)),a=i(847494),r=i(148521);class s extends a.BaseTypeInput{constructor(e){super(e),this.state=this.initialState(),this.onChange=this.onChange.bind(this),this.onBlur=this.onBlur.bind(this)}initialState(){return{}}onChange(e){this.setState({transientValue:e.target.value})}onBlur(e){super.onChange(e.target.value),this.setState({transientValue:null})}render(){const e=this.value()||"",t=this.getBaseClassNames();return(0,r.jsx)("div",{className:(0,n.default)("PhoneTypeInput",t),children:(0,r.jsx)("input",{dir:"ltr","aria-label":this.props.label,type:"tel",ref:"input",className:"input-block-level",autoCorrect:"off",value:e,disabled:this.renderReadOnly(),onChange:this.onChange,onBlur:this.onBlur,onCompositionStart:()=>{this.setState({isComposing:!0})},onCompositionEnd:()=>{this.setState({isComposing:!1})},onKeyDown:this.onKeyDown})})}}t.default=s},526428:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(325069));class a extends n.default{prefix(){return this.props.attribute.auxData().CurrencySymbol||""}}t.default=a},359612:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(901816));class a extends n.default{allowOtherValues(){return!1}allowMultiSelect(){return!1}}t.default=a},61369:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(496486)),a=o(i(667294)),r=o(i(386010)),s=i(847494),l=i(166089),d=o(i(944762)),c=o(i(605161)),u=o(i(571524)),p=i(557310),h=o(i(962553)),m=i(388884),f=i(148521);class g extends s.BaseTypeInput{constructor(e){super(e),this.onChange=this.onChange.bind(this),this.onScanResult=this.onScanResult.bind(this),this.addNewRef=this.addNewRef.bind(this),this.inputRef=a.default.createRef()}allowMultiSelect(){return!1}onChange(e,t){let i=e||"";n.default.isArray(e)&&(i=e[0]||""),this.props.onValueChange(i,t)}onScanResult(e){if(this.allowMultiSelect())return console.error("Scanned input not supported with multiselect");const t=this.options(),i=this.refAttribute();let o=t.indexOf(e);if(o>=0)return this.onChange(e);{const n=i.referencedTableName(),{table:a}=h.default.findByName(n,this.props.appModel);if(a){if(o=t.map((e=>a.rowLabelValue(e))).indexOf(e),o>=0)return this.onChange(t[o])}}return alert(this.props.appModel.MapActionName("The scan result didn't match any known entries."))}focus(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.valueReadOnly()&&e){const t=!p.ReactRootUIConfig.isReactRoot()&&$("#LaunchScreen").is(":visible"),i=e.openListSelect&&this.refs.listSelect&&!t,o=this.showScannerButton(),n=this.showNfcScannerButton();if(o&&!n&&u.default.InMobileWebView())e.openCamera&&this.scannerButtonSelected();else if(!o&&n&&u.default.InMobileWebView())e.openCamera&&this.nfcScannerButtonSelected();else if(!this.scanOnly()&&e.isFirstEntry){const e=window.InputHandler.gunScanHistory.pop();e&&(new Date).getTime()-e.timestamp.getTime()<1500?super.onChange(this.findMatchingKey(e.value)):window.InputHandler.queuedKeys.length?window.InputHandler.gunScanCallbacks.push((e=>{super.onChange(this.findMatchingKey(e.value))})):i&&!this.scanOnly()&&this.refs.listSelect.onTap()}else i&&!this.scanOnly()?this.refs.listSelect.onTap():!this.scanOnly()&&this.inputRef.current&&this.inputRef.current.focus()}}findMatchingKey(e){const{table:t}=this.referencedTable(),{dataContext:i}=this.props;if(e&&t){const o=this.options(),n=[];let a;const r=e.toLowerCase();for(let s=0;s<o.length;s++){const l=o[s];if(r===l.toLowerCase())return e;const d=t.rowLabelValue(l,{dataContext:i}).toLowerCase();r===d?a=l:d.indexOf(r)>=0&&n.push(l)}if(a)return a;if(1===n.length)return n[0]}return e}addNewRef(){var e;const t=this.referencedTableName();if(null!=t&&""!==t){const i={noAutoAdvance:!0},o=()=>{var e,i,o;const{attribute:n,table:a,tableRow:r,rowId:s}=this.props,{table:d}=this.referencedTable();if(a&&d)if(p.ReactRootUIConfig.isReactRoot())this.launchRelatedForm(t,null,null,n,{referencedBy:{refColumnName:n.name(),tableName:a.rootName(),stableId:null!==(e=null==r?void 0:r.stableId)&&void 0!==e?e:s,rowStateColumnNames:null===(o=null===(i=this.props.view)||void 0===i?void 0:i.paging)||void 0===o?void 0:o.rowStateColumnNames}});else if("form"===this.props.viewType)l.AppGlobals.ViewManager.KnownHandlers.form.LaunchNestedForm(t,null,null,this.props.attribute);else{(this.props.appState||l.AppGlobals.AppState).PushViewForResult(this,"addNewRef","form",!1,{TableName:t})}};this.refs.listSelect?null===(e=this.refs)||void 0===e||e.listSelect.onFinish(null,o,i):o()}}onPushViewResult(e,t){if("addNewRef"===e){const{attribute:e,appModel:i,value:o,table:n,rowId:a,useTransactions:r}=this.props;let{row:s}=this.props;if(t.rowId!==o)if(this.tableMode());else{if(!s&&r){const e=null==n?void 0:n.lookupTableRow(a);s=e&&e.copy().rowState}if(s){if(!s.updateAndValidate(e,t.rowId)){const e={tableName:n.name(),row:s.values(),appName:i.AppTemplate.Name,appId:i.AppTemplate.Id,appVersion:i.AppTemplate.Version,userSettings:i.GetUserSettings()};i.UpdateTableRow(e)}}}}}options(){let e=[];
1if(this.props.validOptions)e=this.props.validOptions;else if(this.props.suggestedValues)e=this.props.suggestedValues;else if(this.props.dataContext){e=this.props.dataContext.findTableKeyValues(this.referencedTableName()).data}return e}referencedTableName(){return this.refAttribute().referencedTableName()}referencedTable(){const e=this.referencedTableName();return e?h.default.findByName(e,this.props.appModel):{}}refAttribute(){return this.props.attribute}pendingRowKeys(){return this.props.dataContext?this.props.dataContext.pendingKeysForTable(this.referencedTableName()):[]}render(){const e=this.allowMultiSelect(),t=this.options();if(!t)return(0,f.jsx)("div",{});const i=this.referencedTableName();if(!i)return console.warn("No referencedTableName",this.refAttribute()),(0,f.jsx)("div",{});let{value:o}=this.props;const{attribute:n,table:a,dataContext:s,appModel:l,width:u,height:h}=this.props;e&&(o=o?n.valueFromWireFormat(o):[]);const g=this.referencedTable().table;if(null==g)return console.warn("Ref input couldn't find referenced table named ",i),(0,f.jsx)("div",{});const y=this.allowAddRef(g);let v;v="Buttons"!==n.auxData().InputMode||this.tableMode()?p.ReactRootUIConfig.isInDesktopExperience()?(0,f.jsx)(m.DesktopDropdown,{ref:this.inputRef,dataContext:s,attribute:this.refAttribute(),allowAdds:!1,allowAddsThroughRef:y,addNewRefHandler:y?this.addNewRef:void 0,multiselect:e,options:t,table:a,tableSchema:null==g?void 0:g.tableSchema,label:n.displayName(s),savedSelection:o,onChange:this.onChange,readOnly:this.renderReadOnly(),isTableQuickEdit:this.tableMode(),transaction:this.pendingTransaction}):(0,f.jsx)(c.default,{typeInput:this,ref:"listSelect",title:n.displayName(s),readOnly:this.renderReadOnly(),selected:o,options:t,optionAttribute:this.refAttribute(),multiselect:e,allowAdds:!1,allowAddRef:y,addNewRefHandler:y?this.addNewRef:void 0,table:a,appModel:l,dataContext:s,renderInlineButtons:this.renderInlineButtons,getInputStyleWithInlineButtons:this.getInputStyleWithInlineButtons,onChange:this.onChange,height:h,preventImmediateClose:!window.APPSHEET_TEST_CONTEXT&&void 0}):(0,f.jsx)(d.default,{readOnly:this.renderReadOnly(),selected:[o],elementAttribute:this.refAttribute(),options:t,multiselect:e,table:a,dataContext:s,appModel:l,width:u,onChange:this.onChange});const b=this.getBaseClassNames();return(0,f.jsx)("div",{className:(0,r.default)("RefTypeInput",b),children:v})}}g.supportsValidOptions=!0;t.default=g},127373:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureTypeInput=void 0;var o=i(323409);class n extends o.BaseScribbleTypeInput{constructor(e){super(e),this.baseImageWidth=500,this.baseImageHeight=200,this.clearMessage="",this.clearOnReset=!0,this.classNames={SignatureTypeInput:!0}}get tapToUnlock(){return!this.props.value}supportsNativeImageMarkup(e){return!1}}t.SignatureTypeInput=n},872865:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TextTypeInputDataTestIds=void 0;var n,a=o(i(496486)),r=o(i(386010)),s=i(847494),l=o(i(571524)),d=i(278965),c=i(148521);!function(e){e.Input="text-type-input"}(n||(t.TextTypeInputDataTestIds=n={}));class u extends s.BaseTypeInput{constructor(e){super(e),this.state=this.initialState(),this.onChange=this.onChange.bind(this),this.onBlur=this.onBlur.bind(this),this.onScanResult=this.onScanResult.bind(this)}initialState(){return{transientValue:null}}onChange(e){this.setState({transientValue:e.target.value})}onBlur(e){super.onChange(e.target.value),this.setState({transientValue:null})}onScanResult(e){e&&super.onChange(e),$(document.activeElement).trigger("blur"),$(this.refs.input).trigger("blur",{autoAdvance:!0})}focus(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;if(!this.valueReadOnly()){const i=this.showScannerButton(),o=this.showNfcScannerButton();if(i&&!o&&l.default.InMobileWebView())e.openCamera&&this.scannerButtonSelected();else if(!i&&o&&l.default.InMobileWebView())e.openCamera&&this.nfcScannerButtonSelected();else if(e.isFirstEntry&&(null===(t=window.InputHandler)||void 0===t?void 0:t.gunScanHistory)
1){const e=window.InputHandler.gunScanHistory.pop(),t=a.default.get(window,"InputHandler.lastKeyupActiveElement.tagName");e&&(new Date).getTime()-e.timestamp.getTime()<1500?"INPUT"!==t?super.onChange(e.value):this.scanOnly()||super.focus():window.InputHandler.queuedKeys.length?window.InputHandler.gunScanCallbacks.push((e=>{super.onChange(e.value)})):super.focus()}else this.scanOnly()||super.focus()}}value(){const e=super.value();return null==e?"":String(e).replace(/[\r\n\t]+/g," ")}shouldSelectAllOnFocus(){return!0}render(){const e=this.renderInlineButtons(),t=this.getInputStyleWithInlineButtons(e),i=this.getBaseClassNames();return(0,c.jsxs)("div",{className:(0,r.default)("TextTypeInput",i),children:[(0,c.jsx)("input",{"aria-label":this.props.label,"data-testid":n.Input,type:"text",ref:"input",style:(0,d.convertToRtlWhenNecessary)(t),className:"input-block-level",autoCorrect:"on",value:this.value(),disabled:this.renderReadOnly(),onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,onCompositionStart:()=>{this.setState({isComposing:!0})},onCompositionEnd:()=>{this.setState({isComposing:!1})},onKeyDown:this.onKeyDown}),(0,c.jsx)("div",{className:"TextTypeInput__inline-buttons",children:e})]})}}t.default=u},714788:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(656798));class a extends n.default{}t.default=a},718415:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(386010)),a=i(847494),r=o(i(571524)),s=i(278965),l=i(148521);class d extends a.BaseTypeInput{constructor(e){super(e),this.state=this.initialState(),this.onChange=this.onChange.bind(this),this.onBlur=this.onBlur.bind(this)}initialState(){return{}}useTextType(){return r.default.IsSafariBrowser()||!r.default.SupportsDateTimeInputs()||r.default.IsIOSBrowser()&&!this.props.attribute.ignoreSeconds()}normalizeValue(e){return this.props.attribute.ignoreSeconds()&&e&&e.match(/^\d{2}:\d{2}$/)&&(e+=":00"),e}onChange(e){this.setState({transientValue:e.target.value});const t=e.nativeEvent.target;window.setTimeout((()=>{t.defaultValue=""}),0)}onBlur(e){const t=this.normalizeValue(e.target.value);super.onChange(t),this.setState({transientValue:null})}componentDidMount(){if(!this.useTextType()&&this.refs.input){const e=this.refs.input.value;this.refs.input.value="",this.refs.input.defaultValue="",this.refs.input.value=e}}componentDidUpdate(){this.refs.input&&(this.refs.input.defaultValue="")}render(){let e=this.value()||"";const t=this.props.attribute.ignoreSeconds();t&&e&&e.match(/^\d{2}:\d{2}:/)&&(e=e.replace(/:.{0,2}?$/,""));const i=this.getBaseClassNames();return(0,l.jsxs)("div",{className:(0,n.default)("TimeTypeInput",i),children:[(0,l.jsx)("input",{className:(0,n.default)("input-block-level",{DateOrTimeInputRtl:(0,s.shouldApplyRtlStyles)()}),"aria-label":this.props.label,type:this.useTextType()?"text":"time",ref:"input",step:t?60:1,placeholder:"hh:mm"+(t?"":":ss"),autoCorrect:"off",value:e,disabled:this.renderReadOnly(),onBlur:this.onBlur,onChange:this.onChange}),!this.useTextType()&&(0,l.jsx)("div",{className:"DateTypeInput__inline-buttons",children:(0,l.jsx)("i",{className:"far fa-clock"})})]})}}t.default=d},435555:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(386010)),a=i(847494),r=o(i(150198)),s=i(148521);class l extends a.BaseTypeInput{constructor(e){super(e),this.state=this.initialState(),this.onLinkTextChange=this.onLinkTextChange.bind(this),this.onUrlChange=this.onUrlChange.bind(this),this.onLinkTextBlur=this.onLinkTextBlur.bind(this),this.onUrlBlur=this.onUrlBlur.bind(this)}initialState(){return{transientValue:null}}value(){let e=this.state.transientValue;return null==e&&(e=this.props.attribute.valueFromWireFormat(this.props.value)),e}onLinkTextChange(e){const t=e.target.value,i=this.value();i.linkText=t,this.setState({transientValue:i})}onUrlChange(e){const t=e.target.value,i=this.value();i.url=t,this.setState({transientValue:i})}onLinkTextBlur(){this.submitNormalized(this.value())}onUrlBlur(){this.submitNormalized(this.value())}submitNormalized(e){const{linkText:t}=e;let{url:i}=e;
1i&&!i.match(/^\w+:\/\//)&&(i.match(/^\w+\.\w+$/)?i="http://www."+i:i.match(/^\w+\.\w+\.\w+$/)&&(i="http://"+i),e.url=i),""===t&&(e.linkText=i),e=r.default.valueToWireFormat(e,"Url",this.props.attribute.auxData()),super.onChange(e),this.setState({transientValue:null})}render(){const e=this.value(),t=this.getBaseClassNames();let i;return this.props.attribute.auxData().IsHyperLink&&(i=(0,s.jsx)("input",{"aria-label":this.props.label,type:"text",placeholder:"link text",className:"input-block-level",autoCorrect:"off",value:e.linkText,disabled:this.renderReadOnly(),onBlur:this.onLinkTextBlur,onChange:this.onLinkTextChange})),(0,s.jsxs)("div",{className:(0,n.default)("UrlTypeInput",t),children:[i,(0,s.jsx)("input",{dir:"ltr","aria-label":this.props.label,type:"url",ref:"input",placeholder:"http://",className:"input-block-level",autoCorrect:"off",value:e.url,disabled:this.renderReadOnly(),onBlur:this.onUrlBlur,onChange:this.onUrlChange,onCompositionStart:()=>{this.setState({isComposing:!0})},onCompositionEnd:()=>{this.setState({isComposing:!1})},onKeyDown:this.onKeyDown})]})}}t.default=l},465678:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(901816));class a extends n.default{allowMultiSelect(){return"EnumList"===this.props.attribute.type()}allowOtherValues(){return this.props.suggestedValues&&!this.props.validOptions}allowedValues(e){return e||(e=this.props),e.validOptions||e.suggestedValues||[]}}t.default=a},932742:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(45697)),a=o(i(386010)),r=o(i(581827)),s=o(i(112963)),l=o(i(571524)),d=i(263198),c=i(278965),u=i(148521);class p extends r.default{renderReadOnly(){return!l.default.InAndroidWebView()||super.renderReadOnly()}startNativeInput(e){d.JeeneeBrowserAPI.takeVideo(e)}renderUploadUtils(){let e="VideoInputControl PhotoInputControl InputControl",t=()=>this.onPhotoControlClick(),i="Open camera";return this.renderReadOnly()&&(e+=" disabled",t=()=>{},i=super.renderReadOnly()?"This column is not editable":"Video upload not available on this platform"),(0,u.jsx)(s.default,{onTap:t,className:e,title:i,children:(0,u.jsx)("i",{className:"icon fa fa-fw fa-video"})})}renderThumbnail(){const{value:e}=this.props;let t;return(null==e?void 0:e.value)?t="/jeenee_url?path=".concat(e.value()):"string"==typeof e&&(t=e),null==t||""===t?null:(0,u.jsx)("video",{src:t+"#t=0.1",controls:!0,preload:"metadata",style:(0,c.convertToRtlWhenNecessary)({maxWidth:"100%"})})}render(){const e=this.getBaseClassNames();return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("div",{className:(0,a.default)("VideoInputControlBase",e),children:[this.renderUploadUtils(),this.renderThumbnail()]}),this.renderUploadError()]})}}p.propTypes={attribute:n.default.object.isRequired,tableSchema:n.default.object.isRequired,appModel:n.default.object,viewType:n.default.string,value:n.default.any,valid:n.default.bool,editable:n.default.bool,onValueChange:n.default.func};t.default=p},5366:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(238416)),a=o(i(496486)),r=o(i(7975)),s=i(46239),l=o(i(152200)),d=o(i(112963)),c=o(i(368142)),u=i(148521);function p(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function h(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?p(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):p(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}class m extends r.default{constructor(e){super(e),this.onOverlayTap=()=>{this.defaultValue()&&(this.onExpand(),this.setValue(this.defaultValue()))}}initialState(e){e=e||this.props;const t=super.initialState(e);return e.value&&e.attribute.validateValue(e.value)?t.zoom=3:t.zoom=1,t}focus(){}defaultValue(){return"50, 50"}customMapType(){const e=this.props.attribute;if(e){const t=this.props.baseImage;if(t){const i=s.ImageMapType.getForUrl(t);i.whenReady((t=>{this.props.attribute===e&&null==t&&this.state.customMapType!==i&&this.setState({customMapType:i})}))}}return this.state.customMapType}onPinDragEnd(e,t,i){const o=e.latLng.lat(),n=e.latLng.lng(),a=s.ImageMapType.fromLatLngToXYString(o,n);this.state.modalOpen?this.setState({centerLat:l.default.getCenterLat(i),centerLng:l.default.getCenterLng(i)},(()=>{this.setValue(a)})):this.setValue(a)}renderCornerButton(){return this.value()&&!this.renderReadOnly()?(0,u.jsx)(d.default,{className:"BaseCoordinateTypeInput__input-clear",onTap:this.onClearTap,children:(0,u.jsx)("i",{className:"fa fa-times-circle"})}):(0,u.jsx)("div",{className:"BaseCoordinateTypeInput__input-clear"})}renderExpandButton(){return(0,u.jsx)(d.default,{className:"BaseCoordinateTypeInput__expand",onTap:this.onExpand,children:(0,u.jsx)("i",{className:"fa fa-expand"})})}renderMap(){if(l.default.disabled)return null;const e=this.props,t=this.value(),i=e.attribute.name(),o=a.default.clone(e.dataContext.rowData),n=e.table,r=e.tableSchema;let d,p,m,f,g=[];const y=this.customMapType();if(!y)return null;
1const v=this.state.modalOpen?this.modalMapOptions():this.inlineMapOptions();return t&&e.attribute.validateValue(t)?(({lat:m,lng:f}=s.ImageMapType.fromXYStringToLatLng(t)),this.renderReadOnly()?g=a.default.compact([l.default.makeMapItem(o,n,r,i,m,f)]):(d={dragend:this.onPinDragEnd.bind(this),dragstart:this.onPinDragStart.bind(this)},p={latitude:m,longitude:f})):v.zoomControl=!1,(0,u.jsx)(c.default,h(h({},this.props),{},{ref:this.onMapMount,centerLat:null!=this.state.centerLat?this.state.centerLat:m,centerLng:null!=this.state.centerLng?this.state.centerLng:f,items:g,zoom:this.state.zoom,mapType:this.state.mapType,customMapType:y,mapColumn:i,draggablePinEventHandlers:d,draggablePinOptions:p,mapEventHandlers:this.mapEventHandlers(),showCurrentLocation:!1,blockLinkToMaps:!0,mapOptions:v}))}}t.default=m},462485:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.TypeInputsApi=void 0;var n=o(i(617166)),a=o(i(138198)),r=o(i(5366)),s=o(i(10428)),l=o(i(718415)),d=o(i(948464)),c=o(i(726134)),u=o(i(641810)),p=o(i(923769)),h=o(i(352565)),m=o(i(685083)),f=o(i(359612)),g=o(i(954797)),y=o(i(256023)),v=o(i(807668)),b=o(i(526428)),w=o(i(346516)),S=o(i(415664)),x=o(i(833494)),C=i(539479),T=i(127373),I=o(i(656798)),R=o(i(932742)),O=o(i(714788)),D=o(i(734820)),N=o(i(872865)),j=o(i(238359)),E=o(i(891012)),A=o(i(318887)),P=o(i(811123)),M=o(i(622444)),k=o(i(775381)),_=o(i(465678)),B=o(i(54592)),L=o(i(863773)),V=o(i(61369)),F=o(i(435555)),W=o(i(107221)),H=i(166089),U=o(i(279839));const G={Address:n.default,LatLong:a.default,XY:r.default,Date:s.default,MaterialDateTypeInput:U.default,Time:l.default,DateTime:d.default,Duration:c.default,Color:u.default,Enum:p.default,EnumList:h.default,List:m.default,Progress:f.default,Number:g.default,Decimal:y.default,Percent:v.default,Price:b.default,ChangeCounter:w.default,ChangeTimestamp:S.default,ChangeLocation:x.default,Drawing:C.DrawingTypeInput,Signature:T.SignatureTypeInput,Image:I.default,Video:R.default,Thumbnail:O.default,File:D.default,Text:N.default,LongText:j.default,Name:E.default,Email:A.default,EmailAutoComplete:P.default,Phone:M.default,App:k.default,Validity:_.default,MultiColumnKey:B.default,Ref:V.default,Url:F.default,"Yes/No":W.default,PostalCode:N.default,MultiImage:L.default};t.TypeInputsApi={lookup(e,t){let i=G[e];var o;return"Date"===e&&H.AppGlobals.AppModel.inRollout("materialDatePicker")&&(i=G.MaterialDateTypeInput),!t.isValidityEnum()&&!t.hasSuggestedValues()||i.supportsValidOptions?"Email"===e&&(null===(o=H.AppGlobals.AppModel)||void 0===o?void 0:o.appTemplateModel.Presentation.EnableEmailAutoComplete)&&(i=G.EmailAutoComplete):i=G.Validity,t.shouldUseImageGallery()&&(i=G.MultiImage),i}}},735894:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.EmbeddedFileObject=function(e){let{displayURL:t}=e;const[i,o]=(0,a.useState)((0,l.jsx)(a.Fragment,{}));return(0,a.useEffect)((()=>{(0,r.isAppSheetGetFileUrl)(t)&&function(e){return d(this,void 0,void 0,(function*(){if(p(),u.hasOwnProperty(e))return u[e];const t=yield fetch(e),i=URL.createObjectURL(yield t.blob());return u[e]=i}))}(t).then((e=>d(this,void 0,void 0,(function*(){const t=(yield fetch(e)).headers.get("Content-Type");/image\/(jpeg|png|gif|tiff)(;.*)?/.test(t)&&o((0,l.jsx)(c,{displayURL:e}))})))).catch((e=>{}))}),[t]),i};var n=o(i(496486)),a=i(667294),r=i(365914),s=i(307827),l=i(148521),d=function(e,t,i,o){return new(i||(i=Promise))((function(n,a){function r(e){try{l(o.next(e))}catch(e){a(e)}}function s(e){try{l(o.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,s)}l((o=o.apply(e,t||[])).next())}))};function c(e){let{displayURL:t}=e;return(0,l.jsx)("div",{style:{height:"100%",maxWidth:"90%",margin:"0 auto",width:"fit-content"},children:(0,l.jsx)("img",{src:t,style:{maxWidth:"100%",maxHeight:"100%"}})})}const u={},p=n.default.once((()=>{s.onAppTemplateLoadCallbacks.add((()=>{n.default.forOwn(u,((e,t)=>{URL.revokeObjectURL(e),delete u[t]}))}))}))},260493:(e,t,i)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.IfScreenIs=void 0;var o=i(874004),n=i(148521);t.IfScreenIs=e=>{const t=(0,o.useWidescreen)();return t&&e.wide||!t&&e.narrow?(0,n.jsx)(n.Fragment,{children:e.children}):null}},450539:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SideOfNavBar=void 0;var n=i(249492),a=o(i(386010)),r=i(901545),s=i(646514),l=i(148521);const d=(0,n.makeStyles)({formControl:{minWidth:"80px",marginRight:"12px"},removeFocus:{"&:focus":{backgroundColor:"unset"}},dropdown:{height:"32px",fontSize:"0.778rem"},menuItem:{fontSize:"0.778rem"},button:{marginRight:"10px",padding:"4px 10px","&:hover":{backgroundColor:s.STATE_HOVER},"&&":{marginLeft:0}},activeButton:{backgroundColor:s.EDITOR_BACKGROUND_VARIANT}});var c;!function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT"}(c||(t.SideOfNavBar=c={}));t.default=e=>{let{controls:t}=e;const i=d();return(0,l.jsx)("div",{children:t&&t.map(((e,t)=>{switch(e.type){case"dropdown":{const o=e;return(0,l.jsx)(n.FormControl,{variant:"outlined",className:i.formControl,children:(0,l.jsx)(n.Select,{className:i.dropdown,classes:{select:i.removeFocus},value:o.value,onChange:o.onChange,MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},getContentAnchorEl:null},children:o.options.map(((e,t)=>(0,l.jsx)(n.MenuItem,{value:e.value,className:i.menuItem,children:e.label},t)))})},t)}case"button":{const o=e;return(0,l.jsx)(r.UpperCamelCaseButton,{variant:o.isActive?"outlined":void 0,"aria-label":o.name,className:(0,a.default)(i.button,{[i.activeButton]:o.isActive}),onClick:o.onClick,children:o.name},t)}default:return null}}))})}},57846:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.FilterAttributeButton=void 0;var n=o(i(285963)),a=i(249492),r=i(56749),s=i(698739),l=i(148521);t.FilterAttributeButton=e=>{let{tableSchema:t,attributeName:i}=e;const{openFilterEditor:o}=(0,s.useFilterContext)();return(0,l.jsx)(a.IconButton,{onClick:()=>{const e=t.findAttributeByName(i);o(e)},"aria-label":"filter",style:{padding:"3px"},children:(0,l.jsx)(n.default,{fontSize:"small",style:{verticalAlign:"middle",fontSize:"0.8125rem",color:(0,r.themeColor)("primaryText")}})})}},677627:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.FilterChip=void 0;var n=i(249492),a=i(695386),r=o(i(480366)),s=o(i(6767)),l=i(56749),d=o(i(21870)),c=i(265482),u=i(557310),p=i(148521);const h=(0,a.makeStyles)((e=>{const t="dark"===e.palette.type,i=(0,l.themeColor)("themeMainColor"),o=(0,s.default)(i),n=o.light(),a=n?(0,l.themeColor)("primaryText"):i,r=n?i:o.alpha(.13).rgb().string(),d=n?o.alpha(.8).rgb().string():o.alpha(.1).rgb().string();return{chipLabelText:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:e=>e.maxWidthPx},chip:{flexShrink:0,fontSize:"0.75rem",backgroundColor:t?"":r,color:t?"":a,borderRadius:t=>{let{isReactRoot:i}=t;return i?e.spacing(1):e.spacing(2)},"&:not(:last-child)":{marginRight:4},"&:hover, &:focus":{backgroundColor:t?"":d}},outlined:{border:"1px solid ".concat((0,l.themeColor)("mainBorderColor")),color:"".concat((0,l.themeColor)("primaryText")),backgroundColor:"transparent","&:hover":{backgroundColor:"".concat((0,l.themeColor)("chipHover"))}},deleteIcon:{width:e.spacing(2),height:e.spacing(2),marginRight:e.spacing(1),color:t?"":a,"&:hover":{color:t?"":a}}}}));t.FilterChip=e=>{let{displayName:t,active:i,totalChipCount:o,activeFilterValues:a=[],onDelete:s,onClick:l}=e;const m=1===o?500:300,f=h({maxWidthPx:m,isReactRoot:u.ReactRootUIConfig.isReactRoot()}),{ChipLabel:g,tooltipText:y}=((e,t,i,o)=>{if(!d.default.isWideScreen||0===o.length)return{ChipLabel:(0,p.jsx)(p.Fragment,{children:i}),tooltipText:""};const n=o.join(", "),a="".concat(i,": ").concat(n),r=(0,c.getRenderedTextWidth)(a)>=t?n:"";return{ChipLabel:(0,p.jsx)("div",{className:e.chipLabelText,children:a}),tooltipText:r}})(f,m,t,a);return(0,p.jsx)(n.Tooltip,{arrow:!0,placement:"bottom-end",title:y,children:(0,p.jsx)(n.Chip,{variant:i?"default":"outlined",classes:{root:f.chip,deleteIconColorPrimary:f.deleteIcon,outlined:f.outlined},color:i?"primary":"default",label:g,deleteIcon:(0,p.jsx)(r.default,{"data-testid":"chip-delete-icon"}),onDelete:i?s:void 0,onClick:l})})}},551505:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.FilterChipBar=void 0;var n=i(667294),a=i(695386),r=o(i(528482)),s=o(i(285963)),l=o(i(6767)),d=i(56749),c=o(i(385857)),u=i(351101),p=i(677627),h=i(215471),m=i(698739),f=i(14042),g=i(557310),y=i(148521),v=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};const b=(0,a.makeStyles)((e=>{const t="dark"===e.palette.type,i=(0,l.default)((0,d.themeColor)("themeMainColor")).lightness()>60;return{chipBarContainer:{backgroundColor:"".concat((0,d.themeColor)("mainContentBackground")),borderTop:e=>{let{isInDesktopExperience:t}=e;return t?"1px solid ".concat((0,d.themeColor)("mainBorderColor")):"none"},borderBottom:e=>{let{isInDesktopExperience:t}=e;return t?"none":"1px solid ".concat((0,d.themeColor)("mainBorderColor"))},overflow:"hidden",display:"flex",whiteSpace:"nowrap",alignItems:"center",flexShrink:0,zIndex:1,position:"relative"},chipBar:{position:"relative",display:"block",width:"100%",overflow:"hidden"},buttonContainer:{padding:"0px 6px"},button:{textTransform:"none",padding:"4px 8px",minWidth:"initial",color:"".concat((0,d.themeColor)("themeMainColor")),"&:hover, &:focus":{backgroundColor:"".concat(t||i?(0,d.themeColor)("chipHover"):(0,d.themeColor)("highlightOverlay")),transitionDuration:"200ms"}},buttonIcon:{marginRight:4},icon:{border:"1px solid ".concat((0,d.themeColor)("mainBorderColor")),color:"".concat((0,d.themeColor)("actionButtonPressText")),"&&:hover":{backgroundColor:"".concat((0,d.themeColor)("chipHover"))}}}}));t.FilterChipBar=()=>{const e=b({isInDesktopExperience:g.ReactRootUIConfig.isInDesktopExperience()}),{query:t,setQuery:i,openFilterEditor:o,tableSchema:a,filterBarIsHidden:l}=(0,m.useFilterContext)(),w=(0,u.getAppModel)(),{viewStackKey:S}=(0,n.useContext)(f.ViewStackKeyContext),x=[];if(!t.filters.length&&!x.length||l)return null;const C=new Set(t.filters.map((e=>{let{attribute:t}=e;return t.name()}))),T=x.filter((e=>!C.has(e.name()))),I=new c.default(w,a,void 0,void 0,void 0,void 0,{viewStackKey:S}),R=t.filters.length+T.length;return(0,y.jsx)(d.ASThemeProvider,{children:(0,y.jsxs)("div",{className:e.chipBarContainer,"data-testid":"chip-bar-container",children:[(0,y.jsx)("div",{className:e.buttonContainer,children:(0,y.jsx)(r.default,{classes:{root:e.button,startIcon:e.buttonIcon},onClick:()=>o(),color:"primary",disableFocusRipple:!0,startIcon:(0,y.jsx)(s.default,{}),children:(0,u.mapActionName)("All filters")})}),(0,y.jsx)("div",{className:e.chipBar,"data-testid":"chip-bar",children:(0,y.jsxs)(h.ScrollableHContainer,{children:[t.filters.map(((e,n)=>{var{attribute:a,filterType:r}=e,s=v(e,["attribute","filterType"]);const l=r.activeFilterValues(Object.assign({attribute:a},s));return(0,y.jsx)(p.FilterChip,{displayName:a.displayName(I),active:!0,activeFilterValues:l,onDelete:()=>{return e=n,void i(t.clone(t.filters.filter(((t,i)=>i!==e))));var e},onClick:()=>o(a),totalChipCount:R},n)})),T.map(((e,t)=>(0,y.jsx)(p.FilterChip,{displayName:e.name(),onClick:()=>o(e),totalChipCount:R},"inactive-".concat(t))))]})})]})})}},686801:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.useStyles=t.FilterDrawer=void 0;var n=i(667294),a=i(695386),r=i(249492),s=i(205617),l=i(474834),d=i(56749),c=i(218546),u=i(318926),p=o(i(21870)),h=i(698739),m=i(303622),f=i(148521);const g=t.useStyles=(0,a.makeStyles)({root:{position:"relative",width:300,height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"}});t.FilterDrawer=()=>{const e=g(),{filterEditorIsOpen:t,openFilterEditor:i,closeFilterEditor:o,query:a,setQuery:y,attribute:v}=(0,h.useFilterContext)(),[b,w]=(0,n.useState)(a);(0,n.useEffect)((()=>{w(a)}),[a]);const S=()=>{a!==b&&(u.logger.logAppEvent({eventName:c.AppEventName.FilterApplied}),y(b))},x=()=>{S(),o()};let C;if(v){const e=()=>{S(),i()};C=(0,f.jsx)(s.FilterEditor,{attribute:v,onClose:e,draftQuery:b,onDraftQueryChange:w})}else C=(0,f.jsx)(l.FilterIndex,{setAttribute:i,onClose:x});const T=(0,f.jsx)(r.Drawer,{"data-testid":"filter-drawer",anchor:"right",open:t,onClose:x,ModalProps:{BackdropProps:{invisible:p.default.windowWidth>=p.default.widescreenBreakpoint}},children:(0,f.jsx)("div",{className:"disableLegacyStyles ".concat(e.root),children:C})});return(0,f.jsx)(d.ASThemeProvider,{children:(0,f.jsx)(m.EmulatorComponentWrapper,{shouldClearHoveredElement:!0,dataVFEValues:{},children:T})})}},205617:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.FilterEditor=function(e){var t;const i=v(),[o,b]=(0,c.useScrollEdges)(),{tableSchema:w}=(0,p.useFilterContext)(),{viewStackKey:S}=(0,n.useContext)(h.ViewStackKeyContext),{attribute:x,draftQuery:C,onDraftQueryChange:T}=e;if(!w)return null;const I=(0,u.getAppModel)(),R=new a.default(I,w,void 0,void 0,void 0,void 0,{viewStackKey:S}),O=x.name(),D=x.displayName(R),N=(0,d.getFilterForAttribute)(x);if(null===N)return null;const j=(null===(t=C.filters.find((e=>e.attribute.name()===O)))||void 0===t?void 0:t.state)||N.initialState({attribute:x,tableSchema:w}),E=e=>{T(C.withFilterApplied(x,e))},A=()=>{E(j),e.onClose()};return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(l.FilterHeaderOrFooter,{raised:!1===(null==o?void 0:o.top),children:(0,y.jsxs)(r.Toolbar,{children:[(0,y.jsx)(r.IconButton,{edge:"start",color:"inherit","aria-label":"back",onClick:A,children:(0,y.jsx)(m.DirectionAwareIcon,{icon:(0,y.jsx)(s.default,{})})}),(0,y.jsx)(r.Typography,{variant:"h6",className:(0,f.default)(i.title,{[i.reactTitle]:g.ReactRootUIConfig.isReactRoot()}),children:D})]})}),(0,y.jsx)("div",{className:"".concat(i.editor," ").concat(i.content),ref:b,children:(0,y.jsx)(N.Editor,{self:N,attribute:x,tableSchema:w,state:j,onChange:E,onClose:A})}),(0,y.jsx)(l.FilterHeaderOrFooter,{raised:!1===(null==o?void 0:o.bottom),children:(0,y.jsxs)(r.Grid,{container:!0,children:[(0,y.jsx)(r.Grid,{item:!0,xs:6,children:(0,y.jsx)(r.Button,{fullWidth:!0,className:(0,f.default)(i.footerButton,{[i.reactFooter]:g.ReactRootUIConfig.isReactRoot()}),onClick:()=>{E(N.initialState({attribute:x,tableSchema:w}))},disabled:N.isEmpty({attribute:x,tableSchema:w,state:j}),children:null==I?void 0:I.MapActionName("Clear")})}),(0,y.jsx)(r.Grid,{item:!0,xs:6,children:(0,y.jsx)(r.Button,{fullWidth:!0,className:(0,f.default)(i.footerButton,{[i.reactFooter]:g.ReactRootUIConfig.isReactRoot()}),color:"primary",onClick:A,children:null==I?void 0:I.MapActionName("Done")})})]})})]})};var n=i(667294),a=o(i(385857)),r=i(249492),s=o(i(369826)),l=i(712049),d=i(740127),c=i(693540),u=i(351101),p=i(698739),h=i(14042),m=i(562858),f=o(i(386010)),g=i(557310),y=i(148521);const v=(0,r.makeStyles)((e=>({content:{flexGrow:1,overflow:"auto"},title:{flexGrow:1},editor:{padding:e.spacing(2)},footerButton:{padding:"".concat(e.spacing(2),"px 0")},reactFooter:{fontSize:"0.899rem"},reactTitle:{fontSize:"1rem",fontWeight:400}})))},712049:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FilterHeaderOrFooter=void 0;var o=i(249492),n=i(148521);const a=(0,o.makeStyles)((e=>({FilterHeaderOrFooter:{flexShrink:0,zIndex:1e3,background:e.palette.background.paper,margin:"0 -16px",padding:"0 16px"}})));t.FilterHeaderOrFooter=e=>{let{raised:t=!1,children:i}=e;const r=a();return(0,n.jsx)(o.Paper,{elevation:t?2:0,className:r.FilterHeaderOrFooter,children:i})}},474834:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.FilterIndex=function(e){const t=w(),[i,o]=(0,d.useScrollEdges)(),{tableSchema:c,query:u,setQuery:x}=(0,g.useFilterContext)(),{viewStackKey:C}=(0,n.useContext)(y.ViewStackKeyContext),{onClose:T}=e;if(!c)return null;const I=(0,f.getAppModel)(),R=new h.default(I,c,void 0,void 0,void 0,void 0,{viewStackKey:C}),O={};for(const e of u.filters)O[e.attribute.name()]=e;const D=c?c.searchableAttributes():[],N=[];for(const e of D){const t=e.name();if(c.isInSlice(t)){const t=O[e.name()]||S(e,c);null!==t&&N.push(t)}}return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(m.FilterHeaderOrFooter,{raised:!1===(null==i?void 0:i.top),children:(0,b.jsxs)(r.Toolbar,{children:[(0,b.jsx)(r.IconButton,{edge:"start",color:"inherit","aria-label":"back",onClick:T,children:(0,b.jsx)(l.default,{})}),(0,b.jsx)(r.Typography,{variant:"h6",className:(0,a.default)(t.title,{[t.reactTitle]:p.ReactRootUIConfig.isReactRoot()}),children:(0,f.mapActionName)("Filter")})]})}),(0,b.jsx)(r.List,{component:"nav",className:"filtering-index ".concat(t.content),ref:o,children:N.map((i=>{let{filterType:o,attribute:n,state:a}=i;return(0,b.jsxs)(r.ListItem,{button:!0,onClick:()=>e.setAttribute(n),children:[(0,b.jsx)(r.ListItemText,{primary:n.displayName(R),secondary:o.isEmpty({attribute:n,state:a,tableSchema:c})?null:(0,b.jsx)(o.Summary,{self:o,attribute:n,state:a,tableSchema:c})}),(0,b.jsx)(v.DirectionAwareIcon,{icon:(0,b.jsx)(s.default,{className:t.icon})})]},n.name())}))}),(0,b.jsx)(m.FilterHeaderOrFooter,{raised:!1===(null==i?void 0:i.bottom),children:(0,b.jsxs)(r.Grid,{container:!0,children:[(0,b.jsx)(r.Grid,{item:!0,xs:6,children:(0,b.jsx)(r.Button,{fullWidth:!0,className:(0,a.default)(t.footerButton,{[t.reactFooter]:p.ReactRootUIConfig.isReactRoot()}),onClick:()=>{x(u.clone([]))},disabled:0===u.filters.length,children:null==I?void 0:I.MapActionName("Clear")})}),(0,b.jsx)(r.Grid,{item:!0,xs:6,children:(0,b.jsx)(r.Button,{fullWidth:!0,className:(0,a.default)(t.footerButton,{[t.reactFooter]:p.ReactRootUIConfig.isReactRoot()}
1),color:"primary",onClick:T,children:null==I?void 0:I.MapActionName("Done")})})]})})]})},t.useStyles=void 0;var n=i(667294),a=o(i(386010)),r=i(249492),s=o(i(301197)),l=o(i(369826)),d=i(693540),c=i(646514),u=i(740127),p=i(557310),h=o(i(385857)),m=i(712049),f=i(351101),g=i(698739),y=i(14042),v=i(562858),b=i(148521);const w=t.useStyles=(0,r.makeStyles)((e=>({icon:{color:c.GOOGLE_GREY_700,fontSize:p.ReactRootUIConfig.isReactRoot()?"14px":"1rem"},content:{flexGrow:1,overflow:"auto"},title:{flexGrow:1},editor:{padding:e.spacing(2)},footerButton:{padding:"".concat(e.spacing(2),"px 0")},reactFooter:{fontSize:"0.899rem"},reactTitle:{fontSize:"1rem",fontWeight:400}})));function S(e,t){const i=(0,u.getFilterForAttribute)(e);if(i){const o=i.initialState({attribute:e,tableSchema:t});return{attribute:e,tableSchema:t,filterType:i,state:o}}return null}},215471:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.ScrollableHContainer=void 0;var n=i(667294),a=i(695386),r=o(i(401890)),s=o(i(243861)),l=o(i(849155)),d=o(i(386010)),c=i(56749),u=o(i(21870)),p=i(557310),h=i(148521);const m=(0,a.makeStyles)((()=>{const e={display:"flex",position:"absolute",borderRadius:"50%",top:"calc(50% - 15px)",backgroundColor:"".concat((0,c.themeColor)("mainContentBackground")),boxShadow:"0 1px 2px 0 rgb(60 64 67 / 30%), 0 1px 3px 1px rgb(60 64 67 / 15%)","&:hover, &:focus":{backgroundColor:"".concat((0,c.themeColor)("actionButtonHoverBackground"))}};return{arrowLeft:Object.assign(Object.assign({},e),{left:0}),arrowRight:Object.assign(Object.assign({},e),{right:0})}}));t.ScrollableHContainer=e=>{let{children:t}=e;const[i,o]=(0,n.useState)(!1),[a,c]=(0,n.useState)(!1),[f,g]=(0,n.useState)(!1),y=m({showLeftArrow:a,showRightArrow:f}),v=(0,n.useRef)(null);let b=null;const w=p.ReactRootUIConfig.isInDesktopExperience()||u.default.isWideScreen,S=()=>{if(v&&v.current){const e=v.current.scrollWidth,t=v.current.clientWidth,i=Math.ceil(v.current.scrollLeft);c(0!==i),g(t+i<e)}};(0,n.useEffect)((()=>{i||S()}),[i]);const x=e=>{if(v&&v.current){const t=v.current,i="left"===e?0:t.scrollWidth;t.scrollLeft=i}};return(0,h.jsxs)("div",{"data-testid":"scrollable-container",onMouseLeave:w?()=>{c(!1),g(!1)}:void 0,onMouseEnter:w?()=>{S()}:void 0,className:(0,d.default)("scrollable-container",{"left-arrow-visible":a,"right-arrow-visible":f}),ref:v,onScroll:w?()=>{b&&clearTimeout(b),b=setTimeout((()=>{b=null,o(!1)}),500),i||o(!0)}:void 0,children:[t,w&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(r.default,{className:"scroll-arrow-left","data-testid":"scroll-arrow-left",classes:{root:y.arrowLeft},onClick:()=>x("left"),size:"small",children:(0,h.jsx)(l.default,{})}),(0,h.jsx)(r.default,{className:"scroll-arrow-right","data-testid":"scroll-arrow-right",classes:{root:y.arrowRight},onClick:()=>x("right"),size:"small",children:(0,h.jsx)(s.default,{})})]})]})}},265482:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRenderedTextWidth=void 0;t.getRenderedTextWidth=e=>{const t=document.createElement("div");t.style.visibility="hidden",t.style.display="inline-flex",t.style.fontSize="0.75rem",t.textContent=e,document.body.appendChild(t);const i=t.getBoundingClientRect().width;return document.body.removeChild(t),i}},89499:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Weekday=t.ROW_INNER_HEIGHT_PX=t.ROW_HEIGHT_PX=t.MIN_TASK_WIDTH_PX=t.MIN_COLUMN_WIDTH_PX=t.LINK_OFFSET_PX=t.INDENT_WIDTH_PX=t.GANTT_SORT_HANDLE_WIDTH_PX=t.GANTT_HEADER_FONT_WEIGHT=t.GANTT_HEADER_FONT_SIZE=t.GANTT_COLUMN_PADDING_PX=t.DENSE_CHECKBOX_WIDTH=t.CHECKBOX_WIDTH=t.BAR_HEIGHT_PX=t.ACTION_COLUMN_WIDTH=void 0;const i=t.ROW_HEIGHT_PX=48;t.BAR_HEIGHT_PX=i/2,t.ROW_INNER_HEIGHT_PX=i-13,t.MIN_COLUMN_WIDTH_PX=100,t.GANTT_COLUMN_PADDING_PX=16,t.GANTT_SORT_HANDLE_WIDTH_PX=32,t.GANTT_HEADER_FONT_WEIGHT=700,t.GANTT_HEADER_FONT_SIZE="14px",t.ACTION_COLUMN_WIDTH=30,t.MIN_TASK_WIDTH_PX=1,t.CHECKBOX_WIDTH=26,t.DENSE_CHECKBOX_WIDTH=16,t.INDENT_WIDTH_PX=20,t.LINK_OFFSET_PX=7;var o;!function(e){e[e.Monday=1]="Monday",e[e.Tuesday=2]="Tuesday",e[e.Wednesday=3]="Wednesday",e[e.Thursday=4]="Thursday",e[e.Friday=5]="Friday",e[e.Saturday=6]="Saturday",e[e.Sunday=7]="Sunday"}(o||(t.Weekday=o={}))},536611:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.useStyles=t.Gantt=t.DEFAULT_COLUMNS=void 0;var n=i(667294),a=i(249492),r=i(695386),s=o(i(386010)),l=o(i(730381)),d=i(74281),c=i(537281),u=i(583294),p=o(i(365914)),h=i(56749),m=i(557310),f=i(148521),g=function(e,t,i,o){return new(i||(i=Promise))((function(n,a){function r(e){try{l(o.next(e))}catch(e){a(e)}}function s(e){try{l(o.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,s)}l((o=o.apply(e,t||[])).next())}))};const y=t.useStyles=(0,r.makeStyles)((e=>({ganttContainerBase:{width:"100%",border:"1px solid ".concat(e.palette.divider),overflow:"hidden",backgroundColor:(0,h.themeColor)("mainContentBackground"),boxSizing:"border-box","& *, & *::before, & *::after":{boxSizing:"inherit"}},ganttTabsContainer:{display:"flex",flexDirection:"column"},ganttSplitPanesContainer:{display:"flex",height:"100%",width:"100%"},ganttCompactContent:{flex:1,position:"relative",overflow:"hidden"},timelineNotAvailable:{padding:e.spacing(2.5),textAlign:"center",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},leftPane:{height:"100%",display:"flex",flexDirection:"column",marginRight:"-3px",position:"relative",overflowX:"auto"},divider:{width:"7px",cursor:"col-resize",backgroundColor:"transparent",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",position:"relative",zIndex:1,"&:hover $dividerHairline":{backgroundColor:e.palette.primary.main}},dividerHairline:{width:"1px",height:"100%",backgroundColor:e.palette.divider},rightPane:{flex:1,height:"100%",display:"flex",flexDirection:"column",overflow:"hidden",marginLeft:"-3px",position:"relative"}}))),v={day:64,week:16,month:8},b=t.DEFAULT_COLUMNS=[{id:"name",header:"Task Name",field:"name",width:300},{id:"start",header:"Start Date",field:"start",width:150},{id:"end",header:"End Date",field:"end",width:150}],w=e=>(0,l.default)(e).startOf("day").toDate(),S=(e,t)=>(0,l.default)(e).add(t,"days").toDate(),x=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const i=(0,l.default)(e);return 1===t?i.startOf("isoWeek").toDate():i.startOf("week").toDate()},C=e=>(0,l.default)(e).startOf("month").toDate(),T=(e,t)=>(0,l.default)(e).add(t,"months").toDate(),I=(e,t)=>{const i=(0,l.default)(e).startOf("day");return(0,l.default)(t).startOf("day").diff(i,"days")};t.Gantt=e=>{let{tasks:t=[],links:i=[],columns:o,onTaskToggle:r,showProgress:h=!1,height:R="600px",zoomLevel:O="day",tabsMode:D=!1,onTaskFocus:N,onTimelineTaskClick:j,defaultSortBy:E={columnId:"start",ascending:!0},sortBy:A,onSort:P,taskComparator:M,activeCompactView:k="grid",onActiveCompactViewChange:_,focusedTaskId:B,scrollToDate:L,ganttRef:V,setScrollToDate:F,disabledWeekdays:W,disabledDates:H,isDenseView:U=!1,showBaseline:G=!1,inSelectionMode:z=!1,inTableEditMode:K=!1,rowIsSelected:Y,handleSelectAllTasks:q,selectedRows:X,onRenderedRowIdsChange:Q,onTaskMove:$,onTaskResize:Z,onLinkCreate:J,onLinkDelete:ee,isLinkCreationSupported:te}=e;const ie=y(),{isInitialRenderComplete:oe,onTableLoad:ne,onTimelineLoad:ae}=(()=>{const[e,t]=(0,n.useState)(!1),i=(0,n.useRef)(!1),o=(0,n.useRef)(!1);return{isInitialRenderComplete:e,onTableLoad:()=>{i.current=!0,o.current&&t(!0)},onTimelineLoad:()=>{o.current=!0,i.current&&t(!0)}}})(),[re,se]=(0,n.useState)({}),[le,de]=(0,n.useState)(E),ce=A||le,[ue,pe]=(0,n.useState)({}
1),[he,me]=(0,n.useState)(void 0),[fe,ge]=(0,n.useState)(null),[ye,ve]=(0,n.useState)(null),[be,we]=(0,n.useState)(null),[Se,xe]=(0,n.useState)(null),Ce=(0,n.useCallback)((e=>{xe(e===Se?null:e)}),[]),Te=void 0!==B,Ie=Te?B:fe,Re=void 0!==L,Oe=Re?L:he,De=(0,n.useMemo)((()=>M||(e=>{let{columnId:t,ascending:i}=e;return(e,o)=>{const n=t in e&&t in o?t:"start",a=(r=e[n],s=o[n],null==r&&null==s?0:null==r?-1:null==s?1:r instanceof Date&&s instanceof Date?r.getTime()-s.getTime():String(r).localeCompare(String(s)));var r,s;return i?a:-a}})(ce)),[ce,M]),[Ne,je]=(0,n.useState)(40),[Ee,Ae]=(0,n.useState)(null),[Pe,Me]=(0,n.useState)({cells:[],contentWidth:0,rangeStartDate:void 0,rangeEndDate:void 0,effectiveDayWidth:0}),ke=(0,n.useRef)(!1),_e=(0,n.useRef)(null),Be=(0,n.useRef)(null),Le=(0,n.useRef)(null),[Ve,Fe]=(0,n.useState)(0),[We,He]=(0,n.useState)(0),[Ue,Ge]=(0,n.useState)(0);(0,n.useLayoutEffect)((()=>{const e=_e.current;if(!e)return;const t=new ResizeObserver((()=>{var t,i;D?(Fe(e.clientWidth),He(e.clientWidth)):(Fe((null===(t=Be.current)||void 0===t?void 0:t.clientWidth)||0),He((null===(i=Le.current)||void 0===i?void 0:i.clientWidth)||0)),Ge(e.clientHeight||0)}));return t.observe(e),()=>{t.disconnect()}}),[D]);const ze=(0,n.useCallback)((e=>{Ae(e)}),[]);(0,n.useEffect)((()=>{const e={};t.forEach((t=>{var i;"project"!==t.type&&"boolean"!=typeof t.open||(e[t.id]=null===(i=t.open)||void 0===i||i)})),se(e)}),[t]),(0,n.useEffect)((()=>{if(!ee)return;const e=e=>g(void 0,void 0,void 0,(function*(){"Delete"!==e.key&&"Backspace"!==e.key||null==Se?ye&&"Escape"===e.key&&(e.preventDefault(),ve(null)):(e.preventDefault(),ee(Se),xe(null))}));return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[Se,ee,ye]);const Ke=(0,n.useMemo)((()=>((e,t,i)=>{if(!e||0===e.length)return[];const o=e.reduce(((e,t)=>(e[t.id]=t,e)),{});let n;do{n="rootId-".concat(p.default.uuid())}while(o[n]);const a=e.reduce(((e,t)=>{var i;const a=null!=t.parent&&o[t.parent]?t.parent:n;return null!==(i=e[a])&&void 0!==i||(e[a]=[]),e[a].push(t.id),e}),{[n]:[]});Object.keys(a).forEach((e=>{a[e].sort(((e,t)=>i(o[e],o[t])))}));const r={},s=e=>{if(void 0!==r[e])return r[e];const t=o[e];return t&&null!=t.parent&&o[t.parent]?t.id===t.parent?r[e]=0:r[e]=1+s(t.parent):r[e]=0},l={},d=e=>{var i,n;if(void 0!==l[e])return l[e];const a=o[e];if(!a)return l[e]=!1;const r=a.parent;if(null==r||!o[r])return l[e]=!0;const s=o[r],c=null===(n=null!==(i=t[r])&&void 0!==i?i:s.open)||void 0===n||n;return l[e]=!!c&&d(r)},c=[],u=e=>{var i,n;const r=o[e];if(!r)return;const l=(a[e]||[]).length>0;c.push(Object.assign(Object.assign({},r),{depth:s(e),isActuallyVisible:d(e),isParent:l,open:l?null===(n=null!==(i=t[e])&&void 0!==i?i:r.open)||void 0===n||n:void 0})),(a[e]||[]).forEach(u)};return a[n].forEach(u),c})(t,re,De)),[t,re,De]),Ye=(0,n.useMemo)((()=>Ke.filter((e=>e.isActuallyVisible))),[Ke]),qe=(0,n.useMemo)((()=>(o||b).map((e=>{const t=ue[e.id]||0,i=(e.width||0)+t;return Object.assign(Object.assign({},e),{width:i})}))),[o,ue]),Xe=(0,n.useMemo)((()=>new Map(Ke.map((e=>[e.id,e])))),[Ke]),Qe=(0,n.useMemo)((()=>new Map(Ye.map((e=>[e.id,e])))),[Ye]),$e=(0,n.useMemo)((()=>new Map(Ye.map(((e,t)=>[e.id,t])))),[Ye]),Ze=(0,n.useCallback)(((e,t,i)=>{ye&&(i&&ye.sourceTaskId!==e?we({targetTaskId:e,targetAnchor:t}):i||we(null))}),[ye]),Je=(0,n.useCallback)(((e,t)=>{if(ye){if(ye.sourceTaskId===e)return void ve(null);let i="FS";"e"===ye.sourceAnchor&&"s"===t?i="FS":"s"===ye.sourceAnchor&&"s"===t?i="SS":"e"===ye.sourceAnchor&&"e"===t?i="FF":"s"===ye.sourceAnchor&&"e"===t&&(i="SF"),J(ye.sourceTaskId,e,i),ve(null)}else ve({sourceTaskId:e,sourceAnchor:t})}),[ye,J]),et=(0,n.useCallback)(((e,t)=>{const i=Ke.find((t=>t.id===e)),o=null==i?void 0:i.start;(null==Oe?void 0:Oe.getTime())===(null==o?void 0:o.getTime())&&Ie===e?Re||(me(void 0),setTimeout((()=>me(o)),0)):Re||me(o),Te||ge(e),null==N||N(i||null,t)}),[Te,N,Ke,Oe,Ie,Re]),tt=(0,n.useCallback)((e=>{const t=e.start;(null==Oe?void 0:Oe.getTime())===(null==t?void 0:t.getTime())?Re||(me(void 0),setTimeout((()=>me(t)),0)):Re||me(t),Te||ge(e.id),null==j||j(e)}),[Te,j,Oe,Re]),it=e=>{const t=(i=ce).columnId===e?Object.assign(Object.assign({},i),{ascending:!i.ascending}):{columnId:e,ascending:!0};var i;A||de(t),null==P||P(t.columnId,t.ascending)},ot=(e,t)=>
1{pe((i=>Object.assign(Object.assign({},i),{[e]:(i[e]||0)+t})))},nt=(0,n.useCallback)(((e,t)=>{const i=Ke.filter((e=>e.start&&e.end));if(0===i.length){return void Me({cells:[],contentWidth:0,rangeStartDate:void 0,rangeEndDate:void 0,effectiveDayWidth:v[O]||v.day})}const o=i.flatMap((e=>[e.start,e.end,e.baselineStart,e.baselineEnd].filter((e=>e instanceof Date))));let n,a,r=e||w(new Date(Math.min(...o.map((e=>e.getTime()))))),s=t||w(new Date(Math.max(...o.map((e=>e.getTime())))));if("day"===O?(r=S(r,-1),s=S(s,1)):"week"===O?(r=S(r,-7),s=S(s,7)):"month"===O&&(r=T(r,-1),s=T(s,1)),"week"===O)n=x(r),a=S(x(s),6);else if("month"===O){n=C(r);const e=C(s);a=S(T(e,1),-1)}else n=r,a=s;if(a<n)if("day"===O)a=new Date(n);else if("week"===O)a=S(x(n),6);else if("month"===O){const e=C(n);a=S(T(e,1),-1)}const d=v[O]||v.day,{cells:c,calculatedContentWidth:u}=(e=>{const t=[];let i=new Date(n),o=0;if("day"===O)for(;i<=a;){const n=e;t.push({id:"day-".concat(i.toISOString().slice(0,10)),label:i.toLocaleDateString(void 0,{month:"short",day:"numeric"}),width:n,startDate:new Date(i),endDate:new Date(S(i,1))}),o+=n,i=S(i,1)}else if("week"===O)for(i=x(n);i<=a;){const n=S(i,6),a=7*e;t.push({id:"week-".concat(i.toISOString().slice(0,10)),label:"".concat(i.toLocaleDateString(void 0,{month:"short",day:"numeric"})," - ").concat(n.toLocaleDateString(void 0,{month:"short",day:"numeric"})),width:a,startDate:new Date(i),endDate:new Date(n)}),o+=a,i=S(i,7)}else if("month"===O)for(i=C(n);i<=a;){const n=(0,l.default)(i).daysInMonth(),a=n*e;t.push({id:"month-".concat(i.getFullYear(),"-").concat(i.getMonth()),label:i.toLocaleDateString(void 0,{month:"long",year:"numeric"}),width:a,startDate:new Date(i),endDate:new Date(S(i,n-1))}),o+=a,i=T(i,1)}return{cells:t,calculatedContentWidth:o}})(d);Me({cells:c,contentWidth:u,rangeStartDate:n,rangeEndDate:a,effectiveDayWidth:d})}),[Ke,O]);(0,n.useEffect)((()=>{nt()}),[t,O,nt]);const{cells:at,contentWidth:rt,rangeStartDate:st,rangeEndDate:lt,effectiveDayWidth:dt}=Pe;(0,n.useImperativeHandle)(V,(()=>({jumpToDate:e=>{if(F){if(!(st&&lt&&e>=st&&e<=lt)){nt(e<(st||e)?e:st,e>(lt||e)?e:lt)}(null==Oe?void 0:Oe.getTime())===e.getTime()?(F(void 0),setTimeout((()=>F(e)),0)):F(e)}}})));const ct=e=>{var i,o,n;const a=!(null===(n=null!==(i=re[e])&&void 0!==i?i:null===(o=t.find((t=>t.id===e)))||void 0===o?void 0:o.open)||void 0===n||n);se((t=>Object.assign(Object.assign({},t),{[e]:a}))),null==r||r(e,a)},ut=(0,n.useCallback)((e=>{e.preventDefault(),ke.current=!0;let t=null;const i=e=>{t&&cancelAnimationFrame(t),t=requestAnimationFrame((()=>{if(!ke.current||!_e.current||!Be.current)return;const t=_e.current.getBoundingClientRect(),i=(e.clientX-t.left)/t.width*100,o=Math.max(15,Math.min(i,85));Be.current.style.width="".concat(o,"%")}))},o=()=>{var e,n;if(t&&cancelAnimationFrame(t),Be.current){const t=parseFloat(Be.current.style.width);je(t),Fe((null===(e=Be.current)||void 0===e?void 0:e.clientWidth)||0),He((null===(n=Le.current)||void 0===n?void 0:n.clientWidth)||0)}ke.current=!1,document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",o)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",o)}),[]),pt=(e,t)=>{_&&_(t)};(0,n.useEffect)((()=>{Q&&Q(Ke.map((e=>String(e.id))))}),[Ye,Q,Ke]);const ht=(0,n.useCallback)((e=>{const t=i.some((t=>t.target===e.id));return!e.isParent&&!t&&!m.ReactRootUIConfig.isInMobileExperience()}),[i]),mt=(0,n.useCallback)(((e,t)=>{const o=i.some((i=>"w"===t?i.target===e.id&&("FS"===i.type||"SS"===i.type):i.target===e.id&&("FF"===i.type||"SF"===i.type)));return!(e.isParent||o||U||m.ReactRootUIConfig.isInMobileExperience())}),[i,U]);return(0,f.jsx)("div",{ref:_e,className:(0,s.default)(ie.ganttContainerBase,D?ie.ganttTabsContainer:ie.ganttSplitPanesContainer),style:{height:R},"data-initial-render-complete":oe,"data-testid":"gantt-container",children:(0,f.jsx)(d.ScrollSync,{children:e=>{let{onScroll:t,scrollLeft:o,scrollTop:n}=e;const r=(0,f.jsx)(c.TablePanel,{visibleTasks:Ye,allTasks:Ke,columns:qe,focusedTaskId:Ie,onTaskFocus:et,onTaskToggle:ct,sortBy:ce,onSort:it,scrollTop:n,onScroll:e=>{t(Object.assign(Object.assign({},e),{scrollLeft:o}))},onColumnResize:ot,width:Ve,height:Ue,onInitialRender:ne,isDenseView:U,inSelectionMode:z,inTableEditMode:K,rowIsSelected:Y,onSelectAllTasks:q,selectedRows:X}),s=(0,f.jsx)(u.TimelinePanel,{visibleTasks:Ye,links:i,timelineHeaderCells:at,timelineContentWidth:rt,timelineRangeStartDate:st,timelineRangeEndDate:lt,currentDayWidth:dt,focusedTaskId:Ie,onTaskFocus:et,showProgress:h,getDaysBetweenDates:I,visibleTaskMap:Qe,visibleTaskIndexMap:$e,onTimelineTaskClick:tt,hoveredLinkId:Ee,onLinkHover:ze,onScroll:t,scrollTop:n,scrollLeft:o,width:We,height:Ue,scrollToDate:Oe,onInitialRender:ae,disabledWeekdays:W,disabledDates:H,isDenseView:U,showBaseline:G,allTasksMap:Xe,onTaskMove:$,onTaskResize:Z,onAnchorHover:Ze,onAnchorClick:Je,canTaskBeMoved:ht,canTaskBeResized:mt,selectedLinkId:Se,onLinkClick:Ce,isLinkCreationSupported:te,predecessorSource:ye,hoverTarget:be},JSON.stringify(i.map((e=>e.id))));return D?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(a.Tabs,{value:k,onChange:pt,indicatorColor:"primary",textColor:"primary",variant:"fullWidth",children:[(0,f.jsx)(a.Tab,{label:"Grid",value:"grid"}),(0,f.jsx)(a.Tab,{label:"Timeline",value:"timeline"})]}),(0,f.jsxs)("div",{className:ie.ganttCompactContent,children:[(0,f.jsx)("div",{style:{display:"grid"===k?"block":"none",height:"100%",overflowX:"auto"},children:r}),(0,f.jsx)("div",{style:{display:"timeline"===k?"block":"none",height:"100%"},children:s})]})]}):(0,f.jsxs)("div",{className:ie.ganttSplitPanesContainer,children:[(0,f.jsx)("div",{ref:Be,className:ie.leftPane,style:{width:"".concat(Ne,"%")},children:r}),(0,f.jsx)("div",{onMouseDown:ut,className:ie.divider,title:"Resize panes",children:(0,f.jsx)("div",{className:ie.dividerHairline})}),(0,f.jsx)("div",{ref:Le,className:ie.rightPane,children:s})]})}})})}},500196:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.CheckBoxIcon=void 0;var n=o(i(386010)),a=i(695386),r=i(646514),s=i(89499),l=i(148521);const d=(0,a.makeStyles)((()=>(0,a.createStyles)({customCheckbox:{backgroundColor:r.GOOGLE_WHITE,border:"1px solid ".concat(r.GOOGLE_GREY_400),borderRadius:2,boxSizing:"border-box",color:r.GOOGLE_WHITE,display:"flex",alignItems:"center",justifyContent:"center",width:s.CHECKBOX_WIDTH,height:s.CHECKBOX_WIDTH,fontSize:18},customCheckboxChecked:{borderColor:r.GOOGLE_BLUE_600,backgroundColor:r.GOOGLE_BLUE_600},denseCheckbox:{width:s.DENSE_CHECKBOX_WIDTH,height:s.DENSE_CHECKBOX_WIDTH,fontSize:12},deselectAll:{color:r.GOOGLE_GREY_400,backgroundColor:r.GOOGLE_WHITE}})));t.CheckBoxIcon=e=>{let{className:t,isDenseView:i,isChecked:o=!1,selectedRows:a=[]}=e;const r=d(),s=a.length>0&&!o,c=s?"fa fa-minus":"fa fa-check";return(0,l.jsx)("div",{className:(0,n.default)(r.customCheckbox,t,{[r.customCheckboxChecked]:o,[r.denseCheckbox]:i,[r.deselectAll]:s}),children:(0,l.jsx)("i",{className:c})})}},64266:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a,r=i(249492),s=o(i(386010)),l=i(646514),d=i(56749),c=i(148521);const u=(0,r.makeStyles)({predecessorAnchor:{position:"absolute",width:"10px",height:"10px",marginTop:"-5px",top:"50%",borderRadius:"50%",zIndex:2,cursor:"pointer",border:"1.5px solid ".concat(l.GOOGLE_WHITE),boxShadow:"0 2px 6px rgba(0, 0, 0, 0.30)",backgroundColor:null!==(n=(0,d.themeColor)("navigationButtonBackground"))&&void 0!==n?n:l.GOOGLE_BLACK,opacity:0,"&:hover":{opacity:1}},leftAnchor:{left:"-14px"},rightAnchor:{right:"-14px"},milestoneLeftAnchor:{transform:"translate(-16px, 16px)"},milestoneRightAnchor:{transform:"translate(16px, -16px)"},predecessorActive:{border:"1.5px solid ".concat(l.GOOGLE_YELLOW_700),boxShadow:"0 2px 6px rgba(0, 0, 0, 0.30)",backgroundColor:null!==(a=(0,d.themeColor)("navigationButtonBackground"))&&void 0!==a?a:l.GOOGLE_BLACK,opacity:1}});t.default=e=>{let{task:t,anchorType:i,predecessorSource:o,onAnchorClick:n,onAnchorHover:a,tooltipText:l,hoverTarget:d,shouldBeVisible:p}=e;const h=u(),m=(null==o?void 0:o.sourceTaskId)===t.id,f=!!o,g=null==o?void 0:o.sourceAnchor,y=m&&g===i,v="milestone"===t.type?"s"===i?h.milestoneLeftAnchor:h.milestoneRightAnchor:"s"===i?h.leftAnchor:h.rightAnchor,b=f&&null!=l&&!m&&(null==d?void 0:d.targetTaskId)===t.id&&(null==d?void 0:d.targetAnchor)===i;return p?(0,c.jsx)(r.Tooltip,{title:b?l:"",open:b,placement:"top",children:(0,c.jsx)("div",{className:(0,s.default)(h.predecessorAnchor,v,y&&h.predecessorActive),onClick:e=>{e.stopPropagation(),n(t.id,i)},onMouseEnter:()=>{a(t.id,i,!0)},onMouseLeave:()=>a(t.id,i,!1),"data-dndkit-disabled":"true","aria-label":"Predecessor anchor ".concat("s"===i?"Start":"End")})}):null}},537281:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.TablePanel=void 0;var n=i(667294),a=o(i(386010)),r=i(695386),s=i(74281),l=i(249492),d=o(i(10313)),c=o(i(199813)),u=i(89499),p=i(56749),h=o(i(431534)),m=i(500196),f=i(148521);const g=(0,r.makeStyles)((e=>(0,r.createStyles)({flexContainer:{display:"flex",alignItems:"center",boxSizing:"border-box",overflow:"hidden",marginRight:0,minWidth:0,"&:first-of-type":{marginLeft:0}},table:{"& .ReactVirtualized__Table__Grid":{outline:"none"}},tableRowHovered:{backgroundColor:e.palette.grey[200]},cellWrapper:{cursor:"pointer"},tableCell:{width:"100%",height:"100%",borderBottom:"1px solid ".concat(e.palette.divider),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",position:"relative",padding:0,fontSize:u.GANTT_HEADER_FONT_SIZE},tableRowFocused:{backgroundColor:e.palette.action.hover},disabledBackground:{backgroundColor:(0,p.themeColor)("mainBackgroundVariant")},treeCellContent:{display:"flex",alignItems:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},indentSpacer:{flexShrink:0,marginLeft:"".concat(u.GANTT_COLUMN_PADDING_PX/2,"px")},chevronIconBase:{fontSize:24},iconPlaceholder:{display:"inline-block",width:"30px"},taskNameInCell:{overflow:"hidden",textOverflow:"ellipsis"},cellContent:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}
1,defaultInnerContent:{paddingLeft:"".concat(u.GANTT_COLUMN_PADDING_PX,"px")}})));t.TablePanel=e=>{const{columns:t,visibleTasks:i,focusedTaskId:o,onTaskFocus:r,onTaskToggle:p,sortBy:y,onSort:v,scrollTop:b,onScroll:w,onColumnResize:S,width:x,height:C,onInitialRender:T,isDenseView:I=!1,inSelectionMode:R=!1,inTableEditMode:O=!1,rowIsSelected:D,onSelectAllTasks:N,selectedRows:j,allTasks:E}=e,A=g(),P=(0,n.useRef)(!1),M=(0,n.useRef)(null),k=(0,n.useRef)(null),[_,B]=(0,n.useState)(null),L=I?u.ROW_HEIGHT_PX/2:u.ROW_HEIGHT_PX,V=y.ascending?"Sort by ascending order":"Sort by descending order",F=(0,n.useCallback)((e=>{if(!R)return null;const t=!!D&&D(e),i=t?"Deselect":"Select";return(0,f.jsx)(l.Checkbox,{inputProps:{"aria-label":i},checked:t,icon:(0,f.jsx)(m.CheckBoxIcon,{isDenseView:I}),checkedIcon:(0,f.jsx)(m.CheckBoxIcon,{isChecked:!0,isDenseView:I})})}),[R,D,I]),W=(0,n.useCallback)((e=>{let{columnIndex:t,rowData:i,isFrozen:o,columns:n}=e;var r;const s=i,h=n[t];let m;if(0!==t||o){let e;if(h.renderCell)e=h.renderCell(s,h,t);else if(h.field){const t=s[h.field];e=(0,f.jsx)("div",{className:A.defaultInnerContent,children:String(null!=t?t:"")})}const i=o&&"navigateToTimeline"!==h.id?F(String(s.id)):null;m=(0,f.jsxs)("div",{className:(0,a.default)(A.treeCellContent,{[A.disabledBackground]:O&&!o}),children:[i,(0,f.jsx)("div",{className:A.cellContent,children:e})]})}else{const e=h.field?String(null!==(r=s[h.field])&&void 0!==r?r:s.name):s.name,i=F(String(s.id));m=(0,f.jsxs)("div",{className:A.treeCellContent,children:[i,(0,f.jsx)("span",{className:A.indentSpacer,style:{paddingLeft:h.isAction?0:s.depth*u.INDENT_WIDTH_PX},children:s.isParent?(0,f.jsx)(l.IconButton,{size:"small",onClick:e=>{e.stopPropagation(),p(s.id)},"aria-expanded":s.open,"aria-label":s.open?"Collapse":"Expand",children:s.open?(0,f.jsx)(d.default,{classes:{root:A.chevronIconBase}}):(0,f.jsx)(c.default,{classes:{root:A.chevronIconBase}})}):(0,f.jsx)("span",{className:A.iconPlaceholder})}),(0,f.jsx)("span",{className:A.taskNameInCell,children:h.renderCell?h.renderCell(s,h,t):(0,f.jsx)("div",{className:A.defaultInnerContent,children:e})})]})}return(0,f.jsx)("div",{className:(0,a.default)(A.tableCell,A.flexContainer),style:{height:L},children:m})}),[A.treeCellContent,A.indentSpacer,A.chevronIconBase,A.iconPlaceholder,A.taskNameInCell,A.defaultInnerContent,A.cellContent,A.disabledBackground,A.tableCell,A.flexContainer,p,O,L,F]),H=(0,n.useCallback)((()=>{P.current||(P.current=!0,null==T||T())}),[T]);(0,n.useEffect)((()=>{0===i.length&&H()}),[H,i]);const U=x||0,G=(0,n.useCallback)((e=>{let{columnIndex:t,key:n,rowIndex:s,style:l,columnsToRender:d,isFrozen:c}=e;var u;const p=i[s];if(!p)return null;const h=(null===(u=i[s])||void 0===u?void 0:u.id)===o,m=_===s;return(0,f.jsx)("div",{style:l,className:(0,a.default)(A.cellWrapper,!O&&{[A.tableRowHovered]:m,[A.tableRowFocused]:h}),onClick:e=>r(p.id,e),onMouseEnter:()=>B(s),onMouseLeave:()=>B(null),children:W({columnIndex:t,rowData:p,isFrozen:c,columns:d})},n)}),[i,o,_,O,r,W,A.cellWrapper,A.tableRowHovered,A.tableRowFocused]),z=(0,n.useCallback)((e=>e.map((e=>{const t=(e=>{const t=e.width||150;return e.isAction?t:Math.max(u.MIN_COLUMN_WIDTH_PX,t)})(e);return Object.assign(Object.assign({},e),{height:L,width:t,minWidth:t})}))),[L]),[K,Y]=(0,n.useMemo)((()=>[z(t.filter((e=>!e.isFrozen))),z(t.filter((e=>e.isFrozen)))]),[t,z]);(0,n.useEffect)((()=>{var e;null===(e=M.current)||void 0===e||e.recomputeGridSize()}),[K]);const q=Y.reduce(((e,t)=>e+t.width),0),X=U-q,Q=C-u.ROW_HEIGHT_PX;return(0,f.jsxs)("div",{style:{display:"flex",width:U,height:C,overflow:"hidden"},children:[(0,f.jsxs)("div",{style:{flex:"1 1 auto",overflowX:"auto",overflowY:"hidden"},children:[(0,f.jsx)(h.default,{ref:k,columns:K,tableWidth:X,isFrozenTable:!1,sortBy:y,onSort:v,onColumnResize:S,isDenseView:I,inSelectionMode:R,onSelectAllTasks:N,selectedRows:j,allTasks:E,ariaLabelForTableSort:V,sharedClasses:{tableCell:A.tableCell,flexContainer:A.flexContainer,iconPlaceholder:A.iconPlaceholder}}),(0,f.jsx)(s.Grid,{ref:M,height:Q,width:X,rowHeight:L,className:A.table,rowCount:i.length,columnCount:K.length,columnWidth:e=>{let{index:t}=e;return K[t].width},cellRenderer:e=>G(Object.assign(Object.assign({},e),{columnsToRender:K,isFrozen:!1})),onScroll:e=>{let{scrollLeft:t,scrollTop:i}=e;k.current&&k.current.setScrollLeft(t),null==w||w({scrollLeft:t,scrollTop:i,scrollHeight:0,scrollWidth:0,clientHeight:0,clientWidth:0})},onSectionRendered:e=>{let{rowStopIndex:t}=e;t>-1&&H()},scrollTop:b,overscanRowCount:10,overscanColumnCount:5})]}),(0,f.jsxs)("div",{style:{flex:"0 0 ".concat(q,"px"),overflow:"hidden"},children:[(0,f.jsx)(h.default,{columns:Y,tableWidth:q,isFrozenTable:!0,sortBy:y,onSort:v,onColumnResize:S,isDenseView:I,inSelectionMode:R,onSelectAllTasks:N,selectedRows:j,allTasks:E,ariaLabelForTableSort:V,sharedClasses:{tableCell:A.tableCell,flexContainer:A.flexContainer,iconPlaceholder:A.iconPlaceholder}}),(0,f.jsx)(s.Grid,{height:Q,width:q,rowHeight:L,className:A.table,rowCount:i.length,columnCount:Y.length,columnWidth:e=>{let{index:t}=e;return Y[t].width},cellRenderer:e=>G(Object.assign(Object.assign({},e),{columnsToRender:Y,isFrozen:!0})),onScroll:w,onSectionRendered:e=>{let{rowStopIndex:t}=e;t>-1&&H()},scrollTop:b,overscanRowCount:10,overscanColumnCount:5,style:{overflow:"hidden"}})]})]})}},431534:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.DragHandle=void 0;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=p(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}(i(667294)),a=o(i(386010)),r=i(695386),s=i(249492),l=i(89499),d=i(500196),c=i(921789),u=i(148521);function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(p=function(e){return e?i:t})(e)}const h=(0,r.makeStyles)((e=>(0,r.createStyles)({headerRow:{fontWeight:l.GANTT_HEADER_FONT_WEIGHT,fontSize:l.GANTT_HEADER_FONT_SIZE,display:"flex",flexDirection:"row",alignItems:"center",backgroundColor:e.palette.background.default,flip:!1},headerLabelContainer:{paddingLeft:"".concat(l.GANTT_COLUMN_PADDING_PX,"px"),display:"flex",alignItems:"center",flexGrow:1,overflow:"hidden"},headerLabel:{flexGrow:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},headerSortIcon:{flexShrink:0},headerColumnResizer:{borderRight:"1px solid ".concat(e.palette.divider),cursor:"ew-resize",width:"10px",position:"absolute",right:0,top:0,height:"100%"}}))),m=e=>{let{onResize:t,headerHeight:i,resizerKey:o}=e;const n=h(),a=(0,c.useResizeHandler)(t);return(0,u.jsx)("div",{onMouseDown:a,className:n.headerColumnResizer,"data-testid":"table-view-header-column-resizer",style:{height:i}},o)};t.DragHandle=m;const f=e=>{let{column:t,columnIndex:i,sortBy:o,onSort:n,onColumnResize:r,isLastColumn:d,selectionIndicator:c,ariaLabelForTableSort:p,sharedClasses:f}=e;const g=h(),{isSortable:y,isAction:v,header:b,field:w,id:S}=t,x=w||S;return(0,u.jsxs)("div",{className:(0,a.default)(f.tableCell,f.flexContainer),style:{height:l.ROW_HEIGHT_PX},children:[c,(0,u.jsx)("div",{className:g.headerLabelContainer,children:y?(0,u.jsxs)(u.Fragment,{children:[b||0!==i?(0,u.jsx)("span",{className:g.headerLabel,onClick:()=>n(x),style:{cursor:"pointer"},children:b}):(0,u.jsx)("span",{className:f.iconPlaceholder}),(0,u.jsx)(s.TableSortLabel,{className:g.headerSortIcon,active:o.columnId===x,direction:o.ascending?"asc":"desc",onClick:()=>n(x),"aria-label":p})]}):b||0!==i?(0,u.jsx)("span",{className:g.headerLabel,children:b}):(0,u.jsx)("span",{className:f.iconPlaceholder})}),!d&&r&&!v&&(0,u.jsx)(m,{resizerKey:"".concat(i," _resizer"),onResize:e=>r(x,e.deltaX),headerHeight:l.ROW_HEIGHT_PX})]})},g=n.default.memo(n.default.forwardRef(((e,t)=>{const{columns:i,tableWidth:o,isFrozenTable:a,sortBy:r,onSort:c,onColumnResize:p,isDenseView:m,inSelectionMode:g,onSelectAllTasks:y,selectedRows:v=[],allTasks:b=[],ariaLabelForTableSort:w,sharedClasses:S}=e,x=h(),C=(0,n.useRef)(null);(0,n.useImperativeHandle)(t,(()=>({setScrollLeft:e=>{C.current&&(C.current.style.transform="translateX(-".concat(e,"px)"))}})));const T=(null==v?void 0:v.length)?"Deselect all items":"Select all items";return(0,u.jsx)("div",{className:x.headerRow,style:{height:l.ROW_HEIGHT_PX,width:o,overflow:"hidden"},children:(0,u.jsx)("div",{ref:C,style:{width:o,display:"flex",transform:"translateX(0px)"},children:i.map(((e,t)=>{return(0,u.jsx)("div",{style:{width:e.width,minWidth:e.minWidth},children:(0,u.jsx)(f,{column:e,columnIndex:t,sortBy:r,onSort:c,onColumnResize:p,isLastColumn:t===i.length-1,selectionIndicator:(o=t,n=a,0!==o||!g||n?null:(0,u.jsx)(s.Checkbox,{inputProps:{"aria-label":T},checked:v.length>0&&v.length>=b.length,indeterminate:v.length>0&&v.length<b.length,onClick:y,icon:(0,u.jsx)(d.CheckBoxIcon,{isDenseView:m,selectedRows:v}),checkedIcon:(0,u.jsx)(d.CheckBoxIcon,{isDenseView:m,isChecked:!0}),indeterminateIcon:(0,u.jsx)(d.CheckBoxIcon,{isDenseView:m,isChecked:!1,selectedRows:v})})),ariaLabelForTableSort:w,sharedClasses:S})},e.id);var o,n}))})})})));t.default=g},583294:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.TimelinePanel=void 0;var n=i(667294),a=i(249492),r=i(695386),s=o(i(386010)),l=o(i(730381)),d=i(74281),c=i(140555),u=i(119820),p=i(89499),h=i(64
16514),m=o(i(619430)),f=i(148521);const g=(0,r.makeStyles)((e=>({timelinePanelPaper:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden",height:"100%",backgroundColor:"transparent"},grid:{outline:"none"},timelineHeaderCellDiv:{backgroundColor:e.palette.background.default,textAlign:"center",borderRight:"1px solid ".concat(e.palette.divider),borderBottom:"1px solid ".concat(e.palette.divider),fontSize:e.typography.body2.fontSize,fontWeight:e.typography.fontWeightMedium,color:e.palette.text.primary,boxSizing:"border-box",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gridCell:{borderRight:"1px solid ".concat(e.palette.divider),borderBottom:"1px solid ".concat(e.palette.divider),boxSizing:"border-box"},disabledCell:{backgroundColor:"#F4F4F4"},taskBarsContainer:{position:"relative",height:"100%",width:"100%"},baselineBar:{position:"absolute",boxSizing:"border-box",zIndex:1,opacity:.8},linkSvgContainer:{position:"absolute",top:0,left:0,pointerEvents:"none",zIndex:1,overflow:"visible"},linkHoverArea:{cursor:"pointer"},hoveredLinkSvgContainer:{position:"absolute",top:0,left:0,pointerEvents:"none",zIndex:3,overflow:"visible"},timelineNotAvailable:{padding:e.spacing(2.5),textAlign:"center",width:"100%",flexGrow:1,display:"flex",alignItems:"center",justifyContent:"center"},todayIndicator:{position:"absolute",top:0,width:"2px",height:"100%",backgroundColor:h.GOOGLE_RED,zIndex:10},shadowBar:{position:"absolute",zIndex:90,opacity:.3,borderRadius:"4px",boxSizing:"border-box"},shadowMilestone:{position:"absolute",zIndex:90,opacity:.3,borderRadius:"20%",transform:"rotate(45deg)",boxSizing:"border-box"}}))),y=e=>{let{getDaysBetweenDates:t,timelineRangeStartDate:i,timelineRangeEndDate:o,currentDayWidth:n}=e;const a=g(),r=new Date,s=t(i,r),l=t(r,o);if(s<0||l<0)return null;const d=s*n;return(0,f.jsx)("div",{className:a.todayIndicator,style:{left:"".concat(d,"px")}})};t.TimelinePanel=e=>{let{visibleTasks:t,links:i,timelineHeaderCells:o,timelineContentWidth:r,timelineRangeStartDate:v,timelineRangeEndDate:b,currentDayWidth:w,focusedTaskId:S,onTaskFocus:x,showProgress:C,showBaseline:T=!1,getDaysBetweenDates:I,visibleTaskMap:R,visibleTaskIndexMap:O,onTimelineTaskClick:D,hoveredLinkId:N,onLinkHover:j,onScroll:E,scrollTop:A,scrollLeft:P,width:M=0,height:k=0,scrollToDate:_,onInitialRender:B,disabledWeekdays:L=[],disabledDates:V=[],allTasksMap:F,isDenseView:W=!1,onTaskMove:H,onTaskResize:U,canTaskBeMoved:G,canTaskBeResized:z,selectedLinkId:K,onLinkClick:Y,isLinkCreationSupported:q,onAnchorHover:X,onAnchorClick:Q,predecessorSource:$,hoverTarget:Z}=e;const J=g(),ee=W?p.ROW_HEIGHT_PX/2:p.ROW_HEIGHT_PX,te=W?p.BAR_HEIGHT_PX/2:p.BAR_HEIGHT_PX,ie=W?p.BAR_HEIGHT_PX/4:p.BAR_HEIGHT_PX/2,oe=(0,n.useRef)(null),ne=(0,n.useRef)(null),ae=(0,n.useRef)(!1),re=(0,c.useSensors)((0,c.useSensor)(c.MouseSensor,{activationConstraint:{distance:5}}),(0,c.useSensor)(c.TouchSensor,{activationConstraint:{distance:10}}
1)),[se,le]=(0,n.useState)(null);(0,n.useEffect)((()=>{ne.current&&ne.current.recomputeGridSize()}),[o,ee]);const de=(0,n.useMemo)((()=>{if(!_||!o.length)return;const e=_.getTime(),t=o.findIndex(((t,i)=>{const n=o[i+1];return n?e>=t.startDate.getTime()&&e<n.startDate.getTime():e>=t.startDate.getTime()}));return-1===t?0:t}),[_,o]),[ce,ue]=(0,n.useState)({columnStartIndex:0,columnStopIndex:0,rowStartIndex:0,rowStopIndex:0,columnOverscanStartIndex:0,columnOverscanStopIndex:0,rowOverscanStartIndex:0,rowOverscanStopIndex:0}),pe=(0,n.useMemo)((()=>{const e=[0];for(let t=0;t<o.length;t++)e.push(e[t]+(o[t].width||0));return e}),[o]),he=(0,n.useCallback)((e=>{const t=F.get(e);if(!t)return;const i=t.parent;return i?R.has(i)?R.get(i):he(i):void 0}),[F,R]),me=(0,n.useCallback)((e=>{const t=F.get(e.source),i=F.get(e.target);return t&&i&&t.parent===i.parent}),[F]),fe=(0,n.useMemo)((()=>i.map((e=>{var t,i;const o=me(e),n=o?R.get(e.source):null!==(t=R.get(e.source))&&void 0!==t?t:he(e.source),a=o?R.get(e.target):null!==(i=R.get(e.target))&&void 0!==i?i:he(e.target),r=n?O.get(n.id):void 0,s=a?O.get(a.id):void 0;return n&&a&&n.start&&n.end&&a.start&&a.end&&void 0!==r&&void 0!==s?Object.assign(Object.assign({},e),{sourceTask:n,targetTask:a,sourceTaskIndex:r,targetTaskIndex:s}):null})).filter((e=>null!=e))),[i,me,R,he,O]),ge=(0,n.useMemo)((()=>{if(!v)return[];const e=ce.rowOverscanStartIndex*ee,t=(ce.rowOverscanStopIndex+1)*ee,i=pe[ce.columnOverscanStartIndex],o=pe[ce.columnOverscanStopIndex+1]||r;return fe.filter((n=>{const{sourceTask:a,targetTask:r,sourceTaskIndex:s,targetTaskIndex:l}=n,d=I(v,a.start),c=I(a.start,a.end),p=I(v,r.start),h=I(r.start,r.end),m=s*ee+ee/2,f=l*ee+ee/2,g=(0,u.calculateLinkPathPoints)({targetTask:r,sourceTask:a,linkType:n.type,sourceTaskStartDays:d,sourceTaskDurationDays:c,targetTaskStartDays:p,targetTaskDurationDays:h,sourceY:m,targetY:f,currentDayWidth:w,barHeight:te});if(g.length<2)return!1;const y=g.map((e=>e.x)),b=Math.min(...y),S=Math.max(...y),x=Math.min(m,f),C=Math.max(m,f);return S>=i&&b<=o&&C>=e&&x<=t}))}),[fe,v,I,w,ce,pe,r,ee,te]),ye=(0,n.useMemo)((()=>{const e=pe[ce.columnOverscanStartIndex],i=pe[ce.columnOverscanStopIndex+1]||r;return t.map(((t,o)=>{if(!(t.baselineStart&&t.baselineEnd&&t.start&&t.end))return null;const n=(()=>{if(!v)return null;const e=I(v,t.baselineStart),i=I(t.baselineStart,t.baselineEnd);if(i<=0)return null;const o=e*w,n=i*w;return{left:o,width:n,right:o+n}})();if(!(n&&n.right>=e&&n.left<=i)||!n||!T)return null;const a=ie,r=n.width;let s=r,l=0;const d=a,c=7.5;let u="\n          M ".concat(3," ").concat(1,"\n          L ").concat(r-1-2," ").concat(1,"\n          C ").concat(r-1," ").concat(1,", ").concat(r-1," ").concat(1,", ").concat(r-1," ").concat(3,"\n          L ").concat(r-1," ").concat(a-1-2,"\n          C ").concat(r-1," ").concat(a-1,", ").concat(r-1," ").concat(a-1,", ").concat(r-1-2," ").concat(a-1,"\n          L ").concat(3," ").concat(a-1,"\n          C ").concat(1," ").concat(a-1,", ").concat(1," ").concat(a-1,", ").concat(1," ").concat(a-1-2,"\n          L ").concat(1," ").concat(3,"\n          C ").concat(1," ").concat(1,", ").concat(1," ").concat(1,", ").concat(3," ").concat(1,"\n          Z\n        ");return t.start>=t.baselineEnd?(s=r+c,u="\n            M ".concat(3," ").concat(1,"\n            L ").concat(r-1," ").concat(1,"\n            L ").concat(r-1+c," ").concat(a/2,"\n            L ").concat(r-1," ").concat(a-1,"\n            L ").concat(3," ").concat(a-1,"\n            C ").concat(3," ").concat(a-1,", ").concat(1," ").concat(a-1,", ").concat(1," ").concat(a-1-2,"\n            L ").concat(1," ").concat(3,"\n            C ").concat(1," ").concat(3,", ").concat(1," ").concat(1,", ").concat(3," ").concat(1,"\n            Z\n          ")):t.end<=t.baselineStart&&(s=r+c,l=-c,u="\n            M ".concat(c," ").concat(1,"\n            L ").concat(s-1-2," ").concat(1,"\n            C ").concat(s-1," ").concat(1,", ").concat(s-1," ").concat(1,", ").concat(s-1," ").concat(3,"\n            L ").concat(s-1," ").concat(a-1-2,"\n            C ").concat(s-1," ").concat(a-1,", ").concat(s-1," ").concat(a-1,", ").concat(s-1-2," ").concat(a-1,"\n            L ").concat(c," ").concat(a-1,"\n            L ").concat(1," ").concat(a/2,"\n            L ").concat(c," ").concat(1,"\n            Z\n          ")),(0,f.jsx)("div",{className:J.baselineBar,style:{left:"".concat(n.left+l,"px"),width:"".concat(s,"px"),top:"".concat(o*ee+ee/2+ie,"px"),height:"".concat(d,"px")},children:(0,f.jsxs)("svg",{width:"100%",height:"100%",viewBox:"0 0 ".concat(s," ").concat(d),preserveAspectRatio:"none",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,f.jsx)("defs",{children:(0,f.jsxs)("pattern",{id:"diagonalStripes-".concat(t.id),patternUnits:"userSpaceOnUse",width:"5",height:"8",patternTransform:"rotate(135)",children:[(0,f.jsx)("rect",{x:"0",y:"0",width:"1",height:"6",fill:h.GOOGLE_PURPLE_700}),(0,f.jsx)("rect",{x:"2",y:"0",width:"4",height:"6",fill:"none"})]})}),(0,f.jsx)("path",{d:u,fill:h.GOOGLE_PURPLE_50,stroke:h.GOOGLE_PURPLE_700,strokeWidth:1,strokeLinejoin:"round"}),(0,f.jsx)("path",{d:u,fill:"url(#diagonalStripes-".concat(t.id,")"),fillOpacity:"0.9"})]})},t.id)}))}),[t,v,I,w,T,pe,ce,J,r,ee,ie]),ve=(0,n.useCallback)((e=>{var i;return(null===(i=t.find((t=>t.id===e)))||void 0===i?void 0:i.name)||"Task ".concat(e)}),[t]),be=(0,n.useMemo)((()=>
1{if($&&Z){const e=ve($.sourceTaskId),t=ve(Z.targetTaskId),i="e"===$.sourceAnchor?"end":"start",o="e"===Z.targetAnchor?"end":"start";return"".concat(e," [").concat(i,"] → ").concat(t," [").concat(o,"]")}return null}),[$,Z,ve]),we=(0,n.useMemo)((()=>{if(!se||!v)return null;const{taskId:e,daysMoved:t}=se,i=R.get(e),o=O.get(e);if(!i||void 0===o||!i.start||!i.end)return null;const n="milestone"===i.type,a=(I(v,i.start)+t)*w,r=o*ee+(ee-te)/2;if(n){const e=a+w/2-te/2;return(0,f.jsx)("div",{className:J.shadowMilestone,style:{left:"".concat(e,"px"),top:"".concat(r,"px"),width:"".concat(te,"px"),height:"".concat(te,"px"),backgroundColor:"#2D312F"}})}let s=I(i.start,i.end);s<=0&&(s=p.MIN_TASK_WIDTH_PX/w);const l=s*w,d=i.isOnCriticalPath?h.GOOGLE_RED_200:"#76ACFF";return(0,f.jsx)("div",{className:J.shadowBar,style:{left:"".concat(a,"px"),top:"".concat(r,"px"),width:"".concat(l,"px"),height:"".concat(te,"px"),backgroundColor:d}})}),[se,v,R,O,I,w,ee,te,J]),Se=(0,n.useMemo)((()=>{const e=pe[ce.columnOverscanStartIndex],o=pe[ce.columnOverscanStopIndex+1]||r,n=new Set(i.map((e=>e.source)));return t.map(((t,i)=>{const a=i+1;if(a<ce.rowOverscanStartIndex||a>ce.rowOverscanStopIndex)return null;if(!t.start||!t.end)return null;const r=v?I(v,t.start):0;let s=0;const l="milestone"===t.type;l||(s=I(t.start,t.end),s<=0&&(s=p.MIN_TASK_WIDTH_PX/w));const d=(r||0)*w;if(d+s*w<e||d>o){if(!l)return null;const t=d+w/2-te/2;if(t+te<e||t>o)return null}return(0,f.jsx)(m.default,{task:t,index:i,daysFromTimelineStart:r,durationInDays:s,isFocused:t.id===S,rowHeight:ee,barHeight:te,currentDayWidth:w,onTaskFocus:x,onTimelineTaskClick:D,onTaskResize:U,showProgress:C,tasksWithOutgoingLinks:n,canTaskBeMoved:G,canTaskBeResized:z,disabledDates:V,disabledWeekdays:L,predecessorSource:$,onAnchorClick:Q,onAnchorHover:X,tooltipText:be,hoverTarget:Z,isLinkCreationSupported:q},t.id)}))}),[t,ce,V,L,v,I,S,w,x,D,U,C,J,pe,r,i,ee,te,G,z,Z,$,Q,X,be]),xe=(0,n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2?arguments[2]:void 0;const n=ge.filter((t=>i&&o?t.id===o:e?t.isCriticalPath:!t.isCriticalPath));return(0,f.jsxs)("svg",{className:J.linkSvgContainer,style:{width:"".concat(r,"px"),height:"".concat(t.length*ee,"px")},children:[(0,f.jsxs)("defs",{children:[(0,f.jsx)("marker",{id:"ganttArrowhead",markerWidth:"6",markerHeight:"4",refX:4,refY:"2",orient:"auto",markerUnits:"strokeWidth",children:(0,f.jsx)("path",{d:"M0,0 L0,4 L".concat(4,",2 z"),fill:"#909395"})}),(0,f.jsx)("marker",{id:"ganttArrowheadCritical",markerWidth:"6",markerHeight:"4",refX:4,refY:"2",orient:"auto",markerUnits:"strokeWidth",children:(0,f.jsx)("path",{d:"M0,0 L0,4 L".concat(4,",2 z"),fill:h.GOOGLE_RED_600})}),(0,f.jsx)("marker",{id:"ganttArrowheadHovered",markerWidth:"6",markerHeight:"4",refX:4,refY:"2",orient:"auto",markerUnits:"strokeWidth",children:(0,f.jsx)("path",{d:"M0,0 L0,4 L".concat(4,",2 z"),fill:"#007bff"})})]}),n.map((t=>{if(!v)return null;const{sourceTask:o,targetTask:n,sourceTaskIndex:a,targetTaskIndex:r}=t,l=I(v,o.start),d=I(o.start,o.end),c=I(v,n.start),p=I(n.start,n.end),m=a*ee+ee/2,g=r*ee+ee/2,y=(0,u.calculateLinkPathPoints)({targetTask:n,sourceTask:o,linkType:t.type,sourceTaskStartDays:l,sourceTaskDurationDays:d,targetTaskStartDays:c,targetTaskDurationDays:p,sourceY:m,targetY:g,currentDayWidth:w,barHeight:te}),b=(i?10:6)+5,S=(0,u.adjustPreFinalPointForMinSegmentLength)(y,b),x=(0,u.buildRoundedPathD)(S,5);return!x||S.length<2?null:(0,f.jsxs)("g",{children:[(0,f.jsx)("circle",{cx:S[0].x,cy:S[0].y,r:3,fill:i?"#007bff":e?h.GOOGLE_RED_600:"#909395",pointerEvents:"none"}),(0,f.jsx)("path",{d:x,stroke:i?"#007bff":e?h.GOOGLE_RED_600:"#909395",strokeWidth:i?2.5:1.5,fill:"none",markerEnd:i?"url(#ganttArrowheadHovered)":e?"url(#ganttArrowheadCritical)":"url(#ganttArrowhead)",strokeLinejoin:"round",strokeLinecap:"round",pointerEvents:"none"}),(0,f.jsx)("path",{"aria-label":String(t.id),d:x,stroke:"transparent",strokeWidth:10,fill:"none",pointerEvents:"stroke",onClick:()=>Y(String(t.id)),onMouseEnter:()=>$?null:j(t.id),onMouseLeave:()=>j(null),className:(0,s.default)({[J.linkHoverArea]:!$})})]},t.id)}))]})}),[ge,v,I,w,ee,te,J,j,$,Y]),Ce=xe(!1),Te=xe(!0),Ie=o.length>0&&t.length>0;return(0,n.useEffect)((()=>{Ie||ae.current||(ae.current=!0,null==B||B())}),[Ie,B]),(0,f.jsx)(a.Paper,{square:!0,className:J.timelinePanelPaper,"aria-label":"Timeline Panel",children:Ie?(0,f.jsxs)("div",{style:{width:"100%",height:"100%",position:"relative"},children:[(0,f.jsx)(d.MultiGrid,{ref:ne,cellRenderer:e=>{let{columnIndex:t,rowIndex:i,style:n,key:a}=e;const r=o[t];if(0===i)return(0,f.jsx)("div",{style:n,className:J.timelineHeaderCellDiv,children:r.label},a);const d=()=>
1{if(1===(0,l.default)(r.endDate).startOf("day").diff((0,l.default)(r.startDate).startOf("day"),"days")){const e=(0,l.default)(r.startDate),t=L.includes(e.isoWeekday()),i=V.some((t=>e.isSame(t,"day")));return t||i}for(let e=(0,l.default)(r.startDate);e.isSameOrBefore(r.endDate,"day");e.add(1,"days")){const t=L.includes(e.isoWeekday()),i=V.some((t=>e.isSame(t,"day")));if(!t&&!i)return!1}return!0};return(0,f.jsx)("div",{style:n,className:(0,s.default)(J.gridCell,d()&&J.disabledCell),role:"gridcell","data-disabled":d()},a)},columnCount:o.length,columnWidth:e=>{let{index:t}=e;var i;return(null===(i=o[t])||void 0===i?void 0:i.width)||0},fixedColumnCount:0,fixedRowCount:1,rowCount:t.length+1,rowHeight:e=>{let{index:t}=e;return 0===t?p.ROW_HEIGHT_PX:ee},height:k,width:M,scrollTop:A,scrollLeft:P,onScroll:e=>{oe.current&&(oe.current.style.transform="translate(".concat(-1*e.scrollLeft,"px, ").concat(-1*e.scrollTop,"px)")),E(e)},className:J.grid,onSectionRendered:e=>{ae.current||(ae.current=!0,null==B||B());ue(Object.assign(Object.assign({},e),{rowOverscanStartIndex:Math.max(0,e.rowOverscanStartIndex-2),rowOverscanStopIndex:Math.min(t.length,e.rowOverscanStopIndex+2)}))},overscanRowCount:5,overscanColumnCount:5,scrollToColumn:de,scrollToAlignment:"center"}),(0,f.jsx)("div",{style:{position:"absolute",top:p.ROW_HEIGHT_PX,left:0,right:0,bottom:0,pointerEvents:"none",overflow:"hidden"},"aria-label":"Timeline content",children:(0,f.jsx)(c.DndContext,{sensors:re,onDragEnd:e=>{le(null);const{active:t,delta:i}=e,o=t.data.current;if(!o||!o.task)return;const{task:n}=o;if(0===i.x||!v||!n.start)return;const a=Math.round(i.x/w);if(0===a)return;const r=(0,l.default)(n.start).add(a,"days").startOf("day").toDate();null==H||H(n,r)},onDragMove:e=>{const{active:t,delta:i}=e,o=t.data.current;if(!o||!o.task)return;const{task:n}=o,a=Math.round(i.x/w);le((e=>(null==e?void 0:e.taskId)===n.id&&(null==e?void 0:e.daysMoved)===a?e:{taskId:n.id,daysMoved:a}))},children:(0,f.jsx)("div",{ref:oe,style:{transform:"translate(".concat(-1*(P||0),"px, ").concat(-1*(A||0),"px)"),width:r,height:t.length*ee,position:"relative"},children:(0,f.jsxs)("div",{className:J.taskBarsContainer,style:{height:"".concat(t.length*ee,"px")},children:[v&&b&&(0,f.jsx)(y,{getDaysBetweenDates:I,timelineRangeStartDate:v,timelineRangeEndDate:b,currentDayWidth:w}),we,Se,ye,v&&t.length>0&&i.length>0&&(0,f.jsxs)(f.Fragment,{children:[Ce,Te,N&&xe(!1,!0,N),K&&xe(!1,!0,K)]})]})})})})]}):(0,f.jsx)("div",{className:J.timelineNotAvailable,children:"Timeline not available."})})}},545970:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ACTION_COLUMN_WIDTH",{enumerable:!0,get:function(){return n.ACTION_COLUMN_WIDTH}}),Object.defineProperty(t,"GANTT_COLUMN_PADDING_PX",{enumerable:!0,get:function(){return n.GANTT_COLUMN_PADDING_PX}}),Object.defineProperty(t,"GANTT_HEADER_FONT_SIZE",{enumerable:!0,get:function(){return n.GANTT_HEADER_FONT_SIZE}}),Object.defineProperty(t,"GANTT_HEADER_FONT_WEIGHT",{enumerable:!0,get:function(){return n.GANTT_HEADER_FONT_WEIGHT}}),Object.defineProperty(t,"GANTT_SORT_HANDLE_WIDTH_PX",{enumerable:!0,get:function(){return n.GANTT_SORT_HANDLE_WIDTH_PX}}),Object.defineProperty(t,"Gantt",{enumerable:!0,get:function(){return o.Gantt}}),Object.defineProperty(t,"Weekday",{enumerable:!0,get:function(){return n.Weekday}});var o=i(536611),n=i(89499)},992969:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(667294),a=i(921789),r=i(249492),s=o(i(386010)),l=i(89499),d=i(148521);const c=(0,r.makeStyles)({resizerHandle:{width:"8px",height:"100%",position:"absolute",top:0,zIndex:3,cursor:"col-resize"},leftResizerHandle:{left:0},rightResizerHandle:{right:0}});t.default=e=>{let{handleType:t,taskWidth:i,taskLeft:o,onResize:r,onResizeStop:u}=e;const p=c(),h=(0,n.useRef)(i),m=(0,n.useRef)(o);(0,n.useEffect)((()=>{h.current=i,m.current=o}),[i,o]);const f=(0,n.useRef)(0),g=(0,n.useCallback)((()=>{f.current=0,h.current=i,m.current=o,r(i,o,!0)}),[i,o,r]),y=(0,n.useCallback)((e=>{f.current+=e.deltaX;let i=h.current,o=m.current;const n=f.current;"e"===t?i=Math.max(l.MIN_TASK_WIDTH_PX,h.current+n):"w"===t&&(i=Math.max(l.MIN_TASK_WIDTH_PX,h.current-n),o=m.current+(h.current-i)),r(i,o,e.isDragging)}),[t,r]),v=(0,n.useCallback)((()=>{let e=h.current,i=m.current;const o=f.current;"e"===t?e=Math.max(l.MIN_TASK_WIDTH_PX,h.current+o):"w"===t&&(e=Math.max(l.MIN_TASK_WIDTH_PX,h.current-o),i=m.current+(h.current-e)),u(e,i)}),[t,u]),b=(0,a.useResizeHandler)(y,g,v),w=(0,s.default)(p.resizerHandle,{[p.rightResizerHandle]:"e"===t,[p.leftResizerHandle]:"w"===t});return(0,d.jsx)("div",{onMouseDown:b,className:w,"data-dndkit-disabled":"true","aria-label":"".concat("w"===t?"Left":"Right"," resize handle")}
1)}},921789:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useResizeHandler=function(e,t,i){const n=(0,o.useRef)(null),a=(0,o.useRef)(0),r=(0,o.useRef)(0);(0,o.useEffect)((()=>()=>{n.current&&cancelAnimationFrame(n.current)}),[]);return(0,o.useCallback)((o=>{o.preventDefault(),o.stopPropagation(),null==t||t(o),a.current=o.clientX,r.current=o.clientX;const s=()=>{const t=r.current-a.current;0!==t&&(e({deltaX:t,isDragging:!0}),a.current=r.current),n.current=requestAnimationFrame(s)},l=e=>{r.current=e.clientX,null==n.current&&(n.current=requestAnimationFrame(s))},d=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",d),n.current&&(cancelAnimationFrame(n.current),n.current=null);const t=r.current-a.current;0!==t&&e({deltaX:t,isDragging:!1}),null==i||i()};document.addEventListener("mousemove",l),document.addEventListener("mouseup",d)}),[e,t,i])};var o=i(667294)},119820:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ROUTING_H_OFFSET_PX=void 0,t.adjustPreFinalPointForMinSegmentLength=function(e,t){if(e.length<2)return[...e];const i=[...e],o=i[i.length-1],n=i[i.length-2],a=o.x-n.x,r=o.y-n.y,s=Math.sqrt(a*a+r*r);if(s>=t||s<.001)return i;const l=-a/s,d=-r/s;return i[i.length-2]={x:o.x+l*t,y:o.y+d*t},i},t.buildRoundedPathD=function(e,t){if(!e||e.length<2)return"";let i="M ".concat(e[0].x," ").concat(e[0].y);if(e.length<3||t<=0){for(let t=1;t<e.length;t++)i+=" L ".concat(e[t].x," ").concat(e[t].y);return i}for(let o=1;o<e.length-1;o++){const n=e[o-1],a=e[o],r=e[o+1],s=a.x-n.x,l=a.y-n.y,d=r.x-a.x,c=r.y-a.y,u=s*c-l*d,p=1e-6;if(Math.abs(u)<p){i+=" L ".concat(a.x," ").concat(a.y);continue}const h=Math.sqrt(s*s+l*l),m=Math.sqrt(d*d+c*c);if(h<p||m<p){i+=" L ".concat(a.x," ").concat(a.y);continue}if(h<t||m<t){i+=" L ".concat(a.x," ").concat(a.y);continue}const f=-s/h,g=-l/h,y=a.x+f*t,v=a.y+g*t;i+=" L ".concat(y," ").concat(v);const b=d/m,w=c/m,S=a.x+b*t,x=a.y+w*t,C=u>0?1:0;i+=" A ".concat(t,",").concat(t," 0 0,").concat(C," ").concat(S,",").concat(x)}return i+=" L ".concat(e[e.length-1].x," ").concat(e[e.length-1].y),i},t.calculateLinkPathPoints=function(e){let{targetTask:t,sourceTask:i,linkType:a,sourceTaskStartDays:r,sourceTaskDurationDays:s,targetTaskStartDays:l,targetTaskDurationDays:d,sourceY:c,targetY:u,currentDayWidth:p,barHeight:h}=e;const m=[],f=a||"FS",g="milestone"===t.type,y="milestone"===i.type;let v,b;"SS"===f?(v=r*p,b=l*p):"FF"===f?(v=(r+s)*p,b=(l+d)*p):"FS"===f?(v=(r+s)*p,b=l*p):(v=r*p,b=(l+d)*p);"SS"===f||"SF"===f?v-=o.LINK_OFFSET_PX:v+=o.LINK_OFFSET_PX;"FS"===f||"SS"===f?b-=o.LINK_OFFSET_PX:b+=o.LINK_OFFSET_PX;if(g){const e=l*p+p/2,t=h/2;b="FS"===f||"SS"===f?e-t-o.LINK_OFFSET_PX:e+t+o.LINK_OFFSET_PX}if(y){const e=r*p+p/2,t=h/2;v="FS"===f||"FF"===f?e+t+n/3+o.LINK_OFFSET_PX:e-t-n/3-o.LINK_OFFSET_PX}const w=v,S=b,x=c+(c<u?h:-h);if("FS"===f)if(S>=w+2*n){const e=w+n;m.push({x:w,y:c}),m.push({x:e,y:c}),m.push({x:e,y:u}),m.push({x:S,y:u})}else{const e=w+n,t=g?l*p-n:S-n;m.push({x:w,y:c}),m.push({x:e,y:c}),m.push({x:e,y:x}),m.push({x:t,y:x}),m.push({x:t,y:u}),m.push({x:S,y:u})}else if("SS"===f){const e=Math.min(w,S)-n;m.push({x:w,y:c},{x:e,y:c},{x:e,y:u},{x:S,y:u})}else if("FF"===f){const e=Math.max(w,S)+n;m.push({x:w,y:c},{x:e,y:c},{x:e,y:u},{x:S,y:u})}else if("SF"===f){const e=w-n,t=S+n;m.push({x:w,y:c}),m.push({x:e,y:c}),m.push({x:e,y:x}),m.push({x:t,y:x}),m.push({x:t,y:u}),m.push({x:S,y:u})}return m};var o=i(89499);const n=t.ROUTING_H_OFFSET_PX=15},619430:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.calculateWorkingDays=void 0;var n=o(i(238416)),a=i(667294),r=i(140555),s=i(119820),l=o(i(386010)),d=i(249492),c=i(646514),u=i(89499),p=o(i(730381)),h=o(i(992969)),m=o(i(64266)),f=i(148521);function g(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function y(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};
1t%2?g(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):g(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}const v=(e,t,i,o)=>{const n=(0,p.default)(e).startOf("day"),a=(0,p.default)(t).startOf("day");let r=0;for(;n.isBefore(a,"day");){const e=i.includes(n.isoWeekday()),t=o.some((e=>n.isSame(e,"day")));e||t||r++,n.add(1,"day")}return r};t.calculateWorkingDays=v;const b=(0,d.makeStyles)((e=>({milestoneBar:{position:"absolute",backgroundColor:"#2D312F",borderRadius:"20%",transform:"rotate(45deg)",outlineOffset:"1px",boxSizing:"border-box",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",zIndex:2,pointerEvents:"auto"},milestoneBarFocused:{outline:"2px solid ".concat(e.palette.warning.main),borderColor:e.palette.warning.main},milestoneText:{transform:"rotate(-45deg)",fontSize:"0.7em",color:e.palette.common.white,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"block"},milestoneLabel:{position:"absolute",display:"flex",alignItems:"center",paddingLeft:"16px",fontSize:e.typography.body2.fontSize,color:e.palette.text.primary,fontWeight:e.typography.fontWeightMedium,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",pointerEvents:"none",zIndex:2},taskBar:{position:"relative",width:"100%",height:"100%",outlineOffset:"1px",borderRadius:"4px",boxSizing:"border-box",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",padding:"0 5px",display:"flex",alignItems:"center",fontSize:e.typography.body2.fontSize,color:e.palette.text.primary,cursor:"pointer",zIndex:2,pointerEvents:"auto"},movableBar:{cursor:"move"},taskBarContainer:{position:"absolute"},taskBarTypeProject:{backgroundColor:"#76ACFF",color:e.palette.common.white},taskBarTypeTask:{backgroundColor:"#76ACFF",color:e.palette.common.white},criticalPathTaskBarTypeTask:{backgroundColor:c.GOOGLE_RED_200},taskBarFocused:{"&$taskBarTypeProject":{outline:"2px solid ".concat(e.palette.primary.dark)},"&$taskBarTypeTask":{outline:"2px solid ".concat(e.palette.primary.dark)}},progressBar:{position:"absolute",top:0,left:0,height:"100%",backgroundColor:"#277DDA",borderRadius:"3px",zIndex:0},criticalPathProgressBar:{backgroundColor:c.GOOGLE_RED_800},taskBarText:{position:"relative",zIndex:1},taskBarName:{fontWeight:e.typography.fontWeightMedium,marginRight:e.spacing(.5)}})));t.default=e=>{let{task:t,index:i,daysFromTimelineStart:o,durationInDays:n,isFocused:d,rowHeight:c,barHeight:g,currentDayWidth:w,onTaskFocus:S,onTimelineTaskClick:x,onTaskResize:C,showProgress:T,tasksWithOutgoingLinks:I,canTaskBeMoved:R,canTaskBeResized:O,disabledWeekdays:D=[],disabledDates:N=[],onAnchorClick:j,onAnchorHover:E,tooltipText:A,hoverTarget:P,isLinkCreationSupported:M,predecessorSource:k}=e;const _=b(),B=(0,a.useMemo)((()=>{var e;return null!==(e=null==R?void 0:R(t))&&void 0!==e&&e}),[R,t]),L=(0,a.useCallback)((e=>{var i;return null!==(i=null==O?void 0:O(t,e))&&void 0!==i&&i}),[O,t]),V="milestone"===t.type,F=o*w,W=n*w,H=i*c+(c-g)/2,U=t.name,[G,z]=(0,a.useState)({active:!1,tempWidth:W,tempLeft:F});(0,a.useEffect)((()=>{G.active||z({active:!1,tempWidth:W,tempLeft:F})}),[W,F]);const K=(0,a.useCallback)(((e,t,i)=>{const o=Math.max(u.MIN_TASK_WIDTH_PX,e);z((e=>Object.assign(Object.assign({},e),{active:i,tempWidth:o,tempLeft:t})))}),[]),Y=(0,a.useCallback)(((e,i)=>{z((e=>Object.assign(Object.assign({},e),{active:!1})));const o=Math.abs(e-W)>=1,n=Math.abs(i-F)>=1;if(!o&&!n)return void z({active:!1,tempWidth:W,tempLeft:F});const a=e/w;let r,s;const l=i-F;"w"===(Math.abs(l)>.001?"w":"e")?(s=t.end,r=(0,p.default)(s).subtract(a,"days").toDate()):(r=t.start,s=(0,p.default)(r).add(a,"days").toDate());const d=v(r,s,D,N);null==C||C(t,r,d)}),[t,w,W,F,C,D,N]),q=e=>{var t;return!M||M(e,null!==(t=null==k?void 0:k.sourceAnchor)&&void 0!==t?t:null)},{attributes:X,listeners:Q,setNodeRef:$,transform:Z,isDragging:J}=(0,r.useDraggable)({id:t.id,data:{task:t,currentDayWidth:w},disabled:!B||G.active}),ee=Z?{transform:"translate3d(".concat(Z.x,"px, 0, 0)")}:{},te=G.active?G.tempWidth:W,ie=G.active?G.tempLeft:F;if(V){const e=(o||0)*w+w/2-g/2,i=(o||0)*w+w/2,n=g/2;let r=i+n;r=I.has(t.id)?i+n+s.ROUTING_H_OFFSET_PX:i+n;const c=(null==Z?void 0:Z.x)||0;return(0,f.jsxs)(a.Fragment,{children:[(0,f.jsxs)("div",y(y(y({ref:$},X),B?Q:{}),{},{className:(0,l.default)(_.milestoneBar,d&&_.milestoneBarFocused,B&&_.movableBar),"aria-label":"Milestone bar",style:{left:"".concat(e,"px"),top:"".concat(H,"px"),width:"".concat(g,"px"),height:"".concat(g,"px"),transform:J&&Z?"translate3d(".concat(Z.x,"px, 0, 0) rotate(45deg)"):"rotate(45deg)"},onClick:e=>{e.stopPropagation(),S(t.id),null==x||x(t)},children:[(0,f.jsx)("span",{className:_.milestoneText,style:{maxWidth:1.2*g}}),(0,f.jsx)(m.default,{task:t,anchorType:"s",onAnchorClick:j,onAnchorHover:E,predecessorSource:k,tooltipText:A,hoverTarget:P,shouldBeVisible:q("s")}),(0,f.jsx)(m.default,{task:t,anchorType:"e",onAnchorClick:j,onAnchorHover:E,predecessorSource:k,tooltipText:A,hoverTarget:P,shouldBeVisible:q("e")})]})),(0,f.jsx)("div",{className:_.milestoneLabel,style:{left:"".concat(r+c,"px"),top:"".concat(H,"px"),height:"".concat(g,"px")},title:t.name,children:t.name})]},t.id)}return(0,f.jsxs)("div",{className:_.taskBarContainer,"aria-label":"Task bar c
1ontainer",style:Object.assign(Object.assign({width:te,height:g,left:ie,top:H},ee),{zIndex:J?100:2,pointerEvents:G.active?"none":"auto"}),children:[(0,f.jsxs)(f.Fragment,{children:[L("w")&&(0,f.jsx)(h.default,{handleType:"w",taskWidth:W,taskLeft:F,onResize:K,onResizeStop:Y}),L("e")&&(0,f.jsx)(h.default,{handleType:"e",taskWidth:W,taskLeft:F,onResize:K,onResizeStop:Y})]}),(0,f.jsxs)("div",y(y(y({ref:$},X),Q),{},{className:(0,l.default)(_.taskBar,"project"===t.type?_.taskBarTypeProject:_.taskBarTypeTask,t.isOnCriticalPath&&_.criticalPathTaskBarTypeTask,d&&_.taskBarFocused,B&&_.movableBar),"aria-label":"Task bar",onClick:e=>{e.stopPropagation(),S(t.id),null==x||x(t)},children:[T&&void 0!==t.progress&&t.progress>=0&&t.progress<=1&&(0,f.jsx)("div",{className:(0,l.default)(_.progressBar,{[_.criticalPathProgressBar]:t.isOnCriticalPath}),style:{width:"".concat(100*t.progress,"%")}}),(0,f.jsxs)("div",{className:_.taskBarText,children:[(0,f.jsx)("span",{className:_.taskBarName,children:U}),void 0!==t.secondaryText?(0,f.jsx)("span",{children:t.secondaryText}):T&&void 0!==t.progress&&t.progress>=0&&t.progress<=1&&(0,f.jsx)("span",{children:", ".concat(Math.round(100*t.progress),"%")})]})]})),(0,f.jsx)(m.default,{task:t,anchorType:"s",onAnchorClick:j,onAnchorHover:E,predecessorSource:k,tooltipText:A,hoverTarget:P,shouldBeVisible:q("s")}),(0,f.jsx)(m.default,{task:t,anchorType:"e",onAnchorClick:j,onAnchorHover:E,predecessorSource:k,tooltipText:A,hoverTarget:P,shouldBeVisible:q("e")})]})}},874004:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WIDESCREEN_BREAKPOINT=void 0,t.useWidescreen=function(){return(0,o.useWindowWidth)()>=n};var o=i(787932);const n=t.WIDESCREEN_BREAKPOINT=768},693540:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useScrollEdges=function(){const[e,t]=n();let i=null;e&&(i={top:0===e.scrollTop,left:0===e.scrollLeft,bottom:e.scrollTop>=e.scrollHeight-e.offsetHeight,right:e.scrollLeft>=e.scrollWidth-e.offsetWidth});return[i,t]},t.useScrollState=n;var o=i(667294);function n(){const[e,t]=(0,o.useState)(),[i,n]=(0,o.useState)(null),a=e=>{n(function(e){return{scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,offsetWidth:e.offsetWidth,offsetHeight:e.offsetHeight}}(e))};return(0,o.useLayoutEffect)((()=>{if(e){a(e);const t=e=>{const t=e.currentTarget;a(t)};return e.addEventListener("scroll",t),()=>null==e?void 0:e.removeEventListener("scroll",t)}}),[e]),[i,t]}},146913:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.eventTypes=t.default=t.ROW_SWIPED_RIGHT=t.ROW_SWIPED_LEFT=t.ROW_SELECTED=t.FORM_SAVED=t.FORM_CANCELED=void 0;var o=i(664583);const n=t.ROW_SELECTED={name:"Row Selected"},a=t.FORM_SAVED={name:"Form Saved"},r=t.FORM_CANCELED={name:"Form Canceled"},s=t.ROW_SWIPED_LEFT={name:"Row Swiped Left"},l=t.ROW_SWIPED_RIGHT={name:"Row Swiped Right"},d=(t.eventTypes={ROW_SELECTED:n,FORM_SAVED:a,FORM_CANCELED:r,ROW_SWIPED_LEFT:s,ROW_SWIPED_RIGHT:l},{handle(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;const{appModel:a}=t;if(a){const r=t.sourceTable||t.table,s=r?r.rootName():null,l=e.action(a,s);if(l)return void(0,o.runAppAction)(l,t,i,n)}"function"==typeof i&&i({})},handleAsync(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;return new Promise((o=>{this.handle(e,t,o,i)}))}});t.default=d},496854:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.computeLayoutPacked=function(e){let{entries:t,width:i,height:o}=e;const s=i/o,l={Small:{w:1,h:1},Wide:{w:2,h:1},Tall:{w:1,h:2},Large:{w:2,h:2}};let d=t.map(((e,t)=>{let i=l[e.ViewSize];return i||(r.default.warnToDevConsole("Unknown dashboard size",e.ViewSize),i=l.Small),{w:i.w,h:i.h,preferredIndex:t,entry:e}}));d=n.default.sortBy(d,(e=>-(e.w+e.h)));new a.default(s).fit(d);const c=[];let u=0,p=0;d.forEach((e=>{if(!e.fit)return void r.default.warnToDevConsole("Dashboard packer had an issue, skipping",e);const{w:t,h:i,entry:o,preferredIndex:a}=e,{x:s,y:l}=e.fit;s+t>p&&(p=s+t),l+i>u&&(u=l+i),c.push(n.default.extend({},o,{x:s,y:l,w:t,h:i,preferredIndex:a}))})),function(e,t){const i=n.default.groupBy(e,"ViewSize"),o={};n.default.forEach(i,((e,i)=>{o[i]||(o[i]=[]);const a=n.default.map(e,"view");n.default.sortBy(e,(e=>
1e.y*t+e.x)).forEach(((e,t)=>{e.view=a[t]}))}));const a=n.default.groupBy(e,"x"),r=n.default.compact(n.default.values(a).map((e=>n.default.every(e.map((t=>t.w===e[0].w)))?n.default.sortBy(e,(e=>e.preferredIndex)):null)));if(n.default.flatten(r).length===e.length){const e=n.default.sortBy(r,(e=>e[0].preferredIndex));e.forEach(((t,i)=>{const o=i&&e[i-1];t.forEach((e=>{e.x=o?o[0].x+o[0].w:0}))}))}const s=n.default.groupBy(e,"y"),l=n.default.compact(n.default.values(s).map((e=>n.default.every(e.map((t=>t.h===e[0].h)))?n.default.sortBy(e,(e=>e.preferredIndex)):null)));if(n.default.flatten(l).length===e.length){const e=n.default.sortBy(l,(e=>e[0].preferredIndex));e.forEach(((t,i)=>{const o=i&&e[i-1];t.forEach((e=>{e.y=o?o[0].y+o[0].h:0}))}))}}(c,p);const h=Math.floor(i/p),m=Math.floor(o/u);return{entries:c,rows:u,columns:p,cellWidth:h,cellHeight:m,padding:16,blocks:d}};var n=o(i(496486)),a=o(i(297328)),r=o(i(593186))},386036:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=class{static round(e,t){const i=Math.pow(10,t);return Math.round(e*i)/i}static gaussianElimination(e,t){const i=e,o=e.length-1,n=[t];for(let e=0;e<o;e++){let t=e;for(let n=e+1;n<o;n++)Math.abs(i[e][n])>Math.abs(i[e][t])&&(t=n);for(let n=e;n<o+1;n++){const o=i[n][e];i[n][e]=i[n][t],i[n][t]=o}for(let t=e+1;t<o;t++)for(let n=o;n>=e;n--)i[n][t]-=i[n][e]*i[e][t]/i[e][e]}for(let e=o-1;e>=0;e--){let t=0;for(let a=e+1;a<o;a++)t+=i[a][e]*n[a];n[e]=(i[o][e]-t)/i[e][e]}return n}static linearRegression(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;const o=e.length;let n=0,a=0,r=0,s=0;for(let i=0;i<o;i++){const o=e[i],l=t[i];n+=o,a+=l,r+=o*l,s+=o*o}const l=(o*r-n*a)/(o*s-n*n),d=(a-l*n)/o;return e=>this.round(d+l*e,i)}static exponentialRegression(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;const o=e.length;let n=0,a=0,r=0,s=0,l=0;for(let i=0;i<o;i++){const o=e[i],d=t[i];n+=d,a+=o*o*d,r+=d*Math.log(d),s+=o*d*Math.log(d),l+=o*d}const d=n*a-l*l,c=Math.exp((a*r-l*s)/d),u=(n*s-l*r)/d,p=this.round(c,i),h=this.round(u,i);return e=>this.round(p*Math.exp(h*e),i)}static logarithmicRegression(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;const o=e.length;let n=0,a=0,r=0,s=0;for(let i=0;i<o;i++){const o=e[i],l=t[i];n+=Math.log(o),a+=l*Math.log(o),r+=l,s+=Math.pow(Math.log(o),2)}const l=(o*a-r*n)/(o*s-n*n),d=this.round(l,i),c=this.round((r-d*n)/o,i);return e=>this.round(this.round(c+d*Math.log(e),i),i)}static powerRegression(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;const o=e.length;let n=0,a=0,r=0,s=0;for(let i=0;i<o;i++){const o=e[i],l=t[i];n+=Math.log(o),a+=Math.log(l)*Math.log(o),r+=Math.log(l),s+=Math.pow(Math.log(o),2)}const l=(o*a-n*r)/(o*s-Math.pow(n,2)),d=(r-l*n)/o,c=this.round(Math.exp(d),i),u=this.round(l,i);return e=>this.round(this.round(c*Math.pow(e,u),i),i)}static polynomialRegression(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;const o=[],n=[];let a=0,r=0;const s=e.length;for(let i=0;i<3;i++){for(let o=0;o<s;o++){const n=e[o],r=t[o];a+=Math.pow(n,i)*r}o.push(a),a=0;const l=[];for(let t=0;t<3;t++){for(let o=0;o<s;o++){const n=e[o];r+=Math.pow(n,i+t)}l.push(r),r=0}n.push(l)}n.push(o);const l=this.gaussianElimination(n,3).map((e=>this.round(e,i)));return e=>this.round(l.reduce(((t,i,o)=>t+i*Math.pow(e,o)),0),i)}}},702671:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(496486)),a=o(i(385857)),r=o(i(888861)),s=i(168949),l=o(i(21870)),d=o(i(498967)),c=i(692479),u=o(i(819433)),p=i(557310),h=i(166089);const m=Symbol();t.default=class{constructor(e,t){this.inlineStack=[],(0,s.makeObservable)(this,{inlineStack:s.observable,drillUp:s.action,drillDownAll:s.action,drillDown:s.action,sort:s.action}),this.props=e,this.viewStackKey=t}get appModel(){return this.props.appModel||h.AppGlobals.AppModel}DRILLDOWN_ALL_SYMBOL(){return m}updateProps(e){var t;const{filterExpr:i,filterDefaults:o}=e;this.inlineStack.length>0&&null!=this.props&&((null==i?void 0:i.hash)!==(null===(t=this.props.filterExpr)||void 0===t?void 0:t.hash)||!n.default.isEqual(o,this.props.filterDefaults))&&(this.inl
1ineStack=[]),this.props=e}currentInlineItem(){return n.default.last(this.inlineStack)||{}}inlineFilterValue(){return this.currentInlineItem().filterValue}inlineFilterDefaults(){return this.currentInlineItem().filterDefaults}inlineFilterDisplayValue(){return this.currentInlineItem().filterDisplayValue||this.inlineFilterValue()}inlineSortBy(){return this.currentInlineItem().sortBy}inlineFilterExpr(){return this.currentInlineItem().filterExpr}inlinePosition(){return this.inlineStack.length}getPreviousGroupByValue(e){const t=h.AppGlobals.AppState.getPreviousGroupByColumnName();return t&&e.length>0&&this.filterExpr()?e[0][t]:null}annotateRows(e,t){const i=this.currentDrilldownColumn();let o=[],a=null;const r=this.getRowLimitFromProps();if(t){a=[];let i=null,n=0,s=null,l=0;for(let d=0;d<e.length;d++){const c=e[d],u=(null==i?void 0:i[t])?i[t].toString().toLowerCase():null,p=c[t]?c[t].toString().toLowerCase():null;if(!i||u!==p){if(null!=r&&r<=l)break;s=[],o.push(s),n=o.length-1,a.push(n)}s.push(c),a.push(n),(null==r||l<r)&&o.push(c),i=c,l++}}else if(i){const t=this.props.tableSchema.findAttributeByName(i);if(t&&"EnumList"===t.type()){for(let a=0;a<e.length;a++){const r=e[a];t.valueFromWireFormat(r[i]).forEach((e=>{const t=n.default.extend({},r);t[i]=e,o.push(t)}))}o=n.default.uniqBy(o,(e=>e[i]),!0),d.default.sort(o,this.props.tableSchema.rowComparer([{Column:i,Order:"Ascending"}]))}else o=o.concat(e);o.length>1&&o.unshift(m)}else o=o.concat(null==r?e:e.slice(0,r));return{nearestHeadings:a,annotatedRows:o}}drillUp(){this.inlineStack.pop()}drillDownAll(e){const t=this.props.table,i=this.appModel,o=this.getSortByFromProps(),n=this.getGroupAggregateFromProps(),a=this.getControlNameFromProps(),r=this.getColumnOrderFromProps();let s=this.groupBy().slice(1);if(1===s.length&&"_RowNumber"===s[0].Column&&(s=[]),this.useLocalInlineStack){const e={filterValue:i.MapActionName("All"),filterExpr:this.filterExpr(),filterDefaults:this.filterDefaults(),groupBy:s};this.inlineStack.push(e)}else if(p.ReactRootUIConfig.isReactRoot())(0,u.default)().dispatch((0,c.mutateView)({ViewStackKey:this.viewStackKey,ViewState:{filterDefaults:this.filterDefaults(),GroupBy:s},options:{discardChildren:!0}}));else{const i=h.AppGlobals.AppState.KnownStates[e||"fastTable"].CreateRootState({TableName:t.name(),GroupBy:s,SortBy:o,ColumnOrder:r,groupAggregate:n,FilterExpr:this.filterExpr(),DefaultValues:this.filterDefaults(),ControlName:a});h.AppGlobals.AppState.PushState(i,!0)}}drillDown(e,t,i){var o;if(this.drilldownMode()){const n=this.props.table,a=this.props.tableSchema,s=this.getSortByFromProps(),l=this.getGroupAggregateFromProps(),d=this.getColumnOrderFromProps(),m=this.getColumnWidthFromProps(),f=this.getControlNameFromProps();let g,y=this.filterExpr();const v=this.groupBy();t=t||n.findRow(e);const b=a.findAttributeByName(v[0].Column);if(!t||!b)return;const w=b.name(),S=t[w],x=b.localizeWireValue(S);if(null===(o=null===window||void 0===window?void 0:window.AppState)||void 0===o?void 0:o.pendingFormState){const e=r.default.createColFilter(S,a,b);y=y?r.default.createAnd(e,y):e}else g=[...this.filterDefaults(),{ColumnName:w,ColumnValue:S}];let C=v.slice(1);if(p.ReactRootUIConfig.isReactRoot()||1!==C.length||"_RowNumber"!==C[0].Column||(C=[]),this.useLocalInlineStack){const e={sortBy:s,filterColumn:w,filterValue:S,filterDisplayValue:x,filterExpr:y,filterDefaults:g,groupBy:C};this.inlineStack.push(e)}else if(i||(i="fastTable"),p.ReactRootUIConfig.isReactRoot())(0,u.default)().dispatch((0,c.mutateView)({ViewStackKey:this.viewStackKey,ViewState:{filterDefaults:g,GroupBy:C},options:{discardChildren:!0}}));else{const e=h.AppGlobals.AppState.KnownStates[i].CreateRootState({TableName:n.name(),RowKey:null,GroupBy:C,SortBy:s,ColumnOrder:d,ColumnWidth:m,groupAggregate:l,DefaultValues:g,ControlName:f,FilterExpr:y});h.AppGlobals.AppState.PushState(e,!0)}}}sort(e,t){const i=[{Column:e,Order:t}],o=[];if(this.useLocalInlineStack){const e=Object.assign({},this.currentInlineItem(),{sortBy:i,groupBy:o});this.inlineStack[this.inlinePosition()]=e}else if(p.ReactRootUIConfig.isReactRoot())(0,u.default)().dispatch((0,c.mutateView)({ViewState:{SortBy:i,GroupBy:o},ViewStackKey:this.viewStackKey}));else{const e=n.default.extend(h.AppGlobals.AppState.CurrentUIState,{FastTableUIState:n.default.extend(h.AppGlobals.AppState.CurrentUIState.FastTableUIState,{SortBy:i,GroupBy:o})});h.AppGlobals.AppState.ReplaceState(e)}}get useLocalInlineStack(){return!(!this.props.isInline||p.ReactRootUIConfig.isReactRoot()&&!this.drilldownMode())}getRowLimitFromProps(){return this.props.rowLimit?this.props.rowLimit:void 0}getGroupAggregateFromProps(){return this.props.groupAggregate?this.props.groupAggregate:this.props.viewDefn?this.props.viewDefn.GroupAggregate:void 0}getControlNameFromProps(){return this.props.controlName?this.props.controlName:this.props.view?this.props.view.name():void 0}getSortByFromProps(){return this.props.sortBy?this.props.sortBy:this.props.viewDefn?this.props.viewDefn.SortBy:void 0}getColumnOrderFromProps(){return this.props.sortBy?this.props.columnOrder:this.props.viewDefn?this.props.viewDefn.ColumnOrder:void 0}getColumnWidthFromProps(){return this.props.columnWidth?this.props.columnWidth:this.props.viewDefn?this.props.viewDefn.ColumnWidth:void 0}getFilterExprFromProps(){return this.props.filterExpr?this.props.filterExpr:this.filterExprValue?this.filterExprValue:void 0}getFilterDefaultsFromProps(){return this.props.filterDefaults?this.props.filterDefaults:this.defaultValues?this.defaultValues:[]}getSearchQueryFromProps(){return null!=this.props.searchQuery?this.props.searchQuery:l.default.searchQuery}groupBy(){return p.ReactRootUIConfig.isInDesktopExperience()&&!this.props.isInline&&this.props.groupBy?this.props.groupBy.slice(-1):this.currentInlineItem().groupBy||this.props.groupBy||this.groupByValue||void 0}
1sortBy(){return this.inlineSortBy()||this.getSortByFromProps()}filterExpr(){return this.inlineFilterExpr()||this.getFilterExprFromProps()}filterDefaults(){return this.inlineFilterDefaults()||this.getFilterDefaultsFromProps()||[]}drilldownMode(){return this.groupBy()&&this.groupBy().length>1}currentDrilldownColumn(){if(this.drilldownMode()){return this.groupBy()[0].Column}return null}alreadyDrilledColumns(){if(this.props.isInline)return n.default.compact(this.inlineStack.map((e=>e.filterColumn)));return this.filterDefaults().map((e=>e.ColumnName))}getDrilldownRows(e){const t=new a.default(this.appModel,this.props.tableSchema);if(this.drilldownMode()){const i=this.groupBy()[0],o=i.Column,n=this.getSearchQueryFromProps();return this.props.table.queryRowValues({searchQuery:n,limit:this.getRowLimitFromProps(),uniqueBy:o,sortRules:[{Column:o,Order:i.Order}],filterExpr:this.filterExpr(),filterDefaults:this.filterDefaults(),transaction:e},this.appModel,t)}return[]}}},297328:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i=t.GrowingPacker=function(e){this.targetAspectRatio=e||1};i.prototype={fit:function(e){let t,i,o;const n=e.length,a=n>0?e[0].w:0,r=n>0?e[0].h:0;for(this.root={x:0,y:0,w:a,h:r},t=0;t<n;t++)o=e[t],(i=this.findNode(this.root,o.w,o.h))?o.fit=this.splitNode(i,o.w,o.h):o.fit=this.growNode(o.w,o.h)},findNode:function(e,t,i){return e.used?this.findNode(e.right,t,i)||this.findNode(e.down,t,i):t<=e.w&&i<=e.h?e:null},splitNode:function(e,t,i){return e.used=!0,e.down={x:e.x,y:e.y+i,w:e.w,h:e.h-i},e.right={x:e.x+t,y:e.y,w:e.w-t,h:i},e},growNode:function(e,t){const i=e<=this.root.w,o=t<=this.root.h,n=(this.root.w+e)/this.root.h,a=this.root.w/(this.root.h+t),r=Math.abs(this.targetAspectRatio-n),s=Math.abs(this.targetAspectRatio-a);return o&&r<s?this.growRight(e,t):i?this.growDown(e,t):o?this.growRight(e,t):null},growRight:function(e,t){let i;return this.root={used:!0,x:0,y:0,w:this.root.w+e,h:this.root.h,down:this.root,right:{x:this.root.w,y:0,w:e,h:this.root.h}},(i=this.findNode(this.root,e,t))?this.splitNode(i,e,t):null},growDown:function(e,t){let i;return this.root={used:!0,x:0,y:0,w:this.root.w,h:this.root.h+t,down:{x:0,y:this.root.h,w:this.root.w,h:t},right:this.root},(i=this.findNode(this.root,e,t))?this.splitNode(i,e,t):null}};t.default=i},19849:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(240215)),a=i(623834),r=o(i(209491));const s=1e3;class l{static _getCostForPair(e,t,i,o){var n;const r=l._costOverride(t,i,o);if(null!==r)return r;if("action"===t.type){if("action"!==i.type)return s;if(("mainClickAction"===t.id||"container"===a.CardLayoutNode.getParent(e,t.id).type)&&"Go to details"===i.action.Name)return 198;return(null===(n=i.action.CreatedBy)||void 0===n?void 0:n.startsWith("Auto"))?200:199}{if("column"!==i.type)return s;const e=t.child,o=l.getPotentialColumns(e.type,[i.column]).length>0;if("_RowNumber"===i.column.Name)return s;if(o){let o=100;if("text"===e.type){const e=t.value;e&&e.length>100&&"LongText"===i.column.Type||e&&e.length<10&&"Number"===i.column.Type?o-=1:this.uiElementIsHeader(t)&&("Name"===i.column.Type||i.column.IsLabel)?o-=2:this.uiElementIsTitle(t)&&("Name"===i.column.Type||i.column.IsLabel)?o-=1:e&&e.length>=10&&"Number"===i.column.Type?o+=1:e&&e.length<=100&&"Text"===i.column.Type?o-=1:"Url"===i.column.Type&&(o+=1)}else"image"===e.type&&("LatLong"===i.column.Type||"Address"===i.column.Type||"Percent"===i.column.Type?o+=1:"List"!==i.column.Type&&"Ref"!==i.column.Type||(o=s));return o}}return s}static uiElementIsTitle(e){const t=e.value;if(!t)return!1;const i=t.toLowerCase();return i.startsWith("title")||i.startsWith("label")}static uiElementIsHeader(e){const t=e.value;if(!t)return!1;return t.toLowerCase().startsWith("header")}static _generateCosts(e,t,i,o){const n=[];for(const a of t){const t=[];for(const n of i)t.push(l._getCostForPair(e,a,n,o));n.push(t)}return n}static _uiElementIsBindable(e){return null!=e&&("variable"===e.type||"constant"===e.type)}static areCompatibleTypes(e,t,i){return void 0!==this.getPotentialColumns(e,i).find((e=>e.Type===t))}static _applyAssignment(e,t,i,o){if("column"===i.type)if("action"===t.type){const i=a.CardLayoutN
1ode.getParent(e.root,t.id);e.ignore(i.id)}else{const n=t.child;n&&!l.areCompatibleTypes(n.type,i.column.Type,o)?e.ignore(n.id):(e.convertToBindingNode(t.id,i.column.Name),n&&e.convertUIElementToSupportColumnType(n.id,i.column))}else if("action"===i.type){const o=i.action;e.convertToAction(t.id,o)}}static _shouldConsiderNode(e){if("action"===e.type)return!0;return["constant","variable","binding"].includes(e.type)&&e.child&&(!e.child.onClick||"image"===e.child.type)}static _costOverride(e,t,i){if(!i)return null;if(i[e.id]){let o;if(o=t.column?t.column.Name:t.action.Name,o===i[e.id])return 0}return null}static getSmartDefaultsFromType(e,t,i){let{includeGoToDetailsAction:o=!1}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const n=r.default[i],s=e.schemaByTableOrSliceName(t),l=s?e.columns(s):[];let d=e.actionsFor(t);return o&&(d=d.concat({Name:"Go to details",Icon:"far fa-indent"})),d=d.filter((e=>"Add"!==e.Name||"Auto (table)"!==e.CreatedBy)),a.CardLayoutNode.build(this.getSmartDefaults(n,l,d,null))}static getSmartDefaults(e,t,i,o){const r=t;t=(t=t.filter((e=>!e.IsHidden))).map((e=>({type:"column",column:e}))),i=i.map((e=>({type:"action",action:e})));const d=[].concat(t).concat(i),c=a.CardLayoutNode.findNodes(e,(e=>l._shouldConsiderNode(e))),u=l._generateCosts(e,c,d,o),p=(0,n.default)(u),h=a.CardLayoutNode.makeEdits(e);for(const e of p)u[e[0]][e[1]]!==s&&l._applyAssignment(h,c[e[0]],d[e[1]],r);if(o)for(const e in o)e.includes(".")&&h.setFieldByPath(e,o[e]);if(p.length<c.length){const t=this.findUnassignedUIElements(c,p);this.ignoreUnassignedUIElements(h,t,e)}return h.apply()}static ignoreUnassignedUIElements(e,t,i){for(const o of t)if(o.child)e.ignore(o.child.id);else if("action"===o.type){const t=a.CardLayoutNode.getParent(i,o.id);e.ignore(t.id)}}static findUnassignedUIElements(e,t){if(t.length<e.length){const i=e=>t.find((t=>t[0]===e));return e.filter(((e,t)=>!i(t)))}return[]}static getPotentialColumns(e,t){let i=[];switch(e){case"image":i=["Image","Drawing","Thumbnail","LatLong","Address","Percent","List"];break;case"text":i=["Text","Decimal","Price","LongText","Name","Address","LatLong","Number","Enum","Time","Date","DateTime","Email","EnumList","Phone","Percent","Progress","Ref","Url","Yes/No","ChangeTimestamp","ChangeLocation","ChangeCounter","XY"];break;case"media":i=["Image","Drawing","Thumbnail","LatLong","Address","List"];break;case"description":i=["Text","Price","LongText","Name"];break;case"label":case"headerText":i=["Name","Price","Text"];break;case"subheader":i=["Text","Price"]}return l.filterValidTypes(t,i)}static filterValidTypes(e,t){return e.filter((e=>
1t.includes(e.Type)&&!e.IsHidden))}static getPotentialActions(e,t){return t}}t.default=l},302873:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.getRowScopeActions=function(e,t,i){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];var r,s;const l=(0,n.getAppModel)(),d=a.default.findByName(e,l),c=null===(s=null===(r=d.table)||void 0===r?void 0:r.rootTable)||void 0===s?void 0:s.call(r);if(!c)return[];const u=t.map((e=>c.findRow(e))).filter((e=>!!e));return l.appTemplate.actions().actionsForRows(u,e,window.AppModel,o,i)},t.getTableScopeActions=function(e){let{tableName:t,appModel:i=(0,n.getAppModel)(),dataContext:o}=e;return i.appTemplate.actions().actionsAtTableScope(t,i,o)};var n=i(351101),a=o(i(962553))},462122:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateAddActionScenarioWithProminenceAndTrack=t.updateAddActionScenarioWithPath=t.startAddActionScenario=t.endAddActionScenarioIfDeletingNewlyCreatedAction=void 0;var o=i(747950),n=i(862858),a=i(372456),r=i(218546),s=i(432981);t.startAddActionScenario=e=>{const{dispatch:t,actionProminence:i,startLocation:a}=e;(0,s.batch)((()=>{t((0,o.endAllScenariosOfType)(n.Scenarios.AddAction,{result:n.ScenarioResult.Success,endReason:n.ScenarioEndReason.AddedNewEntity})),t((0,o.startScenario)(n.Scenarios.AddAction,{actionProminence:i,startLocation:a}))}))};t.endAddActionScenarioIfDeletingNewlyCreatedAction=(e,t)=>{e((0,o.endScenarioWithComponent)(n.Scenarios.AddAction,t,{result:n.ScenarioResult.Failure,endReason:n.ScenarioEndReason.DeletedEntity}))};t.updateAddActionScenarioWithPath=(e,t)=>{e((0,o.updateScenarioWithMetadata)(n.Scenarios.AddAction,{componentPath:t}))};t.updateAddActionScenarioWithProminenceAndTrack=(e,t)=>{(0,s.batch)((()=>{const i=t;e((0,o.updateScenarioWithMetadata)(n.Scenarios.AddAction,{metadata:{actionProminence:i}})),e((0,o.trackEditorEventReduxAction)({event:r.EventName.ActionProminenceChanged,concordEvent:new a.ActionProminenceChangedEvent(i)}))}))}},372456:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionProminenceChangedEvent=void 0;var o=i(29683),n=i(218546);class a extends o.LogEvent{constructor(e){super(n.EventName.ActionProminenceChanged,{newProminence:e})}}t.ActionProminenceChangedEvent=a},338590:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.autoComplete=function(e,t){return s(this,void 0,void 0,(function*(){if(n.default.trim(e).length<=0)return Promise.resolve({suggestions:[]});const i="/directorydata/autoComplete?query="+encodeURIComponent(e)+"&ownerId="+t;return yield(0,a.ajaxGet)(i).catch((e=>(r.default.logToDevConsole("Unable to load auto complete results: there was an error contacting the server."),{suggestions:[]})))}))};var n=o(i(496486)),a=i(635672),r=o(i(593186)),s=function(e,t,i,o){return new(i||(i=Promise))((function(n,a){function r(e){try{l(o.next(e))}catch(e){a(e)}}function s(e){try{l(o.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,s)}l((o=o.apply(e,t||[])).next())}))}},664583:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.runAppAction=void 0;var n=i(733366),a=o(i(606610)),r=i(557310),s=o(i(819433));t.runAppAction=function(){r.ReactRootUIConfig.isReactRoot()?(0,s.default)().dispatch((0,n.runAppActionThunk)(...arguments)):a.default.run(...arguments)}},10311:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.getActionFormattingRules=function(e,t,i){let o=null;const a=e.appTemplate.formattingRules();o=a.getFormatting({tableOrSlice:t.table(),rowKey:i,actionName:t.name()}),t.autoReferencedColumn()&&n.default.isEqual(o,{icon:[]})&&(o=a.getFormatting({tableOrSlice:t.table(),rowKey:i,column:t.autoReferencedColumn()}));return o};var n=o(i(496486))},790594:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useStyles=t.SubNavBar=t.DEFAULT_SUBNAV_HEIGHT=void 0;var o=i(667294),n=i(249492),a=i(551505),r=i(148521);const s=t.DEFAULT_SUBNAV_HEIGHT=48,l=t.useStyles=(0,n.makeStyles)((e=>({cancelIconButton:{marginRight:e.spacing(2)},root:{width:"100%"},topBar:{height:t=>{let{inFormDrawer:i}=t;return i?s+e.spacing(1):s},boxSizing:"border-box",display:"flex",alignItems:"center",padding:e.spacing(1,2,1,1)},title:{flexGrow:1,flexShrink:1,fontSize:"1rem",fontWeight:400,width:"100%",padding:e.spacing(0,1),overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},actionButtonsContainer:{flexShrink:0,display:"inline-flex",alignItems:"center","&>*:last-child":{marginRight:t=>{let{inFormDrawer:i}=t;return i?0:e.spacing(-1)},"&>.navbar-divider:last-child":{display:"none"}}},actionButtonsRefSpan:{flexShrink:0,display:"inline-flex",alignItems:"center"}})));t.SubNavBar=(0,o.forwardRef)(((e,t)=>{let{title:i,children:o,leftChildren:n,inFormDrawer:s=!1}=e;const d=l({inFormDrawer:s});return(0,r.jsxs)("div",{className:d.root,children:[(0,r.jsxs)("div",{className:d.topBar,children:[n,(0,r.jsx)("div",{className:d.title,role:"heading","aria-level":2,"aria-hidden":!i,children:i}),(0,r.jsxs)("div",{className:d.actionButtonsContainer,children:[(0,r.jsx)("span",{ref:t,className:d.actionButtonsRefSpan}),o]})]}),(0,r.jsx)(a.FilterChipBar,{})]})}))},538678:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.useViewSpecificPropsForView=function(e){return(0,u.useMemo)((()=>p(e)),Object.values(e))};var n=i(166089),a=i(656912),r=o(i(571524)),s=o(i(385857)),l=o(i(962553)),d=i(673275),c=i(302443),u=i(667294);const p=e=>{let{appModel:t,dataLastUpdated:i,viewType:o,tableName:u,control:p,viewState:h={},viewStackKey:m,parentViewState:f,searchState:g}=e;var y,v,b,w,S,x,C,T,I,R,O,D,N,j,E,A,P,M,k,_,B,L,V,F,W,H,U,G,z,K,Y,q,X,Q,$,Z,J,ee,te,ie,oe,ne;const ae=h.filterDefaults||[],re=Array.isArray(h.DefaultValues)?h.DefaultValues:[],se=[...ae,...re],le={searchQuery:null==g.tableNameToSearch||g.tableNameToSearch===u?g.searchTerm:void 0,filterExpr:(0,d.generateFilterExpressions)(h),filterDefaults:se,filterDefaultsForDrilldownHistory:ae,groupBy:h.GroupBy,controlGroupBy:h.controlGroupBy,groupAggregate:h.groupAggregate,selectedRows:h.selected,sortBy:h.SortBy,rowId:null!==(y=h.RowKey)&&void 0!==y?y:h.row,refKeyAttr:h.RefKeyAttr,refKeyValue:h.RefKeyValue,forceUpdate:i};switch(o){case"gantt":return Object.assign(Object.assign({},le),{quickEditMode:h.isInEditMode,columnOrder:null!==(v=h.ColumnOrder)&&void 0!==v?v:void 0,ParentTaskColumn:null!==(b=h.ParentTaskColumn)&&void 0!==b?b:void 0,StartDateColumn:null!==(w=h.StartDateColumn)&&void 0!==w?w:void 0,DurationColumn:null!==(S=h.DurationColumn)&&void 0!==S?S:void 0,WritableDurationColumn:null!==(x=h.WritableDurationColumn)&&void 0!==x?x:void 0,WritableStartDateColumn:null!==(C=h.WritableStartDateColumn)&&void 0!==C?C:void 0,LabelColumn:null!==(T=h.LabelColumn)&&void 0!==T?T:void 0,SecondaryLabelColumn:null!==(I=h.SecondaryLabelColumn)&&void 0!==I?I:void 0,PercentCompleteColumn:null!==(R=h.PercentCompleteColumn)&&void 0!==R?R:void 0,PredecessorTasksColumn:null!==(O=h.PredecessorTasksColumn)&&void 0!==O?O:void 0,SSPredecessorTasksColumn:null!==(D=h.SSPredecessorTasksColumn)&&void 0!==D?D:void 0,SFPredecessorTasksColumn:null!==(N=h.SFPredecessorTasksColumn)&&void 0!==N?N:void 0,FFPredecessorTasksColumn:null!==(j=h.FFPredecessorTasksColumn)&&void 0!==j?j:void 0,disabledWeekdays:null!==(E=h.disabledWeekdays)&&void 0!==E?E:void 0,disabledDatesExpressionString:null!==(A=h.disabledDatesExpressionString)&&void 0!==A?A:void 0,defaultTimeframe:h.defaultTimeframe,BaselineStartDateColumn:null!==(P=h.BaselineStartDateColumn)&&void 0!==P?P:void 0,BaselineEndDateColumn:null!==(M=h.BaselineEndDateColumn)&&void 0!==M?M:void 0,CriticalPathColumn:null!==(k=h.CriticalPathColumn)&&void 0!==k?k:void 0,focusedGanttTaskId:h.focusedGanttTaskId,allowBulkSelect:!0});case"calendar":return Object.assign(Object.assign({},le),{startDateColumn:h.startDateColumn,endDateColumn:h.endDateColumn,startTimeColumn:h.startTimeColumn,endTimeColumn:h.endTimeColumn,labelColumn:h.labelColumn,categoryColumn:h.categoryColumn,defaultCalendarView:h.defaultCalendarView,date:h.date,currentView:h.currentView,allowBulkSelect:!1});case"onboarding":return Object.assign(Object.assign({},le),{image:h.image,title:h.title,firstBlurb:h.firstBlurb,secondBlurb:h.secondBlurb,finishView:h.finishView,open:!0,viewDefn:h});case"deck":return Object.assign(Object.assign({},le),{imageDisplayType:null!==(_=h.ImageDisplayType)&&void 0!==_?_:void 0,mainDeckImageColumn:null!==(B=h.mainDeckImageColumn)&&void 0!==B?B:void 0,primaryDeckHeaderColumn:null!==(L=h.primaryDeckHeaderColumn)&&void 0!==L?L:void 0,secondaryDeckHeaderColumn:null!==(V=h.secondaryDeckHeaderColumn)&&void 0!==V?V:void 0,deckSummaryColumn:null!==(F=h.deckSummaryColumn)&&void 0!==F?F:void 0,deckNestedTableColumn:null!==(W=h.deckNestedTableColumn)&&void 0!==W?W:void 0,showActionBar:h.showActionBar,actionColumns:null!==(H=h.actionColumns)&&void 0!==H?H:void 0,actionBarEntries:null!==(U=h.actionBarEntries)&&void 0!==U?U:void 0,allowBulkSelect:!0});case"detail":{const e=Object.assign(Object.assign({},le),{columnOrder:null!==(G=h.ColumnOrder)&&void 0!==G?G:void 0,layout:h.Layout,maxNestedRows:h.MaxNestedRows,mainSlideshowImageColumn:null!==(z=h.mainSlideshowImageColumn)&&void 0!==z?z:void 0,detailContentColumn:null!==(K=h.detailContentColumn)&&void 0!==K?K:void 0,headerColumns:null!==(Y=h.headerColumns)&&void 0!==Y?Y:void 0,slideshowDisplayMode:null!==(q=h.SlideshowDisplayMode)&&void 0!==q?q:void 0,imageDisplayType:null!==(X=h.ImageDisplayType)&&void 0!==X?X:void 0,invokeAction:h.InvokeAction,showNavigationArrows:!0,fullRefresh:!1,navigationStack:[]}),i=t&&(null==f?void 0:f.TableName)&&(f.TableName===h.TableName||t.findTableCollection(null==f?void 0:f.TableName).rootTable===t.findTableCollection(h.TableName).rootTable),o=null!==(Q=le.filterExpr)&&void 0!==Q?Q:i?(0,d.generateFilterExpressions)(f):void 0,n=i?f.SortBy:le.sortBy;return e.filterExpr=o,e.sortBy=n,e}case"form":return{rowId:void 0,controlName:null==p?void 0:p.Name,tableName:u,rowKey:h.row||h.RowKey,defaultValues:h.DefaultValues||h.defaultValues,launchedByAttributeName:h.launchedByAttributeName,referenceRelationship:h.referenceRelationship,tempId:"reactForm",stableId:h.stableId,rowKeys:h.rowKeys,onPage:h.onPage,scrollPosition:h.scrollPosition,userEdited:h.userEdited,errorState:h.errorState};case"dashboard":return Object.assign(Object.assign({},le),{quickEditMode:h.isInEditMode,dataStamp:null==t?void 0:t.dataStampTime(),showMap:!0,viewEntries:h.viewEntries,interactiveMode:h.interactiveMode,showTabs:h.showTabs});case"chart":case"graph":return Object.assign(Object.assign({},le),{chartType:h.ChartType||a.ChartOption.Row,chartColumns:null!==($=h.ChartColumns)&&void 0!==$?$:void 0,colorCodes:null!==(Z=h.ColorCodes)&&void 0!==Z?Z:void 0,trendLine:null!==(J=h.TrendLine)&&void 0!==J?J:void 0,showLegend:h.ShowLegend,labelType:null!==(ee=h.LabelType)&&void 0!==ee?ee:void 0,graphTitle:h.GraphTitle});case"fastTable":case"table":return Object.assign(Object.assign({},le),{quickEditMode:h.isInEditMode,columnOrder:null!==(te=h.ColumnOrder)&&void 0!==te?te:void 0,columnWidth:null!==(ie=h.ColumnWidth)&&void 0!==ie?ie:void 0,allowBulkSelect:!0});case"map":case"google-map":{let e={};const i=h;if(i&&t){let o,a={};const{Zoom:d,RowKey:f,SelectedTable:g,SelectedColumn:y}=i,{table:v,tableSchema:b}=l.default.findByName(null!==(oe=i.TableName)&&void 0!==oe?oe:u);if(o=p?t.FindControl(p.Name):null,(!o||"map"!==o.Action)&&null!=v){const e=null==t?void 0:t.FindControl
1sForTable(null==v?void 0:v.name(),"map",!1);o=e?e[0]:o}o&&(a=t.NavStateForView(o,null==v?void 0:v.name())||{});let w=null!==(ne=null==i?void 0:i.MapCol)&&void 0!==ne?ne:a.MapCol;const S=i&&i.MapType?i.MapType:a.MapType,x=a.SecondaryTable,C=a.SecondaryColumn,T=i.CurrentLat||null,I=i.CurrentLng||null;let R=r.default.InMobileWebView()?50:1e3;n.AppGlobals.AppModel.AppTemplate.Presentation.MapPinMax>0&&(R=n.AppGlobals.AppModel.AppTemplate.Presentation.MapPinMax),(null==i?void 0:i.MapCol)&&a.MapCol&&a.MapCol!==i.MapCol&&(w=C===i.MapCol?a.MapCol:i.MapCol),e={tableSchema:b,dataContext:new s.default(n.AppGlobals.AppModel,b,void 0,void 0,void 0,void 0,{viewStackKey:m}),showMap:!0,centerLat:(0,c.normalizeLatOrLng)(T),centerLng:(0,c.normalizeLatOrLng)(I),maxPins:R,mapColumn:w,mapType:S,secondaryTableName:x,secondaryColumn:C,selectedTable:g,selectedColumn:y,locationMode:h.LocationMode,rowId:f,zoom:null==d||isNaN(Number(d))?null:Number(d),filterDefaults:i.DefaultValues}}return Object.assign(Object.assign(Object.assign({},le),{viewAppState:i}),e)}case"search":return Object.assign(Object.assign({},le),{query:h.query,showMap:!0});case"card":case"iframe":default:return le;case"gallery":return Object.assign(Object.assign({},le),{allowBulkSelect:!0,galleryImageSize:h.GalleryImageSize})}}},696916:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseDrilldownView=t.DrilldownView=void 0;var n=o(i(238416)),a=i(74281),r=i(249492),s=i(14042),l=i(29827),d=o(i(526382)),c=o(i(17926)),u=i(351101),p=i(692479),h=o(i(385857)),m=i(655505),f=i(375155),g=i(155345),y=i(278965),v=i(302873),b=o(i(150198)),w=i(303622),S=i(618583),x=i(56749),C=i(557310),T=i(663767),I=i(148521);function R(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function O(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?R(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):R(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var D=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};const N="Drilldown All Placeholder";t.shouldUseDrilldownView=(e,t)=>C.ReactRootUIConfig.isInMobileExperience()&&T.DRILLDOWN_ENABLED_VIEW.has(e)&&t&&t.length>1;const j=(0,r.makeStyles)((()=>({container:{"& > div":{backgroundColor:(0,x.themeColor)("tableBackground")}}})));t.DrilldownView=e=>{var t,i,o,n,x,C,T,R,E,{viewStackKey:A,actionButtonContainer:P,isInline:M=!1,filterDefaults:k=[],children:_,controlName:B,listContainerRef:L,viewType:V,dynamicHeightMode:F,width:W}=e,H=D(e,["viewStackKey","actionButtonContainer","isInline","filterDefaults","children","controlName","listContainerRef","viewType","dynamicHeightMode","width"]);const U=(0,u.getAppModel)(),G=j(),z=new h.default(U,H.tableSchema),K=(0,s.useViewStateDispatch)(),Y=(0,s.useViewStateSelector)(l.getPendingTransaction),q=(0,s.useReactAppSelector)((e=>(0,l.getParentViewType)(e,A,M))),X="drilldown-view-".concat(B);if(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return 0!==e.length&&e.length>1}(H.groupBy)){const{Column:e,Order:t}=H.groupBy[0],i={searchQuery:H.searchQuery,limit:H.rowLimit,uniqueBy:e,sortRules:[{Column:e,Order:t}],filterExpr:H.filterExpr||void 0,filterDefaults:k,transaction:Y},s=(null===(o=H.table)||void 0===o?void 0:o.queryRowValues(i,U,z))||[],l=H.tableSchema.findAttributeByName(e),u="EnumList"===(null==l?void 0:l.type())?((e,t)=>{let i=[...e];for(const e of i){const o=e[t],n=b.default.splitEnumListValue(o);n.length>1&&(n.forEach((o=>{i.push(Object.assign(Object.assign({},e),{[t]:o}))})),i=i.filter((e=>e[t]!==o)))}return i})(s,l.name()):s,h=(t,i)=>{let o;o=i?H.filterDefaultsForDrilldownHistory:[...H.filterDefaultsForDrilldownHistory||[],{ColumnName:e,ColumnValue:t[e]}],K((0,p.mutateView)({ViewStackKey:A,ViewState:{filterDefaults:o,GroupBy:H.groupBy.slice(1)},options:Object.assign({discardChildren:!0},!M&&{mobileTransitionType:"slide",mobileTransitionDirection:"left"})}))},D=[...u];D.unshift(N);
1const j=null===(x=null===(n=null==U?void 0:U.AppTemplate)||void 0===n?void 0:n.Presentation)||void 0===x?void 0:x.ShowOverlayActionsInSubViews,_="dashboard"===q&&j,Q=(0,v.getTableScopeActions)({tableName:(null===(C=H.table)||void 0===C?void 0:C.name())||"",appModel:U}),$=(0,g.getFabActions)({isInline:M,actionsInScope:Q,shouldShowInlineFabActions:_}),Z=(!M||"dashboard"===q)&&(0,I.jsx)(r.Portal,{container:P,children:(0,I.jsx)(f.NavBarButtons,{usedActions:$,filterExpr:H.filterExpr,filterDefaults:k,tableName:M?null===(T=H.table)||void 0===T?void 0:T.name():void 0,isInline:M})}),J=D.length*g.DRILLDOWN_HEADER_ROW_HEIGHT,ee=(t,i)=>(0,I.jsx)("div",{ref:e=>{var t,i;L&&e&&(L.current=null!==(i=null===(t=e.children[0])||void 0===t?void 0:t.children[0])&&void 0!==i?i:null)},className:G.container,children:(0,I.jsx)(a.List,{width:t||500,height:i||J,rowCount:D.length,rowHeight:g.DRILLDOWN_HEADER_ROW_HEIGHT,rowRenderer:t=>{let{index:i,key:o,style:n}=t;const a=D[i];let r;if(a===N)r=(0,I.jsx)(d.default,{text:U.MapActionName("All"),onSelect:()=>h(a,!0),index:i});else{const t=H.tableSchema.findAttributeByName(e);r=(0,I.jsx)(c.default,O(O({},H),{},{filterDefaults:k,table:H.table,appModel:U,drilldownColumn:e,rows:[a],attribute:t,tableSchema:H.tableSchema,groupAggregate:H.groupAggregate,selectionMode:H.selectionMode,index:i,onTap:()=>h(a,!1)}))}return(0,I.jsx)("div",{style:(0,y.convertToRtlWhenNecessary)(n),children:r},o)}})});return(0,I.jsx)(w.EmulatorComponentWrapper,{dataVFEValues:{root:V,table:null!==(E=null===(R=H.table)||void 0===R?void 0:R.name())&&void 0!==E?E:void 0,control:null!=B?B:void 0},containerStyles:{height:"100%"},children:(0,I.jsxs)("div",{"data-testid":X,style:(0,y.convertToRtlWhenNecessary)(Object.assign({display:"flex",flexDirection:"column"},!F&&{position:"absolute",inset:0})),children:[(0,I.jsx)(m.DrilldownViewHeader,{isInline:M,groupBy:H.groupBy||[],controlGroupBy:H.controlGroupBy||[],filterDefaultsForDrilldownHistory:H.filterDefaultsForDrilldownHistory||[],tableSchema:H.tableSchema}),Z,F?ee(W):(0,I.jsx)(S.FlexSizeWrapper,{children:ee}),ee]})})}return(0,I.jsx)(w.EmulatorComponentWrapper,{dataVFEValues:{root:V,table:null!==(i=null===(t=H.table)||void 0===t?void 0:t.name())&&void 0!==i?i:void 0,control:null!=B?B:void 0},containerStyles:{height:"100%"},children:(0,I.jsxs)("div",{"data-testid":X,style:(0,y.convertToRtlWhenNecessary)(Object.assign({display:"flex",flexDirection:"column"},!F&&{position:"absolute",inset:0})),children:[(0,I.jsx)(m.DrilldownViewHeader,{isInline:M,groupBy:H.groupBy||[],controlGroupBy:H.controlGroupBy||[],filterDefaultsForDrilldownHistory:H.filterDefaultsForDrilldownHistory||[],tableSchema:H.tableSchema}),(0,I.jsx)("div",{style:(0,y.convertToRtlWhenNecessary)({flexGrow:1,position:"relative"}),children:_})]})})}},655505:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.DrilldownViewHeader=void 0;var n=i(667294),a=i(249492),r=o(i(401890)),s=o(i(389875)),l=o(i(386010)),d=i(14042),c=i(692479),u=i(56749),p=i(562858),h=i(155345),m=o(i(385857)),f=i(351101),g=i(580655),y=i(148521);const v=(0,a.makeStyles)((e=>({container:{display:"flex",alignItems:"center",minHeight:"".concat(h.DRILLDOWN_HEADER_ROW_HEIGHT,"px"),borderBottom:"1px solid ".concat((0,u.themeColor)("disabledInputBackground")),backgroundColor:(0,u.themeColor)("tableGroupedHeader"),padding:"0 ".concat(e.spacing(1))},labelContainer:{paddingLeft:"4px"},label:{fontSize:"0.889rem"},labelWithoutBackButton:{paddingLeft:"10px"}}))),b=Symbol("All");t.DrilldownViewHeader=e=>{var t;const{groupBy:i,filterDefaultsForDrilldownHistory:o,controlGroupBy:u,isInline:h=!1,tableSchema:w}=e,S=v(),x=(0,d.useViewStateDispatch)(),{viewStackKey:C}=(0,n.useContext)(d.ViewStackKeyContext),T=(0,f.getAppModel)(),I=()=>{const t=u.length-i.length-1,n=[...i];if(t>=0){const e=u[t];n.unshift(e)}const a=[...o],r=function(e){let{controlGroupBy:t,groupBy:i,filterDefaultsForDrilldownHistory:o}=e;var n,a;const r=t.map((e=>e.Column)),s=i.map((e=>e.Column)),l=r.findLast((e=>!s.includes(e)));return null!==(a=null===(n=o.find((e=>e.ColumnName===l)))||void 0===n?void 0:n.ColumnValue)&&void 0!==a?a:b}(e);r!==b&&a.pop(),x((0,c.mutateView)({ViewStackKey:C,ViewState:{filterDefaults:a,GroupBy:n},options:Object.assign({discardChildren:!0},!h&&{mobileTransitionType:"slide",mobileTransitionDirection:"right"})}))};(0,n.useEffect)((()=>g.backNavigation.override((()=>u.length>i.length&&(I(),!0)))),[C,o,i,u]);const R=i.length!==u.length,O=i.length?null===(t=i[0])||void 0===t?void 0:t.Column:"";let D=O;if(O&&w){const e=new m.default(T,w,void 0,void 0,void 0,void 0,{viewStackKey:C});D=w.findAttributeByName(O).displayName(e)}return(0,y.jsx)(y.Fragment,{children:(0,y.jsxs)("div",{className:S.container,children:[R&&(0,y.jsx)(r.default,{"aria-label":"back",size:"small",onClick:I,children:(0,y.jsx)(p.DirectionAwareIcon,{icon:(0,y.jsx)(s.default,{})})}),D&&"_RowNumber"!==O&&(0,y.jsx)("div",{className:(0,l.default)(S.labelContainer,{[S.labelWithoutBackButton]:!R}),children:(0,y.jsx)(a.Typography,{className:S.label,variant:"body1",children:D})})]})})}},375155:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.NavBarButtons=void 0;var n=i(667294),a=i(249492),r=o(i(285963)),s=o(i(383958)),l=o(i(480366)),d=o(i(386010)),c=i(56749),u=i(351101),p=i(698739),h=i(14042),m=i(692479),f=i(557310),g=i(29827),y=i(398171),v=i(242896),b=i(467112),w=i(778947),S=i(148521);const x=(0,a.makeStyles)((()=>({container:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},leftContentsContainer:{width:"100%",display:"flex",alignItems:"center",flexShrink:1,minWidth:0},rightContentsContainer:{flexShrink:0,display:"flex",justifyContent:"flex-end",alignItems:"center"},title:{flexGrow:1,fontSize:"0.889rem",fontWeight:"normal",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",paddingLeft:"4px"}})));t.NavBarButtons=e=>{let{tableName:t,rowIds:i,extraActionsToShow:o,usedActions:C,allowSelectionMode:T,allowQuickEditMode:I,childrenOnly:R,children:O,navControls:D,filterDefaults:N,filterExpr:j,isInline:E}=e;var A;const P=x(),{filterBarIsHidden:M,openFilterEditor:k}=(0,p.useFilterContext)(),{viewStackKey:_}=(0,n.useContext)(h.ViewStackKeyContext),B=(0,h.useReactAppSelector)(y.getAppModelHook),L=(0,h.useViewStateDispatch)(),V=(0,h.useReactAppDispatch)(),F=(0,h.useViewStateSelector)(g.getTableName),W=null!=t?t:F,H=(0,h.useViewStateSelector)(g.getViewType),U=null!==(A=(0,h.useViewStateSelector)(g.getSelectedRowIds))&&void 0!==A?A:[],G=(0,h.useViewStateSelector)(g.getInSelectionMode),z=(0,h.useViewStateSelector)(g.getInEditMode);if(!B||!W)return null;const K=[{name:(0,u.mapActionName)("Filter"),shouldShow:!R&&f.ReactRootUIConfig.isInDesktopExperience()&&!M&&!G,onClick:()=>k(),icon:(0,S.jsx)(r.default,{fontSize:"inherit"})},{name:(0,u.mapActionName)("Select Items"),shouldShow:!(R||!T||G),onClick:()=>L((0,m.mutateView)({ViewState:{selected:G?void 0:[]}})),icon:(0,S.jsx)(s.default,{})},{name:(0,u.mapActionName)("Enable Edits"),shouldShow:!(!I||G||!_||E),onClick:()=>V((0,v.startEditMode)(_)),icon:(0,S.jsx)("i",{className:"far fa-edit"})}].filter((e=>{let{shouldShow:t}=e;return!!t}));if(f.ReactRootUIConfig.isInDesktopExperience())return(0,S.jsx)(c.ASThemeProvider,{children:(0,S.jsxs)("div",{className:(0,d.default)(P.rightContentsContainer),children:[null==D?void 0:D.left,(0,S.jsx)(b.TemplateDefinedAndOverflowActionButtons,{tableName:t,rowIds:i,extraActionsToShow:o,usedActions:C,filterDefaults:N,filterExpr:j,shouldShowDividerOnDesktop:K.length>0||!!O,childrenOnly:!!R}),null==D?void 0:D.right,K.map((e=>{let{name:t,onClick:i,icon:o}=e;return(0,S.jsx)(w.NavBarIconButton,{"aria-label":t,onClick:i,children:o},t)})),O]},"nav-bar-right-side")});{const e=(0,S.jsxs)("div",{className:(0,d.default)(P.rightContentsContainer),children:[(0,S.jsx)(b.TemplateDefinedAndOverflowActionButtons,{tableName:t,rowIds:i,extraActionsToShow:o,usedActions:C,filterDefaults:N,filterExpr:j,defaultActionDefinitions:K,childrenOnly:!!R}),O]},"nav-bar-right-side");let n;return n=z&&("table"===H||"gantt"===H)?(0,S.jsx)(w.NavBarIconButton,{"aria-label":(0,u.mapActionName)("Cancel quick edit"),onClick:()=>L((0,m.mutateView)({ViewState:{isInEditMode:!1}})),children:(0,S.jsx)(l.default,{})}):G?(0,S.jsxs)("div",{className:P.container,children:[(0,S.jsx)("div",{className:P.leftContentsContainer,children:G&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(w.NavBarIconButton,{"aria-label":(0,u.mapActionName)("Cancel Selection"),onClick:()=>L((0,m.mutateView)({ViewState:{selected:G?void 0:[]}})),children:(0,S.jsx)(l.default,{})}),(0,S.jsx)(a.Typography,{variant:"h6",color:"inherit",className:P.title,children:"".concat(U.length," ").concat((0,u.mapActionName)("Selected"))})]})}),e]}):e,(0,S.jsx)(c.ASThemeProvider,{header:f.ReactRootUIConfig.isInMobileExperience(),children:n})}}},519396:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.isTemplateDefinedActionDefinition=t.OverflowActionsEllipsisMenu=void 0;var n=i(249492),a=i(695386),r=o(i(386010)),s=i(56749),l=i(557310),d=i(750311),c=o(i(571524)),u=i(148521);const p=(0,a.makeStyles)((e=>({popupMenuItem:{fontSize:"0.778rem",color:(0,s.themeColor)("secondaryText"),display:"flex",alignItems:"center",padding:e.spacing(1,2)},popupMenuItemIcon:{fontSize:"1rem",color:(0,s.themeColor)("minorText"),marginRight:e.spacing(2)},contextMenuItemIcon:{marginRight:"10px"}}))),h=e=>"action"in e;t.isTemplateDefinedActionDefinition=h;t.OverflowActionsEllipsisMenu=e=>{let{ellipsisMenuActionDefinitions:t,popupMenuAnchor:i,onPopupMenuClose:o}=e;const a=p(),m=c.default.IsMobileBrowser()||c.default.InMobileWebView()||c.default.IsEditorIFramePreview();if(l.ReactRootUIConfig.isInMobileExperience()&&m){const e=t.map((e=>({id:e.name,icon:h(e)?(0,u.jsx)("i",{className:"".concat(a.popupMenuItemIcon," ").concat(e.icon)}):e.icon,displayText:e.name,onClick:e.onClick})));return(0,u.jsx)(s.ASThemeProvider,{children:(0,u.jsx)(d.MobileBottomSheet,{open:Boolean(i),onClose:o,listItemContents:e})})}return(0,u.jsx)(s.ASThemeProvider,{children:(0,u.jsx)(n.Menu,{anchorEl:i,open:Boolean(i),onClose:o,getContentAnchorEl:null,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},elevation:3,keepMounted:!0,children:t.map((e=>(0,u.jsxs)(n.MenuItem,{className:a.popupMenuItem,onClick:e.onClick,children:[h(e)?(0,u.jsx)("i",{className:"".concat(a.popupMenuItemIcon," ").concat(e.icon)}):(0,u.jsx)("div",{className:(0,r.default)(a.popupMenuItemIcon,a.contextMenuItemIcon),children:e.icon}),e.name]},e.name)))},"_popupMenu")})}},467112:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.TemplateDefinedAndOverflowActionButtons=void 0;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=I(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}(i(667294)),a=i(695386),r=i(56749),s=o(i(454852)),l=i(351101),d=i(700386),c=o(i(962553)),u=i(14042),p=i(692479),h=i(557310),m=i(29827),f=i(398171),g=o(i(386010)),y=i(664583),v=o(i(819433)),b=o(i(385857)),w=i(778947),S=i(519396),x=i(302873),C=i(901545),T=i(148521);function I(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(I=function(e){return e?i:t})(e)}const R=[s.default.DISPLAY_OVERLAY,s.default.DISPLAY_PROMINENTLY],O=[s.default.DISPLAY_OVERLAY,s.default.DISPLAY_PROMINENTLY,s.default.DISPLAY_INLINE];function D(e,t,i,o,n){let a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];const r=(0,l.getAppModel)(),{table:s}=c.default.findByName(t,r),d="navbar",u=e=>{let{actionModifiedData:t,actionNavigatedApp:i}=e;(t||i)&&(0,v.default)().dispatch((0,p.mutateView)({ViewStackKey:o,ViewState:{selected:void 0}}))};i&&i.length>1?(0,y.runAppAction)(e,{appModel:r,sourceLocationName:d,rowIds:i,sourceTable:null!=s?s:void 0,defaultValues:n},u,o):i&&1===i.length?(0,y.runAppAction)(e,{appModel:r,sourceLocationName:d,rowId:i[0],sourceTable:null!=s?s:void 0,defaultValues:n},a?u:void 0,o):(0,y.runAppAction)(e,{appModel:r,sourceLocationName:d,sourceTable:null!=s?s:void 0,defaultValues:n},void 0,o)}const N=(0,a.makeStyles)((e=>({primaryButtonIcon:{"& > *:first-child":{fontSize:"0.778rem"}},primaryInnerLabel:{whiteSpace:"nowrap",maxWidth:"80px",textOverflow:"ellipsis",overflowX:"hidden"},secondaryButton:{padding:e.spacing(1)},desktopSecondaryButton:{color:(0,r.themeColor)("themeTextColor"),borderRadius:"3px",marginRight:e.spacing(1),border:"1px solid ".concat((0,r.themeColor)("mainBorderColor"))},iconButton:{fontSize:"inherit",padding:e.spacing(.875),boxSizing:"content-box",width:"1em",height:"1em","& i":{fontWeight:500}}}))),j=e=>{const t=h.ReactRootUIConfig.isInDesktopExperience()?4:2,i=e.length>t?t-1:t;return{iconButtonActionDefinitions:e.slice(0,i),ellipsisMenuActionDefinitions:e.slice(i)}};t.TemplateDefinedAndOverflowActionButtons=e=>{let{tableName:t,rowIds:i,extraActionsToShow:o=[],usedActions:a,filterDefaults:r,filterExpr:l,shouldShowDividerOnDesktop:c,defaultActionDefinitions:p=[],childrenOnly:y}=e;var v;const I=N(),{viewStackKey:E}=(0,n.useContext)(u.ViewStackKeyContext),A=(0,u.useReactAppSelector)(f.getAppModelHook),P=(0,u.useViewStateSelector)(m.getSelectedRowIds),M=(0,u.useViewStateSelector)(m.getInSelectionMode),k=(0,u.useViewStateSelector)(m.getTableName),_=(0,u.useViewStateSelector)(m.getViewType),B=(0,u.useViewStateSelector)(m.getMutableState),L=(0,u.useDataContext)(),[V,F]=n.default.useState(null),W=null!=i?i:P,H=null!=t?t:k;if(!A||!H)return null;const U=b.default.getLookupValues(r,l),G=()=>{F(null)},z=function(e,t,i,o){if(o&&(!i||0===i.length))return[];let n;n=i?(0,x.getRowScopeActions)(e,i,t,o):(0,x.getTableScopeActions)({tableName:e,dataContext:t});const a=o?O:R;return n.map((e=>({action:e,order:a.indexOf(e.prominence())}))).filter((e=>{let{order:t,action:i}=e;return-1!==t&&(o||i.prominence()===s.default.DISPLAY_OVERLAY||i.prominence()===s.default.DISPLAY_PROMINENTLY||"DELETE_RECORD"===i.type()||i.isAutoCreated())})).sort(((e,t)=>e.order-t.order)).map((e=>{let{action:t}=e;return t}))}(H,L,W,M).filter((e=>!o.includes(e))),K=[...z,...o].filter((e=>!(null==a?void 0:a.includes(e)))),{table:Y,tableSchema:q}=(null==A?void 0:A.findTableCollection(H))||{};let X=null;if("detail"===_){const e=(null==B?void 0:B.RowKey)||((null==W?void 0:W.length)?W[0]:void 0);X=null===(v=null==Y?void 0:Y.lookupTableRow(e))||void 0===v?void 0:v.values}const Q=y?[]:K.map((e=>({name:e.displayName(A,q,X),shouldShow:!0,onClick:()=>((e,t)=>{D(e,H,W,E,t,M),G()})(e,U),icon:e.getFA5CompatibleIcon(),action:e}
1))),[$,...Z]=Q,{iconButtonActionDefinitions:J,ellipsisMenuActionDefinitions:ee}=h.ReactRootUIConfig.isInDesktopExperience()?j(Z):j([...p,...Q]),te=J.map((e=>{const{name:t,icon:i,onClick:o}=e;return(0,T.jsx)(w.NavBarIconButton,{id:(0,S.isTemplateDefinedActionDefinition)(e)?"navbar-".concat(e.action.table(),"-").concat(t):"navbar-".concat(t),"aria-label":t,classes:{root:(0,g.default)(I.secondaryButton,{[I.desktopSecondaryButton]:h.ReactRootUIConfig.isInDesktopExperience()})},onClick:o,children:(0,S.isTemplateDefinedActionDefinition)(e)?(0,T.jsx)("i",{className:i}):e.icon},"action_".concat(t))})),ie=ee.length>0&&(0,T.jsx)(w.NavBarIconButton,{onClick:e=>{F(e.currentTarget)},"aria-label":A.MapActionName("More Actions"),children:(0,T.jsx)("i",{className:"fa fa-ellipsis-v"})},"_popupMenuButton");if(h.ReactRootUIConfig.isInMobileExperience())return(0,T.jsxs)(T.Fragment,{children:[te,ie,(0,T.jsx)(S.OverflowActionsEllipsisMenu,{ellipsisMenuActionDefinitions:ee,popupMenuAnchor:V,onPopupMenuClose:G})]});{const e=$&&(0,T.jsx)(C.UpperCamelCaseButton,{variant:"contained",color:"primary",className:"navbar-primary-button","aria-label":$.name,classes:{startIcon:I.primaryButtonIcon},onClick:()=>D($.action,H,W,E,U,M),startIcon:(0,T.jsx)("i",{className:$.icon}),children:(0,T.jsx)(d.ASTooltip,{arrow:!0,placement:"bottom",title:$.name,children:(0,T.jsx)("div",{className:I.primaryInnerLabel,children:$.name})},"action_".concat($.name))},"primaryAction");return(0,T.jsxs)(T.Fragment,{children:[ie,te.reverse(),e,c&&(!!te.length||e)&&(0,T.jsx)(w.NavBarDivider,{}),(0,T.jsx)(S.OverflowActionsEllipsisMenu,{ellipsisMenuActionDefinitions:ee,popupMenuAnchor:V,onPopupMenuClose:G})]})}}},618583:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.AbsoluteSizeWrapper=function(e){let{className:t,children:i}=e;const o=n.default.useRef(null),{height:a,width:l}=d(o);let c=null;l&&a&&(c=i(l,a));return(0,s.jsx)("div",{ref:o,style:(0,r.convertToRtlWhenNecessary)({position:"absolute",inset:0}),className:t,children:c})},t.ContentSizeWrapper=function(e){let{className:t,children:i}=e;const o=n.default.useRef(null),{height:a,width:l}=d(o),c=i(l,a);return(0,s.jsx)("div",{ref:o,style:(0,r.convertToRtlWhenNecessary)({flex:"1 1 0",overflow:"hidden",position:"relative"}),className:t,children:c})},t.FlexSizeWrapper=c,t.default=void 0,t.useComponentSize=d;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=l(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}(i(667294)),a=o(i(815369)),r=i(278965),s=i(148521);function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(l=function(e){return e?i:t})(e)}
1function d(e,t,i){const[o,r]=(0,n.useState)(t),[s,l]=(0,n.useState)(i);return(0,n.useLayoutEffect)((()=>{e.current&&(l(e.current.offsetHeight),r(e.current.offsetWidth))}),[e]),(0,a.default)(e,(e=>{r(e.contentRect.width),l(e.contentRect.height)})),{height:s,width:o}}function c(e){let{className:t,children:i}=e;const o=n.default.useRef(null),{height:a,width:l}=d(o);let c=null;return l&&a&&(c=(0,s.jsx)("div",{style:(0,r.convertToRtlWhenNecessary)({position:"absolute",inset:0}),children:i(l,a)})),(0,s.jsx)("div",{ref:o,style:(0,r.convertToRtlWhenNecessary)({flex:"1 1 0",overflow:"hidden",position:"relative"}),className:t,children:c})}t.default=c},725592:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queryShouldShow=t.queryExpressionAndLocalize=t.queryExpression=void 0;var o=i(778264);t.queryExpression=(0,o.makeQuery)("queryExpression",((e,t)=>e.run(t))),t.queryExpressionAndLocalize=(0,o.makeQuery)("queryAndLocalizeExpression",((e,t)=>e.runAndLocalize(t))),t.queryShouldShow=(0,o.makeQuery)("queryShouldShow",(e=>{let{attribute:t,table:i,rowId:o,viewStackKey:n,transaction:a}=e;const r=t.showIfEvalTree();if(r){const e=i.lookupTableRow(o,a);if(e){const t=e.dataContext.augmentWith(n,a);return Boolean(r.run(t))}}return!t.isHidden()}))},93089:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queryDynamicFormEntryPropsForAttributes=t.queryDynamicFormEntryProps=void 0;var o=i(778264);t.queryDynamicFormEntryProps=(0,o.makeQuery)("formPage.queryDynamicFormEntryProps",n),t.queryDynamicFormEntryPropsForAttributes=(0,o.makeQuery)("formPage.queryDynamicFormEntryProps",(e=>{let{rowState:t,attributes:i,viewStackKey:o,transaction:a}=e;return i.map((e=>Object.assign({attribute:e},n({attribute:e,rowState:t,viewStackKey:o,transaction:a}))))}));function n(e){let{rowState:t,attribute:i,viewStackKey:o,transaction:n}=e;var a;if(t){const e=null===(a=null==n?void 0:n.refCycleErrorState)||void 0===a?void 0:a.isInvalid(t.table.rootName(),t.id,i.name());return{hidden:t.isHidden(i,o),valid:t.isValid(i,o)&&!e,required:t.isRequired(i,o),editable:t.isEditable(i,o),validOptions:t.validOptions(i,o),suggestedValues:t.suggestedValues(i,o),showContent:t.showContent(i,o),displayName:t.displayName(i,o),description:t.description(i,o),baseImage:t.baseImage(i,o)}}return{hidden:!1,valid:!0,required:!1,editable:!1,validOptions:null,suggestedValues:null,showContent:null,displayName:null,description:null,baseImage:""}}},805583:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queryPagingPresentationInfo=t.queryNextPage=void 0;var o=i(778264);t.queryPagingPresentationInfo=(0,o.makeQuery)("formView.queryPagingPresentationInfo",(e=>{let{paging:t,rowState:i,viewStackKey:o}=e;var n,a,r;const s=null!==(n=null==t?void 0:t.formPageCount)&&void 0!==n?n:1,l=[];for(let e=1;e<=s;e++){const n=null===(a=null==t?void 0:t.attributesOnPage(e))||void 0===a?void 0:a[0];if(!n)continue;let s="Page ".concat(e),d=!1;i&&(null==n?void 0:n.isPageHeader())&&(s=null!==(r=i.showContent(n,o))&&void 0!==r?r:s,d=i.isHiddenPage(n,o)),l.push({title:s,isHiddenPage:d,pageNum:e})}return l})),t.queryNextPage=(0,o.makeQuery)("formView.queryNextPage",(e=>{let{currentPageNum:t,paging:i,rowState:o,viewStackKey:n}=e;if(i){const e=i.formPageCount;let a;for(let r=t+1;r<=e;r++)if(a=i.attributesOnPage(r)[0],o&&!o.isHiddenPage(a,n))return r}return null}))},511448:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queryTableRowColumnFormatting=t.queryGetFormatting=void 0;var o=i(778264);t.queryTableRowColumnFormatting=(0,o.makeQuery)("queryColumnFormatting",((e,t,i)=>e.getColumnFormatting(t,i))),t.queryGetFormatting=(0,o.makeQuery)("queryGetFormatting",(e=>{let{allRules:t,tableOrSlice:i,column:o,rowKey:n,dataContext:a}=e;return t.getFormatting({tableOrSlice:i,column:o,rowKey:n,dataContext:a})}))},778264:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.makeQuery=function(e,t){return function(){for(var i=arguments.length,o=new Array(i),n=0;n<i;n++)o[n]=arguments[n];const r=()=>t(...o),s=u(r,e,o);return{syncFn:r,asyncFn:s,queryOptions:(0,a.queryOptions)({queryFn:s,queryKey:[e,...c(o)]})}}};
1var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=s(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}(i(593186)),a=i(730295),r=o(i(66604));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(s=function(e){return e?i:t})(e)}var l=function(e,t,i,o){return new(i||(i=Promise))((function(n,a){function r(e){try{l(o.next(e))}catch(e){a(e)}}function s(e){try{l(o.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,s)}l((o=o.apply(e,t||[])).next())}))};const d=e=>Array.isArray(e)?e.map(d):null!=e&&"object"==typeof e?"queryKey"in e?d(e.queryKey):(0,r.default)(e,d):e,c=e=>e.map(d),u=(e,t,i)=>()=>l(void 0,void 0,void 0,(function*(){yield new Promise((e=>setTimeout(e,n.default.Debug()?500*Math.random()+1e3:0)));const o=e();return(0,n.logToDevConsole)(t,"resolved",o,"for",i),o}))},730295:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queryOptions=function(e){return e}},674061:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queryRowValuesGroupBy=void 0;var o=i(778264);t.queryRowValuesGroupBy=(0,o.makeQuery)("queryRowValuesGroupBy",((e,t,i)=>e.queryRowValuesGroupBy(t,void 0,i)))},521671:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.findExistingViewInViewStack=void 0;var n=i(692479),a=o(i(819433)),r=i(29827);t.findExistingViewInViewStack=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;const s=(0,r.selectViewStack)((0,a.default)().getState()),l=null==e?void 0:e.FindControlsForTable(t,i)[0];return s.slice(0,o).find((e=>{const t=e.identifier;return(0,n.isViewIdentifierEqual)(t,{Type:"Control",Name:(null==l?void 0:l.Name)||""})}))}},995090:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setSelectedTabIndex=t.setInteractiveRowState=void 0;var o=i(692479),n=i(397930);const a=(e,t)=>i=>{i((0,o.mutateView)({ViewStackKey:e,ViewState:t}))};t.setSelectedTabIndex=(0,n.checkForUnsavedChanges)(((e,t)=>a(e,{selectedTabIndex:t}))),t.setInteractiveRowState=(0,n.checkForUnsavedChanges)(((e,t)=>{let{selectedRowIds:i,tableSelectionHistory:o}=t;return a(e,{selectedRowIds:i,tableSelectionHistory:o})}))},733366:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.runAppActionThunk=void 0;var n=o(i(606610)),a=i(397930);t.runAppActionThunk=(0,a.checkForUnsavedChanges)((function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return()=>{n.default.run(...t)}}))},747950:(e,t)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.updateScenarioWithMetadata=t.trackEditorEventReduxAction=t.startScenario=t.loggingActionTypes=t.endScenarioWithComponent=t.endAllScenariosOfType=void 0,function(e){e.END_ALL_SCENARIOS_OF_TYPE="END_ALL_SCENARIOS_OF_TYPE",e.END_SCENARIO_WITH_COMPONENT="END_SCENARIO_WITH_COMPONENT",e.START_SCENARIO="START_SCENARIO",e.TRACK_EDITOR_EVENT="TRACK_EDITOR_EVENT",e.UPDATE_SCENARIO_WITH_METADATA="UPDATE_SCENARIO_WITH_METADATA"}(i||(t.loggingActionTypes=i={}));t.trackEditorEventReduxAction=e=>({type:i.TRACK_EDITOR_EVENT,args:e});t.startScenario=(e,t)=>({type:i.START_SCENARIO,scenarioName:e,metadata:t});t.endAllScenariosOfType=(e,t)=>({type:i.END_ALL_SCENARIOS_OF_TYPE,scenarioType:e,endArgs:t});t.endScenarioWithComponent=(e,t,o)=>({type:i.END_SCENARIO_WITH_COMPONENT,scenarioType:e,component:t,endArgs:o});t.updateScenarioWithMetadata=(e,t)=>({type:i.UPDATE_SCENARIO_WITH_METADATA,scenarioName:e,metadata:t})},486017:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}
1),t.setHighlightingComponent=t.selectEditorHighlighting=t.selectEditorHighlighingComponent=t.editorHighlightingReducer=t.clearHighlightingComponent=void 0;var o=i(829829),n=i(967111);const a=(0,o.createSlice)({name:"editorHighlighting",initialState:n.INITIAL_EDITOR_HIGHLIGHTING_STATE,reducers:{setHighlightingComponent(e,t){e.component=t.payload},clearHighlightingComponent(e){e.component=void 0}}}),{setHighlightingComponent:r,clearHighlightingComponent:s}=(t.editorHighlightingReducer=a.reducer,a.actions);t.clearHighlightingComponent=s,t.setHighlightingComponent=r;t.selectEditorHighlighting=e=>{let{editorHighlighting:t}=e;return t};t.selectEditorHighlighingComponent=e=>{let{editorHighlighting:t}=e;return t.component}},219078:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectReadOnly=t.readOnly=void 0;t.readOnly=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;return"SET_READ_ONLY"===t.type?t.readOnly:Boolean(e)};t.selectReadOnly=e=>e.readOnly},916230:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.gunScanKeyupListener=t.checkFlushKeys=t.SwipeElement=t.InputHandlerClass=t.FastClick=t.CloseModal=void 0,t.initializeInputHandler=function(){JeeneeNamespace.gunScanKeyupListener=m,JeeneeNamespace.checkFlushKeys=f,JeeneeNamespace.InputHandler=g};var n=o(i(496486)),a=o(i(571524)),r=o(i(112368)),s=o(i(593186)),l=o(i(365914)),d=i(318926),c=i(218546),u=i(892148),p=i(263198),h=i(166089);let m=t.gunScanKeyupListener=void 0,f=t.checkFlushKeys=void 0,g=t.InputHandlerClass=void 0;t.gunScanKeyupListener=m=function(e){const t=window.InputHandler;try{if(e.key.length>2)return;t.lastKeyupActiveElement=document.activeElement,t.gunScanHistory=[],t.queuedKeys.push(e.key),f()}catch(e){const t=n.default.isError(e)?": "+e.message:"";s.default.warnToDevConsole("Error in keyUp handler for external scanner"+t)}},t.checkFlushKeys=f=n.default.debounce((function(){var e;const t=window.InputHandler,i=t.queuedKeys;if(i.length>=4){const t=i.join("").toLowerCase(),o=(null===(e=h.AppGlobals.ViewManager.CurrentHandler())||void 0===e?void 0:e.Filter)&&!h.AppGlobals.AppModel.AppTemplate.Presentation.HideSystemButtons;document.activeElement&&!n.default.includes(["input","textarea","select"],document.activeElement.tagName.toLowerCase())&&(o?StateReflector.SetSearch(t):$(JeeneeNamespace).trigger("hw-barcode-scan",t))}t.gunScanHistory=[{timestamp:new Date,value:i.join("")}],t.gunScanCallbacks.forEach((function(e){e(t.gunScanHistory[0])})),t.gunScanCallbacks=[],t.queuedKeys=[]}),50);const y=function(e,t,i){this.$selectorRoot=e,this.selector=t,this.handler=i,this.hasStarted=!1;const o=this;a.default.IsTouchEnabled()?e.on("touchstart.appsheet",t,o,this.handleEvent):e.on("click.appsheet",t,o,this.handleEvent)};t.FastClick=y,y.prototype.handleEvent=function(e){const t=e.data;switch(e.type){case"touchstart":t.onTouchStart(e,$(this));break;case"touchmove":t.onTouchMove(e,$(this));break;case"touchend":case"click":t.onClick(e,$(this))}},y.prototype.onTouchStart=function(e,t){const i=e.data;i.hasStarted=!0,this.$el=t,this.$selectorRoot.on("touchend.appsheet",this.selector,i,this.handleEvent),$("body").on("touchmove.appsheet",i,this.handleEvent),this.$el.addClass("fc-active"),null!=e&&null!=e.originalEvent&&null!=e.originalEvent.touches&&null!=e.originalEvent.touches[0]?(i.startX=e.originalEvent.touches[0].clientX,i.startY=e.originalEvent.touches[0].clientY):null!=e&&null!=e.originalEvent&&null!=e.originalEvent.changedTouches&&null!=e.originalEvent.changedTouches[0]&&(i.startX=e.originalEvent.changedTouches[0].clientX,i.startY=e.originalEvent.changedTouches[0].clientY)},y.prototype.onTouchMove=function(e){const t=e.data;null!=e&&null!=e.originalEvent&&null!=e.originalEvent.touches&&null!=e.originalEvent.touches[0]?(Math.abs(e.originalEvent.touches[0].clientX-t.startX)>10||Math.abs(e.originalEvent.touches[0].clientY-t.startY)>10)&&t.reset():null!=e&&null!=e.originalEvent&&null!=e.originalEvent.changedTouches&&null!=e.originalEvent.changedTouches[0]&&(Math.abs(e.originalEvent.changedTouches[0].clientX-t.startX)>10||Math.abs(e.originalEvent.changedTouches[0].clientY-t.startY)>10)&&t.reset()},y.prototype.onClick=function(e,t){const i=e.data;a.default.IsTouchEnabled()?this.hasStarted&&(i.reset(),i.runHandler(e,t)):i.runHandler(e,t)},y.prototype.reset=function(){this.hasStarted=!1,this.$selectorRoot.off("touchend.appsheet",this.selector),$("body").off("touchmove.appsheet",this.handleEvent),this.$el.removeClass("fc-active")},y.prototype.runHandler=function(e,t){this.isDisabled||(this.handler(e,t),this.isDisabled=!0,setTimeout(function(){this.isDisabled=!1}.bind(this),100))},$.fn.onFastClick=function(e,t){return new y(this,e,t),this};const v=function(e,t){if((e=e||$("#InfoPage.ActivePage .InfoScreen:visible")).length){"function"==typeof t?t():StateReflector.ShowUIState(!0);const i=e.data("OnClose");"function"==typeof i&&i(),setTimeout((function(){h.AppGlobals.ViewManager.HideInfoPage((function(){e.hide()}))}),100)}else"function"==typeof t&&t()};t.CloseModal=v;const b=function(e){this.$selectorRoot=e.$selectorRoot,this.selector=e.selector,this.denylist=e.denylist,this.leftSwipeHandler=e.leftSwipeHandler,this.rightSwipeHandler=e.rightSwipeHandler,this.noSwipeHandler=e.noSwipeHandler,this.suppressVerticalScroll=!1,this.suppressHorizontalScroll=!1;const t=this;a.default.IsTouchEnabled()&&e.$selectorRoot.on("touchstart.appsheetswipe",e.selector,t,this.handleEvent)};t.SwipeElement=b,b.prototype.handleEvent=function(e){const t=e.data;switch(e.type){case"touchstart":t.onTouchStart(e,$(this));break;case"touchmove":t.onTouchMove(e,$(this));break;case"touchend":t.onTouchEnd(e,$(this))}},b.prototype.onTouchStart=function(e){const t=e.data;if(this.denylist){let t=e.target;do{if($(t).is(this.denylist))return}while(t=t.parentElement)}t.suppressVerticalScroll=!1,t.suppressHorizontalScroll=!1,$("body").on("touchend.appsheetswipe",t,this.handleEvent),$("body").on("touchmove.appsheetswipe",t,this.handleEvent),null!=e&&null!=e.originalEvent&&null!=e.originalEvent.touches&&null!=e.originalEvent.touches[0]?(t.
1startX=e.originalEvent.touches[0].clientX,t.startY=e.originalEvent.touches[0].clientY):null!=e&&null!=e.originalEvent&&null!=e.originalEvent.changedTouches&&null!=e.originalEvent.changedTouches[0]&&(t.startX=e.originalEvent.changedTouches[0].clientX,t.startY=e.originalEvent.changedTouches[0].clientY)},b.prototype.onTouchMove=function(e){const t=e.data;if(t.suppressHorizontalScroll)return;if(t.suppressVerticalScroll)return void e.preventDefault();let i=0,o=0;return null!=e&&null!=e.originalEvent&&null!=e.originalEvent.touches&&null!=e.originalEvent.touches[0]?(i=e.originalEvent.touches[0].clientX-t.startX,o=e.originalEvent.touches[0].clientY-t.startY):null!=e&&null!=e.originalEvent&&null!=e.originalEvent.changedTouches&&null!=e.originalEvent.changedTouches[0]&&(i=e.originalEvent.changedTouches[0].clientX-t.startX,o=e.originalEvent.changedTouches[0].clientY-t.startY),Math.abs(o)>10?(t.suppressHorizontalScroll=!0,void t.reset()):Math.abs(i)>10?(t.suppressVerticalScroll=!0,e.preventDefault(),void e.stopPropagation()):void 0},b.prototype.onTouchEnd=function(e,t){const i=e.data;let o=0;null!=e&&null!=e.originalEvent&&null!=e.originalEvent.touches&&null!=e.originalEvent.touches[0]?o=e.originalEvent.touches[0].clientX-i.startX:null!=e&&null!=e.originalEvent&&null!=e.originalEvent.changedTouches&&null!=e.originalEvent.changedTouches[0]&&(o=e.originalEvent.changedTouches[0].clientX-i.startX),i.reset(),!i.suppressHorizontalScroll&&o>10?(e.stopPropagation(),e.preventDefault(),i.rightSwipeHandler(e,t)):!i.suppressHorizontalScroll&&o<-10?(e.stopPropagation(),e.preventDefault(),i.leftSwipeHandler(e,t)):i.noSwipeHandler&&i.noSwipeHandler(e,t)},b.prototype.reset=function(){$("body").off("touchend.appsheetswipe",this.handleEvent),$("body").off("touchmove.appsheetswipe",this.handleEvent)},$.fn.onSwipe=function(e,t,i,o){return new b({$selectorRoot:this,selector:e,rightSwipeHandler:t,leftSwipeHandler:i,noSwipeHandler:o}),this},t.InputHandlerClass=g=function(){this.KnownHandlers={};for(let e=0;e<JeeneeNamespace.Controllers.length;e++){const t=JeeneeNamespace.Controllers[e];this.KnownHandlers[t.Name]=new t.InputHandler}},g.prototype.Initialize=function(){const e=this,t="click.appsheet";let i="click.appsheet";this.rootStateForViewType=function(e,t){const i=h.AppGlobals.AppState.KnownStates[e]||h.AppGlobals.AppState.KnownStates[h.AppGlobals.AppState.ControllerLookup[e]];return i?i.CreateRootState(t):(s.default.warnToDevConsole("rootStateForControl doesnt know what to do with view type",e),{})},this.rootStateForControl=function(t,i){i.ControlName=t.Name;const o=e.rootStateForViewType(t.Action,i);return o.ControlName=t.Name,o},(a.default.IsIOSBrowser()||a.default.IsAndroidBrowser())&&(i="click.appsheet"),this.ProcessSync=e=>
1{const{AppModel:t,AppState:i,StateChangeHandler:o,ViewManager:n}=h.AppGlobals;(t.AppTemplate.IsPublic||t.AppTemplate.IsTeamPublic)&&i.UserInformation.Id!==t.AppTemplate.OwnerId&&t.NumDelayedActions()>0?n.ShowInfoDialog(t.MapActionName("Unable to save changes"),"Template apps cannot be updated"):t.shouldBlockSync?n.ShowInfoDialog(t.MapActionName("Unable to sync"),"Sync is not allowed while app is read-only"):(null!=e||(e={initiatedBy:"PushedChanges"}),o.RefreshAppData(e))},this.ShareInfo=e=>{var t;const i=e.subject,o=e.body,r=null!==(t=e.to)&&void 0!==t?t:"[email protected]",s=n.default.trim(e.image);if(a.default.InAndroidWebView()&&!a.default.IsUnsupportedAndroidVersion())JeeneeAndroid.shareText(i,o);else if(a.default.InIOSWebView())p.JeeneeBrowserAPI.shareIOS(encodeURIComponent(o),"",encodeURIComponent(encodeURIComponent(s)));else{const e=h.AppGlobals.AppModel.IsWhitelabelApp(),t=l.default.mailToUrl(r,i,o,e);u.WindowWrapper.openInNewTab(t)}};this.switchToUrl=function(e,t){if(!e||"function"!=typeof e.indexOf)return;const i=$("<a>").attr("href",e).get(0).href,o=i.match(/https?:\/\/(www\.)?(maps\.)?google\.com\/maps/),n=0===e.indexOf("mailto:")||0===e.indexOf("tel:")||0===e.indexOf("sms:"),s=0===e.indexOf("intent:"),l=t||o||0!==i.indexOf("http");if(a.default.InIOSWebView())if(n)u.WindowWrapper.location=e;else if(l&&r.default.IsIOSAppWithMinVersion(8.33))p.JeeneeBrowserAPI.openInNativeBrowserIOS({url:i});else{let e=encodeURIComponent(i);void 0===window.webkit&&(e=encodeURIComponent(e)),u.WindowWrapper.location="jeenee_method?TargetBlank?href="+e}else a.default.InAndroidWebView()?n||a.default.IsUnsupportedAndroidVersion()?u.WindowWrapper.location=e:s?JeeneeAndroid.externalLink(i):o&&r.default.IsAndroidAppWithMinVersion(6.3)?JeeneeAndroid.openMap(i):l&&r.default.IsAndroidAppWithMinVersion(9.73)?JeeneeAndroid.openInNativeBrowser(i):JeeneeAndroid.externalLink(i):u.WindowWrapper.openInNewTab(e)},this.handleLinkClick=function(e,t,i){i.preventDefault(),null!=t&&""!==t&&"#"!==t&&t.indexOf("#")!==t.length-1&&(0===t.indexOf("mailto:")?s.default.AddTraceContext("EmailLink"):0===t.indexOf("tel:")?s.default.AddTraceContext("PhoneLink"):0===t.indexOf("sms:")?s.default.AddTraceContext("SMSLink"):s.default.AddTraceContext("ExternalLink"),this.switchToUrl(t,e.data("launchexternal")))};$("#footer").off(".appsheet").onFastClick(".ViewChangeButton",(function(t,i){const o=i.data("control");if(s.default.AddTraceContext(".ViewChangeButton ",{control:o?o.Name:"NOT FOUND"}),d.logger.logAppEvent({eventName:c.AppEventName.ViewChangeButton}),null!=o)!i.hasClass("DisabledButton")&&(h.AppGlobals.AppState.SetActiveControl(o,e.rootStateForControl),t.preventDefault());else{const e=i.get(0),t=e?e.innerText:"(none)",o=e?e.classList:"(none)",n=i.data("table"),a=i.data("tableDefn"),r={table:n?n.Name:"(none)",tableDefn:a?a.Name:"(none)"};s.default.ReportErrorOnce({errorMessage:"View control could not be found for ViewChangeButton",innerText:t,data:JSON.stringify(r),classList:o}),alert("Unable to load the selected view, please try relaunching the app")}})).onFastClick(".MenuEntryButton",(function(t,i){const o=i.data("control");s.default.AddTraceContext(".MenuEntryButton ",{control:o?o.Name:"NOT FOUND"}),d.logger.logAppEvent({eventName:c.AppEventName.MenuEntryButton}),null!=o&&!i.hasClass("DisabledButton")&&(h.AppGlobals.AppState.SetActiveControl(o,e.rootStateForControl),t.preventDefault())})).onFastClick(".ActionButton.TableAction",(function(t,i){const o=i.data("control");s.default.AddTraceContext(".ActionButton",{control:o.Name}),d.logger.logAppEvent({eventName:c.AppEventName.ActionButton}),h.AppGlobals.AppState.SetActiveControl(o,e.rootStateForControl)})).onFastClick("#FooterBackButton",(function(e){e.stopPropagation(),s.default.AddTraceContext("#FooterBackButton"),d.logger.logAppEvent({eventName:c.AppEventName.FooterBackButton}),h.AppGlobals.AppState.ChoosePreviousState()})).onFastClick("#FooterSyncButton",(function(t){t.stopPropagation(),t.preventDefault(),s.default.AddTraceContext("#FooterSyncButton"),d.logger.logAppEvent({eventName:c.AppEventName.FooterSyncButton}),e.ProcessSync()})).onFastClick("#FooterShareButton",(function(t,i){s.default.AddTraceContext("#FooterShareButton"),d.logger.logAppEvent({eventName:c.AppEventName.FooterShareButton}),!i.hasClass("DisabledButton")&&(e.ShareInfo(h.AppGlobals.ViewManager.ConstructShareInfo(h.AppGlobals.AppModel.AppTemplate)),t.preventDefault(),t.stopImmediatePropagation())})),$("#FooterPopup").off(".appsheet"),function(){$(document).off(".appsheet").on("keydown.appsheet",".modal",(function(e){e.stopPropagation()})),e.queuedKeys=[],e.gunScanHistory=[],e.gunScanCallbacks=[],document.body.addEventListener("keyup",m,!1),$(document).on(t,"a",(function(t){t.stopImmediatePropagation();const i=t.currentTarget.href,o=$(t.currentTarget);e.handleLinkClick(o,i,t)}));const i=$("#LaunchScreen");$("#InfoPage .InfoScreen").off(".appsheet").onFastClick(".OKButton",(function(e,t){e.stopPropagation();const i=t.closest(".InfoScreen");v(i)}
1)),i.onFastClick(".CancelButton",(function(e,t){e.stopPropagation(),s.default.AddTraceContext("#LoadDialog #CancelButton"),d.logger.logAppEvent({eventName:c.AppEventName.LoadDialogCancelButton});const o=t.data("cancelButtonHandler");"function"==typeof o&&o(),StateReflector.ShowUIState(!0),setTimeout((function(){h.AppGlobals.AppModel.InASyncCall||h.AppGlobals.ViewManager.HideInfoPage((function(){i.hide()}))}),100)}))}();for(const e in this.KnownHandlers){const o=this.KnownHandlers[e];"function"==typeof o.Init&&o.Init(t,i)}window.addEventListener("resize",n.default.debounce((function(){var e,t;if($("canvas.resizable").each((function(){Common.rescaleCanvas(this)})),null===(t=null===(e=document.activeElement)||void 0===e?void 0:e.tagName)||void 0===t?void 0:t.toLowerCase){const e=document.activeElement.tagName.toLowerCase();"input"!==e&&"textarea"!==e&&"select"!==e||window.setTimeout((function(){const e=$(document.activeElement),t=e.offset().top,i=$(".AppHeader").outerHeight()+30-t,o=t+e.outerHeight()-($(window).height()-70),n=i>0;if(n||o>0){const t=n?-i:o,a=e.parents().get();let r;for(;(r=a.pop())&&!(r&&r.scrollHeight>$(r).innerHeight()););$(r).scrollTop($(r).scrollTop()+t)}}),0)}}),200))},g.prototype.LogoutLogic=function(){window.InputHandler.CheckUnload((function(){h.AppGlobals.AppModel.ClearLocalState(),h.AppGlobals.AppState.SwitchToLoginPage(null,"Input handler logoutlogic method",h.AppGlobals.AppState.AppTemplate.Id)}))},g.prototype.CheckUnload=function(e){h.AppGlobals.AppModel.NumDelayedActions()+h.AppGlobals.AppModel.NumProcessingActions()>0?h.AppGlobals.ViewManager.ShowConfirmDialog(e):e()}},797193:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=class{constructor(){this.recognition=null,window.webkitSpeechRecognition&&(this.recognition=new window.webkitSpeechRecognition)}start(){return new Promise(((e,t)=>{this.recognition||e(""),this.recognition.onresult=t=>{let i,o;for(i=t.resultIndex;i<t.results.length;++i)if(t.results[i].isFinal){const e=t.results[i][0].transcript;o=o?o+"\n"+e:e}this.started=!1,e(o)},this.recognition.onerror=()=>{this.started=!1,t("")},this.started=!0,this.recognition.start()}))}stop(){this.recognition&&(this.recognition.stop(),this.started=!1)}}},656912:(e,t)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ChartOption=void 0,function(e){e.AggregateDonutChart="Aggregate DonutChart",e.AggregateNumber="Aggregate Number",e.AggregatePieChart="Aggregate PieChart",e.Col="Col Series",e.ColLine="Col Series [Line]",e.ColStacked="Col Series [Stack]",e.DonutChart="DonutChart",e.Histogram="Histogram",e.HorizontalHistogram="Horizontal Histogram",e.PieChart="PieChart",e.Row="Row Series",e.RowLine="Row Series [Line]",e.RowStacked="Row Series [Stack]",e.Scatter="Scatter Plot"}(i||(t.ChartOption=i={}))},408077:(e,t)=>{"use strict";function i(e,t){if("number"!=typeof e||"number"!=typeof t)return 1;for(e=Math.abs(e),t=Math.abs(t);t;){const i=t;t=e%t,e=i}return e}function o(e){if(!e||!e.length||e.length<2)return 1;let t=e[0];for(let o=1;o<e.length;o++){t=i(t,e[o])}return t}Object.defineProperty(t,"__esModule",{value:!0}),t.gcd=o,t.gcdOfTwo=i,t.getContinuousDomain=function(e){const t=(e=e.sort(((e,t)=>e-t)))[0],i=e[e.length-1];if(t===i)return null;const n=o(e);if(0===n||(i-t)/n>1e3)return null;const a=[];for(let e=t;e<=i;e+=n)a.push(e);if(a.length<e.length)return null;return a}},874940:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.checkForDeprecatedDriveMedia=function(e,t){s.test(e)&&r.default.ReportErrorOnce({errorMessage:"Found deprecated drive-hosted image (".concat(t,")"),text:e})};var n,a=o(i(459400)),r=o(i(593186));const s=new RegExp(String.raw(n||(n=(0,a.default)(["https://drive.google.com/uc?"]))))},303622:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.EmulatorComponentWrapper=void 0;var n=o(i(238416)),a=i(667294),r=i(249492),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=w(t);if(i&&i.has(e))return i.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=n?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(o,a,r):o[a]=e[a]}return o.default=e,i&&i.set(e,o),o}(i(496486)),l=o(i(386010)),d=i(314500),c=i(41389),u=i(646514),p=i(160647),h=o(i(593186)),m=o(i(890468)),f=i(747788),g=i(391228),y=i(779467),v=i(44617),b=i(148521);function w(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(w=function(e){return e?i:t})(e)}function S(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function x(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};
1t%2?S(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):S(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}const C=new Set(["form"]);let T=!1;try{new IntersectionObserver((()=>{})),T=!0}catch(e){h.default.ReportErrorOnce({errorMessage:"IntersectionObserver constructor not defined"}),T=!1}const I=(0,r.makeStyles)({emulatorComponentWrapperContainer:{position:"relative"},useStaticPosition:{position:"static"},detailFieldPadding:{"& .emulator-component-contents-wrapper":{marginBottom:0,paddingBottom:"14px"},"&:last-of-type .emulator-component-contents-wrapper":{paddingBottom:"0"}},fabPosition:{bottom:"16px",position:"absolute",right:"18px","& > * .circle-button-fab":{position:"static"}}}),R=(0,r.makeStyles)({contentsWrapper:{height:"100%"},outline:{border:"3px solid ".concat(u.GOOGLE_BLUE_600)},relatedOutline:{border:"2px solid ".concat(u.GOOGLE_BLUE_200)},outlineDiv:{boxSizing:"border-box",borderRadius:4,position:"absolute",inset:0,pointerEvents:"none",zIndex:2e3},dashboardContentsMargin:{margin:"0 0 3px 0"},topLevelViewMargin:{margin:"0 0 1px 0"}}),O=new Set(["TableViewGroupedHeaderRowAction","DeckActionBarAction","DetailBodyAction","DetailField","TableRow"]),D=e=>{let{children:t,dataVFEValues:i,containerStyles:o,margin:n,applyStyleType:r,useStaticPosition:u=!1,containerClassName:h="",contentsClassName:y="",outlineDivClassName:w="",shouldClearHoveredElement:S=!1}=e;const D=I(),N=R(),[j,E]=(0,a.useState)(null),[A,P]=(0,a.useState)(!1),[M,k]=(0,a.useState)(!0),[_,B]=(0,a.useState)(!1),[L,V]=(0,a.useState)(!0),{dispatch:F}=(0,f.useSubscribeToEditor)([e=>E((0,p.getHoveredElement)(e)),e=>P("edit"===(0,p.getEmulatorMode)(e)),e=>k((0,g.selectIsNewEditorLayout)(e)),e=>B((0,p.getTriggerRecalculation)(e)),e=>V((0,p.getShowEditingControls)(e))]),W=(0,a.useRef)(null),{ref:H,inView:U}=(0,d.useInView)({threshold:1,fallbackInView:!0,skip:!T}),G=A&&M,z=!!(null==j?void 0:j.id)&&s.default.isEqual(j.id,i),K=()=>{if(!W||!W.current)return;if(S)return void(null!=j&&F((0,p.clearHoveredElement)()));const e=W.current,t=e.getBoundingClientRect(),o=!T||(U||"AppHeader"===(null==i?void 0:i.context)),n={id:i,loc:{top:t.top,left:t.left,width:e.clientWidth,height:e.clientHeight},showEditingControls:o},a=Object.assign(Object.assign({},j),{showEditingControls:L});(0,s.isEqual)(a,n)||(m.default.maybeLog("App Editor Link - From App","dispatch setHoveredElement",n),F((0,p.setHoveredElement)(n)))};(0,a.useEffect)((()=>{_&&z&&G&&K()}),[_]);const Y=s.default.throttle(K,200);if(!M)return(0,b.jsx)(b.Fragment,{children:t});const q=((e,t)=>{if(!t||!t.context)return!1;const i=t.context;return c.DECK_VIEW_CONTEXTS.has(i)||O.has(i)?s.default.isEqual(s.default.omit(t,["rowId"]),s.default.omit(e,["rowId"])):"MenuButton"===i?"SearchButton"===e.context:"SearchButton"===i&&"MenuButton"===e.context})(i,null==j?void 0:j.id),X=v.dynamicRollouts.includeByUserId("EditorChatPane")&&C.has((null==i?void 0:i.root)||"")?{"data-vfe-column":null==i?void 0:i.column,"data-vfe-table":null==i?void 0:i.table,"data-vfe-control":null==i?void 0:i.control,"data-vfe-root":null==i?void 0:i.root,"data-vfe-context":null==i?void 0:i.context}:{};return(0,b.jsxs)("div",{className:(0,l.default)(D.emulatorComponentWrapperContainer,{[D.useStaticPosition]:u,[D.detailFieldPadding]:"DetailField"===(null==i?void 0:i.context)&&"Show"!==(null==i?void 0:i.columnType),[D.fabPosition]:!1,[h]:!!h}),style:o,ref:W,children:[(0,b.jsx)("div",{style:{height:0},ref:H}),(0,b.jsx)("div",x(x({className:(0,l.default)("emulator-component-contents-wrapper",N.contentsWrapper,{[y]:!!y}),"data-testid":"emulator-component-contents-wrapper",onMouseOver:G?e=>{e.stopPropagation(),Y()}:void 0},X),{},{children:t})),G&&(0,b.jsx)("div",{style:{margin:n},className:(0,l.default)(N.outlineDiv,{[N.outline]:z,[N.relatedOutline]:!z&&q,[N.dashboardContentsMargin]:"dashboardContent"===r,[N.topLevelViewMargin]:"topLevelView"===r,[w]:!!w}),tabIndex:0})]})};t.EmulatorComponentWrapper=e=>{var t;const{children:i,isInteractive:o=!0}=e;if(!(0,c.isInEditingEmulator)()||!o)return(0,b.jsx)(b.Fragment,{children:i});return(null===(t=window.parent)||void 0===t?void 0:t.reduxStore)?(0,b.jsx)(y.AppErrorBoundary,{errorInfo:e.dataVFEValues,errorMessagePrefix:"ECWC",renderOnError:()=>(0,b.jsx)(b.Fragment,{children:i}),children:(0,b.jsx)(D,x({},e))}):(h.default.ReportErrorOnce({errorMessage:"Emulator Component Wrapper rendered but Editor redux store was not found"}),(0,b.jsx)(b.Fragment,{children:i}))}},347055:(e,t,i)=>{"use strict";var o=i(564836);
1Object.defineProperty(t,"__esModule",{value:!0}),t.GhostButtonComponent=t.GhostButton=void 0;var n=o(i(238416)),a=i(249492),r=i(667294),s=i(483514),l=i(700386),d=o(i(386010)),c=i(747788),u=i(41389),p=o(i(593186)),h=i(160647),m=o(i(113861)),f=i(44617),g=i(219078),y=i(56749),v=o(i(529684)),b=i(747950),w=i(391228),S=i(148521);function x(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}const C=(0,a.makeStyles)((()=>({ghost:{border:"1px dashed ".concat((0,y.themeColor)("ghostButtonText")),backgroundColor:(0,y.themeColor)("ghostButtonDefaultBackground"),color:(0,y.themeColor)("ghostButtonText"),"&:hover":{border:"1px solid ".concat((0,y.themeColor)("ghostButtonText")),backgroundColor:(0,y.themeColor)("ghostButtonHoveredBackground")}},overlayFab:{fontSize:"24px",width:"56px",height:"56px"},prominentDetailView:{width:"36px",height:"36px",fontSize:"18px",margin:"10px 15px 0 15px"}}))),T=e=>{let{containerClassName:t,dataVFEValues:i}=e;const o=C(),[n,p]=(0,r.useState)(!1),[f,y]=(0,r.useState)(!0),[x,T]=(0,r.useState)(),[I,R]=(0,r.useState)(!1),{dispatch:O}=(0,c.useSubscribeToEditor)([e=>p("edit"===(0,h.getEmulatorMode)(e)),e=>y((0,w.selectIsNewEditorLayout)(e)),e=>T(m.default.current(e)),e=>R((0,g.selectReadOnly)(e))]),D=(0,r.useMemo)((()=>v.default.list(i)),[i]);if(!f||!n||I||0===D.length)return null;const N="Add Action";return(0,S.jsx)("div",{className:t,children:(0,S.jsx)(l.ASTooltip,{title:N,placement:"left",arrow:!0,children:(0,S.jsx)(a.IconButton,{className:(0,d.default)({[o.overlayFab]:"OverlayFab"===i.context,[o.prominentDetailView]:"DetailBodyAction"===i.context}),classes:{root:o.ghost},"aria-label":N,onClick:()=>{const e=D[0],t=v.default.reduxAction(e.name,i,x);t&&(O(t),O((0,b.trackEditorEventReduxAction)((0,u.getEventForEditingControlClicked)({action:e,elementIdentifier:i,readOnly:I,addLocation:"Ghost"}))))},children:(0,S.jsx)(s.BoltOutlinedIcon,{})})})})};t.GhostButtonComponent=T;t.GhostButton=e=>{var t;const i=e.dataVFEValues.root,o=f.dynamicRollouts.includeByUserId("VFEActionCreationDetailViewsExperiment")?"detail"===i||"slideshow"===i:(0,u.isAddingActionsOn)();if(!(0,u.isInEditingEmulator)()||!o)return null;return(null===(t=window.parent)||void 0===t?void 0:t.reduxStore)?(0,S.jsx)(T,function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?x(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):x(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e)):(p.default.ReportErrorOnce({errorMessage:"VFE Ghost Button rendered but Editor redux store was not found"}),null)}},529684:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(125793),n=i(408904);const a=new o.EmulatorInteractionFactory;n.EMULATOR_ADD_INTERACTIONS.forEach((e=>a.register(e)));t.default=a},408904:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addProminentWithSuggestionsInteraction=t.addOverlayWithSuggestionsInteraction=t.addOverlayCollectionViewsInteraction=t.addInlineActionInteraction=t.HIDE_ADD_COLUMN_TYPES=t.EMULATOR_ADD_INTERACTIONS=void 0;var o=i(26935),n=i(44617),a=i(483514),r=i(148521);const s=t.EMULATOR_ADD_INTERACTIONS=[],l=new Set(["detail","slideshow"]),d=t.addOverlayWithSuggestionsInteraction={name:"add_overlay_action_with_suggestions",description:"Add Action",validIf:e=>{var t;return"OverlayFab"===e.context&&!!e.table&&l.has(null!==(t=e.root)&&void 0!==t?t:"")},reduxAction:o.getOpenAddEntityModalForPrimaryActions,icon:()=>(0,r.jsx)(a.BoltOutlinedIcon,{})},c=t.addProminentWithSuggestionsInteraction={name:"add_prominent_action_with_suggestions",description:"Add Action",validIf:e=>"DetailBodyAction"===e.context&&!!e.table,reduxAction:o.getOpenAddEntityModalForProminentActions,icon:()=>(0,r.jsx)(a.BoltOutlinedIcon,{})},u=new Set(["gallery","card","calendar","deck","table","fastTable","chart","graph"]),p=t.addOverlayCollectionViewsInteraction={name:"add_overlay_action_collection_views",description:"Add Action",validIf:e=>{var t;return"OverlayFab"===e.context&&!!e.table&&u.has(null!==(t=e.root)&&void 0!==t?t:"")&&n.dynamicRollouts.includeByUserId("VFEActionCreation")},reduxAction:o.addOverlayActionForCollectionView,icon:()=>(0,r.jsx)(a.BoltOutlinedIcon,{})},h=t.HIDE_ADD_COLUMN_TYPES=new Set(["Ref","List","Show"]),m=t.addInlineActionInteraction={name:"add_inline_action",description:"Add Action",validIf:e=>"DetailField"===e.context&&!h.has(e.columnType||"")&&!!e.table&&!!e.column,reduxAction:o.addInlineActionFromScratch,icon:()=>(0,r.jsx)(a.BoltOutlinedIcon,{})};s.push(d),s.push(c),s.push(p),s.push(m)},26935:(e,t,i)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.getOpenAddEntityModalForProminentActions=t.getOpenAddEntityModalForProminenceThunk=t.getOpenAddEntityModalForPrimaryActions=t.addOverlayActionForCollectionView=t.addInlineActionFromScratch=t.addActionFromScratchThunk=void 0;var o=i(432981),n=i(622207),a=i(160647),r=i(501432),s=i(218546),l=i(486017),d=i(646374),c=i(943942),u=i(462122),p=i(436435),h=i(747950),m=i(343277);const f={Display_Overlay:{AddedToSlice:s.EventName.EditingEmulatorPrimaryActionAddedToSlice,AddedToSliceNotUsingAuto:s.EventName.EditingEmulatorPrimaryActionAddedToNonAutoSlice},Display_Prominently:{AddedToSlice:s.EventName.EditingEmulatorProminentActionAddedToSlice,AddedToSliceNotUsingAuto:s.EventName.EditingEmulatorProminentActionAddedToNonAutoSlice},Display_Inline:{AddedToSlice:s.EventName.EditingEmulatorInlineActionAddedToSlice,AddedToSliceNotUsingAuto:s.EventName.EditingEmulatorInlineActionAddedToNonAutoSlice},Do_Not_Display:{AddedToSlice:s.EventName.EditingEmulatorDND,AddedToSliceNotUsingAuto:s.EventName.EditingEmulatorDND}},g=(e,t,i)=>{var n;if(t&&t.Name&&t._path){e((0,h.trackEditorEventReduxAction)({event:f[i].AddedToSlice}));if(!(!!t.Actions&&(null===(n=t.Actions)||void 0===n?void 0:n.indexOf(c.AUTO_VALUE))>=0)){const n='Add Action to slice "'.concat(t.Name,'" to show it in this view.');(0,o.batch)((()=>{e((0,r.setPopup)(n,"info",t._path+".Actions",1e4)),e((0,h.trackEditorEventReduxAction)({event:f[i].AddedToSliceNotUsingAuto}))}))}}},y=(e,t,i)=>(o,a)=>{const r=o;(0,u.startAddActionScenario)({dispatch:r,actionProminence:t,startLocation:"EmulatorAdd"}),o((0,n.openAddEntityModalAndSkipEmulatorNavigation)({entityToAdd:"AppData.DataActions",context:{entityRef:{type:"AppData.DataSets",name:e},overrides:{"AppData.DataActions":{ActionDefinition:{Prominence:t}}}},onEntityAdded:e=>{(0,u.updateAddActionScenarioWithPath)(r,e),g(r,i,t),r((0,l.setHighlightingComponent)({id:d.ACTIONS_PANE_HIGHLIGHTING_ID,idType:"Element"}))}}))};t.getOpenAddEntityModalForProminenceThunk=y;t.getOpenAddEntityModalForPrimaryActions=(e,t)=>{const{tableName:i,slice:o}=(0,m.getTableAndSliceNames)(e,t);if(i)return y(i,"Display_Overlay",o)};t.getOpenAddEntityModalForProminentActions=(e,t)=>{const{tableName:i,slice:o}=(0,m.getTableAndSliceNames)(e,t);if(i)return y(i,"Display_Prominently",o)};const v=e=>(t,i)=>{const o=t,{tableName:r,slice:s}=(0,m.getTableAndSliceNames)(e.identifier,e.app);if(!r)return;const c=e.prominence;o((0,a.setSkipEmulatorNavigationOnAppTemplateChanges)(!0));const h=p.appTemplateSelectors.getNextIndex(i())("AppData.DataActions"),f="AppData.DataActions[".concat(h,"]");(0,u.startAddActionScenario)({dispatch:o,actionProminence:c,startLocation:"EmulatorAdd"}),o((0,n.addEntityFromScratch)({entityToAdd:"AppData.DataActions",context:{entityRef:{type:"AppData.DataSets",name:r},overrides:{"AppData.DataActions":Object.assign({ActionDefinition:{Prominence:c}},e.dataActionsOverrides)}}})),g(o,s,c),o((0,l.setHighlightingComponent)({id:d.ACTIONS_PANE_HIGHLIGHTING_ID,idType:"Element"})),(0,u.updateAddActionScenarioWithPath)(o,f),o((0,a.setSkipEmulatorNavigationOnAppTemplateChanges)(!1))};t.addActionFromScratchThunk=v;t.addInlineActionFromScratch=(e,t)=>{let i={};return(0,m.isVC)(e,t)||(i={ActionDefinition:{Prominence:"Display_Inline",Assignments:[{ColumnToEdit:e.column}]}}),v({prominence:"Display_Inline",identifier:e,app:t,dataActionsOverrides:Object.assign({ColumnAttachment:e.column},i)})};t.addOverlayActionForCollectionView=(e,t)=>v({prominence:"Display_Overlay",identifier:e,app:t,dataActionsOverrides:{TableScope:!0,ActionType:"ADD_RECORD"}})},125793:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.EmulatorInteractionFactory=void 0;var n=o(i(593186)),a=i(41389);t.EmulatorInteractionFactory=class{constructor(){this.interactions=new Map}register(e){this.interactions.set(e.name,e)}reduxAction(e,t,i){const o=this.interactions.get(e);if(o&&o.validIf(t)){const e=o.reduxAction(t,i);if(e)return e;if((0,a.isOpenInNewTabInteraction)(o.name))return;n.default.ReportErrorOnce(Object.assign({errorMessage:"Editing Emulator button clicked but no redux action",actionName:o.name},(0,a.getCommonElementInfoIdForErrorLogging)(t)))}else n.default.ReportErrorOnce(Object.assign({errorMessage:"Editing Emulator redux action request but was not val
1id",actionName:null==o?void 0:o.name},(0,a.getCommonElementInfoIdForErrorLogging)(t)))}list(e){return e?Array.from(this.interactions.values()).filter((t=>t.validIf(e))):[]}}},343277:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.isVC=t.getTableAndSliceNames=void 0;var n=o(i(593186)),a=i(41389);const r={tableName:void 0,sliceName:void 0};t.getTableAndSliceNames=(e,t)=>{var i;if(!e.table)return r;let o,s=e.table;return t.isSlice(e.table)&&(o=t.sliceByName(e.table),s=null!==(i=null==o?void 0:o.SourceTable)&&void 0!==i?i:"",""===s)?(n.default.ReportErrorOnce(Object.assign(Object.assign({errorMessage:"Editing Emulator getTableName for a slice but was not found"},(0,a.getCommonElementInfoIdForErrorLogging)(e)),{hasSliceByName:!!o,tableName:s})),r):{tableName:s,slice:o}};t.isVC=(e,t)=>{var i;if(!e.table||!e.column)return!1;const o=t.columnsFor(e.table),n=o.findIndex((t=>t.Name===e.column));return!(n<0)&&(null===(i=o.at(n))||void 0===i?void 0:i.IsVirtual)}},747788:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useSubscribeToEditor=void 0;var o=i(667294);let n;t.useSubscribeToEditor=e=>((0,o.useEffect)((()=>{var t,i;const o=()=>{var t;const i=null===(t=window.parent)||void 0===t?void 0:t.reduxStore.getState();i&&e.forEach((e=>e(i)))},a=null===(t=window.parent)||void 0===t?void 0:t.reduxStore.subscribe(o);n=null===(i=window.parent)||void 0===i?void 0:i.reduxStore.dispatch,o();const r=()=>{a()};return window.addEventListener("beforeunload",r),()=>{a(),window.removeEventListener("beforeunload",r)}}),[]),{dispatch:n})},483514:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BoltOutlinedIcon=void 0;var o=i(249492),n=i(148521);t.BoltOutlinedIcon=(0,o.createSvgIcon)((0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",color:"inherit",children:(0,n.jsx)("path",{d:"M11 21h-1l1-7H7.5c-.58 0-.57-.32-.38-.66.19-.34.05-.08.07-.12C8.48 10.94 10.42 7.54 13 3h1l-1 7h3.5c.49 0 .56.33.47.51l-.07.15C12.96 17.55 11 21 11 21z"})}),"BoltOutlinedIcon")},565261:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DrawIcon=void 0;var o=i(249492),n=i(148521);t.DrawIcon=(0,o.createSvgIcon)((0,n.jsx)(n.Fragment,{children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"#FFFFFF",children:(0,n.jsx)("path",{d:"M240-520q-83 0-141.5-58.5T40-720q0-84 58.5-142T240-920q84 0 142 58t58 142q0 83-58 141.5T240-520Zm0-80q51 0 85.5-35t34.5-85q0-51-34.5-85.5T240-840q-50 0-85 34.5T120-720q0 50 35 85t85 35ZM640-40q-33 0-56.5-23.5T560-120v-200q0-33 23.5-56.5T640-400h200q33 0 56.5 23.5T920-320v200q0 33-23.5 56.5T840-40H640Zm0-80h200v-200H640v200Zm100-100ZM240-720Zm469 68L308-252q5 12 8.5 25t3.5 27q0 50-34.5 85T200-80q-50 0-85-35t-35-85q0-51 35-85.5t85-34.5q14 0 27 3.5t25 8.5l400-401q-5-12-8.5-24.5T640-760q0-51 35-85.5t85-34.5q51 0 85.5 34.5T880-760q0 50-34.5 85T760-640q-14 0-26.5-3.5T709-652Z"})})}),"DrawIcon")},975811:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoPhotographyIcon=void 0;var o=i(249492),n=i(148521);t.NoPhotographyIcon=(0,o.createSvgIcon)((0,n.jsx)(n.Fragment,{children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"#80868b",children:(0,n.jsx)("path",{d:"m880-195-80-80v-405H638l-73-80H395l-38 42-57-57 60-65h240l74 80h126q33 0 56.5 23.5T880-680v485Zm-720 75q-33 0-56.5-23.5T80-200v-480q0-33 23.5-56.5T160-760h41l80 80H160v480h601l80 80H160Zm466-215q-25 34-62.5 54.5T480-260q-75 0-127.5-52.5T300-440q0-46 20.5-83.5T375-586l58 58q-24 13-38.5 36T380-440q0 42 29 71t71 29q29 0 52-14.5t36-38.5l58 58Zm-18-233q25 24 38.5 57t13.5 71v12q0 6-1 12L456-619q6-1 12-1h12q38 0 71 13.5t57 38.5ZM819-28 27-820l57-57L876-85l-57 57ZM407-440Zm171-57Z"})})}),"NoPhotographyIcon")},646374:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sortByIsSystemGenerated=t.ACTIONS_PANE_HIGHLIGHTING_ID=void 0;t.sortByIsSystemGenerated=(e,t)=>e._isMinor===t._isMinor?e.Name.localeCompare(t.Name,void 0,{sensitivity:"base",numeric:!0}):e._isMinor?1:-1;t.ACTIONS_PANE_HIGHLIGHTING_ID=["ActionsPane"]},299912:(e,t,i)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.calculateChartType=void 0;var o=i(797311),n=i(183377);const a=[o.CHART_TYPE_BAR,o.CHART_TYPE_LINE,o.CHART_TYPE_SCATTER,o.CHART_TYPE_AREA,o.CHART_TYPE_PIE,o.CHART_TYPE_DOUGHNUT];t.calculateChartType=e=>{if(e.chartType!==o.CHART_TYPE_AUTO)return e.chartType;const t=(e=>o.ALL_CHART_TYPES.filter((t=>t!==o.CHART_TYPE_AUTO&&(0,n.canEncodeChartAs)(e,t))))(e);if(1===t.length)return t[0];if(t.includes(o.CHART_TYPE_LINE)&&(1===(i=e.encodings.major).length&&"time"===i[0].field.type&&["","Year","Quarter","Month","Week","Day"].includes(i[0].aggregateFunc)))return o.CHART_TYPE_LINE;var i;for(const e of a)if(t.includes(e))return e;return null}},183377:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canEncodeChartAs=void 0;var o=i(797311);const n=e=>"value"===e.field.type||"category"===e.field.type&&!!e.aggregateFunc||"synthetic"===e.field.type,a=e=>{let{major:t,minor:i,color:o,size:a}=e;return!(a.length>0||t.length>1||i.length>1&&o.length>0)&&(!!i.every(n)&&!(1===t.length&&!["category","time"].includes(t[0].field.type)))};t.canEncodeChartAs=(e,t)=>{switch(t){case o.CHART_TYPE_AUTO:return!0;case o.CHART_TYPE_BAR:case o.CHART_TYPE_LINE:return a(e.encodings);case o.CHART_TYPE_AREA:return(e=>{let{major:t,minor:i,color:o,size:n}=e;return!(o.length>0&&o.some((e=>"value"===e.field.type)))&&a({major:t,minor:i,color:o,size:n,detail:[]})})(e.encodings);case o.CHART_TYPE_SCATTER:return(e=>{let{major:t,minor:i,size:o}=e;return!(t.length>1||t.some((e=>"category"===e.field.type||"time"===e.field.type))||i.length>1||i.some((e=>"category"===e.field.type))||o.length>1)})(e.encodings);case o.CHART_TYPE_PIE:case o.CHART_TYPE_DOUGHNUT:return(e=>{let{major:t,minor:i}=e;return!(t.length>0||i.length>1||i[0]&&"value"!==i[0].field.type&&"synthetic"!==i[0].field.type)})(e.encodings)}return!1}},552179:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertSavedConfig=void 0;var o=i(797311);const n={time:["","Year","Quarter","Month","Week","Day","Month Name","Quarter Number","Week Number","Day of Month","Day of Week"],value:["Sum","Count","Average","Unique"],category:["Unique","Count"],synthetic:[]},a=(e,t)=>{const i=o.sheetTypeToChartType[t[e.ColumnName]];return{aggregateFunc:e.AggregateFunc,trendline:e.Trendline,aggregateOptions:n[i]||[],field:{name:e.ColumnName,type:i,values:[],originalType:null,displayName:void 0}}},r={Auto:"auto",Bar:"bar",Line:"line",Scatter:"scatter",Area:"area",Pie:"pie",Doughnut:"doughnut"};t.convertSavedConfig=(e,t)=>{var i,o,n,s,l,d,c,u;const p=t.map((e=>"model"in e?e.model:e)),h=(e=>e.reduce(((e,t)=>(e[t.Name]=t.Type,e)),{}))(p);h["Record Count"]="Synthetic";const m=p.filter((e=>e.IsKey))[0];return{keyColumn:(null==m?void 0:m.Name)||"",chartType:r[e.ChartType],flipXY:e.FlipXY,hideDataButton:e.HideDataButton,unstackBarChart:e.UnstackBarChart,hideTitle:e.HideTitle,hideLegend:e.Legend.Hide,legendPosition:e.Legend.LegendPosition,disableClickThrough:e.DisableClickThrough,hideDataZoomFilter:e.HideDataZoomFilter,encodings:{major:null===(i=e.Encodings)||void 0===i?void 0:i.Major.map((e=>a(e,h))),minor:null===(o=e.Encodings)||void 0===o?void 0:o.Minor.map((e=>a(e,h))),detail:[],color:null===(n=e.Encodings)||void 0===n?void 0:n.Color.map((e=>a(e,h))),size:null===(s=e.Encodings)||void 0===s?void 0:s.Size.map((e=>a(e,h)))},sortBy:e.SortBy?{encodingKey:e.SortBy.EncodingKey,encodingIndex:e.SortBy.Index,direction:e.SortBy.SortDirection}:void 0,kpi:{showLastValue:null===(l=e.Legend.Kpi)||void 0===l?void 0:l.ShowLastValue,showPercentDiff:null===(d=e.Legend.Kpi)||void 0===d?void 0:d.ShowPercentDiff,isLowerValueBetter:null===(c=e.Legend.Kpi)||void 0===c?void 0:c.IsLowerValueBetter,useAccessibleColor:null===(u=e.Legend.Kpi)||void 0===u?void 0:u.UseAccessibleColor}}}},657269:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AreaChartBuilder=void 0;var o=i(74859),n=i(797311);class a extends o.BarChartBuilder{constructor(){super(...arguments),this.createDataObject=(e,t)=>{var i;return{name:this.generateColorSeries?t:null!==(i=this.fieldDict[t].displayName)&&void 0!==i?i:"",type:n.CHART_TYPE_LINE,stack:"stack",areaStyle:{},data:e}}}}t.AreaChartBuilder=a},74859:(e,t,i)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.BarChartBuilder=void 0;var o=i(490056),n=i(708897),a=i(797311);const r=(e,t)=>e.aggregateFunc&&"synthetic"!==e.field.type?"".concat(t," (").concat(e.aggregateFunc,")"):t;class s extends o.BaseChartBuilder{constructor(e,t,i,o){var s,l,d;super(e,t,i,o),this.colorField=null,this.minorCols=[],this.isTime=!1,this.isTimeBreakdown=!1,this.nullKeys=[],this.majorDimensionMap={},this.majorDimensionNames=[],this.canCreateChart=()=>!!(this.encodings.major.length&&this.encodings.minor.length&&this.majorCol),this.setBaseEchartConfig=()=>{const e=this.getSharedGridValues();this.echartConfig={animation:!window.APPSHEET_TEST_CONTEXT,grid:Object.assign({containLabel:!0},e),visualMap:[]}},this.addAxes=()=>{const e=this.createMajorAxis(),t=this.createMinorAxis();this.echartConfig=Object.assign(Object.assign({},this.echartConfig),{[this.config.flipXY?"yAxis":"xAxis"]:e,[this.config.flipXY?"xAxis":"yAxis"]:t}),this.echartConfig.xAxis.axisLabel.rotate=45,this.echartConfig.xAxis.nameRotate=90},this.addTooltips=()=>{const e=[...this.encodings.major.map((e=>{var t;return r(e,null!==(t=this.fieldDict[e.field.name].displayName)&&void 0!==t?t:"")})),...this.encodings.minor.map((e=>{var t;return r(e,null!==(t=this.fieldDict[e.field.name].displayName)&&void 0!==t?t:"")})),...this.encodings.color.map((e=>{var t;return r(e,null!==(t=this.fieldDict[e.field.name].displayName)&&void 0!==t?t:"")}))];this.echartConfig.tooltip={confine:!0,formatter:t=>this.getBarLineAreaTooltips(t,e)}},this.getBarLineAreaTooltips=(e,t)=>{let i;const o=this.config.flipXY?[...e.data.value].reverse():e.data.value;return o?(i=this.encodings.minor.length>1?["".concat(t[0],": ").concat(o[0]),"".concat(e.seriesName,": ").concat(o[1])]:this.generateColorSeries?["".concat(t[0],": ").concat(o[0]),"".concat(t[1],": ").concat(o[1]),"".concat(t[2],": ").concat(e.seriesName)]:t.map(((e,t)=>"".concat(e,": ").concat(o[t]))),i.join("<br/>")):""},this.addLegend=()=>{const e=this.getChartOrientationValues();this.echartConfig.legend=Object.assign({type:"scroll",show:!this.generateColorMap&&!this.config.hideLegend},e)},this.createGetRows=e=>{var t;return this.generateColorSeries&&(null===(t=this.colorField)||void 0===t?void 0:t.values)?t=>this.majorDimensionMap[t].filter((t=>{var i;return t[this.encodings.color[0].field.name]===(null===(i=this.colorField)||void 0===i?void 0:i.values[e])})):e=>this.majorDimensionMap[e]},this.getSums=(e,t)=>(this.majorDimensionNames||[]).map((i=>{if(this.nullKeys.has(i))return null;const o=e(i);return o.some((e=>e[t.name]||0===e[t.name]))?o.reduce(((e,i)=>e+Number(i[t.name])),0):null})),this.getCounts=e=>this.majorDimensionNames.map((t=>this.nullKeys.has(t)?null:e(t).length)),this.getUnique=(e,t)=>this.majorDimensionNames.map((i=>{if(this.nullKeys.has(i))return null;const o=e(i).reduce(((e,i)=>{const o=i[t.name];return e[o]||(e[o]=[]),e[o].push(i),e}),{});return Object.keys(o).length})),this.createDataForTime=e=>{const t=this.majorDimensionNames.map((e=>"null"===e?null:new Date(+e)));return e.map(((e,i)=>{if(null==e)return null;const o=t[i];return{name:null==o?void 0:o.toString(),value:this.config.flipXY?[e,o]:[o,e],rowKeys:o?this.getRowKeys(o.toString()):[]}})).filter((e=>null!=e))},this.createDataForContinuousTime=e=>e.map(((e,t)=>{if(null==e)return null;const i=this.majorDimensionNames[t];return{name:this.majorDimensionNames[t],value:this.config.flipXY?[e,i]:[i,e],rowKeys:this.getRowKeys(i)}})).filter((e=>null!=e)),this.createDataForNonTime=e=>e.map(((e,t)=>{const i=this.majorDimensionNames[t];return{name:i,value:this.config.flipXY?[e,i]:[i,e],rowKeys:this.getRowKeys(i)}})),this.setCreateDataFunc=()=>{this.isTime&&!this.isTimeBreakdown?this.createData=this.createDataForTime:this.isTime&&a.continuousTimeAggregateFuncs.includes(this.encodings.major[0].aggregateFunc)?this.createData=this.createDataForContinuousTime:this.createData=this.createDataForNonTime},this.getExtraForColorMap=e=>this.majorDimensionNames.map((t=>{if(this.nullKeys.has(t))return null;const i=e(t).map((e=>e[this.encodings.color[0].field.name]));switch(this.encodings.color[0].aggregateFunc){case"Sum":return i.reduce(((e,t)=>Number(e)+Number(t)),0);case"Average":return i.reduce(((e,t)=>Number(e)+Number(t)),0)/i.length;case"Count":return i.length}return 0})),this.createDataObject=(e,t)=>
1{var i;return{name:this.generateColorSeries?t:null!==(i=this.fieldDict[t].displayName)&&void 0!==i?i:"",type:a.CHART_TYPE_BAR,stack:this.generateColorSeries&&!this.config.unstackBarChart?"stack":void 0,areaStyle:void 0,data:e}},this.addData=()=>{this.echartConfig.series=this.minorCols.map(((e,t)=>{const i=this.createGetRows(t),o=this.generateColorSeries?this.encodings.minor[0]:this.encodings.minor[t];let n=[];if(o.aggregateFunc)switch(o.aggregateFunc){case"Sum":n=this.getSums(i,e);break;case"Count":n=this.getCounts(i);break;case"Average":{const t=this.getSums(i,e)||{};n=this.getCounts(i).map(((e,i)=>null===e||null===t[i]?null:e?(t[i]||0)/e:0));break}case"Unique":n=this.getUnique(i,e)}if(n=this.createData(n),this.generateColorMap){const e=this.getExtraForColorMap(i);n.forEach(((t,i)=>{t.value.push(e[i])}))}return this.createDataObject(n,this.colorField?this.colorField.values[t]:e.name)}))},this.addDataZoom=()=>{const e=this.config.flipXY?"yAxisIndex":"xAxisIndex";this.echartConfig.dataZoom=this.config.hideDataZoomFilter?void 0:[{type:"slider",[e]:[0]},{type:"inside",[e]:[0]}]},this.addColorMap=()=>{const e=this.echartConfig.series[0].data.map((e=>e.value[e.value.length-1]));this.echartConfig.visualMap.push({show:!this.config.hideLegend,min:Math.min(...e),max:Math.max(...e)})},this.addExtra=()=>{this.generateColorMap&&this.addColorMap()},this.addSort=()=>{var e;if("minor"===(null===(e=this.config.sortBy)||void 0===e?void 0:e.encodingKey)){const e=this.majorDimensionNames.map(((e,t)=>({major:e,minor:this.echartConfig.series.map((e=>e.data[t]))}))).sort(((e,t)=>{var i,o;const n=this.config.flipXY?0:1;if(!this.config.sortBy)return 0;const a=this.generateColorSeries?e.minor.reduce(((e,t)=>e+t.value[n]),0):e.minor[this.config.sortBy.encodingIndex].value[n],r=this.generateColorSeries?t.minor.reduce(((e,t)=>e+t.value[n]),0):t.minor[this.config.sortBy.encodingIndex].value[n];return"Asc"===(null===(i=this.config.sortBy)||void 0===i?void 0:i.direction)?a-r:"Desc"===(null===(o=this.config.sortBy)||void 0===o?void 0:o.direction)?r-a:0}));this.config.flipXY?this.echartConfig.yAxis.data=e.map((e=>e.major)):this.echartConfig.xAxis.data=e.map((e=>e.major)),this.echartConfig.series.forEach(((t,i)=>{t.data=e.map((e=>e.minor[i]))}))}},this.createMajorDimensionMap=()=>{const e=this.encodings.major[0].aggregateFunc;return this.filteredDataset.reduce(((t,i)=>{let o=i[this.majorCol.name];return this.isTime&&(o=o?(0,a.getDateTimeKey)(new Date(o),e):"null"),t[o]||(t[o]=[]),t[o].push(i),t}),{})},this.getMajorDimensionNames=()=>{var e;let t=Object.keys(this.majorDimensionMap);return this.isTime?this.isTimeBreakdown?t=this.createTimeKeyRange():t.sort(((e,t)=>parseInt(e)-parseInt(t))):"major"===(null===(e=this.config.sortBy)||void 0===e?void 0:e.encodingKey)&&t.sort(((e,t)=>{var i;return"Asc"===(null===(i=this.config.sortBy)||void 0===i?void 0:i.direction)?e.localeCompare(t):t.localeCompare(e)})),t},this.createTimeKeyRange=()=>{const e=this.encodings.major[0].aggregateFunc,t=this.fieldDict[this.encodings.major[0].field.name],i=(0,a.generateDateTimeKeyRange)(t.values,e);for(const e of i)this.majorDimensionMap[e]||(this.majorDimensionMap[e]=[],this.nullKeys.add(e));return i},this.createMajorAxis=()=>{var e,t;return Object.assign(Object.assign({name:this.fieldDict[this.encodings.major[0].field.name].displayName},a.axisNameSettings),{type:this.isTimeBreakdown?"category":this.encodings.major[0].field.type,inverse:!(!this.isTime||"major"!==(null===(e=this.config.sortBy)||void 0===e?void 0:e.encodingKey)||"Desc"!==(null===(t=this.config.sortBy)||void 0===t?void 0:t.direction)),data:this.isTime&&!this.isTimeBreakdown?void 0:this.majorDimensionNames,axisLabel:{formatter:this.isTime&&!this.isTimeBreakdown?void 0:n.categoryLabelFormatter,rotate:0}})},this.createMinorAxis=()=>Object.assign(Object.assign({name:"Right"!==this.legendPositionToShow?this.encodings.minor.map((e=>{let{field:t}=e;var i;return null===(i=this.fieldDict[t.name])||void 0===i?void 0:i.displayName})).join(" / "):""},a.axisNameSettings),{type:"value",axisLabel:{rotate:0}}),this.canCreateChart()&&(this.colorField=this.fieldDict[null===(l=null===(s=this.encodings.color[0])||void 0===s?void 0:s.field)||void 0===l?void 0:l.name]||null,this.minorCols=((e,t)=>e.minor.map((e=>
1t[e.field.name])).filter(Boolean))(this.encodings,this.fieldDict),this.generateColorSeries&&(null===(d=this.colorField)||void 0===d?void 0:d.values)&&(this.minorCols=Array(this.colorField.values.length).fill(0).map((()=>this.minorCols[0]))),this.isTime=this.encodings.major.some((e=>"time"===e.field.type)),this.isTimeBreakdown=this.isTime&&!!this.encodings.major[0].aggregateFunc,this.nullKeys=new Set,this.majorDimensionMap=this.createMajorDimensionMap(),this.majorDimensionNames=this.getMajorDimensionNames(),this.setCreateDataFunc())}getRowKeys(e){var t;const{keyColumn:i}=this.config,o=null!==(t=this.majorDimensionMap[e])&&void 0!==t?t:[];return i?o.map((e=>e[i])):[]}}t.BarChartBuilder=s},490056:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseChartBuilder=void 0;t.BaseChartBuilder=class{constructor(e,t,i,o){this.getEchartConfig=()=>this.echartConfig,this.canCreateChart=()=>!1,this.setBaseEchartConfig=()=>{this.echartConfig={}},this.getChartOrientationValues=()=>{if("Right"===this.legendPositionToShow){const e="number"==typeof this.width&&this.width<400,t=e?65:50;let i=0;"number"==typeof this.width&&this.width>600&&(i=(this.width-600)/3);return{orient:"vertical",top:20,bottom:20,left:e?"67%":"77%",textStyle:{overflow:"truncate",width:t+i}}}return{}},this.getSharedGridValues=()=>{if("Right"===this.legendPositionToShow){return{right:"number"==typeof this.width&&this.width<400?"35%":"25%"}}return{}},this.addAxes=()=>{},this.addTooltips=()=>{},this.addLegend=()=>{},this.addData=()=>{},this.addDataZoom=()=>{},this.addExtra=()=>{},this.addSort=()=>{},this.addTrendline=()=>{},this.encodings=e.encodings,this.config=e,this.fieldDict=t,this.filteredDataset=i,this.echartConfig=[],this.width=o;const n="number"!=typeof this.width||this.width>600;this.legendPositionToShow="Right"===e.legendPosition||"Dynamic"===e.legendPosition&&n?"Right":"Top",this.generateColorSeries=1===this.encodings.minor.length&&1===this.encodings.color.length&&"category"===this.encodings.color[0].field.type,this.generateColorMap=1===this.encodings.minor.length&&1===this.encodings.color.length&&"value"===this.encodings.color[0].field.type,this.majorCol=this.encodings.major[0]&&t[this.encodings.major[0].field.name]}}},708897:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.categoryLabelFormatter=void 0;t.categoryLabelFormatter=e=>(e=0===e||!1===e||e?"".concat(e):"").length>17?e.slice(0,17)+"...":e},665920:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DoughnutChartBuilder=void 0;var o=i(798800);class n extends o.PieChartBuilder{constructor(){super(...arguments),this.getRadius=()=>["40%","70%"]}}t.DoughnutChartBuilder=n},578400:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createChartOption=void 0;var o=i(299912),n=i(74859),a=i(520570),r=i(657269),s=i(666076),l=i(798800),d=i(665920),c=i(797311);const u={[c.CHART_TYPE_BAR]:n.BarChartBuilder,[c.CHART_TYPE_LINE]:a.LineChartBuilder,[c.CHART_TYPE_AREA]:r.AreaChartBuilder,[c.CHART_TYPE_SCATTER]:s.ScatterChartBuilder,[c.CHART_TYPE_PIE]:l.PieChartBuilder,[c.CHART_TYPE_DOUGHNUT]:d.DoughnutChartBuilder};t.createChartOption=(e,t,i,n)=>{const a=(0,o.calculateChartType)(e);if(!a)return{};const r=(e=>{const t=e.reduce(((e,t)=>(e[t.name]=t,e)),{});return t["Record Count"]=Object.assign(Object.assign({},e[0]),{name:"Record Count"}),t})(i),s=t.map(((e,t)=>(e._i=t+1,e))),l=u[a];if(!l)return{};const d=new l(e,r,s,n);return d.canCreateChart()?(d.setBaseEchartConfig(),d.addAxes(),d.addTooltips(),d.addLegend(),d.addData(),d.addDataZoom(),d.addExtra(),d.addSort(),d.addTrendline(),d.getEchartConfig()):{}}},956791:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.createKPIToolTips=t.createKPITextStyle=t.KPILegendFormatter=void 0;var n=o(i(496486)),a=i(646514);t.KPILegendFormatter=(e,t,i)=>{let{showLastValue:o,showPercentDiff:a,isLowerValueBetter:r}=i;var s,l;const d=t.find((t=>t.name===e))||{data:[]},c=d.data.length?null===(s=d.data[d.data.length-1])||void 0===s?void 0:s.value[1]:null,u=d.data.length>=2?null===(l=d.data[d.data.length-2])||void 0===l?void 0:l.value[1]:null,{percentageClass:p,percentage:h}=((e,t,i)=>{const[o,a]=i?["badText","goodText"]:["goodText","badText"];return isNaN(e)||isNaN(t)||e===t?{percentageClass:"neutralText",percentage:"0%"}:e>t?0===t?{percentageClass:o,percentage:"+100%"}:{percentageClass:o,percentage:"+".concat(n.default.round(e/t*100-100,2),"%")}:0===e?{percentageClass:a,percentage:"-100%"}:{percentageClass:a,percentage:"-".concat(n.default.round(t/e*100-100,2),"%")}})(c,u,r),m=["{header|".concat(e,"}")];return o&&m.push("{lastElement|".concat(n.default.round(c,2),"}")),a&&m.push("{".concat(p,"|").concat(h,"}")),m.join("\n")};t.createKPITextStyle=e=>({padding:[0,1],rich:{header:{color:a.GOOGLE_GREY_500,fontSize:12},lastElement:{color:a.GOOGLE_BLACK,fontSize:16},badText:{color:e?a.GOOGLE_ORANGE_500:a.GOOGLE_RED,fontSize:10},goodText:{color:e?a.GOOGLE_BLUE:a.GOOGLE_GREEN,fontSize:10},neutralText:{color:a.GOOGLE_BLACK,fontSize:10}}});t.createKPIToolTips=(e,t)=>({show:!0,confine:!0,formatter:i=>e&&t?["Last value and","% difference","with previous value"].join("<br/>"):t?["% difference","with previous value"].join("<br/>"):"Last value"})},520570:(e,t,i)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.LineChartBuilder=void 0;var o=i(74859),n=i(956791),a=i(841692),r=i(797311);const s=e=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.length)>0&&e.data.every((e=>!e.value.some((e=>null!=e&&isNaN(e)))))};class l extends o.BarChartBuilder{constructor(){super(...arguments),this.createDataObject=(e,t)=>{var i;return{name:this.generateColorSeries?t:null!==(i=this.fieldDict[t].displayName)&&void 0!==i?i:"",type:r.CHART_TYPE_LINE,stack:void 0,areaStyle:void 0,data:e}},this.addExtra=()=>{this.config.kpi&&(this.config.kpi.showLastValue||this.config.kpi.showPercentDiff)&&(this.echartConfig.legend=Object.assign(Object.assign({},this.echartConfig.legend),{formatter:e=>(0,n.KPILegendFormatter)(e,this.echartConfig.series,this.config.kpi?this.config.kpi:{showLastValue:!1,showPercentDiff:!1,isLowerValueBetter:!1}),icon:"pin",textStyle:(0,n.createKPITextStyle)(this.config.kpi.useAccessibleColor),tooltip:(0,n.createKPIToolTips)(this.config.kpi.showLastValue,this.config.kpi.showPercentDiff)})),this.generateColorMap&&this.addColorMap()},this.addTrendline=()=>{this.encodings.minor.some((e=>e.trendline))&&(this.generateColorSeries?this.echartConfig.series.forEach((e=>{let{data:t,name:i}=e;const o=[],n=[];t.forEach(((e,t)=>{let{value:i}=e;o.push(t),n.push(i[1])}));const r=(0,a.makeTrendline)({trendlineType:this.encodings.minor[0].trendline,labels:o,values:n});r&&s(r)&&this.echartConfig.series.push(Object.assign(Object.assign({},r),{name:"".concat(this.fieldDict[i].displayName," Trendline")}))})):this.encodings.minor.forEach((e=>{var t;if(e.trendline){const i=[],o=[],n=[];null===(t=this.echartConfig.series.find((t=>t.name===this.fieldDict[e.field.name].displayName)))||void 0===t||t.data.forEach(((e,t)=>{let{value:a}=e;i.push(t),n.push(a[0]),o.push(a[1])}));const r=(0,a.makeTrendline)({trendlineType:e.trendline,labels:i,values:o,domain:this.isTime?n:void 0});r&&s(r)&&this.echartConfig.series.push(Object.assign(Object.assign({},r),{name:"".concat(this.fieldDict[e.field.name].displayName," Trendline")}))}})))}}}t.LineChartBuilder=l},841692:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.makeTrendline=void 0;var n=o(i(386036)),a=i(797311);t.makeTrendline=e=>{let{trendlineType:t,labels:i,values:o,domain:r}=e,s=null;if(t===a.TRENDLINE_LINEAR?s=n.default.linearRegression(i,o,2):t===a.TRENDLINE_EXPONENTIAL?s=n.default.exponentialRegression(i,o,2):t===a.TRENDLINE_LOGARITHMIC?s=n.default.logarithmicRegression(i,o,2):t===a.TRENDLINE_POWER?s=n.default.powerRegression(i,o,2):t===a.TRENDLINE_POLYNOMIAL&&(s=n.default.polynomialRegression(i,o,2)),s){return{name:"Trend Line",smooth:!0,type:"line",showSymbol:!1,data:i.map(((e,t)=>({name:e,value:[r?r[t]:e,s&&s(e)]}))),stack:void 0,areaStyle:void 0}}return null}},798800:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.PieChartBuilder=void 0;var n=o(i(496486)),a=i(490056),r=i(797311);class s extends a.BaseChartBuilder{constructor(){super(...arguments),this.canCreateChart=()=>!(!this.encodings.minor.length||!this.encodings.color.length),this.setBaseEchartConfig=()=>{const e=this.getSharedGridValues();this.echartConfig={grid:e,animation:!window.APPSHEET_TEST_CONTEXT,visualMap:[],series:[{type:r.CHART_TYPE_PIE,minShowLabelAngle:5,label:{show:!0,position:"outside",formatter:e=>{let{name:t,value:i,percent:o}=e;return["{bold|".concat(t,"}"),"{regular|".concat(o,"%}"),"{regular|".concat(i,"}")].join("\n")},rich:{regular:{fontSize:10,align:"middle"},bold:{fontSize:10,fontWeight:"bold",align:"middle"}}}}]}},this.addTooltips=()=>{this.echartConfig.tooltip={confine:!0,show:!0}},this.addLegend=()=>{const e=this.getChartOrientationValues();this.echartConfig.legend=Object.assign({type:"scroll",show:!this.config.hideLegend},e)},this.addData=()=>{const e=this.encodings.color[0].field.name,t=this.encodings.minor[0].field.name,i=this.config.keyColumn,o=this.filteredDataset.reduce(((o,n)=>{var a,r;const s=null!==(a=o[r=n[e]])&&void 0!==a?a:o[r]={values:[],rowKeys:[]};return s.values.push(Number(n[t])),i&&s.rowKeys.push(n[i]),o}),{}),a=Object.entries(o).map((e=>{let t,[i,o]=e;switch(this.encodings.minor[0].aggregateFunc){case"Count":t=o.values.length;break;case"Sum":t=n.default.sum(o.values);break;case"Average":t=n.default.round(n.default.mean(o.values),2)}return{name:i,value:t,rowKeys:o.rowKeys}}));this.echartConfig.series[0]=Object.assign(Object.assign({},this.echartConfig.series[0]),{radius:this.getRadius(),data:a})},this.addSort=()=>{this.config.sortBy&&("minor"===this.config.sortBy.encodingKey?this.echartConfig.series[0].data.sort(((e,t)=>{var i;return"Asc"===(null===(i=this.config.sortBy)||void 0===i?void 0:i.direction)?e.value-t.value:t.value-e.value})):"color"===this.config.sortBy.encodingKey&&this.echartConfig.series[0].data.sort(((e,t)=>{var i;return"Asc"===(null===(i=this.config.sortBy)||void 0===i?void 0:i.direction)?t.name>e.name?1:-1:e.name>t.name?1:-1})))},this.getRadius=()=>["0%","70%"]}}t.PieChartBuilder=s},666076:(e,t,i)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.ScatterChartBuilder=void 0;var o=i(490056),n=i(708897),a=i(841692),r=i(797311);class s extends o.BaseChartBuilder{constructor(e,t,i,o){var s,l,d,c,u,p,h,m;super(e,t,i,o),this.yMin=0,this.yMax=0,this.xMin=0,this.xMax=0,this.valueKeys=[],this.sizeFrom=null,this.xValueList=[],this.yValueList=[],this.canCreateChart=()=>!(!this.encodings.major.length||!this.encodings.minor.length),this.setBaseEchartConfig=()=>{const e=this.getSharedGridValues();this.echartConfig={animation:!window.APPSHEET_TEST_CONTEXT,grid:Object.assign({containLabel:!0},e),visualMap:[]}},this.addAxes=()=>{var e,t;this.echartConfig=Object.assign(Object.assign({},this.echartConfig),{yAxis:Object.assign(Object.assign({name:null===(e=this.fieldDict[this.encodings.minor[0].field.name])||void 0===e?void 0:e.displayName},r.axisNameSettings),{type:"value",scale:!0}),xAxis:Object.assign(Object.assign({name:null===(t=this.fieldDict[this.encodings.major[0].field.name])||void 0===t?void 0:t.displayName},r.axisNameSettings),{nameRotate:90,type:"value",axisLabel:{rotate:60,formatter:n.categoryLabelFormatter},scale:!0})})},this.addTooltips=()=>{this.echartConfig.tooltip={confine:!0,formatter:e=>e.data.rows?"Row Number(s): "+e.data.rows.join(", ")+"<br/>"+this.valueKeys.map(((t,i)=>"".concat(t,": ").concat(e.data.value[i]))).join("<br/>"):null}},this.addLegend=()=>{const e=this.getChartOrientationValues();this.echartConfig.legend=Object.assign({type:"scroll",show:!this.config.hideLegend},e)},this.addData=()=>{const e=this.generateColorSeries?this.fieldDict[this.encodings.color[0].field.name].values:[null];this.echartConfig.series=e.map((e=>{var t,i;const o=this.createXYMap(e),n=[];for(const[e,a]of Object.entries(o))for(const[o,r]of Object.entries(a)){const a=[Number(e),Number(o)];this.encodings.size.length>0&&a.push(this.getSizeData(r)),this.generateColorMap&&a.push(this.getColorData(r)),this.xValueList.push(a[0]),this.yValueList.push(a[1]);const{keyColumn:s}=this.config;n.push({name:null!==(i=null===(t=this.fieldDict[this.encodings.major[0].field.name])||void 0===t?void 0:t.displayName)&&void 0!==i?i:"",rows:r.map((e=>e._i)),rowKeys:s?r.map((e=>e[s])):[],value:a})}return{name:e,type:r.CHART_TYPE_SCATTER,data:n,symbolSize:e=>0!==this.encodings.size.length&&this.sizeFrom?(0,r.mapRange)(e[2],this.sizeFrom,[10,50]):10}}))},this.addDataZoom=()=>{this.echartConfig.dataZoom=this.config.hideDataZoomFilter?void 0:[{type:"slider",show:!0,yAxisIndex:[0],startValue:this.yMin,endValue:this.yMax},{type:"inside",show:!0,yAxisIndex:[0],startValue:this.yMin,endValue:this.yMax},{type:"slider",show:!0,xAxisIndex:[0],startValue:this.xMin,endValue:this.xMax},{type:"inside",show:!0,xAxisIndex:[0],startValue:this.xMin,endValue:this.xMax}]},this.addExtra=()=>{if(this.echartConfig.yAxis=Object.assign(Object.assign({},this.echartConfig.yAxis),{min:this.yMin,max:this.yMax}),this.echartConfig.xAxis=Object.assign(Object.assign({},this.echartConfig.xAxis),{min:this.xMin,max:this.xMax}),this.generateColorMap){const e=this.echartConfig.series[0].data.map((e=>e.value[e.value.length-1]));this.echartConfig.visualMap.push({type:"continuous",show:!this.config.hideLegend,dimension:this.echartConfig.series[0].data[0].value.length-1,min:Math.min(...e),max:Math.max(...e)})}this.echartConfig.visualMap.forEach(((e,t)=>{e.bottom=150*t}))},this.addTrendline=()=>{if(this.encodings.minor[0].trendline){const e=(0,a.makeTrendline)({trendlineType:this.encodings.minor[0].trendline,labels:this.xValueList,values:this.yValueList});this.echartConfig.series.push(e)}},this.createXYMap=e=>{let t=!1;return this.filteredDataset.filter((t=>!this.generateColorSeries||t[this.encodings.color[0].field.name]===e)).reduce(((e,i)=>{const o=Number(i[this.encodings.major[0].field.name]),n=Number(i[this.encodings.minor[0].field.name]);return(!t||o<this.xMin)&&(this.xMin=o),(!t||o>this.xMax)&&(this.xMax=o),(!t||n<this.yMin)&&(this.yMin=n),(!t||n>this.yMax)&&(this.yMax=n),t=!0,e[o]||(e[o]={}),e[o][n]||(e[o][n]=[]),e[o][n].push(i),e}),{})}
1,this.getSizeData=e=>{const t=e.map((e=>e[this.encodings.size[0].field.name])).map(r.convertToNullableNumeric).filter((e=>null!=e)),i=this.aggregateValues(t,this.encodings.size[0].aggregateFunc);return this.sizeFrom?i<this.sizeFrom[0]?this.sizeFrom[0]=i:i>this.sizeFrom[1]&&(this.sizeFrom[1]=i):this.sizeFrom=[i,i],i},this.getColorData=e=>{const t=e.map((e=>e[this.encodings.color[0].field.name])).map(r.convertToNullableNumeric).filter((e=>null!==e));return this.aggregateValues(t,this.encodings.color[0].aggregateFunc)},this.aggregateValues=(e,t)=>{let i=0;switch(t){case"Sum":i=e.reduce(((e,t)=>e+t),0);break;case"Average":e.length&&(i=e.reduce(((e,t)=>e+t),0)/e.length)}return i},this.canCreateChart()&&(this.valueKeys=[null!==(l=null===(s=t[this.encodings.major[0].field.name])||void 0===s?void 0:s.displayName)&&void 0!==l?l:"",null!==(c=null===(d=t[this.encodings.minor[0].field.name])||void 0===d?void 0:d.displayName)&&void 0!==c?c:""],this.encodings.size.length>0&&this.valueKeys.push(null!==(p=null===(u=t[this.encodings.size[0].field.name])||void 0===u?void 0:u.displayName)&&void 0!==p?p:""),this.generateColorMap&&this.valueKeys.push(null!==(m=null===(h=t[this.encodings.color[0].field.name])||void 0===h?void 0:h.displayName)&&void 0!==m?m:""))}}t.ScatterChartBuilder=s},211305:(e,t,i)=>{"use strict";var o=i(564836);Object.defineProperty(t,"__esModule",{value:!0}),t.transformColumnsToDataset=void 0;var n=o(i(496486)),a=i(797311);const r=(e,t)=>n.default.uniq(t.map((t=>t[e])));t.transformColumnsToDataset=n.default.memoize((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return e.map((e=>({name:e.Name||e.model.Name,displayName:i?e.displayName(i):void 0,type:a.sheetTypeToChartType[e.Type||e.model.Type]||"category",originalType:e.Type||e.model.Type,values:r(e.Name||e.model.Name,t)})))}))},797311:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sortNullableNumsOrDatesAsc=t.sortNullableNumsOrDates=t.sheetTypeToChartType=t.padLeadingZero=t.mapRange=t.isNullableNumeric=t.isNullableDate=t.isLeapYear=t.iconTypeForField=t.getWeek=t.getShortMonthName=t.getQuarter=t.getMonthName=t.getDayNameForNumber=t.getDayNameForDate=t.getDateTimeKey=t.generateDateTimeKeyRange=t.daysPerMonth=t.convertToNullableNumeric=t.convertToNullableDate=t.continuousTimeAggregateFuncs=t.cleanData=t.axisNameSettings=t.TRENDLINE_POWER=t.TRENDLINE_POLYNOMIAL=t.TRENDLINE_LOGARITHMIC=t.TRENDLINE_LINEAR=t.TRENDLINE_EXPONENTIAL=t.MONTH_NAMES=t.ENCODING_KEY_SIZE=t.ENCODING_KEY_MINOR=t.ENCODING_KEY_MAJOR=t.ENCODING_KEY_DETAIL=t.ENCODING_KEY_COLOR=t.DEFAULT_EDITOR_STATE=t.DAY_OF_WEEK_NAMES=t.DAYS_PER_MONTH_FOR_COMMON_YEAR=t.CHART_TYPE_SCATTER=t.CHART_TYPE_PIE=t.CHART_TYPE_LINE=t.CHART_TYPE_DOUGHNUT=t.CHART_TYPE_BAR=t.CHART_TYPE_AUTO=t.CHART_TYPE_AREA=t.BASE_SYNTHETIC_ENCODING=t.ALL_TRENDLINES=t.ALL_ENCODING_KEYS=t.ALL_CHART_TYPES=void 0;const i=t.CHART_TYPE_AUTO="auto",o=t.CHART_TYPE_BAR="bar",n=t.CHART_TYPE_LINE="line",a=t.CHART_TYPE_SCATTER="scatter",r=t.CHART_TYPE_AREA="area",s=t.CHART_TYPE_PIE="pie",l=t.CHART_TYPE_DOUGHNUT="doughnut",d=(t.ALL_CHART_TYPES=[i,o,n,a,r,s,l],t.ENCODING_KEY_MAJOR="major"),c=t.ENCODING_KEY_MINOR="minor",u=(t.ENCODING_KEY_DETAIL="detail",t.ENCODING_KEY_COLOR="color"),p=t.ENCODING_KEY_SIZE="size",h=(t.ALL_ENCODING_KEYS=[d,c,u,p],t.TRENDLINE_LINEAR="Linear"),m=t.TRENDLINE_EXPONENTIAL="Exponential",f=t.TRENDLINE_LOGARITHMIC="Logarithmic",g=t.TRENDLINE_POWER="Power",y=t.TRENDLINE_POLYNOMIAL="Polynomial",v=(t.ALL_TRENDLINES=[h,m,f,g,y],t.sheetTypeToChartType={Decimal:"value",Number:"value",Percent:"value",Price:"value",Address:"category",App:"category",ChangeCounter:"category",ChangeLocation:"category",Color:"category",Drawing:"category",Email:"category",Enum:"category",EnumList:"category",File:"category",Image:"category",LatLong:"category",LongText:"category",Multicolumn:"category",Name:"category",Phone:"category",Progress:"category",Ref:"category",Signature:"category",Text:"category",Thumbnail:"category",URL:"category",Video:"category",XY:"category","Yes/No":"category",ChangeTimestamp:"time",Date:"time",DateTime:"time",Duration:"time",Time:"time",
1Synthetic:"synthetic"},t.continuousTimeAggregateFuncs=["Year","Quarter","Month","Week","Day"],t.axisNameSettings={nameLocation:"end",nameGap:7,nameTextStyle:{padding:-4,align:"left"}},t.MONTH_NAMES=["January","February","March","April","May","June","July","August","September","October","November","December"]),b=t.DAYS_PER_MONTH_FOR_COMMON_YEAR=[31,28,31,30,31,30,31,31,30,31,30,31],w=t.DAY_OF_WEEK_NAMES=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],S=(t.DEFAULT_EDITOR_STATE={dataset:{rows:[],fields:[]},config:{chartType:"auto",encodings:{major:[],minor:[],detail:[],color:[],size:[]},flipXY:!1},draggingField:null,draggingEncoding:null},t.BASE_SYNTHETIC_ENCODING={field:{type:"synthetic",name:"Record Count",values:[],displayName:"",originalType:null},aggregateOptions:[],aggregateFunc:"Count"},e=>!isNaN(e));t.isNullableNumeric=S;const x=e=>isNaN(e)||0!==e&&!e?null:+e;t.convertToNullableNumeric=x;const C=e=>!e||!!Date.parse(e);t.isNullableDate=C;const T=e=>e?new Date(e):null;t.convertToNullableDate=T;const I=(e,t,i)=>null===e&&null===t?0:null===e?-1:null===t?1:"Asc"===i?+e-+t:+t-+e;t.sortNullableNumsOrDates=I;const R=(e,t)=>I(e,t,"Asc");t.sortNullableNumsOrDatesAsc=R;const O=e=>{(e=new Date(e.getTime())).setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);const t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)};t.getWeek=O;const D=e=>Math.floor(e.getMonth()/3)+1;t.getQuarter=D;const N=e=>v[e.getMonth()];t.getMonthName=N;const j=e=>N(e).slice(0,3);t.getShortMonthName=j;const E=e=>{const t=e.getDate();switch(t){case 1:return"1st";case 2:return"2nd";case 3:return"3rd";default:return"".concat(t,"th")}};t.getDayNameForDate=E;const A=e=>{if(e>=4&&e<=20)return"".concat(e,"th");switch(e%10){case 1:return"".concat(e,"st");case 2:return"".concat(e,"nd");case 3:return"".concat(e,"rd");default:return"".concat(e,"th")}};t.getDayNameForNumber=A;const P=e=>e<10?"0".concat(e):"".concat(e);t.padLeadingZero=P;const M=(e,t)=>{if(!e||isNaN(e.getTime()))return"null";switch(t){case"Year":return"".concat(e.getFullYear());case"Quarter":return"".concat(e.getFullYear()," Q").concat(D(e));case"Month":return"".concat(j(e)," ").concat(e.getFullYear());case"Week":return"".concat(e.getFullYear()," Week ").concat(O(e));case"Day":return"".concat(e.getFullYear(),"-").concat(P(e.getMonth()+1),"-").concat(P(e.getDate()));case"Quarter Number":return"Q".concat(D(e));case"Month Name":return N(e);case"Week Number":return"Week ".concat(O(e));case"Day of Month":return E(e);case"Day of Week":return w[e.getDay()];case"":return"".concat(e.getTime())}return"null"};t.getDateTimeKey=M;const k=e=>e%4==0&&(e%100!=0||e%400==0);t.isLeapYear=k;t.daysPerMonth=(e,t)=>1===e&&k(t)?29:b[e];t.generateDateTimeKeyRange=(e,t)=>
1{if(e=e.map((e=>new Date(e))),e.sort(R),!t)return e.map((e=>M(e,t)));const i=e.filter(Boolean);if(0===i.length)return[];const o=i[0],n=i[i.length-1],a=new Date(o.getTime()),r=[];switch(t){case"Year":for(;a.getTime()<=n.getTime();)r.push(M(a,t)),a.setFullYear(a.getFullYear()+1,0,1);break;case"Quarter":for(;a.getTime()<=n.getTime();)r.push(M(a,t)),a.setFullYear(a.getFullYear(),a.getMonth()+3,1);break;case"Month":for(;a.getTime()<=n.getTime();)r.push(M(a,t)),a.setFullYear(a.getFullYear(),a.getMonth()+1,1);break;case"Week":for(;a.getTime()<=n.getTime();)r.push(M(a,t)),a.setFullYear(a.getFullYear(),a.getMonth(),a.getDate()+7);break;case"Day":for(;a.getTime()<=n.getTime();)r.push(M(a,t)),a.setFullYear(a.getFullYear(),a.getMonth(),a.getDate()+1);break;case"Quarter Number":r.push("Q1","Q2","Q3","Q4");break;case"Month Name":r.push(...v);break;case"Week Number":for(let e=1;e<=53;e++)r.push("Week ".concat(e));break;case"Day of Month":for(let e=1;e<=31;e++)r.push(A(e));break;case"Day of Week":r.push(...w)}return r};t.mapRange=(e,t,i)=>{if(t[0]===t[1])return i[0];const o=i[0]+(e-t[0])*(i[1]-i[0])/(t[1]-t[0]);return Math.max(Math.min(o,i[1]),i[0])};t.cleanData=e=>{if(!e.length)return{rows:[],fields:[]};e.forEach((e=>{for(const[t,i]of Object.keys(e).map((t=>[t,e[t]])))"string"==typeof i&&(e[t]=i.trim())}));const t=e.reduce(((e,t)=>(Object.keys(t).forEach((i=>{e[i]||(e[i]={name:i,type:"category",values:[],originalType:null,displayName:void 0}),e[i].values.push(t[i])})),e)),{}),i=Object.keys(t).map((e=>t[e])).map((t=>("value"===t.type||t.values.every(S)?(t.values=t.values.map(x).sort(R),t.type="value",e.forEach((e=>e[t.name]=+e[t.name]))):t.values.every(C)?(t.values=t.values.map(T).sort(R),t.type="time",e.forEach((e=>e[t.name]=T(e[t.name])))):t.values=Array.from(new Set(t.values)).sort(),t))).sort(((e,t)=>e.name.localeCompare(t.name)));return{rows:e,fields:i}};t.iconTypeForField=e=>{switch(e.type){case"category":case"synthetic":return"dot";case"value":return"hash";case"time":return"clock"}return"dot"}},943942:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isColumnMetadata=t.getDataSourceUrl=t.UnsavedChangesDialogProps=t.NONE_VALUE=t.IN_CONTEXT_ICON_WRAPPER_WIDTH=t.FORM_CONTROL_MAX_WIDTH=t.FORM_CONTROL_LABEL_WIDTH=t.AUTO_VALUE=t.AUTOMATIC_VALUE=t.ALL_OTHER_COLUMNS=void 0;var o=i(202678);t.AUTO_VALUE="**auto**",t.AUTOMATIC_VALUE="**Automatic**",t.NONE_VALUE="**none**",t.ALL_OTHER_COLUMNS="**all other columns**",t.isColumnMetadata={New:/^\/AppData\/DataSchemas\/\d+\/Attributes\/\d+\/MetaData/,Old:/^\/AppData\/DataSchemas\/\d+\/Attributes\/\d+\/MetaData$/};t.getDataSourceUrl=(e,t)=>
1"/template/showtable?allowExternalRedirect=true&appId=".concat(e,"&tableName=").concat(encodeURIComponent(t));t.FORM_CONTROL_MAX_WIDTH=800,t.FORM_CONTROL_LABEL_WIDTH=218,t.IN_CONTEXT_ICON_WRAPPER_WIDTH=40,t.UnsavedChangesDialogProps={get title(){return(0,o.DiscardUnsavedChanges)()},get agreeText(){return(0,o.Discard)()},get disagreeText(){return(0,o.KeepEditing)()}}},391228:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useIsNewEditorLayout=t.selectIsNewEditorLayout=void 0;var o=i(432981);const n=e=>null==e?void 0:e.editorSettings.inNewEditorLayout;t.selectIsNewEditorLayout=n;t.useIsNewEditorLayout=()=>(0,o.useSelector)(n)},202678:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeepEditing=t.DiscardUnsavedChanges=t.Discard=void 0;var o=i(623583);t.KeepEditing=()=>o.i18n._({id:"4OjqAQ",message:"Keep editing",comment:"Text for a button to dismiss a confirmation dialog and continue editing."});t.DiscardUnsavedChanges=()=>o.i18n._({id:"XkeQtf",message:"Discard unsaved changes?",comment:"Confirmation dialog title asking the user if they want to discard their unsaved changes."});t.Discard=()=>o.i18n._({id:"bzSI52",message:"Discard",comment:"Text for a button that confirms the action to discard unsaved changes."})},275347:()=>{},831777:()=>{},634017:()=>{},159905:()=>{},464604:()=>{},677888:e=>{"use strict";e.exports=JSON.parse('{"name":"list","type":"container","variables":[{"name":"imageName","value":"https://www.appsheet.com/Content/editor/img/empty-media-template.png"},{"name":"labelName","value":"Title goes here"}],"style":{"type":"style","color":{"type":"variable","value":"primaryText","id":"7169c5f7-dbee-4c27-a791-511f7aa9c621"},"border":{"type":"variable","value":"cardBorderStyle"},"borderRadius":{"type":"variable","value":"cardBorderRadius"},"borderColor":{"type":"variable","value":"cardOutline"},"display":"flex","flexDirection":"column","backgroundColor":{"type":"variable","value":"mainContentBackground","id":"bd58227d-e947-4c65-889b-1e4e256752e3"},"fontSize":16,"highlightedUpdate":{"type":"style","border":{"type":"variable","value":"cardBorderStyleSelected"},"borderColor":{"type":"variable","value":"focusColor"}}
1,"id":"bf49015e-053c-4635-b2bf-a3afe738ec61"},"children":[{"type":"container","style":{"type":"style","display":"flex","alignItems":"center","padding":8,"cursor":"pointer","backgroundColor":{"type":"variable","value":"mainContentBackground","id":"0cacd2ef-e515-4884-8ba4-d900d3144ba4"},"borderRadius":{"type":"variable","value":"cardBorderRadius"},"transition":"background 0.8s","hover":{"type":"style","background":{"type":"variable","value":"cardHoverBackground","id":"d220ae1c-9b38-45ec-b75a-b03d8592fede"},"boxShadow":{"type":"variable","value":"cardHoverShadow","id":"d220ae1c-9b38-45ec-b75a-b03d8592fede"},"transition":"background 0.8s","id":"b10155de-960d-4680-99ab-12250e16f9ee"},"highlighted":{"type":"style","background":{"type":"variable","value":"tableRowFocus","id":"d220ae1c-9b38-45ec-b75a-b03d8592fed3"},"id":"b10155de-960d-4680-99ab-12250e16f94e"},"highlightedUpdate":{},"down":{"type":"style","background":{"type":"variable","value":"cardHoverBackground","id":"21f41bc4-1d8f-4212-a6e4-057bd3a8fe0b"},"transition":"background 0.8s","id":"9205c7a9-35ed-4237-b9c8-92d448dc9b11"},"id":"41561a21-2f97-490c-9ca2-d0f862f55568"},"onClick":{"type":"action","id":"bfaf6abf-c1a8-4e20-b27f-24e65c0da7a1"},"children":[{"type":"variable","value":"imageName","child":{"id":"mainImage","type":"image","style":{"type":"style","overflow":"hidden","width":70,"height":70,"borderRadius":"2px","objectFit":"cover","flex":"0 0 70px","alignItems":"center","justifyContent":"center","id":"bc54d99e-c9a5-4f7c-bc5a-7ff388247636"}},"id":"28502c76-f322-4bee-a3dd-3517932edb72"},{"type":"container","style":{"type":"style","display":"flex","flexDirection":"column","marginLeft":16,"flexShrink":1,"flexGrow":0,"overflow":"hidden","id":"1b750d3d-d245-4672-a22d-e194832d833c"},"children":[{"type":"variable","value":"labelName","child":{"id":"labelText","type":"text","style":{"type":"style","id":"507ee6fc-c860-445f-880a-c8682b6bd878"}},"id":"3f58a5eb-8102-4b18-b70c-81c3721275d3"},{"type":"constant","value":"Subtitle goes here","child":{"id":"subtitleText","type":"text","style":{"type":"style","opacity":0.6,"fontSize":12,"maxHeight":40,"id":"0211ba96-1cee-43ff-a277-dc8081acdd07"}},"id":"af00a19c-2913-444c-a6cf-f10de41f6961"}],"id":"cc8e8bdf-8cbf-45fd-9bf6-3cc2da557703"},{"type":"container","style":{"type":"style","justifyContent":"flex-end","flexGrow":1,"display":"flex","id":"03e8ac10-f699-4b0e-b962-c2f9b1beb94e"},"children":[{"type":"ellipsisMenu","style":{"type":"style","color":{"id":"ellipsisColor","type":"variable","value":"primaryText"}},"items":[{"type":"systemAction","style":{"type":"style","id":"771c2038-f239-4584-9a68-8e870783c818"},"onClick":{"type":"action","id":"8969b669-2c65-49b4-8068-f388d058d3af"},"icon":{"type":"constant","value":"fas fa-cheese","id":"e1d07767-257b-4bd2-80c4-cfe0773a3bde"},"text":{"type":"constant","value":"Action 1","id":"ae79459c-e025-4fbd-b8a5-a67c1951a6fa"},"id":"cb2b0d60-7def-4900-93be-de47d032c897"},{"type":"systemAction","style":{"type":"style","id":"cda5f0a8-23ef-44a3-9ac3-4b25a63c857f"},"onClick":{"type":"action","id":"9164b27a-0247-493c-91fe-5759897fd40b"},"icon":{"type":"constant","value":"fas fa-heart","id":"c7e376a4-a10d-4255-a9d2-8e38befe4cea"},"text":{"type":"constant","value":"Action 2","id":"9414fa56-e4d7-4ac7-942d-b88c1433122b"},"id":"e09dfed3-b0ba-4a3a-9d32-f1f34f7b82cb"},{"type":"systemAction","style":{"type":"style","id":"f62e1913-b059-422a-a0ce-c6c1ed939c19"},"onClick":{"type":"action","id":"b4573f97-1ca8-48ea-bffb-e03966b053c9"},"icon":{"type":"constant","value":"fas fa-edit","id":"67e305c4-18ca-47c6-b221-38bb5634e8bd"},"text":{"type":"constant","value":"Action 3","id":"b75ef34e-a76d-4ce7-8ab8-5be5dc3ad59b"},"id":"c65d949d-a0ae-44ef-a7a0-1c3be8b647eb"}],"id":"cdf524ff-9a78-4f03-8b01-e5bde99d56fc"}],"id":"c0bf415a-39e0-4d21-990a-f3fc8afae169"}],"id":"357a17b3-b454-405e-9a77-59fd604173ce"}],"id":"a89b72c9-97cf-43a7-8b48-b3daf0733a83","version":0}')},934250:e=>{"use strict";e.exports=JSON.parse('{"name":"backdrop","type":"container","style":{"type":"style","border":{"type":"variable","value":"cardBorderStyle"},"borderColor":{"type":"variable","value":"cardOutline"},"borderRadius":{"type":"variable","value":"cardBorderRadius"},"highlighted":{"type":"style","background":{"type":"variable","value":"tableRowFocus","id":"d220ae1c-9b38-45ec-b75a-b03d8592fed3"},"id":"b10155de-960d-4680-99ab-12250e16f94e"},"highlightedUpdate":{"type":"style","border":{"type":"variable","value":"cardBorderStyleSelected"},"borderColor":{"type":"variable","value":"focusColor"}},"hover":{"type":"style","boxShadow":{"type":"variable","value":"cardHoverShadow","id":"d220ae1c-9b38-45ec-b75a-b03d8592fede"},"id":"b10155de-960d-4680-99ab-12250e16f9ee"},"down":{"type":"style","boxShadow":{"type":"variable","value":"cardHoverShadow","id":"21f41bc4-1d8f-4212-a6e4-057bd3a8fe0b"},"id":"9205c7a9-35ed-4237-b9c8-92d448dc9b11"},"id":"5565025e-650f-4756-834f-fc76c1452f14"},"children":[{"type":"container","variables":[{"name":"imageName","value":"https://www.appsheet.com/Content/editor/img/empty-media-template.png"},{"name":"labelName","value":"Title goes here"}],"style":{"type":"style","color":{"type":"variable","value":"primaryText","id":"adc79778-8152-45c3-9f9f-385a029fe3dd"},"cursor":"pointer","display":"flex","flexDirection":"column","fontSize":14,"width":"100%","height":180,"id":"7e9c6f6b-1317-4bc0-8078-b73d93505ad6"},"children":[{"type":"container","onClick":{"type":"action","id":"mainClickAction"},"style":{"type":"style","width":"100%","height":180,"position":"relative","id":"9f2851c3-222d-4bee-9c1e-fbcc2dd29cae","background":{"type":"variable","value":"mainContentBackgroun
1d"},"borderRadius":{"type":"variable","value":"cardBorderRadius"}},"children":[{"type":"variable","value":"imageName","child":{"id":"backdropImage","type":"image","style":{"type":"style","position":"absolute","top":0,"width":"100%","height":"100%","objectFit":"cover","borderRadius":"4px","id":"1dde03a5-6cf5-4f77-80c1-8ee8183cb992"}},"id":"73d1e9f7-8bde-431a-8a00-3bc65978d49d"},{"type":"container","style":{"type":"style","position":"absolute","pointerEvents":"none","height":"100%","width":"100%","background":"linear-gradient(to top, #666, transparent 25%)","id":"fd32372a-8617-45dc-99ec-9e8309986a58"},"children":[],"id":"56cac10f-d5c3-4615-97a0-7ff56a746699"},{"type":"constant","value":"Title goes here","child":{"type":"text","id":"title","style":{"type":"style","color":"black","padding":8,"position":"absolute","bottom":16,"left":16,"borderRadius":"2px","background":"rgba(255, 255, 255, 0.7)","id":"82a18f49-360c-4040-91b7-812ef844655a"}},"id":"1c1abed9-59f0-4685-9155-d1cf58a5f891"}],"id":"136c1665-773b-405e-9024-96b6f68c70f6"}],"id":"4793d251-b41f-4c3b-903c-eb46a91ac534"}],"id":"65d73dd3-8f45-4d7a-ad4c-83e3ba060076","version":0}')},754531:e=>{"use strict";e.exports=JSON.parse('{"name":"photo","type":"container","style":{"type":"style","padding":8,"backgroundColor":"transparent","boxSizing":"border-box","id":"2dfab398-1f6a-439c-9c5f-d8bfed642592"},"children":[{"type":"container","onClick":{"type":"action","id":"mainClickAction"},"variables":[{"name":"imageName","value":"https://www.appsheet.com/Content/editor/img/empty-media-template.png"},{"name":"labelName","value":"Title goes here"}],"style":{"type":"style","color":{"type":"variable","value":"primaryText","id":"29018101-6c73-4014-839e-1fa5d55bf544"},"display":"flex","flexDirection":"column","cursor":"pointer","background":{"type":"variable","value":"mainContentBackground","id":"e47e18e3-c05c-4a4e-9553-0535c09cba71"},"border":{"type":"variable","value":"cardBorderStyle"},"borderRadius":{"type":"variable","value":"cardBorderRadius"},"borderColor":{"type":"variable","value":"cardOutline"},"highlighted":{"type":"style","background":{"type":"variable","value":"tableRowFocus","id":"d220ae1c-9b38-45ec-b75a-b03d8592fed3"},"id":"b10155de-960d-4680-99ab-12250e16f94e"},"highlightedUpdate":{"type":"style","border":{"type":"variable","value":"cardBorderStyleSelected"},"borderColor":{"type":"variable","value":"focusColor"}},"hover":{"type":"style","boxShadow":{"type":"variable","value":"cardHoverShadow","id":"d220ae1c-9b38-45ec-b75a-b03d8592fede"},"id":"b10155de-960d-4680-99ab-12250e16f9ee"},"down":{"type":"style","boxShadow":{"type":"variable","value":"cardHoverShadow","id":"21f41bc4-1d8f-4212-a6e4-057bd3a8fe0b"},"id":"9205c7a9-35ed-4237-b9c8-92d448dc9b11"},"fontSize":14,"id":"8027a268-6a7a-420a-bd3e-bd1d6f2d4791"},"children":[{"type":"container","style":{"type":"style","display":"flex","flexDirection":"column","id":"54334a98-55fb-47d4-a19d-2178aa3810ab"},"children":[{"type":"container","style":{"type":"style","display":"flex","alignItems":"center","justifyContent":"flex-start","padding":16,"id":"b3480a13-a59b-4845-9183-cb382fbf4bb6"},"children":[{"type":"constant","value":"https://www.appsheet.com/Content/editor/img/empty-media-template.png","child":{"id":"mainImage","type":"image","style":{"type":"style","overflow":"hidden","width":40,"height":40,"borderRadius":"50%","objectFit":"cover","flex":"0 0 40px","id":"08b2ff66-db02-4986-a506-90ad44e64fe3"}},"id":"a4046669-eeaf-4fba-b60a-b801ec7bdd77"},{"type":"container","style":{"type":"style","display":"flex","flexDirection":"column","marginLeft":16,"flexShrink":1,"flexGrow":0,"overflow":"hidden","id":"3412b50f-9301-44de-8604-b7986b3df1ee"},"children":[{"type":"variable","value":"labelName","child":{"id":"labelText","type":"text","style":{"type":"style","fontSize":14,"fontWeight":"bold","id":"0381f842-cef3-4916-98ab-0652fe5f9364"}},"id":"098d9ec0-ce0c-4d81-ac6b-273419a9611b"},{"type":"constant","value":"Subtitle goes here","child":{"id":"subtitleText","type":"text","style":{"type":"style","opacity":0.6,"fontSize":12,"maxHeight":40,"id":"370589e1-a092-47df-9afe-c03372005584"}},"id":"ea61f212-ed17-45cc-abbc-f7b86af54436"}],"id":"562105ab-a45e-4192-ad67-639920301de9"}],"id":"eb2723f4-e9d3-4899-9a0a-2b28190303eb"}],"id":"13f6bf02-3034-4f1c-8ff2-4ac14ca19d9f"},{"type":"variable","value":"imageName","child":{"id":"instaImage","type":"image","style":{"type":"style","width":"100%","height":150,"objectFit":"cover","borderRadius":{"type":"variable","value":"cardImageBorderRadius"},"id":"9a844d1c-fced-4724-b2fa-81349bef45a7"}},"id":"e7a6aea8-e6dd-44c6-a9f7-75c80f866016"}],"id":"d6286ba5-0f82-4d9d-ac94-c415ab502d0a"}],"id":"47f15e4a-3aa7-4096-9fc6-d84759c25260","version":0}')},572650:e=>{"use strict";e.exports=JSON.parse('{"name":"large","type":"container","style":{"type":"style","backgroundColor":"transparent","padding":8,"boxSizing":"border-box","height":"100%","id":"18803ca8-6cbf-41d7-b090-4509e0201431"},"variables":[{"name":"imageName","value":"https://www.appsheet.com/Content/editor/img/empty-media-template.png"},{"name":"labelName","value":"Title goes here"}],"children":[{"type":"container","onClick":{"type":"action","id":"mainClickAction"},"style":{"type":"style","color":{"type":"variable","value":"primaryText","id":"10ee5459-af8f-45ac-b486-193a9968c81e"},"height":"100%","cursor":"pointer","display":"flex","flexDirection":"column","justifyContent":"space-between","background":{"type":"variable","value":"mainContentBackgroun
1d","id":"847233a2-0243-4f05-ac39-9d608383512f"},"border":{"type":"variable","value":"cardBorderStyle"},"borderRadius":{"type":"variable","value":"cardBorderRadius"},"borderColor":{"type":"variable","value":"cardOutline"},"highlighted":{"type":"style","background":{"type":"variable","value":"tableRowFocus","id":"d220ae1c-9b38-45ec-b75a-b03d8592fed3"},"id":"b10155de-960d-4680-99ab-12250e16f94e"},"highlightedUpdate":{"type":"style","border":{"type":"variable","value":"cardBorderStyleSelected"},"borderColor":{"type":"variable","value":"focusColor"}},"hover":{"type":"style","boxShadow":{"type":"variable","value":"cardHoverShadow","id":"d220ae1c-9b38-45ec-b75a-b03d8592fede"},"id":"b10155de-960d-4680-99ab-12250e16f9ee"},"down":{"type":"style","boxShadow":{"type":"variable","value":"cardHoverShadow","id":"21f41bc4-1d8f-4212-a6e4-057bd3a8fe0b"},"id":"9205c7a9-35ed-4237-b9c8-92d448dc9b11"},"fontSize":14,"id":"0ed6623e-e7c8-4fc6-af1f-01adbfb245a0"},"children":[{"type":"container","style":{"type":"style","display":"flex","flexDirection":"column","id":"b326848a-0e5d-45b6-92e7-18b1eaff4fbf"},"children":[{"type":"container","style":{"type":"style","display":"flex","alignItems":"center","padding":16,"justifyContent":"flex-start","maxHeight":180,"overflow":"hidden","id":"ae5d4091-fbd2-4ae7-82e0-564ca1ea2a77"},"children":[{"type":"constant","value":"https://www.appsheet.com/Content/editor/img/empty-media-template.png","child":{"id":"headerAvatar","type":"image","style":{"type":"style","overflow":"hidden","width":40,"height":40,"marginRight":8,"borderRadius":"50%","objectFit":"cover","flex":"0 0 40px","id":"22ed7929-a8cb-4a0a-b78b-fe7853b18125"}},"id":"63273175-9e0e-4379-95b5-8da5342d6fa8"},{"type":"container","style":{"type":"style","display":"flex","flexDirection":"column","flexShrink":1,"flexGrow":0,"id":"fe240110-04af-4b08-983c-f4e4624c8207"},"children":[{"type":"variable","value":"labelName","child":{"id":"topLabel","type":"text","style":{"type":"style","fontSize":14,"fontWeight":"bold","id":"4fc94630-1b53-4c2e-8477-826a4ef826c6"}},"id":"c58c3166-430e-40ee-b9e1-cab07ce2b356"},{"type":"constant","value":"Subtitle goes here","child":{"id":"subtitleText","type":"text","style":{"type":"style","opacity":0.6,"fontSize":12,"maxHeight":40,"id":"32687c50-44cb-4d0d-a848-d84a72d94ef2"}},"id":"6d1502ac-f3f3-4ce9-91ce-1f632c1a706b"}],"id":"7be4f9c6-7504-426f-b944-5a94795c043f"}],"id":"704fef38-ab0b-4dd1-95d6-8a07a7990d5f"}],"id":"af91500b-b30c-4746-9c04-115cba83dd48"},{"type":"variable","value":"imageName","child":{"id":"media","type":"image","style":{"type":"style","width":"100%","height":194,"objectFit":"cover","borderRadius":{"type":"variable","value":"cardImageBorderRadius"},"id":"3a9f1a4f-a1c1-4e0b-b789-dcf4b8995969"}},"id":"389aa175-46a6-4aa3-86a5-e62e641007fc"},{"type":"container","id":"headerTextContainer","style":{"type":"style","padding":16,"overflowWrap":"break-word"},"children":[{"type":"constant","value":"Header goes here","child":{"id":"label","type":"text","style":{"type":"style","fontSize":21,"lineHeight":1.15,"id":"97559953-75d9-4b10-919d-c416d183b4c9"}},"id":"c6a3a013-0faf-4db7-8829-39efc6704784"},{"type":"constant","value":"Subheader goes here.","child":{"id":"subheader","type":"text","style":{"type":"style","fontSize":14,"opacity":0.6,"paddingTop":4,"id":"f3a98f74-a901-451b-9b64-8c00e5632325"}},"id":"bba2d2cb-c355-43aa-a0a3-46e89a578400"}]},{"type":"constant","value":"This is a long piece of text. The description goes here and has a bunch of text to display like this.","child":{"id":"description","type":"text","style":{"type":"style","fontSize":14,"padding":16,"paddingTop":8,"paddingBottom":0,"marginBottom":16,"WebkitLineClamp":4,"overflow":"hidden","WebkitBoxOrient":"vertical","display":"-webkit-box","id":"f3a98f74-a901-451b-9b64-8c00e5632327"}},"id":"bba2d2cb-c355-43aa-a0a3-46e89a5783d0"},{"type":"container","style":{"type":"style","display":"flex","alignItems":"center","justifyContent":"space-between","padding":8,"paddingTop":0,"paddingBottom":0,"id":"5fa06ef2-6010-4c1e-aa84-668f8ac967aa"},"variables":[{"name":"actionButtonTextStyle","value":{"type":"style","maxHeight":60,"maxWidth":100,"display":"flex","alignItems":"center","overflow":"hidden","overflowWrap":"break-word","textTransform":"uppercase","fontSize":12,"cursor":"pointer","color":{"type":"variable","value":"actionIcon"},"border":5,"padding":8,"transition":"background 0.8s","hover":{"type":"style","background":{"type":"variable","value":"mainBackgroun
1dVariant"},"transition":"background 0.8s"},"down":{"type":"style","background":{"type":"variable","value":"mainBackgroundVariant"},"transition":"background 0.8s"}}},{"name":"actionButtonIconStyle","value":{"type":"style","fontSize":16,"display":"flex","alignItems":"center","color":{"type":"variable","value":"secondaryText"},"border":"50%","cursor":"pointer","padding":16,"transition":"background 0.8s","hover":{"type":"style","background":{"type":"variable","value":"mainBackgroundVariant"},"transition":"background 0.8s"},"down":{"type":"style","background":{"type":"variable","value":"mainBackgroundVariant"},"transition":"background 0.8s"}}}],"children":[{"type":"constant","value":"Action 1","child":{"id":"Action 1","type":"text","onClick":{"type":"action","id":"8faa486e-80a1-4bf8-9911-ff05823f7018"},"style":{"type":"variable","value":"actionButtonTextStyle","id":"4fcb9585-70b2-4bc0-a407-be6849bea1a7"}},"id":"c503ebe1-33d7-49e6-979d-a4f4a0345863"},{"type":"constant","value":"Action 2","child":{"id":"Action 2","type":"text","onClick":{"type":"action","id":"fb9d48ba-a444-4617-8859-7065b058efac"},"style":{"type":"variable","value":"actionButtonTextStyle","id":"77f5bd38-248e-4f75-bf97-18e3b5c54d50"}},"id":"63cee5fc-bcf9-4cce-bcfe-d330b69732b9"},{"type":"container","style":{"type":"style","display":"flex","alignItems":"center","marginLeft":"auto","id":"ff7fc872-bf93-4502-963e-ecfc16771fd8"},"children":[{"type":"constant","value":"far fa-heart","child":{"id":"Action 3","type":"icon","onClick":{"type":"action","id":"c49470ae-b53e-4109-9bb7-d85a93cd0fdf"},"style":{"type":"variable","value":"actionButtonIconStyle","id":"cd0faa93-c489-4d7b-bcd9-c8dd3e551dd1"}},"id":"45097ee1-733e-4faa-b049-2e9be8ba402b"},{"type":"constant","value":"fas fa-share-alt","child":{"id":"Action 4","type":"icon","onClick":{"type":"action","id":"aaba7aa9-9bc5-4ca5-aef0-0e834f3b26e2"},"style":{"type":"variable","value":"actionButtonIconStyle","id":"441cc05d-5e46-4753-bd34-6053ef27f305"}},"id":"5205cdc0-a69d-4f46-9a0a-4cc48950745a"}],"id":"65eb11c1-7b76-4565-9284-94d6783d8ec0"}],"id":"2a07cf3b-cdec-4e45-90cb-f2b2e14dae8d"}],"id":"55f59616-6c4f-48c8-88cc-1edd8388e4c9"}],"id":"52405288-3f27-45d7-8c68-c7d489a76db4","version":0}')}}]);
2//# sourceMappingURL=/cloud-sources/prod/a1ffabe9baad3d0353466db172f19a5888eb7148b0e3144885710a79c4f5ddb0.map/

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.