1 // [AIV_SHORT] Build version: 2.2.0 - Thursday, June 4th, 2020, 2:31:20 PM
5 /***/ (function(module, __webpack_exports__, __webpack_require__) {
8 Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
9 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_menuBackup_vue__ = __webpack_require__(612);
10 /* empty harmony namespace reexport */
11 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_7ad36065_hasScoped_true_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_menuBackup_vue__ = __webpack_require__(691);
12 function injectStyle (ssrContext) {
13 __webpack_require__(688)
15 var normalizeComponent = __webpack_require__(266)
21 /* template functional */
22 var __vue_template_functional__ = false
24 var __vue_styles__ = injectStyle
26 var __vue_scopeId__ = "data-v-7ad36065"
27 /* moduleIdentifier (server only) */
28 var __vue_module_identifier__ = null
29 var Component = normalizeComponent(
30 __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_menuBackup_vue__["a" /* default */],
31 __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_7ad36065_hasScoped_true_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_menuBackup_vue__["a" /* default */],
32 __vue_template_functional__,
35 __vue_module_identifier__
38 /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
44 /***/ (function(module, __webpack_exports__, __webpack_require__) {
47 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__models_account__ = __webpack_require__(435);
48 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_file_saver__ = __webpack_require__(690);
49 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_file_saver___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_file_saver__);
64 /* harmony default export */ __webpack_exports__["a"] = ({
66 data: function data() {
71 backup: function backup() {
72 __WEBPACK_IMPORTED_MODULE_0__models_account__["a" /* default */].backup().then(function (txt) {
73 var blob = new Blob([txt], {
74 type: "text/plain;charset=utf-8"
76 __WEBPACK_IMPORTED_MODULE_1_file_saver___default.a.saveAs(blob, "bytom_chrome_wallet_backup.txt");
85 /***/ (function(module, exports, __webpack_require__) {
87 // style-loader: Adds some css to the DOM by adding a <style> tag
90 var content = __webpack_require__(689);
91 if(typeof content === 'string') content = [[module.i, content, '']];
92 if(content.locals) module.exports = content.locals;
93 // add the styles to the DOM
94 var update = __webpack_require__(84)("eae0b612", content, true, {});
99 /***/ (function(module, exports, __webpack_require__) {
101 exports = module.exports = __webpack_require__(83)(false);
106 exports.push([module.i, "", ""]);
114 /***/ (function(module, exports, __webpack_require__) {
116 /* WEBPACK VAR INJECTION */(function(global) {/*
118 * A saveAs() FileSaver implementation.
120 * By Eli Grey, http://eligrey.com
122 * License : https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md (MIT)
123 * source : http://purl.eligrey.com/github/FileSaver.js
127 // The one and only way of getting global scope in all enviorment
128 // https://stackoverflow.com/q/3277182/1008999
129 var _global = (function () {
130 // some use content security policy to disable eval
132 return Function('return this')() || (42, eval)('this')
134 // every global should have circular reference
135 // used for checking if someone writes var window = {}; var self = {}
136 return typeof window === 'object' && window.window === window ? window
137 : typeof self === 'object' && self.self === self ? self
138 : typeof global === 'object' && global.global === global ? global : this
142 function bom (blob, opts) {
143 if (typeof opts === 'undefined') opts = { autoBom: false }
144 else if (typeof opts !== 'object') {
145 console.warn('Depricated: Expected third argument to be a object')
146 opts = { autoBom: !opts }
149 // prepend BOM for UTF-8 XML and text/* types (including HTML)
150 // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF
151 if (opts.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {
152 return new Blob([String.fromCharCode(0xFEFF), blob], { type: blob.type })
157 function download (url, name, opts) {
158 var xhr = new XMLHttpRequest()
160 xhr.responseType = 'blob'
161 xhr.onload = function () {
162 saveAs(xhr.response, name, opts)
164 xhr.onerror = function () {
165 console.error('could not download file')
170 function corsEnabled (url) {
171 var xhr = new XMLHttpRequest()
172 // use sync to avoid popup blocker
173 xhr.open('HEAD', url, false)
175 return xhr.status >= 200 && xhr.status <= 299
178 // `a.click()` don't work for all browsers (#465)
179 function click(node) {
181 node.dispatchEvent(new MouseEvent('click'))
183 var evt = document.createEvent('MouseEvents')
184 evt.initMouseEvent('click', true, true, window, 0, 0, 0, 80,
185 20, false, false, false, false, 0, null)
186 node.dispatchEvent(evt)
190 var saveAs = _global.saveAs ||
191 // probably in some web worker
192 (typeof window !== 'object' || window !== _global)
193 ? function saveAs () { /* noop */ }
195 // Use download attribute first if possible (#193 Lumia mobile)
196 : 'download' in HTMLAnchorElement.prototype
197 ? function saveAs (blob, name, opts) {
198 var URL = _global.URL || _global.webkitURL
199 var a = document.createElement('a')
200 name = name || blob.name || 'download'
203 a.rel = 'noopener' // tabnabbing
205 // TODO: detect chrome extensions & packaged apps
206 // a.target = '_blank'
208 if (typeof blob === 'string') {
209 // Support regular links
211 if (a.origin !== location.origin) {
213 ? download(blob, name, opts)
214 : click(a, a.target = '_blank')
220 a.href = URL.createObjectURL(blob)
221 setTimeout(function () { URL.revokeObjectURL(a.href) }, 4E4) // 40s
222 setTimeout(function () { click(a) }, 0)
226 // Use msSaveOrOpenBlob as a second approch
227 : 'msSaveOrOpenBlob' in navigator
228 ? function saveAs (blob, name, opts) {
229 name = name || blob.name || 'download'
231 if (typeof blob === 'string') {
232 if (corsEnabled(blob)) {
233 download(blob, name, opts)
235 var a = document.createElement('a')
238 setTimeout(function () { clikc(a) })
241 navigator.msSaveOrOpenBlob(bom(blob, opts), name)
245 // Fallback to using FileReader and a popup
246 : function saveAs (blob, name, opts, popup) {
247 // Open a popup immediately do go around popup blocker
248 // Mostly only avalible on user interaction and the fileReader is async so...
249 popup = popup || open('', '_blank')
251 popup.document.title =
252 popup.document.body.innerText = 'downloading...'
255 if (typeof blob === 'string') return download(blob, name, opts)
257 var force = blob.type === 'application/octet-stream'
258 var isSafari = /constructor/i.test(_global.HTMLElement) || _global.safari
259 var isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent)
261 if ((isChromeIOS || (force && isSafari)) && typeof FileReader === 'object') {
262 // Safari doesn't allow downloading of blob urls
263 var reader = new FileReader()
264 reader.onloadend = function () {
265 var url = reader.result
266 url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, 'data:attachment/file;')
267 if (popup) popup.location.href = url
269 popup = null // reverse-tabnabbing #460
271 reader.readAsDataURL(blob)
273 var URL = _global.URL || _global.webkitURL
274 var url = URL.createObjectURL(blob)
275 if (popup) popup.location = url
276 else location.href = url
277 popup = null // reverse-tabnabbing #460
278 setTimeout(function () { URL.revokeObjectURL(url) }, 4E4) // 40s
282 module.exports = _global.saveAs = saveAs.saveAs = saveAs
284 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(10)))
289 /***/ (function(module, __webpack_exports__, __webpack_require__) {
292 var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('MenuPage',{attrs:{"title":_vm.$t('backup.title')}},[_c('div',{staticStyle:{"text-align":"center"}},[_c('div',{staticClass:"btn btn-primary",on:{"click":_vm.backup}},[_vm._v(_vm._s(_vm.$t('backup.button')))])])])}
293 var staticRenderFns = []
294 var esExports = { render: render, staticRenderFns: staticRenderFns }
295 /* harmony default export */ __webpack_exports__["a"] = (esExports);
300 //# sourceMappingURL=22.js.map