!function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e){addEventListener("fetch",t=>{console.log("Received new request: "+t.request.url),t.respondWith(async function(t){fullurl=new URL(t.url),console.log("keyis:"+fullurl.pathname);try{return"POST"===t.method&&fullurl.pathname.startsWith("/update")?(console.log("POST request"),clipboardid=fullurl.pathname.split("/").pop(),async function(t,e){try{return data=await e.json(),data=data.data+"-"+Math.floor(new Date/1e3).toString(),await((t,e)=>TUNNELKV.put(t,e))(t,data),await n("done",200)}catch(t){return console.log(t.toString()),await n("500 - Something is broken",500)}}(clipboardid,t)):"GET"===t.method&&fullurl.pathname.startsWith("/get")?(console.log("GET request"),clipboardid=fullurl.pathname.split("/").pop(),async function(t){try{return data=await(t=>TUNNELKV.get(t))(t),body={data:data.split("-")[0]},await n(JSON.stringify(body),200)}catch(t){return console.log(t.toString()),await n("500 - Something is broken",500)}}(clipboardid)):"OPTIONS"===t.method?new Response(null,{headers:{"Access-Control-Allow-Origin":"https://www.relaysecret.com","Access-Control-Allow-Methods":"GET, HEAD, POST, OPTIONS","Access-Control-Allow-Headers":"Content-Type"}}):await n("404 - These aren't not the droid you're looking for.",404)}catch(t){return await console.log(t.toString()),await n("500 - Something is broken",500)}}(t.request))});async function n(t,e){return new Response(t,{status:e,headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"https://www.relaysecret.com"}})}}]);