@bbn/bbn 1.0.24 → 1.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (276) hide show
  1. package/dist/bundle.d.ts +224 -238
  2. package/dist/bundle.js +940 -906
  3. package/dist/fn/_addLoader.js +1 -1
  4. package/dist/fn/_deleteLoader.d.ts +1 -1
  5. package/dist/fn/_deleteLoader.js +2 -2
  6. package/dist/fn/abort.js +4 -4
  7. package/dist/fn/abortURL.js +2 -2
  8. package/dist/fn/addColors.d.ts +1 -1
  9. package/dist/fn/addColors.js +23 -6
  10. package/dist/fn/addInputs.d.ts +1 -2
  11. package/dist/fn/addInputs.js +4 -5
  12. package/dist/fn/adjustHeight.js +1 -1
  13. package/dist/fn/adjustSize.js +1 -1
  14. package/dist/fn/adjustWidth.js +1 -1
  15. package/dist/fn/ajax.d.ts +1 -1
  16. package/dist/fn/ajax.js +8 -7
  17. package/dist/fn/analyzeFunction.js +5 -5
  18. package/dist/fn/animateCss.js +8 -7
  19. package/dist/fn/baseName.d.ts +1 -1
  20. package/dist/fn/baseName.js +1 -1
  21. package/dist/fn/br2nl.d.ts +1 -1
  22. package/dist/fn/br2nl.js +1 -1
  23. package/dist/fn/calendar.js +1 -1
  24. package/dist/fn/callback.d.ts +1 -1
  25. package/dist/fn/callback.js +5 -5
  26. package/dist/fn/camelToCss.js +4 -2
  27. package/dist/fn/canvasToImage.js +1 -1
  28. package/dist/fn/center.js +3 -5
  29. package/dist/fn/checkProps.d.ts +1 -1
  30. package/dist/fn/checkProps.js +1 -1
  31. package/dist/fn/checkPropsDetails.d.ts +1 -4
  32. package/dist/fn/checkPropsDetails.js +10 -11
  33. package/dist/fn/checkPropsOrDie.d.ts +1 -1
  34. package/dist/fn/checkPropsOrDie.js +1 -1
  35. package/dist/fn/checkType.d.ts +1 -1
  36. package/dist/fn/checkType.js +3 -3
  37. package/dist/fn/chrono.d.ts +3 -0
  38. package/dist/fn/chrono.js +23 -0
  39. package/dist/fn/circularReplacer.js +2 -2
  40. package/dist/fn/clone.d.ts +0 -1
  41. package/dist/fn/clone.js +1 -1
  42. package/dist/fn/colorToHex.js +1 -1
  43. package/dist/fn/compare.js +44 -44
  44. package/dist/fn/compareConditions.d.ts +0 -1
  45. package/dist/fn/compareConditions.js +3 -3
  46. package/dist/fn/copy.js +9 -9
  47. package/dist/fn/correctCase.js +1 -1
  48. package/dist/fn/count.d.ts +1 -1
  49. package/dist/fn/count.js +2 -2
  50. package/dist/fn/crc32.js +12 -3
  51. package/dist/fn/createObject.d.ts +1 -1
  52. package/dist/fn/createObject.js +3 -3
  53. package/dist/fn/cssExists.js +7 -4
  54. package/dist/fn/date.js +5 -5
  55. package/dist/fn/dateSQL.js +4 -3
  56. package/dist/fn/deepPath.d.ts +1 -2
  57. package/dist/fn/defaultAjaxAbortFunction.d.ts +1 -1
  58. package/dist/fn/defaultAjaxAbortFunction.js +1 -1
  59. package/dist/fn/defaultAjaxErrorFunction.d.ts +1 -1
  60. package/dist/fn/defaultAjaxErrorFunction.js +0 -12
  61. package/dist/fn/defaultAlertFunction.d.ts +1 -1
  62. package/dist/fn/defaultAlertFunction.js +2 -3
  63. package/dist/fn/defaultConfirmFunction.d.ts +1 -1
  64. package/dist/fn/defaultEndLoadingFunction.d.ts +1 -1
  65. package/dist/fn/defaultEndLoadingFunction.js +1 -17
  66. package/dist/fn/defaultPostLinkFunction.d.ts +1 -1
  67. package/dist/fn/defaultPostLinkFunction.js +1 -1
  68. package/dist/fn/defaultPreLinkFunction.d.ts +1 -1
  69. package/dist/fn/defaultPreLinkFunction.js +2 -10
  70. package/dist/fn/defaultStartLoadingFunction.d.ts +1 -1
  71. package/dist/fn/defaultStartLoadingFunction.js +2 -13
  72. package/dist/fn/deleteProp.d.ts +1 -1
  73. package/dist/fn/deleteProp.js +3 -2
  74. package/dist/fn/diffObj.d.ts +1 -2
  75. package/dist/fn/diffObj.js +13 -14
  76. package/dist/fn/dirName.d.ts +1 -1
  77. package/dist/fn/download.d.ts +1 -1
  78. package/dist/fn/download.js +3 -5
  79. package/dist/fn/downloadContent.d.ts +1 -1
  80. package/dist/fn/each.js +1 -1
  81. package/dist/fn/error.js +2 -2
  82. package/dist/fn/escapeRegExp.js +1 -1
  83. package/dist/fn/escapeTicks.js +1 -1
  84. package/dist/fn/escapeUrl.js +1 -1
  85. package/dist/fn/extend.d.ts +1 -2
  86. package/dist/fn/extend.js +11 -11
  87. package/dist/fn/extendOut.d.ts +1 -2
  88. package/dist/fn/extendOut.js +3 -3
  89. package/dist/fn/fdate.d.ts +1 -1
  90. package/dist/fn/fdatetime.d.ts +1 -1
  91. package/dist/fn/fdatetime.js +1 -1
  92. package/dist/fn/fieldValue.js +2 -2
  93. package/dist/fn/fileExt.js +1 -1
  94. package/dist/fn/filter.d.ts +1 -2
  95. package/dist/fn/filter.js +13 -12
  96. package/dist/fn/filterToConditions.d.ts +11 -3
  97. package/dist/fn/filterToConditions.js +6 -6
  98. package/dist/fn/findAll.d.ts +0 -1
  99. package/dist/fn/findAll.js +1 -1
  100. package/dist/fn/fori.d.ts +1 -1
  101. package/dist/fn/fori.js +2 -2
  102. package/dist/fn/forir.d.ts +1 -1
  103. package/dist/fn/forir.js +2 -2
  104. package/dist/fn/formdata.d.ts +1 -1
  105. package/dist/fn/formdata.js +12 -13
  106. package/dist/fn/fromXml.js +6 -6
  107. package/dist/fn/ftime.js +1 -1
  108. package/dist/fn/getAllTags.d.ts +1 -1
  109. package/dist/fn/getAllTags.js +1 -1
  110. package/dist/fn/getAncestors.d.ts +1 -1
  111. package/dist/fn/getAncestors.js +7 -8
  112. package/dist/fn/getAttributes.js +2 -2
  113. package/dist/fn/getBrowserName.js +9 -9
  114. package/dist/fn/getBrowserVersion.js +2 -2
  115. package/dist/fn/getCookie.js +1 -1
  116. package/dist/fn/getDeviceType.js +3 -3
  117. package/dist/fn/getEventData.js +11 -8
  118. package/dist/fn/getField.d.ts +1 -1
  119. package/dist/fn/getField.js +4 -3
  120. package/dist/fn/getFieldValues.d.ts +1 -1
  121. package/dist/fn/getFieldValues.js +2 -2
  122. package/dist/fn/getHTMLOfSelection.d.ts +1 -1
  123. package/dist/fn/getHTMLOfSelection.js +9 -19
  124. package/dist/fn/getLoader.d.ts +1 -1
  125. package/dist/fn/getPath.d.ts +1 -1
  126. package/dist/fn/getPath.js +4 -4
  127. package/dist/fn/getProp.js +3 -2
  128. package/dist/fn/getProperty.js +1 -1
  129. package/dist/fn/getRow.d.ts +1 -1
  130. package/dist/fn/getRow.js +1 -1
  131. package/dist/fn/getScrollBarSize.js +9 -7
  132. package/dist/fn/getText.d.ts +1 -1
  133. package/dist/fn/getTimeoff.js +1 -1
  134. package/dist/fn/happy.js +1 -1
  135. package/dist/fn/hash.d.ts +1 -1
  136. package/dist/fn/hash.js +1 -1
  137. package/dist/fn/hex2rgb.js +7 -5
  138. package/dist/fn/html2text.d.ts +1 -1
  139. package/dist/fn/imageToCanvas.js +2 -2
  140. package/dist/fn/imgToBase64.d.ts +1 -1
  141. package/dist/fn/imgToBase64.js +3 -3
  142. package/dist/fn/info.js +1 -1
  143. package/dist/fn/init.js +29 -29
  144. package/dist/fn/isActiveInterface.js +2 -2
  145. package/dist/fn/isColor.d.ts +1 -1
  146. package/dist/fn/isColor.js +11 -4
  147. package/dist/fn/isCp.js +7 -7
  148. package/dist/fn/isDimension.d.ts +1 -1
  149. package/dist/fn/isDimension.js +11 -4
  150. package/dist/fn/isEmail.d.ts +1 -1
  151. package/dist/fn/isEmail.js +11 -4
  152. package/dist/fn/isEmpty.js +1 -1
  153. package/dist/fn/isFocused.d.ts +1 -1
  154. package/dist/fn/isFocused.js +1 -1
  155. package/dist/fn/isHostname.js +1 -1
  156. package/dist/fn/isIP.js +1 -1
  157. package/dist/fn/isInside.js +1 -1
  158. package/dist/fn/isIterable.js +1 -1
  159. package/dist/fn/isNumber.js +1 -1
  160. package/dist/fn/isPercent.js +1 -1
  161. package/dist/fn/isPrimitive.js +1 -1
  162. package/dist/fn/isPropSize.js +1 -1
  163. package/dist/fn/isSQLDate.js +1 -1
  164. package/dist/fn/isSame.d.ts +1 -2
  165. package/dist/fn/isSame.js +3 -3
  166. package/dist/fn/isURL.js +1 -1
  167. package/dist/fn/isValidDimension.js +2 -3
  168. package/dist/fn/isValue.js +1 -1
  169. package/dist/fn/isVue.d.ts +1 -1
  170. package/dist/fn/isVue.js +5 -5
  171. package/dist/fn/iterate.d.ts +1 -1
  172. package/dist/fn/iterate.js +3 -3
  173. package/dist/fn/lightenDarkenHex.js +2 -2
  174. package/dist/fn/link.d.ts +1 -2
  175. package/dist/fn/link.js +17 -19
  176. package/dist/fn/log.js +4 -4
  177. package/dist/fn/makeReactive.d.ts +0 -1
  178. package/dist/fn/makeReactive.js +35 -23
  179. package/dist/fn/map.d.ts +0 -1
  180. package/dist/fn/md5.js +30 -10
  181. package/dist/fn/money.d.ts +1 -1
  182. package/dist/fn/money.js +47 -34
  183. package/dist/fn/move.d.ts +1 -1
  184. package/dist/fn/move.js +1 -1
  185. package/dist/fn/multiorder.d.ts +1 -1
  186. package/dist/fn/multiorder.js +5 -5
  187. package/dist/fn/nl2br.d.ts +1 -1
  188. package/dist/fn/nl2br.js +1 -1
  189. package/dist/fn/numProperties.d.ts +1 -1
  190. package/dist/fn/numProperties.js +1 -1
  191. package/dist/fn/objectToFormData.d.ts +1 -1
  192. package/dist/fn/objectToFormData.js +3 -3
  193. package/dist/fn/outerHeight.d.ts +1 -1
  194. package/dist/fn/outerHeight.js +5 -4
  195. package/dist/fn/outerWidth.d.ts +1 -1
  196. package/dist/fn/outerWidth.js +1 -2
  197. package/dist/fn/pickValue.d.ts +1 -1
  198. package/dist/fn/post.d.ts +1 -1
  199. package/dist/fn/post.js +3 -3
  200. package/dist/fn/postOut.d.ts +1 -1
  201. package/dist/fn/postOut.js +2 -2
  202. package/dist/fn/printf.js +1 -3
  203. package/dist/fn/quotes2html.d.ts +1 -1
  204. package/dist/fn/quotes2html.js +3 -3
  205. package/dist/fn/randomInt.d.ts +1 -1
  206. package/dist/fn/randomString.d.ts +1 -1
  207. package/dist/fn/randomString.js +9 -8
  208. package/dist/fn/removeAccents.d.ts +1 -1
  209. package/dist/fn/removeAccents.js +1 -1
  210. package/dist/fn/removeEmpty.d.ts +1 -1
  211. package/dist/fn/removeExtraSpaces.d.ts +1 -1
  212. package/dist/fn/removeHtmlComments.d.ts +1 -1
  213. package/dist/fn/removePrivateProp.d.ts +1 -2
  214. package/dist/fn/removePrivateProp.js +6 -6
  215. package/dist/fn/removeTrailingChars.d.ts +1 -1
  216. package/dist/fn/repeat.d.ts +1 -1
  217. package/dist/fn/repeat.js +1 -6
  218. package/dist/fn/replaceAll.d.ts +1 -1
  219. package/dist/fn/replaceAll.js +1 -4
  220. package/dist/fn/replaceSelection.js +1 -1
  221. package/dist/fn/resize.js +9 -7
  222. package/dist/fn/rgb2hex.js +6 -4
  223. package/dist/fn/riterate.d.ts +1 -1
  224. package/dist/fn/roundDecimal.d.ts +1 -1
  225. package/dist/fn/roundDecimal.js +1 -1
  226. package/dist/fn/sanitize.js +3 -1
  227. package/dist/fn/search.d.ts +2 -1
  228. package/dist/fn/search.js +24 -21
  229. package/dist/fn/selectElementText.d.ts +1 -1
  230. package/dist/fn/selectElementText.js +1 -1
  231. package/dist/fn/selector.d.ts +1 -1
  232. package/dist/fn/selector.js +1 -1
  233. package/dist/fn/setCookie.js +4 -4
  234. package/dist/fn/setCssVar.js +2 -1
  235. package/dist/fn/setNavigationVars.d.ts +1 -1
  236. package/dist/fn/setNavigationVars.js +6 -5
  237. package/dist/fn/setProp.d.ts +1 -1
  238. package/dist/fn/setProp.js +1 -3
  239. package/dist/fn/setProperty.d.ts +1 -1
  240. package/dist/fn/setProperty.js +2 -2
  241. package/dist/fn/shorten.d.ts +1 -1
  242. package/dist/fn/shorten.js +3 -3
  243. package/dist/fn/shortenObj.d.ts +1 -2
  244. package/dist/fn/shortenObj.js +2 -2
  245. package/dist/fn/shuffle.d.ts +1 -1
  246. package/dist/fn/shuffle.js +1 -3
  247. package/dist/fn/simpleHash.d.ts +1 -1
  248. package/dist/fn/simpleHash1.d.ts +1 -1
  249. package/dist/fn/simpleHash1.js +1 -1
  250. package/dist/fn/simpleHash2.d.ts +1 -1
  251. package/dist/fn/stat.d.ts +1 -1
  252. package/dist/fn/stat.js +8 -8
  253. package/dist/fn/string2ArrayBuffer.d.ts +1 -1
  254. package/dist/fn/submit.d.ts +1 -1
  255. package/dist/fn/submit.js +6 -21
  256. package/dist/fn/substr.d.ts +1 -1
  257. package/dist/fn/substr.js +1 -1
  258. package/dist/fn/sum.d.ts +1 -1
  259. package/dist/fn/sum.js +2 -3
  260. package/dist/fn/timestamp.d.ts +1 -1
  261. package/dist/fn/timestamp.js +1 -1
  262. package/dist/fn/toCSV.d.ts +1 -1
  263. package/dist/fn/toCSV.js +1 -1
  264. package/dist/fn/toggleFullScreen.js +13 -13
  265. package/dist/fn/translate.d.ts +1 -1
  266. package/dist/fn/treatAjaxArguments.d.ts +1 -1
  267. package/dist/fn/treatAjaxArguments.js +16 -14
  268. package/dist/fn/uniqString.js +3 -3
  269. package/dist/fn/unique.d.ts +1 -1
  270. package/dist/fn/upload.d.ts +1 -1
  271. package/dist/fn/upload.js +6 -6
  272. package/dist/fn/warning.d.ts +1 -1
  273. package/dist/fn/warning.js +6 -6
  274. package/dist/index.d.ts +106 -108
  275. package/dist/index.js +5 -6
  276. package/package.json +3 -1
