prebid-universal-creative 1.15.0 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.circleci/config.yml +44 -30
- package/.github/workflows/codeql.yml +98 -0
- package/.github/workflows/issue_tracker.yml +32 -16
- package/README.md +4 -2
- package/dist/amp.js +3 -3
- package/dist/banner.js +3 -3
- package/dist/caf7688498213fb0c19f.max.js +1046 -0
- package/dist/creative.js +3 -3
- package/dist/load-cookie-with-consent.html +1 -1
- package/dist/load-cookie.html +1 -1
- package/dist/mobile.js +3 -3
- package/dist/native-render.js +3 -3
- package/dist/native-trk.js +3 -3
- package/dist/native.js +3 -3
- package/dist/uid.js +2 -2
- package/dist/video.js +3 -3
- package/gulpfile.js +15 -31
- package/integ-test/fixtures/test.js +79 -0
- package/integ-test/pages/amp.html +80 -0
- package/integ-test/pages/banner.html +96 -0
- package/integ-test/pages/native_legacy.html +107 -0
- package/integ-test/spec/amp_spec.js +111 -0
- package/integ-test/spec/banner_spec.js +85 -0
- package/integ-test/spec/native_legacy_spec.js +213 -0
- package/karma.conf.maker.js +4 -6
- package/package.json +10 -16
- package/playwright.config.js +108 -0
- package/src/adHtmlRender.js +11 -0
- package/src/cookieSync.js +3 -0
- package/src/cookieSyncWithConsent.js +3 -0
- package/src/domHelper.js +25 -15
- package/src/dynamicRenderer.js +56 -0
- package/src/messaging.js +23 -2
- package/src/mobileAndAmpRender.js +17 -20
- package/src/nativeAssetManager.js +134 -80
- package/src/nativeORTBTrackerManager.js +3 -3
- package/src/nativeRenderManager.js +44 -72
- package/src/nativeTrackerManager.js +2 -2
- package/src/renderingManager.js +17 -18
- package/src/utils.js +0 -9
- package/test/helpers/mocks.js +1 -0
- package/test/spec/dynamicRenderer_spec.js +167 -0
- package/test/spec/messaging_spec.js +98 -3
- package/test/spec/mobileAndAmpRender_spec.js +53 -63
- package/test/spec/nativeAssetManager_spec.js +290 -93
- package/test/spec/nativeORTBTrackerManager_spec.js +3 -19
- package/test/spec/nativeRenderManager_spec.js +77 -56
- package/test/spec/renderingManager_spec.js +20 -6
- package/webpack.conf.js +0 -1
- package/.nvmrc +0 -1
- package/dist/creative.max.js +0 -3101
- package/src/postscribeRender.js +0 -8
- package/test/e2e/specs/hello_world_banner_non_sf.spec.js +0 -14
- package/test/e2e/specs/outstream_non_sf.spec.js +0 -14
- package/test/e2e/specs/outstream_sf.spec.js +0 -14
- package/wdio.conf.js +0 -50
package/.circleci/config.yml
CHANGED
@@ -3,48 +3,62 @@
|
|
3
3
|
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
|
4
4
|
#
|
5
5
|
version: 2
|
6
|
+
aliases:
|
7
|
+
- &environment
|
8
|
+
resource_class: xlarge
|
9
|
+
working_directory: ~/prebid-universal-creative
|
10
|
+
|
6
11
|
jobs:
|
7
|
-
|
12
|
+
unit-tests:
|
13
|
+
<<: *environment
|
8
14
|
docker:
|
9
|
-
|
10
|
-
- image: circleci/node:14.18.2-browsers
|
11
|
-
|
12
|
-
# Specify service dependencies here if necessary
|
13
|
-
# CircleCI maintains a library of pre-built images
|
14
|
-
# documented at https://circleci.com/docs/2.0/circleci-images/
|
15
|
-
# - image: circleci/mongo:3.4.4
|
16
|
-
|
17
|
-
working_directory: ~/prebid-universal-creative
|
15
|
+
- image: cimg/node:20.14.0-browsers
|
18
16
|
|
19
17
|
steps:
|
20
18
|
- checkout
|
21
|
-
|
22
|
-
# Download and cache dependencies
|
23
19
|
- restore_cache:
|
24
20
|
keys:
|
25
|
-
|
26
|
-
|
27
|
-
- v1-dependencies-
|
28
|
-
|
21
|
+
- v1-dependencies-unit-{{ checksum "package.json" }}
|
22
|
+
- v1-dependencies-unit
|
29
23
|
- run: npm install
|
30
|
-
|
31
24
|
- save_cache:
|
32
25
|
paths:
|
33
26
|
- node_modules
|
34
|
-
key: v1-dependencies-{{ checksum "package.json" }}
|
35
|
-
|
36
|
-
- run: sudo npm install -g gulp
|
37
|
-
# Download and run BrowserStack local
|
27
|
+
key: v1-dependencies-unit-{{ checksum "package.json" }}
|
38
28
|
- run:
|
39
|
-
name
|
40
|
-
command
|
41
|
-
# Download the browserstack binary file
|
42
|
-
wget "https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip"
|
43
|
-
# Unzip it
|
44
|
-
unzip BrowserStackLocal-linux-x64.zip
|
45
|
-
# Run the file with user's access key
|
46
|
-
./BrowserStackLocal ${BROWSERSTACK_ACCESS_KEY} &
|
47
|
-
# run tests!
|
29
|
+
name: Install gulp cli
|
30
|
+
command: sudo npm install -g gulp-cli
|
48
31
|
- run:
|
49
32
|
name: BrowserStack testing
|
50
33
|
command: gulp test --browserstack
|
34
|
+
|
35
|
+
integ-tests:
|
36
|
+
<<: *environment
|
37
|
+
docker:
|
38
|
+
- image: mcr.microsoft.com/playwright:v1.26.0-focal
|
39
|
+
steps:
|
40
|
+
- checkout
|
41
|
+
- restore_cache:
|
42
|
+
keys:
|
43
|
+
- v1-dependencies-integ-{{ checksum "package.json" }}
|
44
|
+
- v1-dependencies-iteg
|
45
|
+
- run: npm install
|
46
|
+
- save_cache:
|
47
|
+
paths:
|
48
|
+
- node_modules
|
49
|
+
key: v1-dependencies-integ-{{ checksum "package.json" }}
|
50
|
+
- run:
|
51
|
+
name: Build
|
52
|
+
command: npx gulp build
|
53
|
+
- run:
|
54
|
+
name: Install playwright browsers
|
55
|
+
command: npx playwright install --with-deps
|
56
|
+
- run:
|
57
|
+
name: Integ tests
|
58
|
+
command: npx playwright test
|
59
|
+
workflows:
|
60
|
+
version: 2
|
61
|
+
commit:
|
62
|
+
jobs:
|
63
|
+
- unit-tests
|
64
|
+
- integ-tests
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# For most projects, this workflow file will not need changing; you simply need
|
2
|
+
# to commit it to your repository.
|
3
|
+
#
|
4
|
+
# You may wish to alter this file to override the set of languages analyzed,
|
5
|
+
# or to provide custom queries or build logic.
|
6
|
+
#
|
7
|
+
# ******** NOTE ********
|
8
|
+
# We have attempted to detect the languages in your repository. Please check
|
9
|
+
# the `language` matrix defined below to confirm you have the correct set of
|
10
|
+
# supported CodeQL languages.
|
11
|
+
#
|
12
|
+
name: "CodeQL Advanced"
|
13
|
+
|
14
|
+
on:
|
15
|
+
push:
|
16
|
+
branches: [ "master" ]
|
17
|
+
pull_request:
|
18
|
+
branches: [ "master" ]
|
19
|
+
schedule:
|
20
|
+
- cron: '34 11 * * 6'
|
21
|
+
|
22
|
+
jobs:
|
23
|
+
analyze:
|
24
|
+
name: Analyze (${{ matrix.language }})
|
25
|
+
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
26
|
+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
27
|
+
# - https://gh.io/supported-runners-and-hardware-resources
|
28
|
+
# - https://gh.io/using-larger-runners (GitHub.com only)
|
29
|
+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
|
30
|
+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
31
|
+
permissions:
|
32
|
+
# required for all workflows
|
33
|
+
security-events: write
|
34
|
+
|
35
|
+
# required to fetch internal or private CodeQL packs
|
36
|
+
packages: read
|
37
|
+
|
38
|
+
# only required for workflows in private repositories
|
39
|
+
actions: read
|
40
|
+
contents: read
|
41
|
+
|
42
|
+
strategy:
|
43
|
+
fail-fast: false
|
44
|
+
matrix:
|
45
|
+
include:
|
46
|
+
- language: javascript-typescript
|
47
|
+
build-mode: none
|
48
|
+
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
|
49
|
+
# Use `c-cpp` to analyze code written in C, C++ or both
|
50
|
+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
|
51
|
+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
52
|
+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
|
53
|
+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
|
54
|
+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
|
55
|
+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
56
|
+
steps:
|
57
|
+
- name: Checkout repository
|
58
|
+
uses: actions/checkout@v4
|
59
|
+
|
60
|
+
# Add any setup steps before running the `github/codeql-action/init` action.
|
61
|
+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
|
62
|
+
# or others). This is typically only required for manual builds.
|
63
|
+
# - name: Setup runtime (example)
|
64
|
+
# uses: actions/setup-example@v1
|
65
|
+
|
66
|
+
# Initializes the CodeQL tools for scanning.
|
67
|
+
- name: Initialize CodeQL
|
68
|
+
uses: github/codeql-action/init@v3
|
69
|
+
with:
|
70
|
+
languages: ${{ matrix.language }}
|
71
|
+
build-mode: ${{ matrix.build-mode }}
|
72
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
73
|
+
# By default, queries listed here will override any specified in a config file.
|
74
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
75
|
+
|
76
|
+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
77
|
+
# queries: security-extended,security-and-quality
|
78
|
+
|
79
|
+
# If the analyze step fails for one of the languages you are analyzing with
|
80
|
+
# "We were unable to automatically build your code", modify the matrix above
|
81
|
+
# to set the build mode to "manual" for that language. Then modify this step
|
82
|
+
# to build your code.
|
83
|
+
# ℹ️ Command-line programs to run using the OS shell.
|
84
|
+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
85
|
+
- if: matrix.build-mode == 'manual'
|
86
|
+
shell: bash
|
87
|
+
run: |
|
88
|
+
echo 'If you are using a "manual" build mode for one or more of the' \
|
89
|
+
'languages you are analyzing, replace this with the commands to build' \
|
90
|
+
'your code, for example:'
|
91
|
+
echo ' make bootstrap'
|
92
|
+
echo ' make release'
|
93
|
+
exit 1
|
94
|
+
|
95
|
+
- name: Perform CodeQL Analysis
|
96
|
+
uses: github/codeql-action/analyze@v3
|
97
|
+
with:
|
98
|
+
category: "/language:${{matrix.language}}"
|
@@ -3,13 +3,17 @@ on:
|
|
3
3
|
issues:
|
4
4
|
types:
|
5
5
|
- opened
|
6
|
+
permissions:
|
7
|
+
contents: read
|
6
8
|
jobs:
|
7
9
|
track_issue:
|
10
|
+
permissions:
|
11
|
+
contents: none
|
8
12
|
runs-on: ubuntu-latest
|
9
13
|
steps:
|
10
14
|
- name: Generate token
|
11
15
|
id: generate_token
|
12
|
-
uses: tibdex/github-app-token@
|
16
|
+
uses: tibdex/github-app-token@021a2405c7f990db57f5eae5397423dcc554159c
|
13
17
|
with:
|
14
18
|
app_id: ${{ secrets.ISSUE_APP_ID }}
|
15
19
|
private_key: ${{ secrets.ISSUE_APP_PEM }}
|
@@ -24,21 +28,30 @@ jobs:
|
|
24
28
|
gh api graphql -f query='
|
25
29
|
query($org: String!, $number: Int!) {
|
26
30
|
organization(login: $org){
|
27
|
-
|
31
|
+
projectV2(number: $number) {
|
28
32
|
id
|
29
33
|
fields(first:100) {
|
30
34
|
nodes {
|
31
|
-
|
32
|
-
|
33
|
-
|
35
|
+
... on ProjectV2Field {
|
36
|
+
id
|
37
|
+
name
|
38
|
+
}
|
39
|
+
... on ProjectV2SingleSelectField {
|
40
|
+
id
|
41
|
+
name
|
42
|
+
options {
|
43
|
+
id
|
44
|
+
name
|
45
|
+
}
|
46
|
+
}
|
34
47
|
}
|
35
48
|
}
|
36
49
|
}
|
37
50
|
}
|
38
51
|
}' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json
|
39
52
|
|
40
|
-
echo 'PROJECT_ID='$(jq '.data.organization.
|
41
|
-
echo 'DATE_FIELD_ID='$(jq '.data.organization.
|
53
|
+
echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV
|
54
|
+
echo 'DATE_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name=="'"$DATE_FIELD"'") | .id' project_data.json) >> $GITHUB_ENV
|
42
55
|
|
43
56
|
- name: Add issue to project
|
44
57
|
env:
|
@@ -47,9 +60,9 @@ jobs:
|
|
47
60
|
run: |
|
48
61
|
gh api graphql -f query='
|
49
62
|
mutation($project:ID!, $issue:ID!) {
|
50
|
-
|
51
|
-
|
52
|
-
id
|
63
|
+
addProjectV2ItemById(input: {projectId: $project, contentId: $issue}) {
|
64
|
+
item {
|
65
|
+
id
|
53
66
|
content {
|
54
67
|
... on Issue {
|
55
68
|
createdAt
|
@@ -62,8 +75,9 @@ jobs:
|
|
62
75
|
}
|
63
76
|
}' -f project=$PROJECT_ID -f issue=$ISSUE_ID > issue_data.json
|
64
77
|
|
65
|
-
echo 'ITEM_ID='$(jq '.data.
|
66
|
-
echo 'ITEM_CREATION_DATE='$(jq '.data.
|
78
|
+
echo 'ITEM_ID='$(jq '.data.addProjectV2ItemById.item.id' issue_data.json) >> $GITHUB_ENV
|
79
|
+
echo 'ITEM_CREATION_DATE='$(jq '.data.addProjectV2ItemById.item.content.createdAt' issue_data.json | cut -c 2-11) >> $GITHUB_ENV
|
80
|
+
|
67
81
|
- name: Set fields
|
68
82
|
env:
|
69
83
|
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
|
@@ -73,15 +87,17 @@ jobs:
|
|
73
87
|
$project: ID!
|
74
88
|
$item: ID!
|
75
89
|
$date_field: ID!
|
76
|
-
$date_value:
|
90
|
+
$date_value: Date!
|
77
91
|
) {
|
78
|
-
set_creation_date:
|
92
|
+
set_creation_date: updateProjectV2ItemFieldValue(input: {
|
79
93
|
projectId: $project
|
80
94
|
itemId: $item
|
81
95
|
fieldId: $date_field
|
82
|
-
value:
|
96
|
+
value: {
|
97
|
+
date: $date_value
|
98
|
+
}
|
83
99
|
}) {
|
84
|
-
|
100
|
+
projectV2Item {
|
85
101
|
id
|
86
102
|
}
|
87
103
|
}
|
package/README.md
CHANGED
@@ -9,9 +9,9 @@ Prebid Universal Creative is a javascript api to render multiple formats. This f
|
|
9
9
|
|
10
10
|
## Usage
|
11
11
|
|
12
|
-
You can find a detailed explanations on the [Prebid Universal Creative](
|
12
|
+
You can find a detailed explanations on the [Prebid Universal Creative](https://docs.prebid.org/overview/prebid-universal-creative.html) and [AdOps - Add Creative](https://docs.prebid.org/adops/setting-up-prebid-with-the-appnexus-ad-server.html#step-3-add-creatives) pages.
|
13
13
|
|
14
|
-
> **important:** If you’re using the `Send All Bids` scenario (where every bidder has a separate order), the creative and targeting will be different from the example shown here. See [Send All Bids](
|
14
|
+
> **important:** If you’re using the `Send All Bids` scenario (where every bidder has a separate order), the creative and targeting will be different from the example shown here. See [Send All Bids](https://docs.prebid.org/adops/send-all-vs-top-price.html#send-all-bids) for details.
|
15
15
|
|
16
16
|
```html
|
17
17
|
<script src = "https://cdn.jsdelivr.net/npm/prebid-universal-creative@latest/dist/%%PATTERN:hb_format%%.js"></script>
|
@@ -23,6 +23,8 @@ You can find a detailed explanations on the [Prebid Universal Creative](http://p
|
|
23
23
|
ucTagData.hbPb = "%%PATTERN:hb_pb%%";
|
24
24
|
ucTagData.hbFormat = "%%PATTERN:hb_format%%";
|
25
25
|
ucTagData.adId = "%%PATTERN:hb_adid%%";
|
26
|
+
// if you're using GAM and want to track outbound clicks on native ads you can add this line
|
27
|
+
ucTagData.clickUrlUnesc = "%%CLICK_URL_UNESC%%";
|
26
28
|
ucTagData.requestAllAssets = true;
|
27
29
|
|
28
30
|
try {
|
package/dist/amp.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
/* prebid-universal-creative v1.
|
2
|
-
Updated :
|
3
|
-
!function(n){var r={};function o(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,o),e.l=!0,e.exports}o.m=n,o.c=r,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=1)}([function(t,e,n){"use strict";e.a=function(t,e){var n=document.createElement("iframe");return n.setAttribute("frameborder",0),n.setAttribute("scrolling","no"),n.setAttribute("marginheight",0),n.setAttribute("marginwidth",0),n.setAttribute("TOPMARGIN",0),n.setAttribute("LEFTMARGIN",0),n.setAttribute("allowtransparency","true"),n.setAttribute("width",e),n.setAttribute("height",t),n},e.b=function(t,e,n){var r;e=e||document,r=n?e.getElementsByTagName(n):e.getElementsByTagName("head");try{(r=r.length?r:e.getElementsByTagName("body")).length&&(r=r[0]).insertBefore(t,r.firstChild)}catch(t){}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2);window.ucTag=window.ucTag||{},window.ucTag.renderAd=function(t,e){Object(r.a)(e)}},function(t,e,n){"use strict";e.a=function(t){var e=Object(f.g)(t),n=e.cacheHost,r=e.cachePath,o=e.uuid,i=e.size,a=e.hbPb,s="Prebid_";if((o=o||"").substr(0,s.length)===s)!function(t){var e=window.localStorage.getItem(t);m(!0)(e)}(o),y(i);else{var c="".concat(function(t,e){var n=void 0===e||""===e?d:e;return"https://".concat(void 0===t||""===t?l:t).concat(n)}(n,r),"?uuid=").concat(o);y(i),Object(f.f)(c,m(Object(u.a)(e.env),a))}};var f=n(3),u=n(4),p=n(0),h=n(5),l="prebid.adnxs.com",d="/pbc/v1/cache";function y(t){if(t){var e=t.split("x").map(Number);!function(r,o){if(Object(u.b)(window)){var i=window.innerWidth,a=window.innerHeight;i===r&&a===o||(window.$sf.ext.register(r,o,function(t){var e=r-i,n=o-a;window.$sf.ext.expand({r:e,b:n,push:!0})}),window.parent.postMessage({sentinel:"amp",type:"embed-size",width:r,height:o},"*"))}}(e[0],e[1])}else console.log("Targeting key hb_size not found to resize creative")}function m(u,l){return function(t){var e=function(t){var e;try{e=JSON.parse(t)}catch(t){console.log("Error parsing response from cache host: ".concat(t))}return e}(t),n=e.price||l,r=Object(f.c)(e),o=e.width?e.width:e.w,i=e.height?e.height:e.h;if(e.wurl&&Object(f.h)(decodeURIComponent(e.wurl)),e.adm){if(e.adm=n?e.adm.replace("${AUCTION_PRICE}",n):e.adm.replace("${AUCTION_PRICE}",""),r+=u?g(e.adm,o,i):e.adm,e.nurl&&(r+=Object(f.a)(decodeURIComponent(e.nurl))),e.burl){var a=function(){Object(f.h)(e.burl)};if(u)Object(f.e)(window,"mraid.js",function(){!function(e){function n(t){0<t&&(mraid.removeEventListener("exposureChange",n),e())}function r(t){t&&(mraid.removeEventListener("viewableChange",r),e())}function o(){window.MRAID_ENV&&3<=parseFloat(window.MRAID_ENV.version)?mraid.addEventListener("exposureChange",n):window.MRAID_ENV&&parseFloat(window.MRAID_ENV.version)<3&&(mraid.isViewable()?e():mraid.addEventListener("viewableChange",r))}return!(!window.mraid||!window.MRAID_ENV)&&("loading"==mraid.getState()?mraid.addEventListener("ready",function t(){mraid.removeEventListener("ready",t),o()}):o(),!0)}(a)&&a()},a);else a()}Object(h.a)(r)}else if(e.nurl)if(u){r+=g(Object(f.e)(window,e.nurl).outerHTML,o,i),Object(h.a)(r)}else{var s=e.nurl,c=Object(f.b)(e);Object(p.b)(c,document,"body"),Object(f.i)(s,o,i)}}}function g(t,e,n){var r=Object(f.d)();return'<div id="'.concat(r,'" style="border-style: none; position: absolute; width:100%; height:100%;">\n <div id="').concat(r,'_inner" style="margin: 0 auto; width:').concat(e,"px; height:").concat(n,'px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);">').concat(t,"</div>\n </div>")}},function(t,e,n){"use strict";e.h=function(t,e){var n=new Image;e&&"function"==typeof e&&(n.addEventListener("load",e),n.addEventListener("error",e));n.src=t},e.a=function(t){if(!t)return"";var e=encodeURI(t);return'<div style="position:absolute;left:0px;top:0px;visibility:hidden;"><img src="'.concat(e,'"></div>')},e.i=function(t,e,n){var r=o.a(n,e);r.src=t,document.body.appendChild(r)},e.f=function(t,e){var n=new XMLHttpRequest;n.addEventListener("load",function(){e(n.responseText)}),n.open("GET",t),n.send()},e.d=function(){var n=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"===t?e:3&e|8).toString(16)})},e.e=function(t,e,n,r){var o=t.document,i=o.createElement("script");i.type="text/javascript",n&&"function"==typeof n&&(i.readyState?i.onreadystatechange=function(){"loaded"!==i.readyState&&"complete"!==i.readyState||(i.onreadystatechange=null,n())}:i.onload=function(){n()});r&&"function"==typeof r&&(i.onerror=function(){r()});i.src=e;var a=o.getElementsByTagName("head");(a=a.length?a:o.getElementsByTagName("body")).length&&(a=a[0]).insertBefore(i,a.firstChild);return i},e.b=r,e.c=function(t){var e=r(t),n=document.createElement("div");return n.appendChild(e),n.innerHTML},e.g=function(e){var n={hb_adid:"adId",hb_cache_host:"cacheHost",hb_cache_path:"cachePath",hb_cache_id:"uuid",hb_format:"mediaType",hb_env:"env",hb_size:"size",hb_pb:"hbPb"};function t(t){return!(!e[t]||!(function(t){return i(t,"Object")}(e[t])&&0<Object.keys(e[t]).length||a(e[t])&&""!==e[t]))}var r={},o={};t("targetingMap")?o=function(e){var n={};return Object.keys(e).forEach(function(t){Array.isArray(e[t])&&0<e[t].length&&(n[t]=e[t][0])}),n}(e.targetingMap):t("targetingKeywords")&&(o=function(t){var o={},e=t.split(",");return 0<e.length&&e.forEach(function(t){var e=t.split(":");if(2===e.length){var n=e[0],r=e[1];o[n]=r}}),o}(e.targetingKeywords));return function(e){Object.keys(e).forEach(function(t){r[n[t]||t]=e[t]})}(o),Object.keys(e).forEach(function(t){"targetingMap"!==t&&"targetingKeywords"!==t&&a(e[t])&&""!==e[t]&&(r[t]=e[t])}),r};var o=n(0);function r(t){return document.createComment("Creative ".concat(t.crid," served by Prebid.js Header Bidding"))}function i(t,e){return Object.prototype.toString.call(t)==="[object "+e+"]"}function a(t){return i(t,"String")}},function(t,e,n){"use strict";e.b=function(t){return!(!t.$sf||!t.$sf.ext)},e.a=function(t){return t&&"mobile-app"===t}},function(t,e,n){"use strict";e.a=function(t){o()(document.body,t,{error:console.error})};var r=n(6),o=n.n(r)},function(t,e,n){var r;r=function(){return o={},n.m=r=[function(t,e,n){"use strict";var r,o=n(1),i=(r=o)&&r.__esModule?r:{default:r};t.exports=i.default},function(t,e,n){"use strict";e.__esModule=!0;var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};e.default=d;var r,o=n(2),c=(r=o)&&r.__esModule?r:{default:r},i=function(t){{if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}}(n(4));function u(){}var a={afterAsync:u,afterDequeue:u,afterStreamStart:u,afterWrite:u,autoFix:!0,beforeEnqueue:u,beforeWriteToken:function(t){return t},beforeWrite:function(t){return t},done:u,error:function(t){throw new Error(t.msg)},releaseAsync:!1},l=0,f=[],p=null;function h(){var t=f.shift();if(t){var e=i.last(t);e.afterDequeue(),t.stream=function(t,e,r){(p=new c.default(t,r)).id=l++,p.name=r.name||p.id,d.streams[p.name]=p;var n=t.ownerDocument,o={close:n.close,open:n.open,write:n.write,writeln:n.writeln};function i(t){t=r.beforeWrite(t),p.write(t),r.afterWrite(t)}s(n,{close:u,open:u,write:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return i(e.join(""))},writeln:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return i(e.join("")+"\n")}});var a=p.win.onerror||u;return p.win.onerror=function(t,e,n){r.error({msg:t+" - "+e+": "+n}),a.apply(p.win,[t,e,n])},p.write(e,function(){s(n,o),p.win.onerror=a,r.done(),p=null,h()}),p}.apply(void 0,t),e.afterStreamStart()}}function d(t,e,n){if(i.isFunction(n))n={done:n};else if("clear"===n)return f=[],p=null,void(l=0);n=i.defaults(n,a);var r=[t=/^#/.test(t)?window.document.getElementById(t.substr(1)):t.jquery?t[0]:t,e,n];return t.postscribe={cancel:function(){r.stream?r.stream.abort():r[1]=u}},n.beforeEnqueue(r),f.push(r),p||h(),t.postscribe}s(d,{streams:{},queue:f,WriteStream:c.default})},function(t,e,n){"use strict";e.__esModule=!0;var r,s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o=n(3),i=(r=o)&&r.__esModule?r:{default:r},a=function(t){{if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}}(n(4));var l="data-ps-",f="ps-style",p="ps-script";function c(t,e){var n=l+e,r=t.getAttribute(n);return a.existy(r)?String(r):r}function u(t,e,n){var r=2<arguments.length&&void 0!==n?n:null,o=l+e;a.existy(r)&&""!==r?t.setAttribute(o,r):t.removeAttribute(o)}var h=(d.prototype.write=function(){var t;for((t=this.writeQueue).push.apply(t,arguments);!this.deferredRemote&&this.writeQueue.length;){var e=this.writeQueue.shift();a.isFunction(e)?this._callFunction(e):this._writeImpl(e)}},d.prototype._callFunction=function(t){var e={type:"function",value:t.name||t.toString()};this._onScriptStart(e),t.call(this.win,this.doc),this._onScriptDone(e)},d.prototype._writeImpl=function(t){this.parser.append(t);for(var e=void 0,n=void 0,r=void 0,o=[];(e=this.parser.readToken())&&!(n=a.isScript(e))&&!(r=a.isStyle(e));)(e=this.options.beforeWriteToken(e))&&o.push(e);0<o.length&&this._writeStaticTokens(o),n&&this._handleScriptToken(e),r&&this._handleStyleToken(e)},d.prototype._writeStaticTokens=function(t){var e=this._buildChunk(t);return e.actual?(e.html=this.proxyHistory+e.actual,this.proxyHistory+=e.proxy,this.proxyRoot.innerHTML=e.html,this._walkChunk(),e):null},d.prototype._buildChunk=function(t){for(var e=this.actuals.length,n=[],r=[],o=[],i=t.length,a=0;a<i;a++){var s=t[a],c=s.toString();if(n.push(c),s.attrs){if(!/^noscript$/i.test(s.tagName)){var u=e++;r.push(c.replace(/(\/?>)/," "+l+"id="+u+" $1")),s.attrs.id!==p&&s.attrs.id!==f&&o.push("atomicTag"===s.type?"":"<"+s.tagName+" "+l+"proxyof="+u+(s.unary?" />":">"))}}else r.push(c),o.push("endTag"===s.type?c:"")}return{tokens:t,raw:n.join(""),actual:r.join(""),proxy:o.join("")}},d.prototype._walkChunk=function(){for(var t=void 0,e=[this.proxyRoot];a.existy(t=e.shift());){var n=1===t.nodeType;if(!n||!c(t,"proxyof")){n&&u(this.actuals[c(t,"id")]=t,"id");var r=t.parentNode&&c(t.parentNode,"proxyof");r&&this.actuals[r].appendChild(t)}e.unshift.apply(e,a.toArray(t.childNodes))}},d.prototype._handleScriptToken=function(t){var e=this,n=this.parser.clear();n&&this.writeQueue.unshift(n),t.src=t.attrs.src||t.attrs.SRC,(t=this.options.beforeWriteToken(t))&&(t.src&&this.scriptStack.length?this.deferredRemote=t:this._onScriptStart(t),this._writeScriptToken(t,function(){e._onScriptDone(t)}))},d.prototype._handleStyleToken=function(t){var e=this.parser.clear();e&&this.writeQueue.unshift(e),t.type=t.attrs.type||t.attrs.TYPE||"text/css",(t=this.options.beforeWriteToken(t))&&this._writeStyleToken(t),e&&this.write()},d.prototype._writeStyleToken=function(t){var e=this._buildStyle(t);this._insertCursor(e,f),t.content&&(e.styleSheet&&!e.sheet?e.styleSheet.cssText=t.content:e.appendChild(this.doc.createTextNode(t.content)))},d.prototype._buildStyle=function(t){var n=this.doc.createElement(t.tagName);return n.setAttribute("type",t.type),a.eachKey(t.attrs,function(t,e){n.setAttribute(t,e)}),n},d.prototype._insertCursor=function(t,e){this._writeImpl('<span id="'+e+'"/>');var n=this.doc.getElementById(e);n&&n.parentNode.replaceChild(t,n)},d.prototype._onScriptStart=function(t){t.outerWrites=this.writeQueue,this.writeQueue=[],this.scriptStack.unshift(t)},d.prototype._onScriptDone=function(t){t===this.scriptStack[0]?(this.scriptStack.shift(),this.write.apply(this,t.outerWrites),!this.scriptStack.length&&this.deferredRemote&&(this._onScriptStart(this.deferredRemote),this.deferredRemote=null)):this.options.error({msg:"Bad script nesting or script finished twice"})},d.prototype._writeScriptToken=function(t,e){var n=this._buildScript(t),r=this._shouldRelease(n),o=this.options.afterAsync;t.src&&(n.src=t.src,this._scriptLoadHandler(n,r?o:function(){e(),o()}));try{this._insertCursor(n,p),n.src&&!r||e()}catch(t){this.options.error(t),e()}},d.prototype._buildScript=function(t){var n=this.doc.createElement(t.tagName);return a.eachKey(t.attrs,function(t,e){n.setAttribute(t,e)}),t.content&&(n.text=t.content),n},d.prototype._scriptLoadHandler=function(e,n){function r(){e=e.onload=e.onreadystatechange=e.onerror=null}var o=this.options.error;function t(){r(),null!=n&&n(),n=null}function i(t){r(),o(t),null!=n&&n(),n=null}function a(t,e){var n=t["on"+e];null!=n&&(t["_on"+e]=n)}a(e,"load"),a(e,"error"),s(e,{onload:function(){if(e._onload)try{e._onload.apply(this,Array.prototype.slice.call(arguments,0))}catch(t){i({msg:"onload handler failed "+t+" @ "+e.src})}t()},onerror:function(){if(e._onerror)try{e._onerror.apply(this,Array.prototype.slice.call(arguments,0))}catch(t){return void i({msg:"onerror handler failed "+t+" @ "+e.src})}i({msg:"remote script failed "+e.src})},onreadystatechange:function(){/^(loaded|complete)$/.test(e.readyState)&&t()}})},d.prototype._shouldRelease=function(t){return!/^script$/i.test(t.nodeName)||!!(this.options.releaseAsync&&t.src&&t.hasAttribute("async"))},d);function d(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),this.root=t,this.options=e,this.doc=t.ownerDocument,this.win=this.doc.defaultView||this.doc.parentWindow,this.parser=new i.default("",{autoFix:e.autoFix}),this.actuals=[t],this.proxyHistory="",this.proxyRoot=this.doc.createElement(t.nodeName),this.scriptStack=[],this.writeQueue=[],u(this.proxyRoot,"proxyof",0)}e.default=h},function(t,e,n){var r;r=function(){return o={},n.m=r=[function(t,e,n){"use strict";var r,o=n(1),i=(r=o)&&r.__esModule?r:{default:r};t.exports=i.default},function(t,e,n){"use strict";e.__esModule=!0;var r,a=u(n(2)),o=u(n(3)),i=n(6),s=(r=i)&&r.__esModule?r:{default:r},c=n(5);function u(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var l={comment:/^<!--/,endTag:/^<\//,atomicTag:/^<\s*(script|style|noscript|iframe|textarea)[\s\/>]/i,startTag:/^</,chars:/^[^<]/},f=(p.prototype.append=function(t){this.stream+=t},p.prototype.prepend=function(t){this.stream=t+this.stream},p.prototype._readTokenImpl=function(){var t=this._peekTokenImpl();if(t)return this.stream=this.stream.slice(t.length),t},p.prototype._peekTokenImpl=function(){for(var t in l)if(l.hasOwnProperty(t)&&l[t].test(this.stream)){var e=o[t](this.stream);if(e)return"startTag"===e.type&&/script|style/i.test(e.tagName)?null:(e.text=this.stream.substr(0,e.length),e)}},p.prototype.peekToken=function(){return this._peekToken()},p.prototype.readToken=function(){return this._readToken()},p.prototype.readTokens=function(t){for(var e=void 0;e=this.readToken();)if(t[e.type]&&!1===t[e.type](e))return},p.prototype.clear=function(){var t=this.stream;return this.stream="",t},p.prototype.rest=function(){return this.stream},p);function p(){var t=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,p),this.stream=e;var r=!1,o={};for(var i in a)a.hasOwnProperty(i)&&(n.autoFix&&(o[i+"Fix"]=!0),r=r||o[i+"Fix"]);r?(this._readToken=(0,s.default)(this,o,function(){return t._readTokenImpl()}),this._peekToken=(0,s.default)(this,o,function(){return t._peekTokenImpl()})):(this._readToken=this._readTokenImpl,this._peekToken=this._peekTokenImpl)}for(var h in(e.default=f).tokenToString=function(t){return t.toString()},f.escapeAttributes=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=(0,c.escapeQuotes)(t[n],null));return e},f.supports=a)a.hasOwnProperty(h)&&(f.browserHasFlaw=f.browserHasFlaw||!a[h]&&h)},function(t,e){"use strict";var n=!(e.__esModule=!0),r=!1,o=window.document.createElement("div");try{var i="<P><I></P></I>";o.innerHTML=i,e.tagSoup=n=o.innerHTML!==i}catch(t){e.tagSoup=n=!1}try{o.innerHTML="<P><i><P></P></i></P>",e.selfClose=r=2===o.childNodes.length}catch(t){e.selfClose=r=!1}o=null,e.tagSoup=n,e.selfClose=r},function(t,e,n){"use strict";e.__esModule=!0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.comment=function(t){var e=t.indexOf("--\x3e");if(0<=e)return new s.CommentToken(t.substr(4,e-1),e+3)},e.chars=function(t){var e=t.indexOf("<");return new s.CharsToken(0<=e?e:t.length)},e.startTag=o,e.atomicTag=function(t){var e=o(t);if(e){var n=t.slice(e.length);if(n.match(new RegExp("</\\s*"+e.tagName+"\\s*>","i"))){var r=n.match(new RegExp("([\\s\\S]*?)</\\s*"+e.tagName+"\\s*>","i"));if(r)return new s.AtomicTagToken(e.tagName,r[0].length+e.length,e.attrs,e.booleanAttrs,r[1])}}},e.endTag=function(t){var e=t.match(c.endTag);if(e)return new s.EndTagToken(e[1],e[0].length)};var s=n(4),c={startTag:/^<([\-A-Za-z0-9_]+)((?:\s+[\w\-]+(?:\s*=?\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,endTag:/^<\/([\-A-Za-z0-9_]+)[^>]*>/,attr:/(?:([\-A-Za-z0-9_]+)\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))|(?:([\-A-Za-z0-9_]+)(\s|$)+)/g,fillAttr:/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noresize|noshade|nowrap|readonly|selected)$/i};function o(t){var n,r,o;if(-1!==t.indexOf(">")){var e=t.match(c.startTag);if(e){var i=(n={},r={},o=e[2],e[2].replace(c.attr,function(t,e){arguments[2]||arguments[3]||arguments[4]||arguments[5]?arguments[5]?(n[arguments[5]]="",r[arguments[5]]=!0):n[e]=arguments[2]||arguments[3]||arguments[4]||c.fillAttr.test(e)&&e||"":n[e]="",o=o.replace(t,"")}),{v:new s.StartTagToken(e[1],e[0].length,n,r,!!e[3],o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))});if("object"===(void 0===i?"undefined":a(i)))return i.v}}}},function(t,e,n){"use strict";e.__esModule=!0,e.EndTagToken=e.AtomicTagToken=e.StartTagToken=e.TagToken=e.CharsToken=e.CommentToken=e.Token=void 0;var a=n(5);function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.Token=function t(e,n){s(this,t),this.type=e,this.length=n,this.text=""},e.CommentToken=(r.prototype.toString=function(){return"\x3c!--"+this.content},r);function r(t,e){s(this,r),this.type="comment",this.length=e||(t?t.length:0),this.text="",this.content=t}e.CharsToken=(o.prototype.toString=function(){return this.text},o);function o(t){s(this,o),this.type="chars",this.length=t,this.text=""}var i=e.TagToken=(c.formatTag=function(t,e){var n=1<arguments.length&&void 0!==e?e:null,r="<"+t.tagName;for(var o in t.attrs)if(t.attrs.hasOwnProperty(o)){r+=" "+o;var i=t.attrs[o];void 0!==t.booleanAttrs&&void 0!==t.booleanAttrs[o]||(r+='="'+(0,a.escapeQuotes)(i)+'"')}return t.rest&&(r+=" "+t.rest),t.unary&&!t.html5Unary?r+="/>":r+=">",null!=n&&(r+=n+"</"+t.tagName+">"),r},c);function c(t,e,n,r,o){s(this,c),this.type=t,this.length=n,this.text="",this.tagName=e,this.attrs=r,this.booleanAttrs=o,this.unary=!1,this.html5Unary=!1}e.StartTagToken=(u.prototype.toString=function(){return i.formatTag(this)},u);function u(t,e,n,r,o,i){s(this,u),this.type="startTag",this.length=e,this.text="",this.tagName=t,this.attrs=n,this.booleanAttrs=r,this.html5Unary=!1,this.unary=o,this.rest=i}e.AtomicTagToken=(l.prototype.toString=function(){return i.formatTag(this,this.content)},l);function l(t,e,n,r,o){s(this,l),this.type="atomicTag",this.length=e,this.text="",this.tagName=t,this.attrs=n,this.booleanAttrs=r,this.unary=!1,this.html5Unary=!1,this.content=o}e.EndTagToken=(f.prototype.toString=function(){return"</"+this.tagName+">"},f);function f(t,e){s(this,f),this.type="endTag",this.length=e,this.text="",this.tagName=t}},function(t,e){"use strict";e.__esModule=!0,e.escapeQuotes=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";return t?t.replace(/([^"]*)"/g,function(t,e){return/\\/.test(e)?e+'"':e+'\\"'}):e}},function(t,e){"use strict";e.__esModule=!0,e.default=function(n,r,e){var o=function(){var t=[];return t.last=function(){return this[this.length-1]},t.lastTagNameEq=function(t){var e=this.last();return e&&e.tagName&&e.tagName.toUpperCase()===t.toUpperCase()},t.containsTagName=function(t){for(var e,n=0;e=this[n];n++)if(e.tagName===t)return!0;return!1},t}(),i={startTag:function(t){var e=t.tagName;"TR"===e.toUpperCase()&&o.lastTagNameEq("TABLE")?(n.prepend("<TBODY>"),a()):r.selfCloseFix&&s.test(e)&&o.containsTagName(e)?o.lastTagNameEq(e)?u(n,o):(n.prepend("</"+t.tagName+">"),a()):t.unary||o.push(t)},endTag:function(t){o.last()?r.tagSoupFix&&!o.lastTagNameEq(t.tagName)?u(n,o):o.pop():r.tagSoupFix&&(e(),a())}};function a(){var t=function(t,e){var n=t.stream,r=c(e());return t.stream=n,r}(n,e);t&&i[t.type]&&i[t.type](t)}return function(){return a(),c(e())}};var n=/^(AREA|BASE|BASEFONT|BR|COL|FRAME|HR|IMG|INPUT|ISINDEX|LINK|META|PARAM|EMBED)$/i,s=/^(COLGROUP|DD|DT|LI|OPTIONS|P|TD|TFOOT|TH|THEAD|TR)$/i;function c(t){return t&&"startTag"===t.type&&(t.unary=n.test(t.tagName)||t.unary,t.html5Unary=!/\/>$/.test(t.text)),t}function u(t,e){var n=e.pop();t.prepend("</"+n.tagName+">")}}],n.c=o,n.p="",n(0);function n(t){if(o[t])return o[t].exports;var e=o[t]={exports:{},id:t,loaded:!1};return r[t].call(e.exports,e,e.exports,n),e.loaded=!0,e.exports}var r,o},t.exports=r()},function(t,e){"use strict";e.__esModule=!0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function o(t){return null!=t}function i(t,e,n){var r=void 0,o=t&&t.length||0;for(r=0;r<o;r++)e.call(n,t[r],r)}function a(t,e,n){for(var r in t)t.hasOwnProperty(r)&&e.call(n,r,t[r])}function n(t,e){return!(!t||"startTag"!==t.type&&"atomicTag"!==t.type||!("tagName"in t))&&!!~t.tagName.toLowerCase().indexOf(e)}e.existy=o,e.isFunction=function(t){return"function"==typeof t},e.each=i,e.eachKey=a,e.defaults=function(n,t){return n=n||{},a(t,function(t,e){o(n[t])||(n[t]=e)}),n},e.toArray=function(n){try{return Array.prototype.slice.call(n)}catch(t){var e=function(){var e=[];return i(n,function(t){e.push(t)}),{v:e}}();if("object"===(void 0===e?"undefined":r(e)))return e.v}},e.last=function(t){return t[t.length-1]},e.isTag=n,e.isScript=function(t){return n(t,"script")},e.isStyle=function(t){return n(t,"style")}}],n.c=o,n.p="",n(0);function n(t){if(o[t])return o[t].exports;var e=o[t]={exports:{},id:t,loaded:!1};return r[t].call(e.exports,e,e.exports,n),e.loaded=!0,e.exports}var r,o},t.exports=r()}]);
|
1
|
+
/* prebid-universal-creative v1.17.0
|
2
|
+
Updated : 2025-03-10 */
|
3
|
+
!function(n){var r={};function i(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=n,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=1)}([function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}t.a=function(e,t){return function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=e.createElement("iframe");return Object.entries(r({frameborder:0,scrolling:"no",marginheight:0,marginwidth:0,TOPMARGIN:0,LEFTMARGIN:0,allowtransparency:"true"},t)).forEach(function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(e,2),n=t[0],r=t[1];i.setAttribute(n,r)}),i}(document,{height:e,width:t})},t.b=function(e,t,n){var r;t=t||document,r=n?t.getElementsByTagName(n):t.getElementsByTagName("head");try{(r=r.length?r:t.getElementsByTagName("body")).length&&(r=r[0]).insertBefore(e,r.firstChild)}catch(e){}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);window.ucTag=window.ucTag||{},window.ucTag.renderAd=function(e,t){Object(r.a)(t)}},function(e,t,n){"use strict";t.a=function(e){var t=Object(f.g)(e),n=t.cacheHost,r=t.cachePath,i=t.uuid,o=t.size,a=t.hbPb,c="Prebid_";if((i=i||"").substr(0,c.length)===c)!function(e){var t=window.localStorage.getItem(e);p(!0)(t)}(i),g(o);else{var u="".concat(function(e,t){var n=void 0===t||""===t?b:t;return"https://".concat(void 0===e||""===e?s:e).concat(n)}(n,r),"?uuid=").concat(i);g(o),Object(f.f)(u,p(Object(d.a)(t.env),a))}};var f=n(3),d=n(4),l=n(0),h=n(5),s="prebid.adnxs.com",b="/pbc/v1/cache";function g(e){if(e){var t=e.split("x").map(Number);!function(r,i){var o=window.innerWidth,a=window.innerHeight;if(o!==r||a!==i){if(Object(d.b)(window)){window.$sf.ext.register(r,i,function(e){var t=r-o,n=i-a;window.$sf.ext.expand({r:t,b:n,push:!0})})}window.parent.postMessage({sentinel:"amp",type:"embed-size",width:r,height:i},"*")}}(t[0],t[1])}else console.log("Targeting key hb_size not found to resize creative")}function p(d,s){return function(e){var t=function(e){var t;try{t=JSON.parse(e)}catch(e){console.log("Error parsing response from cache host: ".concat(e))}return t}(e),n=t.price||s,r=Object(f.c)(t),i=t.width?t.width:t.w,o=t.height?t.height:t.h;if(t.wurl&&Object(f.h)(decodeURIComponent(t.wurl)),t.adm){if(t.adm=n?t.adm.replace("${AUCTION_PRICE}",n):t.adm.replace("${AUCTION_PRICE}",""),r+=d?v(t.adm,i,o):t.adm,t.nurl&&(r+=Object(f.a)(decodeURIComponent(t.nurl))),t.burl){var a=function(){Object(f.h)(t.burl)};if(d)Object(f.e)(window,"mraid.js",function(){!function(t){function n(e){0<e&&(mraid.removeEventListener("exposureChange",n),t())}function r(e){e&&(mraid.removeEventListener("viewableChange",r),t())}function i(){window.MRAID_ENV&&3<=parseFloat(window.MRAID_ENV.version)?mraid.addEventListener("exposureChange",n):window.MRAID_ENV&&parseFloat(window.MRAID_ENV.version)<3&&(mraid.isViewable()?t():mraid.addEventListener("viewableChange",r))}return!(!window.mraid||!window.MRAID_ENV)&&("loading"==mraid.getState()?mraid.addEventListener("ready",function e(){mraid.removeEventListener("ready",e),i()}):i(),!0)}(a)&&a()},a);else a()}Object(h.a)(r)}else if(t.nurl)if(d){r+=v(Object(f.e)(window,t.nurl).outerHTML,i,o),Object(h.a)(r)}else{var c=t.nurl,u=Object(f.b)(t);Object(l.b)(u,document,"body"),Object(f.i)(c,i,o)}}}function v(e,t,n){var r=Object(f.d)();return'<div id="'.concat(r,'" style="border-style: none; position: absolute; width:100%; height:100%;">\n <div id="').concat(r,'_inner" style="margin: 0 auto; width:').concat(t,"px; height:").concat(n,'px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);">').concat(e,"</div>\n </div>")}},function(e,t,n){"use strict";t.h=function(e,t){var n=new Image;t&&"function"==typeof t&&(n.addEventListener("load",t),n.addEventListener("error",t));n.src=e},t.a=function(e){if(!e)return"";var t=encodeURI(e);return'<div style="position:absolute;left:0px;top:0px;visibility:hidden;"><img src="'.concat(t,'"></div>')},t.i=function(e,t,n){var r=i.a(n,t);r.src=e,document.body.appendChild(r)},t.f=function(e,t){var n=new XMLHttpRequest;n.addEventListener("load",function(){t(n.responseText)}),n.open("GET",e),n.send()},t.d=function(){var n=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"===e?t:3&t|8).toString(16)})},t.e=function(e,t,n,r){var i=e.document,o=i.createElement("script");o.type="text/javascript",n&&"function"==typeof n&&(o.readyState?o.onreadystatechange=function(){"loaded"!==o.readyState&&"complete"!==o.readyState||(o.onreadystatechange=null,n())}:o.onload=function(){n()});r&&"function"==typeof r&&(o.onerror=function(){r()});o.src=t;var a=i.getElementsByTagName("head");(a=a.length?a:i.getElementsByTagName("body")).length&&(a=a[0]).insertBefore(o,a.firstChild);return o},t.b=r,t.c=function(e){var t=r(e),n=document.createElement("div");return n.appendChild(t),n.innerHTML},t.g=function(t){var n={hb_adid:"adId",hb_cache_host:"cacheHost",hb_cache_path:"cachePath",hb_cache_id:"uuid",hb_format:"mediaType",hb_env:"env",hb_size:"size",hb_pb:"hbPb"};function e(e){return!(!t[e]||!(function(e){return o(e,"Object")}(t[e])&&0<Object.keys(t[e]).length||a(t[e])&&""!==t[e]))}var r={},i={};e("targetingMap")?i=function(t){var n={};return Object.keys(t).forEach(function(e){Array.isArray(t[e])&&0<t[e].length&&(n[e]=t[e][0])}),n}(t.targetingMap):e("targetingKeywords")&&(i=function(e){var i={},t=e.split(",");return 0<t.length&&t.forEach(function(e){var t=e.split(":");if(2===t.length){var n=t[0],r=t[1];i[n]=r}}),i}(t.targetingKeywords));return function(t){Object.keys(t).forEach(function(e){r[n[e]||e]=t[e]})}(i),Object.keys(t).forEach(function(e){"targetingMap"!==e&&"targetingKeywords"!==e&&a(t[e])&&""!==t[e]&&(r[e]=t[e])}),r};var i=n(0);function r(e){return document.createComment("Creative ".concat(e.crid," served by Prebid.js Header Bidding"))}function o(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function a(e){return o(e,"String")}},function(e,t,n){"use strict";t.b=function(e){return!(!e.$sf||!e.$sf.ext)},t.a=function(e){return e&&"mobile-app"===e}},function(e,t,n){"use strict";t.a=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:document.body.insertAdjacentHTML.bind(document.body);e=e.replace(/\<(\?xml|(\!DOCTYPE[^\>\[]+(\[[^\]]+)?))+[^>]+\>/gi,"");try{t("beforeend",e)}catch(e){console.error(e)}}}]);
|
package/dist/banner.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
/* prebid-universal-creative v1.
|
2
|
-
Updated :
|
3
|
-
!function(
|
1
|
+
/* prebid-universal-creative v1.17.0
|
2
|
+
Updated : 2025-03-10 */
|
3
|
+
!function(t){var r={};function o(e){if(r[e])return r[e].exports;var n=r[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=t,o.c=r,o.d=function(e,n,t){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:t})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="",o(o.s=3)}([function(e,n,t){"use strict";function a(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return t}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function r(){return(r=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function o(e){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o=e.createElement("iframe");return Object.entries(r({frameborder:0,scrolling:"no",marginheight:0,marginwidth:0,TOPMARGIN:0,LEFTMARGIN:0,allowtransparency:"true"},n)).forEach(function(e){var n=a(e,2),t=n[0],r=n[1];o.setAttribute(t,r)}),o}n.c=o,n.a=function(e,n){return o(document,{height:e,width:n})},n.b=function(e,n,t){var r;n=n||document,r=t?n.getElementsByTagName(t):n.getElementsByTagName("head");try{(r=r.length?r:n.getElementsByTagName("body")).length&&(r=r[0]).insertBefore(e,r.firstChild)}catch(e){}}},function(e,n,t){"use strict";n.b=function(n){var t={hb_adid:"adId",hb_cache_host:"cacheHost",hb_cache_path:"cachePath",hb_cache_id:"uuid",hb_format:"mediaType",hb_env:"env",hb_size:"size",hb_pb:"hbPb"};function e(e){return!(!n[e]||!(function(e){return a(e,"Object")}(n[e])&&0<Object.keys(n[e]).length||i(n[e])&&""!==n[e]))}var r={},o={};e("targetingMap")?o=function(n){var t={};return Object.keys(n).forEach(function(e){Array.isArray(n[e])&&0<n[e].length&&(t[e]=n[e][0])}),t}(n.targetingMap):e("targetingKeywords")&&(o=function(e){var o={},n=e.split(",");return 0<n.length&&n.forEach(function(e){var n=e.split(":");if(2===n.length){var t=n[0],r=n[1];o[t]=r}}),o}(n.targetingKeywords));return function(n){Object.keys(n).forEach(function(e){r[t[e]||e]=n[e]})}(o),Object.keys(n).forEach(function(e){"targetingMap"!==e&&"targetingKeywords"!==e&&i(n[e])&&""!==n[e]&&(r[e]=n[e])}),r},n.a=function(e){var n=document.createElement("a");return n.href=decodeURIComponent(e),{href:n.href,protocol:(n.protocol||"").replace(/:$/,""),hostname:n.hostname,port:+n.port,pathname:n.pathname.replace(/^(?!\/)/,"/"),hash:(n.hash||"").replace(/^#/,""),host:(n.host||window.location.host).replace(/:(443|80)$/,"")}};t(0);function a(e,n){return Object.prototype.toString.call(e)==="[object "+n+"]"}function i(e){return a(e,"String")}},function(e,n,t){"use strict";n.a=function(n){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:window,i=function(){if(null==n)return null;var e=Object(r.a)(n);return e.protocol+"://"+e.host}();function e(e){return e&&e.frames&&e.frames.__pb_locator__}var c=a.parent;try{for(;null!=c&&c!==a.top&&!e(c);)c=c.parent;e(c)||(c=a.parent)}catch(e){}return function(e,n){if(null==i)throw new Error("Missing pubUrl");var t;if(e=JSON.stringify(e),null==n)c.postMessage(e,i);else{var r=new MessageChannel;(t=r.port1).onmessage=n,a.addEventListener("message",o),c.postMessage(e,i,[r.port2])}return function(){null!=t&&(a.removeEventListener("message",o),t.onmessage=null,t=null)};function o(e){(e.origin||e.originalEvent&&e.originalEvent.origin)===i&&n(e)}}},n.b=function(e,n){return o({adId:e,message:a,event:n?c:i},n?{info:n}:null)};var r=t(1);function o(){return(o=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}var a="Prebid Event",i="adRenderSucceeded",c="adRenderFailed"},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(4);window.ucTag=window.ucTag||{},window.ucTag.renderAd=r.a},function(e,n,t){"use strict";n.a=function(e,n){var t=Object(r.b)(n);Object(o.a)(window)?function(e,n){for(var t=!1,r=window,o=0;o<10;o++)if((r=r.parent).pbjs)try{r.pbjs.renderAd(e,n),t=!0;break}catch(e){continue}t||console.error("Unable to locate pbjs.renderAd function!")}(e,t.adId):function(l,d){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",n=3<arguments.length?arguments[3]:void 0,t=l.location,r=e||l.location.hostname,o=t.protocol+"//"+r,f=Object(i.a)(n,l),h=function(e){return f(Object(i.b)(d,e))};function a(e){var n=e.message?"message":"data",t={};try{t=JSON.parse(e[n])}catch(e){return}if(t.message&&"Prebid Response"===t.message&&t.adId===d){if(Object(g.a)(t))return void Object(g.b)(d,t,f,l);try{var r=l.document.body,o=t.ad,a=t.adUrl,i=t.width,c=t.height;if("video"===t.mediaType)h({reason:"preventWritingOnMainDocument",message:"Cannot render video ad ".concat(d)}),console.log("Error trying to write ad.");else if(o){var s=Object(p.a)(t.height,t.width);r.appendChild(s),s.contentDocument.open(),s.contentDocument.write(o),s.contentDocument.close(),h()}else if(a){var u=Object(p.a)(c,i);u.style.display="inline",u.style.overflow="hidden",u.src=a,Object(p.b)(u,document,"body"),h()}else h({reason:"noAd",message:"No ad for ".concat(d)}),console.log("Error trying to write ad. No ad markup or adUrl for ".concat(d))}catch(e){h({reason:"exception",message:e.message}),console.log("Error in rendering ad",e)}}}f({message:"Prebid Request",adId:d,adServerDomain:o},a)}(window,t.adId,t.adServerDomain,t.pubUrl)};var r=t(1),o=t(5),p=t(0),i=t(2),g=t(6)},function(e,n,t){"use strict";n.a=function(e){var n=!1,t=e;for(;!n;){try{if(t.pbjs){n=!0;break}}catch(e){}if(t===window.top)break;t=t.parent}return n}},function(e,n,t){"use strict";n.a=function(e){return"string"==typeof e.renderer&&parseInt(e.rendererVersion,10)>=o},n.b=function(a,i,c){var s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:window,u=4<arguments.length&&void 0!==arguments[4]?arguments[4]:r.c,l=u(s.document,{width:0,height:0,style:"display: none",srcdoc:"<script>".concat(i.renderer,"<\/script>"),name:"__pb_renderer__"});return new Promise(function(n,t){function r(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};c(Object(d.b)(a,{reason:e.reason||"exception",message:e.message})),e.stack&&console.error(e),t(e)}function o(e){return function(){try{return e.apply(this,arguments)}catch(e){r(e)}}}l.onload=o(function(){var e=l.contentWindow;e.Promise.resolve(e.render(i,{mkFrame:u,sendMessage:function(e,n,t){return c(f({adId:a,message:e},n),t?o(t):void 0)}},s)).then(function(){return c(Object(d.b)(a))},r).then(n)}),s.document.body.appendChild(l)})};var r=t(0),d=t(2);function f(){return(f=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}var o=3}]);
|