@zgfe/modules-page 1.0.1-alpha.12 → 1.0.1-alpha.14

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.
@@ -21,6 +21,9 @@ var PageContent = function PageContent(props) {
21
21
  }
22
22
  return data;
23
23
  }, [pageGroupList, props.groupId]);
24
+ var columns = useMemo(function () {
25
+ return getColumns(props.type, props.hasUserGroup, props.onClick, props.onEdit);
26
+ }, [props.type, props.hasUserGroup]);
24
27
  if (props.type === 'pageGroup' && !groupList.length) {
25
28
  return /*#__PURE__*/React.createElement("div", {
26
29
  className: "".concat(classPrefix, "-empty")
@@ -43,9 +46,8 @@ var PageContent = function PageContent(props) {
43
46
  return /*#__PURE__*/React.createElement("div", {
44
47
  className: classPrefix
45
48
  }, /*#__PURE__*/React.createElement(BizTable, {
46
- rowKey: props.type === 'pageGroup' ? 'id' : 'pageUrl',
47
49
  dataSource: props.type === 'pageGroup' ? groupList : props.value,
48
- columns: getColumns(props.type, props.hasUserGroup, props.onClick, props.onEdit)
50
+ columns: columns
49
51
  }));
50
52
  };
51
53
  export default PageContent;
@@ -151,7 +151,7 @@ var GroupModal = function GroupModal(props) {
151
151
  name: "initPage",
152
152
  rules: [{
153
153
  validator: function validator(_, value) {
154
- var reg = /^(?:(http|https|ftp):\/\/)?((?:[\w-]+\.)+[a-z0-9]+)((?:\/[^/?#]*)+)?(\?[^#]+)?(#.+)?$/i;
154
+ var reg = /^((http:\/\/)|(https:\/\/)|(\/\/))[A-Za-z0-9]/;
155
155
  if (!value || !/\S+/.test(value)) return Promise.reject("\u8BF7\u8F93\u5165\u80CC\u666F\u9875\u5730\u5740");
156
156
  if (!reg.test(value)) return Promise.reject('必须是合法的网页链接');
157
157
  return Promise.resolve();
@@ -123,7 +123,10 @@ var PageSelect = function PageSelect(props) {
123
123
  }, /*#__PURE__*/React.createElement(IconFont, {
124
124
  className: "".concat(classPrefix, "-panel-icon").concat(!props.enableAdd ? ' disabled' : ''),
125
125
  type: "shaixuan",
126
- onClick: props.onAdd
126
+ onClick: function onClick() {
127
+ if (!props.enableAdd) return;
128
+ props.onAdd && props.onAdd();
129
+ }
127
130
  }))));
128
131
  };
129
132
  export default PageSelect;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { SearchPanelProps } from './types';
3
3
  import './index.less';
4
- declare const SearchPanel: React.FC<SearchPanelProps>;
4
+ declare const SearchPanel: React.ForwardRefExoticComponent<SearchPanelProps & React.RefAttributes<any>>;
5
5
  export default SearchPanel;
@@ -11,7 +11,7 @@ import "./index.less";
11
11
  import { BizAttrConditionGroup, BizGlobalDataContext, BizUserGroup, IconFont } from '@zgfe/business-lib';
12
12
  import PageSelect from "../pageSelect";
13
13
  import { formValue, formatValue } from "./util";
14
- var SearchPanel = function SearchPanel(props) {
14
+ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
15
15
  var classPrefix = 'page-search-panel';
16
16
  // form 值
17
17
  var _Form$useForm = Form.useForm(),
@@ -89,6 +89,7 @@ var SearchPanel = function SearchPanel(props) {
89
89
  className: "".concat(classPrefix, "-item"),
90
90
  key: field.key
91
91
  }), /*#__PURE__*/React.createElement(BizUserGroup, {
92
+ enableTags: true,
92
93
  enableDelete: fields.length > 1,
93
94
  onDelete: function onDelete() {
94
95
  return remove(index);
@@ -103,7 +104,9 @@ var SearchPanel = function SearchPanel(props) {
103
104
  className: "biz-icon",
104
105
  type: 'tianjia1'
105
106
  }), "\u6DFB\u52A0\u7528\u6237\u7FA4"));
106
- }), /*#__PURE__*/React.createElement(Form.Item, {
107
+ }), /*#__PURE__*/React.createElement("div", {
108
+ ref: ref
109
+ }, /*#__PURE__*/React.createElement(Form.Item, {
107
110
  className: "".concat(classPrefix, "-title")
108
111
  }, " \u9875\u9762 "), /*#__PURE__*/React.createElement(Form.Item, {
109
112
  className: "".concat(classPrefix, "-item2"),
@@ -119,6 +122,6 @@ var SearchPanel = function SearchPanel(props) {
119
122
  onlyAnd: true,
120
123
  enableDelete: true,
121
124
  onConditionsCount: setCount
122
- })))));
123
- };
125
+ }))))));
126
+ });
124
127
  export default SearchPanel;
