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,QAAS,OACTC,OAAQ,CACNhC,OAAQ,SACR0B,KAAM,WAIZO,KAAMC,EAAAA,EACNC,MAAO,CACLlC,MAAOmC,EAAAA,EACP5B,OAAQ,CACN6B,UAAW,CACTC,OAAQ,uBAEV1B,yBAA0B,CACxB,eAAgB1D,KAAKkC,kBAO/BlC,KAAKC,QAAQC,iBAAiB,SAAUF,KAAKqF,eAAejF,KAAKJ,MACnE,CAEAuC,iBAAAA,GACE,MAAM+C,EAAqBhE,SAASC,eAAe,uBACnD,OAAI+D,GAAsBA,EAAmBC,MACpCC,KAAKC,MAAMH,EAAmBC,OAEhC,CAAC,CACV,CAEA,oBAAMF,CAAehF,GAGnB,MAAMqF,QAAmB1F,KAAKwC,cAAcmD,OAEtCC,EAAW5F,KAAKC,QACJ2F,EAASxD,cAAc,iCAErBd,SAASC,eAAe,uBAEhCgE,MAAQC,KAAKK,UAAUH,GACnCE,EAASE,QACX,E,wBC9IF,IAAIC,EAAM,CACT,mBAAoB,MACpB,mCAAoC,MACpC,yBAA0B,MAC1B,aAAc,MACd,+BAAgC,MAChC,6BAA8B,MAC9B,6CAA8C,MAC9C,mCAAoC,MACpC,uBAAwB,MACxB,yCAA0C,OAI3C,SAASC,EAAeC,GACvB,IAAIC,EAAKC,EAAsBF,GAC/B,OAAOG,EAAoBF,EAC5B,CACA,SAASC,EAAsBF,GAC9B,IAAIG,EAAoBC,EAAEN,EAAKE,GAAM,CACpC,IAAIK,EAAI,IAAIC,MAAM,uBAAyBN,EAAM,KAEjD,MADAK,EAAEvB,KAAO,mBACHuB,CACP,CACA,OAAOP,EAAIE,EACZ,CACAD,EAAeQ,KAAO,WACrB,OAAOC,OAAOD,KAAKT,EACpB,EACAC,EAAeU,QAAUP,EACzBQ,EAAOC,QAAUZ,EACjBA,EAAeE,GAAK,K","sources":["webpack://app/./app/javascript/packs/application.js","webpack://app/./app/javascript/controllers/application.js","webpack://app/./app/javascript/controllers/index.js","webpack://app/./app/javascript/controllers/corporate_signup_controller.js","webpack://app/./app/javascript/controllers/notification_controller.js","webpack://app/./app/javascript/controllers/editor_controller.js","webpack://app/./app/javascript/controllers/ sync \\.js$"],"sourcesContent":["// Support component names relative to this directory:\nvar componentRequireContext = require.context(\"components\", true);\nvar ReactRailsUJS = require(\"react_ujs\");\nReactRailsUJS.useContext(componentRequireContext);\n\n// Import Stimulus controllers\nimport \"./i18n\";\nimport { Application } from \"@hotwired/stimulus\";\nimport { definitionsFromContext } from \"@hotwired/stimulus-webpack-helpers\";\n\n// Initialize Stimulus application\nconst application = Application.start();\nconst context = require.context(\"controllers\", true, /\\.js$/);\napplication.load(definitionsFromContext(context));\n","import { Application } from \"@hotwired/stimulus\";\nimport { Turbo } from \"@hotwired/turbo-rails\"\n\n\nconst application = Application.start();\n\n// Configure Stimulus development experience\napplication.debug = false;\nwindow.Stimulus = application;\n\nexport { application };\n","// This file is auto-generated by ./bin/rails stimulus:manifest:update\n// Run that command whenever you add a new controller or create them with\n// ./bin/rails generate stimulus controllerName\n\nimport { application } from \"./application\"\n\nimport EditorController from \"./editor_controller\"\nimport CorporateSignupController from \"./corporate_signup_controller\"\napplication.register(\"editor\", EditorController)\napplication.register(\"corporate-signup\", CorporateSignupController)\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n connect() {\n console.log(\"Corporate Signup Controller connected\")\n this.element.addEventListener(\"submit\", this.handleSubmit.bind(this))\n }\n\n async handleSubmit(event) {\n event.preventDefault(); // Prevent the default form submission\n\n const formData = new FormData(this.element);\n const response = await fetch(this.element.action, {\n method: \"POST\",\n body: formData,\n headers: {\n \"X-Requested-With\": \"XMLHttpRequest\",\n \"Accept\": \"application/json\"\n }\n });\n\n const data = await response.json();\n\n if (response.ok) {\n this.showNotification(data.message, \"success\");\n this.displaySuccessContent(data.message); // Pass the success message to displaySuccessContent\n } else {\n this.showNotification(data.message || \"There was an error with the sign-up form. Please try again.\", \"error\");\n }\n }\n\n showNotification(message, type) {\n const notificationArea = document.getElementById(\"notification_area\");\n notificationArea.innerHTML = `\n
\n

