Files
ai/charting_library/bundles/six-months-dialog.2397e41c2cae1012afe5.js
2023-02-02 13:31:14 +00:00

2 lines
3.1 KiB
JavaScript

(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[4816],{32735:e=>{e.exports={dialog:"dialog-tq2E4Gaq",container:"container-tq2E4Gaq",closeButton:"closeButton-tq2E4Gaq",header:"header-tq2E4Gaq",image:"image-tq2E4Gaq",title:"title-tq2E4Gaq","main-content":"main-content-tq2E4Gaq",paragraph:"paragraph-tq2E4Gaq",list:"list-tq2E4Gaq","list-item":"list-item-tq2E4Gaq",strong:"strong-tq2E4Gaq",actions:"actions-tq2E4Gaq","button-content":"button-content-tq2E4Gaq",button:"button-tq2E4Gaq",countDown:"countDown-tq2E4Gaq"}},35419:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SixMonthsDialog:()=>x,renderSixMonthsDialog:()=>C});var a=n(59496),o=n(87995),i=n(28353),l=(n(94419),n(93299)),c=n(5437),r=n(67844),s=n(3767),m=n(90692),d=n(37005),u=n(77975),h=n(45345),E=n(26843),p=n(53746),q=n(82760),g=n(86240),f=n(28328),v=n(81012),w=n(32735);function x(e){const{content:t,actionHref:n,onActionClick:o,onClose:l}=e,{title:p,mainContent:q,yesBtnText:f,cancelBtnText:v,imageSrc:x,showCloseBtn:C}=t,b=(0,u.useWatchedValueReadonly)({watchedValue:h.watchedTheme})||E.StdTheme.Light;return(0,d.useFixedBody)(),a.createElement(m.MatchMedia,{rule:g["media-mf-phone-landscape"]},e=>a.createElement(s.Modal,{isOpened:!0,fullscreen:!e,rounded:e,width:720,className:w.dialog},a.createElement(a.Fragment,null,C&&a.createElement(r.CloseButton,{className:w.closeButton,onClick:l,"aria-label":i.t("Close",{context:"input"}),size:"m"}),a.createElement("div",{className:w.container},a.createElement("div",null,a.createElement("div",{className:w.header},x&&x[b]&&a.createElement("img",{src:x[b],className:w.image}),a.createElement("h2",{className:w.title},p)),a.createElement("div",{className:w["main-content"]},q)),a.createElement("div",{className:w["button-content"]},a.createElement("div",{className:w.actions},!C&&a.createElement(c.RoundButton,{className:w.button,color:"red",variant:"ghost",onClick:l},v),a.createElement(c.RoundAnchorButton,{href:n,target:"_blank",className:w.button,onClick:o},f)))))))}function C(e){const{root:t,onClose:n,actionHref:c,onActionClick:r}=e,s={content:{imageSrc:{[E.StdTheme.Light]:f,[E.StdTheme.Dark]:v},title:i.t("This ends today"),mainContent:a.createElement(a.Fragment,null,a.createElement("div",{className:w.countDown},a.createElement(p.OfferCountdown,{theme:q.CountdownTheme.Profile,expiration:null===(d=null===(m=window.user.available_offers)||void 0===m?void 0:m[l.OFFERS.six_months])||void 0===d?void 0:d.expire_on,size:"m"})),a.createElement("p",{className:w.paragraph},i.t("You've not got long until your discount expires. Might want to grab it before it's too late."))),cancelBtnText:i.t("Decline offer"),yesBtnText:i.t("Get 6 months free")},actionHref:c,onActionClick:()=>{o.unmountComponentAtNode(t),void 0!==r&&r()},onClose:()=>{o.unmountComponentAtNode(t),void 0!==n&&n()}};var m,d;o.render(a.createElement(x,{...s}),t)}},86240:e=>{"use strict"
;e.exports=JSON.parse('{"size-header-height":"64px","media-phone":"screen and (max-width: 767px)","media-mf-phone-landscape":"screen and (min-width: 568px)","media-mf-tablet-vertical":"screen and (min-width: 768px)","media-mf-tablet-landscape":"screen and (min-width: 1024px)","media-mf-laptop":"screen and (min-width: 1280px)"}')}}]);