@@ -4,7 +4,7 @@ export interface SearchPanelProps {
4
4
  onChange?: (data: SearchValue) => void;
5
5
  }
6
6
  export interface SearchValue {
7
- userGroup?: number[];
7
+ userGroup?: (number | string[])[];
8
8
  pageUrl?: string;
9
9
  pageTitle?: string;
10
10
  pageGroup?: number;
@@ -2,7 +2,7 @@ import { BizSelectTypes } from '@zgfe/business-lib';
2
2
  import { FormValue, SearchValue } from './types';
3
3
  export declare const formValue: (source?: SearchValue, userGroupList?: BizSelectTypes.Option[]) => FormValue;
4
4
  export declare const formatValue: (source: FormValue) => {
5
- userGroup: number[];
5
+ userGroup: (number | string[])[];
6
6
  pageTitle: string | undefined;
7
7
  pageUrl: string | undefined;
8
8
  pageGroup: number | undefined;
@@ -1,3 +1,4 @@
1
+ import { util } from '@zgfe/business-lib';
1
2
  import _ from 'lodash';
2
3
  export var formValue = function formValue(source, userGroupList) {
3
4
  var data = _.cloneDeep(source) || {};
@@ -33,12 +34,21 @@ export var formatValue = function formatValue(source) {
33
34
  var data = _.cloneDeep(source) || {};
34
35
  var group = [];
35
36
  (_data$userGroup2 = data.userGroup) === null || _data$userGroup2 === void 0 ? void 0 : _data$userGroup2.forEach(function (item) {
36
- if (item) {
37
+ if (util.isArray(item)) {
38
+ var childGroup = [];
39
+ item.forEach(function (cItem) {
40
+ var name = '';
41
+ if (!cItem || !cItem.length) return;
42
+ name = "".concat(cItem[1].id, ":").concat(cItem[2].layerLabelName || cItem[2].layerLabelId);
43
+ childGroup.push(name);
44
+ });
45
+ group.push(childGroup);
46
+ } else if (item !== null && item !== void 0 && item.id) {
37
47
  group.push(item.id);
38
48
  }
39
49
  });
40
50
  return {
41
- userGroup: group,
51
+ userGroup: group.length ? group : [0],
42
52
  pageTitle: (_data$page = data.page) === null || _data$page === void 0 ? void 0 : _data$page.pageTitle,
43
53
  pageUrl: (_data$page2 = data.page) === null || _data$page2 === void 0 ? void 0 : _data$page2.pageUrl,
44
54
  pageGroup: (_data$page3 = data.page) === null || _data$page3 === void 0 ? void 0 : _data$page3.pageGroup,
@@ -10,7 +10,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
10
10
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
11
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
- import React, { useContext, useEffect, useMemo, useState } from 'react';
13
+ import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
14
14
  import EmptyPanel from "../empty";
15
15
  import { BizGlobalDataContext, BizLayout } from '@zgfe/business-lib';
16
16
  import { Button, Spin } from 'antd';
@@ -22,6 +22,7 @@ import { ModulesPageContext } from "./types";
22
22
  import GroupModal from "../../components/groupModal";
23
23
  import { getPageGroupList, getPageList, getPageResult, onDownload as _onDownload } from "./utils";
24
24
  import DetailContent from "../../components/detail";
25
+ import _ from 'lodash';
25
26
  var classPrefix = 'modules-page';
26
27
  var ModulesPage = function ModulesPage(props) {
27
28
  // 页面类型
@@ -29,58 +30,66 @@ var ModulesPage = function ModulesPage(props) {
29
30
  _useState2 = _slicedToArray(_useState, 2),
30
31
  currentType = _useState2[0],
31
32
  setCurrentType = _useState2[1];
32
- // 查询条件
33
+ // 最新查询条件
33
34
  var _useState3 = useState(),
34
35
  _useState4 = _slicedToArray(_useState3, 2),
35
36
  searchValue = _useState4[0],
36
37
  setSearchValue = _useState4[1];
37
- // 是否展示分组弹窗
38
- var _useState5 = useState(false),
38
+ // 上一次查询条件
39
+ var _useState5 = useState(),
39
40
  _useState6 = _slicedToArray(_useState5, 2),
40
- showGroup = _useState6[0],
41
- setShowGroup = _useState6[1];
42
- // 页面列表
43
- var _useState7 = useState([]),
41
+ originSearchValue = _useState6[0],
42
+ setOriginSearchValue = _useState6[1];
43
+
44
+ // 是否展示分组弹窗
45
+ var _useState7 = useState(false),
44
46
  _useState8 = _slicedToArray(_useState7, 2),
45
- pageList = _useState8[0],
46
- setPageList = _useState8[1];
47
- // 页面分组列表
47
+ showGroup = _useState8[0],
48
+ setShowGroup = _useState8[1];
49
+ // 页面列表
48
50
  var _useState9 = useState([]),
49
51
  _useState10 = _slicedToArray(_useState9, 2),
50
- pageGroupList = _useState10[0],
51
- setPageGroupList = _useState10[1];
52
- // 查询结果
52
+ pageList = _useState10[0],
53
+ setPageList = _useState10[1];
54
+ // 页面分组列表
53
55
  var _useState11 = useState([]),
54
56
  _useState12 = _slicedToArray(_useState11, 2),
55
- result = _useState12[0],
56
- setResult = _useState12[1];
57
- var _useState13 = useState(true),
57
+ pageGroupList = _useState12[0],
58
+ setPageGroupList = _useState12[1];
59
+ // 查询结果
60
+ var _useState13 = useState([]),
58
61
  _useState14 = _slicedToArray(_useState13, 2),
59
- loading = _useState14[0],
60
- setLoading = _useState14[1];
62
+ result = _useState14[0],
63
+ setResult = _useState14[1];
61
64
  var _useState15 = useState(true),
62
65
  _useState16 = _slicedToArray(_useState15, 2),
63
- pageLoading = _useState16[0],
64
- setPageLoading = _useState16[1];
65
- // 要编辑的分组
66
- var _useState17 = useState(),
66
+ loading = _useState16[0],
67
+ setLoading = _useState16[1];
68
+ var _useState17 = useState(true),
67
69
  _useState18 = _slicedToArray(_useState17, 2),
68
- editGroup = _useState18[0],
69
- setEditGroup = _useState18[1];
70
- // 当前页面类型 list/detail
71
- var _useState19 = useState('list'),
70
+ pageLoading = _useState18[0],
71
+ setPageLoading = _useState18[1];
72
+ // 要编辑的分组
73
+ var _useState19 = useState(),
72
74
  _useState20 = _slicedToArray(_useState19, 2),
73
- pageType = _useState20[0],
74
- setPageType = _useState20[1];
75
- var _useState21 = useState(0),
75
+ editGroup = _useState20[0],
76
+ setEditGroup = _useState20[1];
77
+ // 当前页面类型 list/detail
78
+ var _useState21 = useState('list'),
76
79
  _useState22 = _slicedToArray(_useState21, 2),
77
- timer = _useState22[0],
78
- setTimer = _useState22[1];
79
- //当前点击内容(用于同步查询条件中的内容)
80
- var _useState23 = useState(),
80
+ pageType = _useState22[0],
81
+ setPageType = _useState22[1];
82
+ var _useState23 = useState(0),
81
83
  _useState24 = _slicedToArray(_useState23, 2),
82
- currentClickPage = _useState24[0],
83
- setCurrentClickPage = _useState24[1];
84
+ timer = _useState24[0],
85
+ setTimer = _useState24[1];
86
+ //当前点击内容(用于同步查询条件中的内容)
87
+ var _useState25 = useState(),
88
+ _useState26 = _slicedToArray(_useState25, 2),
89
+ currentClickPage = _useState26[0],
90
+ setCurrentClickPage = _useState26[1];
91
+ // 查询条件ref
92
+ var selectRef = useRef(null);
84
93
  var _useContext = useContext(BizGlobalDataContext),
85
94
  eventGroupList = _useContext.eventGroupList,
86
95
  currentApp = _useContext.currentApp;
@@ -112,7 +121,6 @@ var ModulesPage = function ModulesPage(props) {
112
121
  useEffect(function () {
113
122
  if (isEmpty) return;
114
123
  if (!searchValue) return;
115
- console.log('searchValue:', searchValue);
116
124
  var type = searchValue !== null && searchValue !== void 0 && searchValue.pageGroup || (searchValue === null || searchValue === void 0 ? void 0 : searchValue.pageGroup) === 0 ? 'pageGroup' : 'page';
117
125
  setCurrentType(type);
118
126
  // 选择概览时,跳到列表页
@@ -121,7 +129,10 @@ var ModulesPage = function ModulesPage(props) {
121
129
  }
122
130
  if (type === 'pageGroup' && !(searchValue !== null && searchValue !== void 0 && searchValue.pageGroup)) return;
123
131
  if (type === 'page' || pageType === 'detail') {
124
- fetch();
132
+ if (!_.isEqual(originSearchValue, searchValue)) {
133
+ setOriginSearchValue(_.cloneDeep(searchValue));
134
+ fetch();
135
+ }
125
136
  }
126
137
  }, [searchValue]);
127
138
  // 查询结果
@@ -194,10 +205,12 @@ var ModulesPage = function ModulesPage(props) {
194
205
  title: "\u9875\u9762\u5206\u6790",
195
206
  hasCollapse: true,
196
207
  topPanel: /*#__PURE__*/React.createElement(SearchPanel, {
208
+ ref: selectRef,
197
209
  value: searchValue,
198
210
  onChange: onChange
199
211
  }),
200
- topRender: props.onClickWarn ? render : null
212
+ topRender: props.onClickWarn ? render : null,
213
+ collapseRef: selectRef
201
214
  }, /*#__PURE__*/React.createElement(Spin, {
202
215
  spinning: pageLoading
203
216
  }, /*#__PURE__*/React.createElement(TopContent, {
@@ -212,9 +225,9 @@ var ModulesPage = function ModulesPage(props) {
212
225
  onDownload: function onDownload() {
213
226
  return _onDownload(searchValue, currentApp);
214
227
  }
215
- }), /*#__PURE__*/React.createElement(Spin, {
216
- spinning: loading
217
- }, pageType === 'list' ? /*#__PURE__*/React.createElement(PageContent, {
228
+ }), loading ? /*#__PURE__*/React.createElement("div", {
229
+ className: "".concat(classPrefix, "-content")
230
+ }, /*#__PURE__*/React.createElement(Spin, null)) : pageType === 'list' ? /*#__PURE__*/React.createElement(PageContent, {
218
231
  type: currentType,
219
232
  value: result,
220
233
  groupId: searchValue === null || searchValue === void 0 ? void 0 : searchValue.pageGroup,
@@ -227,7 +240,7 @@ var ModulesPage = function ModulesPage(props) {
227
240
  }) : /*#__PURE__*/React.createElement(DetailContent, {
228
241
  params: searchValue,
229
242
  result: result
230
- })), showGroup ? /*#__PURE__*/React.createElement(GroupModal, {
243
+ }), showGroup ? /*#__PURE__*/React.createElement(GroupModal, {
231
244
  value: editGroup,
232
245
  onCancel: function onCancel() {
233
246
  return setShowGroup(false);
@@ -19,4 +19,14 @@
19
19
  border: 1px solid #ecedf0;
20
20
  border-radius: 8px;
21
21
  }
22
+
23
+ &-content {
24
+ display: flex;
25
+ align-items: center;
26
+ justify-content: center;
27
+ width: 100%;
28
+ min-height: 300px;
29
+ margin-top: 60px;
30
+ background-color: #fff;
31
+ }
22
32
  }
@@ -4,10 +4,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
6
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
- import { ajax, util } from '@zgfe/business-lib';
7
+ import { ajax, util, base64 } from '@zgfe/business-lib';
8
8
  import api from "../../constants/api";
9
- import base64 from "./base64";
10
-
11
9
  // 获取页面列表
12
10
  export var getPageList = function getPageList(data, callback) {
13
11
  ajax(api.getPageList, {
@@ -94,7 +92,7 @@ export var onDownload = function onDownload(params, currentApp) {
94
92
  module: 'page'
95
93
  }, params), {}, {
96
94
  down: {
97
- fname: base64.encode(title),
95
+ fname: base64.encode(title, false),
98
96
  titles: []
99
97
  }
100
98
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-page",
3
- "version": "1.0.1-alpha.12",
3
+ "version": "1.0.1-alpha.14",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -39,7 +39,7 @@
39
39
  "@types/lodash": "^4.14.197",
40
40
  "@umijs/fabric": "^2.8.1",
41
41
  "@umijs/test": "^3.0.5",
42
- "@zgfe/business-lib": "1.1.80-page.0",
42
+ "@zgfe/business-lib": "1.1.81-page.0",
43
43
  "antd": "^4.22.6",
44
44
  "dumi": "^1.1.0",
45
45
  "father": "^4.0.0-rc.2",
@@ -50,5 +50,5 @@
50
50
  "prettier": "^2.2.1",
51
51
  "yorkie": "^2.0.0"
52
52
  },
53
- "gitHead": "d9629e7c440a7b5ff943620315035a41ce043b38"
53
+ "gitHead": "a74833c61c01b230f1144fc3c745289f5a02a8ad"
54
54
  }
@@ -1,23 +0,0 @@
1
- declare const _default: {
2
- _keyStr: string;
3
- _utf8_encode: (string: string) => string;
4
- _utf8_decode: (utftext: string) => string;
5
- encode: (input: string, type?: boolean) => string;
6
- decode: (input: string) => string;
7
- _$: string[];
8
- pw: string;
9
- gString: (O6b8: {
10
- [x: string]: (arg0: number) => {
11
- (): any;
12
- new (): any;
13
- [x: string]: () => any;
14
- };
15
- }[], O492: {
16
- [x: string]: (arg0: number) => {
17
- (): any;
18
- new (): any;
19
- [x: string]: () => any;
20
- };
21
- }[]) => string;
22
- };
23
- export default _default;
@@ -1,132 +0,0 @@
1
- /**
2
- * Created by yqdong on 16/3/15.
3
- * qq: 1013501639
4
- * @author yqdong
5
- *
6
- */
7
- export default {
8
- _keyStr: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',
9
- _utf8_encode: function _utf8_encode(string) {
10
- string = string.replace(/\r\n/g, '\n');
11
- var utftext = '';
12
- for (var n = 0; n < string.length; n++) {
13
- var c = string.charCodeAt(n);
14
- if (c < 128) {
15
- utftext += String.fromCharCode(c);
16
- } else if (c > 127 && c < 2048) {
17
- utftext += String.fromCharCode(c >> 6 | 192); // jshint ignore:line
18
- utftext += String.fromCharCode(c & 63 | 128); // jshint ignore:line
19
- } else {
20
- utftext += String.fromCharCode(c >> 12 | 224); // jshint ignore:line
21
- utftext += String.fromCharCode(c >> 6 & 63 | 128); // jshint ignore:line
22
- utftext += String.fromCharCode(c & 63 | 128); // jshint ignore:line
23
- }
24
- }
25
-
26
- return utftext;
27
- },
28
- _utf8_decode: function _utf8_decode(utftext) {
29
- var string = '';
30
- var i = 0,
31
- c = 0,
32
- c2 = 0,
33
- c3 = 0;
34
- while (i < utftext.length) {
35
- c = utftext.charCodeAt(i);
36
- if (c < 128) {
37
- string += String.fromCharCode(c);
38
- i++;
39
- } else if (c > 191 && c < 224) {
40
- c2 = utftext.charCodeAt(i + 1);
41
- string += String.fromCharCode((c & 31) << 6 | c2 & 63); // jshint ignore:line
42
- i += 2;
43
- } else {
44
- c2 = utftext.charCodeAt(i + 1);
45
- c3 = utftext.charCodeAt(i + 2);
46
- string += String.fromCharCode((c & 15) << 12 | (c2 & 63) << 6 | c3 & 63); // jshint ignore:line
47
- i += 3;
48
- }
49
- }
50
- return string;
51
- },
52
- encode: function encode(input, type) {
53
- var output = '';
54
- var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
55
- var i = 0;
56
- input = this._utf8_encode(input);
57
- while (i < input.length) {
58
- chr1 = input.charCodeAt(i++);
59
- chr2 = input.charCodeAt(i++);
60
- chr3 = input.charCodeAt(i++);
61
- enc1 = chr1 >> 2; // jshint ignore:line
62
- enc2 = (chr1 & 3) << 4 | chr2 >> 4; // jshint ignore:line
63
- enc3 = (chr2 & 15) << 2 | chr3 >> 6; // jshint ignore:line
64
- enc4 = chr3 & 63; // jshint ignore:line
65
- if (isNaN(chr2)) {
66
- enc3 = enc4 = 64;
67
- } else if (isNaN(chr3)) {
68
- enc4 = 64;
69
- }
70
- output = output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
71
- }
72
- if (type) {
73
- return output.replace(/[\+]?[\/]?[\=]?/g, '');
74
- } else {
75
- return output.replace(/\+/g, '-');
76
- }
77
- },
78
- decode: function decode(input) {
79
- input = input.replace(/\-/g, '+');
80
- var output = '';
81
- var chr1, chr2, chr3;
82
- var enc1, enc2, enc3, enc4;
83
- var i = 0;
84
- while (i < input.length) {
85
- enc1 = this._keyStr.indexOf(input.charAt(i++));
86
- enc2 = this._keyStr.indexOf(input.charAt(i++));
87
- enc3 = this._keyStr.indexOf(input.charAt(i++));
88
- enc4 = this._keyStr.indexOf(input.charAt(i++));
89
- chr1 = enc1 << 2 | enc2 >> 4; // jshint ignore:line
90
- chr2 = (enc2 & 15) << 4 | enc3 >> 2; // jshint ignore:line
91
- chr3 = (enc3 & 3) << 6 | enc4; // jshint ignore:line
92
- output = output + String.fromCharCode(chr1);
93
- if (enc3 != 64) {
94
- output = output + String.fromCharCode(chr2);
95
- }
96
- if (enc4 != 64) {
97
- output = output + String.fromCharCode(chr3);
98
- }
99
- }
100
- output = this._utf8_decode(output);
101
- return output;
102
- },
103
- _$: [''],
104
- pw: '0&Gqs0a5',
105
- gString: function gString(O6b8, O492) {
106
- var dfc4 = Array(0x100);
107
- var O26e = Array(0x100);
108
- var O999 = O492['\x6c\x65\x6e\x67\x74\x68'];
109
- var O453 = O6b8['\x6c\x65\x6e\x67\x74\x68'];
110
- for (var O98c = 0x0; O98c < 0x100; O98c++) {
111
- dfc4[O98c] = O492[O98c % O999]['\x63\x68\x61\x72\x41\x74'](0x0)['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74']();
112
- O26e[O98c] = O98c;
113
- }
114
- for (var O8cf = O98c = 0x0; O98c < 0x100; O98c++) {
115
- O8cf = (O8cf + O26e[O98c] + dfc4[O98c]) % 0x100;
116
- var O23f = O26e[O98c];
117
- O26e[O98c] = O26e[O8cf];
118
- O26e[O8cf] = O23f;
119
- }
120
- var ac35 = this._$[0];
121
- for (var O577 = O8cf = O98c = 0x0; O98c < O453; O98c++) {
122
- O577 = (O577 + 0x1) % 0x100;
123
- O8cf = (O8cf + O26e[O577]) % 0x100;
124
- var tmp = O26e[O577];
125
- O26e[O577] = O26e[O8cf];
126
- O26e[O8cf] = tmp;
127
- var O3d6 = O26e[(O26e[O577] + O26e[O8cf]) % 0x100];
128
- ac35 += String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](O6b8[O98c]['\x63\x68\x61\x72\x41\x74'](0x0)['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74']() ^ O3d6);
129
- }
130
- return ac35;
131
- }
132
- };