/*! @license @qualtrics/plugin-ui-react 1.5.3-alpha.0
Qualtrics Software License Agreement

1. General.
1.1 Introduction.  The software, programs, files, and/or code provided to you hereunder (collectively, the ?Software?) is hereby licensed to you subject to the terms of this License Agreement (this ?Agreement?). This Agreement forms a legally binding contract between you and Qualtrics, LLC (?Qualtrics?) in relation to your use of the Software. This Agreement relates solely to the Software provided under this Agreement and does not extend to, or provide any rights in connection with, any other products or services, including without limitation Qualtrics? software-as-a-service offerings and related services and products provided by Qualtrics to you or third parties (collectively, the ?Qualtrics Services?).
1.2 Acceptance of Agreement.  By accessing or using the Software, you acknowledge and agree to all of the terms and conditions of this Agreement. You may not access or use the Software if you do not accept this Agreement. You may not use the Software and may not accept this Agreement if you are a person barred from receiving the Software under the laws or regulations of the United States or other countries, including the country in which you are resident or from which you use the Software. If you are agreeing to be bound by this Agreement on behalf of your employer or other organization, you represent and warrant that you have full legal authority to bind your employer or such organization to this Agreement. If you do not have the requisite authority, you may not accept this Agreement or use the Software on behalf of your employer or organization.

2. License and Use.
2.1 Grant of License.  Subject to the terms of this Agreement, Qualtrics grants you a limited, worldwide, royalty-free, non-assignable, non-exclusive, non-sublicensable, and revocable license to use the Software solely to interface or interact with, or to develop applications that interface or interact with, the Qualtrics Services.  Qualtrics reserves the right to revoke this license at any time for any reason.
2.2 Acceptable Use.  You may not use the Software for any purpose not expressly permitted by this Agreement. You may not use the Software in connection with any activity, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of Qualtrics or any third party. Except to the extent explicitly authorized by the Software or as otherwise required by applicable third party licenses, you may not copy (except for routine backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the Software or any part of the Software. You agree to use the Software only for purposes that are permitted by (a) this Agreement and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries). You may not use this Software in connection with applications that are competitive with or disparaging toward Qualtrics or Qualtrics Services or that interface or interact with products or services that are competitive with Qualtrics Services. 
2.3 Responsibility for Use.  You agree that you are solely responsible for (and that Qualtrics has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display and for the consequences of your actions (including any loss or damage which Qualtrics may suffer) by doing so. You agree that you are solely responsible for (and that Qualtrics has no responsibility to you or to any third party for) any breach of your obligations under this Agreement, any applicable third party contract or terms of service, or any applicable law or regulation, and for the consequences (including any loss or damage that Qualtrics or any third party may suffer) of any such breach. 

3 IP Ownership.
3.1 Qualtrics IP.  You agree that as between you and Qualtrics, Qualtrics owns all legal right, title and interest in and to the Software and related materials, including any Intellectual Property Rights in the Software. Qualtrics reserves all rights not expressly granted to you. As used herein, ?Intellectual Property Rights? means any and all rights under patent law, copyright law, trade secret law, trademark law, and/or any other intellectual property or proprietary rights.
3.2 Your IP.  Subject to the preceding subsection and other terms of this Agreement, Qualtrics agrees that it obtains no right, title or interest from you (or your licensors) under this Agreement in or to any software applications that you develop using the Software, including any Intellectual Property Rights in those applications.
3.3 Trademarks.  Nothing in this Agreement gives you a right to use any of Qualtrics? trade names, trademarks, service marks, logos, domain names, or other distinctive brand features. You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the Software.
3.4 Open Source.  Use, reproduction and distribution of components of the Software licensed under an open source software license, if any, are governed solely by the terms of the applicable open source software license.

4. Privacy and Information.
4.1 Your Privacy Responsibilities.  You agree that if you use the Software to develop applications for users, you will protect the privacy and legal rights of those users. If you use any Software or Qualtrics Service to retrieve a user?s data, you acknowledge and agree that you will retrieve data only with the user?s consent and in accordance with applicable laws. If your application stores personal or sensitive information provided by users, it must do so securely and in accordance with applicable law. If a user provides your application with Qualtrics account information, your application may only use that information to access the user?s Qualtrics account when, and for the limited purposes for which, the user has given you permission to do so.
4.2 Qualtrics Privacy Responsibilities.  In order to innovate on and improve the Software, Qualtrics may collect certain usage information and statistics from your use of thereof. The data collected will be anonymized and/or maintained in accordance with the Qualtrics Privacy Statement available online. 

5. Term
5.1 Term; Termination.  This Agreement will commence on the earlier of when you click through to accept its terms or when you access or use the Software. This Agreement will continue in effect until terminated by either you or Qualtrics.  You may terminate this Agreement at any time by ceasing to access and use the Software and returning or destroying all copies and portions of the Software and related materials.  Qualtrics may terminate this Agreement at any time by ceasing to make the Software available to you or by providing notice of termination to you in any reasonable form.
5.2 Effect of Termination.  Upon termination of this Agreement for any reason, all of your rights hereunder will immediately terminate, and you must immediately cease to access and use the Software and return or destroy all copies and portions of the Software and related materials. Sectionsˇ3, 5, 6, 7, 8, 9, and 10 will survive indefinitely notwithstanding the termination of this Agreement.

6. DISCLAIMER OF WARRANTIES.  YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SOFTWARE AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED IN CONNECTION WITH USE OF THE SOFTWARE IS AT YOUR OWN DISCRETION AND AT YOUR SOLE RISK. YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FORM SUCH USE. THE SOFTWARE IS PROVIDED ?AS IS? AND ?AS AVAILABLE? WITHOUT WARRANTY OF ANY KIND FROM QUALTRICS OR ANY OTHER PERSON. QUALTRICS EXPRESSLY DISCLAIMS ALL REPRESENTATIONS, WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.

7. LIMITATION OF LIABILITY.  YOU EXPRESSLY UNDERSTAND AND AGREE THAT NEITHER QUALTRICS NOR ITS AFFILIATES NOR THEIR RESPECTIVE DIRECTORS, OFFICERS, EMPLOYEES, OR AGENTS SHALL BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU ARISING FROM OR RELATING TO THE SOFTWARE OR THIS AGREEMENT, INCLUDING WITHOUT LIMITATION ANY LOSS OF DATA, WHETHER OR NOT QUALTRICS OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING. 

8. Indemnification.  To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Qualtrics, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys? fees) arising out of or relating to (a) your use of the Software, (b) any application or work you develop with the Software that infringes any Intellectual Property Right of any person or defames any person or violates their rights of publicity or privacy, and/or (c) any breach or non-compliance by you of this Agreement. 

9. Modification.
9.1 Modification of Software.  You understand and agree that the substance, form, and nature of the Software that Qualtrics provides may change without prior notice to you and that future versions of the Software may be incompatible with applications developed on previous versions of the Software. You agree that Qualtrics may stop (permanently or temporarily) providing the Software or any features within the Software to you or to users generally at Qualtrics? sole discretion, without prior notice to you.
9.2 Modification of Agreement.  Qualtrics may modify this Agreement at any time by posting a revised version or by providing notice to you in any reasonable form. The modified Agreement will become effective immediately upon such posting or notification. By continuing to use the Software after the effective date of any modifications to this Agreement, you agree to be bound by the modified terms. It is your responsibility to check the online location of this Agreement regularly for modifications. Qualtrics last modified this Agreement on the date listed at the end of this Agreement.

10. Miscellaneous
10.1 Export Restrictions.  The Software may be subject to United States export laws and regulations. You acknowledge and agree that you will comply with all domestic and international export laws and regulations that apply to the Software. These laws include restrictions on destinations, end users, and end use.
10.2 Waiver.  You agree that if Qualtrics does not exercise or enforce any legal right or remedy that is contained in this Agreement (or that Qualtrics has the benefit of under any applicable law), then this will not result in a waiver of Qualtrics? rights and those rights or remedies will still be available to Qualtrics.
10.3 Severability.  If any court of law rules that any provision of this Agreement is invalid, then that provision will be removed from this Agreement without affecting the rest of this Agreement. The remaining provisions of this Agreement will continue to be valid and enforceable to the maximum extent possible under applicable law.
10.4 Third-Party Beneficiaries.  You acknowledge and agree that each of Qualtrics? affiliates is a third-party beneficiary to this Agreement and shall be entitled to directly enforce, and rely upon, any provision of this Agreement that confers a benefit on (or rights in favor of) it. Other than this, no other person or company shall be third party beneficiaries to this Agreement.
10.5 Assignment.  You may not assign, delegate, or transfer this Agreement or your rights, duties, or obligations under this Agreement without the prior written consent of Qualtrics. Qualtrics may freely assign this Agreement or its rights, duties, or obligations hereunder, without consent, including without limitation in the event of a merger, acquisition, corporate reorganization, or sale of all or substantially all of its assets.
10.6 Choice of Law; Jurisdiction.  This Agreement, and your relationship with Qualtrics under this Agreement, shall be governed by the laws of the State of Utah without regard to its conflict of laws provisions. You and Qualtrics agree to submit to the exclusive jurisdiction of the courts located within Salt Lake County, Utah to resolve any legal matter arising from this Agreement. Notwithstanding the foregoing, you agree that Qualtrics shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
10.7 Headings; Entire Agreement.  The headings contained in this Agreement are for convenience only and shall not be interpreted to limit or otherwise affect any provision of this Agreement. This Agreement constitutes the entire agreement between you and Qualtrics in relation to the Software. This Agreement completely replaces and supersedes any prior agreements between you and Qualtrics in relation to the Software. For the avoidance of doubt, and if applicable, your general use of Qualtrics Services will continue to be governed by the applicable, separate agreement between Qualtrics and you or your organization.

Last updated August 28, 2019
*/
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("core-js/modules/es.object.to-string.js"),require("core-js/modules/es.promise.js"),require("core-js/modules/es.object.keys.js"),require("core-js/modules/es.array.includes.js"),require("core-js/modules/es.string.includes.js"),require("core-js/modules/es.array.find-index.js"),require("core-js/modules/es.array.splice.js"),require("core-js/modules/es.array.for-each.js"),require("core-js/modules/web.dom-collections.for-each.js");var e=require("react"),t=require("lodash.get"),n=require("@qualtrics/ui-react"),r=require("@qualtrics/ui-react/icons");require("core-js/modules/es.string.anchor.js");var i=require("lodash.clonedeep");require("core-js/modules/es.array.concat.js"),require("core-js/modules/es.array.is-array.js");var o=require("react-popper"),a=require("react-dom"),l=require("uuid"),u=require("@qualtrics/plugin-ui-react-translations");require("core-js/modules/es.array.map.js"),require("core-js/modules/es.function.name.js"),require("core-js/modules/es.array.slice.js"),require("core-js/modules/es.array.iterator.js"),require("core-js/modules/web.dom-collections.iterator.js"),require("core-js/modules/es.array.find.js"),require("core-js/modules/es.object.assign.js"),require("core-js/modules/es.array.filter.js");var d=require("lodash.clonedeepwith");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("core-js/modules/es.string.trim.js"),require("core-js/modules/es.regexp.exec.js"),require("core-js/modules/es.string.search.js");var s=c(e),p=c(t),f=c(i),m=c(a),h=c(u),v=c(d);function x(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}function b(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 g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){N(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y(){y=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function d(e,t,n,i){var o=t&&t.prototype instanceof p?t:p,a=Object.create(o.prototype),l=new S(i||[]);return r(a,"_invoke",{value:E(e,n,l)}),a}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=d;var s={};function p(){}function f(){}function m(){}var h={};u(h,o,(function(){return this}));var v=Object.getPrototypeOf,x=v&&v(v(N([])));x&&x!==t&&n.call(x,o)&&(h=x);var b=m.prototype=p.prototype=Object.create(h);function g(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function i(r,o,a,l){var u=c(e[r],e,o);if("throw"!==u.type){var d=u.arg,s=d.value;return s&&"object"==typeof s&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){i("next",e,a,l)}),(function(e){i("throw",e,a,l)})):t.resolve(s).then((function(e){d.value=e,a(d)}),(function(e){return i("throw",e,a,l)}))}l(u.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function E(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return F()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var l=k(a,n);if(l){if(l===s)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function k(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),s;var i=c(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,s;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,s):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}function I(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function N(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:F}}function F(){return{value:void 0,done:!0}}return f.prototype=m,r(b,"constructor",{value:m,configurable:!0}),r(m,"constructor",{value:f,configurable:!0}),f.displayName=u(m,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,u(e,l,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},g(w.prototype),u(w.prototype,a,(function(){return this})),e.AsyncIterator=w,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new w(d(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(b),u(b,l,"Generator"),u(b,o,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=N,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var l=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(l&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,s):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),s},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),C(n),s}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:N(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},e}function w(e){return w="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},w(e)}function E(e,t,n,r,i,o,a){try{var l=e[o](a),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,i)}function k(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){E(o,r,i,a,l,"next",e)}function l(e){E(o,r,i,a,l,"throw",e)}a(void 0)}))}}function I(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C(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,L(r.key),r)}}function S(e,t,n){return t&&C(e.prototype,t),n&&C(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function N(e,t,n){return(t=L(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F(e){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},F(e)}function T(e,t){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},T(e,t)}function P(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return P(e)}function j(e){var t=function(){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}}();return function(){var n,r=F(e);if(t){var i=F(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return M(this,n)}}function O(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 r,i,o,a,l=[],u=!0,d=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){d=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw i}}return l}}(e,t)||A(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 q(e){return function(e){if(Array.isArray(e))return R(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||A(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 A(e,t){if(e){if("string"==typeof e)return R(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)?R(e,t):void 0}}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function L(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}x(".react-app {\n  background-color: RGBA(0, 0, 0, 0.1);\n}");var D,z=0,B=function(){function e(t){var n=this;I(this,e),N(this,"register",(function(e){var t;return n.isSingletonHandler?(n.handler=e,function(){return n.handler=void 0}):(t=z++,n.handlers.push({callback:e,id:t}),function(){n.unregister(t)})})),this.isSingletonHandler=!!t,this.handlers=[],this.handler=function(){}}return S(e,[{key:"unregister",value:function(e){var t;this.isSingletonHandler||-1!==(t=this.handlers.findIndex((function(t){return t.id===e})))&&this.handlers.splice(t,1)}},{key:"trigger",value:function(e){if(this.isSingletonHandler)return this.handler(e);this.handlers.forEach((function(t){t.callback(e)}))}}]),e}(),H=void 0!==("undefined"==typeof global?"undefined":w(global))?global:void 0!==("undefined"==typeof self?"undefined":w(self))?self:void 0!==("undefined"==typeof window?"undefined":w(window))?window:{},_={actions_task:{save:new B(!0)}},K={actions_task:{save:function(e){return _.actions_task.save.trigger(e)}}},G={getPluginSdkClient:function(e){var t=!H.PluginClient;if(void 0!==D)return t?D:new Promise((function(e){return e(D)}));if(t)return n=H.PluginSDKClient,console.error("Warning - Initializing outdated version of PluginSDKClient. Please upgrade to PluginClient v1.0.0"),D=n.initialize();if(t||void 0===H.PluginClient)throw new Error("No PluginClient or PluginSDKClient found on global object");return function(e,t){var n,r=function(e){var t,n;t=void 0,n={},"object"===w(e)?n=e:"string"==typeof e?(t=e,n=K[e]||{}):n=e;return{pluginType:t,eventHandlers:n}}(t),i=r.pluginType,o=r.eventHandlers;return n=function(e,t){return Object.keys(o).includes(e)?_[i][e].register(t):function(){}},e.initialize(o).then((function(e){return"function"!=typeof e.registerHandler&&(e.registerHandler=n),D=e}))}(H.PluginClient,e);var n}};var U={DA:"da",DE:"de",EN:"en","EN-GB":"en-GB",ES:"es","ES-ES":"es-419",FI:"fi",FR:"fr","FR-CA":"fr-CA",ID:"id",IT:"it",JA:"ja",KO:"ko",MS:"ms",NL:"nl",PB:"pb",PT:"pt","PT-BR":"pt-BR","RI-GI":"ri-GI",RU:"ru",SV:"sv",TH:"th","ZH-S":"zh-Hans","ZH-T":"zh-Hant"};var V=function(){return V=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},V.apply(this,arguments)};function Y(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function l(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}u((r=r.apply(e,t||[])).next())}))}function Z(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(o){return function(l){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}var $=function(t){!function(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&&T(e,t)}(r,e.Component);var n=j(r);function r(){var e;I(this,r);for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return N(P(e=n.call.apply(n,[this].concat(i))),"rootSelector",document.body),N(P(e),"container",document.createElement("div")),e}return S(r,[{key:"componentDidMount",value:function(){this.rootSelector.appendChild(this.container)}},{key:"componentWillUnmount",value:function(){this.rootSelector.removeChild(this.container)}},{key:"render",value:function(){return m.default.createPortal(this.props.children,this.container)}}]),r}();x(".q-popover {\n  position: absolute;\n  z-index: 1000;\n  padding: 4px 0;\n  font-size: 14px;\n  line-height: 20px;\n  color: #32363A;\n  fill: #333;\n  list-style: none;\n  min-width: 160px;\n  max-width: 500px;\n  min-height: 10px;\n  max-height: 99%;\n  background: #fff;\n  border-radius: 4px;\n  box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 0px 10px 1px rgba(0, 0, 0, 0.14), 0 0px 10px 2px rgba(0, 0, 0, 0.12);\n  z-index: 9000;\n}\n\nbody .q-popover {\n  max-height: 50vh;\n  overflow-y: scroll;\n  max-width: 30vw;\n}");var J=new B,Q=s.default.createElement(n.Button,null," anchor "),W=[];function X(t){var n=O(e.useState(!1),2),r=n[0],i=n[1],a=[].concat(W,q(t.modifiers||[])),l=function(){i(!1),t.onClose&&t.onClose()};return e.useEffect((function(){var e,n;return n=t.ignoreClickSelector,e=J.register((function(e){var t;n&&(t=e.target.closest(n)),t||l()})),function(){e()}}),[]),e.useEffect((function(){t.show?i(t.show):l()}),[t.show]),s.default.createElement(o.Manager,null,s.default.createElement(o.Reference,null,(function(e){var n,r=e.ref;return"function"==typeof t.anchor?n=t.anchor(r):(n=t.anchor,n=s.default.createElement("div",{ref:r,className:"popover-anchor-container"},t.anchor||Q)),n})),s.default.createElement($,null,r&&s.default.createElement(o.Popper,{placement:t.placement||"bottom-start",modifiers:a},(function(e){var n,r=e.ref,i=e.style,o=e.placement,a=e.arrowProps,l=e.update;return n=[],Array.isArray(t.children)?n=t.children:void 0!==t.children&&(n=[t.children]),n.forEach((function(e){e.props.optionsRef&&(e.props.optionsRef.current.scheduleUpdate=l)})),s.default.createElement("div",{ref:r,"data-placement":o,style:g({},i),className:"q-popover"},t.children,s.default.createElement("div",{ref:a.ref,style:a.style}))}))))}window.addEventListener("click",(function(e){null===e.target.closest(".q-popover")?J.trigger(e):(e.stopPropagation(),e.stopImmediatePropagation())}));function ee(t){return e.useState((function(){return null!=t?t:l.v4()}))[0]}x(".piped-text-menu-list .piped-text-popover-menu > * {\n  min-height: 32px;\n}");function te(e){return s.default.createElement("div",{className:"piped-text-popover-container"},s.default.createElement("div",{className:"piped-text-error-container"},s.default.createElement("div",{className:"piped-text-error-icon"},s.default.createElement(r.ErrorIcon,{size:"medium"})),e.errorText&&s.default.createElement("div",{className:"piped-text-error-text"},e.errorText)))}x("");function ne(e){return"embeddedData"===e.value}function re(e){return!0===e.header||!0===e.disabled}function ie(e){return!!e.hasSubmenu}function oe(e){var t,n,r;return t=ne(e),n=ie(e),r=function(e){return!(ne(e)||re(e)||ie(e))}(e),t||n||r}x("div[role=menu] .piped-text-search-input-container {\n  padding: 5px 10px;\n}\n\n.piped-text-search-input {\n  padding: 10px 12px;\n  user-select: none;\n  box-sizing: border-box;\n  overflow-x: hidden;\n  text-overflow: ellipsis;\n  align-content: center;\n  padding: 4px 8px 8px;\n}\n.piped-text-search-input input.q-plugin-popover-input {\n  box-sizing: border-box;\n  height: 36px;\n  padding: 7px 9px;\n}\n\n.piped-text-menu-empty-anchor {\n  /* the margin-right hack was not in harmony with tao.\n      now, the empty-anchor is truly empty */\n}\n\n.piped-text-submenu-item-container {\n  position: relative;\n}\n.piped-text-submenu-item-container .piped-text-menu .piped-text-submenu-anchor {\n  position: absolute;\n  z-index: -1;\n  bottom: 0;\n  top: 0;\n  left: 0;\n  right: 0;\n  min-width: 100%;\n}\n\n.piped-text-submenu-item {\n  padding-right: 24px;\n}\n\n.piped-text-information-message {\n  padding: 10px 12px;\n  user-select: none;\n  box-sizing: border-box;\n  overflow-x: hidden;\n  text-overflow: ellipsis;\n  color: #74777A;\n  text-align: center;\n  white-space: pre-line;\n}\n\n.piped-text-loading-spinner {\n  width: fit-content;\n  margin: 0 auto;\n}\n\n.piped-text-error-container {\n  color: #BB0000;\n}\n.piped-text-error-container .piped-text-error-icon {\n  padding: 8px 0;\n}\n.piped-text-error-container .piped-text-error-icon svg {\n  fill: #BB0000;\n  display: block;\n  margin: 0 auto;\n}\n.piped-text-error-container .piped-text-error-text {\n  text-align: center;\n  white-space: pre-line;\n  padding: 0 12px 8px;\n}\n\n.piped-text-menu-item-container.highlighted-menu-item {\n  background: RGBA(50, 54, 58, 0.08);\n}\n.piped-text-menu-item-container .piped-text-menu-item, .piped-text-menu-item-container .piped-text-submenu-item {\n  padding: 10px 12px;\n  user-select: none;\n  box-sizing: border-box;\n  overflow-x: hidden;\n  text-overflow: ellipsis;\n}\n.piped-text-menu-item-container .piped-text-menu-item:not(.piped-text-header):not(.piped-text-disabled):hover, .piped-text-menu-item-container .piped-text-submenu-item:not(.piped-text-header):not(.piped-text-disabled):hover {\n  cursor: pointer;\n}\n.piped-text-menu-item-container .piped-text-menu-item.piped-text-header, .piped-text-menu-item-container .piped-text-submenu-item.piped-text-header {\n  font-size: 12px;\n  line-height: 16px;\n  font-weight: 700;\n  padding: 12px;\n}\n.piped-text-menu-item-container .piped-text-menu-item.piped-text-disabled:not(.piped-text-header), .piped-text-menu-item-container .piped-text-submenu-item.piped-text-disabled:not(.piped-text-header) {\n  color: RGB(116, 119, 122);\n}");x("");var ae=s.default.forwardRef((function(t,n){var i=e.useRef(null),o=ee(),a=t.menuItem;return s.default.createElement("div",{"data-testid":"piped-text-submenu",className:"piped-text-submenu-item-container",role:"presentation"},a.show&&s.default.createElement(Ee,{"aria-labelledby":o,items:a.submenu.items,show:a.show,placement:"right-start",onClose:function(){a.show=!1},allowCustom:a.submenu.allowCustom,customScheme:a.submenu.customScheme,customInputMessage:a.submenu.customInputMessage,searchPlaceholder:a.submenu.searchPlaceholder,errorText:a.submenu.errorText,onSelected:function(e){t.onMenuItemClick(e)},anchor:function(e){return s.default.createElement("div",{ref:e,className:"piped-text-submenu-anchor"})},anchorRef:i,keyboardCtrl:t.keyboardCtrl,pipedTextMenuId:t.pipedTextMenuId}),s.default.createElement("div",{id:o,className:"piped-text-submenu-item",ref:i},s.default.createElement("div",{className:"label-text"},a.label),s.default.createElement("div",{className:"piped-text-icon"},s.default.createElement(r.ChevronRightIcon,{size:"medium"}))))}));x("div[role=menu] .piped-text-search-input-container {\n  padding: 5px 10px;\n}\n\n.piped-text-search-input {\n  padding: 10px 12px;\n  user-select: none;\n  box-sizing: border-box;\n  overflow-x: hidden;\n  text-overflow: ellipsis;\n  align-content: center;\n  padding: 4px 8px 8px;\n}\n.piped-text-search-input input.q-plugin-popover-input {\n  box-sizing: border-box;\n  height: 36px;\n  padding: 7px 9px;\n}\n\n.piped-text-menu-empty-anchor {\n  /* the margin-right hack was not in harmony with tao.\n      now, the empty-anchor is truly empty */\n}\n\n.piped-text-submenu-item-container {\n  position: relative;\n}\n.piped-text-submenu-item-container .piped-text-menu .piped-text-submenu-anchor {\n  position: absolute;\n  z-index: -1;\n  bottom: 0;\n  top: 0;\n  left: 0;\n  right: 0;\n  min-width: 100%;\n}\n\n.piped-text-submenu-item {\n  padding-right: 24px;\n}\n\n.piped-text-information-message {\n  padding: 10px 12px;\n  user-select: none;\n  box-sizing: border-box;\n  overflow-x: hidden;\n  text-overflow: ellipsis;\n  color: #74777A;\n  text-align: center;\n  white-space: pre-line;\n}\n\n.piped-text-loading-spinner {\n  width: fit-content;\n  margin: 0 auto;\n}\n\n.piped-text-error-container {\n  color: #BB0000;\n}\n.piped-text-error-container .piped-text-error-icon {\n  padding: 8px 0;\n}\n.piped-text-error-container .piped-text-error-icon svg {\n  fill: #BB0000;\n  display: block;\n  margin: 0 auto;\n}\n.piped-text-error-container .piped-text-error-text {\n  text-align: center;\n  white-space: pre-line;\n  padding: 0 12px 8px;\n}\n\n.embedded-data-menu {\n  padding: 10px 12px;\n  user-select: none;\n  box-sizing: border-box;\n  overflow-x: hidden;\n  text-overflow: ellipsis;\n  align-content: center;\n  padding: 4px 8px 8px;\n}\n.embedded-data-menu input.q-plugin-popover-input {\n  box-sizing: border-box;\n  height: 36px;\n  padding: 7px 9px;\n}");x("");var le=["ArrowDown","Escape","Tab","PageUp","Home","PageDown","End","Enter"],ue=function(){function e(e,t){this.currentContainer=e,this.menuItems=t,this.highlightedIdx=-1}return e.prototype.setMenuItems=function(e){this.menuItems=e},e.prototype.findMenuItemIdx=function(e){return this.menuItems.findIndex((function(t){return t.current===e.current}))},e}(),de=function(){function e(){this.menuFocusItems=[],this.currFocusItemIdx=-1}return e.prototype.getFocusMenu=function(e){var t;if(-1!==(t=this.menuFocusItems.findIndex((function(t){return t.currentContainer.current===e.current}))))return this.menuFocusItems[t]},e.prototype.getCurrentFocusMenu=function(){return this.menuFocusItems[this.currFocusItemIdx]},e.prototype.addMenu=function(e,t){var n,r;r=this.menuFocusItems.findIndex((function(t){return t.currentContainer.current===e.current})),0===this.menuFocusItems.length||-1===r?(n=new ue(e,t),this.menuFocusItems.push(n)):(n=this.menuFocusItems[r]).setMenuItems(t)},e.prototype.removeMenu=function(e){var t;if(-1===(t=this.menuFocusItems.findIndex((function(t){return t.currentContainer.current===e.current}))))throw console.error(this),console.error(e),new Error("Could not find a matching PipedTextMenu");this.menuFocusItems.splice(t,1)},e.prototype.handleKeyEvent=function(e){var t,n,r,i,o,a,l,u,d,c,s,p;if(u=e.key,void 0!==(d=this.getCurrentFocusMenu()))switch(u){case"ArrowDown":d.highlightedIdx<d.menuItems.length-1&&(s=d.menuItems[d.highlightedIdx+1],this.setFocusMenuHighlightedIdx(d.currentContainer,s),null===(t=null==s?void 0:s.current)||void 0===t||t.focus());break;case"ArrowUp":d.highlightedIdx>0&&(s=d.menuItems[d.highlightedIdx-1],this.setFocusMenuHighlightedIdx(d.currentContainer,s),null===(n=null==s?void 0:s.current)||void 0===n||n.focus());break;case"ArrowRight":this.focusNextSubmenu();break;case"ArrowLeft":case"Escape":this.currFocusItemIdx>0&&(e.stopPropagation(),void 0!==(c=this.menuFocusItems[this.currFocusItemIdx-1])&&(void 0===(p=c.menuItems[c.highlightedIdx])?null===(i=null===(r=c.currentContainer)||void 0===r?void 0:r.current)||void 0===i||i.focus():null===(o=null==p?void 0:p.current)||void 0===o||o.focus()));break;case"PageUp":case"Home":(s=d.menuItems[0])&&(this.setFocusMenuHighlightedIdx(d.currentContainer,s),null===(a=null==s?void 0:s.current)||void 0===a||a.focus());break;case"PageDown":case"End":(s=d.menuItems[d.menuItems.length-1])&&(this.setFocusMenuHighlightedIdx(d.currentContainer,s),null===(l=null==s?void 0:s.current)||void 0===l||l.focus())}},e.prototype.focusNextSubmenu=function(){var e,t,n,r,i;void 0!==this.getCurrentFocusMenu()&&void 0!==(r=this.menuFocusItems[this.currFocusItemIdx+1])&&(void 0===(i=r.menuItems[r.highlightedIdx])?null===(t=null===(e=r.currentContainer)||void 0===e?void 0:e.current)||void 0===t||t.focus():null===(n=null==i?void 0:i.current)||void 0===n||n.focus())},e.prototype.getCurrentFocusMenuRef=function(){var e;return null===(e=this.getCurrentFocusMenu())||void 0===e?void 0:e.currentContainer},e.prototype.isMenuItemInCurrentFocusMenu=function(e){return void 0!==this.getCurrentFocusMenu().menuItems.find((function(t){return t.current===e.current}))},e.prototype.setFocus=function(e){var t;if(-1===(t=this.menuFocusItems.findIndex((function(t){return t.currentContainer.current===e}))))throw console.error(this),console.error(e),new Error("Could not find a matching PipedTextMenu");this.currFocusItemIdx=t},e.prototype.getFocusMenuHighlightedIdx=function(e){var t;return void 0===(t=this.getFocusMenu(e))?-1:t.highlightedIdx},e.prototype.setFocusMenuHighlightedIdx=function(e,t){var n,r;void 0!==(n=this.getFocusMenu(e))&&-1!==(r=n.findMenuItemIdx(t))&&(n.highlightedIdx=r)},e}();function ce(t){var i=e.useState(""),o=i[0],a=i[1],l=e.useState(!1),u=l[0],d=l[1],c=e.useRef(),p=e.useRef();return e.useEffect((function(){t.keyboardCtrl.addMenu(c,[p])}),[c]),e.useEffect((function(){return function(){t.keyboardCtrl.removeMenu(c)}}),[]),s.default.createElement("div",{className:"embedded-data-input",tabIndex:-1,"aria-labelledby":t.ariaLabelledById,ref:c,onFocus:function(e){var n;e.currentTarget===c.current&&(t.keyboardCtrl.setFocus(c.current),null===(n=null==p?void 0:p.current)||void 0===n||n.focus(),t.keyboardCtrl.setFocusMenuHighlightedIdx(c,p),e.stopPropagation(),e.preventDefault())},onKeyDown:function(e){switch(e.key){case"ArrowDown":case"ArrowUp":case"ArrowRight":case"ArrowLeft":case"Escape":t.keyboardCtrl.handleKeyEvent(e),e.preventDefault();break;case"Enter":f(),e.stopPropagation(),e.preventDefault();break;case"PageUp":case"Home":case"PageDown":case"End":e.stopPropagation(),e.preventDefault()}}},s.default.createElement(n.InputGroup,null,s.default.createElement(n.Input,{onChange:function(e){!function(e){var t=(e.target.value||"").trim(),n=encodeURIComponent(t);a(n),n.length>0&&u&&d(!1)}(e)},invalid:u,onKeyDown:function(e){var t=e.key;le.includes(e.key)||e.stopPropagation();e.shiftKey||"Tab"!==t||e.stopPropagation()},className:"q-plugin-popover-input",ref:p}),s.default.createElement(n.Button,{kind:"primary",onClick:f,onKeyDown:function(e){e.shiftKey&&"Tab"===e.key&&e.stopPropagation()},onFocus:function(e){e.stopPropagation()}},s.default.createElement(r.AddIcon,null))));function f(){var e;(o||"").trim().length<1?d(!0):(e="${e://Field/".concat(o,"}"),t.onSelect(e))}}var se=s.default.forwardRef((function(e,t){var n=e.anchor,r=e.onClose||function(){},i=e.onSelect||function(){};return s.default.createElement(X,{show:e.show,anchor:n,onClose:r,ignoreClickSelector:"embedded-data-menu-content",placement:e.placement||"right-start"},s.default.createElement("div",{className:"embedded-data-menu",ref:t},s.default.createElement(ce,{onSelect:i,keyboardCtrl:e.keyboardCtrl,ariaLabelledById:e.ariaLabelledById})))}));function pe(e){return function(t){e.forEach((function(e){"function"==typeof e?e(t):null!==e&&(e.current=t)}))}}var fe=s.default.forwardRef((function(t,n){var i=e.useState(),o=i[0],a=i[1],l=e.useState(),u=l[0],d=l[1],c=e.useState(),p=c[0],f=c[1],m=e.useState(),h=m[0],v=m[1],x=e.useState(),b=x[0],g=x[1],y=e.useState(),w=y[0],E=y[1],k=e.useState(),I=k[0],C=k[1],S=e.useRef(),N=ee(),F=ee();return e.useEffect((function(){var e,n,r,i,o,l,u;void 0!==t.menuItem&&(e=oe(t.menuItem),r=ie(t.menuItem),i=ne(t.menuItem),n=re(t.menuItem),e&&(o=-1,u="menuitem"),(r||i)&&(l="menu"),a(l),d(o),f(u),v(r),g(n),E(e),C(i))}),[t.menuItem]),s.default.createElement("div",{className:"piped-text-menu-item-container "+(t.isHighlighted?"highlighted-menu-item":""),ref:pe([n,S]),"aria-haspopup":o,tabIndex:u,role:p,id:o?N:void 0,"aria-controls":o?F:void 0,"aria-expanded":t.menuItem.show,onFocus:function(e){var n;n=t.menuItem,h||I?t.onSubmenuHover(n,S):t.onMenuItemHover(n,S)},onKeyDown:function(e){!function(e){if(!t.isHighlighted)return;if(!t.keyboardCtrl.isMenuItemInCurrentFocusMenu(S))return;" "!==e.key&&"Enter"!==e.key||(h||I?t.onSubmenuItemClick(t.menuItem):t.onMenuItemClicked(t.menuItem),e.preventDefault())}(e)},onMouseEnter:function(e){h||I?(n=t.menuItem,t.onSubmenuHover(n,S)):w&&function(e){t.onMenuItemHover(e,S)}(t.menuItem);var n},onClick:function(e){h||I?(n=t.menuItem,t.onSubmenuItemClick(n)):w&&T(t.menuItem);var n}},function(e){var n,i,o,a;h?n=s.default.createElement(ae,{key:e.key,menuItem:e,onMenuItemClick:T,keyboardCtrl:t.keyboardCtrl,pipedTextMenuId:F}):b?(i=!0===e.header?"piped-text-header":"",o=!0===e.disabled?"piped-text-disabled":"",a="piped-text-menu-item ".concat(i," ").concat(o),n=s.default.createElement("div",{className:a},e.label)):n=I?s.default.createElement("div",{role:"presentation"},s.default.createElement(se,{show:e.show,onSelect:P,anchor:function(e){return s.default.createElement("div",{ref:e,className:"embedded-data-menu-anchor","aria-hidden":"true"})},keyboardCtrl:t.keyboardCtrl,ariaLabelledById:N}),s.default.createElement("div",{className:"piped-text-submenu-item"},s.default.createElement("div",{className:"label-text"},e.label),s.default.createElement("div",{className:"piped-text-icon"},s.default.createElement(r.ChevronRightIcon,{size:"medium"})))):s.default.createElement("div",{className:"piped-text-menu-item",role:"presentation"},e.label);return s.default.createElement("div",{className:"piped-text-menu-item-content",role:"presentation"},n)}(t.menuItem));function T(e){t.onMenuItemClicked(e)}function P(e){var n;n={value:{locator:e}},t.onMenuItemClicked(n)}})),me=s.default.forwardRef((function(e,t){var r=s.default.useRef();return s.default.createElement("div",{className:"piped-text-search-input",tabIndex:-1,ref:t,onFocus:function(t){var n;t.target!==r.current&&(null===(n=r.current)||void 0===n||n.focus());e.onFocus(t)}},s.default.createElement("form",{onSubmit:e.onSearchSubmit},s.default.createElement(n.Input,{small:!0,full:!0,className:"q-plugin-popover-input",ref:r,placeholder:e.searchPlaceholder,value:e.value,onChange:e.onInputChange,onClick:e.onInputClick,onKeyDown:function(e){le.includes(e.key)||e.stopPropagation()},role:"searchbox"})))})),he=h.default.en,ve=e.createContext(void 0),xe=he;function be(){var t=e.useContext(ve);return{getTranslation:e.useCallback((function(e,n){var r,i=String(e);void 0===t&&console.log("Cannot resolve translation for key: ".concat(i,". Element must be rendered inside of PluginUIProvider component"));var o=null===(r=null==t?void 0:t.localizedText)||void 0===r?void 0:r[e];if(void 0===o){if(void 0===(o=xe[e]))return console.warn("There is no translation or fallback translation for provided translation key: ".concat(i)),"##".concat(i,"##");console.warn("There was no translation for the provided translation key: ".concat(i))}return void 0===n?o:function(e,t){var n=/({{[a-zA-Z0-9]+}})/g;return e.split(n).filter(Boolean).map((function(e){if(e.match(n)){var r=e.replace(/[{}]+/g,"");return t[r]}return e})).join("")}(o,n)}),[t])}}var ge="menu.noItemsToDisplay",ye=s.default.forwardRef((function(t,r){var i,o,a=this,l=e.useState(!1),u=l[0],d=l[1],c=e.useState(!1),p=c[0],f=c[1],m=e.useState(),h=m[0],v=m[1],x=e.useState(),b=x[0],g=x[1],y=e.useState(),w=y[0],E=y[1],k=e.useState(),I=k[0],C=k[1],S=e.useState(""),N=S[0],F=S[1],T=e.useState(!1),P=T[0],M=T[1],j=be().getTranslation,O=null!==(i=t.pipedTextMenuId)&&void 0!==i?i:ee(),q=t["aria-labelledby"],A=e.useRef(),R=e.useRef(),L=e.useState(!1),D=L[0],z=L[1],B=e.useCallback((function(e){e&&z(!0)}),[]),H=e.useState(!1),_=H[0],K=H[1],G=e.useCallback((function(e){e&&K(!0)}),[]),U=void 0===t.keyboardCtrl,V=e.useState(U?new de:t.keyboardCtrl),$=V[0];V[1];return e.useEffect((function(){return function(){$.removeMenu(A)}}),[]),e.useEffect((function(){var e,t;A.current&&R.current&&w&&!u&&(t=s.default.Children.map(I,(function(e){return e.ref})),e=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}([R],t,!0),$.addMenu(A,e),U&&!1===P&&(setTimeout((function(){var e;null===(e=A.current)||void 0===e||e.focus()}),0),M(!0)))}),[A,w,$,u]),e.useEffect((function(){var e;D&&(e=[],_&&e.push(R),$.addMenu(A,e))}),[D,_]),e.useEffect((function(){void 0!==t.items&&Y(a,void 0,void 0,(function(){var e,n;return Z(this,(function(r){switch(r.label){case 0:if("function"!=typeof t.items)return[3,5];d(!0),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,t.items()];case 2:return e=r.sent(),[3,4];case 3:return r.sent(),f(!0),[3,4];case 4:return d(!1),[3,6];case 5:e=t.items,r.label=6;case 6:try{n=Ie(e),v(n)}catch(e){f(!0)}return[2]}}))}))}),[t.items]),e.useEffect((function(){var e;e=(h||[]).filter(Q);var n=void 0===t.customInputMessage&&0===e.length;if(void 0!==h||n){if(n){var r=j(ge);e=[{label:r,value:r,key:r,disabled:!0,hasSubmenu:!1}]}g(e)}}),[N,h]),e.useEffect((function(){var e;Array.isArray(b)&&(e=function(e){var n,r,i,o;if(n=[],r=[],0===e.length&&!0===t.allowCustom&&t.customInputMessage)return s.default.createElement("div",null,s.default.createElement("div",{className:"piped-text-information-message"},t.customInputMessage));return i=0,o=$.getFocusMenuHighlightedIdx(A),n=e.map((function(e){var t,n,a,l=s.default.createRef();return a=(t=oe(e))&&o-1===i,n=s.default.createElement(fe,{ref:l,key:e.key,menuItem:e,onSubmenuHover:W,onMenuItemHover:X,onMenuItemClicked:re,onSubmenuItemClick:ie,onEmbeddedDataItemClick:ae,keyboardCtrl:$,isHighlighted:a}),t&&(r.push(n),i++),n})),C(r),n}(b),E(e))}),[b]),function(){var e;"function"==typeof(null===(e=t.popoverOptionsRef)||void 0===e?void 0:e.current.scheduleUpdate)&&t.popoverOptionsRef.current.scheduleUpdate()}(),s.default.createElement("div",{className:"piped-text-menu-list ".concat(null!==(o=t.className)&&void 0!==o?o:""),ref:pe([r,A,B]),id:O,"aria-labelledby":q,role:"menu",tabIndex:void 0===t.tabIndex?-1:t.tabIndex,onKeyDown:function(e){!function(e){var n;if("Tab"===e.key)J();if(null==t||t.menuKeyDown(e),n=$.getCurrentFocusMenuRef(),A.current!==(null==n?void 0:n.current))return;switch(e.key){case"ArrowDown":case"ArrowUp":case"ArrowRight":case"ArrowLeft":case"Escape":case"PageUp":case"Home":case"PageDown":case"End":$.handleKeyEvent(e),e.preventDefault()}}(e)},onFocus:function(e){!function(e){var t;e.currentTarget===A.current&&($.setFocus(A.current),-1===$.getFocusMenuHighlightedIdx(A)&&(null===(t=R.current)||void 0===t||t.focus()),e.stopPropagation(),e.preventDefault())}(e)}},s.default.createElement("div",{className:"piped-text-popover-menu",role:"presentation"},p?s.default.createElement(te,{errorText:t.errorText}):s.default.createElement(s.default.Fragment,null,s.default.createElement(me,{ref:pe([R,G]),value:N,onSearchSubmit:function(e){var n,r,i;if(e.preventDefault(),!(!0===t.allowCustom&&t.customScheme))return;if(""===(n=N.trim()))return;r="${".concat(t.customScheme,"://Field/").concat(encodeURIComponent(n),"}"),i={value:{locator:r}},t.onSelected(i),J()},searchPlaceholder:t.searchPlaceholder,onInputChange:function(e){return t=e.target.value,void F(t);var t},onInputClick:function(e){e.stopPropagation()},onFocus:function(){!function(){var e,t;t=null!==(e=null==h?void 0:h.slice())&&void 0!==e?e:[],$.setFocusMenuHighlightedIdx(A,R),we(t),v(t)}()}}),u?s.default.createElement("div",{className:"piped-text-loading-spinner"},s.default.createElement(n.LoadingSpinner,{show:!0,size:"medium"})):w)));function J(){var e;null===(e=t.onClose)||void 0===e||e.call(t)}function Q(e){var t;return t=N||"",JSON.stringify(e).toLowerCase().includes(t.toLowerCase())}function W(e,t){var n;n=h.slice(),ne(e,t),we(n),v(n),e.show||(e.show=!0)}function X(e,t){var n;n=h.slice(),ne(e,t),we(n),v(n)}function ne(e,t){var n;$.setFocusMenuHighlightedIdx(A,t),null===(n=t.current)||void 0===n||n.focus()}function re(e){e.disabled||t.onSelected(e)}function ie(e){console.log("PipedTextMenuList submenu click"),$.focusNextSubmenu()}function ae(e){}}));function we(e){e.forEach((function(e){e.show&&(e.show=!1)}))}x("div[role=menu] .piped-text-search-input-container {\n  padding: 5px 10px;\n}\n\n.piped-text-search-input {\n  padding: 10px 12px;\n  user-select: none;\n  box-sizing: border-box;\n  overflow-x: hidden;\n  text-overflow: ellipsis;\n  align-content: center;\n  padding: 4px 8px 8px;\n}\n.piped-text-search-input input.q-plugin-popover-input {\n  box-sizing: border-box;\n  height: 36px;\n  padding: 7px 9px;\n}\n\n.piped-text-menu-empty-anchor {\n  /* the margin-right hack was not in harmony with tao.\n      now, the empty-anchor is truly empty */\n}\n\n.piped-text-submenu-item-container {\n  position: relative;\n}\n.piped-text-submenu-item-container .piped-text-menu .piped-text-submenu-anchor {\n  position: absolute;\n  z-index: -1;\n  bottom: 0;\n  top: 0;\n  left: 0;\n  right: 0;\n  min-width: 100%;\n}\n\n.piped-text-submenu-item {\n  padding-right: 24px;\n}\n\n.piped-text-information-message {\n  padding: 10px 12px;\n  user-select: none;\n  box-sizing: border-box;\n  overflow-x: hidden;\n  text-overflow: ellipsis;\n  color: #74777A;\n  text-align: center;\n  white-space: pre-line;\n}\n\n.piped-text-loading-spinner {\n  width: fit-content;\n  margin: 0 auto;\n}\n\n.piped-text-error-container {\n  color: #BB0000;\n}\n.piped-text-error-container .piped-text-error-icon {\n  padding: 8px 0;\n}\n.piped-text-error-container .piped-text-error-icon svg {\n  fill: #BB0000;\n  display: block;\n  margin: 0 auto;\n}\n.piped-text-error-container .piped-text-error-text {\n  text-align: center;\n  white-space: pre-line;\n  padding: 0 12px 8px;\n}");var Ee=s.default.forwardRef((function(t,n){var r=e.useRef({}),i=e.useState(t.show),o=i[0],a=i[1],l=t["aria-labelledby"],u=t.onClose||function(){},d=e.useState(null);d[0];var c=d[1],p=e.useCallback((function(e){c(e)}),[]);e.useEffect((function(){t.show&&a(!0)}),[t.show]),e.useEffect((function(){return function(){return u()}}),[]);var f=function(e){a("boolean"==typeof e?e:!o)};return s.default.createElement("div",{className:"piped-text-menu"},s.default.createElement(X,{show:o,onClose:function(){f(!1),u()},placement:t.placement||"right-start",anchor:t.anchor,ignoreClickSelector:t.ignoreClickSelector},s.default.createElement(ye,{className:"piped-text-popover-container",items:t.items,errorText:t.errorText,"aria-labelledby":l,ref:p,allowCustom:t.allowCustom,customInputMessage:t.customInputMessage,customScheme:t.customScheme,searchPlaceholder:t.searchPlaceholder,onSelected:function(e){t.onSelected(e),m()},onClose:function(){return u()},popoverOptionsRef:r,keyboardCtrl:t.keyboardCtrl,menuKeyDown:function(e){switch(e.key){case"Tab":case"Escape":m()}},pipedTextMenuId:t.pipedTextMenuId}),s.default.createElement(ke,{optionsRef:r})));function m(){var e,n;u(),null===(n=null===(e=t.anchorRef)||void 0===e?void 0:e.current)||void 0===n||n.focus()}}));function ke(e){return s.default.createElement("div",null)}function Ie(e,t){var n;return t||(e=f.default(e)),n=1,e.forEach((function(e){e.key=e.key||n++,e.hasSubmenu=!!p.default(e,"submenu.items.length")||"function"==typeof p.default(e,"submenu.items"),(e.hasSubmenu||"embeddedData"===e.value)&&(e.show=!1),e.hasSubmenu&&"function"!=typeof e.submenu.items&&Ie(e.submenu.items,!0)})),e}x(".piped-text-dropdown button[type=button].popover-toggle-button {\n  min-width: 128px;\n}\n.piped-text-popover-container {\n  padding: 0;\n}\n.piped-text-popover-container > * {\n  min-height: 32px;\n}\n.piped-text-popover-container .piped-text-submenu-item .label-text, .piped-text-popover-container .piped-text-submenu-item > .piped-text-icon {\n  display: inline-block;\n  vertical-align: middle;\n  overflow-wrap: break-word;\n  word-wrap: break-word;\n  -webkit-hyphens: auto;\n  -ms-hyphens: auto;\n  -moz-hyphens: auto;\n  hyphens: auto;\n}\n.piped-text-popover-container .piped-text-submenu-item .piped-text-icon {\n  display: inline-block;\n  box-sizing: content-box;\n  position: absolute;\n  right: 0;\n  max-width: 24px;\n  min-width: 24px;\n  max-height: 24px;\n}\n.piped-text-popover-container .piped-text-submenu-item .piped-text-icon > svg {\n  position: relative;\n  margin-left: -5px;\n  margin-top: -3px;\n}");function Ce(t){var n=O(e.useState(t.show),2),r=n[0],i=n[1],o=O(e.useState(v()),2),a=o[0],l=o[1],u=e.useRef(null),d=t.anchor,c=t["aria-labelledby"];e.useEffect((function(){return function(){return f()}}),[]),e.useEffect((function(){var e;e=t.show,i(e)}),[t.show]),e.useEffect((function(){var e=v();l(e)}),[t.items]);var p,f=function(){t.onClose&&t.onClose()},m=void 0!==d?s.default.cloneElement(d,{ref:d.ref}):(p=u,s.default.createElement("div",{ref:p,className:"piped-text-menu-empty-anchor"})),h=t.anchorRef||m.ref;return s.default.createElement("div",{className:"piped-text-dropdown"},r&&s.default.createElement(Ee,{onClose:f,show:r,onSelected:function(e){t.onSelect(e),f()},items:a,anchor:m,anchorRef:h,ignoreClickSelector:t.ignoreClickSelector,"aria-labelledby":c}));function v(){if(t.items)return Ie(t.items)}}x(".piped-text-input .piped-text-input-toggle, .piped-text-input .piped-text-select-container {\n  display: inline-block;\n}\n.piped-text-input .piped-text-input-toggle {\n  display: flex;\n}\n.piped-text-input .piped-text-input-toggle input {\n  flex: 1 1;\n  box-sizing: border-box;\n}\n.piped-text-input .piped-text-input-toggle.multiline-input textarea {\n  flex: 1 1;\n  box-sizing: border-box;\n}\n.piped-text-input .piped-text-input-toggle input + button, .piped-text-input .piped-text-input-toggle textarea + button {\n  margin-left: 4px;\n}\n.piped-text-input .addon-text-container {\n  /*\n    These styles are intended to match CFE QDS components,\n      notably FormField and InputField.\n      See: https://gitlab-app.eng.qops.net/cfe/ui/-/blob/master/packages/ui-react/src/FormField/Caption.less\n  */\n  margin-top: 6px;\n}\n.piped-text-input .addon-text-container .helper-text, .piped-text-input .addon-text-container .error-text {\n  font-size: 12px;\n}\n.piped-text-input .addon-text-container .helper-text {\n  color: #74777a;\n  fill: #74777a;\n}\n.piped-text-input .addon-text-container .helper-text + .error-text {\n  margin-top: 4px;\n}\n.piped-text-input .addon-text-container .error-text {\n  display: flex;\n  align-items: center;\n  color: #b00;\n  fill: #b00;\n}\n.piped-text-input .addon-text-container .error-text .error-text-icon svg {\n  margin-left: -2px;\n  margin-right: 3px;\n  width: 16px;\n  height: 16px;\n}");var Se=s.default.forwardRef((function(t,i){var o=e.useState(!1),a=o[0],l=o[1],u=e.useState(),d=u[0],c=u[1],f=ee(),m=e.useRef(null),h=e.useState({value:t.value||""}),v=h[0],x=h[1],b=t.items,g=t.value,y=t.placeholder,w=t.onChange,E=t.onSelect,k=t.onClose,I=t.errorText,C=t.helperText,S=t.multiline,N=void 0!==S&&S,F=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(t,["items","value","placeholder","onChange","onSelect","onClose","errorText","helperText","multiline"]);return e.useEffect((function(){if(function(){if(void 0===d&&g){var e=g.length||0;c(e)}else c(0)}(),void 0!==E&&"function"!=typeof E)throw new Error("PipedTextInput: onSelect property must be a function");if(void 0!==w&&"function"!=typeof w)throw new Error("PipedTextInput: onChange property must be a function")}),[]),e.useEffect((function(){x({value:"string"==typeof g?g:""})}),[t.value]),s.default.createElement("div",{className:"piped-text-input"},s.default.createElement("div",{className:"piped-text-input-toggle popover-toggle"+(N?" multiline-input":"")},s.default.createElement(n.Input,V({ref:i,value:v.value,onChange:function(e){!function(e){var t;t=e.target.value,x({value:t}),P(t,e)}(e)},onBlur:function(e){var t;t=e.target.selectionStart,c(t)},placeholder:y,multiline:N},F)),s.default.createElement(n.IconButton,{id:f,"aria-label":"PipedText","aria-haspopup":"menu","aria-expanded":!!a||void 0,role:"button",onClick:function(){var e;(e=!a)||T();l(e)},ref:m},s.default.createElement(r.PipedTextIcon,null)),s.default.createElement("div",{className:"piped-text-select-container"},s.default.createElement(Ce,{items:b,onSelect:function(e){var t,n,r;M(e),p.default(e,"value.locator")&&(n=v.value.substring(0,d),r=v.value.substring(d),t="".concat(n).concat(e.value.locator).concat(r),x({value:t}),P(t))},show:a,onClose:T,ignoreClickSelector:"piped-text-input-toggle",anchorRef:m,"aria-labelledby":f}))),(void 0!==C||void 0!==I)&&s.default.createElement("div",{className:"addon-text-container"},C&&s.default.createElement("div",{className:"helper-text"},C),I&&s.default.createElement("div",{className:"error-text"},s.default.createElement("div",{className:"error-text-icon"},s.default.createElement(r.ErrorIcon,null)),s.default.createElement("div",{className:"error-text-content"},I))));function T(){k&&k(),l(!1)}function P(e,t){w&&w(e,t)}function M(e){E&&E(e)}}));function Ne(t){var i=O(e.useState(t.children),2),o=i[0],a=i[1];e.useEffect((function(){var e;Array.isArray(o)||((e=[]).push(o),a(e))}),[]),e.useEffect((function(){var e;e=t.children.slice(),a(e)}),[t.children]);var l,u=function(e){"function"==typeof t.onFieldSwitch&&t.onFieldSwitch(t.id,e)},d=function(e){"function"==typeof t.onFieldNameChange&&t.onFieldNameChange(t.id,e)},c=function(e,n){"function"==typeof t.onFieldValueChange&&t.onFieldValueChange(t.id,e,n)},p=function(e){return"string"==typeof e?0===e.trim().length:"function"==typeof e||null==e||0==="".concat(e).trim().length},f=function e(t){return t.map((function(t){var r=t.id,i=t.name,o=t.subMenu,a=t.subMenuLabel;return void 0!==o?s.default.createElement(n.SelectMenu,{label:a||i,key:r},e(o)):s.default.createElement(n.MenuItem,{key:r,value:r},i)}))};return s.default.createElement("div",{className:"field-row"},s.default.createElement("div",{className:"field-selector ".concat(t.required&&!t.subMenu?"required-field":"")},(l=s.default.createElement("div",null,t.nameTooltip),s.default.createElement(n.Tooltip,{disabled:!t.isCustom||p(t.nameTooltip),placement:"top",content:l},s.default.createElement("div",null,t.isCustom?s.default.createElement(n.Input,{full:!0,value:void 0===t.fieldName?"":t.fieldName,placeholder:void 0===t.customNamePlaceholder?"":t.customNamePlaceholder,className:"custom-field-name",onChange:d}):t.required||!t.children||Array.isArray(o)&&0===o.length?t.subMenu?s.default.createElement(n.SelectMenu,{searchable:void 0!==t.searchable&&!1!==t.searchable,defaultLabel:t.fieldName||"",label:t.fieldName,className:"full-width left-align",onChange:u},f([{id:t.id,name:t.fieldName,subMenu:t.subMenu,subMenuLabel:t.subMenuLabel}])):s.default.createElement("div",{className:"required-indicator-container"},s.default.createElement("div",{className:"required-indicator-text"},t.fieldName),t.required&&s.default.createElement("div",{className:"required-indicator-symbol"},"*")):s.default.createElement(n.SelectMenu,{searchable:void 0!==t.searchable&&!1!==t.searchable,defaultLabel:t.fieldName||"",label:t.fieldName,className:"full-width left-align",onChange:u},f(o)))))),s.default.createElement("div",{className:"field-input-container"},s.default.createElement("div",{className:"field-input"},function(){var e=s.default.createElement("div",null,t.valueTooltip);return s.default.createElement(n.Tooltip,{disabled:p(t.valueTooltip),placement:"top",content:e},s.default.createElement("div",null,t.customInput?t.customInput:s.default.createElement(Se,{items:t.pipedTextItems,value:void 0===t.value?"":t.value,onChange:c,placeholder:void 0===t.valuePlaceholder?"":t.valuePlaceholder})))}()),s.default.createElement("div",{className:"delete-row"},s.default.createElement("div",{className:"icon-wrapper",onClick:function(){"function"==typeof t.onRemove&&t.onRemove(t.id)}},!t.required&&s.default.createElement(n.IconButton,{"aria-label":"RemoveRow",size:"medium"},s.default.createElement(r.RemoveItemIcon,null))))))}x(".field-row {\n  min-width: 475px;\n  display: flex;\n  align-items: center;\n}\n.field-row .field-selector, .field-row .field-input, .field-row .delete-row, .field-row .required-indicator {\n  display: inline-block;\n}\n.field-row .field-selector, .field-row .field-input {\n  padding: 0 10px;\n}\n.field-row .custom-field-name, .field-row .field-input, .field-row .delete-row {\n  box-sizing: border-box;\n}\n.field-row .field-selector {\n  min-width: 30%;\n}\n.field-row .field-selector.required-field button:hover {\n  cursor: not-allowed;\n}\n.field-row .field-selector .required-indicator-container {\n  padding-left: 12px;\n  display: flex;\n  color: #32363A;\n}\n.field-row .field-selector .required-indicator-container .required-indicator-text {\n  min-width: 0;\n  font-size: 14px;\n}\n.field-row .field-selector .required-indicator-container .required-indicator-symbol {\n  margin-top: -2px;\n}\n.field-row .field-selector .left-align {\n  text-align: left;\n}\n.field-row .field-selector .custom-field-name {\n  padding-left: 16px;\n  padding-right: 30px;\n}\n.field-row .field-selector .custom-field-name input {\n  text-align: center;\n  display: inline-block;\n  width: 100%;\n  padding: 0;\n}\n.field-row .field-input-container {\n  display: flex;\n  flex: 1 0;\n  align-items: center;\n}\n.field-row .field-input-container .field-input {\n  flex: 1;\n  min-width: 0;\n  margin-right: 4px;\n}\n.field-row .field-input-container .delete-row {\n  max-width: 36px;\n  margin-left: 12px;\n  vertical-align: middle;\n}\n.field-row .field-input-container .delete-row .icon-wrapper {\n  display: block;\n  width: fit-content;\n  margin: 0 auto;\n  min-width: 41px;\n}\n.field-row .field-input-container .delete-row .icon-wrapper:hover {\n  cursor: pointer;\n}\n.field-row .full-width {\n  width: 100%;\n}");function Fe(e){var t=e.name||void 0;return s.default.createElement("div",{className:"field-item",onClick:function(){"function"==typeof e.onClick&&e.onClick(e.id)}},t)}x("");x(".task-fields .add-field-button {\n  margin-right: 100px;\n}\n.task-fields .add-field-button .add-field-button-label {\n  padding: 0 3px;\n}\n.task-fields .field-table {\n  padding-right: 100px;\n  overflow-x: auto;\n}\n.task-fields .field-table .field-headers {\n  margin-bottom: 10px;\n  padding-left: 12px;\n}\n.task-fields .field-table .field-headers .field-row {\n  color: #6A6D70;\n  font-weight: bold;\n}\n.task-fields .field-table .field-headers .field-row .field-selector label, .task-fields .field-table .field-headers .field-row .field-input label {\n  font-size: 12px;\n}\n.task-fields .field-table .field-headers .field-row .field-selector {\n  padding-top: 0;\n  padding-right: 24px;\n  padding-bottom: 0;\n  padding-left: 0;\n}\n.task-fields .field-table .field-headers .field-row .field-input {\n  padding-top: 0;\n  padding-right: 0;\n  padding-bottom: 0;\n  padding-left: 12px;\n}\n.task-fields .field-table .field-rows {\n  padding-bottom: 12px;\n}\n.task-fields .field-table .field-rows .field-row {\n  border-top: 1px solid #E5E5E5;\n}\n.task-fields .field-table .field-rows .field-row .field-selector {\n  padding-top: 8px;\n  padding-right: 12px;\n  padding-bottom: 8px;\n  padding-left: 12px;\n}\n.task-fields .field-table .field-rows .field-row .field-input {\n  border-left: 1px solid #E5E5E5;\n  padding-top: 8px;\n  padding-right: 0;\n  padding-bottom: 8px;\n  padding-left: 12px;\n}\n\n.q-popover .field-item {\n  padding: 5px 32px;\n}\n.q-popover .field-item:hover {\n  cursor: pointer;\n  user-select: none;\n  background: #007ac0;\n  color: #fff;\n  fill: #fff;\n}");function Te(t){var r=t.label||"",i=t.customLabel||"",o=t.disableAddFieldPopover,a=O(e.useState(!1),2),u=a[0],d=a[1],c=l.v4(),p=s.default.createElement(Fe,{key:c,onClick:function(){t.onCustomFieldAdded(),d(!1)},id:c,name:i}),f=[],m=function e(t){return t.subMenu?e(t.subMenu[0]):t.id};return f=t.children.map((function(e){return s.default.createElement(Fe,{name:e.props.name,key:e.props.id,id:e.props.id,subMenu:e.props.subMenu,onClick:function(e){d(!1),t.onFieldAdded(e)}})})),t.allowCustom&&f.push(p),s.default.createElement("div",{className:"add-field-button-container"},s.default.createElement(X,{show:u,onClose:function(){d(!1)},ignoreClickSelector:".add-field-button",anchor:s.default.createElement(n.Button,{disabled:0===f.length,kind:"secondary",className:"add-field-button",onClick:function(){o?t.onFieldAdded(0!==t.children?m(t.children[0].props):""):d(!u)}},s.default.createElement("span",{className:"add-field-button-label"},r))},f))}function Pe(e){var t=e.itemHeaderText,r=e.inputHeaderText;return t||r?s.default.createElement("div",{className:"field-row"},s.default.createElement("div",{className:"field-selector"},s.default.createElement(n.Label,null,t)),s.default.createElement("div",{className:"field-input"},s.default.createElement(n.Label,null,r))):null}function Me(e){var t=e.checked||!1,n=e.children||"";return s.default.createElement("div",{className:"select-item",onClick:function(t){return e.onChange(e.value,t)}},s.default.createElement("div",{className:"item"},s.default.createElement("div",{className:"checked-container ".concat(t?"checked":"")},s.default.createElement(r.CheckIcon,{size:"medium"})),s.default.createElement("div",{className:"item-content"},n)))}x(".select-item .item {\n  padding: 5px 32px;\n  display: inline-flex;\n  align-items: center;\n  box-sizing: border-box;\n  width: 100%;\n}\n.select-item .item .checked-container, .select-item .item .item-content {\n  display: inline-block;\n}\n.select-item .item .checked-container {\n  margin-bottom: -3px;\n  transition: opacity cubic-bezier(0.4, 0, 0.2, 1) 0.1s;\n}\n.select-item .item .checked-container.checked {\n  opacity: 1;\n}\n.select-item .item .checked-container:not(.checked) {\n  opacity: 0;\n}\n.select-item .item:hover {\n  cursor: pointer;\n  user-select: none;\n  background: #007ac0;\n  color: #fff;\n  fill: #fff;\n}");x("");function je(e){return s.default.createElement("div",{className:"dynamic-search-popover-child",onClick:e.onClick},e.children)}x(".dynamic-search-input .search-input {\n  box-sizing: border-box;\n}\n\n.dynamic-search-popover-child {\n  padding: 5px 32px;\n}\n.dynamic-search-popover-child:hover {\n  cursor: pointer;\n  user-select: none;\n  background: #007ac0;\n  color: #fff;\n  fill: #fff;\n}");x(".capture-event .capture-event-controls {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  margin-bottom: 20px;\n}\n.capture-event .capture-event-controls .status-message {\n  font-size: 12px;\n  line-height: 16px;\n  display: flex;\n  align-items: center;\n  gap: 4px;\n}\n.capture-event .capture-event-controls .status-message.pending {\n  color: #74777a;\n}\n.capture-event .capture-event-controls .status-message.success {\n  color: #107e3e;\n  fill: #107e3e;\n}\n.capture-event .capture-event-controls .status-message.failure {\n  color: #bb0000;\n  fill: #bb0000;\n}");x(".copy-text {\n  display: flex;\n  column-gap: 8px;\n}\n.copy-text .input-container {\n  width: 100%;\n}\n.copy-text .input-container .input-textbox {\n  width: 100%;\n}\n.copy-text .copy-button-container .selected-button {\n  display: flex;\n}\n.copy-text .copy-button-container .selected-button .selected-button-text {\n  display: flex;\n  align-self: center;\n}");function Oe(e){return"string"==typeof e}x(".field-mapper {\n  padding-bottom: 12px;\n}\n.field-mapper .field-mapper-row-container .field-mapper-row {\n  border-top: 1px solid #E5E5E5;\n}\n.field-mapper .field-mapper-row-container.field-mapper-header-row {\n  margin-bottom: 10px;\n  padding-left: 12px;\n}\n.field-mapper .field-mapper-row-container.field-mapper-header-row .field-mapper-row {\n  border: 0;\n}\n.field-mapper .field-mapper-row-container.field-mapper-header-row .field-mapper-key, .field-mapper .field-mapper-row-container.field-mapper-header-row .field-mapper-value {\n  border: 0;\n  display: flex;\n  align-items: center;\n}\n.field-mapper .field-mapper-row-container.field-mapper-header-row .field-mapper-key .field-mapper-header-cell, .field-mapper .field-mapper-row-container.field-mapper-header-row .field-mapper-value .field-mapper-header-cell {\n  color: #6A6D70;\n  font-weight: bold;\n  font-size: 12px;\n}\n.field-mapper .field-mapper-row-container.field-mapper-header-row .field-mapper-key {\n  padding-top: 0;\n  padding-right: 24px;\n  padding-bottom: 0;\n  padding-left: 0;\n}\n.field-mapper .field-mapper-row-container.field-mapper-header-row .field-mapper-value {\n  padding-top: 0;\n  padding-right: 0;\n  padding-bottom: 0;\n  padding-left: 12px;\n}\n.field-mapper .add-field-button-container {\n  padding-top: 12px;\n}\n.field-mapper .addon-text-container {\n  padding-top: 6px;\n}\n.field-mapper .addon-text-container .error-text:not(:first-child) {\n  padding-top: 4px;\n}");x(".field-mapper-row .field-mapper-row-content {\n  display: flex;\n  align-items: stretch;\n}\n.field-mapper-row .field-mapper-row-content .field-mapper-key {\n  flex: 4;\n  min-width: 33%;\n  min-height: 100%;\n}\n.field-mapper-row .field-mapper-row-content .field-mapper-value {\n  flex: 7;\n}\n.field-mapper-row .field-mapper-row-content .remove-row-container {\n  min-height: 100%;\n  padding: 8px 12px;\n  border-left: 1px solid #E5E5E5;\n}\n.field-mapper-row .field-mapper-row-content .remove-row-container.hide-remove-button {\n  border: 0;\n}\n.field-mapper-row .field-mapper-row-content .remove-row-container .empty-remove-button {\n  min-width: 36px;\n}");x(".field-mapper-key {\n  padding-top: 8px;\n  padding-right: 12px;\n  padding-bottom: 8px;\n  padding-left: 12px;\n}\n.field-mapper-key .field-mapper-key-select-container .field-mapper-key-dropdown {\n  width: 100%;\n}\n.field-mapper-key .field-mapper-key-select-container .field-mapper-key-dropdown-button {\n  width: 100%;\n}\n.field-mapper-key .field-mapper-key-select-container .field-mapper-key-disabled {\n  opacity: 1;\n  /*\n    Styles below are copied \n        verbatim from the styles on the <span> element\n        in the QDS Dropdwon & DropdownButton components\n  */\n  /*[BEGIN COPIED STYLES]*/\n  line-height: normal;\n  padding: 0 4px 0 12px;\n  display: inline-flex;\n  justify-content: space-between;\n  align-items: center;\n  background-color: #fafafa;\n  color: rgb(50, 54, 58);\n  border-color: rgba(137, 137, 137, 0.6);\n  /*[END COPIED STYLES]*/\n}\n.field-mapper-key .field-mapper-key-select-container .field-mapper-key-disabled .field-mapper-key-disabled-text {\n  /*[BEGIN COPIED STYLES]*/\n  font-size: 14px;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  min-height: 10px;\n  /*[END COPIED STYLES]*/\n  opacity: 0.9;\n}\n.field-mapper-key .field-mapper-key-select-container .field-mapper-key-disabled .field-mapper-key-disabled-icon {\n  /*[BEGIN COPIED STYLES]*/\n  fill: rgb(81, 85, 89);\n  /*[END COPIED STYLES]*/\n  opacity: 0.6;\n}\n.field-mapper-key .field-mapper-key-select-container .required-field-container {\n  display: flex;\n  height: 36px;\n  align-items: center;\n}\n.field-mapper-key .field-mapper-key-select-container .required-field-container .required-field-text {\n  min-width: 0;\n  font-size: 14px;\n}\n.field-mapper-key .field-mapper-key-select-container .required-field-container .required-field-symbol {\n  margin-top: -2px;\n}");var qe=s.default.forwardRef((function(e,t){var i,o,a,l,u,d,c,p,f,m=null!==(i=e.id)&&void 0!==i?i:ee(),h=e.helperText?"".concat(m,"-helper-text"):void 0,v=e.errorText?"".concat(m,"-error-text"):void 0,x=[h,v].filter((function(e){return void 0!==e})).join(" ");return p=Array.isArray(e.availableFields)?e.availableFields:[],f="function"==typeof e.onChange?e.onChange:function(){},s.default.createElement("div",{"data-testid":"field-mapper-key",className:"field-mapper-key"+(e.className?" "+e.className:""),ref:t,id:m,"aria-describedby":x},s.default.createElement(n.Tooltip,{disabled:!e.tooltip,content:null!==(o=e.tooltip)&&void 0!==o?o:null},s.default.Children.count(e.children)>0?e.children:s.default.createElement("div",{className:"field-mapper-key-select-container"},function(){var t;return!((null==p?void 0:p.length)>0)&&!(null===(t=e.selectedField)||void 0===t?void 0:t.required)}()?s.default.createElement(n.Button,{className:"field-mapper-key-disabled",disabled:!0,full:!0},s.default.createElement("div",{className:"field-mapper-key-disabled-text"},null===(a=e.selectedField)||void 0===a?void 0:a.label),s.default.createElement(r.ChevronDownIcon,{className:"field-mapper-key-disabled-icon",size:"medium","aria-hidden":"true"})):!0===(null===(l=e.selectedField)||void 0===l?void 0:l.required)?s.default.createElement("div",{className:"required-field-container"},s.default.createElement("div",{className:"required-field-text"},null===(u=e.selectedField)||void 0===u?void 0:u.label),s.default.createElement("div",{className:"required-field-symbol"},"*")):s.default.createElement(n.Dropdown,{className:"field-mapper-key-dropdown",onChange:function(t){var n;if(void 0===(n=p.find((function(e){return e.key===t}))))return;f(e.selectedField,n)}},s.default.createElement(n.DropdownButton,{"data-testid":"field-mapper-key-dropdown-button",className:"field-mapper-key-dropdown-button",label:null===(d=e.selectedField)||void 0===d?void 0:d.label}),s.default.createElement(n.DropdownList,null,null===(c=e.availableFields)||void 0===c?void 0:c.map((function(e){return s.default.createElement(n.DropdownOption,{"data-testid":"field-mapper-key-dropdown-item",key:e.key,label:e.label,value:e.key})})))))),(e.errorText||e.helperText)&&s.default.createElement("div",{className:"addon-text-container"},e.helperText&&s.default.createElement(n.HelperText,{className:"helper-text",id:h},e.helperText),e.errorText&&s.default.createElement(n.ErrorText,{className:"error-text",id:v},e.errorText)))}));x(".field-mapper-value {\n  border-left: 1px solid #E5E5E5;\n  padding-top: 8px;\n  padding-right: 12px;\n  padding-bottom: 8px;\n  padding-left: 12px;\n}");var Ae=s.default.forwardRef((function(e,t){var r,i,o,a,l=null!==(r=e.id)&&void 0!==r?r:ee(),u=e.helperText?"".concat(l,"-helper-text"):void 0,d=e.errorText?"".concat(l,"-error-text"):void 0,c=[u,d].filter((function(e){return void 0!==e})).join(" ");return s.default.createElement("div",{"data-testid":"field-mapper-value",className:"field-mapper-value"+(e.className?" "+e.className:""),ref:t,id:l,"aria-describedby":c||void 0},s.default.createElement(n.Tooltip,{disabled:!e.tooltip,content:null!==(i=e.tooltip)&&void 0!==i?i:null},s.default.Children.count(e.children)>0?e.children:s.default.createElement(Se,V({items:null!==(o=e.pipedTextItems)&&void 0!==o?o:[],onChange:null!==(a=e.onChange)&&void 0!==a?a:function(){},value:e.inputValue},e.inputProps))),(e.errorText||e.helperText)&&s.default.createElement("div",{className:"addon-text-container"},e.helperText&&s.default.createElement(n.HelperText,{className:"helper-text",id:u},e.helperText),e.errorText&&s.default.createElement(n.ErrorText,{className:"error-text",id:d},e.errorText)))})),Re=s.default.forwardRef((function(e,t){var i=function(){var t;if("boolean"==typeof e.showRemove)return e.showRemove;return!(null===(t=e.selectedField)||void 0===t?void 0:t.required)}();return s.default.createElement("div",{"data-testid":"field-mapper-row",className:"field-mapper-row"+(e.className?" "+e.className:""),ref:t},s.default.createElement("div",{className:"field-mapper-row-content"},s.default.Children.map(e.children,(function(t){return function(t){var n,r,i,o,a,l,u,d,c,p,f,m;switch(l={},u={},t.type){case qe:d=!Array.isArray(t.props.availableFields)&&(null===(n=e.availableFields)||void 0===n?void 0:n.length)>0,c="object"!=typeof t.props.selectedField&&void 0!==e.selectedField,p="function"!=typeof t.props.onChange&&"function"==typeof e.onFieldKeyChange,d&&(l.availableFields=null!==(i=null===(r=e.availableFields)||void 0===r?void 0:r.slice())&&void 0!==i?i:[]),c&&(l.selectedField=Object.assign({},e.selectedField)),p&&(l.onChange=function(t,n){e.onFieldKeyChange(t,n)}),s.default.isValidElement(t)&&(d||c||p)&&(t=s.default.cloneElement(t,l)),a=t;break;case Ae:f=!Array.isArray(t.props.pipedTextItems)&&(null===(o=e.pipedTextItems)||void 0===o?void 0:o.length)>0,m="function"!=typeof t.props.onChange&&"function"==typeof e.onFieldValueChange,f&&(u.pipedTextItems=e.pipedTextItems),m&&(u.onChange=function(t){e.onFieldValueChange(e.selectedField,t)}),s.default.isValidElement(t)&&(f||m)&&(t=s.default.cloneElement(t,u)),a=t;break;default:a=t}return a}(t)})),s.default.createElement("div",{className:"remove-row-container"+(!1===i?" hide-remove-button":"")},!1===i?s.default.createElement("div",{className:"empty-remove-button"}):s.default.createElement(n.IconButton,{"data-testid":"remove-field-mapper-row-button","aria-label":"Remove",onClick:function(t){var n;null===(n=e.onFieldRemove)||void 0===n||n.call(e,e.selectedField)}},s.default.createElement(r.RemoveItemIcon,null)))))})),Le=s.default.forwardRef((function(t,i){var o,a,l,u,d,c,p,f=e.useState(""),m=f[0],h=f[1];return s.default.createElement("div",{"data-testid":"field-mapper",className:"field-mapper "+(null!==(o=t.className)&&void 0!==o?o:""),ref:i},(Oe(t.fieldKeysHeaderText)||Oe(t.fieldValuesHeaderText))&&s.default.createElement("div",{className:"field-mapper-row-container field-mapper-header-row"},s.default.createElement(Re,{showRemove:!1},s.default.createElement(qe,null,s.default.createElement("div",{className:"field-mapper-header-cell field-mapper-key-header"},null!==(a=t.fieldKeysHeaderText)&&void 0!==a?a:"")),s.default.createElement(Ae,null,s.default.createElement("div",{className:"field-mapper-header-cell field-mapper-value-header"},null!==(l=t.fieldValuesHeaderText)&&void 0!==l?l:"")))),s.default.createElement("div",{className:"field-mapper-row-container"},s.default.Children.map(t.children,(function(e){return function(e){var n,r,i,o,a,l,u,d,c,p,f;if(a={},e.type!==Re)return o=e;o=e;l=!Array.isArray(o.props.availableFields)&&(null===(n=t.availableFields)||void 0===n?void 0:n.length)>0,u="function"!=typeof o.props.onFieldRemove&&"function"==typeof t.onFieldRemove,d=!Array.isArray(o.props.pipedTextItems)&&(null===(r=t.pipedTextItems)||void 0===r?void 0:r.length)>0,c="function"!=typeof o.props.onFieldKeyChange&&"function"==typeof t.onFieldKeyChange,p="function"!=typeof o.props.onFieldValueChange&&"function"==typeof t.onFieldValueChange,f="boolean"!=typeof o.props.showRemove&&"boolean"==typeof(null===(i=e.props.selectedField)||void 0===i?void 0:i.required),l&&(a.availableFields=t.availableFields.slice());u&&(a.onFieldRemove=function(e){return t.onFieldRemove(e)});d&&(a.pipedTextItems=t.pipedTextItems);c&&(a.onFieldKeyChange=function(e,n){return t.onFieldKeyChange(e,n)});p&&(a.onFieldValueChange=function(e,n){return t.onFieldValueChange(e,n)});f&&(a.showRemove=!e.props.selectedField.required);return o=s.default.cloneElement(o,a)}(e)}))),s.default.createElement("div",{className:"add-field-button-container"},Array.isArray(t.availableFields)&&t.availableFields.length>0?s.default.createElement(n.Dropdown,V({},null!==(d=t.addFieldMenuProps)&&void 0!==d?d:{},{value:m}),s.default.createElement(n.DropdownButton,null,s.default.createElement(n.Button,{"data-testid":"add-field-item-button",className:"add-field-button",kind:"secondary"},s.default.createElement("div",{className:"add-field-icon"},s.default.createElement(r.AddIcon,null)),s.default.createElement("div",{className:"add-field-button-label"},null!==(c=t.addFieldLabel)&&void 0!==c?c:"{{MISSING_I18N_STRING}}"))),s.default.createElement(n.DropdownList,null,null===(p=t.availableFields)||void 0===p?void 0:p.map((function(e){return s.default.createElement(n.DropdownOption,{"data-testid":"add-field-menu-item",key:e.key,value:e.key,label:e.label,onSelect:function(n){var r,i;h(""),r=e.key,(i=t.availableFields.find((function(e){return e.key===r})))&&t.onFieldAdd(i)}})})))):s.default.createElement(n.Button,{disabled:!0,kind:"secondary",className:"add-field-button"},s.default.createElement("div",{className:"add-field-icon"},s.default.createElement(r.AddIcon,null)),s.default.createElement("div",{className:"add-field-button-label"},null!==(u=t.addFieldLabel)&&void 0!==u?u:"{{MISSING_I18N_STRING}}"))))}));exports.CaptureEvent=function(e){return s.default.createElement("div",{className:"capture-event"},s.default.createElement("div",{className:"capture-event-controls"},"pending"===e.status?s.default.createElement("div",{className:"capture-event-button-container"},s.default.createElement(n.Button,{kind:"secondary",onClick:function(){return e.onCancel()}},e.cancelCaptureTranslation)):s.default.createElement("div",{className:"capture-event-button-container"},s.default.createElement(n.Button,{kind:"primary",onClick:function(){return e.onStart()}},e.startCaptureTranslation)),(t={default:["",void 0],pending:[e.pendingStatusTranslation,s.default.createElement(n.LoadingSpinner,{size:"small",show:!0})],success:[e.successStatusTranslation,s.default.createElement(r.SuccessIcon,{size:"small"})],failure:[e.failureStatusTranslation,s.default.createElement(r.ErrorIcon,{size:"small"})]}[e.status],i=t[0],o=t[1],s.default.createElement("div",{className:"status-message ".concat(e.status)},o,i))),void 0!==e.payload&&s.default.createElement(n.FormField,{isReadOnly:!0},s.default.createElement(n.InputField,{"aria-readonly":!0,label:e.payloadLabelTranslation,multiline:!0,readOnly:!0,full:!0,value:e.payload,className:"polled-response-output"})));var t,i,o},exports.CopyText=function(t){var i=e.useState(!1),o=i[0],a=i[1];return s.default.createElement("div",{className:"copy-text"},s.default.createElement("div",{className:"input-container"},s.default.createElement(n.Input,{className:"input-textbox",defaultValue:t.text,"aria-readonly":!0,readOnly:!0})),s.default.createElement("div",{className:"copy-button-container"},s.default.createElement(n.Button,{kind:"secondary",disabled:o,onClick:function(){try{navigator.clipboard.writeText(t.text),a(!0),setTimeout((function(){return a(!1)}),1500)}catch(e){console.error("Failed to copy text"),console.error(e)}}},o?s.default.createElement("div",{className:"selected-button"},s.default.createElement("div",{className:"selected-button-icon"},s.default.createElement(r.CheckIcon,null)),s.default.createElement("div",{className:"selected-button-text"},t.copySelectedTranslation)):s.default.createElement("div",{className:"default-button"},t.copyTranslation))))},exports.DynamicSearchInput=function(t){var r=O(e.useState(!1),2),i=r[0],o=r[1],a=O(e.useState([]),2),l=a[0],u=a[1],d=O(e.useState(""),2),c=d[0],f=d[1];e.useEffect((function(){if(t.search&&"function"!=typeof t.search)throw new Error("DynamicSearchInput: Expected function for search property");if(t.onChange&&"function"!=typeof t.onChange)throw new Error("DynamicSearchInput: Expected onChange to be a function. Received type ".concat(w(t.onChange)));if(!t.search&&void 0===t.items)throw new Error("DynamicSearchInput: Expected one of either items or search function but found neither");if(t.search&&void 0!==t.items)throw new Error("DynamicSearchInput: Expected one of either items or search function but found both");if(void 0!==t.items){if(!Array.isArray(t.items))throw new Error("DynamicSearchInput: expected items property to be an Array");t.items.forEach((function(e){if(void 0===e.props.label)throw new Error('DynamicSearchInput: expected items in items property to have "label" property')}))}}),[]);var m,h,v=function(e,n){"function"==typeof t.onChange&&t.onChange(e,n)},x=(m=k(y().mark((function e(n){var r;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==(n=((n||"")+"").trim().toLowerCase())){e.next=3;break}return e.abrupt("return",[]);case 3:return r=t.items.filter((function(e){return e.props.label.toLowerCase().includes(n)})),e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)}))),function(e){return m.apply(this,arguments)}),b=(h=k(y().mark((function e(n){var r,i,a,l,d;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.persist(),r=p.default(n,"target.value",""),i=t.search?t.search:x,e.next=5,i(r);case 5:if(a=e.sent,Array.isArray(a)){e.next=9;break}throw l=(void 0===a?"undefined":null===a&&"null")||a.constructor&&a.constructor.name||a,new Error("DynamicSearchInput: expected result from search function to be Array, but was ".concat(l));case 9:d=a.map((function(e){if(void 0===p.default(e,"props.label"))throw new Error("DynamicSearchInput: expected search result array values to have label property but found none");return s.default.createElement(je,{key:e.props.id,onClick:function(){var t;t=e.props.label,f(t),v(t),o(!1)}},e)})),f(r),d.length>0?o(!0):o(!1),u(d),v(r,n);case 14:case"end":return e.stop()}}),e)}))),function(e){return h.apply(this,arguments)});return s.default.createElement("div",{className:"dynamic-search-input"},s.default.createElement(X,{show:i,onClose:function(){o(!1)},anchor:s.default.createElement(n.Input,{className:"search-input",full:!0,small:!0,placeholder:t.placeholder,value:c,onChange:b})},l))},exports.FieldItem=Fe,exports.FieldMapper=Le,exports.FieldMapperKey=qe,exports.FieldMapperRow=Re,exports.FieldMapperValue=Ae,exports.MultiselectDropdown=function(t){var r=O(e.useState(!1),2),i=r[0],o=r[1],a=t.label||"",l=function(e,n){"function"==typeof t.onChange&&t.onChange(e,n)},u=t.children||[];if(!Array.isArray(u)){var d=[];d.push(u),u=d}return s.default.createElement("div",{className:"multiselect-dropdown"},s.default.createElement(X,{show:i,onClose:function(){o(!1)},ignoreClickSelector:".multiselect-dropdown-toggle",anchor:s.default.createElement("div",{className:"multiselect-dropdown-toggle"},s.default.createElement(n.Button,{onClick:function(){o(!i)}},a))},u.map((function(e){return s.default.createElement(Me,{onChange:l,checked:e.props.checked,value:e.props.value,key:e.props.value},e.props.children)}))))},exports.PipedTextInput=Se,exports.PipedTextSelect=Ce,exports.PluginSdkService=G,exports.PluginUIProvider=function(t){var r=t.portalTarget,i=t.config,o=t.children,a=e.useMemo((function(){var e;return void 0===(null==i?void 0:i.localizedText)&&console.warn("Missing localizedText in config object prop"),{localizedText:null!==(e=null==i?void 0:i.localizedText)&&void 0!==e?e:{}}}),[null==i?void 0:i.localizedText]);return s.default.createElement(ve.Provider,{value:a},s.default.createElement(n.UIProvider,{config:i,portalTarget:r},o))},exports.Popover=X,exports.SelectItem=Me,exports.TaskFields=function(t){var n=O(e.useState([]),2),r=n[0],i=n[1],o=O(e.useState([]),2),a=o[0],l=o[1],u=O(e.useState(),2),d=u[0],c=u[1],f=function(e,n){"function"==typeof t.onFieldSwitch&&t.onFieldSwitch(e,n)},m=function(e,n,r){"function"==typeof t.onFieldInputChange&&t.onFieldInputChange(e,n,r)},h=function(e,n){var r=p.default(t,"customFieldOptions.onCustomFieldNameChange");"function"==typeof r&&r(e,n)},x=function(e,t,n){var r=e.slice();return t.forEach((function(e){void 0!==e.subMenu&&n===e.id&&(-1===r.findIndex((function(t){return t.id===e.id}))&&r.push(e))})),r},b=function(e){"function"==typeof t.onFieldRemove&&t.onFieldRemove(e)},g=function(e){var n,r,i=[];if(void 0!==e)return Array.isArray(t.children)?n=t.children:(n=[]).push(t.children),r=[],n.forEach((function(e){e.props.required&&r.push({required:e.props.required,name:e.props.name,id:e.props.id,children:e.props.children,nameTooltip:e.props.nameTooltip,valueTooltip:e.props.valueTooltip,value:e.props.value||void 0,valuePlaceholder:e.props.valuePlaceholder,subMenu:e.props.subMenu,subMenuLabel:e.props.subMenuLabel})})),i=function(n){var r=n.slice();return(t.values||[]).forEach((function(n){var i=e.find((function(e){return e.id===n.id}));if(void 0!==i)!function(e,t,n){var r=e.find((function(e){return e.id===t.id}));if(void 0!==r)r.value=t.value;else{var i=v.default(n,(function(e){if(s.default.isValidElement(e))return s.default.cloneElement(e)}));i.value=t.value,e.push(i)}}(r,n,i);else if(t.customFieldOptions){var o={required:!1,name:n.name,id:n.id,value:n.value,nameTooltip:p.default(t,"customFieldOptions.nameTooltip",""),valueTooltip:p.default(t,"customFieldOptions.valueTooltip",""),namePlaceholder:p.default(t,"customFieldOptions.namePlaceholder",""),type:"custom",subMenu:n.subMenu,subMenuLabel:n.subMenuLabel};r.push(o)}})),r}(i=r),i=function(e,n){var r=e.slice(),i=t.values||[];return r=r.map((function(e){var t,r;return t=i.find((function(t){return t.id===e.id})),void 0===n.find((function(e){return e.props.id===t.id}))||e.required||(r=n.find((function(e){return e.props.id===t.id})),e=Object.assign({},e,{name:r.props.name,id:r.props.id,children:r.props.children,nameTooltip:r.props.nameTooltip,valueTooltip:r.props.valueTooltip,valuePlaceholder:r.props.valuePlaceholder,subMenu:r.props.subMenu,subMenuLabel:r.props.subMenuLabel})),e}))}(i,n),i},y=function(){var e=t.children.map((function(e){var t=e.props;return{required:t.required,name:t.name,id:t.id,children:t.children,nameTooltip:t.nameTooltip,valueTooltip:t.valueTooltip,valuePlaceholder:t.valuePlaceholder,subMenu:t.subMenu,subMenuLabel:t.subMenuLabel}})),n=g(e),r=e.filter((function(e){return-1===n.findIndex((function(t){return e.id===t.id}))}));c(e),i(n),l(r)};return e.useEffect((function(){y()}),[]),e.useEffect((function(){y()}),[t.values]),s.default.createElement("div",{className:"task-fields"},s.default.createElement("div",{className:"field-table",tabIndex:"0"},s.default.createElement("div",{className:"field-headers"},s.default.createElement(Pe,{itemHeaderText:t.fieldItemsHeaderText,inputHeaderText:t.fieldInputsHeaderText})),s.default.createElement("div",{className:"field-rows"},r.map((function(e){return s.default.createElement(Ne,{customInput:e.children,required:e.required,fieldName:e.name,id:e.id,subMenu:e.subMenu,subMenuLabel:e.subMenuLabel,nameTooltip:"custom"===e.type?p.default(t,"customFieldOptions.nameTooltip",""):e.nameTooltip,valueTooltip:"custom"===e.type?p.default(t,"customFieldOptions.valueTooltip",""):e.valueTooltip,onFieldNameChange:h,onFieldValueChange:m,onFieldSwitch:f,onRemove:b,isCustom:"custom"===e.type,key:e.id,value:e.value,valuePlaceholder:"custom"===e.type?p.default(t,"customFieldOptions.valuePlaceholder",""):e.valuePlaceholder,customNamePlaceholder:p.default(t,"customFieldOptions.namePlaceholder",""),pipedTextItems:t.pipedTextItems,searchable:t.searchable},d&&x(a,d,e.id))})))),s.default.createElement("div",{className:"add-field-container"},s.default.createElement(Te,{label:t.addFieldLabel,onFieldAdded:function(e){"function"==typeof t.onFieldAdd&&t.onFieldAdd(e)},disableAddFieldPopover:t.disableAddFieldPopover,allowCustom:t.customFieldOptions,customLabel:p.default(t,"customFieldOptions.label",""),onCustomFieldAdded:t.customFieldOptions?function(){p.default(t,"customFieldOptions.onCustomFieldAdd",(function(){}))()}:function(){}},a.map((function(e){return s.default.createElement(Fe,{name:e.name,type:e.type,required:e.required,key:e.id,id:e.id,subMenu:e.subMenu,subMenuLabel:e.subMenuLabel})})))))},exports.languageCodeAdapter=function(e){var t;if(void 0===(t=U[e]))throw new Error("No language code mapping found for supplied code: '".concat(e,"'"));return t};
