{"status":"OK","geo":"US","deviceDetected":1,"fiViewerId":"5b3d243bff8be46071f52a5836ab8b4f","pageViewUniqueId":1651574672908854,"datasource":"LIVE","options":{"cmp_enableintegration":true,"amp":{"initialMinSpacing":0.9,"initialMinSpacingUnits":"vp"},"cmp_enforce":false,"hb_analytics":true,"has_blocked_urls":true,"has_blocked_urls_slashend":"onlyNonSlashEnd","has_blocked_urls_withparams":"onlyWithParams","notHotDog":{"enabled":false,"selectors":[]},"siteLang":"en","campaignLimitations":{},"eventTracking":{"trackingDomains":[{"host":"cdn.firstimpression.io","type":"full"}],"trackScroll":1,"trackTimeOnPage":1,"probability":12,"cookiename":"fitracking"},"prependScript":"if( (new Date() - new Date(FI.options.builtOn)) \/ (1000*60*60) > 24 ) {\n    if(!window.fi_reloaded) { window.fi_reloaded=true;\n    \tfetch(\"https:\/\/\" + FI.options.ecdnDomain + \"\/fi_client.js\",  {cache: \"reload\"}).then(()=>{ \t\t\n    \t    clearTimeout(FI.g_clientManager.appendLoopTimeout);\n    \t\tvar body = document.getElementsByTagName(\"head\")[0];\n                newdiv = document.createElement(\"script\");\n    \t\t    newdiv.setAttribute(\"type\", \"text\/javascript\");\n    \t\t    newdiv.setAttribute(\"src\", \"https:\/\/\" + FI.options.ecdnDomain + \"\/fi_client.js\");    \n    \t    delete FI; delete fipb; delete fiQuery;\n    \t    body.appendChild(newdiv);\n    \t\tthrow (\"Cache problem!\");\n    \t});\n    \treturn;\n    }\n}\n\/*{trackingcode|cookiename:fitracking}*\/\n\nfiQuery(window).on('SPCReturned', function () {\n    FI.state.utils = fiUtils = {\n        getPlacementsPerCond: function (...cond) {\n            var count = 0;\n            return fiQuery.map(FI.g_clientManager.placementQueue, function ($placement) {\n                count = 0;\n                for (let i = 0; i < cond.length; i++) {\n                    if (fiUtils[cond[i].placement]($placement, cond[i].is)) count++;\n                }\n                if (count == cond.length) return [$placement];\n            });\n        },\n        enabledExtraOption: function ($placement, option) {\n            return (typeof $placement.options.extra != 'undefined' && typeof $placement.options.extra[option] != 'undefined' && (typeof $placement.options.extra[option].enabled != 'undefined' && $placement.options.extra[option].enabled || typeof $placement.options.extra[option].enabled == 'undefined'))\n                || (typeof $placement.options[option] != 'undefined' && (typeof $placement.options[option].enabled != 'undefined' && $placement.options[option].enabled || typeof $placement.options[option].enabled == 'undefined'));\n        },\n        enabledExtraValue: function ($placement, optionPathAndValueArr) {\n            let optionVal = optionPathAndValueArr.length - 1,\n                placementOption = typeof $placement.options.extra != 'undefined' ? $placement.options.extra : $placement.options,\n                optionNotFound = false;\n            for (var i = 0; i <= optionPathAndValueArr.length - 2; i++) {\n                if (typeof placementOption[optionPathAndValueArr[i]] != \"undefined\")\n                    placementOption = placementOption[optionPathAndValueArr[i]];\n                else {\n                    optionNotFound = true;\n                    break;\n                }\n            }\n            return !optionNotFound && placementOption == optionVal;\n        },\n        enabledOptionValue: function ($placement, optionPathAndValueArr) {\n            let optionVal = optionPathAndValueArr.length - 1,\n                placementOption = $placement.options,\n                optionNotFound = false;\n            for (var i = 0; i <= optionPathAndValueArr.length - 2; i++) {\n                if (typeof placementOption[optionPathAndValueArr[i]] != \"undefined\")\n                    placementOption = placementOption[optionPathAndValueArr[i]];\n                else {\n                    optionNotFound = true;\n                    break;\n                }\n            }\n            return !optionNotFound && placementOption == optionVal;\n        },\n        multiInstance: function ($placement) {\n            return $placement.options.totalRenderedInstancesLimitation > 1;\n        },\n        type: function ($placement, type) {\n            return $placement.type == type;\n        },\n        pageErrors: [],\n        getAllErrors: function (_module) {\n            let errors = [];\n            for (var i = 0; i < this.pageErrors.length; i++) {\n                if (typeof _module == \"undefined\" || this.pageErrors[i].module == _module) {\n                    this.console(this.pageErrors[i].message, \"Error\", this.pageErrors[i].module);\n                    errors.push(this.pageErrors[i]);\n                }\n            }\n            return errors;\n        },\n        console: function (message, type, _module, placementId, bannerId) {\n            FI.console.log(typeof message != \"undefined\" ? message : \"No message here.. This seems odd\",\n                typeof placementId != \"undefined\" ? placementId : '',\n                typeof bannerId != \"undefined\" ? bannerId : '',\n                typeof type != \"undefined\" ? type : 'Misc',\n                typeof _module != \"undefined\" ? _module : '')\n        },\n        pageError: function (message, _module, placement) {\n            this.pageErrors.push({ \"message\": message, \"module\": _module, \"placement\": placement });\n            this.console(message, \"Error\", _module);\n        },\n        getExtra: function ($placement) {\n            if (typeof $placement == \"object\" && typeof $placement.options != \"undefined\")\n                return typeof $placement.options.extra != \"undefined\" ? $placement.options.extra : $placement.options;\n            else if (typeof $placement == \"number\")\n                return typeof FI.g_clientManager.getPlacement($placement).options.extra != \"undefined\" ? $placement.options.extra : $placement.options;\n            else {\n                fiUtils.pageError(\"Invoking getExtra but providing ${$placement} which is not a number or an object\");\n                return { \"options\": { \"extra\": {} } }\n            }\n        },\n        getWebsiteMacro: function (macro) {\n            return macro.indexOf(\"{\") == -1 ? macro : null;\n        },\n        isLastInstance: function ($instance) {\n            return $instance.instanceId.split('_')[2] == $instance.placement.instances.length - 1;\n        },\n        getInstanceId: function ($instance) {\n            return $instance.instanceId.split(\"_\")[2];\n        },\n        isPlacementOptionEnabled: function ($instance, option) {\n            if (typeof $instance.placement.options.extra != \"undefined\")\n                return typeof $instance.placement.options.extra[option] != \"undefined\" && $instance.placement.options.extra[option][\"enabled\"];\n            return false;\n        },\n        appenndRecorderDiv: function (recorderClass) {\n            if (fiQuery(\"recorder\").length == 0) {\n                fiQuery('body').append(`<div class=recorder ${recorderClass}><\/div>`);\n            } else {\n                fiQuery(\"recorder\").addClass(`${recorderClass}`);\n            }\n        },\n        detectDeviceOrientation: function () {\n            return window.matchMedia(\"(orientation: portrait)\") ? \"portrait\" : \"landscape\";\n        },\n        getManupiliationStateByHighestValuePerPlacementType: function (arr, placementType) {\n            arr = arr.map((state, index, array) => {\n                if (typeof state != \"undefined\") return typeof fiUtils.fixed.manupiliateElementsPerPlacementType[placementType][state.name] != \"undefined\" ? state : '';\n            }).filter(elem => elem != \"\");\n\n            return arr.reduce(function (prev, current) {\n                if (typeof current != \"undefined\") return Math.abs(prev.value) > Math.abs(current.value) ? prev : current;\n                return Math.abs(prev.value);\n            });\n        },\n        setRecorder: function (update) {\n            if (fiQuery(\"div#fi_recorder\").length == 0) fiQuery('body').append('<div id=fi_recorder><\/div>');\n            if (typeof update != 'undefined') fiQuery(\"div#fi_recorder\").addClass(update);\n        },\n        getCreativeIndexByCID: function (creatives, targetCID) {\n            for (let i = 0; i < creatives.length; i++) { if (creatives[i].cid == targetCID) return i; }\n        },\n        fixed: {\n            ManipulationState: function (name, CSSKeyValuePair, selector) {\n                this.name = name;\n                \/\/ Selector not found, let's wait for it\n                if (fiQuery(selector).length == 0) {\n                    this.value = fiUtils.fixed.waitForSelector(selector, this, CSSKeyValuePair);\n                    this.selector = null;\n                    \/\/ We need to pull the value dynamically from the DOM\n                } else if (CSSKeyValuePair.property != null) {\n                    this.selector = selector;\n                    this.value = fiQuery(CSSKeyValuePair.value)[CSSKeyValuePair.property]();\n                    \/\/ Seems selector is found and value is static so let's just move on \n                } else {\n                    this.selector = selector;\n                    this.value = CSSKeyValuePair.value;\n                }\n                this.viewable = false;\n            },\n            placementsToManupiliate: [],\n            manupiliateElementsPerPlacementType: {\n                headerKick: {\n                    hide: function (value) {\n                        fiQuery('div#FIHeaderKickInner').css({ transform: `translateY(${value}px)` });\n                        fiQuery('div#FIHeaderKickAnchor').css({ transform: `translateY(${value}px)` });\n                        fiQuery(fiUtils.getWebsiteMacro(\"{{m:nav_on_scroll}}\")).css({ transform: `translateY(0px)` });\n                    },\n                    show: function (value) {\n                        fiQuery('div#FIHeaderKickInner').css({ transform: `translateY(0px)` });\n                        fiQuery('div#FIHeaderKickAnchor').css({ transform: `translateY(0px)` });\n                        fiQuery(fiUtils.getWebsiteMacro(\"{{m:nav_on_scroll}}\")).css({ transform: `translateY(${fiQuery('div#FIHeaderKickAnchor').height()}px)` });\n                    },\n                    close: function (value) {\n                        FI.console.log(`Resetting all manupiliations on other elements since placement was either closed or reached its end of the waterfall`, ``, ``, `fiUtils.fixed`);\n                    },\n                    navBarPush: function (valie) {\n                        fiQuery('div#FIHeaderKickInner').css({ transform: `translateY(0px)` });\n                        fiQuery('div#FIHeaderKickAnchor').css({ transform: `translateY(0px)` });\n                        fiQuery(fiUtils.getWebsiteMacro(\"{{m:nav_on_scroll}}\")).css({ transform: `translateY(${fiQuery('div#FIHeaderKickAnchor').height()}px)` });\n                    }\n                },\n                bottomsticky: {\n                    hide: function (value) {\n                        fiQuery('div#FIBottomStickyInner').css({ transform: `translateY(${-value}px)` });\n                    },\n                    show: function (value) {\n                        fiQuery('div#FIBottomStickyInner').css({ transform: `translateY(0px)` });\n                    },\n                    cookieNoticePush: function (value) {\n                        fiQuery('div#FIBottomStickyInner').css({ transform: `translateY(${-value}px)` });\n                    },\n                    bottomBarPush: function (value) {\n                        fiQuery('div#FIBottomStickyInner').css({ transform: `translateY(${-value}px)` });\n                    }\n                },\n                outerdocked: {\n                    hide: function (value) {\n                        fiQuery('div.fi-docked').css({ zIndex: `${value}` });\n                        fiQuery('div.FIOnDemandWrapper.fi-docked[style*=\"position: fixed;\"]:not([style*=\"overflow: hidden;\"]').css({ transform: `translateY(0px)` });\n                    },\n                    show: function (value) {\n                        fiQuery('div.fi-docked').css({ zIndex: 99998 });\n                        fiQuery('div.FIOnDemandWrapper.fi-docked[style*=\"position: fixed;\"]:not([style*=\"overflow: hidden;\"]').css({ transform: `translateY(${value}px)` });\n                    },\n                    navBarPush: function (value) {\n                        fiQuery('div.FIOnDemandWrapper.fi-docked[style*=\"position: fixed;\"]:not([style*=\"overflow: hidden;\"]').css({ zIndex: 99998 });\n                        fiQuery('div.FIOnDemandWrapper.fi-docked[style*=\"position: fixed;\"]:not([style*=\"overflow: hidden;\"]').css({ transform: `translateY(${value}px)` });\n                    }\n                },\n                docked: {\n                    hide: function (value) {\n                        fiQuery('div.fi-docked').css({ zIndex: `${value}` });\n                        fiQuery('div.FIOnDemandWrapper.fi-docked[style*=\"position: fixed;\"]:not([style*=\"overflow: hidden;\"]').css({ transform: `translateY(0px)` });\n                    },\n                    show: function (value) {\n                        fiQuery('div.fi-docked').css({ zIndex: 99998 });\n                        fiQuery('div.FIOnDemandWrapper.fi-docked[style*=\"position: fixed;\"]:not([style*=\"overflow: hidden;\"]').css({ transform: `translateY(${value}px)` });\n                    },\n                    navBarPush: function (value) {\n                        fiQuery('div.fi-docked').css({ zIndex: 99998 });\n                        fiQuery('div.FIOnDemandWrapper.fi-docked[style*=\"position: fixed;\"]:not([style*=\"overflow: hidden;\"]').css({ transform: `translateY(${value}px)` });\n                    }\n                },\n                hybridDocked: {\n                    initStaticStateFailSafeStyle: function () {\n                        fiQuery('body').append('<style id=\"fi-translateY-control\"> .fi-detachable-hybriddocked[style*=\"static\"] { transform: translateY(0px) !important; } <\/style>');\n                        return true;\n                    },\n                    hide: function (value) {\n                        if (fiQuery('#fi-translateY-control').length == 0) fiUtils.fixed.manupiliateElementsPerPlacementType.hybridDocked.initStaticStateFailSafeStyle();\n                        fiQuery('.fi-detachable-hybriddocked-stripe').css({ transform: `translateY(${value}px)`, transition: `all 0.1s` });\n                        fiQuery('.fi-detachable-hybriddocked.apd_docked').css({ transform: `translateY(${value}px)`, transition: `all 0.1s` });\n                    },\n                    navBarPush: function (value) {\n                        if (fiQuery('#fi-translateY-control').length == 0) fiUtils.fixed.manupiliateElementsPerPlacementType.hybridDocked.initStaticStateFailSafeStyle();\n                        fiQuery('.fi-detachable-hybriddocked-stripe').css({ transform: `translateY(${value}px)`, transition: `all 0.1s` });\n                        fiQuery('.fi-detachable-hybriddocked.apd_docked').css({ transform: `translateY(${value}px)`, transition: `all 0.1s` });\n                    },\n                    show: function (value) {\n                        if (fiQuery('#fi-translateY-control').length == 0) fiUtils.fixed.manupiliateElementsPerPlacementType.hybridDocked.initStaticStateFailSafeStyle();\n                        fiQuery('.fi-detachable-hybriddocked.apd_docked').css({ transform: `translateY(${value}px)`, transition: `all 0.1s` });\n                        fiQuery('.fi-detachable-hybriddocked-stripe').css({ transform: `translateY(${value}px)`, transition: `all 0.1s` });\n                    }\n                }\n            },\n            waitForSelector: function (selector, state, CSSKeyValuePair) {\n                FI.awaitFor(() => fiQuery(selector).length > 0)\n                    .then(() => {\n                        state.selector = selector;\n                        if (CSSKeyValuePair.property != null) state.value = fiQuery(CSSKeyValuePair.value)[CSSKeyValuePair.property]();\n                        else\n                            state.value = CSSKeyValuePair.value;\n                    });\n            },\n            observedManupilationArray: [],\n            trakcedManipulationStatesArray: [],\n            pushObservedManupilationArray: function (name, value, selector) {\n                if (fiUtils.getWebsiteMacro(selector) != null)\n                    fiUtils.fixed.observedManupilationArray.push(new fiUtils.fixed.ManipulationState(name, value, selector));\n            },\n            resetElementViewability: function (initManupilation) {\n                fiUtils.fixed.observedManupilationArray.forEach((element, index, arr) => {\n                    if (element.viewable && fiQuery(element.selector).length == 0) element.viewable = false;\n                });\n                for (var i = 0; i < fiUtils.fixed.trakcedManipulationStatesArray.length; i++) {\n                    if (!fiUtils.fixed.trakcedManipulationStatesArray[i].viewable) {\n                        fiUtils.fixed.trakcedManipulationStatesArray.splice(i, 1);\n                    }\n                }\n                if (fiUtils.fixed.trakcedManipulationStatesArray.length > 0) {\n                    fiUtils.fixed.manupilateThis(fiUtils.fixed.trakcedManipulationStatesArray, initManupilation);\n                }\n            },\n            isFixedState: function () {\n                return fiQuery('div.apd_docked').length > 0 || fiQuery('div#FIHeaderKickInner').length > 0 || fiQuery('div#FIBottomStickyInner').length > 0 || fiQuery('div.FIOnDemandWrapper > div.fi-docked').length > 0;\n            },\n            shouldWeManupiliate: function (arr, initManupilation) {\n                if (fiUtils.fixed.isFixedState()) {\n                    let changedObservedManupilationArray = arr.filter((element, index, array) => fiQuery(element.selector).length > 0 && !element.viewable ? element : '');\n                    if (changedObservedManupilationArray.length == 0 && fiUtils.fixed.trakcedManipulationStatesArray.length > 0) fiUtils.fixed.resetElementViewability(initManupilation);\n                    if (changedObservedManupilationArray.length > 0) {\n                        changedObservedManupilationArray.forEach((manupliationState) => fiUtils.fixed.trakcedManipulationStatesArray.push(manupliationState));\n                        for (var i = 0; i < changedObservedManupilationArray.length; i++) {\n                            for (var j = 0; j < fiUtils.fixed.observedManupilationArray.length; j++) {\n                                if (changedObservedManupilationArray[i].name == fiUtils.fixed.observedManupilationArray[j].name) {\n                                    fiUtils.fixed.observedManupilationArray[j].viewable = true;\n                                    FI.console.log(`${fiUtils.fixed.observedManupilationArray[j].name} is in view!`, ``, ``, `fiUtils.fixed`);\n                                    return true;\n                                }\n                            }\n                        }\n                    }\n                    return false;\n                }\n                return false;\n            },\n            manageManupiliations: function (arr, initManupilation) {\n                if (typeof initManupilation != \"function\") {\n                    FI.console.log(`ERROR: You provided an init manupilate but its not a function. This won't work`, ``, ``, `fiUtils.fixed`)\n                    return;\n                }\n                FI.awaitFor(() => fiUtils.fixed.shouldWeManupiliate(arr, initManupilation))\n                    .then(() => {\n                        fiUtils.fixed.manupilateThis(fiUtils.fixed.trakcedManipulationStatesArray, initManupilation);\n                        \/\/Re-init\n                        fiUtils.fixed.manageManupiliations(arr, initManupilation);\n                    });\n            },\n            manupilateThis(arr, initManupilation) {\n                fiUtils.fixed.placementsToManupiliate.forEach(($placement) => initManupilation(fiUtils.getManupiliationStateByHighestValuePerPlacementType(arr, $placement.type).value, $placement.type, fiUtils.getManupiliationStateByHighestValuePerPlacementType(arr, $placement.type).name));\n            }\n        },\n        getEnabledExtraOption: function ($placement, values, ...keysArr) {\n            let res = [];\n            if (Array.isArray(values) && typeof $placement.options.extra[values[j]] != \"undefined\" && typeof $placement.options.extra[values[j]][keysArr[i]] != \"undefined\") {\n                for (var i = 0; i < keysArr.length; i++) {\n                    for (var j = 0; j < values.length; j++) {\n                        res.push($placement.options.extra[values[j]][keysArr[i]]);\n                    }\n                }\n            }\n            if (res.length == keysArr.length) return res;\n\n            return null;\n        },\n        getOptions: function ($placement, ...options) {\n            return $placement.options[options];\n        },\n        getMoreEnabledExtraOptions: function (placementsArr, ...options) {\n            let placementsLength = 0;\n            options.forEach((option) => {\n                placementsLength += placementsArr.filter(($placement) => typeof $placement.options.extra[option] != \"undefined\" && $placement.options.extra[option].enabled).length\n            });\n            return placementsLength == options.length;\n        },\n        setPlacementOption: function ($placement, option, value) {\n            $placement.options[option] = value;\n        },\n        requireUtilFunctions: (module, ...functions) => functions.filter(func => typeof fiUtils[func] != 'function') > 0 ? fiUtils.console(`Your are missing some functions from the fiUtils in order to successfully use ${module} module`, `error`, module) : true,\n        getHBContainerIndex: (placementId) => FI.g_clientManager.placementQueue[placementId].creatives.findIndex(ele => ele.cid == -1),\n        getNoneHBCreativeIndexByCampaignId: (placementId, campaignId) => FI.g_clientManager.placementQueue[placementId].creatives.findIndex(creative => creative.cid == campaignId),\n        getHBCreativeInnerContainerIndexByCampainId: (placementId, campaignId) => FI.g_clientManager.placementQueue[placementId].creatives[fiUtils.getHBContainerIndex(placementId)].innerCreatives.findIndex(creative => creative.cid == campaignId),\n        getEventTypeFromEventObj: (e) => typeof e != \"undefined\" ? e.type : null,\n        removeBannerFromQueueByCampaignId: function (placementId, campaignId, isHB, e) {\n            if (fiUtils.getEventTypeFromEventObj(e) == 'SPCReturned') {\n                let noCreativeFoundLogMsg = `No matching creatives found for campaignId ${campaignId}! Maybe you forgot to set isHB? isHB value is ${isHB}`;\n\n                if (isHB && fiUtils.getHBContainerIndex(placementId) != -1) {\n                    FI.g_clientManager.placementQueue[placementId].creatives[fiUtils.getHBContainerIndex(placementId)].innerCreatives.splice(fiUtils.getHBCreativeInnerContainerIndexByCampainId(placementId, campaignId), 1);\n                    \/\/ if (FI.g_clientManager.placementQueue[placementId].creatives.length == 0)\n                    return;\n                } else if (fiUtils.getNoneHBCreativeIndexByCampaignId(placementId, campaignId) != -1) {\n                    FI.g_clientManager.placementQueue[placementId].creatives.splice(fiUtils.getNoneHBCreativeIndexByCampaignId(placementId, campaignId), 1);\n                    return;\n                }\n                fiUtils.console(noCreativeFoundLogMsg, `Warning`, `demandCapping`, placementId);\n                return;\n            } else\n                return fiUtils.console(`You either didn't specify the event or you called this method from another event which isn't SPCReturned. event found is ${typeof e != \"undefined\" ? e.type : e}`, `Error`, `demandCapping`, placementId);\n        },\n        removeCampaignFromQueueByCampaignId: (placementId, campaignId, isHB, e) => {\n            if (fiUtils.getEventTypeFromEventObj(e) == 'SPCReturned') {\n                let hbCreative = FI.g_clientManager.placementQueue[placementId].creatives[fiUtils.getHBContainerIndex(placementId)].innerCreatives[fiUtils.getHBCreativeInnerContainerIndexByCampainId(placementId, campaignId)];\n                if (isHB && typeof hbCreative != \"undefined\") return;\n                if ((isHB && hbCreative.cid != -1) || fiUtils.getNoneHBCreativeIndexByCampaignId(placementId, campaignId) != -1) {\n                    fiUtils.removeBannerFromQueueByCampaignId(placementId, campaignId, isHB, e);\n                    fiUtils.removeCampaignFromQueueByCampaignId(placementId, campaignId, isHB, e);\n                }\n                return;\n            } else\n                return fiUtils.console(`You either didn't specify the event or you called this method from another event which isn't SPCReturned. event found is ${typeof e != \"undefined\" ? e.type : e}`, `Error`, `demandCapping`, placementId);\n        },\n        getDaysDiff: (storageDate, currentDate) => {\n            if (storageDate != null && currentDate != null) {\n                var oneDay = 24 * 60 * 60 * 1000,\n                    firstDate = new Date(currentDate),\n                    secondDate = new Date(storageDate),\n                    diffDays = Math.round(Math.abs((firstDate - secondDate) \/ oneDay));\n\n                return diffDays;\n            }\n            return;\n        },\n        requiredExtraOptionProperties: (validationKeysArr, testedObject) => {\n            for (var key of validationKeysArr) {\n                if (!testedObject.hasOwnProperty(key)) return false;\n            }\n            return true;\n        },\n        isInstanceHadPassBackAfterSetVisible: ($instance, moduleName) => {\n            if (typeof FI.g_clientManager.trackingManager.history[$instance.instanceId].PassbackAfterSetVisible != \"undefined\") {\n                fiUtils.console(`PassbackAfterSetVisible received for placement ${$instance.placement.id} this will reset the counter!`, 'message', moduleName, $instance.placement.id);\n                return true;\n            }\n            return false;\n        },\n\t    batchedFor : (array, promiseLogic) => {\n\t        const sendBatch = (batchStart, batchEnd) => { \n\t            new Promise(resolve => {\n\t                for (var i = batchStart; i < batchEnd; i++) {\n\t                    promiseLogic(array, i, batchEnd);\n\t                }\n\t                resolve();\n\t            });\n\t        };\n\t        let length = array.length;\n\t        let batchEnd = 10;\n\t        for (let batchStart = 0, p = Promise.resolve(); batchStart < length; batchStart += 10) {\n\t            p = p.then(() => {\n\t                if (batchEnd + 10 > length) batchEnd = length;\n\t                sendBatch(batchStart, batchEnd);\n\t            })\n\t            .then(() => {\n\t                batchStart = batchEnd;\n\t            })\n\t            .then(() => {\n\t                batchEnd += 10;\n\t            });\n\t        }\n\t    },\n\t    typeExtention : {\n\t        inview: {\n\t            addInstance: ($placement, e) => {\n\t                $placement.stoppedSearch = false;\n\t                if (e.type == 'instanceSetVisibleComplete') $placement.options.placementLimitation++;\n\t                $placement.instances.forEach(instance => {\n\t                    if (! instance.demandFound && ! instance.hidden) instance.setStatus(\"tryLaterInit\");\n\t                });\n\t            }\n\t        }\n\t    },\n\t    getPropertyValueByModule: ($placement, moduleName, property, type, defaultValue = null, required = false) => {\n\t        if (typeof type == 'undefined') fiUtils.pageError('You are requesting a config without a type, this is not allowed', moduleName);\n\t        const res = fiUtils.getExtra($placement)[moduleName][property];\n\t        if (typeof res == 'undefined' && required) fiUtils.pageError(`You've failed to provide the required config ${property}, the module will not run or lead to unexpected resutls`, moduleName);\n\t        if (typeof res != 'undefined' && typeof res != type) fiUtils.pageError(`You've provided ${property} in the type ${typeof property} but it was expected to be ${type}`, moduleName);\n\t        return typeof res != 'undefined' ? res : defaultValue; \n\t    },\n\t    getPlacementConfigByModule: ($placement, moduleName, propertiesObjects) => {\n\t        let config = {};\n\t        for (let propertiesObject of propertiesObjects) {\n\t            config[propertiesObject.prop] = fiUtils.getPropertyValueByModule($placement, moduleName, propertiesObject.prop, propertiesObject.type, propertiesObject.default, propertiesObject.required);\n\t        }\n\t        return config;\n\t    },\n\t    filterElementsInArr : (arr, condition) => {\n\t        return arr.filter((element) => {\n\t            return fiQuery(element.element).filter(condition).length > 0\n\t        })\n\t    },\n        setPlacementRenderLimit : ($placement, limit) => {\n            $placement.options.placementLimitation = limit;\n        }\n    };\n\n\tif (localStorage.apdAdmin == 1) {\n\t    Object.keys(fiUtils).forEach((utilFunc) => {\n\t        if (typeof fiUtils[utilFunc] == \"function\" && utilFunc.indexOf(\"error\") == -1 && FI.options.prependScript.indexOf(`${utilFunc}(`) == -1)\n\t            fiUtils.pageErrors.push({ \"message\": `The fiUtils function ${utilFunc} seems not to be in use in the website prepend`, \"module\": `fiUtils` });\n\t    });\n\t}\n});\nfiQuery(window).on('SPCReturned', function() {\n   \/\/ extract the in content static placements from sequence\n   FI.state.inContentInlinesArray = [];\n   FI.state.inContentInlinesArray = fiUtils.getPlacementsPerCond({placement: \"enabledExtraOption\", is: \"inContentInline\"})\n\n   if (FI.state.inContentInlinesArray.length == 0) {\n        \/\/ This means there are no incontent inlines and the In-view can start running right away\n        FI.state.inContentInlinesAreResolved = true;\n   } else {\n        \/\/ This means we actually need these in content inlines to resolve before the In-view runs \n        fiQuery(window).on('instanceSetVisibleComplete', function(e,$instance) {\n            if (fiUtils.getExtra($instance.placement).inContentInline == true) {\n                FI.state.inContentInlinesAreResolved = true;\n            }\n        });\n        fiQuery(window).on('proceededToNextInSequence', function(e, $placement, lastInSeq) {\n            if (fiUtils.getExtra($placement).inContentInline == true && lastInSeq) {\n                FI.state.inContentInlinesAreResolved = true;\n            }\n        });\n   }\n});\n\nfiQuery(window).on('instanceSetVisibleComplete', function(e, $instance) {\n    let isSafeFrameInstance = function() {\n        return fiQuery(`div#FIOnDemandWrapper_${$instance.instanceId} iframe#safeFrame${$instance.instanceId}`).length > 0;\n    }(),\n    HTMLComment,\n    isGPT = function() {\n        if (!isSafeFrameInstance)\n            return fiQuery(`div#FIOnDemandWrapper_${$instance.instanceId}:commentContains(GPT)`).length > 0;\n        if (fiQuery(fiQuery(`div#FIOnDemandWrapper_${$instance.instanceId} iframe`)[0].contentDocument.getElementById(\"resizeWrapper\")).length)\n            HTMLComment = fiQuery(fiQuery(`div#FIOnDemandWrapper_${$instance.instanceId} iframe`)[0].contentDocument.getElementById(\"resizeWrapper\")).contents().filter(function() { return this.nodeType == 8 });\n        return typeof HTMLComment[0] == 'undefined' ? false :  HTMLComment[0].nodeValue.indexOf('GPT') != -1;\n    }(),\n    gptAdSafeFrameContainer = isGPT && isSafeFrameInstance ? fiQuery(fiQuery(`div#FIOnDemandWrapper_${$instance.instanceId} iframe`)[0].contentDocument.getElementById(\"resizeWrapper\")).length && fiQuery(fiQuery(`div#FIOnDemandWrapper_${$instance.instanceId} iframe`)[0].contentDocument.getElementById(\"resizeWrapper\")).contents().filter(function() {\n        return this.id && this.id.indexOf('gpt')\n    }) : null\n      , expctedSafeFrameHeight = gptAdSafeFrameContainer != null ? gptAdSafeFrameContainer[0].clientHeight : null\n      , expctedSafeFrameWidth = gptAdSafeFrameContainer != null ? gptAdSafeFrameContainer[0].clientWidth : null;\n    if (isGPT)\n        fiQuery(`div#FIOnDemandWrapper_${$instance.instanceId}`).append(`<style class=\"gpt-flexible-size-adjustment_${$instance.instanceId}\">div#FIOnDemandWrapper_${$instance.instanceId} { overflow: hidden; display: flex !important; width: auto !important; height: auto !important; } div#FIOnDemandWrapper_${$instance.instanceId} div.apd_static_banner { width: auto !important; height: auto !important; margin: auto !important; } ${(gptAdSafeFrameContainer != null ? `iframe#safeFrame${$instance.instanceId} { height : ${expctedSafeFrameHeight}px !important; width : ${expctedSafeFrameWidth}px !important; }` : ``)} <\/style>`);\n    else {\n        fiQuery(`.gpt-flexible-size-adjustment_${$instance.instanceId}`).remove();\n    }\n});\nfiQuery(window).on('SPCReturned', function() {\n    FI.state.slowSelectorsPlacementsArray = $FIslowSelectors = {\n        targetPlacements : fiUtils.getPlacementsPerCond({placement: \"enabledExtraOption\", is: \"slowSelector\"}),\n        slowSelectors : {}\n    }\n    Object.assign($FIslowSelectors, {\n        slowSelectorInterval: 3000,\n        slowSelectorTimeout: null,\n        findAllElements: function (slowSelectorPlacementId, slowSelectorPlacement, container) {\n            if (typeof fiUtils.getExtra(slowSelectorPlacement).slowSelector.selector != 'undefined') {\n                if (typeof fiUtils.getExtra(slowSelectorPlacement).slowSelector.markerClass != 'undefined') { \n                    let pipeSelectors = fiUtils.getExtra(slowSelectorPlacement).slowSelector.selector.split('|'),\n                        filter = typeof fiUtils.getExtra(slowSelectorPlacement).slowSelector.filter != 'undefined' ? fiUtils.getExtra(slowSelectorPlacement).slowSelector.filter : '*',\n                        elementsToMark;\n                        for (var i = 0; i < pipeSelectors.length; i++) {\n                            elementsToMark = fiQuery(pipeSelectors[i]).filter(filter);\n                            if (elementsToMark.length) break;\n                        }\n                        return elementsToMark;\n                } else {\n                    fiUtils.pageError(`You've specified a slow scroll selector but no marker class, placement ${slowSelectorPlacementId} will probably never render`, `slowSelector`);\n                }\n            } else {\n                fiUtils.pageError(`You didn't specify a slow scroll selector, placement ${slowSelectorPlacementId} will never render`, `slowSelector`);\n            }\n        },\n        markAllElements : function (slowSelectorPlacementId, slowSelectorPlacement, container) {\n            $FIslowSelectors.findAllElements(slowSelectorPlacementId, slowSelectorPlacement, container).addClass(fiUtils.getExtra(slowSelectorPlacement).slowSelector.markerClass);\n        }\n    });\n\n    \/\/init\n    if (fiUtils.getWebsiteMacro('div#players') != null) {      \n        fiQuery.each($FIslowSelectors.targetPlacements, function(slowSelectorPlacementId, slowSelectorPlacement) {\n            $FIslowSelectors.slowSelectorInterval = typeof fiUtils.getExtra(slowSelectorPlacement).slowSelector.customIntervalTimeout != \"undefined\" ? fiUtils.getExtra(slowSelectorPlacement).slowSelector.customIntervalTimeout : 3000;\n            $FIslowSelectors.slowSelectorTimeout = typeof fiUtils.getExtra(slowSelectorPlacement).slowSelector.maxSelectorCycles != \"undefined\" ? fiUtils.getExtra(slowSelectorPlacement).slowSelector.maxSelectorCycles : null;\n            FI.awaitFor(() => $FIslowSelectors.findAllElements(slowSelectorPlacementId, slowSelectorPlacement).length > 0, $FIslowSelectors.slowSelectorInterval, $FIslowSelectors.slowSelectorTimeout)\n               .then(() => $FIslowSelectors.markAllElements(slowSelectorPlacementId, slowSelectorPlacement));\n        });\n        fiQuery(window).on('instanceSetVisibleComplete instanceHidden', function(e, $instance) { \n            if (fiUtils.isLastInstance($instance) && fiUtils.isPlacementOptionEnabled($instance, \"slowSelector\") && fiUtils.isPlacementOptionEnabled($instance, \"infinityScroll\")) {\n                $instance.$element.parents('div#players').addClass(`fi-resolved_${$instance.placement.id}`);\n                FI.awaitFor(() => fiQuery(`div#players:not(.fi-resolved_${$instance.placement.id})`).length > 0, $FIslowSelectors.slowSelectorInterval, $FIslowSelectors.slowSelectorTimeout)\n                    .then(() => $FIslowSelectors.markAllElements($instance.placement.id, $instance.placement ,`div#players:not(.fi-resolved_${$instance.placement.id})`));\n            }\n        });\n    } else\n        fiUtils.pageError(`div#players is not defined! Please define it in the websites macros tabs`, `slowSelector`);\n});"},"sessionTracking":true,"GDPRApplies":false,"USnatApplies":true,"USstatesApplies":false,"cmp_enforce":false,"incognito":null,"placements":[{"id":110886,"width":336,"height":280,"event":"fi_onvisible","type":"inview","selectorType":"css","selector":"._{placement-id}","options":{"extra":{"template":113155,"pageLayouts":{"freeAgent":{"url":"","comments":"this page has no div.table-wizard","selector":"div.inner-rtl + div.divider:nextIs(:not(.inner_Add)):visible:gt(0)"},"Categories":{"urls":{"about":"https:\/\/www.eliteprospects.com\/about","team_page":"https:\/\/www.eliteprospects.com\/teams","leagueName":"https:\/\/www.eliteprospects.com\/league\/shl","photo_page":"https:\/\/www.eliteprospects.com\/photo","stats_page":"https:\/\/www.eliteprospects.com\/stats","draft_pages":"https:\/\/www.eliteprospects.com\/draft\/nhl-entry-draft","league_page":"https:\/\/www.eliteprospects.com\/leagues","nation_page":"https:\/\/www.eliteprospects.com\/nation\/australia"},"selector":"div.inner-rtl div.divider:visible:gt(1):not(:last):distanceFromElement(div.nation-inner.clearfix,300):distanceFromElement(div.inner-rtl iframe,300)"},"table_green_wizard":{"urls":{"homepage":"https:\/\/www.eliteprospects.com\/","draftCenter":"https:\/\/www.eliteprospects.com\/draft-center\/2020","player_page":"https:\/\/www.eliteprospects.com\/player\/9330\/jonathan-bernier","freeAgent_page":"https:\/\/www.eliteprospects.com\/free-agent-pool\/nhl","leagueName_page":"https:\/\/www.eliteprospects.com\/league\/shl","teamNumber_page":"https:\/\/www.eliteprospects.com\/team\/22668\/chinese-taipei"},"comments":"almost all pageLayouts have green buttons","selector":"div.inner-rtl > :not(.inner_Add) + div.divider:nextIs(:not(.inner_Add)):visible:not(div#roster)"}},"slowSelector":{"enabled":true,"selector":"div.inner-rtl div.divider:nextIs(:not(.inner_Add)):visible:not(:last),div.inner-rtl > :not(.inner_Add) + div.divider:nextIs(:not(.inner_Add)):visible:not(div#roster),div.inner-rtl + div.divider:nextIs(:not(.inner_Add)):visible,body.player div.col div.divider:nextIs(:not(.inner_Add)):visible:not(:last),div.expandable-table-wrapper > div.table-wizard","markerClass":"_{placement-id}"}},"animate":1,"outerClasses":null,"position_dom":"previousSibling","morestylesJSON":{"clear":"both"},"position_align":"center","visibilityTime":1500,"earlyStopSearch":false,"validationScript":"fiQuery('div.ep-header__user-controls a:contains(premium)').length > 0 || fiQuery('div.ep-header__user-controls a[title=\"Sign up\"]').length > 0","onDemandPlacement":{"timeoutAction":"show","passbackTimeout":1800,"countImpressionIfNoDemand":1,"waterfall":[{"bannerId":68647},{"bannerId":68648},{"bannerId":68650},{"bannerId":68653},{"bannerId":68655},{"bannerId":73470},{"bannerId":83719},{"bannerId":103176}]},"innerMorestylesJSON":[],"placementLimitation":1,"instanceValidationSelector":":distanceFromElement(div.inner-rtl  iframe,300,false)","validationSelectorCheckOnce":0,"totalRenderedInstancesLimitation":1},"creatives":[{"id":68647,"cid":15,"isHeaderBidding":1,"requestLimitation":1,"foreignid":68647,"width":336,"height":280,"timeoutAction":"show","passbackTimeout":1800,"countImpressionIfNoDemand":1,"safeFrame":1,"sandboxFrame":1,"contentType":"html","bannerContent":"<!-- Criteo HB tag v2.0 -->\n<prebid data-bidder='criteo'\n    data-params-pubsubid='publisherSubId=68647' data-params-pubid='pubid=112728' data-params-networkid='networkId=12418' >\n<\/prebid>","floorPrice":0.3},{"id":68648,"cid":18,"isHeaderBidding":1,"requestLimitation":1,"foreignid":"1395214_a12","width":336,"height":280,"timeoutAction":"show","passbackTimeout":1800,"countImpressionIfNoDemand":1,"safeFrame":1,"sandboxFrame":1,"contentType":"html","bannerContent":"<!-- Rubicon HB tag v 1.0 -->\n<prebid data-bidder='rubicon'\n   data-params-accountid='accountId=18438'\n   data-params-siteid='siteId=202928'\n   data-params-zoneid='zoneId=1395214'\n   data-params-inventory='{\"figroup\": [\"{function:('1395214_a12').split('_').pop()}\"]}'\n   data-params-floor='floor={floorprice}'>\n<\/prebid>","trackBiddingParams":1,"floorPrice":0.3},{"id":68650,"cid":16,"isHeaderBidding":1,"requestLimitation":1,"foreignid":2487934,"width":336,"height":280,"timeoutAction":"show","passbackTimeout":1800,"countImpressionIfNoDemand":1,"safeFrame":1,"sandboxFrame":1,"contentType":"html","bannerContent":"<!-- Pubmatic tag v1.0 -->\n<prebid data-bidder='pubmatic'\n    data-params-publisherId='publisherId=156888'\n    data-params-adSlot='adSlot=2487934@336x280'\n    data-params-kadfloor='kadfloor={floorprice}'>\n<\/prebid>","trackBiddingParams":1,"floorPrice":0.3},{"id":68653,"cid":11,"isHeaderBidding":1,"requestLimitation":1,"foreignid":540915130,"width":336,"height":280,"timeoutAction":"show","passbackTimeout":1800,"countImpressionIfNoDemand":1,"safeFrame":1,"sandboxFrame":1,"contentType":"html","bannerContent":"<!-- OpenX tag v1.0 -->\n<prebid data-bidder='openx'\n    data-params-unit='unit=540915130'\n    data-params-deldomain='delDomain=firstimpression-d.openx.net'\n    data-params-customfloor='customFloor={floorprice}'>\n<\/prebid>","trackBiddingParams":1,"floorPrice":0.3},{"id":68655,"cid":13,"isHeaderBidding":1,"requestLimitation":1,"foreignid":659569,"width":336,"height":280,"timeoutAction":"show","passbackTimeout":1800,"countImpressionIfNoDemand":1,"safeFrame":1,"sandboxFrame":1,"contentType":"html","bannerContent":"<!-- Sovrn HB tag v1.0 -->\n<prebid data-bidder='sovrn'\n    data-params-tagid='659569'\n    data-params-bidfloor='{floorprice}'\n><\/prebid>","trackBiddingParams":1,"floorPrice":0.3},{"id":73470,"cid":7,"isHeaderBidding":1,"requestLimitation":1,"foreignid":478013,"width":336,"height":280,"timeoutAction":"show","passbackTimeout":1800,"countImpressionIfNoDemand":1,"safeFrame":1,"sandboxFrame":1,"contentType":"html","bannerContent":"<!-- Index Exchange HB tag v 1.0 -->\n<prebid data-bidder='ix'\n   data-params-siteId='siteId=478013'\n   data-params-size='size=[336, 280]'\n>\n<\/prebid>","trackBiddingParams":1,"floorPrice":0.3},{"id":83719,"cid":44,"isHeaderBidding":1,"requestLimitation":1,"foreignid":"212948|83719|1598188617","width":336,"height":280,"timeoutAction":"show","passbackTimeout":1800,"countImpressionIfNoDemand":1,"sandboxFrame":1,"contentType":"html","bannerContent":"<!-- Unruly HB tag v 2.0 -->\n<prebid data-bidder='unruly'\n   data-params-siteid='siteId={{function:('212948|83719|1598188617').split('|')[0]}}'>\n<\/prebid>","trackBiddingParams":1,"floorPrice":0.3},{"id":103176,"cid":34,"isHeaderBidding":1,"requestLimitation":1,"foreignid":"\/15764254,21810243265\/platform\/6001\/(s:6001)_(z:110886)_(wf:16390)_(b:103176)","width":336,"height":280,"timeoutAction":"show","passbackTimeout":1800,"countImpressionIfNoDemand":1,"contentType":"html","bannerContent":"<!-- banner content will be created on client side -->","trackBiddingParams":1,"floorPrice":0.1,"isAuto":1,"mcm":21810243265}],"prepend":"<script domsafe>\n    \/\/ This runs on placemnet render to prevent the dvider line popping into view \n    fiQuery('div#FIOnDemandWrapper_{apd-id}').css('margin-top', '0');\n    fiQuery('div#FIOnDemandWrapper_{apd-id} div.apd_inview_banner').before('<div class=\"divider\"> <\/div>');\n<\/script>","append":""}],"messages":[{"type":"info","text":"Will serve you ALL LIVE placements (all enabled placements, that are not in QA and not hidden)"}],"utm":{"utm_source":"direct","utm_medium":"direct","utm_campaign":"","utm_content":"","utm_keyword":"","utm_ref":""}}