(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{1861:function(e,t,r){Promise.resolve().then(r.bind(r,3451))},3451:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return u}});var n=r(7437),s=r(2265);function u(){let[e,t]=(0,s.useState)(null),[u,a]=(0,s.useState)(null),l=(0,s.useRef)(null);(0,s.useEffect)(()=>{l.current||(l.current=new Worker(r.tu(new URL(r.p+r.u(227),r.b)),{type:void 0}));let e=e=>{switch(e.data.status){case"initiate":a(!1);break;case"ready":a(!0);break;case"complete":t(e.data.output[0])}};return l.current.addEventListener("message",e),()=>l.current.removeEventListener("message",e)});let c=(0,s.useCallback)(e=>{l.current&&l.current.postMessage({text:e})},[]);return(0,n.jsxs)("main",{className:"flex min-h-screen flex-col items-center justify-center p-12",children:[(0,n.jsx)("h1",{className:"text-5xl font-bold mb-2 text-center",children:"Transformers.js"}),(0,n.jsx)("h2",{className:"text-2xl mb-4 text-center",children:"Next.js template"}),(0,n.jsx)("input",{type:"text",className:"w-full max-w-xs p-2 border border-gray-300 rounded mb-4",placeholder:"Enter text here",onInput:e=>{c(e.target.value)}}),null!==u&&(0,n.jsx)("pre",{className:"bg-gray-100 p-2 rounded",children:u&&e?JSON.stringify(e,null,2):"Loading..."})]})}},622:function(e,t,r){"use strict";/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var n=r(2265),s=Symbol.for("react.element"),u=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var n,c={},o=null,i=null;for(n in void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),void 0!==t.ref&&(i=t.ref),t)u.call(t,n)&&!l.hasOwnProperty(n)&&(c[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===c[n]&&(c[n]=t[n]);return{$$typeof:s,type:e,key:o,ref:i,props:c,_owner:a.current}}t.jsx=c,t.jsxs=c},7437:function(e,t,r){"use strict";e.exports=r(622)}},function(e){e.O(0,[971,596,744],function(){return e(e.s=1861)}),_N_E=e.O()}]);