gs2-cdk 1.0.81 → 1.0.82
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.
- package/exchange/model/LogCost.d.ts +10 -0
- package/exchange/model/LogCost.js +26 -0
- package/exchange/model/LogCost.js.map +1 -0
- package/exchange/model/LogCost.ts +49 -0
- package/exchange/model/index.d.ts +3 -1
- package/exchange/model/index.js +3 -1
- package/exchange/model/index.js.map +1 -1
- package/exchange/model/index.ts +4 -0
- package/exchange/model/options/LogCostOptions.d.ts +3 -0
- package/exchange/model/options/LogCostOptions.js +18 -0
- package/exchange/model/options/LogCostOptions.js.map +1 -0
- package/exchange/model/options/LogCostOptions.ts +20 -0
- package/mission/model/CounterModel.js.map +1 -1
- package/mission/model/CounterModel.ts +1 -0
- package/mission/model/CounterScopeModel.d.ts +14 -5
- package/mission/model/CounterScopeModel.js +42 -15
- package/mission/model/CounterScopeModel.js.map +1 -1
- package/mission/model/CounterScopeModel.ts +57 -7
- package/mission/model/ScopedValue.d.ts +9 -2
- package/mission/model/ScopedValue.js +26 -4
- package/mission/model/ScopedValue.js.map +1 -1
- package/mission/model/ScopedValue.ts +47 -3
- package/mission/model/TargetCounterModel.d.ts +8 -1
- package/mission/model/TargetCounterModel.js +23 -2
- package/mission/model/TargetCounterModel.js.map +1 -1
- package/mission/model/TargetCounterModel.ts +46 -0
- package/mission/model/enum/CounterScopeModelScopeType.d.ts +5 -0
- package/mission/model/enum/CounterScopeModelScopeType.js +23 -0
- package/mission/model/enum/CounterScopeModelScopeType.js.map +1 -0
- package/mission/model/enum/CounterScopeModelScopeType.ts +23 -0
- package/mission/model/enum/ScopedValueScopeType.d.ts +5 -0
- package/mission/model/enum/ScopedValueScopeType.js +23 -0
- package/mission/model/enum/ScopedValueScopeType.js.map +1 -0
- package/mission/model/enum/ScopedValueScopeType.ts +23 -0
- package/mission/model/enum/TargetCounterModelScopeType.d.ts +5 -0
- package/mission/model/enum/TargetCounterModelScopeType.js +23 -0
- package/mission/model/enum/TargetCounterModelScopeType.js.map +1 -0
- package/mission/model/enum/TargetCounterModelScopeType.ts +23 -0
- package/mission/model/index.d.ts +10 -1
- package/mission/model/index.js +7 -1
- package/mission/model/index.js.map +1 -1
- package/mission/model/index.ts +18 -0
- package/mission/model/options/CounterModelOptions.ts +1 -0
- package/mission/model/options/CounterScopeModelOptions.d.ts +5 -0
- package/mission/model/options/CounterScopeModelOptions.ts +5 -0
- package/mission/model/options/CounterScopeModelResetTypeIsDailyOptions.ts +2 -0
- package/mission/model/options/CounterScopeModelResetTypeIsMonthlyOptions.ts +2 -0
- package/mission/model/options/CounterScopeModelResetTypeIsNotResetOptions.ts +2 -0
- package/mission/model/options/CounterScopeModelResetTypeIsWeeklyOptions.ts +2 -0
- package/mission/model/options/CounterScopeModelScopeTypeIsResetTimingOptions.d.ts +2 -0
- package/mission/model/options/CounterScopeModelScopeTypeIsResetTimingOptions.js +3 -0
- package/mission/model/options/CounterScopeModelScopeTypeIsResetTimingOptions.js.map +1 -0
- package/mission/model/options/CounterScopeModelScopeTypeIsResetTimingOptions.ts +22 -0
- package/mission/model/options/CounterScopeModelScopeTypeIsVerifyActionOptions.d.ts +2 -0
- package/mission/model/options/CounterScopeModelScopeTypeIsVerifyActionOptions.js +3 -0
- package/mission/model/options/CounterScopeModelScopeTypeIsVerifyActionOptions.js.map +1 -0
- package/mission/model/options/CounterScopeModelScopeTypeIsVerifyActionOptions.ts +22 -0
- package/mission/model/options/ScopedValueOptions.d.ts +3 -0
- package/mission/model/options/ScopedValueOptions.ts +3 -0
- package/mission/model/options/ScopedValueScopeTypeIsResetTimingOptions.d.ts +3 -0
- package/mission/model/options/ScopedValueScopeTypeIsResetTimingOptions.js +3 -0
- package/mission/model/options/ScopedValueScopeTypeIsResetTimingOptions.js.map +1 -0
- package/mission/model/options/ScopedValueScopeTypeIsResetTimingOptions.ts +21 -0
- package/mission/model/options/ScopedValueScopeTypeIsVerifyActionOptions.d.ts +3 -0
- package/mission/model/options/ScopedValueScopeTypeIsVerifyActionOptions.js +3 -0
- package/mission/model/options/ScopedValueScopeTypeIsVerifyActionOptions.js.map +1 -0
- package/mission/model/options/ScopedValueScopeTypeIsVerifyActionOptions.ts +21 -0
- package/mission/model/options/TargetCounterModelOptions.d.ts +1 -0
- package/mission/model/options/TargetCounterModelOptions.ts +2 -0
- package/mission/model/options/TargetCounterModelScopeTypeIsResetTimingOptions.d.ts +4 -0
- package/mission/model/options/TargetCounterModelScopeTypeIsResetTimingOptions.js +3 -0
- package/mission/model/options/TargetCounterModelScopeTypeIsResetTimingOptions.js.map +1 -0
- package/mission/model/options/TargetCounterModelScopeTypeIsResetTimingOptions.ts +21 -0
- package/mission/model/options/TargetCounterModelScopeTypeIsVerifyActionOptions.d.ts +4 -0
- package/mission/model/options/TargetCounterModelScopeTypeIsVerifyActionOptions.js +3 -0
- package/mission/model/options/TargetCounterModelScopeTypeIsVerifyActionOptions.js.map +1 -0
- package/mission/model/options/TargetCounterModelScopeTypeIsVerifyActionOptions.ts +21 -0
- package/mission/ref/CounterModelRef.d.ts +2 -1
- package/mission/ref/CounterModelRef.js +2 -2
- package/mission/ref/CounterModelRef.js.map +1 -1
- package/mission/ref/CounterModelRef.ts +6 -1
- package/mission/ref/NamespaceRef.d.ts +2 -1
- package/mission/ref/NamespaceRef.js +2 -2
- package/mission/ref/NamespaceRef.js.map +1 -1
- package/mission/ref/NamespaceRef.ts +6 -1
- package/mission/stampSheet/VerifyCounterValueByUserId.d.ts +4 -1
- package/mission/stampSheet/VerifyCounterValueByUserId.js +13 -2
- package/mission/stampSheet/VerifyCounterValueByUserId.js.map +1 -1
- package/mission/stampSheet/VerifyCounterValueByUserId.ts +16 -3
- package/mission/stampSheet/enum/CounterScopeType.d.ts +5 -0
- package/mission/stampSheet/enum/CounterScopeType.js +23 -0
- package/mission/stampSheet/enum/CounterScopeType.js.map +1 -0
- package/mission/stampSheet/enum/CounterScopeType.ts +23 -0
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LogCostOptions } from "./options/LogCostOptions";
|
|
2
|
+
export default class LogCost {
|
|
3
|
+
private readonly base;
|
|
4
|
+
private readonly adds;
|
|
5
|
+
private readonly subs;
|
|
6
|
+
constructor(base: number, adds: number[], options?: LogCostOptions | null);
|
|
7
|
+
properties(): {
|
|
8
|
+
[name: string]: any;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class LogCost {
|
|
4
|
+
constructor(base, adds, options = null) {
|
|
5
|
+
var _a;
|
|
6
|
+
this.subs = null;
|
|
7
|
+
this.base = base;
|
|
8
|
+
this.adds = adds;
|
|
9
|
+
this.subs = (_a = options === null || options === void 0 ? void 0 : options.subs) !== null && _a !== void 0 ? _a : null;
|
|
10
|
+
}
|
|
11
|
+
properties() {
|
|
12
|
+
let properties = {};
|
|
13
|
+
if (this.base != null) {
|
|
14
|
+
properties["base"] = this.base;
|
|
15
|
+
}
|
|
16
|
+
if (this.adds != null) {
|
|
17
|
+
properties["adds"] = this.adds;
|
|
18
|
+
}
|
|
19
|
+
if (this.subs != null) {
|
|
20
|
+
properties["subs"] = this.subs;
|
|
21
|
+
}
|
|
22
|
+
return properties;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.default = LogCost;
|
|
26
|
+
//# sourceMappingURL=LogCost.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogCost.js","sourceRoot":"","sources":["LogCost.ts"],"names":[],"mappings":";;AAiBA,MAAqB,OAAO;IAKxB,YACI,IAAY,EACZ,IAAc,EACd,UAA+B,IAAI;;QALtB,SAAI,GAAkB,IAAI,CAAC;QAOxC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,mCAAI,IAAI,CAAC;IACtC,CAAC;IAEM,UAAU;QAEb,IAAI,UAAU,GAA0B,EAAE,CAAC;QAE3C,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE;YACnB,UAAU,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC;SAClC;QACD,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE;YACnB,UAAU,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC;SAClC;QACD,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE;YACnB,UAAU,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC;SAClC;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ;AA/BD,0BA+BC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2016- Game Server Services, Inc. or its affiliates. All Rights
|
|
3
|
+
* Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License").
|
|
6
|
+
* You may not use this file except in compliance with the License.
|
|
7
|
+
* A copy of the License is located at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* or in the "license" file accompanying this file. This file is distributed
|
|
12
|
+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
|
13
|
+
* express or implied. See the License for the specific language governing
|
|
14
|
+
* permissions and limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { LogCostOptions } from "./options/LogCostOptions";
|
|
17
|
+
|
|
18
|
+
export default class LogCost {
|
|
19
|
+
private readonly base: number;
|
|
20
|
+
private readonly adds: number[];
|
|
21
|
+
private readonly subs: number[]|null = null;
|
|
22
|
+
|
|
23
|
+
public constructor(
|
|
24
|
+
base: number,
|
|
25
|
+
adds: number[],
|
|
26
|
+
options: LogCostOptions|null = null,
|
|
27
|
+
) {
|
|
28
|
+
this.base = base;
|
|
29
|
+
this.adds = adds;
|
|
30
|
+
this.subs = options?.subs ?? null;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
public properties(
|
|
34
|
+
): {[name: string]: any} {
|
|
35
|
+
let properties: {[name: string]: any} = {};
|
|
36
|
+
|
|
37
|
+
if (this.base != null) {
|
|
38
|
+
properties["base"] = this.base;
|
|
39
|
+
}
|
|
40
|
+
if (this.adds != null) {
|
|
41
|
+
properties["adds"] = this.adds;
|
|
42
|
+
}
|
|
43
|
+
if (this.subs != null) {
|
|
44
|
+
properties["subs"] = this.subs;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return properties;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -11,5 +11,7 @@ import { IncrementalRateModelCalculateType } from "./enum/IncrementalRateModelCa
|
|
|
11
11
|
import { IncrementalRateModelCalculateTypeIsLinearOptions } from "./options/IncrementalRateModelCalculateTypeIsLinearOptions";
|
|
12
12
|
import { IncrementalRateModelCalculateTypeIsPowerOptions } from "./options/IncrementalRateModelCalculateTypeIsPowerOptions";
|
|
13
13
|
import { IncrementalRateModelCalculateTypeIsGs2ScriptOptions } from "./options/IncrementalRateModelCalculateTypeIsGs2ScriptOptions";
|
|
14
|
+
import LogCost from "./LogCost";
|
|
15
|
+
import { LogCostOptions } from "./options/LogCostOptions";
|
|
14
16
|
import CurrentMasterData from "./CurrentMasterData";
|
|
15
|
-
export { Namespace, NamespaceOptions, RateModel, RateModelOptions, RateModelTimingType, RateModelTimingTypeIsImmediateOptions, RateModelTimingTypeIsAwaitOptions, IncrementalRateModel, IncrementalRateModelOptions, IncrementalRateModelCalculateType, IncrementalRateModelCalculateTypeIsLinearOptions, IncrementalRateModelCalculateTypeIsPowerOptions, IncrementalRateModelCalculateTypeIsGs2ScriptOptions, CurrentMasterData, };
|
|
17
|
+
export { Namespace, NamespaceOptions, RateModel, RateModelOptions, RateModelTimingType, RateModelTimingTypeIsImmediateOptions, RateModelTimingTypeIsAwaitOptions, IncrementalRateModel, IncrementalRateModelOptions, IncrementalRateModelCalculateType, IncrementalRateModelCalculateTypeIsLinearOptions, IncrementalRateModelCalculateTypeIsPowerOptions, IncrementalRateModelCalculateTypeIsGs2ScriptOptions, LogCost, LogCostOptions, CurrentMasterData, };
|
package/exchange/model/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CurrentMasterData = exports.IncrementalRateModelCalculateType = exports.IncrementalRateModel = exports.RateModelTimingType = exports.RateModel = exports.Namespace = void 0;
|
|
3
|
+
exports.CurrentMasterData = exports.LogCost = exports.IncrementalRateModelCalculateType = exports.IncrementalRateModel = exports.RateModelTimingType = exports.RateModel = exports.Namespace = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
/*
|
|
6
6
|
* Copyright 2016- Game Server Services, Inc. or its affiliates. All Rights
|
|
@@ -27,6 +27,8 @@ const IncrementalRateModel_1 = tslib_1.__importDefault(require("./IncrementalRat
|
|
|
27
27
|
exports.IncrementalRateModel = IncrementalRateModel_1.default;
|
|
28
28
|
const IncrementalRateModelCalculateType_1 = require("./enum/IncrementalRateModelCalculateType");
|
|
29
29
|
Object.defineProperty(exports, "IncrementalRateModelCalculateType", { enumerable: true, get: function () { return IncrementalRateModelCalculateType_1.IncrementalRateModelCalculateType; } });
|
|
30
|
+
const LogCost_1 = tslib_1.__importDefault(require("./LogCost"));
|
|
31
|
+
exports.LogCost = LogCost_1.default;
|
|
30
32
|
const CurrentMasterData_1 = tslib_1.__importDefault(require("./CurrentMasterData"));
|
|
31
33
|
exports.CurrentMasterData = CurrentMasterData_1.default;
|
|
32
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;GAcG;AACH,oEAAoC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;GAcG;AACH,oEAAoC;AAkBhC,oBAlBG,mBAAS,CAkBH;AAhBb,oEAAoC;AAkBhC,oBAlBG,mBAAS,CAkBH;AAhBb,oEAAiE;AAkB7D,oGAlBK,yCAAmB,OAkBL;AAfvB,0FAA0D;AAkBtD,+BAlBG,8BAAoB,CAkBH;AAhBxB,gGAA6F;AAkBzF,kHAlBK,qEAAiC,OAkBL;AAdrC,gEAAgC;AAkB5B,kBAlBG,iBAAO,CAkBH;AAhBX,oFAAoD;AAkBhD,4BAlBG,2BAAiB,CAkBH"}
|
package/exchange/model/index.ts
CHANGED
|
@@ -26,6 +26,8 @@ import { IncrementalRateModelCalculateType } from "./enum/IncrementalRateModelCa
|
|
|
26
26
|
import { IncrementalRateModelCalculateTypeIsLinearOptions } from "./options/IncrementalRateModelCalculateTypeIsLinearOptions"
|
|
27
27
|
import { IncrementalRateModelCalculateTypeIsPowerOptions } from "./options/IncrementalRateModelCalculateTypeIsPowerOptions"
|
|
28
28
|
import { IncrementalRateModelCalculateTypeIsGs2ScriptOptions } from "./options/IncrementalRateModelCalculateTypeIsGs2ScriptOptions"
|
|
29
|
+
import LogCost from "./LogCost";
|
|
30
|
+
import { LogCostOptions } from "./options/LogCostOptions";
|
|
29
31
|
import CurrentMasterData from "./CurrentMasterData";
|
|
30
32
|
|
|
31
33
|
export {
|
|
@@ -42,5 +44,7 @@ export {
|
|
|
42
44
|
IncrementalRateModelCalculateTypeIsLinearOptions,
|
|
43
45
|
IncrementalRateModelCalculateTypeIsPowerOptions,
|
|
44
46
|
IncrementalRateModelCalculateTypeIsGs2ScriptOptions,
|
|
47
|
+
LogCost,
|
|
48
|
+
LogCostOptions,
|
|
45
49
|
CurrentMasterData,
|
|
46
50
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2016- Game Server Services, Inc. or its affiliates. All Rights
|
|
4
|
+
* Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License").
|
|
7
|
+
* You may not use this file except in compliance with the License.
|
|
8
|
+
* A copy of the License is located at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* or in the "license" file accompanying this file. This file is distributed
|
|
13
|
+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
|
14
|
+
* express or implied. See the License for the specific language governing
|
|
15
|
+
* permissions and limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
//# sourceMappingURL=LogCostOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogCostOptions.js","sourceRoot":"","sources":["LogCostOptions.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2016- Game Server Services, Inc. or its affiliates. All Rights
|
|
3
|
+
* Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License").
|
|
6
|
+
* You may not use this file except in compliance with the License.
|
|
7
|
+
* A copy of the License is located at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* or in the "license" file accompanying this file. This file is distributed
|
|
12
|
+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
|
13
|
+
* express or implied. See the License for the specific language governing
|
|
14
|
+
* permissions and limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export interface LogCostOptions {
|
|
18
|
+
subs?: number[]|null;
|
|
19
|
+
}
|
|
20
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CounterModel.js","sourceRoot":"","sources":["CounterModel.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"CounterModel.js","sourceRoot":"","sources":["CounterModel.ts"],"names":[],"mappings":";;AAmBA,MAAqB,YAAY;IAM7B,YACI,IAAY,EACZ,MAA2B,EAC3B,UAAoC,IAAI;;QAN3B,aAAQ,GAAgB,IAAI,CAAC;QAC7B,2BAAsB,GAAgB,IAAI,CAAC;QAOxD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,mCAAI,IAAI,CAAC;QAC1C,IAAI,CAAC,sBAAsB,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,sBAAsB,mCAAI,IAAI,CAAC;IAC1E,CAAC;IAEM,UAAU;QAEb,IAAI,UAAU,GAA0B,EAAE,CAAC;QAE3C,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE;YACnB,UAAU,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC;SAClC;QACD,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,EAAE;YACvB,UAAU,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;SAC1C;QACD,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,EAAE;YACrB,UAAU,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,EACnD,CAAC,CAAC;SACV;QACD,IAAI,IAAI,CAAC,sBAAsB,IAAI,IAAI,EAAE;YACrC,UAAU,CAAC,wBAAwB,CAAC,GAAG,IAAI,CAAC,sBAAsB,CAAC;SACtE;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ;AArCD,+BAqCC"}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* express or implied. See the License for the specific language governing
|
|
14
14
|
* permissions and limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import { VerifyAction } from "../../core/model";
|
|
16
17
|
import CounterScopeModel from "./CounterScopeModel";
|
|
17
18
|
import { CounterModelOptions } from "./options/CounterModelOptions";
|
|
18
19
|
|
|
@@ -1,20 +1,29 @@
|
|
|
1
|
+
import { VerifyAction } from "../../core/model";
|
|
1
2
|
import { CounterScopeModelOptions } from "./options/CounterScopeModelOptions";
|
|
3
|
+
import { CounterScopeModelScopeTypeIsResetTimingOptions } from "./options/CounterScopeModelScopeTypeIsResetTimingOptions";
|
|
4
|
+
import { CounterScopeModelScopeTypeIsVerifyActionOptions } from "./options/CounterScopeModelScopeTypeIsVerifyActionOptions";
|
|
2
5
|
import { CounterScopeModelResetTypeIsNotResetOptions } from "./options/CounterScopeModelResetTypeIsNotResetOptions";
|
|
3
6
|
import { CounterScopeModelResetTypeIsDailyOptions } from "./options/CounterScopeModelResetTypeIsDailyOptions";
|
|
4
7
|
import { CounterScopeModelResetTypeIsWeeklyOptions } from "./options/CounterScopeModelResetTypeIsWeeklyOptions";
|
|
5
8
|
import { CounterScopeModelResetTypeIsMonthlyOptions } from "./options/CounterScopeModelResetTypeIsMonthlyOptions";
|
|
9
|
+
import { CounterScopeModelScopeType } from "./enum/CounterScopeModelScopeType";
|
|
6
10
|
import { CounterScopeModelResetType } from "./enum/CounterScopeModelResetType";
|
|
7
11
|
import { CounterScopeModelResetDayOfWeek } from "./enum/CounterScopeModelResetDayOfWeek";
|
|
8
12
|
export default class CounterScopeModel {
|
|
13
|
+
private readonly scopeType;
|
|
9
14
|
private readonly resetType;
|
|
10
15
|
private readonly resetDayOfMonth;
|
|
11
16
|
private readonly resetDayOfWeek;
|
|
12
17
|
private readonly resetHour;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
static
|
|
17
|
-
static
|
|
18
|
+
private readonly conditionName;
|
|
19
|
+
private readonly condition;
|
|
20
|
+
constructor(scopeType: CounterScopeModelScopeType, options?: CounterScopeModelOptions | null);
|
|
21
|
+
static scopeTypeIsResetTiming(resetType: CounterScopeModelResetType, options?: CounterScopeModelScopeTypeIsResetTimingOptions | null): CounterScopeModel;
|
|
22
|
+
static scopeTypeIsVerifyAction(conditionName: string, condition: VerifyAction, options?: CounterScopeModelScopeTypeIsVerifyActionOptions | null): CounterScopeModel;
|
|
23
|
+
static resetTypeIsNotReset(scopeType: CounterScopeModelScopeType, options?: CounterScopeModelResetTypeIsNotResetOptions | null): CounterScopeModel;
|
|
24
|
+
static resetTypeIsDaily(scopeType: CounterScopeModelScopeType, resetHour: number, options?: CounterScopeModelResetTypeIsDailyOptions | null): CounterScopeModel;
|
|
25
|
+
static resetTypeIsWeekly(scopeType: CounterScopeModelScopeType, resetDayOfWeek: CounterScopeModelResetDayOfWeek, resetHour: number, options?: CounterScopeModelResetTypeIsWeeklyOptions | null): CounterScopeModel;
|
|
26
|
+
static resetTypeIsMonthly(scopeType: CounterScopeModelScopeType, resetDayOfMonth: number, resetHour: number, options?: CounterScopeModelResetTypeIsMonthlyOptions | null): CounterScopeModel;
|
|
18
27
|
properties(): {
|
|
19
28
|
[name: string]: any;
|
|
20
29
|
};
|
|
@@ -1,39 +1,60 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const CounterScopeModelScopeType_1 = require("./enum/CounterScopeModelScopeType");
|
|
4
4
|
class CounterScopeModel {
|
|
5
|
-
constructor(
|
|
6
|
-
var _a, _b, _c;
|
|
5
|
+
constructor(scopeType, options = null) {
|
|
6
|
+
var _a, _b, _c, _d, _e, _f;
|
|
7
|
+
this.resetType = null;
|
|
7
8
|
this.resetDayOfMonth = null;
|
|
8
9
|
this.resetDayOfWeek = null;
|
|
9
10
|
this.resetHour = null;
|
|
10
|
-
this.
|
|
11
|
-
this.
|
|
12
|
-
this.
|
|
13
|
-
this.
|
|
11
|
+
this.conditionName = null;
|
|
12
|
+
this.condition = null;
|
|
13
|
+
this.scopeType = scopeType;
|
|
14
|
+
this.resetType = (_a = options === null || options === void 0 ? void 0 : options.resetType) !== null && _a !== void 0 ? _a : null;
|
|
15
|
+
this.resetDayOfMonth = (_b = options === null || options === void 0 ? void 0 : options.resetDayOfMonth) !== null && _b !== void 0 ? _b : null;
|
|
16
|
+
this.resetDayOfWeek = (_c = options === null || options === void 0 ? void 0 : options.resetDayOfWeek) !== null && _c !== void 0 ? _c : null;
|
|
17
|
+
this.resetHour = (_d = options === null || options === void 0 ? void 0 : options.resetHour) !== null && _d !== void 0 ? _d : null;
|
|
18
|
+
this.conditionName = (_e = options === null || options === void 0 ? void 0 : options.conditionName) !== null && _e !== void 0 ? _e : null;
|
|
19
|
+
this.condition = (_f = options === null || options === void 0 ? void 0 : options.condition) !== null && _f !== void 0 ? _f : null;
|
|
14
20
|
}
|
|
15
|
-
static
|
|
16
|
-
return new CounterScopeModel(
|
|
21
|
+
static scopeTypeIsResetTiming(resetType, options = null) {
|
|
22
|
+
return new CounterScopeModel(CounterScopeModelScopeType_1.CounterScopeModelScopeType.RESET_TIMING, {
|
|
23
|
+
resetType: resetType,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
static scopeTypeIsVerifyAction(conditionName, condition, options = null) {
|
|
27
|
+
return new CounterScopeModel(CounterScopeModelScopeType_1.CounterScopeModelScopeType.VERIFY_ACTION, {
|
|
28
|
+
conditionName: conditionName,
|
|
29
|
+
condition: condition,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
static resetTypeIsNotReset(scopeType, options = null) {
|
|
33
|
+
return new CounterScopeModel(scopeType, {});
|
|
17
34
|
}
|
|
18
|
-
static resetTypeIsDaily(resetHour, options = null) {
|
|
19
|
-
return new CounterScopeModel(
|
|
35
|
+
static resetTypeIsDaily(scopeType, resetHour, options = null) {
|
|
36
|
+
return new CounterScopeModel(scopeType, {
|
|
20
37
|
resetHour: resetHour,
|
|
21
38
|
});
|
|
22
39
|
}
|
|
23
|
-
static resetTypeIsWeekly(resetDayOfWeek, resetHour, options = null) {
|
|
24
|
-
return new CounterScopeModel(
|
|
40
|
+
static resetTypeIsWeekly(scopeType, resetDayOfWeek, resetHour, options = null) {
|
|
41
|
+
return new CounterScopeModel(scopeType, {
|
|
25
42
|
resetDayOfWeek: resetDayOfWeek,
|
|
26
43
|
resetHour: resetHour,
|
|
27
44
|
});
|
|
28
45
|
}
|
|
29
|
-
static resetTypeIsMonthly(resetDayOfMonth, resetHour, options = null) {
|
|
30
|
-
return new CounterScopeModel(
|
|
46
|
+
static resetTypeIsMonthly(scopeType, resetDayOfMonth, resetHour, options = null) {
|
|
47
|
+
return new CounterScopeModel(scopeType, {
|
|
31
48
|
resetDayOfMonth: resetDayOfMonth,
|
|
32
49
|
resetHour: resetHour,
|
|
33
50
|
});
|
|
34
51
|
}
|
|
35
52
|
properties() {
|
|
53
|
+
var _a;
|
|
36
54
|
let properties = {};
|
|
55
|
+
if (this.scopeType != null) {
|
|
56
|
+
properties["scopeType"] = this.scopeType;
|
|
57
|
+
}
|
|
37
58
|
if (this.resetType != null) {
|
|
38
59
|
properties["resetType"] = this.resetType;
|
|
39
60
|
}
|
|
@@ -46,6 +67,12 @@ class CounterScopeModel {
|
|
|
46
67
|
if (this.resetHour != null) {
|
|
47
68
|
properties["resetHour"] = this.resetHour;
|
|
48
69
|
}
|
|
70
|
+
if (this.conditionName != null) {
|
|
71
|
+
properties["conditionName"] = this.conditionName;
|
|
72
|
+
}
|
|
73
|
+
if (this.condition != null) {
|
|
74
|
+
properties["condition"] = (_a = this.condition) === null || _a === void 0 ? void 0 : _a.properties();
|
|
75
|
+
}
|
|
49
76
|
return properties;
|
|
50
77
|
}
|
|
51
78
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CounterScopeModel.js","sourceRoot":"","sources":["CounterScopeModel.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"CounterScopeModel.js","sourceRoot":"","sources":["CounterScopeModel.ts"],"names":[],"mappings":"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"}
|
|
@@ -13,46 +13,84 @@
|
|
|
13
13
|
* express or implied. See the License for the specific language governing
|
|
14
14
|
* permissions and limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import { VerifyAction } from "../../core/model";
|
|
16
17
|
import { CounterScopeModelOptions } from "./options/CounterScopeModelOptions";
|
|
18
|
+
import { CounterScopeModelScopeTypeIsResetTimingOptions } from "./options/CounterScopeModelScopeTypeIsResetTimingOptions";
|
|
19
|
+
import { CounterScopeModelScopeTypeIsVerifyActionOptions } from "./options/CounterScopeModelScopeTypeIsVerifyActionOptions";
|
|
17
20
|
import { CounterScopeModelResetTypeIsNotResetOptions } from "./options/CounterScopeModelResetTypeIsNotResetOptions";
|
|
18
21
|
import { CounterScopeModelResetTypeIsDailyOptions } from "./options/CounterScopeModelResetTypeIsDailyOptions";
|
|
19
22
|
import { CounterScopeModelResetTypeIsWeeklyOptions } from "./options/CounterScopeModelResetTypeIsWeeklyOptions";
|
|
20
23
|
import { CounterScopeModelResetTypeIsMonthlyOptions } from "./options/CounterScopeModelResetTypeIsMonthlyOptions";
|
|
24
|
+
import { CounterScopeModelScopeType } from "./enum/CounterScopeModelScopeType";
|
|
21
25
|
import { CounterScopeModelResetType } from "./enum/CounterScopeModelResetType";
|
|
22
26
|
import { CounterScopeModelResetDayOfWeek } from "./enum/CounterScopeModelResetDayOfWeek";
|
|
23
27
|
|
|
24
28
|
export default class CounterScopeModel {
|
|
25
|
-
private readonly
|
|
29
|
+
private readonly scopeType: CounterScopeModelScopeType;
|
|
30
|
+
private readonly resetType: CounterScopeModelResetType|null = null;
|
|
26
31
|
private readonly resetDayOfMonth: number|null = null;
|
|
27
32
|
private readonly resetDayOfWeek: CounterScopeModelResetDayOfWeek|null = null;
|
|
28
33
|
private readonly resetHour: number|null = null;
|
|
34
|
+
private readonly conditionName: string|null = null;
|
|
35
|
+
private readonly condition: VerifyAction|null = null;
|
|
29
36
|
|
|
30
37
|
public constructor(
|
|
31
|
-
|
|
38
|
+
scopeType: CounterScopeModelScopeType,
|
|
32
39
|
options: CounterScopeModelOptions|null = null,
|
|
33
40
|
) {
|
|
34
|
-
this.
|
|
41
|
+
this.scopeType = scopeType;
|
|
42
|
+
this.resetType = options?.resetType ?? null;
|
|
35
43
|
this.resetDayOfMonth = options?.resetDayOfMonth ?? null;
|
|
36
44
|
this.resetDayOfWeek = options?.resetDayOfWeek ?? null;
|
|
37
45
|
this.resetHour = options?.resetHour ?? null;
|
|
46
|
+
this.conditionName = options?.conditionName ?? null;
|
|
47
|
+
this.condition = options?.condition ?? null;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
public static scopeTypeIsResetTiming(
|
|
51
|
+
resetType: CounterScopeModelResetType,
|
|
52
|
+
options: CounterScopeModelScopeTypeIsResetTimingOptions|null = null,
|
|
53
|
+
): CounterScopeModel {
|
|
54
|
+
return new CounterScopeModel(
|
|
55
|
+
CounterScopeModelScopeType.RESET_TIMING,
|
|
56
|
+
{
|
|
57
|
+
resetType: resetType,
|
|
58
|
+
},
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
public static scopeTypeIsVerifyAction(
|
|
63
|
+
conditionName: string,
|
|
64
|
+
condition: VerifyAction,
|
|
65
|
+
options: CounterScopeModelScopeTypeIsVerifyActionOptions|null = null,
|
|
66
|
+
): CounterScopeModel {
|
|
67
|
+
return new CounterScopeModel(
|
|
68
|
+
CounterScopeModelScopeType.VERIFY_ACTION,
|
|
69
|
+
{
|
|
70
|
+
conditionName: conditionName,
|
|
71
|
+
condition: condition,
|
|
72
|
+
},
|
|
73
|
+
);
|
|
38
74
|
}
|
|
39
75
|
|
|
40
76
|
public static resetTypeIsNotReset(
|
|
77
|
+
scopeType: CounterScopeModelScopeType,
|
|
41
78
|
options: CounterScopeModelResetTypeIsNotResetOptions|null = null,
|
|
42
79
|
): CounterScopeModel {
|
|
43
80
|
return new CounterScopeModel(
|
|
44
|
-
|
|
81
|
+
scopeType,
|
|
45
82
|
{
|
|
46
83
|
},
|
|
47
84
|
);
|
|
48
85
|
}
|
|
49
86
|
|
|
50
87
|
public static resetTypeIsDaily(
|
|
88
|
+
scopeType: CounterScopeModelScopeType,
|
|
51
89
|
resetHour: number,
|
|
52
90
|
options: CounterScopeModelResetTypeIsDailyOptions|null = null,
|
|
53
91
|
): CounterScopeModel {
|
|
54
92
|
return new CounterScopeModel(
|
|
55
|
-
|
|
93
|
+
scopeType,
|
|
56
94
|
{
|
|
57
95
|
resetHour: resetHour,
|
|
58
96
|
},
|
|
@@ -60,12 +98,13 @@ export default class CounterScopeModel {
|
|
|
60
98
|
}
|
|
61
99
|
|
|
62
100
|
public static resetTypeIsWeekly(
|
|
101
|
+
scopeType: CounterScopeModelScopeType,
|
|
63
102
|
resetDayOfWeek: CounterScopeModelResetDayOfWeek,
|
|
64
103
|
resetHour: number,
|
|
65
104
|
options: CounterScopeModelResetTypeIsWeeklyOptions|null = null,
|
|
66
105
|
): CounterScopeModel {
|
|
67
106
|
return new CounterScopeModel(
|
|
68
|
-
|
|
107
|
+
scopeType,
|
|
69
108
|
{
|
|
70
109
|
resetDayOfWeek: resetDayOfWeek,
|
|
71
110
|
resetHour: resetHour,
|
|
@@ -74,12 +113,13 @@ export default class CounterScopeModel {
|
|
|
74
113
|
}
|
|
75
114
|
|
|
76
115
|
public static resetTypeIsMonthly(
|
|
116
|
+
scopeType: CounterScopeModelScopeType,
|
|
77
117
|
resetDayOfMonth: number,
|
|
78
118
|
resetHour: number,
|
|
79
119
|
options: CounterScopeModelResetTypeIsMonthlyOptions|null = null,
|
|
80
120
|
): CounterScopeModel {
|
|
81
121
|
return new CounterScopeModel(
|
|
82
|
-
|
|
122
|
+
scopeType,
|
|
83
123
|
{
|
|
84
124
|
resetDayOfMonth: resetDayOfMonth,
|
|
85
125
|
resetHour: resetHour,
|
|
@@ -91,6 +131,9 @@ export default class CounterScopeModel {
|
|
|
91
131
|
): {[name: string]: any} {
|
|
92
132
|
let properties: {[name: string]: any} = {};
|
|
93
133
|
|
|
134
|
+
if (this.scopeType != null) {
|
|
135
|
+
properties["scopeType"] = this.scopeType;
|
|
136
|
+
}
|
|
94
137
|
if (this.resetType != null) {
|
|
95
138
|
properties["resetType"] = this.resetType;
|
|
96
139
|
}
|
|
@@ -103,6 +146,13 @@ export default class CounterScopeModel {
|
|
|
103
146
|
if (this.resetHour != null) {
|
|
104
147
|
properties["resetHour"] = this.resetHour;
|
|
105
148
|
}
|
|
149
|
+
if (this.conditionName != null) {
|
|
150
|
+
properties["conditionName"] = this.conditionName;
|
|
151
|
+
}
|
|
152
|
+
if (this.condition != null) {
|
|
153
|
+
properties["condition"] = this.condition?.properties(
|
|
154
|
+
);
|
|
155
|
+
}
|
|
106
156
|
|
|
107
157
|
return properties;
|
|
108
158
|
}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { ScopedValueOptions } from "./options/ScopedValueOptions";
|
|
2
|
+
import { ScopedValueScopeTypeIsResetTimingOptions } from "./options/ScopedValueScopeTypeIsResetTimingOptions";
|
|
3
|
+
import { ScopedValueScopeTypeIsVerifyActionOptions } from "./options/ScopedValueScopeTypeIsVerifyActionOptions";
|
|
4
|
+
import { ScopedValueScopeType } from "./enum/ScopedValueScopeType";
|
|
2
5
|
import { ScopedValueResetType } from "./enum/ScopedValueResetType";
|
|
3
6
|
export default class ScopedValue {
|
|
4
|
-
private readonly
|
|
7
|
+
private readonly scopeType;
|
|
5
8
|
private readonly value;
|
|
9
|
+
private readonly resetType;
|
|
10
|
+
private readonly conditionName;
|
|
6
11
|
private readonly nextResetAt;
|
|
7
|
-
constructor(
|
|
12
|
+
constructor(scopeType: ScopedValueScopeType, value: number, options?: ScopedValueOptions | null);
|
|
13
|
+
static scopeTypeIsResetTiming(value: number, resetType: ScopedValueResetType, options?: ScopedValueScopeTypeIsResetTimingOptions | null): ScopedValue;
|
|
14
|
+
static scopeTypeIsVerifyAction(value: number, conditionName: string, options?: ScopedValueScopeTypeIsVerifyActionOptions | null): ScopedValue;
|
|
8
15
|
properties(): {
|
|
9
16
|
[name: string]: any;
|
|
10
17
|
};
|
|
@@ -1,18 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const ScopedValueScopeType_1 = require("./enum/ScopedValueScopeType");
|
|
3
4
|
class ScopedValue {
|
|
4
|
-
constructor(
|
|
5
|
-
var _a;
|
|
5
|
+
constructor(scopeType, value, options = null) {
|
|
6
|
+
var _a, _b, _c;
|
|
7
|
+
this.resetType = null;
|
|
8
|
+
this.conditionName = null;
|
|
6
9
|
this.nextResetAt = null;
|
|
7
|
-
this.
|
|
10
|
+
this.scopeType = scopeType;
|
|
8
11
|
this.value = value;
|
|
9
|
-
this.
|
|
12
|
+
this.resetType = (_a = options === null || options === void 0 ? void 0 : options.resetType) !== null && _a !== void 0 ? _a : null;
|
|
13
|
+
this.conditionName = (_b = options === null || options === void 0 ? void 0 : options.conditionName) !== null && _b !== void 0 ? _b : null;
|
|
14
|
+
this.nextResetAt = (_c = options === null || options === void 0 ? void 0 : options.nextResetAt) !== null && _c !== void 0 ? _c : null;
|
|
15
|
+
}
|
|
16
|
+
static scopeTypeIsResetTiming(value, resetType, options = null) {
|
|
17
|
+
return new ScopedValue(ScopedValueScopeType_1.ScopedValueScopeType.RESET_TIMING, value, {
|
|
18
|
+
resetType: resetType,
|
|
19
|
+
nextResetAt: options === null || options === void 0 ? void 0 : options.nextResetAt,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
static scopeTypeIsVerifyAction(value, conditionName, options = null) {
|
|
23
|
+
return new ScopedValue(ScopedValueScopeType_1.ScopedValueScopeType.VERIFY_ACTION, value, {
|
|
24
|
+
conditionName: conditionName,
|
|
25
|
+
});
|
|
10
26
|
}
|
|
11
27
|
properties() {
|
|
12
28
|
let properties = {};
|
|
29
|
+
if (this.scopeType != null) {
|
|
30
|
+
properties["scopeType"] = this.scopeType;
|
|
31
|
+
}
|
|
13
32
|
if (this.resetType != null) {
|
|
14
33
|
properties["resetType"] = this.resetType;
|
|
15
34
|
}
|
|
35
|
+
if (this.conditionName != null) {
|
|
36
|
+
properties["conditionName"] = this.conditionName;
|
|
37
|
+
}
|
|
16
38
|
if (this.value != null) {
|
|
17
39
|
properties["value"] = this.value;
|
|
18
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScopedValue.js","sourceRoot":"","sources":["ScopedValue.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"ScopedValue.js","sourceRoot":"","sources":["ScopedValue.ts"],"names":[],"mappings":";;AAoBA,sEAAmE;AAGnE,MAAqB,WAAW;IAO5B,YACI,SAA+B,EAC/B,KAAa,EACb,UAAmC,IAAI;;QAP1B,cAAS,GAA8B,IAAI,CAAC;QAC5C,kBAAa,GAAgB,IAAI,CAAC;QAClC,gBAAW,GAAgB,IAAI,CAAC;QAO7C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,SAAS,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,mCAAI,IAAI,CAAC;QAC5C,IAAI,CAAC,aAAa,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,mCAAI,IAAI,CAAC;QACpD,IAAI,CAAC,WAAW,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,mCAAI,IAAI,CAAC;IACpD,CAAC;IAEM,MAAM,CAAC,sBAAsB,CAChC,KAAa,EACb,SAA+B,EAC/B,UAAyD,IAAI;QAE7D,OAAO,IAAI,WAAW,CAClB,2CAAoB,CAAC,YAAY,EACjC,KAAK,EACL;YACI,SAAS,EAAE,SAAS;YACpB,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW;SACpC,CACJ,CAAC;IACN,CAAC;IAEM,MAAM,CAAC,uBAAuB,CACjC,KAAa,EACb,aAAqB,EACrB,UAA0D,IAAI;QAE9D,OAAO,IAAI,WAAW,CAClB,2CAAoB,CAAC,aAAa,EAClC,KAAK,EACL;YACI,aAAa,EAAE,aAAa;SAC/B,CACJ,CAAC;IACN,CAAC;IAEM,UAAU;QAEb,IAAI,UAAU,GAA0B,EAAE,CAAC;QAE3C,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,EAAE;YACxB,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;SAC5C;QACD,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,EAAE;YACxB,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;SAC5C;QACD,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,EAAE;YAC5B,UAAU,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC;SACpD;QACD,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE;YACpB,UAAU,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;SACpC;QACD,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,EAAE;YAC1B,UAAU,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC;SAChD;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ;AAtED,8BAsEC"}
|