!function(){"use strict";console.log("WORKER"),[{'revision':'df6d18370126a213917aef32f80b50c4','url':'/_next/app-build-manifest.json'},{'revision':'vgB98fWlAldTL3GAfOGDO','url':'/_next/static/chunks/138-7e73bd80a974c846.js'},{'revision':'vgB98fWlAldTL3GAfOGDO','url':'/_next/static/chunks/212-f854a6d764cb4e9c.js'},{'revision':'vgB98fWlAldTL3GAfOGDO','url':'/_next/static/chunks/307-8c8f6ce7b0973788.js'},{'revision':'vgB98fWlAldTL3GAfOGDO','url':'/_next/static/chunks/615-c2b36049af4e24f3.js'},{'revision':'vgB98fWlAldTL3GAfOGDO','url':'/_next/static/chunks/91-1110d2e8ea0b97b6.js'},{'revision':'vgB98fWlAldTL3GAfOGDO','url':'/_next/static/chunks/app/actions/page-a129bb8e5013d8ab.js'},{'revision':'vgB98fWlAldTL3GAfOGDO','url':'/_next/static/chunks/app/layout-b99c810ab648932e.js'},{'revision':'vgB98fWlAldTL3GAfOGDO','url':'/_next/static/chunks/app/page-592291e29dfb0b06.js'},{'revision':'vgB98fWlAldTL3GAfOGDO','url':'/_next/static/chunks/bce60fc1-3796239d190b3b86.js'},{'revision':'vgB98fWlAldTL3GAfOGDO','url':'/_next/static/chunks/framework-8883d1e9be70c3da.js'},{'revision':'vgB98fWlAldTL3GAfOGDO','url':'/_next/static/chunks/main-app-8e36dfb2634fcb78.js'},{'revision':'vgB98fWlAldTL3GAfOGDO','url':'/_next/static/chunks/main-fa5beb6329f3a69f.js'},{'revision':'vgB98fWlAldTL3GAfOGDO','url':'/_next/static/chunks/pages/_app-998b8fceeadee23e.js'},{'revision':'vgB98fWlAldTL3GAfOGDO','url':'/_next/static/chunks/pages/_error-e8b35f8a0cf92802.js'},{'revision':'79330112775102f91e1010318bae2bd3','url':'/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js'},{'revision':'vgB98fWlAldTL3GAfOGDO','url':'/_next/static/chunks/webpack-bb32139746352e4d.js'},{'revision':'8b81d5f9f3414b62','url':'/_next/static/css/8b81d5f9f3414b62.css'},{'revision':'b6802c76992d71e7','url':'/_next/static/css/b6802c76992d71e7.css'},{'revision':'e778ff09c2dd7b2d','url':'/_next/static/css/e778ff09c2dd7b2d.css'},{'revision':'f1b44860c66554b91f3b1c81556f73ca','url':'/_next/static/media/05a31a2ca4975f99-s.woff2'},{'revision':'5e22a46c04d947a36ea0cad07afcc9e1','url':'/_next/static/media/0e4fe491bf84089c-s.p.woff2'},{'revision':'491a7a9678c3cfd4f86c092c68480f23','url':'/_next/static/media/1c57ca6f5208a29b-s.woff2'},{'revision':'93dcb0c222437699e9dd591d8b5a6b85','url':'/_next/static/media/3dbd163d3bb09d47-s.woff2'},{'revision':'b44d0dd122f9146504d444f290252d88','url':'/_next/static/media/42d52f46a26971a3-s.woff2'},{'revision':'705e5297b1a92dac3b13b2705b7156a7','url':'/_next/static/media/44c3f6d12248be7f-s.woff2'},{'revision':'5fba57b10417c946c556545c9f348bbd','url':'/_next/static/media/4a8324e71b197806-s.woff2'},{'revision':'c4eb7f37bc4206c901ab08601f21f0f2','url':'/_next/static/media/513657b02c5c193f-s.woff2'},{'revision':'bb9d99fb9bbc695be80777ca2c1c2bee','url':'/_next/static/media/51ed15f9841b9f9d-s.woff2'},{'revision':'e64969a373d0acf2586d1fd4224abb90','url':'/_next/static/media/5647e4c23315a2d2-s.woff2'},{'revision':'e7df3d0942815909add8f9d0c40d00d9','url':'/_next/static/media/627622453ef56b0d-s.p.woff2'},{'revision':'2effa1fe2d0dff3e7b8c35ee120e0d05','url':'/_next/static/media/71ba03c5176fbd9c-s.woff2'},{'revision':'3ba6fb27a0ea92c2f1513add6dbddf37','url':'/_next/static/media/7be645d133f3ee22-s.woff2'},{'revision':'fd4ff709e3581e3f62e40e90260a1ad7','url':'/_next/static/media/7c53f7419436e04b-s.woff2'},{'revision':'0772a436bbaaaf4381e9d87bab168217','url':'/_next/static/media/7d8c9b0ca4a64a5a-s.p.woff2'},{'revision':'bd30db6b297b76f3a3a76f8d8ec5aac9','url':'/_next/static/media/83e4d81063b4b659-s.woff2'},{'revision':'7a2e2eae214e49b4333030f789100720','url':'/_next/static/media/8fb72f69fba4e3d2-s.woff2'},{'revision':'376ffe2ca0b038d08d5e582ec13a310f','url':'/_next/static/media/912a9cfe43c928d9-s.woff2'},{'revision':'1f6d3cf6d38f25d83d95f5a800b8cac3','url':'/_next/static/media/934c4b7cb736f2a3-s.p.woff2'},{'revision':'96e992d510ed36aa573ab75df8698b42','url':'/_next/static/media/a5b77b63ef20339c-s.woff2'},{'revision':'f7ec4e2d6c9f82076c56a871d1d23a2d','url':'/_next/static/media/a6d330d7873e7320-s.woff2'},{'revision':'8096f9b1a15c26638179b6c9499ff260','url':'/_next/static/media/baf12dd90520ae41-s.woff2'},{'revision':'5756151c819325914806c6be65088b13','url':'/_next/static/media/bbdb6f0234009aba-s.woff2'},{'revision':'cc0ffafe16e997fe75c32c5c6837e781','url':'/_next/static/media/bd976642b4f7fd99-s.woff2'},{'revision':'74c3556b9dad12fb76f84af53ba69410','url':'/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2'},{'revision':'c2b2c28b98016afb2cb7e029c23f1f9f','url':'/_next/static/media/cff529cd86cc0276-s.woff2'},{'revision':'4d1e5298f2c7e19ba39a6ac8d88e91bd','url':'/_next/static/media/d117eea74e01de14-s.woff2'},{'revision':'dd930bafc6297347be3213f22cc53d3e','url':'/_next/static/media/d6b16ce4a6175f26-s.woff2'},{'revision':'7155c037c22abdc74e4e6be351c0593c','url':'/_next/static/media/de9eb3a9f0fa9e10-s.woff2'},{'revision':'7a500aa24dccfcf0cc60f781072614f5','url':'/_next/static/media/dfa8b99978df7bbc-s.woff2'},{'revision':'9a74bbc5f0d651f8f5b6df4fb3c5c755','url':'/_next/static/media/e25729ca87cc7df9-s.woff2'},{'revision':'90687dc5a4b6b6271c9f1c1d4986ca10','url':'/_next/static/media/eb52b768f62eeeb4-s.woff2'},{'revision':'0e89df9522084290e01e4127495fae99','url':'/_next/static/media/ec159349637c90ad-s.woff2'},{'revision':'2855f7c90916c37fe4e6bd36205a26a8','url':'/_next/static/media/f06116e890b3dadb-s.woff2'},{'revision':'71f3fcaf22131c3368d9ec28ef839831','url':'/_next/static/media/fd4db3eb5472fc27-s.woff2'},{'revision':'b78f2f95f712fdbfd1149569fa52161f','url':'/_next/static/vgB98fWlAldTL3GAfOGDO/_buildManifest.js'},{'revision':'b6652df95db52feb4daf4eca35380933','url':'/_next/static/vgB98fWlAldTL3GAfOGDO/_ssgManifest.js'},{'revision':'fd0fd1665e816597c3b3b87ac1cd28bc','url':'/images/android-chrome.png'},{'revision':'6f3e3155a3f2321e5f7405f1842faaa7','url':'/images/icon_checkbox_accept.png'},{'revision':'33149b81595b8e5f2f567682590928cf','url':'/images/icon_checkbox_reject.png'},{'revision':'9e7ece4e34371110a30e29d639072b70','url':'/images/install_for_ios.png'},{'revision':'e19320bec37641bf5b180e1ae046ee78','url':'/images/iphone-bell-icon.png'},{'revision':'88b2400e45bcf521514b7252cbb2d959','url':'/images/iphone-settings-icon.png'},{'revision':'7712da80ea749c4448626fa030a88416','url':'/images/maskable_icon_x128.png'},{'revision':'d17df9b05031ca9232898c1d18c9f800','url':'/images/maskable_icon_x144.png'},{'revision':'97d32f45fa7117f0ef91643cf12b1f2c','url':'/images/maskable_icon_x192.png'},{'revision':'8cc5c97b7006c09dfb4af4e2d9383cee','url':'/images/maskable_icon_x384.png'},{'revision':'3484c469af447168b6f232e40f1ef72e','url':'/images/maskable_icon_x512.png'},{'revision':'752bab2112e77141088d13e6e9dcf6df','url':'/images/らいきゃくんアプリ.png'},{'revision':'5260443e92381a6afa0efa13f97c0d90','url':'/manifest.json'},{'revision':'1c4ca837c40e96a6c2b3b57445dfd099','url':'/sw.js'},{'revision':'facf02c3cd022e48ee4dcada88dd5d1f','url':'/url.png'}],self.addEventListener("push",function(o){console.log("data",o.data.text());let{message:n,callId:i,createdAt:r,visitor:s,dst:c}=JSON.parse(o.data.text()),a=t().then(t=>{var o;return o={callId:i,createdAt:r,visitor:s,dst:c},new Promise((n,i)=>{let r=t.transaction([e],"readwrite"),s=r.objectStore(e),c=s.put(o);c.onerror=e=>i(e.target.errorCode),c.onsuccess=e=>n(e.target.result)})}),l=registration.showNotification(n,{body:"30秒以内に回答してください",icon:"/icons/android-chrome-192x192.png",data:JSON.stringify({callId:i,createdAt:r,visitor:s,dst:c}),actions:[{action:"accept",title:"対応可能"},{action:"reject",title:"対応不可"}]});o.waitUntil(Promise.all([a,l]).catch(e=>{console.error("Error in one of the push event processes:",e)}))}),self.addEventListener("notificationclick",function(e){var t;console.log("notificationclick");let o=null==e?void 0:null===(t=e.notification)||void 0===t?void 0:t.data;e.notification.close(),e.waitUntil(clients.matchAll({type:"window",includeUncontrolled:!0,userVisibleOnly:!0}).then(function(t){let n="/actions?data=".concat(encodeURIComponent(o),"&action=").concat(e.action);for(let e=0;e<t.length;e++){let o=t[e];if("url"in o&&o.url.includes(n)&&"focus"in o)return o.navigate(n),o.focus()}clients.openWindow&&clients.openWindow(n)}))}),self.addEventListener("install",function(e){console.log("install"),self.skipWaiting()}),self.addEventListener("activate",function(e){console.log("activate"),clients.claim()}),self.addEventListener("pushsubscriptionchange",function(e){console.log("pushsubscriptionchange"),e.waitUntil(Promise.all([Promise.resolve(!e.oldSubscription||n(e.oldSubscription)),Promise.resolve(e.newSubscription?e.newSubscription:o(registration)).then(function(e){return saveSubscription(e)})]))});let e="subscriptions";function t(){return new Promise((t,o)=>{let n=indexedDB.open("pwa-db",1);n.onupgradeneeded=t=>{t.target.result.createObjectStore(e,{keyPath:"id"})},n.onerror=e=>o(e.target.errorCode),n.onsuccess=e=>t(e.target.result)})}async function o(e){try{console.log(e);let o=await fetch("/api/mobile",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({registration:e})});if(!o.ok)throw Error("Failed to subscribe to push service.");let n=await o.json(),i=await t();await storeIdentifier(i,n.identifier),console.log("Identifier stored in IndexedDB:",n.identifier)}catch(e){console.error("Error in subscribePush:",e)}}async function n(e){console.log(e);let t=await fetch("/api/mobile",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldSubscription:e})});if(!t.ok)throw Error("Failed to subscribe to push service.")}}();