{"version":3,"sources":["webpack://vadimagesStatic_[name]/webpack/bootstrap","webpack://vadimagesStatic_[name]/external \"mobx\"","webpack://vadimagesStatic_[name]/./src/public/ts/store/settings.tsx","webpack://vadimagesStatic_[name]/./src/public/ts/store/stores.tsx","webpack://vadimagesStatic_[name]/./src/public/ts/store/option.tsx","webpack://vadimagesStatic_[name]/./src/public/ts/wp-api/settings.post.tsx","webpack://vadimagesStatic_[name]/./src/public/ts/models/todoModel.tsx","webpack://vadimagesStatic_[name]/./src/public/ts/store/todo.tsx","webpack://vadimagesStatic_[name]/external \"wpdev_utils\"","webpack://vadimagesStatic_[name]/external \"ReactDOM\"","webpack://vadimagesStatic_[name]/./src/public/ts/wp-api/settings.get.tsx","webpack://vadimagesStatic_[name]/./src/public/ts/widget/index.tsx","webpack://vadimagesStatic_[name]/./src/public/ts/widget.tsx","webpack://vadimagesStatic_[name]/./src/public/ts/utils/index.tsx"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","3","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","mobx","SettingsStore","rootStore","this","request","location","locationRestSettingsGet","runInAction","settings","console","log","locationRestSettingsSet","params","response","allowed","modify_domain","initial_domain","target_domain","observable","action","configure","enforceActions","RootStore","todoStore","optionStore","settingsStore","contextMemo","TodoStore","OptionStore","createContextFactory","context","StoreProvider","me","useStores","pureSlug","pureSlugCamelCased","BaseOptions","getPureSlug","process","assign","path","method","RouteHttpVerb","POST","TodoModel","store","title","id","todos","completed","indexOf","wpdev_utils","ReactDOM","GET","Widget","className","__","document","querySelectorAll","forEach","item","render","UtilsFactory","requestMemo","localizationMemo","createRequestFact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AAIA,YAAG,4C,MCKCC,SAASC,iBAAiB,0BAGlCC,SAAQ,SAACC,GAAD,OAAUC,iBAAO,oBAAC,EAAD,MAAYD,O,wLCVvCE,E,yCAGMC,iB,OAEAC,sB,8CAIJ,OAAO7D,KAAK4D,YACN5D,KAAK4D,YACJ5D,KAAK4D,YAAcE,+BAAqB3C,IAAU1C,IAAI4C,e,mCAK7D,OAAOrB,KAAK6D,iBACN7D,KAAK6D,iBACJ7D,KAAK6D,iBAAmBE,oCAA0B5C,IAAU1C,IAAI4C,YAAYU,a,2BAInF,OAAO4B,EAAa9B,GAAK8B,EAAa9B,GAAM8B,EAAa9B,GAAK,IAAI8B,M,KAtBpEA,EACa9B,Q,EAyBnB,IAAMmC,EAAwD,wBAAa,EAAAL,EAAalF,IAAIwB,SAAQ+D,WAAzB,oBACrE/D,EAAkD,wBAAa,EAAA0D,EAAalF,IAAIwB,SAAQA,QAAzB,oBAI/DoD,EAA6C,wBAAa,EAAAM,EAAalF,IAAIwF,cAAaZ,GAA9B","file":"widget.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t3: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"webpackJsonpvadimagesStatic_name_\"] = window[\"webpackJsonpvadimagesStatic_name_\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([42,2]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","module.exports = mobx;","import {observable, action, runInAction} from \"mobx\";\nimport {RootStore} from \"./stores\";\nimport {request} from \"../utils\";\nimport {\n locationRestSettingsGet,\n ParamsRouteSettingsGet,\n RequestRouteSettingsGet,\n ResponseRouteSettingsGet\n} from \"../wp-api\";\nimport {\n locationRestSettingsSet,\n ParamsRouteSettingsSet,\n RequestRouteSettingsSet,\n ResponseRouteSettingsSet\n} from \"../wp-api/settings.post\";\n\n/* istanbul ignore next: Example implementations gets deleted the most time after plugin creation! */\nclass SettingsStore {\n\n @observable\n public settings: any;\n\n public readonly rootStore: RootStore;\n\n constructor(rootStore: RootStore) {\n this.rootStore = rootStore;\n }\n\n @action\n public async get() {\n const data = await request({\n location: locationRestSettingsGet\n })\n\n runInAction(() => {\n this.settings = data;\n });\n\n }\n\n @action\n public async save() {\n console.log('this.settings: ', this.settings);\n const response = await request({\n location: locationRestSettingsSet,\n params: this.settings\n });\n\n runInAction(() => {\n this.settings = response;\n });\n }\n\n @action\n public setModifyDomain(allowed: boolean) {\n runInAction(() => {\n this.settings = this.settings || {};\n this.settings.modify_domain = allowed;\n });\n }\n\n @action\n public setInitialDomain(name: string) {\n runInAction(() => {\n this.settings = this.settings || {};\n this.settings.initial_domain = name;\n });\n }\n\n @action\n public setTargetDomain(name: string) {\n runInAction(() => {\n this.settings = this.settings || {};\n this.settings.target_domain = name;\n });\n }\n}\n\nexport {SettingsStore};\n","import { configure } from \"mobx\";\nimport { createContextFactory } from \"@wpdev/utils\";\nimport { TodoStore } from \"./todo\";\nimport { OptionStore } from \"./option\";\nimport {SettingsStore} from \"./settings\";\n\nconfigure({\n enforceActions: \"always\"\n});\n\n/**\n * A collection of all available stores which gets available\n * through the custom hook useStores in your function components.\n *\n * @see https://mobx.js.org/best/store.html#combining-multiple-stores\n */\nclass RootStore {\n private static me: RootStore;\n\n public todoStore: TodoStore;\n\n public optionStore: OptionStore;\n\n public settingsStore: SettingsStore;\n\n private contextMemo: {\n StoreContext: React.Context;\n StoreProvider: React.FC<{}>;\n useStores: () => RootStore;\n };\n\n public get context() {\n return this.contextMemo\n ? this.contextMemo\n : (this.contextMemo = createContextFactory((this as unknown) as RootStore));\n }\n\n private constructor() {\n this.todoStore = new TodoStore(this);\n this.optionStore = new OptionStore(this);\n this.settingsStore = new SettingsStore(this);\n }\n\n public static get StoreProvider() {\n return RootStore.get.context.StoreProvider;\n }\n\n public static get get() {\n return RootStore.me ? RootStore.me : (RootStore.me = new RootStore());\n }\n}\n\nconst useStores = () => RootStore.get.context.useStores();\n\nexport { RootStore, useStores };\n","import { observable, runInAction } from \"mobx\";\nimport { BaseOptions } from \"@wpdev/utils\";\nimport { RootStore } from \"./stores\";\n\nclass OptionStore extends BaseOptions {\n // Implement \"others\" property in your Assets.php;\n @observable\n public others: {} = {};\n\n public readonly pureSlug: ReturnType;\n\n public readonly pureSlugCamelCased: ReturnType;\n\n public readonly rootStore: RootStore;\n\n constructor(rootStore: RootStore) {\n super();\n this.rootStore = rootStore;\n this.pureSlug = BaseOptions.getPureSlug(process.env);\n this.pureSlugCamelCased = BaseOptions.getPureSlug(process.env, true);\n\n // Use the localized WP object to fill this object values.\n runInAction(() => Object.assign(this, (window as any)[this.pureSlugCamelCased]));\n }\n}\n\nexport { OptionStore };\n","import {\n RouteLocationInterface,\n RouteHttpVerb,\n RouteResponseInterface,\n RouteRequestInterface,\n RouteParamsInterface\n} from \"@wpdev/utils\";\n\nexport const locationRestSettingsSet: RouteLocationInterface = {\n path: \"/settings\",\n method: RouteHttpVerb.POST\n};\n\nexport type RequestRouteSettingsSet = RouteRequestInterface;\n\nexport type ParamsRouteSettingsSet = RouteParamsInterface;\n\nexport interface ResponseRouteSettingsSet extends RouteResponseInterface {\n\n}\n","import { observable, action } from \"mobx\";\nimport { TodoStore } from \"../store\";\n\n/* istanbul ignore next: Example implementations gets deleted the most time after plugin creation! */\nclass TodoModel {\n @observable\n public title: string;\n\n @observable\n public completed = false;\n\n @observable\n public id: number;\n\n private store: TodoStore;\n\n constructor(store: TodoModel[\"store\"], title: TodoModel[\"title\"]) {\n this.id = store.todos.length + 1;\n this.store = store;\n this.title = title;\n }\n\n @action\n public toggle() {\n this.completed = !this.completed;\n }\n\n @action\n public destroy() {\n this.store.todos.splice(this.store.todos.indexOf(this), 1);\n }\n\n @action\n public setTitle(title: TodoModel[\"title\"]) {\n this.title = title;\n }\n}\n\nexport { TodoModel };\n","import { observable, action } from \"mobx\";\nimport { TodoModel } from \"../models\";\nimport { RootStore } from \"./stores\";\n\n/* istanbul ignore next: Example implementations gets deleted the most time after plugin creation! */\nclass TodoStore {\n @observable\n public todos: TodoModel[] = [];\n\n public readonly rootStore: RootStore;\n\n constructor(rootStore: RootStore) {\n this.rootStore = rootStore;\n }\n\n @action\n public add(title: TodoModel[\"title\"]) {\n this.todos.push(new TodoModel(this, title));\n }\n}\n\nexport { TodoStore };\n","module.exports = wpdev_utils;","module.exports = ReactDOM;","import {\n RouteLocationInterface,\n RouteHttpVerb,\n RouteResponseInterface,\n RouteRequestInterface,\n RouteParamsInterface\n} from \"@wpdev/utils\";\n\nexport const locationRestSettingsGet: RouteLocationInterface = {\n path: \"/settings\",\n method: RouteHttpVerb.GET\n};\n\nexport type RequestRouteSettingsGet = RouteRequestInterface;\n\nexport type ParamsRouteSettingsGet = RouteParamsInterface;\n\nexport interface ResponseRouteSettingsGet extends RouteResponseInterface {\n\n}\n","import { FC } from \"react\";\nimport { __ } from \"../utils\";\n\n/* istanbul ignore next: Example implementations gets deleted the most time after plugin creation! */\nconst Widget: FC<{}> = () => (\n
\n

{__(\"Hello, World!\")}

\n

{__(\"I got generated from your new plugin!\")}

\n
\n);\n\nexport { Widget };\n","/* istanbul ignore file: we do not need to care about the entry point file as errors are detected through E2E */\n\n/**\n * The entrypoint for the WordPress frontend widget.\n */\n\nimport \"@wpdev/utils\"; // Import once for startup polyfilling (e. g. setimmediate)\nimport { render } from \"react-dom\";\nimport { Widget } from \"./widget/\";\nimport \"./style/widget.scss\";\n\n// Query DOM for all widget wrapper divs\nconst widgets = document.querySelectorAll(\"div.react-demo-wrapper\");\n\n// Iterate over the DOM nodes and render a React component into each node\nwidgets.forEach((item) => render(, item));\n","/* istanbul ignore file: this file does not contain any logic, only factory calls */\n\nimport { createRequestFactory, createLocalizationFactory } from \"@wpdev/utils\";\nimport { RootStore } from \"../store\";\n\nclass UtilsFactory {\n private static me: UtilsFactory;\n\n private requestMemo: ReturnType;\n\n private localizationMemo: ReturnType;\n\n // Create REST API relevant stuff from factory\n public get request() {\n return this.requestMemo\n ? this.requestMemo\n : (this.requestMemo = createRequestFactory(RootStore.get.optionStore));\n }\n\n // Create i18n relevant stuff from factory\n public get localization() {\n return this.localizationMemo\n ? this.localizationMemo\n : (this.localizationMemo = createLocalizationFactory(RootStore.get.optionStore.pureSlug));\n }\n\n public static get get() {\n return UtilsFactory.me ? UtilsFactory.me : (UtilsFactory.me = new UtilsFactory());\n }\n}\n\nconst urlBuilder: UtilsFactory[\"requestMemo\"][\"urlBuilder\"] = (...args) => UtilsFactory.get.request.urlBuilder(...args);\nconst request: UtilsFactory[\"requestMemo\"][\"request\"] = (...args) => UtilsFactory.get.request.request(...args);\nconst _n: UtilsFactory[\"localizationMemo\"][\"_n\"] = (...args) => UtilsFactory.get.localization._n(...args);\nconst _nx: UtilsFactory[\"localizationMemo\"][\"_nx\"] = (...args) => UtilsFactory.get.localization._nx(...args);\nconst _x: UtilsFactory[\"localizationMemo\"][\"_x\"] = (...args) => UtilsFactory.get.localization._x(...args);\nconst __: UtilsFactory[\"localizationMemo\"][\"__\"] = (...args) => UtilsFactory.get.localization.__(...args);\nconst _i: UtilsFactory[\"localizationMemo\"][\"_i\"] = (...args) => UtilsFactory.get.localization._i(...args);\n\nexport { urlBuilder, request, _n, _nx, _x, __, _i };\n"],"sourceRoot":""}