katoikia-app/web-ui/web-react/node_modules/primereact/cascadeselect/cascadeselect.min.js

2 lines
20 KiB
JavaScript
Raw Normal View History

2022-07-06 04:15:11 +00:00
this.primereact=this.primereact||{},this.primereact.cascadeselect=function(e,t,n,i,o,r,l,s){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=a(t),u=a(s);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function d(e,t,n){return t&&h(e.prototype,t),n&&h(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e,t){return v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},v(e,t)}function y(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&&v(e,t)}function b(e){return b="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},b(e)}function m(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},O(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 S(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=g(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){s=!0,r=e},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw r}}}}function g(e,t){if(e){if("string"==typeof e)return w(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)?w(e,t):void 0}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}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 L=function(e){y(l,e);var t,i,r=(t=l,i=E(),function(){var e,n=O(t);if(i){var o=O(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return m(this,e)});function l(e){var t;return c(this,l),(t=r.call(this,e)).state={activeOption:null},t.onOptionSelect=t.onOptionSelect.bind(f(t)),t.onOptionGroupSelect=t.onOptionGroupSelect.bind(f(t)),t}return d(l,[{key:"componentDidMount",value:function(){if(this.props.selectionPath&&this.props.options&&!this.props.dirty){var e,t=S(this.props.options);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(this.props.selectionPath.includes(n)){this.setState({activeOption:n});break}}}catch(e){t.e(e)}finally{t.f()}}this.props.root||this.position()}},{key:"componentDidUpdate",value:function(e){e.parentActive!==this.props.parentActive&&this.setState({activeOption:null})}},{key:"position",value:function(){var e=this.element.parentElement,t=n.DomHandler.getOffset(e),i=n.DomHandler.getViewport(),o=this.element.offsetParent?this.element.offsetWidth:n.DomHandler.getHiddenElementOuterWidth(this.element),r=n.DomHandler.getOute