From 74821eddc9d2551ec8b006f3327511334b134132 Mon Sep 17 00:00:00 2001 From: flarum-bot Date: Thu, 17 Oct 2024 20:43:42 +0000 Subject: [PATCH] Bundled output for commit bc7ec5ac6e8b948ca054f538cfb50713f3a69951 Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci] --- js/dist/admin.js | 2 +- js/dist/admin.js.map | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/dist/admin.js b/js/dist/admin.js index 12e65fc..2f59fc9 100644 --- a/js/dist/admin.js +++ b/js/dist/admin.js @@ -1,2 +1,2 @@ -(()=>{var t={n:e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return t.d(o,{a:o}),o},d:(e,o)=>{for(var s in o)t.o(o,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:o[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";t.r(e),t.d(e,{extend:()=>d});const o=flarum.core.compat["admin/app"];var s=t.n(o);const i=flarum.core.compat["common/models/User"];var a=t.n(i);function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}const r=flarum.core.compat["admin/components/ExtensionPage"];var l=t.n(r);const c=flarum.core.compat["common/components/Badge"];var p=t.n(c);const f=flarum.core.compat["common/helpers/icon"];var u=t.n(f),b=function(t){function e(){for(var e,o=arguments.length,s=new Array(o),i=0;i{var t={n:e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return t.d(s,{a:s}),s},d:(e,s)=>{for(var o in s)t.o(s,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:s[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";t.r(e),t.d(e,{components:()=>y,extend:()=>_});const s=flarum.core.compat["admin/app"];var o=t.n(s);const n=flarum.core.compat["common/models/User"];var a=t.n(n);function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}const r=flarum.core.compat["admin/components/ExtensionPage"];var l=t.n(r);const c=flarum.core.compat["common/components/Badge"];var p=t.n(c);const f=flarum.core.compat["common/helpers/icon"];var u=t.n(f);const d=flarum.core.compat["common/utils/ItemList"];var b=t.n(d),g=function(t){function e(){for(var e,s=arguments.length,o=new Array(s),n=0;n {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\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))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/User'];","function _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/ExtensionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Badge'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","import app from 'flarum/admin/app';\nimport ExtensionPage from 'flarum/admin/components/ExtensionPage';\nimport Badge from 'flarum/common/components/Badge';\nimport icon from 'flarum/common/helpers/icon';\n\nimport type Mithril from 'mithril';\n\nexport default class ByobuSetingsPage extends ExtensionPage {\n badgeDefault: string = 'fas fa-map';\n postActionDefault: string = 'far fa-map';\n\n content() {\n const helpText = flarum.extensions['flarum-tags']\n ? app.translator.trans('flarum-tags.admin.edit_tag.icon_text', {\n a: ,\n })\n : '';\n\n return (\n
\n
\n
\n
\n {this.buildSettingComponent({\n type: 'string',\n setting: 'fof-byobu.icon-badge',\n label: app.translator.trans('fof-byobu.admin.settings.badge-icon'),\n help: (\n
\n {helpText}\n
\n ),\n placeholder: this.badgeDefault,\n })}\n {this.buildSettingComponent({\n type: 'string',\n setting: 'fof-byobu.icon-postAction',\n label: app.translator.trans('fof-byobu.admin.settings.post-event-icon'),\n help: (\n
\n {icon(this.setting('fof-byobu.icon-postAction').toJSON() || this.postActionDefault)} {helpText}\n
\n ),\n placeholder: this.postActionDefault,\n })}\n {this.buildSettingComponent({\n type: 'boolean',\n setting: 'fof-byobu.makePublic',\n label: app.translator.trans('fof-byobu.admin.settings.enable-make-public-option'),\n help: app.translator.trans('fof-byobu.admin.settings.enable-make-public-option-help'),\n })}\n {this.buildSettingComponent({\n type: 'boolean',\n setting: 'fof-byobu.delete_on_last_recipient_left',\n label: app.translator.trans('fof-byobu.admin.settings.delete_on_last_recipient_left'),\n help: app.translator.trans('fof-byobu.admin.settings.delete_on_last_recipient_left_help'),\n })}\n {this.buildSettingComponent({\n type: 'boolean',\n setting: 'fof-byobu.hide_from_all_discussions_page',\n label: app.translator.trans('fof-byobu.admin.settings.hide_from_all_discussions_page'),\n help: app.translator.trans('fof-byobu.admin.settings.hide_from_all_discussions_page_help'),\n })}\n
\n
{this.submitButton()}
\n
\n
\n
\n );\n }\n}\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inheritsLoose(t, o) {\n t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nexport { _inheritsLoose as default };","import Extend from 'flarum/common/extenders';\n\nexport default [];\n","import Extend from 'flarum/common/extenders';\nimport commonExtend from '../common/extend';\n\nexport default [...commonExtend];\n","import app from 'flarum/admin/app';\nimport User from 'flarum/common/models/User';\n\nimport addPrivateDiscussionPermission from './addPrivateDiscussionPermission';\nimport ByobuSettings from './components/ByobuSettingsPage';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('fof-byobu', () => {\n app.store.models.recipients = User;\n\n app.extensionData.for('fof-byobu').registerPage(ByobuSettings);\n\n addPrivateDiscussionPermission();\n});\n","import app from 'flarum/admin/app';\n\nexport default function () {\n const byobuData = app.extensionData.for('fof-byobu');\n\n byobuData\n .registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.create_private_discussions_with_users'),\n permission: 'discussion.startPrivateDiscussionWithUsers',\n tagScoped: false,\n },\n 'start',\n 95\n )\n .registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.add_more_than_two_user_recipients'),\n permission: 'discussion.addMoreThanTwoUserRecipients',\n tagScoped: false,\n },\n 'start',\n 95\n )\n .registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.create_private_discussions_with_groups'),\n permission: 'discussion.startPrivateDiscussionWithGroups',\n tagScoped: false,\n },\n 'start',\n 95\n )\n .registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.create_private_discussions_with_blocking_users'),\n permission: 'discussion.startPrivateDiscussionWithBlockers',\n tagScoped: false,\n },\n 'start',\n 95\n )\n .registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.edit_user_recipients'),\n permission: 'discussion.editUserRecipients',\n tagScoped: false,\n },\n 'moderate',\n 95\n )\n .registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.edit_group_recipients'),\n permission: 'discussion.editGroupRecipients',\n tagScoped: false,\n },\n 'moderate',\n 95\n )\n .registerPermission(\n {\n icon: 'fas fa-flag',\n label: app.translator.trans('fof-byobu.admin.permission.view_private_discussions-when-flagged'),\n permission: 'user.viewPrivateDiscussionsWhenFlagged',\n tagScoped: false,\n },\n 'moderate',\n 95\n );\n\n if (app.data.settings['fof-byobu.makePublic']) {\n byobuData.registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.make_private_into_public'),\n permission: 'discussion.makePublic',\n tagScoped: false,\n },\n 'reply',\n 95\n );\n }\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","t","e","setPrototypeOf","bind","__proto__","ByobuSetingsPage","_ExtensionPage","_this","_len","arguments","length","args","Array","_key","apply","concat","badgeDefault","postActionDefault","create","constructor","content","helpText","extensions","app","trans","m","href","fontawesome","tabindex","className","this","buildSettingComponent","type","setting","label","help","Badge","icon","toJSON","placeholder","submitButton","ExtensionPage","add","byobuData","models","recipients","User","registerPage","ByobuSettings","registerPermission","permission","tagScoped","settings"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,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,MAAOP,IAAAA,WAAeC,MAAM,mDAC5ByB,WAAY,gCACZC,WAAW,GAEb,WACA,IAEDF,mBACC,CACEf,KAAM,aACNH,MAAOP,IAAAA,WAAeC,MAAM,oDAC5ByB,WAAY,iCACZC,WAAW,GAEb,WACA,IAEDF,mBACC,CACEf,KAAM,cACNH,MAAOP,IAAAA,WAAeC,MAAM,oEAC5ByB,WAAY,yCACZC,WAAW,GAEb,WACA,IAGA3B,IAAAA,KAAS4B,SAAS,yBACpBR,EAAUK,mBACR,CACEf,KAAM,aACNH,MAAOP,IAAAA,WAAeC,MAAM,uDAC5ByB,WAAY,wBACZC,WAAW,GAEb,QACA,GDvEN,G","sources":["webpack://@fof/byobu/webpack/bootstrap","webpack://@fof/byobu/webpack/runtime/compat get default export","webpack://@fof/byobu/webpack/runtime/define property getters","webpack://@fof/byobu/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/byobu/webpack/runtime/make namespace object","webpack://@fof/byobu/external root \"flarum.core.compat['admin/app']\"","webpack://@fof/byobu/external root \"flarum.core.compat['common/models/User']\"","webpack://@fof/byobu/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/byobu/external root \"flarum.core.compat['admin/components/ExtensionPage']\"","webpack://@fof/byobu/external root \"flarum.core.compat['common/components/Badge']\"","webpack://@fof/byobu/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@fof/byobu/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@fof/byobu/./src/admin/components/ByobuSettingsPage.tsx","webpack://@fof/byobu/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/byobu/./src/common/extend.ts","webpack://@fof/byobu/./src/admin/extend.ts","webpack://@fof/byobu/./src/admin/components/index.ts","webpack://@fof/byobu/./src/admin/index.ts","webpack://@fof/byobu/./src/admin/addPrivateDiscussionPermission.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\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))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/User'];","function _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/ExtensionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Badge'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","import app from 'flarum/admin/app';\nimport ExtensionPage from 'flarum/admin/components/ExtensionPage';\nimport Badge from 'flarum/common/components/Badge';\nimport icon from 'flarum/common/helpers/icon';\nimport ItemList from 'flarum/common/utils/ItemList';\n\nimport type Mithril from 'mithril';\n\nexport default class ByobuSettingsPage extends ExtensionPage {\n badgeDefault: string = 'fas fa-map';\n postActionDefault: string = 'far fa-map';\n\n content() {\n return (\n
\n
\n
\n
\n {this.settingsItems().toArray()}\n
{this.submitButton()}
\n
\n
\n
\n
\n );\n }\n\n settingsItems(): ItemList {\n const items = new ItemList();\n\n items.add(\n 'general',\n
\n

{app.translator.trans('fof-byobu.admin.settings.general.heading')}

\n

{app.translator.trans('fof-byobu.admin.settings.general.help')}

\n {this.generalItems().toArray()}\n
\n );\n\n items.add(\n 'icon',\n
\n

{app.translator.trans('fof-byobu.admin.settings.icon.heading')}

\n

{app.translator.trans('fof-byobu.admin.settings.icon.help')}

\n {this.iconItems().toArray()}\n
\n );\n\n return items;\n }\n\n generalItems(): ItemList {\n const items = new ItemList();\n\n items.add(\n 'makePublic',\n this.buildSettingComponent({\n type: 'boolean',\n setting: 'fof-byobu.makePublic',\n label: app.translator.trans('fof-byobu.admin.settings.enable-make-public-option'),\n help: app.translator.trans('fof-byobu.admin.settings.enable-make-public-option-help'),\n })\n );\n\n items.add(\n 'deleteEmpty',\n this.buildSettingComponent({\n type: 'boolean',\n setting: 'fof-byobu.delete_on_last_recipient_left',\n label: app.translator.trans('fof-byobu.admin.settings.delete_on_last_recipient_left'),\n help: app.translator.trans('fof-byobu.admin.settings.delete_on_last_recipient_left_help'),\n })\n );\n\n items.add(\n 'hideAllDiscussions',\n this.buildSettingComponent({\n type: 'boolean',\n setting: 'fof-byobu.hide_from_all_discussions_page',\n label: app.translator.trans('fof-byobu.admin.settings.hide_from_all_discussions_page'),\n help: app.translator.trans('fof-byobu.admin.settings.hide_from_all_discussions_page_help'),\n })\n );\n\n return items;\n }\n\n iconItems(): ItemList {\n const items = new ItemList();\n\n items.add(\n 'icon-badge',\n this.buildSettingComponent({\n type: 'string',\n setting: 'fof-byobu.icon-badge',\n label: app.translator.trans('fof-byobu.admin.settings.badge-icon'),\n help: (\n
\n {this.helpText()}\n
\n ),\n placeholder: this.badgeDefault,\n })\n );\n\n items.add(\n 'icon-postAction',\n this.buildSettingComponent({\n type: 'string',\n setting: 'fof-byobu.icon-postAction',\n label: app.translator.trans('fof-byobu.admin.settings.post-event-icon'),\n help: (\n
\n {icon(this.setting('fof-byobu.icon-postAction').toJSON() || this.postActionDefault)} {this.helpText()}\n
\n ),\n placeholder: this.postActionDefault,\n })\n );\n\n return items;\n }\n\n helpText(): Mithril.Children | null {\n return (\n flarum.extensions['flarum-tags'] &&\n app.translator.trans('flarum-tags.admin.edit_tag.icon_text', {\n a:
,\n })\n );\n }\n}\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inheritsLoose(t, o) {\n t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nexport { _inheritsLoose as default };","import Extend from 'flarum/common/extenders';\n\nexport default [];\n","import Extend from 'flarum/common/extenders';\nimport commonExtend from '../common/extend';\n\nexport default [...commonExtend];\n","import ByobuSettingsPage from './ByobuSettingsPage';\n\nexport const components = {\n ByobuSettingsPage,\n};\n","import app from 'flarum/admin/app';\nimport User from 'flarum/common/models/User';\n\nimport addPrivateDiscussionPermission from './addPrivateDiscussionPermission';\nimport ByobuSettingsPage from './components/ByobuSettingsPage';\n\nexport { default as extend } from './extend';\nexport * from './components';\n\napp.initializers.add('fof-byobu', () => {\n app.store.models.recipients = User;\n\n app.extensionData.for('fof-byobu').registerPage(ByobuSettingsPage);\n\n addPrivateDiscussionPermission();\n});\n","import app from 'flarum/admin/app';\n\nexport default function () {\n const byobuData = app.extensionData.for('fof-byobu');\n\n byobuData\n .registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.create_private_discussions_with_users'),\n permission: 'discussion.startPrivateDiscussionWithUsers',\n tagScoped: false,\n },\n 'start',\n 95\n )\n .registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.add_more_than_two_user_recipients'),\n permission: 'discussion.addMoreThanTwoUserRecipients',\n tagScoped: false,\n },\n 'start',\n 95\n )\n .registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.create_private_discussions_with_groups'),\n permission: 'discussion.startPrivateDiscussionWithGroups',\n tagScoped: false,\n },\n 'start',\n 95\n )\n .registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.create_private_discussions_with_blocking_users'),\n permission: 'discussion.startPrivateDiscussionWithBlockers',\n tagScoped: false,\n },\n 'start',\n 95\n )\n .registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.edit_user_recipients'),\n permission: 'discussion.editUserRecipients',\n tagScoped: false,\n },\n 'moderate',\n 95\n )\n .registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.edit_group_recipients'),\n permission: 'discussion.editGroupRecipients',\n tagScoped: false,\n },\n 'moderate',\n 95\n )\n .registerPermission(\n {\n icon: 'fas fa-flag',\n label: app.translator.trans('fof-byobu.admin.permission.view_private_discussions-when-flagged'),\n permission: 'user.viewPrivateDiscussionsWhenFlagged',\n tagScoped: false,\n },\n 'moderate',\n 95\n );\n\n if (app.data.settings['fof-byobu.makePublic']) {\n byobuData.registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.make_private_into_public'),\n permission: 'discussion.makePublic',\n tagScoped: false,\n },\n 'reply',\n 95\n );\n }\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","t","e","setPrototypeOf","bind","__proto__","ByobuSettingsPage","_ExtensionPage","_this","_len","arguments","length","args","Array","_key","apply","concat","badgeDefault","postActionDefault","create","constructor","_proto","content","m","className","this","settingsItems","toArray","submitButton","items","ItemList","add","app","trans","generalItems","iconItems","buildSettingComponent","type","setting","label","help","Badge","icon","toJSON","helpText","placeholder","extensions","href","fontawesome","tabindex","ExtensionPage","components","byobuData","models","recipients","User","registerPage","registerPermission","permission","tagScoped","settings"],"sourceRoot":""} \ No newline at end of file