1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[81028],{39727:function(e,t,n){n.d(t,{AN:function(){return r.AN},Br:function(){return r.Br},KQ:function(){return r.KQ},MI:function(){return a},nP:function(){return u},u9:function(){return c}});var r=n(65550),l=n(60118);n(12043);var i=n(73656);i.env.MYRIAD_V2_API_URL,i.env.MYRIAD_V2_API_KEY,i.env.MYRIAD_V2_API_SECRET;let o={state:"open",tradingModel:"ob",groupByEvent:!0,limit:100};function u(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,l.a)(function(e){let{state:t,tradingModel:n,groupByEvent:r,limit:l,tags:i}={...o,tags:[],...e};return["myriad-markets",n,t,r,l,[...i].sort().join(",")]}(e),()=>{throw Error("Myriad markets are fetched server-side only")},{enabled:!1})}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{data:n}=u(t),l=null==n?void 0:n.find(t=>t.slug===e);return l&&(0,r.Br)(l)?l:void 0}function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{data:n}=u(t),l=null==n?void 0:n.find(t=>t.slug===e);return l&&(0,r.AN)(l)?l:void 0}},44451:function(e,t,n){n.d(t,{bn:function(){return w},cP:function(){return c},qT:function(){return a},x2:function(){return d},zd:function(){return u}});var r=n(65550),l=n(27469),i=n.n(l);let o="https://myriad.markets",u={priceForecast:"price-forecast",coinProjections:"coin-projections",coinMarket:"coin-market",coinSentiment:"coin-sentiment",articleEmbed:"article-embed",etfFlows:"etf-flows",predictionMarket:"prediction-market",topNewsSection:"top-news-section",featuredMarkets:"featured-markets"},c={homepage:"homepage",sitroom:"sitroom",marketPage:"market-page"},a=e=>e?e.slice(0,100):"article",s=e=>{let{campaign:t,context:n}=e;return"utm_source=decrypt&utm_medium=referral&utm_campaign=".concat(t)+"&utm_context=".concat(encodeURIComponent(n))},d=s,f=(e,t,n)=>"".concat(o,"/markets/").concat(e,"?outcome=").concat(t,"&").concat(s(n)),m=(e,t)=>"".concat(o,"/events/").concat(e,"?").concat(s(t));function h(e){let t=null==e?void 0:e.find(e=>0===e.id);return t&&"number"==typeof t.price?t.price:null}let v=e=>"$".concat(e.toLocaleString("en-US"));function b(e){return(null!=e?e:[]).filter(e=>"resolved"!==e.state).map(e=>{let t=function(e){if(!e)return null;let t=e.replace(/[^\d]/g,"");return t?Number(t):null}(e.shortName),n=h(e.outcomes);return null===t||null===n?null:{strike:t,yes:n,slug:e.slug}}).filter(e=>null!==e).sort((e,t)=>e.strike-t.strike)}function p(e){var t,n,r;let l=null!==(r=null===(n=e.markets)||void 0===n?void 0:null===(t=n[0])||void 0===t?void 0:t.shortName)&&void 0!==r?r:"";return!!/^above/i.test(l.trim())||!(/[ââ]/.test(l)||/target/i.test(e.title))&&/price on .*\butc/i.test(e.title)}function y(e){let t=null;for(let n=0;n<e.length-1;n++){let r=e[n].yes-e[n+1].yes;r>.5&&(!t||r>t.prob)&&(t={lower:e[n].strike,upper:e[n+1].strike,prob:r})}return t}function k(e){let t=e.filter(e=>99>Math.round(100*e.yes));return t.length?t.reduce((e,t)=>t.yes>e.yes?t:e):null}let g=e=>i()(e.expiresAt);function M(e){return/all[\s-]?time high|\bath\b/i.test(e.title)}function P(e){return/\bhighs in\b/i.test(e.title)}function N(e){return/\blows in\b/i.test(e.title)}function _(e,t,n,r){var l,i;let o=b(e.markets);if(!o.length)return null;let u=k(o);if(!u)return null;let c=null!==(i=null===(l=e.title.match(/\bin\s+(.+)$/i))||void 0===l?void 0:l[1].trim())&&void 0!==i?i:null;return{id:t,dateLabel:c?"".concat(n," in ").concat(c):n,headline:v(u.strike),direction:"up",chancePercent:Math.round(100*u.yes),href:m(e.slug,r),market:e}}function w(e,t,n){let l=e.filter(r.AN).filter(e=>{var t;return null===(t=e.markets)||void 0===t?void 0:t.length}),o=i()(),c=l.filter(p),a="number"==typeof t&&Number.isFinite(t),s=[];for(let e of[{key:"today",label:"End of today",boundary:o.endOf("day"),toleranceDays:1},{key:"week",label:"End of the week",boundary:o.endOf("week"),toleranceDays:4}
1,{key:"month",label:"End of the month",boundary:o.endOf("month"),toleranceDays:5},{key:"year",label:"End of the year",boundary:o.endOf("year"),toleranceDays:10}]){let r,l;let i=function(e,t){let n=null,r=1/0;for(let l of e){let e=Math.abs(g(l).diff(t,"day",!0));e<r&&(r=e,n=l)}return n?{event:n,distanceDays:r}:null}(c,e.boundary);if(!i||i.distanceDays>e.toleranceDays)continue;let o="up";if(a){let e=function(e,t){let n=b(e.markets);if(!n.length)return null;let r=y(n);if(r)return{headline:"".concat(v(r.lower)," to ").concat(v(r.upper)),chancePercent:Math.round(100*r.prob),direction:"up"};let l=n.length&&Number.isFinite(t)?n.reduce((e,n)=>Math.abs(n.strike-t)<Math.abs(e.strike-t)?n:e):null;if(!l)return null;let i=Math.round(100*l.yes);return i>=50?{headline:"Above ".concat(v(l.strike)),chancePercent:i,direction:"up"}:{headline:"Below ".concat(v(l.strike)),chancePercent:100-i,direction:"down"}}(i.event,t);if(!e)continue;r=e.headline,l=e.chancePercent,o=e.direction}else{let e=function(e){let t=b(e.markets);if(!t.length)return null;let n=y(t);if(n)return{headline:"".concat(v(n.lower)," to ").concat(v(n.upper)),chancePercent:Math.round(100*n.prob)};let r=k(t);return r?{headline:"Above ".concat(v(r.strike)),chancePercent:Math.round(100*r.yes)}:null}(i.event);if(!e)continue;r=e.headline,l=e.chancePercent}s.push({id:e.key,dateLabel:e.label,headline:r,direction:o,chancePercent:l,href:m(i.event.slug,n),market:i.event})}let d=l.find(P),w=l.find(N),A=[w&&_(w,"entry","Best entry price",n),d&&_(d,"exit","Best exit price",n)].filter(e=>!!e),E=l.find(M);return{projections:s,tradeTargets:A,cta:E?function(e,t){var n,l;let i=null!==(l=(null!==(n=e.markets)&&void 0!==n?n:[]).map(e=>{var t,n;let r=null===(n=e.shortName)||void 0===n?void 0:null===(t=n.match(/before\s+(\d{4})/i))||void 0===t?void 0:t[1];return r?{sub:e,year:Number(r)-1}:null}).filter(e=>null!==e).sort((e,t)=>e.year-t.year)[0])&&void 0!==l?l:null,o=h(null==i?void 0:i.sub.outcomes);if(!i||null===o)return null;let c=o>.5,a=c?0:1,s=c?1:0;return{caption:"NEXT BTC All-time high",question:"".concat(c?"In":"Not in"," ").concat(i.year),chancePercent:Math.round((c?o:1-o)*100),marketSlug:i.sub.slug,eventSlug:e.slug,agreeHref:f(i.sub.slug,a,{campaign:u.coinProjections,context:t}),disagreeHref:f(i.sub.slug,s,{campaign:u.coinProjections,context:t}),agreeOutcomeId:a,agreeOutcomeTitle:(0,r.KQ)(i.sub.outcomes,a),disagreeOutcomeId:s,disagreeOutcomeTitle:(0,r.KQ)(i.sub.outcomes,s)}}(E,n.context):null}}},65550:function(e,t,n){n.d(t,{AN:function(){return r},Br:function(){return l},KQ:function(){return i}});let r=e=>"event"===e.type,l=e=>"event"!==e.type,i=(e,t)=>{var n,r;return"number"==typeof t&&null!==(r=null==e?void 0:null===(n=e.find(e=>e.id===t))||void 0===n?void 0:n.title)&&void 0!==r?r:null}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.