diff --git a/CHANGELOG.md b/CHANGELOG.md index 060dc9f2..24e0df1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to the Branch Web SDK will be documented here. The Branch Web SDK adheres to [Semantic Versioning](http://semver.org/). ## [VERSION] - unreleased +## [2.81.0] - 2024-01-18 +- feat(SDK-2101): add setRequestMetadata method +- fix(BUX-2863): fix focus getting trapped on banner +- feat(SDK-2196): add banner method deprecation warning +- fix(MLP-13): Update journey display criterion to include desktop, rename mobileUserAgent to getPlatformByUserAgent + ## [2.80.0] - 2023-09-14 - fix(SDK-2113): send session_link_click_id diff --git a/dist/build.js b/dist/build.js index c50e67d7..8fd67422 100644 --- a/dist/build.js +++ b/dist/build.js @@ -1071,7 +1071,7 @@ goog.json.Serializer.prototype.serializeObject_ = function(a, b) { b.push("}"); }; // Input 2 -var config = {app_service_endpoint:"https://app.link", link_service_endpoint:"https://bnc.lt", api_endpoint:"https://api2.branch.io", version:"2.80.0"}; +var config = {app_service_endpoint:"https://app.link", link_service_endpoint:"https://bnc.lt", api_endpoint:"https://api2.branch.io", version:"2.81.0"}; // Input 3 var safejson = {parse:function(a) { a = String(a); @@ -1315,9 +1315,10 @@ function isSafari13OrGreateriPad(a) { function isIOS(a) { return a && /(iPad|iPod|iPhone)/.test(a); } -utils.mobileUserAgent = function() { +utils.getPlatformByUserAgent = function() { var a = navigator.userAgent; - return a.match(/android/i) ? "android" : a.match(/ipad/i) || isSafari13OrGreateriPad(a) ? "ipad" : a.match(/i(os|p(hone|od))/i) ? "ios" : a.match(/\(BB[1-9][0-9]*;/i) ? "blackberry" : a.match(/Windows Phone/i) ? "windows_phone" : a.match(/Kindle/i) || a.match(/Silk/i) || a.match(/KFTT/i) || a.match(/KFOT/i) || a.match(/KFJWA/i) || a.match(/KFJWI/i) || a.match(/KFSOWI/i) || a.match(/KFTHWA/i) || a.match(/KFTHWI/i) || a.match(/KFAPWA/i) || a.match(/KFAPWI/i) ? "kindle" : !1; + return a.match(/android/i) ? "android" : a.match(/ipad/i) || isSafari13OrGreateriPad(a) ? "ipad" : a.match(/i(os|p(hone|od))/i) ? "ios" : a.match(/\(BB[1-9][0-9]*;/i) ? "blackberry" : a.match(/Windows Phone/i) ? "windows_phone" : a.match(/Kindle/i) || a.match(/Silk/i) || a.match(/KFTT/i) || a.match(/KFOT/i) || a.match(/KFJWA/i) || a.match(/KFJWI/i) || a.match(/KFSOWI/i) || a.match(/KFTHWA/i) || a.match(/KFTHWI/i) || a.match(/KFAPWA/i) || a.match(/KFAPWI/i) ? "kindle" : a.match(/(Windows|Macintosh|Linux)/i) ? + "desktop" : "other"; }; utils.isSafari11OrGreater = function() { var a = navigator.userAgent; @@ -1712,7 +1713,8 @@ validationTypes.STRING)})}; resources.crossPlatformIds = {destination:config.api_endpoint, endpoint:"/v1/cpid", method:utils.httpMethod.POST, params:{user_data:validator(!0, validationTypes.STRING)}}; resources.lastAttributedTouchData = {destination:config.api_endpoint, endpoint:"/v1/cpid/latd", method:utils.httpMethod.POST, params:{user_data:validator(!0, validationTypes.STRING)}}; // Input 6 -var COOKIE_MS = 31536E6, BRANCH_KEY_PREFIX = "BRANCH_WEBSDK_KEY", storage, BranchStorage = function(a) { +var storage = {}, COOKIE_MS = 31536E6, BRANCH_KEY_PREFIX = "BRANCH_WEBSDK_KEY"; +storage.BranchStorage = function(a) { for (var b = 0; b < a.length; b++) { var c = this[a[b]]; c = "function" === typeof c ? c() : c; @@ -1720,7 +1722,8 @@ var COOKIE_MS = 31536E6, BRANCH_KEY_PREFIX = "BRANCH_WEBSDK_KEY", storage, Branc return c._store = {}, c; } } -}, prefix = function(a) { +}; +var prefix = function(a) { return "branch_session" === a || "branch_session_first" === a ? a : BRANCH_KEY_PREFIX + a; }, trimPrefix = function(a) { return a.replace(BRANCH_KEY_PREFIX, ""); @@ -1769,10 +1772,10 @@ var COOKIE_MS = 31536E6, BRANCH_KEY_PREFIX = "BRANCH_WEBSDK_KEY", storage, Branc } }}; }; -BranchStorage.prototype.local = function() { +storage.BranchStorage.prototype.local = function() { return webStorage(!0); }; -BranchStorage.prototype.session = function() { +storage.BranchStorage.prototype.session = function() { return webStorage(!1); }; var cookies = function() { @@ -1809,10 +1812,10 @@ var cookies = function() { return navigator.cookieEnabled; }}; }; -BranchStorage.prototype.cookie = function() { +storage.BranchStorage.prototype.cookie = function() { return cookies(); }; -BranchStorage.prototype.pojo = {getAll:function() { +storage.BranchStorage.prototype.pojo = {getAll:function() { return this._store; }, get:function(a) { return this._store[a] || null; @@ -1868,9 +1871,10 @@ Server.prototype.getUrl = function(a, b) { "undefined" !== typeof c && "" !== c && null !== c && (g[h] = c); } } - } else { - "/v1/pageview" !== a.endpoint && "/v1/dismiss" !== a.endpoint || utils.merge(g, b); + } else if ("/v1/pageview" === a.endpoint || "/v1/dismiss" === a.endpoint) { + utils.merge(g, b), g.branch_requestMetadata && delete g.branch_requestMetadata; } + b.hasOwnProperty("branch_requestMetadata") && b.branch_requestMetadata && "/v1/pageview" !== a.endpoint && "/v1/dismiss" !== a.endpoint && (g.metadata = safejson.stringify(b.branch_requestMetadata)); if ("POST" === a.method) { try { var h = g; @@ -2062,7 +2066,7 @@ var banner_utils = {animationSpeed:250, animationDelay:20, bannerHeight:"76px", a = "number" === typeof a ? new Date() >= new Date(a) : !a; var c = b.forgetHide; "number" === typeof c && (c = !1); - return !document.getElementById("branch-banner") && !document.getElementById("branch-banner-iframe") && (a || c) && (b.showAndroid && "android" === utils.mobileUserAgent() || b.showiPad && "ipad" === utils.mobileUserAgent() || b.showiOS && "ios" === utils.mobileUserAgent() || b.showBlackberry && "blackberry" === utils.mobileUserAgent() || b.showWindowsPhone && "windows_phone" === utils.mobileUserAgent() || b.showKindle && "kindle" === utils.mobileUserAgent()); + return !document.getElementById("branch-banner") && !document.getElementById("branch-banner-iframe") && (a || c) && (b.showAndroid && "android" === utils.getPlatformByUserAgent() || b.showiPad && "ipad" === utils.getPlatformByUserAgent() || b.showiOS && "ios" === utils.getPlatformByUserAgent() || b.showBlackberry && "blackberry" === utils.getPlatformByUserAgent() || b.showWindowsPhone && "windows_phone" === utils.getPlatformByUserAgent() || b.showKindle && "kindle" === utils.getPlatformByUserAgent()); }}; // Input 9 var banner_css = {banner:function(a) { @@ -2080,7 +2084,7 @@ banner_css.iframe_position = function(a, b) { return "#branch-banner-iframe { position: " + ("top" !== b || a ? "fixed" : "absolute") + "; }\n"; }; banner_css.css = function(a, b) { - var c = banner_css.banner(a), d = utils.mobileUserAgent(); + var c = banner_css.banner(a), d = utils.getPlatformByUserAgent(); "ios" !== d && "ipad" !== d || !a.showiOS ? "android" === d && a.showAndroid ? c += banner_css.mobile + banner_css.android : "blackberry" === d && a.showBlackberry ? c += banner_css.mobile + banner_css.blackberry : "windows_phone" === d && a.showWindowsPhone ? c += banner_css.mobile + banner_css.windows_phone : "kindle" === d && a.showKindle && (c += banner_css.mobile + banner_css.kindle) : c += banner_css.mobile + banner_css.ios; c += a.customCSS; a.iframe && (c += banner_css.inneriframe, d = document.createElement("style"), d.type = "text/css", d.id = "branch-iframe-css", utils.addNonceAttribute(d), d.innerHTML = banner_css.iframe + banner_css.iframe_position(a.mobileSticky, a.position), (document.head || document.getElementsByTagName("head")[0]).appendChild(d)); @@ -2151,7 +2155,7 @@ var banner_html = {banner:function(a, b) { d.className = "branch-animation"; utils.addNonceAttribute(d); d.onload = function() { - var e = utils.mobileUserAgent(); + var e = utils.getPlatformByUserAgent(); e = "ios" === e || "ipad" === e ? "branch-banner-ios" : "android" === e ? "branch-banner-android" : "branch-banner-other"; var f = d.contentDocument || d.contentWindow.document; f.head = f.createElement("head"); @@ -2202,18 +2206,11 @@ var banner = function(a, b, c, d) { banner_css.css(b, e); c.channel = c.channel || "app banner"; k = b.iframe ? e.contentWindow.document : document; - if (utils.mobileUserAgent()) { - b.open_app = b.open_app; - b.append_deeplink_path = b.append_deeplink_path; - b.make_new_link = b.make_new_link; - b.deepview_type = "banner"; - a.deepview(c, b); - var n = k.getElementById("branch-mobile-action"); - n && (n.onclick = function(r) { - r.preventDefault(); - a.deepviewCta(); - }); - } + var n = utils.getPlatformByUserAgent(); + !["other", "desktop"].includes(n) && (b.open_app = b.open_app, b.append_deeplink_path = b.append_deeplink_path, b.make_new_link = b.make_new_link, b.deepview_type = "banner", a.deepview(c, b), n = k.getElementById("branch-mobile-action")) && (n.onclick = function(r) { + r.preventDefault(); + a.deepviewCta(); + }); n = banner_utils.getBodyStyle("margin-top"); var q = banner_utils.getBodyStyle("margin-bottom"); banner_utils.addClass(document.body, "branch-banner-is-active"); @@ -2379,7 +2376,7 @@ journeys_utils.addHtmlToIframe = function(a, b, c) { a.body = a.createElement("body"); a.body.innerHTML = b; a.body.className = c; - (b = a.querySelector('meta[name="accessibility"]')) && "wcag" === b.content && (b = a.createElement("script"), b.type = "text/javascript", b.text = "\n\t\t\tvar focusableElements =\n\t\t\t\t\t'button, [href], input, select, textarea, [role=\"button\"], h1, [role=\"text\"], .branch-banner-content';\n\t\t\tvar modal = document.getElementById('branch-banner');\n\t\t\tvar focusableContent = modal.querySelectorAll(focusableElements);\n\t\t\tvar firstFocusableElement = focusableContent[0];\n\t\t\tvar lastFocusableElement = focusableContent[focusableContent.length - 1];\n\n\t\t\tdocument.addEventListener('keydown', function(e) {\n\t\t\t\tvar isTabPressed = e.key === 'Tab' || e.keyCode === 9;\n\t\t\t\n\t\t\t\tif (!isTabPressed) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (e.shiftKey) {\n\t\t\t\t\tif (document.activeElement === firstFocusableElement) {\n\t\t\t\t\t\tlastFocusableElement.focus();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else if (document.activeElement === lastFocusableElement) {\n\t\t\t\t\tfirstFocusableElement.focus();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t});\n\t\t\tsetTimeout(function() { firstFocusableElement.focus() }, 100);\n\t\t", + (b = a.querySelector('meta[name="accessibility"]')) && "wcag" === b.content && (b = a.createElement("script"), b.type = "text/javascript", b.text = "\n\t\t\tvar focusableElements = 'button, [href], input, select, textarea, [role=\"button\"], h1, [role=\"text\"], .branch-banner-content';\n\t\t\tvar modal = document.getElementById('branch-banner');\n\t\t\tvar focusableContent = modal.querySelectorAll(focusableElements);\n\t\t\tvar focusElementIdx = 0;\n\n\t\t\tfunction handleTabKey(e) {\n\t\t\t\tvar isTabPressed = e.key === 'Tab' || e.keyCode === 9;\n\t\t\t\n\t\t\t\tif (!isTabPressed) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (e.shifKey) {\n\t\t\t\t\tif (focusElementIdx <= 0) {\n\t\t\t\t\t\tfocusElementIdx = focusableContent.length - 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfocusElementIdx = focusElementIdx - 1;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (focusElementIdx >= focusableContent.length - 1) {\n\t\t\t\t\t\tfocusElementIdx = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfocusElementIdx = focusElementIdx + 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfocusableContent[focusElementIdx].focus();\n\t\t\t\te.preventDefault();\n\t\t\t}\n\n\t\t\tfunction autoFocus(delay) {\n\t\t\t\tsetTimeout(function() { focusableContent[focusElementIdx].focus() }, delay);\n\t\t\t}\n\n\t\t\tdocument.addEventListener('keydown', handleTabKey);\n\t\t\tautoFocus(100);\n\t\t\t\n\t\t", a.querySelector("body").append(b)); }; journeys_utils.addIframeOuterCSS = function(a, b) { @@ -2669,7 +2666,7 @@ function renderHtmlBlob(a, b, c, d) { b = journeys_utils.removeScriptAndCss(b); var k = journeys_utils.createIframe(); k.onload = function() { - journeys_utils.addHtmlToIframe(k, b, utils.mobileUserAgent()); + journeys_utils.addHtmlToIframe(k, b, utils.getPlatformByUserAgent()); journeys_utils.addIframeOuterCSS(h, f); journeys_utils.addIframeInnerCSS(k, g); journeys_utils.addDynamicCtaText(k, e); @@ -2689,7 +2686,7 @@ function _areJourneysDismissedGlobally(a) { return !1; } branch_view.shouldDisplayJourney = function(a, b, c) { - return !checkPreviousBanner() && utils.mobileUserAgent() && a.event_data && a.template ? c ? !0 : !a.event_data.branch_view_data.id || b && b.no_journeys || _areJourneysDismissedGlobally(journeys_utils.branch) ? (branch_view.callback_index = 1, !1) : !0 : !1; + return !checkPreviousBanner() && "other" != utils.getPlatformByUserAgent() && a.event_data && a.template ? c ? !0 : !a.event_data.branch_view_data.id || b && b.no_journeys || _areJourneysDismissedGlobally(journeys_utils.branch) ? (branch_view.callback_index = 1, !1) : !0 : !1; }; branch_view.incrementPageviewAnalytics = function(a) { a = {event:"pageview", journey_displayed:!0, audience_rule_id:a.audience_rule_id, branch_view_id:a.branch_view_id}; @@ -2803,10 +2800,11 @@ var default_branch, callback_params = {NO_CALLBACK:0, CALLBACK_ERR:1, CALLBACK_E return default_branch || (default_branch = new Branch()), default_branch; } this._queue = task_queue(); - this._storage = new BranchStorage(["session", "cookie", "pojo"]); + this._storage = new storage.BranchStorage(["session", "cookie", "pojo"]); this._server = new Server(); this._listeners = []; this.sdk = "web" + config.version; + this.requestMetadata = {}; this.init_state = init_states.NO_INIT; this.init_state_fail_code = init_state_fail_codes.NO_FAILURE; this.init_state_fail_details = null; @@ -2821,8 +2819,13 @@ Branch.prototype._api = function(a, b, c) { (a.params && a.params.sdk || a.queryPart && a.queryPart.sdk) && this.sdk && (b.sdk = this.sdk); (a.params && a.params.browser_fingerprint_id || a.queryPart && a.queryPart.browser_fingerprint_id) && this.browser_fingerprint_id && (b.browser_fingerprint_id = this.browser_fingerprint_id); utils.userPreferences.trackingDisabled && (b.tracking_disabled = utils.userPreferences.trackingDisabled); - return this._server.request(a, b, this._storage, function(d, e) { - c(d, e); + if (this.requestMetadata) { + for (var d in this.requestMetadata) { + this.requestMetadata.hasOwnProperty(d) && (b.branch_requestMetadata || (b.branch_requestMetadata = {}), b.branch_requestMetadata[d] = this.requestMetadata[d]); + } + } + return this._server.request(a, b, this._storage, function(e, f) { + c(e, f); }); }; Branch.prototype._referringLink = function(a) { @@ -3132,23 +3135,25 @@ Branch.prototype.closeJourney = wrap(callback_params.CALLBACK_ERR, function(a) { a(); }); Branch.prototype.banner = wrap(callback_params.CALLBACK_ERR, function(a, b, c) { - if (utils.mobileUserAgent()) { + console.warn('The "banner" method is deprecated and will be removed in future versions. Please use Branch Journeys instead. For more information and migration steps, visit: https://help.branch.io/using-branch/docs/journeys-overview'); + var d = utils.getPlatformByUserAgent(); + if (["other", "desktop"].includes(d)) { + console.info("banner functionality is not supported on this platform"); + } else { c = c || {}; _setBranchViewData.call(null, this, function() { }, c); "undefined" === typeof b.showAgain && "undefined" !== typeof b.forgetHide && (b.showAgain = b.forgetHide); - var d = {icon:utils.cleanBannerText(b.icon) || "", title:utils.cleanBannerText(b.title) || "", description:utils.cleanBannerText(b.description) || "", reviewCount:"number" === typeof b.reviewCount && 0 < b.reviewCount ? Math.floor(b.reviewCount) : null, rating:"number" === typeof b.rating && 5 >= b.rating && 0 < b.rating ? Math.round(2 * b.rating) / 2 : null, openAppButtonText:utils.cleanBannerText(b.openAppButtonText) || "View in app", downloadAppButtonText:utils.cleanBannerText(b.downloadAppButtonText) || + var e = {icon:utils.cleanBannerText(b.icon) || "", title:utils.cleanBannerText(b.title) || "", description:utils.cleanBannerText(b.description) || "", reviewCount:"number" === typeof b.reviewCount && 0 < b.reviewCount ? Math.floor(b.reviewCount) : null, rating:"number" === typeof b.rating && 5 >= b.rating && 0 < b.rating ? Math.round(2 * b.rating) / 2 : null, openAppButtonText:utils.cleanBannerText(b.openAppButtonText) || "View in app", downloadAppButtonText:utils.cleanBannerText(b.downloadAppButtonText) || "Download App", iframe:"undefined" === typeof b.iframe ? !0 : b.iframe, showiOS:"undefined" === typeof b.showiOS ? !0 : b.showiOS, showiPad:"undefined" === typeof b.showiPad ? !0 : b.showiPad, showAndroid:"undefined" === typeof b.showAndroid ? !0 : b.showAndroid, showBlackberry:"undefined" === typeof b.showBlackberry ? !0 : b.showBlackberry, showWindowsPhone:"undefined" === typeof b.showWindowsPhone ? !0 : b.showWindowsPhone, showKindle:"undefined" === typeof b.showKindle ? !0 : b.showKindle, disableHide:!!b.disableHide, forgetHide:"number" === typeof b.forgetHide ? b.forgetHide : !!b.forgetHide, respectDNT:"undefined" === typeof b.respectDNT ? !1 : b.respectDNT, position:b.position || "top", customCSS:b.customCSS || "", mobileSticky:"undefined" === typeof b.mobileSticky ? !1 : b.mobileSticky, buttonBorderColor:b.buttonBorderColor || "", buttonBackgroundColor:b.buttonBackgroundColor || "", buttonFontColor:b.buttonFontColor || "", buttonBorderColorHover:b.buttonBorderColorHover || "", buttonBackgroundColorHover:b.buttonBackgroundColorHover || "", buttonFontColorHover:b.buttonFontColorHover || "", make_new_link:!!b.make_new_link, open_app:!!b.open_app, immediate:!!b.immediate, append_deeplink_path:!!b.append_deeplink_path}; - "undefined" !== typeof b.showMobile && (d.showiOS = b.showMobile, d.showAndroid = b.showMobile, d.showBlackberry = b.showMobile, d.showWindowsPhone = b.showMobile, d.showKindle = b.showMobile); + "undefined" !== typeof b.showMobile && (e.showiOS = b.showMobile, e.showAndroid = b.showMobile, e.showBlackberry = b.showMobile, e.showWindowsPhone = b.showMobile, e.showKindle = b.showMobile); c.data = utils.merge(utils.getHostedDeepLinkData(), c.data); - var e = this; - e.renderQueue(function() { - e.closeBannerPointer = banner(e, d, c, e._storage); + var f = this; + f.renderQueue(function() { + f.closeBannerPointer = banner(f, e, c, f._storage); }); - } else { - console.info("banner functionality is not supported on desktop"); } a(); }); @@ -3189,6 +3194,13 @@ Branch.prototype.setAPIResponseCallback = wrap(callback_params.NO_CALLBACK, func Branch.prototype.referringLink = function(a) { return this._referringLink(a); }; +Branch.prototype.setRequestMetaData = function(a, b) { + try { + "undefined" !== typeof a && null !== a && 0 !== a.length && "undefined" !== typeof b && (this.requestMetadata.hasOwnProperty(a) && null === b && delete this.requestMetadata[a], this.requestMetadata = utils.addPropertyIfNotNull(this.requestMetadata, a, b)); + } catch (c) { + console.error("An error occured while setting request metadata", c); + } +}; // Input 17 var branch_instance = new Branch(); if (window.branch && window.branch._q) { diff --git a/dist/build.min.js b/dist/build.min.js index 9eace923..968f8d47 100644 --- a/dist/build.min.js +++ b/dist/build.min.js @@ -8,20 +8,20 @@ function da(a,b){if(b)a:{var c=ca;a=a.split(".");for(var d=0;d=(b||11))return!0}catch(c){}return!1} function E(){var a=navigator.userAgent;return a.match(/android/i)?"android":a.match(/ipad/i)||a&&Ma(a)&&a&&-1screen.width?"ipad":a.match(/i(os|p(hone|od))/i)?"ios":a.match(/\(BB[1-9][0-9]*;/i)?"blackberry":a.match(/Windows Phone/i)?"windows_phone":a.match(/Kindle/i)||a.match(/Silk/i)||a.match(/KFTT/i)||a.match(/KFOT/i)||a.match(/KFJWA/i)||a.match(/KFJWI/i)||a.match(/KFSOWI/i)||a.match(/KFTHWA/i)||a.match(/KFTHWI/i)||a.match(/KFAPWA/i)||a.match(/KFAPWI/i)? -"kindle":!1}function Oa(){var a=navigator.userAgent;return Ma(a)?Na(a,11):!1}function Pa(){var a=navigator.userAgent;return!!window.webkitURL&&a&&a&&/(iPad|iPod|iPhone)/.test(a)&&!/(chrome|crios)/i.test(a)&&!/(fxios|firefox)/i.test(a)&&!/edg/i.test(a)&&!/(opt|opr)/i.test(a)&&!/yabrowser/i.test(a)}function Qa(a){try{var b=(A()&&La()?window.top.location.search:window.location.search).substring(1).match(new RegExp(a+"=([^&]*)"));if(b&&1<=b.length)return b[1]}catch(c){}} -function Ra(a){return a.replace(/(\-\w)/g,function(b){return b[1].toUpperCase()})} +"kindle":a.match(/(Windows|Macintosh|Linux)/i)?"desktop":"other"}function Oa(){var a=navigator.userAgent;return Ma(a)?Na(a,11):!1}function Pa(){var a=navigator.userAgent;return!!window.webkitURL&&a&&a&&/(iPad|iPod|iPhone)/.test(a)&&!/(chrome|crios)/i.test(a)&&!/(fxios|firefox)/i.test(a)&&!/edg/i.test(a)&&!/(opt|opr)/i.test(a)&&!/yabrowser/i.test(a)} +function Qa(a){try{var b=(A()&&La()?window.top.location.search:window.location.search).substring(1).match(new RegExp(a+"=([^&]*)"));if(b&&1<=b.length)return b[1]}catch(c){}}function Ra(a){return a.replace(/(\-\w)/g,function(b){return b[1].toUpperCase()})} function Ca(a){var b="",c,d=0;a=a.replace(/\r\n/g,"\n");var e="";for(c=0;cf?e+=String.fromCharCode(f):(127f?e+=String.fromCharCode(f>>6|192):(e+=String.fromCharCode(f>>12|224),e+=String.fromCharCode(f>>6&63|128)),e+=String.fromCharCode(f&63|128))}for(a=e;d>2;m=(m&3)<<4|e>>4;var k=(e&15)<<2|c>>6;var g=c&63;isNaN(e)?g=k=64:isNaN(c)&&(g=64);b=b+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(f)+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(m)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(k)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g)}return b}function Sa(a){return Ta(a)?atob(a):a}function Ta(a){if("string"!==typeof a||""===a||""===a.trim())return!1;try{return btoa(atob(a))===a}catch(b){return!1}} function Ua(a){a&&a.browser_fingerprint_id&&!Ta(a.browser_fingerprint_id)&&(a.browser_fingerprint_id=btoa(a.browser_fingerprint_id));a&&a.alternative_browser_fingerprint_id&&!Ta(a.alternative_browser_fingerprint_id)&&(a.alternative_browser_fingerprint_id=btoa(a.alternative_browser_fingerprint_id));return a} @@ -38,58 +38,59 @@ if(e)return e;if(d.length)return bb.invalidKeysForProducts+d.join(", ")}return n function fb(){var a={};var b={};b=F(b,"$og_title",B("title"));b=F(b,"$og_description",B("description"));b=F(b,"$og_image_url",B("image"));b=F(b,"$og_video",B("video"));b=(b=F(b,"$og_type",B("type")))&&0=b?a():setTimeout(a,b)} function pb(){navigator.userAgentData?navigator.userAgentData.getHighEntropyValues(["model","platformVersion"]).then(function(a){var b=a.model;if(a=a.platformVersion){var c=/^([1-9]\d*)\.(0\d*)(\.[0]\d*){1,}$/;-1!==a.indexOf(".")&&(a=a.replace(c,a.substring(0,a.indexOf("."))))}x={model:b,platformVersion:a}}):x=null}function lb(a,b,c){"string"===typeof c&&c&&(a[b]=c);return a};var qb={}; function J(a,b){return function(c,d,e){if(y)return!1;if("number"===typeof e||e)if(0===b){if("object"!==typeof e)return z("API request $1, parameter $2 is not $3",[c,d,"an object"])}else if(3===b){if(!(e instanceof Array))return z("API request $1, parameter $2 is not $3",[c,d,"an array"])}else if(2===b){if("number"!==typeof e)return z("API request $1, parameter $2 is not $3",[c,d,"a number"])}else if(4===b){if("boolean"!==typeof e)return z("API request $1, parameter $2 is not $3",[c,d,"a boolean"])}else{if("string"!==typeof e)return z("API request $1, parameter $2 is not $3", [c,d,"a string"]);if(1!==b&&!b.test(e))return z("API request $1, parameter $2 is not $3",[c,d,"in the proper format"])}else if(a)return z("API request $1 missing parameter $2",[c,d]);return!1}}function rb(a){return C(a,{browser_fingerprint_id:J(!0,1),identity_id:J(!0,1),sdk:J(!0,1),session_id:J(!0,1)})} -var sb={destination:"https://api2.branch.io",endpoint:"/v1/open",method:"POST",h:{browser_fingerprint_id:J(!1,1),alternative_browser_fingerprint_id:J(!1,1),identity_id:J(!1,1),identity:J(!1,1),link_identifier:J(!1,1),sdk:J(!1,1),options:J(!1,0),initial_referrer:J(!1,1),tracking_disabled:J(!1,4),current_url:J(!1,1),screen_height:J(!1,2),screen_width:J(!1,2),model:J(!1,1),os_version:J(!1,1)}},tb={destination:"https://app.link",endpoint:"/_r",method:"GET",R:!0,h:{sdk:J(!0,1),_t:J(!1,1),branch_key:J(!0, -1)}},ub={destination:"https://api2.branch.io",endpoint:"/v1/url",method:"POST",sa:"obj",h:rb({alias:J(!1,1),campaign:J(!1,1),channel:J(!1,1),data:J(!1,1),feature:J(!1,1),identity_id:J(!0,1),stage:J(!1,1),tags:J(!1,3),type:J(!1,2),source:J(!1,1),instrumentation:J(!1,1)})},vb={destination:"https://api2.branch.io",endpoint:"/v1/qr-code",method:"POST",sa:"obj",h:rb({alias:J(!1,1),campaign:J(!1,1),channel:J(!1,1),data:J(!1,1),qr_code_settings:J(!1,1),feature:J(!1,1),identity_id:J(!0,1),stage:J(!1,1),tags:J(!1, -3),type:J(!1,2),source:J(!1,1)})},wb={destination:"https://api2.branch.io",endpoint:"/v1/deepview",R:!0,method:"POST",h:rb({campaign:J(!1,1),_t:J(!1,1),channel:J(!1,1),data:J(!0,1),feature:J(!1,1),link_click_id:J(!1,1),open_app:J(!1,4),append_deeplink_path:J(!1,4),stage:J(!1,1),tags:J(!1,3),deepview_type:J(!0,1),source:J(!0,1)})},xb={destination:"https://api2.branch.io",endpoint:"/v2/event/standard",method:"POST",h:{name:J(!0,1),user_data:J(!0,1),custom_data:J(!1,1),event_data:J(!1,1),content_items:J(!1, +var sb={destination:"https://api2.branch.io",endpoint:"/v1/open",method:"POST",h:{browser_fingerprint_id:J(!1,1),alternative_browser_fingerprint_id:J(!1,1),identity_id:J(!1,1),identity:J(!1,1),link_identifier:J(!1,1),sdk:J(!1,1),options:J(!1,0),initial_referrer:J(!1,1),tracking_disabled:J(!1,4),current_url:J(!1,1),screen_height:J(!1,2),screen_width:J(!1,2),model:J(!1,1),os_version:J(!1,1)}},tb={destination:"https://app.link",endpoint:"/_r",method:"GET",S:!0,h:{sdk:J(!0,1),_t:J(!1,1),branch_key:J(!0, +1)}},ub={destination:"https://api2.branch.io",endpoint:"/v1/url",method:"POST",ta:"obj",h:rb({alias:J(!1,1),campaign:J(!1,1),channel:J(!1,1),data:J(!1,1),feature:J(!1,1),identity_id:J(!0,1),stage:J(!1,1),tags:J(!1,3),type:J(!1,2),source:J(!1,1),instrumentation:J(!1,1)})},vb={destination:"https://api2.branch.io",endpoint:"/v1/qr-code",method:"POST",ta:"obj",h:rb({alias:J(!1,1),campaign:J(!1,1),channel:J(!1,1),data:J(!1,1),qr_code_settings:J(!1,1),feature:J(!1,1),identity_id:J(!0,1),stage:J(!1,1),tags:J(!1, +3),type:J(!1,2),source:J(!1,1)})},wb={destination:"https://api2.branch.io",endpoint:"/v1/deepview",S:!0,method:"POST",h:rb({campaign:J(!1,1),_t:J(!1,1),channel:J(!1,1),data:J(!0,1),feature:J(!1,1),link_click_id:J(!1,1),open_app:J(!1,4),append_deeplink_path:J(!1,4),stage:J(!1,1),tags:J(!1,3),deepview_type:J(!0,1),source:J(!0,1)})},xb={destination:"https://api2.branch.io",endpoint:"/v2/event/standard",method:"POST",h:{name:J(!0,1),user_data:J(!0,1),custom_data:J(!1,1),event_data:J(!1,1),content_items:J(!1, 1),customer_event_alias:J(!1,1)}},yb={destination:"https://api2.branch.io",endpoint:"/v2/event/custom",method:"POST",h:{name:J(!0,1),user_data:J(!0,1),custom_data:J(!1,1),event_data:J(!1,1),content_items:J(!1,1),customer_event_alias:J(!1,1)}},zb={destination:"https://api2.branch.io",endpoint:"/v1/pageview",method:"POST",h:rb({event:J(!0,1),metadata:J(!1,0),initial_referrer:J(!1,1),tracking_disabled:J(!1,4),branch_view_id:J(!1,1),no_journeys:J(!1,4),user_language:J(!1,1),open_app:J(!1,4),has_app_websdk:J(!1, 4),source:J(!1,1),feature:J(!1,1),is_iframe:J(!1,4),data:J(!1,0),callback_string:J(!1,1),journey_displayed:J(!1,4),audience_rule_id:J(!1,1),journey_dismissals:J(!1,0),identity_id:J(!1,1),identity:J(!0,1),session_referring_link_data:J(!1,1),session_link_click_id:J(!1,1)})},Ab={destination:"https://api2.branch.io",endpoint:"/v1/dismiss",method:"POST",h:rb({event:J(!0,1),metadata:J(!1,0),initial_referrer:J(!1,1),tracking_disabled:J(!1,4),branch_view_id:J(!1,1),no_journeys:J(!1,4),user_language:J(!1, -1),open_app:J(!1,4),has_app_websdk:J(!1,4),source:J(!1,1),feature:J(!1,1),is_iframe:J(!1,4),data:J(!1,0),callback_string:J(!1,1),journey_displayed:J(!1,4),audience_rule_id:J(!1,1),journey_dismissals:J(!1,0),dismissal_source:J(!1,1)})},Bb={destination:"https://api2.branch.io",endpoint:"/v1/cpid",method:"POST",h:{user_data:J(!0,1)}},Cb={destination:"https://api2.branch.io",endpoint:"/v1/cpid/latd",method:"POST",h:{user_data:J(!0,1)}};function Db(){for(var a=["session","cookie","pojo"],b=0;ba.length?"function"===typeof b&&b():(a[0].appendChild(d),"function"===typeof b&&Wa(d,"error",b),"function"===typeof c&&Wa(d,"load",c))}; +Db.prototype.pojo={getAll:function(){return this.H},get:function(a){return this.H[a]||null},set:function(a,b){this.H[a]=b},remove:function(a){delete this.H[a]},clear:function(){this.H={}},isEnabled:function(){return!0}};function Jb(){}Jb.prototype.l=0;function Kb(a,b,c){if("undefined"===typeof b)return"";var d=[];if(b instanceof Array){for(a=0;aa.length?"function"===typeof b&&b():(a[0].appendChild(d),"function"===typeof b&&Wa(d,"error",b),"function"===typeof c&&Wa(d,"load",c))}; function Mb(a,b,c,d,e){var f=Date.now(),m=ua;0===a.l&&Oa()&&a.l++;var k="branch_callback__"+a.l++,g=0<=b.indexOf("branch.io")?"&data=":"&post_data=";c="POST"===d?encodeURIComponent(Ca(h(c))):"";var u=window.setTimeout(function(){window[k]=function(){};F(w,m,va(f));e(Error("Request timed out"),null,504)},qa);window[k]=function(l){window.clearTimeout(u);e(null,l)};a.createScript(b+(0>b.indexOf("?")?"?":"")+(c?g+c:"")+(0<=b.indexOf("/c/")?"&click=1":"")+"&callback="+k,function(){e(Error("Request blocked by client, probably adblock"), null)},function(){F(w,m,va(f));try{"function"===typeof this.remove?this.remove():this.parentNode.removeChild(this)}catch(l){}delete window[k]})} -function Nb(a,b,c,d,e,f,m,k){var g=Date.now(),u=ua,l=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");k&&(l.responseType=k);l.ontimeout=function(){F(w,u,va(g));f(Error("Request timed out"),null,504)};l.onerror=function(t){f(Error(t.error||"Error in API: "+l.status),null,l.status)};l.onreadystatechange=function(){if(4===l.readyState)if(F(w,u,va(g)),200===l.status){if("arraybuffer"===l.responseType)var t=l.response;else if(m)t=l.responseText;else try{t=r(l.responseText)}catch(q){t= +function Nb(a,b,c,d,e,f,m,k){var g=Date.now(),u=ua,l=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");k&&(l.responseType=k);l.ontimeout=function(){F(w,u,va(g));f(Error("Request timed out"),null,504)};l.onerror=function(t){f(Error(t.error||"Error in API: "+l.status),null,l.status)};l.onreadystatechange=function(){if(4===l.readyState)if(F(w,u,va(g)),200===l.status){if("arraybuffer"===l.responseType)var t=l.response;else if(m)t=l.responseText;else try{t=q(l.responseText)}catch(r){t= {}}f(null,t,l.status)}else if("4"===l.status.toString().substring(0,1)||"5"===l.status.toString().substring(0,1))l.responseURL&&l.responseURL.includes("v2/event")?f(l.responseText,null,l.status):f(Error("Error in API: "+l.status),null,l.status)};try{l.open(d,b,!0),l.timeout=qa,l.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),l.send(c)}catch(t){e.set("use_jsonp",!0),Mb(a,b,c,d,f)}} -function Ob(a,b,c,d,e){function f(){d.get("use_jsonp")||b.R?Mb(a,l,c,b.method,m):Nb(a,l,u,b.method,d,m,V,n)}function m(p,G,D){"function"===typeof a.fa&&a.fa(l,b.method,t,p,D,G);p&&0=new Date(a):!a;var c=b.P;"number"===typeof c&&(c=!1);return!document.getElementById("branch-banner")&&!document.getElementById("branch-banner-iframe")&&(a||c)&&(b.U&&"android"===E()||b.ua&&"ipad"===E()||b.Y&&"ios"===E()||b.V&&"blackberry"===E()||b.X&&"windows_phone"===E()||b.W&&"kindle"===E())};function Vb(a,b){var c=".branch-banner-is-active { -webkit-transition: all 0.375s ease; transition: all 00.375s ease; }\n#branch-banner { width:100%; z-index: 99999; font-family: Helvetica Neue, Sans-serif; -webkit-font-smoothing: antialiased; -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-transition: all 0.25s ease; transition: all 00.25s ease; }\n#branch-banner .button{ border: 1px solid "+(a.buttonBorderColor||("dark"===a.theme?"transparent":"#ccc"))+"; background: "+ +function Ub(a,b){a=a.get("hideBanner",!0);if(b.ua&&navigator&&Number(navigator.doNotTrack))return!1;try{"string"===typeof a&&(a=q(a))}catch(d){a=!1}a="number"===typeof a?new Date>=new Date(a):!a;var c=b.R;"number"===typeof c&&(c=!1);return!document.getElementById("branch-banner")&&!document.getElementById("branch-banner-iframe")&&(a||c)&&(b.V&&"android"===E()||b.va&&"ipad"===E()||b.Z&&"ios"===E()||b.W&&"blackberry"===E()||b.Y&&"windows_phone"===E()||b.X&&"kindle"===E())};function Vb(a,b){var c=".branch-banner-is-active { -webkit-transition: all 0.375s ease; transition: all 00.375s ease; }\n#branch-banner { width:100%; z-index: 99999; font-family: Helvetica Neue, Sans-serif; -webkit-font-smoothing: antialiased; -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-transition: all 0.25s ease; transition: all 00.25s ease; }\n#branch-banner .button{ border: 1px solid "+(a.buttonBorderColor||("dark"===a.theme?"transparent":"#ccc"))+"; background: "+ (a.buttonBackgroundColor||"#fff")+"; color: "+(a.buttonFontColor||"#000")+"; cursor: pointer; margin-top: 0px; font-size: 14px; display: inline-block; margin-left: 5px; font-weight: 400; text-decoration: none; border-radius: 4px; padding: 6px 12px; transition: all .2s ease;}\n#branch-banner .button:hover { border: 1px solid "+(a.buttonBorderColorHover||("dark"===a.theme?"transparent":"#BABABA"))+"; background: "+(a.buttonBackgroundColorHover||"#E0E0E0")+"; color: "+(a.buttonFontColorHover||"#000")+ ";}\n#branch-banner .button:focus { outline: none; }\n#branch-banner * { margin-right: 4px; position: relative; line-height: 1.2em; }\n#branch-banner-close { font-weight: 400; cursor: pointer; float: left; z-index: 2;padding: 0 5px 0 5px; margin-right: 0; }\n#branch-banner .content { width:100%; overflow: hidden; height: 76px; background: rgba(255, 255, 255, 0.95); color: #333; "+("top"===a.position?"border-bottom":"border-top")+': 1px solid #ddd; }\n#branch-banner-close { color: #000; font-size: 24px; top: 14px; opacity: .5; transition: opacity .3s ease; }\n#branch-banner-close:hover { opacity: 1; }\n#branch-banner .title { font-size: 18px; font-weight:bold; color: #555; }\n#branch-banner .description { font-size: 12px; font-weight: normal; color: #777; max-height: 30px; overflow: hidden; }\n#branch-banner .icon { float: left; padding-bottom: 40px; margin-right: 10px; margin-left: 5px; }\n#branch-banner .icon img { width: 63px; height: 63px; margin-right: 0; }\n#branch-banner .reviews { font-size:13px; margin: 1px 0 3px 0; color: #777; }\n#branch-banner .reviews .star { display:inline-block; position: relative; margin-right:0; }\n#branch-banner .reviews .star span { display: inline-block; margin-right: 0; color: #555; position: absolute; top: 0; left: 0; }\n#branch-banner .reviews .review-count { font-size:10px; }\n#branch-banner .reviews .star .half { width: 50%; overflow: hidden; display: block; }\n#branch-banner .content .left { padding: 6px 5px 6px 5px; }\n#branch-banner .vertically-align-middle { top: 50%; transform: translateY(-50%); -webkit-transform: translateY(-50%); -ms-transform: translateY(-50%); }\n#branch-banner .details > * { display: block; }\n#branch-banner .content .left { height: 63px; }\n#branch-banner .content .right { float: right; height: 63px; margin-bottom: 50px; padding-top: 22px; z-index: 1; }\n#branch-banner .right > div { float: left; }\n#branch-banner-action { top: 17px; }\n#branch-banner .content:after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 1px; background: rgba(0, 0, 0, 0.2); }\n#branch-banner .theme-dark.content { background: rgba(51, 51, 51, 0.95); }\n#branch-banner .theme-dark #branch-banner-close{ color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .15); }\n#branch-banner .theme-dark .details { text-shadow: 0 1px 1px rgba(0, 0, 0, .15); }\n#branch-banner .theme-dark .title { color: #fff; }\n#branch-banner .theme-dark .description { color: #fff; }\n#branch-banner .theme-dark .reviews { color: #888; }\n#branch-banner .theme-dark .reviews .star span{ color: #fff; }\n#branch-banner .theme-dark .reviews .review-count{ color: #fff; }\n', -d=E();"ios"!==d&&"ipad"!==d||!a.Y?"android"===d&&a.U?c+="#branch-banner { position: absolute; }\n#branch-banner .content .left .details .title { font-size: 12px; }\n#branch-mobile-action { white-space: nowrap; }\n#branch-banner .content .left .details .description { font-size: 11px; font-weight: normal; }\n@media only screen and (min-device-width: 320px) and (max-device-width: 350px) { #branch-banner .content .right { max-width: 120px; } }\n@media only screen and (min-device-width: 351px) and (max-device-width: 400px) and (orientation: landscape) { #branch-banner .content .right { max-width: 150px; } }\n@media only screen and (min-device-width: 401px) and (max-device-width: 480px) and (orientation: landscape) { #branch-banner .content .right { max-width: 180px; } }\n#branch-banner #branch-banner-close,#branch-banner .theme-dark #branch-banner-close { height:17px; width: 17px; text-align: center; font-size: 15px; top: 24px; border-radius:14px; border:0; line-height:14px; color:#b1b1b3; background:#efefef; padding: 0; opacity: 1; }\n#branch-banner .button { top: 0; text-decoration:none; border-bottom: 3px solid #A4C639; padding: 0 10px; height: 24px; line-height: 24px; text-align: center; color: #fff; margin-top: 2px; font-weight: bold; background-color: #A4C639; border-radius: 5px; }\n#branch-banner .button:hover { border-bottom:3px solid #8c9c29; background-color: #c1d739; }\n": -"blackberry"===d&&a.V?c+="#branch-banner { position: absolute; }\n#branch-banner .content .left .details .title { font-size: 12px; }\n#branch-mobile-action { white-space: nowrap; }\n#branch-banner .content .left .details .description { font-size: 11px; font-weight: normal; }\n@media only screen and (min-device-width: 320px) and (max-device-width: 350px) { #branch-banner .content .right { max-width: 120px; } }\n@media only screen and (min-device-width: 351px) and (max-device-width: 400px) and (orientation: landscape) { #branch-banner .content .right { max-width: 150px; } }\n@media only screen and (min-device-width: 401px) and (max-device-width: 480px) and (orientation: landscape) { #branch-banner .content .right { max-width: 180px; } }\n": -"windows_phone"===d&&a.X?c+="#branch-banner { position: absolute; }\n#branch-banner .content .left .details .title { font-size: 12px; }\n#branch-mobile-action { white-space: nowrap; }\n#branch-banner .content .left .details .description { font-size: 11px; font-weight: normal; }\n@media only screen and (min-device-width: 320px) and (max-device-width: 350px) { #branch-banner .content .right { max-width: 120px; } }\n@media only screen and (min-device-width: 351px) and (max-device-width: 400px) and (orientation: landscape) { #branch-banner .content .right { max-width: 150px; } }\n@media only screen and (min-device-width: 401px) and (max-device-width: 480px) and (orientation: landscape) { #branch-banner .content .right { max-width: 180px; } }\n": -"kindle"===d&&a.W&&(c+="#branch-banner { position: absolute; }\n#branch-banner .content .left .details .title { font-size: 12px; }\n#branch-mobile-action { white-space: nowrap; }\n#branch-banner .content .left .details .description { font-size: 11px; font-weight: normal; }\n@media only screen and (min-device-width: 320px) and (max-device-width: 350px) { #branch-banner .content .right { max-width: 120px; } }\n@media only screen and (min-device-width: 351px) and (max-device-width: 400px) and (orientation: landscape) { #branch-banner .content .right { max-width: 150px; } }\n@media only screen and (min-device-width: 401px) and (max-device-width: 480px) and (orientation: landscape) { #branch-banner .content .right { max-width: 180px; } }\n"): +d=E();"ios"!==d&&"ipad"!==d||!a.Z?"android"===d&&a.V?c+="#branch-banner { position: absolute; }\n#branch-banner .content .left .details .title { font-size: 12px; }\n#branch-mobile-action { white-space: nowrap; }\n#branch-banner .content .left .details .description { font-size: 11px; font-weight: normal; }\n@media only screen and (min-device-width: 320px) and (max-device-width: 350px) { #branch-banner .content .right { max-width: 120px; } }\n@media only screen and (min-device-width: 351px) and (max-device-width: 400px) and (orientation: landscape) { #branch-banner .content .right { max-width: 150px; } }\n@media only screen and (min-device-width: 401px) and (max-device-width: 480px) and (orientation: landscape) { #branch-banner .content .right { max-width: 180px; } }\n#branch-banner #branch-banner-close,#branch-banner .theme-dark #branch-banner-close { height:17px; width: 17px; text-align: center; font-size: 15px; top: 24px; border-radius:14px; border:0; line-height:14px; color:#b1b1b3; background:#efefef; padding: 0; opacity: 1; }\n#branch-banner .button { top: 0; text-decoration:none; border-bottom: 3px solid #A4C639; padding: 0 10px; height: 24px; line-height: 24px; text-align: center; color: #fff; margin-top: 2px; font-weight: bold; background-color: #A4C639; border-radius: 5px; }\n#branch-banner .button:hover { border-bottom:3px solid #8c9c29; background-color: #c1d739; }\n": +"blackberry"===d&&a.W?c+="#branch-banner { position: absolute; }\n#branch-banner .content .left .details .title { font-size: 12px; }\n#branch-mobile-action { white-space: nowrap; }\n#branch-banner .content .left .details .description { font-size: 11px; font-weight: normal; }\n@media only screen and (min-device-width: 320px) and (max-device-width: 350px) { #branch-banner .content .right { max-width: 120px; } }\n@media only screen and (min-device-width: 351px) and (max-device-width: 400px) and (orientation: landscape) { #branch-banner .content .right { max-width: 150px; } }\n@media only screen and (min-device-width: 401px) and (max-device-width: 480px) and (orientation: landscape) { #branch-banner .content .right { max-width: 180px; } }\n": +"windows_phone"===d&&a.Y?c+="#branch-banner { position: absolute; }\n#branch-banner .content .left .details .title { font-size: 12px; }\n#branch-mobile-action { white-space: nowrap; }\n#branch-banner .content .left .details .description { font-size: 11px; font-weight: normal; }\n@media only screen and (min-device-width: 320px) and (max-device-width: 350px) { #branch-banner .content .right { max-width: 120px; } }\n@media only screen and (min-device-width: 351px) and (max-device-width: 400px) and (orientation: landscape) { #branch-banner .content .right { max-width: 150px; } }\n@media only screen and (min-device-width: 401px) and (max-device-width: 480px) and (orientation: landscape) { #branch-banner .content .right { max-width: 180px; } }\n": +"kindle"===d&&a.X&&(c+="#branch-banner { position: absolute; }\n#branch-banner .content .left .details .title { font-size: 12px; }\n#branch-mobile-action { white-space: nowrap; }\n#branch-banner .content .left .details .description { font-size: 11px; font-weight: normal; }\n@media only screen and (min-device-width: 320px) and (max-device-width: 350px) { #branch-banner .content .right { max-width: 120px; } }\n@media only screen and (min-device-width: 351px) and (max-device-width: 400px) and (orientation: landscape) { #branch-banner .content .right { max-width: 150px; } }\n@media only screen and (min-device-width: 401px) and (max-device-width: 480px) and (orientation: landscape) { #branch-banner .content .right { max-width: 180px; } }\n"): c+="#branch-banner { position: absolute; }\n#branch-banner .content .left .details .title { font-size: 12px; }\n#branch-mobile-action { white-space: nowrap; }\n#branch-banner .content .left .details .description { font-size: 11px; font-weight: normal; }\n@media only screen and (min-device-width: 320px) and (max-device-width: 350px) { #branch-banner .content .right { max-width: 120px; } }\n@media only screen and (min-device-width: 351px) and (max-device-width: 400px) and (orientation: landscape) { #branch-banner .content .right { max-width: 150px; } }\n@media only screen and (min-device-width: 401px) and (max-device-width: 480px) and (orientation: landscape) { #branch-banner .content .right { max-width: 180px; } }\n"; -c+=a.la;a.L&&(c+="body { margin: 0; }\n",d=document.createElement("style"),d.type="text/css",d.id="branch-iframe-css",I(d),d.innerHTML="body { -webkit-transition: all 0.375s ease; transition: all 00.375s ease; }\n#branch-banner-iframe { box-shadow: 0 0 5px rgba(0, 0, 0, .35); width: 1px; min-width:100%; left: 0; right: 0; border: 0; height: 76px; z-index: 99999; -webkit-transition: all 0.25s ease; transition: all 00.25s ease; }\n#branch-banner-iframe { position: "+(("top"!==a.position||a.pa?"fixed": -"absolute")+"; }\n"),(document.head||document.getElementsByTagName("head")[0]).appendChild(d));d=document.createElement("style");d.type="text/css";d.id="branch-css";d.innerHTML=c;I(d);c=a.L?b.contentWindow.document:document;(c=c.head||c.getElementsByTagName("head")[0])&&"function"===typeof c.appendChild&&c.appendChild(d);"top"===a.position?b.style.top="-76px":"bottom"===a.position&&(b.style.bottom="-76px")};function M(a,b){try{var c=r(a.get(b?"branch_session_first":"branch_session",b))||null;return Va(c)}catch(d){return null}}function Ea(a,b,c){c&&b.referring_link&&xa&&(b.referringLinkExpiry=(new Date).getTime()+sa);b=Ua(b);a.set("branch_session",h(b));c&&a.set("branch_session_first",h(b),!0)}function Wb(a,b){if(b){var c=M(a)||{};b=h(Ua(C(c,b)));a.set("branch_session",b)}} -function Yb(a,b,c){function d(f,m){return Ua(C(r(f),m,c))}var e=a.get("branch_session",!1)||{};a.set("branch_session",h(d(e,b)));e=a.get("branch_session_first",!0)||{};a.set("branch_session_first",h(d(e,b)),!0)};function Zb(a,b,c){var d=document.createElement("iframe");d.src="about:blank";d.style.overflow="hidden";d.scrolling="no";d.id="branch-banner-iframe";d.className="branch-animation";I(d);d.onload=function(){var e=E(),f=d.contentDocument||d.contentWindow.document;f.head=f.createElement("head");f.body=f.createElement("body");f.body.className="ios"===e||"ipad"===e?"branch-banner-ios":"android"===e?"branch-banner-android":"branch-banner-other";$b(a,b,f);c(d)};document.body.appendChild(d)} -function $b(a,b,c){c=c||document;var d=c.createElement("div");d.id="branch-banner";d.className="branch-animation";if(a.H||a.S){if(a.H){var e="";for(var f=0;5>f;f++)e+='\u2606', -a.H>f&&(e+=f+1>a.H&&a.H%1?'\u2605': -'\u2605 '),e+="";e=''+e+""}else e="";e='
'+e+(a.S?''+a.S+"":"")+"
"}else e= -"";d.innerHTML='
'+b+'
'+(a.ma?"":'
×
')+'
Application icon
'+a.title+"
"+e+'
'+a.description+"
";c.body.appendChild(d);return d} -function ac(a,b,c){b='");a.L?Zb(a,b,c):(a=$b(a,b,document),c(a))};function bc(a,b,c,d){function e(g,u){"function"===typeof g&&(u=g,g={});g=g||{};"top"===b.position?f.style.top="-76px":"bottom"===b.position&&(f.style.bottom="-76px");"number"===typeof b.P?d.set("hideBanner",Rb(b.P),!0):d.set("hideBanner",!0,!0);g.ca?("top"===b.position?document.body.style.marginTop=m:"bottom"===b.position&&(document.body.style.marginBottom=k),Qb("branch-banner-is-active"),L(f),L(document.getElementById("branch-css")),u()):(setTimeout(function(){L(f);L(document.getElementById("branch-css")); +c+=a.ma;a.M&&(c+="body { margin: 0; }\n",d=document.createElement("style"),d.type="text/css",d.id="branch-iframe-css",I(d),d.innerHTML="body { -webkit-transition: all 0.375s ease; transition: all 00.375s ease; }\n#branch-banner-iframe { box-shadow: 0 0 5px rgba(0, 0, 0, .35); width: 1px; min-width:100%; left: 0; right: 0; border: 0; height: 76px; z-index: 99999; -webkit-transition: all 0.25s ease; transition: all 00.25s ease; }\n#branch-banner-iframe { position: "+(("top"!==a.position||a.qa?"fixed": +"absolute")+"; }\n"),(document.head||document.getElementsByTagName("head")[0]).appendChild(d));d=document.createElement("style");d.type="text/css";d.id="branch-css";d.innerHTML=c;I(d);c=a.M?b.contentWindow.document:document;(c=c.head||c.getElementsByTagName("head")[0])&&"function"===typeof c.appendChild&&c.appendChild(d);"top"===a.position?b.style.top="-76px":"bottom"===a.position&&(b.style.bottom="-76px")};function M(a,b){try{var c=q(a.get(b?"branch_session_first":"branch_session",b))||null;return Va(c)}catch(d){return null}}function Ea(a,b,c){c&&b.referring_link&&xa&&(b.referringLinkExpiry=(new Date).getTime()+sa);b=Ua(b);a.set("branch_session",h(b));c&&a.set("branch_session_first",h(b),!0)}function Wb(a,b){if(b){var c=M(a)||{};b=h(Ua(C(c,b)));a.set("branch_session",b)}} +function Yb(a,b,c){function d(f,m){return Ua(C(q(f),m,c))}var e=a.get("branch_session",!1)||{};a.set("branch_session",h(d(e,b)));e=a.get("branch_session_first",!0)||{};a.set("branch_session_first",h(d(e,b)),!0)};function Zb(a,b,c){var d=document.createElement("iframe");d.src="about:blank";d.style.overflow="hidden";d.scrolling="no";d.id="branch-banner-iframe";d.className="branch-animation";I(d);d.onload=function(){var e=E(),f=d.contentDocument||d.contentWindow.document;f.head=f.createElement("head");f.body=f.createElement("body");f.body.className="ios"===e||"ipad"===e?"branch-banner-ios":"android"===e?"branch-banner-android":"branch-banner-other";$b(a,b,f);c(d)};document.body.appendChild(d)} +function $b(a,b,c){c=c||document;var d=c.createElement("div");d.id="branch-banner";d.className="branch-animation";if(a.I||a.T){if(a.I){var e="";for(var f=0;5>f;f++)e+='\u2606', +a.I>f&&(e+=f+1>a.I&&a.I%1?'\u2605': +'\u2605 '),e+="";e=''+e+""}else e="";e='
'+e+(a.T?''+a.T+"":"")+"
"}else e= +"";d.innerHTML='
'+b+'
'+(a.na?"":'
×
')+'
Application icon
'+a.title+"
"+e+'
'+a.description+"
";c.body.appendChild(d);return d} +function ac(a,b,c){b='");a.M?Zb(a,b,c):(a=$b(a,b,document),c(a))};function bc(a,b,c,d){function e(g,u){"function"===typeof g&&(u=g,g={});g=g||{};"top"===b.position?f.style.top="-76px":"bottom"===b.position&&(f.style.bottom="-76px");"number"===typeof b.R?d.set("hideBanner",Rb(b.R),!0):d.set("hideBanner",!0,!0);g.da?("top"===b.position?document.body.style.marginTop=m:"bottom"===b.position&&(document.body.style.marginBottom=k),Qb("branch-banner-is-active"),L(f),L(document.getElementById("branch-css")),u()):(setTimeout(function(){L(f);L(document.getElementById("branch-css")); u()},270),setTimeout(function(){"top"===b.position?document.body.style.marginTop=m:"bottom"===b.position&&(document.body.style.marginBottom=k);Qb("branch-banner-is-active")},20))}if(!Ub(d,b))return N(a,"willNotShowBanner"),null;N(a,"willShowBanner");var f,m=document.body.style.marginTop,k=document.body.style.marginBottom;ac(b,d,function(g){function u(){"top"===b.position?f.style.top="0":"bottom"===b.position&&(f.style.bottom="0");N(a,"didShowBanner")}f=g;Vb(b,f);c.channel=c.channel||"app banner"; -g=b.L?f.contentWindow.document:document;if(E()){b.open_app=b.ra;b.append_deeplink_path=b.ja;b.make_new_link=b.oa;b.deepview_type="banner";a.deepview(c,b);var l=g.getElementById("branch-mobile-action");l&&(l.onclick=function(q){q.preventDefault();a.deepviewCta()})}l=Sb("margin-top");var t=Sb("margin-bottom");Pb(document.body,"branch-banner-is-active");"top"===b.position?document.body.style.marginTop=Tb(l):"bottom"===b.position&&(document.body.style.marginBottom=Tb(t));if(l=g.getElementById("branch-banner-close"))l.onclick= -function(q){q.preventDefault();N(a,"willCloseBanner");e({},function(){N(a,"didCloseBanner")})};if(g=g.getElementById("branch-banner-modal-background"))g.onclick=function(q){q.preventDefault();N(a,"willCloseBanner");e({},function(){N(a,"didCloseBanner")})};b.ca?u():setTimeout(u,20)});return e};function cc(){function a(){if(b.length)b[0](function(){b.shift();a()})}var b=[];return function(c){b.push(c);1===b.length&&a()}};var dc={},O,ec,P,Q,fc,gc,hc=1;function ic(){O="top";ec="absolute";P="76px";fc=Q=!1}ic();var S=[],jc=!1,kc=window.innerHeight,lc=window.innerWidth;window.innerHeight((.|\s)*?)<\/script>/,qc=/ diff --git a/test/web-config.js b/test/web-config.js index 6e497ec3..fa38b4a2 100644 --- a/test/web-config.js +++ b/test/web-config.js @@ -6,4 +6,4 @@ goog.provide('config'); config.app_service_endpoint = 'https://app.link'; config.link_service_endpoint = 'https://bnc.lt'; config.api_endpoint = 'https://api.branch.io'; -config.version = '2.80.0'; +config.version = '2.81.0';