!function(){PDF_ICON_URL=makeStaticLink("images/document_pdf.svg");TIFF_ICON_URL=makeStaticLink("images/document_tiff.svg");ESIGN_ICON_URL=makeStaticLink("images/document_esigned.svg");VIDEO_ICON_URL=makeStaticLink("images/document_vid.svg");AUDIO_ICON_URL=makeStaticLink("images/document_audio.svg");NON_PDF_ICON_URL=makeStaticLink("images/document_img.svg");$$WP.Utilities.guaranteeExistence($$WP,"Documents.ViewDocument.Models");var n=$$WP.Strings.getNamespace("viewdocument"),t=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b){n||((n={}).DocID=i,n.DcsID=r,n.DocType=u,n.DocExt=f,n.DocDesc=e,n.Date=o,n.DAT=s,n.PendingApprovalStatus=h,n.RejectionReasonFreetext=c,n.WasESigned=l,n.DownloadOnly=a,n.FncInternalID=v,n.Csn=w,n.Page=b);this.LetterID=y;this.IsHNOOnly=Boolean(p);this.Template=$$WP.Templates.Documents.ViewDocument.Document;this.WP$Common$Model(n);this.setStatusInfo(n.PendingApprovalStatus,n.RejectionReasonFreetext);this.makeUrl();this.setupDocType();this.stringOverrides=t;this.setStrings(t)};t.prototype={s_dataMembers:["DocID","DcsID","DocType","DocExt","Date","DocDesc","WasESigned","DAT","DownloadOnly","FncInternalID","New","DateRaw","IsExpired","PesID","Csn","Page"],DocID:null,DcsID:null,DocType:null,DocExt:null,Date:null,DAT:null,DocDesc:null,WasESigned:null,DownloadOnly:!1,FncInternalID:null,New:!1,DateRaw:null,IsExpired:!1,stringOverrides:null,PesID:null,Csn:"",Page:null,Url:null,DownloadUrl:null,IconUrl:null,Template:null,ToolTipString:null,TimeStampString:null,PendingApproval:!1,Rejected:!1,RejectionReason:"",BadgeHoverText:"",BadgeText:"",LetterID:null,IsHNOOnly:!1,MediaType:"",MimeType:"",PopupBackButtonText:"",_NewWindow:!1,AllowPreview:!0,AllowPrint:!0,AllowDownload:!0,makeUrl:function(){var n="Documents/ViewDocument/Download/?docId="+this.DocID+"&dcsId="+this.DcsID+"&csn="+this.Csn+"&DocExt="+this.DocExt;this.FncInternalID&&(n=n+"&fncInternalId="+this.FncInternalID);this.Page&&(n=n+"&page="+this.Page);this.DownloadUrl=makeLink(n)},setupDocType:function(){switch(this.AllowPreview=!0,this.AllowDownload=!(this.WasESigned&&(!this.DocID||""===this.DocID)),this.AllowPrint=!0,this.DocExt){case"PDF":this.IconUrl=PDF_ICON_URL;this.IconAltText=n.getStringForTemplate("documentPDFIconAltText");this.Template=$$WP.Templates.Documents.ViewDocument.PDFDocument;this.Url=this.DownloadUrl+"&method=view";this.AllowDownload=!1;(WP.DOM.Browser.isLegacyEdge||WP.DOM.Browser.isSafari)&&(this.AllowDownload=!0);break;case"PCX":this.DownloadOnly=!0;this.IconUrl=NON_PDF_ICON_URL;this.IconAltText=n.getStringForTemplate("documentImageIconAltText");break;case"TIFF":case"TIF":this.Page?(this.IconUrl=NON_PDF_ICON_URL,this.Url=this.DownloadUrl+"&method=view",this.IconAltText=n.getStringForTemplate("documentImageIconAltText")):(this.IconUrl=TIFF_ICON_URL,this.IconAltText=n.getStringForTemplate("documentTiffIconAltText"),this.Template=$$WP.Templates.Documents.ViewDocument.TiffDocument,this.Url=makeLink("Documents/ViewDocument/GetTiff?docId="+this.DocID+"&dcsId="+this.DcsID+(this.FncInternalID?"&fncInternalId="+this.FncInternalID:"")+(this.Csn?"&csn="+this.Csn:"")));break;case"MP4":case"M4V":this.IconUrl=VIDEO_ICON_URL;this.IconAltText=n.getStringForTemplate("documentVideoIconAltText");this.Template=$$WP.Templates.Documents.ViewDocument.VideoDocument;this.MediaType="video";this.MimeType="video/mp4";break;case"M4A":this.IconUrl=AUDIO_ICON_URL;this.IconAltText=n.getStringForTemplate("documentAudioIconAltText");this.Template=$$WP.Templates.Documents.ViewDocument.VideoDocument;this.MediaType="audio";this.MimeType="audio/mp4";break;case"MP3":this.IconUrl=AUDIO_ICON_URL;this.IconAltText=n.getStringForTemplate("documentAudioIconAltText");this.Template=$$WP.Templates.Documents.ViewDocument.VideoDocument;this.MediaType="audio";this.MimeType="audio/mp3";break;case"WEBM":case"WEBMV":this.IconUrl=VIDEO_ICON_URL;this.IconAltText=n.getStringForTemplate("documentVideoIconAltText");this.Template=$$WP.Templates.Documents.ViewDocument.VideoDocument;this.MediaType="video";this.MimeType="video/webm";break;case"WEBMA":this.IconUrl=AUDIO_ICON_URL;this.IconAltText=n.getStringForTemplate("documentAudioIconAltText");this.Template=$$WP.Templates.Documents.ViewDocument.VideoDocument;this.MediaType="audio";this.MimeType="audio/webm";break;case"OGG":case"OGV":this.IconUrl=VIDEO_ICON_URL;this.IconAltText=n.getStringForTemplate("documentVideoIconAltText");this.Template=$$WP.Templates.Documents.ViewDocument.VideoDocument;this.MediaType="video";this.MimeType="video/ogg";break;case"OGA":this.IconUrl=AUDIO_ICON_URL;this.IconAltText=n.getStringForTemplate("documentAudioIconAltText");this.Template=$$WP.Templates.Documents.ViewDocument.VideoDocument;this.MediaType="audio";this.MimeType="audio/ogg";break;case"FLV":case"MOV":case"3GP":case"3GPP":case"MPG":case"MPEG":case"WMV":case"AVI":this.IconUrl=VIDEO_ICON_URL;this.IconAltText=n.getStringForTemplate("documentVideoIconAltText");this.Template=$$WP.Templates.Documents.ViewDocument.VideoDocument;this.MediaType="video";break;case"WAV":this.IconUrl=AUDIO_ICON_URL;this.IconAltText=n.getStringForTemplate("documentAudioIconAltText");this.Template=$$WP.Templates.Documents.ViewDocument.VideoDocument;this.MediaType="audio";break;case"HTML":this.IconUrl=ESIGN_ICON_URL;this.IconAltText=n.getStringForTemplate("documentESignIconAltText");this.IsHTML=!0;this.Template=this.IsHNOOnly?$$WP.Templates.Documents.ViewDocument.LetterNote:$$WP.Templates.Documents.ViewDocument.ESignedDocument;this.Url=this.DownloadUrl+"&method=view";break;default:this.IconUrl=NON_PDF_ICON_URL;this.Url=this.DownloadUrl+"&method=view";this.IconAltText=n.getStringForTemplate("documentImageIconAltText")}-1!==["DOC","DOCX","MP4","M4V","M4A","MP3","WEBM","WEBMV","WEBMA","OGG","OGV","OGA","FLV","MOV","3GP","3GPP","MPG","MPEG","WMV","AVI","WAV"].indexOf(this.DocExt)&&(this.AllowPreview=!1,this.AllowPrint=!1);$$WP.Utilities.UI.IsMobile&&(this.AllowPrint=!1,this.AllowDownload=!1);($$WP.Utilities.UI.IsMobile||WP.DOM.Browser.isAndroid||WP.DOM.Browser.isIPod||WP.DOM.Browser.isIPhone||WP.DOM.Browser.isIPad)&&-1!==["PDF"].indexOf(this.DocExt)&&(this.AllowPreview=!1,this._NewWindow=!0)},setStrings:function(t){"1"===this.WasESigned||!0===this.WasESigned?($$WP.Strings.addMnemonic("@MYCHART@DATESIGNED@",this.Date),this.TimeStampString=n.getStringForTemplate("signed"),$$WP.Strings.removeMnemonic("@MYCHART@DATESIGNED@")):this.Rejected||this.PendingApproval?($$WP.Strings.addMnemonic("@MYCHART@DATEUPLOADED@",this.Date),this.TimeStampString=n.getStringForTemplate("uploaded","documents.viewdocument"),$$WP.Strings.removeMnemonic("@MYCHART@DATEUPLOADED@"),this.PendingApproval&&(this.BadgeHoverText=n.getString("pendingDocumentBadgeHoverText"),this.BadgeText=n.getString("pendingDocumentBadgeText"),t.PendingBadgeText&&(this.BadgeText=t.PendingBadgeText)),this.Rejected&&(this.BadgeHoverText=n.getString("rejectedDocumentBadgeHoverText"),this.BadgeText=n.getString("rejectedDocumentBadgeText"),t.RejectedBadgeText&&(this.BadgeText=t.RejectedBadgeText))):($$WP.Strings.addMnemonic("@MYCHART@DATEADDED@",this.Date),this.TimeStampString=n.getStringForTemplate("added"),$$WP.Strings.removeMnemonic("@MYCHART@DATEADDED@"),t.AcceptedBadgeText&&(this.BadgeText=t.AcceptedBadgeText));this.IsExpired&&(this.BadgeHoverText=n.getString("expiredDocumentBadgeHoverText"),this.BadgeText=n.getString("expiredDocumentBadgeText"),t.ExpiredBadgeText&&(this.BadgeText=t.ExpiredBadgeText));"PDF"===this.DocExt?(n.addMnemonic("@MYCHART@DOWNLOADLINK@",this.DownloadUrl,$$WP.Strings.EncodingTypes.None),this.FallbackText=$afe.select("html").hasClass("mobile")?n.getStringForTemplate("cannotDisplayMobile"):n.getStringForTemplate("noEmbeddedPdf"),n.removeMnemonic("@MYCHART@DOWNLOADLINK@")):"TIFF"===this.DocExt||"TIF"===this.DocExt?(n.addMnemonic("@MYCHART@DOWNLOADLINK@",this.DownloadUrl,$$WP.Strings.EncodingTypes.None),$$WP.Utilities.UI.IsMobile?this.FallbackText=n.getStringForTemplate("cannotDisplayMobile"):($$WP.Strings.addMnemonic("@MYCHART@DOWNLOADLINK@",this.DownloadUrl,$$WP.Strings.EncodingTypes.None),this.FallbackText=n.getStringForTemplate("noAcordex"),$$WP.Strings.removeMnemonic("@MYCHART@DOWNLOADLINK@")),n.removeMnemonic("@MYCHART@DOWNLOADLINK@")):-1!==["DOC","DOCX","MP4","M4V","M4A","MP3","WEBM","WEBMV","WEBMA","OGG","OGV","OGA","FLV","MOV","3GP","3GPP","MPG","MPEG","WMV","AVI","WAV"].indexOf(this.DocExt)&&$$WP.Utilities.UI.IsMobile?this.FallbackText=n.getStringForTemplate("useComputerToDownload"):(n.addMnemonic("@MYCHART@FILEEXTENSION@",this.DocExt),this.FallbackText=n.getString("noFilePreview"),n.removeMnemonic("@MYCHART@FILEEXTENSION@"));n.addMnemonic("@MYCHART@DOCTYPE@",this.DocType,$$WP.Strings.EncodingTypes.None);this.ToolTipString=n.getString("documenttooltip");n.removeMnemonic("@MYCHART@DOCTYPE@");t.PopupBackButtonText&&(this.PopupBackButtonText=t.PopupBackButtonText)},openDocument:function(n){var t=WP.DOM.Browser.isIPod||WP.DOM.Browser.isIPhone||WP.DOM.Browser.isIPad;this.AllowPreview?this._openAsPopup(n):"undefined"==typeof Android||Android.webViewDownloadEnabled&&!0===Android.webViewDownloadEnabled()?($$WP.Utilities.UI.IsMobile||WP.DOM.Browser.isAndroid||t)&&-1!==["MP4","M4V","WEBMV","OGV","MOV","WMV","AVI","FLV"].indexOf(this.DocExt)?this._openAsPopup(n):this.openAsNewPage():(this.AllowPreview=!0,this._openAsPopup(n))},overrideUrl:function(n){this.Url=n;this.DownloadUrl=n+"&forceAttachment=true";this.setStrings(this.stringOverrides)},_openAsPopup:function(n){var e,o,s,a=this.WasESigned?" esign ":"",r,h,t,u,c,i,f,l;return((e=new $$WP.Documents.ViewDocument.Components.DocumentComponent(this),o={HasOverlay:!0,Size:this.AllowPreview?$$WPContain.Popup.SizeEnum.LARGE:$$WPContain.Popup.SizeEnum.SMALL,Class:"documentpopup "+a+n,positioningFunction:$$WPContain.Positions.InsideNearTop,HasBackButton:!0,BackButtonText:this.PopupBackButtonText},(s=$$WPUtil.quickPopup(e,o)).addEventListener("click",$.proxy(this._onClick,this,s)),$$WPUtil.ShowAjaxSpinner($afe.select(".documentpopup .ajaxspinner")),$$WP.Utilities.UI.IsMobile&&("TIFF"===this.DocExt||"TIF"===this.DocExt))&&(r=$afe.select(".Popup.documentpopup"),h=this._computeRemainingHeightOfPopup(r),r.find("iframe.tiffviewer").css("height",h+"px")),"PDF"===this.DocExt&&(this._pfdResize(),$afe.jq(window).on("resize.pdfViewer",this._pfdResize)),"1"===this.WasESigned||!0===this.WasESigned)?!1:(t=$afe.jq($afe.select(".documentpopup img#section-to-print")),u=0,($afe.jq(t).on("load",function(){$afe.jq(window).trigger("popupResize");++u==t.length&&$$WPUtil.HideAjaxSpinner($afe.select(".documentpopup .ajaxspinner"))}),$afe.jq(t).on("error",$.proxy(this._onImageFailure,this)),t.length>0)&&(c=this,setTimeout(function(){t.length!==u&&c._onImageFailure(2)},3e4)),i=$.proxy(this._resize,this),f=$afe.select(".documentpopup video"),"audio"!=this.MediaType&&"video"!=this.MediaType||initAllPlayers(),$afe.jq(f).on("loadeddata",i),$afe.jq(f).on("error",i),l=$afe.select(".documentpopup object"),$afe.jq(l).on("load",i),!1)},_onClick:function(n,t){return t.dataId===$$WPComp.TOOLBARIDENTIFIER+"downloadfile"?(this._initiateDownload(),t.stopPropagation(),t.preventDefault(),n.dispose(),!1):"downloadIcon"===t.dataId?(this._initiateDownload(),!1):"printIcon"!==t.dataId||(this.PrintClicked(t),!1)},_initiateDownload:function(){var n,t;WP.Events.showBeforeUnloadMessage()&&(WP.Events.cancelBeforeUnload(),t=!0);this.DownloadUrl.length>0&&((n=$afe.select("iframe#uploadWidget-downloadFrame"))&&0!==n.length||((n=$afe.jq(document.createElement("iframe"))).safeAttr("name","uploadWidget-downloadFrame"),n.safeAttr("id","uploadWidget-downloadFrame"),n.prop("width","0"),n.prop("height","0"),$afe.jq(document.body).safeAppend(n)),n.prop("src",this.DownloadUrl));t&&WP.Events.beforeUnload()},_sendDownloadUrl:function(){$$WP.Utilities.TryRedirect(makeLink("Documents/ViewDocument?dcsid="+this.DcsID+"&docExt="+this.DocExt))},_onImageFailure:function(t){var i=this.FallbackText,r=$afe.select(".viewdocument-popup--error");2===t&&(i=n.getString("errorLoadTime"));$$WPUtil.HideAjaxSpinner($afe.select(".documentpopup .ajaxspinner"));$afe.select(".documentpopup #section-to-print").remove();$afe.select(".documentpopup .options").remove();dangerou$.setHtml(r,i);r.removeClass("hidden");$afe.jq(window).trigger("popupResize")},_resize:function(){$afe.jq(window).trigger("popupResize");$$WPUtil.HideAjaxSpinner($afe.select(".documentpopup .ajaxspinner"))},_pfdResize:function(){var t=$afe.select(".Popup.documentpopup").get(0),n;if(null!=t){if(isDataTile())n=.8*$(parent.window).height();else{var f=getComputedStyle(t).position,i=$afe.jq(window).innerHeight(),e=$afe.select("#header").outerHeight(),r=$afe.select(".Popup > .scrollable > .titlebar").outerHeight(),u=$afe.select(".Popup > .scrollable > .toolbar").outerHeight();n="fixed"===f?i-r-u:i-2*e-u-r}$afe.select(".documentpopup object").height(n)}else $afe.jq(window).off("resize.pdfViewer","",this._pfdResize)},_computeRemainingHeightOfPopup:function(n){var t=parseInt(n.find(".content").first().css("max-height"),10),i;return isNaN(t)?(i=n.get(0).getBoundingClientRect(),$(window).height()-i.bottom-10):t-n.height()-10},PrintClicked:function(){var u,t,n,i,r,f;return(t=document.getElementById("printFrame"))||(t=document.createElement("iframe"),(n=$afe.jq(t)).safeAttr("name","printFrame"),n.safeAttr("id","printFrame"),n.prop("width","0"),n.prop("height","0"),n.prop("src","about:blank"),$afe.jq(document.body).safeAppend(n),n.contents().find("head").safeAppend($afe.jq(document.createElement("title"))),n.on("load",function(){var t=document.getElementById("printFrame"),n;for((i=$afe.jq(t).contents().find("body")).find("._headerContent").css("padding","inherit").css("width","inherit").css("min-height","inherit"),i.find("._mainContent").css("padding","inherit").css("width","inherit").css("min-height","inherit"),i.find("._footerContent").css("padding","inherit").css("width","inherit").css("min-height","inherit"),i.find("canvas").css("background-color","#eee").css("border","1px #ccc solid"),images=i.find("img"),n=0;n<images.length;n++)$afe.jq(images[n]).css("max-width","7in");t.contentWindow.print()})),n=$afe.jq(t),r=n.contents().find("head"),f=$afe.select(".titlebar h2")[0],r.find("title").text(f?f.innerHTML:""),u=$afe.select(".esigned"),(i=u.length>0?dangerou$.parseHtml(u[0].innerHTML):dangerou$.parseHtml($afe.select("#section-to-print")[0].outerHTML.replace("method=view","method=print"))).find("style[nonce]").safeAttr("nonce",$$WPUtil.GetPageNonce()),navigator.userAgent.toLowerCase().indexOf("safari/")>-1&&-1===navigator.userAgent.toLowerCase().indexOf("chrome/")?setTimeout(function(){t.contentWindow.document.write(r[0].outerHTML+i[0].outerHTML);t.contentWindow.document.close()},200):(t.contentWindow.document.write(r[0].outerHTML+i[0].outerHTML),t.contentWindow.document.close()),!1},openAsNewPage:function(){var t=this.DownloadUrl;WP.Events.showBeforeUnloadMessage()&&WP.Events.cancelBeforeUnload(!0);var i=$.proxy(function(n){"toolbardownload"===n&&(this._NewWindow?window.open(t):window.location.assign(t))},this),r=[new $$WPComp.ComplexObjects.Button(n.getString("download"),null,"primary","download"),new $$WPComp.ComplexObjects.Button(n.getString("downloadCancel"),null,null,"close")],u=-1!==["TIF","TIFF"].indexOf(this.DocExt),f="PDF"===this.DocExt&&WP.DOM.Browser.isAndroid;u||f?$$WPUtil.quickMessageBox(n.getString("downloadFileRiskPrompt")+"<br>"+n.getString("downloadContinuePrompt"),n.getString("downloadConfirmTitle"),r,i):this._NewWindow?window.open(t):window.location.assign(t)},setStatusInfo:function(n,t){1===n?(this.PendingApproval=!0,this.Rejected=!1,this.New=!1):2===n?(this.PendingApproval=!1,this.Rejected=!0,this.RejectionReason=t,this.New=!1):(this.PendingApproval=!1,this.Rejected=!1)},displayESign:function(){var r=this.DcsID,t=(this.DAT,""),i="",u=$$WP.Utilities.GetPageNonce();this.FncInternalID&&(t=this.FncInternalID);this.PesID&&(i=this.PesID);getCSRFTokenAsQS(function(f){$.ajax({type:"POST",url:makeLink("Documents/ESignatures/LoadESignDocContent"),data:{csrfToken:f,dcsId:r,fncInternalId:t,pesId:i,nonce:u},dataType:"json",success:function(t){var i=$afe.select(".esigned");dangerou$.setHtml(i,t);$afe.select("img").each(function(n,t){t.onload=function(){$afe.jq(window).trigger("popupResize")};t.onerror=function(){$afe.jq(window).trigger("popupResize")}});$afe.select("canvas").attr("title",n.getStringForTemplate("unsignedField"))},error:function(){link=makeLink("Home/Error?Code=12");window.location=link}})})},displayHNO:function(){var n=$$WP.Utilities.GetPageNonce();$.ajax({type:"POST",url:this.Url,dataType:"json",data:{nonce:n},success:function(n){var t=$afe.select(".letterNote");dangerou$.setHtml(t,n);$afe.select("img").each(function(n,t){t.onload=function(){$afe.jq(window).trigger("popupResize")};t.onerror=function(){$afe.jq(window).trigger("popupResize")}});$afe.jq(window).trigger("resize")},error:function(){link=makeLink("Home/Error/");window.location=link}})}};$$WP.Documents.ViewDocument.Models.DocumentModel=t;t.extend($$WP.Common.Model,"WP$Documents$ViewDocument$Models$DocumentModel")}();!function(){var n,t;$$WP.Utilities.guaranteeExistence($$WP,"Upload.Models");n=function(n){n=n||{};this.WP$Common$Model(n);this.ContextData=jQuery.extend(!0,{},this.ContextData);this.ViewTemplate=n.ViewTemplate||$$WP.Templates.Upload.UploadContainer;this.UploadCardTemplate=n.UploadCardTemplate||$$WP.Templates.Upload.UploadCard;this.DefaultStringNamespace=n.DefaultStringNamespace||"Upload";this.ViewerCsn=n.ViewerCsn;this.IsPhotoForPatientsChart=n.IsPhotoForPatientsChart};n.prototype={s_dataMembers:["AllowedImageAndDocumentExtensions","AllowedVideoExtensions","MaxAllowedImageSize","MaxAllowedVideoSize","MaxFilesAllowed","ContextData"],AllowedImageAndDocumentExtensions:null,AllowedVideoExtensions:null,MaxAllowedImageSize:null,MaxAllowedVideoSize:null,MaxFilesAllowed:null,ContextData:{},ViewerCsn:"",ViewTemplate:null,IsPhotoForPatientsChart:!1,UploadCardTemplate:null,AttachContainerEventHandlers:null,AttachFileCardEventHandlers:null,DefaultStringNamespace:null,ConfirmationViewModel:null,RefreshViewOverride:null,MasterController:null,NeedsRedirect:!1,RedirectTitle:null,RedirectHtml:null,UseGet:!1,FromVBPage:!1,HideMaxUploadsWarning:!1,HideFileExtensions:!1,FromBedside:!1,ConfigUrl:null,UploadUrl:makeLink("DocumentUpload/UploadFile"),DeleteUrl:makeLink("DocumentUpload/DeleteFile"),EditUrl:makeLink("DocumentUpload/EditFileName"),onConfigStart:null,onUploadStart:null,onEditStart:null,onDeleteStart:null,onConfigSucess:null,onUploadSuccess:null,onDeleteSuccess:null,onEditSuccess:null,onConfigFail:null,onUploadFail:null,onDeleteFail:null,onEditFail:null,ConfirmFunction:null,IsFileAceptable:function(n,t){if(this.HasInvalidFilenameChars(n))return 4;var r=(n||"").lastIndexOf("."),i="",u=this.AllowedExtensions;return r>-1&&(i=n.substr(r+1).toUpperCase(),u.indexOf(i)>-1)?(t/=1024,this.AllowedImageAndDocumentExtensions&&this.AllowedImageAndDocumentExtensions.indexOf(i)>-1&&this.MaxAllowedImageSize<t?2:this.AllowedVideoExtensions&&this.AllowedVideoExtensions.indexOf(i)>-1&&this.MaxAllowedVideoSize<t?3:0):1},HasInvalidFilenameChars:function(n){for(var i=$$WP.Upload.Models.UploadConfiguration.InvalidFilenameCharsSet,t=0;t<n.length;t++)if(i.has(n[t]))return!0;return!1},get AllowedExtensions(){var n=[];return this.AllowedImageAndDocumentExtensions&&this.AllowedImageAndDocumentExtensions.length>0&&this.MaxAllowedImageSize>0&&(n=n.concat(this.AllowedImageAndDocumentExtensions)),this.AllowedVideoExtensions&&this.AllowedVideoExtensions.length>0&&this.MaxAllowedVideoSize>0&&(n=n.concat(this.AllowedVideoExtensions)),n},get AllowedExtensionsForInput(){var n=this.AllowedExtensions;return n&&n.length>0?"."+n.join(",."):""},get AllowedDocumentsHelperText(){var n="";return $$WP.Strings.setDefaultNamespace(this.DefaultStringNamespace),$$WP.Strings.addMnemonic("@MYCHART@MAXUPLOADS@",this.MaxFilesAllowed),$$WP.Strings.addMnemonic("@MYCHART@ALLOWEDEXTENSIONS@",this.AllowedExtensions.join($$WP.Strings.get("listSeparator"))),$$WP.Strings.addMnemonic("@MYCHART@ALLOWEDIMAGESIZE@",Math.floor(10*this.MaxAllowedImageSize/1024)/10),$$WP.Strings.addMnemonic("@MYCHART@ALLOWEDVIDEOSIZE@",Math.floor(10*this.MaxAllowedVideoSize/1024)/10),n=1===this.MaxFilesAllowed?this.HideFileExtensions?$$WP.Strings.get("UploadInfoBubbleHelpTextOneFileNoExtensions"):$$WP.Strings.get("UploadInfoBubbleHelpTextOneFile"):this.HideFileExtensions?$$WP.Strings.get("UploadInfoBubbleHelpTextNoExtensions"):$$WP.Strings.get("UploadInfoBubbleHelpText"),this.MaxAllowedImageSize>0&&(n+=$$WP.Strings.get("UploadInfoBubbleImageSizeHelpText")),this.MaxAllowedVideoSize>0&&(n+=$$WP.Strings.get("UploadInfoBubbleVideoSizeHelpText")),$$WP.Strings.removeMnemonic("@MYCHART@ALLOWEDVIDEOSIZE@"),$$WP.Strings.removeMnemonic("@MYCHART@ALLOWEDIMAGESIZE@"),$$WP.Strings.removeMnemonic("@MYCHART@ALLOWEDEXTENSIONS@"),$$WP.Strings.removeMnemonic("@MYCHART@MAXUPLOADS@"),$$WP.Strings.clearDefaultNamespace(),n}};n.parse=function(t){return new n(t)};t=new Set([String.fromCharCode(34),String.fromCharCode(60),String.fromCharCode(62),String.fromCharCode(124),String.fromCharCode(58),String.fromCharCode(42),String.fromCharCode(63),String.fromCharCode(92),String.fromCharCode(47)].concat(Array.apply(null,Array(32)).map(function(n,t){return String.fromCharCode(t)})));$$WP.Upload.Models.UploadConfiguration=n;$$WP.Upload.Models.UploadConfiguration.InvalidFilenameCharsSet=$$WP.Upload.Models.UploadConfiguration.InvalidFilenameCharsSet||t;n.extend($$WP.Common.Model,"WP$Upload$Models$UploadConfiguration")}();!function(){$$WP.Utilities.guaranteeExistence($$WP,"Upload.Models");var n=function(n){n=n||{};this.WP$Common$Model(n)};n.prototype={s_dataMembers:["DocumentId","FileDisplayName","FileExtension","DownloadUrl","FileReference","Page","AllowPreview"],DocumentId:null,FileDisplayName:null,FileExtension:null,FileReference:null,DownloadUrl:null,Page:null,AllowPreview:null,get FileImageIconClass(){var n="file-type-icon--unknown";return this.FileExtension&&(n="file-type-icon--"+(n=(n=this.FileExtension.substr(this.FileExtension.lastIndexOf(".")+1)).toLowerCase())),n},get FileExtensionWithoutDot(){var n="";return this.FileExtension&&(n=(n=this.FileExtension.substr(this.FileExtension.lastIndexOf(".")+1)).toUpperCase()),n},IsImageFileType:function(){var n=!1;switch(this.FileExtensionWithoutDot){case"JPG":case"PNG":case"BMP":case"GIF":case"JPEG":case"TGA":case"FMF":case"PCX":case"DCX":case"WPG":n=!0}return n}};n.parse=function(t){return new n(t)};n.parseList=function(t){var i,r=[];if(Array.isArray(t))for(i=0;i<t.length;++i)r.push(new n(t[i]));return r};$$WP.Upload.Models.Document=n;n.extend($$WP.Common.Model,"WP$Upload$Models$Document")}()/*0*/