2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/utils"),n=require("primereact/tooltip"),r=require("primereact/inputtext"),i=require("primereact/csstransition"),o=require("primereact/api"),s=require("primereact/overlayservice"),l=require("primereact/portal");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=a(e),u=a(o);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(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,r.key,r)}}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e,t){return y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},y(e,t)}function v(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&&y(e,t)}function m(e){return m="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},m(e)}function b(e,t){if(t&&("object"===m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function E(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var R=function(a){v(L,e.Component);var y,m,k,O,R,x=(y=L,m=E(),function(){var e,t=g(y);if(m){var n=g(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return b(this,e)});function L(t){var n;return h(this,L),(n=x.call(this,t)).state={overlayVisible:!1,meter:null,infoText:n.promptLabel(),focused:!1,unmasked:!1},n.onFocus=n.onFocus.bind(d(n)),n.onBlur=n.onBlur.bind(d(n)),n.onKeyup=n.onKeyup.bind(d(n)),n.onInput=n.onInput.bind(d(n)),n.onMaskToggle=n.onMaskToggle.bind(d(n)),n.onOverlayEnter=n.onOverlayEnter.bind(d(n)),n.onOverlayEntered=n.onOverlayEntered.bind(d(n)),n.onOverlayExit=n.onOverlayExit.bind(d(n)),n.onOverlayExited=n.onOverlayExited.bind(d(n)),n.onPanelClick=n.onPanelClick.bind(d(n)),n.overlayRef=e.createRef(),n.inputRef=e.createRef(n.props.inputRef),n.mediumCheckRegExp=new RegExp(n.props.mediumRegex),n.strongCheckRegExp=new RegExp(n.props.strongRegex),n}return k=L,(O=[{key:"promptLabel",value:function(){return this.props.promptLabel||o.localeOption("passwordPrompt")}},{key:"weakLabel",value:function(){return this.props.weakLabel||o.localeOption("weak")}},{key:"mediumLabel",value:function(){return this.props.mediumLabel||o.localeOption("medium")}},{key:"strongLabel",value:fu
|