@kissflow/lowcode-client-sdk 1.0.1 → 1.0.2-beta.8

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.
@@ -333,6 +333,16 @@ var Component = /** @class */ (function (_super) {
333
333
  id: this.id
334
334
  });
335
335
  };
336
+ Component.prototype.show = function () {
337
+ return this._postMessageAsync(constants_1.LISTENER_CMDS.COMPONENT_SHOW, {
338
+ id: this.id
339
+ });
340
+ };
341
+ Component.prototype.hide = function () {
342
+ return this._postMessageAsync(constants_1.LISTENER_CMDS.COMPONENT_HIDE, {
343
+ id: this.id
344
+ });
345
+ };
336
346
  return Component;
337
347
  }(base_1.BaseSDK));
338
348
  exports.Component = Component;
@@ -357,7 +367,12 @@ exports.LISTENER_CMDS = {
357
367
  //Forms SDK Functions
358
368
  GET_FORM_FIELD: "GET_FORM_FIELD",
359
369
  UPDATE_FORM: "UPDATE_FORM",
370
+ GET_TABLE: "GET_TABLE",
371
+ GET_TABLE_ROW: "GET_TABLE_ROW",
360
372
  ADD_TABLE_ROW: "ADD_TABLE_ROW",
373
+ DELETE_TABLE_ROW: "DELETE_TABLE_ROW",
374
+ TO_JSON: "TO_JSON",
375
+ GET_TABLE_ROWS: "GET_TABLE_ROWS",
361
376
  //Client SDK functions
362
377
  MESSAGE: "MESSAGE",
363
378
  CONFIRM: "CONFIRM",
@@ -379,7 +394,9 @@ exports.LISTENER_CMDS = {
379
394
  GET_PAGE_PARAMS: "GET_PAGE_PARAMS",
380
395
  OPEN_POPUP_PAGE: "OPEN_POPUP_PAGE",
381
396
  PAGE_ON_CLOSE: "PAGE_ON_CLOSE",
382
- COMPONENT_REFRESH: "COMPONENT_REFRESH"
397
+ COMPONENT_REFRESH: "COMPONENT_REFRESH",
398
+ COMPONENT_SHOW: "COMPONENT_SHOW",
399
+ COMPONENT_HIDE: "COMPONENT_HIDE"
383
400
  };
384
401
  exports.EVENT_TYPES = {
385
402
  ON_CLOSE: "onClose",
@@ -413,16 +430,24 @@ var __extends = (this && this.__extends) || (function () {
413
430
  };
414
431
  })();
415
432
  Object.defineProperty(exports, "__esModule", ({ value: true }));
416
- exports.Form = void 0;
433
+ exports.TableForm = exports.Form = void 0;
417
434
  var base_1 = __webpack_require__(/*! ./base */ "./src/base.ts");
418
435
  var constants_1 = __webpack_require__(/*! ./constants */ "./src/constants.ts");
419
436
  var Form = /** @class */ (function (_super) {
420
437
  __extends(Form, _super);
421
- function Form() {
422
- return _super !== null && _super.apply(this, arguments) || this;
438
+ function Form(instanceId) {
439
+ var _this = _super.call(this, {}) || this;
440
+ _this.instanceId = instanceId;
441
+ return _this;
423
442
  }
443
+ Form.prototype.toJSON = function () {
444
+ return this._postMessageAsync(constants_1.LISTENER_CMDS.TO_JSON, {
445
+ instanceId: this.instanceId
446
+ });
447
+ };
424
448
  Form.prototype.getField = function (fieldId) {
425
449
  return this._postMessageAsync(constants_1.LISTENER_CMDS.GET_FORM_FIELD, {
450
+ instanceId: this.instanceId,
426
451
  fieldId: fieldId
427
452
  });
428
453
  };
@@ -431,15 +456,89 @@ var Form = /** @class */ (function (_super) {
431
456
  data: args
432
457
  });
433
458
  };
434
- Form.prototype.addTableRow = function (tableId, rowObject) {
459
+ Form.prototype.getTable = function (tableId) {
460
+ return new Table(this.instanceId, tableId);
461
+ };
462
+ return Form;
463
+ }(base_1.BaseSDK));
464
+ exports.Form = Form;
465
+ var Table = /** @class */ (function (_super) {
466
+ __extends(Table, _super);
467
+ function Table(instanceId, tableId) {
468
+ var _this = _super.call(this, {}) || this;
469
+ _this.tableId = tableId;
470
+ _this.instanceId = instanceId;
471
+ return _this;
472
+ }
473
+ // list of obj of rows
474
+ Table.prototype.toJSON = function () {
475
+ return this._postMessageAsync(constants_1.LISTENER_CMDS.TO_JSON, {
476
+ tableId: this.tableId
477
+ });
478
+ };
479
+ Table.prototype.getRows = function () {
480
+ var _this = this;
481
+ // list of TableForm class
482
+ return this._postMessageAsync(constants_1.LISTENER_CMDS.GET_TABLE_ROWS, { tableId: this.tableId }, true, // has callBack
483
+ function (data) {
484
+ console.log(data);
485
+ return data.map(function (row) { return new TableForm(_this.instanceId, _this.tableId, row.id); });
486
+ });
487
+ };
488
+ Table.prototype.getRow = function (rowId) {
489
+ return new TableForm(this.instanceId, this.tableId, rowId);
490
+ };
491
+ Table.prototype.addRow = function (rowObject) {
435
492
  return this._postMessageAsync(constants_1.LISTENER_CMDS.ADD_TABLE_ROW, {
436
- tableId: tableId,
493
+ tableId: this.tableId,
437
494
  rowObject: rowObject
438
495
  });
439
496
  };
440
- return Form;
497
+ Table.prototype.deleteRow = function (rowId) {
498
+ return this._postMessageAsync(constants_1.LISTENER_CMDS.DELETE_TABLE_ROW, {
499
+ tableId: this.tableId,
500
+ rowId: rowId
501
+ });
502
+ };
503
+ return Table;
441
504
  }(base_1.BaseSDK));
442
- exports.Form = Form;
505
+ var TableForm = /** @class */ (function (_super) {
506
+ __extends(TableForm, _super);
507
+ function TableForm(instanceId, tableId, rowId) {
508
+ var _this = _super.call(this, {}) || this;
509
+ _this.instanceId = instanceId;
510
+ _this.tableId = tableId;
511
+ _this.rowId = rowId;
512
+ return _this;
513
+ }
514
+ TableForm.prototype.getParent = function () {
515
+ return new Form(this.instanceId);
516
+ };
517
+ TableForm.prototype.toJSON = function () {
518
+ return this._postMessageAsync(constants_1.LISTENER_CMDS.TO_JSON, {
519
+ tableId: this.tableId,
520
+ rowId: this.rowId
521
+ });
522
+ };
523
+ TableForm.prototype.getField = function (fieldId) {
524
+ return this._postMessageAsync(constants_1.LISTENER_CMDS.GET_FORM_FIELD, {
525
+ instanceId: this.instanceId,
526
+ tableId: this.tableId,
527
+ rowId: this.rowId,
528
+ fieldId: fieldId
529
+ });
530
+ };
531
+ TableForm.prototype.updateField = function (args) {
532
+ return this._postMessageAsync(constants_1.LISTENER_CMDS.UPDATE_FORM, {
533
+ instanceId: this.instanceId,
534
+ tableId: this.tableId,
535
+ rowId: this.rowId,
536
+ data: args
537
+ });
538
+ };
539
+ return TableForm;
540
+ }(base_1.BaseSDK));
541
+ exports.TableForm = TableForm;
443
542
 
444
543
 
445
544
  /***/ }),