${message}

\n
\n `;\n }\n\n displaySuccessContent(successMessage) {\n // Update the form's inner HTML to show the success content\n this.element.innerHTML = `\n
\n

${successMessage}

\n

\n Thank you for joining NowCollab! We appreciate your interest and will review your information shortly. \n Our team will reach out to you within 3 business days with the next steps.\n

\n

\n While you wait, feel free to connect with us on social media or check out some useful links.\n

\n
\n \n \n
\n
\n `;\n }\n \n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"message\"]\n\n connect() {\n this.hide()\n setTimeout(() => {\n this.show()\n }, 100)\n\n // Auto-hide after 5 seconds\n setTimeout(() => {\n this.hide()\n }, 5000)\n }\n\n show() {\n this.element.classList.remove(\"opacity-0\", \"-translate-y-4\")\n this.element.classList.add(\"opacity-100\", \"translate-y-0\")\n }\n\n hide() {\n this.element.classList.add(\"opacity-0\", \"-translate-y-4\")\n this.element.classList.remove(\"opacity-100\", \"translate-y-0\")\n }\n}","import { Controller } from \"@hotwired/stimulus\";\nimport EditorJS from \"@editorjs/editorjs\";\nimport LinkTool from \"@editorjs/link\";\n\n// These are the plugins\nimport CodeTool from \"@editorjs/code\";\nimport Header from \"@editorjs/header\";\nimport ImageTool from \"@editorjs/image\";\nimport List from \"@editorjs/list\";\nimport Paragraph from \"@editorjs/paragraph\";\nimport AttachesTool from \"@editorjs/attaches\";\nimport Embed from \"@editorjs/embed\";\nimport Marker from \"@editorjs/marker\";\n// import DragDrop from \"editorjs-drag-drop\";\n\nconst AlignmentTuneTool = require(\"editorjs-text-alignment-blocktune\");\n\n// Connects to data-controller=\"editor\"\nexport default class extends Controller {\n static targets = [\"post_content\"];\n\n csrfToken() {\n const metaTag = document.querySelector(\"meta[name='csrf-token']\");\n console.log(metaTag);\n return metaTag ? metaTag.content : \"\";\n }\n connect() {\n console.log(\"Hello, Stimulus!\", this.element);\n\n const initialContent = this.getInitialContent();\n\n this.contentEditor = new EditorJS({\n // Holder is the target element\n placeholder: \"Let`s write an awesome story!\",\n // readOnly: true,\n holder: this.post_contentTarget,\n data: initialContent,\n // onReady: () => {\n // new DragDrop(this.contentEditor);\n // },\n tools: {\n header: {\n class: Header,\n tunes: [\"anyTuneName\"],\n },\n Marker: {\n class: Marker,\n shortcut: \"CMD+SHIFT+M\",\n },\n linkTool: {\n class: LinkTool,\n config: {\n endpoint: \"/api/fetch_url\",\n headers: {\n \"X-CSRF-Token\": this.csrfToken(),\n },\n },\n },\n attaches: {\n class: AttachesTool,\n config: {\n endpoint: \"/posts/upload_file\",\n additionalRequestHeaders: {\n \"X-CSRF-Token\": this.csrfToken(),\n },\n },\n },\n embed: {\n class: Embed,\n inlineToolbar: true,\n config: {\n services: {\n youtube: true,\n coub: true,\n instagram: true,\n twitter: true,\n github: true,\n pinterest: true,\n imgur: true,\n vimeo: true,\n facebook: true,\n },\n },\n },\n list: {\n class: List,\n },\n paragraph: {\n class: Paragraph,\n tunes: [\"anyTuneName\"],\n config: {\n inlineToolbar: true,\n },\n },\n anyTuneName: {\n class: AlignmentTuneTool,\n config: {\n default: \"left\",\n blocks: {\n header: \"center\",\n list: \"right\",\n },\n },\n },\n code: CodeTool,\n image: {\n class: ImageTool,\n config: {\n endpoints: {\n byFile: `/posts/upload_image`,\n },\n additionalRequestHeaders: {\n \"X-CSRF-Token\": this.csrfToken(),\n },\n },\n },\n },\n });\n\n this.element.addEventListener(\"submit\", this.saveEditorData.bind(this));\n }\n\n getInitialContent() {\n const hiddenContentField = document.getElementById(\"post_content_hidden\");\n if (hiddenContentField && hiddenContentField.value) {\n return JSON.parse(hiddenContentField.value);\n }\n return {};\n }\n\n async saveEditorData(event) {\n // event.preventDefault();\n\n const outputData = await this.contentEditor.save();\n\n const postForm = this.element;\n const fileInput = postForm.querySelector('input[name=\"post[thumbnail]\"]');\n\n const hiddenInput = document.getElementById(\"post_content_hidden\");\n\n hiddenInput.value = JSON.stringify(outputData);\n postForm.submit();\n }\n}\n","var map = {\n\t\"./application.js\": 17046,\n\t\"./corporate_signup_controller.js\": 30369,\n\t\"./editor_controller.js\": 84506,\n\t\"./index.js\": 20424,\n\t\"./notification_controller.js\": 82940,\n\t\"controllers/application.js\": 17046,\n\t\"controllers/corporate_signup_controller.js\": 30369,\n\t\"controllers/editor_controller.js\": 84506,\n\t\"controllers/index.js\": 20424,\n\t\"controllers/notification_controller.js\": 82940\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 97461;"],"names":["componentRequireContext","require","useContext","application","Application","start","context","load","definitionsFromContext","debug","window","Stimulus","register","EditorController","CorporateSignupController","Controller","connect","console","log","this","element","addEventListener","handleSubmit","bind","event","preventDefault","formData","FormData","response","fetch","action","method","body","headers","data","json","ok","showNotification","message","displaySuccessContent","type","document","getElementById","innerHTML","successMessage","static","hide","setTimeout","show","classList","remove","add","AlignmentTuneTool","csrfToken","metaTag","querySelector","content","initialContent","getInitialContent","contentEditor","EditorJS","placeholder","holder","post_contentTarget","tools","header","class","Header","tunes","Marker","shortcut","linkTool","LinkTool","config","endpoint","attaches","AttachesTool","additionalRequestHeaders","embed","Embed","inlineToolbar","services","youtube","coub","instagram","twitter","github","pinterest","imgur","vimeo","facebook","list","List","paragraph","Paragraph","anyTuneName","default","blocks","code","CodeTool","image","ImageTool","endpoints","byFile","saveEditorData","hiddenContentField","value","JSON","parse","outputData","save","postForm","stringify","submit","map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","keys","Object","resolve","module","exports"],"sourceRoot":""}