{"version":3,"sources":["webpack:///2sxc.api.min.js","webpack:///webpack/bootstrap f9c33ee8e1f76c188f85","webpack:///./2sxc-api/js/2sxc.api.ts","webpack:///./2sxc-api/js/ToSic.Sxc.Controller.ts","webpack:///./2sxc-api/js/ToSic.Sxc.Instance.ts","webpack:///./2sxc-api/js/ToSic.Sxc.Data.ts","webpack:///./2sxc-api/js/ToSic.Sxc.WebApi.ts","webpack:///./2sxc-api/js/ToSic.Sxc.TotalPopup.ts","webpack:///./2sxc-api/js/ToSic.Sxc.Url.ts","webpack:///./2sxc-api/js/Stats.ts"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","__webpack_exports__","value","__WEBPACK_IMPORTED_MODULE_0__ToSic_Sxc_Controller__","window","$2sxc","SxcController","id","cbid","_controllers","Error","idTuple","autoFind","cacheKey","_data","__WEBPACK_IMPORTED_MODULE_0__ToSic_Sxc_Instance__","$","ServicesFramework","buildSxcController","urlManager","__WEBPACK_IMPORTED_MODULE_2__ToSic_Sxc_Url__","debug","load","uncache","stats","__WEBPACK_IMPORTED_MODULE_3__Stats__","addOn","sysinfo","version","description","beta","totalPopup","__WEBPACK_IMPORTED_MODULE_1__ToSic_Sxc_TotalPopup__","urlParams","parts","getUrl","url","preventUnmin","r","replace","indexOf","domElement","containerTag","closest","iid","getAttribute","SxcInstanceWithInternals","__WEBPACK_IMPORTED_MODULE_0__ToSic_Sxc_Data__","__WEBPACK_IMPORTED_MODULE_1__ToSic_Sxc_WebApi__","__extends","this","extendStatics","setPrototypeOf","__proto__","Array","b","__","constructor","create","SxcInstance","dnnSf","serviceScopes","serviceRoot","getServiceRoot","webApi","resolveServiceUrl","virtualPath","scope","split","toLowerCase","substring","showDetailedHttpError","result","console","log","status","config","infoText","srvResp","responseText","JSON","parse","data","msg","Message","msgDet","MessageDetail","ExceptionMessage","alert","SxcInstanceWithEditing","_super","_this","manage","_manage","initInstance","e","error","_translateInit","isEditMode","_isEditMode","source","isLoaded","lastRefresh","recreate","resetCache","SxcDataWithInternals","controller","undefined","List","sourceUrl","params","origSuccess","success","dataSetName","in","Default","Date","_triggerLoaded","request","statusText","preventAutoFail","reload","then","on","events","callback","bind","trigger","one","SxcWebApiWithInternals","settingsOrUrl","post","delete","put","settings","method","controllerAction","controllerName","actionName","action","length","defaults","extend","sf","promise","ajax","async","dataType","stringify","contentType","type","getActionUrl","beforeSend","xhr","setRequestHeader","setModuleHeaders","fail","param","TotalPopup","frame","open","z","top","parent","wrapper","document","createElement","setAttribute","body","appendChild","ifrm","className","close","frm","parentNode","removeChild","closeThis","UrlParamManager","strResult","searchRx","RegExp","results","exec","location","search","hash","matches","pathname","match","reverse","decodeURIComponent","require","found","message","Stats","watchDomChanges"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GA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AAK1D,IAAIP,EACvB,IAAc,KAAV+M,EAAc,CACd,GAAMC,GAAU,uBAAuBhN,EAAI,sCAE3C,MADAuG,OAAMyG,GACAA,EAEV,MAAOD,IAEff,MRueE,SAAUvM,EAAQuB,EAAqB3B,GAE7C,YSlhBAA,GAAAU,EAAAiB,EAAA,qBAAAiM,IAAA,IAAAA,GAAA,mBAAAA,KACIhJ,KAAAiJ,gBAAkB,EACtB,MAAAD","file":"2sxc.api.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\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, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\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/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ToSic_Sxc_Controller__ = __webpack_require__(1);\n\r\nif (!window.$2sxc)\r\n window.$2sxc = Object(__WEBPACK_IMPORTED_MODULE_0__ToSic_Sxc_Controller__[\"a\" /* buildSxcController */])();\r\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = buildSxcController;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ToSic_Sxc_Instance__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ToSic_Sxc_TotalPopup__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ToSic_Sxc_Url__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Stats__ = __webpack_require__(7);\n\r\n\r\n\r\n\r\nfunction SxcController(id, cbid) {\r\n var $2sxc = window.$2sxc;\r\n if (!$2sxc._controllers)\r\n throw new Error('$2sxc not initialized yet');\r\n if (typeof id === 'object') {\r\n var idTuple = autoFind(id);\r\n id = idTuple[0];\r\n cbid = idTuple[1];\r\n }\r\n if (!cbid)\r\n cbid = id;\r\n var cacheKey = id + ':' + cbid;\r\n if ($2sxc._controllers[cacheKey])\r\n return $2sxc._controllers[cacheKey];\r\n if (!$2sxc._data[cacheKey])\r\n $2sxc._data[cacheKey] = {};\r\n return ($2sxc._controllers[cacheKey]\r\n = new __WEBPACK_IMPORTED_MODULE_0__ToSic_Sxc_Instance__[\"a\" /* SxcInstanceWithInternals */](id, cbid, cacheKey, $2sxc, $.ServicesFramework));\r\n}\r\nfunction buildSxcController() {\r\n var urlManager = new __WEBPACK_IMPORTED_MODULE_2__ToSic_Sxc_Url__[\"a\" /* UrlParamManager */]();\r\n var debug = {\r\n load: (urlManager.get('debug') === 'true'),\r\n uncache: urlManager.get('sxcver'),\r\n };\r\n var stats = new __WEBPACK_IMPORTED_MODULE_3__Stats__[\"a\" /* Stats */]();\r\n var addOn = {\r\n _controllers: {},\r\n sysinfo: {\r\n version: '09.43.00',\r\n description: 'The 2sxc Controller object - read more about it on 2sxc.org',\r\n },\r\n beta: {},\r\n _data: {},\r\n totalPopup: new __WEBPACK_IMPORTED_MODULE_1__ToSic_Sxc_TotalPopup__[\"a\" /* TotalPopup */](),\r\n urlParams: urlManager,\r\n debug: debug,\r\n stats: stats,\r\n parts: {\r\n getUrl: function (url, preventUnmin) {\r\n var r = (preventUnmin || !debug.load) ? url : url.replace('.min', '');\r\n if (debug.uncache && r.indexOf('sxcver') === -1)\r\n r = r + ((r.indexOf('?') === -1) ? '?' : '&') + 'sxcver=' + debug.uncache;\r\n return r;\r\n },\r\n },\r\n };\r\n for (var property in addOn)\r\n if (addOn.hasOwnProperty(property))\r\n SxcController[property] = addOn[property];\r\n return SxcController;\r\n}\r\nfunction autoFind(domElement) {\r\n var containerTag = $(domElement).closest('.sc-content-block')[0];\r\n if (!containerTag)\r\n return null;\r\n var iid = containerTag.getAttribute('data-cb-instance');\r\n var cbid = containerTag.getAttribute('data-cb-id');\r\n if (!iid || !cbid)\r\n return null;\r\n return [iid, cbid];\r\n}\r\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export SxcInstance */\n/* unused harmony export SxcInstanceWithEditing */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SxcInstanceWithInternals; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ToSic_Sxc_Data__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ToSic_Sxc_WebApi__ = __webpack_require__(4);\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\n\r\n\r\nvar SxcInstance = (function () {\r\n function SxcInstance(id, cbid, dnnSf) {\r\n this.id = id;\r\n this.cbid = cbid;\r\n this.dnnSf = dnnSf;\r\n this.serviceScopes = ['app', 'app-sys', 'app-api', 'app-query', 'app-content', 'eav', 'view', 'dnn'];\r\n this.serviceRoot = dnnSf(id).getServiceRoot('2sxc');\r\n this.webApi = new __WEBPACK_IMPORTED_MODULE_1__ToSic_Sxc_WebApi__[\"a\" /* SxcWebApiWithInternals */](this, id, cbid);\r\n }\r\n SxcInstance.prototype.resolveServiceUrl = function (virtualPath) {\r\n var scope = virtualPath.split('/')[0].toLowerCase();\r\n if (this.serviceScopes.indexOf(scope) === -1)\r\n return virtualPath;\r\n return this.serviceRoot + scope + '/' + virtualPath.substring(virtualPath.indexOf('/') + 1);\r\n };\r\n SxcInstance.prototype.showDetailedHttpError = function (result) {\r\n if (window.console)\r\n console.log(result);\r\n if (result.status === 404 &&\r\n result.config &&\r\n result.config.url &&\r\n result.config.url.indexOf('/dist/i18n/') > -1) {\r\n if (window.console)\r\n console.log('just fyi: failed to load language resource; will have to use default');\r\n return result;\r\n }\r\n if (result.status === 0 || result.status === -1)\r\n return result;\r\n var infoText = 'Had an error talking to the server (status ' + result.status + ').';\r\n var srvResp = result.responseText\r\n ? JSON.parse(result.responseText)\r\n : result.data;\r\n if (srvResp) {\r\n var msg = srvResp.Message;\r\n if (msg)\r\n infoText += '\\nMessage: ' + msg;\r\n var msgDet = srvResp.MessageDetail || srvResp.ExceptionMessage;\r\n if (msgDet)\r\n infoText += '\\nDetail: ' + msgDet;\r\n if (msgDet && msgDet.indexOf('No action was found') === 0)\r\n if (msgDet.indexOf('that matches the name') > 0)\r\n infoText += '\\n\\nTip from 2sxc: you probably got the action-name wrong in your JS.';\r\n else if (msgDet.indexOf('that matches the request.') > 0)\r\n infoText += '\\n\\nTip from 2sxc: Seems like the parameters are the wrong amount or type.';\r\n if (msg && msg.indexOf('Controller') === 0 && msg.indexOf('not found') > 0)\r\n infoText +=\r\n \"\\n\\nTip from 2sxc: you probably spelled the controller name wrong or forgot to remove the word 'controller' from the call in JS. To call a controller called 'DemoController' only use 'Demo'.\";\r\n }\r\n infoText += '\\n\\nif you are an advanced user you can learn more about what went wrong - discover how on 2sxc.org/help?tag=debug';\r\n alert(infoText);\r\n return result;\r\n };\r\n return SxcInstance;\r\n}());\r\n\r\nvar SxcInstanceWithEditing = (function (_super) {\r\n __extends(SxcInstanceWithEditing, _super);\r\n function SxcInstanceWithEditing(id, cbid, $2sxc, dnnSf) {\r\n var _this = _super.call(this, id, cbid, dnnSf) || this;\r\n _this.id = id;\r\n _this.cbid = cbid;\r\n _this.$2sxc = $2sxc;\r\n _this.dnnSf = dnnSf;\r\n _this.manage = null;\r\n try {\r\n if ($2sxc._manage)\r\n $2sxc._manage.initInstance(_this);\r\n }\r\n catch (e) {\r\n console.error('error in 2sxc - will only log but not throw', e);\r\n }\r\n if ($2sxc._translateInit && _this.manage)\r\n $2sxc._translateInit(_this.manage);\r\n return _this;\r\n }\r\n SxcInstanceWithEditing.prototype.isEditMode = function () {\r\n return this.manage && this.manage._isEditMode();\r\n };\r\n return SxcInstanceWithEditing;\r\n}(SxcInstance));\r\n\r\nvar SxcInstanceWithInternals = (function (_super) {\r\n __extends(SxcInstanceWithInternals, _super);\r\n function SxcInstanceWithInternals(id, cbid, cacheKey, $2sxc, dnnSf) {\r\n var _this = _super.call(this, id, cbid, $2sxc, dnnSf) || this;\r\n _this.id = id;\r\n _this.cbid = cbid;\r\n _this.cacheKey = cacheKey;\r\n _this.$2sxc = $2sxc;\r\n _this.dnnSf = dnnSf;\r\n _this.source = null;\r\n _this.isLoaded = false;\r\n _this.lastRefresh = null;\r\n _this.data = new __WEBPACK_IMPORTED_MODULE_0__ToSic_Sxc_Data__[\"a\" /* SxcDataWithInternals */](_this);\r\n return _this;\r\n }\r\n SxcInstanceWithInternals.prototype.recreate = function (resetCache) {\r\n if (resetCache)\r\n delete this.$2sxc._controllers[this.cacheKey];\r\n return this.$2sxc(this.id, this.cbid);\r\n };\r\n return SxcInstanceWithInternals;\r\n}(SxcInstanceWithEditing));\r\n\r\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SxcDataWithInternals; });\nvar SxcDataWithInternals = (function () {\r\n function SxcDataWithInternals(controller) {\r\n this.controller = controller;\r\n this.source = undefined;\r\n this[\"in\"] = {};\r\n this.List = [];\r\n }\r\n SxcDataWithInternals.prototype.sourceUrl = function (params) {\r\n var url = this.controller.resolveServiceUrl('app-sys/appcontent/GetContentBlockData');\r\n if (typeof params === 'string')\r\n url += '&' + params;\r\n return url;\r\n };\r\n SxcDataWithInternals.prototype.load = function (source) {\r\n var _this = this;\r\n if (source && source.List) {\r\n return this.controller.data;\r\n }\r\n else {\r\n if (!source)\r\n source = {};\r\n if (!source.url)\r\n source.url = this.controller.data.sourceUrl();\r\n source.origSuccess = source.success;\r\n source.success = function (data) {\r\n for (var dataSetName in data) {\r\n if (data.hasOwnProperty(dataSetName))\r\n if (data[dataSetName].List !== null) {\r\n _this.controller.data.in[dataSetName] = data[dataSetName];\r\n _this.controller.data.in[dataSetName].name = dataSetName;\r\n }\r\n }\r\n if (_this.controller.data.in.Default)\r\n _this.List = _this.in.Default.List;\r\n if (source.origSuccess)\r\n source.origSuccess(_this);\r\n _this.controller.isLoaded = true;\r\n _this.controller.lastRefresh = new Date();\r\n _this._triggerLoaded();\r\n };\r\n source.error = function (request) { alert(request.statusText); };\r\n source.preventAutoFail = true;\r\n this.source = source;\r\n return this.reload();\r\n }\r\n };\r\n SxcDataWithInternals.prototype.reload = function () {\r\n this.controller.webApi.get(this.source)\r\n .then(this.source.success, this.source.error);\r\n return this;\r\n };\r\n SxcDataWithInternals.prototype.on = function (events, callback) {\r\n return $(this).bind('2scLoad', callback)[0]._triggerLoaded();\r\n };\r\n SxcDataWithInternals.prototype._triggerLoaded = function () {\r\n return this.controller.isLoaded\r\n ? $(this).trigger('2scLoad', [this])[0]\r\n : this;\r\n };\r\n SxcDataWithInternals.prototype.one = function (events, callback) {\r\n if (!this.controller.isLoaded)\r\n return $(this).one('2scLoad', callback)[0];\r\n callback({}, this);\r\n return this;\r\n };\r\n return SxcDataWithInternals;\r\n}());\r\n\r\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SxcWebApiWithInternals; });\nvar SxcWebApiWithInternals = (function () {\r\n function SxcWebApiWithInternals(controller, id, cbid) {\r\n this.controller = controller;\r\n this.id = id;\r\n this.cbid = cbid;\r\n }\r\n SxcWebApiWithInternals.prototype.get = function (settingsOrUrl, params, data, preventAutoFail) {\r\n return this.request(settingsOrUrl, params, data, preventAutoFail, 'GET');\r\n };\r\n SxcWebApiWithInternals.prototype.post = function (settingsOrUrl, params, data, preventAutoFail) {\r\n return this.request(settingsOrUrl, params, data, preventAutoFail, 'POST');\r\n };\r\n SxcWebApiWithInternals.prototype.delete = function (settingsOrUrl, params, data, preventAutoFail) {\r\n return this.request(settingsOrUrl, params, data, preventAutoFail, 'DELETE');\r\n };\r\n SxcWebApiWithInternals.prototype.put = function (settingsOrUrl, params, data, preventAutoFail) {\r\n return this.request(settingsOrUrl, params, data, preventAutoFail, 'PUT');\r\n };\r\n SxcWebApiWithInternals.prototype.request = function (settings, params, data, preventAutoFail, method) {\r\n if (typeof params !== 'object' && typeof params !== 'undefined')\r\n params = { id: params };\r\n if (typeof settings === 'string') {\r\n var controllerAction = settings.split('/');\r\n var controllerName = controllerAction[0];\r\n var actionName = controllerAction[1];\r\n if (controllerName === '' || actionName === '')\r\n alert('Error: controller or action not defined. Will continue with likely errors.');\r\n settings = {\r\n controller: controllerName,\r\n action: actionName,\r\n params: params,\r\n data: data,\r\n url: controllerAction.length > 2 ? settings : null,\r\n preventAutoFail: preventAutoFail,\r\n };\r\n }\r\n var defaults = {\r\n method: method === null ? 'POST' : method,\r\n params: null,\r\n preventAutoFail: false,\r\n };\r\n settings = $.extend({}, defaults, settings);\r\n var sf = $.ServicesFramework(this.id);\r\n var cbid = this.cbid;\r\n var promise = $.ajax({\r\n async: true,\r\n dataType: settings.dataType || 'json',\r\n data: JSON.stringify(settings.data),\r\n contentType: 'application/json',\r\n type: settings.method,\r\n url: this.getActionUrl(settings),\r\n beforeSend: function (xhr) {\r\n xhr.setRequestHeader('ContentBlockId', cbid);\r\n sf.setModuleHeaders(xhr);\r\n },\r\n });\r\n if (!settings.preventAutoFail)\r\n promise.fail(this.controller.showDetailedHttpError);\r\n return promise;\r\n };\r\n SxcWebApiWithInternals.prototype.getActionUrl = function (settings) {\r\n var sf = $.ServicesFramework(this.id);\r\n var base = (settings.url)\r\n ? this.controller.resolveServiceUrl(settings.url)\r\n : sf.getServiceRoot('2sxc') + 'app/auto/api/' + settings.controller + '/' + settings.action;\r\n return base + (settings.params === null ? '' : ('?' + $.param(settings.params)));\r\n };\r\n return SxcWebApiWithInternals;\r\n}());\r\n\r\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TotalPopup; });\nvar TotalPopup = (function () {\r\n function TotalPopup() {\r\n this.frame = undefined;\r\n this.callback = undefined;\r\n }\r\n TotalPopup.prototype.open = function (url, callback) {\r\n var z = 10000010;\r\n var p = window;\r\n while (p !== window.top && z < 10000100) {\r\n z++;\r\n p = p.parent;\r\n }\r\n var wrapper = document.createElement('div');\r\n wrapper.setAttribute('style', ' top: 0;left: 0;width: 100%;height: 100%; position:fixed; z-index:' + z);\r\n document.body.appendChild(wrapper);\r\n var ifrm = document.createElement('iframe');\r\n ifrm.setAttribute('allowtransparency', 'true');\r\n ifrm.setAttribute('style', 'top: 0;left: 0;width: 100%;height: 100%;');\r\n ifrm.setAttribute('src', url);\r\n wrapper.appendChild(ifrm);\r\n document.body.className += ' sxc-popup-open';\r\n this.frame = ifrm;\r\n this.callback = callback;\r\n };\r\n TotalPopup.prototype.close = function () {\r\n if (this.frame) {\r\n document.body.className = document.body.className.replace('sxc-popup-open', '');\r\n var frm = this.frame;\r\n frm.parentNode.parentNode.removeChild(frm.parentNode);\r\n this.callback();\r\n }\r\n };\r\n TotalPopup.prototype.closeThis = function () {\r\n window.parent.$2sxc.totalPopup.close();\r\n };\r\n return TotalPopup;\r\n}());\r\n\r\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return UrlParamManager; });\nvar UrlParamManager = (function () {\r\n function UrlParamManager() {\r\n }\r\n UrlParamManager.prototype.get = function (name) {\r\n name = name.replace(/[\\[]/, '\\\\[').replace(/[\\]]/, '\\\\]');\r\n var searchRx = new RegExp('[\\\\?&]' + name + '=([^&#]*)', 'i');\r\n var results = searchRx.exec(location.search);\r\n var strResult;\r\n if (results === null) {\r\n var hashRx = new RegExp('[#&]' + name + '=([^&#]*)', 'i');\r\n results = hashRx.exec(location.hash);\r\n }\r\n if (results === null) {\r\n var matches = window.location.pathname.match(new RegExp('/' + name + '/([^/]+)', 'i'));\r\n if (matches && matches.length > 1)\r\n strResult = matches.reverse()[0];\r\n }\r\n else\r\n strResult = results[1];\r\n return strResult === null || strResult === undefined\r\n ? ''\r\n : decodeURIComponent(strResult.replace(/\\+/g, ' '));\r\n };\r\n UrlParamManager.prototype.require = function (name) {\r\n var found = this.get(name);\r\n if (found === '') {\r\n var message = \"Required parameter (\" + name + \") missing from url - cannot continue\";\r\n alert(message);\r\n throw message;\r\n }\r\n return found;\r\n };\r\n return UrlParamManager;\r\n}());\r\n\r\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Stats; });\nvar Stats = (function () {\r\n function Stats() {\r\n this.watchDomChanges = 0;\r\n }\r\n return Stats;\r\n}());\r\n\r\n\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// 2sxc.api.min.js"," \t// The module cache\n \tvar installedModules = {};\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, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\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 \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap f9c33ee8e1f76c188f85","// this is the 2sxc-javascript API\r\n// 2sxc will include this automatically when a user has edit-rights\r\n// a template developer will typically use this to use the data-api to read 2sxc-data from the server\r\n// read more about this in the wiki: https://github.com/2sic/2sxc/wiki/JavaScript-%242sxc\r\n\r\nimport { buildSxcController, Window } from \"./ToSic.Sxc.Controller\";\r\n\r\n// ReSharper disable InconsistentNaming\r\ndeclare const window: Window;\r\n\r\nif (!window.$2sxc) // prevent double execution\r\n window.$2sxc = buildSxcController();\r\n\r\n// ReSharper restore InconsistentNaming\r\n\n\n\n// WEBPACK FOOTER //\n// ./2sxc-api/js/2sxc.api.ts","// ReSharper disable InconsistentNaming\r\n\r\nimport { SxcInstance, SxcInstanceWithEditing, SxcInstanceWithInternals } from './ToSic.Sxc.Instance';\r\nimport { TotalPopup } from './ToSic.Sxc.TotalPopup';\r\nimport { UrlParamManager } from './ToSic.Sxc.Url';\r\nimport { Stats } from './Stats';\r\n\r\nexport interface Window { $2sxc: SxcController | SxcControllerWithInternals; }\r\n\r\ndeclare const $: any;\r\ndeclare const window: Window;\r\n\r\n/**\r\n * This is the interface for the main $2sxc object on the window\r\n */\r\nexport interface SxcController {\r\n /**\r\n * returns a 2sxc-instance of the id or html-tag passed in\r\n * @param id\r\n * @param cbid\r\n * @returns {}\r\n */\r\n (id: number | HTMLElement, cbid?: number): SxcInstance | SxcInstanceWithInternals,\r\n\r\n /**\r\n * system information, mainly for checking which version of 2sxc is running\r\n * note: it's not always updated reliably, but it helps when debugging\r\n */\r\n sysinfo: {\r\n /**\r\n * the version using the ##.##.## syntax\r\n */\r\n version: string,\r\n\r\n /**\r\n * a short text description, for people who have no idea what this is\r\n */\r\n description: string,\r\n };\r\n}\r\n\r\n/**\r\n * returns a 2sxc-instance of the id or html-tag passed in\r\n * @param id\r\n * @param cbid\r\n * @returns {}\r\n */\r\nfunction SxcController(id: number | HTMLElement, cbid?: number): SxcInstanceWithInternals {\r\n const $2sxc = window.$2sxc as SxcControllerWithInternals;\r\n if (!$2sxc._controllers)\r\n throw new Error('$2sxc not initialized yet');\r\n\r\n // if it's a dom-element, use auto-find\r\n if (typeof id === 'object') {\r\n const idTuple = autoFind(id);\r\n id = idTuple[0];\r\n cbid = idTuple[1];\r\n }\r\n\r\n if (!cbid) cbid = id; // if content-block is unknown, use id of module\r\n const cacheKey = id + ':' + cbid; // neutralize the id from old \"34\" format to the new \"35:353\" format\r\n\r\n // either get the cached controller from previous calls, or create a new one\r\n if ($2sxc._controllers[cacheKey]) return $2sxc._controllers[cacheKey];\r\n\r\n // also init the data-cache in case it's ever needed\r\n if (!$2sxc._data[cacheKey]) $2sxc._data[cacheKey] = {};\r\n\r\n return ($2sxc._controllers[cacheKey]\r\n = new SxcInstanceWithInternals(id, cbid, cacheKey, $2sxc, $.ServicesFramework));\r\n}\r\n\r\n/**\r\n * Build a SXC Controller for the page. Should only ever be executed once\r\n */\r\nexport function buildSxcController(): SxcController | SxcControllerWithInternals {\r\n const urlManager = new UrlParamManager();\r\n const debug = {\r\n load: (urlManager.get('debug') === 'true'),\r\n uncache: urlManager.get('sxcver'),\r\n };\r\n const stats = new Stats();\r\n\r\n const addOn: any = {\r\n _controllers: {} as any,\r\n sysinfo: {\r\n version: '09.43.00',\r\n description: 'The 2sxc Controller object - read more about it on 2sxc.org',\r\n },\r\n beta: {},\r\n _data: {},\r\n // this creates a full-screen iframe-popup and provides a close-command to finish the dialog as needed\r\n totalPopup: new TotalPopup(),\r\n urlParams: urlManager,\r\n // note: I would like to remove this from $2sxc, but it's currently\r\n // used both in the inpage-edit and in the dialogs\r\n // debug state which is needed in various places\r\n debug,\r\n stats: stats,\r\n // mini-helpers to manage 2sxc parts, a bit like a dependency loader\r\n // which will optimize to load min/max depending on debug state\r\n parts: {\r\n getUrl(url: string, preventUnmin: boolean) {\r\n let r = (preventUnmin || !debug.load) ? url : url.replace('.min', ''); // use min or not\r\n if (debug.uncache && r.indexOf('sxcver') === -1)\r\n r = r + ((r.indexOf('?') === -1) ? '?' : '&') + 'sxcver=' + debug.uncache;\r\n return r;\r\n },\r\n },\r\n };\r\n for (const property in addOn)\r\n if (addOn.hasOwnProperty(property))\r\n SxcController[property] = addOn[property] as any;\r\n return SxcController as any as SxcControllerWithInternals;\r\n}\r\n\r\nfunction autoFind(domElement: HTMLElement): [number, number] {\r\n const containerTag = $(domElement).closest('.sc-content-block')[0];\r\n if (!containerTag) return null;\r\n const iid = containerTag.getAttribute('data-cb-instance');\r\n const cbid = containerTag.getAttribute('data-cb-id');\r\n if (!iid || !cbid) return null;\r\n return [iid, cbid];\r\n}\r\n\r\nexport interface SxcControllerWithInternals extends SxcController {\r\n (id: number | HTMLElement, cbid?: number): SxcInstance | SxcInstanceWithInternals;\r\n totalPopup: TotalPopup;\r\n urlParams: UrlParamManager;\r\n beta: any;\r\n _controllers: any;\r\n _data: any;\r\n _manage: any;\r\n _translateInit: any;\r\n debug: any;\r\n parts: any;\r\n\r\n}\r\n\r\n// ReSharper restore InconsistentNaming\r\n\n\n\n// WEBPACK FOOTER //\n// ./2sxc-api/js/ToSic.Sxc.Controller.ts","\r\nimport { SxcController, SxcControllerWithInternals } from './ToSic.Sxc.Controller';\r\nimport { SxcDataWithInternals } from './ToSic.Sxc.Data';\r\nimport { SxcWebApiWithInternals } from './ToSic.Sxc.WebApi';\r\n/**\r\n * The typical sxc-instance object for a specific DNN module or content-block\r\n */\r\nexport class SxcInstance {\r\n /**\r\n * helpers for ajax calls\r\n */\r\n webApi: SxcWebApiWithInternals;\r\n protected serviceRoot: string;\r\n private readonly serviceScopes = ['app', 'app-sys', 'app-api', 'app-query', 'app-content', 'eav', 'view', 'dnn'];\r\n\r\n constructor(\r\n /**\r\n * the sxc-instance ID, which is usually the DNN Module Id\r\n */\r\n public id: number,\r\n\r\n /**\r\n * content-block ID, which is either the module ID, or the content-block definitiion entity ID\r\n * this is an advanced concept you usually don't care about, otherwise you should research it\r\n */\r\n public cbid: number,\r\n protected readonly dnnSf: any,\r\n ) {\r\n this.serviceRoot = dnnSf(id).getServiceRoot('2sxc');\r\n this.webApi = new SxcWebApiWithInternals(this, id, cbid);\r\n }\r\n\r\n /**\r\n * converts a short api-call path like \"/app/Blog/query/xyz\" to the DNN full path\r\n * which varies from installation to installation like \"/desktopmodules/api/2sxc/app/...\"\r\n * @param virtualPath\r\n * @returns mapped path\r\n */\r\n resolveServiceUrl(virtualPath: string) {\r\n const scope = virtualPath.split('/')[0].toLowerCase();\r\n\r\n // stop if it's not one of our special paths\r\n if (this.serviceScopes.indexOf(scope) === -1)\r\n return virtualPath;\r\n\r\n return this.serviceRoot + scope + '/' + virtualPath.substring(virtualPath.indexOf('/') + 1);\r\n }\r\n\r\n\r\n // Show a nice error with more infos around 2sxc\r\n showDetailedHttpError(result: any): any {\r\n if (window.console)\r\n console.log(result);\r\n\r\n if (result.status === 404 &&\r\n result.config &&\r\n result.config.url &&\r\n result.config.url.indexOf('/dist/i18n/') > -1) {\r\n if (window.console)\r\n console.log('just fyi: failed to load language resource; will have to use default');\r\n return result;\r\n }\r\n\r\n\r\n // if it's an unspecified 0-error, it's probably not an error but a cancelled request,\r\n // (happens when closing popups containing angularJS)\r\n if (result.status === 0 || result.status === -1)\r\n return result;\r\n\r\n // let's try to show good messages in most cases\r\n let infoText = 'Had an error talking to the server (status ' + result.status + ').';\r\n const srvResp = result.responseText\r\n ? JSON.parse(result.responseText) // for jquery ajax errors\r\n : result.data; // for angular $http\r\n if (srvResp) {\r\n const msg = srvResp.Message;\r\n if (msg) infoText += '\\nMessage: ' + msg;\r\n const msgDet = srvResp.MessageDetail || srvResp.ExceptionMessage;\r\n if (msgDet) infoText += '\\nDetail: ' + msgDet;\r\n\r\n\r\n if (msgDet && msgDet.indexOf('No action was found') === 0)\r\n if (msgDet.indexOf('that matches the name') > 0)\r\n infoText += '\\n\\nTip from 2sxc: you probably got the action-name wrong in your JS.';\r\n else if (msgDet.indexOf('that matches the request.') > 0)\r\n infoText += '\\n\\nTip from 2sxc: Seems like the parameters are the wrong amount or type.';\r\n\r\n if (msg && msg.indexOf('Controller') === 0 && msg.indexOf('not found') > 0)\r\n infoText +=\r\n // tslint:disable-next-line:max-line-length\r\n \"\\n\\nTip from 2sxc: you probably spelled the controller name wrong or forgot to remove the word 'controller' from the call in JS. To call a controller called 'DemoController' only use 'Demo'.\";\r\n\r\n }\r\n // tslint:disable-next-line:max-line-length\r\n infoText += '\\n\\nif you are an advanced user you can learn more about what went wrong - discover how on 2sxc.org/help?tag=debug';\r\n alert(infoText);\r\n\r\n return result;\r\n }\r\n}\r\n\r\n/**\r\n * Enhanced sxc instance with additional editing functionality\r\n * Use this, if you intend to run content-management commands like \"edit\" from your JS directly\r\n */\r\nexport class SxcInstanceWithEditing extends SxcInstance {\r\n /**\r\n * manage object which provides access to additional content-management features\r\n * it only exists if 2sxc is in edit mode (otherwise the JS are not included for these features)\r\n */\r\n manage: any = null; // initialize correctly later on\r\n\r\n constructor(\r\n public id: number,\r\n public cbid: number,\r\n// ReSharper disable once InconsistentNaming\r\n protected $2sxc: SxcControllerWithInternals,\r\n protected readonly dnnSf: any,\r\n ) {\r\n super(id, cbid, dnnSf);\r\n\r\n // add manage property, but not within initializer, because inside the manage-initializer it may reference 2sxc again\r\n try { // sometimes the manage can't be built, like before installing\r\n if ($2sxc._manage) $2sxc._manage.initInstance(this);\r\n } catch (e) {\r\n console.error('error in 2sxc - will only log but not throw', e);\r\n // throw e;\r\n }\r\n\r\n // this only works when manage exists (not installing) and translator exists too\r\n if ($2sxc._translateInit && this.manage) $2sxc._translateInit(this.manage); // init translate, not really nice, but ok for now\r\n\r\n }\r\n\r\n /**\r\n * checks if we're currently in edit mode\r\n * @returns {boolean}\r\n */\r\n isEditMode() {\r\n return this.manage && this.manage._isEditMode();\r\n }\r\n\r\n}\r\n\r\nexport class SxcInstanceWithInternals extends SxcInstanceWithEditing {\r\n data: SxcDataWithInternals;\r\n source: any = null;\r\n isLoaded = false;\r\n lastRefresh: Date = null;\r\n\r\n constructor(\r\n public id: number,\r\n public cbid: number,\r\n private cacheKey: string,\r\n// ReSharper disable once InconsistentNaming\r\n protected $2sxc: SxcControllerWithInternals,\r\n protected readonly dnnSf: any,\r\n ) {\r\n super(id, cbid, $2sxc, dnnSf);\r\n this.data = new SxcDataWithInternals(this);\r\n }\r\n\r\n recreate(resetCache: boolean): SxcInstanceWithInternals {\r\n if (resetCache) delete this.$2sxc._controllers[this.cacheKey]; // clear cache\r\n return this.$2sxc(this.id, this.cbid) as any as SxcInstanceWithInternals; // generate new\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./2sxc-api/js/ToSic.Sxc.Instance.ts","import { SxcInstanceWithInternals } from './ToSic.Sxc.Instance';\r\n\r\ndeclare const $: any;\r\n\r\n\r\nexport class SxcDataWithInternals {\r\n source: any = undefined;\r\n\r\n // in-streams\r\n \"in\": any = {};\r\n\r\n // will hold the default stream ([\"in\"][\"Default\"].List\r\n// ReSharper disable once InconsistentNaming\r\n List: any = [];\r\n\r\n constructor(\r\n private controller: SxcInstanceWithInternals,\r\n ) {\r\n\r\n }\r\n\r\n // source path defaulting to current page + optional params\r\n sourceUrl(params?: string): string {\r\n let url = this.controller.resolveServiceUrl('app-sys/appcontent/GetContentBlockData');\r\n if (typeof params === 'string') // text like 'id=7'\r\n url += '&' + params;\r\n return url;\r\n }\r\n\r\n\r\n // load data via ajax\r\n load(source?: any) {\r\n // if source is already the data, set it\r\n if (source && source.List) {\r\n // 2017-09-05 2dm: discoverd a call to an inexisting function\r\n // since this is an old API which is being deprecated, please don't fix unless we get active feedback\r\n // controller.data.setData(source);\r\n return this.controller.data;\r\n } else {\r\n if (!source)\r\n source = {};\r\n if (!source.url)\r\n source.url = this.controller.data.sourceUrl();\r\n source.origSuccess = source.success;\r\n source.success = (data: any) => {\r\n\r\n for (const dataSetName in data) {\r\n if (data.hasOwnProperty(dataSetName))\r\n if (data[dataSetName].List !== null) {\r\n this.controller.data.in[dataSetName] = data[dataSetName];\r\n this.controller.data.in[dataSetName].name = dataSetName;\r\n }\r\n }\r\n\r\n if (this.controller.data.in.Default)\r\n // 2017-09-05 2dm: previously wrote it to controller.List, but this is almost certainly a mistake\r\n // since it's an old API which is being deprecated, we won't fix it\r\n this.List = this.in.Default.List;\r\n\r\n if (source.origSuccess)\r\n source.origSuccess(this);\r\n\r\n this.controller.isLoaded = true;\r\n this.controller.lastRefresh = new Date();\r\n (this as any)._triggerLoaded();\r\n };\r\n source.error = (request: any) => { alert(request.statusText); };\r\n source.preventAutoFail = true; // use our fail message\r\n this.source = source;\r\n return this.reload();\r\n }\r\n }\r\n\r\n reload(): SxcDataWithInternals {\r\n this.controller.webApi.get(this.source)\r\n .then(this.source.success, this.source.error);\r\n return this;\r\n }\r\n\r\n on(events: Event, callback: () => void): Promise {\r\n return $(this).bind('2scLoad', callback)[0]._triggerLoaded();\r\n }\r\n\r\n// ReSharper disable once InconsistentNaming\r\n _triggerLoaded(): Promise {\r\n return this.controller.isLoaded\r\n ? $(this).trigger('2scLoad', [this])[0]\r\n : this;\r\n }\r\n\r\n one(events: Event, callback: (x: any, y: any) => void): SxcDataWithInternals {\r\n if (!this.controller.isLoaded)\r\n return $(this).one('2scLoad', callback)[0];\r\n callback({}, this);\r\n return this;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./2sxc-api/js/ToSic.Sxc.Data.ts","\r\ndeclare const $: any;\r\nimport { SxcInstance } from './ToSic.Sxc.Instance';\r\n\r\n/**\r\n * helper API to run ajax / REST calls to the server\r\n * it will ensure that the headers etc. are set correctly\r\n * and that urls are rewritten\r\n */\r\nexport class SxcWebApiWithInternals {\r\n constructor(\r\n private readonly controller: SxcInstance,\r\n private readonly id: number,\r\n private readonly cbid: number,\r\n ) {\r\n\r\n }\r\n /**\r\n * returns an http-get promise\r\n * @param settingsOrUrl the url to get\r\n * @param params jQuery style ajax parameters\r\n * @param data jQuery style data for post/put requests\r\n * @param preventAutoFail\r\n * @returns {Promise} jQuery ajax promise object\r\n */\r\n get(settingsOrUrl: string | any, params?: any, data?: any, preventAutoFail?: boolean): any {\r\n return this.request(settingsOrUrl, params, data, preventAutoFail, 'GET');\r\n }\r\n\r\n /**\r\n * returns an http-get promise\r\n * @param settingsOrUrl the url to get\r\n * @param params jQuery style ajax parameters\r\n * @param data jQuery style data for post/put requests\r\n * @param preventAutoFail\r\n * @returns {Promise} jQuery ajax promise object\r\n */\r\n post(settingsOrUrl: string | any, params?: any, data?: any, preventAutoFail?: boolean): any {\r\n return this.request(settingsOrUrl, params, data, preventAutoFail, 'POST');\r\n }\r\n\r\n /**\r\n * returns an http-get promise\r\n * @param settingsOrUrl the url to get\r\n * @param params jQuery style ajax parameters\r\n * @param data jQuery style data for post/put requests\r\n * @param preventAutoFail\r\n * @returns {Promise} jQuery ajax promise object\r\n */\r\n delete(settingsOrUrl: string | any, params?: any, data?: any, preventAutoFail?: boolean): any {\r\n return this.request(settingsOrUrl, params, data, preventAutoFail, 'DELETE');\r\n }\r\n\r\n /**\r\n * returns an http-get promise\r\n * @param settingsOrUrl the url to get\r\n * @param params jQuery style ajax parameters\r\n * @param data jQuery style data for post/put requests\r\n * @param preventAutoFail\r\n * @returns {Promise} jQuery ajax promise object\r\n */\r\n put(settingsOrUrl: string | any, params?: any, data?: any, preventAutoFail?: boolean): any {\r\n return this.request(settingsOrUrl, params, data, preventAutoFail, 'PUT');\r\n }\r\n\r\n private request(settings: string | any, params: any, data: any, preventAutoFail: boolean, method: string): any {\r\n\r\n // url parameter: auto convert a single value (instead of object of values) to an id=... parameter\r\n // tslint:disable-next-line:curly\r\n if (typeof params !== 'object' && typeof params !== 'undefined')\r\n params = { id: params };\r\n\r\n // if the first parameter is a string, resolve settings\r\n if (typeof settings === 'string') {\r\n const controllerAction = settings.split('/');\r\n const controllerName = controllerAction[0];\r\n const actionName = controllerAction[1];\r\n\r\n if (controllerName === '' || actionName === '')\r\n alert('Error: controller or action not defined. Will continue with likely errors.');\r\n\r\n settings = {\r\n controller: controllerName,\r\n action: actionName,\r\n params,\r\n data,\r\n url: controllerAction.length > 2 ? settings : null,\r\n preventAutoFail,\r\n };\r\n }\r\n\r\n const defaults = {\r\n method: method === null ? 'POST' : method,\r\n params: null as any,\r\n preventAutoFail: false,\r\n };\r\n settings = $.extend({}, defaults, settings);\r\n const sf = $.ServicesFramework(this.id);\r\n const cbid = this.cbid; // must read here, as the \"this\" will change inside the method\r\n\r\n const promise = $.ajax({\r\n async: true,\r\n dataType: settings.dataType || 'json', // default is json if not specified\r\n data: JSON.stringify(settings.data),\r\n contentType: 'application/json',\r\n type: settings.method,\r\n url: this.getActionUrl(settings),\r\n beforeSend(xhr: any) {\r\n xhr.setRequestHeader('ContentBlockId', cbid);\r\n sf.setModuleHeaders(xhr);\r\n },\r\n });\r\n\r\n if (!settings.preventAutoFail)\r\n promise.fail(this.controller.showDetailedHttpError);\r\n\r\n return promise;\r\n }\r\n\r\n private getActionUrl(settings: any): string {\r\n const sf = $.ServicesFramework(this.id);\r\n const base = (settings.url)\r\n ? this.controller.resolveServiceUrl(settings.url)\r\n : sf.getServiceRoot('2sxc') + 'app/auto/api/' + settings.controller + '/' + settings.action;\r\n return base + (settings.params === null ? '' : ('?' + $.param(settings.params)));\r\n }\r\n\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./2sxc-api/js/ToSic.Sxc.WebApi.ts","\r\nexport class TotalPopup {\r\n frame: any = undefined;\r\n callback: any = undefined;\r\n\r\n open(url: string, callback: () => void): void {\r\n // count parents to see how high the z-index needs to be\r\n let z = 10000010; // Needs at least 10000000 to be on top of the DNN9 bar\r\n let p = window;\r\n while (p !== window.top && z < 10000100) {\r\n z++;\r\n p = p.parent;\r\n }\r\n\r\n const wrapper = document.createElement('div');\r\n wrapper.setAttribute('style', ' top: 0;left: 0;width: 100%;height: 100%; position:fixed; z-index:' + z);\r\n document.body.appendChild(wrapper);\r\n\r\n const ifrm = document.createElement('iframe');\r\n ifrm.setAttribute('allowtransparency', 'true');\r\n ifrm.setAttribute('style', 'top: 0;left: 0;width: 100%;height: 100%;');\r\n ifrm.setAttribute('src', url);\r\n wrapper.appendChild(ifrm);\r\n document.body.className += ' sxc-popup-open';\r\n this.frame = ifrm;\r\n this.callback = callback;\r\n }\r\n\r\n close(): void {\r\n if (this.frame) {\r\n document.body.className = document.body.className.replace('sxc-popup-open', '');\r\n const frm = this.frame;\r\n frm.parentNode.parentNode.removeChild(frm.parentNode);\r\n this.callback();\r\n }\r\n }\r\n\r\n closeThis(): void {\r\n (window.parent as any).$2sxc.totalPopup.close();\r\n }\r\n\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./2sxc-api/js/ToSic.Sxc.TotalPopup.ts","\r\n export class UrlParamManager {\r\n get(name: string) {\r\n // warning: this method is duplicated in 2 places - keep them in sync.\r\n // locations are eav and 2sxc4ng\r\n name = name.replace(/[\\[]/, '\\\\[').replace(/[\\]]/, '\\\\]');\r\n const searchRx = new RegExp('[\\\\?&]' + name + '=([^&#]*)', 'i');\r\n let results = searchRx.exec(location.search);\r\n let strResult: string;\r\n\r\n if (results === null) {\r\n const hashRx = new RegExp('[#&]' + name + '=([^&#]*)', 'i');\r\n results = hashRx.exec(location.hash);\r\n }\r\n\r\n // if nothing found, try normal URL because DNN places parameters in /key/value notation\r\n if (results === null) {\r\n // Otherwise try parts of the URL\r\n const matches = window.location.pathname.match(new RegExp('/' + name + '/([^/]+)', 'i'));\r\n\r\n // Check if we found anything, if we do find it, we must reverse the\r\n // results so we get the \"last\" one in case there are multiple hits\r\n if (matches && matches.length > 1)\r\n strResult = matches.reverse()[0];\r\n } else\r\n strResult = results[1];\r\n\r\n return strResult === null || strResult === undefined\r\n ? ''\r\n : decodeURIComponent(strResult.replace(/\\+/g, ' '));\r\n }\r\n\r\n require(name: string) {\r\n const found = this.get(name);\r\n if (found === '') {\r\n const message = `Required parameter (${name}) missing from url - cannot continue`;\r\n alert(message);\r\n throw message;\r\n }\r\n return found;\r\n }\r\n }\r\n\n\n\n// WEBPACK FOOTER //\n// ./2sxc-api/js/ToSic.Sxc.Url.ts","export class Stats {\r\n watchDomChanges = 0;\r\n}\n\n\n// WEBPACK FOOTER //\n// ./2sxc-api/js/Stats.ts"],"sourceRoot":""}