@para-ui/core 4.0.61 → 4.0.63
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/Anchor/index.js +2 -1
- package/Argv/index.js +3 -2
- package/AutoButton/index.js +3 -2
- package/AutoTips/index.js +248 -7
- package/Breadcrumbs/index.js +2 -1
- package/Button/index.js +3 -2
- package/ButtonGroup/index.js +3 -2
- package/Card/index.js +33 -23
- package/Cascader/index.js +4 -3
- package/ComboSelect/index.js +4 -3
- package/CopyText/index.js +2 -1
- package/CycleSelector/index.js +3 -2
- package/DatePicker/index.js +6 -5
- package/Descriptions/index.js +3 -2
- package/Desktop/index.js +6 -5
- package/Drawer/index.js +3 -2
- package/DynamicMultiBox/index.js +211 -25
- package/DynamicMultiBox/interface.d.ts +30 -0
- package/Form/index.js +5 -4
- package/FormItem/index.js +5 -4
- package/FunctionModal/index.js +5 -4
- package/InputCode/index.js +3 -2
- package/InputLang/index.d.ts +2 -0
- package/InputLang/index.js +12 -3
- package/Menu/index.js +2 -1
- package/Modal/index.js +3 -2
- package/MultiBox/index.js +6 -5
- package/OperateBtn/index.js +3 -2
- package/PageHeader/index.js +3 -2
- package/Pagination/index.js +3 -2
- package/PopConfirm/index.js +3 -2
- package/PopMenu/index.js +2 -1
- package/QuickReply/index.js +3 -2
- package/README.md +9 -0
- package/Result/index.js +2 -1
- package/Search/index.js +2 -1
- package/Select/index.js +2 -1
- package/SelectInput/index.js +2 -1
- package/Selector/index.js +2 -1
- package/SelectorPicker/index.js +2 -1
- package/SingleBox/index.js +6 -5
- package/Stepper/index.js +2 -1
- package/Table/index.js +3 -2
- package/Tabs/index.js +8 -7
- package/Tag/index.js +2 -1
- package/TextField/index.js +2 -1
- package/TimePicker/index.js +6 -5
- package/Title/index.js +2 -1
- package/ToggleButton/index.js +3 -2
- package/Transfer/index.js +3 -2
- package/Tree/index.js +4 -3
- package/Upload/index.js +3 -2
- package/Utils/Hooks/useResizeObserver.d.ts +2 -0
- package/_verture/{index-7d115f38.js → index-0163a7b0.js} +2 -2
- package/_verture/{index-2055d357.js → index-09404080.js} +1 -1
- package/_verture/{index-3f811a6c.js → index-78f0f0e7.js} +1 -1
- package/_verture/{index-6bbcdc7f.js → index-98ae8a30.js} +1 -1
- package/_verture/useResizeObserver-edda059a.js +69 -0
- package/index.js +7 -6
- package/package.json +1 -1
- package/umd/AutoButton.js +1 -1
- package/umd/AutoTips.js +1 -1
- package/umd/Breadcrumbs.js +1 -1
- package/umd/Card.js +1 -1
- package/umd/ComboSelect.js +3 -3
- package/umd/DynamicMultiBox.js +3 -3
- package/umd/Form.js +1 -1
- package/umd/FormItem.js +1 -1
- package/umd/InputLang.js +1 -1
- package/umd/Selector.js +1 -1
- package/umd/SelectorPicker.js +1 -1
- package/umd/Table.js +1 -1
- package/_verture/index-f62daef9.js +0 -298
- /package/_verture/{modalContext-15114682.js → modalContext-e3beaf4b.js} +0 -0
package/umd/InputLang.js
CHANGED
|
@@ -40,4 +40,4 @@ object-assign
|
|
|
40
40
|
Licensed under the MIT License (MIT), see
|
|
41
41
|
http://jedwatson.github.io/classnames
|
|
42
42
|
*/!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)o.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},43145:(e,t,n)=>{"use strict";function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}n.d(t,{A:()=>o})},96369:(e,t,n)=>{"use strict";function o(e){if(Array.isArray(e))return e}n.d(t,{A:()=>o})},9417:(e,t,n)=>{"use strict";function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{A:()=>o})},10467:(e,t,n)=>{"use strict";function o(e,t,n,o,r,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(o,r)}function r(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function l(e){o(a,r,i,l,c,"next",e)}function c(e){o(a,r,i,l,c,"throw",e)}l(void 0)}))}}n.d(t,{A:()=>r})},23029:(e,t,n)=>{"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{A:()=>o})},92901:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(49922);function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(0,o.A)(r.key),r)}}function i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},29426:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var o=n(53954),r=n(52176),i=n(56822);function a(e){var t=(0,r.A)();return function(){var n,r=(0,o.A)(e);if(t){var a=(0,o.A)(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return(0,i.A)(this,n)}}},64467:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(49922);function r(e,t,n){return(t=(0,o.A)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},58168:(e,t,n)=>{"use strict";function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},o.apply(this,arguments)}n.d(t,{A:()=>o})},53954:(e,t,n)=>{"use strict";function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}n.d(t,{A:()=>o})},85501:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(63662);function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,o.A)(e,t)}},52176:(e,t,n)=>{"use strict";function o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(o=function(){return!!e})()}n.d(t,{A:()=>o})},6986:(e,t,n)=>{"use strict";function o(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=i.call(n)).done)&&(l.push(o.value),l.length!==t);c=!0);}catch(e){u=!0,r=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return l}}n.d(t,{A:()=>o})},76562:(e,t,n)=>{"use strict";function o(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:()=>o})},89379:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(64467);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){(0,o.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},80045:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(98587);function r(e,t){if(null==e)return{};var n,r,i=(0,o.A)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},98587:(e,t,n)=>{"use strict";function o(e,t){if(null==e)return{};var n={};for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(t.indexOf(o)>=0)continue;n[o]=e[o]}return n}n.d(t,{A:()=>o})},56822:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(82284),r=n(9417);function i(e,t){if(t&&("object"===(0,o.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,r.A)(e)}},90675:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(82284);function r(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
43
|
-
r=function(){return t};var e,t={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",s=l.toStringTag||"@@toStringTag";function p(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(e){p=function(e,t,n){return e[t]=n}}function f(e,t,n,o){var r=t&&t.prototype instanceof y?t:y,i=Object.create(r.prototype),l=new N(o||[]);return a(i,"_invoke",{value:P(e,n,l)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var m="suspendedStart",v="suspendedYield",h="executing",b="completed",g={};function y(){}function x(){}function w(){}var O={};p(O,c,(function(){return this}));var A=Object.getPrototypeOf,E=A&&A(A(_([])));E&&E!==n&&i.call(E,c)&&(O=E);var S=w.prototype=y.prototype=Object.create(O);function C(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(r,a,l,c){var u=d(e[r],e,a);if("throw"!==u.type){var s=u.arg,p=s.value;return p&&"object"==(0,o.A)(p)&&i.call(p,"__await")?t.resolve(p.__await).then((function(e){n("next",e,l,c)}),(function(e){n("throw",e,l,c)})):t.resolve(p).then((function(e){s.value=e,l(s)}),(function(e){return n("throw",e,l,c)}))}c(u.arg)}var r;a(this,"_invoke",{value:function(e,o){function i(){return new t((function(t,r){n(e,o,t,r)}))}return r=r?r.then(i,i):i()}})}function P(t,n,o){var r=m;return function(i,a){if(r===h)throw Error("Generator is already running");if(r===b){if("throw"===i)throw a;return{value:e,done:!0}}for(o.method=i,o.arg=a;;){var l=o.delegate;if(l){var c=M(l,o);if(c){if(c===g)continue;return c}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(r===m)throw r=b,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);r=h;var u=d(t,n,o);if("normal"===u.type){if(r=o.done?b:v,u.arg===g)continue;return{value:u.arg,done:o.done}}"throw"===u.type&&(r=b,o.method="throw",o.arg=u.arg)}}}function M(t,n){var o=n.method,r=t.iterator[o];if(r===e)return n.delegate=null,"throw"===o&&t.iterator.return&&(n.method="return",n.arg=e,M(t,n),"throw"===n.method)||"return"!==o&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+o+"' method")),g;var i=d(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function _(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function n(){for(;++r<t.length;)if(i.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError((0,o.A)(t)+" is not iterable")}return x.prototype=w,a(S,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:x,configurable:!0}),x.displayName=p(w,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===x||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,p(e,s,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},C(j.prototype),p(j.prototype,u,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,o,r,i){void 0===i&&(i=Promise);var a=new j(f(e,n,o,r),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},C(S),p(S,s,"Generator"),p(S,c,(function(){return this})),p(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var o in t)n.push(o);return n.reverse(),function e(){for(;n.length;){var o=n.pop();if(o in t)return e.value=o,e.done=!1,e}return e.done=!0,e}},t.values=_,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(o,r){return l.type="throw",l.arg=t,n.next=o,r&&(n.method="next",n.arg=e),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var r=o;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=e,a.arg=t,r?(this.method="next",this.next=r.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;T(n)}return r}}throw Error("illegal catch attempt")},delegateYield:function(t,n,o){return this.delegate={iterator:_(t),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=e),g}},t}},63662:(e,t,n)=>{"use strict";function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}n.d(t,{A:()=>o})},3453:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var o=n(96369),r=n(6986),i=n(27800),a=n(76562);function l(e,t){return(0,o.A)(e)||(0,r.A)(e,t)||(0,i.A)(e,t)||(0,a.A)()}},92327:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(82284);function r(e,t){if("object"!=(0,o.A)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=(0,o.A)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}},49922:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(82284),r=n(92327);function i(e){var t=(0,r.A)(e,"string");return"symbol"==(0,o.A)(t)?t:t+""}},82284:(e,t,n)=>{"use strict";function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}n.d(t,{A:()=>o})},27800:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(43145);function r(e,t){if(e){if("string"==typeof e)return(0,o.A)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,o.A)(e,t):void 0}}}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var n=r[e]={id:e,exports:{}};return o[e].call(n.exports,n,n.exports,i),n.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nc=void 0;var a={};return(()=>{"use strict";i.r(a),i.d(a,{InputLang:()=>w,default:()=>O});var e=i(39155),t=i.n(e),n=i(60278),o=i(32209),r=i(86988),l=i(69004),c=i(89315),u=i(74848),s=i(55307),p=function(e){return(0,u.jsx)(s.A,Object.assign({dataName:"Internet",viewBox:"0 0 24 24",path:(0,u.jsx)(u.Fragment,{children:(0,u.jsxs)("g",Object.assign({id:"Internet",transform:"translate(-327 -2053)"},{children:[(0,u.jsx)("rect",{id:"safe",width:"24",height:"24",transform:"translate(327 2053)",fill:"none"}),(0,u.jsx)("path",{id:"icon",d:"M19.2,9.6A9.6,9.6,0,0,0,10.644.071L10.636.061,10.317.032C10.127.015,9.932.011,9.74.007,9.692.007,9.643,0,9.6,0c-.24,0-.475.011-.7.031H8.881L8.564.061,8.555.071A9.6,9.6,0,0,0,0,9.6a9.58,9.58,0,0,0,8.556,9.529l.008.009.317.029c.24.02.479.032.719.032s.479-.012.7-.031h.017l.319-.029.008-.011A9.577,9.577,0,0,0,19.2,9.6m-1.677-.8H14.288a13.934,13.934,0,0,0-.764-3.887,13.74,13.74,0,0,0-1.395-2.867A7.838,7.838,0,0,1,17.523,8.8M9.872,17.573c-.177.008-.36.007-.544,0a12.181,12.181,0,0,1-2.141-3.808A12.419,12.419,0,0,1,6.512,10.4h6.175a12.478,12.478,0,0,1-.675,3.371,12.221,12.221,0,0,1-2.14,3.805M6.512,8.8a12.341,12.341,0,0,1,.676-3.364,12.2,12.2,0,0,1,2.151-3.82c.032,0,.064,0,.1,0,.14,0,.287.005.431.011a12.206,12.206,0,0,1,2.148,3.819A12.32,12.32,0,0,1,12.687,8.8ZM3.807,4.1A7.882,7.882,0,0,1,7.069,2.044,13.731,13.731,0,0,0,5.677,4.9,13.971,13.971,0,0,0,4.912,8.8H1.676A7.9,7.9,0,0,1,3.807,4.1M1.676,10.4H4.912a14.027,14.027,0,0,0,.764,3.893,13.7,13.7,0,0,0,1.395,2.865A7.8,7.8,0,0,1,1.676,10.4m10.455,6.757a13.743,13.743,0,0,0,1.392-2.86,14.085,14.085,0,0,0,.765-3.9h3.236a7.8,7.8,0,0,1-5.393,6.757",transform:"translate(329.4 2055.4)"})]}))})},e))},f=i(32663),d=i(14552),m=(i(44774),i(82316));function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){h(e,t,n[t])}))}return e}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(o=n.next()).done)&&(i.push(o.value),!t||i.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw r}}return i}}(e,t)||x(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||x(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){if(e){if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}var w=function(i){var a,u=(0,m.A)(i,"InputLang"),s=u.className,v=u.style,x=u.label,w=u.labelTooltip,O=u.size,A=void 0===O?"large":O,E=u.placeholder,S=u.placeholderKey,C=u.placeholderValue,j=u.error,P=void 0!==j&&j,M=u.hideErrorDom,k=u.helperText,T=void 0===k?"":k,N=u.required,_=void 0!==N&&N,D=u.popoverClassName,L=u.value,R=u.onChange,I=u.langList,H=void 0===I?["zh","en"]:I,F=u.disabled,z=void 0!==F&&F,V=u.disabledTooltip,B=u.defaultLang,$=u.disabledDelete,U=u.disabledAdd,W=u.disabledKey,Y=u.typeOutput,K=void 0===Y?"object":Y,q=u.i18n,X=g((0,e.useState)(!1),2),Z=X[0],G=X[1],J=g((0,e.useState)((0,f.GetLanguage)()||"zh"),2),Q=J[0],ee=J[1],te=g((0,e.useState)({}),2),ne=te[0],oe=te[1],re=g((0,e.useState)({}),2),ie=re[0],ae=re[1],le=g((0,e.useState)([]),2),ce=le[0],ue=le[1],se=(0,e.useRef)({lang:Q,valueCom:ie,langMapping:{},langLabelMapping:{}}),pe=(0,e.useRef)(null);se.current.lang=Q,se.current.disabledDelete=$,se.current.typeOutput=K,se.current.i18n="string"===K&&void 0===q||q,(0,e.useEffect)((function(){void 0!==i.defaultValue&&me(i.defaultValue)}),[]),(0,e.useEffect)((function(){void 0!==L&&me(L)}),[L]),(0,e.useEffect)((function(){void 0!==B&&(ee(B),se.current.lang=B,me())}),[B]),(0,e.useEffect)((function(){if(H){for(var e={},t={},n=0,o=H.length;n<o;n++){var r=H[n];"string"==typeof r?(e[r]={label:r,value:r},t[r]={label:r,value:r}):(e[r.value]=r,t[r.label]=r)}se.current.langMapping=e,se.current.langLabelMapping=t,oe(e),me()}}),[i.langList]);var fe,de,me=function(e){var t;if(e){try{t="string"==typeof e?JSON.parse(e):e||{}}catch(e){t={}}!0===se.current.i18n&&(se.current._i18n=t._i18n||1,delete t._i18n)}var n=b({},t||se.current.valueCom),o=[],r={};if(se.current.disabledDelete)for(var i=Object.keys(se.current.langMapping)||[],a=0,l=i.length;a<l;a++){var c=se.current.langMapping[i[a]]||{},u=c.value,s=c.label,p=n[u];u!==se.current.lang&&(r[u]=!0,o.push({label:s,value:p||""}))}for(var f=Object.keys(n),d=0,m=f.length;d<m;d++){var v=f[d],h=n[v];if(!r[v]&&v!==se.current.lang){var g=se.current.langMapping[v]||{};o.push({label:g.label||v,value:h||""})}}se.current.valueCom=b({},n),ue(o),ae(n)},ve=function(e){var t=b({},e);if(void 0===i.value&&(se.current.valueCom=b({},t),ae(t)),"string"===se.current.typeOutput)try{!0===se.current.i18n&&(t._i18n=se.current._i18n||1),t=JSON.stringify(t)}catch(e){}R&&R(t)},he=function(e){ue(y(e))},be=function(e,t){for(var n=[],o=(0,f.ArrayToObject)("label",ce),r=0,i=H.length;r<i;r++){var a,l=H[r];"object"==typeof l&&(l=l.label),o[l]||l===((null===(a=ne[Q])||void 0===a?void 0:a.label)||Q)||n.push({label:l,value:l})}t(n)},ge=(0,e.useMemo)((function(){return t().createElement("div",{className:"lang-list-icon"},t().createElement(p,null))}),[]),ye=function(){if(!0===z)return!0;var e=[];if(W)for(var t="object"==typeof W,n=0,o=ce.length;n<o;n++){var r=ce[n].label||"",i=se.current.langLabelMapping[r]||{};t?e.push(h({},r,-1!==W.indexOf(i.value||r))):""!==r.trim()&&e.push(h({},r,!0))}return e};return t().createElement("div",{className:(de="".concat(d.n,"-input-lang"),A&&(de+=" ".concat(d.n,"-input-lang-").concat(A)),P&&(de+=" ".concat(d.n,"-input-lang-error")),s&&(de+=" ".concat(s)),de),style:v,ref:pe},t().createElement(c.default,{placement:"bottom-end",visible:Z,content:t().createElement("div",{className:"input-lang-list"},t().createElement(r.default,{className:"input-lang-multi-box",size:A,disabled:ye(),value:ce,onChange:he,fetchSuggestionsKey:be,placeholderKey:S,placeholderValue:C||E})),onVisibleChange:function(e){if(!e){G(!1);var t={};t[Q]=ie[Q]||"";for(var n=0,o=ce.length;n<o;n++){var r,i=ce[n],a=(null===(r=se.current.langLabelMapping[i.label])||void 0===r?void 0:r.value)||i.label||"";""!==a.trim()&&(t[a]=i.value||"")}ve(t)}},overlayClassName:function(){var e="".concat(d.n,"-input-lang-popover");return D&&(e+=" ".concat(D)),U&&(e+=" ".concat(d.n,"-input-lang-popover-disabled-add")),$&&(e+=" ".concat(d.n,"-input-lang-popover-disabled-delete")),e}(),maxWidth:"none",overlayInnerStyle:{minWidth:"440px",width:"".concat(null===(a=pe.current)||void 0===a?void 0:a.offsetWidth,"px")}},t().createElement(n.default,{className:"input-lang-text-field",size:A,error:P,disabled:z,disabledTooltip:V,required:_,label:x,labelTooltip:w,placeholder:E,value:ie[Q]||"",rightIcon:ge,addonBefore:t().createElement("div",{className:"lang-key"},t().createElement(l.default,{tipMaxWidth:"none"},(null===(fe=ne[Q])||void 0===fe?void 0:fe.label)||Q)),hideErrorDom:!0,onClickIcon:function(){G(!0)},onChange:function(e){ie[Q]=e.target.value;var t=b({},ie);ve(t)}})),t().createElement(o.default,{className:"input-lang-error-text",error:P,helperText:T,hideErrorDom:M}))};const O=w})(),a})()));
|
|
43
|
+
r=function(){return t};var e,t={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",s=l.toStringTag||"@@toStringTag";function p(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(e){p=function(e,t,n){return e[t]=n}}function f(e,t,n,o){var r=t&&t.prototype instanceof y?t:y,i=Object.create(r.prototype),l=new N(o||[]);return a(i,"_invoke",{value:P(e,n,l)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var m="suspendedStart",v="suspendedYield",h="executing",b="completed",g={};function y(){}function x(){}function w(){}var O={};p(O,c,(function(){return this}));var A=Object.getPrototypeOf,E=A&&A(A(_([])));E&&E!==n&&i.call(E,c)&&(O=E);var S=w.prototype=y.prototype=Object.create(O);function C(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(r,a,l,c){var u=d(e[r],e,a);if("throw"!==u.type){var s=u.arg,p=s.value;return p&&"object"==(0,o.A)(p)&&i.call(p,"__await")?t.resolve(p.__await).then((function(e){n("next",e,l,c)}),(function(e){n("throw",e,l,c)})):t.resolve(p).then((function(e){s.value=e,l(s)}),(function(e){return n("throw",e,l,c)}))}c(u.arg)}var r;a(this,"_invoke",{value:function(e,o){function i(){return new t((function(t,r){n(e,o,t,r)}))}return r=r?r.then(i,i):i()}})}function P(t,n,o){var r=m;return function(i,a){if(r===h)throw Error("Generator is already running");if(r===b){if("throw"===i)throw a;return{value:e,done:!0}}for(o.method=i,o.arg=a;;){var l=o.delegate;if(l){var c=M(l,o);if(c){if(c===g)continue;return c}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(r===m)throw r=b,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);r=h;var u=d(t,n,o);if("normal"===u.type){if(r=o.done?b:v,u.arg===g)continue;return{value:u.arg,done:o.done}}"throw"===u.type&&(r=b,o.method="throw",o.arg=u.arg)}}}function M(t,n){var o=n.method,r=t.iterator[o];if(r===e)return n.delegate=null,"throw"===o&&t.iterator.return&&(n.method="return",n.arg=e,M(t,n),"throw"===n.method)||"return"!==o&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+o+"' method")),g;var i=d(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function _(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function n(){for(;++r<t.length;)if(i.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError((0,o.A)(t)+" is not iterable")}return x.prototype=w,a(S,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:x,configurable:!0}),x.displayName=p(w,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===x||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,p(e,s,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},C(j.prototype),p(j.prototype,u,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,o,r,i){void 0===i&&(i=Promise);var a=new j(f(e,n,o,r),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},C(S),p(S,s,"Generator"),p(S,c,(function(){return this})),p(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var o in t)n.push(o);return n.reverse(),function e(){for(;n.length;){var o=n.pop();if(o in t)return e.value=o,e.done=!1,e}return e.done=!0,e}},t.values=_,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(o,r){return l.type="throw",l.arg=t,n.next=o,r&&(n.method="next",n.arg=e),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var r=o;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=e,a.arg=t,r?(this.method="next",this.next=r.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;T(n)}return r}}throw Error("illegal catch attempt")},delegateYield:function(t,n,o){return this.delegate={iterator:_(t),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=e),g}},t}},63662:(e,t,n)=>{"use strict";function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}n.d(t,{A:()=>o})},3453:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var o=n(96369),r=n(6986),i=n(27800),a=n(76562);function l(e,t){return(0,o.A)(e)||(0,r.A)(e,t)||(0,i.A)(e,t)||(0,a.A)()}},92327:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(82284);function r(e,t){if("object"!=(0,o.A)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=(0,o.A)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}},49922:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(82284),r=n(92327);function i(e){var t=(0,r.A)(e,"string");return"symbol"==(0,o.A)(t)?t:t+""}},82284:(e,t,n)=>{"use strict";function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}n.d(t,{A:()=>o})},27800:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(43145);function r(e,t){if(e){if("string"==typeof e)return(0,o.A)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,o.A)(e,t):void 0}}}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var n=r[e]={id:e,exports:{}};return o[e].call(n.exports,n,n.exports,i),n.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nc=void 0;var a={};return(()=>{"use strict";i.r(a),i.d(a,{InputLang:()=>w,default:()=>O});var e=i(39155),t=i.n(e),n=i(60278),o=i(32209),r=i(86988),l=i(69004),c=i(89315),u=i(74848),s=i(55307),p=function(e){return(0,u.jsx)(s.A,Object.assign({dataName:"Internet",viewBox:"0 0 24 24",path:(0,u.jsx)(u.Fragment,{children:(0,u.jsxs)("g",Object.assign({id:"Internet",transform:"translate(-327 -2053)"},{children:[(0,u.jsx)("rect",{id:"safe",width:"24",height:"24",transform:"translate(327 2053)",fill:"none"}),(0,u.jsx)("path",{id:"icon",d:"M19.2,9.6A9.6,9.6,0,0,0,10.644.071L10.636.061,10.317.032C10.127.015,9.932.011,9.74.007,9.692.007,9.643,0,9.6,0c-.24,0-.475.011-.7.031H8.881L8.564.061,8.555.071A9.6,9.6,0,0,0,0,9.6a9.58,9.58,0,0,0,8.556,9.529l.008.009.317.029c.24.02.479.032.719.032s.479-.012.7-.031h.017l.319-.029.008-.011A9.577,9.577,0,0,0,19.2,9.6m-1.677-.8H14.288a13.934,13.934,0,0,0-.764-3.887,13.74,13.74,0,0,0-1.395-2.867A7.838,7.838,0,0,1,17.523,8.8M9.872,17.573c-.177.008-.36.007-.544,0a12.181,12.181,0,0,1-2.141-3.808A12.419,12.419,0,0,1,6.512,10.4h6.175a12.478,12.478,0,0,1-.675,3.371,12.221,12.221,0,0,1-2.14,3.805M6.512,8.8a12.341,12.341,0,0,1,.676-3.364,12.2,12.2,0,0,1,2.151-3.82c.032,0,.064,0,.1,0,.14,0,.287.005.431.011a12.206,12.206,0,0,1,2.148,3.819A12.32,12.32,0,0,1,12.687,8.8ZM3.807,4.1A7.882,7.882,0,0,1,7.069,2.044,13.731,13.731,0,0,0,5.677,4.9,13.971,13.971,0,0,0,4.912,8.8H1.676A7.9,7.9,0,0,1,3.807,4.1M1.676,10.4H4.912a14.027,14.027,0,0,0,.764,3.893,13.7,13.7,0,0,0,1.395,2.865A7.8,7.8,0,0,1,1.676,10.4m10.455,6.757a13.743,13.743,0,0,0,1.392-2.86,14.085,14.085,0,0,0,.765-3.9h3.236a7.8,7.8,0,0,1-5.393,6.757",transform:"translate(329.4 2055.4)"})]}))})},e))},f=i(32663),d=i(14552),m=i(82316);i(44774);function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){h(e,t,n[t])}))}return e}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(o=n.next()).done)&&(i.push(o.value),!t||i.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw r}}return i}}(e,t)||x(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||x(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){if(e){if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}var w=function(i){var a,u=(0,m.A)(i,"InputLang"),s=u.className,v=u.style,x=u.label,w=u.labelTooltip,O=u.size,A=void 0===O?"large":O,E=u.placeholder,S=u.placeholderKey,C=u.placeholderValue,j=u.error,P=void 0!==j&&j,M=u.hideErrorDom,k=u.helperText,T=void 0===k?"":k,N=u.required,_=void 0!==N&&N,D=u.popoverClassName,L=u.value,R=u.onChange,I=u.langList,H=void 0===I?["zh","en"]:I,F=u.limitLength,z=u.disabled,V=void 0!==z&&z,B=u.disabledTooltip,$=u.defaultLang,U=u.disabledDelete,W=u.disabledAdd,Y=u.disabledKey,K=u.typeOutput,q=void 0===K?"object":K,X=u.i18n,Z=g((0,e.useState)(!1),2),G=Z[0],J=Z[1],Q=g((0,e.useState)((0,f.GetLanguage)()||"zh"),2),ee=Q[0],te=Q[1],ne=g((0,e.useState)({}),2),oe=ne[0],re=ne[1],ie=g((0,e.useState)({}),2),ae=ie[0],le=ie[1],ce=g((0,e.useState)([]),2),ue=ce[0],se=ce[1],pe=(0,e.useRef)({lang:ee,valueCom:ae,langMapping:{},langLabelMapping:{}}),fe=(0,e.useRef)(null);pe.current.lang=ee,pe.current.disabledDelete=U,pe.current.typeOutput=q,pe.current.i18n="string"===q&&void 0===X||X,(0,e.useEffect)((function(){void 0!==i.defaultValue&&ve(i.defaultValue)}),[]),(0,e.useEffect)((function(){void 0!==L&&ve(L)}),[L]),(0,e.useEffect)((function(){void 0!==$&&(te($),pe.current.lang=$,ve())}),[$]),(0,e.useEffect)((function(){if(H){for(var e={},t={},n=0,o=H.length;n<o;n++){var r=H[n];"string"==typeof r?(e[r]={label:r,value:r},t[r]={label:r,value:r}):(e[r.value]=r,t[r.label]=r)}pe.current.langMapping=e,pe.current.langLabelMapping=t,re(e),ve()}}),[i.langList]);var de,me,ve=function(e){var t;if(e){try{t="string"==typeof e?JSON.parse(e):e||{}}catch(e){t={}}!0===pe.current.i18n&&(pe.current._i18n=t._i18n||1,delete t._i18n)}var n=b({},t||pe.current.valueCom),o=[],r={};if(pe.current.disabledDelete)for(var i=Object.keys(pe.current.langMapping)||[],a=0,l=i.length;a<l;a++){var c=pe.current.langMapping[i[a]]||{},u=c.value,s=c.label,p=n[u];u!==pe.current.lang&&(r[u]=!0,o.push({label:s,value:p||""}))}for(var f=Object.keys(n),d=0,m=f.length;d<m;d++){var v=f[d],h=n[v];if(!r[v]&&v!==pe.current.lang){var g=pe.current.langMapping[v]||{};o.push({label:g.label||v,value:h||""})}}pe.current.valueCom=b({},n),se(o),le(n)},he=function(e){var t=b({},e);if(void 0===i.value&&(pe.current.valueCom=b({},t),le(t)),"string"===pe.current.typeOutput)try{!0===pe.current.i18n&&(t._i18n=pe.current._i18n||1),t=JSON.stringify(t)}catch(e){}R&&R(t)},be=function(e){se(y(e))},ge=function(e,t){for(var n=[],o=(0,f.ArrayToObject)("label",ue),r=0,i=H.length;r<i;r++){var a,l=H[r];"object"==typeof l&&(l=l.label),o[l]||l===((null===(a=oe[ee])||void 0===a?void 0:a.label)||ee)||n.push({label:l,value:l})}t(n)},ye=(0,e.useMemo)((function(){return t().createElement("div",{className:"lang-list-icon"},t().createElement(p,null))}),[]),xe=function(){if(!0===V)return!0;var e=[];if(Y)for(var t="object"==typeof Y,n=0,o=ue.length;n<o;n++){var r=ue[n].label||"",i=pe.current.langLabelMapping[r]||{};t?e.push(h({},r,-1!==Y.indexOf(i.value||r))):""!==r.trim()&&e.push(h({},r,!0))}return e},we=function(e,t){var n={};return F&&(n.limitLength=F),n};return t().createElement("div",{className:(me="".concat(d.n,"-input-lang"),A&&(me+=" ".concat(d.n,"-input-lang-").concat(A)),P&&(me+=" ".concat(d.n,"-input-lang-error")),s&&(me+=" ".concat(s)),me),style:v,ref:fe},t().createElement(c.default,{placement:"bottom-end",visible:G,content:t().createElement("div",{className:"input-lang-list"},t().createElement(r.default,{className:"input-lang-multi-box",size:A,disabled:xe(),value:ue,onChange:be,fetchSuggestionsKey:ge,placeholderKey:S,placeholderValue:C||E,valueOtherProps:we})),onVisibleChange:function(e){if(!e){J(!1);var t={};t[ee]=ae[ee]||"";for(var n=0,o=ue.length;n<o;n++){var r,i=ue[n],a=(null===(r=pe.current.langLabelMapping[i.label])||void 0===r?void 0:r.value)||i.label||"";""!==a.trim()&&(t[a]=i.value||"")}he(t)}},overlayClassName:function(){var e="".concat(d.n,"-input-lang-popover");return D&&(e+=" ".concat(D)),W&&(e+=" ".concat(d.n,"-input-lang-popover-disabled-add")),U&&(e+=" ".concat(d.n,"-input-lang-popover-disabled-delete")),e}(),maxWidth:"none",overlayInnerStyle:{minWidth:"440px",width:"".concat(null===(a=fe.current)||void 0===a?void 0:a.offsetWidth,"px")}},t().createElement(n.default,{className:"input-lang-text-field",size:A,error:P,disabled:V,disabledTooltip:B,required:_,label:x,labelTooltip:w,placeholder:E,value:ae[ee]||"",rightIcon:ye,addonBefore:t().createElement("div",{className:"lang-key"},t().createElement(l.default,{tipMaxWidth:"none"},(null===(de=oe[ee])||void 0===de?void 0:de.label)||ee)),hideErrorDom:!0,limitLength:F,onClickIcon:function(){J(!0)},onChange:function(e){ae[ee]=e.target.value;var t=b({},ae);he(t)}})),t().createElement(o.default,{className:"input-lang-error-text",error:P,helperText:T,hideErrorDom:M}))};const O=w})(),a})()));
|