{"version":3,"file":"6143.618373c5.js","mappings":"0JAGe,MAAAA,UAAcC,EAAAA,GAGzBC,OAAAA,GACIC,KAAKC,SAAW,IAChBD,KAAKE,YACT,CAEAA,UAAAA,GACIF,KAAKG,MAAQC,aAAY,KACjBJ,KAAKC,UAAY,GACjBI,cAAcL,KAAKG,OACnBH,KAAKM,aAAaC,YAAc,UAEhCP,KAAKC,UAAY,EACjBD,KAAKM,aAAaC,YAAcP,KAAKQ,WAAWR,KAAKC,UACzD,GACD,IACP,CAEAO,UAAAA,CAAWC,GACP,MAAMC,EAAUC,KAAKC,MAAMH,EAAU,IAC/BI,EAAmBJ,EAAU,GACnC,MAAQ,GAAEC,EAAU,GAAK,IAAM,KAAKA,KAAWG,EAAmB,GAAK,IAAM,KAAKA,GACtF,CAEAC,UAAAA,GACIT,cAAcL,KAAKG,MACvB,E,EACHN,E,EA5BoB,CAAC,W,sUA4BrB,c","sources":["webpack://@bang/www/./assets/controllers/countdown_timer_controller.js"],"sourcesContent":["import {Controller} from '@hotwired/stimulus';\n\n/* stimulusFetch: 'lazy' */\nexport default class extends Controller {\n static targets = ['output'];\n\n connect() {\n this.timeLeft = 10 * 60; // 10 minutes in seconds\n this.startTimer();\n }\n\n startTimer() {\n this.timer = setInterval(() => {\n if (this.timeLeft <= 0) {\n clearInterval(this.timer);\n this.outputTarget.textContent = '00:00';\n } else {\n this.timeLeft -= 1;\n this.outputTarget.textContent = this.formatTime(this.timeLeft);\n }\n }, 1000);\n }\n\n formatTime(seconds) {\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = seconds % 60;\n return `${minutes < 10 ? '0' : ''}${minutes}:${remainingSeconds < 10 ? '0' : ''}${remainingSeconds}`;\n }\n\n disconnect() {\n clearInterval(this.timer);\n }\n}\n"],"names":["_class","Controller","connect","this","timeLeft","startTimer","timer","setInterval","clearInterval","outputTarget","textContent","formatTime","seconds","minutes","Math","floor","remainingSeconds","disconnect"],"sourceRoot":""}