-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js.map
1 lines (1 loc) · 5.16 KB
/
index.js.map
1
{"version":3,"file":"./index.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDH,EAAwB,CAACS,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,ICClF,SAAAI,eAAAC,EAAAC,GAAA,gBAAAC,gBAAAF,GAAA,GAAAG,MAAAC,QAAAJ,GAAA,OAAAA,CAAA,CAAAE,CAAAF,IAAA,SAAAK,sBAAAL,EAAAC,GAAA,IAAAK,EAAA,MAAAN,EAAA,yBAAAO,QAAAP,EAAAO,OAAAC,WAAAR,EAAA,uBAAAM,EAAA,KAAAG,EAAAC,EAAAC,EAAAC,EAAAC,EAAA,GAAAC,GAAA,EAAAC,GAAA,SAAAJ,GAAAL,EAAAA,EAAAR,KAAAE,IAAAgB,KAAA,IAAAf,EAAA,IAAAX,OAAAgB,KAAAA,EAAA,OAAAQ,GAAA,cAAAA,GAAAL,EAAAE,EAAAb,KAAAQ,IAAAW,QAAAJ,EAAAK,KAAAT,EAAAU,OAAAN,EAAAO,SAAAnB,GAAAa,GAAA,UAAAO,GAAAN,GAAA,EAAAL,EAAAW,CAAA,iBAAAP,GAAA,MAAAR,EAAA,SAAAM,EAAAN,EAAA,SAAAhB,OAAAsB,KAAAA,GAAA,kBAAAG,EAAA,MAAAL,CAAA,SAAAG,CAAA,EAAAR,CAAAL,EAAAC,IAAA,SAAAqB,4BAAAjC,EAAAkC,GAAA,IAAAlC,EAAA,2BAAAA,EAAA,OAAAmC,kBAAAnC,EAAAkC,GAAA,IAAAE,EAAAnC,OAAAM,UAAA8B,SAAA5B,KAAAT,GAA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AAAkE,EAAAA,EAAIH,KAAKX,SAAS/C,IAAIoD,EAAWzD,EAC9D,CAmBgDiE,CAAWjE,GACvD,EAbAkB,EAAA,EAAAqC,EAA2BrD,OAAOiE,QAAQf,GAASlC,EAAAqC,EAAAvB,OAAAd,IAAAmC,GAcvD,CA1BIF,CAFiB,CAAC,EAGtB,CCNO,IAAMM,EAAY,YAEzBW,MAAMC,GAAG,QAAQ,WAEbnB,kBACJ,G","sources":["webpack:///webpack/bootstrap","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///./scripts/settings.js","webpack:///./scripts/main.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","import {MODULE_ID} from \"./main.js\";\r\n\r\nconst SETTING_CACHE = {};\r\nconst DEFAULT_CACHE = false;\r\n\r\nexport function registerSettings() {\r\n const settings = {};\r\n\r\n registerSettingsArray(settings);\r\n}\r\n\r\nexport function getSetting(key) {\r\n return SETTING_CACHE[key] ?? game.settings.get(MODULE_ID, key);\r\n}\r\n\r\nexport async function setSetting(key, value) {\r\n return await game.settings.set(MODULE_ID, key, value);\r\n}\r\n\r\nfunction registerSettingsArray(settings) {\r\n for (const [key, value] of Object.entries(settings)) {\r\n if (!value.name) value.name = `${MODULE_ID}.settings.${key}.name`\r\n if (!value.hint) value.hint = `${MODULE_ID}.settings.${key}.hint`\r\n if (value.useCache === undefined) value.useCache = DEFAULT_CACHE;\r\n if (value.useCache) {\r\n const unwrappedOnChange = value.onChange;\r\n if (value.onChange) value.onChange = (value) => {\r\n SETTING_CACHE[key] = value;\r\n if (unwrappedOnChange) unwrappedOnChange(value);\r\n }\r\n }\r\n game.settings.register(MODULE_ID, key, value);\r\n if(value.useCache) SETTING_CACHE[key] = getSetting(key);\r\n }\r\n}","import {initConfig} from \"./config.js\";\r\nimport { registerSettings } from \"./settings.js\";\r\n\r\nexport const MODULE_ID = \"module-id\";\r\n\r\nHooks.on(\"init\", () => {\r\n initConfig();\r\n registerSettings();\r\n});"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","_slicedToArray","arr","i","_arrayWithHoles","Array","isArray","_iterableToArrayLimit","_i","Symbol","iterator","_s","_e","_x","_r","_arr","_n","_d","next","done","push","value","length","err","_unsupportedIterableToArray","minLen","_arrayLikeToArray","n","toString","slice","constructor","name","from","test","_nonIterableRest","TypeError","len","arr2","SETTING_CACHE","DEFAULT_CACHE","registerSettings","registerSettingsArray","settings","_loop","_Object$entries$_i","_Object$entries","concat","MODULE_ID","hint","undefined","useCache","unwrappedOnChange","onChange","game","register","getSetting","_SETTING_CACHE$key","entries","Hooks","on"],"sourceRoot":""}