
Picture illustration by Slate. Picture by Sujit Jaiswal/AFP through Getty Photos.
Welcome to Source Notes, a Future Tense column in regards to the web’s data ecosystem.
When Supreme Courtroom Justice Ruth Bader Ginsburg died in September, her Wikipedia article rocketed to the highest of the “High 25 Report,” a weekly record of the preferred articles on English Wikipedia. That week, Ginsburg’s article acquired more than 4 million page views. However the most-trafficked English Wikipedia web page for a deceased superstar in 2020 was not that of the “Infamous RBG,” however somewhat an Indian film star who was comparatively unknown exterior his personal nation.
That might be Sushant Singh Rajput, a 34-year-old Bollywood actor who died of obvious suicide by hanging on June 14. The week SSR—as he was and is understood to followers—died, his web page acquired 11.5 million page views. In line with the Wikipedia volunteers who compile the High 25 report, solely 5 different articles have ever seen weekly web page views cross the ten million mark—these of Prince, David Bowie, Kobe Bryant, and Stephen Hawking after their deaths, and Donald Trump’s after the 2016 election.
Since mid-June, SSR’s biographical Wikipedia web page and the separate article about his death have develop into a broadly trafficked web battleground. Editors have fiercely disputed whether or not Wikipedia ought to replicate conspiracy theories about SSR’s explanation for loss of life and if the web encyclopedia appropriately states the actor’s peak. (There’s loads using on whether or not he was shorter than 6 ft.) In a time when it appears more and more laborious to agree upon the information, Wikipedia’s response to SSR’s loss of life exhibits how even good-faith makes an attempt to doc dependable data might inadvertently gas the conspiracy theorists.
SSR was seen as an outsider, somebody who had miraculously damaged into the cliquey world of Indian filmmaking regardless of not having a well-known Bollywood surname like Chopra or Kapoor. After starring within the cleaning soap opera Pavitra Rishta from 2009 to 2011, he made his movie debut in Kai Po Che! in 2013. He performed a cricket captain within the 2016 biopic M.S. Dhoni: The Untold Story, for which he was nominated for a Filmfare Award, typically known as the Hindi movie business’s equal of the Academy Awards. By all accounts, SSR was a star on the rise.
The Mumbai Police’s report in July concluded that SSR’s loss of life was suicide by asphyxiation. However after public outcry and stress from politicians from the BJP, Prime Minister Narendra Modi’s conservative political social gathering, India’s Supreme Courtroom dominated in August that the Central Bureau of Investigation would conduct its personal investigation.
It’s laborious to overstate how a lot Indian media has lined SSR’s loss of life, together with exhibiting footage of his useless physique. There have been weeks this summer season when TV networks in India gave the Bollywood actor’s loss of life extra consideration than COVID-19. As Michaela Stone Cross wrote for the Juggernaut, “The media—hollowed out by reducing press freedom and extra faux information—was releasing any data it might get its arms on, actual or faux. Rajput’s face, eyes rolling, lacerations vivid, might be seen on screens all throughout India, and three followers killed themselves in his identify.” Conservative TV hosts accused Rhea Chakraborty, SSR’s girlfriend, of being a “manipulative” lady who “carried out black magic” and “drove Sushant to suicide.” There have been calls to #ArrestRheaNow.
Tens of millions of individuals, dubbed “SSRians,” are utilizing social media to conduct their very own analysis, problem the official reviews, and publicize their very own model of the reality. Folks within the #JusticeforSushant camp have tossed out quite a few conspiracy theories, together with that SSR was murdered by the Bollywood mafia or that his girlfriend Chakraborty was poisoning him with medication to depress his mood.
Naturally, the controversy has spilled over to Wikipedia, making a battle between those that assume one thing suspicious occurred and people dedicated to Wikipedia’s ethos. Because the Wikipedia editor NedFausa recounts in detail on their user page, it began with disbelief about how rapidly it was edited to replicate that he had died. I’ve written earlier than about the process of deaditing—updating Wikipedia pages to replicate individuals’s deaths—and the way it’s not fairly as macabre because it sounds. However within the case of SSR, it seems some onlookers have been primed to suspect one thing underhanded was occurring. “The reason for his loss of life up to date @Wikipedia at 8:59 A.M. on 14th June. How is that this doable” tweeted one user, who was involved as a result of SSR died between 11:30 a.m. and 1:30 p.m. native time. How might Wikipedia be up to date with details about SSR’s loss of life a number of hours earlier than he died? However Wikipedia makes use of Coordinated Common Time versus Indian Customary Time. IST is the same as UTC +05:30. Accounting for the adjustment to UTC, the timing of the Wikipedia-editing corresponded completely with the second that Hindi-language TV stations broke the information. However, this easy misunderstanding led the conspiracists to conclude, within the phrases of NedFausa, that “Wikipedia was furtively scheming with those that murdered SSR.”
Critics have additionally accused Wikipedia of being the police’s co-conspirator in SSR’s posthumous shrinking. The dark theory went like this: The space between the fan motor and his mattress was 5’11”, however SSR had described his peak as 6 feet (183 centimeters) in quite a few interviews, leaving some to conclude that it was inconceivable he had killed himself. After his loss of life, the web page was up to date to say that SSR was 5’ 10”. “The police are mendacity about his peak, and wikipedia modified his peak as quickly as we caught onto the truth that its inconceivable for Sushant to have hung from the fan …” tweeted one person in July.
This led to a flurry of tweets directed to the @Wikipedia account demanding that SSR’s peak be modified. However casting the blame on Wikipedia as an entity suggests a basic misunderstanding about how the location works, and it’s a mistake that’s actually not restricted to India. Wikipedia editors all over the world create and personal the content material of the web encyclopedia, not the nonprofit Wikimedia Basis primarily based in San Francisco.
As a substitute, the group of volunteer editors started tussling over SSR’s peak. First the data itemizing SSR’s peak as 5’ 10” was eliminated by an editor as a result of there was no supply for the addition. Then somebody put it again in. That’s when a volunteer administrator stepped in and eliminated SSR’s peak completely primarily based on the coverage that peak isn’t usually included in a biographical article until the particular person is particularly notable due to their peak. (That’s why Peter Dinklage’s web page lists his peak, however the heights of the 2 actors who performed his fictional siblings on Sport of Thrones will not be listed.) Then once more, it’s price contemplating what kind of supply would be thought of dependable sufficient for including details about SSR’s peak. Would details about SSR’s peak want to return from a conventional information publication just like the Indian Categorical or the Hindu?
Apart from the peak difficulty, there have now been a number of makes an attempt to vary the reason for loss of life on SSR’s Wikipedia web page from “suicide by hanging” to “asphyxia as a consequence of hanging, method underneath investigation” or the extra direct time period “homicide.” After I reached out to Wikipedia editors who have been lively on the SSR pages, they emphasised the significance of citing reliable sources on Wikipedia somewhat than the tabloids. “Because the [Central Bureau of Investigation] has declined to publicise any particulars of the [ongoing] investigation, no dependable supply has reported something aside from suicide as the reason for loss of life,” defined the pseudonymous TA, a prolific twentysomething Wikipedia editor primarily based within the Indian state of Karnataka.
The Wikipedia articles about SSR and his loss of life have been locked with extended-confirmed protection for the close to future. Because of this solely Wikipedia editors who’ve been lively for 30 days and have not less than 500 edits will likely be permitted to straight edit the 2 SSR pages. For comparability, Ruth Bader Ginsburg’s web page is semi-protected to stop anonymous IP editing, a typical measure when a major quantity of vandalism comes from unregistered customers, but it surely doesn’t have this greater diploma of 30/500 restriction. The argument for limiting the SSR content material to extra skilled contributors is that, with out the safety, the productive editors can be so fully overwhelmed by the nonstop disruptive edits that they merely couldn’t sustain.
A aspect impact of this safety is that a lot of the dialogue has been moved to the talk page that sits behind every article, the place hundreds of passionate, mostly newbie users have chimed in to advocate for altering the reason for loss of life from suicide to homicide. From TA’s perspective, the vitriol displays cultural challenges in India in relation to recognizing psychological well being points. TA advised me through e-mail that despair in India was typically perceived as a personality flaw or an excuse for unhealthy conduct. They added that they thought failure to acknowledge psychological sickness in India was one issue contributing to the conspiracy theories.
Many reviews recommend that the late actor did, in actual fact, undergo from vital psychological well being challenges. The Mumbai Police report indicated that the late actor searched on Google for the phrases “painless loss of life,” “schizophrenia,” and “bipolar dysfunction” a number of hours earlier than he died. On Aug. 1, SSR’s therapist shared that the actor suffered from bipolar dysfunction, explaining in an interview that the media’s “trivialization of psychological well being” was one purpose that she felt compelled to return ahead. (The therapist has since been sued by SSR’s household for skilled misconduct and breaching doctor-patient confidentiality.)
“It actually rubs me the improper option to see individuals downplaying his doable despair,” stated Nitish Pahwa, a Slate copy editor and Bollywood movie buff. “It’s a really laborious time to be any outstanding determine in India proper now, particularly on this age of hyperpolarization and [given the] pressures of being in probably the most prolific movie business on the earth.” Pahwa famous that there have been different outstanding examples of tragic Bollywood deaths such because the legendary Nineteen Fifties and ’60s actor and director Guru Dutt, who was identified to suffer from bouts of depression and died after mixing alcohol and sleeping tablets in what’s regarded as his third suicide try.
On Saturday, a consultant for the medical workforce helping with the CBI’s investigation into SSR introduced that they’d discovered no proof of battle and concluded that his loss of life was a suicide—reiterating the findings of the Mumbai Police. However Indian Wikipedia editors like TA don’t anticipate the CBI’s last announcement to make a lot of a distinction. “The eye will most likely die down,” TA wrote. “However I don’t assume it will change the minds of people that have already come to their very own conclusions.” In the meantime, there seems to be a deep-seated public want for revenge. SSR’s girlfriend, Chakraborty, was arrested in September for allegedly supplying small quantities of marijuana to the late actor. Though hashish is prevalent in India, the federal government has enacted harsh penalties and jail sentences for its sale and consumption, and Chakraborty’s arrest was broadly seen because the handiwork of right-wing BJP politicians who wish to be seen as robust on crime.
Regrettably, SSR’s loss of life has develop into a political wedge difficulty. It’s additionally a case examine in why Wikipedia’s neutrality policy is so necessary. The web encyclopedia distinguishes itself from different net sources as a result of it strives solely to incorporate data from dependable journalistic sources. That’s the worth of the mission: sticking to its personal boring processes even when it means the encyclopedia model is much less dramatic than the tabloids. Even when it’s a more common type of sad.
Replace, Oct. 13, 2020: The pronouns used to seek advice from Wikipedia editor TA have been up to date.
In case you are coping with suicidal ideas, you’ll be able to attain out for assist, by telephone to the National Suicide Hotline at 1-800-273-8255, or over textual content message to the Crisis Text Line at 741-741 (on virtually all carriers, these texts are free).
Future Tense
is a partnership of
Slate,
New America, and
Arizona State University
that examines rising applied sciences, public coverage, and society.
');
}
operate tryGetCriteoFastBid() {
attempt {
var fastBidStorageKey = "criteo_fast_bid",
hashPrefix = "// Hash: ",
fastBidFromStorage = storage.getDataFromLocalStorage(fastBidStorageKey),
firstLineEndPosition,
firstLine,
publisherTagHash,
publisherTag;
null !== fastBidFromStorage && (firstLineEndPosition = fastBidFromStorage.indexOf("n"), firstLine = fastBidFromStorage.substr(0, firstLineEndPosition).trim(), firstLine.substr(0, hashPrefix.size) !== hashPrefix ? (__WEBPACK_IMPORTED_MODULE_4__src_utils_js__.logWarn("No hash present in FastBid"), storage.removeDataFromLocalStorage(fastBidStorageKey)) : (publisherTagHash = firstLine.substr(hashPrefix.size), publisherTag = fastBidFromStorage.substr(firstLineEndPosition + 1), Object(__WEBPACK_IMPORTED_MODULE_6_criteo_direct_rsa_validate_build_verify_js__.confirm)(publisherTag, publisherTagHash, FAST_BID_PUBKEY_N, FAST_BID_PUBKEY_E) ? (__WEBPACK_IMPORTED_MODULE_4__src_utils_js__.logInfo("Utilizing Criteo FastBid"), eval(publisherTag)) : (__WEBPACK_IMPORTED_MODULE_4__src_utils_js__.logWarn("Invalid Criteo FastBid discovered"), storage.removeDataFromLocalStorage(fastBidStorageKey))));
} catch (t) {}
}
Object(__WEBPACK_IMPORTED_MODULE_1__src_adapters_bidderFactory_js__.registerBidder)(spec);
},
377: operate _(t, e, r) {
"use strict";
Object.defineProperty(e, "__esModule", {
worth: !0
});
var a = r(378),
n = r(379);
e.confirm = operate (t, e, r, i) {
var s = new a.BigInteger(a.b64toHex(e)),
o = new a.BigInteger(a.b64toHex(r)),
_ = s.modPowInt(i, o);
return a.removeExtraSymbols(_.toHexString()) === n.Sha256.hash(t);
};
},
378: operate _(t, e, r) {
"use strict";
var i;
Object.defineProperty(e, "__esModule", {
worth: !0
});
var s = (T.prototype.toHexString = operate () {
if (this.s < 0) return "-" + this.negate().toHexString();
var t,
e = !1,
r = "",
i = this.t,
s = this.DB - i * this.DB % 4;
if (0 < i--) for (s < this.DB && 0 < (t = this[i] >> s) && (e = !0, r = c(t)); 0 <= i;) = this[--i] >> (s += this.DB - 4)) : (t = this[i] >> (s -= 4) & 15, s <= 0 && (s += this.DB, --i)), 0 < t && (e = !0), e && (r += c(t));
return e ? r : "0";
}, T.prototype.fromHexString = operate (t) {
if (null !== t) {
this.t = 0, this.s = 0;
for (var e = t.size, r = !1, i = 0; 0 <= --e;) = s << i, (i += 4) >= this.DB && (i -= this.DB));
this.clamp(), r && T.ZERO.subTo(this, this);
}
}, T.prototype.negate = operate () {
var t = b();
return T.ZERO.subTo(this, t), t;
}, T.prototype.abs = operate () {
return this.s < 0 ? this.negate() : this;
}, T.prototype.mod = operate (t) {
var e = b();
return this.abs().divRemTo(t, null, e), this.s < 0 && 0 < e.compareTo(T.ZERO) && t.subTo(e, e), e;
}, T.prototype.copyTo = operate (t) {
for (var e = this.t - 1; 0 <= e; --e) {
t[e] = this[e];
}
t.t = this.t, t.s = this.s;
}, T.prototype.lShiftTo = operate (t, e) {
for (var r = t % this.DB, i = this.DB - r, s = (1 << i) - 1, o = Math.flooring(t / this.DB), _ = this.s << r & this.DM, a = this.t - 1; 0 <= a; --a) _, _ = (this[a] & s) << r;
for (a = o - 1; 0 <= a; --a) {
e[a] = 0;
}
e[o] = _, e.t = this.t + o + 1, e.s = this.s, e.clamp();
}, T.prototype.invDigit = operate () {
if (this.t < 1) return 0;
var t = this[0];
if (0 == (1 & t)) return 0;
var e = 3 & t;
return 0 < (e = (e = (e = (e = e * (2 - (15 & t) * e) & 15) * (2 - (255 & t) * e) & 255) * (2 - ((65535 & t) * e & 65535)) & 65535) * (2 - t * e % this.DV) % this.DV) ? this.DV - e : -e;
}, T.prototype.dlShiftTo = operate (t, e) {
for (var r = this.t - 1; 0 <= r; --r) {
e[r + t] = this[r];
}
for (r = t - 1; 0 <= r; --r) {
e[r] = 0;
}
e.t = this.t + t, e.s = this.s;
}, T.prototype.squareTo = operate (t) {
for (var e = this.abs(), r = t.t = 2 * e.t; 0 <= --r;) {
t[r] = 0;
}
for (r = 0; r < e.t - 1; ++r) {
var i = e.am(r, e[r], t, 2 * r, 0, 1);
(t[r + e.t] += e.am(r + 1, 2 * e[r], t, 2 * r + 1, i, e.t - r - 1)) >= e.DV && (t[r + e.t] -= e.DV, t[r + e.t + 1] = 1);
}
0 < t.t && (t[t.t - 1] += e.am(r, e[r], t, 2 * r, 0, 1)), t.s = 0, t.clamp();
}, T.prototype.multiplyTo = operate (t, e) {
var r = this.abs(),
i = t.abs(),
s = r.t;
for (e.t = s + i.t; 0 <= --s;) {
e[s] = 0;
}
for (s = 0; s < i.t; ++s) {
e[s + r.t] = r.am(0, i[s], e, s, 0, r.t);
}
e.s = 0, e.clamp(), this.s != t.s && T.ZERO.subTo(e, e);
}, T.prototype.divRemTo = operate (t, e, r) {
var i = t.abs();
if (!(i.t <= 0)) {
var s = this.abs();
if (s.t < i.t) return null != e && e.fromHexString("0"), void (null != r && this.copyTo(r));
null == r && (r = b());
var o = b(),
_ = this.s,
a = t.s,
n = this.DB - D(i[i.t - 1]);
0 < n ? (i.lShiftTo(n, o), s.lShiftTo(n, r)) : (i.copyTo(o), s.copyTo(r));
var p = o.t,
c = o[p - 1];
if (0 != c) {
var d = c * (1 << this.F1) + (1 < p ? o[p - 2] >> this.F2 : 0),
u = this.FV / d,
h = (1 << this.F1) / d,
l = 1 << this.F2,
f = r.t,
E = f - p,
v = null == e ? b() : e;
for (o.dlShiftTo(E, v), 0 <= r.compareTo(v) && (r[r.t++] = 1, r.subTo(v, r)), T.ONE.dlShiftTo(p, v), v.subTo(o, o); o.t < p;) {
o[o.t++] = 0;
}
for (; 0 <= --E;) {
var m = r[--f] == c ? this.DM : Math.flooring(r[f] * u + (r[f - 1] + l) * h);
if ((r[f] += o.am(0, m, r, E, 0, p)) < m) for (o.dlShiftTo(E, v), r.subTo(v, r); r[f] < --m;) {
r.subTo(v, r);
}
}
null != e && (r.drShiftTo(p, e), _ != a && T.ZERO.subTo(e, e)), r.t = p, r.clamp(), 0 < n && r.rShiftTo(n, r), _ < 0 && T.ZERO.subTo(r, r);
}
}
}, T.prototype.rShiftTo = function (t, e) {
e.s = this.s;
var r = Math.floor(t / this.DB);
if (r >= this.t) e.t = 0;else = (this.s & o) << s), e.t = this.t - r, e.clamp();
}, T.prototype.drShiftTo = operate (t, e) {
for (var r = t; r < this.t; ++r) {
e[r - t] = this[r];
}
e.t = Math.max(this.t - t, 0), e.s = this.s;
}, T.prototype.subTo = operate (t, e) {
for (var r = 0, i = 0, s = Math.min(t.t, this.t); r < s;) {
i += this[r] - t[r], e[r++] = i & this.DM, i >>= this.DB;
}
if (t.t < this.t) {
for (i -= t.s; r < this.t;) {
i += this[r], e[r++] = i & this.DM, i >>= this.DB;
}
i += this.s;
} else {
for (i += this.s; r < t.t;) {
i -= t[r], e[r++] = i & this.DM, i >>= this.DB;
}
i -= t.s;
}
e.s = i < 0 ? -1 : 0, i < -1 ? e[r++] = this.DV + i : 0 < i && (e[r++] = i), e.t = r, e.clamp();
}, T.prototype.clamp = operate () {
for (var t = this.s & this.DM; 0 < this.t && this[this.t - 1] == t;) {
--this.t;
}
}, T.prototype.modPowInt = operate (t, e) , T.prototype.exp = operate (t, e) {
if (4294967295 < t || t < 1) return T.ONE;
var r,
i = b(),
s = b(),
o = e.convert(this),
_ = D(t) - 1;
for (o.copyTo(i); 0 <= --_;) {
e.sqrTo(i, s), 0 < (t & 1 << _) ? e.mulTo(s, o, i) : (r = i, i = s, s = r);
}
return e.revert(i);
}, T.prototype.isEven = operate () {
return 0 == (0 < this.t ? 1 & this[0] : this.s);
}, T.prototype.compareTo = operate (t) {
var e = this.s - t.s;
if (0 != e) return e;
var r = this.t;
if (0 != (e = r - t.t)) return this.s < 0 ? -e : e;
for (; 0 <= --r;) {
if (0 != (e = this[r] - t[r])) return e;
}
return 0;
}, T.prototype.am1 = operate (t, e, r, i, s, o) {
for (; 0 <= --o;) {
var _ = e * this[t++] + r[i] + s;
s = Math.floor(_ / 67108864), r[i++] = 67108863 & _;
}
return s;
}, T.prototype.am2 = function (t, e, r, i, s, o) {
for (var _ = 32767 & e, a = e >> 15; 0 <= --o;) {
var n = 32767 & this[t],
p = this[t++] >> 15,
c = a * n + p * _;
s = ((n = _ * n + ((32767 & c) << 15) + r[i] + (1073741823 & s)) >>> 30) + (c >>> 15) + a * p + (s >>> 30), r[i++] = 1073741823 & n;
}
return s;
}, T.prototype.am3 = operate (t, e, r, i, s, o) {
for (var _ = 16383 & e, a = e >> 14; 0 <= --o;) {
var n = 16383 & this[t],
p = this[t++] >> 14,
c = a * n + p * _;
s = ((n = _ * n + ((16383 & c) << 14) + r[i] + s) >> 28) + (c >> 14) + a * p, r[i++] = 268435455 & n;
}
return s;
}, T);
operate T(t) {
null !== t && this.fromHexString(t);
}
operate b() {
return new s(null);
}
operate D(t) {
var e,
r = 1;
return 0 != (e = t >>> 16) && (t = e, r += 16), 0 != (e = t >> 8) && (t = e, r += 8), 0 != (e = t >> 4) && (t = e, r += 4), 0 != (e = t >> 2) && (t = e, r += 2), 0 != (e = t >> 1) && (t = e, r += 1), r;
}
e.BigInteger = s, e.nbi = b, e.nbits = D;
for (var o = [], _ = "0".charCodeAt(0), a = 0; a <= 9; ++a) {
o[_++] = a;
}
for (_ = "a".charCodeAt(0), a = 10; a < 36; ++a) {
o[_++] = a;
}
for (_ = "A".charCodeAt(0), a = 10; a < 36; ++a) {
o[_++] = a;
}
operate n(t, e) {
var r = o[t.charCodeAt(e)];
return null == r ? -1 : r;
}
e.intAt = n;
var p = "0123456789abcdefghijklmnopqrstuvwxyz";
operate c(t) {
return p.charAt(t);
}
e.int2char = c;
e.b64toHex = operate (t) {
for (var e = "", r = 0, i = 0, s = 0; s < t.size && "=" != t.charAt(s); ++s)
return 1 == r && (e += c(i << 2)), e;
}, e.removeExtraSymbols = operate (t) {
return t.exchange(/^1f+00/, "").exchange("3031300d060960864801650304020105000420"https://slate.com/expertise/2020/10/,"");
};
var d = (u.prototype.convert = operate (t) 0 <= t.compareTo(this.m) ? t.mod(this.m) : t;
, u.prototype.revert = operate (t) {
return t;
}, u.prototype.cut back = operate (t) {
t.divRemTo(this.m, null, t);
}, u.prototype.mulTo = operate (t, e, r) {
t.multiplyTo(e, r), this.cut back(r);
}, u.prototype.sqrTo = operate (t, e) {
t.squareTo(e), this.cut back(e);
}, u);
operate u(t) {
this.m = t;
}
var h = (l.prototype.convert = operate (t) {
var e = b();
return t.abs().dlShiftTo(this.m.t, e), e.divRemTo(this.m, null, e), t.s < 0 && 0 < e.compareTo(s.ZERO) && this.m.subTo(e, e), e;
}, l.prototype.revert = operate (t) {
var e = b();
return t.copyTo(e), this.cut back(e), e;
}, l.prototype.cut back = operate (t) {
for (; t.t <= this.mt2;) {
t[t.t++] = 0;
}
for (var e = 0; e < this.m.t; ++e) {
var r = 32767 & t[e],
i = r * this.mpl + ((r * this.mph + (t[e] >> 15) * this.mpl & this.um) << 15) & t.DM;
for (t[r = e + this.m.t] += this.m.am(0, i, t, e, 0, this.m.t); t[r] >= t.DV;) {
t[r] -= t.DV, t[++r]++;
}
}
t.clamp(), t.drShiftTo(this.m.t, t), 0 <= t.compareTo(this.m) && t.subTo(this.m, t); }, l.prototype.mulTo = function (t, e, r) { t.multiplyTo(e, r), this.reduce(r); }, l.prototype.sqrTo = function (t, e) { t.squareTo(e), this.reduce(e); }, l); function l(t) { this.m = t, this.mp = t.invDigit(), this.mpl = 32767 & this.mp, this.mph = this.mp >> 15, this.um = (1 << t.DB - 15) - 1, this.mt2 = 2 * t.t; } operate f(t) { var e = b(); return e.fromHexString(t.toString()), e; } e.nbv = f, s.ZERO = f(0), s.ONE = f(1), i = "Microsoft Web Explorer" == navigator.appName ? (s.prototype.am = s.prototype.am2, 30) : "Netscape" != navigator.appName ? (s.prototype.am = s.prototype.am1, 26) : (s.prototype.am = s.prototype.am3, 28), s.prototype.DB = i, s.prototype.DM = (1 << i) - 1, s.prototype.DV = 1 << i; s.prototype.FV = Math.pow(2, 52), s.prototype.F1 = 52 - i, s.prototype.F2 = 2 * i - 52; }, 379: operate _(t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { worth: !0 }); var i = (y.hash = operate (t) { t = y.utf8Encode(t || ""); for (var e = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298], r = [1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225], i = (t += String.fromCharCode(128)).size / 4 + 2, s = Math.ceil(i / 16), o = new Array(s), _ = 0; _ < s; _++) { o[_] = new Array(16); for (var a = 0; a < 16; a++) t.charCodeAt(64 * _ + 4 * a + 2) << 8 } var n = 8 * (t.length - 1) / Math.pow(2, 32), p = 8 * (t.length - 1) >>> 0;
for (o[s - 1][14] = Math.flooring(n), o[s - 1][15] = p, _ = 0; _ < s; _++) {
for (var c = new Array(64), d = 0; d < 16; d++) {
c[d] = o[_][d];
}
for (d = 16; d < 64; d++) {
c[d] = y.q1(c[d - 2]) + c[d - 7] + y.q0(c[d - 15]) + c[d - 16] >>> 0;
}
for (var u = r[0], h = r[1], l = r[2], f = r[3], E = r[4], v = r[5], m = r[6], T = r[7], d = 0; d < 64; d++) {
var b = T + y.z1(E) + y.Ch(E, v, m) + e[d] + c[d],
D = y.z0(u) + y.Maj(u, h, l);
T = m, m = v, v = E, E = f + b >>> 0, f = l, l = h, h = u, u = b + D >>> 0;
}
r[0] = r[0] + u >>> 0, r[1] = r[1] + h >>> 0, r[2] = r[2] + l >>> 0, r[3] = r[3] + f >>> 0, r[4] = r[4] + E >>> 0, r[5] = r[5] + v >>> 0, r[6] = r[6] + m >>> 0, r[7] = r[7] + T >>> 0;
}
for (var P = new Array(r.size), T = 0; T < r.length; T++) {
P[T] = ("00000000" + r[T].toString(16)).slice(-8);
}
return P.join("");
}, y.utf8Encode = function (e) {
try {
return new TextEncoder().encode(e).reduce(function (t, e) {
return t + String.fromCharCode(e);
}, "");
} catch (t) {
return unescape(encodeURIComponent(e));
}
}, y.ROTR = function (t, e) e << 32 - t;
, y.z0 = function (t) {
return y.ROTR(2, t) ^ y.ROTR(13, t) ^ y.ROTR(22, t);
}, y.z1 = function (t) {
return y.ROTR(6, t) ^ y.ROTR(11, t) ^ y.ROTR(25, t);
}, y.q0 = function (t) {
return y.ROTR(7, t) ^ y.ROTR(18, t) ^ t >>> 3;
}, y.q1 = operate (t) {
return y.ROTR(17, t) ^ y.ROTR(19, t) ^ t >>> 10;
}, y.Ch = operate (t, e, r) {
return t & e ^ ~t & r;
}, y.Maj = operate (t, e, r) {
return t & e ^ t & r ^ e & r;
}, y);
operate y() {}
e.Sha256 = i;
}
}, [375]);
pbjsChunk([214], {
496: operate _(e, r, i) {
e.exports = i(497);
},
497: operate _(e, r, i) {
"use strict";
Object.defineProperty(r, "__esModule", {
worth: !0
}), i.d(r, "spec", operate () {
return p;
});
var T = i(0),
S = i(2),
v = i(3),
t = i(10),
l = i.n(t),
a = i(498),
n = i.n(a),
s = i(1);
operate g(e) {
return (g = "operate" == typeof Image && "image" == _typeof(Image.iterator) ? operate (e) {
return _typeof(e);
} : operate (e) {
return e && "operate" == typeof Image && e.constructor === Image && e !== Image.prototype ? "image" : _typeof(e);
})(e);
}
var o = [S.b, S.d],
y = 100,
b = 300,
h = 3600,
w = !0,
x = {
JPY: 1
};
operate C(e) {
var r = {};
return r.id = e.bidId, r.ext = {}, r.ext.siteID = e.params.siteId, !e.params.hasOwnProperty("id") || "string" != typeof e.params.id && "quantity" != typeof e.params.id ? r.ext.sid = "".concat(e.params.dimension[0], "x").concat(e.params.dimension[1]) : r.ext.sid = String(e.params.id), e.params.hasOwnProperty("bidFloor") && e.params.hasOwnProperty("bidFloorCur") && (r.bidfloor = e.params.bidFloor, r.bidfloorcur = e.params.bidFloorCur), r;
}
operate d(e) {
return Array.isArray(e) && 2 === e.size && n()(e[0]) && n()(e[1]);
}
operate A(e, r) {
if (d(e)) return e[0] === r[0] && e[1] === r[1];
for (var i = 0; i < e.size; i++) { if (e[i][0] === r[0] && e[i][1] === r[1]) return 1; } } operate j(e, r, i, t) { var a = [], n = {}, s = e[0].userId; if (s && "object" === g(s) && s.idl_env && operate (e, r, i, t, a, n) { if (i) return r[a] = 1, e.push({ supply: t, uids: [{ id: i, ext: { rtiPartner: n } }] }); T.logWarn("Tried so as to add a person ID from Prebid, the ID acquired was null"); }(a, n, s.idl_env, "liveramp.com"https://slate.com/expertise/2020/10/,"LiveRampIp"https://slate.com/expertise/2020/10/,"idl"), window.headertag && "operate" == typeof window.headertag.getIdentityInfo) { var o, d = window.headertag.getIdentityInfo(); if (d && "object" === g(d)) for (var p in d) } var m, c = {}; c.id = e[0].bidderRequestId, c.imp = i, c.web site = {}, c.ext = {}, c.ext.supply = "prebid", e[0].schain && (c.supply = { ext: { schain: e[0].schain } }), 0 < a.size && (c.person = {}, c.person.eids = a), doc.referrer && "" !== doc.referrer && (c.web site.ref = doc.referrer), r && (r.gdprConsent && ((m = r.gdprConsent).hasOwnProperty("gdprApplies") && (c.regs = { ext: { gdpr: m.gdprApplies ? 1 : 0 } }), m.hasOwnProperty("consentString") && (c.person = c.person || {}, c.person.ext = "" )), r.uspConsent && T.deepSetValue(c, "regs.ext.us_privacy", r.uspConsent), r.refererInfo && (c.web site.web page = r.refererInfo.referer)); var u = {}, f = r && r.bidderCode || "ix", l = v.b.getConfig(f); if (l) { if ("object" === g(l.firstPartyData)) { var y = l.firstPartyData, b = "?"; for (var h in y) { y.hasOwnProperty(h) && (b += "".concat(encodeURIComponent(h), "=").concat(encodeURIComponent(y[h]), "&")); } b = b.slice(0, -1), c.web site.web page += b; } "quantity" == typeof l.timeout && (u.t = l.timeout); } return u.s = e[0].params.siteId, u.v = t, u.r = JSON.stringify(c), u.ac = "j", u.sd = 1, 8.1 === t && (u.nf = 1), { technique: "GET", url: "https://htlb.casalemedia.com/cygnus", knowledge: u }; } operate F(e, r) { for (var i = 0; i < e.size; i++) { if (r[0] == e[i][0] && r[1] == e[i][1]) return e.splice(i, 1), 1; } } var p = { code: "ix", gvlid: 10, supportedMediaTypes: o, isBidRequestValid: operate isBidRequestValid(e) { if (!d(e.params.dimension)) return T.logError("ix bidder params: bid dimension has invalid format."), !1; if (!A(e.sizes, e.params.dimension)) return T.logError("ix bidder params: bid dimension isn't included in advert unit sizes."), !1; if (e.hasOwnProperty("mediaType") && !T.incorporates(o, e.mediaType)) return !1; if (e.hasOwnProperty("mediaTypes") && !T.deepAccess(e, "mediaTypes.banner.sizes") && !T.deepAccess(e, "mediaTypes.video.playerSize")) return !1; if ("string" != typeof e.params.siteId && "quantity" != typeof e.params.siteId) return T.logError("ix bidder params: siteId have to be string or quantity worth."), !1; var r, i, t = e.params.hasOwnProperty("bidFloor"), a = e.params.hasOwnProperty("bidFloorCur"); return !!(!t && !a || t && a && (r = e.params.bidFloor, i = e.params.bidFloorCur, Boolean("quantity" == typeof r && "string" == typeof i && i.match(/^[A-Z]{3}$/)))) || (T.logError("ix bidder params: bidFloor / bidFloorCur parameter has invalid format."), !1); }, buildRequests: operate buildRequests(e, r) { for (var i, t, a, n, s, o, d, p, m, c, u, f, l, y = [], b = [], h = [], v = null, g = {}, w = 0; w < e.size; w++) { (v = e[w]).mediaType !== S.d && !T.deepAccess(v, "mediaTypes.video") || (v.mediaType === S.d || A(v.mediaTypes.video.playerSize, v.params.dimension) ? h.push(operate (e) { var r = C(e); r.video = T.deepClone(e.params.video), r.video.w = e.params.dimension[0], r.video.h = e.params.dimension[1]; var i = T.deepAccess(e, "mediaTypes.video.context"); return i && ("instream" === i ? r.video.placement = 1 : "outstream" === i ? r.video.placement = 4 : T.logWarn("ix bidder params: video context '".concat(i, "' isn't supported"))), r; }(v)) : T.logError("Bid dimension isn't included in video playerSize")), v.mediaType !== S.b && !T.deepAccess(v, "mediaTypes.banner") && (v.mediaType || v.mediaTypes) || (c = void 0, (c = C(m = v)).banner = {}, c.banner.w = m.params.dimension[0], c.banner.h = m.params.dimension[1], c.banner.topframe = T.inIframe() ? 0 : 1, i = c, b.push(i), a = g, n = i, p = d = o = s = void 0, p = (t = v).transactionId, a.hasOwnProperty(p) ? (s = [], a[p].hasOwnProperty("missingSizes") && (s = a[p].missingSizes), F(s, t.params.dimension), a[p].missingSizes = s) : T.deepAccess(t, "mediaTypes.banner.sizes") && (F(o = T.deepClone(t.mediaTypes.banner.sizes), t.params.dimension), d = { missingSizes: o, impression: n }, a[p] = d)); } for (var x in g) { if (g.hasOwnProperty(x)) for (var I = g[x].missingSizes, P = 0; P < I.size; P++) { var z = g[x].impression, O = (u = z, f = I[P], l = void 0, (l = T.deepClone(u)).ext.sid = "".concat(f[0], "x").concat(f[1]), l.banner.w = f[0], l.banner.h = f[1], l); b.push(O); } } return 0 < b.size && y.push(j(e, r, b, 7.2)), 0 < h.size && y.push(j(e, r, h, 8.1)), y; }, interpretResponse: operate interpretResponse(e, r) { var i = []; if (!e.hasOwnProperty("physique") || !e.physique.hasOwnProperty("seatbid")) return i; for (var t, a, n, s, o = e.physique, d = o.seatbid, p = 0; p < d.size; p++) { if (d[p].hasOwnProperty("bid")) for (var m = d[p].bid, c = JSON.parse(r.knowledge.r), u = 0; u < m.size; u++) { var f = operate (r, e) { if (r) return l()(e, operate (e) { return e.id === r; }); }(m[u].impid, c.imp); t = m[u], a = o.cur, n = f, s = void 0, s = {}, x.hasOwnProperty(a) ? s.cpm = t.worth / x[a] : s.cpm = t.worth / y, s.requestId = t.impid, s.dealId = T.deepAccess(t, "ext.dealid"), s.netRevenue = w, s.foreign money = a, s.creativeId = t.hasOwnProperty("crid") ? t.crid : "-", T.deepAccess(t, "ext.vasturl") ? (s.vastUrl = t.ext.vasturl, s.width = n.video.w, s.peak = n.video.h, s.mediaType = S.d, s.ttl = h) : (s.advert = t.adm, s.width = t.w, s.peak = t.h, s.mediaType = S.b, s.ttl = b), s.meta = {}, s.meta.networkId = T.deepAccess(t, "ext.dspid"), s.meta.brandId = T.deepAccess(t, "ext.advbrandid"), s.meta.brandName = T.deepAccess(t, "ext.advbrand"), t.adomain && 0 < t.adomain.size && (s.meta.advertiserDomains = t.adomain), i.push(s); } } return i; }, transformBidParams: operate transformBidParams(e) { return T.convertTypes({ siteID: "quantity" }, e); }, getUserSyncs: operate getUserSyncs(e) { return e.iframeEnabled ? [{ type: "iframe", url: "https://js-sec.indexww.com/um/ixmatch.html" }] : []; } }; Object(s.registerBidder)(p); } }, [496]); pbjsChunk([209], { 512: operate _(e, t, r) { e.exports = r(513); }, 513: operate _(e, t, r) { "use strict"; Object.defineProperty(t, "__esModule", { worth: !0 }), r.d(t, "spec", operate () { return l; }); var s = r(0), d = r(3), n = r(1), a = r(7); operate g() { return (g = Object.assign || operate (e) { for (var t = 1; t < arguments.size; t++) { var r = arguments[t]; for (var n in r) { Object.prototype.hasOwnProperty.name(r, n) && (e[n] = r[n]); } } return e; }).apply(this, arguments); } var o, i, c, u = Object(a.b)(), l = { code: "kargo", isBidRequestValid: operate isBidRequestValid(e) !e.params) && !!e.params.placementId; , buildRequests: operate buildRequests(e, t) { var r, n = d.b.getConfig("foreign money"), a = n && n.adServerCurrency || "USD", o = {}, i = {}; s._each(e, operate (e) { o[e.bidId] = e.params.placementId, i[e.bidId] = e.sizes; }), 0 < e.size && e[0].userId && e[0].userId.tdid && (r = e[0].userId.tdid); var c = g({}, { sessionId: l._getSessionId(), requestCount: l._getRequestCount(), timeout: t.timeout, foreign money: a, cpmGranularity: 1, timestamp: new Date().getTime(), cpmRange: { flooring: 0, ceil: 20 }, bidIDs: o, bidSizes: i, prebidRawBidRequests: e }, l._getAllMetadata(r, t.uspConsent)), u = encodeURIComponent(JSON.stringify(c)); return g({}, t, { technique: "GET", url: "".concat("https://krk.kargo.com"https://slate.com/expertise/2020/10/,"/api/v2/bid"), knowledge: "json=".concat(u), foreign money: a }); }, interpretResponse: operate interpretResponse(e, t) { var r = e.physique, n = []; for (var a in r) { var o = r[a], i = void 0; o.metadata && o.metadata.landingPageDomain && (i = { clickUrl: o.metadata.landingPageDomain, advertiserDomains: [o.metadata.landingPageDomain] }), n.push({ requestId: a, cpm: Quantity(o.cpm), width: o.width, peak: o.peak, advert: o.adm, ttl: 300, creativeId: o.id, dealId: o.targetingCustom, netRevenue: !0, foreign money: t.foreign money, meta: i }); } return n; }, getUserSyncs: operate getUserSyncs(e) { var t = [], r = l._generateRandomUuid(), n = l._getClientId(); if (e.iframeEnabled && r && n) for (var a = 0; a < 5; a++) { t.push({ kind: "iframe", url: "https://crb.kargo.com/api/v1/initsyncrnd/{UUID}?seed={SEED}&idx={INDEX}".exchange("{UUID}", n).exchange("{SEED}", r).exchange("{INDEX}", a) }); } return t; }, _readCookie: operate _readCookie(e) { if (!u.cookiesAreEnabled()) return null; for (var t = "".concat(e, "="), r = doc.cookie.cut up(";"), n = 0; n < r.length; n++) { for (var a = r[n]; " " === a.charAt(0);) { a = a.substring(1, a.length); } if (0 === a.indexOf(t)) return a.substring(t.length, a.length); } return null; }, _getCrbFromCookie: function _getCrbFromCookie() { try { var e = JSON.parse(decodeURIComponent(l._readCookie("krg_crb"))); if (e && e.v) { var t = JSON.parse(atob(e.v)); if (t) return t; } return {}; } catch (e) { return {}; } }, _getCrbFromLocalStorage: function _getCrbFromLocalStorage() { try { return JSON.parse(atob(l._getLocalStorageSafely("krg_crb"))); } catch (e) { return {}; } }, _getCrb: function _getCrb() { var e = l._getCrbFromLocalStorage(); return Object.keys(e).length ? e : l._getCrbFromCookie(); }, _getKruxUserId: function _getKruxUserId() { return l._getLocalStorageSafely("kxkar_user"); }, _getKruxSegments: function _getKruxSegments() { return l._getLocalStorageSafely("kxkar_segs"); }, _getKrux: function _getKrux() { var e = l._getKruxSegments(), t = []; return e && (t = e.split(",")), { userID: l._getKruxUserId(), segments: t }; }, _getLocalStorageSafely: function _getLocalStorageSafely(e) { try { return u.getDataFromLocalStorage(e); } catch (e) { return null; } }, _getUserIds: function _getUserIds(e, t) { var r = l._getCrb(), n = { kargoID: r.userId, clientID: r.clientId, crbIDs: r.syncIds || {}, optOut: r.optOut, usp: t }; return e && (n.tdID = e), n; }, _getClientId: function _getClientId() { return l._getCrb().clientId; }, _getAllMetadata: function _getAllMetadata(e, t) { return { userIDs: l._getUserIds(e, t), krux: l._getKrux(), pageURL: window.location.href, rawCRB: l._readCookie("krg_crb"), rawCRBLocalStorage: l._getLocalStorageSafely("krg_crb") }; }, _getSessionId: function _getSessionId() l._generateRandomUuid(); , _getRequestCount: function _getRequestCount() { return i === window.location.pathname ? ++c : (i = window.location.pathname, c = 0); }, _generateRandomUuid: function _generateRandomUuid() { try { var e = new Uint8Array(16); crypto.getRandomValues(e), e[6] = -177 & e[6] | 64, e[8] = -65 & e[8] | 128; var t = Array.prototype.map.call(new Uint8Array(e), function (e) { return ("00" + e.toString(16)).slice(-2); }).join(""); return t.slice(0, 8) + "-" + t.slice(8, 12) + "-" + t.slice(12, 16) + "-" + t.slice(16, 20) + "-" + t.slice(20); } catch (e) { return ""; } } }; Object(n.registerBidder)(l); } }, [512]); pbjsChunk([125], { 720: function _(e, r, t) { e.exports = t(721); }, 721: function _(e, r, t) { "use strict"; Object.defineProperty(r, "__esModule", { value: !0 }), t.d(r, "spec", function () { return z; }), r.hasVideoMediaType = s, t.d(r, "resetRubiConf", function () { return c; }), r.masSizeOrdering = d, r.determineRubiconVideoSizeId = g, r.getPriceGranularity = v, r.hasValidVideoParams = l, r.hasValidSupplyChainParams = T, r.encodeParam = b, r.resetUserSync = function () { y = !1; }; var S = t(0), i = t(1), I = t(3), u = t(2), n = t(10), C = t.n(n); function j(e, r) { return function (e) { if (Array.isArray(e)) return e; }(e) || function (e, r) { if ("undefined" == typeof Symbol || !(Symbol.iterator in Object(e))) return; var t = [], i = !0, n = !1, o = void 0; try { for (var a, s = e[Symbol.iterator](); !(i = (a = s.next()).done) && (t.push(a.value), !r || t.length !== r); i = !0) { ; } } catch (e) { n = !0, o = e; } finally { try finally { if (n) throw o; } } return t; }(e, r) || function (e, r) (e, r) || function () { throw new TypeError("Invalid attempt to destructure non-iterable instance.nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }(); } function o(e, r) { (null == r || r > e.size) && (r = e.size);
for (var t = 0, i = new Array(r); t < r; t++) { i[t] = e[t]; } return i; } operate ok() { return (ok = Object.assign || operate (e) { for (var r = 1; r < arguments.size; r++) { var t = arguments[r]; for (var i in t) { Object.prototype.hasOwnProperty.name(t, i) && (e[i] = t[i]); } } return e; }).apply(this, arguments); } operate f(e, r, t) { return r in e ? Object.defineProperty(e, r, { worth: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } operate E(e) { return (E = "operate" == typeof Image && "image" == _typeof(Image.iterator) ? operate (e) { return _typeof(e); } : operate (e) { return e && "operate" == typeof Image && e.constructor === Image && e !== Image.prototype ? "image" : _typeof(e); })(e); } var w = {}; I.b.getConfig("rubicon", operate (e) { S.mergeDeep(w, e.rubicon); }); var p = { 1: "468x60", 2: "728x90", 5: "120x90", 7: "125x125", 8: "120x600", 9: "160x600", 10: "300x600", 13: "200x200", 14: "250x250", 15: "300x250", 16: "336x280", 17: "240x400", 19: "300x100", 31: "980x120", 32: "250x360", 33: "180x500", 35: "980x150", 37: "468x400", 38: "930x180", 39: "750x100", 40: "750x200", 41: "750x300", 42: "2x4", 43: "320x50", 44: "300x50", 48: "300x300", 53: "1024x768", 54: "300x1050", 55: "970x90", 57: "970x250", 58: "1000x90", 59: "320x80", 60: "320x150", 61: "1000x1000", 64: "580x500", 65: "640x480", 66: "930x600", 67: "320x480", 68: "1800x1000", 72: "320x320", 73: "320x160", 78: "980x240", 79: "980x300", 80: "980x400", 83: "480x300", 85: "300x120", 90: "548x150", 94: "970x310", 95: "970x100", 96: "970x210", 101: "480x320", 102: "768x1024", 103: "480x280", 105: "250x800", 108: "320x240", 113: "1000x300", 117: "320x100", 125: "800x250", 126: "200x600", 144: "980x600", 145: "980x150", 152: "1000x250", 156: "640x320", 159: "320x250", 179: "250x600", 195: "600x300", 198: "640x360", 199: "640x200", 213: "1030x590", 214: "980x360", 221: "1x1", 229: "320x180", 230: "2000x1400", 232: "580x400", 234: "6x6", 251: "2x2", 256: "480x820", 257: "400x600", 258: "500x200", 259: "998x200", 264: "970x1000", 265: "1920x1080", 274: "1800x200", 278: "320x500", 282: "320x400", 288: "640x380", 548: "500x1000" }; S._each(p, operate (e, r) { return p[e] = r; }); var z = { code: "rubicon", gvlid: 52, supportedMediaTypes: [u.b, u.d], isBidRequestValid: operate isBidRequestValid(e) { if ("object" !== E(e.params)) return !1; for (var r = 0, t = ["accountId"https://slate.com/technology/2020/10/,"siteId"https://slate.com/technology/2020/10/,"zoneId"]; r < t.size; r++) { if (e.params[t[r]] = parseInt(e.params[t[r]]), isNaN(e.params[t[r]])) return S.logError("Rubicon: improper format of accountId or siteId or zoneId."), !1; } var i = m(e, !0); return !!i && ("video" !== i || l(e)); }, buildRequests: operate buildRequests(e, l) { var n, r = e.filter(operate (e) { return "video" === m(e); }).map(operate (t) { t.startTime = new Date().getTime(); var e, r, i, n = { id: t.transactionId, take a look at: I.b.getConfig("debug") ? 1 : 0, cur: ["USD"], supply: { tid: t.transactionId }, tmax: l.timeout, imp: [{ exp: I.b.getConfig("s2sConfig.defaultTtl"), id: t.adUnitCode, secure: 1, ext: f({}, t.bidder, t.params), video: S.deepAccess(t, "mediaTypes.video") || {} }], ext: { prebid: { cache: { vastxml: { returnCreative: !0 === w.returnVast } }, concentrating on: { includewinners: !0, includebidderkeys: !1, pricegranularity: v(I.b) }, bidders: { rubicon: } } } }; if ("rubicon" !== t.bidder && (n.ext.prebid.aliases = f({}, t.bidder, "rubicon")), "operate" != typeof t.getFloor || w.disableFloors) e = parseFloat(S.deepAccess(t, "params.flooring"));else { attempt { r = t.getFloor({ foreign money: "USD", mediaType: "video", dimension: O(t, "video") }); } catch (e) { S.logError("Rubicon: getFloor threw an error: ", e); } e = "object" !== E(r) || "USD" !== r.foreign money || isNaN(parseInt(r.flooring)) ? void 0 : parseFloat(r.flooring); } isNaN(e) || (n.imp[0].bidfloor = e), n.imp[0].ext[t.bidder].video.size_id = g(t), operate (r, t, e) { if (!r) return; "object" === E(I.b.getConfig("app")) ? r.app = I.b.getConfig("app") : r.web site = { web page: R(t, e) }; "object" === E(I.b.getConfig("system")) && (r.system = I.b.getConfig("system")); t.params.video.language && ["site"https://slate.com/technology/2020/10/,"device"].forEach(operate (e) { r[e] && (r[e].content material = ok({ language: t.params.video.language }, r[e].content material)); }); }(n, t, l), operate (e, r) { "object" === E(e.imp[0].video) && void 0 === e.imp[0].video.skip && (e.imp[0].video.skip = r.params.video.skip); "object" === E(e.imp[0].video) && void 0 === e.imp[0].video.skipafter && (e.imp[0].video.skipafter = r.params.video.skipdelay); "object" === E(e.imp[0].video) && void 0 === e.imp[0].video.pos && ("atf" === r.params.place ? e.imp[0].video.pos = 1 : "btf" === r.params.place && (e.imp[0].video.pos = 3)); var t = O(r, "video"); e.imp[0].video.w = t[0], e.imp[0].video.h = t[1]; }(n, t), l.gdprConsent && ("boolean" == typeof l.gdprConsent.gdprApplies && (i = l.gdprConsent.gdprApplies ? 1 : 0), S.deepSetValue(n, "regs.ext.gdpr", i), S.deepSetValue(n, "person.ext.consent", l.gdprConsent.consentString)), l.uspConsent && S.deepSetValue(n, "regs.ext.us_privacy", l.uspConsent); var o, a = S.deepAccess(l, "bids.0.userIdAsEids"); a && a.size && (S.deepSetValue(n, "person.ext.eids", a), (o = C()(n.person.ext.eids, operate (e) { return "liveintent.com" === e.supply; })) && (S.deepSetValue(n, "person.ext.tpid", { supply: o.supply, uid: o.uids[0].id }), o.ext && o.ext.segments && S.deepSetValue(n, "rp.goal.LIseg", o.ext.segments))); var s = I.b.getConfig("person.id"); s && S.deepSetValue(n, "person.id", s), !0 === I.b.getConfig("coppa") && S.deepSetValue(n, "regs.coppa", 1), t.schain && T(t.schain) && S.deepSetValue(n, "supply.ext.schain", t.schain); var c, d = ok({}, t.params.stock, I.b.getConfig("fpd.context")), u = ok({}, t.params.customer, I.b.getConfig("fpd.person")); S.isEmpty(d) && S.isEmpty(u) || (c = { bidders: [l.bidderCode], config: { fpd: {} } }, S.isEmpty(d) || (c.config.fpd.web site = d), S.isEmpty(u) || (c.config.fpd.person = u), S.deepSetValue(n, "ext.prebid.bidderconfig.0", c)); var p = S.deepAccess(t, "fpd.context.pbAdSlot"); return "string" == typeof p && p && S.deepSetValue(n.imp[0].ext, "context.knowledge.pbadslot", p), ["name"https://slate.com/technology/2020/10/,"adSlot"].forEach(operate (e) { var r = S.deepAccess(t, "fpd.context.adserver.".concat(e)); "string" == typeof r && r && S.deepSetValue(n.imp[0].ext, "context.knowledge.adserver.".concat(e.toLowerCase()), r); }), t.storedAuctionResponse && S.deepSetValue(n.imp[0], "ext.prebid.storedauctionresponse.id", t.storedAuctionResponse.toString()), S.deepSetValue(n.imp[0], "ext.prebid.auctiontimestamp", l.auctionStart), ; }); return !0 !== w.singleRequest ? r.concat(e.filter(operate (e) { return "banner" === m(e); }).map(operate (e) { var i = z.createSlotParams(e, l); return "fastlane"https://slate.com/expertise/2020/10/,".rubiconproject.com/a/api/fastlane.json"), knowledge: z.getOrderedParams(i).cut back(operate (e, r) , "") + "slots=1&rand=".concat(Math.random()), bidRequest: e ; })) : (n = e.filter(operate (e) { return "banner" === m(e); }).cut back(operate (e, r) []).push(r), e; , {}), r.concat(Object.keys(n).cut back(operate (r, e) { var t, i; return t = n[e], i = 10, t.map(operate (e, r) { return r % i == 0 ? t.slice(r, r + i) : null; }).filter(operate (e) { return e; }).forEach(operate (e) { var i = z.combineSlotUrlParams(e.map(operate (e) { return z.createSlotParams(e, l); })); r.push(); }), r; }, []))); }, getOrderedParams: operate getOrderedParams(e) { var r = /^tg_v/, t = /^tg_i/, i = ["account_id"https://slate.com/technology/2020/10/,"site_id"https://slate.com/technology/2020/10/,"zone_id"https://slate.com/technology/2020/10/,"size_id"https://slate.com/technology/2020/10/,"alt_size_ids"https://slate.com/technology/2020/10/,"p_pos"https://slate.com/technology/2020/10/,"gdpr"https://slate.com/technology/2020/10/,"gdpr_consent"https://slate.com/technology/2020/10/,"us_privacy"https://slate.com/technology/2020/10/,"rp_schain"https://slate.com/technology/2020/10/,"tpid_tdid"https://slate.com/technology/2020/10/,"tpid_liveintent.com"https://slate.com/technology/2020/10/,"tg_v.LIseg"https://slate.com/technology/2020/10/,"ppuid"https://slate.com/technology/2020/10/,"eid_pubcid.org"https://slate.com/technology/2020/10/,"eid_sharedid.org"https://slate.com/technology/2020/10/,"eid_criteo.com"https://slate.com/technology/2020/10/,"rf"https://slate.com/technology/2020/10/,"p_geo.latitude"https://slate.com/technology/2020/10/,"p_geo.longitude"https://slate.com/technology/2020/10/,"kw"].concat(Object.keys(e).filter(operate (e) { return r.take a look at(e); })).concat(Object.keys(e).filter(operate (e) { return t.take a look at(e); })).concat(["tk_flint"https://slate.com/technology/2020/10/,"x_source.tid"https://slate.com/technology/2020/10/,"x_source.pchain"https://slate.com/technology/2020/10/,"p_screen_res"https://slate.com/technology/2020/10/,"rp_floor"https://slate.com/technology/2020/10/,"rp_secure"https://slate.com/technology/2020/10/,"tk_user_key"]); return i.concat(Object.keys(e).filter(operate (e) { return -1 === i.indexOf(e); })); }, combineSlotUrlParams: operate combineSlotUrlParams(n) { if (1 === n.size) return n[0]; var i = n.cut back(operate (r, t, i) { return Object.keys(t).forEach(operate (e) ), r; }, {}), o = new RegExp("^([^;]*)(;1)+$"); return Object.keys(i).forEach(operate (e) { var r = i[e].be part of(";"), t = r.match(o); i[e] = t ? t[1] : r; }), i; }, createSlotParams: operate createSlotParams(e, r) { e.startTime = new Date().getTime(); var t, i, n, o, a, s, c, d = e.params, u = O(e, "banner"), p = j(d.latLong || [], 2), l = p[0], f = p[1], m = "pbjs_lite"https://slate.com/expertise/2020/10/,"_v4.13.0"), "x_source.tid": e.transactionId, "x_source.pchain": d.pchain, p_screen_res: [window.screen.width, window.screen.height].be part of("x"), tk_user_key: d.userId, "p_geo.latitude": isNaN(parseFloat(l)) ? void 0 : parseFloat(l).toFixed(4), "p_geo.longitude": isNaN(parseFloat(f)) ? void 0 : parseFloat(f).toFixed(4), "tg_fl.eid": e.code, rf: R(e, r) ; if ("operate" == typeof e.getFloor && !w.disableFloors) { attempt { t = e.getFloor({ foreign money: "USD", mediaType: "banner", dimension: "*" }); } catch (e) { S.logError("Rubicon: getFloor threw an error: ", e); } m.rp_hard_floor = "object" !== E(t) || "USD" !== t.foreign money || isNaN(parseInt(t.flooring)) ? void 0 : t.flooring; } m.p_pos = "atf" === d.place || "btf" === d.place ? d.place : "", e.userIdAsEids && e.userIdAsEids.size && ((i = C()(e.userIdAsEids, operate (e) { return "adserver.org" === e.supply; })) && (m.tpid_tdid = i.uids[0].id), (n = C()(e.userIdAsEids, operate (e) { return "liveintent.com" === e.supply; })) && (m["tpid_liveintent.com"] = n.uids[0].id, n.ext && Array.isArray(n.ext.segments) && n.ext.segments.size && (m["tg_v.LIseg"] = n.ext.segments.be part of(","))), (o = C()(e.userIdAsEids, operate (e) { return "liveramp.com" === e.supply; })) && (m.x_liverampidl = o.uids[0].id), (a = C()(e.userIdAsEids, operate (e) { return "sharedid.org" === e.supply; })) && (m["eid_sharedid.org"] = "".concat(a.uids[0].id, "^").concat(a.uids[0].atype, "^").concat(a.uids[0].ext.third)), (s = C()(e.userIdAsEids, operate (e) { return "pubcid.org" === e.supply; })) && (m["eid_pubcid.org"] = "".concat(s.uids[0].id, "^").concat(s.uids[0].atype)), (c = C()(e.userIdAsEids, operate (e) { return "criteo.com" === e.supply; })) && (m["eid_criteo.com"] = "".concat(c.uids[0].id, "^").concat(c.uids[0].atype))); var g = I.b.getConfig("person.id"); if (g) m.ppuid = g;else for (var v = 0; e.userIdAsEids && v < e.userIdAsEids.size; v++) { if (e.userIdAsEids[v].uids) { var b = C()(e.userIdAsEids[v].uids, operate (e) { return e.ext && "ppuid" === e.ext.stype; }); if (b && b.id) { m.ppuid = b.id; break; } } } r.gdprConsent && ("boolean" == typeof r.gdprConsent.gdprApplies && (m.gdpr = Quantity(r.gdprConsent.gdprApplies)), m.gdpr_consent = r.gdprConsent.consentString), r.uspConsent && (m.us_privacy = encodeURIComponent(r.uspConsent)); var y = ok({}, d.customer, I.b.getConfig("fpd.person")); Object.keys(y).forEach(operate (e) Array.isArray(y[e]) ? y[e].toString() : JSON.stringify(y[e])); ); var x = ok({}, d.stock, I.b.getConfig("fpd.context")); Object.keys(x).forEach(operate (e) ); var h = (d.key phrases || []).concat(S.deepAccess(I.b.getConfig("fpd.person"), "key phrases") || [], S.deepAccess(I.b.getConfig("fpd.context"), "key phrases") || []); m.kw = Array.isArray(h) && h.size ? h.be part of(",") : ""; var _ = S.deepAccess(e, "fpd.context.pbAdSlot"); "string" == typeof _ && _ && (m["tg_i.pbadslot"] = _.exchange(/^/+/, "")); var A = S.deepAccess(e, "fpd.context.adServer.adSlot"); return "string" == typeof A && A && (m["tg_i.dfp_ad_unit_code"] = A.exchange(/^/+/, "")), !0 === I.b.getConfig("coppa") && (m.coppa = 1), e.schain && T(e.schain) && (m.rp_schain = z.serializeSupplyChain(e.schain)), m; }, serializeSupplyChain: operate serializeSupplyChain(e) { if (!T(e)) return ""; var r = e.ver, t = e.full, i = e.nodes; return "".concat(r, ",").concat(t, "!").concat(z.serializeSupplyChainNodes(i)); }, serializeSupplyChainNodes: operate serializeSupplyChainNodes(e) { var t = ["asi"https://slate.com/technology/2020/10/,"sid"https://slate.com/technology/2020/10/,"hp"https://slate.com/technology/2020/10/,"rid"https://slate.com/technology/2020/10/,"name"https://slate.com/technology/2020/10/,"domain"]; return e.map(operate (r) { return t.map(operate (e) ).be part of(","); }).be part of("!"); }, interpretResponse: operate interpretResponse(c, e) { var d = e.bidRequest; if (!(c = c.physique) || "object" !== E(c)) return []; if (c.seatbid) { var r = S.deepAccess(c, "ext.errors.rubicon"); Array.isArray(r) && 0 < r.size && S.logWarn("Rubicon: Error in video response"); var o = []; return c.seatbid.forEach(operate (n) { (n.bid || []).forEach(operate (e) { var r = 0, bidderCode: n.seat, ttl: 300, netRevenue: !1 !== w.netRevenue, width: e.w ; e.id && (r.seatBidId = e.id), e.dealid && (r.dealId = e.dealid); var t, i = S.deepAccess(c, "ext.responsetimemillis.rubicon"); d && i && (d.serverResponseTimeMs = i), S.deepAccess(e, "ext.prebid.kind") === u.d ? (r.mediaType = u.d, (t = S.deepAccess(e, "ext.prebid.concentrating on")) && "object" === E(t) && (r.adserverTargeting = t), e.ext.prebid.cache && "object" === E(e.ext.prebid.cache.vastXml) && e.ext.prebid.cache.vastXml.cacheId && e.ext.prebid.cache.vastXml.url ? (r.videoCacheKey = e.ext.prebid.cache.vastXml.cacheId, r.vastUrl = e.ext.prebid.cache.vastXml.url) : t && t.hb_uuid && t.hb_cache_host && t.hb_cache_path && (r.videoCacheKey = t.hb_uuid, r.vastUrl = "https://".concat(t.hb_cache_host).concat(t.hb_cache_path, "?uuid=").concat(t.hb_uuid)), e.adm && (r.vastXml = e.adm), e.nurl && (r.vastUrl = e.nurl), !r.vastUrl && e.nurl && (r.vastUrl = e.nurl)) : S.logWarn("Rubicon: video response acquired non-video media kind"), o.push(r); }); }), o; } var t = c.advertisements; return "object" !== E(d) || Array.isArray(d) || "video" !== m(d) || "object" !== E(t) || (t = t[d.adUnitCode]), !Array.isArray(t) || t.size < 1 ? [] : t.cut back(operate (e, r, t) { if ("okay" !== r.standing) return e; var i, n, o, a, s = Array.isArray(d) ? d[t] : d; return s && "object" === E(s) ? (i = { requestId: s.bidId, foreign money: "USD", creativeId: r.creative_id || "".concat(r.community || ""https://slate.com/expertise/2020/10/,"-").concat(r.advertiser || ""), cpm: r.cpm || 0, dealId: r.deal, ttl: 300, netRevenue: !1 !== w.netRevenue, rubicon: { advertiserId: r.advertiser, networkId: r.community }, meta: { advertiserId: r.advertiser, networkId: r.community } }, r.creative_type && (i.mediaType = r.creative_type), r.creative_type === u.d ? (i.width = s.params.video.playerWidth, i.peak = s.params.video.playerHeight, i.vastUrl = r.creative_depot_url, i.impression_id = r.impression_id, i.videoCacheKey = r.impression_id) : (i.advert = (o = r.script, a = r.impression_id, "n
nnx3c!-- Rubicon Venture Advert Tag --x3ennn")), n = j(p[r.size_id].cut up("x").map(operate (e) {
return Quantity(e);
}), 2), i.width = n[0], i.peak = n[1]), i.rubiconTargeting = (Array.isArray(r.concentrating on) ? r.concentrating on : []).cut back(operate (e, r) {
return e[r.key] = r.values[0], e;
}, {
rpfl_elemid: s.adUnitCode
}), e.push(i)) : S.logError("Rubicon: bidRequest undefined at index place:".concat(t), d, c), e;
}, []).kind(operate (e, r) );
},
getUserSyncs: operate getUserSyncs(e, r, t, i) {
if (!y && e.iframeEnabled) {
var n = "";
return t && "string" == typeof t.consentString && ("boolean" == typeof t.gdprApplies ? n += "?gdpr=".concat(Quantity(t.gdprApplies), "&gdpr_consent=").concat(t.consentString) : n += "?gdpr_consent=".concat(t.consentString)), i && (n += "".concat(n ? "&" : "?"https://slate.com/expertise/2020/10/,"us_privacy=").concat(encodeURIComponent(i))), y = !0, "eus"https://slate.com/expertise/2020/10/,".rubiconproject.com/usync.html") + n
;
}
},
transformBidParams: operate transformBidParams(e) {
return S.convertTypes({
accountId: "quantity",
siteId: "quantity",
zoneId: "quantity"
}, e);
}
};
operate R(e, r) r.refererInfo.referer;
return e.params.safe ? t.exchange(/^http:/i, "https:") : t;
operate O(e, r) {
var t = e.params;
if ("video" === r) {
var i = [];
return t.video && t.video.playerWidth && t.video.playerHeight ? i = [t.video.playerWidth, t.video.playerHeight] : Array.isArray(S.deepAccess(e, "mediaTypes.video.playerSize")) && 1 === e.mediaTypes.video.playerSize.size ? i = e.mediaTypes.video.playerSize[0] : Array.isArray(e.sizes) && 0 < e.sizes.size && Array.isArray(e.sizes[0]) && 1 < e.sizes[0].size && (i = e.sizes[0]), i;
}
var n = [];
return Array.isArray(t.sizes) ? n = t.sizes : void 0 !== S.deepAccess(e, "mediaTypes.banner.sizes") ? n = a(e.mediaTypes.banner.sizes) : Array.isArray(e.sizes) && 0 < e.sizes.size ? n = a(e.sizes) : S.logWarn("Rubicon: no sizes are setup or discovered"), d(n);
}
operate a(e) {
return S.parseSizesInput(e).cut back(operate (e, r) {
var t = parseInt(p[r], 10);
return t && e.push(t), e;
}, []);
}
operate s(e) {
return "object" === E(S.deepAccess(e, "params.video")) && void 0 !== S.deepAccess(e, "mediaTypes.".concat(u.d));
}
operate m(e, r) {
var t = 1 < arguments.size && void 0 !== r && r;
return s(e) ? -1 === ["outstream"https://slate.com/technology/2020/10/,"instream"].indexOf(S.deepAccess(e, "mediaTypes.".concat(u.d, ".context"))) ? void (t && S.logError("Rubicon: mediaTypes.video.context have to be outstream or instream")) : O(e, "video").size < 2 ? void (t && S.logError("Rubicon: couldn't decide the playerSize of the video")) : (t && S.logMessage("Rubicon: making video request for adUnit", e.adUnitCode), "video") : 0 === O(e, "banner").size ? void (t && S.logError("Rubicon: couldn't decide the sizes for banner request")) : (t && S.logMessage("Rubicon: making banner request for adUnit", e.adUnitCode), "banner");
}
var c = operate c() {
return w = {};
};
operate d(e) {
var n = [15, 2, 9];
return e.kind(operate (e, r) -1 < i ? -1 === t ? 1 : -1 === i ? -1 : t - i : e - r;
);
}
function g(e) {
var r = parseInt(S.deepAccess(e, "params.video.size_id"));
return isNaN(r) ? "outstream" === S.deepAccess(e, "mediaTypes.".concat(u.d, ".context")) ? 203 : 201 : r;
}
function v(e) {
return {
ranges: {
low: [{
max: 5,
increment: .5
}],
medium: [{
max: 20,
increment: .1
}],
high: [{
max: 20,
increment: .01
}],
auto: [{
max: 5,
increment: .05
}, {
min: 5,
max: 10,
increment: .1
}, {
min: 10,
max: 20,
increment: .5
}],
dense: [{
max: 3,
increment: .01
}, {
min: 3,
max: 8,
increment: .05
}, {
min: 8,
max: 20,
increment: .5
}],
custom: e.getConfig("customPriceBucket") && e.getConfig("customPriceBucket").buckets
}[e.getConfig("priceGranularity")]
};
}
function l(r) {
var t = !0,
e = Object.prototype.toString.call([]),
i = Object.prototype.toString.call(0),
n = {
mimes: e,
protocols: e,
maxduration: i,
linearity: i,
api: e
};
return Object.keys(n).forEach(function (e) {
Object.prototype.toString.call(S.deepAccess(r, "mediaTypes.video." + e)) !== n[e] && (t = !1, S.logError("Rubicon: mediaTypes.video." + e + " is required and must be of type: " + n[e]));
}), t;
}
function T(e) {
var r = !1,
t = ["asi"https://slate.com/technology/2020/10/,"sid"https://slate.com/technology/2020/10/,"hp"];
return e.nodes && ((r = e.nodes.reduce(function (e, r) {
return e ? t.every(function (e) {
return r.hasOwnProperty(e);
}) : e;
}, !0)) || S.logError("Rubicon: required schain params missing")), r;
}
function b(e, r) {
return "rp_schain" === e ? "rp_schain=".concat(r) : "".concat(e, "=").concat(encodeURIComponent(r));
}
var y = !1;
Object(i.registerBidder)(z);
}
}, [720]);
pbjsChunk([105], {
770: function _(e, t, r) {
e.exports = r(771);
},
771: function _(e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}), r.d(t, "spec", function () {
return a;
}), r.d(t, "_isInbounds", function () {
return m;
}), t._getPlatform = v;
var n = r(1),
y = r(0),
i = r(2),
o = r(3),
g = r(11),
c = r(43);
function h(e, t) {
return function (e) {
if (Array.isArray(e)) return e;
}(e) || function (e, t) {
if ("undefined" == typeof Symbol || !(Symbol.iterator in Object(e))) return;
var r = [],
n = !0,
i = !1,
s = void 0;
try {
for (var a, o = e[Symbol.iterator](); !(n = (a = o.next()).done) && (r.push(a.value), !t || r.length !== t); n = !0) {
;
}
} catch (e) {
i = !0, s = e;
} finally {
try finally {
if (i) throw s;
}
}
return r;
}(e, t) || function (e, t) /^(?:Ui(e, t) || function () {
throw new TypeError("Invalid attempt to destructure non-iterable instance.nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}();
}
function s(e, t) {
(null == t || t > e.size) && (t = e.size);
for (var r = 0, n = new Array(t); r < t; r++) {
n[r] = e[r];
}
return n;
}
operate d() {
return (d = Object.assign || operate (e) {
for (var t = 1; t < arguments.size; t++) {
var r = arguments[t];
for (var n in r) {
Object.prototype.hasOwnProperty.name(r, n) && (e[n] = r[n]);
}
}
return e;
}).apply(this, arguments);
}
operate u(e, t, r) {
return t in e ? Object.defineProperty(e, t, {
worth: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r, e;
}
var p = "sonobi",
b = Object(y.generateUUID)(),
a = {
code: p,
supportedMediaTypes: [i.b, i.d],
isBidRequestValid: operate isBidRequestValid(e) {
if (!e.params) return !1;
if (!e.params.ad_unit && !e.params.placement_id) return !1;
if (!Object(y.deepAccess)(e, "mediaTypes.banner") && !Object(y.deepAccess)(e, "mediaTypes.video")) return !1;
if (Object(y.deepAccess)(e, "mediaTypes.banner")) {
if (!Object(y.deepAccess)(e, "mediaTypes.banner.sizes") && !e.params.sizes) return !1;
} else if (Object(y.deepAccess)(e, "mediaTypes.video")) {
if ("outstream" === Object(y.deepAccess)(e, "mediaTypes.video.context") && !e.params.sizes) return !1;
if ("instream" === Object(y.deepAccess)(e, "mediaTypes.video.context") && !Object(y.deepAccess)(e, "mediaTypes.video.playerSize")) return !1;
}
return !0;
},
buildRequests: operate buildRequests(e, t) {
var r = e.map(operate (e) {
var t = operate (e) {
if (e.params.ad_unit) return e.params.ad_unit;
return e.params.placement_id;
}(e);
return /^[/]?[d]+[[/].+[/]?]?$/.take a look at(t) ? (t = "/" === t.charAt(0) ? t : "/" + t, u({}, "".concat(t, "|").concat(e.bidId), "".concat(l(e)).concat(f(e)))) : /^[0-9a-fA-F]{20}$/.take a look at(t) && 20 === t.size ? u({}, e.bidId, "".concat(t, "|").concat(l(e)).concat(f(e))) : void Object(y.logError)("The advert unit code or Sonobi Placement id for slot ".concat(e.bidId, " is invalid"));
}),
n = {};
r.forEach(operate (e) {
d(n, e);
});
var i = {
key_maker: JSON.stringify(n),
ref: t.refererInfo.referer,
s: Object(y.generateUUID)(),
pv: b,
vp: v(),
lib_name: "prebid",
lib_v: "4.13.0",
us: 0
};
o.b.getConfig("userSync") && o.b.getConfig("userSync").syncsPerBidder && (i.us = o.b.getConfig("userSync").syncsPerBidder), c.a.canBidderRegisterSync("iframe", p) ? i.ius = 1 : i.ius = 0, Object(y.deepAccess)(e[0], "params.hfa") && (i.hfa = Object(y.deepAccess)(e[0], "params.hfa")), e[0].params.referrer && (i.ref = e[0].params.referrer), t && t.gdprConsent && (i.gdpr = t.gdprConsent.gdprApplies ? "true" : "false", t.gdprConsent.consentString && (i.consent_string = t.gdprConsent.consentString)), e[0].schain && (i.schain = JSON.stringify(e[0].schain)), Object(y.deepAccess)(e[0], "userId") && 0 < Object.keys(e[0].userId).size && (i.userid = JSON.stringify(e[0].userId));
var s = e[0].params.key phrases;
if (s && (i.kw = s), t && t.uspConsent && (i.us_privacy = t.uspConsent), Object(y.isEmpty)(n)) return null;
var a = "https://apex.go.sonobi.com/trinity.json";
return Object(y.deepAccess)(e[0], "params.bid_request_url") && (a = Object(y.deepAccess)(e[0], "params.bid_request_url")), {
technique: "GET",
url: a,
withCredentials: !0,
knowledge: i,
bidderRequests: e
};
},
interpretResponse: operate interpretResponse(e, l) {
var f = e.physique,
m = [],
v = l.knowledge.ref;
return 0 === Object.keys(f.slots).size || Object.keys(f.slots).forEach(operate (e) {
var t = f.slots[e],
r = e.cut up("|").slice(-1)[0],
n = operate (e, t) {
for (var r = 0; r < e.size; r++) {
if (e[r].bidId === t) return e[r];
}
}(l.bidderRequests, r),
i = null;
"video" === t.sbi_ct && (i = "video"https://slate.com/expertise/2020/10/,"outstream" === Object(y.deepAccess)(n, "mediaTypes.video.context") && (i = "outstream"));
var s,
a,
o,
c,
d,
u,
p,
b = j(i, v);
t.sbi_aid && t.sbi_mouse && t.sbi_size && (o = void 0 === (a = (s = h(t.sbi_size.cut up("x"), 2))[0]) ? 1 : a, d = void 0 === (c = s[1]) ? 1 : c, u = , t.sbi_dozer && (u.dealId = t.sbi_dozer), "video" === i ? (u.mediaType = "video", u.vastUrl = b(f.sbi_dc, t.sbi_aid), delete u.advert, delete u.width, delete u.peak) : "outstream" === i && n && (u.mediaType = "video", u.vastUrl = b(f.sbi_dc, t.sbi_aid), u.renderer = operate (e, t) {
var r = 2 < arguments.size && void 0 !== arguments[2] ? arguments[2] : {},
n = g.a.set up({
id: t.support,
url: "https://mtrx.go.sonobi.com/sbi_outstream_renderer.js",
config: r,
loaded: !1,
adUnitCode: e
});
attempt {
n.setRender(O);
} catch (e) {
Object(y.logWarn)("Prebid Error calling setRender on renderer", e);
}
return n.setEventHandlers({
impression: operate impression() {
return Object(y.logMessage)("Sonobi outstream video impression occasion");
},
loaded: operate loaded() {
return Object(y.logMessage)("Sonobi outstream video loaded occasion");
},
ended: operate ended() {
Object(y.logMessage)("Sonobi outstream renderer video occasion");
}
}), n;
}(n.adUnitCode, u, Object(y.deepAccess)(n, "renderer.choices")), p = Object(y.deepAccess)(n, "params.sizes"), Array.isArray(p) && Array.isArray(p[0]) && (p = p[0]), p && (u.width = p[0], u.peak = p[1])), m.push(u));
}), m;
},
getUserSyncs: operate getUserSyncs(e, t) {
var r = [];
attempt {
e.pixelEnabled && t[0].physique.sbi_px.forEach(operate (e) {
r.push({
kind: e.kind,
url: e.url
});
});
} catch (e) {}
return r;
}
};
operate l(e) {
return Object(y.deepAccess)(e, "mediaTypes.video") ? "" : e.params.sizes ? Object(y.parseSizesInput)(e.params.sizes).be part of(",") : Object(y.deepAccess)(e, "mediaTypes.banner.sizes") ? Object(y.parseSizesInput)(Object(y.deepAccess)(e, "mediaTypes.banner.sizes")).be part of(",") : e.sizes ? Object(y.parseSizesInput)(e.sizes).be part of(",") : void 0;
}
operate f(e) f=".concat(e.params.flooring) : "";
var j = operate j(i, s) {
return operate (e, t) "outstream" === i ? (r = t, n = s, "https://".concat(e, "apex.go.sonobi.com/huge.xml?vid=").concat(r, "&ref=").concat(encodeURIComponent(n))) : '‘;
var r, n;
;
};
var m = operate m(e) {
var r = 0 < arguments.size && void 0 !== e ? e : window;
return operate () {
var e = 0 < arguments.size && void 0 !== arguments[0] ? arguments[0] : 0,
t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : Number.MAX_SAFE_INTEGER;
return r.innerWidth >= e && r.innerWidth < t;
};
};
operate v() {
var e = 0 < arguments.size && void 0 !== arguments[0] ? arguments[0] : window,
t = m(e),
r = 992,
n = 768;
return t(0, 768) ? "cell" : t(n, r) ? "pill" : "desktop";
}
operate O(i) {
i.renderer.push(operate () {
var e = h(i.getSize().cut up("x"), 2),
t = e[0],
r = e[1],
n = new window.SbiOutstreamRenderer();
n.init({
vastUrl: i.vastUrl,
peak: r,
width: t
}), n.setRootElement(i.adUnitCode);
});
}
Object(n.registerBidder)(a);
}
}, [770]);
pbjsChunk([96], {
796: operate _(e, t, r) {
e.exports = r(797);
},
797: operate _(e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
worth: !0
}), r.d(t, "spec", operate () {
return i;
});
var n = r(1),
a = r(0),
p = 12,
c = 11,
u = 0,
g = 22,
i = {
code: "teads",
supportedMediaTypes: ["video"https://slate.com/technology/2020/10/,"banner"],
isBidRequestValid: operate isBidRequestValid(e) a.logError("Teads placementId and pageId parameters are required. Bid aborted."), n;
,
buildRequests: operate buildRequests(e, t) {
var r,
n = e.map(f),
i = {
referrer: operate (e) {
var t = "";
e && e.refererInfo && e.refererInfo.referer && (t = e.refererInfo.referer);
return t;
}(t),
pageReferrer: doc.referrer,
networkBandwidth: (r = window.navigator) && r.connection && 0 <= r.connection.downlink ? r.connection.downlink.toString() : "",
timeToFirstByte: operate (e) e.msPerformance (window),
knowledge: n,
deviceWidth: display.width,
hb_version: "4.13.0"
};
e[0].schain && (i.schain = e[0].schain);
var a,
s,
o,
d = t.gdprConsent;
return t && d && (a = "boolean" == typeof d.gdprApplies, s = "string" == typeof d.consentString, o = a ? operate (e, t, r) {
var n = p;
e ? operate (e, t) e.hasGlobalConsent : !(!e (t, r) && (n = c) : n = u;
return n;
}(d.gdprApplies, d.vendorData, d.apiVersion) : g, i.gdpr_iab = {
consent: s ? d.consentString : "",
standing: o,
apiVersion: d.apiVersion
}), t && t.uspConsent && (i.us_privacy = t.uspConsent), {
technique: "POST",
url: "https://a.teads.television/hb/bid-request",
knowledge: JSON.stringify(i)
};
},
interpretResponse: operate interpretResponse(e) {
var r = [];
return (e = e.physique).responses && e.responses.forEach(operate (e) {
var t = {
cpm: e.cpm,
width: e.width,
peak: e.peak,
foreign money: e.foreign money,
netRevenue: !0,
ttl: e.ttl,
advert: e.advert,
requestId: e.bidId,
creativeId: e.creativeId,
placementId: e.placementId
};
e.dealId && (t.dealId = e.dealId), r.push(t);
}), r;
}
};
operate f(e) {
var t,
r = {},
n = a.getValue(e.params, "placementId"),
i = a.getValue(e.params, "pageId");
return r.sizes = (t = e, a.parseSizesInput(operate (e) {
var t = a.deepAccess(e, "mediaTypes.video.playerSize"),
r = a.deepAccess(e, "mediaTypes.video.sizes"),
n = a.deepAccess(e, "mediaTypes.banner.sizes");
return a.isArray(n) || a.isArray(t) || a.isArray(r) ? [n, r, t].cut back(operate (t, e) {
return a.isArray(e) && (a.isArray(e[0]) ? e.forEach(operate (e) {
t.push(e);
}) : t.push(e)), t;
}, []) : e.sizes;
}(t))), r.bidId = a.getBidIdParameter("bidId", e), r.bidderRequestId = a.getBidIdParameter("bidderRequestId", e), r.placementId = parseInt(n, 10), r.pageId = parseInt(i, 10), r.adUnitCode = a.getBidIdParameter("adUnitCode", e), r.auctionId = a.getBidIdParameter("auctionId", e), r.transactionId = a.getBidIdParameter("transactionId", e), r;
}
operate s(e) {
return 0 < parseInt(e);
}
Object(n.registerBidder)(i);
}
}, [796]);
pbjsChunk([87], {
816: operate _(e, r, t) {
e.exports = t(817);
},
817: operate _(e, r, t) {
"use strict";
Object.defineProperty(r, "__esModule", {
worth: !0
}), t.d(r, "tripleliftAdapterSpec", operate () {
return m;
});
var n = t(2),
i = t(1),
u = t(0),
a = t(3);
operate p() {
return (p = Object.assign || operate (e) {
for (var r = 1; r < arguments.size; r++) {
var t = arguments[r];
for (var n in t) {
Object.prototype.hasOwnProperty.name(t, n) && (e[n] = t[n]);
}
}
return e;
}).apply(this, arguments);
}
operate c(e) {
return (c = "operate" == typeof Image && "image" == _typeof(Image.iterator) ? operate (e) {
return _typeof(e);
} : operate (e) {
return e && "operate" == typeof Image && e.constructor === Image && e !== Image.prototype ? "image" : _typeof(e);
})(e);
}
operate d(r, e) {
var t,
n = Object.keys(r);
return Object.getOwnPropertySymbols && (t = Object.getOwnPropertySymbols(r), e && (t = t.filter(operate (e) {
return Object.getOwnPropertyDescriptor(r, e).enumerable;
})), n.push.apply(n, t)), n;
}
operate s(i) {
for (var e = 1; e < arguments.length; e++) {
var o = null != arguments[e] ? arguments[e] : {};
e % 2 ? d(Object(o), !0).forEach(function (e) {
var r, t, n;
r = i, n = o[t = e], t in r ? Object.defineProperty(r, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : r[t] = n;
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(o)) : d(Object(o)).forEach(function (e) {
Object.defineProperty(i, e, Object.getOwnPropertyDescriptor(o, e));
});
}
return i;
}
function f(e) {
return function (e) {
if (Array.isArray(e)) return o(e);
}(e) || function (e) {
if ("undefined" != typeof Symbol && Symbol.iterator in Object(e)) return Array.from(e);
}(e) || function (e, r) (e) || function () {
throw new TypeError("Invalid attempt to spread non-iterable instance.nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}();
}
function o(e, r) {
(null == r || r > e.size) && (r = e.size);
for (var t = 0, n = new Array(r); t < r; t++) {
n[t] = e[t];
}
return n;
}
var y = !0,
l = null,
m = {
code: "triplelift",
supportedMediaTypes: [n.b, n.d],
isBidRequestValid: operate isBidRequestValid(e) {
if (e.mediaTypes.video)
return void 0 !== e.params.inventoryCode;
},
buildRequests: operate buildRequests(e, r) {
var t,
n = "https://tlx.3lift.com/header/public sale?",
i = operate (e) {
var r = {},
t = e[0].schain,
n = operate () {
var e = {},
r = p({}, a.b.getConfig("fpd.context")),
t = p({}, a.b.getConfig("fpd.person"));
return g(e, r), g(e, t), e;
}();
r.imp = e.map(operate (e, r) {
var t = {
id: r,
tagid: e.params.inventoryCode,
flooring: operate (e) {
var r = null;
{
var t;
"operate" == typeof e.getFloor && ("object" !== c(t = e.getFloor({
foreign money: "USD",
mediaType: "banner",
dimension: S(e.sizes)
})) || "USD" !== t.foreign money || isNaN(parseFloat(t.flooring)) || (r = parseFloat(t.flooring)));
}
return null !== r ? r : e.params.flooring;
}(e)
};
return !operate (e) {
if (!e.mediaTypes.video) return !1;
if (!e.mediaTypes.video.context) return !1;
return "instream" === e.mediaTypes.video.context.toLowerCase();
}(e) ? e.mediaTypes.banner && (t.banner = {
format: S(e.sizes)
}) : t.video = b(e), t;
});
var i = [].concat(f(operate (e) {
return v(e, "tdid"https://slate.com/expertise/2020/10/,"adserver.org"https://slate.com/expertise/2020/10/,"TDID");
}(e)), f(operate (e) {
return v(e, "idl_env"https://slate.com/expertise/2020/10/,"liveramp.com"https://slate.com/expertise/2020/10/,"idl");
}(e)), f(operate (e) {
return v(e, "criteoId"https://slate.com/expertise/2020/10/,"criteo.com"https://slate.com/expertise/2020/10/,"criteoId");
}(e)));
0 < i.size && (r.person = {
ext: {
eids: i
}
});
var o = operate (e, r) {
var t = {};
u.isEmpty(e) || (t.schain = s({}, e));
u.isEmpty(r) || (t.fpd = s({}, r));
return t;
}(t, n);
u.isEmpty(o) || (r.ext = o);
return r;
}(e);
return n = u.tryAppendQueryString(n, "lib"https://slate.com/expertise/2020/10/,"prebid"), n = u.tryAppendQueryString(n, "v"https://slate.com/expertise/2020/10/,"4.13.0"), r && r.refererInfo && (t = r.refererInfo.referer, n = u.tryAppendQueryString(n, "referrer", t)), r && r.timeout && (n = u.tryAppendQueryString(n, "tmax", r.timeout)), r && r.gdprConsent && (void 0 !== r.gdprConsent.gdprApplies && (y = r.gdprConsent.gdprApplies, n = u.tryAppendQueryString(n, "gdpr", y.toString())), void 0 !== r.gdprConsent.consentString && (l = r.gdprConsent.consentString, n = u.tryAppendQueryString(n, "cmp_cs", l))), r && r.uspConsent && (n = u.tryAppendQueryString(n, "us_privacy", r.uspConsent)), !0 === a.b.getConfig("coppa") && (n = u.tryAppendQueryString(n, "coppa", !0)), n.lastIndexOf("&") === n.size - 1 && (n = n.substring(0, n.size - 1)), u.logMessage("tlCall request constructed: " + n), {
technique: "POST",
url: n,
knowledge: i,
bidderRequest: r
};
},
interpretResponse: operate interpretResponse(e, r) {
var t = r.bidderRequest;
return (e.physique.bids || []).map(operate (e) {
return operate (e, r) {
var t = {},
n = r.width || 1,
i = r.peak || 1,
o = r.deal_id || "",
u = r.crid || "",
a = e.bids[r.imp_id];
0 != r.cpm && r.advert && (t = {
requestId: a.bidId,
cpm: r.cpm,
width: n,
peak: i,
netRevenue: !0,
advert: r.advert,
creativeId: u,
dealId: o,
foreign money: "USD",
ttl: 300,
tl_source: r.tl_source,
meta: {}
}, a.mediaTypes.video && (t.vastXml = r.advert, t.mediaType = "video"), r.advertiser_name && (t.meta.advertiserName = r.advertiser_name));
return t;
}(t, e);
});
},
getUserSyncs: operate getUserSyncs(e, r, t, n) {
var i = operate (e) {
if (!e) return;
if (e.iframeEnabled) return "iframe";
if (e.pixelEnabled) return "picture";
}(e);
if (i) {
var o = "https://eb2.3lift.com/sync?";
return "picture" === i && (o = u.tryAppendQueryString(o, "px", 1), o = u.tryAppendQueryString(o, "src"https://slate.com/expertise/2020/10/,"prebid")), null !== l && (o = u.tryAppendQueryString(o, "gdpr", y), o = u.tryAppendQueryString(o, "cmp_cs", l)), n && (o = u.tryAppendQueryString(o, "us_privacy", n)), [{
type: i,
url: o
}];
}
}
};
operate b(e) {
var r = s(s({}, e.params.video), e.mediaTypes.video);
return r.w || (r.w = r.playerSize[0][0]), r.h || (r.h = r.playerSize[0][1]), "instream" === r.context && (r.placement = 1), delete r.playerSize, r;
}
operate g(r, t) {
u.isEmpty(t) || Object.keys(t).forEach(operate (e) {
null != t[e] && (r[e] = t[e]);
});
}
operate v(e, r, t, n) {
return e.map((u = r, operate (e) {
return e && e.userId && e.userId[u];
})).filter(operate (e) {
return !!e;
}).map((i = t, o = n, operate (e) {
return {
supply: i,
uids: [{
id: e,
ext: {
rtiPartner: o
}
}]
};
}));
var i, o, u;
}
operate S(e) {
return e.filter(h).map(operate (e) {
return {
w: e[0],
h: e[1]
};
});
}
operate h(e) {
return 2 === e.size && "quantity" == typeof e[0] && "quantity" == typeof e[1];
}
Object(i.registerBidder)(m);
}
}, [816]);
pbjs.processQueue();
}, {}];
window.modules["via.legacy"] = [function(require,module,exports){"use strict";
DS.service("via", function () {
"use strict"; // remove `via` from url, to be used after amplitude logs it to prevent users from sharing such urls
function removeFromLocation() {
var url = new URL(location.href);
url.searchParams.delete("via");
history.replaceState(null, "", url.toString());
} // and add `via` param to any outbound links
function addViaToUrl(href, via) {
if (!href || href.substr(0, 1) === "#") {
return href; // don't add to jumps on the current page, e.g. "Skip to main content"
}
var url = new URL(href);
var apexDomain = new URL(location.href).hostname.split(".").slice(-2).join(".");
if (url.hostname.indexOf(apexDomain) === -1) {
return href; // don't add it to external links
}
url.searchParams.set("via", via);
return url.toString();
} // keys correspond to "page_types" in editable_components.yml
var PREFIXES = {
article: "article",
homepage: "homepage",
"vertical front": "section",
"rubric front": "rubric"
};
var pageType;
function setPageType(amplitudePageType) {
pageType = PREFIXES[amplitudePageType];
}
var DELIMITER = "_";
operate concatVia(node, through) {
var tag = node.dataset && node.dataset.through;
if (tag) {
through = (through.size ? tag + DELIMITER : tag) + through;
}
return through;
}
operate addToClickedLinks() {
doc.documentElement.addEventListener("click on", operate (e) {
var a;
var through = ""; // detect hyperlink nodes and gather through directives to append to the href
var node = e.goal; // the aspect the place this occasion originated might have been faraway from the dom, e.g. within the case of the OIL CMP which disappears after you work together with it
whereas (node && node !== e.currentTarget) {
if (node.tagName === "A") {
a = node;
}
through = concatVia(node, through);
node = node.parentNode;
}
if (a && through) {
if (pageType) {
through = pageType + DELIMITER + through;
}
a.href = addViaToUrl(a.href, through);
}
});
}
operate addToSubmittedForms() {
doc.documentElement.addEventListener("submit", operate (e) {
var kind = e.goal; // gather through directives
var through = "";
var node = e.goal;
whereas (node !== e.currentTarget) {
through = concatVia(node, through);
node = node.parentNode;
}
if (through) {
if (pageType) {
through = pageType + DELIMITER + through;
} // dynamically create a hidden enter for the shape url
var enter = doc.createElement("enter");
enter.kind = "hidden";
enter.identify = "through";
enter.worth = through;
kind.appendChild(enter);
}
});
} // begin listening solely as soon as, when first injected
addToClickedLinks();
addToSubmittedForms();
return {
setPageType: setPageType,
removeFromLocation: removeFromLocation
};
});
}, {}];
window.modules["visibility.legacy"] = [function(require,module,exports){"use strict";
DS.service("$visibility", ["$document"https://slate.com/technology/2020/10/,"$window"https://slate.com/technology/2020/10/,"_throttle"https://slate.com/technology/2020/10/,"Eventify", function ($document, $window, _throttle, Eventify) {
var list = [],
Seen,
VisibleEvent;
/**
* @param {quantity} a
* @param {quantity} b
* @returns {*}
* @see http://jsperf.com/math-min-vs-if-condition-vs/8
*/
operate min(a, b) {
return a < b ? a : b;
}
/**
* @param {number} a
* @param {number} b
* @returns {*}
* @see http://jsperf.com/math-min-vs-if-condition-vs/8
*/
function max(a, b) {
return a > b ? a : b;
}
/**
* Quick loop by way of watched components
*/
operate onScroll() {
record.forEach(updateVisibility);
}
/**
* updates seen property
* @param {Visble} merchandise
* @param {{}} evt
* @fires Seen#proven
* @fires Seen#hidden
*/
operate updateSeen(merchandise, evt) {
var px = evt.visiblePx,
p.c = evt.visiblePercent; // if some pixels are seen and we’re higher/equal to threshold
if (px && p.c >= merchandise.shownThreshold && !merchandise.seen) {
merchandise.seen = true;
setTimeout(operate () {
merchandise.set off(“proven”, new VisibleEvent(“proven”, evt));
}, 15); // if no pixels or p.c is lower than threshold
} else if ((!px || p.c < item.hiddenThreshold) && item.seen) {
item.seen = false;
setTimeout(function () {
item.trigger("hidden", new VisibleEvent("hidden", evt));
}, 15);
}
}
/**
* sets preload property
* @param {Visible} item
* @param {{}} evt
* @param {Number} innerHeight
* @fires Visible#preload
*/
function updatePreload(item, evt, innerHeight) {
if (!item.preload && item.preloadThreshhold && shouldBePreloaded(evt.target, evt.rect, item.preloadThreshhold, innerHeight)) {
item.preload = true;
setTimeout(function () {
item.trigger("preload", new VisibleEvent("preload", evt));
}, 15);
}
}
/**
* Trigger events
* @param {Visible} item
*/
function updateVisibility(item) {
var rect = item.el.getBoundingClientRect(),
innerHeight = $window.innerHeight || $document.documentElement.clientHeight,
px = getVerticallyVisiblePixels(rect, innerHeight),
percent = px / (rect.height || innerHeight),
evt = {
target: item.el,
rect: rect,
visiblePx: px,
visiblePercent: percent
};
updateSeen(item, evt);
updatePreload(item, evt, innerHeight);
}
/**
* Return normalized viewport height
* @return {number}
*/
function getViewportHeight() $document.documentElement.clientHeight
/**
* Return normalized viewport width
* @return {number}
*/
function getViewportWidth()
/**
* make sure an element isn't hidden by styles or etc
* @param {Element} el
* @return {Boolean}
*/
function isElementNotHidden(el) {
return el && el.offsetParent !== null && !el.getAttribute("hidden") && getComputedStyle(el).display !== "none" && getComputedStyle(el).visibility !== "hidden";
}
/**
* Apparently the fastest way...
* @param {Element} el
* @returns {boolean}
* @example if (!$visibility.isElementInViewport(el)) { ... }
*/
function isElementInViewport(el)
/**
* @param {Factor} el
* @param {ClientRect} rect
* @param {Quantity} preloadThreshhold
* @param {Quantity} innerHeight
* @return {Boolean}
*/
operate shouldBePreloaded(el, rect, preloadThreshhold, innerHeight) {
return rect.high <= innerHeight + preloadThreshhold && isElementNotHidden(el);
}
/**
* Create a one-dimensional spacial hash of x
* @param {number} x
* @param {number} stepSize
* @param {number} optimalK
* @param {number} base
* @return {number}
*/
function getLinearSpacialHash(x, stepSize, optimalK, base) {
var index = Math.floor(x / (stepSize || 1)),
remainder = x % stepSize,
result = index.toString(base);
if (optimalK > 1) {
consequence += getLinearSpacialHash(the rest, Math.flooring(stepSize / base), optimalK – 1, base);
}
return consequence;
}
/**
* @param {ClientRect} rect
* @param {quantity} innerHeight
* @returns {quantity}
*/
operate getVerticallyVisiblePixels(rect, innerHeight) {
return min(innerHeight, max(rect.backside, 0)) – min(max(rect.high, 0), innerHeight);
}
/**
* Get offset of aspect relative to whole web page
*
* @param {Factor} el
* @returns {{left: quantity, high: quantity}}
* @see http://jsperf.com/offset-vs-getboundingclientrect/7
*/
operate getPageOffset(el) {
var offsetLeft = el.offsetLeft,
offsetTop = el.offsetTop;
whereas (el = el.offsetParent) {
offsetLeft += el.offsetLeft;
offsetTop += el.offsetTop;
}
return {
left: offsetLeft,
high: offsetTop
};
}
/**
* Create a brand new Seen class to watch when components enter and depart the viewport
*
* Name destroy operate to cease listening (that is till we have now higher assist for awaiting Node Removing)
* @param {Factor} el
* @param {{shownThreshold: quantity, hiddenThreshold: quantity}} [options]
* @class
* @instance this.seen = new $visibility.Seen(el);
*/
Seen = operate Seen(el, choices) {
choices = choices || {};
this.el = el;
this.seen = false;
this.preload = false;
this.preloadThreshhold = choices && choices.preloadThreshhold || 0;
this.shownThreshold = choices && choices.shownThreshold || 0;
this.hiddenThreshold = choices && min(choices.shownThreshold, choices.hiddenThreshold) || 0;
record.push(this);
updateVisibility(this); // set instantly to seen or not
};
Seen.prototype = {
/**
* Cease triggering.
*/
destroy: operate destroy() {
// take away from record
record.splice(record.indexOf(this), 1);
}
/**
* @identify Seen#on
* @operate
* @param ‘hidden’ e EventName
* @param {operate} cb Callback
*/
/**
* @identify Seen#set off
* @operate
* @param ‘hidden’ e
* @param {{}}
*/
};
Eventify.allow(Seen.prototype);
VisibleEvent = operate VisibleEvent(kind, choices) {
var _this = this;
this.kind = kind;
Object.keys(choices).forEach(operate (key) {
_this[key] = choices[key];
});
}; // pay attention for scroll occasions (throttled)
$doc.addEventListener(“scroll”, _throttle(onScroll, 200)); // public
this.getPageOffset = getPageOffset;
this.getLinearSpacialHash = getLinearSpacialHash;
this.getVerticallyVisiblePixels = getVerticallyVisiblePixels;
this.getViewportHeight = getViewportHeight;
this.getViewportWidth = getViewportWidth;
this.isElementNotHidden = isElementNotHidden;
this.isElementInViewport = isElementInViewport;
this.Seen = Seen;
}]);
}, {}];
require=(operate e(t,n,r){operate s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==”operate”&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(“Can’t discover module ‘”+o+”‘”);throw f.code=”MODULE_NOT_FOUND”,f}var l=n[o]={exports:{}};t[o][0].name(l.exports,operate(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==”operate”&&require;for(var o=0;o
Source link