{"version":3,"sources":["webpack:///./node_modules/vuetify/lib/components/VTextField/index.js","webpack:///./node_modules/vuetify/lib/components/VForm/VForm.js","webpack:///./src/pages/contact.vue?d257","webpack:///./src/pages/contact.vue?fe74","webpack:///./src/pages/contact.vue?a8e8","webpack:///./node_modules/vuetify/lib/components/VFileInput/VFileInput.js","webpack:///./src/pages/contact.vue"],"names":["extend","name","form","this","inheritAttrs","props","disabled","Boolean","lazyValidation","readonly","value","data","inputs","watchers","errorBag","watch","val","errors","Object","values","includes","$emit","deep","immediate","methods","input","watcher","$watch","$set","_uid","valid","shouldValidate","hasOwnProperty","filter","validate","length","forEach","reset","resetErrorBag","setTimeout","resetValidation","push","watchInput","found","find","i","unwatch","$delete","h","staticClass","attrs","novalidate","attrs$","on","submit","e","$slots","default","_vm","_h","$createElement","_c","_self","_v","_s","fail","$t","model","$","callback","$$v","expression","contact","$rules","contactTypes","loading","staticRenderFns","context","self","user","fetch","config","alas","make","$init","file","$o","create","error","done","type","content","t","defaultText","person","getContactData","size","key","s3","upload","Date","now","files","start","$v","logged","username","setContactData","VTextField","prop","event","chips","clearable","counterSizeString","String","counterString","hideInput","placeholder","prependIcon","showSize","Number","validator","v","smallChips","truncateLength","undefined","every","computed","options","classes","call","fileCount","isMultiple","lazyValue","File","$vuetify","lang","bytes","internalArrayValue","reduce","base","internalValue","isDirty","$attrs","map","truncatedText","truncateText","console","$refs","text","index","VChip","small","splice","render","genControl","style","display","genInput","domProps","change","onInput","genSelections","icon","genIcon","click","genSlot","counter","computedCounterValue","children","$scopedSlots","selection","hasChips","genChips","genSelectionText","class","node","genTextFieldSlot","target","initialValue","str","charsKeepOneSide","Math","floor","slice","component","VBtn","VCol","VFileInput","VForm","VRow","VSelect","VTextarea"],"mappings":"gHAAA,gBAEe,e,oCCFf,wCAMe,sBAAO,OAAY,eAAmB,SAEnDA,OAAO,CACPC,KAAM,SAEN,UACE,MAAO,CACLC,KAAMC,OAIVC,cAAc,EACdC,MAAO,CACLC,SAAUC,Q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C7D,4BAA6B3I,KAAKyK,WAAazK,KAAKuK,aAAaC,YAElEF,IAGL,mBACE,MAAMO,EAAOpE,EAAA,KAAWoB,QAAQxG,QAAQyJ,iBAAiB/C,KAAK/H,MAI9D,OAHA6K,EAAKrK,KAAK0C,GAAK,IAAM2H,EAAKrK,KAAK0C,IAAM,GACnCgH,MAAO,IAAMlK,KAAKiJ,MAAM3H,MAAM4I,SAEzBW,GAGT,QAAQzH,GACN,MAAM+C,EAAQ,IAAK/C,EAAE2H,OAAO5E,OAAS,IACrCnG,KAAK0I,cAAgB1I,KAAKiI,WAAa9B,EAAQA,EAAM,GAIrDnG,KAAKgL,aAAehL,KAAK0I,eAG3B,UAAUtF,GACRpD,KAAKkB,MAAM,UAAWkC,IAGxB,aAAa6H,GACX,GAAIA,EAAIjJ,OAASqF,OAAOrH,KAAKyH,gBAAiB,OAAOwD,EACrD,MAAMC,EAAmBC,KAAKC,OAAO/D,OAAOrH,KAAKyH,gBAAkB,GAAK,GACxE,MAAO,GAAGwD,EAAII,MAAM,EAAGH,MAAqBD,EAAII,MAAMJ,EAAIjJ,OAASkJ,S,4DCnQrEI,EAAY,eACd,EACA,EACA7G,GACA,EACA,KACA,KACA,MAIa,aAAA6G,EAAiB,QAYhC,IAAkBA,EAAW,CAACC,OAAA,KAAKC,OAAA,KAAKC,WAAA,EAAWC,QAAA,KAAMC,OAAA,KAAKC,UAAA,KAAQnF,WAAA,OAAWoF,YAAA","file":"js/chunk-932235c6.2acf2dae.js","sourcesContent":["import VTextField from './VTextField';\nexport { VTextField };\nexport default VTextField;\n//# sourceMappingURL=index.js.map","// Mixins\nimport mixins from '../../util/mixins';\nimport BindsAttrs from '../../mixins/binds-attrs';\nimport { provide as RegistrableProvide } from '../../mixins/registrable';\n/* @vue/component */\n\nexport default mixins(BindsAttrs, RegistrableProvide('form')\n/* @vue/component */\n).extend({\n name: 'v-form',\n\n provide() {\n return {\n form: this\n };\n },\n\n inheritAttrs: false,\n props: {\n disabled: Boolean,\n lazyValidation: Boolean,\n readonly: Boolean,\n value: Boolean\n },\n data: () => ({\n inputs: [],\n watchers: [],\n errorBag: {}\n }),\n watch: {\n errorBag: {\n handler(val) {\n const errors = Object.values(val).includes(true);\n this.$emit('input', !errors);\n },\n\n deep: true,\n immediate: true\n }\n },\n methods: {\n watchInput(input) {\n const watcher = input => {\n return input.$watch('hasError', val => {\n this.$set(this.errorBag, input._uid, val);\n }, {\n immediate: true\n });\n };\n\n const watchers = {\n _uid: input._uid,\n valid: () => {},\n shouldValidate: () => {}\n };\n\n if (this.lazyValidation) {\n // Only start watching inputs if we need to\n watchers.shouldValidate = input.$watch('shouldValidate', val => {\n if (!val) return; // Only watch if we're not already doing it\n\n if (this.errorBag.hasOwnProperty(input._uid)) return;\n watchers.valid = watcher(input);\n });\n } else {\n watchers.valid = watcher(input);\n }\n\n return watchers;\n },\n\n /** @public */\n validate() {\n return this.inputs.filter(input => !input.validate(true)).length === 0;\n },\n\n /** @public */\n reset() {\n this.inputs.forEach(input => input.reset());\n this.resetErrorBag();\n },\n\n resetErrorBag() {\n if (this.lazyValidation) {\n // Account for timeout in validatable\n setTimeout(() => {\n this.errorBag = {};\n }, 0);\n }\n },\n\n /** @public */\n resetValidation() {\n this.inputs.forEach(input => input.resetValidation());\n this.resetErrorBag();\n },\n\n register(input) {\n this.inputs.push(input);\n this.watchers.push(this.watchInput(input));\n },\n\n unregister(input) {\n const found = this.inputs.find(i => i._uid === input._uid);\n if (!found) return;\n const unwatch = this.watchers.find(i => i._uid === found._uid);\n\n if (unwatch) {\n unwatch.valid();\n unwatch.shouldValidate();\n }\n\n this.watchers = this.watchers.filter(i => i._uid !== found._uid);\n this.inputs = this.inputs.filter(i => i._uid !== found._uid);\n this.$delete(this.errorBag, found._uid);\n }\n\n },\n\n render(h) {\n return h('form', {\n staticClass: 'v-form',\n attrs: {\n novalidate: true,\n ...this.attrs$\n },\n on: {\n submit: e => this.$emit('submit', e)\n }\n }, this.$slots.default);\n }\n\n});\n//# sourceMappingURL=VForm.js.map","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"px-5 pb-5\"},[_c('v-row',{attrs:{\"justify\":\"center\"}},[_c('v-col',{attrs:{\"cols\":\"12\",\"sm\":\"6\",\"md\":\"4\",\"lg\":\"3\"}},[(_vm.fail)?_c('div',[_c('div',{staticClass:\"text-center title mb-5\"},[_vm._v(_vm._s(_vm.fail))])]):(_vm.done)?_c('div',[_c('div',{staticClass:\"text-center title mb-5\"},[_vm._v(_vm._s(_vm.$t('已收到,我們會盡快回覆。')))])]):_c('div',[_c('div',{staticClass:\"text-center title mb-5\"},[_vm._v(_vm._s(_vm.$t('聯絡我們')))]),_c('v-form',{model:{value:(_vm.$.validate),callback:function ($$v) {_vm.$set(_vm.$, \"validate\", $$v)},expression:\"$.validate\"}},[_c('v-select',{staticClass:\"required\",attrs:{\"outlined\":\"\",\"item-text\":\"text\",\"item-value\":\"value\",\"rules\":_vm.contact.$rules('type'),\"label\":_vm.$t('問題'),\"items\":_vm.contactTypes},model:{value:(_vm.contact.type),callback:function ($$v) {_vm.$set(_vm.contact, \"type\", $$v)},expression:\"contact.type\"}}),_c('v-text-field',{staticClass:\"required\",attrs:{\"outlined\":\"\",\"rules\":_vm.contact.$rules('person'),\"label\":_vm.$t('信箱或行動電話')},model:{value:(_vm.contact.person),callback:function ($$v) {_vm.$set(_vm.contact, \"person\", $$v)},expression:\"contact.person\"}}),_c('v-textarea',{staticClass:\"required\",attrs:{\"height\":\"150px\",\"counter\":\"300\",\"outlined\":\"\",\"rules\":_vm.contact.$rules('content'),\"label\":_vm.$t('內容')},model:{value:(_vm.contact.content),callback:function ($$v) {_vm.$set(_vm.contact, \"content\", $$v)},expression:\"contact.content\"}}),_c('v-file-input',{attrs:{\"show-size\":\"\",\"label\":\"上傳附件\",\"outlined\":\"\",\"dense\":\"\"},model:{value:(_vm.$.file),callback:function ($$v) {_vm.$set(_vm.$, \"file\", $$v)},expression:\"$.file\"}})],1),_c('v-btn',{attrs:{\"block\":\"\",\"color\":\"primary\",\"loading\":_vm.$.loading,\"disabled\":!_vm.$.validate},on:{\"click\":_vm.submit}},[_vm._v(\" \"+_vm._s(_vm.$t('送出'))+\" \")])],1)])],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { __awaiter } from \"tslib\";\r\nimport s3 from '@/requests/s3';\r\nimport { setting } from '@/storage';\r\nimport { alas, status } from '@/alas';\r\nimport { defineComponent, reactive, computed, watch, onMounted } from '@vue/composition-api';\r\nimport { showError } from '@/store';\r\nimport { Self } from '@/vue-core';\r\nexport default defineComponent({\r\n setup(props, context) {\r\n let self = new Self(context);\r\n // ================\r\n //\r\n // state\r\n //\r\n let $ = reactive({\r\n user: status.fetch('user'),\r\n config: status.fetch('config'),\r\n contact: alas.make('user', 'contact').$init(),\r\n validate: false,\r\n loading: false,\r\n file: null\r\n });\r\n // ================\r\n //\r\n // computed\r\n //\r\n let fail = computed(() => $.contact.$o.create.error);\r\n let done = computed(() => $.contact.$o.create.done);\r\n let contact = computed(() => $.contact);\r\n let contactTypes = computed(() => $.config.contactTypes);\r\n // ================\r\n //\r\n // watch\r\n //\r\n watch(() => contact.value.type, () => {\r\n $.contact.content = $.config.contactTypes.find(t => t.value === contact.value.type).defaultText;\r\n });\r\n // ================\r\n //\r\n // mounted\r\n //\r\n onMounted(() => {\r\n let person = setting.getContactData().person;\r\n if (person) {\r\n $.contact.person = person;\r\n }\r\n });\r\n // ================\r\n //\r\n // methods\r\n //\r\n let submit = () => __awaiter(this, void 0, void 0, function* () {\r\n $.loading = true;\r\n try {\r\n if ($.file) {\r\n if ($.file.size > 2000000) {\r\n return showError(self.t('附件過大,不得超過2MB'));\r\n }\r\n let { key } = yield s3.upload(`contact/${Date.now()}-${$.file.name}`, $.file);\r\n $.contact.files = [key];\r\n }\r\n yield $.contact.$o.create.start({\r\n user: $.user.$v.logged ? $.user.username : 'guest'\r\n });\r\n setting.setContactData({\r\n person: $.contact.person\r\n });\r\n }\r\n catch (error) {\r\n showError(error);\r\n }\r\n finally {\r\n $.loading = false;\r\n }\r\n });\r\n // ================\r\n //\r\n // done\r\n //\r\n return {\r\n $,\r\n fail,\r\n done,\r\n contact,\r\n submit,\r\n contactTypes\r\n };\r\n }\r\n});\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contact.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contact.vue?vue&type=script&lang=ts&\"","// Styles\nimport \"../../../src/components/VFileInput/VFileInput.sass\"; // Extensions\n\nimport VTextField from '../VTextField'; // Components\n\nimport { VChip } from '../VChip'; // Utilities\n\nimport { deepEqual, humanReadableFileSize, wrapInArray } from '../../util/helpers';\nimport { consoleError } from '../../util/console';\nimport { mergeStyles } from '../../util/mergeData';\nexport default VTextField.extend({\n name: 'v-file-input',\n model: {\n prop: 'value',\n event: 'change'\n },\n props: {\n chips: Boolean,\n clearable: {\n type: Boolean,\n default: true\n },\n counterSizeString: {\n type: String,\n default: '$vuetify.fileInput.counterSize'\n },\n counterString: {\n type: String,\n default: '$vuetify.fileInput.counter'\n },\n hideInput: Boolean,\n placeholder: String,\n prependIcon: {\n type: String,\n default: '$file'\n },\n readonly: {\n type: Boolean,\n default: false\n },\n showSize: {\n type: [Boolean, Number],\n default: false,\n validator: v => {\n return typeof v === 'boolean' || [1000, 1024].includes(v);\n }\n },\n smallChips: Boolean,\n truncateLength: {\n type: [Number, String],\n default: 22\n },\n type: {\n type: String,\n default: 'file'\n },\n value: {\n default: undefined,\n validator: val => {\n return wrapInArray(val).every(v => v != null && typeof v === 'object');\n }\n }\n },\n computed: {\n classes() {\n return { ...VTextField.options.computed.classes.call(this),\n 'v-file-input': true\n };\n },\n\n computedCounterValue() {\n const fileCount = this.isMultiple && this.lazyValue ? this.lazyValue.length : this.lazyValue instanceof File ? 1 : 0;\n if (!this.showSize) return this.$vuetify.lang.t(this.counterString, fileCount);\n const bytes = this.internalArrayValue.reduce((bytes, {\n size = 0\n }) => {\n return bytes + size;\n }, 0);\n return this.$vuetify.lang.t(this.counterSizeString, fileCount, humanReadableFileSize(bytes, this.base === 1024));\n },\n\n internalArrayValue() {\n return wrapInArray(this.internalValue);\n },\n\n internalValue: {\n get() {\n return this.lazyValue;\n },\n\n set(val) {\n this.lazyValue = val;\n this.$emit('change', this.lazyValue);\n }\n\n },\n\n isDirty() {\n return this.internalArrayValue.length > 0;\n },\n\n isLabelActive() {\n return this.isDirty;\n },\n\n isMultiple() {\n return this.$attrs.hasOwnProperty('multiple');\n },\n\n text() {\n if (!this.isDirty) return [this.placeholder];\n return this.internalArrayValue.map(file => {\n const {\n name = '',\n size = 0\n } = file;\n const truncatedText = this.truncateText(name);\n return !this.showSize ? truncatedText : `${truncatedText} (${humanReadableFileSize(size, this.base === 1024)})`;\n });\n },\n\n base() {\n return typeof this.showSize !== 'boolean' ? this.showSize : undefined;\n },\n\n hasChips() {\n return this.chips || this.smallChips;\n }\n\n },\n watch: {\n readonly: {\n handler(v) {\n if (v === true) consoleError('readonly is not supported on ', this);\n },\n\n immediate: true\n },\n\n value(v) {\n const value = this.isMultiple ? v : v ? [v] : [];\n\n if (!deepEqual(value, this.$refs.input.files)) {\n // When the input value is changed programatically, clear the\n // internal input's value so that the `onInput` handler\n // can be triggered again if the user re-selects the exact\n // same file(s). Ideally, `input.files` should be\n // manipulated directly but that property is readonly.\n this.$refs.input.value = '';\n }\n }\n\n },\n methods: {\n clearableCallback() {\n this.internalValue = this.isMultiple ? [] : undefined;\n this.$refs.input.value = '';\n },\n\n genChips() {\n if (!this.isDirty) return [];\n return this.text.map((text, index) => this.$createElement(VChip, {\n props: {\n small: this.smallChips\n },\n on: {\n 'click:close': () => {\n const internalValue = this.internalValue;\n internalValue.splice(index, 1);\n this.internalValue = internalValue; // Trigger the watcher\n }\n }\n }, [text]));\n },\n\n genControl() {\n const render = VTextField.options.methods.genControl.call(this);\n\n if (this.hideInput) {\n render.data.style = mergeStyles(render.data.style, {\n display: 'none'\n });\n }\n\n return render;\n },\n\n genInput() {\n const input = VTextField.options.methods.genInput.call(this); // We should not be setting value\n // programmatically on the input\n // when it is using type=\"file\"\n\n delete input.data.domProps.value; // This solves an issue in Safari where\n // nothing happens when adding a file\n // do to the input event not firing\n // https://github.com/vuetifyjs/vuetify/issues/7941\n\n delete input.data.on.input;\n input.data.on.change = this.onInput;\n return [this.genSelections(), input];\n },\n\n genPrependSlot() {\n if (!this.prependIcon) return null;\n const icon = this.genIcon('prepend', () => {\n this.$refs.input.click();\n });\n return this.genSlot('prepend', 'outer', [icon]);\n },\n\n genSelectionText() {\n const length = this.text.length;\n if (length < 2) return this.text;\n if (this.showSize && !this.counter) return [this.computedCounterValue];\n return [this.$vuetify.lang.t(this.counterString, length)];\n },\n\n genSelections() {\n const children = [];\n\n if (this.isDirty && this.$scopedSlots.selection) {\n this.internalArrayValue.forEach((file, index) => {\n if (!this.$scopedSlots.selection) return;\n children.push(this.$scopedSlots.selection({\n text: this.text[index],\n file,\n index\n }));\n });\n } else {\n children.push(this.hasChips && this.isDirty ? this.genChips() : this.genSelectionText());\n }\n\n return this.$createElement('div', {\n staticClass: 'v-file-input__text',\n class: {\n 'v-file-input__text--placeholder': this.placeholder && !this.isDirty,\n 'v-file-input__text--chips': this.hasChips && !this.$scopedSlots.selection\n }\n }, children);\n },\n\n genTextFieldSlot() {\n const node = VTextField.options.methods.genTextFieldSlot.call(this);\n node.data.on = { ...(node.data.on || {}),\n click: () => this.$refs.input.click()\n };\n return node;\n },\n\n onInput(e) {\n const files = [...(e.target.files || [])];\n this.internalValue = this.isMultiple ? files : files[0]; // Set initialValue here otherwise isFocused\n // watcher in VTextField will emit a change\n // event whenever the component is blurred\n\n this.initialValue = this.internalValue;\n },\n\n onKeyDown(e) {\n this.$emit('keydown', e);\n },\n\n truncateText(str) {\n if (str.length < Number(this.truncateLength)) return str;\n const charsKeepOneSide = Math.floor((Number(this.truncateLength) - 1) / 2);\n return `${str.slice(0, charsKeepOneSide)}…${str.slice(str.length - charsKeepOneSide)}`;\n }\n\n }\n});\n//# sourceMappingURL=VFileInput.js.map","import { render, staticRenderFns } from \"./contact.vue?vue&type=template&id=4cf8cec2&\"\nimport script from \"./contact.vue?vue&type=script&lang=ts&\"\nexport * from \"./contact.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VFileInput } from 'vuetify/lib/components/VFileInput';\nimport { VForm } from 'vuetify/lib/components/VForm';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VSelect } from 'vuetify/lib/components/VSelect';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\nimport { VTextarea } from 'vuetify/lib/components/VTextarea';\ninstallComponents(component, {VBtn,VCol,VFileInput,VForm,VRow,VSelect,VTextField,VTextarea})\n"],"sourceRoot":""}