package/dist/bundle.js CHANGED
@@ -65,8 +65,8 @@ var bbn = (() => {
65
65
  if (window.console !== undefined) {
66
66
  let cfg;
67
67
  let level = 5;
68
- let fn = "log";
69
- if (args[0] && (typeof args[0] === 'object') && args[0]._bbn_console_style) {
68
+ let fn = 'log';
69
+ if (args[0] && typeof args[0] === 'object' && args[0]._bbn_console_style) {
70
70
  if (args[0]._bbn_console_mode && (0, isFunction_1.isFunction)(console[args[0]._bbn_console_mode])) {
71
71
  fn = args[0]._bbn_console_mode;
72
72
  }
@@ -80,8 +80,8 @@ var bbn = (() => {
80
80
  let i = 0;
81
81
  while (i < args.length) {
82
82
  let t = typeof args[i];
83
- if ((t === 'string') || (t === 'number')) {
84
- window.console[fn]("%c %s ", cfg, args[i]);
83
+ if (t === 'string' || t === 'number') {
84
+ window.console[fn]('%c %s ', cfg, args[i]);
85
85
  }
86
86
  else {
87
87
  window.console[fn](args[i]);
@@ -101,7 +101,7 @@ var bbn = (() => {
101
101
  const substr = function (str, from, length) {
102
102
  if (!(0, isString_1.isString)(str) || !(0, isInt_1.isInt)(from)) {
103
103
  (0, log_1.log)(arguments);
104
- throw new Error(bbn._("The substr function should be applied to a string and at least a `from` argument should be given"));
104
+ throw new Error(bbn._('The substr function should be applied to a string and at least a `from` argument should be given'));
105
105
  }
106
106
  if (from < 0) {
107
107
  from = str.length + from;
@@ -146,7 +146,7 @@ var bbn = (() => {
146
146
  while (idx && (bbn.env.loadersHistory.length > bbn.env.maxLoadersHistory)) {
147
147
  idx--;
148
148
  // Not removing the ones still loading
149
- if (!bbn.env.loadersHistory.loading) {
149
+ if (!bbn.env.loading) {
150
150
  bbn.env.loadersHistory.splice(idx, 1);
151
151
  }
152
152
  }
@@ -159,7 +159,7 @@ var bbn = (() => {
159
159
  Object.defineProperty(exports, "__esModule", { value: true });
160
160
  exports.getProperty = void 0;
161
161
  const getProperty = function (obj, prop) {
162
- if ((typeof obj === 'object') && (typeof prop === 'string')) {
162
+ if (typeof obj === 'object' && typeof prop === 'string') {
163
163
  return prop.split('.').reduce((o, i) => {
164
164
  if (o) {
165
165
  return o[i];
@@ -181,7 +181,7 @@ var bbn = (() => {
181
181
  }
182
182
  else {
183
183
  (0, log_2.log)(st);
184
- throw new Error(bbn._("removeAccent expects a string"));
184
+ throw new Error(bbn._('removeAccent expects a string'));
185
185
  }
186
186
  }
187
187
  return st.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
@@ -250,7 +250,7 @@ var bbn = (() => {
250
250
  Object.defineProperty(exports, "__esModule", { value: true });
251
251
  exports.isIterable = void 0;
252
252
  const isIterable = function (v) {
253
- return v && (typeof v === 'object') && (Symbol.iterator in Object(v));
253
+ return v && typeof v === 'object' && Symbol.iterator in Object(v);
254
254
  };
255
255
  exports.isIterable = isIterable;
256
256
  });
@@ -278,7 +278,7 @@ var bbn = (() => {
278
278
  if (!args.length)
279
279
  return false;
280
280
  for (let a of args) {
281
- if (['boolean', 'object', 'symbol'].includes(typeof a) || (a === '') || isNaN(a)) {
281
+ if (['boolean', 'object', 'symbol'].includes(typeof a) || a === '' || isNaN(a)) {
282
282
  return false;
283
283
  }
284
284
  }
@@ -290,13 +290,13 @@ var bbn = (() => {
290
290
  "use strict";
291
291
  Object.defineProperty(exports, "__esModule", { value: true });
292
292
  exports.removePrivateProp = void 0;
293
- const removePrivateProp = function (obj, deep) {
294
- var r = false;
295
- if (typeof (obj) === "object") {
293
+ const removePrivateProp = function (obj, deep = false) {
294
+ let r = null;
295
+ if (typeof obj === 'object') {
296
296
  r = {};
297
297
  for (var n in obj) {
298
- if ((0, substr_2.substr)(n, 0, 1).match(/^[A-z0-9]$/) && Object.hasOwn(obj, n)) {
299
- if (deep && (typeof (obj[n]) === "object")) {
298
+ if ((0, substr_2.substr)(n, 0, 1).match(/^[A-z0-9]$/) && (n in obj)) {
299
+ if (deep && typeof obj[n] === 'object') {
300
300
  r[n] = removePrivateProp(obj[n], true);
301
301
  }
302
302
  else {
@@ -305,7 +305,7 @@ var bbn = (() => {
305
305
  }
306
306
  }
307
307
  }
308
- return r;
308
+ return r || false;
309
309
  };
310
310
  exports.removePrivateProp = removePrivateProp;
311
311
  });
@@ -313,13 +313,13 @@ var bbn = (() => {
313
313
  "use strict";
314
314
  Object.defineProperty(exports, "__esModule", { value: true });
315
315
  exports.iterate = void 0;
316
- const iterate = function (obj, fn, noPrivate, reverse) {
317
- if ((obj !== null) && (typeof obj === 'object')) {
316
+ const iterate = function (obj, fn, noPrivate = false, reverse = false) {
317
+ if (obj !== null && typeof obj === 'object') {
318
318
  let iter = Object.keys(noPrivate ? (0, removePrivateProp_1.removePrivateProp)(obj) : obj);
319
319
  if (reverse) {
320
320
  iter.reverse();
321
321
  }
322
- (0, each_1.each)(iter, prop => {
322
+ (0, each_1.each)(iter, (prop) => {
323
323
  if (fn(obj[prop], prop) === false) {
324
324
  return false;
325
325
  }
@@ -334,7 +334,7 @@ var bbn = (() => {
334
334
  Object.defineProperty(exports, "__esModule", { value: true });
335
335
  exports.each = void 0;
336
336
  const each = function (arr, fn) {
337
- if ((0, isNumber_1.isNumber)(arr) && (arr > 0)) {
337
+ if ((0, isNumber_1.isNumber)(arr) && arr > 0) {
338
338
  for (let i = 0; i < arr; i++) {
339
339
  if (fn(i, i) === false) {
340
340
  return;
@@ -359,7 +359,7 @@ var bbn = (() => {
359
359
  Object.defineProperty(exports, "__esModule", { value: true });
360
360
  exports.numProperties = void 0;
361
361
  const numProperties = function (obj) {
362
- if (!obj || (typeof obj !== 'object')) {
362
+ if (!obj || typeof obj !== 'object') {
363
363
  return 0;
364
364
  }
365
365
  return Object.keys(obj).length;
@@ -377,7 +377,7 @@ var bbn = (() => {
377
377
  if ((0, isArray_1.isArray)(obj)) {
378
378
  return obj.length ? false : true;
379
379
  }
380
- if (typeof (obj) === 'object') {
380
+ if (typeof obj === 'object') {
381
381
  if ((0, numProperties_1.numProperties)(obj)) {
382
382
  return false;
383
383
  }
@@ -443,14 +443,14 @@ var bbn = (() => {
443
443
  if (!args.length) {
444
444
  return false;
445
445
  }
446
- if (!Object.hasOwn(bbn, 'cp')) {
447
- return false;
448
- }
449
- for (let a of args) {
450
- let res = bbn.cp.isComponent(a);
451
- if (!res || (0, isDom_1.isDom)(res) || !res.$el) {
452
- return false;
446
+ if ('cp' in bbn && 'isComponent' in bbn['cp'] && (typeof bbn['cp'].isComponent === 'function')) {
447
+ for (let a of args) {
448
+ let res = bbn.cp.isComponent(a);
449
+ if (!res || (0, isDom_1.isDom)(res) || !res.$el) {
450
+ return false;
451
+ }
453
452
  }
453
+ return false;
454
454
  }
455
455
  return true;
456
456
  };
@@ -463,7 +463,7 @@ var bbn = (() => {
463
463
  const circularReplacer = function () {
464
464
  const visited = new WeakSet();
465
465
  return (key, value) => {
466
- if ((typeof value === "object") && (value !== null)) {
466
+ if (typeof value === 'object' && value !== null) {
467
467
  if (visited.has(value)) {
468
468
  return;
469
469
  }
@@ -478,7 +478,7 @@ var bbn = (() => {
478
478
  }
479
479
  }
480
480
  else if ((0, isCp_1.isCp)(value)) {
481
- (0, log_3.log)("IS CP");
481
+ (0, log_3.log)('IS CP');
482
482
  value = '__BBN_CP__' + value.$options.name + '/' + value.$cid;
483
483
  }
484
484
  else {
@@ -499,7 +499,7 @@ var bbn = (() => {
499
499
  let hash = 0;
500
500
  for (let i = 0; i < str.length; i++) {
501
501
  const char = str.charCodeAt(i);
502
- hash = ((hash << 5) - hash) + char;
502
+ hash = (hash << 5) - hash + char;
503
503
  hash |= 0; // Convert to 32-bit integer
504
504
  }
505
505
  return hash;
@@ -551,7 +551,7 @@ var bbn = (() => {
551
551
  }
552
552
  }
553
553
  else if ((0, isCp_2.isCp)(value)) {
554
- (0, log_4.log)("IS CP");
554
+ (0, log_4.log)('IS CP');
555
555
  st += '__BBN_CP__' + value.$options.name + '/' + value.$cid;
556
556
  }
557
557
  else {
@@ -579,20 +579,20 @@ var bbn = (() => {
579
579
  if (obj1 === obj2) {
580
580
  return true;
581
581
  }
582
- if (obj1 && obj2 && (typeof (obj1) === 'object') && (typeof (obj2) === 'object')) {
582
+ if (obj1 && obj2 && typeof obj1 === 'object' && typeof obj2 === 'object') {
583
583
  let tmp1 = Object.keys(obj1).sort(), tmp2 = Object.keys(obj2).sort();
584
584
  // Case where the keys are different
585
585
  if ((0, hash_1.hash)(tmp1) !== (0, hash_1.hash)(tmp2)) {
586
586
  return false;
587
587
  }
588
588
  let ok = true;
589
- if (obj1 && (typeof obj1 === 'object')) {
589
+ if (obj1 && typeof obj1 === 'object') {
590
590
  if (done.includes(obj1)) {
591
591
  return ok;
592
592
  }
593
593
  done.push(obj1);
594
594
  }
595
- (0, each_2.each)(tmp1, a => {
595
+ (0, each_2.each)(tmp1, (a) => {
596
596
  if (!isSame(obj1[a], obj2[a])) {
597
597
  ok = false;
598
598
  return false;
@@ -610,88 +610,88 @@ var bbn = (() => {
610
610
  exports.compare = void 0;
611
611
  const compare = function (v1, v2, operator) {
612
612
  switch (operator) {
613
- case "===":
614
- case "=":
615
- case "equal":
616
- case "eq":
617
- case "is":
613
+ case '===':
614
+ case '=':
615
+ case 'equal':
616
+ case 'eq':
617
+ case 'is':
618
618
  return v1 === v2;
619
- case "!==":
620
- case "notequal":
621
- case "neq":
622
- case "isnot":
619
+ case '!==':
620
+ case 'notequal':
621
+ case 'neq':
622
+ case 'isnot':
623
623
  return v1 !== v2;
624
- case "!=":
625
- case "different":
624
+ case '!=':
625
+ case 'different':
626
626
  return v1 != v2;
627
- case "contains":
628
- case "contain":
629
- case "icontains":
630
- case "icontain":
627
+ case 'contains':
628
+ case 'contain':
629
+ case 'icontains':
630
+ case 'icontain':
631
631
  if ((0, isEmpty_1.isEmpty)(v1) || (0, isEmpty_1.isEmpty)(v2)) {
632
632
  return false;
633
633
  }
634
634
  return (0, removeAccents_2.removeAccents)(v1).toLowerCase().indexOf((0, removeAccents_2.removeAccents)(v2).toLowerCase()) !== -1;
635
- case "doesnotcontain":
636
- case "donotcontain":
635
+ case 'doesnotcontain':
636
+ case 'donotcontain':
637
637
  if ((0, isNull_1.isNull)(v1) || (0, isNull_1.isNull)(v2)) {
638
638
  return true;
639
639
  }
640
640
  return (0, removeAccents_2.removeAccents)(v1.toLowerCase()).indexOf((0, removeAccents_2.removeAccents)(v2.toLowerCase())) === -1;
641
- case "starts":
642
- case "start":
641
+ case 'starts':
642
+ case 'start':
643
643
  if ((0, isNull_1.isNull)(v1) || (0, isNull_1.isNull)(v2)) {
644
644
  return false;
645
645
  }
646
- if ((typeof (v1) !== 'string')) {
646
+ if (typeof v1 !== 'string') {
647
647
  v1 = v1.toString() || '';
648
648
  }
649
- if ((typeof (v2) !== 'string')) {
649
+ if (typeof v2 !== 'string') {
650
650
  v2 = v2.toString() || '';
651
651
  }
652
652
  return v1.indexOf(v2) === 0;
653
- case "startswith":
654
- case "startsi":
655
- case "starti":
656
- case "istarts":
657
- case "istart":
653
+ case 'startswith':
654
+ case 'startsi':
655
+ case 'starti':
656
+ case 'istarts':
657
+ case 'istart':
658
658
  if ((0, isNull_1.isNull)(v1) || (0, isNull_1.isNull)(v2)) {
659
659
  return false;
660
660
  }
661
661
  return (0, removeAccents_2.removeAccents)(v1).toLowerCase().indexOf((0, removeAccents_2.removeAccents)(v2).toLowerCase()) === 0;
662
- case "endswith":
663
- case "endsi":
664
- case "endi":
665
- case "iends":
666
- case "iend":
662
+ case 'endswith':
663
+ case 'endsi':
664
+ case 'endi':
665
+ case 'iends':
666
+ case 'iend':
667
667
  if ((0, isNull_1.isNull)(v1) || (0, isNull_1.isNull)(v2)) {
668
668
  return false;
669
669
  }
670
670
  return v1.lastIndexOf(v2) === v1.length - v2.length;
671
- case "like":
671
+ case 'like':
672
672
  if ((0, isNull_1.isNull)(v1) || (0, isNull_1.isNull)(v2)) {
673
673
  return false;
674
674
  }
675
675
  return (0, removeAccents_2.removeAccents)(v1).toLowerCase() === (0, removeAccents_2.removeAccents)(v2).toLowerCase();
676
- case "gt":
677
- case ">":
676
+ case 'gt':
677
+ case '>':
678
678
  return v1 > v2;
679
- case "gte":
680
- case ">=":
679
+ case 'gte':
680
+ case '>=':
681
681
  return v1 >= v2;
682
- case "lt":
683
- case "<":
682
+ case 'lt':
683
+ case '<':
684
684
  return v1 < v2;
685
- case "lte":
686
- case "<=":
685
+ case 'lte':
686
+ case '<=':
687
687
  return v1 <= v2;
688
- case "isnull":
688
+ case 'isnull':
689
689
  return v1 === null;
690
- case "isnotnull":
690
+ case 'isnotnull':
691
691
  return v1 !== null;
692
- case "isempty":
692
+ case 'isempty':
693
693
  return v1 === '';
694
- case "isnotempty":
694
+ case 'isnotempty':
695
695
  return v1 !== '';
696
696
  case '==':
697
697
  if ((0, isObject_1.isObject)(v1, v2)) {
@@ -709,7 +709,7 @@ var bbn = (() => {
709
709
  exports.compareConditions = void 0;
710
710
  const compareConditions = function (data, filter) {
711
711
  if (!filter.conditions || !filter.logic || !(0, isArray_2.isArray)(filter.conditions)) {
712
- throw new Error("Error in compareConditions: the filter should an abject with conditions and logic properties and conditions should be an array of objects");
712
+ throw new Error('Error in compareConditions: the filter should an abject with conditions and logic properties and conditions should be an array of objects');
713
713
  }
714
714
  let ok = filter.logic === 'AND' ? true : false;
715
715
  (0, each_3.each)(filter.conditions, (a) => {
@@ -723,10 +723,10 @@ var bbn = (() => {
723
723
  let bits = a.field.split('.');
724
724
  let prop = bits.pop();
725
725
  if (bits.length) {
726
- (0, each_3.each)(bits, b => data = data[b]);
726
+ (0, each_3.each)(bits, (b) => (data = data[b]));
727
727
  }
728
728
  // Case where both are undefined: value and prop which doesn't exist; they are not the same!
729
- if (((0, getProperty_2.getProperty)(data, prop) === undefined) && (a.value !== undefined)) {
729
+ if ((0, getProperty_2.getProperty)(data, prop) === undefined && a.value !== undefined) {
730
730
  compare = false;
731
731
  }
732
732
  }
@@ -750,26 +750,26 @@ var bbn = (() => {
750
750
  "use strict";
751
751
  Object.defineProperty(exports, "__esModule", { value: true });
752
752
  exports.filterToConditions = void 0;
753
- const filterToConditions = function (filter, operator) {
753
+ const filterToConditions = function (filter, operator = '=') {
754
754
  if (!(0, isObject_2.isObject)(filter)) {
755
- throw new Error("Error in filterToCondition: filter must be an object");
755
+ throw new Error('Error in filterToCondition: filter must be an object');
756
756
  }
757
757
  if (!filter.conditions || !(0, isArray_3.isArray)(filter.conditions)) {
758
758
  let tmp = [];
759
759
  (0, iterate_2.iterate)(filter, (a, n) => {
760
- if ((0, isObject_2.isObject)(a) && (typeof a.conditions === 'object')) {
760
+ if ((0, isObject_2.isObject)(a) && typeof a.conditions === 'object') {
761
761
  tmp.push(filterToConditions(a));
762
762
  }
763
763
  else {
764
764
  tmp.push({
765
765
  field: n,
766
- operator: operator || '=',
767
- value: a
766
+ operator: operator,
767
+ value: a,
768
768
  });
769
769
  }
770
770
  });
771
771
  filter = {
772
- conditions: tmp
772
+ conditions: tmp,
773
773
  };
774
774
  }
775
775
  if (!filter.logic) {
@@ -779,28 +779,32 @@ var bbn = (() => {
779
779
  };
780
780
  exports.filterToConditions = filterToConditions;
781
781
  });
782
- define("fn/search", ["require", "exports", "fn/isIterable", "fn/isString", "fn/compareConditions", "fn/filterToConditions", "fn/isObject", "fn/numProperties", "fn/isNumber"], function (require, exports, isIterable_2, isString_4, compareConditions_1, filterToConditions_1, isObject_3, numProperties_2, isNumber_2) {
782
+ define("fn/search", ["require", "exports", "fn/isIterable", "fn/compareConditions", "fn/filterToConditions", "fn/isObject", "fn/numProperties", "fn/isNumber"], function (require, exports, isIterable_2, compareConditions_1, filterToConditions_1, isObject_3, numProperties_2, isNumber_2) {
783
783
  "use strict";
784
784
  Object.defineProperty(exports, "__esModule", { value: true });
785
785
  exports.search = void 0;
786
- const search = function (arr, prop, val, operator, startFrom) {
786
+ const search = function (arr, prop, val = null, operator = '=', startFrom = 0) {
787
787
  if (!(0, isIterable_2.isIterable)(arr)) {
788
- throw new Error(bbn._("The first argument for a search should be iterable") + " " + (typeof arr) + " " + bbn._("given"));
788
+ throw new Error(bbn._('The first argument for a search should be iterable') + ' ' + typeof arr + ' ' + bbn._('given'));
789
789
  }
790
790
  if (!arr.length) {
791
791
  return -1;
792
792
  }
793
- let filter = {};
794
- let isFunction = false;
795
- if ((0, isString_4.isString)(prop)) {
796
- filter.conditions = [{
797
- field: prop,
798
- value: val,
799
- operator: operator || '='
800
- }];
793
+ let filter;
794
+ let isFn = false;
795
+ if (typeof prop === 'string') {
796
+ filter = {
797
+ conditions: [
798
+ {
799
+ field: prop,
800
+ value: val,
801
+ operator: operator || '=',
802
+ },
803
+ ]
804
+ };
801
805
  }
802
806
  else if (!prop) {
803
- isFunction = true;
807
+ isFn = true;
804
808
  filter = a => {
805
809
  return (0, compareConditions_1.compareConditions)({ value: a }, (0, filterToConditions_1.filterToConditions)({
806
810
  logic: 'AND',
@@ -808,32 +812,32 @@ var bbn = (() => {
808
812
  {
809
813
  field: 'value',
810
814
  operator: operator || '=',
811
- value: val
812
- }
813
- ]
815
+ value: val,
816
+ },
817
+ ],
814
818
  }));
815
819
  };
816
820
  }
817
821
  else {
818
- startFrom = operator;
822
+ startFrom = typeof (operator) === 'number' ? operator : 0;
819
823
  operator = val;
820
824
  if ((0, isObject_3.isObject)(prop)) {
821
825
  filter = prop;
822
826
  }
823
- else if (isFunction(prop)) {
824
- isFunction = true;
827
+ else if (typeof (prop) === 'function') {
828
+ isFn = true;
825
829
  filter = prop;
826
830
  }
827
831
  }
828
- if (isFunction || ((0, isObject_3.isObject)(filter) && (0, numProperties_2.numProperties)(filter))) {
832
+ if (isFn || ((0, isObject_3.isObject)(filter) && (0, numProperties_2.numProperties)(filter))) {
829
833
  if ((0, isNumber_2.isNumber)(operator)) {
830
- startFrom = operator;
834
+ startFrom = typeof (operator) === 'number' ? operator : 0;
831
835
  operator = undefined;
832
836
  }
833
837
  if (!(0, isNumber_2.isNumber)(startFrom)) {
834
838
  startFrom = 0;
835
839
  }
836
- if (isFunction) {
840
+ if (typeof filter === 'function') {
837
841
  for (let i = startFrom; i < arr.length; i++) {
838
842
  if (filter(arr[i])) {
839
843
  return i;
@@ -857,7 +861,7 @@ var bbn = (() => {
857
861
  "use strict";
858
862
  Object.defineProperty(exports, "__esModule", { value: true });
859
863
  exports.getRow = void 0;
860
- const getRow = function (arr, prop, val, operator) {
864
+ const getRow = function (arr, prop, val = null, operator = '=') {
861
865
  var idx = (0, search_1.search)(arr, prop, val, operator);
862
866
  if (idx > -1) {
863
867
  return arr[idx];
@@ -870,14 +874,14 @@ var bbn = (() => {
870
874
  "use strict";
871
875
  Object.defineProperty(exports, "__esModule", { value: true });
872
876
  exports._deleteLoader = void 0;
873
- const _deleteLoader = function (requestId, res, isAbort) {
877
+ const _deleteLoader = function (requestId, res = null, isAbort = false) {
874
878
  let idx = (0, search_2.search)(bbn.env.loaders, { key: requestId });
875
879
  if (idx > -1) {
876
880
  let loader = bbn.env.loaders.splice(idx, 1)[0];
877
881
  let history = (0, getRow_1.getRow)(bbn.env.loadersHistory, { key: requestId, start: loader.start });
878
882
  if (history) {
879
883
  history.loading = false;
880
- history.duration = (new Date()).getTime() - loader.start;
884
+ history.duration = new Date().getTime() - loader.start;
881
885
  if (typeof res === 'string') {
882
886
  history.errorMessage = res;
883
887
  history.error = !isAbort;
@@ -917,46 +921,48 @@ var bbn = (() => {
917
921
  loader.source.cancel('Operation canceled by the user.');
918
922
  }
919
923
  /*
920
- else {
921
- throw new Error("Impossible to find the loader " + requestId);
922
- }
923
- */
924
+ else {
925
+ throw new Error("Impossible to find the loader " + requestId);
926
+ }
927
+ */
924
928
  };
925
929
  exports.abort = abort;
926
930
  });
927
- define("fn/filter", ["require", "exports", "fn/isArray", "fn/isFunction", "fn/isObject", "fn/each", "fn/filterToConditions", "fn/compareConditions"], function (require, exports, isArray_4, isFunction_2, isObject_5, each_4, filterToConditions_2, compareConditions_2) {
931
+ define("fn/filter", ["require", "exports", "fn/isArray", "fn/isFunction", "fn/each", "fn/filterToConditions", "fn/compareConditions"], function (require, exports, isArray_4, isFunction_2, each_4, filterToConditions_2, compareConditions_2) {
928
932
  "use strict";
929
933
  Object.defineProperty(exports, "__esModule", { value: true });
930
934
  exports.filter = void 0;
931
- const filter = function (arr, prop, val, operator) {
935
+ const filter = function (arr, prop, val = null, operator = '=') {
932
936
  if (!(0, isArray_4.isArray)(arr)) {
933
- throw new Error("Error in filter: The first argument must be an array");
937
+ throw new Error('Error in filter: The first argument must be an array');
934
938
  }
935
- var filter = {}, res = [], isFn = (0, isFunction_2.isFunction)(prop), isObj = (0, isObject_5.isObject)(prop);
939
+ let cfg = {};
940
+ const res = [];
941
+ const isFn = (0, isFunction_2.isFunction)(prop);
936
942
  if (!prop || !arr.length) {
937
943
  return arr;
938
944
  }
939
945
  if (arr.length) {
940
- if (isObj || isFn) {
946
+ if (typeof (prop) === 'object') {
941
947
  operator = val;
942
- filter = prop;
948
+ cfg = prop;
943
949
  }
944
- else if (typeof (prop) === 'string') {
945
- filter[prop] = val;
950
+ else if (typeof prop === 'string') {
951
+ cfg[prop] = val;
946
952
  }
947
953
  else {
948
- throw new Error("Search function error: The prop argument should be a string or an object");
954
+ throw new Error('Search function error: The prop argument should be a string or an object');
949
955
  }
950
956
  if (isFn) {
951
957
  (0, each_4.each)(arr, (a, i) => {
952
- if (filter(a, i)) {
958
+ if (filter(a, prop)) {
953
959
  res.push(a);
954
960
  }
955
961
  });
956
962
  }
957
963
  else {
958
- filter = (0, filterToConditions_2.filterToConditions)(filter, operator);
959
- if (filter.conditions && filter.logic) {
964
+ cfg = (0, filterToConditions_2.filterToConditions)(cfg, operator);
965
+ if (cfg.conditions && cfg.logic) {
960
966
  (0, each_4.each)(arr, (a) => {
961
967
  if ((0, compareConditions_2.compareConditions)(a, filter)) {
962
968
  res.push(a);
@@ -974,12 +980,12 @@ var bbn = (() => {
974
980
  Object.defineProperty(exports, "__esModule", { value: true });
975
981
  exports.abortURL = void 0;
976
982
  const abortURL = function (url) {
977
- (0, each_5.each)((0, filter_1.filter)(bbn.env.loaders, { url: url }), a => {
983
+ (0, each_5.each)((0, filter_1.filter)(bbn.env.loaders, { url: url }), (a) => {
978
984
  if (a && a.source) {
979
985
  a.source.cancel('Operation canceled by the user.');
980
986
  }
981
987
  else {
982
- throw new Error("Impossible to find the loader with URL " + url);
988
+ throw new Error('Impossible to find the loader with URL ' + url);
983
989
  }
984
990
  });
985
991
  };
@@ -990,10 +996,9 @@ var bbn = (() => {
990
996
  Object.defineProperty(exports, "__esModule", { value: true });
991
997
  exports.addColors = void 0;
992
998
  const addColors = function (colors) {
993
- let st = '';
994
999
  if ((0, numProperties_3.numProperties)(colors)) {
995
- if (!bbn.var.colors) {
996
- bbn.var.colors = {};
1000
+ if (!bbn.vars.colors) {
1001
+ bbn.vars.colors = {};
997
1002
  }
998
1003
  let element = document.createElement('style');
999
1004
  document.head.appendChild(element);
@@ -1001,10 +1006,28 @@ var bbn = (() => {
1001
1006
  // Append style element to head
1002
1007
  let i = 0;
1003
1008
  (0, iterate_3.iterate)(colors, (v, n) => {
1004
- bbn.var.colors[n] = v;
1009
+ bbn.vars.colors[n] = v;
1005
1010
  sheet.insertRule('.bbn-' + n + ', .bbn-color-text-' + n + ' {color: ' + v + ' !important;}', i);
1006
- sheet.insertRule('svg.bbn-' + n + ', .bbn-' + n + ' svg, svg.bbn-color-text-' + n + ', .bbn-color-text-' + n + ' svg {fill: ' + v + ';}', i);
1007
- sheet.insertRule('.bbn-bg-' + n + ', .bbn-color-bg-' + n + ', .bbn-color-background-' + n + ' {background-color: ' + v + ' !important;}', i);
1011
+ sheet.insertRule('svg.bbn-' +
1012
+ n +
1013
+ ', .bbn-' +
1014
+ n +
1015
+ ' svg, svg.bbn-color-text-' +
1016
+ n +
1017
+ ', .bbn-color-text-' +
1018
+ n +
1019
+ ' svg {fill: ' +
1020
+ v +
1021
+ ';}', i);
1022
+ sheet.insertRule('.bbn-bg-' +
1023
+ n +
1024
+ ', .bbn-color-bg-' +
1025
+ n +
1026
+ ', .bbn-color-background-' +
1027
+ n +
1028
+ ' {background-color: ' +
1029
+ v +
1030
+ ' !important;}', i);
1008
1031
  sheet.insertRule('.bbn-border-' + n + ', .bbn-color-border-' + n + ' {border-color: ' + v + ' !important;}', i);
1009
1032
  sheet.insertRule('.bbn-color-' + n + ' {border-color: ' + v + '; background-color: ' + v + '; color: ' + v + ';}', i);
1010
1033
  });
@@ -1016,8 +1039,8 @@ var bbn = (() => {
1016
1039
  "use strict";
1017
1040
  Object.defineProperty(exports, "__esModule", { value: true });
1018
1041
  exports.addInputs = void 0;
1019
- const addInputs = function (form, params, prefix) {
1020
- if (form && (form.tagName === 'FORM')) {
1042
+ const addInputs = function (form, params = null, prefix = '') {
1043
+ if (form && form.tagName === 'FORM') {
1021
1044
  let appendToForm = (name, val) => {
1022
1045
  let input = document.createElement('input');
1023
1046
  input.setAttribute('type', 'hidden');
@@ -1031,7 +1054,7 @@ var bbn = (() => {
1031
1054
  (0, iterate_4.iterate)(params, (param, key) => {
1032
1055
  let name = prefix ? `${prefix}[${key}]` : key;
1033
1056
  if (param instanceof Date) {
1034
- appendToForm(form, name, param.toISOString());
1057
+ appendToForm(name, param.toISOString());
1035
1058
  }
1036
1059
  else if (param instanceof Array) {
1037
1060
  param.forEach((e, i) => {
@@ -1044,8 +1067,7 @@ var bbn = (() => {
1044
1067
  }
1045
1068
  });
1046
1069
  }
1047
- else if ((typeof param === 'object') &&
1048
- !(param instanceof File)) {
1070
+ else if (typeof param === 'object' && !(param instanceof File)) {
1049
1071
  addInputs(form, param, name);
1050
1072
  }
1051
1073
  else {
@@ -1057,12 +1079,12 @@ var bbn = (() => {
1057
1079
  };
1058
1080
  exports.addInputs = addInputs;
1059
1081
  });
1060
- define("fn/addStyle", ["require", "exports", "fn/isObject", "fn/iterate"], function (require, exports, isObject_6, iterate_5) {
1082
+ define("fn/addStyle", ["require", "exports", "fn/isObject", "fn/iterate"], function (require, exports, isObject_5, iterate_5) {
1061
1083
  "use strict";
1062
1084
  Object.defineProperty(exports, "__esModule", { value: true });
1063
1085
  exports.addStyle = void 0;
1064
1086
  const addStyle = function (ele, o) {
1065
- if ((0, isObject_6.isObject)(o)) {
1087
+ if ((0, isObject_5.isObject)(o)) {
1066
1088
  (0, iterate_5.iterate)(o, (v, k) => {
1067
1089
  ele.style[k] = v;
1068
1090
  });
@@ -1080,7 +1102,7 @@ var bbn = (() => {
1080
1102
  el.style[type] = 'auto';
1081
1103
  });
1082
1104
  (0, each_6.each)(eles, (el, i) => {
1083
- let rect = el.getBoundingClientRect(), s = rect[type] % 1 ? (rect[type] - (rect[type] % 1) + 1) : rect[type];
1105
+ let rect = el.getBoundingClientRect(), s = rect[type] % 1 ? rect[type] - (rect[type] % 1) + 1 : rect[type];
1084
1106
  //s = rect[type];
1085
1107
  if (s > max) {
1086
1108
  max = s;
@@ -1101,7 +1123,7 @@ var bbn = (() => {
1101
1123
  exports.adjustHeight = void 0;
1102
1124
  const adjustHeight = function () {
1103
1125
  let args = arguments;
1104
- if ((args.length === 1) && (0, isIterable_3.isIterable)(args[0])) {
1126
+ if (args.length === 1 && (0, isIterable_3.isIterable)(args[0])) {
1105
1127
  args = args[0];
1106
1128
  }
1107
1129
  return (0, adjustSize_1.adjustSize)('height', args);
@@ -1114,7 +1136,7 @@ var bbn = (() => {
1114
1136
  exports.adjustWidth = void 0;
1115
1137
  const adjustWidth = function () {
1116
1138
  let args = arguments;
1117
- if ((args.length === 1) && (0, isIterable_4.isIterable)(args[0])) {
1139
+ if (args.length === 1 && (0, isIterable_4.isIterable)(args[0])) {
1118
1140
  args = args[0];
1119
1141
  }
1120
1142
  return (0, adjustSize_2.adjustSize)('width', args);
@@ -1126,19 +1148,16 @@ var bbn = (() => {
1126
1148
  Object.defineProperty(exports, "__esModule", { value: true });
1127
1149
  exports.escapeRegExp = void 0;
1128
1150
  const escapeRegExp = function (str) {
1129
- return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
1151
+ return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
1130
1152
  };
1131
1153
  exports.escapeRegExp = escapeRegExp;
1132
1154
  });
1133
- define("fn/replaceAll", ["require", "exports", "fn/isObject", "fn/escapeRegExp"], function (require, exports, isObject_7, escapeRegExp_1) {
1155
+ define("fn/replaceAll", ["require", "exports", "fn/isObject", "fn/escapeRegExp"], function (require, exports, isObject_6, escapeRegExp_1) {
1134
1156
  "use strict";
1135
1157
  Object.defineProperty(exports, "__esModule", { value: true });
1136
1158
  exports.replaceAll = void 0;
1137
1159
  const replaceAll = function (find, replace, str, flags = '') {
1138
- if (str !== undefined) {
1139
- return str.toString().replace((0, isObject_7.isObject)(find) ? find : new RegExp((0, escapeRegExp_1.escapeRegExp)(find), 'g' + flags), replace);
1140
- }
1141
- return false;
1160
+ return str.toString().replace((0, isObject_6.isObject)(find) ? find : new RegExp((0, escapeRegExp_1.escapeRegExp)(find), 'g' + flags), replace);
1142
1161
  };
1143
1162
  exports.replaceAll = replaceAll;
1144
1163
  });
@@ -1147,16 +1166,36 @@ var bbn = (() => {
1147
1166
  Object.defineProperty(exports, "__esModule", { value: true });
1148
1167
  exports.md5 = void 0;
1149
1168
  const md5 = function (st) {
1150
- var hc = "0123456789abcdef";
1151
- function rh(n) { var j, s = ""; for (j = 0; j <= 3; j++)
1152
- s += hc.charAt((n >> (j * 8 + 4)) & 0x0F) + hc.charAt((n >> (j * 8)) & 0x0F); return s; }
1153
- function ad(x, y) { var l = (x & 0xFFFF) + (y & 0xFFFF); var m = (x >> 16) + (y >> 16) + (l >> 16); return (m << 16) | (l & 0xFFFF); }
1154
- function rl(n, c) { return (n << c) | (n >>> (32 - c)); }
1155
- function cm(q, a, b, x, s, t) { return ad(rl(ad(ad(a, q), ad(x, t)), s), b); }
1156
- function ff(a, b, c, d, x, s, t) { return cm((b & c) | ((~b) & d), a, b, x, s, t); }
1157
- function gg(a, b, c, d, x, s, t) { return cm((b & d) | (c & (~d)), a, b, x, s, t); }
1158
- function hh(a, b, c, d, x, s, t) { return cm(b ^ c ^ d, a, b, x, s, t); }
1159
- function ii(a, b, c, d, x, s, t) { return cm(c ^ (b | (~d)), a, b, x, s, t); }
1169
+ var hc = '0123456789abcdef';
1170
+ function rh(n) {
1171
+ var j, s = '';
1172
+ for (j = 0; j <= 3; j++)
1173
+ s += hc.charAt((n >> (j * 8 + 4)) & 0x0f) + hc.charAt((n >> (j * 8)) & 0x0f);
1174
+ return s;
1175
+ }
1176
+ function ad(x, y) {
1177
+ var l = (x & 0xffff) + (y & 0xffff);
1178
+ var m = (x >> 16) + (y >> 16) + (l >> 16);
1179
+ return (m << 16) | (l & 0xffff);
1180
+ }
1181
+ function rl(n, c) {
1182
+ return (n << c) | (n >>> (32 - c));
1183
+ }
1184
+ function cm(q, a, b, x, s, t) {
1185
+ return ad(rl(ad(ad(a, q), ad(x, t)), s), b);
1186
+ }
1187
+ function ff(a, b, c, d, x, s, t) {
1188
+ return cm((b & c) | (~b & d), a, b, x, s, t);
1189
+ }
1190
+ function gg(a, b, c, d, x, s, t) {
1191
+ return cm((b & d) | (c & ~d), a, b, x, s, t);
1192
+ }
1193
+ function hh(a, b, c, d, x, s, t) {
1194
+ return cm(b ^ c ^ d, a, b, x, s, t);
1195
+ }
1196
+ function ii(a, b, c, d, x, s, t) {
1197
+ return cm(c ^ (b | ~d), a, b, x, s, t);
1198
+ }
1160
1199
  function sb(x) {
1161
1200
  var i;
1162
1201
  var nblk = ((x.length + 8) >> 6) + 1;
@@ -1265,29 +1304,29 @@ var bbn = (() => {
1265
1304
  };
1266
1305
  exports.getRequestId = getRequestId;
1267
1306
  });
1268
- define("fn/extend", ["require", "exports", "fn/iterate", "fn/isArray", "fn/each", "fn/isObject"], function (require, exports, iterate_7, isArray_5, each_7, isObject_8) {
1307
+ define("fn/extend", ["require", "exports", "fn/iterate", "fn/isArray", "fn/each", "fn/isObject"], function (require, exports, iterate_7, isArray_5, each_7, isObject_7) {
1269
1308
  "use strict";
1270
1309
  Object.defineProperty(exports, "__esModule", { value: true });
1271
1310
  exports.extend = void 0;
1272
- const extend = function () {
1311
+ const extend = function (...originalArgs) {
1273
1312
  let deep = false;
1274
1313
  let args = [];
1275
- for (let i = 0; i < arguments.length; i++) {
1276
- if (arguments[i] === true) {
1314
+ for (let i = 0; i < originalArgs.length; i++) {
1315
+ if (originalArgs[i] === true) {
1277
1316
  deep = true;
1278
1317
  }
1279
- else if (!arguments[i]) {
1318
+ else if (!originalArgs[i]) {
1280
1319
  continue;
1281
1320
  }
1282
- else if (typeof arguments[i] !== 'object') {
1283
- throw new Error(bbn._("Error in extend: all arguments should be object, you have given ") + typeof (arguments[i]));
1321
+ else if (typeof originalArgs[i] !== 'object') {
1322
+ throw new Error(bbn._('Error in extend: all arguments should be object, you have given ') + typeof originalArgs[i]);
1284
1323
  }
1285
1324
  else {
1286
- args.push(arguments[i]);
1325
+ args.push(originalArgs[i]);
1287
1326
  }
1288
1327
  }
1289
1328
  if (!args.length) {
1290
- throw new Error("No argument given");
1329
+ throw new Error('No argument given');
1291
1330
  }
1292
1331
  let out = args[0];
1293
1332
  for (let i = 1; i < args.length; i++) {
@@ -1296,14 +1335,14 @@ var bbn = (() => {
1296
1335
  if ((0, isArray_5.isArray)(a)) {
1297
1336
  out[key] = (0, isArray_5.isArray)(out[key]) ? out[key] : [];
1298
1337
  (0, each_7.each)(a, (b, i) => {
1299
- if (b && (typeof b === 'object')) {
1338
+ if (b && typeof b === 'object') {
1300
1339
  let tmp = out[key][i];
1301
1340
  if ((0, isArray_5.isArray)(b)) {
1302
1341
  if (!(0, isArray_5.isArray)(tmp)) {
1303
1342
  tmp = [];
1304
1343
  }
1305
1344
  }
1306
- else if (!(0, isObject_8.isObject)(tmp)) {
1345
+ else if (!(0, isObject_7.isObject)(tmp)) {
1307
1346
  tmp = {};
1308
1347
  }
1309
1348
  out[key][i] = extend(true, tmp, b);
@@ -1313,8 +1352,8 @@ var bbn = (() => {
1313
1352
  }
1314
1353
  });
1315
1354
  }
1316
- else if ((0, isObject_8.isObject)(a)) {
1317
- out[key] = extend(true, out[key] && (typeof out[key] === 'object') ? out[key] : Object.create(Object.getPrototypeOf(a)), a);
1355
+ else if ((0, isObject_7.isObject)(a)) {
1356
+ out[key] = extend(true, out[key] && typeof out[key] === 'object' ? out[key] : Object.create(Object.getPrototypeOf(a)), a);
1318
1357
  }
1319
1358
  else {
1320
1359
  out[key] = a;
@@ -1329,7 +1368,7 @@ var bbn = (() => {
1329
1368
  value: true,
1330
1369
  enumerable: false,
1331
1370
  configurable: false,
1332
- writable: false
1371
+ writable: false,
1333
1372
  });
1334
1373
  }
1335
1374
  }
@@ -1337,81 +1376,48 @@ var bbn = (() => {
1337
1376
  };
1338
1377
  exports.extend = extend;
1339
1378
  });
1340
- define("fn/defaultEndLoadingFunction", ["require", "exports", "fn/numProperties", "fn/log", "fn/isCp"], function (require, exports, numProperties_4, log_5, isCp_3) {
1379
+ define("fn/defaultEndLoadingFunction", ["require", "exports"], function (require, exports) {
1341
1380
  "use strict";
1342
1381
  Object.defineProperty(exports, "__esModule", { value: true });
1343
1382
  exports.defaultEndLoadingFunction = void 0;
1344
1383
  const defaultEndLoadingFunction = function (url, timestamp, data, res) {
1345
- var _a;
1346
- if (res && res.data && ((0, numProperties_4.numProperties)(res.data) === 1) && res.data.disconnected) {
1347
- window.location.reload();
1348
- return;
1349
- }
1350
- if ((_a = window.appui) === null || _a === void 0 ? void 0 : _a.status) {
1351
- this.$nextTick(() => {
1352
- (0, log_5.log)("UPDATE LOADBAR");
1353
- const loadBar = this.getRef('loading');
1354
- if ((0, isCp_3.isCp)(loadBar)) {
1355
- loadBar.$updateAllComputed();
1356
- }
1357
- });
1358
- }
1384
+ return true;
1359
1385
  };
1360
1386
  exports.defaultEndLoadingFunction = defaultEndLoadingFunction;
1361
1387
  });
1362
- define("fn/defaultAjaxErrorFunction", ["require", "exports", "fn/isCp"], function (require, exports, isCp_4) {
1388
+ define("fn/defaultAjaxErrorFunction", ["require", "exports"], function (require, exports) {
1363
1389
  "use strict";
1364
1390
  Object.defineProperty(exports, "__esModule", { value: true });
1365
1391
  exports.defaultAjaxErrorFunction = void 0;
1366
1392
  const defaultAjaxErrorFunction = function (jqXHR, textStatus, errorThrown) {
1367
- var _a;
1368
- /** @todo */
1369
- if ((_a = window.appui) === null || _a === void 0 ? void 0 : _a.status) {
1370
- this.$nextTick(() => {
1371
- const loadBar = this.getRef('loading');
1372
- if ((0, isCp_4.isCp)(loadBar)) {
1373
- loadBar.$forceUpdate();
1374
- }
1375
- });
1376
- }
1377
- appui.error({ title: textStatus, content: errorThrown }, 4);
1378
1393
  return false;
1379
1394
  };
1380
1395
  exports.defaultAjaxErrorFunction = defaultAjaxErrorFunction;
1381
1396
  });
1382
- define("fn/defaultAjaxAbortFunction", ["require", "exports", "fn/log"], function (require, exports, log_6) {
1397
+ define("fn/defaultAjaxAbortFunction", ["require", "exports", "fn/log"], function (require, exports, log_5) {
1383
1398
  "use strict";
1384
1399
  Object.defineProperty(exports, "__esModule", { value: true });
1385
1400
  exports.defaultAjaxAbortFunction = void 0;
1386
- const defaultAjaxAbortFunction = function (message, url) {
1387
- (0, log_6.log)(message);
1401
+ const defaultAjaxAbortFunction = function (message, url = '') {
1402
+ (0, log_5.log)(message);
1388
1403
  };
1389
1404
  exports.defaultAjaxAbortFunction = defaultAjaxAbortFunction;
1390
1405
  });
1391
- define("fn/defaultStartLoadingFunction", ["require", "exports", "fn/log", "fn/isCp"], function (require, exports, log_7, isCp_5) {
1406
+ define("fn/defaultStartLoadingFunction", ["require", "exports"], function (require, exports) {
1392
1407
  "use strict";
1393
1408
  Object.defineProperty(exports, "__esModule", { value: true });
1394
1409
  exports.defaultStartLoadingFunction = void 0;
1395
- const defaultStartLoadingFunction = function () {
1396
- var _a;
1397
- if ((_a = window.appui) === null || _a === void 0 ? void 0 : _a.status) {
1398
- this.$nextTick(() => {
1399
- (0, log_7.log)("UPDATE LOADBAR");
1400
- const loadBar = this.getRef('loading');
1401
- if ((0, isCp_5.isCp)(loadBar)) {
1402
- loadBar.$updateAllComputed();
1403
- }
1404
- });
1405
- }
1410
+ const defaultStartLoadingFunction = function (url, tst, data, requestId = null) {
1411
+ return true;
1406
1412
  };
1407
1413
  exports.defaultStartLoadingFunction = defaultStartLoadingFunction;
1408
1414
  });
1409
- define("fn/ajax", ["require", "exports", "fn/isObject", "fn/replaceAll", "fn/getRequestId", "fn/getLoader", "fn/extend", "fn/numProperties", "fn/_deleteLoader", "fn/defaultEndLoadingFunction", "fn/isFunction", "fn/defaultAjaxErrorFunction", "fn/defaultAjaxAbortFunction", "fn/_addLoader", "fn/defaultStartLoadingFunction"], function (require, exports, isObject_9, replaceAll_1, getRequestId_1, getLoader_2, extend_1, numProperties_5, _deleteLoader_1, defaultEndLoadingFunction_1, isFunction_3, defaultAjaxErrorFunction_1, defaultAjaxAbortFunction_1, _addLoader_1, defaultStartLoadingFunction_1) {
1415
+ define("fn/ajax", ["require", "exports", "fn/isObject", "fn/replaceAll", "fn/getRequestId", "fn/getLoader", "fn/extend", "fn/numProperties", "fn/_deleteLoader", "fn/defaultEndLoadingFunction", "fn/isFunction", "fn/defaultAjaxErrorFunction", "fn/defaultAjaxAbortFunction", "fn/_addLoader", "fn/defaultStartLoadingFunction"], function (require, exports, isObject_8, replaceAll_1, getRequestId_1, getLoader_2, extend_1, numProperties_4, _deleteLoader_1, defaultEndLoadingFunction_1, isFunction_3, defaultAjaxErrorFunction_1, defaultAjaxAbortFunction_1, _addLoader_1, defaultStartLoadingFunction_1) {
1410
1416
  "use strict";
1411
1417
  Object.defineProperty(exports, "__esModule", { value: true });
1412
1418
  exports.ajax = void 0;
1413
1419
  const ajax = function (url, datatype, data, success, failure, abort) {
1414
- if ((arguments.length === 1) && (0, isObject_9.isObject)(url) && url.url) {
1420
+ if (arguments.length === 1 && url && typeof url === 'object' && url.url) {
1415
1421
  if (url.abort) {
1416
1422
  abort = url.abort;
1417
1423
  }
@@ -1432,10 +1438,10 @@ var bbn = (() => {
1432
1438
  if (!url) {
1433
1439
  return;
1434
1440
  }
1435
- if (url) {
1441
+ if (url && typeof url === 'string') {
1436
1442
  if (url.indexOf('://') === -1) {
1437
1443
  // Prevent protocol mismatch by Axios
1438
- url = (0, replaceAll_1.replaceAll)("//", "/", url);
1444
+ url = (0, replaceAll_1.replaceAll)('//', '/', url);
1439
1445
  }
1440
1446
  if (!datatype) {
1441
1447
  datatype = 'json';
@@ -1453,20 +1459,21 @@ var bbn = (() => {
1453
1459
  let source = cancelToken.source();
1454
1460
  let options = {
1455
1461
  responseType: datatype,
1456
- cancelToken: source.token
1462
+ cancelToken: source.token,
1457
1463
  };
1458
1464
  if (datatype === 'text') {
1459
1465
  options.headers = {
1460
1466
  accept: 'text/javascript',
1461
- 'Content-Type': 'text/javascript'
1467
+ 'Content-Type': 'text/javascript',
1462
1468
  };
1463
1469
  }
1464
1470
  let args = [url];
1465
- if ((0, isObject_9.isObject)(data) && ((0, numProperties_5.numProperties)(data) > 0)) {
1471
+ if ((0, isObject_8.isObject)(data) && (0, numProperties_4.numProperties)(data) > 0) {
1466
1472
  args.push(data);
1467
1473
  }
1468
1474
  args.push(options);
1469
- let loader = axios[args.length === 2 ? 'get' : 'post'].apply(axios, args)
1475
+ let loader = axios[args.length === 2 ? 'get' : 'post']
1476
+ .apply(axios, args)
1470
1477
  .then((res) => {
1471
1478
  (0, _deleteLoader_1._deleteLoader)(requestId, res);
1472
1479
  (0, defaultEndLoadingFunction_1.defaultEndLoadingFunction)(url, tst, data, res);
@@ -1533,7 +1540,7 @@ var bbn = (() => {
1533
1540
  let isEscaped = false;
1534
1541
  let settingDefault = false;
1535
1542
  for (let i = 0; i < all.length; i++) {
1536
- if ((all[i] === currentQuote) && !isEscaped && currentQuote) {
1543
+ if (all[i] === currentQuote && !isEscaped && currentQuote) {
1537
1544
  currentQuote = '';
1538
1545
  exp += all[i];
1539
1546
  }
@@ -1575,7 +1582,7 @@ var bbn = (() => {
1575
1582
  }
1576
1583
  else if (all[i] === '=') {
1577
1584
  if (functionString.substr(i, 2) === '=>') {
1578
- if (exp.trim() !== "" && parOpened === parClosed) {
1585
+ if (exp.trim() !== '' && parOpened === parClosed) {
1579
1586
  currentArg.name = exp.trim();
1580
1587
  args.push(currentArg);
1581
1588
  currentArg = {};
@@ -1638,10 +1645,10 @@ var bbn = (() => {
1638
1645
  body = exp;
1639
1646
  }
1640
1647
  else {
1641
- throw Error("Unexpected end of function while parsing function");
1648
+ throw Error('Unexpected end of function while parsing function');
1642
1649
  }
1643
1650
  }
1644
- const argString = args.map(arg => arg.name + (arg.default ? ' = ' + arg.default : '')).join(', ');
1651
+ const argString = args.map((arg) => arg.name + (arg.default ? ' = ' + arg.default : '')).join(', ');
1645
1652
  const hash = (0, md5_2.md5)(body + (name ? '-' + name : '') + (argString ? '-' + argString : ''));
1646
1653
  return {
1647
1654
  body,
@@ -1651,7 +1658,7 @@ var bbn = (() => {
1651
1658
  hasFunction,
1652
1659
  name,
1653
1660
  isAsync,
1654
- hash
1661
+ hash,
1655
1662
  };
1656
1663
  };
1657
1664
  exports.analyzeFunction = analyzeFunction;
@@ -1663,19 +1670,20 @@ var bbn = (() => {
1663
1670
  const animateCss = function (ele, animationName, callback) {
1664
1671
  let animationEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
1665
1672
  /*$(ele).addClass('animated ' + animationName).one(animationEnd, function(){
1666
- if ( typeof callback == 'function' ){ // make sure the callback is a function
1667
- callback.call(this); // brings the scope to the callback
1668
- }
1669
- $(this).removeClass('animated ' + animationName);
1670
- })*/
1673
+ if ( typeof callback == 'function' ){ // make sure the callback is a function
1674
+ callback.call(this); // brings the scope to the callback
1675
+ }
1676
+ $(this).removeClass('animated ' + animationName);
1677
+ })*/
1671
1678
  ele.classList.add('animated');
1672
1679
  ele.classList.add(animationName);
1673
1680
  ele.addEventListener(animationEnd, (e) => {
1674
1681
  e.target.removeEventListener(e.type, arguments.callee);
1675
- if (typeof callback == 'function') { // make sure the callback is a function
1682
+ if (typeof callback == 'function') {
1683
+ // make sure the callback is a function
1676
1684
  callback.call(this); // brings the scope to the callback
1677
1685
  }
1678
- this.classList.remove(animation);
1686
+ this.classList.remove(animationName);
1679
1687
  });
1680
1688
  };
1681
1689
  exports.animateCss = animateCss;
@@ -1719,13 +1727,13 @@ var bbn = (() => {
1719
1727
  };
1720
1728
  exports.autoExtend = autoExtend;
1721
1729
  });
1722
- define("fn/baseName", ["require", "exports", "fn/isString", "fn/substr"], function (require, exports, isString_5, substr_3) {
1730
+ define("fn/baseName", ["require", "exports", "fn/isString", "fn/substr"], function (require, exports, isString_4, substr_3) {
1723
1731
  "use strict";
1724
1732
  Object.defineProperty(exports, "__esModule", { value: true });
1725
1733
  exports.baseName = void 0;
1726
1734
  const baseName = function (path, suffix) {
1727
- if (path && (0, isString_5.isString)(path)) {
1728
- let bits = path.split("/");
1735
+ if (path && (0, isString_4.isString)(path)) {
1736
+ let bits = path.split('/');
1729
1737
  let res = bits.pop();
1730
1738
  if (!suffix) {
1731
1739
  return res;
@@ -1744,7 +1752,7 @@ var bbn = (() => {
1744
1752
  Object.defineProperty(exports, "__esModule", { value: true });
1745
1753
  exports.br2nl = void 0;
1746
1754
  const br2nl = function (st) {
1747
- return (0, replaceAll_2.replaceAll)("<br />", "\n", (0, replaceAll_2.replaceAll)("<br/>", "\n", (0, replaceAll_2.replaceAll)("<br>", "\n", st)));
1755
+ return (0, replaceAll_2.replaceAll)('<br />', '\n', (0, replaceAll_2.replaceAll)('<br/>', '\n', (0, replaceAll_2.replaceAll)('<br>', '\n', st)));
1748
1756
  };
1749
1757
  exports.br2nl = br2nl;
1750
1758
  });
@@ -1753,22 +1761,22 @@ var bbn = (() => {
1753
1761
  Object.defineProperty(exports, "__esModule", { value: true });
1754
1762
  exports.date = void 0;
1755
1763
  const date = function (v) {
1756
- let d = false, t = typeof (v);
1764
+ let d = false, t = typeof v;
1757
1765
  if (v === undefined) {
1758
1766
  return new Date();
1759
1767
  }
1760
- if ((t === 'number') || ((0, isNumber_3.isNumber)(v) && (v !== ''))) {
1768
+ if (t === 'number' || ((0, isNumber_3.isNumber)(v) && v !== '')) {
1761
1769
  if (v < 10000000000) {
1762
1770
  v = v * 1000;
1763
1771
  }
1764
- return (new Date(v));
1772
+ return new Date(v);
1765
1773
  }
1766
1774
  if (t === 'string') {
1767
1775
  if (v.length === 10) {
1768
- return (new Date(parseInt((0, substr_4.substr)(v, 0, 4)), parseInt((0, substr_4.substr)(v, 5, 2)) - 1, parseInt((0, substr_4.substr)(v, 8, 2)), 12));
1776
+ return new Date(parseInt((0, substr_4.substr)(v, 0, 4)), parseInt((0, substr_4.substr)(v, 5, 2)) - 1, parseInt((0, substr_4.substr)(v, 8, 2)), 12);
1769
1777
  }
1770
1778
  else if (v.length === 19) {
1771
- return (new Date(parseInt((0, substr_4.substr)(v, 0, 4)), parseInt((0, substr_4.substr)(v, 5, 2)) - 1, parseInt((0, substr_4.substr)(v, 8, 2)), parseInt((0, substr_4.substr)(v, 11, 2)), parseInt((0, substr_4.substr)(v, 14, 2)), parseInt((0, substr_4.substr)(v, 17, 2))));
1779
+ return new Date(parseInt((0, substr_4.substr)(v, 0, 4)), parseInt((0, substr_4.substr)(v, 5, 2)) - 1, parseInt((0, substr_4.substr)(v, 8, 2)), parseInt((0, substr_4.substr)(v, 11, 2)), parseInt((0, substr_4.substr)(v, 14, 2)), parseInt((0, substr_4.substr)(v, 17, 2)));
1772
1780
  }
1773
1781
  }
1774
1782
  else if ((0, isDate_2.isDate)(v)) {
@@ -1778,14 +1786,14 @@ var bbn = (() => {
1778
1786
  };
1779
1787
  exports.date = date;
1780
1788
  });
1781
- define("fn/fdatetime", ["require", "exports", "fn/date", "fn/isDate", "fn/isString"], function (require, exports, date_1, isDate_3, isString_6) {
1789
+ define("fn/fdatetime", ["require", "exports", "fn/date", "fn/isDate", "fn/isString"], function (require, exports, date_1, isDate_3, isString_5) {
1782
1790
  "use strict";
1783
1791
  Object.defineProperty(exports, "__esModule", { value: true });
1784
1792
  exports.fdatetime = void 0;
1785
1793
  const fdatetime = function (d, wrong_result) {
1786
1794
  let r = (0, date_1.date)(d);
1787
1795
  if (!(0, isDate_3.isDate)(r)) {
1788
- return wrong_result && (0, isString_6.isString)(wrong_result) ? wrong_result : '';
1796
+ return wrong_result && (0, isString_5.isString)(wrong_result) ? wrong_result : '';
1789
1797
  }
1790
1798
  if (undefined !== dayjs) {
1791
1799
  //return dayjs(r).format('lll');
@@ -1795,7 +1803,7 @@ var bbn = (() => {
1795
1803
  nextWeek: 'ddd D HH:mm',
1796
1804
  lastDay: '[' + bbn._('Yesterday') + '] HH:mm',
1797
1805
  lastWeek: 'ddd D HH:mm',
1798
- sameElse: 'DD/MM/YYYY HH:mm'
1806
+ sameElse: 'DD/MM/YYYY HH:mm',
1799
1807
  });
1800
1808
  //return dayjs(r).format("DD/MM/YYYY HH:mm")
1801
1809
  }
@@ -1803,7 +1811,7 @@ var bbn = (() => {
1803
1811
  };
1804
1812
  exports.fdatetime = fdatetime;
1805
1813
  });
1806
- define("fn/fdate", ["require", "exports", "fn/fdatetime", "fn/date", "fn/isDate", "fn/isString"], function (require, exports, fdatetime_1, date_2, isDate_4, isString_7) {
1814
+ define("fn/fdate", ["require", "exports", "fn/fdatetime", "fn/date", "fn/isDate", "fn/isString"], function (require, exports, fdatetime_1, date_2, isDate_4, isString_6) {
1807
1815
  "use strict";
1808
1816
  Object.defineProperty(exports, "__esModule", { value: true });
1809
1817
  exports.fdate = void 0;
@@ -1814,7 +1822,7 @@ var bbn = (() => {
1814
1822
  }
1815
1823
  let r = (0, date_2.date)(d);
1816
1824
  if (!(0, isDate_4.isDate)(r)) {
1817
- return wrong_result && (0, isString_7.isString)(wrong_result) ? wrong_result : '';
1825
+ return wrong_result && (0, isString_6.isString)(wrong_result) ? wrong_result : '';
1818
1826
  }
1819
1827
  if (undefined !== dayjs) {
1820
1828
  return dayjs(r).format('L');
@@ -1823,7 +1831,7 @@ var bbn = (() => {
1823
1831
  };
1824
1832
  exports.fdate = fdate;
1825
1833
  });
1826
- define("fn/calendar", ["require", "exports", "fn/fdate", "fn/date", "fn/isDate", "fn/isString"], function (require, exports, fdate_1, date_3, isDate_5, isString_8) {
1834
+ define("fn/calendar", ["require", "exports", "fn/fdate", "fn/date", "fn/isDate", "fn/isString"], function (require, exports, fdate_1, date_3, isDate_5, isString_7) {
1827
1835
  "use strict";
1828
1836
  Object.defineProperty(exports, "__esModule", { value: true });
1829
1837
  exports.calendar = void 0;
@@ -1833,7 +1841,7 @@ var bbn = (() => {
1833
1841
  }
1834
1842
  let r = (0, date_3.date)(d);
1835
1843
  if (!(0, isDate_5.isDate)(r)) {
1836
- return wrong_result && (0, isString_8.isString)(wrong_result) ? wrong_result : '';
1844
+ return wrong_result && (0, isString_7.isString)(wrong_result) ? wrong_result : '';
1837
1845
  }
1838
1846
  return dayjs(r).calendar(null, {
1839
1847
  sameDay: '[' + bbn._('Today') + ']',
@@ -1841,12 +1849,12 @@ var bbn = (() => {
1841
1849
  nextWeek: 'ddd D',
1842
1850
  lastDay: '[' + bbn._('Yesterday') + ']',
1843
1851
  lastWeek: 'ddd D',
1844
- sameElse: 'L'
1852
+ sameElse: 'L',
1845
1853
  });
1846
1854
  };
1847
1855
  exports.calendar = calendar;
1848
1856
  });
1849
- define("fn/error", ["require", "exports", "fn/log"], function (require, exports, log_8) {
1857
+ define("fn/error", ["require", "exports", "fn/log"], function (require, exports, log_6) {
1850
1858
  "use strict";
1851
1859
  Object.defineProperty(exports, "__esModule", { value: true });
1852
1860
  exports.error = void 0;
@@ -1857,11 +1865,11 @@ var bbn = (() => {
1857
1865
  args.push(arguments[i]);
1858
1866
  }
1859
1867
  args.unshift({
1860
- _bbn_console_mode: "error",
1868
+ _bbn_console_mode: 'error',
1861
1869
  _bbn_console_level: 1,
1862
- _bbn_console_style: "color: #E64141; background: #F7E195; font-size: 14px"
1870
+ _bbn_console_style: 'color: #E64141; background: #F7E195; font-size: 14px',
1863
1871
  });
1864
- log_8.log.apply(this, args);
1872
+ log_6.log.apply(this, args);
1865
1873
  }
1866
1874
  throw new Error(errorMsg);
1867
1875
  };
@@ -1880,7 +1888,7 @@ var bbn = (() => {
1880
1888
  "use strict";
1881
1889
  Object.defineProperty(exports, "__esModule", { value: true });
1882
1890
  exports.defaultPostLinkFunction = void 0;
1883
- const defaultPostLinkFunction = function (r) {
1891
+ const defaultPostLinkFunction = function (r, ele) {
1884
1892
  return true;
1885
1893
  };
1886
1894
  exports.defaultPostLinkFunction = defaultPostLinkFunction;
@@ -1889,18 +1897,17 @@ var bbn = (() => {
1889
1897
  "use strict";
1890
1898
  Object.defineProperty(exports, "__esModule", { value: true });
1891
1899
  exports.defaultAlertFunction = void 0;
1892
- const defaultAlertFunction = function (ele) {
1900
+ const defaultAlertFunction = function (msg, title) {
1893
1901
  /** @todo */
1894
- let c = appui.getCurrentContainer();
1895
- c.alert.apply(c, arguments);
1902
+ alert(msg);
1896
1903
  };
1897
1904
  exports.defaultAlertFunction = defaultAlertFunction;
1898
1905
  });
1899
- define("fn/callback", ["require", "exports", "fn/error", "fn/defaultLinkFunction", "fn/isFunction", "fn/log", "fn/defaultPostLinkFunction", "fn/defaultAlertFunction"], function (require, exports, error_1, defaultLinkFunction_1, isFunction_4, log_9, defaultPostLinkFunction_1, defaultAlertFunction_1) {
1906
+ define("fn/callback", ["require", "exports", "fn/error", "fn/defaultLinkFunction", "fn/isFunction", "fn/log", "fn/defaultPostLinkFunction", "fn/defaultAlertFunction"], function (require, exports, error_1, defaultLinkFunction_1, isFunction_4, log_7, defaultPostLinkFunction_1, defaultAlertFunction_1) {
1900
1907
  "use strict";
1901
1908
  Object.defineProperty(exports, "__esModule", { value: true });
1902
1909
  exports.callback = void 0;
1903
- const callback = function (url, res, fn, fn2, ele) {
1910
+ const callback = function (url, res = null, fn = null, fn2 = null, ele = null) {
1904
1911
  let tmp = false;
1905
1912
  if (res) {
1906
1913
  tmp = true;
@@ -1927,16 +1934,16 @@ var bbn = (() => {
1927
1934
  tmp = (0, defaultLinkFunction_1.defaultLinkFunction)(res, ele);
1928
1935
  }
1929
1936
  if (ele && isObj && (res.content !== undefined)) {
1930
- if (ele.is("input,textarea")) {
1931
- ele.val(res.content);
1937
+ if ('value' in ele) {
1938
+ ele.value = res.content;
1932
1939
  }
1933
1940
  else {
1934
1941
  ele.innerHTML = res.content;
1935
1942
  }
1936
1943
  }
1937
1944
  if (tmp && isObj && res.script) {
1938
- if ((0, isFunction_4.isFunction)(res.script)) {
1939
- tmp = res.script(res.data ? res.data : {}, ele ? ele : false);
1945
+ if (typeof (res.script) === 'function') {
1946
+ tmp = res.script(res.data ? res.data : {}, ele || null);
1940
1947
  }
1941
1948
  else {
1942
1949
  tmp = ((data, ele) => {
@@ -1948,7 +1955,7 @@ var bbn = (() => {
1948
1955
  }
1949
1956
  }
1950
1957
  catch (e) {
1951
- (0, log_9.log)(e, res);
1958
+ (0, log_7.log)(e, res);
1952
1959
  (0, error_1.error)((0, isFunction_4.isFunction)(e.getMessage) ? e.getMessage() : null);
1953
1960
  }
1954
1961
  return r;
@@ -1996,9 +2003,11 @@ var bbn = (() => {
1996
2003
  Object.defineProperty(exports, "__esModule", { value: true });
1997
2004
  exports.camelToCss = void 0;
1998
2005
  const camelToCss = function (str) {
1999
- return str.replace(/([A-Z])/g, function (st) {
2006
+ return str
2007
+ .replace(/([A-Z])/g, function (st) {
2000
2008
  return '-' + st.toLowerCase();
2001
- }).replace('/^./', function (st) {
2009
+ })
2010
+ .replace('/^./', function (st) {
2002
2011
  return st.toLowerCase();
2003
2012
  });
2004
2013
  };
@@ -2010,12 +2019,12 @@ var bbn = (() => {
2010
2019
  exports.canvasToImage = void 0;
2011
2020
  const canvasToImage = function (canvas) {
2012
2021
  let img = new Image();
2013
- img.src = canvas.toDataURL("image/png");
2022
+ img.src = canvas.toDataURL('image/png');
2014
2023
  return img;
2015
2024
  };
2016
2025
  exports.canvasToImage = canvasToImage;
2017
2026
  });
2018
- define("fn/center", ["require", "exports", "fn/log"], function (require, exports, log_10) {
2027
+ define("fn/center", ["require", "exports"], function (require, exports) {
2019
2028
  "use strict";
2020
2029
  Object.defineProperty(exports, "__esModule", { value: true });
2021
2030
  exports.center = void 0;
@@ -2034,55 +2043,54 @@ var bbn = (() => {
2034
2043
  w = parent.clientWidth;
2035
2044
  h = parent.clientHeight;
2036
2045
  }
2037
- (0, log_10.log)("BBN_CENTER", w, h);
2038
2046
  //ele.css("position","absolute");
2039
- ele.style.position = "absolute";
2047
+ ele.style.position = 'absolute';
2040
2048
  //ele.css("top", Math.max(0, ((h - ele.outerHeight()) / 2) + parent.scrollTop()) + "px");
2041
- ele.style.top = Math.max(0, ((h - ele.offsetHeight) / 2) + parent.scrollTop) + "px";
2049
+ ele.style.top = Math.max(0, (h - ele.offsetHeight) / 2 + parent.scrollTop) + 'px';
2042
2050
  //ele.css("left", Math.max(0, ((w - ele.outerWidth()) / 2) + parent.scrollLeft()) + "px");
2043
- ele.style.left = Math.max(0, ((h - ele.offsetWidth) / 2) + parent.scrollLeft) + "px";
2051
+ ele.style.left = Math.max(0, (h - ele.offsetWidth) / 2 + parent.scrollLeft) + 'px';
2044
2052
  return ele;
2045
2053
  };
2046
2054
  exports.center = center;
2047
2055
  });
2048
- define("fn/checkPropsDetails", ["require", "exports", "fn/isString", "fn/isArray", "fn/isObject", "fn/each", "fn/substr"], function (require, exports, isString_9, isArray_6, isObject_10, each_9, substr_5) {
2056
+ define("fn/checkPropsDetails", ["require", "exports", "fn/isArray", "fn/isObject", "fn/each", "fn/substr"], function (require, exports, isArray_6, isObject_9, each_9, substr_5) {
2049
2057
  "use strict";
2050
2058
  Object.defineProperty(exports, "__esModule", { value: true });
2051
2059
  exports.checkPropsDetails = void 0;
2052
- const checkPropsDetails = function (obj, props, checkEmpty) {
2060
+ const checkPropsDetails = function (obj, props, checkEmpty = false) {
2053
2061
  let res = {
2054
2062
  error: false,
2055
- result: true
2063
+ result: true,
2056
2064
  };
2057
- if ((0, isString_9.isString)(props)) {
2065
+ if (typeof (props) === 'string') {
2058
2066
  props = [props];
2059
2067
  }
2060
2068
  if (!(0, isArray_6.isArray)(props)) {
2061
- res.error = bbn._("checkProps must receive a string or an array as props argument");
2069
+ res.error = bbn._('checkProps must receive a string or an array as props argument');
2062
2070
  }
2063
- if (!(0, isObject_10.isObject)(obj)) {
2064
- res.error = bbn._("checkProps must receive an object as obj argument");
2071
+ if (!(0, isObject_9.isObject)(obj)) {
2072
+ res.error = bbn._('checkProps must receive an object as obj argument');
2065
2073
  }
2066
2074
  if (!res.error) {
2067
2075
  let check;
2068
- (0, each_9.each)(props, varName => {
2076
+ (0, each_9.each)(props, (varName) => {
2069
2077
  varName = varName.trim().split(':');
2070
2078
  let type = varName[1] || false;
2071
2079
  varName = varName[0];
2072
2080
  if (obj[varName] === undefined) {
2073
- res.error = varName + ' ' + bbn._("is not defined");
2081
+ res.error = varName + ' ' + bbn._('is not defined');
2074
2082
  }
2075
2083
  else if (type) {
2076
2084
  check = 'is' + (0, substr_5.substr)(type, 0, 1).toUpperCase() + (0, substr_5.substr)(type, 1).toLowerCase();
2077
2085
  if (bbn.fn[check] === undefined) {
2078
- res.error = type + ' ' + bbn._("is not a valid type");
2086
+ res.error = type + ' ' + bbn._('is not a valid type');
2079
2087
  }
2080
2088
  else if (!bbn.fn[check](obj[varName])) {
2081
- res.error = varName + ' ' + bbn._("is not a") + ' ' + type;
2089
+ res.error = varName + ' ' + bbn._('is not a') + ' ' + type;
2082
2090
  }
2083
2091
  }
2084
2092
  else if (checkEmpty && !obj[varName]) {
2085
- res.error = varName + ' ' + bbn._("is empty");
2093
+ res.error = varName + ' ' + bbn._('is empty');
2086
2094
  }
2087
2095
  if (res.error) {
2088
2096
  return false;
@@ -2100,7 +2108,7 @@ var bbn = (() => {
2100
2108
  "use strict";
2101
2109
  Object.defineProperty(exports, "__esModule", { value: true });
2102
2110
  exports.checkProps = void 0;
2103
- const checkProps = function (obj, props, checkEmpty) {
2111
+ const checkProps = function (obj, props, checkEmpty = false) {
2104
2112
  return (0, checkPropsDetails_1.checkPropsDetails)(obj, props, checkEmpty).result;
2105
2113
  };
2106
2114
  exports.checkProps = checkProps;
@@ -2109,7 +2117,7 @@ var bbn = (() => {
2109
2117
  "use strict";
2110
2118
  Object.defineProperty(exports, "__esModule", { value: true });
2111
2119
  exports.checkPropsOrDie = void 0;
2112
- const checkPropsOrDie = function (obj, props, checkEmpty) {
2120
+ const checkPropsOrDie = function (obj, props, checkEmpty = false) {
2113
2121
  let res = (0, checkPropsDetails_2.checkPropsDetails)(obj, props, checkEmpty);
2114
2122
  if (res.error) {
2115
2123
  throw new Error(res.error);
@@ -2123,11 +2131,11 @@ var bbn = (() => {
2123
2131
  Object.defineProperty(exports, "__esModule", { value: true });
2124
2132
  exports.correctCase = void 0;
2125
2133
  const correctCase = function (str) {
2126
- return str.replace(/[A-z]{1}/, c => c.toUpperCase());
2134
+ return str.replace(/[A-z]{1}/, (c) => c.toUpperCase());
2127
2135
  };
2128
2136
  exports.correctCase = correctCase;
2129
2137
  });
2130
- define("fn/checkType", ["require", "exports", "fn/isArray", "fn/each", "fn/isFunction", "fn/isString", "fn/correctCase", "fn/error", "fn/log"], function (require, exports, isArray_7, each_10, isFunction_5, isString_10, correctCase_1, error_2, log_11) {
2138
+ define("fn/checkType", ["require", "exports", "fn/isArray", "fn/each", "fn/isFunction", "fn/isString", "fn/correctCase", "fn/error", "fn/log"], function (require, exports, isArray_7, each_10, isFunction_5, isString_8, correctCase_1, error_2, log_8) {
2131
2139
  "use strict";
2132
2140
  Object.defineProperty(exports, "__esModule", { value: true });
2133
2141
  exports.checkType = void 0;
@@ -2137,7 +2145,7 @@ var bbn = (() => {
2137
2145
  type = [type];
2138
2146
  }
2139
2147
  const typesList = [];
2140
- (0, each_10.each)(type, t => {
2148
+ (0, each_10.each)(type, (t) => {
2141
2149
  var _a;
2142
2150
  if (t === String) {
2143
2151
  t = 'string';
@@ -2164,7 +2172,7 @@ var bbn = (() => {
2164
2172
  return false;
2165
2173
  }
2166
2174
  }
2167
- else if (!(0, isString_10.isString)(t) || !(0, isFunction_5.isFunction)(bbn.fn['is' + (0, correctCase_1.correctCase)(t)])) {
2175
+ else if (!(0, isString_8.isString)(t) || !(0, isFunction_5.isFunction)(bbn.fn['is' + (0, correctCase_1.correctCase)(t)])) {
2168
2176
  (0, error_2.error)(`The type ${t} is not recognized`);
2169
2177
  }
2170
2178
  else if (bbn.fn['is' + (0, correctCase_1.correctCase)(t)](value)) {
@@ -2176,26 +2184,26 @@ var bbn = (() => {
2176
2184
  }
2177
2185
  });
2178
2186
  if (!ok) {
2179
- (0, log_11.log)(["Value given", value, "type", typeof value, "expected", typesList.join(' or ')]);
2187
+ (0, log_8.log)(['Value given', value, 'type', typeof value, 'expected', typesList.join(' or ')]);
2180
2188
  if (logs.length) {
2181
- (0, log_11.log)(logs);
2189
+ (0, log_8.log)(logs);
2182
2190
  }
2183
- throw new Error((msg ? msg + ' - ' : '') + bbn._("The value should be a %s", typesList.join(' ' + bbn._("or a") + ' ')));
2191
+ throw new Error((msg ? msg + ' - ' : '') + bbn._('The value should be a %s', typesList.join(' ' + bbn._('or a') + ' ')));
2184
2192
  }
2185
2193
  };
2186
2194
  exports.checkType = checkType;
2187
2195
  });
2188
- define("fn/clone", ["require", "exports", "fn/isArray", "fn/isObject", "fn/extend"], function (require, exports, isArray_8, isObject_11, extend_3) {
2196
+ define("fn/clone", ["require", "exports", "fn/isArray", "fn/isObject", "fn/extend"], function (require, exports, isArray_8, isObject_10, extend_3) {
2189
2197
  "use strict";
2190
2198
  Object.defineProperty(exports, "__esModule", { value: true });
2191
2199
  exports.clone = void 0;
2192
2200
  const clone = function (obj) {
2193
2201
  if ((0, isArray_8.isArray)(obj)) {
2194
2202
  return obj.slice().map((a) => {
2195
- return typeof (a) === 'object' ? clone(a) : a;
2203
+ return typeof a === 'object' ? clone(a) : a;
2196
2204
  });
2197
2205
  }
2198
- if ((0, isObject_11.isObject)(obj)) {
2206
+ if ((0, isObject_10.isObject)(obj)) {
2199
2207
  const o = Object.create(Object.getPrototypeOf(obj));
2200
2208
  return (0, extend_3.extend)(true, o, obj);
2201
2209
  }
@@ -2208,48 +2216,48 @@ var bbn = (() => {
2208
2216
  Object.defineProperty(exports, "__esModule", { value: true });
2209
2217
  exports.colorToHex = void 0;
2210
2218
  const colorToHex = function (color) {
2211
- let canvas = document.createElement("canvas").getContext("2d");
2219
+ let canvas = document.createElement('canvas').getContext('2d');
2212
2220
  canvas.fillStyle = color;
2213
2221
  return canvas.fillStyle;
2214
2222
  };
2215
2223
  exports.colorToHex = colorToHex;
2216
2224
  });
2217
- define("fn/copy", ["require", "exports", "fn/isObject", "fn/isFunction"], function (require, exports, isObject_12, isFunction_6) {
2225
+ define("fn/copy", ["require", "exports", "fn/isObject", "fn/isFunction"], function (require, exports, isObject_11, isFunction_6) {
2218
2226
  "use strict";
2219
2227
  Object.defineProperty(exports, "__esModule", { value: true });
2220
2228
  exports.copy = void 0;
2221
2229
  const copy = function (st) {
2222
- return new Promise(resolve => {
2230
+ return new Promise((resolve) => {
2223
2231
  if (st) {
2224
2232
  if (navigator && navigator.clipboard) {
2225
2233
  if (st instanceof Blob) {
2226
2234
  navigator.clipboard.write([new ClipboardItem({ [st.type.toString()]: st })]).then(() => {
2227
- resolve();
2235
+ resolve(true);
2228
2236
  });
2229
2237
  }
2230
- else if ((0, isObject_12.isObject)(st) && (0, isFunction_6.isFunction)(st.toBlob)) {
2231
- st.toBlob(blob => {
2238
+ else if ((0, isObject_11.isObject)(st) && (0, isFunction_6.isFunction)(st.toBlob)) {
2239
+ st.toBlob((blob) => {
2232
2240
  navigator.clipboard.write([new ClipboardItem({ [blob.type.toString()]: blob })]).then(() => {
2233
- resolve();
2241
+ resolve(true);
2234
2242
  });
2235
2243
  });
2236
2244
  }
2237
2245
  else {
2238
2246
  navigator.clipboard.writeText(st);
2239
- resolve();
2247
+ resolve(true);
2240
2248
  }
2241
2249
  return;
2242
2250
  }
2243
- let input = document.createElement("textarea");
2244
- input.style.opacity = 0;
2251
+ let input = document.createElement('textarea');
2252
+ input.style.opacity = '0';
2245
2253
  input.value = st;
2246
2254
  document.body.appendChild(input);
2247
2255
  input.select();
2248
2256
  document.execCommand('copy');
2249
2257
  document.body.removeChild(input);
2250
- resolve();
2258
+ resolve(true);
2251
2259
  }
2252
- resolve();
2260
+ resolve(false);
2253
2261
  });
2254
2262
  };
2255
2263
  exports.copy = copy;
@@ -2258,8 +2266,8 @@ var bbn = (() => {
2258
2266
  "use strict";
2259
2267
  Object.defineProperty(exports, "__esModule", { value: true });
2260
2268
  exports.count = void 0;
2261
- const count = function (arr, prop, val, operator) {
2262
- return (0, filter_2.filter)(arr, prop, val, operator, false).length || 0;
2269
+ const count = function (arr, prop, val = null, operator = '=') {
2270
+ return (0, filter_2.filter)(arr, prop, val, operator).length || 0;
2263
2271
  };
2264
2272
  exports.count = count;
2265
2273
  });
@@ -2267,13 +2275,22 @@ var bbn = (() => {
2267
2275
  "use strict";
2268
2276
  Object.defineProperty(exports, "__esModule", { value: true });
2269
2277
  exports.crc32 = void 0;
2278
+ // this is a test
2279
+ const crc32Table = [];
2280
+ for (let i = 0; i < 256; i++) {
2281
+ let c = i;
2282
+ for (let j = 0; j < 8; j++) {
2283
+ c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1;
2284
+ }
2285
+ crc32Table.push(c);
2286
+ }
2270
2287
  const crc32 = function (str) {
2271
- let crc = 0 ^ (-1);
2288
+ let crc = 0 ^ -1;
2272
2289
  for (let i = 0; i < str.length; i++) {
2273
2290
  const charCode = str.charCodeAt(i);
2274
- crc = (crc >>> 8) ^ crc32Table[(crc ^ charCode) & 0xFF];
2291
+ crc = (crc >>> 8) ^ crc32Table[(crc ^ charCode) & 0xff];
2275
2292
  }
2276
- return (crc ^ (-1)) >>> 0; // Make sure the result is a 32-bit positive integer
2293
+ return (crc ^ -1) >>> 0; // Make sure the result is a 32-bit positive integer
2277
2294
  };
2278
2295
  exports.crc32 = crc32;
2279
2296
  });
@@ -2281,10 +2298,10 @@ var bbn = (() => {
2281
2298
  "use strict";
2282
2299
  Object.defineProperty(exports, "__esModule", { value: true });
2283
2300
  exports.createObject = void 0;
2284
- const createObject = function () {
2301
+ const createObject = function (...args) {
2285
2302
  const obj = Object.create(null);
2286
- if (arguments.length) {
2287
- (0, extend_4.extend)(obj, ...arguments);
2303
+ if (args.length) {
2304
+ (0, extend_4.extend)(obj, ...args);
2288
2305
  }
2289
2306
  return obj;
2290
2307
  };
@@ -2295,8 +2312,10 @@ var bbn = (() => {
2295
2312
  Object.defineProperty(exports, "__esModule", { value: true });
2296
2313
  exports.cssExists = void 0;
2297
2314
  const cssExists = function (f) {
2298
- var ok, rules, css = document.styleSheets;
2299
- for (var sx = 0; sx < css.length; sx++) {
2315
+ let ok;
2316
+ let rules;
2317
+ let css = document.styleSheets;
2318
+ for (let sx = 0; sx < css.length; sx++) {
2300
2319
  ok = 1;
2301
2320
  try {
2302
2321
  rules = css[sx].rules || css[sx].cssRules;
@@ -2309,9 +2328,9 @@ var bbn = (() => {
2309
2328
  }
2310
2329
  if (ok) {
2311
2330
  //log(rules);
2312
- for (var cx = 0; cx < rules.length; cx++) {
2331
+ for (let cx = 0; cx < rules.length; cx++) {
2313
2332
  //log(rules[cx].selectorText);
2314
- if (new RegExp("(^|\\s)" + (0, escapeRegExp_2.escapeRegExp)(f) + "(\\{|\\s)", "g").test(rules[cx].selectorText)) {
2333
+ if (new RegExp('(^|\\s)' + (0, escapeRegExp_2.escapeRegExp)(f) + '(\\{|\\s)', 'g').test(rules[cx].selectorText)) {
2315
2334
  return true;
2316
2335
  }
2317
2336
  }
@@ -2321,24 +2340,24 @@ var bbn = (() => {
2321
2340
  };
2322
2341
  exports.cssExists = cssExists;
2323
2342
  });
2324
- define("fn/dateSQL", ["require", "exports"], function (require, exports) {
2343
+ define("fn/dateSQL", ["require", "exports", "fn/date"], function (require, exports, date_4) {
2325
2344
  "use strict";
2326
2345
  Object.defineProperty(exports, "__esModule", { value: true });
2327
2346
  exports.dateSQL = void 0;
2328
2347
  const dateSQL = function (v, dayOnly) {
2329
- let date = date(v);
2330
- if (date) {
2331
- return dayjs(date).format("YYYY-MM-DD" + (dayOnly ? '' : ' HH:mm:ss'));
2348
+ let value = (0, date_4.date)(v);
2349
+ if (value) {
2350
+ return dayjs(value).format('YYYY-MM-DD' + (dayOnly ? '' : ' HH:mm:ss'));
2332
2351
  }
2333
2352
  };
2334
2353
  exports.dateSQL = dateSQL;
2335
2354
  });
2336
- define("fn/daysInMonth", ["require", "exports", "fn/date"], function (require, exports, date_4) {
2355
+ define("fn/daysInMonth", ["require", "exports", "fn/date"], function (require, exports, date_5) {
2337
2356
  "use strict";
2338
2357
  Object.defineProperty(exports, "__esModule", { value: true });
2339
2358
  exports.daysInMonth = void 0;
2340
2359
  const daysInMonth = function (v) {
2341
- let d = (0, date_4.date)(v);
2360
+ let d = (0, date_5.date)(v);
2342
2361
  if (d) {
2343
2362
  return dayjs(d).daysInMonth();
2344
2363
  }
@@ -2389,12 +2408,12 @@ var bbn = (() => {
2389
2408
  };
2390
2409
  exports.defaultConfirmFunction = defaultConfirmFunction;
2391
2410
  });
2392
- define("fn/defaultErrorFunction", ["require", "exports", "fn/log"], function (require, exports, log_12) {
2411
+ define("fn/defaultErrorFunction", ["require", "exports", "fn/log"], function (require, exports, log_9) {
2393
2412
  "use strict";
2394
2413
  Object.defineProperty(exports, "__esModule", { value: true });
2395
2414
  exports.defaultErrorFunction = void 0;
2396
2415
  const defaultErrorFunction = function (message) {
2397
- (0, log_12.log)(message);
2416
+ (0, log_9.log)(message);
2398
2417
  };
2399
2418
  exports.defaultErrorFunction = defaultErrorFunction;
2400
2419
  });
@@ -2407,19 +2426,12 @@ var bbn = (() => {
2407
2426
  };
2408
2427
  exports.defaultHistoryFunction = defaultHistoryFunction;
2409
2428
  });
2410
- define("fn/defaultPreLinkFunction", ["require", "exports", "fn/isFunction"], function (require, exports, isFunction_8) {
2429
+ define("fn/defaultPreLinkFunction", ["require", "exports"], function (require, exports) {
2411
2430
  "use strict";
2412
2431
  Object.defineProperty(exports, "__esModule", { value: true });
2413
2432
  exports.defaultPreLinkFunction = void 0;
2414
- const defaultPreLinkFunction = function (url) {
2415
- let router = appui.getRef('router');
2416
- if (router) {
2417
- if ((0, isFunction_8.isFunction)(router.route) && !router.disabled) {
2418
- router.route(url);
2419
- }
2420
- return false;
2421
- }
2422
- return true;
2433
+ const defaultPreLinkFunction = function (url, force, ele) {
2434
+ return url;
2423
2435
  };
2424
2436
  exports.defaultPreLinkFunction = defaultPreLinkFunction;
2425
2437
  });
@@ -2432,13 +2444,13 @@ var bbn = (() => {
2432
2444
  };
2433
2445
  exports.defaultResizeFunction = defaultResizeFunction;
2434
2446
  });
2435
- define("fn/deleteProp", ["require", "exports"], function (require, exports) {
2447
+ define("fn/deleteProp", ["require", "exports", "fn/checkType"], function (require, exports, checkType_1) {
2436
2448
  "use strict";
2437
2449
  Object.defineProperty(exports, "__esModule", { value: true });
2438
2450
  exports.deleteProp = void 0;
2439
2451
  const deleteProp = function (obj, prop) {
2440
- checkType(obj, "object", bbn._("The obj must be an object in setProp"));
2441
- checkType(prop, "string", bbn._("The prop must be a string in setProp"));
2452
+ (0, checkType_1.checkType)(obj, 'object', bbn._('The obj must be an object in setProp'));
2453
+ (0, checkType_1.checkType)(prop, 'string', bbn._('The prop must be a string in setProp'));
2442
2454
  delete obj[prop];
2443
2455
  };
2444
2456
  exports.deleteProp = deleteProp;
@@ -2451,7 +2463,7 @@ var bbn = (() => {
2451
2463
  if (!args.length)
2452
2464
  return false;
2453
2465
  for (let a of args) {
2454
- if ((typeof a === 'object') && !(0, isNull_2.isNull)(a)) {
2466
+ if (typeof a === 'object' && !(0, isNull_2.isNull)(a)) {
2455
2467
  return false;
2456
2468
  }
2457
2469
  }
@@ -2459,11 +2471,12 @@ var bbn = (() => {
2459
2471
  };
2460
2472
  exports.isValue = isValue;
2461
2473
  });
2462
- define("fn/diffObj", ["require", "exports", "fn/isDate", "fn/createObject", "fn/isFunction", "fn/isValue", "fn/isDom", "fn/numProperties"], function (require, exports, isDate_6, createObject_1, isFunction_9, isValue_1, isDom_4, numProperties_6) {
2474
+ define("fn/diffObj", ["require", "exports", "fn/isDate", "fn/createObject", "fn/isFunction", "fn/isValue", "fn/isDom", "fn/numProperties"], function (require, exports, isDate_6, createObject_1, isFunction_8, isValue_1, isDom_4, numProperties_5) {
2463
2475
  "use strict";
2464
2476
  Object.defineProperty(exports, "__esModule", { value: true });
2465
2477
  exports.diffObj = void 0;
2466
- const diffObj = function (obj1, obj2, unchanged, notRoot) {
2478
+ let diffObjProcessed = [];
2479
+ const diffObj = function (obj1, obj2, unchanged = false, notRoot = false) {
2467
2480
  if (!notRoot) {
2468
2481
  diffObjProcessed = [];
2469
2482
  }
@@ -2471,15 +2484,13 @@ var bbn = (() => {
2471
2484
  if (value1 === value2) {
2472
2485
  return VALUE_UNCHANGED;
2473
2486
  }
2474
- if ((0, isDate_6.isDate)(value1) &&
2475
- (0, isDate_6.isDate)(value2) &&
2476
- (value1.getTime() === value2.getTime())) {
2487
+ if ((0, isDate_6.isDate)(value1) && (0, isDate_6.isDate)(value2) && value1.getTime() === value2.getTime()) {
2477
2488
  return VALUE_UNCHANGED;
2478
2489
  }
2479
- if ('undefined' == typeof (value1)) {
2490
+ if ('undefined' == typeof value1) {
2480
2491
  return VALUE_CREATED;
2481
2492
  }
2482
- if ('undefined' == typeof (value2)) {
2493
+ if ('undefined' == typeof value2) {
2483
2494
  return VALUE_DELETED;
2484
2495
  }
2485
2496
  return VALUE_UPDATED;
@@ -2488,27 +2499,27 @@ var bbn = (() => {
2488
2499
  notRoot = false;
2489
2500
  }
2490
2501
  let diff = (0, createObject_1.createObject)();
2491
- if (!(0, isFunction_9.isFunction)(obj1) && !(0, isFunction_9.isFunction)(obj2)) {
2502
+ if (!(0, isFunction_8.isFunction)(obj1) && !(0, isFunction_8.isFunction)(obj2)) {
2492
2503
  if ((0, isValue_1.isValue)(obj1) || (0, isValue_1.isValue)(obj2)) {
2493
2504
  let res = _compareValues(obj1, obj2);
2494
- if (unchanged || (res !== VALUE_UNCHANGED)) {
2505
+ if (unchanged || res !== VALUE_UNCHANGED) {
2495
2506
  let ret = (0, createObject_1.createObject)();
2496
2507
  Object.defineProperty(ret, 'type', {
2497
2508
  value: res,
2498
- enumerable: false
2509
+ enumerable: false,
2499
2510
  });
2500
2511
  Object.defineProperty(ret, 'data', {
2501
- value: (obj1 === undefined) ? obj2 : obj1,
2502
- enumerable: false
2512
+ value: obj1 === undefined ? obj2 : obj1,
2513
+ enumerable: false,
2503
2514
  });
2504
2515
  Object.defineProperty(ret, '_bbnDiffObjProof', {
2505
2516
  value: true,
2506
- enumerable: false
2517
+ enumerable: false,
2507
2518
  });
2508
2519
  if (obj1 !== undefined) {
2509
2520
  Object.defineProperty(ret, 'newData', {
2510
2521
  value: obj2,
2511
- enumerable: false
2522
+ enumerable: false,
2512
2523
  });
2513
2524
  }
2514
2525
  return ret;
@@ -2524,11 +2535,11 @@ var bbn = (() => {
2524
2535
  }
2525
2536
  diffObjProcessed.push(obj1, obj2);
2526
2537
  for (let key in obj1) {
2527
- if ((0, isFunction_9.isFunction)(obj1[key])) {
2538
+ if ((0, isFunction_8.isFunction)(obj1[key])) {
2528
2539
  continue;
2529
2540
  }
2530
2541
  let value2 = undefined;
2531
- if ('undefined' != typeof (obj2[key])) {
2542
+ if ('undefined' != typeof obj2[key]) {
2532
2543
  value2 = obj2[key];
2533
2544
  }
2534
2545
  let res = diffObj(obj1[key], value2, unchanged, true);
@@ -2537,7 +2548,7 @@ var bbn = (() => {
2537
2548
  }
2538
2549
  }
2539
2550
  for (let key in obj2) {
2540
- if ((0, isFunction_9.isFunction)(obj2[key]) || ('undefined' != typeof (obj1[key]))) {
2551
+ if ((0, isFunction_8.isFunction)(obj2[key]) || 'undefined' != typeof obj1[key]) {
2541
2552
  continue;
2542
2553
  }
2543
2554
  let res = diffObj(undefined, obj2[key], unchanged, true);
@@ -2546,16 +2557,16 @@ var bbn = (() => {
2546
2557
  }
2547
2558
  }
2548
2559
  }
2549
- return !notRoot || unchanged || (0, numProperties_6.numProperties)(diff) ? diff : false;
2560
+ return !notRoot || unchanged || (0, numProperties_5.numProperties)(diff) ? diff : false;
2550
2561
  };
2551
2562
  exports.diffObj = diffObj;
2552
2563
  });
2553
- define("fn/dirName", ["require", "exports", "fn/isString", "fn/substr"], function (require, exports, isString_11, substr_6) {
2564
+ define("fn/dirName", ["require", "exports", "fn/isString", "fn/substr"], function (require, exports, isString_9, substr_6) {
2554
2565
  "use strict";
2555
2566
  Object.defineProperty(exports, "__esModule", { value: true });
2556
2567
  exports.dirName = void 0;
2557
2568
  const dirName = function (path) {
2558
- if ((0, isString_11.isString)(path) && path) {
2569
+ if ((0, isString_9.isString)(path) && path) {
2559
2570
  while ((0, substr_6.substr)(path, path.length - 1) === '/') {
2560
2571
  path = (0, substr_6.substr)(path, 0, path.length - 1);
2561
2572
  }
@@ -2587,14 +2598,14 @@ var bbn = (() => {
2587
2598
  };
2588
2599
  exports.isBlob = isBlob;
2589
2600
  });
2590
- define("fn/fileExt", ["require", "exports", "fn/isString"], function (require, exports, isString_12) {
2601
+ define("fn/fileExt", ["require", "exports", "fn/isString"], function (require, exports, isString_10) {
2591
2602
  "use strict";
2592
2603
  Object.defineProperty(exports, "__esModule", { value: true });
2593
2604
  exports.fileExt = void 0;
2594
2605
  const fileExt = function (filename) {
2595
- if (filename && (0, isString_12.isString)(filename)) {
2606
+ if (filename && (0, isString_10.isString)(filename)) {
2596
2607
  let bits = filename.split('.');
2597
- if (bits[0] && (bits.length > 1)) {
2608
+ if (bits[0] && bits.length > 1) {
2598
2609
  return bits[bits.length - 1].toLowerCase();
2599
2610
  }
2600
2611
  }
@@ -2618,7 +2629,7 @@ var bbn = (() => {
2618
2629
  };
2619
2630
  exports.isCanvas = isCanvas;
2620
2631
  });
2621
- define("fn/downloadContent", ["require", "exports", "fn/isCanvas", "fn/isObject", "fn/isString", "fn/log"], function (require, exports, isCanvas_1, isObject_13, isString_13, log_13) {
2632
+ define("fn/downloadContent", ["require", "exports", "fn/isCanvas", "fn/isObject", "fn/isString", "fn/log"], function (require, exports, isCanvas_1, isObject_12, isString_11, log_10) {
2622
2633
  "use strict";
2623
2634
  Object.defineProperty(exports, "__esModule", { value: true });
2624
2635
  exports.downloadContent = void 0;
@@ -2637,7 +2648,7 @@ var bbn = (() => {
2637
2648
  return;
2638
2649
  }
2639
2650
  if (!type) {
2640
- type = (0, isObject_13.isObject)(content) && content.type ? content.type : 'octet/stream';
2651
+ type = (0, isObject_12.isObject)(content) && content.type ? content.type : 'octet/stream';
2641
2652
  }
2642
2653
  else if (type.indexOf('/') === -1) {
2643
2654
  type = 'text/' + type;
@@ -2645,7 +2656,7 @@ var bbn = (() => {
2645
2656
  let a = window.document.createElement('a');
2646
2657
  a.className = 'bbn-no';
2647
2658
  let src = null;
2648
- if ((0, isString_13.isString)(content)) {
2659
+ if ((0, isString_11.isString)(content)) {
2649
2660
  src = new Blob([content], { type: type });
2650
2661
  }
2651
2662
  else {
@@ -2653,7 +2664,7 @@ var bbn = (() => {
2653
2664
  src = content;
2654
2665
  }
2655
2666
  catch (e) {
2656
- (0, log_13.log)(e);
2667
+ (0, log_10.log)(e);
2657
2668
  }
2658
2669
  }
2659
2670
  a.href = window.URL.createObjectURL(src);
@@ -2667,20 +2678,20 @@ var bbn = (() => {
2667
2678
  };
2668
2679
  exports.downloadContent = downloadContent;
2669
2680
  });
2670
- define("fn/download", ["require", "exports", "fn/isObject", "fn/ajax", "fn/substr", "fn/baseName", "fn/isBlob", "fn/fileExt", "fn/downloadContent", "fn/defaultAjaxErrorFunction"], function (require, exports, isObject_14, ajax_1, substr_7, baseName_1, isBlob_1, fileExt_1, downloadContent_1, defaultAjaxErrorFunction_2) {
2681
+ define("fn/download", ["require", "exports", "fn/ajax", "fn/substr", "fn/baseName", "fn/isBlob", "fn/fileExt", "fn/downloadContent", "fn/defaultAjaxErrorFunction"], function (require, exports, ajax_1, substr_7, baseName_1, isBlob_1, fileExt_1, downloadContent_1, defaultAjaxErrorFunction_2) {
2671
2682
  "use strict";
2672
2683
  Object.defineProperty(exports, "__esModule", { value: true });
2673
2684
  exports.download = void 0;
2674
2685
  const download = function (url, filename, params) {
2675
2686
  // We can intervert the arguments
2676
- if ((0, isObject_14.isObject)(filename)) {
2687
+ if (filename && (typeof (filename) === 'object')) {
2677
2688
  params = filename;
2678
2689
  filename = null;
2679
2690
  }
2680
2691
  return (0, ajax_1.ajax)(url, 'blob', params || { _bbn_download: 1 }, (d, headers) => {
2681
2692
  if (!filename) {
2682
2693
  let cd = 'attachment; filename=';
2683
- if (headers && headers['content-disposition'] && (headers['content-disposition'].indexOf(cd) === 0)) {
2694
+ if (headers && headers['content-disposition'] && headers['content-disposition'].indexOf(cd) === 0) {
2684
2695
  filename = (0, substr_7.substr)(headers['content-disposition'], cd.length + 1, headers['content-disposition'].length - cd.length - 2);
2685
2696
  }
2686
2697
  else {
@@ -2690,12 +2701,11 @@ var bbn = (() => {
2690
2701
  if ((0, isBlob_1.isBlob)(d)) {
2691
2702
  let extension = (0, fileExt_1.fileExt)(filename);
2692
2703
  let htmlExtensions = ['php', 'html'];
2693
- if ((d.type !== 'text/html') || htmlExtensions.includes(extension)) {
2704
+ if ((typeof filename === 'string') && ((('type' in d) && (d.type !== 'text/html')) || htmlExtensions.includes(extension))) {
2694
2705
  (0, downloadContent_1.downloadContent)(filename, d);
2695
2706
  return;
2696
2707
  }
2697
2708
  }
2698
- (0, defaultAjaxErrorFunction_2.defaultAjaxErrorFunction)(e);
2699
2709
  }, e => {
2700
2710
  (0, defaultAjaxErrorFunction_2.defaultAjaxErrorFunction)(e);
2701
2711
  });
@@ -2711,43 +2721,43 @@ var bbn = (() => {
2711
2721
  };
2712
2722
  exports.eraseCookie = eraseCookie;
2713
2723
  });
2714
- define("fn/escapeDquotes", ["require", "exports", "fn/isString"], function (require, exports, isString_14) {
2724
+ define("fn/escapeDquotes", ["require", "exports", "fn/isString"], function (require, exports, isString_12) {
2715
2725
  "use strict";
2716
2726
  Object.defineProperty(exports, "__esModule", { value: true });
2717
2727
  exports.escapeDquotes = void 0;
2718
2728
  const escapeDquotes = function (str) {
2719
- if (!(0, isString_14.isString)(str)) {
2729
+ if (!(0, isString_12.isString)(str)) {
2720
2730
  return str;
2721
2731
  }
2722
2732
  return str.replace(/"/g, '\\"');
2723
2733
  };
2724
2734
  exports.escapeDquotes = escapeDquotes;
2725
2735
  });
2726
- define("fn/escapeSquotes", ["require", "exports", "fn/isString"], function (require, exports, isString_15) {
2736
+ define("fn/escapeSquotes", ["require", "exports", "fn/isString"], function (require, exports, isString_13) {
2727
2737
  "use strict";
2728
2738
  Object.defineProperty(exports, "__esModule", { value: true });
2729
2739
  exports.escapeSquotes = void 0;
2730
2740
  const escapeSquotes = function (str) {
2731
- if (!(0, isString_15.isString)(str)) {
2741
+ if (!(0, isString_13.isString)(str)) {
2732
2742
  return str;
2733
2743
  }
2734
2744
  return str.replace(/'/g, "\\'");
2735
2745
  };
2736
2746
  exports.escapeSquotes = escapeSquotes;
2737
2747
  });
2738
- define("fn/escapeTicks", ["require", "exports", "fn/isString"], function (require, exports, isString_16) {
2748
+ define("fn/escapeTicks", ["require", "exports", "fn/isString"], function (require, exports, isString_14) {
2739
2749
  "use strict";
2740
2750
  Object.defineProperty(exports, "__esModule", { value: true });
2741
2751
  exports.escapeTicks = void 0;
2742
2752
  const escapeTicks = function (str) {
2743
- if (!(0, isString_16.isString)(str)) {
2753
+ if (!(0, isString_14.isString)(str)) {
2744
2754
  return str;
2745
2755
  }
2746
- return str.replace(/`/g, "\\`");
2756
+ return str.replace(/`/g, '\\`');
2747
2757
  };
2748
2758
  exports.escapeTicks = escapeTicks;
2749
2759
  });
2750
- define("fn/escapeUrl", ["require", "exports", "fn/each", "fn/dirName", "fn/baseName", "fn/isString"], function (require, exports, each_12, dirName_1, baseName_2, isString_17) {
2760
+ define("fn/escapeUrl", ["require", "exports", "fn/each", "fn/dirName", "fn/baseName", "fn/isString"], function (require, exports, each_12, dirName_1, baseName_2, isString_15) {
2751
2761
  "use strict";
2752
2762
  Object.defineProperty(exports, "__esModule", { value: true });
2753
2763
  exports.escapeUrl = void 0;
@@ -2763,7 +2773,7 @@ var bbn = (() => {
2763
2773
  st += '://';
2764
2774
  url = url.substring(3);
2765
2775
  }
2766
- (0, each_12.each)((0, dirName_1.dirName)(url).split('/'), a => {
2776
+ (0, each_12.each)((0, dirName_1.dirName)(url).split('/'), (a) => {
2767
2777
  st += encodeURIComponent(a) + '/';
2768
2778
  });
2769
2779
  let base = (0, baseName_2.baseName)(url);
@@ -2775,7 +2785,7 @@ var bbn = (() => {
2775
2785
  existingParams = '?' + tmp[1];
2776
2786
  base = tmp[0];
2777
2787
  }
2778
- if (params && (0, isString_17.isString)(params)) {
2788
+ if (params && (0, isString_15.isString)(params)) {
2779
2789
  if (params.match('^(\\&|\\?)')) {
2780
2790
  params = params.substring(1);
2781
2791
  }
@@ -2788,22 +2798,22 @@ var bbn = (() => {
2788
2798
  };
2789
2799
  exports.escapeUrl = escapeUrl;
2790
2800
  });
2791
- define("fn/extendOut", ["require", "exports", "fn/isObject"], function (require, exports, isObject_15) {
2801
+ define("fn/extendOut", ["require", "exports", "fn/isObject"], function (require, exports, isObject_13) {
2792
2802
  "use strict";
2793
2803
  Object.defineProperty(exports, "__esModule", { value: true });
2794
2804
  exports.extendOut = void 0;
2795
- const extendOut = function () {
2805
+ const extendOut = function (...args) {
2796
2806
  let r = null;
2797
- for (let a of arguments) {
2798
- if (!(0, isObject_15.isObject)(a)) {
2799
- throw new Error("Each argument for extendOut must be an object, " + typeof (arguments[i]) + " given");
2807
+ for (let a of args) {
2808
+ if (!(0, isObject_13.isObject)(a)) {
2809
+ throw new Error('Each argument for extendOut must be an object, ' + typeof a + ' given');
2800
2810
  }
2801
2811
  if (r === null) {
2802
2812
  r = a;
2803
2813
  }
2804
2814
  else {
2805
2815
  for (let n in a) {
2806
- if ((0, isObject_15.isObject)(r[n], a[n])) {
2816
+ if ((0, isObject_13.isObject)(r[n], a[n])) {
2807
2817
  extendOut(r[n], a[n]);
2808
2818
  }
2809
2819
  else if (r[n] === undefined) {
@@ -2822,7 +2832,7 @@ var bbn = (() => {
2822
2832
  exports.fieldValue = void 0;
2823
2833
  const fieldValue = function (field) {
2824
2834
  let v;
2825
- if (field.type === "checkbox") {
2835
+ if (field.type === 'checkbox') {
2826
2836
  if (field.checked) {
2827
2837
  v = field.value;
2828
2838
  if (!v) {
@@ -2833,7 +2843,7 @@ var bbn = (() => {
2833
2843
  v = 0;
2834
2844
  }
2835
2845
  }
2836
- else if (field.type === "radio") {
2846
+ else if (field.type === 'radio') {
2837
2847
  if (field.checked) {
2838
2848
  v = field.value;
2839
2849
  }
@@ -2856,7 +2866,7 @@ var bbn = (() => {
2856
2866
  res.push(arr[idx]);
2857
2867
  start = idx + 1;
2858
2868
  }
2859
- (0, each_13.each)(arr, it => {
2869
+ (0, each_13.each)(arr, (it) => {
2860
2870
  if ((0, isArray_10.isArray)(it[deepProperty])) {
2861
2871
  findAll(it[deepProperty], filter, deepProperty, res);
2862
2872
  }
@@ -2872,10 +2882,10 @@ var bbn = (() => {
2872
2882
  const fori = function (arr, fn, max = arr.length - 1, min = 0) {
2873
2883
  if ((0, isArray_11.isArray)(arr)) {
2874
2884
  let realMax = arr.length - 1;
2875
- if (!(0, isNumber_4.isNumber)(max) || !(0 < max <= realMax)) {
2885
+ if (!(0, isNumber_4.isNumber)(max) || !((0 < max) && (max <= realMax))) {
2876
2886
  max = realMax;
2877
2887
  }
2878
- if (!(0, isNumber_4.isNumber)(min) || !(0 <= min < realMax) || (min > max)) {
2888
+ if (!(0, isNumber_4.isNumber)(min) || !((0 <= min) && (min < realMax)) || (min > max)) {
2879
2889
  min = 0;
2880
2890
  }
2881
2891
  for (let i = min; i <= max; i++) {
@@ -2894,10 +2904,10 @@ var bbn = (() => {
2894
2904
  const forir = function (arr, fn, max = arr.length - 1, min = 0) {
2895
2905
  if ((0, isArray_12.isArray)(arr)) {
2896
2906
  let realMax = arr.length - 1;
2897
- if (!(0, isNumber_5.isNumber)(max) || !(0 < max <= realMax)) {
2907
+ if (!(0, isNumber_5.isNumber)(max) || !((0 < max) && (max <= realMax))) {
2898
2908
  max = realMax;
2899
2909
  }
2900
- if (!(0, isNumber_5.isNumber)(min) || !(0 <= min < realMax) || (min > max)) {
2910
+ if (!(0, isNumber_5.isNumber)(min) || !((0 <= min) && (min < realMax)) || (min > max)) {
2901
2911
  min = 0;
2902
2912
  }
2903
2913
  for (let i = max; i >= min; i--) {
@@ -2909,7 +2919,7 @@ var bbn = (() => {
2909
2919
  };
2910
2920
  exports.forir = forir;
2911
2921
  });
2912
- define("fn/format", ["require", "exports", "fn/checkType"], function (require, exports, checkType_1) {
2922
+ define("fn/format", ["require", "exports", "fn/checkType"], function (require, exports, checkType_2) {
2913
2923
  "use strict";
2914
2924
  Object.defineProperty(exports, "__esModule", { value: true });
2915
2925
  exports.format = void 0;
@@ -2919,7 +2929,7 @@ var bbn = (() => {
2919
2929
  let i = 0;
2920
2930
  return str.replace(/\%([d|s])/g, (match, type) => {
2921
2931
  let tmp = args[i++];
2922
- (0, checkType_1.checkType)(tmp, type === 'd' ? 'number' : 'string', bbn._("The value doesn't correspond to the format"));
2932
+ (0, checkType_2.checkType)(tmp, type === 'd' ? 'number' : 'string', bbn._("The value doesn't correspond to the format"));
2923
2933
  return tmp;
2924
2934
  });
2925
2935
  }
@@ -2949,7 +2959,7 @@ var bbn = (() => {
2949
2959
  };
2950
2960
  exports.formatDate = formatDate;
2951
2961
  });
2952
- define("fn/formatSize", ["require", "exports", "fn/isNumber", "fn/isString"], function (require, exports, isNumber_6, isString_18) {
2962
+ define("fn/formatSize", ["require", "exports", "fn/isNumber", "fn/isString"], function (require, exports, isNumber_6, isString_16) {
2953
2963
  "use strict";
2954
2964
  Object.defineProperty(exports, "__esModule", { value: true });
2955
2965
  exports.formatSize = void 0;
@@ -2957,7 +2967,7 @@ var bbn = (() => {
2957
2967
  if ((0, isNumber_6.isNumber)(st)) {
2958
2968
  return st + 'px';
2959
2969
  }
2960
- if ((0, isString_18.isString)(st)) {
2970
+ if ((0, isString_16.isString)(st)) {
2961
2971
  return st;
2962
2972
  }
2963
2973
  return noValid ? false : 'auto';
@@ -2975,30 +2985,29 @@ var bbn = (() => {
2975
2985
  let v;
2976
2986
  (0, each_14.each)($inputs, (input, i) => {
2977
2987
  v = (0, fieldValue_1.fieldValue)(input);
2978
- if ((v !== undefined) && !input.disabled) {
2988
+ if (v !== undefined && !input.disabled) {
2979
2989
  let name = input.name;
2980
- if ((name.indexOf("[]") === -1) &&
2981
- (name.indexOf("[") > -1) &&
2982
- (name.indexOf("]") > -1) &&
2983
- (name.lastIndexOf("]") === name.length - 1)) {
2984
- name = (0, replaceAll_3.replaceAll)("][", ".", name);
2985
- name = (0, replaceAll_3.replaceAll)("[", ".", name);
2986
- name = (0, replaceAll_3.replaceAll)("]", "", name);
2987
- }
2988
- if ((name.length > 2) &&
2989
- (name.indexOf("[]") === (name.length - 2))) {
2990
+ if (name.indexOf('[]') === -1 &&
2991
+ name.indexOf('[') > -1 &&
2992
+ name.indexOf(']') > -1 &&
2993
+ name.lastIndexOf(']') === name.length - 1) {
2994
+ name = (0, replaceAll_3.replaceAll)('][', '.', name);
2995
+ name = (0, replaceAll_3.replaceAll)('[', '.', name);
2996
+ name = (0, replaceAll_3.replaceAll)(']', '', name);
2997
+ }
2998
+ if (name.length > 2 && name.indexOf('[]') === name.length - 2) {
2990
2999
  n = (0, substr_8.substr)(name, 0, name.length - 2);
2991
3000
  if (res[n] === undefined) {
2992
3001
  res[n] = [];
2993
3002
  }
2994
3003
  res[n].push(v);
2995
3004
  }
2996
- else if (name.indexOf(".") > -1) {
2997
- let tmp, parts = name.split(".");
3005
+ else if (name.indexOf('.') > -1) {
3006
+ let tmp, parts = name.split('.');
2998
3007
  tmp = res;
2999
3008
  for (let i = 0; i < parts.length; i++) {
3000
3009
  if (res[parts[i]] === undefined) {
3001
- if (i < (parts.length - 1)) {
3010
+ if (i < parts.length - 1) {
3002
3011
  tmp[parts[i]] = {};
3003
3012
  }
3004
3013
  else {
@@ -3025,17 +3034,17 @@ var bbn = (() => {
3025
3034
  const fromXml = function (xml, arrayTags) {
3026
3035
  let dom = null;
3027
3036
  if (window.DOMParser)
3028
- dom = (new DOMParser()).parseFromString(xml, "text/xml");
3029
- else if (window.ActiveXObject) {
3030
- dom = new ActiveXObject('Microsoft.XMLDOM');
3037
+ dom = new DOMParser().parseFromString(xml, 'text/xml');
3038
+ else if (window['ActiveXObject']) {
3039
+ dom = new window['ActiveXObject']('Microsoft.XMLDOM');
3031
3040
  dom.async = false;
3032
3041
  if (!dom.loadXML(xml))
3033
- throw dom.parseError.reason + " " + dom.parseError.srcText;
3042
+ throw dom.parseError.reason + ' ' + dom.parseError.srcText;
3034
3043
  }
3035
3044
  else
3036
- throw new Error("cannot parse xml string!");
3045
+ throw new Error('cannot parse xml string!');
3037
3046
  function parseNode(xmlNode, result) {
3038
- if (xmlNode.nodeName == "#text") {
3047
+ if (xmlNode.nodeName == '#text') {
3039
3048
  let v = xmlNode.nodeValue;
3040
3049
  if (v.trim())
3041
3050
  result['#text'] = v;
@@ -3067,18 +3076,18 @@ var bbn = (() => {
3067
3076
  };
3068
3077
  exports.fromXml = fromXml;
3069
3078
  });
3070
- define("fn/ftime", ["require", "exports", "fn/date", "fn/isDate", "fn/isString"], function (require, exports, date_5, isDate_7, isString_19) {
3079
+ define("fn/ftime", ["require", "exports", "fn/date", "fn/isDate", "fn/isString"], function (require, exports, date_6, isDate_7, isString_17) {
3071
3080
  "use strict";
3072
3081
  Object.defineProperty(exports, "__esModule", { value: true });
3073
3082
  exports.ftime = void 0;
3074
3083
  const ftime = function (d, wrong_result) {
3075
- let r = (0, date_5.date)(d);
3084
+ let r = (0, date_6.date)(d);
3076
3085
  if (!(0, isDate_7.isDate)(r)) {
3077
- return wrong_result && (0, isString_19.isString)(wrong_result) ? wrong_result : '';
3086
+ return wrong_result && (0, isString_17.isString)(wrong_result) ? wrong_result : '';
3078
3087
  }
3079
3088
  if (undefined !== dayjs) {
3080
3089
  return dayjs(r).calendar({
3081
- sameElse: 'D/M/YY HH:mm'
3090
+ sameElse: 'D/M/YY HH:mm',
3082
3091
  });
3083
3092
  }
3084
3093
  return r.toLocaleDateString();
@@ -3101,31 +3110,31 @@ var bbn = (() => {
3101
3110
  Object.defineProperty(exports, "__esModule", { value: true });
3102
3111
  exports.getAllTags = void 0;
3103
3112
  const getAllTags = function () {
3104
- return (0, unique_1.unique)(Array.prototype.map.apply(document.all, [a => a.tagName.toLowerCase()]));
3113
+ return (0, unique_1.unique)(Array.prototype.map.apply(document.all, [(a) => a.tagName.toLowerCase()]));
3105
3114
  };
3106
3115
  exports.getAllTags = getAllTags;
3107
3116
  });
3108
- define("fn/getAncestors", ["require", "exports", "fn/isString"], function (require, exports, isString_20) {
3117
+ define("fn/getAncestors", ["require", "exports"], function (require, exports) {
3109
3118
  "use strict";
3110
3119
  Object.defineProperty(exports, "__esModule", { value: true });
3111
3120
  exports.getAncestors = void 0;
3112
- const getAncestors = function (ele, sel) {
3121
+ const getAncestors = function (ele, selector) {
3113
3122
  let r = [];
3114
- if ((0, isString_20.isString)(ele)) {
3123
+ if (typeof ele === 'string') {
3115
3124
  ele = document.querySelector(ele);
3116
3125
  }
3117
3126
  if (ele instanceof HTMLElement) {
3118
- if (ele.parentNode) {
3119
- if (typeof (sel) === 'string') {
3120
- while (ele = ele.parentNode.closest(sel)) {
3127
+ if (ele.parentElement) {
3128
+ if (typeof selector === 'string') {
3129
+ while ((ele = ele.parentElement.closest(selector))) {
3121
3130
  r.push(ele);
3122
3131
  }
3123
3132
  }
3124
3133
  else {
3125
- if (sel === true) {
3134
+ if (selector === true) {
3126
3135
  r.push(ele);
3127
3136
  }
3128
- while (ele = ele.parentNode) {
3137
+ while ((ele = ele.parentElement)) {
3129
3138
  r.push(ele);
3130
3139
  }
3131
3140
  }
@@ -3141,10 +3150,10 @@ var bbn = (() => {
3141
3150
  exports.getAttributes = void 0;
3142
3151
  const getAttributes = function (ele) {
3143
3152
  if (!ele.getAttributeNames) {
3144
- (0, error_3.error)("The element is not a proper HTML Element");
3153
+ (0, error_3.error)('The element is not a proper HTML Element');
3145
3154
  }
3146
3155
  let res = Object.create(null);
3147
- ele.getAttributeNames().forEach(name => {
3156
+ ele.getAttributeNames().forEach((name) => {
3148
3157
  res[name] = ele.getAttribute(name);
3149
3158
  });
3150
3159
  return res;
@@ -3160,19 +3169,19 @@ var bbn = (() => {
3160
3169
  switch (true) {
3161
3170
  case userAgent.includes('edge'):
3162
3171
  case userAgent.includes('edg/'):
3163
- return "Edge";
3164
- case userAgent.includes('opr') && !!window.opr:
3165
- return "Opera";
3166
- case userAgent.includes('chrome') && !!window.chrome:
3167
- return "Chrome";
3172
+ return 'Edge';
3173
+ case userAgent.includes('opr') && !!window['opr']:
3174
+ return 'Opera';
3175
+ case userAgent.includes('chrome') && !!window['chrome']:
3176
+ return 'Chrome';
3168
3177
  case userAgent.includes('trident'):
3169
- return "Internet Explorer";
3178
+ return 'Internet Explorer';
3170
3179
  case userAgent.includes('firefox'):
3171
- return "Firefox";
3180
+ return 'Firefox';
3172
3181
  case userAgent.includes('safari'):
3173
- return "Safari";
3182
+ return 'Safari';
3174
3183
  default:
3175
- return "Other";
3184
+ return 'Other';
3176
3185
  }
3177
3186
  };
3178
3187
  exports.getBrowserName = getBrowserName;
@@ -3188,9 +3197,9 @@ var bbn = (() => {
3188
3197
  return userAgent.split('edge/')[1].split(' ')[0];
3189
3198
  case userAgent.includes('edg/'):
3190
3199
  return userAgent.split('edg/')[1].split(' ')[0];
3191
- case userAgent.includes('opr/') && !!window.opr:
3200
+ case userAgent.includes('opr/') && !!window['opr']:
3192
3201
  return userAgent.split('opr/')[1].split(' ')[0];
3193
- case userAgent.includes('chrome/') && !!window.chrome:
3202
+ case userAgent.includes('chrome/') && !!window['chrome']:
3194
3203
  return userAgent.split('chrome/')[1].split(' ')[0];
3195
3204
  case userAgent.includes('trident/'):
3196
3205
  return userAgent.split('trident/')[1].split(' ')[0];
@@ -3209,7 +3218,7 @@ var bbn = (() => {
3209
3218
  Object.defineProperty(exports, "__esModule", { value: true });
3210
3219
  exports.getCookie = void 0;
3211
3220
  const getCookie = function (name) {
3212
- let nameEqual = name + "=";
3221
+ let nameEqual = name + '=';
3213
3222
  let ca = document.cookie.split(';');
3214
3223
  for (let i = 0; i < ca.length; i++) {
3215
3224
  let c = ca[i];
@@ -3239,13 +3248,13 @@ var bbn = (() => {
3239
3248
  };
3240
3249
  exports.getCssVar = getCssVar;
3241
3250
  });
3242
- define("fn/getDay", ["require", "exports", "fn/date"], function (require, exports, date_6) {
3251
+ define("fn/getDay", ["require", "exports", "fn/date"], function (require, exports, date_7) {
3243
3252
  "use strict";
3244
3253
  Object.defineProperty(exports, "__esModule", { value: true });
3245
3254
  exports.getDay = void 0;
3246
3255
  const getDay = function (v) {
3247
3256
  const biss = 1972;
3248
- let d = (0, date_6.date)(v);
3257
+ let d = (0, date_7.date)(v);
3249
3258
  if (d) {
3250
3259
  let t = d.getTime(), y = d.getYear(), m = d.getMonth(), days = (y - 1970) * 365;
3251
3260
  if (m < 2) {
@@ -3267,40 +3276,30 @@ var bbn = (() => {
3267
3276
  const getDeviceType = function () {
3268
3277
  const userAgent = navigator.userAgent.toLowerCase();
3269
3278
  if (/iPhone|Android/i.test(navigator.userAgent)) {
3270
- return "mobile";
3279
+ return 'mobile';
3271
3280
  }
3272
3281
  if (/(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/.test(userAgent)) {
3273
- return "tablet";
3282
+ return 'tablet';
3274
3283
  }
3275
- return "desktop";
3284
+ return 'desktop';
3276
3285
  };
3277
3286
  exports.getDeviceType = getDeviceType;
3278
3287
  });
3279
- define("fn/getHTMLOfSelection", ["require", "exports", "fn/log"], function (require, exports, log_14) {
3288
+ define("fn/getHTMLOfSelection", ["require", "exports", "fn/log"], function (require, exports, log_11) {
3280
3289
  "use strict";
3281
3290
  Object.defineProperty(exports, "__esModule", { value: true });
3282
3291
  exports.getHTMLOfSelection = void 0;
3283
3292
  const getHTMLOfSelection = function () {
3284
3293
  let range;
3285
- if (document.selection && document.selection.createRange) {
3286
- (0, log_14.log)("METHOD 1");
3287
- range = document.selection.createRange();
3288
- return range.htmlText;
3289
- }
3290
- else if (window.getSelection) {
3291
- let selection = window.getSelection();
3292
- if (selection.rangeCount > 0) {
3293
- range = selection.getRangeAt(0);
3294
- (0, log_14.log)("RANGE", range);
3295
- let clonedSelection = range.cloneContents();
3296
- (0, log_14.log)("clonedSelection", clonedSelection);
3297
- let div = document.createElement('div');
3298
- div.appendChild(clonedSelection);
3299
- return div.innerHTML;
3300
- }
3301
- else {
3302
- return '';
3303
- }
3294
+ let selection = window.getSelection();
3295
+ if (selection.rangeCount > 0) {
3296
+ range = selection.getRangeAt(0);
3297
+ (0, log_11.log)('RANGE', range);
3298
+ let clonedSelection = range.cloneContents();
3299
+ (0, log_11.log)('clonedSelection', clonedSelection);
3300
+ let div = document.createElement('div');
3301
+ div.appendChild(clonedSelection);
3302
+ return div.innerHTML;
3304
3303
  }
3305
3304
  else {
3306
3305
  return '';
@@ -3308,7 +3307,7 @@ var bbn = (() => {
3308
3307
  };
3309
3308
  exports.getHTMLOfSelection = getHTMLOfSelection;
3310
3309
  });
3311
- define("fn/getEventData", ["require", "exports", "fn/getHTMLOfSelection", "fn/each"], function (require, exports, getHTMLOfSelection_1, each_15) {
3310
+ define("fn/getEventData", ["require", "exports", "fn/getHTMLOfSelection", "fn/each", "fn/defaultErrorFunction"], function (require, exports, getHTMLOfSelection_1, each_15, defaultErrorFunction_1) {
3312
3311
  "use strict";
3313
3312
  Object.defineProperty(exports, "__esModule", { value: true });
3314
3313
  exports.getEventData = void 0;
@@ -3324,18 +3323,20 @@ var bbn = (() => {
3324
3323
  let html = (0, getHTMLOfSelection_1.getHTMLOfSelection)();
3325
3324
  res.str.push({
3326
3325
  type: 'text/plain',
3327
- data: res.raw
3326
+ data: res.raw,
3328
3327
  });
3329
3328
  if (html !== res.raw) {
3330
3329
  res.str.push({
3331
3330
  type: 'text/html',
3332
- data: html
3331
+ data: html,
3333
3332
  });
3334
3333
  }
3335
3334
  else if (res.raw.trim().indexOf('<') === 0) {
3336
3335
  res.str.push({
3337
3336
  type: 'text/html',
3338
- data: "<meta charset='utf-8'><code style=\"white-space: pre; font-family: 'Courier New', sans-serif\">\n" + res.raw + "\n</code>"
3337
+ data: "<meta charset='utf-8'><code style=\"white-space: pre; font-family: 'Courier New', sans-serif\">\n" +
3338
+ res.raw +
3339
+ '\n</code>',
3339
3340
  });
3340
3341
  }
3341
3342
  done = true;
@@ -3365,18 +3366,18 @@ var bbn = (() => {
3365
3366
  data: blob,
3366
3367
  name: name,
3367
3368
  size: size,
3368
- mdate: lastModified
3369
+ mdate: lastModified,
3369
3370
  });
3370
3371
  strings.push(name);
3371
3372
  if (!num) {
3372
3373
  if (!res.raw) {
3373
- res.raw = strings.join(", ");
3374
+ res.raw = strings.join(', ');
3374
3375
  }
3375
3376
  ok(res);
3376
3377
  }
3377
3378
  }
3378
3379
  else {
3379
- appui.error(bbn._("Impossible to read the file") + ' ' + name);
3380
+ (0, defaultErrorFunction_1.defaultErrorFunction)(bbn._('Impossible to read the file') + ' ' + name);
3380
3381
  }
3381
3382
  }
3382
3383
  else {
@@ -3385,14 +3386,14 @@ var bbn = (() => {
3385
3386
  num--;
3386
3387
  res.str.push({
3387
3388
  type: type,
3388
- data: data
3389
+ data: data,
3389
3390
  });
3390
3391
  if (type === 'text/plain') {
3391
3392
  strings.push(name);
3392
3393
  }
3393
3394
  if (!num) {
3394
3395
  if (!res.raw) {
3395
- res.raw = strings.join(", ");
3396
+ res.raw = strings.join(', ');
3396
3397
  }
3397
3398
  ok(res);
3398
3399
  }
@@ -3410,40 +3411,40 @@ var bbn = (() => {
3410
3411
  };
3411
3412
  exports.getEventData = getEventData;
3412
3413
  });
3413
- define("fn/getField", ["require", "exports"], function (require, exports) {
3414
+ define("fn/getField", ["require", "exports", "fn/getRow"], function (require, exports, getRow_2) {
3414
3415
  "use strict";
3415
3416
  Object.defineProperty(exports, "__esModule", { value: true });
3416
3417
  exports.getField = void 0;
3417
- const getField = function (arr, field, prop, val, operator) {
3418
- var r;
3419
- if (field && (r = bbn.fn.getRow(arr, prop, val, operator))) {
3418
+ const getField = function (arr, field, prop = '', val = null, operator = '=') {
3419
+ let r;
3420
+ if (field && (r = (0, getRow_2.getRow)(arr, prop, val, operator))) {
3420
3421
  return r[field];
3421
3422
  }
3422
3423
  return undefined;
3423
3424
  };
3424
3425
  exports.getField = getField;
3425
3426
  });
3426
- define("fn/getFieldValues", ["require", "exports", "fn/checkType", "fn/filter", "fn/each"], function (require, exports, checkType_2, filter_3, each_16) {
3427
+ define("fn/getFieldValues", ["require", "exports", "fn/checkType", "fn/filter", "fn/each"], function (require, exports, checkType_3, filter_3, each_16) {
3427
3428
  "use strict";
3428
3429
  Object.defineProperty(exports, "__esModule", { value: true });
3429
3430
  exports.getFieldValues = void 0;
3430
3431
  const getFieldValues = function (arr, field, prop, val, operator) {
3431
- (0, checkType_2.checkType)(field, 'string');
3432
+ (0, checkType_3.checkType)(field, 'string');
3432
3433
  if (prop) {
3433
- arr = (0, filter_3.filter)(arr, prop, val, operator, false);
3434
+ arr = (0, filter_3.filter)(arr, prop, val, operator);
3434
3435
  }
3435
3436
  let res = [];
3436
- (0, each_16.each)(arr, a => res.indexOf(a[field]) === -1 ? res.push(a[field]) : null);
3437
+ (0, each_16.each)(arr, (a) => (res.indexOf(a[field]) === -1 ? res.push(a[field]) : null));
3437
3438
  return res;
3438
3439
  };
3439
3440
  exports.getFieldValues = getFieldValues;
3440
3441
  });
3441
- define("fn/removeHtmlComments", ["require", "exports", "fn/isString"], function (require, exports, isString_21) {
3442
+ define("fn/removeHtmlComments", ["require", "exports", "fn/isString"], function (require, exports, isString_18) {
3442
3443
  "use strict";
3443
3444
  Object.defineProperty(exports, "__esModule", { value: true });
3444
3445
  exports.removeHtmlComments = void 0;
3445
3446
  const removeHtmlComments = function (str) {
3446
- if (!(0, isString_21.isString)(str)) {
3447
+ if (!(0, isString_18.isString)(str)) {
3447
3448
  return str;
3448
3449
  }
3449
3450
  return str.replace(/<!--[\s\S]*?-->/g, '');
@@ -3470,7 +3471,7 @@ var bbn = (() => {
3470
3471
  const getPath = function (element) {
3471
3472
  let path,
3472
3473
  //node = $(element),
3473
- node = element, done = false;
3474
+ node = element, done = 0;
3474
3475
  while (node.length) {
3475
3476
  //let realNode = node[0],
3476
3477
  let realNode = node, name = realNode.localName;
@@ -3482,15 +3483,15 @@ var bbn = (() => {
3482
3483
  return '#' + realNode.id;
3483
3484
  }
3484
3485
  if (!done) {
3485
- if (realNode.className && (realNode.className !== ' ')) {
3486
- name += ('.' + (0, replaceAll_4.replaceAll)(" ", ".", (0, replaceAll_4.replaceAll)(" ", " ", realNode.className)));
3486
+ if (realNode.className && realNode.className !== ' ') {
3487
+ name += '.' + (0, replaceAll_4.replaceAll)(' ', '.', (0, replaceAll_4.replaceAll)(' ', ' ', realNode.className));
3487
3488
  }
3488
3489
  done = 1;
3489
3490
  }
3490
3491
  //var parent = node.parent(),
3491
3492
  let parent = node.parentNode,
3492
3493
  //sameTagSiblings = parent.children(name);
3493
- sameTagSiblings = parent.children.filter(val => {
3494
+ sameTagSiblings = parent.children.filter((val) => {
3494
3495
  return val.tagName === name;
3495
3496
  });
3496
3497
  if (sameTagSiblings.length > 1) {
@@ -3509,13 +3510,13 @@ var bbn = (() => {
3509
3510
  };
3510
3511
  exports.getPath = getPath;
3511
3512
  });
3512
- define("fn/getProp", ["require", "exports"], function (require, exports) {
3513
+ define("fn/getProp", ["require", "exports", "fn/checkType"], function (require, exports, checkType_4) {
3513
3514
  "use strict";
3514
3515
  Object.defineProperty(exports, "__esModule", { value: true });
3515
3516
  exports.getProp = void 0;
3516
3517
  const getProp = function (obj, prop) {
3517
- checkType(obj, "object", bbn._("The obj must be an object in setProp"));
3518
- checkType(prop, "string", bbn._("The prop must be a string in setProp"));
3518
+ (0, checkType_4.checkType)(obj, 'object', bbn._('The obj must be an object in setProp'));
3519
+ (0, checkType_4.checkType)(prop, 'string', bbn._('The prop must be a string in setProp'));
3519
3520
  return obj[prop];
3520
3521
  };
3521
3522
  exports.getProp = getProp;
@@ -3526,17 +3527,19 @@ var bbn = (() => {
3526
3527
  exports.getScrollBarSize = void 0;
3527
3528
  const getScrollBarSize = function () {
3528
3529
  if (bbn.env.scrollBarSize === undefined) {
3529
- let outer = document.createElement("div");
3530
- outer.style.visibility = "hidden";
3531
- outer.style.width = "100px";
3532
- outer.style.msOverflowStyle = "scrollbar"; // needed for WinJS apps
3530
+ let outer = document.createElement('div');
3531
+ outer.style.visibility = 'hidden';
3532
+ outer.style.width = '100px';
3533
+ if ('msOverflowStyle' in outer.style) {
3534
+ outer.style.msOverflowStyle = 'scrollbar'; // needed for WinJS apps
3535
+ }
3533
3536
  document.body.appendChild(outer);
3534
3537
  let widthNoScroll = outer.offsetWidth;
3535
3538
  // force scrollbars
3536
- outer.style.overflow = "scroll";
3539
+ outer.style.overflow = 'scroll';
3537
3540
  // add innerdiv
3538
- let inner = document.createElement("div");
3539
- inner.style.width = "100%";
3541
+ let inner = document.createElement('div');
3542
+ inner.style.width = '100%';
3540
3543
  outer.appendChild(inner);
3541
3544
  let widthWithScroll = inner.offsetWidth;
3542
3545
  // remove divs
@@ -3563,22 +3566,22 @@ var bbn = (() => {
3563
3566
  exports.getTimeoff = void 0;
3564
3567
  const getTimeoff = function () {
3565
3568
  if (!bbn.env.isFocused) {
3566
- return Math.round((new Date()).getTime() / 1000 - bbn.env.timeoff);
3569
+ return Math.round(new Date().getTime() / 1000 - bbn.env.timeoff);
3567
3570
  }
3568
3571
  return 0;
3569
3572
  };
3570
3573
  exports.getTimeoff = getTimeoff;
3571
3574
  });
3572
- define("fn/happy", ["require", "exports", "fn/log"], function (require, exports, log_15) {
3575
+ define("fn/happy", ["require", "exports", "fn/log"], function (require, exports, log_12) {
3573
3576
  "use strict";
3574
3577
  Object.defineProperty(exports, "__esModule", { value: true });
3575
3578
  exports.happy = void 0;
3576
3579
  const happy = function (...args) {
3577
3580
  args.unshift({
3578
3581
  _bbn_console_level: 3,
3579
- _bbn_console_style: "color: white; background: green; font-size: 18px;"
3582
+ _bbn_console_style: 'color: white; background: green; font-size: 18px;',
3580
3583
  });
3581
- log_15.log.apply(this, args);
3584
+ log_12.log.apply(this, args);
3582
3585
  return this;
3583
3586
  };
3584
3587
  exports.happy = happy;
@@ -3589,11 +3592,13 @@ var bbn = (() => {
3589
3592
  exports.hex2rgb = void 0;
3590
3593
  const hex2rgb = function (hex) {
3591
3594
  var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
3592
- return result ? {
3593
- r: parseInt(result[1], 16),
3594
- g: parseInt(result[2], 16),
3595
- b: parseInt(result[3], 16)
3596
- } : null;
3595
+ return result
3596
+ ? {
3597
+ r: parseInt(result[1], 16),
3598
+ g: parseInt(result[2], 16),
3599
+ b: parseInt(result[3], 16),
3600
+ }
3601
+ : null;
3597
3602
  };
3598
3603
  exports.hex2rgb = hex2rgb;
3599
3604
  });
@@ -3623,25 +3628,26 @@ var bbn = (() => {
3623
3628
  Object.defineProperty(exports, "__esModule", { value: true });
3624
3629
  exports.imageToCanvas = void 0;
3625
3630
  const imageToCanvas = function (img) {
3626
- let canvas = document.createElement("canvas");
3631
+ let canvas = document.createElement('canvas');
3627
3632
  canvas.width = img.width;
3628
3633
  canvas.height = img.height;
3629
- canvas.getContext("2d").drawImage(img, 0, 0);
3634
+ canvas.getContext('2d').drawImage(img, 0, 0);
3630
3635
  return canvas;
3631
3636
  };
3632
3637
  exports.imageToCanvas = imageToCanvas;
3633
3638
  });
3634
- define("fn/imgToBase64", ["require", "exports", "fn/imageToCanvas", "fn/canvasToImage"], function (require, exports, imageToCanvas_1, canvasToImage_1) {
3639
+ define("fn/imgToBase64", ["require", "exports", "fn/imageToCanvas"], function (require, exports, imageToCanvas_1) {
3635
3640
  "use strict";
3636
3641
  Object.defineProperty(exports, "__esModule", { value: true });
3637
3642
  exports.imgToBase64 = void 0;
3638
- const imgToBase64 = function (img) {
3643
+ const imgToBase64 = function (img, type = 'image/png') {
3639
3644
  let canvas = (0, imageToCanvas_1.imageToCanvas)(img);
3640
- return (0, canvasToImage_1.canvasToImage)(canvas);
3645
+ //return canvasToImage(canvas);
3646
+ return canvas.toDataURL(type);
3641
3647
  };
3642
3648
  exports.imgToBase64 = imgToBase64;
3643
3649
  });
3644
- define("fn/info", ["require", "exports", "fn/log"], function (require, exports, log_16) {
3650
+ define("fn/info", ["require", "exports", "fn/log"], function (require, exports, log_13) {
3645
3651
  "use strict";
3646
3652
  Object.defineProperty(exports, "__esModule", { value: true });
3647
3653
  exports.info = void 0;
@@ -3649,27 +3655,29 @@ var bbn = (() => {
3649
3655
  args.unshift({
3650
3656
  //_bbn_console_mode: "info",
3651
3657
  _bbn_console_level: 4,
3652
- _bbn_console_style: "color: #EEE; background: blue; font-size: 12px;"
3658
+ _bbn_console_style: 'color: #EEE; background: blue; font-size: 12px;',
3653
3659
  });
3654
- log_16.log.apply(this, args);
3660
+ log_13.log.apply(this, args);
3655
3661
  return this;
3656
3662
  };
3657
3663
  exports.info = info;
3658
3664
  });
3659
- define("fn/treatAjaxArguments", ["require", "exports", "fn/isObject", "fn/isFunction", "fn/substr", "fn/numProperties"], function (require, exports, isObject_16, isFunction_10, substr_9, numProperties_7) {
3665
+ define("fn/treatAjaxArguments", ["require", "exports", "fn/isObject", "fn/isFunction", "fn/substr", "fn/numProperties"], function (require, exports, isObject_14, isFunction_9, substr_9, numProperties_6) {
3660
3666
  "use strict";
3661
3667
  Object.defineProperty(exports, "__esModule", { value: true });
3662
3668
  exports.treatAjaxArguments = void 0;
3663
3669
  const treatAjaxArguments = function (args) {
3664
- let cfg = {}, t, i;
3665
- if ((0, isObject_16.isObject)(args[0]) && (args.length === 1)) {
3670
+ let cfg = {};
3671
+ let t;
3672
+ let i;
3673
+ if ((0, isObject_14.isObject)(args[0]) && args.length === 1) {
3666
3674
  return args[0];
3667
3675
  }
3668
3676
  for (i = 0; i < args.length; i++) {
3669
- t = typeof (args[i]);
3677
+ t = typeof args[i];
3670
3678
  t = t.toLowerCase();
3671
3679
  /* Callbacks */
3672
- if ((0, isFunction_10.isFunction)(args[i])) {
3680
+ if ((0, isFunction_9.isFunction)(args[i])) {
3673
3681
  if (cfg.errorFn && !cfg.abortFn) {
3674
3682
  cfg.abortFn = args[i];
3675
3683
  }
@@ -3680,8 +3688,8 @@ var bbn = (() => {
3680
3688
  cfg.successFn = args[i];
3681
3689
  }
3682
3690
  }
3683
- /* Force */
3684
- else if ((args[i] === 1) || (args[i] === true)) {
3691
+ else if (args[i] === 1 || args[i] === true) {
3692
+ /* Force */
3685
3693
  cfg.force = true;
3686
3694
  }
3687
3695
  else if (t === 'string') {
@@ -3690,42 +3698,42 @@ var bbn = (() => {
3690
3698
  if (args[i].indexOf('#') === 0 || args[i].indexOf(bbn.env.root + '#') === 0) {
3691
3699
  cfg.url = (0, substr_9.substr)(args[i], bbn.env.root.length);
3692
3700
  }
3693
- /* Link */
3694
3701
  else {
3702
+ /* Link */
3695
3703
  cfg.url = args[i];
3696
3704
  if (cfg.url.indexOf(bbn.env.root) === 0) {
3697
3705
  cfg.url = (0, substr_9.substr)(cfg.url, bbn.env.root.length);
3698
3706
  }
3699
3707
  }
3700
3708
  }
3701
- /* Ajax datatype */
3702
3709
  else {
3710
+ /* Ajax datatype */
3703
3711
  cfg.datatype = args[i];
3704
3712
  }
3705
3713
  }
3706
- /* Event */
3707
- else if (args[i] && (t === 'object')) {
3714
+ else if (args[i] && t === 'object') {
3715
+ /* Event */
3708
3716
  if (args[i] instanceof Event) {
3709
3717
  cfg.e = args[i];
3710
3718
  }
3711
- /* HTML Element */
3712
- else if (!cfg.ele && (args[i].nodeType === 1)) {
3719
+ else if (!cfg.ele && args[i].nodeType === 1) {
3720
+ /* HTML Element */
3713
3721
  cfg.ele = args[i];
3714
3722
  }
3715
- /* An object to post */
3716
3723
  else if (t.toLowerCase() === 'object') {
3724
+ /* An object to post */
3717
3725
  cfg.obj = args[i];
3718
3726
  }
3719
3727
  }
3720
3728
  }
3721
- if (!cfg.url && (0, numProperties_7.numProperties)(cfg)) {
3729
+ if (!cfg.url && (0, numProperties_6.numProperties)(cfg)) {
3722
3730
  cfg.url = bbn.env.path;
3723
3731
  }
3724
3732
  if (cfg.obj === undefined) {
3725
- cfg.obj = { _bbn: "public" };
3733
+ cfg.obj = { _bbn: 'public' };
3726
3734
  }
3727
3735
  if (!cfg.datatype) {
3728
- cfg.datatype = "json";
3736
+ cfg.datatype = 'json';
3729
3737
  }
3730
3738
  return cfg;
3731
3739
  };
@@ -3743,7 +3751,7 @@ var bbn = (() => {
3743
3751
  // Path does not
3744
3752
  bbn.env.path = (0, substr_10.substr)(bbn.env.url, bbn.env.root.length);
3745
3753
  // Params will include each part of the URL
3746
- bbn.env.params = (0, filter_4.filter)(bbn.env.path.split("/"), (v) => {
3754
+ bbn.env.params = (0, filter_4.filter)(bbn.env.path.split('/'), (v) => {
3747
3755
  return v !== '';
3748
3756
  });
3749
3757
  // Managing history
@@ -3755,17 +3763,18 @@ var bbn = (() => {
3755
3763
  let obj = {
3756
3764
  url: bbn.env.path,
3757
3765
  old_path: bbn.env.old_path || null,
3758
- data: data || {}
3766
+ data: data || {},
3767
+ reload: false
3759
3768
  };
3760
3769
  // If same URL we replace
3761
- if (state && (state.url === bbn.env.path)) {
3770
+ if (state && state.url === bbn.env.path) {
3762
3771
  if (state.data) {
3763
3772
  (0, extend_5.extend)(obj.data, state.data);
3764
3773
  }
3765
3774
  if (state.title && !title) {
3766
3775
  title = state.title;
3767
3776
  }
3768
- repl = 1;
3777
+ repl = true;
3769
3778
  }
3770
3779
  // If no title the global title
3771
3780
  if (!title) {
@@ -3777,7 +3786,7 @@ var bbn = (() => {
3777
3786
  }
3778
3787
  // Replacing state
3779
3788
  if (repl) {
3780
- obj.reload = 1;
3789
+ obj.reload = true;
3781
3790
  h.replaceState(obj, title, bbn.env.url);
3782
3791
  }
3783
3792
  // Adding state
@@ -3788,15 +3797,13 @@ var bbn = (() => {
3788
3797
  };
3789
3798
  exports.setNavigationVars = setNavigationVars;
3790
3799
  });
3791
- define("fn/link", ["require", "exports", "fn/treatAjaxArguments", "fn/getLoader", "fn/defaultPreLinkFunction", "fn/extend", "fn/ajax", "fn/log", "fn/isObject", "fn/callback", "fn/setNavigationVars"], function (require, exports, treatAjaxArguments_1, getLoader_3, defaultPreLinkFunction_1, extend_6, ajax_2, log_17, isObject_17, callback_1, setNavigationVars_1) {
3800
+ define("fn/link", ["require", "exports", "fn/treatAjaxArguments", "fn/getLoader", "fn/defaultPreLinkFunction", "fn/ajax", "fn/log", "fn/isObject", "fn/callback", "fn/setNavigationVars"], function (require, exports, treatAjaxArguments_1, getLoader_3, defaultPreLinkFunction_1, ajax_2, log_14, isObject_15, callback_1, setNavigationVars_1) {
3792
3801
  "use strict";
3793
3802
  Object.defineProperty(exports, "__esModule", { value: true });
3794
3803
  exports.link = void 0;
3795
- const link = function () {
3796
- let cfg = (0, treatAjaxArguments_1.treatAjaxArguments)(arguments), ok = 1;
3797
- if (cfg === true) {
3798
- return true;
3799
- }
3804
+ const link = function (...args) {
3805
+ let cfg = (0, treatAjaxArguments_1.treatAjaxArguments)(args);
3806
+ let ok = true;
3800
3807
  /* If we can't find a correct link we load the current URL */
3801
3808
  if (!cfg) {
3802
3809
  return link(window.location.href);
@@ -3820,8 +3827,8 @@ var bbn = (() => {
3820
3827
  */
3821
3828
  return true;
3822
3829
  }
3823
- /* Mail link */
3824
3830
  else if (cfg.url.indexOf('mailto:') === 0) {
3831
+ /* Mail link */
3825
3832
  bbn.env.ignoreUnload = true;
3826
3833
  window.location.href = cfg.url;
3827
3834
  setTimeout(() => {
@@ -3833,52 +3840,53 @@ var bbn = (() => {
3833
3840
  return false;
3834
3841
  }
3835
3842
  /* Opens an external page in a new window */
3836
- if (((cfg.url.indexOf("http://") === 0) || (cfg.url.indexOf("https://") === 0)) &&
3837
- (cfg.url.indexOf(bbn.env.host) !== 0)) {
3843
+ if ((cfg.url.indexOf('http://') === 0 || cfg.url.indexOf('https://') === 0) &&
3844
+ cfg.url.indexOf(bbn.env.host) !== 0) {
3838
3845
  if (cfg.e) {
3839
3846
  cfg.e.preventDefault();
3840
3847
  }
3841
3848
  window.open(cfg.url);
3842
3849
  return false;
3843
3850
  }
3844
- /* The URL is fine so go ahead if something is not already loading */
3845
- else if ((cfg.url !== bbn.env.params.join("/")) || (cfg.force === 1)) {
3851
+ else if (cfg.url !== bbn.env.params.join('/') || cfg.force) {
3852
+ /* The URL is fine so go ahead if something is not already loading */
3846
3853
  /* If a second callback is defined, it is triggered instead of defaultPreLinkFunction */
3847
3854
  if (cfg.successFn) {
3848
3855
  ok = cfg.successFn(cfg.url);
3849
3856
  }
3850
3857
  else if (defaultPreLinkFunction_1.defaultPreLinkFunction) {
3851
3858
  ok = (0, defaultPreLinkFunction_1.defaultPreLinkFunction)(cfg.url, cfg.force, cfg.ele);
3859
+ /*
3852
3860
  if (ok.data !== undefined) {
3853
- (0, extend_6.extend)(cfg.obj, ok.data);
3861
+ extend(cfg.obj, ok.data);
3854
3862
  ok = 1;
3855
3863
  }
3864
+ */
3856
3865
  }
3857
3866
  if (ok) {
3858
- if (ok !== 1 && (typeof ok === 'string')) {
3867
+ if (ok !== 1 && typeof ok === 'string') {
3859
3868
  cfg.url = ok;
3860
3869
  }
3861
3870
  /** todo Do we keep obj in the unique string or do we make that only one concurrent connection to the same address can occur at the same time? */
3862
- let errSt = bbn._("The Ajax call to") + ' ' + cfg.url + ' ';
3871
+ let errSt = bbn._('The Ajax call to') + ' ' + cfg.url + ' ';
3863
3872
  return (0, ajax_2.ajax)(cfg.url, cfg.datatype, cfg.obj, function (res) {
3864
3873
  if (!res) {
3865
- (0, log_17.log)(errSt + bbn._("returned no answer"));
3874
+ (0, log_14.log)(errSt + bbn._('returned no answer'));
3866
3875
  }
3867
- if ((0, isObject_17.isObject)(res)) {
3876
+ if ((0, isObject_15.isObject)(res)) {
3868
3877
  // If there's nothing in the result, just an empty object, the callback stops here and the URL is not changed
3869
- if ((Object.keys(res).length === 0)) {
3870
- (0, log_17.log)(errSt + bbn._("returned an empty object"));
3878
+ if (Object.keys(res).length === 0) {
3879
+ (0, log_14.log)(errSt + bbn._('returned an empty object'));
3871
3880
  }
3872
3881
  if (res.new_url) {
3873
3882
  res.old_path = cfg.url;
3874
3883
  cfg.url = res.new_url;
3875
3884
  }
3876
- else if (res.url && (cfg.url !== res.url)) {
3885
+ else if (res.url && cfg.url !== res.url) {
3877
3886
  res.old_path = cfg.url;
3878
3887
  }
3879
3888
  }
3880
- if ((0, callback_1.callback)(cfg.url, res, cfg.successFn, null, cfg.ele) &&
3881
- res.noNav === undefined) {
3889
+ if ((0, callback_1.callback)(cfg.url, res, cfg.successFn, null, cfg.ele) && res.noNav === undefined) {
3882
3890
  // This solution is not very clean (we can't shorten a URL)
3883
3891
  if (bbn.env.path.indexOf(cfg.url) !== 0) {
3884
3892
  (0, setNavigationVars_1.setNavigationVars)(cfg.url, (res.title ? res.title + ' - ' : '') + bbn.env.siteTitle);
@@ -3895,27 +3903,30 @@ var bbn = (() => {
3895
3903
  "use strict";
3896
3904
  Object.defineProperty(exports, "__esModule", { value: true });
3897
3905
  exports.post = void 0;
3898
- const post = function () {
3899
- let cfg = (0, treatAjaxArguments_2.treatAjaxArguments)(arguments);
3906
+ const post = function (...args) {
3907
+ let cfg = (0, treatAjaxArguments_2.treatAjaxArguments)(args);
3900
3908
  if (cfg.url) {
3901
3909
  return (0, ajax_3.ajax)(cfg.url, cfg.datatype, cfg.obj, (res) => {
3902
- (0, callback_2.callback)(cfg.url, res, cfg.successFn, false, cfg.ele);
3910
+ (0, callback_2.callback)(cfg.url, res, cfg.successFn, null, cfg.ele);
3903
3911
  }, cfg.errorFn, cfg.abortFn);
3904
3912
  }
3905
3913
  };
3906
3914
  exports.post = post;
3907
3915
  });
3908
- define("fn/submit", ["require", "exports", "fn/formdata", "fn/isFunction", "fn/isString", "fn/post"], function (require, exports, formdata_1, isFunction_11, isString_22, post_1) {
3916
+ define("fn/submit", ["require", "exports", "fn/formdata", "fn/post"], function (require, exports, formdata_1, post_1) {
3909
3917
  "use strict";
3910
3918
  Object.defineProperty(exports, "__esModule", { value: true });
3911
3919
  exports.submit = void 0;
3912
3920
  const submit = function (form, e, fn) {
3913
- let url = form.getAttribute("action") || bbn.env.path, data;
3921
+ let url = form.getAttribute('action') || bbn.env.path;
3922
+ let data;
3914
3923
  if (url === '') {
3915
3924
  url = '.';
3916
3925
  }
3917
3926
  //if ( (typeof(url) === 'string') && (url.indexOf("http") !== 0 || url.indexOf(window.document.location.hostname) !== -1) && !form.is("[target]") ){
3918
- if ((typeof (url) === 'string') && (url.indexOf("http") !== 0 || url.indexOf(window.document.location.hostname) !== -1) && !form.getAttribute("target")) {
3927
+ if (typeof url === 'string' &&
3928
+ (url.indexOf('http') !== 0 || url.indexOf(window.document.location.hostname) !== -1) &&
3929
+ !form.getAttribute('target')) {
3919
3930
  if (e) {
3920
3931
  e.preventDefault();
3921
3932
  }
@@ -3924,26 +3935,10 @@ var bbn = (() => {
3924
3935
  //$form.attr("action", null);
3925
3936
  form.setAttribute('action', null);
3926
3937
  //$form.data("bbnSubmit", 1);
3927
- form.dataset.bbnSubmit = 1;
3928
- //var script = $form.data("script");
3929
- let script = form.dataset.script;
3930
- if ((0, isFunction_11.isFunction)(script)) {
3931
- /*$form.data("script", function(d){
3932
- $form.attr("action", url);
3933
- script(d);
3934
- })*/
3935
- form.dataset.script = d => {
3936
- form.setAttribute("action", url);
3937
- script(d);
3938
- };
3939
- }
3940
3938
  if (!fn) {
3941
- fn = form.getAttribute("data-script");
3939
+ fn = form.getAttribute('data-script') ? eval(form.getAttribute('data-script')) : null;
3942
3940
  }
3943
3941
  if (fn) {
3944
- if ((0, isString_22.isString)(fn)) {
3945
- fn = eval(fn);
3946
- }
3947
3942
  (0, post_1.post)(url, data, fn);
3948
3943
  }
3949
3944
  else {
@@ -3963,20 +3958,22 @@ var bbn = (() => {
3963
3958
  let diffH = bbn.env.height !== window.innerHeight;
3964
3959
  if (diffW || diffH) {
3965
3960
  if (diffW) {
3966
- bbn.env.width = window.innerWidth || window.document.documentElement.clientWidth || window.document.body.clientWidth;
3967
- document.documentElement.style.setProperty('--vw', (bbn.env.width * 0.01) + 'px');
3961
+ bbn.env.width =
3962
+ window.innerWidth || window.document.documentElement.clientWidth || window.document.body.clientWidth;
3963
+ document.documentElement.style.setProperty('--vw', bbn.env.width * 0.01 + 'px');
3968
3964
  }
3969
3965
  if (diffH) {
3970
- bbn.env.height = window.innerHeight || window.document.documentElement.clientHeight || window.document.body.clientHeight;
3971
- document.documentElement.style.setProperty('--vh', (bbn.env.height * 0.01) + 'px');
3966
+ bbn.env.height =
3967
+ window.innerHeight || window.document.documentElement.clientHeight || window.document.body.clientHeight;
3968
+ document.documentElement.style.setProperty('--vh', bbn.env.height * 0.01 + 'px');
3972
3969
  }
3973
- let smallWidth = (0, getCssVar_1.getCssVar)('mobile-limit') || 650;
3974
- let newCls = 'bbn-screen-' + (bbn.env.width < parseInt(smallWidth) ? 'small' : 'regular');
3970
+ let smallWidth = parseInt((0, getCssVar_1.getCssVar)('mobile-limit')) || 650;
3971
+ let newCls = 'bbn-screen-' + (bbn.env.width < smallWidth ? 'small' : 'regular');
3975
3972
  let classes = (document.body.className || '').split(' ');
3976
3973
  let done = false;
3977
3974
  (0, each_17.each)(classes, (cls, idx) => {
3978
3975
  let bits = cls.split('-');
3979
- if ((bits.length === 3) && (cls.indexOf('bbn-screen-') === 0)) {
3976
+ if (bits.length === 3 && cls.indexOf('bbn-screen-') === 0) {
3980
3977
  done = true;
3981
3978
  if (cls !== newCls) {
3982
3979
  classes.splice(idx, 1, newCls);
@@ -4020,7 +4017,7 @@ var bbn = (() => {
4020
4017
  };
4021
4018
  exports.isMobile = isMobile;
4022
4019
  });
4023
- define("fn/init", ["require", "exports", "fn/substr", "fn/each", "fn/extend", "fn/addColors", "fn/link", "fn/submit", "fn/resize", "fn/isMobile", "fn/isTabletDevice", "fn/defaultHistoryFunction", "fn/isFunction", "fn/log"], function (require, exports, substr_11, each_18, extend_7, addColors_1, link_1, submit_1, resize_1, isMobile_1, isTabletDevice_2, defaultHistoryFunction_1, isFunction_12, log_18) {
4020
+ define("fn/init", ["require", "exports", "fn/substr", "fn/each", "fn/extend", "fn/addColors", "fn/link", "fn/submit", "fn/resize", "fn/isMobile", "fn/isTabletDevice", "fn/defaultHistoryFunction", "fn/isFunction", "fn/log"], function (require, exports, substr_11, each_18, extend_6, addColors_1, link_1, submit_1, resize_1, isMobile_1, isTabletDevice_2, defaultHistoryFunction_1, isFunction_10, log_15) {
4024
4021
  "use strict";
4025
4022
  Object.defineProperty(exports, "__esModule", { value: true });
4026
4023
  exports.init = void 0;
@@ -4028,10 +4025,10 @@ var bbn = (() => {
4028
4025
  let parts;
4029
4026
  if (!bbn.env.isInit || force) {
4030
4027
  bbn.env.root = document.baseURI.length > 0 ? document.baseURI : bbn.env.host;
4031
- if (bbn.env.root.length && ((0, substr_11.substr)(bbn.env.root, -1) !== '/')) {
4028
+ if (bbn.env.root.length && (0, substr_11.substr)(bbn.env.root, -1) !== '/') {
4032
4029
  bbn.env.root += '/';
4033
4030
  }
4034
- if (!bbn.env.isInit && (typeof dayjs !== 'undefined')) {
4031
+ if (!bbn.env.isInit && typeof dayjs !== 'undefined') {
4035
4032
  (0, each_18.each)([
4036
4033
  'advancedFormat',
4037
4034
  'arraySupport',
@@ -4065,30 +4062,30 @@ var bbn = (() => {
4065
4062
  'utc',
4066
4063
  'weekOfYear',
4067
4064
  'weekYear',
4068
- 'weekday'
4069
- ], plugin => {
4065
+ 'weekday',
4066
+ ], (plugin) => {
4070
4067
  if (window['dayjs_plugin_' + plugin]) {
4071
4068
  dayjs.extend(window['dayjs_plugin_' + plugin]);
4072
4069
  }
4073
4070
  });
4074
4071
  }
4075
4072
  /* The server's path (difference between the host and the current dir */
4076
- if (typeof (cfg) === 'object') {
4077
- (0, extend_7.extend)(true, window.bbn, cfg);
4073
+ if (typeof cfg === 'object') {
4074
+ (0, extend_6.extend)(true, bbn, cfg);
4078
4075
  }
4079
4076
  bbn.env.path = (0, substr_11.substr)(bbn.env.url, bbn.env.root.length);
4080
- parts = bbn.env.path.split("/");
4077
+ parts = bbn.env.path.split('/');
4081
4078
  //$.each(parts, function(i, v){
4082
4079
  (0, each_18.each)(parts, (v, i) => {
4083
4080
  v = decodeURI(v.trim());
4084
- if (v !== "") {
4081
+ if (v !== '') {
4085
4082
  bbn.env.params.push(v);
4086
4083
  }
4087
4084
  });
4088
- if (bbn.var.colors) {
4089
- (0, addColors_1.addColors)(bbn.var.colors);
4085
+ if (bbn.vars.colors) {
4086
+ (0, addColors_1.addColors)(bbn.vars.colors);
4090
4087
  }
4091
- if (bbn.env.lang && (undefined !== dayjs)) {
4088
+ if (bbn.env.lang && undefined !== dayjs) {
4092
4089
  dayjs.locale(bbn.env.lang);
4093
4090
  }
4094
4091
  window.onfocus = () => {
@@ -4096,54 +4093,54 @@ var bbn = (() => {
4096
4093
  };
4097
4094
  window.onblur = () => {
4098
4095
  bbn.env.isFocused = false;
4099
- bbn.env.timeoff = Math.round((new Date()).getTime() / 1000);
4096
+ bbn.env.timeoff = Math.round(new Date().getTime() / 1000);
4100
4097
  };
4101
- document.addEventListener("focusin", e => {
4102
- if (!e.target.classList.contains('bbn-no')) {
4098
+ document.addEventListener('focusin', (e) => {
4099
+ if (e.target instanceof HTMLElement && !e.target.classList.contains('bbn-no')) {
4103
4100
  bbn.env.focused = e.target;
4104
4101
  }
4105
- bbn.env.last_focus = (new Date()).getTime();
4102
+ bbn.env.last_focus = new Date().getTime();
4106
4103
  });
4107
4104
  document.addEventListener('click', (e) => {
4108
- bbn.env.last_focus = (new Date()).getTime();
4105
+ bbn.env.last_focus = new Date().getTime();
4109
4106
  if (bbn.env.nav !== 'ajax') {
4110
4107
  return;
4111
4108
  }
4112
4109
  let target = e.target;
4113
- if (target.tagName !== 'A') {
4110
+ if (target instanceof HTMLElement && (target.tagName !== 'A')) {
4114
4111
  let p = target;
4115
- while (p && (p.tagName !== 'A')) {
4112
+ while (p && p.tagName !== 'A') {
4116
4113
  if (p.tagName === 'BODY') {
4117
4114
  break;
4118
4115
  }
4119
- p = p.parentNode;
4116
+ p = p.parentElement;
4120
4117
  }
4121
- if (p && (p.tagName === 'A')) {
4118
+ if (p && p.tagName === 'A') {
4122
4119
  target = p;
4123
4120
  }
4124
4121
  else {
4125
- target = false;
4122
+ target = null;
4126
4123
  }
4127
4124
  }
4128
- if (target && target.href && !target.target && !target.classList.contains('bbn-no')) {
4125
+ if (target instanceof HTMLElement && target.hasAttribute('href') && !target.hasAttribute('target') && !target.classList.contains('bbn-no')) {
4129
4126
  e.preventDefault();
4130
4127
  e.stopPropagation();
4131
- (0, link_1.link)(target.href);
4128
+ (0, link_1.link)(target.getAttribute('href'));
4132
4129
  return false;
4133
4130
  }
4134
4131
  });
4135
- (0, each_18.each)(document.querySelectorAll("form:not(.bbn-no), form:not(.bbn-form)"), (ele, i) => {
4136
- ele.addEventListener("submit", e => {
4132
+ (0, each_18.each)(document.querySelectorAll('form:not(.bbn-no), form:not(.bbn-form)'), (ele) => {
4133
+ ele.addEventListener('submit', (e) => {
4137
4134
  (0, submit_1.submit)(ele, e);
4138
4135
  });
4139
4136
  });
4140
4137
  window.addEventListener('hashchange', () => {
4141
- bbn.env.hashChanged = (new Date()).getTime();
4138
+ bbn.env.hashChanged = new Date().getTime();
4142
4139
  }, false);
4143
- window.addEventListener("resize", () => {
4140
+ window.addEventListener('resize', () => {
4144
4141
  (0, resize_1.resize)();
4145
4142
  });
4146
- window.addEventListener("orientationchange", () => {
4143
+ window.addEventListener('orientationchange', () => {
4147
4144
  (0, resize_1.resize)();
4148
4145
  });
4149
4146
  (0, resize_1.resize)();
@@ -4162,9 +4159,9 @@ var bbn = (() => {
4162
4159
  if (state) {
4163
4160
  if ((0, defaultHistoryFunction_1.defaultHistoryFunction)(state)) {
4164
4161
  //link(substr(state.url, bbn.env.root.length), $.extend({title: state.title}, state.data));
4165
- (0, link_1.link)(state.url, (0, extend_7.extend)({ title: state.title || bbn.env.siteTitle }, state.data || {}));
4162
+ (0, link_1.link)(state.url, (0, extend_6.extend)({ title: state.title || bbn.env.siteTitle }, state.data || {}));
4166
4163
  }
4167
- else if (state && state.data && (0, isFunction_12.isFunction)(state.data.script)) {
4164
+ else if (state && state.data && (0, isFunction_10.isFunction)(state.data.script)) {
4168
4165
  state.data.script();
4169
4166
  }
4170
4167
  }
@@ -4174,7 +4171,7 @@ var bbn = (() => {
4174
4171
  bbn.env.isInit = true;
4175
4172
  document.dispatchEvent(new Event('bbninit'));
4176
4173
  if (bbn.env.logging) {
4177
- (0, log_18.log)("Logging in bbn is enabled");
4174
+ (0, log_15.log)('Logging in bbn is enabled');
4178
4175
  }
4179
4176
  }
4180
4177
  };
@@ -4188,8 +4185,8 @@ var bbn = (() => {
4188
4185
  if (!bbn.env.last_focus) {
4189
4186
  return false;
4190
4187
  }
4191
- let t = (new Date()).getTime();
4192
- return (t - bbn.env.last_focus) < (secs * 1000);
4188
+ let t = new Date().getTime();
4189
+ return t - bbn.env.last_focus < secs * 1000;
4193
4190
  };
4194
4191
  exports.isActiveInterface = isActiveInterface;
4195
4192
  });
@@ -4209,16 +4206,23 @@ var bbn = (() => {
4209
4206
  };
4210
4207
  exports.isBoolean = isBoolean;
4211
4208
  });
4212
- define("fn/isColor", ["require", "exports", "fn/isString"], function (require, exports, isString_23) {
4209
+ define("fn/isColor", ["require", "exports", "fn/isString"], function (require, exports, isString_19) {
4213
4210
  "use strict";
4214
4211
  Object.defineProperty(exports, "__esModule", { value: true });
4215
4212
  exports.isColor = void 0;
4216
- const isColor = function (st) {
4217
- if (!(0, isString_23.isString)(st)) {
4213
+ const isColor = function (...args) {
4214
+ if (!args.length)
4218
4215
  return false;
4216
+ var reg = new RegExp('^(#[a-f0-9]{6}|#[a-f0-9]{3}|rgb *( *[0-9]{1,3}%? *, *[0-9]{1,3}%? *, *[0-9]{1,3}%? *)|rgba *( *[0-9]{1,3}%? *, *[0-9]{1,3}%? *, *[0-9]{1,3}%? *, *[0-9]{1,3}%? *)|black|green|silver|gray|olive|white|yellow|maroon|navy|red|blue|purple|teal|fuchsia|aqua)$', 'i');
4217
+ for (let st of args) {
4218
+ if (!(0, isString_19.isString)(st)) {
4219
+ return false;
4220
+ }
4221
+ if (!reg.test(st)) {
4222
+ return false;
4223
+ }
4219
4224
  }
4220
- var reg = new RegExp('^(#[a-f0-9]{6}|#[a-f0-9]{3}|rgb *\( *[0-9]{1,3}%? *, *[0-9]{1,3}%? *, *[0-9]{1,3}%? *\)|rgba *\( *[0-9]{1,3}%? *, *[0-9]{1,3}%? *, *[0-9]{1,3}%? *, *[0-9]{1,3}%? *\)|black|green|silver|gray|olive|white|yellow|maroon|navy|red|blue|purple|teal|fuchsia|aqua)$', 'i');
4221
- return reg.test(st);
4225
+ return true;
4222
4226
  };
4223
4227
  exports.isColor = isColor;
4224
4228
  });
@@ -4247,14 +4251,12 @@ var bbn = (() => {
4247
4251
  };
4248
4252
  exports.isDesktopDevice = isDesktopDevice;
4249
4253
  });
4250
- define("fn/isValidDimension", ["require", "exports", "fn/substr"], function (require, exports, substr_12) {
4254
+ define("fn/isValidDimension", ["require", "exports", "fn/isNumber", "fn/substr"], function (require, exports, isNumber_7, substr_12) {
4251
4255
  "use strict";
4252
4256
  Object.defineProperty(exports, "__esModule", { value: true });
4253
4257
  exports.isValidDimension = void 0;
4254
4258
  const isValidDimension = function (st) {
4255
- if ((typeof (st) === 'string') &&
4256
- (st.length > 0) && ((st.indexOf('calc') === 0) ||
4257
- (!isNaN((0, substr_12.substr)(st, 0, 1))))) {
4259
+ if (typeof st === 'string' && (st.length > 0) && ((st.indexOf('calc') === 0) || (0, isNumber_7.isNumber)((0, substr_12.substr)(st, 0, 1)))) {
4258
4260
  let el = document.createElement('div');
4259
4261
  el.style.width = st;
4260
4262
  let res = !!el.style.width.length;
@@ -4269,24 +4271,38 @@ var bbn = (() => {
4269
4271
  "use strict";
4270
4272
  Object.defineProperty(exports, "__esModule", { value: true });
4271
4273
  exports.isDimension = void 0;
4272
- const isDimension = function (st) {
4273
- if ((typeof (st) === 'number') && (st >= 0)) {
4274
- return true;
4274
+ const isDimension = function (...args) {
4275
+ if (!args.length)
4276
+ return false;
4277
+ for (let st of args) {
4278
+ if ((typeof st !== 'number') || (st < 0)) {
4279
+ return false;
4280
+ }
4281
+ if (!(0, isValidDimension_1.isValidDimension)(st)) {
4282
+ return false;
4283
+ }
4275
4284
  }
4276
- return (0, isValidDimension_1.isValidDimension)(st);
4285
+ return true;
4277
4286
  };
4278
4287
  exports.isDimension = isDimension;
4279
4288
  });
4280
- define("fn/isEmail", ["require", "exports", "fn/isString"], function (require, exports, isString_24) {
4289
+ define("fn/isEmail", ["require", "exports", "fn/isString"], function (require, exports, isString_20) {
4281
4290
  "use strict";
4282
4291
  Object.defineProperty(exports, "__esModule", { value: true });
4283
4292
  exports.isEmail = void 0;
4284
- const isEmail = function (st) {
4285
- if (!(0, isString_24.isString)(st)) {
4293
+ const isEmail = function (...args) {
4294
+ if (!args.length)
4286
4295
  return false;
4287
- }
4288
4296
  let regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
4289
- return regex.test(st);
4297
+ for (let st of args) {
4298
+ if (!(0, isString_20.isString)(st)) {
4299
+ return false;
4300
+ }
4301
+ if (!regex.test(st)) {
4302
+ return false;
4303
+ }
4304
+ }
4305
+ return true;
4290
4306
  };
4291
4307
  exports.isEmail = isEmail;
4292
4308
  });
@@ -4311,11 +4327,11 @@ var bbn = (() => {
4311
4327
  Object.defineProperty(exports, "__esModule", { value: true });
4312
4328
  exports.isFocused = void 0;
4313
4329
  const isFocused = function (ele, contain) {
4314
- return (ele === document.activeElement) || (contain && ele.contains && (ele.contains(document.activeElement)));
4330
+ return ele === document.activeElement || (contain && ele.contains && ele.contains(document.activeElement));
4315
4331
  };
4316
4332
  exports.isFocused = isFocused;
4317
4333
  });
4318
- define("fn/isIP", ["require", "exports", "fn/isString"], function (require, exports, isString_25) {
4334
+ define("fn/isIP", ["require", "exports", "fn/isString"], function (require, exports, isString_21) {
4319
4335
  "use strict";
4320
4336
  Object.defineProperty(exports, "__esModule", { value: true });
4321
4337
  exports.isIP = void 0;
@@ -4323,7 +4339,7 @@ var bbn = (() => {
4323
4339
  if (!args.length)
4324
4340
  return false;
4325
4341
  for (let st of args) {
4326
- if (!(0, isString_25.isString)(st) || !bbn.var.regexp.ip.test(st)) {
4342
+ if (!(0, isString_21.isString)(st) || !bbn.vars.regexp.ip.test(st)) {
4327
4343
  return false;
4328
4344
  }
4329
4345
  }
@@ -4331,7 +4347,7 @@ var bbn = (() => {
4331
4347
  };
4332
4348
  exports.isIP = isIP;
4333
4349
  });
4334
- define("fn/isHostname", ["require", "exports", "fn/isString", "fn/isIP"], function (require, exports, isString_26, isIP_1) {
4350
+ define("fn/isHostname", ["require", "exports", "fn/isString", "fn/isIP"], function (require, exports, isString_22, isIP_1) {
4335
4351
  "use strict";
4336
4352
  Object.defineProperty(exports, "__esModule", { value: true });
4337
4353
  exports.isHostname = void 0;
@@ -4339,10 +4355,10 @@ var bbn = (() => {
4339
4355
  if (!args.length)
4340
4356
  return false;
4341
4357
  for (let st of args) {
4342
- if (!(0, isString_26.isString)(st)) {
4358
+ if (!(0, isString_22.isString)(st)) {
4343
4359
  return false;
4344
4360
  }
4345
- if (!(0, isIP_1.isIP)(st) && !bbn.var.regexp.hostname.test(st)) {
4361
+ if (!(0, isIP_1.isIP)(st) && !bbn.vars.regexp.hostname.test(st)) {
4346
4362
  return false;
4347
4363
  }
4348
4364
  }
@@ -4350,16 +4366,16 @@ var bbn = (() => {
4350
4366
  };
4351
4367
  exports.isHostname = isHostname;
4352
4368
  });
4353
- define("fn/isInside", ["require", "exports", "fn/getAncestors", "fn/isString", "fn/each"], function (require, exports, getAncestors_1, isString_27, each_19) {
4369
+ define("fn/isInside", ["require", "exports", "fn/getAncestors", "fn/isString", "fn/each"], function (require, exports, getAncestors_1, isString_23, each_19) {
4354
4370
  "use strict";
4355
4371
  Object.defineProperty(exports, "__esModule", { value: true });
4356
4372
  exports.isInside = void 0;
4357
4373
  const isInside = function (ele, ancestor) {
4358
4374
  let ancestors = (0, getAncestors_1.getAncestors)(ele);
4359
4375
  if (ancestors.length) {
4360
- if ((0, isString_27.isString)(ancestor)) {
4376
+ if ((0, isString_23.isString)(ancestor)) {
4361
4377
  let ok = false;
4362
- (0, each_19.each)(ancestors, a => {
4378
+ (0, each_19.each)(ancestors, (a) => {
4363
4379
  if (a.matches && a.matches(ancestor)) {
4364
4380
  ok = true;
4365
4381
  return false;
@@ -4383,7 +4399,7 @@ var bbn = (() => {
4383
4399
  if (!args.length)
4384
4400
  return false;
4385
4401
  for (let a of args) {
4386
- if ((typeof a !== 'string') || !a.match(/^\d+(?:\.\d+)?%$/)) {
4402
+ if (typeof a !== 'string' || !a.match(/^\d+(?:\.\d+)?%$/)) {
4387
4403
  return false;
4388
4404
  }
4389
4405
  }
@@ -4399,7 +4415,7 @@ var bbn = (() => {
4399
4415
  if (!args.length)
4400
4416
  return false;
4401
4417
  for (let a of args) {
4402
- if ((a !== null) && ((typeof a == "object") || (typeof a == "function"))) {
4418
+ if (a !== null && (typeof a == 'object' || typeof a == 'function')) {
4403
4419
  return false;
4404
4420
  }
4405
4421
  }
@@ -4429,7 +4445,7 @@ var bbn = (() => {
4429
4445
  exports.isPropSize = void 0;
4430
4446
  const isPropSize = function (name) {
4431
4447
  let isTrue = false;
4432
- (0, each_20.each)(['width', 'height', 'gap', 'margin', 'padding', 'top', 'left', 'right', 'bottom'], a => {
4448
+ (0, each_20.each)(['width', 'height', 'gap', 'margin', 'padding', 'top', 'left', 'right', 'bottom'], (a) => {
4433
4449
  if (name.indexOf(a) !== -1) {
4434
4450
  isTrue = true;
4435
4451
  return false;
@@ -4447,7 +4463,7 @@ var bbn = (() => {
4447
4463
  if (!args.length)
4448
4464
  return false;
4449
4465
  for (let a of args) {
4450
- if ((typeof a !== 'string') ||
4466
+ if (typeof a !== 'string' ||
4451
4467
  !a.match(/^([1-2]\d{3})-((0[0-9])|(1[12]))-(([0-2][0-9])|(3[01]))(?:( [0-2][0-9]):([0-5][0-9]):([0-5][0-9]))?$/)) {
4452
4468
  return false;
4453
4469
  }
@@ -4480,7 +4496,7 @@ var bbn = (() => {
4480
4496
  if (!args.length)
4481
4497
  return false;
4482
4498
  for (let str of args) {
4483
- if (!bbn.var.regexp.url.test(str)) {
4499
+ if (!bbn.vars.regexp.url.test(str)) {
4484
4500
  return false;
4485
4501
  }
4486
4502
  }
@@ -4488,7 +4504,7 @@ var bbn = (() => {
4488
4504
  };
4489
4505
  exports.isURL = isURL;
4490
4506
  });
4491
- define("fn/isValidName", ["require", "exports", "fn/isString"], function (require, exports, isString_28) {
4507
+ define("fn/isValidName", ["require", "exports", "fn/isString"], function (require, exports, isString_24) {
4492
4508
  "use strict";
4493
4509
  Object.defineProperty(exports, "__esModule", { value: true });
4494
4510
  exports.isValidName = void 0;
@@ -4497,7 +4513,7 @@ var bbn = (() => {
4497
4513
  return false;
4498
4514
  }
4499
4515
  for (let arg of args) {
4500
- if (!(0, isString_28.isString)(arg) || !/^[$A-Z_][0-9A-Z_$]*$/i.test(arg)) {
4516
+ if (!(0, isString_24.isString)(arg) || !/^[$A-Z_][0-9A-Z_$]*$/i.test(arg)) {
4501
4517
  return false;
4502
4518
  }
4503
4519
  }
@@ -4513,23 +4529,23 @@ var bbn = (() => {
4513
4529
  if (!args.length) {
4514
4530
  return false;
4515
4531
  }
4516
- if (Object.hasOwn(bbn, 'vue')) {
4517
- if (bbn.vue.app) {
4532
+ if ('vue' in bbn && window['Vue']) {
4533
+ if ('app' in bbn.vue) {
4518
4534
  for (let a of args) {
4519
- if (!a || (typeof a.render !== 'function')) {
4535
+ if (!a || typeof a.render !== 'function') {
4520
4536
  return false;
4521
4537
  }
4522
4538
  }
4523
4539
  }
4524
4540
  else {
4525
4541
  for (let a of args) {
4526
- if (!(a instanceof Vue)) {
4542
+ if (!(a instanceof window['Vue'])) {
4527
4543
  return false;
4528
4544
  }
4529
4545
  }
4530
4546
  }
4531
4547
  }
4532
- if (Object.hasOwn(bbn, 'cp')) {
4548
+ if ('cp' in bbn && 'isComponent' in bbn['cp'] && (typeof bbn['cp'].isComponent === 'function')) {
4533
4549
  return bbn.cp.isComponent(...args);
4534
4550
  }
4535
4551
  return true;
@@ -4542,9 +4558,9 @@ var bbn = (() => {
4542
4558
  exports.lightenDarkenHex = void 0;
4543
4559
  const lightenDarkenHex = function (hex, amt) {
4544
4560
  if (hex && amt) {
4545
- let ht = hex[0] === "#";
4561
+ let ht = hex[0] === '#';
4546
4562
  hex = ht ? hex.slice(1) : hex;
4547
- let num = parseInt(hex, 16), r = (num >> 16) + amt, b = ((num >> 8) & 0x00FF) + amt, g = (num & 0x0000FF) + amt;
4563
+ let num = parseInt(hex, 16), r = (num >> 16) + amt, b = ((num >> 8) & 0x00ff) + amt, g = (num & 0x0000ff) + amt;
4548
4564
  if (r > 255) {
4549
4565
  r = 255;
4550
4566
  }
@@ -4568,42 +4584,42 @@ var bbn = (() => {
4568
4584
  };
4569
4585
  exports.lightenDarkenHex = lightenDarkenHex;
4570
4586
  });
4571
- define("fn/warning", ["require", "exports", "fn/log"], function (require, exports, log_19) {
4587
+ define("fn/warning", ["require", "exports", "fn/log"], function (require, exports, log_16) {
4572
4588
  "use strict";
4573
4589
  Object.defineProperty(exports, "__esModule", { value: true });
4574
4590
  exports.warning = void 0;
4575
4591
  const warning = function (message) {
4576
- const args = ["BBN: " + message];
4577
- args.unshift({
4578
- _bbn_console_mode: "warn",
4592
+ const args = ['BBN: ' + message];
4593
+ const obj = {
4594
+ _bbn_console_mode: 'warn',
4579
4595
  _bbn_console_level: 2,
4580
- _bbn_console_style: "color: #E64141; background: #F7E195; font-size: 14px"
4581
- });
4582
- log_19.log.apply(this, args);
4583
- return this;
4596
+ _bbn_console_style: 'color: #E64141; background: #F7E195; font-size: 14px',
4597
+ };
4598
+ args.unshift(obj);
4599
+ log_16.log.apply(this, args);
4584
4600
  };
4585
4601
  exports.warning = warning;
4586
4602
  });
4587
- define("fn/makeReactive", ["require", "exports", "fn/log", "fn/createObject", "fn/isSymbol", "fn/isNumber", "fn/isArray", "fn/warning", "fn/isFunction", "fn/isSame"], function (require, exports, log_20, createObject_2, isSymbol_1, isNumber_7, isArray_13, warning_1, isFunction_13, isSame_2) {
4603
+ define("fn/makeReactive", ["require", "exports", "fn/log", "fn/createObject", "fn/isSymbol", "fn/isNumber", "fn/isArray", "fn/warning", "fn/isFunction", "fn/isSame"], function (require, exports, log_17, createObject_2, isSymbol_1, isNumber_8, isArray_13, warning_1, isFunction_11, isSame_2) {
4588
4604
  "use strict";
4589
4605
  Object.defineProperty(exports, "__esModule", { value: true });
4590
4606
  exports.makeReactive = void 0;
4591
4607
  const makeReactive = function (obj, onSet, parent, parentProp) {
4592
4608
  const parentString = (parent === null || parent === void 0 ? void 0 : parent.$cid) || '';
4593
4609
  const prefix = '__bbn_' + (parentString ? parentString + '_' : '');
4594
- if (obj && (typeof obj === 'object') && [undefined, Object, Array].includes(obj.constructor)) {
4595
- if (obj.__bbnIsProxy && (obj.__bbnParent === parent)) {
4610
+ if (obj && typeof obj === 'object' && [undefined, Object, Array].includes(obj.constructor)) {
4611
+ if (obj.__bbnIsProxy && obj.__bbnParent === parent) {
4596
4612
  return obj;
4597
4613
  }
4598
- if (parent && parent.$options && (parent.$options.name === 'bbn-loadbar')) {
4599
- (0, log_20.log)(["MAKING bbn-loadbar", obj]);
4614
+ if (parent && parent.$options && parent.$options.name === 'bbn-loadbar') {
4615
+ (0, log_17.log)(['MAKING bbn-loadbar', obj]);
4600
4616
  }
4601
4617
  if (!obj.__bbnWatchers) {
4602
4618
  Reflect.defineProperty(obj, '__bbnWatchers', {
4603
4619
  value: (0, createObject_2.createObject)(),
4604
4620
  writable: true,
4605
4621
  configurable: true,
4606
- enumerable: false
4622
+ enumerable: false,
4607
4623
  });
4608
4624
  }
4609
4625
  const handler = {
@@ -4614,17 +4630,18 @@ var bbn = (() => {
4614
4630
  return Reflect.get(realTarget, key);
4615
4631
  }
4616
4632
  const propName = parentProp ? parentProp + '.' + key : key;
4617
- const hiddenKey = prefix + ((0, isNumber_7.isNumber)(key) ? key.toString() : key);
4618
- if (['fill', 'pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'].includes(key) && (0, isArray_13.isArray)(target)) {
4633
+ const hiddenKey = prefix + ((0, isNumber_8.isNumber)(key) ? key.toString() : key);
4634
+ if (['fill', 'pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'].includes(key) &&
4635
+ (0, isArray_13.isArray)(target)) {
4619
4636
  return function (...args) {
4620
4637
  let res = realTarget[key](...args);
4621
- (0, warning_1.warning)("DOING ARRAY STUFF");
4622
- (0, log_20.log)(target.__bbnParent);
4638
+ (0, warning_1.warning)('DOING ARRAY STUFF');
4639
+ (0, log_17.log)(target.__bbnParent);
4623
4640
  onSet(target, 'length', parent);
4624
4641
  return res;
4625
4642
  };
4626
4643
  }
4627
- if ((0, isFunction_13.isFunction)(realValue)) {
4644
+ if ((0, isFunction_11.isFunction)(realValue)) {
4628
4645
  return realValue;
4629
4646
  }
4630
4647
  if (key === '__bbnRoot') {
@@ -4649,22 +4666,24 @@ var bbn = (() => {
4649
4666
  if (key.indexOf('__bbn_') === 0) {
4650
4667
  return Reflect.get(target, key);
4651
4668
  }
4652
- if ((key === 'length') && (0, isArray_13.isArray)(target.__bbnRoot || target)) {
4669
+ if (key === 'length' && (0, isArray_13.isArray)(target.__bbnRoot || target)) {
4653
4670
  return realTarget.length;
4654
4671
  }
4655
- if (!Object.hasOwn(target, key)) {
4672
+ if (!(key in target)) {
4656
4673
  return realValue;
4657
4674
  }
4658
- if (realValue && (typeof realValue === 'object') && [undefined, Object, Array].includes(realValue.constructor)) {
4659
- if (realValue.__bbnIsProxy && (realValue.__bbnParent === parent)) {
4675
+ if (realValue &&
4676
+ typeof realValue === 'object' &&
4677
+ [undefined, Object, Array].includes(realValue.constructor)) {
4678
+ if (realValue.__bbnIsProxy && realValue.__bbnParent === parent) {
4660
4679
  return realTarget[hiddenKey];
4661
4680
  }
4662
- if (!Object.hasOwn(realTarget, hiddenKey)) {
4681
+ if (!(hiddenKey in realTarget)) {
4663
4682
  Reflect.defineProperty(realTarget, hiddenKey, {
4664
4683
  value: makeReactive(realValue, onSet, parent, propName),
4665
4684
  writable: true,
4666
4685
  configurable: true,
4667
- enumerable: false
4686
+ enumerable: false,
4668
4687
  });
4669
4688
  }
4670
4689
  if (realTarget[hiddenKey].__bbnIsProxy && !realTarget.__bbnWatchers[parentString]) {
@@ -4683,8 +4702,8 @@ var bbn = (() => {
4683
4702
  if ((0, isSymbol_1.isSymbol)(key)) {
4684
4703
  return Reflect.get(target, key);
4685
4704
  }
4686
- if (parent && parent.$options && (parent.$options.name === 'bbn-loadbar')) {
4687
- (0, log_20.log)(['Setting proxy prop in ' + parent.$options.name, target, key, value]);
4705
+ if (parent && parent.$options && parent.$options.name === 'bbn-loadbar') {
4706
+ (0, log_17.log)(['Setting proxy prop in ' + parent.$options.name, target, key, value]);
4688
4707
  }
4689
4708
  if (!(0, isSame_2.isSame)(realTarget[key], value)) {
4690
4709
  if (key.indexOf('__bbn_') === 0) {
@@ -4692,25 +4711,34 @@ var bbn = (() => {
4692
4711
  value: makeReactive(value, onSet, parent, propName),
4693
4712
  writable: true,
4694
4713
  configurable: true,
4695
- enumerable: false
4714
+ enumerable: false,
4696
4715
  });
4697
4716
  }
4698
4717
  else {
4699
- if (value && (typeof value === 'object') && [undefined, Object, Array].includes(value.constructor)) {
4700
- const hiddenKey = prefix + ((0, isNumber_7.isNumber)(key) ? key.toString() : key);
4718
+ if (value &&
4719
+ typeof value === 'object' &&
4720
+ [undefined, Object, Array].includes(value.constructor)) {
4721
+ const hiddenKey = prefix + ((0, isNumber_8.isNumber)(key) ? key.toString() : key);
4701
4722
  Reflect.defineProperty(realTarget, hiddenKey, {
4702
4723
  value: makeReactive(value, onSet, parent, propName),
4703
4724
  writable: true,
4704
4725
  configurable: true,
4705
- enumerable: false
4726
+ enumerable: false,
4706
4727
  });
4707
4728
  if (realTarget[hiddenKey].__bbnIsProxy && !realTarget.__bbnWatchers[parentString]) {
4708
4729
  realTarget.__bbnWatchers[parentString] = propName;
4709
4730
  }
4710
4731
  }
4711
4732
  }
4712
- if (parent && parent.$options && (parent.$options.name === 'bbn-loadbar')) {
4713
- (0, log_20.log)(['Setting proxy prop in ' + parent.$options.name + ' ' + ((0, isNumber_7.isNumber)(key) ? key.toString() : key), value, target]);
4733
+ if (parent && parent.$options && parent.$options.name === 'bbn-loadbar') {
4734
+ (0, log_17.log)([
4735
+ 'Setting proxy prop in ' +
4736
+ parent.$options.name +
4737
+ ' ' +
4738
+ ((0, isNumber_8.isNumber)(key) ? key.toString() : key),
4739
+ value,
4740
+ target,
4741
+ ]);
4714
4742
  }
4715
4743
  Reflect.set(realTarget, key, value);
4716
4744
  onSet(target, key, parent);
@@ -4720,16 +4748,16 @@ var bbn = (() => {
4720
4748
  defineProperty(target, key, description) {
4721
4749
  const realTarget = target;
4722
4750
  const propName = parentProp ? parentProp + '.' + key : key;
4723
- if ((key === '__bbnWatchers') || (0, isSymbol_1.isSymbol)(key) || (key.indexOf('__bbn_') === 0)) {
4751
+ if (key === '__bbnWatchers' || (0, isSymbol_1.isSymbol)(key) || key.indexOf('__bbn_') === 0) {
4724
4752
  Reflect.defineProperty(realTarget, key, description);
4725
4753
  }
4726
4754
  else {
4727
- const hiddenKey = prefix + ((0, isNumber_7.isNumber)(key) ? key.toString() : key);
4755
+ const hiddenKey = prefix + ((0, isNumber_8.isNumber)(key) ? key.toString() : key);
4728
4756
  Reflect.defineProperty(realTarget, hiddenKey, {
4729
4757
  value: makeReactive(description.value, onSet, parent, propName),
4730
4758
  writable: true,
4731
4759
  configurable: true,
4732
- enumerable: false
4760
+ enumerable: false,
4733
4761
  });
4734
4762
  }
4735
4763
  onSet(target, key, parent);
@@ -4741,14 +4769,14 @@ var bbn = (() => {
4741
4769
  Reflect.deleteProperty(realTarget, key);
4742
4770
  }
4743
4771
  else {
4744
- const hiddenKey = prefix + ((0, isNumber_7.isNumber)(key) ? key.toString() : key);
4772
+ const hiddenKey = prefix + ((0, isNumber_8.isNumber)(key) ? key.toString() : key);
4745
4773
  Reflect.deleteProperty(realTarget, hiddenKey);
4746
4774
  Reflect.deleteProperty(target, key);
4747
4775
  }
4748
4776
  return true;
4749
- }
4777
+ },
4750
4778
  };
4751
- return (new Proxy(obj, handler));
4779
+ return new Proxy(obj, handler);
4752
4780
  }
4753
4781
  return obj;
4754
4782
  };
@@ -4769,59 +4797,72 @@ var bbn = (() => {
4769
4797
  };
4770
4798
  exports.map = map;
4771
4799
  });
4772
- define("fn/money", ["require", "exports", "fn/isNumber"], function (require, exports, isNumber_8) {
4800
+ define("fn/money", ["require", "exports", "fn/isNumber"], function (require, exports, isNumber_9) {
4773
4801
  "use strict";
4774
4802
  Object.defineProperty(exports, "__esModule", { value: true });
4775
4803
  exports.money = void 0;
4776
4804
  const money = function (val, kilo, currency, novalue, decimal, thousands, precision) {
4777
4805
  /*
4778
- money(val, kilo){
4779
- let decimal = ',',
4780
- currency = '€',
4781
- thousands = ' ';
4782
- if ( (isNaN(val) || !val) ){
4783
- return '-';
4784
- }
4785
- if ( isNaN(val) || !val ){
4786
- return 0;
4787
- }
4788
- if ( kilo && val ){
4789
- val = val / 1000;
4790
- if ( currency ){
4791
- currency = 'K' + currency;
4806
+ money(val, kilo){
4807
+ let decimal = ',',
4808
+ currency = '€',
4809
+ thousands = ' ';
4810
+ if ( (isNaN(val) || !val) ){
4811
+ return '-';
4792
4812
  }
4793
- }
4794
- return parseFloat(val).toFixed(0).replace(/./g, function(c, i, a) {
4795
- if ( c === '.' ){
4796
- return decimal;
4813
+ if ( isNaN(val) || !val ){
4814
+ return 0;
4797
4815
  }
4798
- return i && ((a.length - i) % 3 === 0) ? thousands + c : c;
4799
- }) + ( currency ? ' ' + currency : '');
4800
- },
4801
-
4802
- */
4816
+ if ( kilo && val ){
4817
+ val = val / 1000;
4818
+ if ( currency ){
4819
+ currency = 'K' + currency;
4820
+ }
4821
+ }
4822
+ return parseFloat(val).toFixed(0).replace(/./g, function(c, i, a) {
4823
+ if ( c === '.' ){
4824
+ return decimal;
4825
+ }
4826
+ return i && ((a.length - i) % 3 === 0) ? thousands + c : c;
4827
+ }) + ( currency ? ' ' + currency : '');
4828
+ },
4829
+
4830
+ */
4803
4831
  if (!decimal) {
4804
- decimal = (decimal === undefined) && bbn.env.money && (bbn.env.money.decimal !== undefined) ? bbn.env.money.decimal : '.';
4832
+ decimal =
4833
+ decimal === undefined && bbn.env.money && bbn.env.money.decimal !== undefined ? bbn.env.money.decimal : '.';
4805
4834
  }
4806
4835
  if (!currency) {
4807
- currency = (currency === undefined) && bbn.env.money && (bbn.env.money.currency !== undefined) ? bbn.env.money.currency : '';
4836
+ currency =
4837
+ currency === undefined && bbn.env.money && bbn.env.money.currency !== undefined
4838
+ ? bbn.env.money.currency
4839
+ : '';
4808
4840
  }
4809
4841
  if (!thousands) {
4810
- thousands = (thousands === undefined) && bbn.env.money && (bbn.env.money.thousands !== undefined) ? bbn.env.money.thousands : ' ';
4842
+ thousands =
4843
+ thousands === undefined && bbn.env.money && bbn.env.money.thousands !== undefined
4844
+ ? bbn.env.money.thousands
4845
+ : ' ';
4811
4846
  }
4812
4847
  if (!precision) {
4813
- precision = (precision === undefined) && bbn.env.money && (bbn.env.money.precision !== undefined) ? bbn.env.money.precision : false;
4848
+ precision =
4849
+ precision === undefined && bbn.env.money && bbn.env.money.precision !== undefined
4850
+ ? bbn.env.money.precision
4851
+ : 0;
4814
4852
  }
4815
4853
  if (!kilo) {
4816
- kilo = (kilo === undefined) && bbn.env.money && (bbn.env.money.kilo !== undefined) ? bbn.env.money.kilo : false;
4854
+ kilo = kilo === undefined && bbn.env.money && bbn.env.money.kilo !== undefined ? bbn.env.money.kilo : false;
4817
4855
  }
4818
4856
  if (!novalue) {
4819
- novalue = (novalue === undefined) && bbn.env.money && (bbn.env.money.novalue !== undefined) ? bbn.env.money.novalue : false;
4857
+ novalue =
4858
+ novalue === undefined && bbn.env.money && bbn.env.money.novalue !== undefined
4859
+ ? bbn.env.money.novalue
4860
+ : false;
4820
4861
  }
4821
- if (!(0, isNumber_8.isNumber)(precision)) {
4862
+ if (!(0, isNumber_9.isNumber)(precision)) {
4822
4863
  precision = kilo ? 3 : 0;
4823
4864
  }
4824
- if (val === 0) {
4865
+ if ((val === 0) && (typeof precision === 'number') && (precision > 0)) {
4825
4866
  let res = val.toFixed(precision).replace('.', decimal);
4826
4867
  if (currency) {
4827
4868
  res += ' ' + (kilo ? 'K' + currency : currency);
@@ -4832,7 +4873,7 @@ var bbn = (() => {
4832
4873
  return novalue;
4833
4874
  }
4834
4875
  if (isNaN(val) || !val) {
4835
- return 0 + (currency ? (' ' + currency) : '');
4876
+ return 0 + (currency ? ' ' + currency : '');
4836
4877
  }
4837
4878
  if (kilo && val) {
4838
4879
  val = val / 1000;
@@ -4840,7 +4881,7 @@ var bbn = (() => {
4840
4881
  currency = 'K' + currency;
4841
4882
  }
4842
4883
  }
4843
- let v = parseFloat(val).toFixed(precision);
4884
+ let v = val.toFixed(precision);
4844
4885
  let decimalPosition = 0;
4845
4886
  let decimalIdx = 10000;
4846
4887
  if (v) {
@@ -4852,12 +4893,12 @@ var bbn = (() => {
4852
4893
  decimalPosition = v.length - decimalIdx;
4853
4894
  }
4854
4895
  }
4855
- return v.replace(/./g, function (c, i, a) {
4896
+ return (v.replace(/./g, function (c, i, a) {
4856
4897
  if (c === '.') {
4857
4898
  return decimal;
4858
4899
  }
4859
- return i && ((a.length - i - decimalPosition) % 3 === 0) && (i < decimalIdx) ? thousands + c : c;
4860
- }) + (currency ? ' ' + currency : '');
4900
+ return i && (a.length - i - decimalPosition) % 3 === 0 && i < decimalIdx ? thousands + c : c;
4901
+ }) + (currency ? ' ' + currency : ''));
4861
4902
  };
4862
4903
  exports.money = money;
4863
4904
  });
@@ -4868,7 +4909,7 @@ var bbn = (() => {
4868
4909
  const move = function (arr, fromIndex, toIndex) {
4869
4910
  if (toIndex >= arr.length) {
4870
4911
  let k = toIndex - arr.length;
4871
- while ((k--) + 1) {
4912
+ while (k-- + 1) {
4872
4913
  arr.push(undefined);
4873
4914
  }
4874
4915
  }
@@ -4882,17 +4923,17 @@ var bbn = (() => {
4882
4923
  Object.defineProperty(exports, "__esModule", { value: true });
4883
4924
  exports.multiorder = void 0;
4884
4925
  const multiorder = function (arr, orders) {
4885
- if (!Array.isArray(orders) && (typeof orders === 'object')) {
4886
- let tmp = [];
4926
+ let currentOrders;
4927
+ if (!Array.isArray(orders) && typeof orders === 'object') {
4928
+ currentOrders = [];
4887
4929
  for (var n in orders) {
4888
- tmp.push({ field: n, dir: orders[n] });
4930
+ currentOrders.push({ field: n, dir: orders[n] });
4889
4931
  }
4890
- orders = tmp;
4891
4932
  }
4892
4933
  let r = arr.slice();
4893
4934
  return r.sort((a, b) => {
4894
4935
  let res;
4895
- for (let order of orders) {
4936
+ for (let order of currentOrders) {
4896
4937
  res = (0, _compareValues_1._compareValues)(a, b, order.field, order.dir);
4897
4938
  if (res !== 0) {
4898
4939
  return res;
@@ -4908,15 +4949,15 @@ var bbn = (() => {
4908
4949
  Object.defineProperty(exports, "__esModule", { value: true });
4909
4950
  exports.nl2br = void 0;
4910
4951
  const nl2br = function (st, keepNl) {
4911
- return (0, replaceAll_5.replaceAll)("\n", "<br>" + (keepNl ? "\n" : ""), st);
4952
+ return (0, replaceAll_5.replaceAll)('\n', '<br>' + (keepNl ? '\n' : ''), st);
4912
4953
  };
4913
4954
  exports.nl2br = nl2br;
4914
4955
  });
4915
- define("fn/objectToFormData", ["require", "exports", "fn/isArray", "fn/each", "fn/isObject", "fn/iterate", "fn/isNull"], function (require, exports, isArray_15, each_21, isObject_18, iterate_8, isNull_3) {
4956
+ define("fn/objectToFormData", ["require", "exports", "fn/isArray", "fn/each", "fn/isObject", "fn/iterate", "fn/isNull"], function (require, exports, isArray_15, each_21, isObject_16, iterate_8, isNull_3) {
4916
4957
  "use strict";
4917
4958
  Object.defineProperty(exports, "__esModule", { value: true });
4918
4959
  exports.objectToFormData = void 0;
4919
- const objectToFormData = function (obj, key, ignoreList) {
4960
+ const objectToFormData = function (obj, key = '', ignoreList) {
4920
4961
  let formData = new FormData();
4921
4962
  let appendFormData = (data, key = '') => {
4922
4963
  if (!ignoreList || ((0, isArray_15.isArray)(ignoreList) && !ignoreList.includes(key))) {
@@ -4928,15 +4969,15 @@ var bbn = (() => {
4928
4969
  appendFormData(v, key + '[' + i + ']');
4929
4970
  });
4930
4971
  }
4931
- else if ((0, isObject_18.isObject)(data) && Object.keys(data).length) {
4972
+ else if ((0, isObject_16.isObject)(data) && Object.keys(data).length) {
4932
4973
  (0, iterate_8.iterate)(data, (v, i) => {
4933
- if (Object.hasOwn(data, i)) {
4974
+ if (i in data) {
4934
4975
  appendFormData(v, !key ? i : key + '[' + i + ']');
4935
4976
  }
4936
4977
  });
4937
4978
  }
4938
4979
  else {
4939
- if (!(0, isNull_3.isNull)(data) && (data !== undefined)) {
4980
+ if (!(0, isNull_3.isNull)(data) && data !== undefined) {
4940
4981
  formData.append(key, data);
4941
4982
  }
4942
4983
  }
@@ -4966,7 +5007,7 @@ var bbn = (() => {
4966
5007
  Object.defineProperty(exports, "__esModule", { value: true });
4967
5008
  exports.selector = void 0;
4968
5009
  const selector = function (ele) {
4969
- return (typeof el === 'string') ? document.querySelector(ele) : ele;
5010
+ return typeof ele === 'string' ? document.querySelector(ele) : ele;
4970
5011
  };
4971
5012
  exports.selector = selector;
4972
5013
  });
@@ -4976,10 +5017,11 @@ var bbn = (() => {
4976
5017
  exports.outerHeight = void 0;
4977
5018
  const outerHeight = function (ele) {
4978
5019
  ele = (0, selector_1.selector)(ele);
4979
- let styles = window.getComputedStyle(ele);
4980
- let margin = parseFloat(styles['marginTop']) +
4981
- parseFloat(styles['marginBottom']);
4982
- return Math.ceil(ele.offsetHeight + margin);
5020
+ if (ele && ('offsetHeight' in ele)) {
5021
+ let styles = window.getComputedStyle(ele);
5022
+ let margin = parseFloat(styles['marginTop']) + parseFloat(styles['marginBottom']);
5023
+ return Math.ceil(ele.offsetHeight + margin);
5024
+ }
4983
5025
  };
4984
5026
  exports.outerHeight = outerHeight;
4985
5027
  });
@@ -4990,8 +5032,7 @@ var bbn = (() => {
4990
5032
  const outerWidth = function (ele) {
4991
5033
  ele = (0, selector_2.selector)(ele);
4992
5034
  let styles = window.getComputedStyle(ele);
4993
- let margin = parseFloat(styles['marginLeft']) +
4994
- parseFloat(styles['marginRight']);
5035
+ let margin = parseFloat(styles['marginLeft']) + parseFloat(styles['marginRight']);
4995
5036
  return Math.ceil(ele.offsetWidth + margin);
4996
5037
  };
4997
5038
  exports.outerWidth = outerWidth;
@@ -5021,7 +5062,7 @@ var bbn = (() => {
5021
5062
  Object.defineProperty(exports, "__esModule", { value: true });
5022
5063
  exports.postOut = void 0;
5023
5064
  const postOut = function (url, data, success, target) {
5024
- let form = document.getElementById("bbn-form_out");
5065
+ let form = document.body.querySelector('form#bbn-form_out');
5025
5066
  if (!form) {
5026
5067
  form = document.createElement('form');
5027
5068
  form.classList.add('bbn-no');
@@ -5033,7 +5074,7 @@ var bbn = (() => {
5033
5074
  }
5034
5075
  form.innerHTML = '';
5035
5076
  form.setAttribute('action', url);
5036
- form.setAttribute('target', target || "_blank");
5077
+ form.setAttribute('target', target || '_blank');
5037
5078
  if (!data) {
5038
5079
  data = {};
5039
5080
  }
@@ -5056,9 +5097,7 @@ var bbn = (() => {
5056
5097
  const printf = function (format) {
5057
5098
  var args = Array.prototype.slice.call(arguments, 1);
5058
5099
  return format.replace(/{(\d+)}/g, function (match, number) {
5059
- return typeof args[number] != 'undefined'
5060
- ? args[number]
5061
- : match;
5100
+ return typeof args[number] != 'undefined' ? args[number] : match;
5062
5101
  });
5063
5102
  };
5064
5103
  exports.printf = printf;
@@ -5068,10 +5107,10 @@ var bbn = (() => {
5068
5107
  Object.defineProperty(exports, "__esModule", { value: true });
5069
5108
  exports.quotes2html = void 0;
5070
5109
  const quotes2html = function (st, type) {
5071
- if (!type || (type.toLowerCase().indexOf('s') === 0)) {
5072
- st = (0, replaceAll_6.replaceAll)("'", "&#39;", st);
5110
+ if (!type || type.toLowerCase().indexOf('s') === 0) {
5111
+ st = (0, replaceAll_6.replaceAll)("'", '&#39;', st);
5073
5112
  }
5074
- if (!type || (type.toLowerCase().indexOf('d') === 0)) {
5113
+ if (!type || type.toLowerCase().indexOf('d') === 0) {
5075
5114
  st = (0, replaceAll_6.replaceAll)('"', '&quot;', st);
5076
5115
  }
5077
5116
  return st;
@@ -5087,15 +5126,17 @@ var bbn = (() => {
5087
5126
  };
5088
5127
  exports.randomInt = randomInt;
5089
5128
  });
5090
- define("fn/randomString", ["require", "exports", "fn/randomInt", "fn/isString"], function (require, exports, randomInt_1, isString_29) {
5129
+ define("fn/randomString", ["require", "exports", "fn/randomInt"], function (require, exports, randomInt_1) {
5091
5130
  "use strict";
5092
5131
  Object.defineProperty(exports, "__esModule", { value: true });
5093
5132
  exports.randomString = void 0;
5094
5133
  const randomString = function (min, max, types) {
5095
- let length, type, chars = {
5134
+ let length;
5135
+ let type;
5136
+ let chars = {
5096
5137
  n: '0123456789',
5097
5138
  l: 'abcdefghijklmnopqrstuvwxyz',
5098
- u: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
5139
+ u: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
5099
5140
  };
5100
5141
  if (!types) {
5101
5142
  types = 'nlu';
@@ -5103,16 +5144,16 @@ var bbn = (() => {
5103
5144
  if (!min) {
5104
5145
  length = (0, randomInt_1.randomInt)(8, 14);
5105
5146
  }
5106
- if ((0, isString_29.isString)(max)) {
5147
+ if (typeof max === 'string') {
5107
5148
  types = 'n';
5108
- chars = {
5109
- n: max
5110
- };
5149
+ delete chars.l;
5150
+ delete chars.u;
5151
+ chars.n = max;
5111
5152
  if (!length) {
5112
5153
  length = min;
5113
5154
  }
5114
5155
  }
5115
- else if ((typeof (max) === 'number') && (min < max)) {
5156
+ else if (typeof max === 'number' && min < max) {
5116
5157
  length = (0, randomInt_1.randomInt)(min, max);
5117
5158
  }
5118
5159
  else if (min) {
@@ -5135,7 +5176,7 @@ var bbn = (() => {
5135
5176
  };
5136
5177
  exports.randomString = randomString;
5137
5178
  });
5138
- define("fn/removeEmpty", ["require", "exports", "fn/isArray", "fn/isObject", "fn/numProperties"], function (require, exports, isArray_16, isObject_19, numProperties_8) {
5179
+ define("fn/removeEmpty", ["require", "exports", "fn/isArray", "fn/isObject", "fn/numProperties"], function (require, exports, isArray_16, isObject_17, numProperties_7) {
5139
5180
  "use strict";
5140
5181
  Object.defineProperty(exports, "__esModule", { value: true });
5141
5182
  exports.removeEmpty = void 0;
@@ -5150,8 +5191,8 @@ var bbn = (() => {
5150
5191
  ok = true;
5151
5192
  }
5152
5193
  }
5153
- else if ((0, isObject_19.isObject)(arr[i])) {
5154
- if ((0, numProperties_8.numProperties)(arr[i])) {
5194
+ else if ((0, isObject_17.isObject)(arr[i])) {
5195
+ if ((0, numProperties_7.numProperties)(arr[i])) {
5155
5196
  ok = true;
5156
5197
  }
5157
5198
  }
@@ -5197,16 +5238,12 @@ var bbn = (() => {
5197
5238
  };
5198
5239
  exports.removeTrailingChars = removeTrailingChars;
5199
5240
  });
5200
- define("fn/repeat", ["require", "exports", "fn/iterate"], function (require, exports, iterate_9) {
5241
+ define("fn/repeat", ["require", "exports"], function (require, exports) {
5201
5242
  "use strict";
5202
5243
  Object.defineProperty(exports, "__esModule", { value: true });
5203
5244
  exports.repeat = void 0;
5204
5245
  const repeat = function (st, num) {
5205
- let res = '';
5206
- (0, iterate_9.iterate)(num, () => {
5207
- res += st;
5208
- });
5209
- return res;
5246
+ return st.repeat(num);
5210
5247
  };
5211
5248
  exports.repeat = repeat;
5212
5249
  });
@@ -5230,7 +5267,7 @@ var bbn = (() => {
5230
5267
  }
5231
5268
  else {
5232
5269
  // In IE 9 we need to use innerHTML of a temporary element
5233
- const div = document.createElement("div");
5270
+ const div = document.createElement('div');
5234
5271
  let child;
5235
5272
  div.innerHTML = html;
5236
5273
  fragment = document.createDocumentFragment();
@@ -5263,19 +5300,21 @@ var bbn = (() => {
5263
5300
  exports.rgb2hex = void 0;
5264
5301
  const rgb2hex = function (rgb) {
5265
5302
  rgb = rgb.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);
5266
- return (rgb && rgb.length === 4) ? "#" +
5267
- ("0" + parseInt(rgb[1], 10).toString(16)).slice(-2) +
5268
- ("0" + parseInt(rgb[2], 10).toString(16)).slice(-2) +
5269
- ("0" + parseInt(rgb[3], 10).toString(16)).slice(-2) : '';
5303
+ return rgb && rgb.length === 4
5304
+ ? '#' +
5305
+ ('0' + parseInt(rgb[1], 10).toString(16)).slice(-2) +
5306
+ ('0' + parseInt(rgb[2], 10).toString(16)).slice(-2) +
5307
+ ('0' + parseInt(rgb[3], 10).toString(16)).slice(-2)
5308
+ : '';
5270
5309
  };
5271
5310
  exports.rgb2hex = rgb2hex;
5272
5311
  });
5273
- define("fn/riterate", ["require", "exports", "fn/iterate"], function (require, exports, iterate_10) {
5312
+ define("fn/riterate", ["require", "exports", "fn/iterate"], function (require, exports, iterate_9) {
5274
5313
  "use strict";
5275
5314
  Object.defineProperty(exports, "__esModule", { value: true });
5276
5315
  exports.riterate = void 0;
5277
5316
  const riterate = function (obj, fn, noPrivate) {
5278
- return (0, iterate_10.iterate)(obj, fn, noPrivate, true);
5317
+ return (0, iterate_9.iterate)(obj, fn, noPrivate, true);
5279
5318
  };
5280
5319
  exports.riterate = riterate;
5281
5320
  });
@@ -5284,7 +5323,7 @@ var bbn = (() => {
5284
5323
  Object.defineProperty(exports, "__esModule", { value: true });
5285
5324
  exports.roundDecimal = void 0;
5286
5325
  const roundDecimal = function (value, decimals) {
5287
- return Number(Math.round(value + 'e' + decimals) + 'e-' + decimals);
5326
+ return Math.round(Math.pow(Math.pow(value, decimals), -decimals));
5288
5327
  };
5289
5328
  exports.roundDecimal = roundDecimal;
5290
5329
  });
@@ -5327,7 +5366,9 @@ var bbn = (() => {
5327
5366
  }
5328
5367
  exp += ']+';
5329
5368
  let re = new RegExp(exp, 'g');
5330
- let res = (0, removeAccents_3.removeAccents)(str).replace(/[^a-z0-9]/gi, separator).replace(re, separator);
5369
+ let res = (0, removeAccents_3.removeAccents)(str)
5370
+ .replace(/[^a-z0-9]/gi, separator)
5371
+ .replace(re, separator);
5331
5372
  return (0, trim_1.trim)(res, separator);
5332
5373
  };
5333
5374
  exports.sanitize = sanitize;
@@ -5352,7 +5393,7 @@ var bbn = (() => {
5352
5393
  sel.removeAllRanges();
5353
5394
  sel.addRange(range);
5354
5395
  }
5355
- else if (doc.body.createTextRange) {
5396
+ else if (('createTextRange' in doc.body) && (typeof doc.body.createTextRange === 'function')) {
5356
5397
  range = doc.body.createTextRange();
5357
5398
  range.moveToElementText(ele);
5358
5399
  range.select();
@@ -5365,14 +5406,14 @@ var bbn = (() => {
5365
5406
  Object.defineProperty(exports, "__esModule", { value: true });
5366
5407
  exports.setCookie = void 0;
5367
5408
  const setCookie = function (name, value, days) {
5368
- let expires = "";
5409
+ let expires = '';
5369
5410
  if (days) {
5370
5411
  let date = new Date();
5371
- date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
5372
- expires = "; expires=" + date.toUTCString();
5412
+ date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
5413
+ expires = '; expires=' + date.toUTCString();
5373
5414
  }
5374
5415
  let st = escape(JSON.stringify({ value: value }));
5375
- document.cookie = name + "=" + st + expires + "; path=/";
5416
+ document.cookie = name + '=' + st + expires + '; path=/';
5376
5417
  };
5377
5418
  exports.setCookie = setCookie;
5378
5419
  });
@@ -5384,7 +5425,8 @@ var bbn = (() => {
5384
5425
  if (varname.indexOf('--') !== 0) {
5385
5426
  varname = '--' + varname;
5386
5427
  }
5387
- document.documentElement.setProperty(varname, value);
5428
+ /** @todo To Fix */
5429
+ //document.documentElement.setProperty(varname, value);
5388
5430
  };
5389
5431
  exports.setCssVar = setCssVar;
5390
5432
  });
@@ -5393,12 +5435,10 @@ var bbn = (() => {
5393
5435
  Object.defineProperty(exports, "__esModule", { value: true });
5394
5436
  exports.setProp = void 0;
5395
5437
  const setProp = function (obj, prop, value, writable = true, configurable = true) {
5396
- checkType(prop, "string", bbn._("The prop must be a string in setProp"));
5397
- checkType(obj, "object", bbn._("The obj must be an object in setProp"));
5398
5438
  Object.defineProperty(obj, prop, {
5399
5439
  value: value,
5400
5440
  writable: writable,
5401
- configurable: configurable
5441
+ configurable: configurable,
5402
5442
  });
5403
5443
  };
5404
5444
  exports.setProp = setProp;
@@ -5408,13 +5448,13 @@ var bbn = (() => {
5408
5448
  Object.defineProperty(exports, "__esModule", { value: true });
5409
5449
  exports.setProperty = void 0;
5410
5450
  const setProperty = function (obj, prop, value, force) {
5411
- if ((typeof obj === 'object') && (typeof prop === 'string')) {
5451
+ if (typeof obj === 'object' && typeof prop === 'string') {
5412
5452
  let o = obj;
5413
5453
  const bits = prop.split('.');
5414
5454
  (0, each_22.each)(bits, (v, i) => {
5415
5455
  if (!o) {
5416
5456
  if (!force) {
5417
- throw new Error(bbn._("The object is invalid"));
5457
+ throw new Error(bbn._('The object is invalid'));
5418
5458
  }
5419
5459
  o = {};
5420
5460
  }
@@ -5429,16 +5469,16 @@ var bbn = (() => {
5429
5469
  };
5430
5470
  exports.setProperty = setProperty;
5431
5471
  });
5432
- define("fn/shorten", ["require", "exports", "fn/isString", "fn/substr"], function (require, exports, isString_30, substr_15) {
5472
+ define("fn/shorten", ["require", "exports", "fn/isString", "fn/substr"], function (require, exports, isString_25, substr_15) {
5433
5473
  "use strict";
5434
5474
  Object.defineProperty(exports, "__esModule", { value: true });
5435
5475
  exports.shorten = void 0;
5436
5476
  const shorten = function (st, len, adj) {
5437
- if (typeof (st).toLowerCase() === 'string') {
5477
+ if (typeof st.toLowerCase() === 'string') {
5438
5478
  if (!len) {
5439
- len = bbn.var.shortenLen;
5479
+ len = bbn.vars.shortenLen;
5440
5480
  }
5441
- if ((adj === undefined) || !(0, isString_30.isString)(adj)) {
5481
+ if (adj === undefined || !(0, isString_25.isString)(adj)) {
5442
5482
  adj = '...';
5443
5483
  }
5444
5484
  if (st.length > len) {
@@ -5449,17 +5489,17 @@ var bbn = (() => {
5449
5489
  };
5450
5490
  exports.shorten = shorten;
5451
5491
  });
5452
- define("fn/shortenObj", ["require", "exports", "fn/clone", "fn/each", "fn/isString", "fn/shorten"], function (require, exports, clone_1, each_23, isString_31, shorten_1) {
5492
+ define("fn/shortenObj", ["require", "exports", "fn/clone", "fn/each", "fn/isString", "fn/shorten"], function (require, exports, clone_1, each_23, isString_26, shorten_1) {
5453
5493
  "use strict";
5454
5494
  Object.defineProperty(exports, "__esModule", { value: true });
5455
5495
  exports.shortenObj = void 0;
5456
5496
  const shortenObj = function (obj, max = 100) {
5457
5497
  let o = (0, clone_1.clone)(obj);
5458
5498
  (0, each_23.each)(o, (a, n) => {
5459
- if ((0, isString_31.isString)(a) && (a.length > max)) {
5499
+ if ((0, isString_26.isString)(a) && a.length > max) {
5460
5500
  o[n] = (0, shorten_1.shorten)(a, max);
5461
5501
  }
5462
- else if (a && (typeof a === 'object')) {
5502
+ else if (a && typeof a === 'object') {
5463
5503
  o[n] = shortenObj(a);
5464
5504
  }
5465
5505
  });
@@ -5479,20 +5519,19 @@ var bbn = (() => {
5479
5519
  randomIndex = Math.floor(Math.random() * currentIndex);
5480
5520
  currentIndex--;
5481
5521
  // And swap it with the current element.
5482
- [array[currentIndex], array[randomIndex]] = [
5483
- array[randomIndex], array[currentIndex]
5484
- ];
5522
+ [array[currentIndex], array[randomIndex]] = [array[randomIndex], array[currentIndex]];
5485
5523
  }
5486
5524
  return array;
5487
5525
  };
5488
5526
  exports.shuffle = shuffle;
5489
5527
  });
5490
- define("fn/startChrono", ["require", "exports", "fn/each"], function (require, exports, each_24) {
5528
+ define("fn/chrono", ["require", "exports", "fn/each"], function (require, exports, each_24) {
5491
5529
  "use strict";
5492
5530
  Object.defineProperty(exports, "__esModule", { value: true });
5493
- exports.startChrono = void 0;
5531
+ exports.stopChrono = exports.startChrono = void 0;
5532
+ const _private = [];
5494
5533
  const startChrono = function (name) {
5495
- let now = (new Date()).getTime();
5534
+ let now = new Date().getTime();
5496
5535
  let h1 = 3600 * 1000;
5497
5536
  if (_private.length) {
5498
5537
  (0, each_24.each)(_private, (t, n) => {
@@ -5500,30 +5539,38 @@ var bbn = (() => {
5500
5539
  delete _private[n];
5501
5540
  }
5502
5541
  });
5503
- now = (new Date()).getTime();
5542
+ now = new Date().getTime();
5504
5543
  }
5505
5544
  _private[name] = now;
5506
5545
  };
5507
5546
  exports.startChrono = startChrono;
5547
+ const stopChrono = function (name) {
5548
+ if (_private[name]) {
5549
+ let now = new Date().getTime();
5550
+ let diff = now - _private[name];
5551
+ return diff;
5552
+ }
5553
+ };
5554
+ exports.stopChrono = stopChrono;
5508
5555
  });
5509
- define("fn/stat", ["require", "exports", "fn/getPath"], function (require, exports, getPath_1) {
5556
+ define("fn/stat", ["require", "exports"], function (require, exports) {
5510
5557
  "use strict";
5511
5558
  Object.defineProperty(exports, "__esModule", { value: true });
5512
5559
  exports.stat = void 0;
5513
5560
  const stat = function (returnStat) {
5514
5561
  return;
5562
+ /*
5515
5563
  if (bbn.env.logging) {
5516
- var logs = bbn.var.loggers;
5564
+ var logs = bbn.vars.loggers;
5517
5565
  for (var i = 0; i < arguments.length; i++) {
5518
- var a = arguments[i], type = typeof (a);
5519
- if ((type === 'boolean') || (type === 'undefined')) {
5566
+ var a = arguments[i],
5567
+ type = typeof a;
5568
+ if (type === 'boolean' || type === 'undefined') {
5520
5569
  break;
5521
- }
5522
- else {
5570
+ } else {
5523
5571
  if (type === 'object') {
5524
- a = (0, getPath_1.getPath)(a);
5525
- }
5526
- else {
5572
+ a = getPath(a);
5573
+ } else {
5527
5574
  a = a.toString();
5528
5575
  }
5529
5576
  if (!logs[a]) {
@@ -5556,22 +5603,10 @@ var bbn = (() => {
5556
5603
  }
5557
5604
  return returnStat;
5558
5605
  }
5606
+ */
5559
5607
  };
5560
5608
  exports.stat = stat;
5561
5609
  });
5562
- define("fn/stopChrono", ["require", "exports"], function (require, exports) {
5563
- "use strict";
5564
- Object.defineProperty(exports, "__esModule", { value: true });
5565
- exports.stopChrono = void 0;
5566
- const stopChrono = function (name) {
5567
- if (_private[name]) {
5568
- let now = (new Date()).getTime();
5569
- let diff = now - _private[name];
5570
- return diff;
5571
- }
5572
- };
5573
- exports.stopChrono = stopChrono;
5574
- });
5575
5610
  define("fn/string2ArrayBuffer", ["require", "exports"], function (require, exports) {
5576
5611
  "use strict";
5577
5612
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -5592,11 +5627,10 @@ var bbn = (() => {
5592
5627
  exports.sum = void 0;
5593
5628
  const sum = function (arr, numberProp, prop, val, operator) {
5594
5629
  let r = 0;
5595
- let isFunction = isFunction(numberProp);
5596
5630
  (0, each_25.each)((0, filter_5.filter)(arr, prop, val, operator), (a) => {
5597
- let tmp = isFunction ? numberProp(a) : a[numberProp];
5631
+ let tmp = typeof numberProp === 'function' ? numberProp(a) : a[numberProp];
5598
5632
  if (tmp) {
5599
- r += (parseFloat(tmp) || 0);
5633
+ r += parseFloat(tmp) || 0;
5600
5634
  }
5601
5635
  });
5602
5636
  return r;
@@ -5608,7 +5642,7 @@ var bbn = (() => {
5608
5642
  Object.defineProperty(exports, "__esModule", { value: true });
5609
5643
  exports.timestamp = void 0;
5610
5644
  const timestamp = function (seconds) {
5611
- var r = (new Date()).getTime();
5645
+ var r = new Date().getTime();
5612
5646
  return seconds ? Math.round(r / 1000) : r;
5613
5647
  };
5614
5648
  exports.timestamp = timestamp;
@@ -5648,7 +5682,7 @@ var bbn = (() => {
5648
5682
  }
5649
5683
  });
5650
5684
  if (i < total - 1) {
5651
- csvContent += rowSep + "\n";
5685
+ csvContent += rowSep + '\n';
5652
5686
  }
5653
5687
  });
5654
5688
  return csvContent;
@@ -5660,31 +5694,31 @@ var bbn = (() => {
5660
5694
  Object.defineProperty(exports, "__esModule", { value: true });
5661
5695
  exports.toggleFullScreen = void 0;
5662
5696
  const toggleFullScreen = function () {
5663
- if (window.document.documentElement.mozRequestFullScreen) {
5664
- if (window.document.mozFullScreen) {
5665
- window.document.mozCancelFullScreen();
5697
+ if ('mozRequestFullScreen' in window.document.documentElement) {
5698
+ if (window.document['mozFullScreen']) {
5699
+ window.document['mozCancelFullScreen']();
5666
5700
  }
5667
- else {
5701
+ else if (typeof window.document.documentElement.mozRequestFullScreen === 'function') {
5668
5702
  window.document.documentElement.mozRequestFullScreen();
5669
5703
  }
5670
5704
  }
5671
- else if (window.document.documentElement.webkitRequestFullScreen) {
5672
- if (window.document.webkitIsFullScreen) {
5673
- window.document.webkitCancelFullScreen();
5705
+ else if ('webkitRequestFullScreen' in window.document.documentElement) {
5706
+ if (window.document['webkitIsFullScreen']) {
5707
+ window.document['webkitCancelFullScreen']();
5674
5708
  }
5675
- else {
5709
+ else if (typeof window.document.documentElement.webkitRequestFullScreen === 'function') {
5676
5710
  window.document.documentElement.webkitRequestFullScreen();
5677
5711
  }
5678
5712
  }
5679
- else if (window.document.msRequestFullScreen) {
5680
- if (window.document.msFullscreenEnabled) {
5681
- window.document.msExitFullscreen();
5713
+ else if ('msRequestFullScreen' in window.document.documentElement) {
5714
+ if (window.document['msFullscreenEnabled']) {
5715
+ window.document['msExitFullscreen']();
5682
5716
  }
5683
- else {
5717
+ else if (typeof window.document.documentElement.msRequestFullScreen === 'function') {
5684
5718
  window.document.documentElement.msRequestFullScreen();
5685
5719
  }
5686
5720
  }
5687
- else if (window.document.requestFullscreen) {
5721
+ else if ('requestFullscreen' in window.document) {
5688
5722
  if (window.document.fullscreenEnabled) {
5689
5723
  window.document.exitFullscreen();
5690
5724
  }
@@ -5698,13 +5732,13 @@ var bbn = (() => {
5698
5732
  };
5699
5733
  exports.toggleFullScreen = toggleFullScreen;
5700
5734
  });
5701
- define("fn/translate", ["require", "exports", "fn/iterate"], function (require, exports, iterate_11) {
5735
+ define("fn/translate", ["require", "exports", "fn/iterate"], function (require, exports, iterate_10) {
5702
5736
  "use strict";
5703
5737
  Object.defineProperty(exports, "__esModule", { value: true });
5704
5738
  exports.translate = void 0;
5705
5739
  const translate = function (o, namespace) {
5706
5740
  let lng = namespace ? bbn.lng[namespace.indexOf('_') === 0 ? namespace : '_' + namespace] : bbn.lng;
5707
- (0, iterate_11.iterate)(o, (v, k) => {
5741
+ (0, iterate_10.iterate)(o, (v, k) => {
5708
5742
  lng[k] = v;
5709
5743
  });
5710
5744
  };
@@ -5720,7 +5754,7 @@ var bbn = (() => {
5720
5754
  if (!args[i]) {
5721
5755
  st += '__bbn_empty__';
5722
5756
  }
5723
- else if (typeof (args[i]) === 'object') {
5757
+ else if (typeof args[i] === 'object') {
5724
5758
  if ((0, isArray_18.isArray)(args[i])) {
5725
5759
  st += JSON.stringify(args[i]);
5726
5760
  }
@@ -5728,13 +5762,13 @@ var bbn = (() => {
5728
5762
  // An object with the same properties, even in different order, should produce the same answer
5729
5763
  let tmp = {};
5730
5764
  let ks = Object.keys(args[i]).sort();
5731
- (0, each_27.each)(ks, k => {
5765
+ (0, each_27.each)(ks, (k) => {
5732
5766
  tmp[k] = args[i][k];
5733
5767
  });
5734
5768
  st += JSON.stringify(tmp);
5735
5769
  }
5736
5770
  }
5737
- else if (typeof (args[i]) !== 'string') {
5771
+ else if (typeof args[i] !== 'string') {
5738
5772
  st += args[i].toString();
5739
5773
  }
5740
5774
  else {
@@ -5745,7 +5779,7 @@ var bbn = (() => {
5745
5779
  };
5746
5780
  exports.uniqString = uniqString;
5747
5781
  });
5748
- define("fn/upload", ["require", "exports", "fn/objectToFormData", "fn/log"], function (require, exports, objectToFormData_1, log_21) {
5782
+ define("fn/upload", ["require", "exports", "fn/objectToFormData", "fn/log"], function (require, exports, objectToFormData_1, log_18) {
5749
5783
  "use strict";
5750
5784
  Object.defineProperty(exports, "__esModule", { value: true });
5751
5785
  exports.upload = void 0;
@@ -5753,14 +5787,14 @@ var bbn = (() => {
5753
5787
  let fn = () => {
5754
5788
  return axios.post(url || bbn.env.path, (0, objectToFormData_1.objectToFormData)(file), {
5755
5789
  headers: {
5756
- 'Content-Type': 'multipart/form-data'
5790
+ 'Content-Type': 'multipart/form-data',
5757
5791
  },
5758
5792
  onUploadProgress(progressEvent) {
5759
5793
  if (progress) {
5760
5794
  let percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total);
5761
5795
  progress(percentCompleted, progressEvent.loaded, progressEvent.total);
5762
5796
  }
5763
- }
5797
+ },
5764
5798
  });
5765
5799
  };
5766
5800
  if (!success && !failure) {
@@ -5768,15 +5802,15 @@ var bbn = (() => {
5768
5802
  }
5769
5803
  else {
5770
5804
  return fn()
5771
- .then(res => {
5805
+ .then((res) => {
5772
5806
  if (success) {
5773
- (0, log_21.log)("SUCCESS", res);
5807
+ (0, log_18.log)('SUCCESS', res);
5774
5808
  success(res);
5775
5809
  }
5776
5810
  })
5777
- .catch(err => {
5811
+ .catch((err) => {
5778
5812
  if (failure) {
5779
- (0, log_21.log)("ERROR", err);
5813
+ (0, log_18.log)('ERROR', err);
5780
5814
  failure(err);
5781
5815
  }
5782
5816
  });
@@ -5784,7 +5818,7 @@ var bbn = (() => {
5784
5818
  };
5785
5819
  exports.upload = upload;
5786
5820
  });
5787
- define("index", ["require", "exports", "fn/_addLoader", "fn/_compareValues", "fn/_deleteLoader", "fn/abort", "fn/abortURL", "fn/addColors", "fn/addInputs", "fn/addStyle", "fn/adjustHeight", "fn/adjustSize", "fn/adjustWidth", "fn/ajax", "fn/analyzeFunction", "fn/animateCss", "fn/arrayBuffer2String", "fn/arrayFromProp", "fn/autoExtend", "fn/baseName", "fn/br2nl", "fn/calendar", "fn/callback", "fn/camelize", "fn/camelToCss", "fn/canvasToImage", "fn/center", "fn/checkProps", "fn/checkPropsDetails", "fn/checkPropsOrDie", "fn/checkType", "fn/circularReplacer", "fn/clone", "fn/colorToHex", "fn/compare", "fn/compareConditions", "fn/copy", "fn/correctCase", "fn/count", "fn/crc32", "fn/createObject", "fn/cssExists", "fn/date", "fn/dateSQL", "fn/daysInMonth", "fn/deepPath", "fn/defaultAjaxAbortFunction", "fn/defaultAjaxErrorFunction", "fn/defaultAlertFunction", "fn/defaultConfirmFunction", "fn/defaultEndLoadingFunction", "fn/defaultErrorFunction", "fn/defaultHistoryFunction", "fn/defaultLinkFunction", "fn/defaultPostLinkFunction", "fn/defaultPreLinkFunction", "fn/defaultResizeFunction", "fn/defaultStartLoadingFunction", "fn/deleteProp", "fn/diffObj", "fn/dirName", "fn/download", "fn/downloadContent", "fn/each", "fn/eraseCookie", "fn/error", "fn/escapeDquotes", "fn/escapeRegExp", "fn/escapeSquotes", "fn/escapeTicks", "fn/escapeUrl", "fn/extend", "fn/extendOut", "fn/fdate", "fn/fdatetime", "fn/fieldValue", "fn/fileExt", "fn/filter", "fn/filterToConditions", "fn/findAll", "fn/fori", "fn/forir", "fn/format", "fn/formatBytes", "fn/formatDate", "fn/formatSize", "fn/formdata", "fn/fromXml", "fn/ftime", "fn/getAllTags", "fn/getAncestors", "fn/getAttributes", "fn/getBrowserName", "fn/getBrowserVersion", "fn/getCookie", "fn/getCssVar", "fn/getDay", "fn/getDeviceType", "fn/getEventData", "fn/getField", "fn/getFieldValues", "fn/getHtml", "fn/getHTMLOfSelection", "fn/getLoader", "fn/getPath", "fn/getProp", "fn/getProperty", "fn/getRequestId", "fn/getRow", "fn/getScrollBarSize", "fn/getText", "fn/getTimeoff", "fn/happy", "fn/hash", "fn/hex2rgb", "fn/history", "fn/html2text", "fn/imageToCanvas", "fn/imgToBase64", "fn/info", "fn/init", "fn/isActiveInterface", "fn/isArray", "fn/isBlob", "fn/isBoolean", "fn/isCanvas", "fn/isColor", "fn/isComment", "fn/isCp", "fn/isDate", "fn/isDesktopDevice", "fn/isDimension", "fn/isDom", "fn/isEmail", "fn/isEmpty", "fn/isEvent", "fn/isFocused", "fn/isFunction", "fn/isHostname", "fn/isInside", "fn/isInt", "fn/isIP", "fn/isIterable", "fn/isMobile", "fn/isMobileDevice", "fn/isNull", "fn/isNumber", "fn/isObject", "fn/isPercent", "fn/isPrimitive", "fn/isPromise", "fn/isPropSize", "fn/isSame", "fn/isSQLDate", "fn/isString", "fn/isSymbol", "fn/isTabletDevice", "fn/isURL", "fn/isValidDimension", "fn/isValidName", "fn/isValue", "fn/isVue", "fn/iterate", "fn/lightenDarkenHex", "fn/link", "fn/log", "fn/makeReactive", "fn/map", "fn/md5", "fn/money", "fn/move", "fn/multiorder", "fn/nl2br", "fn/numProperties", "fn/objectToFormData", "fn/order", "fn/outerHeight", "fn/outerWidth", "fn/percent", "fn/pickValue", "fn/post", "fn/postOut", "fn/printf", "fn/quotes2html", "fn/randomInt", "fn/randomString", "fn/removeAccents", "fn/removeEmpty", "fn/removeExtraSpaces", "fn/removeHtmlComments", "fn/removePrivateProp", "fn/removeTrailingChars", "fn/repeat", "fn/replaceAll", "fn/replaceSelection", "fn/resize", "fn/rgb2hex", "fn/riterate", "fn/roundDecimal", "fn/sanitize", "fn/search", "fn/selectElementText", "fn/selector", "fn/setCookie", "fn/setCssVar", "fn/setNavigationVars", "fn/setProp", "fn/setProperty", "fn/shorten", "fn/shortenObj", "fn/shuffle", "fn/simpleHash", "fn/simpleHash1", "fn/simpleHash2", "fn/startChrono", "fn/stat", "fn/stopChrono", "fn/string2ArrayBuffer", "fn/submit", "fn/substr", "fn/sum", "fn/timestamp", "fn/toCSV", "fn/toggleFullScreen", "fn/translate", "fn/treatAjaxArguments", "fn/trim", "fn/uniqString", "fn/unique", "fn/upload", "fn/warning"], function (require, exports, _addLoader_2, _compareValues_3, _deleteLoader_2, abort_1, abortURL_1, addColors_2, addInputs_2, addStyle_1, adjustHeight_1, adjustSize_3, adjustWidth_1, ajax_4, analyzeFunction_1, animateCss_1, arrayBuffer2String_1, arrayFromProp_1, autoExtend_1, baseName_3, br2nl_1, calendar_1, callback_3, camelize_1, camelToCss_1, canvasToImage_2, center_1, checkProps_1, checkPropsDetails_3, checkPropsOrDie_1, checkType_3, circularReplacer_2, clone_2, colorToHex_1, compare_1, compareConditions_3, copy_1, correctCase_2, count_1, crc32_1, createObject_4, cssExists_1, date_7, dateSQL_1, daysInMonth_1, deepPath_1, defaultAjaxAbortFunction_2, defaultAjaxErrorFunction_3, defaultAlertFunction_2, defaultConfirmFunction_1, defaultEndLoadingFunction_2, defaultErrorFunction_1, defaultHistoryFunction_2, defaultLinkFunction_2, defaultPostLinkFunction_2, defaultPreLinkFunction_2, defaultResizeFunction_2, defaultStartLoadingFunction_2, deleteProp_1, diffObj_1, dirName_2, download_1, downloadContent_2, each_28, eraseCookie_1, error_4, escapeDquotes_1, escapeRegExp_3, escapeSquotes_1, escapeTicks_1, escapeUrl_1, extend_8, extendOut_1, fdate_2, fdatetime_2, fieldValue_2, fileExt_2, filter_6, filterToConditions_3, findAll_1, fori_1, forir_1, format_1, formatBytes_1, formatDate_1, formatSize_1, formdata_2, fromXml_1, ftime_1, getAllTags_1, getAncestors_2, getAttributes_1, getBrowserName_1, getBrowserVersion_1, getCookie_1, getCssVar_2, getDay_1, getDeviceType_1, getEventData_1, getField_1, getFieldValues_1, getHtml_1, getHTMLOfSelection_2, getLoader_4, getPath_2, getProp_1, getProperty_4, getRequestId_2, getRow_2, getScrollBarSize_1, getText_1, getTimeoff_1, happy_1, hash_2, hex2rgb_1, history_1, html2text_2, imageToCanvas_2, imgToBase64_1, info_1, init_1, isActiveInterface_1, isArray_19, isBlob_2, isBoolean_1, isCanvas_2, isColor_1, isComment_1, isCp_6, isDate_8, isDesktopDevice_1, isDimension_1, isDom_5, isEmail_1, isEmpty_2, isEvent_1, isFocused_1, isFunction_14, isHostname_1, isInside_1, isInt_2, isIP_2, isIterable_5, isMobile_2, isMobileDevice_2, isNull_4, isNumber_9, isObject_20, isPercent_1, isPrimitive_1, isPromise_1, isPropSize_1, isSame_3, isSQLDate_1, isString_32, isSymbol_2, isTabletDevice_3, isURL_1, isValidDimension_2, isValidName_1, isValue_2, isVue_1, iterate_12, lightenDarkenHex_1, link_2, log_22, makeReactive_1, map_1, md5_4, money_1, move_1, multiorder_1, nl2br_1, numProperties_9, objectToFormData_2, order_1, outerHeight_1, outerWidth_1, percent_1, pickValue_1, post_2, postOut_1, printf_1, quotes2html_1, randomInt_2, randomString_1, removeAccents_4, removeEmpty_1, removeExtraSpaces_1, removeHtmlComments_2, removePrivateProp_2, removeTrailingChars_1, repeat_1, replaceAll_8, replaceSelection_1, resize_3, rgb2hex_1, riterate_1, roundDecimal_1, sanitize_1, search_6, selectElementText_1, selector_3, setCookie_1, setCssVar_1, setNavigationVars_2, setProp_1, setProperty_1, shorten_2, shortenObj_1, shuffle_1, simpleHash_2, simpleHash1_2, simpleHash2_2, startChrono_1, stat_1, stopChrono_1, string2ArrayBuffer_1, submit_2, substr_16, sum_1, timestamp_1, toCSV_1, toggleFullScreen_1, translate_1, treatAjaxArguments_3, trim_2, uniqString_1, unique_2, upload_1, warning_2) {
5821
+ define("index", ["require", "exports", "fn/_addLoader", "fn/_compareValues", "fn/_deleteLoader", "fn/abort", "fn/abortURL", "fn/addColors", "fn/addInputs", "fn/addStyle", "fn/adjustHeight", "fn/adjustSize", "fn/adjustWidth", "fn/ajax", "fn/analyzeFunction", "fn/animateCss", "fn/arrayBuffer2String", "fn/arrayFromProp", "fn/autoExtend", "fn/baseName", "fn/br2nl", "fn/calendar", "fn/callback", "fn/camelize", "fn/camelToCss", "fn/canvasToImage", "fn/center", "fn/checkProps", "fn/checkPropsDetails", "fn/checkPropsOrDie", "fn/checkType", "fn/circularReplacer", "fn/clone", "fn/colorToHex", "fn/compare", "fn/compareConditions", "fn/copy", "fn/correctCase", "fn/count", "fn/crc32", "fn/createObject", "fn/cssExists", "fn/date", "fn/dateSQL", "fn/daysInMonth", "fn/deepPath", "fn/defaultAjaxAbortFunction", "fn/defaultAjaxErrorFunction", "fn/defaultAlertFunction", "fn/defaultConfirmFunction", "fn/defaultEndLoadingFunction", "fn/defaultErrorFunction", "fn/defaultHistoryFunction", "fn/defaultLinkFunction", "fn/defaultPostLinkFunction", "fn/defaultPreLinkFunction", "fn/defaultResizeFunction", "fn/defaultStartLoadingFunction", "fn/deleteProp", "fn/diffObj", "fn/dirName", "fn/download", "fn/downloadContent", "fn/each", "fn/eraseCookie", "fn/error", "fn/escapeDquotes", "fn/escapeRegExp", "fn/escapeSquotes", "fn/escapeTicks", "fn/escapeUrl", "fn/extend", "fn/extendOut", "fn/fdate", "fn/fdatetime", "fn/fieldValue", "fn/fileExt", "fn/filter", "fn/filterToConditions", "fn/findAll", "fn/fori", "fn/forir", "fn/format", "fn/formatBytes", "fn/formatDate", "fn/formatSize", "fn/formdata", "fn/fromXml", "fn/ftime", "fn/getAllTags", "fn/getAncestors", "fn/getAttributes", "fn/getBrowserName", "fn/getBrowserVersion", "fn/getCookie", "fn/getCssVar", "fn/getDay", "fn/getDeviceType", "fn/getEventData", "fn/getField", "fn/getFieldValues", "fn/getHtml", "fn/getHTMLOfSelection", "fn/getLoader", "fn/getPath", "fn/getProp", "fn/getProperty", "fn/getRequestId", "fn/getRow", "fn/getScrollBarSize", "fn/getText", "fn/getTimeoff", "fn/happy", "fn/hash", "fn/hex2rgb", "fn/history", "fn/html2text", "fn/imageToCanvas", "fn/imgToBase64", "fn/info", "fn/init", "fn/isActiveInterface", "fn/isArray", "fn/isBlob", "fn/isBoolean", "fn/isCanvas", "fn/isColor", "fn/isComment", "fn/isCp", "fn/isDate", "fn/isDesktopDevice", "fn/isDimension", "fn/isDom", "fn/isEmail", "fn/isEmpty", "fn/isEvent", "fn/isFocused", "fn/isFunction", "fn/isHostname", "fn/isInside", "fn/isInt", "fn/isIP", "fn/isIterable", "fn/isMobile", "fn/isMobileDevice", "fn/isNull", "fn/isNumber", "fn/isObject", "fn/isPercent", "fn/isPrimitive", "fn/isPromise", "fn/isPropSize", "fn/isSame", "fn/isSQLDate", "fn/isString", "fn/isSymbol", "fn/isTabletDevice", "fn/isURL", "fn/isValidDimension", "fn/isValidName", "fn/isValue", "fn/isVue", "fn/iterate", "fn/lightenDarkenHex", "fn/link", "fn/log", "fn/makeReactive", "fn/map", "fn/md5", "fn/money", "fn/move", "fn/multiorder", "fn/nl2br", "fn/numProperties", "fn/objectToFormData", "fn/order", "fn/outerHeight", "fn/outerWidth", "fn/percent", "fn/pickValue", "fn/post", "fn/postOut", "fn/printf", "fn/quotes2html", "fn/randomInt", "fn/randomString", "fn/removeAccents", "fn/removeEmpty", "fn/removeExtraSpaces", "fn/removeHtmlComments", "fn/removePrivateProp", "fn/removeTrailingChars", "fn/repeat", "fn/replaceAll", "fn/replaceSelection", "fn/resize", "fn/rgb2hex", "fn/riterate", "fn/roundDecimal", "fn/sanitize", "fn/search", "fn/selectElementText", "fn/selector", "fn/setCookie", "fn/setCssVar", "fn/setNavigationVars", "fn/setProp", "fn/setProperty", "fn/shorten", "fn/shortenObj", "fn/shuffle", "fn/simpleHash", "fn/simpleHash1", "fn/simpleHash2", "fn/chrono", "fn/stat", "fn/string2ArrayBuffer", "fn/submit", "fn/substr", "fn/sum", "fn/timestamp", "fn/toCSV", "fn/toggleFullScreen", "fn/translate", "fn/treatAjaxArguments", "fn/trim", "fn/uniqString", "fn/unique", "fn/upload", "fn/warning"], function (require, exports, _addLoader_2, _compareValues_3, _deleteLoader_2, abort_1, abortURL_1, addColors_2, addInputs_2, addStyle_1, adjustHeight_1, adjustSize_3, adjustWidth_1, ajax_4, analyzeFunction_1, animateCss_1, arrayBuffer2String_1, arrayFromProp_1, autoExtend_1, baseName_3, br2nl_1, calendar_1, callback_3, camelize_1, camelToCss_1, canvasToImage_1, center_1, checkProps_1, checkPropsDetails_3, checkPropsOrDie_1, checkType_5, circularReplacer_2, clone_2, colorToHex_1, compare_1, compareConditions_3, copy_1, correctCase_2, count_1, crc32_1, createObject_4, cssExists_1, date_8, dateSQL_1, daysInMonth_1, deepPath_1, defaultAjaxAbortFunction_2, defaultAjaxErrorFunction_3, defaultAlertFunction_2, defaultConfirmFunction_1, defaultEndLoadingFunction_2, defaultErrorFunction_2, defaultHistoryFunction_2, defaultLinkFunction_2, defaultPostLinkFunction_2, defaultPreLinkFunction_2, defaultResizeFunction_2, defaultStartLoadingFunction_2, deleteProp_1, diffObj_1, dirName_2, download_1, downloadContent_2, each_28, eraseCookie_1, error_4, escapeDquotes_1, escapeRegExp_3, escapeSquotes_1, escapeTicks_1, escapeUrl_1, extend_7, extendOut_1, fdate_2, fdatetime_2, fieldValue_2, fileExt_2, filter_6, filterToConditions_3, findAll_1, fori_1, forir_1, format_1, formatBytes_1, formatDate_1, formatSize_1, formdata_2, fromXml_1, ftime_1, getAllTags_1, getAncestors_2, getAttributes_1, getBrowserName_1, getBrowserVersion_1, getCookie_1, getCssVar_2, getDay_1, getDeviceType_1, getEventData_1, getField_1, getFieldValues_1, getHtml_1, getHTMLOfSelection_2, getLoader_4, getPath_1, getProp_1, getProperty_4, getRequestId_2, getRow_3, getScrollBarSize_1, getText_1, getTimeoff_1, happy_1, hash_2, hex2rgb_1, history_1, html2text_2, imageToCanvas_2, imgToBase64_1, info_1, init_1, isActiveInterface_1, isArray_19, isBlob_2, isBoolean_1, isCanvas_2, isColor_1, isComment_1, isCp_3, isDate_8, isDesktopDevice_1, isDimension_1, isDom_5, isEmail_1, isEmpty_2, isEvent_1, isFocused_1, isFunction_12, isHostname_1, isInside_1, isInt_2, isIP_2, isIterable_5, isMobile_2, isMobileDevice_2, isNull_4, isNumber_10, isObject_18, isPercent_1, isPrimitive_1, isPromise_1, isPropSize_1, isSame_3, isSQLDate_1, isString_27, isSymbol_2, isTabletDevice_3, isURL_1, isValidDimension_2, isValidName_1, isValue_2, isVue_1, iterate_11, lightenDarkenHex_1, link_2, log_19, makeReactive_1, map_1, md5_4, money_1, move_1, multiorder_1, nl2br_1, numProperties_8, objectToFormData_2, order_1, outerHeight_1, outerWidth_1, percent_1, pickValue_1, post_2, postOut_1, printf_1, quotes2html_1, randomInt_2, randomString_1, removeAccents_4, removeEmpty_1, removeExtraSpaces_1, removeHtmlComments_2, removePrivateProp_2, removeTrailingChars_1, repeat_1, replaceAll_8, replaceSelection_1, resize_3, rgb2hex_1, riterate_1, roundDecimal_1, sanitize_1, search_6, selectElementText_1, selector_3, setCookie_1, setCssVar_1, setNavigationVars_2, setProp_1, setProperty_1, shorten_2, shortenObj_1, shuffle_1, simpleHash_2, simpleHash1_2, simpleHash2_2, chrono_1, stat_1, string2ArrayBuffer_1, submit_2, substr_16, sum_1, timestamp_1, toCSV_1, toggleFullScreen_1, translate_1, treatAjaxArguments_3, trim_2, uniqString_1, unique_2, upload_1, warning_2) {
5788
5822
  "use strict";
5789
5823
  Object.defineProperty(exports, "__esModule", { value: true });
5790
5824
  exports.fn = exports.env = exports.vars = exports.app = exports.lng = exports._popups = exports.$ = exports._ = exports.opt = exports.version = void 0;
@@ -5800,10 +5834,9 @@ var bbn = (() => {
5800
5834
  * @param {String} st
5801
5835
  * @returns {String}
5802
5836
  */
5803
- const _ = (st) => {
5804
- bbn.fn.checkType(st, 'string', "Undeerscore function takes strings as arguments");
5837
+ const _ = (...args) => {
5838
+ let st = args.shift();
5805
5839
  let res = bbn.lng[st] || st;
5806
- let args = Array.prototype.slice.call(arguments, 1);
5807
5840
  if (args.length) {
5808
5841
  let i = 0;
5809
5842
  return res.replace(/\%([d|s])/g, (match, type) => {
@@ -5811,7 +5844,7 @@ var bbn = (() => {
5811
5844
  if (!tmp) {
5812
5845
  tmp = type === 'd' ? 0 : '';
5813
5846
  }
5814
- bbn.fn.checkType(tmp, type === 'd' ? 'number' : 'string', bbn._("The value you gave did not correspond, check the loggg"));
5847
+ (0, checkType_5.checkType)(tmp, type === 'd' ? 'number' : 'string', bbn._("The value you gave did not correspond, check the loggg"));
5815
5848
  return tmp;
5816
5849
  });
5817
5850
  }
@@ -5907,6 +5940,7 @@ var bbn = (() => {
5907
5940
  red: '#db3340',
5908
5941
  brown: '#8c6954'
5909
5942
  },
5943
+ reserved: ['abstract', 'boolean', 'break', 'byte', 'case', 'catch', 'char', 'class', 'continue', 'const', 'debugger', 'default', 'delete', 'do', 'double', 'else', 'enum', 'export', 'extends', 'false', 'final', 'finally', 'float', 'for', 'function', 'goto', 'if', 'implements', 'import', 'in', 'instanceof', 'int', 'interface', 'long', 'native', 'new', 'null', 'package', 'private', 'protected', 'public', 'return', 'short', 'static', 'super', 'switch', 'synchronized', 'this', 'throw', 'throws', 'transient', 'true', 'try', 'typeof', 'var', 'void', 'while', 'with'],
5910
5944
  mockText: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
5911
5945
  regexp: {
5912
5946
  url: new RegExp('^(https?:\\/\\/)?' + // protocol
@@ -5987,12 +6021,12 @@ var bbn = (() => {
5987
6021
  callback: callback_3.callback,
5988
6022
  camelize: camelize_1.camelize,
5989
6023
  camelToCss: camelToCss_1.camelToCss,
5990
- canvasToImage: canvasToImage_2.canvasToImage,
6024
+ canvasToImage: canvasToImage_1.canvasToImage,
5991
6025
  center: center_1.center,
5992
6026
  checkProps: checkProps_1.checkProps,
5993
6027
  checkPropsDetails: checkPropsDetails_3.checkPropsDetails,
5994
6028
  checkPropsOrDie: checkPropsOrDie_1.checkPropsOrDie,
5995
- checkType: checkType_3.checkType,
6029
+ checkType: checkType_5.checkType,
5996
6030
  circularReplacer: circularReplacer_2.circularReplacer,
5997
6031
  clone: clone_2.clone,
5998
6032
  colorToHex: colorToHex_1.colorToHex,
@@ -6004,7 +6038,7 @@ var bbn = (() => {
6004
6038
  crc32: crc32_1.crc32,
6005
6039
  createObject: createObject_4.createObject,
6006
6040
  cssExists: cssExists_1.cssExists,
6007
- date: date_7.date,
6041
+ date: date_8.date,
6008
6042
  dateSQL: dateSQL_1.dateSQL,
6009
6043
  daysInMonth: daysInMonth_1.daysInMonth,
6010
6044
  deepPath: deepPath_1.deepPath,
@@ -6013,7 +6047,7 @@ var bbn = (() => {
6013
6047
  defaultAlertFunction: defaultAlertFunction_2.defaultAlertFunction,
6014
6048
  defaultConfirmFunction: defaultConfirmFunction_1.defaultConfirmFunction,
6015
6049
  defaultEndLoadingFunction: defaultEndLoadingFunction_2.defaultEndLoadingFunction,
6016
- defaultErrorFunction: defaultErrorFunction_1.defaultErrorFunction,
6050
+ defaultErrorFunction: defaultErrorFunction_2.defaultErrorFunction,
6017
6051
  defaultHistoryFunction: defaultHistoryFunction_2.defaultHistoryFunction,
6018
6052
  defaultLinkFunction: defaultLinkFunction_2.defaultLinkFunction,
6019
6053
  defaultPostLinkFunction: defaultPostLinkFunction_2.defaultPostLinkFunction,
@@ -6033,7 +6067,7 @@ var bbn = (() => {
6033
6067
  escapeSquotes: escapeSquotes_1.escapeSquotes,
6034
6068
  escapeTicks: escapeTicks_1.escapeTicks,
6035
6069
  escapeUrl: escapeUrl_1.escapeUrl,
6036
- extend: extend_8.extend,
6070
+ extend: extend_7.extend,
6037
6071
  extendOut: extendOut_1.extendOut,
6038
6072
  fdate: fdate_2.fdate,
6039
6073
  fdatetime: fdatetime_2.fdatetime,
@@ -6066,11 +6100,11 @@ var bbn = (() => {
6066
6100
  getHtml: getHtml_1.getHtml,
6067
6101
  getHTMLOfSelection: getHTMLOfSelection_2.getHTMLOfSelection,
6068
6102
  getLoader: getLoader_4.getLoader,
6069
- getPath: getPath_2.getPath,
6103
+ getPath: getPath_1.getPath,
6070
6104
  getProp: getProp_1.getProp,
6071
6105
  getProperty: getProperty_4.getProperty,
6072
6106
  getRequestId: getRequestId_2.getRequestId,
6073
- getRow: getRow_2.getRow,
6107
+ getRow: getRow_3.getRow,
6074
6108
  getScrollBarSize: getScrollBarSize_1.getScrollBarSize,
6075
6109
  getText: getText_1.getText,
6076
6110
  getTimeoff: getTimeoff_1.getTimeoff,
@@ -6090,7 +6124,7 @@ var bbn = (() => {
6090
6124
  isCanvas: isCanvas_2.isCanvas,
6091
6125
  isColor: isColor_1.isColor,
6092
6126
  isComment: isComment_1.isComment,
6093
- isCp: isCp_6.isCp,
6127
+ isCp: isCp_3.isCp,
6094
6128
  isDate: isDate_8.isDate,
6095
6129
  isDesktopDevice: isDesktopDevice_1.isDesktopDevice,
6096
6130
  isDimension: isDimension_1.isDimension,
@@ -6099,7 +6133,7 @@ var bbn = (() => {
6099
6133
  isEmpty: isEmpty_2.isEmpty,
6100
6134
  isEvent: isEvent_1.isEvent,
6101
6135
  isFocused: isFocused_1.isFocused,
6102
- isFunction: isFunction_14.isFunction,
6136
+ isFunction: isFunction_12.isFunction,
6103
6137
  isHostname: isHostname_1.isHostname,
6104
6138
  isInside: isInside_1.isInside,
6105
6139
  isInt: isInt_2.isInt,
@@ -6108,15 +6142,15 @@ var bbn = (() => {
6108
6142
  isMobile: isMobile_2.isMobile,
6109
6143
  isMobileDevice: isMobileDevice_2.isMobileDevice,
6110
6144
  isNull: isNull_4.isNull,
6111
- isNumber: isNumber_9.isNumber,
6112
- isObject: isObject_20.isObject,
6145
+ isNumber: isNumber_10.isNumber,
6146
+ isObject: isObject_18.isObject,
6113
6147
  isPercent: isPercent_1.isPercent,
6114
6148
  isPrimitive: isPrimitive_1.isPrimitive,
6115
6149
  isPromise: isPromise_1.isPromise,
6116
6150
  isPropSize: isPropSize_1.isPropSize,
6117
6151
  isSame: isSame_3.isSame,
6118
6152
  isSQLDate: isSQLDate_1.isSQLDate,
6119
- isString: isString_32.isString,
6153
+ isString: isString_27.isString,
6120
6154
  isSymbol: isSymbol_2.isSymbol,
6121
6155
  isTabletDevice: isTabletDevice_3.isTabletDevice,
6122
6156
  isURL: isURL_1.isURL,
@@ -6124,10 +6158,10 @@ var bbn = (() => {
6124
6158
  isValidName: isValidName_1.isValidName,
6125
6159
  isValue: isValue_2.isValue,
6126
6160
  isVue: isVue_1.isVue,
6127
- iterate: iterate_12.iterate,
6161
+ iterate: iterate_11.iterate,
6128
6162
  lightenDarkenHex: lightenDarkenHex_1.lightenDarkenHex,
6129
6163
  link: link_2.link,
6130
- log: log_22.log,
6164
+ log: log_19.log,
6131
6165
  makeReactive: makeReactive_1.makeReactive,
6132
6166
  map: map_1.map,
6133
6167
  md5: md5_4.md5,
@@ -6135,7 +6169,7 @@ var bbn = (() => {
6135
6169
  move: move_1.move,
6136
6170
  multiorder: multiorder_1.multiorder,
6137
6171
  nl2br: nl2br_1.nl2br,
6138
- numProperties: numProperties_9.numProperties,
6172
+ numProperties: numProperties_8.numProperties,
6139
6173
  objectToFormData: objectToFormData_2.objectToFormData,
6140
6174
  order: order_1.order,
6141
6175
  outerHeight: outerHeight_1.outerHeight,
@@ -6176,9 +6210,9 @@ var bbn = (() => {
6176
6210
  simpleHash: simpleHash_2.simpleHash,
6177
6211
  simpleHash1: simpleHash1_2.simpleHash1,
6178
6212
  simpleHash2: simpleHash2_2.simpleHash2,
6179
- startChrono: startChrono_1.startChrono,
6213
+ startChrono: chrono_1.startChrono,
6180
6214
  stat: stat_1.stat,
6181
- stopChrono: stopChrono_1.stopChrono,
6215
+ stopChrono: chrono_1.stopChrono,
6182
6216
  string2ArrayBuffer: string2ArrayBuffer_1.string2ArrayBuffer,
6183
6217
  submit: submit_2.submit,
6184
6218
  substr: substr_16.substr,