!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);n.n(r);(0,wp.hooks.addFilter)("jet.fb.preset.editor.custom.condition","jet-form-builder",function(e,t,n){return"relation_query_var"===t?"connect_relation_items"===n.from&&["query_var","object_var"].includes(n.rel_object_from):e})},function(e,t){function n(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function r(e){var t=e.settings,r=e.label,i=(e.help,e.source),a=e.onChangeSettingObj,f=e.requestFields,d=c([]),p=o(d,2),m=p[0],h=p[1];return u(function(){h([].concat(n(v([],"--")),n(f)))},[]),wp.element.createElement(s,null,wp.element.createElement(l,{label:r("relation"),labelPosition:"side",value:t.relation,onChange:function(e){return a({relation:e})},options:w(i.relations)}),wp.element.createElement(l,{label:r("parent_id"),labelPosition:"side",value:t.parent_id,onChange:function(e){return a({parent_id:e})},options:m}),wp.element.createElement(l,{label:r("child_id"),labelPosition:"side",value:t.child_id,onChange:function(e){return a({child_id:e})},options:m}),wp.element.createElement(l,{label:r("context"),labelPosition:"side",value:t.context,onChange:function(e){return a({context:e})},options:w(i.context_options)}))}var o=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=wp.components,l=(i.TextControl,i.SelectControl),a=wp.element,c=a.useState,u=a.useEffect,s=a.Fragment,f=JetFBHooks,d=f.withRequestFields,p=(f.withLoadingSelect,wp.data),m=p.withSelect,h=(p.withDispatch,wp.compose.compose),b=JetFBActions,_=b.addAction,v=b.getFormFieldsBlocks,w=b.Tools.withPlaceholder;_("connect_relation_items",h(m(d))(r))}]);