@@ -531,19 +630,23 @@ var __extends = (this && this.__extends) || (function () {
531
630
  };
532
631
  })();
533
632
  Object.defineProperty(exports, "__esModule", ({ value: true }));
534
- exports.LowcodeSDK = void 0;
535
633
  var base_1 = __webpack_require__(/*! ./base */ "./src/base.ts");
536
634
  var constants_1 = __webpack_require__(/*! ./constants */ "./src/constants.ts");
537
635
  var form_1 = __webpack_require__(/*! ./form */ "./src/form.ts");
636
+ var form_2 = __webpack_require__(/*! ./form */ "./src/form.ts");
538
637
  var client_1 = __webpack_require__(/*! ./client */ "./src/client.ts");
539
638
  var formatter_1 = __webpack_require__(/*! ./formatter */ "./src/formatter.ts");
540
639
  var app_1 = __webpack_require__(/*! ./app */ "./src/app.ts");
541
- var component_1 = __webpack_require__(/*! ./component */ "./src/component.ts");
542
640
  var LowcodeSDK = /** @class */ (function (_super) {
543
641
  __extends(LowcodeSDK, _super);
544
642
  function LowcodeSDK(props) {
545
643
  var _this = _super.call(this, {}) || this;
546
- _this.currentForm = new form_1.Form({});
644
+ if (props.tableId && props.rowId) {
645
+ _this.currentForm = new form_2.TableForm(props.instanceId, props.tableId, props.rowId);
646
+ }
647
+ else if (props.instanceId) {
648
+ _this.currentForm = new form_1.Form(props.instanceId);
649
+ }
547
650
  _this.client = new client_1.Client({});
548
651
  _this.formatter = new formatter_1.Formatter({});
549
652
  _this.app = new app_1.Application({});
@@ -559,12 +662,8 @@ var LowcodeSDK = /** @class */ (function (_super) {
559
662
  LowcodeSDK.prototype.getContext = function () {
560
663
  return this._postMessageAsync(constants_1.LISTENER_CMDS.GET_CONTEXT, {});
561
664
  };
562
- LowcodeSDK.prototype.getComponent = function (componentId) {
563
- return new component_1.Component(componentId);
564
- };
565
665
  return LowcodeSDK;
566
666
  }(base_1.BaseSDK));
567
- exports.LowcodeSDK = LowcodeSDK;
568
667
  function initSDK(config) {
569
668
  if (config === void 0) { config = {}; }
570
669
  return new LowcodeSDK(config);
@@ -598,6 +697,7 @@ var __extends = (this && this.__extends) || (function () {
598
697
  })();
599
698
  Object.defineProperty(exports, "__esModule", ({ value: true }));
600
699
  exports.Page = void 0;
700
+ var component_1 = __webpack_require__(/*! ./component */ "./src/component.ts");
601
701
  var base_1 = __webpack_require__(/*! ./base */ "./src/base.ts");
602
702
  var constants_1 = __webpack_require__(/*! ./constants */ "./src/constants.ts");
603
703
  var Page = /** @class */ (function (_super) {
@@ -636,6 +736,9 @@ var Page = /** @class */ (function (_super) {
636
736
  return new Page(pageId);
637
737
  });
638
738
  };
739
+ Page.prototype.getComponent = function (componentId) {
740
+ return new component_1.Component(componentId);
741
+ };
639
742
  Page.prototype.onClose = function (callback) {
640
743
  this._registerEventListener(this._id, constants_1.EVENT_TYPES.ON_CLOSE, callback);
641
744
  };
@@ -1 +1 @@
1
- {"version":3,"file":"kflowcode.sdk.js","mappings":";;;;;;;;;;AAAa;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB;AACnB,aAAa,mBAAO,CAAC,6BAAQ;AAC7B,aAAa,mBAAO,CAAC,6BAAQ;AAC7B,kBAAkB,mBAAO,CAAC,uCAAa;AACvC;AACA;AACA;AACA,wCAAwC;AACxC,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD,mBAAmB;;;;;;;;;;;AC/CN;AACb;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe;AACf,kBAAkB,mBAAO,CAAC,uCAAa;AACvC,aAAa,gFAAwB;AACrC;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,4BAA4B;AAC/D,4HAA4H;AAC5H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa,IAAI;AACjB,SAAS;AACT;AACA;AACA,+BAA+B;AAC/B;AACA,+BAA+B,4BAA4B;AAC3D,sHAAsH,oBAAoB;AAC1I;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,eAAe;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;;;;;;;;;;AC1Ka;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc;AACd,aAAa,mBAAO,CAAC,6BAAQ;AAC7B,kBAAkB,mBAAO,CAAC,uCAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,kGAAkG,kBAAkB;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,mGAAmG,UAAU;AAC7G;AACA;AACA,CAAC;AACD,cAAc;;;;;;;;;;;AC3CD;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB;AACjB,aAAa,mBAAO,CAAC,6BAAQ;AAC7B,kBAAkB,mBAAO,CAAC,uCAAa;AACvC;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD,iBAAiB;;;;;;;;;;;AClCJ;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB,GAAG,qBAAqB;AAC3C,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;;;;;;;;;;;ACvCa;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,YAAY;AACZ,aAAa,mBAAO,CAAC,6BAAQ;AAC7B,kBAAkB,mBAAO,CAAC,uCAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD,YAAY;;;;;;;;;;;AC3CC;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB;AACjB,aAAa,mBAAO,CAAC,6BAAQ;AAC7B,kBAAkB,mBAAO,CAAC,uCAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD,iBAAiB;;;;;;;;;;;ACrDJ;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB;AAClB,aAAa,mBAAO,CAAC,6BAAQ;AAC7B,kBAAkB,mBAAO,CAAC,uCAAa;AACvC,aAAa,mBAAO,CAAC,6BAAQ;AAC7B,eAAe,mBAAO,CAAC,iCAAU;AACjC,kBAAkB,mBAAO,CAAC,uCAAa;AACvC,YAAY,mBAAO,CAAC,2BAAO;AAC3B,kBAAkB,mBAAO,CAAC,uCAAa;AACvC;AACA;AACA;AACA,wCAAwC;AACxC,8CAA8C;AAC9C,6CAA6C;AAC7C,sDAAsD;AACtD,4CAA4C;AAC5C;AACA;AACA;AACA,+BAA+B;AAC/B,uEAAuE,sBAAsB;AAC7F;AACA;AACA;AACA;AACA;AACA,+EAA+E;AAC/E;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB;AAClB;AACA,6BAA6B;AAC7B;AACA;AACA,kBAAe;;;;;;;;;;;ACvDF;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,YAAY;AACZ,aAAa,mBAAO,CAAC,6BAAQ;AAC7B,kBAAkB,mBAAO,CAAC,uCAAa;AACvC;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,YAAY;;;;;;;;;;;;;;;;;;;;AC7DyC;AACrD,IAAI,IAAI;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACoE;;;;;;;;;;;;;;;AC7DpE;AACA;AACsB;;;;;;;UCFtB;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;ACNa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oBAAoB,mBAAO,CAAC,2CAAe;AAC3C,IAAI,IAAuC;AAC3C;AACA;AACA,kBAAe","sources":["webpack://@kissflow/lowcode-client-sdk/./src/app.ts","webpack://@kissflow/lowcode-client-sdk/./src/base.ts","webpack://@kissflow/lowcode-client-sdk/./src/client.ts","webpack://@kissflow/lowcode-client-sdk/./src/component.ts","webpack://@kissflow/lowcode-client-sdk/./src/constants.ts","webpack://@kissflow/lowcode-client-sdk/./src/form.ts","webpack://@kissflow/lowcode-client-sdk/./src/formatter.ts","webpack://@kissflow/lowcode-client-sdk/./src/lowcode.sdk.ts","webpack://@kissflow/lowcode-client-sdk/./src/page.ts","webpack://@kissflow/lowcode-client-sdk/./node_modules/nanoid/index.dev.js","webpack://@kissflow/lowcode-client-sdk/./node_modules/nanoid/url-alphabet/index.js","webpack://@kissflow/lowcode-client-sdk/webpack/bootstrap","webpack://@kissflow/lowcode-client-sdk/webpack/runtime/define property getters","webpack://@kissflow/lowcode-client-sdk/webpack/runtime/hasOwnProperty shorthand","webpack://@kissflow/lowcode-client-sdk/webpack/runtime/make namespace object","webpack://@kissflow/lowcode-client-sdk/./src/index.ts"],"sourcesContent":["\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Application = void 0;\nvar base_1 = require(\"./base\");\nvar page_1 = require(\"./page\");\nvar constants_1 = require(\"./constants\");\nvar Application = /** @class */ (function (_super) {\n __extends(Application, _super);\n function Application(props) {\n var _this = _super.call(this, {}) || this;\n _this.page = new page_1.Page({});\n return _this;\n }\n Application.prototype.getVariable = function (key) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.GET_APP_VARIABLE, {\n key: key\n });\n };\n Application.prototype.setVariable = function (key, value) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.SET_APP_VARIABLE, {\n key: key,\n value: value\n });\n };\n Application.prototype.openPage = function (pageId, pageParams) {\n return _super.prototype._postMessageAsync.call(this, constants_1.LISTENER_CMDS.OPEN_PAGE, {\n pageId: pageId,\n pageParams: pageParams\n });\n };\n return Application;\n}(base_1.BaseSDK));\nexports.Application = Application;\n","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _BaseSDK_instances, _BaseSDK_listeners, _BaseSDK_eventListeners, _BaseSDK_addListener, _BaseSDK_appendEventListeners, _BaseSDK_checkEvents, _BaseSDK_onMessage;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BaseSDK = void 0;\nvar constants_1 = require(\"./constants\");\nvar nanoid = require(\"nanoid\").nanoid;\nfunction generateId(prefix) {\n if (prefix === void 0) { prefix = \"lcncsdk\"; }\n return \"\".concat(prefix, \"-\").concat(nanoid());\n}\nfunction postMessage(args) {\n console.log(\"SDK : @postMessage \", args);\n if (self.parent && self.parent !== self) {\n self.parent.postMessage(args, \"*\");\n }\n else {\n self.postMessage(args);\n }\n}\nvar BaseSDK = /** @class */ (function () {\n function BaseSDK(props) {\n _BaseSDK_instances.add(this);\n _BaseSDK_listeners.set(this, void 0);\n _BaseSDK_eventListeners.set(this, void 0);\n console.log(\"SDK : Initializing \", props);\n __classPrivateFieldSet(this, _BaseSDK_listeners, {}, \"f\");\n __classPrivateFieldSet(this, _BaseSDK_eventListeners, {}, \"f\");\n self.addEventListener(\"message\", __classPrivateFieldGet(this, _BaseSDK_instances, \"m\", _BaseSDK_onMessage).bind(this), false);\n }\n BaseSDK.prototype._postMessageAsync = function (command, args, hasCallBack, callBack) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var _id = generateId(command.toLowerCase());\n postMessage(__assign({ _id: _id, command: command }, args));\n __classPrivateFieldGet(_this, _BaseSDK_instances, \"m\", _BaseSDK_addListener).call(_this, _id, function (data) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!data.errorMessage) return [3 /*break*/, 1];\n reject(data);\n return [3 /*break*/, 4];\n case 1:\n if (!(hasCallBack && callBack)) return [3 /*break*/, 3];\n return [4 /*yield*/, callBack(data)];\n case 2:\n data = _a.sent();\n _a.label = 3;\n case 3:\n resolve(data);\n _a.label = 4;\n case 4: return [2 /*return*/];\n }\n });\n }); });\n });\n };\n BaseSDK.prototype._postMessage = function (command, func, args) {\n if (args === void 0) { args = {}; }\n var _id = generateId(command.toLowerCase());\n postMessage(__assign({ _id: _id, command: command }, args));\n __classPrivateFieldGet(this, _BaseSDK_instances, \"m\", _BaseSDK_addListener).call(this, _id, function (data) { return func(data); });\n };\n BaseSDK.prototype._registerEventListener = function (_id, eventType, callback) {\n __classPrivateFieldGet(this, _BaseSDK_instances, \"m\", _BaseSDK_appendEventListeners).call(this, _id, eventType, callback);\n };\n return BaseSDK;\n}());\nexports.BaseSDK = BaseSDK;\n_BaseSDK_listeners = new WeakMap(), _BaseSDK_eventListeners = new WeakMap(), _BaseSDK_instances = new WeakSet(), _BaseSDK_addListener = function _BaseSDK_addListener(_id, callback) {\n __classPrivateFieldGet(this, _BaseSDK_listeners, \"f\")[_id] = __classPrivateFieldGet(this, _BaseSDK_listeners, \"f\")[_id] || [];\n __classPrivateFieldGet(this, _BaseSDK_listeners, \"f\")[_id].push(callback);\n}, _BaseSDK_appendEventListeners = function _BaseSDK_appendEventListeners(_id, eventType, callback) {\n if (!__classPrivateFieldGet(this, _BaseSDK_eventListeners, \"f\")[_id]) {\n __classPrivateFieldGet(this, _BaseSDK_eventListeners, \"f\")[_id] = {};\n }\n __classPrivateFieldGet(this, _BaseSDK_eventListeners, \"f\")[_id][eventType] = callback;\n}, _BaseSDK_checkEvents = function _BaseSDK_checkEvents(data) {\n var _id = data._id, eventType = data.eventType, eventParams = data.eventParams;\n if (!_id || !eventType)\n return;\n var eventListener = __classPrivateFieldGet(this, _BaseSDK_eventListeners, \"f\")[_id] || {};\n if (eventListener[eventType]) {\n eventListener[eventType](eventParams || {});\n }\n}, _BaseSDK_onMessage = function _BaseSDK_onMessage(event) {\n if (event.origin !== self.location.origin) {\n console.log(\"SDK : @onMessage \", event);\n var data_1 = event.data;\n if (data_1.isEvent) {\n return __classPrivateFieldGet(this, _BaseSDK_instances, \"m\", _BaseSDK_checkEvents).call(this, data_1);\n }\n var _req_1 = (data_1 === null || data_1 === void 0 ? void 0 : data_1._req) || {};\n var listeners = __classPrivateFieldGet(this, _BaseSDK_listeners, \"f\")[_req_1 === null || _req_1 === void 0 ? void 0 : _req_1._id] || [];\n if (listeners) {\n listeners.forEach(function (listener) {\n try {\n if (data_1.resp) {\n if (Object.keys(data_1.resp).length === 1 &&\n _req_1.command !== constants_1.LISTENER_CMDS.API) {\n listener(Object.values(data_1.resp)[0]);\n }\n else {\n listener(data_1.resp);\n }\n }\n }\n catch (err) {\n console.error(\"Message callback error: \", err);\n }\n });\n }\n }\n};\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Client = void 0;\nvar base_1 = require(\"./base\");\nvar constants_1 = require(\"./constants\");\nvar Client = /** @class */ (function (_super) {\n __extends(Client, _super);\n function Client() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Client.prototype.showInfo = function (message) {\n return _super.prototype._postMessageAsync.call(this, constants_1.LISTENER_CMDS.MESSAGE, { message: message });\n };\n Client.prototype.showConfirm = function (args) {\n return _super.prototype._postMessageAsync.call(this, constants_1.LISTENER_CMDS.CONFIRM, {\n data: {\n title: args.title,\n content: args.content,\n okText: args.okText || \"Ok\",\n cancelText: args.cancelText || \"Cancel\"\n }\n });\n };\n Client.prototype.redirect = function (url) {\n return _super.prototype._postMessageAsync.call(this, constants_1.LISTENER_CMDS.REDIRECT, { url: url });\n };\n return Client;\n}(base_1.BaseSDK));\nexports.Client = Client;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Component = void 0;\nvar base_1 = require(\"./base\");\nvar constants_1 = require(\"./constants\");\nvar Component = /** @class */ (function (_super) {\n __extends(Component, _super);\n function Component(id) {\n var _this = _super.call(this, {}) || this;\n _this.id = id;\n return _this;\n }\n Component.prototype.refresh = function () {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.COMPONENT_REFRESH, {\n id: this.id\n });\n };\n return Component;\n}(base_1.BaseSDK));\nexports.Component = Component;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EVENT_TYPES = exports.LISTENER_CMDS = void 0;\nexports.LISTENER_CMDS = {\n API: \"API\",\n PARAMS: \"PARAMS\",\n GET_CONTEXT: \"GET_CONTEXT\",\n RETURN: \"RETURN\",\n //Forms SDK Functions\n GET_FORM_FIELD: \"GET_FORM_FIELD\",\n UPDATE_FORM: \"UPDATE_FORM\",\n ADD_TABLE_ROW: \"ADD_TABLE_ROW\",\n //Client SDK functions\n MESSAGE: \"MESSAGE\",\n CONFIRM: \"CONFIRM\",\n ALERT: \"ALERT\",\n REDIRECT: \"REDIRECT\",\n OPEN_PAGE: \"OPEN_PAGE\",\n //Formatter SDK Functions\n FORMAT_DATE: \"FORMAT_DATE\",\n FORMAT_DATE_TIME: \"FORMAT_DATE_TIME\",\n FORMAT_NUMBER: \"FORMAT_NUMBER\",\n FORMAT_CURRENCY: \"FORMAT_CURRENCY\",\n FORMAT_BOOLEAN: \"FORMAT_BOOLEAN\",\n //Application SDK functions\n GET_APP_VARIABLE: \"GET_APP_VARIABLE\",\n SET_APP_VARIABLE: \"SET_APP_VARIABLE\",\n //Application page sdk functions\n GET_PAGE_VARIABLE: \"GET_PAGE_VARIABLE\",\n SET_PAGE_VARIABLE: \"SET_PAGE_VARIABLE\",\n GET_PAGE_PARAMS: \"GET_PAGE_PARAMS\",\n OPEN_POPUP_PAGE: \"OPEN_POPUP_PAGE\",\n PAGE_ON_CLOSE: \"PAGE_ON_CLOSE\",\n COMPONENT_REFRESH: \"COMPONENT_REFRESH\"\n};\nexports.EVENT_TYPES = {\n ON_CLOSE: \"onClose\",\n ON_CHANGE: \"onChange\",\n ON_LOAD: \"onLoad\",\n};\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Form = void 0;\nvar base_1 = require(\"./base\");\nvar constants_1 = require(\"./constants\");\nvar Form = /** @class */ (function (_super) {\n __extends(Form, _super);\n function Form() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Form.prototype.getField = function (fieldId) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.GET_FORM_FIELD, {\n fieldId: fieldId\n });\n };\n Form.prototype.updateField = function (args) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.UPDATE_FORM, {\n data: args\n });\n };\n Form.prototype.addTableRow = function (tableId, rowObject) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.ADD_TABLE_ROW, {\n tableId: tableId,\n rowObject: rowObject\n });\n };\n return Form;\n}(base_1.BaseSDK));\nexports.Form = Form;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Formatter = void 0;\nvar base_1 = require(\"./base\");\nvar constants_1 = require(\"./constants\");\nvar Formatter = /** @class */ (function (_super) {\n __extends(Formatter, _super);\n function Formatter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Formatter.prototype.toKfDate = function (date) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.FORMAT_DATE, {\n date: date,\n });\n };\n Formatter.prototype.toKfDateTime = function (date) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.FORMAT_DATE_TIME, {\n date: date,\n });\n };\n Formatter.prototype.toKfNumber = function (value) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.FORMAT_NUMBER, {\n value: value,\n });\n };\n Formatter.prototype.toKfCurrency = function (value, currencyCode) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.FORMAT_CURRENCY, {\n value: value,\n currencyCode: currencyCode,\n });\n };\n Formatter.prototype.toBoolean = function (value) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.FORMAT_BOOLEAN, {\n value: value\n });\n };\n return Formatter;\n}(base_1.BaseSDK));\nexports.Formatter = Formatter;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LowcodeSDK = void 0;\nvar base_1 = require(\"./base\");\nvar constants_1 = require(\"./constants\");\nvar form_1 = require(\"./form\");\nvar client_1 = require(\"./client\");\nvar formatter_1 = require(\"./formatter\");\nvar app_1 = require(\"./app\");\nvar component_1 = require(\"./component\");\nvar LowcodeSDK = /** @class */ (function (_super) {\n __extends(LowcodeSDK, _super);\n function LowcodeSDK(props) {\n var _this = _super.call(this, {}) || this;\n _this.currentForm = new form_1.Form({});\n _this.client = new client_1.Client({});\n _this.formatter = new formatter_1.Formatter({});\n _this.app = new app_1.Application({});\n return _this;\n }\n LowcodeSDK.prototype.api = function (url, args) {\n if (args === void 0) { args = {}; }\n return this._postMessageAsync(constants_1.LISTENER_CMDS.API, { url: url, args: args });\n };\n LowcodeSDK.prototype.watchParams = function (func) {\n this._postMessage(constants_1.LISTENER_CMDS.PARAMS, func);\n };\n LowcodeSDK.prototype.getContext = function () {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.GET_CONTEXT, {});\n };\n LowcodeSDK.prototype.getComponent = function (componentId) {\n return new component_1.Component(componentId);\n };\n return LowcodeSDK;\n}(base_1.BaseSDK));\nexports.LowcodeSDK = LowcodeSDK;\nfunction initSDK(config) {\n if (config === void 0) { config = {}; }\n return new LowcodeSDK(config);\n}\nexports.default = initSDK;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Page = void 0;\nvar base_1 = require(\"./base\");\nvar constants_1 = require(\"./constants\");\nvar Page = /** @class */ (function (_super) {\n __extends(Page, _super);\n function Page(pageId) {\n var _this = _super.call(this, {}) || this;\n _this._id = pageId;\n return _this;\n }\n Page.prototype.getParameter = function (key) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.GET_PAGE_PARAMS, {\n key: key\n });\n };\n Page.prototype.getVariable = function (key) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.GET_PAGE_VARIABLE, {\n key: key\n });\n };\n Page.prototype.setVariable = function (key, value) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.SET_PAGE_VARIABLE, {\n key: key,\n value: value\n });\n };\n Page.prototype.openPopup = function (pageId, inputParams, popupProperties) {\n var payload = {\n pageId: pageId,\n inputParams: inputParams,\n popupProperties: {\n width: popupProperties.w,\n height: popupProperties.h\n }\n };\n return this._postMessageAsync(constants_1.LISTENER_CMDS.OPEN_POPUP_PAGE, payload, true, function () {\n return new Page(pageId);\n });\n };\n Page.prototype.onClose = function (callback) {\n this._registerEventListener(this._id, constants_1.EVENT_TYPES.ON_CLOSE, callback);\n };\n return Page;\n}(base_1.BaseSDK));\nexports.Page = Page;\n","import { urlAlphabet } from './url-alphabet/index.js'\nif (true) {\n if (\n typeof navigator !== 'undefined' &&\n navigator.product === 'ReactNative' &&\n typeof crypto === 'undefined'\n ) {\n throw new Error(\n 'React Native does not have a built-in secure random generator. ' +\n 'If you don’t need unpredictable IDs use `nanoid/non-secure`. ' +\n 'For secure IDs, import `react-native-get-random-values` ' +\n 'before Nano ID.'\n )\n }\n if (typeof msCrypto !== 'undefined' && typeof crypto === 'undefined') {\n throw new Error(\n 'Import file with `if (!window.crypto) window.crypto = window.msCrypto`' +\n ' before importing Nano ID to fix IE 11 support'\n )\n }\n if (typeof crypto === 'undefined') {\n throw new Error(\n 'Your browser does not have secure random generator. ' +\n 'If you don’t need unpredictable IDs, you can use nanoid/non-secure.'\n )\n }\n}\nlet random = bytes => crypto.getRandomValues(new Uint8Array(bytes))\nlet customRandom = (alphabet, size, getRandom) => {\n let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1\n let step = -~((1.6 * mask * size) / alphabet.length)\n return () => {\n let id = ''\n while (true) {\n let bytes = getRandom(step)\n let j = step\n while (j--) {\n id += alphabet[bytes[j] & mask] || ''\n if (id.length === size) return id\n }\n }\n }\n}\nlet customAlphabet = (alphabet, size) => customRandom(alphabet, size, random)\nlet nanoid = (size = 21) => {\n let id = ''\n let bytes = crypto.getRandomValues(new Uint8Array(size))\n while (size--) {\n let byte = bytes[size] & 63\n if (byte < 36) {\n id += byte.toString(36)\n } else if (byte < 62) {\n id += (byte - 26).toString(36).toUpperCase()\n } else if (byte < 63) {\n id += '_'\n } else {\n id += '-'\n }\n }\n return id\n}\nexport { nanoid, customAlphabet, customRandom, urlAlphabet, random }\n","let urlAlphabet =\n 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\nexport { urlAlphabet }\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar lowcode_sdk_1 = require(\"./lowcode.sdk\");\nif (typeof _BUILD !== \"undefined\" && _BUILD) {\n self.KF = lowcode_sdk_1.default;\n}\nexports.default = lowcode_sdk_1.default;\n"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"kflowcode.sdk.js","mappings":";;;;;;;;;;AAAa;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB;AACnB,aAAa,mBAAO,CAAC,6BAAQ;AAC7B,aAAa,mBAAO,CAAC,6BAAQ;AAC7B,kBAAkB,mBAAO,CAAC,uCAAa;AACvC;AACA;AACA;AACA,wCAAwC;AACxC,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD,mBAAmB;;;;;;;;;;;AC/CN;AACb;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe;AACf,kBAAkB,mBAAO,CAAC,uCAAa;AACvC,aAAa,gFAAwB;AACrC;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,4BAA4B;AAC/D,4HAA4H;AAC5H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa,IAAI;AACjB,SAAS;AACT;AACA;AACA,+BAA+B;AAC/B;AACA,+BAA+B,4BAA4B;AAC3D,sHAAsH,oBAAoB;AAC1I;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,eAAe;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;;;;;;;;;;AC1Ka;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc;AACd,aAAa,mBAAO,CAAC,6BAAQ;AAC7B,kBAAkB,mBAAO,CAAC,uCAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,kGAAkG,kBAAkB;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,mGAAmG,UAAU;AAC7G;AACA;AACA,CAAC;AACD,cAAc;;;;;;;;;;;AC3CD;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB;AACjB,aAAa,mBAAO,CAAC,6BAAQ;AAC7B,kBAAkB,mBAAO,CAAC,uCAAa;AACvC;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD,iBAAiB;;;;;;;;;;;AC5CJ;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB,GAAG,qBAAqB;AAC3C,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;;;;;;;;;;;AC9Ca;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB,GAAG,YAAY;AAChC,aAAa,mBAAO,CAAC,6BAAQ;AAC7B,kBAAkB,mBAAO,CAAC,uCAAa;AACvC;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,YAAY;AACZ;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,kFAAkF,uBAAuB;AACzG;AACA;AACA,6CAA6C,gEAAgE;AAC7G,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD,iBAAiB;;;;;;;;;;;AC7HJ;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB;AACjB,aAAa,mBAAO,CAAC,6BAAQ;AAC7B,kBAAkB,mBAAO,CAAC,uCAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD,iBAAiB;;;;;;;;;;;ACrDJ;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,aAAa,mBAAO,CAAC,6BAAQ;AAC7B,kBAAkB,mBAAO,CAAC,uCAAa;AACvC,aAAa,mBAAO,CAAC,6BAAQ;AAC7B,aAAa,mBAAO,CAAC,6BAAQ;AAC7B,eAAe,mBAAO,CAAC,iCAAU;AACjC,kBAAkB,mBAAO,CAAC,uCAAa;AACvC,YAAY,mBAAO,CAAC,2BAAO;AAC3B;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C,sDAAsD;AACtD,4CAA4C;AAC5C;AACA;AACA;AACA,+BAA+B;AAC/B,uEAAuE,sBAAsB;AAC7F;AACA;AACA;AACA;AACA;AACA,+EAA+E;AAC/E;AACA;AACA,CAAC;AACD;AACA,6BAA6B;AAC7B;AACA;AACA,kBAAe;;;;;;;;;;;ACvDF;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,YAAY;AACZ,kBAAkB,mBAAO,CAAC,uCAAa;AACvC,aAAa,mBAAO,CAAC,6BAAQ;AAC7B,kBAAkB,mBAAO,CAAC,uCAAa;AACvC;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,YAAY;;;;;;;;;;;;;;;;;;;;ACjEyC;AACrD,IAAI,IAAI;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACoE;;;;;;;;;;;;;;;AC7DpE;AACA;AACsB;;;;;;;UCFtB;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;ACNa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oBAAoB,mBAAO,CAAC,2CAAe;AAC3C,IAAI,IAAuC;AAC3C;AACA;AACA,kBAAe","sources":["webpack://@kissflow/lowcode-client-sdk/./src/app.ts","webpack://@kissflow/lowcode-client-sdk/./src/base.ts","webpack://@kissflow/lowcode-client-sdk/./src/client.ts","webpack://@kissflow/lowcode-client-sdk/./src/component.ts","webpack://@kissflow/lowcode-client-sdk/./src/constants.ts","webpack://@kissflow/lowcode-client-sdk/./src/form.ts","webpack://@kissflow/lowcode-client-sdk/./src/formatter.ts","webpack://@kissflow/lowcode-client-sdk/./src/lowcode.sdk.ts","webpack://@kissflow/lowcode-client-sdk/./src/page.ts","webpack://@kissflow/lowcode-client-sdk/./node_modules/nanoid/index.dev.js","webpack://@kissflow/lowcode-client-sdk/./node_modules/nanoid/url-alphabet/index.js","webpack://@kissflow/lowcode-client-sdk/webpack/bootstrap","webpack://@kissflow/lowcode-client-sdk/webpack/runtime/define property getters","webpack://@kissflow/lowcode-client-sdk/webpack/runtime/hasOwnProperty shorthand","webpack://@kissflow/lowcode-client-sdk/webpack/runtime/make namespace object","webpack://@kissflow/lowcode-client-sdk/./src/index.ts"],"sourcesContent":["\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Application = void 0;\nvar base_1 = require(\"./base\");\nvar page_1 = require(\"./page\");\nvar constants_1 = require(\"./constants\");\nvar Application = /** @class */ (function (_super) {\n __extends(Application, _super);\n function Application(props) {\n var _this = _super.call(this, {}) || this;\n _this.page = new page_1.Page({});\n return _this;\n }\n Application.prototype.getVariable = function (key) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.GET_APP_VARIABLE, {\n key: key\n });\n };\n Application.prototype.setVariable = function (key, value) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.SET_APP_VARIABLE, {\n key: key,\n value: value\n });\n };\n Application.prototype.openPage = function (pageId, pageParams) {\n return _super.prototype._postMessageAsync.call(this, constants_1.LISTENER_CMDS.OPEN_PAGE, {\n pageId: pageId,\n pageParams: pageParams\n });\n };\n return Application;\n}(base_1.BaseSDK));\nexports.Application = Application;\n","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _BaseSDK_instances, _BaseSDK_listeners, _BaseSDK_eventListeners, _BaseSDK_addListener, _BaseSDK_appendEventListeners, _BaseSDK_checkEvents, _BaseSDK_onMessage;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BaseSDK = void 0;\nvar constants_1 = require(\"./constants\");\nvar nanoid = require(\"nanoid\").nanoid;\nfunction generateId(prefix) {\n if (prefix === void 0) { prefix = \"lcncsdk\"; }\n return \"\".concat(prefix, \"-\").concat(nanoid());\n}\nfunction postMessage(args) {\n console.log(\"SDK : @postMessage \", args);\n if (self.parent && self.parent !== self) {\n self.parent.postMessage(args, \"*\");\n }\n else {\n self.postMessage(args);\n }\n}\nvar BaseSDK = /** @class */ (function () {\n function BaseSDK(props) {\n _BaseSDK_instances.add(this);\n _BaseSDK_listeners.set(this, void 0);\n _BaseSDK_eventListeners.set(this, void 0);\n console.log(\"SDK : Initializing \", props);\n __classPrivateFieldSet(this, _BaseSDK_listeners, {}, \"f\");\n __classPrivateFieldSet(this, _BaseSDK_eventListeners, {}, \"f\");\n self.addEventListener(\"message\", __classPrivateFieldGet(this, _BaseSDK_instances, \"m\", _BaseSDK_onMessage).bind(this), false);\n }\n BaseSDK.prototype._postMessageAsync = function (command, args, hasCallBack, callBack) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var _id = generateId(command.toLowerCase());\n postMessage(__assign({ _id: _id, command: command }, args));\n __classPrivateFieldGet(_this, _BaseSDK_instances, \"m\", _BaseSDK_addListener).call(_this, _id, function (data) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!data.errorMessage) return [3 /*break*/, 1];\n reject(data);\n return [3 /*break*/, 4];\n case 1:\n if (!(hasCallBack && callBack)) return [3 /*break*/, 3];\n return [4 /*yield*/, callBack(data)];\n case 2:\n data = _a.sent();\n _a.label = 3;\n case 3:\n resolve(data);\n _a.label = 4;\n case 4: return [2 /*return*/];\n }\n });\n }); });\n });\n };\n BaseSDK.prototype._postMessage = function (command, func, args) {\n if (args === void 0) { args = {}; }\n var _id = generateId(command.toLowerCase());\n postMessage(__assign({ _id: _id, command: command }, args));\n __classPrivateFieldGet(this, _BaseSDK_instances, \"m\", _BaseSDK_addListener).call(this, _id, function (data) { return func(data); });\n };\n BaseSDK.prototype._registerEventListener = function (_id, eventType, callback) {\n __classPrivateFieldGet(this, _BaseSDK_instances, \"m\", _BaseSDK_appendEventListeners).call(this, _id, eventType, callback);\n };\n return BaseSDK;\n}());\nexports.BaseSDK = BaseSDK;\n_BaseSDK_listeners = new WeakMap(), _BaseSDK_eventListeners = new WeakMap(), _BaseSDK_instances = new WeakSet(), _BaseSDK_addListener = function _BaseSDK_addListener(_id, callback) {\n __classPrivateFieldGet(this, _BaseSDK_listeners, \"f\")[_id] = __classPrivateFieldGet(this, _BaseSDK_listeners, \"f\")[_id] || [];\n __classPrivateFieldGet(this, _BaseSDK_listeners, \"f\")[_id].push(callback);\n}, _BaseSDK_appendEventListeners = function _BaseSDK_appendEventListeners(_id, eventType, callback) {\n if (!__classPrivateFieldGet(this, _BaseSDK_eventListeners, \"f\")[_id]) {\n __classPrivateFieldGet(this, _BaseSDK_eventListeners, \"f\")[_id] = {};\n }\n __classPrivateFieldGet(this, _BaseSDK_eventListeners, \"f\")[_id][eventType] = callback;\n}, _BaseSDK_checkEvents = function _BaseSDK_checkEvents(data) {\n var _id = data._id, eventType = data.eventType, eventParams = data.eventParams;\n if (!_id || !eventType)\n return;\n var eventListener = __classPrivateFieldGet(this, _BaseSDK_eventListeners, \"f\")[_id] || {};\n if (eventListener[eventType]) {\n eventListener[eventType](eventParams || {});\n }\n}, _BaseSDK_onMessage = function _BaseSDK_onMessage(event) {\n if (event.origin !== self.location.origin) {\n console.log(\"SDK : @onMessage \", event);\n var data_1 = event.data;\n if (data_1.isEvent) {\n return __classPrivateFieldGet(this, _BaseSDK_instances, \"m\", _BaseSDK_checkEvents).call(this, data_1);\n }\n var _req_1 = (data_1 === null || data_1 === void 0 ? void 0 : data_1._req) || {};\n var listeners = __classPrivateFieldGet(this, _BaseSDK_listeners, \"f\")[_req_1 === null || _req_1 === void 0 ? void 0 : _req_1._id] || [];\n if (listeners) {\n listeners.forEach(function (listener) {\n try {\n if (data_1.resp) {\n if (Object.keys(data_1.resp).length === 1 &&\n _req_1.command !== constants_1.LISTENER_CMDS.API) {\n listener(Object.values(data_1.resp)[0]);\n }\n else {\n listener(data_1.resp);\n }\n }\n }\n catch (err) {\n console.error(\"Message callback error: \", err);\n }\n });\n }\n }\n};\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Client = void 0;\nvar base_1 = require(\"./base\");\nvar constants_1 = require(\"./constants\");\nvar Client = /** @class */ (function (_super) {\n __extends(Client, _super);\n function Client() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Client.prototype.showInfo = function (message) {\n return _super.prototype._postMessageAsync.call(this, constants_1.LISTENER_CMDS.MESSAGE, { message: message });\n };\n Client.prototype.showConfirm = function (args) {\n return _super.prototype._postMessageAsync.call(this, constants_1.LISTENER_CMDS.CONFIRM, {\n data: {\n title: args.title,\n content: args.content,\n okText: args.okText || \"Ok\",\n cancelText: args.cancelText || \"Cancel\"\n }\n });\n };\n Client.prototype.redirect = function (url) {\n return _super.prototype._postMessageAsync.call(this, constants_1.LISTENER_CMDS.REDIRECT, { url: url });\n };\n return Client;\n}(base_1.BaseSDK));\nexports.Client = Client;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Component = void 0;\nvar base_1 = require(\"./base\");\nvar constants_1 = require(\"./constants\");\nvar Component = /** @class */ (function (_super) {\n __extends(Component, _super);\n function Component(id) {\n var _this = _super.call(this, {}) || this;\n _this.id = id;\n return _this;\n }\n Component.prototype.refresh = function () {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.COMPONENT_REFRESH, {\n id: this.id\n });\n };\n Component.prototype.show = function () {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.COMPONENT_SHOW, {\n id: this.id\n });\n };\n Component.prototype.hide = function () {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.COMPONENT_HIDE, {\n id: this.id\n });\n };\n return Component;\n}(base_1.BaseSDK));\nexports.Component = Component;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EVENT_TYPES = exports.LISTENER_CMDS = void 0;\nexports.LISTENER_CMDS = {\n API: \"API\",\n PARAMS: \"PARAMS\",\n GET_CONTEXT: \"GET_CONTEXT\",\n RETURN: \"RETURN\",\n //Forms SDK Functions\n GET_FORM_FIELD: \"GET_FORM_FIELD\",\n UPDATE_FORM: \"UPDATE_FORM\",\n GET_TABLE: \"GET_TABLE\",\n GET_TABLE_ROW: \"GET_TABLE_ROW\",\n ADD_TABLE_ROW: \"ADD_TABLE_ROW\",\n DELETE_TABLE_ROW: \"DELETE_TABLE_ROW\",\n TO_JSON: \"TO_JSON\",\n GET_TABLE_ROWS: \"GET_TABLE_ROWS\",\n //Client SDK functions\n MESSAGE: \"MESSAGE\",\n CONFIRM: \"CONFIRM\",\n ALERT: \"ALERT\",\n REDIRECT: \"REDIRECT\",\n OPEN_PAGE: \"OPEN_PAGE\",\n //Formatter SDK Functions\n FORMAT_DATE: \"FORMAT_DATE\",\n FORMAT_DATE_TIME: \"FORMAT_DATE_TIME\",\n FORMAT_NUMBER: \"FORMAT_NUMBER\",\n FORMAT_CURRENCY: \"FORMAT_CURRENCY\",\n FORMAT_BOOLEAN: \"FORMAT_BOOLEAN\",\n //Application SDK functions\n GET_APP_VARIABLE: \"GET_APP_VARIABLE\",\n SET_APP_VARIABLE: \"SET_APP_VARIABLE\",\n //Application page sdk functions\n GET_PAGE_VARIABLE: \"GET_PAGE_VARIABLE\",\n SET_PAGE_VARIABLE: \"SET_PAGE_VARIABLE\",\n GET_PAGE_PARAMS: \"GET_PAGE_PARAMS\",\n OPEN_POPUP_PAGE: \"OPEN_POPUP_PAGE\",\n PAGE_ON_CLOSE: \"PAGE_ON_CLOSE\",\n COMPONENT_REFRESH: \"COMPONENT_REFRESH\",\n COMPONENT_SHOW: \"COMPONENT_SHOW\",\n COMPONENT_HIDE: \"COMPONENT_HIDE\"\n};\nexports.EVENT_TYPES = {\n ON_CLOSE: \"onClose\",\n ON_CHANGE: \"onChange\",\n ON_LOAD: \"onLoad\",\n};\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TableForm = exports.Form = void 0;\nvar base_1 = require(\"./base\");\nvar constants_1 = require(\"./constants\");\nvar Form = /** @class */ (function (_super) {\n __extends(Form, _super);\n function Form(instanceId) {\n var _this = _super.call(this, {}) || this;\n _this.instanceId = instanceId;\n return _this;\n }\n Form.prototype.toJSON = function () {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.TO_JSON, {\n instanceId: this.instanceId\n });\n };\n Form.prototype.getField = function (fieldId) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.GET_FORM_FIELD, {\n instanceId: this.instanceId,\n fieldId: fieldId\n });\n };\n Form.prototype.updateField = function (args) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.UPDATE_FORM, {\n data: args\n });\n };\n Form.prototype.getTable = function (tableId) {\n return new Table(this.instanceId, tableId);\n };\n return Form;\n}(base_1.BaseSDK));\nexports.Form = Form;\nvar Table = /** @class */ (function (_super) {\n __extends(Table, _super);\n function Table(instanceId, tableId) {\n var _this = _super.call(this, {}) || this;\n _this.tableId = tableId;\n _this.instanceId = instanceId;\n return _this;\n }\n // list of obj of rows\n Table.prototype.toJSON = function () {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.TO_JSON, {\n tableId: this.tableId\n });\n };\n Table.prototype.getRows = function () {\n var _this = this;\n // list of TableForm class\n return this._postMessageAsync(constants_1.LISTENER_CMDS.GET_TABLE_ROWS, { tableId: this.tableId }, true, // has callBack\n function (data) {\n console.log(data);\n return data.map(function (row) { return new TableForm(_this.instanceId, _this.tableId, row.id); });\n });\n };\n Table.prototype.getRow = function (rowId) {\n return new TableForm(this.instanceId, this.tableId, rowId);\n };\n Table.prototype.addRow = function (rowObject) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.ADD_TABLE_ROW, {\n tableId: this.tableId,\n rowObject: rowObject\n });\n };\n Table.prototype.deleteRow = function (rowId) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.DELETE_TABLE_ROW, {\n tableId: this.tableId,\n rowId: rowId\n });\n };\n return Table;\n}(base_1.BaseSDK));\nvar TableForm = /** @class */ (function (_super) {\n __extends(TableForm, _super);\n function TableForm(instanceId, tableId, rowId) {\n var _this = _super.call(this, {}) || this;\n _this.instanceId = instanceId;\n _this.tableId = tableId;\n _this.rowId = rowId;\n return _this;\n }\n TableForm.prototype.getParent = function () {\n return new Form(this.instanceId);\n };\n TableForm.prototype.toJSON = function () {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.TO_JSON, {\n tableId: this.tableId,\n rowId: this.rowId\n });\n };\n TableForm.prototype.getField = function (fieldId) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.GET_FORM_FIELD, {\n instanceId: this.instanceId,\n tableId: this.tableId,\n rowId: this.rowId,\n fieldId: fieldId\n });\n };\n TableForm.prototype.updateField = function (args) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.UPDATE_FORM, {\n instanceId: this.instanceId,\n tableId: this.tableId,\n rowId: this.rowId,\n data: args\n });\n };\n return TableForm;\n}(base_1.BaseSDK));\nexports.TableForm = TableForm;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Formatter = void 0;\nvar base_1 = require(\"./base\");\nvar constants_1 = require(\"./constants\");\nvar Formatter = /** @class */ (function (_super) {\n __extends(Formatter, _super);\n function Formatter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Formatter.prototype.toKfDate = function (date) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.FORMAT_DATE, {\n date: date,\n });\n };\n Formatter.prototype.toKfDateTime = function (date) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.FORMAT_DATE_TIME, {\n date: date,\n });\n };\n Formatter.prototype.toKfNumber = function (value) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.FORMAT_NUMBER, {\n value: value,\n });\n };\n Formatter.prototype.toKfCurrency = function (value, currencyCode) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.FORMAT_CURRENCY, {\n value: value,\n currencyCode: currencyCode,\n });\n };\n Formatter.prototype.toBoolean = function (value) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.FORMAT_BOOLEAN, {\n value: value\n });\n };\n return Formatter;\n}(base_1.BaseSDK));\nexports.Formatter = Formatter;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar base_1 = require(\"./base\");\nvar constants_1 = require(\"./constants\");\nvar form_1 = require(\"./form\");\nvar form_2 = require(\"./form\");\nvar client_1 = require(\"./client\");\nvar formatter_1 = require(\"./formatter\");\nvar app_1 = require(\"./app\");\nvar LowcodeSDK = /** @class */ (function (_super) {\n __extends(LowcodeSDK, _super);\n function LowcodeSDK(props) {\n var _this = _super.call(this, {}) || this;\n if (props.tableId && props.rowId) {\n _this.currentForm = new form_2.TableForm(props.instanceId, props.tableId, props.rowId);\n }\n else if (props.instanceId) {\n _this.currentForm = new form_1.Form(props.instanceId);\n }\n _this.client = new client_1.Client({});\n _this.formatter = new formatter_1.Formatter({});\n _this.app = new app_1.Application({});\n return _this;\n }\n LowcodeSDK.prototype.api = function (url, args) {\n if (args === void 0) { args = {}; }\n return this._postMessageAsync(constants_1.LISTENER_CMDS.API, { url: url, args: args });\n };\n LowcodeSDK.prototype.watchParams = function (func) {\n this._postMessage(constants_1.LISTENER_CMDS.PARAMS, func);\n };\n LowcodeSDK.prototype.getContext = function () {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.GET_CONTEXT, {});\n };\n return LowcodeSDK;\n}(base_1.BaseSDK));\nfunction initSDK(config) {\n if (config === void 0) { config = {}; }\n return new LowcodeSDK(config);\n}\nexports.default = initSDK;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Page = void 0;\nvar component_1 = require(\"./component\");\nvar base_1 = require(\"./base\");\nvar constants_1 = require(\"./constants\");\nvar Page = /** @class */ (function (_super) {\n __extends(Page, _super);\n function Page(pageId) {\n var _this = _super.call(this, {}) || this;\n _this._id = pageId;\n return _this;\n }\n Page.prototype.getParameter = function (key) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.GET_PAGE_PARAMS, {\n key: key\n });\n };\n Page.prototype.getVariable = function (key) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.GET_PAGE_VARIABLE, {\n key: key\n });\n };\n Page.prototype.setVariable = function (key, value) {\n return this._postMessageAsync(constants_1.LISTENER_CMDS.SET_PAGE_VARIABLE, {\n key: key,\n value: value\n });\n };\n Page.prototype.openPopup = function (pageId, inputParams, popupProperties) {\n var payload = {\n pageId: pageId,\n inputParams: inputParams,\n popupProperties: {\n width: popupProperties.w,\n height: popupProperties.h\n }\n };\n return this._postMessageAsync(constants_1.LISTENER_CMDS.OPEN_POPUP_PAGE, payload, true, function () {\n return new Page(pageId);\n });\n };\n Page.prototype.getComponent = function (componentId) {\n return new component_1.Component(componentId);\n };\n Page.prototype.onClose = function (callback) {\n this._registerEventListener(this._id, constants_1.EVENT_TYPES.ON_CLOSE, callback);\n };\n return Page;\n}(base_1.BaseSDK));\nexports.Page = Page;\n","import { urlAlphabet } from './url-alphabet/index.js'\nif (true) {\n if (\n typeof navigator !== 'undefined' &&\n navigator.product === 'ReactNative' &&\n typeof crypto === 'undefined'\n ) {\n throw new Error(\n 'React Native does not have a built-in secure random generator. ' +\n 'If you don’t need unpredictable IDs use `nanoid/non-secure`. ' +\n 'For secure IDs, import `react-native-get-random-values` ' +\n 'before Nano ID.'\n )\n }\n if (typeof msCrypto !== 'undefined' && typeof crypto === 'undefined') {\n throw new Error(\n 'Import file with `if (!window.crypto) window.crypto = window.msCrypto`' +\n ' before importing Nano ID to fix IE 11 support'\n )\n }\n if (typeof crypto === 'undefined') {\n throw new Error(\n 'Your browser does not have secure random generator. ' +\n 'If you don’t need unpredictable IDs, you can use nanoid/non-secure.'\n )\n }\n}\nlet random = bytes => crypto.getRandomValues(new Uint8Array(bytes))\nlet customRandom = (alphabet, size, getRandom) => {\n let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1\n let step = -~((1.6 * mask * size) / alphabet.length)\n return () => {\n let id = ''\n while (true) {\n let bytes = getRandom(step)\n let j = step\n while (j--) {\n id += alphabet[bytes[j] & mask] || ''\n if (id.length === size) return id\n }\n }\n }\n}\nlet customAlphabet = (alphabet, size) => customRandom(alphabet, size, random)\nlet nanoid = (size = 21) => {\n let id = ''\n let bytes = crypto.getRandomValues(new Uint8Array(size))\n while (size--) {\n let byte = bytes[size] & 63\n if (byte < 36) {\n id += byte.toString(36)\n } else if (byte < 62) {\n id += (byte - 26).toString(36).toUpperCase()\n } else if (byte < 63) {\n id += '_'\n } else {\n id += '-'\n }\n }\n return id\n}\nexport { nanoid, customAlphabet, customRandom, urlAlphabet, random }\n","let urlAlphabet =\n 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\nexport { urlAlphabet }\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar lowcode_sdk_1 = require(\"./lowcode.sdk\");\nif (typeof _BUILD !== \"undefined\" && _BUILD) {\n self.KF = lowcode_sdk_1.default;\n}\nexports.default = lowcode_sdk_1.default;\n"],"names":[],"sourceRoot":""}