{"version":3,"file":"form_controller-WwFKaXY_.js","sources":["../../../app/javascript/controllers/form_controller.js"],"sourcesContent":["import { Controller } from \"@hotwired/stimulus\"\nimport * as Turbo from \"@hotwired/turbo\"\n\nexport default class extends Controller {\n static values = { next: String }\n\n next(event) {\n if (event.detail.success) {\n if (this.hasNextValue) {\n Turbo.visit(this.nextValue)\n } else {\n const fetchResponse = event.detail.fetchResponse\n\n history.pushState(\n { turbo_frame_history: true },\n \"\",\n fetchResponse.response.url\n )\n\n Turbo.visit(fetchResponse.response.url)\n }\n }\n }\n}\n"],"names":["form_controller","Controller","event","Turbo.visit","fetchResponse","__publicField"],"mappings":"+PAGe,MAAKA,UAASC,CAAW,CAGtC,KAAKC,EAAO,CACV,GAAIA,EAAM,OAAO,QACf,GAAI,KAAK,aACPC,EAAY,KAAK,SAAS,MACrB,CACL,MAAMC,EAAgBF,EAAM,OAAO,cAEnC,QAAQ,UACN,CAAE,oBAAqB,EAAM,EAC7B,GACAE,EAAc,SAAS,GACjC,EAEQD,EAAYC,EAAc,SAAS,GAAG,CAC9C,CAEA,CACA,CAnBEC,EADkBL,EACX,SAAS,CAAE,KAAM,MAAM"}