!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="55ea0b5d-f375-34b5-9fb3-7d332da3d49b")}catch(e){}}(); (() => {const define = dbxPithosConfig._define, require = dbxPithosConfig._require; define((()=>(()=>{"use strict";var e={r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={},o,i,n,a,r,s,c,d,l,u,h,m;e.r(t),function(e){e.Critical="critical",e.NonCritical="non-critical",e.Operational="operational",e.UserError="user-error",e.Uncaught="uncaught"}(o||(o={})),function(e){e.ChatIsNotRequested="CHAT_IS_NOT_REQUESTED",e.ChatIsRequested="CHAT_IS_REQUESTED"}(i||(i={})),function(e){e.DoNotTerminateChatSession="DO_NOT_TERMINATE_CHAT_SESSION"}(n||(n={})),function(e){e[e.defaultHours=1]="defaultHours",e[e.customHours=2]="customHours"}(a||(a={})),function(e){e.Hiddden="HIDDEN",e.Visible="VISIBLE"}(r||(r={})),function(e){e.ChatBubble="CHAT_BUBBLE",e.ChatWindow="CHAT_WINDOW"}(s||(s={})),function(e){e.UserSwtichCompany="USER_SWTICHED_COMPANY",e.UserNotSwtichCompany="USER_NOT_SWTICHED_COMPANY"}(c||(c={})),function(e){e.WWW_DBX_HOST="TRUSTED_DBX_HOST",e.DOCSEND_HOST="TRUSTED_DOCSEND_HOST",e.HELP_CENTER_HOST="TRUSTED_HELP_CENTER",e.EXPERIENCE_HOST="TRUSTED_EXPERIENCE_HOST",e.SIGN_CENTER_HOST="TRUSTED_SIGN_CENTER",e.DASH_DBX_HOST="TRUSTED_DASH_HOST",e.FORMSWIFT_HOST="TRUSTED_FORMSWIFT_HOST",e.HELLOSIGN_HOST="TRUSTED_HELLOSIGN_HOST",e.UNSUPPORTED_HOST="UNSUPPORTED_HOST"}(d||(d={})),function(e){e.DOCSEND_CHAT="DOCSEND_CHAT",e.DASH_SALES_CHAT="DASH_SALES_CHAT",e.DBX_SALES_CHAT="DBX_SALES_CHAT",e.DBX_CX_CHAT="DBX_CX_CHAT",e.FORMSWIFT_CHAT="FORMSWIFT_CHAT",e.HELLOSIGN_CX_CHAT="HELLOSIGN_CX_CHAT",e.HELLOSIGN_CX_CHATBOT="HELLOSIGN_CX_CHATBOT",e.UNSUPPORTED_CHAT="UNSUPPORTED_CHAT"}(l||(l={})),function(e){e.DOCSEND_ENTITLEMENTS="docsendEntitlements",e.WWW_DBX_ENTITLEMENTS="wwwDbxEntitlements",e.HELP_CENTER_ENTITLEMENTS="helpCenterEntitlements",e.EXPERIENCE_ENTITLEMENTS="experienceEntitlements",e.SIGN_CENTER_ENTITLEMENTS="signCenterEntitlements",e.DASH_DBX_ENTITLEMENTS="dashDbxEntitlements",e.FORMSWIFT_DBX_ENTITLEMENTS="formswiftEntitlements",e.UNSUPPORTED_ENTITLEMENTS="unsupportedEntitlements",e.HELLOSIGN_ENTITLEMENTS="hellosignEntitlements"}(u||(u={})),function(e){e.PROACTIVE_CHAT="proactive_chat",e.REACTIVE_CHAT="reactive_chat",e.UNSUPPORTED_CHAT="unsupported_chat"}(h||(h={})),function(e){e.INITIALIZED="zoomChatInitiated",e.SUCCESS="zoomChatInitiationSuccess",e.FAILED="zoomChatInitiationFailed",e.NETWORK_FAILED="zoomChatNetworkFailed",e.TIMEOUT_FAILED="zoomChatTimeOutFailed",e.EXPAND="zoomChatMaximized",e.MINIMIZE="zoomChatMinimized",e.END="zoomChatEnded",e.CHATREQUESTED="zoomChatRequested",e.DISPLAYED="zoomChatInitialDisplay",e.LOGOUT="zoomChatLogoutByUser",e.CONSENTDECLINED="zoomChatConsentDeclined"}(m||(m={}));const f=60,C=10,E=1e3,S=3e3,p="unified_chat_init",g="unified_dash_chat_init",_="dbx_sales_chat_login_init",T="db-snapengage-visible",I="__Secure-dbx_consent",b="performance and functionality",O="dbx_unified_chat_iframe",N="dbx-unified-chat-container",A=1,R="dbx_unified_chat_state",w="zoom_chat_requested_start_time",D="zoom_chat_initial_display_time",L="zoom_chat_session_end_time",y="dbx_unified_chat_session_logout",H="dbx_unified_chat_on_checkout",v="dbx_unified_chat_end_to_chat_state",U="dbxSalesChatCookieInit",x="dbxSalesChatLoginCookieInit",F="dbxCxChatCookieInit",P="dbxDashChatCookieInit",k="dbxFormswiftChatCookieInit",B="helloSignCXChatCookieInit",W=".dropbox.com",M={[l.DBX_SALES_CHAT]:U,[l.DBX_CX_CHAT]:F,[l.DASH_SALES_CHAT]:P,[l.FORMSWIFT_CHAT]:k,[l.HELLOSIGN_CX_CHAT]:B},X=[l.DOCSEND_CHAT,l.DASH_SALES_CHAT,l.FORMSWIFT_CHAT,l.DBX_CX_CHAT,l.DBX_SALES_CHAT],G=[l.DOCSEND_CHAT,l.DBX_CX_CHAT,l.FORMSWIFT_CHAT,l.DASH_SALES_CHAT],V=new Set([l.DOCSEND_CHAT,l.DBX_SALES_CHAT,l.DBX_CX_CHAT,l.FORMSWIFT_CHAT,l.HELLOSIGN_CX_CHAT]),z={"/plans":10,"/business":10,"/upgrade":10,"/sign":10,"/backup":10,"/contact":10,"/individual":10,"/business/try":10,"/buy":10,"/low-space":10,"/official-site":10,"/official-teams-page":10,"/plus":10,"/replay":10,"/space-upgrade":10,"/buy/plus":10,"/try/teams":10,"/try/business":10,"/overview/teams":10,"/features/share/send-large-files":10,"/features/cloud-storage":10,"/buy/business/advanced":10,"/buy/professional":10,"/buy/business/standard":10,"/login":3},Z="/login",$="/checkout",K={"/products/dropbox-fax":25,"/dropbox-esignature-solution":10,"/features":10,"/integrations/dropbox":10,"/dropbox-sign-api":10,"/products/dropbox-sign/pricing":10,"/integrations":10,"/products/dropbox-sign-api":10,"/products/dropbox-sign":10,"/":10},J={"/get_help":0,"/get_help/*/contact-us":0,"/get_help/chat":0},j=["/get_help","/get_help/*/contact-us","/get_help/chat"],q="French",Y="Italian",Q="German",ee="Spanish",te="Portuguese",oe="Korean",ie="Mandarin or Cantonese",ne="Mandarin (Simplified Chinese)",ae="Mandarin (Traditional Chinese)",re="Cantonese (Hong Kong Chinese)",se="Cantonese (Macau Chinese)",ce="Hindi",de={currentEndToChatState:n.DoNotTerminateChatSession},le={currentIframeState:r.Hiddden,currentUserActionState:i.ChatIsNotRequested,currentWidgetState:s.ChatBubble,currentCompanyState:c.UserNotSwtichCompany},ue={currentIframeState:r.Visible,currentUserActionState:i.ChatIsRequested,currentWidgetState:s.ChatWindow,currentCompanyState:c.UserNotSwtichCompany},he={currentIframeState:r.Visible,currentUserActionState:i.ChatIsRequested,currentWidgetState:s.ChatBubble,currentCompanyState:c.UserNotSwtichCompany};var me,fe,Ce,Ee;!function(e){e.GET_BROWSER_STATUS="To check browser is Safari",e.SCRIPT_TAG_SUCCESS="Success in adding script tag to iframe",e.SCRIPT_TAG_ERROR="Failed to add script tag to iframe",e.EXPAND_BUTTON_CLICKED="User clicked expand button",e.MINIMIZE_BUTTON_CLICKED="User clicked minimize button",e.CHAT_WIDGET_LOADED="Chat widget loaded successfully inside iframe",e.CHAT_WIDGET_NOT_LOADED="Failed to load chat inside iframe widget maximum retries reached",e.FETCH_ZOOM_CHAT_CREDENTIALS="Fetching Zoom chat credentials",e.FETCH_DOCSEND_CURRENT_USER_INFO="Fetching DocSend current user info",e.FETCH_DROPBOX_CURRENT_USER_INFO="Fetching Dropbox current user info",e.FETCH_FORMSWIFT_CURRENT_USER_INFO="Fetching FormSwift current user info",e.FETCH_HELLOSIGN_CURRENT_USER_INFO="Fetching Hellosign current user info",e.FETCH_BROWSER_LANGUAGE_INFO="Fetching browser language info",e.FETCH_CX_CHAT_REQUESTED_LANGUAGE_INFO="Fetching CX chat requested language info",e.FETCH_BROWSER_PATH_INFO="Fetching DBX browser path info",e.FETCH_CHAT_TYPE_INFO="Fetch chat type info",e.END_CHAT_BUTTON_CLICKED="User clicked end chat button",e.DELETE_ATTACHED_IFRAME_ON_END_CHAT_BUTTON_CLICK="Delete attached iframe as user clicked end chat button",e.RELOAD_PAGE_AFTER_CHAT_ENDS="Requesting reload page after chat ends",e.UNHANDLED_ACTION_MESSAGES="Unhandled action from top window",e.SET_COOKIE_FOR_DBX_SALES_CHAT="Setting cookie for DBX sales chat"}(me||(me={})),function(e){e.SEND_BROWSER_STATUS="Sending browser status",e.SEND_ZOOM_CHAT_CREDENTIALS="Sending Zoom chat credentials",e.CHECK_CHAT_WIDGET_STATUS="Checking chat widget status",e.SEND_DOCSEND_CURRENT_USER_INFO="Sending DocSend current user info",e.SEND_BROWSER_PATH_INFO="Sending DBX browser path info",e.SEND_DROPBOX_CURRENT_USER_INFO="Sending Dropbox current user info",e.SEND_HELLOSIGN_CURRENT_USER_INFO="Sending Hellosign current user info",e.SEND_FORMSWIFT_CURRENT_USER_INFO="Sending FormSwift current user info",e.SEND_BROWSER_CURRENT_LANGUAGE_INFO="Sending browser current language info",e.SEND_CURRENT_CHAT_TYPE_INFO="Sending current chat type info",e.LOGOUT_CALLBACK="Performing logout callback as user DocSend ends the chat",e.SET_ZOOM_CHAT_WIDGET_TO_OPEN_WINDOW="Requesting chat window to open mode when the user requests a chat",e.SWITCH_COMPANY_CALLBACK_MESSAGE="Sending as user performs switch company",e.UNHANDLED_ACTION_MESSAGES="Unhandled action from iframe",e.SEND_CX_CHAT_REQUESTED_LANGUAGE_INFO="Send CX chat requested language info"}(fe||(fe={})),function(e){e.CHAT_WIDGET_NOT_LOADED_MAX_RETRY_REACHED="Failed to load chat inside iframe - maximum retries reached",e.TOGGLE_REGISTRATION_FAILED_ERROR="Failed to register Open/Close Zoom Campaign events",e.END_BUTTON_NOT_FOUND_ERROR="Failed to find Zoom Chat widget end button",e.MINIMIZE_BUTTON_NOT_FOUND_ERROR="Unable to find minimize button for the Zoom chat widget campaign",e.MESSAGE_BOX_HEIGHT_SET_ERROR="Unable to set height for chat message box for Safari check of Zoom chat widget campaign",e.CHAT_END_BUTTON_NOT_FOUND_ERROR="Unable to find chat end button for the Zoom chat widget campaign",e.START_CHAT_BUTTON_NOT_FOUND_ERROR="Unable to find start new chat button for the Zoom chat widget campaign",e.ZOOM_CAMPAIGN_SDK_DOES_NOT_HAVE_AN_OPEN_METHOD="zoomCampaignSdk does not have an open method",e.ZOOM_CAMPAIGN_SDK_IS_NOT_AVAILABLE="Zoom Campaign SDK is not available",e.FAILED_WHEN_TRYING_TO_REGISTER_THE_ZOOM_CAMPAIGN_SDK_EVENT="Failed when trying to register the zoom Campaign SDK event",e.WEB_CHAT_DIV_NOT_FOUND="webChatDiv of zoom chat widget not found",e.SHADOW_DOM_NOT_AVAILABLE="Shadow DOM of zoom chat widget not available",e.START_NEW_CHAT_BUTTON_NOT_FOUND="Start New Chat button footer inside Shadow DOM not found",e.WINDOW_MASK_END_BUTTON_NOT_FOUND="Window mask of end button inside Shadow DOM not found"}(Ce||(Ce={})),function(e){e.IDENTIFIED_HOST_OR_SUPPORTED_ENTITLEMENTS_NULL="Identified host or supported entitlements is null or undefined",e.TIMER_VALUE_FETCH_ERROR="Error occurred while fetching timer value of Invalid URL",e.IFRAME_EXECUTION_ERROR="Error executing function in iframe",e.IFRAME_CONTENT_WINDOW_NULL_ERROR="Iframe contentWindow is null",e.IFRAME_NOT_FOUND_ERROR="Iframe not found",e.SCRIPT_TAG_ATTACHMENT_ERROR="Error during script tag attachment to iframe",e.CHAT_CLIENT_SETUP_INITIALIZATION_ERROR="Error initializing chat client setup",e.CHAT_IFRAME_LOAD_TIMEOUT_ERROR="Timed-out while waiting for chat iframe load event",e.ERROR_IN_FORMSWIFT_CHAT_DISPLAY_PROCESS="Error in FormSwift chat display process",e.ERROR_IN_FORMSWIFT_CHAT_LOAD_PROCESS="Error: Failed to reinitialize FormSwift chat load process",e.ERROR_ATTACHING_MESSAGE_EVENT_LISTENER="Error attaching message event listener",e.ERROR_CLEARING_TIMEOUT="Error while clearing timeout",e.ERROR_IFRAME_NOT_FOUND_OR_COOKIE_SET="Iframe not found or cookie already set",e.ERROR_ZOOM_CHAT_RELOAD_FAILED="Zoom chat reload failed. Steps were not executed",e.ERROR_OPEN_CHAT_WINDOW_METHOD_UNAVAILABLE="Zoom chat client or handleOpenChatWindowCallback method is not available",e.ERROR_CONSENT_METHOD_UNAVAILABLE="Zoom chat client or consentGrantedProceedDBXSalesChatToLoad method is not available as we DE-REG this callback explicitly.",e.INVALID_ENTRY_PAGE_KEY="Detected an invalid entry page key.",e.NO_ENTRY_PATH="Entry path is missing or invalid.",e.ENTRY_PAGE_KEY_NULL_OR_UNDEFINED="Entry page key is null or undefined.",e.NO_VALID_ENTRY_PAGE="No valid entry page found.",e.DETECTED_LOGIN_PAGE_WITHOUT_COOKIE="Chat should not be loaded in /login page without loginPageCookie.",e.INVALID_CHAT_COOKIE="Detected an invalid chat cookie.",e.NO_VALID_CHAT_COOKIE="No valid chat cookie present.",e.INVALID_CHAT_TYPE="Unrecognized or invalid chat type.",e.UNIFIED_CHAT_COOKIE_NOT_SET="Unified chat cookie is missing.",e.INITIALIZATION_FAILED="Failed to initialize supported entitlements.",e.NO_MATCHING_DOMAIN="No matching domain for initialization.",e.INVALID_ENTRY_POINT="Failed to validate the entry point.",e.PAGE_PATH_VERIFICATION="Current page path verification failed.",e.FETCH_HOSTNAME="Unable to fetch hostname from the URL.",e.FETCH_PATHNAME="Unable to fetch pathname from the URL.",e.UNSUPPORTED_ENTITLEMENTS="Unsupported entitlements detected during chat configuration.",e.OUTSIDE_OPERATIONAL_HOURS="Unable to load chat during non-operational hours.",e.MISSING_CHAT_OPERATIONAL_HOURS="Missing chat operational hours, unable to proceed with chat initialization.",e.ZOOM_CHAT_CONSENT_LOADER="Failed to load the Zoom chat client or the consentGrantedProceedDBXSalesChatToLoad method is missing.",e.MISSING_BUSINESS_HOURS_CONFIG="Missing configuration data for business hours.",e.MISSING_BUSINESS_TIMEZONE="Missing business timezone configuration.",e.MISSING_BUSINESS_HOURS="Missing business hours.",e.MISSING_CUSTOM_HOUR_RANGES="Business hours configuration does not contain customHourRanges.",e.ZOOM_CHAT_CONSENT_DECLINED="User declined consent, did not load the Zoom chat client.",e.MISSING_RELOAD_ZOOM_CHAT_CLIENT="Zoom Chat client is not available or reloadZoomChatClient is missing."}(Ee||(Ee={}));const Se={type:o.Critical,message:Ee.INVALID_ENTRY_PAGE_KEY},pe={type:o.Operational,message:Ee.NO_ENTRY_PATH},ge={type:o.NonCritical,message:Ee.ENTRY_PAGE_KEY_NULL_OR_UNDEFINED},_e={type:o.Operational,message:Ee.NO_VALID_ENTRY_PAGE},Te={type:o.Operational,message:Ee.DETECTED_LOGIN_PAGE_WITHOUT_COOKIE},Ie={type:o.Critical,message:Ee.INVALID_CHAT_COOKIE},be={type:o.Critical,message:Ee.NO_VALID_CHAT_COOKIE},Oe={type:o.Critical,message:Ee.INVALID_CHAT_TYPE},Ne={type:o.Operational,message:Ee.UNIFIED_CHAT_COOKIE_NOT_SET},Ae={type:o.Critical,message:Ee.INITIALIZATION_FAILED},Re={type:o.Operational,message:Ee.NO_MATCHING_DOMAIN},we={type:o.Critical,message:Ee.INVALID_ENTRY_POINT},De={type:o.Critical,message:Ee.PAGE_PATH_VERIFICATION},Le={type:o.UserError,message:Ee.FETCH_HOSTNAME},ye={type:o.UserError,message:Ee.FETCH_PATHNAME},He={type:o.Critical,message:Ee.UNSUPPORTED_ENTITLEMENTS},ve={type:o.Operational,message:Ee.OUTSIDE_OPERATIONAL_HOURS},Ue={type:o.Critical,message:Ee.MISSING_CHAT_OPERATIONAL_HOURS},xe={type:o.Critical,message:Ee.ZOOM_CHAT_CONSENT_LOADER},Fe={type:o.Critical,message:Ee.MISSING_BUSINESS_HOURS_CONFIG},Pe={type:o.Critical,message:Ee.MISSING_BUSINESS_TIMEZONE},ke={type:o.Critical,message:Ee.MISSING_BUSINESS_HOURS},Be={type:o.Critical,message:Ee.MISSING_CUSTOM_HOUR_RANGES},We=o.Critical,Me=Ee.ZOOM_CHAT_CONSENT_DECLINED,Xe={type:o.NonCritical,message:Ee.ERROR_CONSENT_METHOD_UNAVAILABLE},Ge={type:o.Critical,message:Ee.ERROR_OPEN_CHAT_WINDOW_METHOD_UNAVAILABLE},Ve={type:o.Critical,message:Ee.MISSING_RELOAD_ZOOM_CHAT_CLIENT};function ze(e,t){if(!e)throw new Error(t)}const Ze=34028234663852886e22,$e=-34028234663852886e22,Ke=4294967295,Je=2147483647,je=-2147483648;function qe(e){if("number"!=typeof e)throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>Je||eKe||e<0)throw new Error("invalid uint 32: "+e)}function Qe(e){if("number"!=typeof e)throw new Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>Ze||e<$e))throw new Error("invalid float 32: "+e)}const et=Symbol("@bufbuild/protobuf/enum-type");function tt(e){const t=e[et];return ze(t,"missing enum type on enum object"),t}function ot(e,t,o,i){e[et]=it(t,o.map((t=>({no:t.no,name:t.name,localName:e[t.no]}))),i)}function it(e,t,o){const i=Object.create(null),n=Object.create(null),a=[];for(const e of t){const t=at(e);a.push(t),i[e.name]=t,n[e.no]=t}return{typeName:e,values:a,findName:e=>i[e],findNumber:e=>n[e]}}function nt(e,t,o){const i={};for(const e of t){const t=at(e);i[t.localName]=t.no,i[t.no]=t.localName}return ot(i,e,t,o),i}function at(e){return"localName"in e?e:Object.assign(Object.assign({},e),{localName:e.name})}class rt{equals(e){return this.getType().runtime.util.equals(this.getType(),this,e)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(e,t){const o=undefined,i=this.getType().runtime.bin,n=i.makeReadOptions(t);return i.readMessage(this,n.readerFactory(e),e.byteLength,n),this}fromJson(e,t){const o=this.getType(),i=o.runtime.json,n=i.makeReadOptions(t);return i.readMessage(o,e,n,this),this}fromJsonString(e,t){return this.fromJson(JSON.parse(e),t)}toBinary(e){const t=undefined,o=this.getType().runtime.bin,i=o.makeWriteOptions(e),n=i.writerFactory();return o.writeMessage(this,n,i),n.finish()}toJson(e){const t=undefined,o=this.getType().runtime.json,i=o.makeWriteOptions(e);return o.writeMessage(this,i)}toJsonString(e){var t;const o=this.toJson(e);return JSON.stringify(o,null,null!==(t=null==e?void 0:e.prettySpaces)&&void 0!==t?t:0)}getType(){return Object.getPrototypeOf(this).constructor}}function st(e,t,o,i){var n;const a=null!==(n=null==i?void 0:i.localName)&&void 0!==n?n:t.substring(t.lastIndexOf(".")+1),r={[a]:function(t){e.util.initFields(this),e.util.initPartial(t,this)}}[a];return Object.setPrototypeOf(r.prototype,new rt),Object.assign(r,{runtime:e,typeName:t,fields:e.util.newFieldList(o),fromBinary:(e,t)=>(new r).fromBinary(e,t),fromJson:(e,t)=>(new r).fromJson(e,t),fromJsonString:(e,t)=>(new r).fromJsonString(e,t),equals:(t,o)=>e.util.equals(r,t,o)}),r}function ct(e,t,o,i){return{syntax:e,json:t,bin:o,util:i,makeMessageType(e,t,o){return st(this,e,t,o)},makeEnum:nt,makeEnumType:it,getEnumType:tt}}var dt;function lt(){let e=0,t=0;for(let o=0;o<28;o+=7){let i=this.buf[this.pos++];if(e|=(127&i)<>4,0==(128&o))return this.assertBounds(),[e,t];for(let o=3;o<=31;o+=7){let i=this.buf[this.pos++];if(t|=(127&i)<>>i,a=!(n>>>7==0&&0==t),r=255&(a?128|n:n);if(o.push(r),!a)return}const i=e>>>28&15|(7&t)<<4,n=!(t>>3==0);if(o.push(255&(n?128|i:i)),n){for(let e=3;e<31;e+=7){const i=t>>>e,n=!(i>>>7==0),a=255&(n?128|i:i);if(o.push(a),!n)return}o.push(t>>>31&1)}}!function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"}(dt||(dt={}));const ht=4294967296;function mt(e){const t="-"===e[0];t&&(e=e.slice(1));const o=1e6;let i=0,n=0;function a(t,a){const r=Number(e.slice(t,a));n*=o,i=i*o+r,i>=ht&&(n+=i/ht|0,i%=ht)}return a(-24,-18),a(-18,-12),a(-12,-6),a(-6),t?pt(i,n):St(i,n)}function ft(e,t){let o=St(e,t);const i=2147483648&o.hi;i&&(o=pt(o.lo,o.hi));const n=Ct(o.lo,o.hi);return i?"-"+n:n}function Ct(e,t){if(({lo:e,hi:t}=Et(e,t)),t<=2097151)return String(ht*t+e);const o=undefined,i=16777215&(e>>>24|t<<8),n=t>>16&65535;let a=(16777215&e)+6777216*i+6710656*n,r=i+8147497*n,s=2*n;const c=1e7;return a>=c&&(r+=Math.floor(a/c),a%=c),r>=c&&(s+=Math.floor(r/c),r%=c),s.toString()+gt(r)+gt(a)}function Et(e,t){return{lo:e>>>0,hi:t>>>0}}function St(e,t){return{lo:0|e,hi:0|t}}function pt(e,t){return t=~t,e?e=1+~e:t+=1,St(e,t)}const gt=e=>{const t=String(e);return"0000000".slice(t.length)+t};function _t(e,t){if(e>=0){for(;e>127;)t.push(127&e|128),e>>>=7;t.push(e)}else{for(let o=0;o<9;o++)t.push(127&e|128),e>>=7;t.push(1)}}function Tt(){let e=this.buf[this.pos++],t=127&e;if(0==(128&e))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(127&e)<<7,0==(128&e))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(127&e)<<14,0==(128&e))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(127&e)<<21,0==(128&e))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(15&e)<<28;for(let t=5;0!=(128&e)&&t<10;t++)e=this.buf[this.pos++];if(0!=(128&e))throw new Error("invalid varint");return this.assertBounds(),t>>>0}function It(){const e=new DataView(new ArrayBuffer(8)),t=undefined;if(void 0!==globalThis.BigInt&&"function"==typeof e.getBigInt64&&"function"==typeof e.getBigUint64&&"function"==typeof e.setBigInt64&&"function"==typeof e.setBigUint64&&("object"!=typeof process||"object"!=typeof{NODE_ENV:"production",JS_CSRF_COOKIE:"__Host-js_csrf",FLASH_COOKIE:"toast",LAST_ACTIVE_LINKED_USER_ID_COOKIE:"last_active_linked_user_id",LAST_ACTIVE_ROLE_COOKIE:"last_active_role",ROLE_ANONY:"anonymous",ROLE_BOTH:"both",ROLE_PERSONAL:"personal",ROLE_PHOTOS:"photos",ROLE_WORK:"work",FRAMEMESSENGER_WHITELISTED_ORIGINS:'["www.dropboxstatic.com", "cfl.dropboxstatic.com", "www.dropbox.com", "dl-web.dropbox.com", "dl.dropboxusercontent.com", "previews.dropboxusercontent.com", "previews.dropbox.com"]',APISERVER:"api.dropboxapi.com",APISERVER_V1:"api.dropbox.com",API_BLOCK_CLUSTER_V1:"api-content.dropbox.com",BEACON_SERVER:"beacon.dropbox.com",BLOCK_CLUSTER:"dl-web.dropbox.com",BOLT_SERVER:"bolt.dropbox.com",CAROUSEL_WEBSERVER:"carousel.dropbox.com",PHOTOS_WEBSERVER:"photos.dropbox.com",PREVIEWS_DBX_SERVER:"previews.dropbox.com",PREVIEWS_DUC_SERVER:"previews.dropboxusercontent.com",PUBSERVER:"dl.dropboxusercontent.com",DROPBOX_USER_CONTENT_DOMAIN:"dropboxusercontent.com",PDF_EDITOR_FRAME:"processing.dropboxusercontent.com",THUNDER_SERVER:"thunder.dropbox.com",WEBSERVER:"www.dropbox.com",DROPBOX_DASH_STAGE:"staging.dash.ai",DROPBOX_DASH_PROD:"www.dash.ai",DROPBOX_REPLAY_DEV:"replay-local.dropbox.com",DROPBOX_REPLAY_PROD:"replay.dropbox.com",MARKETING_WEBSERVER:"marketing.dropbox.com",FILE_IMPORTS_WEBSERVER:"file-imports.dropbox.com",GRAFANA_DOMAIN:"grafana.pp.dropbox.com",CLIENT_WEB_WEBSERVER:"client-web.dropbox.com",WEB_STATIC_CLOUDFLARE_CDN_HOST:"cfl.dropboxstatic.com",WEB_STATIC_DROPBOX_HOST:"www.dropboxstatic.com",PAPER_WEBSERVER:"paper.dropbox.com",DOWNLOAD_ID_PARAM_NAME:"_download_id",DOWNLOADS_NOTIFY_DOMAIN_PARAM_NAME:"_notify_domain",DOWNLOADS_LOG_SUCCESS_PARAM_NAME:"_log_download_success",UID_PARAM_NAME:"_subject_uid",USER_NAME_MAX_LEN:"100",INVALID_FOLDER_PRINTABLE_CHARS_DESC:'" * / : < > ? \\ |',FUNCAPTCHA_SERVER:"dropboxcaptcha.com",PAYPAL_SDK_DROPBOX_SERVER:"paypal-sdk-dropbox.com",CHOOSER_APP_KEY:"a1gk45gxjylc840",MAX_WEBHOOKS_PER_APP:"25",ROLLUP:"ROLLUP_ENV.ROLLUP",ROLLUP_FORMAT:"ROLLUP_ENV.ROLLUP_FORMAT",NOTES_WEBSERVER_PROD:"paper.dropbox.com",REDIRECT_SAFE_ORIGINS:'["dropboxstatic.com", "dropbox.com", "dropboxpartners.com", "dropbox.tech", "getdropbox.com", "app.adjust.com", "dropboxmail.com", "dropbox-mkt.navattic.com", "collections.dropbox.com", "sfdc-docs.hellosign.com", "db.tt", "dropboxteam.com", "api.dropbox.com", "www.reclaim.ai", "dash.dropbox.com", "faq.hellosign.com", "www.dropboxpulse.com", "dash-staging.dropbox.com", "replay.dropbox.com", "learn-stage.dropbox.com", "www.dropboxdash.com", "os.dropbox.com", "developers.hellosign.com", "www.app.reclaim.ai", "dropbox-stg.tech", "blog-stg.dropbox.com", "dropbox.navattic.com", "dropboxcaptcha.com", "dropboxforums.com", "www.hellosign.com", "services.pp.dropbox.com", "app.reclaim.ai", "docsend.com", "learn.dropbox.com", "brandpartners-stg.dropbox.com", "help-stg.dropbox.com", "showcase.dropbox.com", "dropboxforum.com", "paper.dropbox.com", "www.docsend.com", "carousel.dropbox.com", "aws.amazon.com", "api.dropboxapi.com", "dropbox.eu.qualtrics.com", "photos.dropbox.com", "dropboxbusiness.com", "www.rbi.org.in", "itunes.apple.com", "dropbox.enterprise.slack.com", "dropboxinsiders.com", "app.hellosign.com", "dropboxdash.com", "www.dropbox.com", "assets.dropbox.com", "experience-stg.dropbox.com", "addtodropbox.com", "notes.dropbox.com", "play.google.com", "test.composer.dropbox.com", "reclaim.ai", "aem.dropbox.com", "blog.dropbox.com", "client-web.dropbox.com", "www.remotely-curious.com", "dropbox-api.arkoselabs.com", "seal.dropboxapi.com", "dropbox.zendesk.com", "sign.dropbox.com", "www.dropboxforum.com", "dropbox-dns.com", "a.sprig.com", "help.dropbox.com", "embedded.hellosign.com", "dash.ai", "dropboxapi.com", "formswift.com", "linux.dropbox.com", "capture.dropbox.com", "experience.dropbox.com", "www.dash.ai", "video.dropbox.com", "brandpartners.dropbox.com"]',REDIRECT_SAFE_ORIGINS_FROM_OFFICE_IP:'["dropboxstatic.com", "dropbox.com", "dropboxpartners.com", "dropbox.tech", "getdropbox.com", "app.adjust.com", "chime.notes.dev.corp.dropbox.com", "dropboxmail.com", "dropbox-mkt.navattic.com", "collections.dropbox.com", "sfdc-docs.hellosign.com", "db.tt", "dropboxteam.com", "api.dropbox.com", "www.reclaim.ai", "dash.dropbox.com", "faq.hellosign.com", "www.dropboxpulse.com", "dash-staging.dropbox.com", "replay.dropbox.com", "learn-stage.dropbox.com", "www.dropboxdash.com", "stage.notes.dev.corp.dropbox.com", "admin-paper.dropbox.com", "os.dropbox.com", "developers.hellosign.com", "www.app.reclaim.ai", "dropbox-stg.tech", "blog-stg.dropbox.com", "dropbox.navattic.com", "dropboxcaptcha.com", "dropboxforums.com", "redirect-hbwljog9tgkbi2kgxnaue0a9.dropbox.com", "paper-admin.pp.dropbox.com", "www.hellosign.com", "services.pp.dropbox.com", "stage-01.notes.dev.corp.dropbox.com", "app.reclaim.ai", "docsend.com", "learn.dropbox.com", "brandpartners-stg.dropbox.com", "help-stg.dropbox.com", "showcase.dropbox.com", "dropboxforum.com", "paper.dropbox.com", "www.docsend.com", "carousel.dropbox.com", "aws.amazon.com", "api.dropboxapi.com", "dropbox.eu.qualtrics.com", "photos.dropbox.com", "dropboxbusiness.com", "www.rbi.org.in", "itunes.apple.com", "dropbox.enterprise.slack.com", "dropboxinsiders.com", "app.hellosign.com", "dropboxdash.com", "www.dropbox.com", "assets.dropbox.com", "notes.dev.corp.dropbox.com", "experience-stg.dropbox.com", "addtodropbox.com", "notes.dropbox.com", "play.google.com", "test.composer.dropbox.com", "reclaim.ai", "aem.dropbox.com", "blog.dropbox.com", "client-web.dropbox.com", "nonprod-01-paper.dropbox.com", "www.remotely-curious.com", "dropbox-api.arkoselabs.com", "seal.dropboxapi.com", "dropbox.zendesk.com", "collections.dev.corp.dropbox.com", "sign.dropbox.com", "nonprod-02-paper.dropbox.com", "www.dropboxforum.com", "dropbox-dns.com", "a.sprig.com", "embedded.hellosign.com", "help.dropbox.com", "dash.ai", "dropboxapi.com", "formswift.com", "linux.dropbox.com", "capture.dropbox.com", "experience.dropbox.com", "www.dash.ai", "video.dropbox.com", "brandpartners.dropbox.com"]'}||"1"!=={NODE_ENV:"production",JS_CSRF_COOKIE:"__Host-js_csrf",FLASH_COOKIE:"toast",LAST_ACTIVE_LINKED_USER_ID_COOKIE:"last_active_linked_user_id",LAST_ACTIVE_ROLE_COOKIE:"last_active_role",ROLE_ANONY:"anonymous",ROLE_BOTH:"both",ROLE_PERSONAL:"personal",ROLE_PHOTOS:"photos",ROLE_WORK:"work",FRAMEMESSENGER_WHITELISTED_ORIGINS:'["www.dropboxstatic.com", "cfl.dropboxstatic.com", "www.dropbox.com", "dl-web.dropbox.com", "dl.dropboxusercontent.com", "previews.dropboxusercontent.com", "previews.dropbox.com"]',APISERVER:"api.dropboxapi.com",APISERVER_V1:"api.dropbox.com",API_BLOCK_CLUSTER_V1:"api-content.dropbox.com",BEACON_SERVER:"beacon.dropbox.com",BLOCK_CLUSTER:"dl-web.dropbox.com",BOLT_SERVER:"bolt.dropbox.com",CAROUSEL_WEBSERVER:"carousel.dropbox.com",PHOTOS_WEBSERVER:"photos.dropbox.com",PREVIEWS_DBX_SERVER:"previews.dropbox.com",PREVIEWS_DUC_SERVER:"previews.dropboxusercontent.com",PUBSERVER:"dl.dropboxusercontent.com",DROPBOX_USER_CONTENT_DOMAIN:"dropboxusercontent.com",PDF_EDITOR_FRAME:"processing.dropboxusercontent.com",THUNDER_SERVER:"thunder.dropbox.com",WEBSERVER:"www.dropbox.com",DROPBOX_DASH_STAGE:"staging.dash.ai",DROPBOX_DASH_PROD:"www.dash.ai",DROPBOX_REPLAY_DEV:"replay-local.dropbox.com",DROPBOX_REPLAY_PROD:"replay.dropbox.com",MARKETING_WEBSERVER:"marketing.dropbox.com",FILE_IMPORTS_WEBSERVER:"file-imports.dropbox.com",GRAFANA_DOMAIN:"grafana.pp.dropbox.com",CLIENT_WEB_WEBSERVER:"client-web.dropbox.com",WEB_STATIC_CLOUDFLARE_CDN_HOST:"cfl.dropboxstatic.com",WEB_STATIC_DROPBOX_HOST:"www.dropboxstatic.com",PAPER_WEBSERVER:"paper.dropbox.com",DOWNLOAD_ID_PARAM_NAME:"_download_id",DOWNLOADS_NOTIFY_DOMAIN_PARAM_NAME:"_notify_domain",DOWNLOADS_LOG_SUCCESS_PARAM_NAME:"_log_download_success",UID_PARAM_NAME:"_subject_uid",USER_NAME_MAX_LEN:"100",INVALID_FOLDER_PRINTABLE_CHARS_DESC:'" * / : < > ? \\ |',FUNCAPTCHA_SERVER:"dropboxcaptcha.com",PAYPAL_SDK_DROPBOX_SERVER:"paypal-sdk-dropbox.com",CHOOSER_APP_KEY:"a1gk45gxjylc840",MAX_WEBHOOKS_PER_APP:"25",ROLLUP:"ROLLUP_ENV.ROLLUP",ROLLUP_FORMAT:"ROLLUP_ENV.ROLLUP_FORMAT",NOTES_WEBSERVER_PROD:"paper.dropbox.com",REDIRECT_SAFE_ORIGINS:'["dropboxstatic.com", "dropbox.com", "dropboxpartners.com", "dropbox.tech", "getdropbox.com", "app.adjust.com", "dropboxmail.com", "dropbox-mkt.navattic.com", "collections.dropbox.com", "sfdc-docs.hellosign.com", "db.tt", "dropboxteam.com", "api.dropbox.com", "www.reclaim.ai", "dash.dropbox.com", "faq.hellosign.com", "www.dropboxpulse.com", "dash-staging.dropbox.com", "replay.dropbox.com", "learn-stage.dropbox.com", "www.dropboxdash.com", "os.dropbox.com", "developers.hellosign.com", "www.app.reclaim.ai", "dropbox-stg.tech", "blog-stg.dropbox.com", "dropbox.navattic.com", "dropboxcaptcha.com", "dropboxforums.com", "www.hellosign.com", "services.pp.dropbox.com", "app.reclaim.ai", "docsend.com", "learn.dropbox.com", "brandpartners-stg.dropbox.com", "help-stg.dropbox.com", "showcase.dropbox.com", "dropboxforum.com", "paper.dropbox.com", "www.docsend.com", "carousel.dropbox.com", "aws.amazon.com", "api.dropboxapi.com", "dropbox.eu.qualtrics.com", "photos.dropbox.com", "dropboxbusiness.com", "www.rbi.org.in", "itunes.apple.com", "dropbox.enterprise.slack.com", "dropboxinsiders.com", "app.hellosign.com", "dropboxdash.com", "www.dropbox.com", "assets.dropbox.com", "experience-stg.dropbox.com", "addtodropbox.com", "notes.dropbox.com", "play.google.com", "test.composer.dropbox.com", "reclaim.ai", "aem.dropbox.com", "blog.dropbox.com", "client-web.dropbox.com", "www.remotely-curious.com", "dropbox-api.arkoselabs.com", "seal.dropboxapi.com", "dropbox.zendesk.com", "sign.dropbox.com", "www.dropboxforum.com", "dropbox-dns.com", "a.sprig.com", "help.dropbox.com", "embedded.hellosign.com", "dash.ai", "dropboxapi.com", "formswift.com", "linux.dropbox.com", "capture.dropbox.com", "experience.dropbox.com", "www.dash.ai", "video.dropbox.com", "brandpartners.dropbox.com"]',REDIRECT_SAFE_ORIGINS_FROM_OFFICE_IP:'["dropboxstatic.com", "dropbox.com", "dropboxpartners.com", "dropbox.tech", "getdropbox.com", "app.adjust.com", "chime.notes.dev.corp.dropbox.com", "dropboxmail.com", "dropbox-mkt.navattic.com", "collections.dropbox.com", "sfdc-docs.hellosign.com", "db.tt", "dropboxteam.com", "api.dropbox.com", "www.reclaim.ai", "dash.dropbox.com", "faq.hellosign.com", "www.dropboxpulse.com", "dash-staging.dropbox.com", "replay.dropbox.com", "learn-stage.dropbox.com", "www.dropboxdash.com", "stage.notes.dev.corp.dropbox.com", "admin-paper.dropbox.com", "os.dropbox.com", "developers.hellosign.com", "www.app.reclaim.ai", "dropbox-stg.tech", "blog-stg.dropbox.com", "dropbox.navattic.com", "dropboxcaptcha.com", "dropboxforums.com", "redirect-hbwljog9tgkbi2kgxnaue0a9.dropbox.com", "paper-admin.pp.dropbox.com", "www.hellosign.com", "services.pp.dropbox.com", "stage-01.notes.dev.corp.dropbox.com", "app.reclaim.ai", "docsend.com", "learn.dropbox.com", "brandpartners-stg.dropbox.com", "help-stg.dropbox.com", "showcase.dropbox.com", "dropboxforum.com", "paper.dropbox.com", "www.docsend.com", "carousel.dropbox.com", "aws.amazon.com", "api.dropboxapi.com", "dropbox.eu.qualtrics.com", "photos.dropbox.com", "dropboxbusiness.com", "www.rbi.org.in", "itunes.apple.com", "dropbox.enterprise.slack.com", "dropboxinsiders.com", "app.hellosign.com", "dropboxdash.com", "www.dropbox.com", "assets.dropbox.com", "notes.dev.corp.dropbox.com", "experience-stg.dropbox.com", "addtodropbox.com", "notes.dropbox.com", "play.google.com", "test.composer.dropbox.com", "reclaim.ai", "aem.dropbox.com", "blog.dropbox.com", "client-web.dropbox.com", "nonprod-01-paper.dropbox.com", "www.remotely-curious.com", "dropbox-api.arkoselabs.com", "seal.dropboxapi.com", "dropbox.zendesk.com", "collections.dev.corp.dropbox.com", "sign.dropbox.com", "nonprod-02-paper.dropbox.com", "www.dropboxforum.com", "dropbox-dns.com", "a.sprig.com", "embedded.hellosign.com", "help.dropbox.com", "dash.ai", "dropboxapi.com", "formswift.com", "linux.dropbox.com", "capture.dropbox.com", "experience.dropbox.com", "www.dash.ai", "video.dropbox.com", "brandpartners.dropbox.com"]'}.BUF_BIGINT_DISABLE)){const t=BigInt("-9223372036854775808"),o=BigInt("9223372036854775807"),i=BigInt("0"),n=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(e){const i="bigint"==typeof e?e:BigInt(e);if(i>o||in||t(e.setInt32(0,t,!0),e.setInt32(4,o,!0),e.getBigInt64(0,!0)),uDec:(t,o)=>(e.setInt32(0,t,!0),e.setInt32(4,o,!0),e.getBigUint64(0,!0))}}const o=e=>ze(/^-?[0-9]+$/.test(e),`int64 invalid: ${e}`),i=e=>ze(/^[0-9]+$/.test(e),`uint64 invalid: ${e}`);return{zero:"0",supported:!1,parse:e=>("string"!=typeof e&&(e=e.toString()),o(e),e),uParse:e=>("string"!=typeof e&&(e=e.toString()),i(e),e),enc:e=>("string"!=typeof e&&(e=e.toString()),o(e),mt(e)),uEnc:e=>("string"!=typeof e&&(e=e.toString()),i(e),mt(e)),dec:(e,t)=>ft(e,t),uDec:(e,t)=>Ct(e,t)}}const bt=It();var Ot;!function(e){e[e.Varint=0]="Varint",e[e.Bit64=1]="Bit64",e[e.LengthDelimited=2]="LengthDelimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32"}(Ot||(Ot={}));class Nt{constructor(e){this.stack=[],this.textEncoder=null!=e?e:new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let t=0;t>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(Ye(e);e>127;)this.buf.push(127&e|128),e>>>=7;return this.buf.push(e),this}int32(e){return qe(e),_t(e,this.buf),this}bool(e){return this.buf.push(e?1:0),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let t=this.textEncoder.encode(e);return this.uint32(t.byteLength),this.raw(t)}float(e){Qe(e);let t=new Uint8Array(4);return new DataView(t.buffer).setFloat32(0,e,!0),this.raw(t)}double(e){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,e,!0),this.raw(t)}fixed32(e){Ye(e);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),this.raw(t)}sfixed32(e){qe(e);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,e,!0),this.raw(t)}sint32(e){return qe(e),_t(e=(e<<1^e>>31)>>>0,this.buf),this}sfixed64(e){let t=new Uint8Array(8),o=new DataView(t.buffer),i=bt.enc(e);return o.setInt32(0,i.lo,!0),o.setInt32(4,i.hi,!0),this.raw(t)}fixed64(e){let t=new Uint8Array(8),o=new DataView(t.buffer),i=bt.uEnc(e);return o.setInt32(0,i.lo,!0),o.setInt32(4,i.hi,!0),this.raw(t)}int64(e){let t=bt.enc(e);return ut(t.lo,t.hi,this.buf),this}sint64(e){let t=bt.enc(e),o=t.hi>>31,i,n;return ut(t.lo<<1^o,(t.hi<<1|t.lo>>>31)^o,this.buf),this}uint64(e){let t=bt.uEnc(e);return ut(t.lo,t.hi,this.buf),this}}class At{constructor(e,t){this.varint64=lt,this.uint32=Tt,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=null!=t?t:new TextDecoder}tag(){let e=this.uint32(),t=e>>>3,o=7&e;if(t<=0||o<0||o>5)throw new Error("illegal tag: field no "+t+" wire type "+o);return[t,o]}skip(e){let t=this.pos;switch(e){case Ot.Varint:for(;128&this.buf[this.pos++];);break;case Ot.Bit64:this.pos+=4;case Ot.Bit32:this.pos+=4;break;case Ot.LengthDelimited:let t=this.uint32();this.pos+=t;break;case Ot.StartGroup:let o;for(;(o=this.tag()[1])!==Ot.EndGroup;)this.skip(o);break;default:throw new Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(t,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return 0|this.uint32()}sint32(){let e=this.uint32();return e>>>1^-(1&e)}int64(){return bt.dec(...this.varint64())}uint64(){return bt.uDec(...this.varint64())}sint64(){let[e,t]=this.varint64(),o=-(1&e);return e=(e>>>1|(1&t)<<31)^o,t=t>>>1^o,bt.dec(e,t)}bool(){let[e,t]=this.varint64();return 0!==e||0!==t}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return bt.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return bt.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(){return this.textDecoder.decode(this.bytes())}}function Rt(e,t){if(t instanceof e)return t;if(e.fieldWrapper)return e.fieldWrapper.wrapField(t);throw new Error(`cannot unwrap field value, ${e.typeName} does not define a field wrapper`)}function wt(e,t){return e.fieldWrapper?e.fieldWrapper.unwrapField(t):t}function Dt(e){if("message"===e.fieldKind&&!e.repeated&&null==e.oneof)return Lt[e.message.typeName]}const Lt={"google.protobuf.DoubleValue":dt.DOUBLE,"google.protobuf.FloatValue":dt.FLOAT,"google.protobuf.Int64Value":dt.INT64,"google.protobuf.UInt64Value":dt.UINT64,"google.protobuf.Int32Value":dt.INT32,"google.protobuf.UInt32Value":dt.UINT32,"google.protobuf.BoolValue":dt.BOOL,"google.protobuf.StringValue":dt.STRING,"google.protobuf.BytesValue":dt.BYTES};function yt(e,t,o){if(t===o)return!0;if(e==dt.BYTES){if(!(t instanceof Uint8Array&&o instanceof Uint8Array))return!1;if(t.length!==o.length)return!1;for(let e=0;enew At(e)},Ft={writeUnknownFields:!0,writerFactory:()=>new Nt};function Pt(e){return e?Object.assign(Object.assign({},xt),e):xt}function kt(e){return e?Object.assign(Object.assign({},Ft),e):Ft}function Bt(){return{makeReadOptions:Pt,makeWriteOptions:kt,listUnknownFields(e){var t;return null!==(t=e[Ut])&&void 0!==t?t:[]},discardUnknownFields(e){delete e[Ut]},writeUnknownFields(e,t){const o=undefined,i=e[Ut];if(i)for(const e of i)t.tag(e.no,e.wireType).raw(e.data)},onUnknownField(e,t,o,i){const n=e;Array.isArray(n[Ut])||(n[Ut]=[]),n[Ut].push({no:t,wireType:o,data:i})},readMessage(e,t,o,i){const n=e.getType(),a=void 0===o?t.len:t.pos+o;for(;t.pos>4,r=a,n=2;break;case 2:o[i++]=(15&r)<<4|(60&a)>>2,r=a,n=3;break;case 3:o[i++]=(3&r)<<6|a,n=0}}if(1==n)throw Error("invalid base64 string.");return o.subarray(0,i)},enc(e){let t="",o=0,i,n=0;for(let a=0;a>2],n=(3&i)<<4,o=1;break;case 1:t+=$t[n|i>>4],n=(15&i)<<2,o=2;break;case 2:t+=$t[n|i>>6],t+=$t[63&i],o=0}return o&&(t+=$t[n],t+="=",1==o&&(t+="=")),t}},jt={ignoreUnknownFields:!1},qt={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function Yt(e){return e?Object.assign(Object.assign({},jt),e):jt}function Qt(e){return e?Object.assign(Object.assign({},qt),e):qt}function eo(e){const t=e(no,ao);return{makeReadOptions:Yt,makeWriteOptions:Qt,readMessage(e,t,o,i){if(null==t||Array.isArray(t)||"object"!=typeof t)throw new Error(`cannot decode message ${e.typeName} from JSON: ${this.debug(t)}`);i=null!=i?i:new e;const n={};for(const[a,r]of Object.entries(t)){const t=e.fields.findJsonName(a);if(!t){if(!o.ignoreUnknownFields)throw new Error(`cannot decode message ${e.typeName} from JSON: key "${a}" is unknown`);continue}let s=t.localName,c=i;if(t.oneof){if(null===r&&"scalar"==t.kind)continue;const o=n[t.oneof.localName];if(o)throw new Error(`cannot decode message ${e.typeName} from JSON: multiple keys for oneof "${t.oneof.name}" present: "${o}", "${a}"`);n[t.oneof.localName]=a,c=c[t.oneof.localName]={case:s},s="value"}if(t.repeated){if(null===r)continue;if(!Array.isArray(r))throw new Error(`cannot decode field ${e.typeName}.${t.name} from JSON: ${this.debug(r)}`);const i=c[s];for(const n of r){if(null===n)throw new Error(`cannot decode field ${e.typeName}.${t.name} from JSON: ${this.debug(n)}`);let a;switch(t.kind){case"message":a=t.T.fromJson(n,o);break;case"enum":if(a=io(t.T,n,o.ignoreUnknownFields),void 0===a)continue;break;case"scalar":try{a=oo(t.T,n)}catch(o){let i=`cannot decode field ${e.typeName}.${t.name} from JSON: ${this.debug(n)}`;throw o instanceof Error&&o.message.length>0&&(i+=`: ${o.message}`),new Error(i)}}i.push(a)}}else if("map"==t.kind){if(null===r)continue;if(Array.isArray(r)||"object"!=typeof r)throw new Error(`cannot decode field ${e.typeName}.${t.name} from JSON: ${this.debug(r)}`);const i=c[s];for(const[n,a]of Object.entries(r)){if(null===a)throw new Error(`cannot decode field ${e.typeName}.${t.name} from JSON: map value null`);let s;switch(t.V.kind){case"message":s=t.V.T.fromJson(a,o);break;case"enum":if(s=io(t.V.T,a,o.ignoreUnknownFields),void 0===s)continue;break;case"scalar":try{s=oo(t.V.T,a)}catch(o){let i=`cannot decode map value for field ${e.typeName}.${t.name} from JSON: ${this.debug(r)}`;throw o instanceof Error&&o.message.length>0&&(i+=`: ${o.message}`),new Error(i)}}try{i[oo(t.K,t.K==dt.BOOL?"true"==n||"false"!=n&&n:n).toString()]=s}catch(o){let i=`cannot decode map key for field ${e.typeName}.${t.name} from JSON: ${this.debug(r)}`;throw o instanceof Error&&o.message.length>0&&(i+=`: ${o.message}`),new Error(i)}}}else switch(t.kind){case"message":const i=t.T;if(null===r&&"google.protobuf.Value"!=i.typeName){if(t.oneof)throw new Error(`cannot decode field ${e.typeName}.${t.name} from JSON: null is invalid for oneof field "${a}"`);continue}const n=void 0===c[s]?new i:Rt(i,c[s]);c[s]=wt(i,n.fromJson(r,o));break;case"enum":const d=io(t.T,r,o.ignoreUnknownFields);void 0!==d&&(c[s]=d);break;case"scalar":try{c[s]=oo(t.T,r)}catch(o){let i=`cannot decode field ${e.typeName}.${t.name} from JSON: ${this.debug(r)}`;throw o instanceof Error&&o.message.length>0&&(i+=`: ${o.message}`),new Error(i)}}}return i},writeMessage(e,o){const i=e.getType(),n={};let a;try{for(const r of i.fields.byMember()){let i;if("oneof"==r.kind){const n=e[r.localName];if(void 0===n.value)continue;if(a=r.findField(n.case),!a)throw"oneof case not found: "+n.case;i=t(a,n.value,o)}else a=r,i=t(a,e[a.localName],o);void 0!==i&&(n[o.useProtoFieldName?a.name:a.jsonName]=i)}}catch(e){const t=a?`cannot encode field ${i.typeName}.${a.name} to JSON`:`cannot encode message ${i.typeName} to JSON`,o=e instanceof Error?e.message:String(e);throw new Error(t+(o.length>0?`: ${o}`:""))}return n},readScalar:oo,writeScalar:ao,debug:to}}function to(e){if(null===e)return"null";switch(typeof e){case"object":return Array.isArray(e)?"array":"object";case"string":return e.length>100?"string":`"${e.split('"').join('\\"')}"`;default:return e.toString()}}function oo(e,t){switch(e){case dt.DOUBLE:case dt.FLOAT:if(null===t)return 0;if("NaN"===t)return Number.NaN;if("Infinity"===t)return Number.POSITIVE_INFINITY;if("-Infinity"===t)return Number.NEGATIVE_INFINITY;if(""===t)break;if("string"==typeof t&&t.trim().length!==t.length)break;if("string"!=typeof t&&"number"!=typeof t)break;const o=Number(t);if(Number.isNaN(o))break;if(!Number.isFinite(o))break;return e==dt.FLOAT&&Qe(o),o;case dt.INT32:case dt.FIXED32:case dt.SFIXED32:case dt.SINT32:case dt.UINT32:if(null===t)return 0;let i;if("number"==typeof t?i=t:"string"==typeof t&&t.length>0&&t.trim().length===t.length&&(i=Number(t)),void 0===i)break;return e==dt.UINT32?Ye(i):qe(i),i;case dt.INT64:case dt.SFIXED64:case dt.SINT64:if(null===t)return bt.zero;if("number"!=typeof t&&"string"!=typeof t)break;return bt.parse(t);case dt.FIXED64:case dt.UINT64:if(null===t)return bt.zero;if("number"!=typeof t&&"string"!=typeof t)break;return bt.uParse(t);case dt.BOOL:if(null===t)return!1;if("boolean"!=typeof t)break;return t;case dt.STRING:if(null===t)return"";if("string"!=typeof t)break;try{encodeURIComponent(t)}catch(e){throw new Error("invalid UTF8")}return t;case dt.BYTES:if(null===t||""===t)return new Uint8Array(0);if("string"!=typeof t)break;return Jt.dec(t)}throw new Error}function io(e,t,o){if(null===t)return 0;switch(typeof t){case"number":if(Number.isInteger(t))return t;break;case"string":const i=e.findName(t);if(i||o)return null==i?void 0:i.no}throw new Error(`cannot decode enum ${e.typeName} from JSON: ${to(t)}`)}function no(e,t,o,i){var n;if(void 0===t)return t;if(0===t&&!o)return;if(i)return t;if("google.protobuf.NullValue"==e.typeName)return null;const a=e.findNumber(t);return null!==(n=null==a?void 0:a.name)&&void 0!==n?n:t}function ao(e,t,o){if(void 0!==t)switch(e){case dt.INT32:case dt.SFIXED32:case dt.SINT32:case dt.FIXED32:case dt.UINT32:return ze("number"==typeof t),0!=t||o?t:void 0;case dt.FLOAT:case dt.DOUBLE:return ze("number"==typeof t),Number.isNaN(t)?"NaN":t===Number.POSITIVE_INFINITY?"Infinity":t===Number.NEGATIVE_INFINITY?"-Infinity":0!==t||o?t:void 0;case dt.STRING:return ze("string"==typeof t),t.length>0||o?t:void 0;case dt.BOOL:return ze("boolean"==typeof t),t||o?t:void 0;case dt.UINT64:case dt.FIXED64:case dt.INT64:case dt.SFIXED64:case dt.SINT64:return ze("bigint"==typeof t||"string"==typeof t||"number"==typeof t),o||0!=t?t.toString(10):void 0;case dt.BYTES:return ze(t instanceof Uint8Array),o||t.byteLength>0?Jt.enc(t):void 0}}function ro(){return eo(((e,t)=>function o(i,n,a){if("map"==i.kind){const o={};switch(i.V.kind){case"scalar":for(const[e,a]of Object.entries(n)){const n=t(i.V.T,a,!0);ze(void 0!==n),o[e.toString()]=n}break;case"message":for(const[e,t]of Object.entries(n))o[e.toString()]=t.toJson(a);break;case"enum":const r=i.V.T;for(const[t,i]of Object.entries(n)){ze(void 0===i||"number"==typeof i);const n=e(r,i,!0,a.enumAsInteger);ze(void 0!==n),o[t.toString()]=n}}return a.emitDefaultValues||Object.keys(o).length>0?o:void 0}if(i.repeated){const o=[];switch(i.kind){case"scalar":for(let e=0;e0?o:void 0}switch(i.kind){case"scalar":return t(i.T,n,!!i.oneof||i.opt||a.emitDefaultValues);case"enum":return e(i.T,n,!!i.oneof||i.opt||a.emitDefaultValues,a.enumAsInteger);case"message":return void 0!==n?Rt(i.T,n).toJson(a):void 0}}))}function so(){return{setEnumType:ot,initPartial(e,t){if(void 0===e)return;const o=t.getType();for(const i of o.fields.byMember()){const o=i.localName,n=t,a=e;if(void 0!==a[o])switch(i.kind){case"oneof":const e=a[o].case;if(void 0===e)continue;const t=i.findField(e);let r=a[o].value;!t||"message"!=t.kind||r instanceof t.T||(r=new t.T(r)),n[o]={case:e,value:r};break;case"scalar":case"enum":n[o]=a[o];break;case"map":switch(i.V.kind){case"scalar":case"enum":Object.assign(n[o],a[o]);break;case"message":const e=i.V.T;for(const t of Object.keys(a[o])){let i=a[o][t];e.fieldWrapper||(i=new e(i)),n[o][t]=i}}break;case"message":const s=i.T;if(i.repeated)n[o]=a[o].map((e=>e instanceof s?e:new s(e)));else if(void 0!==a[o]){const e=a[o];s.fieldWrapper?n[o]=e:n[o]=e instanceof s?e:new s(e)}}}},equals:(e,t,o)=>t===o||!(!t||!o)&&e.fields.byMember().every((e=>{const i=t[e.localName],n=o[e.localName];if(e.repeated){if(i.length!==n.length)return!1;switch(e.kind){case"message":return i.every(((t,o)=>e.T.equals(t,n[o])));case"scalar":return i.every(((t,o)=>yt(e.T,t,n[o])));case"enum":return i.every(((e,t)=>yt(dt.INT32,e,n[t])))}throw new Error(`repeated cannot contain ${e.kind}`)}switch(e.kind){case"message":return e.T.equals(i,n);case"enum":return yt(dt.INT32,i,n);case"scalar":return yt(e.T,i,n);case"oneof":if(i.case!==n.case)return!1;const t=i.case,o=e.findField(t);if(void 0===o)return!0;switch(o.kind){case"message":return o.T.equals(i[t],n[t]);case"enum":return yt(dt.INT32,i,n);case"scalar":return yt(o.T,i,n)}throw new Error(`oneof cannot contain ${o.kind}`);case"map":const a=Object.keys(i);if(a.some((e=>void 0===n[e])))return!1;switch(e.V.kind){case"message":const t=e.V.T;return a.every((e=>t.equals(i[e],n[e])));case"enum":return a.every((e=>yt(dt.INT32,i[e],n[e])));case"scalar":const o=e.V.T;return a.every((e=>yt(o,i[e],n[e])))}}})),clone(e){const t=e.getType(),o=new t,i=o;for(const o of t.fields.byMember()){const t=e[o.localName];let n;if(o.repeated)n=t.map((e=>co(o,e)));else if("map"==o.kind){n=i[o.localName];for(const[e,i]of Object.entries(t))n[e]=co(o.V,i)}else if("oneof"==o.kind){const e=o.findField(t.case);n=e?{case:t.case,value:co(e,t.value)}:{case:void 0}}else n=co(o,t);i[o.localName]=n}return o}}}function co(e,t){if(void 0===t)return t;switch(e.kind){case"enum":return t;case"scalar":if(e.T===dt.BYTES){const e=new Uint8Array(t.byteLength);return e.set(t),e}return t;case"message":return e.T.fieldWrapper?e.T.fieldWrapper.unwrapField(e.T.fieldWrapper.wrapField(t).clone()):t.clone()}}class lo{constructor(e,t){this._fields=e,this._normalizer=t}findJsonName(e){if(!this.jsonNames){const e={};for(const t of this.list())e[t.jsonName]=e[t.name]=t;this.jsonNames=e}return this.jsonNames[e]}find(e){if(!this.numbers){const e={};for(const t of this.list())e[t.no]=t;this.numbers=e}return this.numbers[e]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort(((e,t)=>e.no-t.no))),this.numbersAsc}byMember(){if(!this.members){this.members=[];const e=this.members;let t;for(const o of this.list())o.oneof?o.oneof!==t&&(t=o.oneof,e.push(t)):e.push(o)}return this.members}}function uo(e){switch(e.kind){case"field":return ho(e.name,void 0!==e.oneof);case"oneof":return mo(e.name);case"enum":case"message":case"service":{const t=e.file.proto.package,o=void 0===t?0:t.length+1,i=e.typeName.substring(o).replace(/\./g,"_");return po[i]?i+"$":i}case"enum_value":{const t=e.parent.sharedPrefix;if(void 0===t)return e.name;const o=e.name.substring(t.length);return go[o]?o+"$":o}case"rpc":{let t=e.name;return 0==t.length?t:(t=t[0].toLowerCase()+t.substring(1),go[t]?t+"$":t)}}}function ho(e,t){let o=So(e);return t||(go[o]||_o[o])&&(o+="$"),o}function mo(e){return ho(e,!1)}const fo=So;function Co(e,t){const o=Eo(e)+"_";for(const e of t){if(!e.toLowerCase().startsWith(o))return;const t=e.substring(o.length);if(0==t.length)return;if(/^\d/.test(t))return}return o}function Eo(e){return(e.substring(0,1)+e.substring(1).replace(/[A-Z]/g,(e=>"_"+e))).toLowerCase()}function So(e){let t=!1;const o=[];for(let i=0;inew lo(e,bo),initFields(e){for(const t of e.getType().fields.byMember()){if(t.opt)continue;const o=t.localName,i=e;if(t.repeated)i[o]=[];else switch(t.kind){case"oneof":i[o]={case:void 0};break;case"enum":i[o]=0;break;case"map":i[o]={};break;case"scalar":i[o]=Ht(t.T)}}}}));function bo(e){var t,o,i;const n=[];let a;for(const r of"function"==typeof e?e():e){const e=r;if(e.localName=ho(r.name,void 0!==r.oneof),e.jsonName=null!==(t=r.jsonName)&&void 0!==t?t:fo(r.name),e.repeated=null!==(o=r.repeated)&&void 0!==o&&o,e.packed=null!==(i=r.packed)&&void 0!==i?i:"enum"==r.kind||"scalar"==r.kind&&r.T!=dt.BYTES&&r.T!=dt.STRING,void 0!==r.oneof){const t="string"==typeof r.oneof?r.oneof:r.oneof.name;a&&a.name==t||(a=new To(t)),e.oneof=a,a.addField(e)}n.push(e)}return n}class Oo extends rt{constructor(e){super(),this.seconds=bt.zero,this.nanos=0,Io.util.initPartial(e,this)}fromJson(e,t){if("string"!=typeof e)throw new Error(`cannot decode google.protobuf.Timestamp from JSON: ${Io.json.debug(e)}`);const o=e.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!o)throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");const i=Date.parse(o[1]+"-"+o[2]+"-"+o[3]+"T"+o[4]+":"+o[5]+":"+o[6]+(o[8]?o[8]:"Z"));if(Number.isNaN(i))throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");if(iDate.parse("9999-12-31T23:59:59Z"))throw new Error("cannot decode message google.protobuf.Timestamp from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");return this.seconds=bt.parse(i/1e3),this.nanos=0,o[7]&&(this.nanos=parseInt("1"+o[7]+"0".repeat(9-o[7].length))-1e9),this}toJson(e){const t=1e3*Number(this.seconds);if(tDate.parse("9999-12-31T23:59:59Z"))throw new Error("cannot encode google.protobuf.Timestamp to JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");if(this.nanos<0)throw new Error("cannot encode google.protobuf.Timestamp to JSON: nanos must not be negative");let o="Z";if(this.nanos>0){const e=(this.nanos+1e9).toString().substring(1);o="000000"===e.substring(3)?"."+e.substring(0,3)+"Z":"000"===e.substring(6)?"."+e.substring(0,6)+"Z":"."+e+"Z"}return new Date(t).toISOString().replace(".000Z",o)}toDate(){return new Date(1e3*Number(this.seconds)+Math.ceil(this.nanos/1e6))}static now(){return Oo.fromDate(new Date)}static fromDate(e){const t=e.getTime();return new Oo({seconds:bt.parse(Math.floor(t/1e3)),nanos:t%1e3*1e6})}static fromBinary(e,t){return(new Oo).fromBinary(e,t)}static fromJson(e,t){return(new Oo).fromJson(e,t)}static fromJsonString(e,t){return(new Oo).fromJsonString(e,t)}static equals(e,t){return Io.util.equals(Oo,e,t)}}var No,Ao,Ro;Oo.runtime=Io,Oo.typeName="google.protobuf.Timestamp",Oo.fields=Io.util.newFieldList((()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}])),function(e){e[e.UNKNOWN_AVAILABILITY=0]="UNKNOWN_AVAILABILITY",e[e.MF_BUSINESS_HOURS=1]="MF_BUSINESS_HOURS",e[e.MF_24_HOURS=2]="MF_24_HOURS",e[e.ALWAYS_AVAILABLE_247=3]="ALWAYS_AVAILABLE_247"}(No||(No={})),Io.util.setEnumType(No,"support.Availability",[{no:0,name:"UNKNOWN_AVAILABILITY"},{no:1,name:"MF_BUSINESS_HOURS"},{no:2,name:"MF_24_HOURS"},{no:3,name:"ALWAYS_AVAILABLE_247"}]),function(e){e[e.UNKNOWN_CHANNEL=0]="UNKNOWN_CHANNEL",e[e.CHATBOT=1]="CHATBOT",e[e.LIMITED_EMAIL=2]="LIMITED_EMAIL",e[e.EMAIL=3]="EMAIL",e[e.CHAT=4]="CHAT",e[e.LIMITED_PHONE=5]="LIMITED_PHONE",e[e.PHONE=6]="PHONE"}(Ao||(Ao={})),Io.util.setEnumType(Ao,"support.Channel",[{no:0,name:"UNKNOWN_CHANNEL"},{no:1,name:"CHATBOT"},{no:2,name:"LIMITED_EMAIL"},{no:3,name:"EMAIL"},{no:4,name:"CHAT"},{no:5,name:"LIMITED_PHONE"},{no:6,name:"PHONE"}]),function(e){e[e.UNKNOWN_LANGUAGE=0]="UNKNOWN_LANGUAGE",e[e.ENGLISH=1]="ENGLISH",e[e.SPANISH=2]="SPANISH",e[e.FRENCH=3]="FRENCH",e[e.GERMAN=4]="GERMAN",e[e.JAPANESE=5]="JAPANESE",e[e.PORTUGUESE=6]="PORTUGUESE"}(Ro||(Ro={})),Io.util.setEnumType(Ro,"support.Language",[{no:0,name:"UNKNOWN_LANGUAGE"},{no:1,name:"ENGLISH"},{no:2,name:"SPANISH"},{no:3,name:"FRENCH"},{no:4,name:"GERMAN"},{no:5,name:"JAPANESE"},{no:6,name:"PORTUGUESE"}]);class wo extends rt{constructor(e){super(),this.days="",this.hours="",this.timezone="",Io.util.initPartial(e,this)}static fromBinary(e,t){return(new wo).fromBinary(e,t)}static fromJson(e,t){return(new wo).fromJson(e,t)}static fromJsonString(e,t){return(new wo).fromJsonString(e,t)}static equals(e,t){return Io.util.equals(wo,e,t)}}wo.runtime=Io,wo.typeName="support.DaysHours",wo.fields=Io.util.newFieldList((()=>[{no:1,name:"days",kind:"scalar",T:9},{no:2,name:"hours",kind:"scalar",T:9},{no:3,name:"start_time",kind:"message",T:Oo},{no:4,name:"end_time",kind:"message",T:Oo},{no:5,name:"timezone",kind:"scalar",T:9}]));class Do extends rt{constructor(e){super(),this.isDuringOperatingHours=!1,this.description={case:void 0},this.isAvailable247=!1,Io.util.initPartial(e,this)}static fromBinary(e,t){return(new Do).fromBinary(e,t)}static fromJson(e,t){return(new Do).fromJson(e,t)}static fromJsonString(e,t){return(new Do).fromJsonString(e,t)}static equals(e,t){return Io.util.equals(Do,e,t)}}Do.runtime=Io,Do.typeName="support.AvailabilityDescriptor",Do.fields=Io.util.newFieldList((()=>[{no:1,name:"is_during_operating_hours",kind:"scalar",T:8},{no:2,name:"days_hours",kind:"message",T:wo,oneof:"description"},{no:3,name:"single_description",kind:"scalar",T:9,oneof:"description"},{no:4,name:"is_available_247",kind:"scalar",T:8}]));class Lo extends rt{constructor(e){super(),this.language=Ro.UNKNOWN_LANGUAGE,Io.util.initPartial(e,this)}static fromBinary(e,t){return(new Lo).fromBinary(e,t)}static fromJson(e,t){return(new Lo).fromJson(e,t)}static fromJsonString(e,t){return(new Lo).fromJsonString(e,t)}static equals(e,t){return Io.util.equals(Lo,e,t)}}Lo.runtime=Io,Lo.typeName="support.ChannelOption",Lo.fields=Io.util.newFieldList((()=>[{no:1,name:"language",kind:"enum",T:Io.getEnumType(Ro)},{no:2,name:"availability",kind:"message",T:Do}]));class yo extends rt{constructor(e){super(),this.channel=Ao.UNKNOWN_CHANNEL,this.alternativeOptions=[],Io.util.initPartial(e,this)}static fromBinary(e,t){return(new yo).fromBinary(e,t)}static fromJson(e,t){return(new yo).fromJson(e,t)}static fromJsonString(e,t){return(new yo).fromJsonString(e,t)}static equals(e,t){return Io.util.equals(yo,e,t)}}function Ho(){const e=window;return e._DBX_ZOOM_CHAT_CLIENT||(e._DBX_ZOOM_CHAT_CLIENT={}),e._DBX_ZOOM_CHAT_CLIENT}function vo(){const e=window;return void 0===e.zoomChatManagerDebugEnabled&&(e.zoomChatManagerDebugEnabled=!1),window.localStorage&&window.localStorage.getItem("zoom_chat_manager_debug")?e.zoomChatManagerDebugEnabled=!0:console.log('Debugging is not enabled because "zoom_chat_manager_debug" is not set in localStorage.'),e.zoomChatManagerDebugEnabled}function Uo(e){const t=undefined;window.zoomChatManagerDebugEnabled&&console.debug&&console.debug(e)}function xo(e,t){let o=`${e}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`;t&&(o+=` domain=${t};`),document.cookie=o}function Fo(){const e=new Date;e.setMinutes(e.getMinutes()+2),cn(DBX_SALES_CHAT_LOGIN_COOKIE_KEY,DBX_SALES_CHAT_LOGIN_COOKIE,e)}function Po(){const e=window;if(e._DBX_ZOOM_CHAT_CLIENT&&"function"==typeof e._DBX_ZOOM_CHAT_CLIENT.handleOnLogoutCallback){const t=ci(UNIFIED_CHAT_COOKIE_NAME);xo(UNIFIED_CHAT_COOKIE_NAME,DBX_CHAT_WILDCARD_DOMAIN),e._DBX_ZOOM_CHAT_CLIENT.handleOnLogoutCallback(),t===SALES_CHAT_COOKIE_KEY&&Fo()}}function ko(e,t,i){let n=null!=t?t:"";switch(e){case o.Critical:if(i){const e=i instanceof Error?i.message:String(i),o=i instanceof Error?i.stack:null,n={message:null!=t?t:"Error encountered during process",error:null!=e?e:"No additional error details provided",stack:null!=o?o:"No stack trace available",timestamp:(new Date).toISOString()};console.error("Critical error:",JSON.stringify(n,null,2))}else console.error("Critical error:",n);break;case o.NonCritical:console.warn(`Non-critical error: ${n}`);break;case o.Operational:console.warn(`Operational error: ${n}`);break;case o.UserError:console.error(`User error: ${n}`);break;case o.Uncaught:console.error(`Uncaught error: ${n}`);break;default:console.error(`Unknown error severity: ${n}`)}}function Bo(e){console.error(e)}function Wo(e,t){var o,i,n;const a=null===(i=null===(o=t.chatSpecificConfigs)||void 0===o?void 0:o.dbxChatConfigs)||void 0===i?void 0:i.salesEntryPagesConfig,r=undefined;return null!==(n=(null!=a?a:z)[e])&&void 0!==n?n:0}function Mo(e,t){var o,i,n;const a=null===(i=null===(o=t.chatSpecificConfigs)||void 0===o?void 0:o.dbxChatConfigs)||void 0===i?void 0:i.salesEntryPagesConfig,r=undefined;return null!==(n=(null!=a?a:K)[e])&&void 0!==n?n:0}function Xo(e){return e.startsWith("/get_help")&&e.endsWith("/contact-us")?J["/get_help/*/contact-us"]:J[e]||0}function Go(e,t){var o,i;const n=null===(i=null===(o=t.chatSpecificConfigs)||void 0===o?void 0:o.dbxChatConfigs)||void 0===i?void 0:i.salesEntryPagesConfig,a=undefined,r=e in(null!=n?n:z);return Uo(`isDbxSalesEntryPage: Checking for '${e}' - Exists: ${r}`),r}function Vo(e){return!(!e.startsWith("/get_help")||!e.endsWith("/contact-us"))||J.hasOwnProperty(e)}function zo(e,t){var o,i;const n=null===(i=null===(o=t.chatSpecificConfigs)||void 0===o?void 0:o.dbxSignChatConfigs)||void 0===i?void 0:i.salesEntryPagesConfig,a=undefined,r=e in(null!=n?n:K);return Uo(`isSignEntryPage: Checking for '${e}' - Exists: ${r}`),r}function Zo(e,t,o){try{const[i,n]=qo(e,t,o);return{isValid:i,entryPath:n}}catch(e){return ko(we.type,we.message,e),{isValid:!1,entryPath:null}}}function $o(e){var t,o,i,n;const a=null===(o=null===(t=e.chatSpecificConfigs)||void 0===t?void 0:t.dbxChatConfigs)||void 0===o?void 0:o.salesEntryPagesConfig,r=null===(n=null===(i=e.chatSpecificConfigs)||void 0===i?void 0:i.dbxSignChatConfigs)||void 0===n?void 0:n.salesEntryPagesConfig,s=null!=a?a:z,c=null!=r?r:K;return{[d.WWW_DBX_HOST]:Object.keys(s),[d.SIGN_CENTER_HOST]:Object.keys(c)}}function Ko(e,t,o){const i=undefined,n=undefined;return Zo(e,t,$o(o))}function Jo(){return{[d.WWW_DBX_HOST]:Object.keys(J)}}function jo(e,t){const o=undefined;return Zo(e,t,Jo())}function qo(e,t,o){let i=null;try{if(i=ii(t),!i)throw new Error(`Invalid path extracted from URL: ${t}`);const n=o[e]||[];0===n.length&&Uo(`isCurrentPathSupported: No supported pages found for host: ${e}`);const a=undefined;return[n.some((e=>i&&(i===e||i.startsWith(`${e}/`)))),i]}catch(e){return ko(De.type,De.message,e),[!1,i]}}yo.runtime=Io,yo.typeName="support.LiveChannel",yo.fields=Io.util.newFieldList((()=>[{no:1,name:"channel",kind:"enum",T:Io.getEnumType(Ao)},{no:2,name:"primary_option",kind:"message",T:Lo},{no:3,name:"alternative_options",kind:"message",T:Lo,repeated:!0},{no:4,name:"escalation_option",kind:"message",T:Lo}]));const Yo=e=>{const t=JSON.stringify(e);localStorage.setItem(R,t)};function Qo(e,t){var o,i,n,a,r,s,c,l;return(null===(o=t.docsendEntitlements)||void 0===o?void 0:o.includes(e))?d.DOCSEND_HOST:(null===(i=t.wwwDbxEntitlements)||void 0===i?void 0:i.includes(e))?d.WWW_DBX_HOST:(null===(n=t.helpCenterEntitlements)||void 0===n?void 0:n.includes(e))?d.HELP_CENTER_HOST:(null===(a=t.experienceEntitlements)||void 0===a?void 0:a.includes(e))?d.EXPERIENCE_HOST:(null===(r=t.signCenterEntitlements)||void 0===r?void 0:r.includes(e))?d.SIGN_CENTER_HOST:(null===(s=t.dashDbxEntitlements)||void 0===s?void 0:s.includes(e))?d.DASH_DBX_HOST:(null===(c=t.formswiftEntitlements)||void 0===c?void 0:c.includes(e))?d.FORMSWIFT_HOST:(null===(l=t.hellosignEntitlements)||void 0===l?void 0:l.includes(e))?d.HELLOSIGN_HOST:d.UNSUPPORTED_HOST}function ei(){return new Date}function ti(e){return new Date(e.toLocaleString("en-US",{timeZone:"America/Los_Angeles"}))}function oi(e){try{const t=undefined;return new URL(e).hostname}catch(e){return ko(Le.type,Le.message,e),""}}function ii(e){try{const t=undefined;return new URL(e).pathname}catch(e){return ko(ye.type,ye.message,e),""}}function ni(e,t){var o,i;const n=undefined,a=new Intl.DateTimeFormat("en-US",{timeZone:t,hour:"2-digit",minute:"2-digit",hour12:!1}).formatToParts(e),r=parseInt((null===(o=a.find((e=>"hour"===e.type)))||void 0===o?void 0:o.value)||"0",10),s=parseInt((null===(i=a.find((e=>"minute"===e.type)))||void 0===i?void 0:i.value)||"0",10),c=new Date(e);return c.setHours(r,s),c}function ai(e){if(!e)return ko(Fe.type,Fe.message),!1;try{if(!e.businessTimezone)return ko(Pe.type,Pe.message),!1;if(!e.businessHours)return ko(ke.type,ke.message),!1;const t=new Date,o=t.getDay();if(o<1||o>5)return!1;const i=ni(t,e.businessTimezone);if(!e.businessHours.customHourRanges)return ko(Be.type,Be.message),!1;const n=e.businessHours.customHourRanges,a=new Date(i);a.setHours(parseInt(n.startTimeHours,10)),a.setMinutes(parseInt(n.startTimeMins,10)),a.setSeconds(0),a.setMilliseconds(0);const r=new Date(i);return r.setHours(parseInt(n.endTimeHours,10)),r.setMinutes(parseInt(n.endTimeMins,10)),r.setSeconds(0),r.setMilliseconds(0),i>=a&&i<=r||(Ti(),!1)}catch(e){return ko(o.Critical,"Unexpected error in isWithinBusinessHours",e),!1}}function ri(e){const t=e.toLowerCase();return t in supportedLanguages?{languageName:supportedLanguages[t],description:`Supported language found: ${supportedLanguages[t]}`}:{languageName:"English",description:"Default to English as no supported/identified language was found"}}const si=()=>{Uo("onInitComplete: zoom_chat_client module Initialization : [SUCCESSFUL]")};function ci(e){const t=e+"=",o=document.cookie.split(";");for(const e of o){const o=e.trim();if(0===o.indexOf(t))return o.substring(t.length,o.length)}return null}function di(e){return null!==ci(e)}function li(e){return null!==ci(e)}function ui(e){return null!==ci(e)}function hi(e,t){var i;const n=undefined,a=document.cookie.split("; ").find((t=>t.startsWith(`${e}=`)));if(!a)return!1;try{const e=decodeURIComponent(a.split("=")[1]),o=JSON.parse(e);if(!o.hasOwnProperty("categories")||"object"!=typeof o.categories)return!1;if(!o.categories.hasOwnProperty(t))return!1;const n=undefined;return Boolean(null===(i=null==o?void 0:o.categories)||void 0===i?void 0:i[t])}catch(t){return ko(o.Critical,`Error parsing cookie ${e}`,t),!1}}function mi(e){const t=undefined;return e===TrustedHosts.DOCSEND_HOST}function fi(e){let t;return t=e===d.WWW_DBX_HOST?u.WWW_DBX_ENTITLEMENTS:e===d.SIGN_CENTER_HOST?u.SIGN_CENTER_ENTITLEMENTS:e===d.HELP_CENTER_HOST?u.HELP_CENTER_ENTITLEMENTS:e===d.EXPERIENCE_HOST?u.EXPERIENCE_ENTITLEMENTS:u.UNSUPPORTED_ENTITLEMENTS,t}function Ci(e,t){let o;if(e===u.WWW_DBX_ENTITLEMENTS)o={wwwDbxEntitlements:t[e]};else if(e===u.HELP_CENTER_ENTITLEMENTS)o={helpCenterEntitlements:t[e]};else if(e===u.EXPERIENCE_ENTITLEMENTS)o={experienceEntitlements:t[e]};else if(e===u.SIGN_CENTER_ENTITLEMENTS)o={signCenterEntitlements:t[e]};else{if(e!==u.HELLOSIGN_ENTITLEMENTS){const e=undefined;throw new Error("Invalid entitlements key")}o={hellosignEntitlements:t[e]}}return o}function Ei(e,t,o,i,n,a,r){return{identifiedChat:e,chatInteractionType:t,trustedHost:o,identifiedHost:i,identifiedHref:n,supportedEntitlements:a,identifiedChatStartUpTime:r}}function Si(e,t,i,n,a,r){const s=fi(t);if(s===u.UNSUPPORTED_ENTITLEMENTS)return ko(He.type,He.message,void 0),{error:He};let c;try{c=Ci(s,a)}catch(e){return ko(o.Critical,Ae.message,e),{error:Ae}}return s!==u.HELP_CENTER_ENTITLEMENTS&&s!==u.EXPERIENCE_ENTITLEMENTS||(r=0),t===d.WWW_DBX_HOST?Ei(e,h.PROACTIVE_CHAT,d.WWW_DBX_HOST,i,n,c,r):t===d.HELP_CENTER_HOST||t===d.EXPERIENCE_HOST?Ei(e,h.PROACTIVE_CHAT,t,i,n,c,r):t===d.SIGN_CENTER_HOST?Ei(e,h.PROACTIVE_CHAT,d.SIGN_CENTER_HOST,i,n,c,r):{error:Re}}function pi(e){const t=`Initialization aborted: No unified chat cookie found for ${e} chat.`;ko(o.Operational,t)}function gi(e){const t=`Initialization aborted: Entry page key is null or undefined for ${e}.`;ko(o.NonCritical,t)}function _i(e){const t=`Initialization aborted: Invalid entry page key detected (${e}).`;ko(o.NonCritical,t)}function Ti(){const e="Initialization aborted: Chat disabled during non-operational hours.";ko(o.Operational,e)}function Ii(e){const t=`Initialization aborted: No valid entry page detected at ${e}.`;ko(o.Operational,t)}function bi(){const e="Initialization aborted: LoginPageCookie not found to load chat at /login page.";ko(o.Operational,e)}function Oi(e){const t=`Initialization aborted: Unsupported chat type detected during ${e} setup.`;ko(o.Critical,t)}function Ni(){const e="Initialization failed: Missing or invalid configuration details.";ko(o.Operational,e)}function Ai(e){const t=`Support Chat Initialization skipped. Is ${e} User.`;ko(o.Operational,t)}function Ri(){const e="Support Chat Initialization skipped. User identifiers are not available.";ko(o.Operational,e)}function wi(){const e="Allowing Support Chat Initialization. User identifiers are not available.";ko(o.NonCritical,e)}function Di(e){const t=`DBX Chat Initialization: Skipped due to subdomain flag. Is DBX Chat enabled for subdomains: ${e}.`;ko(o.Operational,t)}function Li(){const e="Initialization aborted: Unrecognized or untrusted domain detected.";ko(o.UserError,e)}function yi(e,t){const i=`Initialization aborted: Missing entry path for host '${e}' at '${t}'.`;ko(o.Critical,i)}function Hi(){ko(Ue.type,Ue.message)}function vi(e,t,o){const i={identifiedChat:l.DOCSEND_CHAT,chatInteractionType:h.REACTIVE_CHAT,trustedHost:d.DOCSEND_HOST,identifiedHost:t,identifiedHref:e,supportedEntitlements:{docsendEntitlements:o.chatSupportedEntitlements.docsendEntitlements}};return o.chatInitProfile=i,o}function Ui(e,t,o){const i={identifiedChat:l.HELLOSIGN_CX_CHAT,chatInteractionType:h.REACTIVE_CHAT,trustedHost:d.HELLOSIGN_HOST,identifiedHost:t,identifiedHref:e,supportedEntitlements:{hellosignEntitlements:o.chatSupportedEntitlements.hellosignEntitlements}};return o.chatInitProfile=i,o}function xi(e,t,o){const i={identifiedChat:l.DASH_SALES_CHAT,chatInteractionType:h.PROACTIVE_CHAT,trustedHost:d.DASH_DBX_HOST,identifiedHost:t,identifiedHref:e,supportedEntitlements:{dashDbxEntitlements:o.chatSupportedEntitlements.dashDbxEntitlements},identifiedChatStartUpTime:0};return o.chatInitProfile=i,o}function Fi(e,t,o){const i={identifiedChat:l.FORMSWIFT_CHAT,chatInteractionType:h.PROACTIVE_CHAT,trustedHost:d.FORMSWIFT_HOST,identifiedHost:t,identifiedHref:e,supportedEntitlements:{formswiftEntitlements:o.chatSupportedEntitlements.formswiftEntitlements},identifiedChatStartUpTime:0};return o.chatInitProfile=i,o}function Pi(e,t,o,i,n){const a=undefined;return!Ko(t,i,n).isValid&&di(UNIFIED_CHAT_COOKIE_NAME)?Bi(e,t,o,i,n,0):(Ii(i),{error:ERROR_NO_VALID_ENTRY_PAGE})}function ki(e,t,o,i,n){return Bi(e,t,o,i,n,0)}function Bi(e,t,o,i,n,a){const r=Si(e,t,o,i,n.chatSupportedEntitlements,a);return"error"in r?{error:r.error}:(n.chatInitProfile=r,{chatConfig:n})}function Wi(e,t,i,n,a,r){return 0===r?Bi(e,t,i,n,a,r):{error:{type:o.Operational,message:`Proactive chat timer is not 0. Timer value: ${r}.`}}}function Mi(e,t){if(!e||!Array.isArray(t)||0===t.length)return{status:!1,key:null};const o=ii(e);if(!o)return{status:!1,key:null};for(const{name:e,entriesMap:i}of t)if(i&&"object"==typeof i){for(const e in i)if(o===e||o.startsWith(`${e}/`))return{status:!0,key:e,value:i[e]}}else Uo(`findValueInMaps: Skipping invalid map "${e}".`);return{status:!1,key:null}}function Xi(e,t){var o,i,n,a;const r=null===(i=null===(o=t.chatSpecificConfigs)||void 0===o?void 0:o.dbxChatConfigs)||void 0===i?void 0:i.salesEntryPagesConfig,s=null===(a=null===(n=t.chatSpecificConfigs)||void 0===n?void 0:n.dbxSignChatConfigs)||void 0===a?void 0:a.salesEntryPagesConfig,c=undefined,d=undefined,l=undefined;return Mi(e,[{name:"DBX_SALES_ENTRIES",entriesMap:null!=r?r:z},{name:"SIGN_SALES_ENTRIES",entriesMap:null!=s?s:K},{name:"DBX_CX_ENTRIES",entriesMap:J}])}function Gi(e){const t=undefined;return Mi(e,[{name:"SIGN_SALES_ENTRIES",entriesMap:K}])}function Vi(e,t,i,n,a,r){switch(r){case d.WWW_DBX_HOST:return ji(e,t,i,n,a,r);case d.SIGN_CENTER_HOST:return tn(e,t,i,n,a,r);default:return{error:{type:o.Critical,message:`No handler for domain ${r}`}}}}function zi(e,t,o,i,n,a){const r=undefined;return Vi(e,t,o,i,n,a)}function Zi(e,t,o,i,n,a){const r=ci(t);return r===U?zi(e,l.DBX_SALES_CHAT,o,i,n,a):r===F?zi(e,l.DBX_CX_CHAT,o,i,n,a):r!==F&&r!==U?{error:Ie}:{error:be}}function $i(e,t){t&&(e.cxChatButtonLanguage=t)}function Ki(e,t,o){Uo(`logUnifiedChatStatus: [PRE-CHECKS] Unified chat cookie Key: ${t}`),Uo(`logUnifiedChatStatus: [PRE-CHECKS] Unified chat cookie availability: ${e}`),Uo(`logUnifiedChatStatus: [PRE-CHECKS] Domain message: ${o}`)}function Ji(e,t,o,i,n,a,r,s,c,d){const l=r(t,n);return d(p)?c(e,a,i,o,n):s(e,a,i,o,n,l)}function ji(e,t,o,i,n,a){return t===l.DBX_SALES_CHAT?qi(e,a,o,i,t,n):t===l.DBX_CX_CHAT?Yi(e,a,o,i,t,n):{error:Oe}}function qi(e,t,o,i,n,a){if(e&&t===d.WWW_DBX_HOST&&ci(p)===U)return Wi(n,t,i,o,a,0);{const e=Ko(t,o,a);return null===e.entryPath?(yi(d.WWW_DBX_HOST,o),{error:pe}):e.isValid?Ji(n,e.entryPath,o,i,a,t,Wo,Bi,ki,di):{error:pe}}}function Yi(e,t,o,i,n,a){if(e&&t===d.WWW_DBX_HOST&&ci(p)===F)return Wi(n,t,i,o,a,0);{const e=jo(t,o);return null===e.entryPath?(yi(d.WWW_DBX_HOST,o),{error:pe}):e.isValid?Ji(n,e.entryPath,o,i,a,t,Xo,Bi,ki,di):{error:pe}}}function Qi(e,t,o,i,n){const a=Xi(t,i);if(a.status){const r=a.key;if(r){if(Go(r,i)){if(r===Z){const e=undefined;if(!On())return bi(),{error:Te}}return zi(e,l.DBX_SALES_CHAT,t,o,i,n)}return Vo(r)?zi(e,l.DBX_CX_CHAT,t,o,i,n):(_i(r),{error:Se})}return gi(t),{error:ge}}return Ii(t),{error:_e}}function en(e,t,o){const i=sn(),n=oi(i),a=di(p);return a?Zi(a,e,i,n,o,t):Qi(a,i,n,o,t)}function tn(e,t,o,i,n,a){const r=ci(p);return e?r===U?nn(t,o,i,n,a,0):r===F?an(t,o,i,n,a,0):{error:be}:{error:Ne}}function on(e,t,o,i){if(_n())return Ti(),{error:ve};const n=Gi(e);if(n.status){const a=n.key;if(a){if(zo(a,o)){const n=undefined,a=Mo(ii(e),o);return nn(l.DBX_SALES_CHAT,e,t,o,i,a)}return _i(a),{error:Se}}return gi(e),{error:ge}}return Ii(e),{error:_e}}function nn(e,t,o,i,n,a){return Bi(e,n,o,t,i,a)}function an(e,t,o,i,n,a){return Bi(e,n,o,t,i,a)}function rn(e,t,o){const i=sn(),n=oi(i),a=di(p);return a?(localStorage.setItem(R,JSON.stringify(ue)),Zi(a,e,i,n,o,t)):on(i,n,o,t)}function sn(){return window.location.href}function cn(e,t,o,i){let n=`${e}=${t};expires=${o.toUTCString()};path=/`;i&&(n+=`;domain=${i}`),document.cookie=n}function dn(e){const t=new Date;t.setTime(t.getTime()+36e5);const o=M[e];e===l.DBX_SALES_CHAT||e===l.DBX_CX_CHAT?cn(p,o,t,W):e===l.DASH_SALES_CHAT?cn(g,o,t,W):(e===l.FORMSWIFT_CHAT||e===l.HELLOSIGN_CX_CHAT)&&cn(p,o,t)}function ln(e){const t=window;t.dbxCxChatButtonLanguage||(t.dbxCxChatButtonLanguage={}),$i(t.dbxCxChatButtonLanguage,e)}async function un(){const e=Ho();if(e&&"function"==typeof e.initZoomChatReloadProcess){const t=undefined;return!!await e.initZoomChatReloadProcess()}return!1}const hn=async e=>{if(e){let t;switch(e){case Language.UNKNOWN_LANGUAGE||Language.ENGLISH:t="en-US";break;case Language.SPANISH:t="es-ES";break;case Language.FRENCH:t="fr-FR";break;case Language.GERMAN:t="de-DE";break;case Language.JAPANESE:t="ja-JP";break;case Language.PORTUGUESE:t="pt-PT";break;default:t="UNKNOWN"}const o=undefined;await fn(ChatType.DBX_CX_CHAT)&&ln(t)}},mn=async()=>{await fn(ChatType.DBX_SALES_CHAT)},fn=async e=>{const t=undefined;if(!document.getElementById(UNIFIED_CHAT_IFRAME_ID)||document.cookie.includes(UNIFIED_CHAT_COOKIE_NAME))return ko(ErrorSeverity.Critical,ZoomChatIframeEmbedderErrorMessages.ERROR_IFRAME_NOT_FOUND_OR_COOKIE_SET),!1;const o=undefined;if(!await un())return ko(ErrorSeverity.Critical,ZoomChatIframeEmbedderErrorMessages.ERROR_ZOOM_CHAT_RELOAD_FAILED),!1;const i=JSON.parse(localStorage.getItem(UNIFIED_CHAT_LOCAL_STORAGE_KEY)||"{}");return e===ChatType.DBX_SALES_CHAT?localStorage.setItem(DBX_SALES_CHAT_ON_CHECKOUT_FLAG,"true"):e===ChatType.DBX_CX_CHAT&&(i.reload=!0,localStorage.setItem(UNIFIED_CHAT_LOCAL_STORAGE_KEY,JSON.stringify(i))),!0};function Cn(){const e=Ho();e&&"function"==typeof e.handleOpenChatWindowCallback?e.handleOpenChatWindowCallback():ko(Ge.type,Ge.message)}const En=e=>{e.style.display=""};function Sn(){const e=undefined;return di(p)}function pn(e){switch(e){case U:return l.DBX_SALES_CHAT;case F:return l.DBX_CX_CHAT;default:return l.UNSUPPORTED_CHAT}}function gn(){const e=ci(p);return null==e?"":e}function _n(){const e=undefined,t=(new Date).getDay();return 0===t||6===t}function Tn(){if(document.cookie.includes(UNIFIED_CHAT_COOKIE_NAME)){Po();const e=document.getElementById(UNIFIED_CHAT_IFRAME_ID);e&&(e.style.display="none")}}function In(){try{const e=Ho();e&&"function"==typeof e.consentNotGrantedDidNotLoadChatClient&&e.consentNotGrantedDidNotLoadChatClient()}catch(e){ko(ERROR_ZOOM_CHAT_CONSENT_DECLINED.type,ERROR_ZOOM_CHAT_CONSENT_DECLINED.message,e)}}function bn(){try{const e=Ho();if(!e||"function"!=typeof e.consentGrantedProceedDBXSalesChatToLoad)return void ko(Xe.type,Xe.message);e.consentGrantedProceedDBXSalesChatToLoad()}catch(e){ko(xe.type,xe.message,e)}}function On(){const e=undefined;return ci(x)===_}var Nn,An,Rn;!function(e){e.UNI_NAV="UNI_NAV",e.ZOOM_CHAT="ZOOM_CHAT",e.INTEGRATION_TEST="INTEGRATION_TEST"}(Nn||(Nn={})),function(e){e.BOOTSTRAP="BOOTSTRAP"}(An||(An={})),function(e){e.EMBEDDER_READY="EMBEDDER_READY",e.CLIENT_MESSAGE="CLIENT_MESSAGE"}(Rn||(Rn={}));var wn=function(){function e(e,t,o,i){var n=this,a;this.port=new Promise((function(e,t){a=e}));var r=new URL(o),s=new URLSearchParams(r.search);s.append("origin",location.origin),i&&s.append("locale",i),r.search=String(s),this.iframe=Object.assign(document.createElement("iframe"),{src:String(r),style:"border:none;background-color:transparent;",width:"100%",height:"1",frameBorder:"0",allowTransparency:"true",name:e});var c=function(o){if(o.origin===r.origin&&o.source===n.iframe.contentWindow&&o.data.key===An.BOOTSTRAP){if(o.data.namespace!==e)return;removeEventListener("message",c);var i=o.ports[0];i.onmessage=function(e){e.data.key===Rn.CLIENT_MESSAGE&&t(e.data.clientData)},i.postMessage({key:Rn.EMBEDDER_READY}),a(i)}};addEventListener("message",c)}return e.prototype.sendMessage=function(e){var t={key:Rn.CLIENT_MESSAGE,clientData:e};this.port.then((function(e){e.postMessage(t)}))},e}(),Dn=function(){function e(e,t){var o=new MessageChannel,i=o.port1,n;this.port=new Promise((function(e,t){n=e})),i.onmessage=function(e){e.data.key===Rn.EMBEDDER_READY?n(i):e.data.key===Rn.CLIENT_MESSAGE&&t(e.data.clientData)};var a=new URLSearchParams(location.search).get("origin")||"";if(a.length){var r={key:An.BOOTSTRAP,namespace:e};window.parent.postMessage(r,a,[o.port2])}}return e.prototype.sendMessage=function(e){var t={key:Rn.CLIENT_MESSAGE,clientData:e};this.port.then((function(e){e.postMessage(t)}))},e}(),Ln,yn,Hn,vn,Un;!function(e){e.getBrowserStatus="FETCH_BROWSER_STATUS",e.deleteAttachedIframe="DELETE_ATTACHED_IFRAME",e.reloadPageAfterChatEnds="RELOAD_PAGE_AFTER_CHAT_ENDS",e.getDocsendCurrentUserInfo="FETCH_DOCSEND_CURRENT_USER_INFO",e.getDropboxCurrentUserInfo="FETCH_DROPBOX_CURRENT_USER_INFO",e.getHellosignCurrentUserInfo="FETCH_HELLOSIGN_CURRENT_USER_INFO",e.getFormswiftCurrentUserInfo="FETCH_FROMSWIFT_CURRENT_USER_INFO",e.getBrowserLanguageInfo="FETCH_BROWSER_LANGUAGE_INFO",e.getBrowserPathInfo="FETCH_DBX_BROWSER_PATH_INFO",e.getChatTypeInfo="FETCH_CHAT_TYPE_INFO",e.endChatButtonClicked="END_CHAT_BUTTON_CLICKED",e.fetchZoomChatCredentials="FETCH_ZOOM_CHAT_CREDENTIALS",e.addScriptTagSuccess="ADD_SCRIPT_TAG_SUCCESS",e.addScriptTagError="ADD_SCRIPT_TAG_ERROR",e.expandButtonClicked="EXPAND_BUTTON_CLICKED",e.minimizeButtonClicked="MINIMIZE_BUTTON_CLICKED",e.chatWidgetLoaded="CHAT_WIDGET_LOADED_INSIDE_IFRAME",e.chatWidgetNotLoaded="CHAT_WIDGET_NOT_LOADED_INSIDE_IFRAME",e.setCookieForDBXSalesChat="SET_COOKIE_FOR_DBX_SALES_CHAT",e.getCxChatRequestedLanguageInfo="GET_CX_CHAT_REQUESTED_LANGUAGE_INFO"}(Ln||(Ln={})),function(e){e.sendBrowserStatus="SEND_BROWSER_STATUS",e.sendDocsendCurrentUserInfo="SEND_DOCSEND_CURRENT_USER_INFO",e.sendDropboxCurrentUserInfo="SEND_DROPBOX_CURRENT_USER_INFO",e.sendFormswiftCurrentUserInfo="SEND_FORMSWIFT_CURRENT_USER_INFO",e.sendHellosignCurrentUserInfo="SEND_HELLOSIGN_CURRENT_USER_INFO",e.sendCurrentChatTypeInfo="SEND_CURRENT_CHAT_TYPE_INFO",e.sendBrowserPathInfo="SEND_DBX_BROWSER_CURRENT_PATH_INFO",e.sendBrowserCurrentLanguageInfo="SEND_BROWSER_CURRENT_LANGUAGE_INFO",e.sendZoomChatCredentials="SEND_ZOOM_CHAT_CREDENTIALS",e.isChatWidgetLoadedInsideIframe="IS_CHAT_WIDGET_LOADED_INSIDE_IFRAME",e.performLogoutCallback="ZOOM_CHAT_LOGOUT_CALLBACK",e.setZoomChatWidgetToOpenWindow="SET_CHAT_WINDOW_TO_OPEN_MODE",e.callbackWhenUserSwitchesCompany="USER_PERRFOMS_SWITCH_COMMPANY_ONGOING_CHAT_SESSION",e.sendCxChatRequestedLanguageInfo="SEND_CX_CHAT_REQUESTED_LANGUAGE_INFO"}(yn||(yn={})),function(e){e.REQUEST="REQUEST",e.RESPONSE="RESPONSE"}(Hn||(Hn={})),function(e){e.REQUEST="REQUEST",e.RESPONSE="RESPONSE"}(vn||(vn={})),function(e){e.success="SUCCESS",e.failure="FAILED"}(Un||(Un={}));const xn={action:yn.performLogoutCallback,message:fe.LOGOUT_CALLBACK,messagetype:Hn.REQUEST},Fn=Ln.setCookieForDBXSalesChat,Pn=me.SET_COOKIE_FOR_DBX_SALES_CHAT,kn=vn.REQUEST,Bn=Ln.fetchZoomChatCredentials,Wn=me.FETCH_ZOOM_CHAT_CREDENTIALS,Mn=vn.REQUEST,Xn={action:yn.isChatWidgetLoadedInsideIframe,message:fe.CHECK_CHAT_WIDGET_STATUS,messagetype:Hn.REQUEST},Gn={action:yn.setZoomChatWidgetToOpenWindow,message:fe.SET_ZOOM_CHAT_WIDGET_TO_OPEN_WINDOW,messagetype:Hn.REQUEST},Vn=Ln.deleteAttachedIframe,zn=me.DELETE_ATTACHED_IFRAME_ON_END_CHAT_BUTTON_CLICK,Zn=vn.REQUEST,$n=Ln.getDocsendCurrentUserInfo,Kn=me.FETCH_DOCSEND_CURRENT_USER_INFO,Jn=vn.REQUEST,jn=Ln.getDropboxCurrentUserInfo,qn=me.FETCH_DROPBOX_CURRENT_USER_INFO,Yn=vn.REQUEST,Qn=Ln.getFormswiftCurrentUserInfo,ea=me.FETCH_FORMSWIFT_CURRENT_USER_INFO,ta=vn.REQUEST,oa=Ln.getBrowserLanguageInfo,ia=me.FETCH_BROWSER_LANGUAGE_INFO,na=vn.REQUEST,aa=Ln.getHellosignCurrentUserInfo,ra=me.FETCH_HELLOSIGN_CURRENT_USER_INFO,sa=vn.REQUEST,ca=Ln.getBrowserPathInfo,da=me.FETCH_BROWSER_PATH_INFO,la=vn.REQUEST,ua=Ln.getCxChatRequestedLanguageInfo,ha=me.FETCH_CX_CHAT_REQUESTED_LANGUAGE_INFO,ma=vn.REQUEST,fa=Ln.getChatTypeInfo,Ca=me.FETCH_CHAT_TYPE_INFO,Ea=vn.REQUEST,Sa=Ln.endChatButtonClicked,pa=me.END_CHAT_BUTTON_CLICKED,ga=vn.REQUEST,_a=Ln.getBrowserStatus,Ta=me.GET_BROWSER_STATUS,Ia=vn.REQUEST,ba=Ln.addScriptTagSuccess,Oa=me.SCRIPT_TAG_SUCCESS,Na=vn.RESPONSE,Aa=Ln.addScriptTagError,Ra=me.SCRIPT_TAG_ERROR,wa=vn.RESPONSE,Da=Ln.expandButtonClicked,La=me.EXPAND_BUTTON_CLICKED,ya=vn.RESPONSE,Ha=Ln.minimizeButtonClicked,va=me.MINIMIZE_BUTTON_CLICKED,Ua=vn.RESPONSE,xa=Ln.chatWidgetLoaded,Fa=me.CHAT_WIDGET_LOADED,Pa=vn.RESPONSE,ka=Ln.chatWidgetLoaded,Ba=Un.success,Wa=me.CHAT_WIDGET_LOADED,Ma=vn.RESPONSE,Xa=s.ChatBubble,Ga=Ln.chatWidgetLoaded,Va=Un.success,za=me.CHAT_WIDGET_LOADED,Za=vn.RESPONSE,$a=s.ChatWindow,Ka=Ln.chatWidgetNotLoaded,Ja=me.CHAT_WIDGET_NOT_LOADED,ja=Un.failure,qa=vn.RESPONSE,Ya="undefined"!=typeof self&&self?self:window;function Qa(e){const t=undefined;(Ya._DBX_UXA_bufferedClosures=Ya._DBX_UXA_bufferedClosures||[]).push(e),tr()}function er(){Ya._DBX_UXA_isUxaListening=!0,tr()}function tr(){if(!Ya._DBX_UXA_isUxaListening)return;const e=Ya._DBX_UXA_bufferedClosures=Ya._DBX_UXA_bufferedClosures||[],t=[...e];e.length=0;for(const e of t)e()}function or(){Ya._DBX_UXA_isUxaListening=void 0,Ya._DBX_UXA_bufferedClosures=void 0;try{delete Ya._DBX_UXA_isUxaListening,delete Ya._DBX_UXA_bufferedClosures}catch(e){}}function ir(e,t={detail:null}){if("function"==typeof CustomEvent)return new CustomEvent(e,t);const o=document.createEvent("CustomEvent");return o.initCustomEvent(e,!0,!0,t.detail),o}function nr(e,t){window.dispatchEvent(ir(e,t))}const ar=(e,t)=>{Qa((()=>{nr("zoom_chat_custom_event",{detail:{eventType:e,extra:t}})}))};function rr(e,t,o){o.chatType!==l.DOCSEND_CHAT&&ar(e,{chat_type:o.chatType,chat_interaction_type:o.chatInteractionType,event_details:t,surface_screen_height:o.surfaceScreenHeight,surface_screen_width:o.surfaceScreenWidth,external_tag:o.externalTag||"",platform:o.platform,time_until_zoom_chat_interaction:o.timeUntilchatInteraction,total_zoom_chat_duration:o.totalChatDurationInSec})}function sr(e){rr(m.INITIALIZED,"Chat initiation has started",e)}function cr(e){rr(m.SUCCESS,"Chat initiation successful",e)}function dr(e){rr(m.FAILED,"Chat initiation failed",e)}function lr(e){rr(m.NETWORK_FAILED,"Chat initiation failed due to network issue",e)}function ur(e){rr(m.TIMEOUT_FAILED,"Chat initiation failed due to timeout",e)}function hr(e){rr(m.EXPAND,"User clicked on the chat bubble",e)}function mr(e){rr(m.MINIMIZE,"User clicked on the chat minimize button",e)}function fr(e){rr(m.END,"The chat engagement was ended",e)}function Cr(e){rr(m.CHATREQUESTED,"User requested a chat",e)}function Er(e){rr(m.DISPLAYED,"Zoom chat displayed to ther user",e)}function Sr(e){rr(m.LOGOUT,"Chat ended by user logout",e)}function pr(e){Uo("registerZoomChatConsentDeclinedCallback: User declined the cookie for the chat, Callback is triggered, not initializing zoom_chat_client"),rr(m.CONSENTDECLINED,"User declined coockie consent, did not load zoom chat",e)}class gr{constructor(e){this.args=e,this.el=null,this.isChatIframeReady=!1,this.initTimeout=null,this.chatStartInitTime=null,this.chatEndInitTime=null,this.chatElapsedTime=null,this.handleIframeServiceMessages=e=>{e.action===Ln.getDocsendCurrentUserInfo?this.sendDocsendCurrentUserInfoToIframeService():e.action===Ln.getDropboxCurrentUserInfo?this.sendDropboxCurrentUserInfoToIframeService():e.action===Ln.getFormswiftCurrentUserInfo?this.sendFormswiftCurrentUserInfoToIframeService():e.action===Ln.getBrowserPathInfo?this.sendDropboxCurrentPathInfoToIframeService():e.action===Ln.getHellosignCurrentUserInfo?this.sendHellosignCurrentUserInfoToIframeService():e.action===Ln.getChatTypeInfo?this.sendCurrentChatTypeInfoToIframeService():e.action===Ln.addScriptTagSuccess?this.attachScriptTagSuccessToFrame():e.action===Ln.addScriptTagError?this.attachScriptTagErrorToFrame(e):e.action===Ln.fetchZoomChatCredentials?this.executeAttachZoomChatScriptTagToIframe():e.action===Ln.expandButtonClicked||e.action===Ln.minimizeButtonClicked?this.handleChatWidgetInteraction(e):e.action===Ln.chatWidgetLoaded||e.action===Ln.chatWidgetNotLoaded?this.validateChatWidgetLoadStatus(e):e.action===Ln.endChatButtonClicked?this.performCleanUpAsUserEndsTheChat():e.action===Ln.deleteAttachedIframe?this.detachZoomChatIframe():e.action===Ln.getBrowserStatus?this.sendBrowserStatusToIframeService():e.action===Ln.setCookieForDBXSalesChat?this.setCookieForDBXSalesChat():e.action===Ln.getCxChatRequestedLanguageInfo&&this.sendDropboxCxChatRequestedInfoToIframeService()},this.iframeEmbedder=new wn(Nn.ZOOM_CHAT,this.handleIframeServiceMessages,e.iframeSrc,void 0),this.isMobileOrTablet=this.detectMobileOrTablet(),this.registerZoomChatClientReloadCallback(),this.registerLogoutCallback(),this.registerSwitchCompanyCallback(),this.registerOpenChatWindowCallback(),this.registerInitZoomChatClientReloadCallback(),this.registerAllowDBXSalesChatToLoadCallback(),this.registerZoomChatConsentDeclinedCallback(),this.registerShowHelloSignCxChatCallback()}registerShowHelloSignCxChatCallback(){const e=undefined;if(this.getInitializedChatTypeFromProfile()===l.HELLOSIGN_CX_CHAT){Uo("registerShowHelloSignCxChatCallback: Registered ShowHelloSignCXChat method to display HelloSign CX chat");const e=undefined;Ho().showHelloSignCxChat=()=>this.handleShowHelloSignCxChat()}}async handleShowHelloSignCxChat(){Uo("handleShowHelloSignCxChat: Checking if chat reload is needed.");const e=document.getElementById(O);if(this.shouldReloadHelloSignCxChat(e)){Uo("handleShowHelloSignCxChat: Reloading chat client.");const e=await un();this.handleReloadResult(e)}else Uo("handleShowHelloSignCxChat: Iframe not found or cookie is set, not reloading."),ko(o.Critical,Ee.ERROR_IFRAME_NOT_FOUND_OR_COOKIE_SET)}shouldReloadHelloSignCxChat(e){Uo("shouldReloadHelloSignCxChat: Checking reload conditions.");const t=!0===this.getStateFromLocalStorage(y),o=!!e&&!document.cookie.includes(p);return Uo(`shouldReloadHelloSignCxChat: Logout flag set: ${t}, Iframe reload needed: ${o}`),t&&(Uo("shouldReloadHelloSignCxChat: Removing chat session logout flag."),this.removeChatSessionLogoutFlag()),t||o}handleReloadResult(e){Uo(`handleReloadResult: Reload success status: ${e}`),e?(Uo("handleReloadResult: Updating local storage to reload state."),this.updateLocalStorageToReloadState()):(Uo("handleReloadResult: Zoom chat reload failed."),ko(o.Critical,Ee.ERROR_ZOOM_CHAT_RELOAD_FAILED))}updateLocalStorageToReloadState(){Uo("updateLocalStorageToReloadState: Setting reload flag in local storage.");const e=JSON.parse(localStorage.getItem(R)||"{}");e.reload=!0,localStorage.setItem(R,JSON.stringify(e))}registerFormSwiftChatDisplayHandler(){Uo("registerFormSwiftChatDisplayHandler: Registered showFormSwiftChat method to display FormSwift chat");const e=undefined;Ho().showFormSwiftChat=async()=>{try{const e=this.shouldDisplayFormswiftChat();if(Uo(`showFormSwiftChat: Should display FormSwift chat: ${e}`),!e)return void await this.handleReInitFormswiftChat();this.proceedToDisplayFormswiftChat()}catch(e){this.shouldDisplayFormswiftChatError(e)}}}registerZoomChatClientReloadCallback(){const e=undefined;Ho().reloadZoomChatClient=async()=>{try{const e=await this.reInitializeZoomChatClient();if(e)Uo("registerZoomChatClientReloadCallback: Re-initialization complete.");else{const t=`registerZoomChatClientReloadCallback: Returned Re-initialization status ${e}`;ko(o.Critical,t)}return e}catch(e){return ko(o.Critical,"reInitializeZoomChatClient is failed",e),!1}}}registerInitZoomChatClientReloadCallback(){const e=undefined;Ho().initZoomChatReloadProcess=async()=>{try{return await this.startZoomChatIframeReloadProcess(),!0}catch(e){return ko(o.Critical,"Error during Zoom chat reload process.",e),!1}}}static getInstance(e){return gr.instance||(gr.instance=new gr(e)),gr.instance}updateArgs(e){this.args={...this.args,...e}}clearInitializationTimeout(){try{if(!this.initTimeout)return void Uo("clearInitializationTimeout: No active timeout to clear.");clearTimeout(this.initTimeout),this.initTimeout=null,Uo("clearInitializationTimeout: Successfully cleared the initialization timeout.")}catch(e){ko(o.Critical,Ee.ERROR_CLEARING_TIMEOUT,e)}}static setChatUri(e){gr.chatUri=e}static setChatApiKey(e){gr.chatApiKey=e}static setChatDataEnv(e){gr.chatDataEnv=e}static getChatUri(){return gr.chatUri}static getChatApiKey(){return gr.chatApiKey}static getChatDataEnv(){return gr.chatDataEnv}deleteUnifiedChatCookie(e,t){Uo(`deleteUnifiedChatCookie: Removing the Unified Chat Cookie : ${e} `);let o=`${e}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`;t&&(o+=` domain=${t};`),document.cookie=o}getIsMobileOrTablet(){return this.isMobileOrTablet}detectMobileOrTablet(){return window.matchMedia("(max-width: 1024px)").matches}getScreenHeight(){return`${window.screen.height}px`}getScreenWidth(){return`${window.screen.width}px`}getPlatformInfo(){return navigator.platform}getDelayBetweenChatDisplayAndFirstInteraction(){const e=this.getStateFromLocalStorage(D),t=this.getStateFromLocalStorage(w);if(!e||!t)return 0;const o=new Date(e),i=new Date(t);return isNaN(o.getTime())||isNaN(i.getTime())?0:(i.getTime()-o.getTime())/1e3}calculateTotalChatDuration(){const e=this.getStateFromLocalStorage(w),t=this.getStateFromLocalStorage(L);if(!e||!t)return 0;const o=new Date(e),i=new Date(t);return isNaN(o.getTime())||isNaN(i.getTime())?0:(i.getTime()-o.getTime())/1e3}updateChatInteractionType(e){this.args.chatInitProfile&&(this.args.chatInitProfile.chatInteractionType=e)}handleZoomUXAEvent(e){const t={chatType:this.getInitializedChatTypeFromProfile(),chatInteractionType:this.getChatInteractionTypeFromProfile(),surfaceScreenHeight:this.getScreenHeight(),surfaceScreenWidth:this.getScreenWidth(),platform:this.getPlatformInfo(),timeUntilchatInteraction:String(this.getDelayBetweenChatDisplayAndFirstInteraction()),totalChatDurationInSec:String(this.calculateTotalChatDuration())};switch(e){case m.INITIALIZED:sr(t);break;case m.SUCCESS:cr(t);break;case m.FAILED:dr(t);break;case m.NETWORK_FAILED:lr(t);break;case m.TIMEOUT_FAILED:ur(t);break;case m.EXPAND:hr(t);break;case m.MINIMIZE:mr(t);break;case m.END:fr(t);break;case m.CHATREQUESTED:Cr(t);break;case m.DISPLAYED:Er(t);break;case m.LOGOUT:Sr(t);break;case m.CONSENTDECLINED:pr(t);break;default:const i=`Unknown Zoom chat UXA event encountered: ${e}`;ko(o.Critical,i)}}getStateFromLocalStorage(e){const t=localStorage.getItem(e);return null===t?(this.handleLocalStorageError(`No state found in local storage for key: ${e}`),null):JSON.parse(t)}deleteUnifiedChatStateFromLocalStorage(e){localStorage.removeItem(e)}saveStateToLocalStorage(e,t){localStorage.setItem(e,JSON.stringify(t))}isValidSalesChatAppState(){const e=this.getStateFromLocalStorage(R);if(Uo(`isValidSalesChatAppState: dbxUnifiedChatState : ${e}`),!e||"object"!=typeof e)return Uo("isValidSalesChatAppState: No state found in local storage for key: dbx_unified_chat_state"),!1;const t=e.hasOwnProperty("currentIframeState")&&e.hasOwnProperty("currentUserActionState")&&e.hasOwnProperty("currentWidgetState")&&e.hasOwnProperty("currentCompanyState");Uo(`isValidSalesChatAppState: hasRequiredProperties : ${t}`);const o=e.hasOwnProperty("pageHistory")||e.hasOwnProperty("reload");return Uo(`isValidSalesChatAppState: hasInvalidProperties : ${o}`),Uo(`isValidSalesChatAppState: Returning : ${t&&!o}`),t&&!o}cleanUpUnifiedChatState(){const e=this.getInitializedChatTypeFromProfile();if(X.includes(e)){if(e===l.DBX_SALES_CHAT&&!this.isValidSalesChatAppState())return;localStorage.removeItem(R)}}handleLocalStorageError(e,t){ko(o.NonCritical,e,t)}updateStateInLocalStorage(e,t,o){try{const i=this.getStateFromLocalStorage(e);i&&o in i&&(i[o]=t,this.saveStateToLocalStorage(e,i))}catch(t){this.handleLocalStorageError(`Error updating local storage for key ${e}`,t)}}scheduleChatAndIframeToVisible(e,t){this.proceedToDisplayChat(e,t),this.setChatIframeVisibilityAndState()}setIframeVisibilityState(){Uo("setIframeVisibilityState: Updating local storage for iframe visibility"),this.updateStateInLocalStorage(R,r.Visible,"currentIframeState")}setUserRequestedChatState(e){Uo(`setUserRequestedChatState: First-time Initialization Detected: ${e}: Setting CHAT IS REQUESTED`),this.updateStateInLocalStorage(R,i.ChatIsRequested,"currentUserActionState")}setChatWidgetWindowState(){this.updateStateInLocalStorage(R,s.ChatWindow,"currentWidgetState")}setChatWidgetBubbleState(){this.updateStateInLocalStorage(R,s.ChatBubble,"currentWidgetState")}logProactiveStartupTimer(e){Uo(`logProactiveStartupTimer: Setting Proactive timer to (${e} seconds)`)}setChatIframeVisibilityAndState(){this.setUnifiedChatIframeToVisible(this.iframeEmbedder.iframe),this.setIframeVisibilityState()}scheduleToDisplayChat(e,t){const o=this.calculateRemainingStartupTime();this.logProactiveStartupTimer(o),0===o?this.scheduleChatAndIframeToVisible(e,t):setTimeout((()=>{this.scheduleChatAndIframeToVisible(e,t),Uo(`scheduleToDisplayChat: Scheduled proactive execution finished after (${o} seconds).`)}),1e3*o)}calculateRemainingStartupTime(){var e,t;let o=(null===(e=this.args.chatInitProfile)||void 0===e?void 0:e.identifiedChatStartUpTime)||0;const i=parseFloat(((null!==(t=this.chatElapsedTime)&&void 0!==t?t:0)/1e3).toFixed(2));return o=parseFloat((o-i).toFixed(2)),o}handleZoomChatInitialDisplay(){const e=new Date;Uo(`chat first displayed time ${e}`),this.saveStateToLocalStorage(D,e),this.handleZoomUXAEvent(m.DISPLAYED)}setChatWidgetToWindowMode(e,t){Uo(`setChatWidgetToWindowMode: First-time Initialization Detected: ${e} : Setting ChatWidget to window Mode`),this.iframeEmbedder.sendMessage(Gn),t.action=Ln.expandButtonClicked}proceedToDisplayChat(e,t){const o=this.getStateFromLocalStorage(R);e===l.DBX_SALES_CHAT&&o.currentWidgetState===s.ChatBubble&&(this.setChatWidgetToWindowMode(e,t),this.handleZoomChatInitialDisplay()),e!==l.DBX_SALES_CHAT&&(dn(e),this.setUserRequestedChatState(e),this.handleZoomUXAEvent(m.CHATREQUESTED))}getIdentifiedHost(){var e,t;const o=undefined;return null!==(t=null===(e=this.args.chatInitProfile)||void 0===e?void 0:e.identifiedHost)&&void 0!==t?t:null}getInitializedChatTypeFromProfile(){var e,t;const o=undefined;return null!==(t=null===(e=this.args.chatInitProfile)||void 0===e?void 0:e.identifiedChat)&&void 0!==t?t:l.UNSUPPORTED_CHAT}getChatInteractionTypeFromProfile(){var e,t;const o=undefined;return null!==(t=null===(e=this.args.chatInitProfile)||void 0===e?void 0:e.chatInteractionType)&&void 0!==t?t:h.UNSUPPORTED_CHAT}createChatTypeInfo(){return{identifiedChat:this.getInitializedChatTypeFromProfile()}}getIdentifiedPathFromProfile(){var e,t;const o=undefined;return{identifiedPath:ii(null!==(t=null===(e=this.args.chatInitProfile)||void 0===e?void 0:e.identifiedHref)&&void 0!==t?t:"")}}sendCurrentChatTypeInfoToIframeService(){const e=this.createChatTypeInfo(),t={action:yn.sendCurrentChatTypeInfo,messageType:Hn.REQUEST,dbxCurrentChatTypeInfo:JSON.stringify(e),message:fe.SEND_CURRENT_CHAT_TYPE_INFO};this.iframeEmbedder.sendMessage(t)}sendDropboxCurrentPathInfoToIframeService(){const e=this.getIdentifiedPathFromProfile(),t={action:yn.sendBrowserPathInfo,messageType:Hn.REQUEST,dbxCurrentPathInfo:JSON.stringify(e),message:fe.SEND_BROWSER_PATH_INFO};this.iframeEmbedder.sendMessage(t)}isIdentifiedHostSupportedToLoadChat(){var e,t,i,n,a,r,s;const c=null===(e=this.args)||void 0===e?void 0:e.chatInitProfile,d=this.getIdentifiedHost();let l=!1;if(null!==d&&(null==c?void 0:c.supportedEntitlements))if(null===(t=c.supportedEntitlements.wwwDbxEntitlements)||void 0===t?void 0:t.includes(d))l=!0;else if(null===(i=c.supportedEntitlements.docsendEntitlements)||void 0===i?void 0:i.includes(d))l=!0;else if(null===(n=c.supportedEntitlements.signCenterEntitlements)||void 0===n?void 0:n.includes(d))l=!0;else if(null===(a=c.supportedEntitlements.dashDbxEntitlements)||void 0===a?void 0:a.includes(d))l=!0;else if(null===(r=c.supportedEntitlements.formswiftEntitlements)||void 0===r?void 0:r.includes(d))l=!0;else if(null===(s=c.supportedEntitlements.hellosignEntitlements)||void 0===s?void 0:s.includes(d))l=!0;else{const e=`Identified Host '${d}' is not supported in any entitlements.`;ko(o.Critical,e)}else ko(o.Critical,Ee.IDENTIFIED_HOST_OR_SUPPORTED_ENTITLEMENTS_NULL);return l}handleIframeExecutionError(e){ko(o.Critical,Ee.IFRAME_EXECUTION_ERROR,e)}handleIframeContentWindowError(){ko(o.Critical,Ee.IFRAME_CONTENT_WINDOW_NULL_ERROR)}handleIframeNotFoundError(){ko(o.Critical,Ee.IFRAME_NOT_FOUND_ERROR)}attachScriptTagSuccessToFrame(){this.setIframeReadyStatus(!0),this.iframeEmbedder.sendMessage(Xn)}attachScriptTagErrorToFrame(e){ko(o.Critical,Ee.SCRIPT_TAG_ATTACHMENT_ERROR,e)}handleIframeInitializationError(e){ko(o.Critical,Ee.CHAT_CLIENT_SETUP_INITIALIZATION_ERROR,e),this.handleZoomUXAEvent(m.FAILED)}setupInitializationTimeout(){this.chatStartInitTime=performance.now(),Uo("setupInitializationTimeout: Setting up timeout for 60 secs to load entire process."),this.initTimeout=setTimeout((()=>{ko(o.Critical,Ee.CHAT_IFRAME_LOAD_TIMEOUT_ERROR),this.handleZoomUXAEvent(m.NETWORK_FAILED),ko(o.Critical,"setupInitializationTimeout: zoom_chat_client module Initialization : [FAILED]")}),6e4)}handleNoCookieOnChatWidgetInit(e){this.cleanUpUnifiedChatState(),this.isIdentifiedHostSupportedToLoadChat()&&(this.setUnifiedChatInitialState(),this.setUnifiedChatIframeToInVisible(e),this.setIframeProperties())}isInitialDbxSalesChatWhenCookieExists(e,t){return null===e&&t===l.DBX_SALES_CHAT&&(Uo(`No current state found. Initializing with state: ${JSON.stringify(ue)}`),this.saveStateToLocalStorage(R,ue),!0)}isChatWidgetHiddenWithoutCompanySwitch(e,t){return e===r.Hiddden&&t===c.UserNotSwtichCompany}isChatWidgetHiddenWithCompanySwitch(e,t){return e===r.Hiddden&&t===c.UserSwtichCompany}isChatWindowVisibleWithRequestedState(e,t,o,n){return e===r.Visible&&t===i.ChatIsRequested&&o===s.ChatWindow&&n===c.UserNotSwtichCompany}isChatBubbleVisibleWithRequestedState(e,t,o,n){return e===r.Visible&&t===i.ChatIsRequested&&o===s.ChatBubble&&n===c.UserNotSwtichCompany}handleCookieOnChatWidgetInit(e){const t=this.getStateFromLocalStorage(R),o=this.getInitializedChatTypeFromProfile();if(this.isInitialDbxSalesChatWhenCookieExists(t,o))return;const{currentIframeState:i,currentCompanyState:n,currentUserActionState:a,currentWidgetState:r}=t;this.isChatWidgetHiddenWithoutCompanySwitch(i,n)?this.handleWhenChatWidgetIsInHiddenState(t,e):this.isChatWindowVisibleWithRequestedState(i,a,r,n)?this.handleWhenChatWidgetIsInWindowAndVisibleState(e):this.isChatBubbleVisibleWithRequestedState(i,a,r,n)?this.handleWhenChatWidgetIsInBubbleAndVisibleState(e):this.isChatWidgetHiddenWithCompanySwitch(i,n)&&this.handleCompanySwitch(e,o)}handleCompanySwitch(e,t){t===l.DOCSEND_CHAT&&this.handleCaseWhenUserSwitchesCompany(e)}handleCaseWhenUserSwitchesCompany(e){this.setUnifiedChatIframeToInVisible(e),setTimeout((()=>{this.setUnifiedChatIframeToInVisible(e),this.iframeEmbedder.sendMessage(xn),this.deleteUnifiedChatCookie(p)}),5e3)}handleWhenChatWidgetIsInHiddenState(e,t){e.currentUserActionState===i.ChatIsNotRequested&&(this.setUnifiedChatIframeToInVisible(t),this.saveUnifiedChatState(le))}handleWhenChatWidgetIsInBubbleAndVisibleState(e){this.setUnifiedChatIframeToVisible(e),this.setIframePropertiesToMinimizeState(),this.saveUnifiedChatState(he)}getCookieValue(e){const t=e+"=",o=document.cookie.split(";");for(const e of o){const o=e.trim();if(0===o.indexOf(t))return o.substring(t.length,o.length)}return null}handleWhenChatWidgetIsInWindowAndVisibleState(e){this.setUnifiedChatIframeToVisible(e),this.setIframePropertiesToMaximizeState(),this.saveUnifiedChatState(ue)}handleStateWithPageHistory(){Uo("handleStateWithPageHistory: [STARTED]");const e=this.getStateFromLocalStorage(R);if(Uo(`handleStateWithPageHistory: Retrieved current state: ${JSON.stringify(e)}`),!e){const e={...le,pageHistory:{previousPage:null,currentPage:window.location.pathname},reload:!1};return Uo(`handleStateWithPageHistory: No current state found. Initializing with state: ${JSON.stringify(e)}`),this.saveStateToLocalStorage(R,e),void Uo("handleStateWithPageHistory: [COMPLETED]")}const t=window.location.pathname;Uo(`handleStateWithPageHistory: Real-time current path: ${t}`);const o=e.pageHistory.previousPage,i=e.pageHistory.currentPage,n=undefined;Uo(`storedPreviousPage: ${o}, storedCurrentPage: ${i}, storedReloadFlag: ${e.reload}`);let a=!1;null===o&&i?i===t||t.startsWith(i)?(Uo("handleStateWithPageHistory: Stored current value and real-time current value are the same. Setting reload to false."),a=!1,e.pageHistory={previousPage:i,currentPage:t}):(Uo("handleStateWithPageHistory: Stored currentPage value and real-time currentPage value are different."),Uo("handleStateWithPageHistory: Updating previousPage to currentPage and currentPage to realTimeCurrentPath."),a=!0,e.pageHistory={previousPage:i,currentPage:t}):o&&i&&(Uo("handleStateWithPageHistory: Both previousPage and currentPage are set. Comparing values."),i===t||t.startsWith(i)?(Uo("handleStateWithPageHistory: Real-time current path matches stored currentPage. Setting reload to false."),a=!1):(Uo("handleStateWithPageHistory: Real-time current path does not match. Updating page history."),a=!0,e.pageHistory={previousPage:i,currentPage:t})),e.reload=a,this.saveStateToLocalStorage(R,e),Uo(`handleStateWithPageHistory: Final updated state with reload flag: ${JSON.stringify(e)}`),Uo("handleStateWithPageHistory: [COMPLETED]")}async startZoomChatIframeReloadProcess(){Uo("startZoomChatIframeReloadProcess: [STARTED]"),Uo("startZoomChatIframeReloadProcess: Starting chat termination process."),Uo("startZoomChatIframeReloadProcess: Sending message to iframe for ending the current chat session."),this.iframeEmbedder.sendMessage(xn),await this.waitForSessionTermination(),Uo("startZoomChatIframeReloadProcess: Timeout reached. Executing reload callback to refresh chat state.");const e=await this.triggerReloadZoomChatClient();return Uo("startZoomChatIframeReloadProcess: [COMPLETED]"),e}async waitForSessionTermination(){Uo("waitForSessionTermination: Waiting for session termination..."),await new Promise((e=>setTimeout(e,S)))}async triggerReloadZoomChatClient(){Uo("triggerReloadZoomChatClient: Starting reload callback execution.");const e=Ho();if(!e||"function"!=typeof e.reloadZoomChatClient)return ko(Ve.type,Ve.message),!1;Uo("triggerReloadZoomChatClient: Valid Zoom Chat client detected. Initiating reload.");try{return await e.reloadZoomChatClient(),Uo("triggerReloadZoomChatClient: Reload callback executed successfully."),!0}catch(e){const t=undefined;return Uo(`triggerReloadZoomChatClient: Reload failed: ${e instanceof Error?e.message:String(e)}`),!1}}removeUnifiedChatDivContainer(){const e=document.querySelector(".dbx-unified-chat-container");e?e.remove():Uo("removeUnifiedChatDivContainer: No .dbx-unified-chat-container found. No action taken.")}resetInitialization(){Uo("resetInitialization : [STARTED] - Closing and resetting port..."),this.el=null,this.isChatIframeReady=!1,this.initTimeout=null,this.chatStartInitTime=null,this.chatEndInitTime=null,this.chatElapsedTime=null,Uo("resetInitialization : [COMPLETED]")}attachMessageListener(){try{window.addEventListener("message",this.handleIframeServiceMessages,{passive:!0})}catch(e){ko(o.Critical,Ee.ERROR_ATTACHING_MESSAGE_EVENT_LISTENER,e)}}async reInitChatClient(e){Uo("reInitChatClient: [STARTED] Preparing configs to reinitialize the chat client.");try{const t=gr.getInstance(e);return gr.setChatUri(e.chatUri),gr.setChatApiKey(e.chatApiKey),gr.setChatDataEnv(e.chatDataEnv),Uo("reInitChatClient: [COMPLETED] Preparing configs to reinitialize the chat client."),Uo("reInitChatClient: *** CALLING initChatClient *** ......."),await t.initChatClient(),Uo("reInitChatClient: [COMPLETED] Chat client initialized successfully."),!0}catch(e){return ko(o.Critical,"reInitChatClient failed",e),!1}}async reInitializeZoomChatClient(){Uo("reInitializeZoomChatClient: Triggered re-init");try{this.removeUnifiedChatDivContainer(),this.resetInitialization(),Uo(`Arguments for re-initialization: ${JSON.stringify(this.args)}`),this.iframeEmbedder=new wn(Nn.ZOOM_CHAT,this.handleIframeServiceMessages,this.args.iframeSrc,void 0);const e=undefined;if(!await this.reInitChatClient(this.args))throw new Error("Chat client initialization failed.");return!0}catch(e){return ko(o.Critical,"re-initialization failed",e),!1}}isChatReactiveOnCheckoutPage(e){var t,o,i;const n=null===(t=this.args.chatInitProfile)||void 0===t?void 0:t.trustedHost,a=undefined,r=ii(null!==(i=null===(o=this.args.chatInitProfile)||void 0===o?void 0:o.identifiedHref)&&void 0!==i?i:""),s=this.getStateFromLocalStorage(H);return Uo(`isChatReactiveOnCheckoutPage : isButtonClickedOnCheckoutPage ${s}`),e===l.DBX_SALES_CHAT&&n===d.WWW_DBX_HOST&&r===$&&s}skipZoomChatReload(e,t){Uo("skipZoomChatReload : [DONE]");const o=this.isChatReactiveOnCheckoutPage(e);Uo(`skipZoomChatReload : isCheckoutSalesChatReactive and button clicked: ${o}`),o?this.handleDbxSalesCheckoutPageReactiveChat(l.DBX_SALES_CHAT,t):this.scheduleToDisplayChat(e,t)}setUnifiedChatInitialState(){const e=undefined;this.getInitializedChatTypeFromProfile()===l.DBX_SALES_CHAT?this.handleStateWithPageHistory():this.saveStateToLocalStorage(R,le)}setUnifiedChatIframeToInVisible(e){e.style.display="none"}setUnifiedChatIframeToVisible(e){e.style.display=""}setIframeProperties(){this.setIframePropertiesToMinimizeState()}registerOpenChatWindowCallback(){const e=undefined;Ho().handleOpenChatWindowCallback=()=>{Uo("registerOpenChatWindowCallback: First-time Initialization: Setting ChatWidget to window Mode"),this.iframeEmbedder.sendMessage(Gn),this.handleZoomUXAEvent(m.CHATREQUESTED)}}registerZoomChatConsentDeclinedCallback(){const e=undefined;Ho().consentNotGrantedDidNotLoadChatClient=()=>{this.handleZoomUXAEvent(m.CONSENTDECLINED)}}registerAllowDBXSalesChatToLoadCallback(){const e=undefined;if(this.getUnifiedChatCookieStatus().currentInitChat!==l.DBX_SALES_CHAT)return;const t=undefined;Ho().consentGrantedProceedDBXSalesChatToLoad=()=>{this.handleDBXSalesChatConsent()}}handleDBXSalesChatConsent(){const e=undefined;li(T)?Uo("handleDBXSalesChatConsent: Skipping ZOOM_CHAT_CLIENT initialization - SNAPENGAGE chat already initialized"):(this.deregisterAllowDBXSalesChatToLoadCallback(),Uo("handleDBXSalesChatConsent: DBX_SALES_CHAT is loading now, initializing chat client."),this.initChatClient().then(si))}deregisterAllowDBXSalesChatToLoadCallback(){const e=Ho();e&&"function"==typeof e.consentGrantedProceedDBXSalesChatToLoad?(Uo("deregisterAllowDBXSalesChatToLoadCallback: Callback consentGrantedProceedDBXSalesChatToLoad deregistered successfully."),e.consentGrantedProceedDBXSalesChatToLoad=void 0):Uo("deregisterAllowDBXSalesChatToLoadCallback: Callback consentGrantedProceedDBXSalesChatToLoad was not registered or already deregistered.")}saveUnifiedChatState(e){this.saveStateToLocalStorage(R,e)}isUnifiedChatCookieExists(e){const t=document.cookie.split(";");for(let o=0;o{this.handleLogout()}}handleLogout(){const e=undefined;this.getInitializedChatTypeFromProfile()===l.FORMSWIFT_CHAT?this.performLogoutActions(R):(this.deleteUnifiedChatStateFromLocalStorage(v),this.validateUnifiedChatInitUnderSafari()||this.performLogoutActions(R))}performLogoutActions(e){this.deleteUnifiedChatStateFromLocalStorage(e),this.setChatSessionLogoutFlag(),this.iframeEmbedder.sendMessage(xn),this.handleZoomUXAEvent(m.LOGOUT)}registerSwitchCompanyCallback(){const e=undefined;Ho().handleOnSwitchCompanyCallback=()=>{this.iframeEmbedder.sendMessage(xn),setTimeout((()=>{this.detachZoomChatIframe()}),1e3)}}validateUnifiedChatInitUnderSafari(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}clearExistingChatSessionIfBrowserIsSafari(){const e=undefined;if(this.getInitializedChatTypeFromProfile()===l.DOCSEND_CHAT){const e=this.getStateFromLocalStorage(v);null===e&&(this.saveStateToLocalStorage(v,de),setTimeout((()=>{this.iframeEmbedder.sendMessage(xn)}),3e3)),e.currentEndToChatState===n.DoNotTerminateChatSession&&this.saveStateToLocalStorage(v,de)}}clearChatTimeMetricsFromLocalStorage(){this.deleteUnifiedChatStateFromLocalStorage(L),this.deleteUnifiedChatStateFromLocalStorage(D),this.deleteUnifiedChatStateFromLocalStorage(w)}logCurrentTimeToLocalStorage(e){const t=this.getCurrentTimeAsString();this.saveStateToLocalStorage(e,t)}performCleanUpAsUserEndsTheChat(){const e=this.getInitializedChatTypeFromProfile();this.logCurrentTimeToLocalStorage(L),this.handleZoomUXAEvent(m.END),e===l.DBX_SALES_CHAT||e===l.DBX_CX_CHAT?(this.deleteUnifiedChatCookie(p,W),this.deleteUnifiedChatStateFromLocalStorage(R),this.clearChatTimeMetricsFromLocalStorage()):e===l.DOCSEND_CHAT?(this.deleteUnifiedChatCookie(p),this.deleteUnifiedChatStateFromLocalStorage(R),setTimeout((()=>{this.detachZoomChatIframe(),window.location.reload()}),1e3)):e===l.DASH_SALES_CHAT?(this.deleteUnifiedChatCookie(g,W),this.deleteUnifiedChatStateFromLocalStorage(R)):(e===l.FORMSWIFT_CHAT||e===l.HELLOSIGN_CX_CHAT)&&(this.deleteUnifiedChatCookie(p),this.deleteUnifiedChatStateFromLocalStorage(R))}getCurrentTimeAsString(){const e=undefined;return(new Date).toISOString()}getDocsendUserInfoFromWindow(){var e,t,o;const i=undefined;return{id:null===(e=null===window||void 0===window?void 0:window.dsCurrentUserInfoRaw)||void 0===e?void 0:e.id,name:null===(t=null===window||void 0===window?void 0:window.dsCurrentUserInfoRaw)||void 0===t?void 0:t.name,email:null===(o=null===window||void 0===window?void 0:window.dsCurrentUserInfoRaw)||void 0===o?void 0:o.email}}getDbxUserInfoFromWindow(){var e,t,o;const i=null!==(o=null===(t=null===(e=this.args.chatSpecificConfigs)||void 0===e?void 0:e.dbxChatConfigs)||void 0===t?void 0:t.dbxUserIdentifiers)&&void 0!==o?o:{};return{id:i.id,name:i.name,email:i.email,plan:i.plan,supportTier:i.supportTier,language:i.language,country:i.country,pageLoadTs:i.pageLoadTs,chatHmac:i.chatHmac,sessionId:i.sessionId}}getCxChatRequestedButtonInfoFromWindow(){const e={dbxCxChatButtonLanguage:"",cxChatButtonLanguage:""},t=window;return t.dbxCxChatButtonLanguage&&t.dbxCxChatButtonLanguage.cxChatButtonLanguage&&(e.dbxCxChatButtonLanguage=t.dbxCxChatButtonLanguage.cxChatButtonLanguage),e}getFormswiftUserInfoFromWindow(){const e=null===window||void 0===window?void 0:window.formswiftZoomChatInitData,t=undefined;return{user_id:null==e?void 0:e.user_id,FirstName:null==e?void 0:e.FirstName,Email:null==e?void 0:e.Email,Country:null==e?void 0:e.Country,pageLoadTs:null==e?void 0:e.pageLoadTs,chatHmac:null==e?void 0:e.chatHmac,zoomChatHmac:null==e?void 0:e.zoomChatHmac}}getHellosignUserInfoFromWindow(){const e=null===window||void 0===window?void 0:window.signChatInitData,t=undefined;return{id:null==e?void 0:e.id,name:null==e?void 0:e.name,email:null==e?void 0:e.email,plan:null==e?void 0:e.plan,supportTier:null==e?void 0:e.supportTier,language:null==e?void 0:e.language,skuId:null==e?void 0:e.skuId,pageLoadTs:null==e?void 0:e.pageLoadTs,chatHmac:null==e?void 0:e.chatHmac,sessionId:null==e?void 0:e.sessionId,loadChatbot:null==e?void 0:e.loadChatbot}}getDbxUserLoggedInStatus(){var e,t,o;return null!==(o=null===(t=null===(e=this.args.chatSpecificConfigs)||void 0===e?void 0:e.dbxChatConfigs)||void 0===t?void 0:t.isUserLoggedIn)&&void 0!==o&&o}getDbxUserSalesFeatureVariant(){var e,t,o;return null!==(o=null===(t=null===(e=this.args.chatSpecificConfigs)||void 0===e?void 0:e.dbxChatConfigs)||void 0===t?void 0:t.salesExperimentVariant)&&void 0!==o?o:"OFF"}sendDocsendCurrentUserInfoToIframeService(){const e=this.getDocsendUserInfoFromWindow(),t={action:yn.sendDocsendCurrentUserInfo,messageType:Hn.REQUEST,dsCurrentUserInfo:JSON.stringify(e),message:fe.SEND_DOCSEND_CURRENT_USER_INFO};this.iframeEmbedder.sendMessage(t)}sendDropboxCurrentUserInfoToIframeService(){const e=this.getDbxUserInfoFromWindow(),t=this.getDbxUserLoggedInStatus(),o=this.getDbxUserSalesFeatureVariant(),i={action:yn.sendDropboxCurrentUserInfo,messagetype:Hn.REQUEST,dbxCurrentUserInfo:JSON.stringify(e),message:fe.SEND_DROPBOX_CURRENT_USER_INFO,isUserLoggedIn:t,salesExperimentVariant:o};this.iframeEmbedder.sendMessage(i)}sendDropboxCxChatRequestedInfoToIframeService(){const e=this.getCxChatRequestedButtonInfoFromWindow(),t={action:yn.sendCxChatRequestedLanguageInfo,messagetype:Hn.REQUEST,cxUserSelectedLanguage:JSON.stringify(e),message:fe.SEND_CX_CHAT_REQUESTED_LANGUAGE_INFO};this.iframeEmbedder.sendMessage(t)}sendFormswiftCurrentUserInfoToIframeService(){const e=this.getFormswiftUserInfoFromWindow(),t={action:yn.sendFormswiftCurrentUserInfo,messagetype:Hn.REQUEST,formswiftCurrentUserInfo:JSON.stringify(e),message:fe.SEND_FORMSWIFT_CURRENT_USER_INFO};this.iframeEmbedder.sendMessage(t)}sendBrowserStatusToIframeService(){const e={action:yn.sendBrowserStatus,message:fe.SEND_BROWSER_STATUS,messageData:this.validateUnifiedChatInitUnderSafari(),messageType:Hn.RESPONSE};this.iframeEmbedder.sendMessage(e)}sendHellosignCurrentUserInfoToIframeService(){const e=this.getHellosignUserInfoFromWindow(),t={action:yn.sendHellosignCurrentUserInfo,messagetype:Hn.REQUEST,hellosignCurrentUserInfo:JSON.stringify(e),message:fe.SEND_HELLOSIGN_CURRENT_USER_INFO};this.iframeEmbedder.sendMessage(t)}setCookieForDBXSalesChat(){null==this.getCookieValue(p)&&(dn(l.DBX_SALES_CHAT),this.setUserRequestedChatState(l.DBX_SALES_CHAT),this.logCurrentTimeToLocalStorage(w),this.handleZoomUXAEvent(m.CHATREQUESTED))}validateChatWidgetLoadStatus(e){e.status===Un.success?this.handleChatWidgetLoadSuccess(e):e.status===Un.failure&&this.handleChatWidgetLoadFailure(e)}handleChatWidgetLoadSuccess(e){Uo(`handleChatWidgetLoadSuccess: ${e.status}`),null!==this.initTimeout?(this.checkSafariSession(),Uo(`handleChatWidgetLoadSuccess: Received WidgetStatusUnderIframe: ${e.chatbotbuttonstate}`),this.computeChatWidgetLoadDuration(),this.handleZoomUXAEvent(m.SUCCESS),this.processChatWidgetState(e)):ko(o.Operational,"handleChatWidgetLoadSuccess: Chat widget inside iframe is not fully ready yet.")}handleChatWidgetLoadFailure(e){this.computeChatWidgetLoadDuration(),this.clearInitializationTimeout(),this.detachZoomChatIframe(),ko(o.Critical,Ce.CHAT_WIDGET_NOT_LOADED_MAX_RETRY_REACHED)}computeChatWidgetLoadDuration(){this.chatEndInitTime=performance.now(),Uo(`computeChatWidgetLoadDuration: The chat is initialized at : ${this.chatEndInitTime}`),null!==this.chatStartInitTime&&(this.chatElapsedTime=this.chatEndInitTime-this.chatStartInitTime,Uo(`computeChatWidgetLoadDuration: Total time taken: ${(this.chatElapsedTime/1e3).toFixed(2)} seconds`))}checkSafariSession(){this.validateUnifiedChatInitUnderSafari()&&this.clearExistingChatSessionIfBrowserIsSafari()}processChatWidgetState(e){const t=e.chatbotbuttonstate;Uo(`processChatWidgetState: State of the chat widget inside the iframe : ${t}`),t===s.ChatBubble?this.handleChatBubbleRelatedProcess(e):t===s.ChatWindow&&this.handleChatWindowRelatedProcess(e)}handleChatBubbleRelatedProcess(e){this.clearInitializationTimeout(),this.handleChatBubbleStatus(e)}async handleChatWindowRelatedProcess(e){this.clearInitializationTimeout();const{currentInitChat:t,unifiedChatCookieStatus:o}=this.getUnifiedChatCookieStatus()||{};if(this.shouldHandleChatWindowForSalesChat(t,o)){Uo("handleChatWindowRelatedProcess: Handling chat window process for DBX_SALES_CHAT with no unified chat cookie exists");const t=this.getStateFromLocalStorage(R);if(!t)return;const{reload:o,currentCompanyState:i}=t;await this.processZoomChatReload(o,i,e)}else this.shouldHandleChatWindowForFormswiftChat(t,o)?(Uo("handleChatWindowRelatedProcess: Handling chat window process for FORMSWIFT_CHAT with no unified chat cookie exists"),this.registerFormSwiftChatDisplayHandler()):(e.action=Ln.expandButtonClicked,this.handleChatWidgetInteraction(e))}shouldHandleChatWindowForSalesChat(e,t){return e===l.DBX_SALES_CHAT&&!t}shouldHandleChatWindowForFormswiftChat(e,t){return e===l.FORMSWIFT_CHAT&&!t}async processZoomChatReload(e,t,i){Uo(`processZoomChatReload: Retrieved reload flag: ${e}, user switch account status: ${t}`);const n=undefined;if(await this.shouldReloadAndHandleAccountSwitch(e,t)){Uo("processZoomChatReload: Starting reload process.");const e=undefined;await this.startZoomChatIframeReloadProcess()?Uo("processZoomChatReload: Zoom chat reload process completed successfully."):ko(o.Critical,"processZoomChatReload: Zoom chat reload process failed.")}else Uo("processZoomChatReload: Reload flag is false. Executing do not reload function."),i.action=Ln.expandButtonClicked,this.handleChatWidgetInteraction(i),this.scheduleToDisplayChat(l.DBX_SALES_CHAT,i)}getUnifiedChatCookieStatus(){const e=this.getInitializedChatTypeFromProfile();let t;return t=V.has(e)?this.isUnifiedChatCookieExists(p):e===l.DASH_SALES_CHAT&&this.isUnifiedChatCookieExists(g),{currentInitChat:e,unifiedChatCookieStatus:t}}handleChatBubbleStatus(e){const t=this.getUnifiedChatCookieStatus(),{unifiedChatCookieStatus:o,currentInitChat:i}=t;Uo(`handleChatBubbleStatus: Chat cookie status: ${o}, Current chat type: ${i}`),this.setupBaseChatHandler(i,e,o)}setupBaseChatHandler(e,t,o){var i;const n=null===(i=this.args.chatInitProfile)||void 0===i?void 0:i.trustedHost;Uo(`setupBaseChatHandler: Current chat type: ${e}, Trusted host: ${n}, Unified chat cookie status: ${o}`),e===l.DOCSEND_CHAT&&n===d.DOCSEND_HOST?this.handleFirstTimeDoSendChat(t):e===l.DASH_SALES_CHAT&&n===d.DASH_DBX_HOST?this.handleFirstTimeDashChat(e,t):(e!==l.DBX_SALES_CHAT||n!==d.WWW_DBX_HOST||o)&&(e!==l.DBX_SALES_CHAT||n!==d.SIGN_CENTER_HOST||o)?e===l.DBX_CX_CHAT&&n===d.WWW_DBX_HOST?this.handleCXChatFlow(e,t):e===l.HELLOSIGN_CX_CHAT&&n===d.HELLOSIGN_HOST?this.handleHelloSignCXFlow(e,t):e!==l.FORMSWIFT_CHAT||n!==d.FORMSWIFT_HOST||o?n!==d.HELP_CENTER_HOST&&n!==d.EXPERIENCE_HOST&&n!==d.SIGN_CENTER_HOST||e!==l.DBX_SALES_CHAT||!o||this.handleWhenChatWidgetIsInBubbleAndVisibleState(this.iframeEmbedder.iframe):this.handleFirstTimeFormswiftChatWhenBubble(e,t):this.handleFirstTimeSalesChatWhenBubble(e,t)}handleCXChatFlow(e,t){var i,n,a;const r=null===(i=this.args.chatInitProfile)||void 0===i?void 0:i.identifiedHref,s=null===(a=null===(n=this.args.chatSpecificConfigs)||void 0===n?void 0:n.dbxChatConfigs)||void 0===a?void 0:a.discoverabilityEntryPagesConfig;if(!r)return;const c=ii(r);this.isPathInHelpEntryPages(c)?this.handleFirstTimeChatLoadOnGetHelpPage(e,t):s&&this.shouldHandleDiscoverabilityPageChat(c,s)?this.handleFirstTimeChatLoadOnDiscoverabilityPage(e,t):(null==s?void 0:s.isEnabled)||ko(o.Operational,`Chat visibility on discovery pages is disabled. Current path: ${c}`)}isPathInHelpEntryPages(e){return j.includes(e)}shouldHandleDiscoverabilityPageChat(e,t){var o,i;return t.isEnabled&&null!==(i=null===(o=t.discoverabilityEntryPages)||void 0===o?void 0:o.includes(e))&&void 0!==i&&i}handleFirstTimeDoSendChat(e){this.handleChatWidgetInteraction(e)}handleFirstTimeDashChat(e,t){this.scheduleToDisplayChat(e,t)}async handleFirstTimeSalesChatWhenBubble(e,t){const o=this.getStateFromLocalStorage(R),i=this.getStateFromLocalStorage(y),n=undefined;if(this.getUnifiedChatCookieStatus().unifiedChatCookieStatus)return void Uo("handleFirstTimeSalesChatWhenBubble: Unified chat Cookie found.");if(!o)return void Uo("handleFirstTimeSalesChatWhenBubble: No current state found in localStorage.");i&&(Uo("handleFirstTimeSalesChatWhenBubble: dbx_unified_chat_session_logout found in localStorage."),Uo("handleFirstTimeSalesChatWhenBubble: Starting reload process."),this.removeChatSessionLogoutFlag(),await this.startZoomChatIframeReloadProcess());const{reload:a,currentCompanyState:r}=o;Uo(`handleFirstTimeSalesChatWhenBubble: Retrieved reload flag: ${a}, user switch account status: ${r}`);const s=undefined;await this.shouldReloadAndHandleAccountSwitch(a,r)?(Uo("handleFirstTimeSalesChatWhenBubble: Starting reload process."),await this.startZoomChatIframeReloadProcess()):(Uo("handleFirstTimeSalesChatWhenBubble: No reload needed, proceeding with current chat."),this.skipZoomChatReload(e,t))}async shouldReloadAndHandleAccountSwitch(e,t){Uo("Checking if reload or account switch is needed.");const o=e||t===c.UserSwtichCompany;return o?(Uo("Reload is required."),t===c.UserSwtichCompany&&(Uo("Detected account switch. Performing custom actions."),this.deleteUnifiedChatStateFromLocalStorage(R))):Uo("No reload or account switch needed."),o}handleFirstTimeChatLoadOnGetHelpPage(e,t){Uo(`handleFirstTimeChatLoadOnGetHelpPage: First-time Initialization Detected: ${e}`),this.proceedToDisplaySupportChat(l.DBX_CX_CHAT,t)}handleHelloSignCXFlow(e,t){Uo(`handleHelloSignCXFlow: First-time Initialization Detected: ${e}, Chat is in hidden state`),this.getHellosignUserInfoFromWindow().loadChatbot?this.scheduleToDisplayChat(l.HELLOSIGN_CX_CHATBOT,t):this.proceedToDisplaySupportChat(l.HELLOSIGN_CX_CHAT,t)}handleDbxReactiveChatRequestHandler(e,t){this.handleChatWidgetInteraction(t),e===l.DBX_CX_CHAT||e===l.HELLOSIGN_CX_CHAT?this.initiateChatWindowOnRequested(R,e):e===l.DBX_SALES_CHAT&&this.initiateChatWindowOnRequested(H,e)}initiateChatWindowOnRequested(e,t){const o=this.getStateFromLocalStorage(e);t!==l.DBX_CX_CHAT&&t!==l.HELLOSIGN_CX_CHAT||!0!==(null==o?void 0:o.reload)?t===l.DBX_SALES_CHAT&&!0===o&&(this.updateStateToChatWindowRequested(t),this.removeChatRequestedFlagOnCheckoutPage()):(this.updateStateToChatWindowRequested(t),delete o.reload)}updateStateToChatWindowRequested(e){dn(e),this.updateChatInteractionType(h.REACTIVE_CHAT),Cn(),Yo(ue),this.setUnifiedChatIframeToVisible(this.iframeEmbedder.iframe)}handleDbxSalesCheckoutPageReactiveChat(e,t){this.handleDbxReactiveChatRequestHandler(e,t)}proceedToDisplaySupportChat(e,t){this.handleDbxReactiveChatRequestHandler(e,t)}handleFirstTimeFormswiftChatWhenBubble(e,t){Uo(`handleFirstTimeFormswiftChatWhenBubble: First-time Initialization Detected: ${e}: awaiting to trigger showFormSwiftChat`),this.registerFormSwiftChatDisplayHandler()}handleFirstTimeChatLoadOnDiscoverabilityPage(e,t){Uo(`handleFirstTimeChatLoadOnDiscoverabilityPage: First-time Initialization Detected: ${e} on portkey-unifiedchat-discoverability pages`),this.scheduleToDisplayChat(e,t)}setIframePropertiesToMinimizeState(){this.iframeEmbedder.iframe.style.width="100px",this.iframeEmbedder.iframe.style.height="100px",this.iframeEmbedder.iframe.style.right="20px",this.iframeEmbedder.iframe.style.bottom="26px"}setIframePropertiesToMaximizeState(){this.getIsMobileOrTablet()?(this.iframeEmbedder.iframe.style.width="100%",this.iframeEmbedder.iframe.style.height="100%",this.iframeEmbedder.iframe.style.bottom="0",this.iframeEmbedder.iframe.style.right="0"):(this.iframeEmbedder.iframe.style.width="450px",this.iframeEmbedder.iframe.style.height="650px",this.iframeEmbedder.iframe.style.right="20px",this.iframeEmbedder.iframe.style.bottom="26px",this.iframeEmbedder.iframe.style.maxWidth="100%",this.iframeEmbedder.iframe.style.maxHeight="100%")}handleWhenFormswiftChatIsRequested(){this.shouldSetCookieForFormswiftChat()&&(dn(l.FORMSWIFT_CHAT),this.setUserRequestedChatState(l.FORMSWIFT_CHAT),this.handleZoomUXAEvent(m.CHATREQUESTED))}shouldSetCookieForFormswiftChat(){const{currentInitChat:e,unifiedChatCookieStatus:t}=this.getUnifiedChatCookieStatus();if(e!==l.FORMSWIFT_CHAT)return!1;const o=this.getStateFromLocalStorage(R),n=this.getStateFromLocalStorage(y);return!t&&(null==o?void 0:o.currentUserActionState)===i.ChatIsNotRequested&&!n}shouldDisplayFormswiftChatError(e){ko(o.Critical,Ee.ERROR_IN_FORMSWIFT_CHAT_DISPLAY_PROCESS,e)}handleChatLoadError(e){ko(o.Critical,Ee.ERROR_IN_FORMSWIFT_CHAT_LOAD_PROCESS,e)}async handleReInitFormswiftChat(){const e=undefined;await this.reInitFormswiftChatLoadProcess()?(Uo("FormSwift chat reinitialized successfully. Proceeding to display chat."),this.proceedToDisplayFormswiftChat()):Uo("FormSwift chat reinitialization failed or was not required.")}async reInitFormswiftChatLoadProcess(){Uo("reInitFormswiftChatLoadProcess invoked.");const e=this.shouldTerminateAndInitiateFormswiftChatSession();return Uo(`reInitFormswiftChatLoadProcess: Should terminate and re-initiate FormSwift chat session: ${e}`),e?await this.reinitializeFormSwiftChatSession():(Uo("reInitFormswiftChatLoadProcess: Conditions not met to terminate or reinitialize the chat session. No action taken."),!1)}shouldDisplayFormswiftChat(){const{currentInitChat:e,unifiedChatCookieStatus:t}=this.getUnifiedChatCookieStatus(),o=this.getStateFromLocalStorage(y);return e===l.FORMSWIFT_CHAT&&(t||o?!(t||!o)&&(Uo("***** Current chat is FormSwift, cookie not present, and logout session flag exists. ***** "),!1):(Uo("***** Current chat is FormSwift, cookie not present, and logout session flag does not exist. ***** "),!0))}proceedToDisplayFormswiftChat(){Uo("proceedToDisplayFormswiftChat: Invoked");const e=undefined;document.getElementById(O)&&!document.cookie.includes(p)&&(Uo("proceedToDisplayFormswiftChat: calling setChatIframeVisibilityAndState"),this.setChatIframeVisibilityAndState())}async reinitializeFormSwiftChatSession(){Uo("reInitFormswiftChatLoadProcess: Conditions met to terminate and reinitialize the chat session. Removing logout flag."),this.removeChatSessionLogoutFlag();try{return Uo("reInitFormswiftChatLoadProcess: Starting Zoom chat Iframe reload process..."),await this.startZoomChatIframeReloadProcess(),Uo("reInitFormswiftChatLoadProcess: Zoom chat reload process completed successfully."),!0}catch(e){return this.handleChatLoadError(e),!1}}shouldTerminateAndInitiateFormswiftChatSession(){const{currentInitChat:e,unifiedChatCookieStatus:t}=this.getUnifiedChatCookieStatus();if(e!==l.FORMSWIFT_CHAT)return!1;const o=this.getStateFromLocalStorage(R),n=this.getStateFromLocalStorage(y);return!t&&(null==o?void 0:o.currentUserActionState)===i.ChatIsNotRequested&&!!n}handleChatWidgetInteraction(e){switch(e.action){case Ln.expandButtonClicked:this.setChatWidgetWindowState(),this.setIframePropertiesToMaximizeState(),this.handleZoomUXAEvent(m.EXPAND),this.handleWhenFormswiftChatIsRequested();break;case Ln.minimizeButtonClicked:this.setChatWidgetBubbleState(),this.setIframePropertiesToMinimizeState(),this.handleZoomUXAEvent(m.MINIMIZE)}}calculateIframeContainerHeight(){var e;const t=document.querySelector(N),o=null===(e=null==t?void 0:t.getBoundingClientRect())||void 0===e?void 0:e.height;return String(o&&o>0?o:48)}createDivContainerForIframe(){const e=undefined;return Object.assign(document.createElement("div"),{className:N})}createIframeForZoomChat(){const e=this.iframeEmbedder.iframe,t=this.calculateIframeContainerHeight();e.setAttribute("id",O),e.setAttribute("height",t),e.setAttribute("sandbox","allow-scripts allow-same-origin allow-downloads allow-popups"),e.style.position="fixed",e.style.zIndex="9999",e.style.overflow="scroll",e.style.backgroundColor="transparent";const o=this.getUnifiedChatCookieStatus();return o.unifiedChatCookieStatus?(Uo(`createIframeForZoomChat: Chat Type :: ${o.currentInitChat}, Cookie ${o.unifiedChatCookieStatus} exists, proceeding with handleCookieOnChatWidgetInit`),this.handleCookieOnChatWidgetInit(e)):(Uo(`createIframeForZoomChat: Chat Type :: ${o.currentInitChat}, Cookie ${o.unifiedChatCookieStatus} not exists, proceeding with handleNoCookieOnChatWidgetInit`),this.handleNoCookieOnChatWidgetInit(e)),e}attachZoomChatIframe(){var e,t;try{Uo(" attachZoomChatIframe: [STARTED]");const o=N,i=document.querySelector(o),n=null!==(e=null==i?void 0:i.parentNode)&&void 0!==e?e:document.body,a=this.createDivContainerForIframe(),r=this.createIframeForZoomChat(),s=new Promise(((e,t)=>{r.addEventListener("load",(()=>{e(r)})),r.addEventListener("error",(e=>{t(new Error("Error while attaching Zoom chat iframe to parent window"))}))}));return i&&n.removeChild(i),a.appendChild(r),n.insertBefore(a,null!==(t=null==i?void 0:i.nextSibling)&&void 0!==t?t:n.firstChild),a.style.visibility="",Uo(" attachZoomChatIframe: [COMPLETED]"),s}catch(e){return e instanceof Error?Promise.reject(new Error(e.message)):Promise.reject(new Error("An unknown error occurred while attaching Zoom chat iframe to parent window."))}}detachZoomChatIframe(){this.el&&this.el.parentNode&&(this.el.parentNode.removeChild(this.el),this.el=null,this.setIframeReadyStatus(!1))}setIframeReadyStatus(e){this.isChatIframeReady=e}getIframeReadyStatus(){return this.isChatIframeReady}prepareZoomChatCredentialsMsg(){const e=undefined;return{creds:{chatapikey:this.args.chatApiKey,chaturi:this.args.chatUri,chatdataenv:this.args.chatDataEnv},action:yn.sendZoomChatCredentials,messageType:Hn.RESPONSE,message:fe.SEND_ZOOM_CHAT_CREDENTIALS}}executeAttachZoomChatScriptTagToIframe(){if(this.iframeEmbedder.iframe)if(this.iframeEmbedder.iframe.contentWindow)try{const e=this.prepareZoomChatCredentialsMsg();this.iframeEmbedder.sendMessage(e)}catch(e){this.handleIframeExecutionError(e)}else this.handleIframeContentWindowError();else this.handleIframeNotFoundError()}async initChatClient(){try{if(Uo("initChatClient: zoom_chat_client module Initialization : [STARTED]"),this.handleZoomUXAEvent(m.INITIALIZED),this.setupInitializationTimeout(),this.getIframeReadyStatus()||this.el)return;this.attachMessageListener(),this.el=await this.attachZoomChatIframe()}catch(e){Uo("initChatClient: zoom_chat_client module Initialization : [FAILED]"),this.handleIframeInitializationError(e)}}}function _r(e,t,o,i,n){return ki(e,t,o,i,n)}function Tr(e,t,o,i,n){return ki(e,t,o,i,n)}function Ir(e,t,o,i,n){if(!Sn())return pi(n),{error:Ne};switch(n){case d.HELP_CENTER_HOST:const a=undefined;return _r(e,n,o,t,i)||{error:_e};case d.EXPERIENCE_HOST:const r=undefined;return Tr(e,n,o,t,i)||{error:_e};default:return{error:_e}}}function br(e,t,o){const i=window.location.href,n=oi(i),a=di(p);if(Uo(`handleChatForDropboxSubdomain: Handling chat setup configurations for: '${t}'.`),Ki(a,e,t),a){const e=gn();if(!e)return pi(t),{error:Ie};const a=pn(e);return a!==l.UNSUPPORTED_CHAT?(Uo(`handleChatForDropboxSubdomain: Proceeding to prepare chat configurations for ${a}.`),localStorage.setItem(R,JSON.stringify(ue)),Ir(a,i,n,o,t)):(Oi(t),{error:Oe})}return pi(t),{error:Ne}}function Or(e,t,o){return br(e,t,o)}function Nr(e,t,o){return br(e,t,o)}function Ar(){const e=undefined,t=undefined,o=undefined,i=undefined,n=undefined,a=undefined,r=undefined,s=undefined,c=undefined,d=undefined,l=undefined,u=undefined,h=undefined;return{iframeSrc:window.dbxPithosConfig.zoom_chat_manager_init_data.iframeSrc,iframeOrigin:window.dbxPithosConfig.zoom_chat_manager_init_data.iframeOrigin,chatUri:window.dbxPithosConfig.zoom_chat_manager_init_data.chaturiProtocol+"://"+window.dbxPithosConfig.zoom_chat_manager_init_data.chaturiSubdomain+"."+window.dbxPithosConfig.zoom_chat_manager_init_data.chaturiDomain+"."+window.dbxPithosConfig.zoom_chat_manager_init_data.chaturiTopleveldomain+window.dbxPithosConfig.zoom_chat_manager_init_data.chaturiPathname+"/"+window.dbxPithosConfig.zoom_chat_manager_init_data.chaturiExtJsFileName,chatApiKey:window.dbxPithosConfig.zoom_chat_manager_init_data.chaturiApiKey,chatDataEnv:window.dbxPithosConfig.zoom_chat_manager_init_data.chaturiDataEnv,chatSupportedEntitlements:window.dbxPithosConfig.zoom_chat_manager_init_data.chatSupportedEntitlements}}function Rr(){var e,t,o,i,n,a,r,s;const c=null===(t=null===(e=window.dbxPithosConfig.zoom_chat_manager_init_data)||void 0===e?void 0:e.domainSpecificChatConfigs)||void 0===t?void 0:t.dbxChatConfigs;return{discoverabilityEntryPagesConfig:null!==(o=null==c?void 0:c.discoverabilityEntryPagesConfig)&&void 0!==o?o:null,salesEntryPagesConfig:null!==(i=null==c?void 0:c.salesEntryPagesConfig)&&void 0!==i?i:null,dbxUserIdentifiers:null!==(n=null==c?void 0:c.dbxUserIdentifiers)&&void 0!==n?n:null,isUserLoggedIn:null!==(a=null==c?void 0:c.isUserLoggedIn)&&void 0!==a&&a,salesExperimentVariant:null!==(r=null==c?void 0:c.salesExperimentVariant)&&void 0!==r?r:"",isCookieValidationFixEnabled:null!==(s=null==c?void 0:c.isCookieValidationFixEnabled)&&void 0!==s&&s}}function wr(){var e,t,o;const i=null===(t=null===(e=window.dbxPithosConfig.zoom_chat_manager_init_data)||void 0===e?void 0:e.domainSpecificChatConfigs)||void 0===t?void 0:t.formswiftChatConfigs;return{chatOperationalHours:null!==(o=null==i?void 0:i.chatOperationalHours)&&void 0!==o?o:null}}function Dr(){var e,t,o;const i=null===(t=null===(e=window.dbxPithosConfig.zoom_chat_manager_init_data)||void 0===e?void 0:e.domainSpecificChatConfigs)||void 0===t?void 0:t.dbxHelpChatConfigs;return{isChatEnabledForSubdomains:null!==(o=null==i?void 0:i.isChatEnabledForSubdomains)&&void 0!==o&&o}}function Lr(){var e,t,o,i,n;const a=null===(t=null===(e=window.dbxPithosConfig.zoom_chat_manager_init_data)||void 0===e?void 0:e.domainSpecificChatConfigs)||void 0===t?void 0:t.dbxSignChatConfigs;return{isChatEnabledForSubdomains:null!==(o=null==a?void 0:a.isChatEnabledForSubdomains)&&void 0!==o&&o,isCookieValidationFixEnabled:null!==(i=null==a?void 0:a.isCookieValidationFixEnabled)&&void 0!==i&&i,salesEntryPagesConfig:null!==(n=null==a?void 0:a.salesEntryPagesConfig)&&void 0!==n?n:null}}function yr(){var e,t,o;const i=null===(t=null===(e=window.dbxPithosConfig.zoom_chat_manager_init_data)||void 0===e?void 0:e.domainSpecificChatConfigs)||void 0===t?void 0:t.dbxDashChatConfigs;return{isChatEnabledForSubdomains:null!==(o=null==i?void 0:i.isChatEnabledForSubdomains)&&void 0!==o&&o}}function Hr(e){const t=di(p),o=li(T);Uo(`handleSalesChatInitialization : is unifiedChatCookieExists : ${JSON.stringify(t)}`),Uo(`handleSalesChatInitialization : is snapEngageCookieExists : ${JSON.stringify(o)}`),t&&!o?(Uo("handleSalesChatInitialization: UNIFIED CHAT COOKIE EXISTS/COOKIE CONSENT ALREADY GRANTED FOR SALES CHAT, PROCEEDING WITH INIT OF ZOOM_CHAT_CLIENT"),Fr(e)):!t&&o?Uo("handleSalesChatInitialization: Skipping ZOOM_CHAT_CLIENT initialization since the user has already initialized SNAPENGAGE chat."):(Uo("handleSalesChatInitialization: UNIFIED CHAT COOKIE NOT_EXISTS FOR SALES CHAT, REGISTERED THE CALLBACK, WAITING FOR COOKIE_CONSENT SIGNAL"),xr(e))}function vr(e){const t=di(p),o=li(T),i=ui(I);if(Uo(`evaluateChatInitialization: isSecureConsentCookieExists=${i}, unifiedChatCookieExists=${t}, snapEngageCookieExists=${o}`),!i)return void Ur(t,o,e,!1);const n=hi(I,b);Uo(`evaluateChatInitialization: consentCategoryCookieKeyExists=${n}`),Ur(t,o,e,n)}function Ur(e,t,o,i){if(e||!t){if(e&&!t)return Uo("processChatInitialization: UNIFIED CHAT COOKIE EXISTS. Proceeding with ZOOM_CHAT_CLIENT initialization."),void Fr(o);if(!i)return Uo("processChatInitialization: Waiting for user consent signal before initializing ZOOM_CHAT_CLIENT."),void xr(o);Uo(`processChatInitialization: consentCategoryCookieKeyExists=${i}, unifiedChatCookieExists=${e}, snapEngageCookieExists=${t}. [Default+Manual] Proceeding to allow DBX_SALES_CHAT to load. Ignoring further signals and de-registering the callback after triggering the re-consent callback.`),xr(o),bn()}else Uo("processChatInitialization: Skipping ZOOM_CHAT_CLIENT initialization since the user has already initialized SNAPENGAGE chat.")}function xr(e){gr.getInstance(e),gr.setChatUri(e.chatUri),gr.setChatApiKey(e.chatApiKey),gr.setChatApiKey(e.chatDataEnv)}function Fr(e){Uo("initializeZoomChatClient: Chat configuration was successful. Proceeding with ZOOM_CHAT_CLIENT initialization.");const t=gr.getInstance(e);gr.setChatUri(e.chatUri),gr.setChatApiKey(e.chatApiKey),gr.setChatApiKey(e.chatDataEnv),t.initChatClient().then(si)}function Pr(e){var t;const o=null===(t=e.chatInitProfile)||void 0===t?void 0:t.trustedHost;if(o===d.WWW_DBX_HOST||o===d.SIGN_CENTER_HOST)kr(o,e)?(Uo("handleSalesChatInitialization: Using new zoom chat cookie consent implementation"),vr(e)):(Uo("handleSalesChatInitialization: Using old zoom chat cookie consent implementation"),Hr(e));else if(o===d.HELP_CENTER_HOST||o===d.EXPERIENCE_HOST){const t=undefined;di(p)&&(Uo("UNIFIED CHAT COOKIE EXISTS/COOKIE CONSENT ALREADY GRANTED FOR SALES CHAT, PROCEEDING WITH INIT OF ZOOM_CHAT_CLIENT"),Fr(e))}}function kr(e,t){var o,i,n,a,r,s;return e===d.WWW_DBX_HOST?null!==(n=null===(i=null===(o=null==t?void 0:t.chatSpecificConfigs)||void 0===o?void 0:o.dbxChatConfigs)||void 0===i?void 0:i.isCookieValidationFixEnabled)&&void 0!==n&&n:e===d.SIGN_CENTER_HOST&&(null!==(s=null===(r=null===(a=null==t?void 0:t.chatSpecificConfigs)||void 0===a?void 0:a.dbxSignChatConfigs)||void 0===r?void 0:r.isCookieValidationFixEnabled)&&void 0!==s&&s)}function Br(e){Fr(e)}function Wr(e){var t;const{chatSpecificConfigs:o,chatInitProfile:i}=e,n=null==i?void 0:i.trustedHost,a=null===(t=null==o?void 0:o.dbxChatConfigs)||void 0===t?void 0:t.dbxUserIdentifiers,r=undefined;if(!a)switch(n){case d.WWW_DBX_HOST:return Ri(),!0;case d.SIGN_CENTER_HOST:case d.HELP_CENTER_HOST:return wi(),!1}return"basic"===(null==a?void 0:a.plan)&&(Ai(a.plan),!0)}function Mr(e){var t;const o=e.chatConfig;if(o){const e=null===(t=o.chatInitProfile)||void 0===t?void 0:t.identifiedChat;if(e===l.DBX_CX_CHAT){if(Wr(o))return;Br(o)}else e===l.DBX_SALES_CHAT&&Pr(o)}}function Xr(e,t,i){var n;t.chatSpecificConfigs||(t.chatSpecificConfigs={}),t.chatSpecificConfigs.dbxChatConfigs||(t.chatSpecificConfigs.dbxChatConfigs=Object.assign({},i));const a=en(p,e,t);(null===(n=null==a?void 0:a.error)||void 0===n?void 0:n.type)!==o.Critical?(null==a?void 0:a.error)||Mr(a):Ni()}function Gr(e,t,i){var n;t.chatSpecificConfigs||(t.chatSpecificConfigs={}),t.chatSpecificConfigs.dbxSignChatConfigs||(t.chatSpecificConfigs.dbxSignChatConfigs=Object.assign({},i));const a=rn(p,e,t);(null===(n=null==a?void 0:a.error)||void 0===n?void 0:n.type)!==o.Critical?(null==a?void 0:a.error)||Mr(a):Ni()}function Vr(e,t,i){var n,a,r;if((null===(n=null==t?void 0:t.error)||void 0===n?void 0:n.type)!==o.Critical){if(!(null==t?void 0:t.error)&&t.chatConfig){if(null!==(a=(r=t.chatConfig).chatSpecificConfigs)&&void 0!==a||(r.chatSpecificConfigs={}),e===d.HELP_CENTER_HOST)t.chatConfig.chatSpecificConfigs.dbxHelpChatConfigs=i;else{if(e!==d.EXPERIENCE_HOST)return;t.chatConfig.chatSpecificConfigs.dbxExperienceChatConfigs=i}Mr(t)}}else Ni()}function zr(e,t,o){const i=undefined;Vr(e,Nr(p,e,t),o)}function Zr(e,t,o){const i=undefined;Vr(e,Or(p,e,t),o)}function $r(e){const t=window.location.href,o=undefined,i=undefined;Fr(vi(t,oi(t),e))}function Kr(e){const t=window.location.href,o=undefined,i=undefined;Fr(Ui(t,oi(t),e))}function Jr(e,t){const o=window.location.href,i=undefined,n=xi(o,oi(o),e);t.isChatEnabledForSubdomains?Fr(n):Di(t.isChatEnabledForSubdomains)}function jr(e,t){const o=window.location.href,i=undefined,n=Fi(o,oi(o),e);if(null===(null==t?void 0:t.chatOperationalHours))return void Hi();const a=undefined;ai(null==t?void 0:t.chatOperationalHours)&&Fr(n)}function qr({baseChatConfigs:e}){const t=undefined,o=undefined,i=Qo(oi(window.location.href),e.chatSupportedEntitlements);if(i===d.WWW_DBX_HOST){const t=undefined;Xr(i,e,Rr())}else if(i===d.SIGN_CENTER_HOST){const t=undefined;Gr(i,e,Lr())}else if(i===d.HELP_CENTER_HOST){const t=undefined;zr(i,e,Dr())}else if(i===d.EXPERIENCE_HOST){const t=undefined;Zr(i,e,Dr())}else if(i===d.DASH_DBX_HOST){const t=undefined;Jr(e,yr())}else if(i===d.FORMSWIFT_HOST){const t=undefined;jr(e,wr())}else i===d.DOCSEND_HOST?$r(e):i===d.HELLOSIGN_HOST?Kr(e):i===d.UNSUPPORTED_HOST&&Li()}gr.chatUri="",gr.chatApiKey="",gr.chatDataEnv="",gr.instance=null,vo();const Yr=Ar();Uo(`Reading [Pre-configured] baseChatConfigs: ${JSON.stringify(Yr)}`);const Qr=undefined;return qr({baseChatConfigs:Yr}),t})())); })(); //# debugId=55ea0b5d-f375-34b5-9fb3-7d332da3d49b