!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]="91138f30-e4bb-3aaa-8bdb-5ea8bbf76055")}catch(e){}}(); define(["exports","./e_file_viewer_static_scl_page_folder"],(function(t,e){"use strict";const n="variants",s=",",o=":";let r=0;const a=(t=!1)=>{const n=(t,e)=>{const n=[],s=document.head.querySelectorAll(`meta[${t}]`);return s?(Array.prototype.forEach.call(s,(s=>{try{const o=s.getAttribute(t);if(!o)return;e?n.push(...JSON.parse(o)):n.push(o)}catch{}})),n):[]};if(t&&r>1||!t&&r)return;r++,(()=>{const t=e.getUXVariantsFromDOM();if(!t)return;const n=f(t,"matchers"),s=[];for(const[t,e]of n){const n={feature_name:t,event_name:JSON.parse(e).event_name};s.push(n)}m({variant_tokens:t,matchers:s})})();const o=n("data-uxa-matcher-configs",!0),a=n("data-uxa-variant-tokens",!1);if(!o.length||!a.length)return;m({variant_tokens:a.join(s),matchers:o})},i=(t,e)=>{let n;n=t.startsWith("adobetarget")?"adobe_target_variants":"variants",e[n]?e[n]+=s+t:e[n]=t};const c=(t,e)=>{const n=t=>decodeURIComponent(escape(t)),[s,o,r]=t.split(".").map((t=>atob(t.split("_").join("/").split("-").join("+"))));if(!r)return;if("JWT"!==JSON.parse(n(s)).typ)return;const a=JSON.parse(n(o)),i=a[e];return"https://dropbox.com/ux_analytics"===a.iss?i:void 0},f=(t,e)=>{const n=c(t,e),r=[];for(const t of n.split(s)){const e=t.split(o);2===e.length&&r.push(e.map(decodeURIComponent))}return r},_=t=>t.startsWith("adobetarget:")?(t=>{const e=t.split(s),n=[];for(const t of e)try{const[e,s,r]=t.split(o);n.push([e+o+decodeURIComponent(s),decodeURIComponent(r)])}catch{continue}return n})(t):f(t,n);function m(t){if(!t)return;self._DBX_UX_variants_configStore=self._DBX_UX_variants_configStore||{};const e=self._DBX_UX_variants_configStore,{variant_tokens:n,matchers:o}=t;if(n)for(const t of n.split(s)){const n=_(t);if(n)for(const[s,o]of n)e.assignments=e.assignments||{},e.assignments[s]={variant:o,variantToken:t}}if(o)for(const t of o){e.matchers=e.matchers||{};const n=t.event_name;e.matchers[n]=e.matchers[n]||{};const s={feature_name:t.feature_name,event_name:n,is_pre_tti:t.is_pre_tti,like:t.like},o=JSON.stringify(s);e.matchers[n][o]=s}}t.addConfigsFromDOM=a,t.addMatchedVariantsToEvent=function(t){const e=(t,e)=>void 0===t||((t,e)=>{if(void 0===t)return!0;const n=t;for(const t in n)if(String(e[t])!==String(n[t]))return!1;return!0})(t.extra,e.extra);if("undefined"==typeof self||!self)return;let n;a();const s=self._DBX_UX_variants_configStore,o={};if(t&&s&&s.matchers&&t.eventName&&(n=s.matchers[t.eventName]))for(const r in n){if(!s.assignments||!n.hasOwnProperty(r))continue;const a=n[r],c=s.assignments[a.feature_name];c&&(void 0===o[c.variantToken]&&e(a.like,t)&&(t.extra||(t.extra={}),i(c.variantToken,t.extra),o[c.variantToken]=!0))}},t.parseJWTToDict=t=>{const e=c(t,n),r={};for(const t of e.split(s)){const e=t.split(o);2===e.length&&(r[decodeURIComponent(e[0])]=decodeURIComponent(e[1]))}return r}})); //# sourceMappingURL=c_ux_analytics_ux_variants.js-vflJhIlxX.map //# debugId=91138f30-e4bb-3aaa-8bdb-5ea8bbf76055