PageSourceSearch

https://app.memrise.com/_next/static/chunks/pages/examprep-c34d2dd95af62c03.js

js memrise.com collected 2026-09-24 08:27:45 UTC 11,472 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[508],{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),a=t(14232),u=t(5720),i=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,y=new Set,h=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;(!h&&(h=fetch("/kotlin-bundles/manifest.json").then(function(e){return e.ok?e.json():{}}).catch(function(){return{}})),h).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,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return c=e.done,e},e:function(e){a=!0,o=e},f:function(){try{c||null==r.return||r.return()}finally{if(a)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(!y.has(o)){y.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,a.useRef)(null),s=(0,a.useRef)(!1),l=(0,a.useRef)(e);l.current=e;var d=(0,a.useRef)(t);d.current=t;var f=(0,i.u)().user,m=(0,u.tz)().locale,y=(0,a.useState)("loading"),h=y[0],v=y[1],w=(0,a.useState)(void 0),g=w[0],k=w[1];return(0,a.useEffect)(function(){b(r).catch(function(){})},[r]),(0,a.useEffect)(function(){if(null!=f&&f.id&&!s.current){var e,t=!1;return(e=(0,n.A)(c().mark(function e(){var n,a;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 a="kotlin-module-".concat(Date.now()),o.current.id=a,e.next=14,l.current(a);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:h,error:g}}},60619:(e,r,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/examprep",function(){return t(75660)}])},75660:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>S});var n=t(27925),o=t(63857),c=t(60180),a=t.n(c),u=t(14232),i=t(5720),s=t(46918),l=t(26900),d=t(46137),f=t(53403),p=t(4072),m=t(17651),y=t(90316),h=t(64191),v=t(68567),b=t(22999),w=t(47607),g=t(15399),k=t(37876);function P(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}var x="exam_prep",j="all-users",A=Object.values(p.j_),O={daily:"day",weekly:"week",monthly:"month",quarterly:"quarter"};function _(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 S=function(){var e,r,t=(0,i.tz)(),c=(0,v.A)().safePush,p=(0,u.useRef)(void 0),S=(0,u.useCallback)((0,o.A)(a().mark(function e(){return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.x.webGetAccessToken();case 2:p.current=e.sent.access_token.access_token;case 4:case"end":return e.stop()}},e)})),[]),E=(0,u.useCallback)((e=(0,o.A)(a().mark(function e(r){var t,o,c,u,i,s,d,f,p,m,y,h,v;return a().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 c=(null==(o=e.sent)?void 0:o.country)||"US",e.next=6,Promise.all([l.Oe.getPremiumConfig({country:c,userCohorts:[j],productType:x}),l.GN.getExamPrepProducts().catch(function(){return{products:[]}})]);case 6:if(u=e.sent,s=(i=(0,n.A)(u,2))[0],d=i[1],null!=s&&null!=(t=s.prices)&&t.length){e.next=12;break}return e.abrupt("return",[]);case 12:f=new Map,p=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 P(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)?P(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,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return c=e.done,e},e:function(e){a=!0,o=e},f:function(){try{c||null==r.return||r.return()}finally{if(a)throw o}}}}(d.products);try{for(p.s();!(m=p.n()).done;)(h=O[(y=m.value).name])&&y.metadata.tokens&&f.set(h,y.metadata.tokens)}catch(e){p.e(e)}finally{p.f()}return v=s.prices.some(function(e){return"month"===e.paymentPeriod}),e.abrupt("return",s.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(_(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:_(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?_(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,v?"month"===e.paymentPeriod:e===s.prices[0],f.get(e.paymentPeriod))}
1));case 17:case"end":return e.stop()}},e)})),function(r){return e.apply(this,arguments)}),[]),R=(0,u.useCallback)((r=(0,o.A)(a().mark(function e(r){var n,o,u,i,s,d,p,m;return a().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==(o=e.sent)?void 0:o.country)||"US",e.next=6,l.Oe.getPremiumConfig({country:u,userCohorts:[j],productType:x});case 6:if(s=null==(i=e.sent)||null==(n=i.prices)?void 0:n.find(function(e){return e.key===r})){e.next=10;break}return e.abrupt("return","failed");case 10:return(d=new URLSearchParams).set("product_type",x),p="".concat(window.location.origin).concat(f.b.payment.confirmation,"?").concat(d.toString()),e.next=15,l.uR.stripeCreateCheckoutSession({price:s,successUrl:p,locale:(0,b.sT)(t.locale),productType:x});case 15:return m=e.sent,e.next=18,c(m);case 18:return e.abrupt("return","success");case 19:case"end":return e.stop()}},e)})),function(e){return r.apply(this,arguments)}),[c,t.locale]),C=(0,u.useCallback)(function(e){var r;null==(r=window.memriseExamPrepWeb)||r.mount(e,{baseUrl:"",apiVersion:d.mG,accessToken:p.current,onLogout:function(){c(f.b.signOut,!0)},onNavigateToProductSelection:function(){c(f.b.onboarding.selectProduct,!0)},onLoadProducts:E,onPurchaseProduct:R,productIds:A})},[c,E,R]),D=(0,w.s)(C,"examprep",S),T=D.containerRef,U=D.status,I=D.error;return"error"===U?(0,k.jsx)(m.H,{title:"Failed to load Exam Prep",detail:I}):(0,k.jsx)(h.co,{children:(0,k.jsx)("div",{ref:T,style:{width:"100%",minHeight:"100vh"},"data-testid":"examprep-kotlin",children:"loading"===U&&(0,k.jsx)(g.z,{children:(0,k.jsx)(y.A,{})})})})}}},e=>{e.O(0,[6593,636,8792],()=>e(e.s=60619)),_N_E=e.O()}]);
2//# sourceMappingURL=examprep-c34d2dd95af62c03.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.