1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1046],{15399:(e,r,t)=>{"use strict";t.d(r,{z:()=>o});var n=t(5646),o=n.Ay.div.withConfig({componentId:"sc-ac7ui0-0"})(function(e){var r=e.theme;return(0,n.AH)(["margin:"," auto 0 auto;width:",";min-height:100vh;"],r.sz.s32,r.sz.s20)})},47607:(e,r,t)=>{"use strict";t.d(r,{s:()=>w});var n=t(63857),o=t(60180),c=t.n(o),u=t(14232),i=t(5720),a=t(99634),s=t(42969);function l(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function d(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,n)}return t}function f(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?d(Object(t),!0).forEach(function(r){(0,s.A)(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}var p={examprep:{scriptUrl:"/kotlin-bundles/examprep/memrise-examprep-web.js",isReady:function(){var e;return!!(null!=(e=window.memriseExamPrepWeb)&&e.mount)}},"product-selection":{scriptUrl:"/kotlin-bundles/product-selection/memrise-product-selection-web.js",isReady:function(){var e;return!!(null!=(e=window.memriseProductSelectionWeb)&&e.mountProductSelection)}},podchats:{scriptUrl:"/kotlin-bundles/podchats/memrise-podchat-web.js",isReady:function(){var e,r,t;return!!(null!=(e=null==(r=window.memrisePodchatsWeb)?void 0:r.mount)?e:null==(t=window.memrisePodchatWeb)?void 0:t.mount)}},"reviewer-portal":{scriptUrl:"/kotlin-bundles/reviewer-portal/memrise-reviewer-portal-web.js",isReady:function(){var e;return!!(null!=(e=window.memriseReviewerPortalWeb)&&e.mount)}}},m=!1,h=new Set,y=null,v=new Map;function b(e){!function(){if(!m){m=!0;try{var e=Object.getOwnPropertyDescriptor(Navigator.prototype,"languages");if(!(null!=e&&e.get))return;Object.defineProperty(Navigator.prototype,"languages",f(f({},e),{},{get:function(){var r;return window.__customLocale?[window.__customLocale]:null==(r=e.get)?void 0:r.call(this)}}))}catch(e){}}}();var r=p[e],t=r.scriptUrl,n=r.isReady;if(n())return Promise.resolve();var o=v.get(e);if(o)return o;(!y&&(y=fetch("/kotlin-bundles/manifest.json").then(function(e){return e.ok?e.json():{}}).catch(function(){return{}})),y).then(function(r){var t=r[e];if(t){var n,o=function(e){var r="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e){if(e){if("string"==typeof e)return l(e,void 0);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,void 0):void 0}}(e))){r&&(e=r);var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return c=e.done,e},e:function(e){u=!0,o=e},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw o}}}}(t.preload);try{for(o.s();!(n=o.n()).done;){var c=n.value;!function(e,r,t,n){if(!("u"<typeof document)){var o="".concat(r,":").concat(e);if(!h.has(o)){h.add(o);var c=document.createElement("link");c.rel=r,c.href=e,t&&(c.as=t),n&&(c.type=n),"preload"===r&&c.setAttribute("crossorigin","anonymous"),document.head.appendChild(c)}}}(c,"preload","fetch","application/wasm")}}catch(e){o.e(e)}finally{o.f()}}});var c=new Promise(function(e,r){var n=document.createElement("script");n.src=t,n.async=!0,n.onload=function(){return e()},n.onerror=function(){return r(Error("Failed to load Kotlin bundle script: ".concat(t)))},document.head.appendChild(n)}).then(function(){if(!n())throw Error("".concat(e," bundle loaded but mount function not registered"))}).catch(function(r){throw v.delete(e),r});return v.set(e,c),c}function w(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"examprep",t=arguments.length>2?arguments[2]:void 0,o=(0,u.useRef)(null),s=(0,u.useRef)(!1),l=(0,u.useRef)(e);l.current=e;var d=(0,u.useRef)(t);d.current=t;var f=(0,a.u)().user,m=(0,i.tz)().locale,h=(0,u.useState)("loading"),y=h[0],v=h[1],w=(0,u.useState)(void 0),g=w[0],k=w[1];return(0,u.useEffect)(function(){b(r).catch(function(){})},[r]),(0,u.useEffect)(function(){if(null!=f&&f.id&&!s.current){var e,t=!1;return(e=(0,n.A)(c().mark(function e(){var n,u;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.all([b(r),null==(n=d.current)?void 0:n.call(d)]);case 3:if(!t){e.next=5;break}return e.abrupt("return");
1case 5:if(p[r].isReady()){e.next=7;break}throw Error("Kotlin module (".concat(r,") not loaded"));case 7:if(window.__customLocale=m,o.current){e.next=10;break}return e.abrupt("return");case 10:return u="kotlin-module-".concat(Date.now()),o.current.id=u,e.next=14,l.current(u);case 14:if(!t){e.next=16;break}return e.abrupt("return");case 16:s.current=!0,v("ready"),e.next=27;break;case 20:if(e.prev=20,e.t0=e.catch(0),!t){e.next=24;break}return e.abrupt("return");case 24:console.error("Failed to mount Kotlin module (".concat(r,"):"),e.t0),k(e.t0 instanceof Error?e.t0.message:"Unknown error"),v("error");case 27:case"end":return e.stop()}},e,null,[[0,20]])})),function(){return e.apply(this,arguments)})(),function(){t=!0}}},[null==f?void 0:f.id,r,m]),{containerRef:o,status:y,error:g}}},68279:(e,r,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/podchats",function(){return t(82548)}])},82548:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>R});var n=t(63857),o=t(60180),c=t.n(o),u=t(14232),i=t(5720),a=t(89099),s=t(46918),l=t(26900),d=t(46137),f=t(53403),p=t(4072),m=t(17651),h=t(90316),y=t(99634),v=t(68567),b=t(64191),w=t(22999),g=t(47607),k=t(15399),P=t(37876),x="podchat",j="all-users",O=Object.values(p.xg),_={month:30,year:240};function A(e,r){try{return new Intl.NumberFormat(void 0,{style:"currency",currency:r,minimumFractionDigits:0,maximumFractionDigits:2}).format(e)}catch(t){return"".concat(e," ").concat(r)}}let R=function(){var e,r,t=(0,a.useRouter)(),o=(0,i.tz)(),p=(0,v.A)().safePush,R=(0,y.u)().user,S=(0,u.useRef)(void 0),E=(0,u.useCallback)((0,n.A)(c().mark(function e(){return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.x.webGetAccessToken();case 2:S.current=e.sent.access_token.access_token;case 4:case"end":return e.stop()}},e)})),[]),C=(0,u.useCallback)((e=(0,n.A)(c().mark(function e(r){var t,n,o,u,i;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.J0.ipLocation().catch(function(){return null});case 2:return o=(null==(n=e.sent)?void 0:n.country)||"US",e.next=6,l.Oe.getPremiumConfig({country:o,userCohorts:[j],productType:x});case 6:if(null!=(u=e.sent)&&null!=(t=u.prices)&&t.length){e.next=9;break}return e.abrupt("return",[]);case 9:return i=u.prices.some(function(e){return"month"===e.paymentPeriod}),e.abrupt("return",u.prices.map(function(e){return function(e,r,t){var n=e.discount&&e.fullPrice!==e.finalPrice,o=function(e,r){if(!r)return null;var t=Math.ceil(e.finalPrice/r*100)/100;return{tokens:"".concat(r," credits"),perToken:"".concat(A(t,e.currency),"/credit")}}(e,t);return{productId:e.key,title:function(e){switch(e){case"day":return"Daily";case"week":return"Weekly";case"month":return"Monthly";case"quarter":return"Quarterly";case"year":return"Annual";case"lifetime":return"Lifetime"}}(e.paymentPeriod),banner:null,priceRow:{boldPrice:A(e.finalPrice,e.currency),textAfterPriceRegular:function(e){switch(e){case"day":return"/day";case"week":return"/week";case"month":return"/month";case"quarter":return"/3 months";case"year":return"/year";case"lifetime":return"one-time"}}(e.paymentPeriod),crossedTextAfterPriceAndRegular:n?A(e.fullPrice,e.currency):null},bottomDescriptionRow:o?{leftDescription:o.tokens,rightDescription:o.perToken}:null,isSelected:r,discount:e.discount?{key:e.discount.key,userFacingKey:e.discount.userFacingKey,percent:e.discount.percent,priceDifference:e.discount.priceDifference,duration:e.discount.duration}:null}}(e,i?"month"===e.paymentPeriod:e===u.prices[0],_[e.paymentPeriod])}));case 11:case"end":return e.stop()}},e)})),function(r){return e.apply(this,arguments)}),[]),D=(0,u.useCallback)((r=(0,n.A)(c().mark(function e(r){var t,n,u,i,a,s,d,m;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.J0.ipLocation().catch(function(){return null});case 2:return u=(null==(n=e.sent)?void 0:n.country)||"US",e.next=6,l.Oe.getPremiumConfig({country:u,userCohorts:[j],productType:x});case 6:if(a=null==(i=e.sent)||null==(t=i.prices)?void 0:t.find(function(e){return e.key===r})){e.next=10;break}return e.abrupt("return","failed");case 10:return(s=new URLSearchParams).set("product_type",x),d="".concat(window.location.origin).concat(f.b.payment.confirmation,"?").concat(s.toString()),e.next=15,l.uR.stripeCreateCheckoutSession({price:a,successUrl:d,locale:(0,w.sT)(o.locale),productType:x});case 15:return m=e.sent,e.next=18,p(m);case 18:return e.abrupt("return","success");case 19:case"end":return e.stop()}},e)})),function(e){return r.apply(this,arguments)}),[p,o.locale]),T=(0,u.useCallback)(function(e){var r,n=null!=(r=window.memrisePodchatsWeb)?r:window.memrisePodchatWeb;null==n||n.mount(e,{baseUrl:"",apiVersion:d.mG,accessToken:S.current,currentUserId:(null==R?void 0:R.id)!=null?String(R.id):void 0,onNavigateBack:function(){t.back()},onNavigateToProductSelection:function(){p(f.b.onboarding.selectProduct,!0)},onLogout:function(){p(f.b.signOut,!0)},onLoadProducts:C,onPurchaseProduct:D,productIds:O})},[t,R,p,C,D]),U=(0,g.s)(T,"podchats",E),N=U.containerRef,L=U.status,F=U.error;return"error"===L?(0,P.jsx)(m.H,{title:"Failed to load Podchats",detail
1:F}):(0,P.jsx)(b.co,{children:(0,P.jsx)("div",{ref:N,style:{width:"100%",minHeight:"100vh"},"data-testid":"podchats-kotlin",children:"loading"===L&&(0,P.jsx)(k.z,{children:(0,P.jsx)(h.A,{})})})})}}},e=>{e.O(0,[6593,636,8792],()=>e(e.s=68279)),_N_E=e.O()}]); 2//# sourceMappingURL=podchats-b1905770cc83147c.js.map
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.