You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@react-querybuilder/dnd

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-querybuilder/dnd - npm Package Compare versions

Comparing version

to
5.0.0-alpha.6

dist/types/src/genericTests/GenericDropTarget.d.ts

18

dist/index.cjs.js

@@ -1,2 +0,2 @@

"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const W=require("@react-querybuilder/ctx"),T=require("react"),u=require("react-querybuilder"),br=t=>t&&typeof t=="object"&&"default"in t?t:{default:t};function $e(t){if(t&&t.__esModule)return t;const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const v in t)if(v!=="default"){const c=Object.getOwnPropertyDescriptor(t,v);Object.defineProperty(a,v,c.get?c:{enumerable:!0,get:()=>t[v]})}}return a.default=t,Object.freeze(a)}const Be=br(T),Dr="5.0.0-alpha.5",yr=({path:t,independentCombinators:a,moveRule:v,useDrop:c})=>{const R=T.useRef(null),[{isOver:y,dropMonitorId:p},b]=c(()=>({accept:[u.DNDType.rule,u.DNDType.ruleGroup],canDrop:i=>{const h=u.getParentPath(t),s=u.getParentPath(i.path),m=t[t.length-1],E=i.path[i.path.length-1];return!(u.isAncestor(i.path,t)||u.pathsAreEqual(i.path,t)||u.pathsAreEqual(h,s)&&m-1===E||a&&u.pathsAreEqual(h,s)&&m===E-1)},collect:i=>({isOver:i.canDrop()&&i.isOver(),dropMonitorId:i.getHandlerId()}),drop:(i,h)=>{const s=u.getParentPath(t),m=t[t.length-1];v(i.path,[...s,m])}}),[v,t,a]);return b(R),{dropRef:R,dropMonitorId:p,isOver:y}},We=t=>{const[a,v]=T.useState(t!=null?t:null);return T.useEffect(()=>{let c=!1;return a||(async()=>{const[y,p]=await Promise.all([Promise.resolve().then(()=>$e(require("react-dnd"))).catch(()=>null),Promise.resolve().then(()=>$e(require("react-dnd-html5-backend"))).catch(()=>null)]);c||y&&p&&v(()=>({...y,...p}))})(),()=>{c=!0}},[]),a},Rr=({path:t,disabled:a,independentCombinators:v,moveRule:c,useDrag:R,useDrop:y})=>{const p=T.useRef(null),b=T.useRef(null),[{isDragging:i,dragMonitorId:h},s,m]=R(()=>({type:u.DNDType.rule,item:()=>({path:t}),canDrag:!a,collect:d=>{var _;return{isDragging:!a&&d.isDragging(),dragMonitorId:(_=d.getHandlerId())!=null?_:""}}}),[a,t]),[{isOver:E,dropMonitorId:w},k]=y(()=>({accept:[u.DNDType.rule,u.DNDType.ruleGroup],canDrop:d=>{if(a)return!1;const _=u.getParentPath(t),x=u.getParentPath(d.path),C=t[t.length-1],M=d.path[d.path.length-1];return!(u.isAncestor(d.path,t)||u.pathsAreEqual(_,x)&&(C===M||C===M-1||v&&C===M-2))},collect:d=>{var _;return{isOver:d.canDrop()&&d.isOver(),dropMonitorId:(_=d.getHandlerId())!=null?_:""}},drop:(d,_)=>{const x=u.getParentPath(t),C=t[t.length-1];c(d.path,[...x,C+1])}}),[a,v,c,t]);return s(b),m(k(p)),{isDragging:i,dragMonitorId:h,isOver:E,dropMonitorId:w,dndRef:p,dragRef:b}},Er=({disabled:t,path:a,moveRule:v,useDrag:c,useDrop:R})=>{const y=T.useRef(null),p=T.useRef(null),b=T.useRef(null),[{isDragging:i,dragMonitorId:h},s,m]=c(()=>({type:u.DNDType.ruleGroup,item:()=>({path:a}),canDrag:!t,collect:d=>{var _;return{isDragging:!t&&d.isDragging(),dragMonitorId:(_=d.getHandlerId())!=null?_:""}}}),[t,a]),[{isOver:E,dropMonitorId:w},k]=R(()=>({accept:[u.DNDType.rule,u.DNDType.ruleGroup],canDrop:d=>{if(t)return!1;const _=u.getParentPath(d.path),x=d.path[d.path.length-1];return!(u.isAncestor(d.path,a)||u.pathsAreEqual(a,_)&&x===0||u.pathsAreEqual(a,d.path))},collect:d=>{var _;return{isOver:d.canDrop()&&d.isOver(),dropMonitorId:(_=d.getHandlerId())!=null?_:""}},drop:(d,_)=>!t&&v(d.path,[...a,0])}),[t,v,a]);return a.length>0&&(s(p),m(y)),k(b),{isDragging:i,dragMonitorId:h,isOver:E,dropMonitorId:w,previewRef:y,dragRef:p,dropRef:b}},{rule:Cr,ruleGroup:_r,combinatorSelector:Pr}=u.defaultControlElements,F=T.createContext({baseControls:{rule:Cr,ruleGroup:_r,combinatorSelector:Pr}});F.displayName="QueryBuilderDndContext";var Ge={exports:{}},L={};/**
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const O=require("react"),m=require("react-querybuilder"),U=require("@react-querybuilder/ctx"),yr=t=>t&&typeof t=="object"&&"default"in t?t:{default:t};function Fe(t){if(t&&t.__esModule)return t;const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const d in t)if(d!=="default"){const l=Object.getOwnPropertyDescriptor(t,d);Object.defineProperty(a,d,l.get?l:{enumerable:!0,get:()=>t[d]})}}return a.default=t,Object.freeze(a)}const We=yr(O),Dr="5.0.0-alpha.6",Rr=({path:t,independentCombinators:a,useDrop:d})=>{const l=O.useRef(null),[{isOver:R,dropMonitorId:b},f]=d(()=>({accept:["rule","ruleGroup"],canDrop:s=>{const i=m.getParentPath(t),g=m.getParentPath(s.path),u=t[t.length-1],E=s.path[s.path.length-1];return!(m.isAncestor(s.path,t)||m.pathsAreEqual(s.path,t)||m.pathsAreEqual(i,g)&&u-1===E||a&&m.pathsAreEqual(i,g)&&u===E-1)},collect:s=>{var i,g;return{isOver:s.canDrop()&&s.isOver(),dropMonitorId:(i=s.getHandlerId())!=null?i:"",dropEffect:((g=s.getDropResult())!=null?g:{}).dropEffect}},drop:()=>({type:"inlineCombinator",path:t})}),[t,a]);return f(l),{dropRef:l,dropMonitorId:b,isOver:R}},Be=t=>{const[a,d]=O.useState(t!=null?t:null);return O.useEffect(()=>{let l=!1;return a||(async()=>{const[b,f]=await Promise.all([Promise.resolve().then(()=>Fe(require("react-dnd"))).catch(()=>null),Promise.resolve().then(()=>Fe(require("react-dnd-html5-backend"))).catch(()=>null)]);l||b&&f&&d(()=>({...b,...f}))})(),()=>{l=!0}},[]),a},Ge=({type:t,path:a,disabled:d,moveRule:l,useDrag:R})=>R(()=>({type:t,item:{path:a},canDrag:!d,collect:b=>{var f;return{isDragging:!d&&b.isDragging(),dragMonitorId:(f=b.getHandlerId())!=null?f:""}},end(b,f){const s=f.getDropResult();if(!s)return;const i=m.getParentPath(s.path),g=s.path[s.path.length-1],u=s.type==="ruleGroup"?[...s.path,0]:s.type==="inlineCombinator"?[...i,g]:[...i,g+1];l(b.path,u,s.dropEffect==="copy")}}),[d,a]),Er=({path:t,disabled:a,independentCombinators:d,moveRule:l,useDrag:R,useDrop:b})=>{const f=O.useRef(null),s=O.useRef(null),[{isDragging:i,dragMonitorId:g},u,E]=Ge({type:"rule",path:t,disabled:a,independentCombinators:d,moveRule:l,useDrag:R}),[{isOver:C,dropMonitorId:I,dropEffect:k},$]=b(()=>({accept:["rule","ruleGroup"],canDrop:x=>{if(a)return!1;const D=m.getParentPath(t),h=m.getParentPath(x.path),T=t[t.length-1],F=x.path[x.path.length-1];return!(m.isAncestor(x.path,t)||m.pathsAreEqual(D,h)&&(T===F||T===F-1||d&&T===F-2))},collect:x=>{var D,h;return{isOver:x.canDrop()&&x.isOver(),dropMonitorId:(D=x.getHandlerId())!=null?D:"",dropEffect:((h=x.getDropResult())!=null?h:{}).dropEffect}},drop:()=>({type:"rule",path:t})}),[a,d,l,t]);return u(s),E($(f)),{isDragging:i,dragMonitorId:g,isOver:C,dropMonitorId:I,dndRef:f,dragRef:s,dropEffect:k}},_r=({disabled:t,path:a,independentCombinators:d,moveRule:l,useDrag:R,useDrop:b})=>{const f=O.useRef(null),s=O.useRef(null),i=O.useRef(null),[{isDragging:g,dragMonitorId:u},E,C]=Ge({type:"ruleGroup",path:a,disabled:t,independentCombinators:d,moveRule:l,useDrag:R}),[{isOver:I,dropMonitorId:k,dropEffect:$},x]=b(()=>({accept:["rule","ruleGroup"],canDrop:D=>{if(t)return!1;const h=m.getParentPath(D.path),T=D.path[D.path.length-1];return!(m.isAncestor(D.path,a)||m.pathsAreEqual(a,h)&&T===0||m.pathsAreEqual(a,D.path))},collect:D=>{var h,T;return{isOver:D.canDrop()&&D.isOver(),dropMonitorId:(h=D.getHandlerId())!=null?h:"",dropEffect:((T=D.getDropResult())!=null?T:{}).dropEffect}},drop:(D,h)=>{var T;return(T=h.getDropResult())!=null?T:{type:"ruleGroup",path:a}}}),[t,l,a]);return a.length>0&&(E(s),C(f)),x(i),{isDragging:g,dragMonitorId:u,isOver:I,dropMonitorId:k,previewRef:f,dragRef:s,dropRef:i,dropEffect:$}},{rule:Cr,ruleGroup:Pr,combinatorSelector:Or}=m.defaultControlElements,q=O.createContext({baseControls:{rule:Cr,ruleGroup:Pr,combinatorSelector:Or}});q.displayName="QueryBuilderDndContext";var Ye={exports:{}},L={};/**
* @license React

@@ -9,3 +9,3 @@ * react-jsx-runtime.production.min.js

* LICENSE file in the root directory of this source tree.
*/var Fe;function Or(){if(Fe)return L;Fe=1;var t=Be.default,a=Symbol.for("react.element"),v=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,R=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,y={key:!0,ref:!0,__self:!0,__source:!0};function p(b,i,h){var s,m={},E=null,w=null;h!==void 0&&(E=""+h),i.key!==void 0&&(E=""+i.key),i.ref!==void 0&&(w=i.ref);for(s in i)c.call(i,s)&&!y.hasOwnProperty(s)&&(m[s]=i[s]);if(b&&b.defaultProps)for(s in i=b.defaultProps,i)m[s]===void 0&&(m[s]=i[s]);return{$$typeof:a,type:b,key:E,ref:w,props:m,_owner:R.current}}return L.Fragment=v,L.jsx=p,L.jsxs=p,L}var V={};/**
*/var Ne;function xr(){if(Ne)return L;Ne=1;var t=We.default,a=Symbol.for("react.element"),d=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,R=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,b={key:!0,ref:!0,__self:!0,__source:!0};function f(s,i,g){var u,E={},C=null,I=null;g!==void 0&&(C=""+g),i.key!==void 0&&(C=""+i.key),i.ref!==void 0&&(I=i.ref);for(u in i)l.call(i,u)&&!b.hasOwnProperty(u)&&(E[u]=i[u]);if(s&&s.defaultProps)for(u in i=s.defaultProps,i)E[u]===void 0&&(E[u]=i[u]);return{$$typeof:a,type:s,key:C,ref:I,props:E,_owner:R.current}}return L.Fragment=d,L.jsx=f,L.jsxs=f,L}var V={};/**
* @license React

@@ -18,13 +18,13 @@ * react-jsx-runtime.development.js

* LICENSE file in the root directory of this source tree.
*/var qe;function Tr(){return qe||(qe=1,process.env.NODE_ENV!=="production"&&function(){var t=Be.default,a=Symbol.for("react.element"),v=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),b=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),s=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),k=Symbol.iterator,d="@@iterator";function _(e){if(e===null||typeof e!="object")return null;var r=k&&e[k]||e[d];return typeof r=="function"?r:null}var x=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(e){{for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];M("error",e,n)}}function M(e,r,n){{var o=x.ReactDebugCurrentFrame,g=o.getStackAddendum();g!==""&&(r+="%s",n=n.concat([g]));var D=n.map(function(f){return String(f)});D.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,D)}}var Q=!1,U=!1,H=!1,J=!1,Le=!1,ve;ve=Symbol.for("react.module.reference");function Ve(e){return!!(typeof e=="string"||typeof e=="function"||e===c||e===y||Le||e===R||e===h||e===s||J||e===w||Q||U||H||typeof e=="object"&&e!==null&&(e.$$typeof===E||e.$$typeof===m||e.$$typeof===p||e.$$typeof===b||e.$$typeof===i||e.$$typeof===ve||e.getModuleId!==void 0))}function Qe(e,r,n){var o=e.displayName;if(o)return o;var g=r.displayName||r.name||"";return g!==""?n+"("+g+")":n}function ge(e){return e.displayName||"Context"}function A(e){if(e==null)return null;if(typeof e.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case c:return"Fragment";case v:return"Portal";case y:return"Profiler";case R:return"StrictMode";case h:return"Suspense";case s:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case b:var r=e;return ge(r)+".Consumer";case p:var n=e;return ge(n._context)+".Provider";case i:return Qe(e,e.render,"ForwardRef");case m:var o=e.displayName||null;return o!==null?o:A(e.type)||"Memo";case E:{var g=e,D=g._payload,f=g._init;try{return A(f(D))}catch{return null}}}return null}var $=Object.assign,G=0,pe,he,me,be,De,ye,Re;function Ee(){}Ee.__reactDisabledLog=!0;function Ue(){{if(G===0){pe=console.log,he=console.info,me=console.warn,be=console.error,De=console.group,ye=console.groupCollapsed,Re=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Ee,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}G++}}function He(){{if(G--,G===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},e,{value:pe}),info:$({},e,{value:he}),warn:$({},e,{value:me}),error:$({},e,{value:be}),group:$({},e,{value:De}),groupCollapsed:$({},e,{value:ye}),groupEnd:$({},e,{value:Re})})}G<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var re=x.ReactCurrentDispatcher,te;function z(e,r,n){{if(te===void 0)try{throw Error()}catch(g){var o=g.stack.trim().match(/\n( *(at )?)/);te=o&&o[1]||""}return`
`+te+e}}var ne=!1,K;{var Je=typeof WeakMap=="function"?WeakMap:Map;K=new Je}function Ce(e,r){if(!e||ne)return"";{var n=K.get(e);if(n!==void 0)return n}var o;ne=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var D;D=re.current,re.current=null,Ue();try{if(r){var f=function(){throw Error()};if(Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(N){o=N}Reflect.construct(e,[],f)}else{try{f.call()}catch(N){o=N}e.call(f.prototype)}}else{try{throw Error()}catch(N){o=N}e()}}catch(N){if(N&&o&&typeof N.stack=="string"){for(var l=N.stack.split(`
*/var qe;function Tr(){return qe||(qe=1,process.env.NODE_ENV!=="production"&&function(){var t=We.default,a=Symbol.for("react.element"),d=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),s=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),I=Symbol.for("react.offscreen"),k=Symbol.iterator,$="@@iterator";function x(e){if(e===null||typeof e!="object")return null;var r=k&&e[k]||e[$];return typeof r=="function"?r:null}var D=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(e){{for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];T("error",e,n)}}function T(e,r,n){{var o=D.ReactDebugCurrentFrame,p=o.getStackAddendum();p!==""&&(r+="%s",n=n.concat([p]));var y=n.map(function(v){return String(v)});y.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,y)}}var F=!1,Q=!1,H=!1,J=!1,Ve=!1,ve;ve=Symbol.for("react.module.reference");function Ue(e){return!!(typeof e=="string"||typeof e=="function"||e===l||e===b||Ve||e===R||e===g||e===u||J||e===I||F||Q||H||typeof e=="object"&&e!==null&&(e.$$typeof===C||e.$$typeof===E||e.$$typeof===f||e.$$typeof===s||e.$$typeof===i||e.$$typeof===ve||e.getModuleId!==void 0))}function Qe(e,r,n){var o=e.displayName;if(o)return o;var p=r.displayName||r.name||"";return p!==""?n+"("+p+")":n}function pe(e){return e.displayName||"Context"}function A(e){if(e==null)return null;if(typeof e.tag=="number"&&h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case l:return"Fragment";case d:return"Portal";case b:return"Profiler";case R:return"StrictMode";case g:return"Suspense";case u:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case s:var r=e;return pe(r)+".Consumer";case f:var n=e;return pe(n._context)+".Provider";case i:return Qe(e,e.render,"ForwardRef");case E:var o=e.displayName||null;return o!==null?o:A(e.type)||"Memo";case C:{var p=e,y=p._payload,v=p._init;try{return A(v(y))}catch{return null}}}return null}var N=Object.assign,G=0,ge,he,be,me,ye,De,Re;function Ee(){}Ee.__reactDisabledLog=!0;function He(){{if(G===0){ge=console.log,he=console.info,be=console.warn,me=console.error,ye=console.group,De=console.groupCollapsed,Re=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Ee,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}G++}}function Je(){{if(G--,G===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},e,{value:ge}),info:N({},e,{value:he}),warn:N({},e,{value:be}),error:N({},e,{value:me}),group:N({},e,{value:ye}),groupCollapsed:N({},e,{value:De}),groupEnd:N({},e,{value:Re})})}G<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var re=D.ReactCurrentDispatcher,te;function z(e,r,n){{if(te===void 0)try{throw Error()}catch(p){var o=p.stack.trim().match(/\n( *(at )?)/);te=o&&o[1]||""}return`
`+te+e}}var ne=!1,K;{var ze=typeof WeakMap=="function"?WeakMap:Map;K=new ze}function _e(e,r){if(!e||ne)return"";{var n=K.get(e);if(n!==void 0)return n}var o;ne=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var y;y=re.current,re.current=null,He();try{if(r){var v=function(){throw Error()};if(Object.defineProperty(v.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(v,[])}catch(M){o=M}Reflect.construct(e,[],v)}else{try{v.call()}catch(M){o=M}e.call(v.prototype)}}else{try{throw Error()}catch(M){o=M}e()}}catch(M){if(M&&o&&typeof M.stack=="string"){for(var c=M.stack.split(`
`),S=o.stack.split(`
`),P=l.length-1,O=S.length-1;P>=1&&O>=0&&l[P]!==S[O];)O--;for(;P>=1&&O>=0;P--,O--)if(l[P]!==S[O]){if(P!==1||O!==1)do if(P--,O--,O<0||l[P]!==S[O]){var j=`
`+l[P].replace(" at new "," at ");return e.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",e.displayName)),typeof e=="function"&&K.set(e,j),j}while(P>=1&&O>=0);break}}}finally{ne=!1,re.current=D,He(),Error.prepareStackTrace=g}var B=e?e.displayName||e.name:"",Me=B?z(B):"";return typeof e=="function"&&K.set(e,Me),Me}function ze(e,r,n){return Ce(e,!1)}function Ke(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function X(e,r,n){if(e==null)return"";if(typeof e=="function")return Ce(e,Ke(e));if(typeof e=="string")return z(e);switch(e){case h:return z("Suspense");case s:return z("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case i:return ze(e.render);case m:return X(e.type,r,n);case E:{var o=e,g=o._payload,D=o._init;try{return X(D(g),r,n)}catch{}}}return""}var Z=Object.prototype.hasOwnProperty,_e={},Pe=x.ReactDebugCurrentFrame;function ee(e){if(e){var r=e._owner,n=X(e.type,e._source,r?r.type:null);Pe.setExtraStackFrame(n)}else Pe.setExtraStackFrame(null)}function Xe(e,r,n,o,g){{var D=Function.call.bind(Z);for(var f in e)if(D(e,f)){var l=void 0;try{if(typeof e[f]!="function"){var S=Error((o||"React class")+": "+n+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw S.name="Invariant Violation",S}l=e[f](r,f,o,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(P){l=P}l&&!(l instanceof Error)&&(ee(g),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",o||"React class",n,f,typeof l),ee(null)),l instanceof Error&&!(l.message in _e)&&(_e[l.message]=!0,ee(g),C("Failed %s type: %s",n,l.message),ee(null))}}}var Ze=Array.isArray;function ae(e){return Ze(e)}function er(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,n=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function rr(e){try{return Oe(e),!1}catch{return!0}}function Oe(e){return""+e}function Te(e){if(rr(e))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",er(e)),Oe(e)}var Y=x.ReactCurrentOwner,tr={key:!0,ref:!0,__self:!0,__source:!0},xe,Se,oe;oe={};function nr(e){if(Z.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function ar(e){if(Z.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function or(e,r){if(typeof e.ref=="string"&&Y.current&&r&&Y.current.stateNode!==r){var n=A(Y.current.type);oe[n]||(C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',A(Y.current.type),e.ref),oe[n]=!0)}}function ir(e,r){{var n=function(){xe||(xe=!0,C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}}function sr(e,r){{var n=function(){Se||(Se=!0,C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}}var ur=function(e,r,n,o,g,D,f){var l={$$typeof:a,type:e,key:r,ref:n,props:f,_owner:D};return l._store={},Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:g}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function lr(e,r,n,o,g){{var D,f={},l=null,S=null;n!==void 0&&(Te(n),l=""+n),ar(r)&&(Te(r.key),l=""+r.key),nr(r)&&(S=r.ref,or(r,g));for(D in r)Z.call(r,D)&&!tr.hasOwnProperty(D)&&(f[D]=r[D]);if(e&&e.defaultProps){var P=e.defaultProps;for(D in P)f[D]===void 0&&(f[D]=P[D])}if(l||S){var O=typeof e=="function"?e.displayName||e.name||"Unknown":e;l&&ir(f,O),S&&sr(f,O)}return ur(e,l,S,g,o,Y.current,f)}}var ie=x.ReactCurrentOwner,we=x.ReactDebugCurrentFrame;function q(e){if(e){var r=e._owner,n=X(e.type,e._source,r?r.type:null);we.setExtraStackFrame(n)}else we.setExtraStackFrame(null)}var se;se=!1;function ue(e){return typeof e=="object"&&e!==null&&e.$$typeof===a}function Ie(){{if(ie.current){var e=A(ie.current.type);if(e)return`
`),_=c.length-1,P=S.length-1;_>=1&&P>=0&&c[_]!==S[P];)P--;for(;_>=1&&P>=0;_--,P--)if(c[_]!==S[P]){if(_!==1||P!==1)do if(_--,P--,P<0||c[_]!==S[P]){var j=`
`+c[_].replace(" at new "," at ");return e.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",e.displayName)),typeof e=="function"&&K.set(e,j),j}while(_>=1&&P>=0);break}}}finally{ne=!1,re.current=y,Je(),Error.prepareStackTrace=p}var B=e?e.displayName||e.name:"",$e=B?z(B):"";return typeof e=="function"&&K.set(e,$e),$e}function Ke(e,r,n){return _e(e,!1)}function Xe(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function X(e,r,n){if(e==null)return"";if(typeof e=="function")return _e(e,Xe(e));if(typeof e=="string")return z(e);switch(e){case g:return z("Suspense");case u:return z("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case i:return Ke(e.render);case E:return X(e.type,r,n);case C:{var o=e,p=o._payload,y=o._init;try{return X(y(p),r,n)}catch{}}}return""}var Z=Object.prototype.hasOwnProperty,Ce={},Pe=D.ReactDebugCurrentFrame;function ee(e){if(e){var r=e._owner,n=X(e.type,e._source,r?r.type:null);Pe.setExtraStackFrame(n)}else Pe.setExtraStackFrame(null)}function Ze(e,r,n,o,p){{var y=Function.call.bind(Z);for(var v in e)if(y(e,v)){var c=void 0;try{if(typeof e[v]!="function"){var S=Error((o||"React class")+": "+n+" type `"+v+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[v]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw S.name="Invariant Violation",S}c=e[v](r,v,o,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(_){c=_}c&&!(c instanceof Error)&&(ee(p),h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",o||"React class",n,v,typeof c),ee(null)),c instanceof Error&&!(c.message in Ce)&&(Ce[c.message]=!0,ee(p),h("Failed %s type: %s",n,c.message),ee(null))}}}var er=Array.isArray;function ae(e){return er(e)}function rr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,n=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function tr(e){try{return Oe(e),!1}catch{return!0}}function Oe(e){return""+e}function xe(e){if(tr(e))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",rr(e)),Oe(e)}var Y=D.ReactCurrentOwner,nr={key:!0,ref:!0,__self:!0,__source:!0},Te,Se,oe;oe={};function ar(e){if(Z.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function or(e){if(Z.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function sr(e,r){if(typeof e.ref=="string"&&Y.current&&r&&Y.current.stateNode!==r){var n=A(Y.current.type);oe[n]||(h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',A(Y.current.type),e.ref),oe[n]=!0)}}function ir(e,r){{var n=function(){Te||(Te=!0,h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}}function ur(e,r){{var n=function(){Se||(Se=!0,h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}}var lr=function(e,r,n,o,p,y,v){var c={$$typeof:a,type:e,key:r,ref:n,props:v,_owner:y};return c._store={},Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(c,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(c,"_source",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c};function cr(e,r,n,o,p){{var y,v={},c=null,S=null;n!==void 0&&(xe(n),c=""+n),or(r)&&(xe(r.key),c=""+r.key),ar(r)&&(S=r.ref,sr(r,p));for(y in r)Z.call(r,y)&&!nr.hasOwnProperty(y)&&(v[y]=r[y]);if(e&&e.defaultProps){var _=e.defaultProps;for(y in _)v[y]===void 0&&(v[y]=_[y])}if(c||S){var P=typeof e=="function"?e.displayName||e.name||"Unknown":e;c&&ir(v,P),S&&ur(v,P)}return lr(e,c,S,p,o,Y.current,v)}}var se=D.ReactCurrentOwner,we=D.ReactDebugCurrentFrame;function W(e){if(e){var r=e._owner,n=X(e.type,e._source,r?r.type:null);we.setExtraStackFrame(n)}else we.setExtraStackFrame(null)}var ie;ie=!1;function ue(e){return typeof e=="object"&&e!==null&&e.$$typeof===a}function je(){{if(se.current){var e=A(se.current.type);if(e)return`
Check the render method of \``+e+"`."}return""}}function cr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),n=e.lineNumber;return`
Check the render method of \``+e+"`."}return""}}function fr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),n=e.lineNumber;return`
Check your code at `+r+":"+n+"."}return""}}var je={};function fr(e){{var r=Ie();if(!r){var n=typeof e=="string"?e:e.displayName||e.name;n&&(r=`
Check your code at `+r+":"+n+"."}return""}}var Ie={};function dr(e){{var r=je();if(!r){var n=typeof e=="string"?e:e.displayName||e.name;n&&(r=`
Check the top-level render call using <`+n+">.")}return r}}function ke(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var n=fr(r);if(je[n])return;je[n]=!0;var o="";e&&e._owner&&e._owner!==ie.current&&(o=" It was passed a child from "+A(e._owner.type)+"."),q(e),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,o),q(null)}}function Ae(e,r){{if(typeof e!="object")return;if(ae(e))for(var n=0;n<e.length;n++){var o=e[n];ue(o)&&ke(o,r)}else if(ue(e))e._store&&(e._store.validated=!0);else if(e){var g=_(e);if(typeof g=="function"&&g!==e.entries)for(var D=g.call(e),f;!(f=D.next()).done;)ue(f.value)&&ke(f.value,r)}}}function dr(e){{var r=e.type;if(r==null||typeof r=="string")return;var n;if(typeof r=="function")n=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===i||r.$$typeof===m))n=r.propTypes;else return;if(n){var o=A(r);Xe(n,e.props,"prop",o,e)}else if(r.PropTypes!==void 0&&!se){se=!0;var g=A(r);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",g||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function vr(e){{for(var r=Object.keys(e.props),n=0;n<r.length;n++){var o=r[n];if(o!=="children"&&o!=="key"){q(e),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",o),q(null);break}}e.ref!==null&&(q(e),C("Invalid attribute `ref` supplied to `React.Fragment`."),q(null))}}function Ne(e,r,n,o,g,D){{var f=Ve(e);if(!f){var l="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(l+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var S=cr(g);S?l+=S:l+=Ie();var P;e===null?P="null":ae(e)?P="array":e!==void 0&&e.$$typeof===a?(P="<"+(A(e.type)||"Unknown")+" />",l=" Did you accidentally export a JSX literal instead of a component?"):P=typeof e,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",P,l)}var O=lr(e,r,n,g,D);if(O==null)return O;if(f){var j=r.children;if(j!==void 0)if(o)if(ae(j)){for(var B=0;B<j.length;B++)Ae(j[B],e);Object.freeze&&Object.freeze(j)}else C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ae(j,e)}return e===c?vr(O):dr(O),O}}function gr(e,r,n){return Ne(e,r,n,!0)}function pr(e,r,n){return Ne(e,r,n,!1)}var hr=pr,mr=gr;V.Fragment=c,V.jsx=hr,V.jsxs=mr}()),V}(function(t){process.env.NODE_ENV==="production"?t.exports=Or():t.exports=Tr()})(Ge);const I=Ge.exports.jsx,le=t=>{var E,w;const a=T.useContext(W.QueryBuilderContext),{useDrop:v}=T.useContext(F),{path:c,moveRule:R,independentCombinators:y}=t,{dropRef:p,dropMonitorId:b,isOver:i}=yr({path:c,independentCombinators:y,moveRule:R,useDrop:v}),h=i?u.standardClassnames.dndOver:"",s=u.c(h,u.standardClassnames.betweenRules),m=(w=(E=a.controlElements)==null?void 0:E.combinatorSelector)!=null?w:u.defaultControlElements.combinatorSelector;return I("div",{ref:p,className:s,"data-dropmonitorid":b,"data-testid":u.TestID.inlineCombinator,children:I(m,{...t,path:c,testID:u.TestID.combinators})},"dnd")};le.displayName="InlineCombinatorDnD";const ce=t=>{const a=T.useContext(F),{useDrag:v,useDrop:c}=a,{path:R,disabled:y,parentDisabled:p,actions:{moveRule:b},schema:{independentCombinators:i}}=t,s=Rr({path:R,disabled:!!p||!!y,independentCombinators:i,moveRule:b,useDrag:v,useDrop:c}),m=T.useMemo(()=>`${t.schema.classNames.rule}${s.isOver?` ${u.standardClassnames.dndOver}`:""}${s.isDragging?` ${u.standardClassnames.dndDragging}`:""}`,[s.isDragging,s.isOver,t.schema.classNames.rule]),{rule:E}=a.baseControls;return I(F.Provider,{value:a,children:I(E,{...t,schema:{...t.schema,classNames:{...t.schema.classNames,rule:m}},...s})})};ce.displayName="RuleDnD";const fe=t=>{const a=T.useContext(F),{useDrag:v,useDrop:c}=a,{path:R,disabled:y,parentDisabled:p,actions:{moveRule:b}}=t,h=Er({disabled:!!p||!!y,path:R,moveRule:b,useDrag:v,useDrop:c}),s=T.useMemo(()=>({...t.schema,classNames:{...t.schema.classNames,header:`${t.schema.classNames.header}${h.isOver?` ${u.standardClassnames.dndOver}`:""}`,ruleGroup:`${t.schema.classNames.ruleGroup}${h.isDragging?` ${u.standardClassnames.dndDragging}`:""}`}}),[t.schema,h.isOver,h.isDragging]),{ruleGroup:m}=a.baseControls;return I(m,{...t,schema:s,...h})};fe.displayName="RuleGroupDnD";const Ye=t=>{const{controlClassnames:a,controlElements:v,debugMode:c,enableDragAndDrop:R,enableMountQueryChange:y,translations:p}=t,b=u.useMergedContext({controlClassnames:a,controlElements:v,debugMode:c,enableDragAndDrop:R!=null?R:!0,enableMountQueryChange:y,translations:p!=null?p:{}}),{enableDragAndDrop:i}=b,h=We(t.dnd),s=i&&h?"dnd":"no-dnd";if(!i||!h)return I(W.QueryBuilderContext.Provider,{value:{...b,enableDragAndDrop:!1,debugMode:c},children:t.children},s);const{DndProvider:m,HTML5Backend:E}=h;return I(m,{backend:E,debugMode:c,children:I(W.QueryBuilderContext.Provider,{value:{...b,enableDragAndDrop:i,debugMode:c},children:I(de,{dnd:h,children:t.children})},s)},s)};Ye.displayName="QueryBuilderDnD";const de=t=>{var E,w,k,d,_,x,C,M,Q,U,H,J;const a=T.useContext(W.QueryBuilderContext),v=T.useContext(F),c=We(t.dnd),R=u.usePreferProp(!1,t.debugMode,a.debugMode),y=u.usePreferProp(!0,t.enableDragAndDrop,a.enableDragAndDrop),p=y&&c?"dnd":"no-dnd";if(!y||!c)return I(W.QueryBuilderContext.Provider,{value:{...a,enableDragAndDrop:!1,debugMode:R},children:t.children},p);const{DndContext:b,useDrag:i,useDrop:h}=c,s={rule:(d=(k=(E=t.controlElements)==null?void 0:E.rule)!=null?k:(w=a.controlElements)==null?void 0:w.rule)!=null?d:v.baseControls.rule,ruleGroup:(M=(C=(_=t.controlElements)==null?void 0:_.ruleGroup)!=null?C:(x=a.controlElements)==null?void 0:x.ruleGroup)!=null?M:v.baseControls.ruleGroup,combinatorSelector:(J=(H=(Q=t.controlElements)==null?void 0:Q.combinatorSelector)!=null?H:(U=a.controlElements)==null?void 0:U.combinatorSelector)!=null?J:v.baseControls.combinatorSelector},m={...a,controlElements:{...a.controlElements,ruleGroup:fe,rule:ce,inlineCombinator:le}};return I(b.Consumer,{children:()=>I(W.QueryBuilderContext.Provider,{value:m,children:I(F.Provider,{value:{useDrag:i,useDrop:h,baseControls:s},children:t.children})},p)},p)};de.displayName="QueryBuilderDndWithoutProvider";exports.InlineCombinatorDnD=le;exports.QueryBuilderDnD=Ye;exports.QueryBuilderDndWithoutProvider=de;exports.RuleDnD=ce;exports.RuleGroupDnD=fe;exports.version=Dr;
Check the top-level render call using <`+n+">.")}return r}}function ke(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var n=dr(r);if(Ie[n])return;Ie[n]=!0;var o="";e&&e._owner&&e._owner!==se.current&&(o=" It was passed a child from "+A(e._owner.type)+"."),W(e),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,o),W(null)}}function Ae(e,r){{if(typeof e!="object")return;if(ae(e))for(var n=0;n<e.length;n++){var o=e[n];ue(o)&&ke(o,r)}else if(ue(e))e._store&&(e._store.validated=!0);else if(e){var p=x(e);if(typeof p=="function"&&p!==e.entries)for(var y=p.call(e),v;!(v=y.next()).done;)ue(v.value)&&ke(v.value,r)}}}function vr(e){{var r=e.type;if(r==null||typeof r=="string")return;var n;if(typeof r=="function")n=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===i||r.$$typeof===E))n=r.propTypes;else return;if(n){var o=A(r);Ze(n,e.props,"prop",o,e)}else if(r.PropTypes!==void 0&&!ie){ie=!0;var p=A(r);h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",p||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function pr(e){{for(var r=Object.keys(e.props),n=0;n<r.length;n++){var o=r[n];if(o!=="children"&&o!=="key"){W(e),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",o),W(null);break}}e.ref!==null&&(W(e),h("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}function Me(e,r,n,o,p,y){{var v=Ue(e);if(!v){var c="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(c+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var S=fr(p);S?c+=S:c+=je();var _;e===null?_="null":ae(e)?_="array":e!==void 0&&e.$$typeof===a?(_="<"+(A(e.type)||"Unknown")+" />",c=" Did you accidentally export a JSX literal instead of a component?"):_=typeof e,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",_,c)}var P=cr(e,r,n,p,y);if(P==null)return P;if(v){var j=r.children;if(j!==void 0)if(o)if(ae(j)){for(var B=0;B<j.length;B++)Ae(j[B],e);Object.freeze&&Object.freeze(j)}else h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ae(j,e)}return e===l?pr(P):vr(P),P}}function gr(e,r,n){return Me(e,r,n,!0)}function hr(e,r,n){return Me(e,r,n,!1)}var br=hr,mr=gr;V.Fragment=l,V.jsx=br,V.jsxs=mr}()),V}(function(t){process.env.NODE_ENV==="production"?t.exports=xr():t.exports=Tr()})(Ye);const w=Ye.exports.jsx,le=({component:t,path:a,independentCombinators:d,...l})=>{const{useDrop:R}=O.useContext(q),{dropRef:b,dropMonitorId:f,isOver:s}=Rr({path:a,independentCombinators:d,useDrop:R}),i=s?m.standardClassnames.dndOver:"",g=m.c(i,m.standardClassnames.betweenRules);return w("div",{ref:b,className:g,"data-dropmonitorid":f,"data-testid":m.TestID.inlineCombinator,children:w(t,{...l,path:a,testID:m.TestID.combinators})},"dnd")};le.displayName="InlineCombinatorDnD";const ce=t=>{const a=O.useContext(q),{useDrag:d,useDrop:l}=a,{path:R,disabled:b,parentDisabled:f,actions:{moveRule:s},schema:{independentCombinators:i}}=t,u=Er({path:R,disabled:!!f||!!b,independentCombinators:i,moveRule:s,useDrag:d,useDrop:l}),E=O.useMemo(()=>`${t.schema.classNames.rule}${u.isOver?` ${m.standardClassnames.dndOver}`:""}${u.isDragging?` ${m.standardClassnames.dndDragging}`:""}`,[u.isDragging,u.isOver,t.schema.classNames.rule]),{rule:C}=a.baseControls;return w(q.Provider,{value:a,children:w(C,{...t,schema:{...t.schema,classNames:{...t.schema.classNames,rule:E}},...u})})};ce.displayName="RuleDnD";const fe=t=>{const a=O.useContext(q),{useDrag:d,useDrop:l}=a,{path:R,disabled:b,parentDisabled:f,actions:{moveRule:s},schema:{independentCombinators:i}}=t,u=_r({disabled:!!f||!!b,path:R,independentCombinators:i,moveRule:s,useDrag:d,useDrop:l}),E=O.useMemo(()=>({...t.schema,classNames:{...t.schema.classNames,header:`${t.schema.classNames.header}${u.isOver?` ${m.standardClassnames.dndOver}`:""}`,ruleGroup:`${t.schema.classNames.ruleGroup}${u.isDragging?` ${m.standardClassnames.dndDragging}`:""}`}}),[t.schema,u.isOver,u.isDragging]),{ruleGroup:C}=a.baseControls;return w(C,{...t,schema:E,...u})};fe.displayName="RuleGroupDnD";const Le=t=>{const{controlClassnames:a,controlElements:d,debugMode:l,enableDragAndDrop:R,enableMountQueryChange:b,translations:f}=t,s=m.useMergedContext({controlClassnames:a,controlElements:d,debugMode:l,enableDragAndDrop:R!=null?R:!0,enableMountQueryChange:b,translations:f!=null?f:{}}),{enableDragAndDrop:i}=s,g=Be(t.dnd),u=i&&g?"dnd":"no-dnd";if(!i||!g)return w(U.QueryBuilderContext.Provider,{value:{...s,enableDragAndDrop:!1,debugMode:l},children:t.children},u);const{DndProvider:E,HTML5Backend:C}=g;return w(E,{backend:C,debugMode:l,children:w(U.QueryBuilderContext.Provider,{value:{...s,enableDragAndDrop:i,debugMode:l},children:w(de,{dnd:g,children:t.children})},u)},u)};Le.displayName="QueryBuilderDnD";const de=t=>{var C,I,k,$,x,D,h,T,F,Q,H,J;const a=O.useContext(U.QueryBuilderContext),d=O.useContext(q),l=Be(t.dnd),R=m.usePreferProp(!1,t.debugMode,a.debugMode),b=m.usePreferProp(!0,t.enableDragAndDrop,a.enableDragAndDrop),f=b&&l?"dnd":"no-dnd";if(!b||!l)return w(U.QueryBuilderContext.Provider,{value:{...a,enableDragAndDrop:!1,debugMode:R},children:t.children},f);const{DndContext:s,useDrag:i,useDrop:g}=l,u={rule:($=(k=(C=t.controlElements)==null?void 0:C.rule)!=null?k:(I=a.controlElements)==null?void 0:I.rule)!=null?$:d.baseControls.rule,ruleGroup:(T=(h=(x=t.controlElements)==null?void 0:x.ruleGroup)!=null?h:(D=a.controlElements)==null?void 0:D.ruleGroup)!=null?T:d.baseControls.ruleGroup,combinatorSelector:(J=(H=(F=t.controlElements)==null?void 0:F.combinatorSelector)!=null?H:(Q=a.controlElements)==null?void 0:Q.combinatorSelector)!=null?J:d.baseControls.combinatorSelector},E={...a,controlElements:{...a.controlElements,ruleGroup:fe,rule:ce,inlineCombinator:le}};return w(s.Consumer,{children:()=>w(U.QueryBuilderContext.Provider,{value:E,children:w(q.Provider,{value:{useDrag:i,useDrop:g,baseControls:u},children:t.children})},f)},f)};de.displayName="QueryBuilderDndWithoutProvider";exports.InlineCombinatorDnD=le;exports.QueryBuilderDnD=Le;exports.QueryBuilderDndWithoutProvider=de;exports.RuleDnD=ce;exports.RuleGroupDnD=fe;exports.version=Dr;
//# sourceMappingURL=index.cjs.js.map

@@ -1,144 +0,161 @@

import { QueryBuilderContext as Y } from "@react-querybuilder/ctx";
import Be, { useRef as B, useState as Or, useEffect as Pr, createContext as Tr, useContext as V, useMemo as Le } from "react";
import { DNDType as F, getParentPath as $, isAncestor as ve, pathsAreEqual as L, defaultControlElements as Ve, standardClassnames as U, c as xr, TestID as Ne, useMergedContext as Sr, usePreferProp as We } from "react-querybuilder";
const Br = "5.0.0-alpha.5", wr = ({
import Ye, { useRef as G, useState as Cr, useEffect as Or, createContext as Pr, useContext as J, useMemo as Be } from "react";
import { getParentPath as B, isAncestor as de, pathsAreEqual as Y, defaultControlElements as Tr, standardClassnames as L, c as xr, TestID as Me, useMergedContext as wr, usePreferProp as Ne } from "react-querybuilder";
import { QueryBuilderContext as Q } from "@react-querybuilder/ctx";
const Br = "5.0.0-alpha.6", Sr = ({
path: t,
independentCombinators: a,
moveRule: b,
useDrop: f
useDrop: h
}) => {
const y = B(null), [{ isOver: D, dropMonitorId: v }, m] = f(
const c = G(null), [{ isOver: R, dropMonitorId: m }, f] = h(
() => ({
accept: [F.rule, F.ruleGroup],
accept: ["rule", "ruleGroup"],
canDrop: (i) => {
const g = $(t), s = $(i.path), p = t[t.length - 1], R = i.path[i.path.length - 1];
return !(ve(i.path, t) || L(i.path, t) || L(g, s) && p - 1 === R || a && L(g, s) && p === R - 1);
const s = B(t), p = B(i.path), u = t[t.length - 1], E = i.path[i.path.length - 1];
return !(de(i.path, t) || Y(i.path, t) || Y(s, p) && u - 1 === E || a && Y(s, p) && u === E - 1);
},
collect: (i) => ({
isOver: i.canDrop() && i.isOver(),
dropMonitorId: i.getHandlerId()
}),
drop: (i, g) => {
const s = $(t), p = t[t.length - 1];
b(i.path, [...s, p]);
}
collect: (i) => {
var s, p;
return {
isOver: i.canDrop() && i.isOver(),
dropMonitorId: (s = i.getHandlerId()) != null ? s : "",
dropEffect: ((p = i.getDropResult()) != null ? p : {}).dropEffect
};
},
drop: () => ({ type: "inlineCombinator", path: t })
}),
[b, t, a]
[t, a]
);
return m(y), { dropRef: y, dropMonitorId: v, isOver: D };
}, Ue = (t) => {
const [a, b] = Or(t != null ? t : null);
return Pr(() => {
let f = !1;
return f(c), { dropRef: c, dropMonitorId: m, isOver: R };
}, Le = (t) => {
const [a, h] = Cr(t != null ? t : null);
return Or(() => {
let c = !1;
return a || (async () => {
const [D, v] = await Promise.all([
const [m, f] = await Promise.all([
import("react-dnd").catch(() => null),
import("react-dnd-html5-backend").catch(() => null)
]);
f || D && v && b(() => ({ ...D, ...v }));
c || m && f && h(() => ({ ...m, ...f }));
})(), () => {
f = !0;
c = !0;
};
}, []), a;
}, Ir = ({
}, Ve = ({
type: t,
path: a,
disabled: h,
moveRule: c,
useDrag: R
}) => R(
() => ({
type: t,
item: { path: a },
canDrag: !h,
collect: (m) => {
var f;
return {
isDragging: !h && m.isDragging(),
dragMonitorId: (f = m.getHandlerId()) != null ? f : ""
};
},
end(m, f) {
const i = f.getDropResult();
if (!i)
return;
const s = B(i.path), p = i.path[i.path.length - 1], u = i.type === "ruleGroup" ? [...i.path, 0] : i.type === "inlineCombinator" ? [...s, p] : [...s, p + 1];
c(m.path, u, i.dropEffect === "copy");
}
}),
[h, a]
), Ir = ({
path: t,
disabled: a,
independentCombinators: b,
moveRule: f,
useDrag: y,
useDrop: D
independentCombinators: h,
moveRule: c,
useDrag: R,
useDrop: m
}) => {
const v = B(null), m = B(null), [{ isDragging: i, dragMonitorId: g }, s, p] = y(
const f = G(null), i = G(null), [{ isDragging: s, dragMonitorId: p }, u, E] = Ve({
type: "rule",
path: t,
disabled: a,
independentCombinators: h,
moveRule: c,
useDrag: R
}), [{ isOver: _, dropMonitorId: S, dropEffect: I }, A] = m(
() => ({
type: F.rule,
item: () => ({ path: t }),
canDrag: !a,
collect: (c) => {
var _;
return {
isDragging: !a && c.isDragging(),
dragMonitorId: (_ = c.getHandlerId()) != null ? _ : ""
};
}
}),
[a, t]
), [{ isOver: R, dropMonitorId: x }, I] = D(
() => ({
accept: [F.rule, F.ruleGroup],
canDrop: (c) => {
accept: ["rule", "ruleGroup"],
canDrop: (O) => {
if (a)
return !1;
const _ = $(t), P = $(c.path), E = t[t.length - 1], A = c.path[c.path.length - 1];
return !(ve(c.path, t) || L(_, P) && (E === A || E === A - 1 || b && E === A - 2));
const y = B(t), g = B(O.path), P = t[t.length - 1], F = O.path[O.path.length - 1];
return !(de(O.path, t) || Y(y, g) && (P === F || P === F - 1 || h && P === F - 2));
},
collect: (c) => {
var _;
collect: (O) => {
var y, g;
return {
isOver: c.canDrop() && c.isOver(),
dropMonitorId: (_ = c.getHandlerId()) != null ? _ : ""
isOver: O.canDrop() && O.isOver(),
dropMonitorId: (y = O.getHandlerId()) != null ? y : "",
dropEffect: ((g = O.getDropResult()) != null ? g : {}).dropEffect
};
},
drop: (c, _) => {
const P = $(t), E = t[t.length - 1];
f(c.path, [...P, E + 1]);
}
drop: () => ({ type: "rule", path: t })
}),
[a, b, f, t]
[a, h, c, t]
);
return s(m), p(I(v)), { isDragging: i, dragMonitorId: g, isOver: R, dropMonitorId: x, dndRef: v, dragRef: m };
return u(i), E(A(f)), { isDragging: s, dragMonitorId: p, isOver: _, dropMonitorId: S, dndRef: f, dragRef: i, dropEffect: I };
}, jr = ({
disabled: t,
path: a,
moveRule: b,
useDrag: f,
useDrop: y
independentCombinators: h,
moveRule: c,
useDrag: R,
useDrop: m
}) => {
const D = B(null), v = B(null), m = B(null), [{ isDragging: i, dragMonitorId: g }, s, p] = f(
const f = G(null), i = G(null), s = G(null), [{ isDragging: p, dragMonitorId: u }, E, _] = Ve({
type: "ruleGroup",
path: a,
disabled: t,
independentCombinators: h,
moveRule: c,
useDrag: R
}), [{ isOver: S, dropMonitorId: I, dropEffect: A }, O] = m(
() => ({
type: F.ruleGroup,
item: () => ({ path: a }),
canDrag: !t,
collect: (c) => {
var _;
return {
isDragging: !t && c.isDragging(),
dragMonitorId: (_ = c.getHandlerId()) != null ? _ : ""
};
}
}),
[t, a]
), [{ isOver: R, dropMonitorId: x }, I] = y(
() => ({
accept: [F.rule, F.ruleGroup],
canDrop: (c) => {
accept: ["rule", "ruleGroup"],
canDrop: (y) => {
if (t)
return !1;
const _ = $(c.path), P = c.path[c.path.length - 1];
return !(ve(c.path, a) || L(a, _) && P === 0 || L(a, c.path));
const g = B(y.path), P = y.path[y.path.length - 1];
return !(de(y.path, a) || Y(a, g) && P === 0 || Y(a, y.path));
},
collect: (c) => {
var _;
collect: (y) => {
var g, P;
return {
isOver: c.canDrop() && c.isOver(),
dropMonitorId: (_ = c.getHandlerId()) != null ? _ : ""
isOver: y.canDrop() && y.isOver(),
dropMonitorId: (g = y.getHandlerId()) != null ? g : "",
dropEffect: ((P = y.getDropResult()) != null ? P : {}).dropEffect
};
},
drop: (c, _) => !t && b(c.path, [...a, 0])
drop: (y, g) => {
var P;
return (P = g.getDropResult()) != null ? P : { type: "ruleGroup", path: a };
}
}),
[t, b, a]
[t, c, a]
);
return a.length > 0 && (s(v), p(D)), I(m), {
isDragging: i,
dragMonitorId: g,
isOver: R,
dropMonitorId: x,
previewRef: D,
dragRef: v,
dropRef: m
return a.length > 0 && (E(i), _(f)), O(s), {
isDragging: p,
dragMonitorId: u,
isOver: S,
dropMonitorId: I,
previewRef: f,
dragRef: i,
dropRef: s,
dropEffect: A
};
}, { rule: kr, ruleGroup: Ar, combinatorSelector: Fr } = Ve, N = Tr({
}, { rule: kr, ruleGroup: Ar, combinatorSelector: Fr } = Tr, M = Pr({
baseControls: { rule: kr, ruleGroup: Ar, combinatorSelector: Fr }
});
N.displayName = "QueryBuilderDndContext";
var qe = { exports: {} }, Q = {};
M.displayName = "QueryBuilderDndContext";
var Ue = { exports: {} }, q = {};
/**

@@ -153,21 +170,21 @@ * @license React

*/
var Ge;
function Mr() {
if (Ge)
return Q;
Ge = 1;
var t = Be, a = Symbol.for("react.element"), b = Symbol.for("react.fragment"), f = Object.prototype.hasOwnProperty, y = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, D = { key: !0, ref: !0, __self: !0, __source: !0 };
function v(m, i, g) {
var s, p = {}, R = null, x = null;
g !== void 0 && (R = "" + g), i.key !== void 0 && (R = "" + i.key), i.ref !== void 0 && (x = i.ref);
for (s in i)
f.call(i, s) && !D.hasOwnProperty(s) && (p[s] = i[s]);
if (m && m.defaultProps)
for (s in i = m.defaultProps, i)
p[s] === void 0 && (p[s] = i[s]);
return { $$typeof: a, type: m, key: R, ref: x, props: p, _owner: y.current };
var We;
function $r() {
if (We)
return q;
We = 1;
var t = Ye, a = Symbol.for("react.element"), h = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, R = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, m = { key: !0, ref: !0, __self: !0, __source: !0 };
function f(i, s, p) {
var u, E = {}, _ = null, S = null;
p !== void 0 && (_ = "" + p), s.key !== void 0 && (_ = "" + s.key), s.ref !== void 0 && (S = s.ref);
for (u in s)
c.call(s, u) && !m.hasOwnProperty(u) && (E[u] = s[u]);
if (i && i.defaultProps)
for (u in s = i.defaultProps, s)
E[u] === void 0 && (E[u] = s[u]);
return { $$typeof: a, type: i, key: _, ref: S, props: E, _owner: R.current };
}
return Q.Fragment = b, Q.jsx = v, Q.jsxs = v, Q;
return q.Fragment = h, q.jsx = f, q.jsxs = f, q;
}
var J = {};
var H = {};
/**

@@ -182,41 +199,41 @@ * @license React

*/
var Ye;
function $r() {
return Ye || (Ye = 1, process.env.NODE_ENV !== "production" && function() {
var t = Be, a = Symbol.for("react.element"), b = Symbol.for("react.portal"), f = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), D = Symbol.for("react.profiler"), v = Symbol.for("react.provider"), m = Symbol.for("react.context"), i = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), s = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), I = Symbol.iterator, c = "@@iterator";
function _(e) {
var Ge;
function Mr() {
return Ge || (Ge = 1, process.env.NODE_ENV !== "production" && function() {
var t = Ye, a = Symbol.for("react.element"), h = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), R = Symbol.for("react.strict_mode"), m = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), i = Symbol.for("react.context"), s = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), I = Symbol.iterator, A = "@@iterator";
function O(e) {
if (e === null || typeof e != "object")
return null;
var r = I && e[I] || e[c];
var r = I && e[I] || e[A];
return typeof r == "function" ? r : null;
}
var P = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function E(e) {
var y = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function g(e) {
{
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), o = 1; o < r; o++)
n[o - 1] = arguments[o];
A("error", e, n);
P("error", e, n);
}
}
function A(e, r, n) {
function P(e, r, n) {
{
var o = P.ReactDebugCurrentFrame, d = o.getStackAddendum();
d !== "" && (r += "%s", n = n.concat([d]));
var h = n.map(function(l) {
return String(l);
var o = y.ReactDebugCurrentFrame, v = o.getStackAddendum();
v !== "" && (r += "%s", n = n.concat([v]));
var b = n.map(function(d) {
return String(d);
});
h.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, h);
b.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, b);
}
}
var z = !1, K = !1, X = !1, Z = !1, Ke = !1, ge;
ge = Symbol.for("react.module.reference");
function Xe(e) {
return !!(typeof e == "string" || typeof e == "function" || e === f || e === D || Ke || e === y || e === g || e === s || Z || e === x || z || K || X || typeof e == "object" && e !== null && (e.$$typeof === R || e.$$typeof === p || e.$$typeof === v || e.$$typeof === m || e.$$typeof === i || e.$$typeof === ge || e.getModuleId !== void 0));
var F = !1, z = !1, K = !1, X = !1, ze = !1, ve;
ve = Symbol.for("react.module.reference");
function Ke(e) {
return !!(typeof e == "string" || typeof e == "function" || e === c || e === m || ze || e === R || e === p || e === u || X || e === S || F || z || K || typeof e == "object" && e !== null && (e.$$typeof === _ || e.$$typeof === E || e.$$typeof === f || e.$$typeof === i || e.$$typeof === s || e.$$typeof === ve || e.getModuleId !== void 0));
}
function Ze(e, r, n) {
function Xe(e, r, n) {
var o = e.displayName;
if (o)
return o;
var d = r.displayName || r.name || "";
return d !== "" ? n + "(" + d + ")" : n;
var v = r.displayName || r.name || "";
return v !== "" ? n + "(" + v + ")" : n;
}

@@ -229,3 +246,3 @@ function pe(e) {

return null;
if (typeof e.tag == "number" && E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
if (typeof e.tag == "number" && g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
return e.displayName || e.name || null;

@@ -235,13 +252,13 @@ if (typeof e == "string")

switch (e) {
case f:
case c:
return "Fragment";
case b:
case h:
return "Portal";
case D:
case m:
return "Profiler";
case y:
case R:
return "StrictMode";
case g:
case p:
return "Suspense";
case s:
case u:
return "SuspenseList";

@@ -251,17 +268,17 @@ }

switch (e.$$typeof) {
case m:
case i:
var r = e;
return pe(r) + ".Consumer";
case v:
case f:
var n = e;
return pe(n._context) + ".Provider";
case i:
return Ze(e, e.render, "ForwardRef");
case p:
case s:
return Xe(e, e.render, "ForwardRef");
case E:
var o = e.displayName || null;
return o !== null ? o : j(e.type) || "Memo";
case R: {
var d = e, h = d._payload, l = d._init;
case _: {
var v = e, b = v._payload, d = v._init;
try {
return j(l(h));
return j(d(b));
} catch {

@@ -274,14 +291,14 @@ return null;

}
var M = Object.assign, q = 0, me, he, be, De, ye, Re, Ee;
function _e() {
var $ = Object.assign, V = 0, ge, he, me, be, ye, Re, Ee;
function De() {
}
_e.__reactDisabledLog = !0;
function er() {
De.__reactDisabledLog = !0;
function Ze() {
{
if (q === 0) {
me = console.log, he = console.info, be = console.warn, De = console.error, ye = console.group, Re = console.groupCollapsed, Ee = console.groupEnd;
if (V === 0) {
ge = console.log, he = console.info, me = console.warn, be = console.error, ye = console.group, Re = console.groupCollapsed, Ee = console.groupEnd;
var e = {
configurable: !0,
enumerable: !0,
value: _e,
value: De,
writable: !0

@@ -299,8 +316,8 @@ };

}
q++;
V++;
}
}
function rr() {
function er() {
{
if (q--, q === 0) {
if (V--, V === 0) {
var e = {

@@ -312,21 +329,21 @@ configurable: !0,

Object.defineProperties(console, {
log: M({}, e, {
value: me
log: $({}, e, {
value: ge
}),
info: M({}, e, {
info: $({}, e, {
value: he
}),
warn: M({}, e, {
warn: $({}, e, {
value: me
}),
error: $({}, e, {
value: be
}),
error: M({}, e, {
value: De
}),
group: M({}, e, {
group: $({}, e, {
value: ye
}),
groupCollapsed: M({}, e, {
groupCollapsed: $({}, e, {
value: Re
}),
groupEnd: M({}, e, {
groupEnd: $({}, e, {
value: Ee

@@ -336,29 +353,29 @@ })

}
q < 0 && E("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
V < 0 && g("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
var oe = P.ReactCurrentDispatcher, ie;
function ee(e, r, n) {
var ae = y.ReactCurrentDispatcher, oe;
function Z(e, r, n) {
{
if (ie === void 0)
if (oe === void 0)
try {
throw Error();
} catch (d) {
var o = d.stack.trim().match(/\n( *(at )?)/);
ie = o && o[1] || "";
} catch (v) {
var o = v.stack.trim().match(/\n( *(at )?)/);
oe = o && o[1] || "";
}
return `
` + ie + e;
` + oe + e;
}
}
var se = !1, re;
var ie = !1, ee;
{
var nr = typeof WeakMap == "function" ? WeakMap : Map;
re = new nr();
var rr = typeof WeakMap == "function" ? WeakMap : Map;
ee = new rr();
}
function Ce(e, r) {
if (!e || se)
function _e(e, r) {
if (!e || ie)
return "";
{
var n = re.get(e);
var n = ee.get(e);
if (n !== void 0)

@@ -368,13 +385,13 @@ return n;

var o;
se = !0;
var d = Error.prepareStackTrace;
ie = !0;
var v = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var h;
h = oe.current, oe.current = null, er();
var b;
b = ae.current, ae.current = null, Ze();
try {
if (r) {
var l = function() {
var d = function() {
throw Error();
};
if (Object.defineProperty(l.prototype, "props", {
if (Object.defineProperty(d.prototype, "props", {
set: function() {

@@ -385,14 +402,14 @@ throw Error();

try {
Reflect.construct(l, []);
Reflect.construct(d, []);
} catch (k) {
o = k;
}
Reflect.construct(e, [], l);
Reflect.construct(e, [], d);
} else {
try {
l.call();
d.call();
} catch (k) {
o = k;
}
e.call(l.prototype);
e.call(d.prototype);
}

@@ -409,16 +426,16 @@ } else {

if (k && o && typeof k.stack == "string") {
for (var u = k.stack.split(`
for (var l = k.stack.split(`
`), T = o.stack.split(`
`), C = u.length - 1, O = T.length - 1; C >= 1 && O >= 0 && u[C] !== T[O]; )
O--;
for (; C >= 1 && O >= 0; C--, O--)
if (u[C] !== T[O]) {
if (C !== 1 || O !== 1)
`), D = l.length - 1, C = T.length - 1; D >= 1 && C >= 0 && l[D] !== T[C]; )
C--;
for (; D >= 1 && C >= 0; D--, C--)
if (l[D] !== T[C]) {
if (D !== 1 || C !== 1)
do
if (C--, O--, O < 0 || u[C] !== T[O]) {
if (D--, C--, C < 0 || l[D] !== T[C]) {
var w = `
` + u[C].replace(" at new ", " at ");
return e.displayName && w.includes("<anonymous>") && (w = w.replace("<anonymous>", e.displayName)), typeof e == "function" && re.set(e, w), w;
` + l[D].replace(" at new ", " at ");
return e.displayName && w.includes("<anonymous>") && (w = w.replace("<anonymous>", e.displayName)), typeof e == "function" && ee.set(e, w), w;
}
while (C >= 1 && O >= 0);
while (D >= 1 && C >= 0);
break;

@@ -428,37 +445,37 @@ }

} finally {
se = !1, oe.current = h, rr(), Error.prepareStackTrace = d;
ie = !1, ae.current = b, er(), Error.prepareStackTrace = v;
}
var G = e ? e.displayName || e.name : "", $e = G ? ee(G) : "";
return typeof e == "function" && re.set(e, $e), $e;
var W = e ? e.displayName || e.name : "", $e = W ? Z(W) : "";
return typeof e == "function" && ee.set(e, $e), $e;
}
function tr(e, r, n) {
return Ce(e, !1);
function nr(e, r, n) {
return _e(e, !1);
}
function ar(e) {
function tr(e) {
var r = e.prototype;
return !!(r && r.isReactComponent);
}
function ne(e, r, n) {
function re(e, r, n) {
if (e == null)
return "";
if (typeof e == "function")
return Ce(e, ar(e));
return _e(e, tr(e));
if (typeof e == "string")
return ee(e);
return Z(e);
switch (e) {
case g:
return ee("Suspense");
case s:
return ee("SuspenseList");
case p:
return Z("Suspense");
case u:
return Z("SuspenseList");
}
if (typeof e == "object")
switch (e.$$typeof) {
case i:
return tr(e.render);
case p:
return ne(e.type, r, n);
case R: {
var o = e, d = o._payload, h = o._init;
case s:
return nr(e.render);
case E:
return re(e.type, r, n);
case _: {
var o = e, v = o._payload, b = o._init;
try {
return ne(h(d), r, n);
return re(b(v), r, n);
} catch {

@@ -470,34 +487,34 @@ }

}
var te = Object.prototype.hasOwnProperty, Oe = {}, Pe = P.ReactDebugCurrentFrame;
function ae(e) {
var ne = Object.prototype.hasOwnProperty, Ce = {}, Oe = y.ReactDebugCurrentFrame;
function te(e) {
if (e) {
var r = e._owner, n = ne(e.type, e._source, r ? r.type : null);
Pe.setExtraStackFrame(n);
var r = e._owner, n = re(e.type, e._source, r ? r.type : null);
Oe.setExtraStackFrame(n);
} else
Pe.setExtraStackFrame(null);
Oe.setExtraStackFrame(null);
}
function or(e, r, n, o, d) {
function ar(e, r, n, o, v) {
{
var h = Function.call.bind(te);
for (var l in e)
if (h(e, l)) {
var u = void 0;
var b = Function.call.bind(ne);
for (var d in e)
if (b(e, d)) {
var l = void 0;
try {
if (typeof e[l] != "function") {
var T = Error((o || "React class") + ": " + n + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[l] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
if (typeof e[d] != "function") {
var T = Error((o || "React class") + ": " + n + " type `" + d + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw T.name = "Invariant Violation", T;
}
u = e[l](r, l, o, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (C) {
u = C;
l = e[d](r, d, o, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (D) {
l = D;
}
u && !(u instanceof Error) && (ae(d), E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", o || "React class", n, l, typeof u), ae(null)), u instanceof Error && !(u.message in Oe) && (Oe[u.message] = !0, ae(d), E("Failed %s type: %s", n, u.message), ae(null));
l && !(l instanceof Error) && (te(v), g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", o || "React class", n, d, typeof l), te(null)), l instanceof Error && !(l.message in Ce) && (Ce[l.message] = !0, te(v), g("Failed %s type: %s", n, l.message), te(null));
}
}
}
var ir = Array.isArray;
function ue(e) {
return ir(e);
var or = Array.isArray;
function se(e) {
return or(e);
}
function sr(e) {
function ir(e) {
{

@@ -508,5 +525,5 @@ var r = typeof Symbol == "function" && Symbol.toStringTag, n = r && e[Symbol.toStringTag] || e.constructor.name || "Object";

}
function ur(e) {
function sr(e) {
try {
return Te(e), !1;
return Pe(e), !1;
} catch {

@@ -516,10 +533,10 @@ return !0;

}
function Te(e) {
function Pe(e) {
return "" + e;
}
function xe(e) {
if (ur(e))
return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", sr(e)), Te(e);
function Te(e) {
if (sr(e))
return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ir(e)), Pe(e);
}
var H = P.ReactCurrentOwner, lr = {
var U = y.ReactCurrentOwner, ur = {
key: !0,

@@ -529,6 +546,6 @@ ref: !0,

__source: !0
}, Se, we, le;
le = {};
function cr(e) {
if (te.call(e, "ref")) {
}, xe, we, ue;
ue = {};
function lr(e) {
if (ne.call(e, "ref")) {
var r = Object.getOwnPropertyDescriptor(e, "ref").get;

@@ -540,4 +557,4 @@ if (r && r.isReactWarning)

}
function fr(e) {
if (te.call(e, "key")) {
function cr(e) {
if (ne.call(e, "key")) {
var r = Object.getOwnPropertyDescriptor(e, "key").get;

@@ -549,12 +566,12 @@ if (r && r.isReactWarning)

}
function dr(e, r) {
if (typeof e.ref == "string" && H.current && r && H.current.stateNode !== r) {
var n = j(H.current.type);
le[n] || (E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', j(H.current.type), e.ref), le[n] = !0);
function fr(e, r) {
if (typeof e.ref == "string" && U.current && r && U.current.stateNode !== r) {
var n = j(U.current.type);
ue[n] || (g('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', j(U.current.type), e.ref), ue[n] = !0);
}
}
function vr(e, r) {
function dr(e, r) {
{
var n = function() {
Se || (Se = !0, E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
xe || (xe = !0, g("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
};

@@ -567,6 +584,6 @@ n.isReactWarning = !0, Object.defineProperty(e, "key", {

}
function gr(e, r) {
function vr(e, r) {
{
var n = function() {
we || (we = !0, E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
we || (we = !0, g("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
};

@@ -579,4 +596,4 @@ n.isReactWarning = !0, Object.defineProperty(e, "ref", {

}
var pr = function(e, r, n, o, d, h, l) {
var u = {
var pr = function(e, r, n, o, v, b, d) {
var l = {
$$typeof: a,

@@ -586,6 +603,6 @@ type: e,

ref: n,
props: l,
_owner: h
props: d,
_owner: b
};
return u._store = {}, Object.defineProperty(u._store, "validated", {
return l._store = {}, Object.defineProperty(l._store, "validated", {
configurable: !1,

@@ -595,3 +612,3 @@ enumerable: !1,

value: !1
}), Object.defineProperty(u, "_self", {
}), Object.defineProperty(l, "_self", {
configurable: !1,

@@ -601,44 +618,44 @@ enumerable: !1,

value: o
}), Object.defineProperty(u, "_source", {
}), Object.defineProperty(l, "_source", {
configurable: !1,
enumerable: !1,
writable: !1,
value: d
}), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
value: v
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
};
function mr(e, r, n, o, d) {
function gr(e, r, n, o, v) {
{
var h, l = {}, u = null, T = null;
n !== void 0 && (xe(n), u = "" + n), fr(r) && (xe(r.key), u = "" + r.key), cr(r) && (T = r.ref, dr(r, d));
for (h in r)
te.call(r, h) && !lr.hasOwnProperty(h) && (l[h] = r[h]);
var b, d = {}, l = null, T = null;
n !== void 0 && (Te(n), l = "" + n), cr(r) && (Te(r.key), l = "" + r.key), lr(r) && (T = r.ref, fr(r, v));
for (b in r)
ne.call(r, b) && !ur.hasOwnProperty(b) && (d[b] = r[b]);
if (e && e.defaultProps) {
var C = e.defaultProps;
for (h in C)
l[h] === void 0 && (l[h] = C[h]);
var D = e.defaultProps;
for (b in D)
d[b] === void 0 && (d[b] = D[b]);
}
if (u || T) {
var O = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
u && vr(l, O), T && gr(l, O);
if (l || T) {
var C = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
l && dr(d, C), T && vr(d, C);
}
return pr(e, u, T, d, o, H.current, l);
return pr(e, l, T, v, o, U.current, d);
}
}
var ce = P.ReactCurrentOwner, Ie = P.ReactDebugCurrentFrame;
function W(e) {
var le = y.ReactCurrentOwner, Se = y.ReactDebugCurrentFrame;
function N(e) {
if (e) {
var r = e._owner, n = ne(e.type, e._source, r ? r.type : null);
Ie.setExtraStackFrame(n);
var r = e._owner, n = re(e.type, e._source, r ? r.type : null);
Se.setExtraStackFrame(n);
} else
Ie.setExtraStackFrame(null);
Se.setExtraStackFrame(null);
}
var fe;
fe = !1;
function de(e) {
var ce;
ce = !1;
function fe(e) {
return typeof e == "object" && e !== null && e.$$typeof === a;
}
function je() {
function Ie() {
{
if (ce.current) {
var e = j(ce.current.type);
if (le.current) {
var e = j(le.current.type);
if (e)

@@ -663,6 +680,6 @@ return `

}
var ke = {};
function br(e) {
var je = {};
function mr(e) {
{
var r = je();
var r = Ie();
if (!r) {

@@ -677,3 +694,3 @@ var n = typeof e == "string" ? e : e.displayName || e.name;

}
function Ae(e, r) {
function ke(e, r) {
{

@@ -683,30 +700,30 @@ if (!e._store || e._store.validated || e.key != null)

e._store.validated = !0;
var n = br(r);
if (ke[n])
var n = mr(r);
if (je[n])
return;
ke[n] = !0;
je[n] = !0;
var o = "";
e && e._owner && e._owner !== ce.current && (o = " It was passed a child from " + j(e._owner.type) + "."), W(e), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, o), W(null);
e && e._owner && e._owner !== le.current && (o = " It was passed a child from " + j(e._owner.type) + "."), N(e), g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, o), N(null);
}
}
function Fe(e, r) {
function Ae(e, r) {
{
if (typeof e != "object")
return;
if (ue(e))
if (se(e))
for (var n = 0; n < e.length; n++) {
var o = e[n];
de(o) && Ae(o, r);
fe(o) && ke(o, r);
}
else if (de(e))
else if (fe(e))
e._store && (e._store.validated = !0);
else if (e) {
var d = _(e);
if (typeof d == "function" && d !== e.entries)
for (var h = d.call(e), l; !(l = h.next()).done; )
de(l.value) && Ae(l.value, r);
var v = O(e);
if (typeof v == "function" && v !== e.entries)
for (var b = v.call(e), d; !(d = b.next()).done; )
fe(d.value) && ke(d.value, r);
}
}
}
function Dr(e) {
function br(e) {
{

@@ -719,3 +736,3 @@ var r = e.type;

n = r.propTypes;
else if (typeof r == "object" && (r.$$typeof === i || r.$$typeof === p))
else if (typeof r == "object" && (r.$$typeof === s || r.$$typeof === E))
n = r.propTypes;

@@ -726,9 +743,9 @@ else

var o = j(r);
or(n, e.props, "prop", o, e);
} else if (r.PropTypes !== void 0 && !fe) {
fe = !0;
var d = j(r);
E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", d || "Unknown");
ar(n, e.props, "prop", o, e);
} else if (r.PropTypes !== void 0 && !ce) {
ce = !0;
var v = j(r);
g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", v || "Unknown");
}
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}

@@ -741,110 +758,109 @@ }

if (o !== "children" && o !== "key") {
W(e), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", o), W(null);
N(e), g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", o), N(null);
break;
}
}
e.ref !== null && (W(e), E("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
e.ref !== null && (N(e), g("Invalid attribute `ref` supplied to `React.Fragment`."), N(null));
}
}
function Me(e, r, n, o, d, h) {
function Fe(e, r, n, o, v, b) {
{
var l = Xe(e);
if (!l) {
var u = "";
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (u += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
var T = hr(d);
T ? u += T : u += je();
var C;
e === null ? C = "null" : ue(e) ? C = "array" : e !== void 0 && e.$$typeof === a ? (C = "<" + (j(e.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : C = typeof e, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", C, u);
var d = Ke(e);
if (!d) {
var l = "";
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (l += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
var T = hr(v);
T ? l += T : l += Ie();
var D;
e === null ? D = "null" : se(e) ? D = "array" : e !== void 0 && e.$$typeof === a ? (D = "<" + (j(e.type) || "Unknown") + " />", l = " Did you accidentally export a JSX literal instead of a component?") : D = typeof e, g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", D, l);
}
var O = mr(e, r, n, d, h);
if (O == null)
return O;
if (l) {
var C = gr(e, r, n, v, b);
if (C == null)
return C;
if (d) {
var w = r.children;
if (w !== void 0)
if (o)
if (ue(w)) {
for (var G = 0; G < w.length; G++)
Fe(w[G], e);
if (se(w)) {
for (var W = 0; W < w.length; W++)
Ae(w[W], e);
Object.freeze && Object.freeze(w);
} else
E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
else
Fe(w, e);
Ae(w, e);
}
return e === f ? yr(O) : Dr(O), O;
return e === c ? yr(C) : br(C), C;
}
}
function Rr(e, r, n) {
return Me(e, r, n, !0);
return Fe(e, r, n, !0);
}
function Er(e, r, n) {
return Me(e, r, n, !1);
return Fe(e, r, n, !1);
}
var _r = Er, Cr = Rr;
J.Fragment = f, J.jsx = _r, J.jsxs = Cr;
}()), J;
var Dr = Er, _r = Rr;
H.Fragment = c, H.jsx = Dr, H.jsxs = _r;
}()), H;
}
(function(t) {
process.env.NODE_ENV === "production" ? t.exports = Mr() : t.exports = $r();
})(qe);
const S = qe.exports.jsx, He = (t) => {
var R, x;
const a = V(Y), {
useDrop: b
} = V(N), {
path: f,
moveRule: y,
independentCombinators: D
} = t, {
dropRef: v,
dropMonitorId: m,
process.env.NODE_ENV === "production" ? t.exports = $r() : t.exports = Mr();
})(Ue);
const x = Ue.exports.jsx, qe = ({
component: t,
path: a,
independentCombinators: h,
...c
}) => {
const {
useDrop: R
} = J(M), {
dropRef: m,
dropMonitorId: f,
isOver: i
} = wr({
path: f,
independentCombinators: D,
moveRule: y,
useDrop: b
}), g = i ? U.dndOver : "", s = xr(g, U.betweenRules), p = (x = (R = a.controlElements) == null ? void 0 : R.combinatorSelector) != null ? x : Ve.combinatorSelector;
return /* @__PURE__ */ S("div", {
ref: v,
className: s,
"data-dropmonitorid": m,
"data-testid": Ne.inlineCombinator,
children: /* @__PURE__ */ S(p, {
...t,
path: f,
testID: Ne.combinators
} = Sr({
path: a,
independentCombinators: h,
useDrop: R
}), s = i ? L.dndOver : "", p = xr(s, L.betweenRules);
return /* @__PURE__ */ x("div", {
ref: m,
className: p,
"data-dropmonitorid": f,
"data-testid": Me.inlineCombinator,
children: /* @__PURE__ */ x(t, {
...c,
path: a,
testID: Me.combinators
})
}, "dnd");
};
He.displayName = "InlineCombinatorDnD";
const Qe = (t) => {
const a = V(N), {
useDrag: b,
useDrop: f
qe.displayName = "InlineCombinatorDnD";
const He = (t) => {
const a = J(M), {
useDrag: h,
useDrop: c
} = a, {
path: y,
disabled: D,
parentDisabled: v,
path: R,
disabled: m,
parentDisabled: f,
actions: {
moveRule: m
moveRule: i
},
schema: {
independentCombinators: i
independentCombinators: s
}
} = t, s = Ir({
path: y,
disabled: !!v || !!D,
independentCombinators: i,
moveRule: m,
useDrag: b,
useDrop: f
}), p = Le(() => `${t.schema.classNames.rule}${s.isOver ? ` ${U.dndOver}` : ""}${s.isDragging ? ` ${U.dndDragging}` : ""}`, [s.isDragging, s.isOver, t.schema.classNames.rule]), {
rule: R
} = t, u = Ir({
path: R,
disabled: !!f || !!m,
independentCombinators: s,
moveRule: i,
useDrag: h,
useDrop: c
}), E = Be(() => `${t.schema.classNames.rule}${u.isOver ? ` ${L.dndOver}` : ""}${u.isDragging ? ` ${L.dndDragging}` : ""}`, [u.isDragging, u.isOver, t.schema.classNames.rule]), {
rule: _
} = a.baseControls;
return /* @__PURE__ */ S(N.Provider, {
return /* @__PURE__ */ x(M.Provider, {
value: a,
children: /* @__PURE__ */ S(R, {
children: /* @__PURE__ */ x(_, {
...t,

@@ -855,144 +871,148 @@ schema: {

...t.schema.classNames,
rule: p
rule: E
}
},
...s
...u
})
});
};
Qe.displayName = "RuleDnD";
const Je = (t) => {
const a = V(N), {
useDrag: b,
useDrop: f
He.displayName = "RuleDnD";
const Qe = (t) => {
const a = J(M), {
useDrag: h,
useDrop: c
} = a, {
path: y,
disabled: D,
parentDisabled: v,
path: R,
disabled: m,
parentDisabled: f,
actions: {
moveRule: m
moveRule: i
},
schema: {
independentCombinators: s
}
} = t, g = jr({
disabled: !!v || !!D,
path: y,
moveRule: m,
useDrag: b,
useDrop: f
}), s = Le(() => ({
} = t, u = jr({
disabled: !!f || !!m,
path: R,
independentCombinators: s,
moveRule: i,
useDrag: h,
useDrop: c
}), E = Be(() => ({
...t.schema,
classNames: {
...t.schema.classNames,
header: `${t.schema.classNames.header}${g.isOver ? ` ${U.dndOver}` : ""}`,
ruleGroup: `${t.schema.classNames.ruleGroup}${g.isDragging ? ` ${U.dndDragging}` : ""}`
header: `${t.schema.classNames.header}${u.isOver ? ` ${L.dndOver}` : ""}`,
ruleGroup: `${t.schema.classNames.ruleGroup}${u.isDragging ? ` ${L.dndDragging}` : ""}`
}
}), [t.schema, g.isOver, g.isDragging]), {
ruleGroup: p
}), [t.schema, u.isOver, u.isDragging]), {
ruleGroup: _
} = a.baseControls;
return /* @__PURE__ */ S(p, {
return /* @__PURE__ */ x(_, {
...t,
schema: s,
...g
schema: E,
...u
});
};
Je.displayName = "RuleGroupDnD";
Qe.displayName = "RuleGroupDnD";
const Nr = (t) => {
const {
controlClassnames: a,
controlElements: b,
debugMode: f,
enableDragAndDrop: y,
enableMountQueryChange: D,
translations: v
} = t, m = Sr({
controlElements: h,
debugMode: c,
enableDragAndDrop: R,
enableMountQueryChange: m,
translations: f
} = t, i = wr({
controlClassnames: a,
controlElements: b,
debugMode: f,
enableDragAndDrop: y != null ? y : !0,
enableMountQueryChange: D,
translations: v != null ? v : {}
controlElements: h,
debugMode: c,
enableDragAndDrop: R != null ? R : !0,
enableMountQueryChange: m,
translations: f != null ? f : {}
}), {
enableDragAndDrop: i
} = m, g = Ue(t.dnd), s = i && g ? "dnd" : "no-dnd";
if (!i || !g)
return /* @__PURE__ */ S(Y.Provider, {
enableDragAndDrop: s
} = i, p = Le(t.dnd), u = s && p ? "dnd" : "no-dnd";
if (!s || !p)
return /* @__PURE__ */ x(Q.Provider, {
value: {
...m,
...i,
enableDragAndDrop: !1,
debugMode: f
debugMode: c
},
children: t.children
}, s);
}, u);
const {
DndProvider: p,
HTML5Backend: R
} = g;
return /* @__PURE__ */ S(p, {
backend: R,
debugMode: f,
children: /* @__PURE__ */ S(Y.Provider, {
DndProvider: E,
HTML5Backend: _
} = p;
return /* @__PURE__ */ x(E, {
backend: _,
debugMode: c,
children: /* @__PURE__ */ x(Q.Provider, {
value: {
...m,
enableDragAndDrop: i,
debugMode: f
...i,
enableDragAndDrop: s,
debugMode: c
},
children: /* @__PURE__ */ S(ze, {
dnd: g,
children: /* @__PURE__ */ x(Je, {
dnd: p,
children: t.children
})
}, s)
}, s);
}, u)
}, u);
};
Nr.displayName = "QueryBuilderDnD";
const ze = (t) => {
var R, x, I, c, _, P, E, A, z, K, X, Z;
const a = V(Y), b = V(N), f = Ue(t.dnd), y = We(!1, t.debugMode, a.debugMode), D = We(!0, t.enableDragAndDrop, a.enableDragAndDrop), v = D && f ? "dnd" : "no-dnd";
if (!D || !f)
return /* @__PURE__ */ S(Y.Provider, {
const Je = (t) => {
var _, S, I, A, O, y, g, P, F, z, K, X;
const a = J(Q), h = J(M), c = Le(t.dnd), R = Ne(!1, t.debugMode, a.debugMode), m = Ne(!0, t.enableDragAndDrop, a.enableDragAndDrop), f = m && c ? "dnd" : "no-dnd";
if (!m || !c)
return /* @__PURE__ */ x(Q.Provider, {
value: {
...a,
enableDragAndDrop: !1,
debugMode: y
debugMode: R
},
children: t.children
}, v);
}, f);
const {
DndContext: m,
useDrag: i,
useDrop: g
} = f, s = {
rule: (c = (I = (R = t.controlElements) == null ? void 0 : R.rule) != null ? I : (x = a.controlElements) == null ? void 0 : x.rule) != null ? c : b.baseControls.rule,
ruleGroup: (A = (E = (_ = t.controlElements) == null ? void 0 : _.ruleGroup) != null ? E : (P = a.controlElements) == null ? void 0 : P.ruleGroup) != null ? A : b.baseControls.ruleGroup,
combinatorSelector: (Z = (X = (z = t.controlElements) == null ? void 0 : z.combinatorSelector) != null ? X : (K = a.controlElements) == null ? void 0 : K.combinatorSelector) != null ? Z : b.baseControls.combinatorSelector
}, p = {
DndContext: i,
useDrag: s,
useDrop: p
} = c, u = {
rule: (A = (I = (_ = t.controlElements) == null ? void 0 : _.rule) != null ? I : (S = a.controlElements) == null ? void 0 : S.rule) != null ? A : h.baseControls.rule,
ruleGroup: (P = (g = (O = t.controlElements) == null ? void 0 : O.ruleGroup) != null ? g : (y = a.controlElements) == null ? void 0 : y.ruleGroup) != null ? P : h.baseControls.ruleGroup,
combinatorSelector: (X = (K = (F = t.controlElements) == null ? void 0 : F.combinatorSelector) != null ? K : (z = a.controlElements) == null ? void 0 : z.combinatorSelector) != null ? X : h.baseControls.combinatorSelector
}, E = {
...a,
controlElements: {
...a.controlElements,
ruleGroup: Je,
rule: Qe,
inlineCombinator: He
ruleGroup: Qe,
rule: He,
inlineCombinator: qe
}
};
return /* @__PURE__ */ S(m.Consumer, {
children: () => /* @__PURE__ */ S(Y.Provider, {
value: p,
children: /* @__PURE__ */ S(N.Provider, {
return /* @__PURE__ */ x(i.Consumer, {
children: () => /* @__PURE__ */ x(Q.Provider, {
value: E,
children: /* @__PURE__ */ x(M.Provider, {
value: {
useDrag: i,
useDrop: g,
baseControls: s
useDrag: s,
useDrop: p,
baseControls: u
},
children: t.children
})
}, v)
}, v);
}, f)
}, f);
};
ze.displayName = "QueryBuilderDndWithoutProvider";
Je.displayName = "QueryBuilderDndWithoutProvider";
export {
He as InlineCombinatorDnD,
qe as InlineCombinatorDnD,
Nr as QueryBuilderDnD,
ze as QueryBuilderDndWithoutProvider,
Qe as RuleDnD,
Je as RuleGroupDnD,
Je as QueryBuilderDndWithoutProvider,
He as RuleDnD,
Qe as RuleGroupDnD,
Br as version
};
//# sourceMappingURL=index.es.js.map

@@ -1,2 +0,2 @@

(function(w,k){typeof exports=="object"&&typeof module<"u"?k(exports,require("@react-querybuilder/ctx"),require("react"),require("react-querybuilder")):typeof define=="function"&&define.amd?define(["exports","@react-querybuilder/ctx","react","react-querybuilder"],k):(w=typeof globalThis<"u"?globalThis:w||self,k(w.ReactQueryBuilderDnD={},w.ReactQueryBuilderContext,w.React,w.ReactQueryBuilder))})(this,function(w,k,O,i){"use strict";const pe=(n=>n&&typeof n=="object"&&"default"in n?n:{default:n})(O),Ue="5.0.0-alpha.5",He=({path:n,independentCombinators:a,moveRule:R,useDrop:d})=>{const b=O.useRef(null),[{isOver:E,dropMonitorId:p},m]=d(()=>({accept:[i.DNDType.rule,i.DNDType.ruleGroup],canDrop:s=>{const g=i.getParentPath(n),l=i.getParentPath(s.path),h=n[n.length-1],C=s.path[s.path.length-1];return!(i.isAncestor(s.path,n)||i.pathsAreEqual(s.path,n)||i.pathsAreEqual(g,l)&&h-1===C||a&&i.pathsAreEqual(g,l)&&h===C-1)},collect:s=>({isOver:s.canDrop()&&s.isOver(),dropMonitorId:s.getHandlerId()}),drop:(s,g)=>{const l=i.getParentPath(n),h=n[n.length-1];R(s.path,[...l,h])}}),[R,n,a]);return m(b),{dropRef:b,dropMonitorId:p,isOver:E}},ge=n=>{const[a,R]=O.useState(n!=null?n:null);return O.useEffect(()=>{let d=!1;return a||(async()=>{const[E,p]=await Promise.all([import("react-dnd").catch(()=>null),import("react-dnd-html5-backend").catch(()=>null)]);d||E&&p&&R(()=>({...E,...p}))})(),()=>{d=!0}},[]),a},qe=({path:n,disabled:a,independentCombinators:R,moveRule:d,useDrag:b,useDrop:E})=>{const p=O.useRef(null),m=O.useRef(null),[{isDragging:s,dragMonitorId:g},l,h]=b(()=>({type:i.DNDType.rule,item:()=>({path:n}),canDrag:!a,collect:f=>{var _;return{isDragging:!a&&f.isDragging(),dragMonitorId:(_=f.getHandlerId())!=null?_:""}}}),[a,n]),[{isOver:C,dropMonitorId:I},N]=E(()=>({accept:[i.DNDType.rule,i.DNDType.ruleGroup],canDrop:f=>{if(a)return!1;const _=i.getParentPath(n),x=i.getParentPath(f.path),y=n[n.length-1],B=f.path[f.path.length-1];return!(i.isAncestor(f.path,n)||i.pathsAreEqual(_,x)&&(y===B||y===B-1||R&&y===B-2))},collect:f=>{var _;return{isOver:f.canDrop()&&f.isOver(),dropMonitorId:(_=f.getHandlerId())!=null?_:""}},drop:(f,_)=>{const x=i.getParentPath(n),y=n[n.length-1];d(f.path,[...x,y+1])}}),[a,R,d,n]);return l(m),h(N(p)),{isDragging:s,dragMonitorId:g,isOver:C,dropMonitorId:I,dndRef:p,dragRef:m}},Je=({disabled:n,path:a,moveRule:R,useDrag:d,useDrop:b})=>{const E=O.useRef(null),p=O.useRef(null),m=O.useRef(null),[{isDragging:s,dragMonitorId:g},l,h]=d(()=>({type:i.DNDType.ruleGroup,item:()=>({path:a}),canDrag:!n,collect:f=>{var _;return{isDragging:!n&&f.isDragging(),dragMonitorId:(_=f.getHandlerId())!=null?_:""}}}),[n,a]),[{isOver:C,dropMonitorId:I},N]=b(()=>({accept:[i.DNDType.rule,i.DNDType.ruleGroup],canDrop:f=>{if(n)return!1;const _=i.getParentPath(f.path),x=f.path[f.path.length-1];return!(i.isAncestor(f.path,a)||i.pathsAreEqual(a,_)&&x===0||i.pathsAreEqual(a,f.path))},collect:f=>{var _;return{isOver:f.canDrop()&&f.isOver(),dropMonitorId:(_=f.getHandlerId())!=null?_:""}},drop:(f,_)=>!n&&R(f.path,[...a,0])}),[n,R,a]);return a.length>0&&(l(p),h(E)),N(m),{isDragging:s,dragMonitorId:g,isOver:C,dropMonitorId:I,previewRef:E,dragRef:p,dropRef:m}},{rule:ze,ruleGroup:Ke,combinatorSelector:Xe}=i.defaultControlElements,W=O.createContext({baseControls:{rule:ze,ruleGroup:Ke,combinatorSelector:Xe}});W.displayName="QueryBuilderDndContext";var he={exports:{}},V={};/**
(function(w,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("react"),require("react-querybuilder"),require("@react-querybuilder/ctx")):typeof define=="function"&&define.amd?define(["exports","react","react-querybuilder","@react-querybuilder/ctx"],C):(w=typeof globalThis<"u"?globalThis:w||self,C(w.ReactQueryBuilderDnD={},w.React,w.ReactQueryBuilder,w.ReactQueryBuilderContext))})(this,function(w,C,D,V){"use strict";const pe=(t=>t&&typeof t=="object"&&"default"in t?t:{default:t})(C),He="5.0.0-alpha.6",qe=({path:t,independentCombinators:a,useDrop:h})=>{const c=C.useRef(null),[{isOver:b,dropMonitorId:m},f]=h(()=>({accept:["rule","ruleGroup"],canDrop:s=>{const i=D.getParentPath(t),p=D.getParentPath(s.path),u=t[t.length-1],y=s.path[s.path.length-1];return!(D.isAncestor(s.path,t)||D.pathsAreEqual(s.path,t)||D.pathsAreEqual(i,p)&&u-1===y||a&&D.pathsAreEqual(i,p)&&u===y-1)},collect:s=>{var i,p;return{isOver:s.canDrop()&&s.isOver(),dropMonitorId:(i=s.getHandlerId())!=null?i:"",dropEffect:((p=s.getDropResult())!=null?p:{}).dropEffect}},drop:()=>({type:"inlineCombinator",path:t})}),[t,a]);return f(c),{dropRef:c,dropMonitorId:m,isOver:b}},ge=t=>{const[a,h]=C.useState(t!=null?t:null);return C.useEffect(()=>{let c=!1;return a||(async()=>{const[m,f]=await Promise.all([import("react-dnd").catch(()=>null),import("react-dnd-html5-backend").catch(()=>null)]);c||m&&f&&h(()=>({...m,...f}))})(),()=>{c=!0}},[]),a},he=({type:t,path:a,disabled:h,moveRule:c,useDrag:b})=>b(()=>({type:t,item:{path:a},canDrag:!h,collect:m=>{var f;return{isDragging:!h&&m.isDragging(),dragMonitorId:(f=m.getHandlerId())!=null?f:""}},end(m,f){const s=f.getDropResult();if(!s)return;const i=D.getParentPath(s.path),p=s.path[s.path.length-1],u=s.type==="ruleGroup"?[...s.path,0]:s.type==="inlineCombinator"?[...i,p]:[...i,p+1];c(m.path,u,s.dropEffect==="copy")}}),[h,a]),Je=({path:t,disabled:a,independentCombinators:h,moveRule:c,useDrag:b,useDrop:m})=>{const f=C.useRef(null),s=C.useRef(null),[{isDragging:i,dragMonitorId:p},u,y]=he({type:"rule",path:t,disabled:a,independentCombinators:h,moveRule:c,useDrag:b}),[{isOver:P,dropMonitorId:A,dropEffect:k},N]=m(()=>({accept:["rule","ruleGroup"],canDrop:T=>{if(a)return!1;const E=D.getParentPath(t),g=D.getParentPath(T.path),x=t[t.length-1],B=T.path[T.path.length-1];return!(D.isAncestor(T.path,t)||D.pathsAreEqual(E,g)&&(x===B||x===B-1||h&&x===B-2))},collect:T=>{var E,g;return{isOver:T.canDrop()&&T.isOver(),dropMonitorId:(E=T.getHandlerId())!=null?E:"",dropEffect:((g=T.getDropResult())!=null?g:{}).dropEffect}},drop:()=>({type:"rule",path:t})}),[a,h,c,t]);return u(s),y(N(f)),{isDragging:i,dragMonitorId:p,isOver:P,dropMonitorId:A,dndRef:f,dragRef:s,dropEffect:k}},ze=({disabled:t,path:a,independentCombinators:h,moveRule:c,useDrag:b,useDrop:m})=>{const f=C.useRef(null),s=C.useRef(null),i=C.useRef(null),[{isDragging:p,dragMonitorId:u},y,P]=he({type:"ruleGroup",path:a,disabled:t,independentCombinators:h,moveRule:c,useDrag:b}),[{isOver:A,dropMonitorId:k,dropEffect:N},T]=m(()=>({accept:["rule","ruleGroup"],canDrop:E=>{if(t)return!1;const g=D.getParentPath(E.path),x=E.path[E.path.length-1];return!(D.isAncestor(E.path,a)||D.pathsAreEqual(a,g)&&x===0||D.pathsAreEqual(a,E.path))},collect:E=>{var g,x;return{isOver:E.canDrop()&&E.isOver(),dropMonitorId:(g=E.getHandlerId())!=null?g:"",dropEffect:((x=E.getDropResult())!=null?x:{}).dropEffect}},drop:(E,g)=>{var x;return(x=g.getDropResult())!=null?x:{type:"ruleGroup",path:a}}}),[t,c,a]);return a.length>0&&(y(s),P(f)),T(i),{isDragging:p,dragMonitorId:u,isOver:A,dropMonitorId:k,previewRef:f,dragRef:s,dropRef:i,dropEffect:N}},{rule:Ke,ruleGroup:$e,combinatorSelector:Xe}=D.defaultControlElements,W=C.createContext({baseControls:{rule:Ke,ruleGroup:$e,combinatorSelector:Xe}});W.displayName="QueryBuilderDndContext";var me={exports:{}},U={};/**
* @license React

@@ -9,3 +9,3 @@ * react-jsx-runtime.production.min.js

* LICENSE file in the root directory of this source tree.
*/var me;function $e(){if(me)return V;me=1;var n=pe.default,a=Symbol.for("react.element"),R=Symbol.for("react.fragment"),d=Object.prototype.hasOwnProperty,b=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,E={key:!0,ref:!0,__self:!0,__source:!0};function p(m,s,g){var l,h={},C=null,I=null;g!==void 0&&(C=""+g),s.key!==void 0&&(C=""+s.key),s.ref!==void 0&&(I=s.ref);for(l in s)d.call(s,l)&&!E.hasOwnProperty(l)&&(h[l]=s[l]);if(m&&m.defaultProps)for(l in s=m.defaultProps,s)h[l]===void 0&&(h[l]=s[l]);return{$$typeof:a,type:m,key:C,ref:I,props:h,_owner:b.current}}return V.Fragment=R,V.jsx=p,V.jsxs=p,V}var U={};/**
*/var De;function Ze(){if(De)return U;De=1;var t=pe.default,a=Symbol.for("react.element"),h=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,b=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,m={key:!0,ref:!0,__self:!0,__source:!0};function f(s,i,p){var u,y={},P=null,A=null;p!==void 0&&(P=""+p),i.key!==void 0&&(P=""+i.key),i.ref!==void 0&&(A=i.ref);for(u in i)c.call(i,u)&&!m.hasOwnProperty(u)&&(y[u]=i[u]);if(s&&s.defaultProps)for(u in i=s.defaultProps,i)y[u]===void 0&&(y[u]=i[u]);return{$$typeof:a,type:s,key:P,ref:A,props:y,_owner:b.current}}return U.Fragment=h,U.jsx=f,U.jsxs=f,U}var H={};/**
* @license React

@@ -18,13 +18,13 @@ * react-jsx-runtime.development.js

* LICENSE file in the root directory of this source tree.
*/var De;function Ze(){return De||(De=1,process.env.NODE_ENV!=="production"&&function(){var n=pe.default,a=Symbol.for("react.element"),R=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),m=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),I=Symbol.for("react.offscreen"),N=Symbol.iterator,f="@@iterator";function _(e){if(e===null||typeof e!="object")return null;var r=N&&e[N]||e[f];return typeof r=="function"?r:null}var x=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),o=1;o<r;o++)t[o-1]=arguments[o];B("error",e,t)}}function B(e,r,t){{var o=x.ReactDebugCurrentFrame,v=o.getStackAddendum();v!==""&&(r+="%s",t=t.concat([v]));var D=t.map(function(c){return String(c)});D.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,D)}}var J=!1,z=!1,K=!1,X=!1,Qe=!1,Ee;Ee=Symbol.for("react.module.reference");function er(e){return!!(typeof e=="string"||typeof e=="function"||e===d||e===E||Qe||e===b||e===g||e===l||X||e===I||J||z||K||typeof e=="object"&&e!==null&&(e.$$typeof===C||e.$$typeof===h||e.$$typeof===p||e.$$typeof===m||e.$$typeof===s||e.$$typeof===Ee||e.getModuleId!==void 0))}function rr(e,r,t){var o=e.displayName;if(o)return o;var v=r.displayName||r.name||"";return v!==""?t+"("+v+")":t}function be(e){return e.displayName||"Context"}function M(e){if(e==null)return null;if(typeof e.tag=="number"&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case d:return"Fragment";case R:return"Portal";case E:return"Profiler";case b:return"StrictMode";case g:return"Suspense";case l:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case m:var r=e;return be(r)+".Consumer";case p:var t=e;return be(t._context)+".Provider";case s:return rr(e,e.render,"ForwardRef");case h:var o=e.displayName||null;return o!==null?o:M(e.type)||"Memo";case C:{var v=e,D=v._payload,c=v._init;try{return M(c(D))}catch{return null}}}return null}var G=Object.assign,H=0,Ce,ye,_e,Pe,Te,Oe,xe;function Se(){}Se.__reactDisabledLog=!0;function nr(){{if(H===0){Ce=console.log,ye=console.info,_e=console.warn,Pe=console.error,Te=console.group,Oe=console.groupCollapsed,xe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Se,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}H++}}function tr(){{if(H--,H===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:G({},e,{value:Ce}),info:G({},e,{value:ye}),warn:G({},e,{value:_e}),error:G({},e,{value:Pe}),group:G({},e,{value:Te}),groupCollapsed:G({},e,{value:Oe}),groupEnd:G({},e,{value:xe})})}H<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var se=x.ReactCurrentDispatcher,ie;function $(e,r,t){{if(ie===void 0)try{throw Error()}catch(v){var o=v.stack.trim().match(/\n( *(at )?)/);ie=o&&o[1]||""}return`
`+ie+e}}var le=!1,Z;{var ar=typeof WeakMap=="function"?WeakMap:Map;Z=new ar}function we(e,r){if(!e||le)return"";{var t=Z.get(e);if(t!==void 0)return t}var o;le=!0;var v=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var D;D=se.current,se.current=null,nr();try{if(r){var c=function(){throw Error()};if(Object.defineProperty(c.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(c,[])}catch(F){o=F}Reflect.construct(e,[],c)}else{try{c.call()}catch(F){o=F}e.call(c.prototype)}}else{try{throw Error()}catch(F){o=F}e()}}catch(F){if(F&&o&&typeof F.stack=="string"){for(var u=F.stack.split(`
*/var Re;function Qe(){return Re||(Re=1,process.env.NODE_ENV!=="production"&&function(){var t=pe.default,a=Symbol.for("react.element"),h=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),s=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),k=Symbol.iterator,N="@@iterator";function T(e){if(e===null||typeof e!="object")return null;var r=k&&e[k]||e[N];return typeof r=="function"?r:null}var E=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(e){{for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];x("error",e,n)}}function x(e,r,n){{var o=E.ReactDebugCurrentFrame,v=o.getStackAddendum();v!==""&&(r+="%s",n=n.concat([v]));var R=n.map(function(d){return String(d)});R.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,R)}}var B=!1,z=!1,K=!1,$=!1,er=!1,be;be=Symbol.for("react.module.reference");function rr(e){return!!(typeof e=="string"||typeof e=="function"||e===c||e===m||er||e===b||e===p||e===u||$||e===A||B||z||K||typeof e=="object"&&e!==null&&(e.$$typeof===P||e.$$typeof===y||e.$$typeof===f||e.$$typeof===s||e.$$typeof===i||e.$$typeof===be||e.getModuleId!==void 0))}function nr(e,r,n){var o=e.displayName;if(o)return o;var v=r.displayName||r.name||"";return v!==""?n+"("+v+")":n}function ye(e){return e.displayName||"Context"}function M(e){if(e==null)return null;if(typeof e.tag=="number"&&g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case c:return"Fragment";case h:return"Portal";case m:return"Profiler";case b:return"StrictMode";case p:return"Suspense";case u:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case s:var r=e;return ye(r)+".Consumer";case f:var n=e;return ye(n._context)+".Provider";case i:return nr(e,e.render,"ForwardRef");case y:var o=e.displayName||null;return o!==null?o:M(e.type)||"Memo";case P:{var v=e,R=v._payload,d=v._init;try{return M(d(R))}catch{return null}}}return null}var G=Object.assign,q=0,Ce,_e,Pe,Oe,Te,xe,Se;function we(){}we.__reactDisabledLog=!0;function tr(){{if(q===0){Ce=console.log,_e=console.info,Pe=console.warn,Oe=console.error,Te=console.group,xe=console.groupCollapsed,Se=console.groupEnd;var e={configurable:!0,enumerable:!0,value:we,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}q++}}function ar(){{if(q--,q===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:G({},e,{value:Ce}),info:G({},e,{value:_e}),warn:G({},e,{value:Pe}),error:G({},e,{value:Oe}),group:G({},e,{value:Te}),groupCollapsed:G({},e,{value:xe}),groupEnd:G({},e,{value:Se})})}q<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var se=E.ReactCurrentDispatcher,ie;function X(e,r,n){{if(ie===void 0)try{throw Error()}catch(v){var o=v.stack.trim().match(/\n( *(at )?)/);ie=o&&o[1]||""}return`
`+ie+e}}var ue=!1,Z;{var or=typeof WeakMap=="function"?WeakMap:Map;Z=new or}function Ie(e,r){if(!e||ue)return"";{var n=Z.get(e);if(n!==void 0)return n}var o;ue=!0;var v=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var R;R=se.current,se.current=null,tr();try{if(r){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(F){o=F}Reflect.construct(e,[],d)}else{try{d.call()}catch(F){o=F}e.call(d.prototype)}}else{try{throw Error()}catch(F){o=F}e()}}catch(F){if(F&&o&&typeof F.stack=="string"){for(var l=F.stack.split(`
`),S=o.stack.split(`
`),P=u.length-1,T=S.length-1;P>=1&&T>=0&&u[P]!==S[T];)T--;for(;P>=1&&T>=0;P--,T--)if(u[P]!==S[T]){if(P!==1||T!==1)do if(P--,T--,T<0||u[P]!==S[T]){var A=`
`+u[P].replace(" at new "," at ");return e.displayName&&A.includes("<anonymous>")&&(A=A.replace("<anonymous>",e.displayName)),typeof e=="function"&&Z.set(e,A),A}while(P>=1&&T>=0);break}}}finally{le=!1,se.current=D,tr(),Error.prepareStackTrace=v}var L=e?e.displayName||e.name:"",Ve=L?$(L):"";return typeof e=="function"&&Z.set(e,Ve),Ve}function or(e,r,t){return we(e,!1)}function sr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function Q(e,r,t){if(e==null)return"";if(typeof e=="function")return we(e,sr(e));if(typeof e=="string")return $(e);switch(e){case g:return $("Suspense");case l:return $("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case s:return or(e.render);case h:return Q(e.type,r,t);case C:{var o=e,v=o._payload,D=o._init;try{return Q(D(v),r,t)}catch{}}}return""}var ee=Object.prototype.hasOwnProperty,Ie={},je=x.ReactDebugCurrentFrame;function re(e){if(e){var r=e._owner,t=Q(e.type,e._source,r?r.type:null);je.setExtraStackFrame(t)}else je.setExtraStackFrame(null)}function ir(e,r,t,o,v){{var D=Function.call.bind(ee);for(var c in e)if(D(e,c)){var u=void 0;try{if(typeof e[c]!="function"){var S=Error((o||"React class")+": "+t+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw S.name="Invariant Violation",S}u=e[c](r,c,o,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(P){u=P}u&&!(u instanceof Error)&&(re(v),y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",o||"React class",t,c,typeof u),re(null)),u instanceof Error&&!(u.message in Ie)&&(Ie[u.message]=!0,re(v),y("Failed %s type: %s",t,u.message),re(null))}}}var lr=Array.isArray;function ue(e){return lr(e)}function ur(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function cr(e){try{return Ae(e),!1}catch{return!0}}function Ae(e){return""+e}function ke(e){if(cr(e))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ur(e)),Ae(e)}var q=x.ReactCurrentOwner,fr={key:!0,ref:!0,__self:!0,__source:!0},Ne,Me,ce;ce={};function dr(e){if(ee.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function vr(e){if(ee.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function pr(e,r){if(typeof e.ref=="string"&&q.current&&r&&q.current.stateNode!==r){var t=M(q.current.type);ce[t]||(y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',M(q.current.type),e.ref),ce[t]=!0)}}function gr(e,r){{var t=function(){Ne||(Ne=!0,y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function hr(e,r){{var t=function(){Me||(Me=!0,y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var mr=function(e,r,t,o,v,D,c){var u={$$typeof:a,type:e,key:r,ref:t,props:c,_owner:D};return u._store={},Object.defineProperty(u._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(u,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(u,"_source",{configurable:!1,enumerable:!1,writable:!1,value:v}),Object.freeze&&(Object.freeze(u.props),Object.freeze(u)),u};function Dr(e,r,t,o,v){{var D,c={},u=null,S=null;t!==void 0&&(ke(t),u=""+t),vr(r)&&(ke(r.key),u=""+r.key),dr(r)&&(S=r.ref,pr(r,v));for(D in r)ee.call(r,D)&&!fr.hasOwnProperty(D)&&(c[D]=r[D]);if(e&&e.defaultProps){var P=e.defaultProps;for(D in P)c[D]===void 0&&(c[D]=P[D])}if(u||S){var T=typeof e=="function"?e.displayName||e.name||"Unknown":e;u&&gr(c,T),S&&hr(c,T)}return mr(e,u,S,v,o,q.current,c)}}var fe=x.ReactCurrentOwner,Fe=x.ReactDebugCurrentFrame;function Y(e){if(e){var r=e._owner,t=Q(e.type,e._source,r?r.type:null);Fe.setExtraStackFrame(t)}else Fe.setExtraStackFrame(null)}var de;de=!1;function ve(e){return typeof e=="object"&&e!==null&&e.$$typeof===a}function Be(){{if(fe.current){var e=M(fe.current.type);if(e)return`
`),_=l.length-1,O=S.length-1;_>=1&&O>=0&&l[_]!==S[O];)O--;for(;_>=1&&O>=0;_--,O--)if(l[_]!==S[O]){if(_!==1||O!==1)do if(_--,O--,O<0||l[_]!==S[O]){var j=`
`+l[_].replace(" at new "," at ");return e.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",e.displayName)),typeof e=="function"&&Z.set(e,j),j}while(_>=1&&O>=0);break}}}finally{ue=!1,se.current=R,ar(),Error.prepareStackTrace=v}var L=e?e.displayName||e.name:"",Ue=L?X(L):"";return typeof e=="function"&&Z.set(e,Ue),Ue}function sr(e,r,n){return Ie(e,!1)}function ir(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function Q(e,r,n){if(e==null)return"";if(typeof e=="function")return Ie(e,ir(e));if(typeof e=="string")return X(e);switch(e){case p:return X("Suspense");case u:return X("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case i:return sr(e.render);case y:return Q(e.type,r,n);case P:{var o=e,v=o._payload,R=o._init;try{return Q(R(v),r,n)}catch{}}}return""}var ee=Object.prototype.hasOwnProperty,je={},Ae=E.ReactDebugCurrentFrame;function re(e){if(e){var r=e._owner,n=Q(e.type,e._source,r?r.type:null);Ae.setExtraStackFrame(n)}else Ae.setExtraStackFrame(null)}function ur(e,r,n,o,v){{var R=Function.call.bind(ee);for(var d in e)if(R(e,d)){var l=void 0;try{if(typeof e[d]!="function"){var S=Error((o||"React class")+": "+n+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw S.name="Invariant Violation",S}l=e[d](r,d,o,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(_){l=_}l&&!(l instanceof Error)&&(re(v),g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",o||"React class",n,d,typeof l),re(null)),l instanceof Error&&!(l.message in je)&&(je[l.message]=!0,re(v),g("Failed %s type: %s",n,l.message),re(null))}}}var lr=Array.isArray;function le(e){return lr(e)}function cr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,n=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function fr(e){try{return ke(e),!1}catch{return!0}}function ke(e){return""+e}function Me(e){if(fr(e))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",cr(e)),ke(e)}var J=E.ReactCurrentOwner,dr={key:!0,ref:!0,__self:!0,__source:!0},Fe,Ne,ce;ce={};function vr(e){if(ee.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function pr(e){if(ee.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function gr(e,r){if(typeof e.ref=="string"&&J.current&&r&&J.current.stateNode!==r){var n=M(J.current.type);ce[n]||(g('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',M(J.current.type),e.ref),ce[n]=!0)}}function hr(e,r){{var n=function(){Fe||(Fe=!0,g("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}}function mr(e,r){{var n=function(){Ne||(Ne=!0,g("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}}var Dr=function(e,r,n,o,v,R,d){var l={$$typeof:a,type:e,key:r,ref:n,props:d,_owner:R};return l._store={},Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:v}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function Rr(e,r,n,o,v){{var R,d={},l=null,S=null;n!==void 0&&(Me(n),l=""+n),pr(r)&&(Me(r.key),l=""+r.key),vr(r)&&(S=r.ref,gr(r,v));for(R in r)ee.call(r,R)&&!dr.hasOwnProperty(R)&&(d[R]=r[R]);if(e&&e.defaultProps){var _=e.defaultProps;for(R in _)d[R]===void 0&&(d[R]=_[R])}if(l||S){var O=typeof e=="function"?e.displayName||e.name||"Unknown":e;l&&hr(d,O),S&&mr(d,O)}return Dr(e,l,S,v,o,J.current,d)}}var fe=E.ReactCurrentOwner,Be=E.ReactDebugCurrentFrame;function Y(e){if(e){var r=e._owner,n=Q(e.type,e._source,r?r.type:null);Be.setExtraStackFrame(n)}else Be.setExtraStackFrame(null)}var de;de=!1;function ve(e){return typeof e=="object"&&e!==null&&e.$$typeof===a}function We(){{if(fe.current){var e=M(fe.current.type);if(e)return`
Check the render method of \``+e+"`."}return""}}function Rr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
Check the render method of \``+e+"`."}return""}}function Er(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),n=e.lineNumber;return`
Check your code at `+r+":"+t+"."}return""}}var We={};function Er(e){{var r=Be();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
Check your code at `+r+":"+n+"."}return""}}var Ge={};function br(e){{var r=We();if(!r){var n=typeof e=="string"?e:e.displayName||e.name;n&&(r=`
Check the top-level render call using <`+t+">.")}return r}}function Ge(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=Er(r);if(We[t])return;We[t]=!0;var o="";e&&e._owner&&e._owner!==fe.current&&(o=" It was passed a child from "+M(e._owner.type)+"."),Y(e),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,o),Y(null)}}function Ye(e,r){{if(typeof e!="object")return;if(ue(e))for(var t=0;t<e.length;t++){var o=e[t];ve(o)&&Ge(o,r)}else if(ve(e))e._store&&(e._store.validated=!0);else if(e){var v=_(e);if(typeof v=="function"&&v!==e.entries)for(var D=v.call(e),c;!(c=D.next()).done;)ve(c.value)&&Ge(c.value,r)}}}function br(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===s||r.$$typeof===h))t=r.propTypes;else return;if(t){var o=M(r);ir(t,e.props,"prop",o,e)}else if(r.PropTypes!==void 0&&!de){de=!0;var v=M(r);y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",v||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Cr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var o=r[t];if(o!=="children"&&o!=="key"){Y(e),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",o),Y(null);break}}e.ref!==null&&(Y(e),y("Invalid attribute `ref` supplied to `React.Fragment`."),Y(null))}}function Le(e,r,t,o,v,D){{var c=er(e);if(!c){var u="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(u+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var S=Rr(v);S?u+=S:u+=Be();var P;e===null?P="null":ue(e)?P="array":e!==void 0&&e.$$typeof===a?(P="<"+(M(e.type)||"Unknown")+" />",u=" Did you accidentally export a JSX literal instead of a component?"):P=typeof e,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",P,u)}var T=Dr(e,r,t,v,D);if(T==null)return T;if(c){var A=r.children;if(A!==void 0)if(o)if(ue(A)){for(var L=0;L<A.length;L++)Ye(A[L],e);Object.freeze&&Object.freeze(A)}else y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ye(A,e)}return e===d?Cr(T):br(T),T}}function yr(e,r,t){return Le(e,r,t,!0)}function _r(e,r,t){return Le(e,r,t,!1)}var Pr=_r,Tr=yr;U.Fragment=d,U.jsx=Pr,U.jsxs=Tr}()),U}(function(n){process.env.NODE_ENV==="production"?n.exports=$e():n.exports=Ze()})(he);const j=he.exports.jsx,ne=n=>{var C,I;const a=O.useContext(k.QueryBuilderContext),{useDrop:R}=O.useContext(W),{path:d,moveRule:b,independentCombinators:E}=n,{dropRef:p,dropMonitorId:m,isOver:s}=He({path:d,independentCombinators:E,moveRule:b,useDrop:R}),g=s?i.standardClassnames.dndOver:"",l=i.c(g,i.standardClassnames.betweenRules),h=(I=(C=a.controlElements)==null?void 0:C.combinatorSelector)!=null?I:i.defaultControlElements.combinatorSelector;return j("div",{ref:p,className:l,"data-dropmonitorid":m,"data-testid":i.TestID.inlineCombinator,children:j(h,{...n,path:d,testID:i.TestID.combinators})},"dnd")};ne.displayName="InlineCombinatorDnD";const te=n=>{const a=O.useContext(W),{useDrag:R,useDrop:d}=a,{path:b,disabled:E,parentDisabled:p,actions:{moveRule:m},schema:{independentCombinators:s}}=n,l=qe({path:b,disabled:!!p||!!E,independentCombinators:s,moveRule:m,useDrag:R,useDrop:d}),h=O.useMemo(()=>`${n.schema.classNames.rule}${l.isOver?` ${i.standardClassnames.dndOver}`:""}${l.isDragging?` ${i.standardClassnames.dndDragging}`:""}`,[l.isDragging,l.isOver,n.schema.classNames.rule]),{rule:C}=a.baseControls;return j(W.Provider,{value:a,children:j(C,{...n,schema:{...n.schema,classNames:{...n.schema.classNames,rule:h}},...l})})};te.displayName="RuleDnD";const ae=n=>{const a=O.useContext(W),{useDrag:R,useDrop:d}=a,{path:b,disabled:E,parentDisabled:p,actions:{moveRule:m}}=n,g=Je({disabled:!!p||!!E,path:b,moveRule:m,useDrag:R,useDrop:d}),l=O.useMemo(()=>({...n.schema,classNames:{...n.schema.classNames,header:`${n.schema.classNames.header}${g.isOver?` ${i.standardClassnames.dndOver}`:""}`,ruleGroup:`${n.schema.classNames.ruleGroup}${g.isDragging?` ${i.standardClassnames.dndDragging}`:""}`}}),[n.schema,g.isOver,g.isDragging]),{ruleGroup:h}=a.baseControls;return j(h,{...n,schema:l,...g})};ae.displayName="RuleGroupDnD";const Re=n=>{const{controlClassnames:a,controlElements:R,debugMode:d,enableDragAndDrop:b,enableMountQueryChange:E,translations:p}=n,m=i.useMergedContext({controlClassnames:a,controlElements:R,debugMode:d,enableDragAndDrop:b!=null?b:!0,enableMountQueryChange:E,translations:p!=null?p:{}}),{enableDragAndDrop:s}=m,g=ge(n.dnd),l=s&&g?"dnd":"no-dnd";if(!s||!g)return j(k.QueryBuilderContext.Provider,{value:{...m,enableDragAndDrop:!1,debugMode:d},children:n.children},l);const{DndProvider:h,HTML5Backend:C}=g;return j(h,{backend:C,debugMode:d,children:j(k.QueryBuilderContext.Provider,{value:{...m,enableDragAndDrop:s,debugMode:d},children:j(oe,{dnd:g,children:n.children})},l)},l)};Re.displayName="QueryBuilderDnD";const oe=n=>{var C,I,N,f,_,x,y,B,J,z,K,X;const a=O.useContext(k.QueryBuilderContext),R=O.useContext(W),d=ge(n.dnd),b=i.usePreferProp(!1,n.debugMode,a.debugMode),E=i.usePreferProp(!0,n.enableDragAndDrop,a.enableDragAndDrop),p=E&&d?"dnd":"no-dnd";if(!E||!d)return j(k.QueryBuilderContext.Provider,{value:{...a,enableDragAndDrop:!1,debugMode:b},children:n.children},p);const{DndContext:m,useDrag:s,useDrop:g}=d,l={rule:(f=(N=(C=n.controlElements)==null?void 0:C.rule)!=null?N:(I=a.controlElements)==null?void 0:I.rule)!=null?f:R.baseControls.rule,ruleGroup:(B=(y=(_=n.controlElements)==null?void 0:_.ruleGroup)!=null?y:(x=a.controlElements)==null?void 0:x.ruleGroup)!=null?B:R.baseControls.ruleGroup,combinatorSelector:(X=(K=(J=n.controlElements)==null?void 0:J.combinatorSelector)!=null?K:(z=a.controlElements)==null?void 0:z.combinatorSelector)!=null?X:R.baseControls.combinatorSelector},h={...a,controlElements:{...a.controlElements,ruleGroup:ae,rule:te,inlineCombinator:ne}};return j(m.Consumer,{children:()=>j(k.QueryBuilderContext.Provider,{value:h,children:j(W.Provider,{value:{useDrag:s,useDrop:g,baseControls:l},children:n.children})},p)},p)};oe.displayName="QueryBuilderDndWithoutProvider",w.InlineCombinatorDnD=ne,w.QueryBuilderDnD=Re,w.QueryBuilderDndWithoutProvider=oe,w.RuleDnD=te,w.RuleGroupDnD=ae,w.version=Ue,Object.defineProperties(w,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
Check the top-level render call using <`+n+">.")}return r}}function Ye(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var n=br(r);if(Ge[n])return;Ge[n]=!0;var o="";e&&e._owner&&e._owner!==fe.current&&(o=" It was passed a child from "+M(e._owner.type)+"."),Y(e),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,o),Y(null)}}function Le(e,r){{if(typeof e!="object")return;if(le(e))for(var n=0;n<e.length;n++){var o=e[n];ve(o)&&Ye(o,r)}else if(ve(e))e._store&&(e._store.validated=!0);else if(e){var v=T(e);if(typeof v=="function"&&v!==e.entries)for(var R=v.call(e),d;!(d=R.next()).done;)ve(d.value)&&Ye(d.value,r)}}}function yr(e){{var r=e.type;if(r==null||typeof r=="string")return;var n;if(typeof r=="function")n=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===i||r.$$typeof===y))n=r.propTypes;else return;if(n){var o=M(r);ur(n,e.props,"prop",o,e)}else if(r.PropTypes!==void 0&&!de){de=!0;var v=M(r);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",v||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Cr(e){{for(var r=Object.keys(e.props),n=0;n<r.length;n++){var o=r[n];if(o!=="children"&&o!=="key"){Y(e),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",o),Y(null);break}}e.ref!==null&&(Y(e),g("Invalid attribute `ref` supplied to `React.Fragment`."),Y(null))}}function Ve(e,r,n,o,v,R){{var d=rr(e);if(!d){var l="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(l+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var S=Er(v);S?l+=S:l+=We();var _;e===null?_="null":le(e)?_="array":e!==void 0&&e.$$typeof===a?(_="<"+(M(e.type)||"Unknown")+" />",l=" Did you accidentally export a JSX literal instead of a component?"):_=typeof e,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",_,l)}var O=Rr(e,r,n,v,R);if(O==null)return O;if(d){var j=r.children;if(j!==void 0)if(o)if(le(j)){for(var L=0;L<j.length;L++)Le(j[L],e);Object.freeze&&Object.freeze(j)}else g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Le(j,e)}return e===c?Cr(O):yr(O),O}}function _r(e,r,n){return Ve(e,r,n,!0)}function Pr(e,r,n){return Ve(e,r,n,!1)}var Or=Pr,Tr=_r;H.Fragment=c,H.jsx=Or,H.jsxs=Tr}()),H}(function(t){process.env.NODE_ENV==="production"?t.exports=Ze():t.exports=Qe()})(me);const I=me.exports.jsx,ne=({component:t,path:a,independentCombinators:h,...c})=>{const{useDrop:b}=C.useContext(W),{dropRef:m,dropMonitorId:f,isOver:s}=qe({path:a,independentCombinators:h,useDrop:b}),i=s?D.standardClassnames.dndOver:"",p=D.c(i,D.standardClassnames.betweenRules);return I("div",{ref:m,className:p,"data-dropmonitorid":f,"data-testid":D.TestID.inlineCombinator,children:I(t,{...c,path:a,testID:D.TestID.combinators})},"dnd")};ne.displayName="InlineCombinatorDnD";const te=t=>{const a=C.useContext(W),{useDrag:h,useDrop:c}=a,{path:b,disabled:m,parentDisabled:f,actions:{moveRule:s},schema:{independentCombinators:i}}=t,u=Je({path:b,disabled:!!f||!!m,independentCombinators:i,moveRule:s,useDrag:h,useDrop:c}),y=C.useMemo(()=>`${t.schema.classNames.rule}${u.isOver?` ${D.standardClassnames.dndOver}`:""}${u.isDragging?` ${D.standardClassnames.dndDragging}`:""}`,[u.isDragging,u.isOver,t.schema.classNames.rule]),{rule:P}=a.baseControls;return I(W.Provider,{value:a,children:I(P,{...t,schema:{...t.schema,classNames:{...t.schema.classNames,rule:y}},...u})})};te.displayName="RuleDnD";const ae=t=>{const a=C.useContext(W),{useDrag:h,useDrop:c}=a,{path:b,disabled:m,parentDisabled:f,actions:{moveRule:s},schema:{independentCombinators:i}}=t,u=ze({disabled:!!f||!!m,path:b,independentCombinators:i,moveRule:s,useDrag:h,useDrop:c}),y=C.useMemo(()=>({...t.schema,classNames:{...t.schema.classNames,header:`${t.schema.classNames.header}${u.isOver?` ${D.standardClassnames.dndOver}`:""}`,ruleGroup:`${t.schema.classNames.ruleGroup}${u.isDragging?` ${D.standardClassnames.dndDragging}`:""}`}}),[t.schema,u.isOver,u.isDragging]),{ruleGroup:P}=a.baseControls;return I(P,{...t,schema:y,...u})};ae.displayName="RuleGroupDnD";const Ee=t=>{const{controlClassnames:a,controlElements:h,debugMode:c,enableDragAndDrop:b,enableMountQueryChange:m,translations:f}=t,s=D.useMergedContext({controlClassnames:a,controlElements:h,debugMode:c,enableDragAndDrop:b!=null?b:!0,enableMountQueryChange:m,translations:f!=null?f:{}}),{enableDragAndDrop:i}=s,p=ge(t.dnd),u=i&&p?"dnd":"no-dnd";if(!i||!p)return I(V.QueryBuilderContext.Provider,{value:{...s,enableDragAndDrop:!1,debugMode:c},children:t.children},u);const{DndProvider:y,HTML5Backend:P}=p;return I(y,{backend:P,debugMode:c,children:I(V.QueryBuilderContext.Provider,{value:{...s,enableDragAndDrop:i,debugMode:c},children:I(oe,{dnd:p,children:t.children})},u)},u)};Ee.displayName="QueryBuilderDnD";const oe=t=>{var P,A,k,N,T,E,g,x,B,z,K,$;const a=C.useContext(V.QueryBuilderContext),h=C.useContext(W),c=ge(t.dnd),b=D.usePreferProp(!1,t.debugMode,a.debugMode),m=D.usePreferProp(!0,t.enableDragAndDrop,a.enableDragAndDrop),f=m&&c?"dnd":"no-dnd";if(!m||!c)return I(V.QueryBuilderContext.Provider,{value:{...a,enableDragAndDrop:!1,debugMode:b},children:t.children},f);const{DndContext:s,useDrag:i,useDrop:p}=c,u={rule:(N=(k=(P=t.controlElements)==null?void 0:P.rule)!=null?k:(A=a.controlElements)==null?void 0:A.rule)!=null?N:h.baseControls.rule,ruleGroup:(x=(g=(T=t.controlElements)==null?void 0:T.ruleGroup)!=null?g:(E=a.controlElements)==null?void 0:E.ruleGroup)!=null?x:h.baseControls.ruleGroup,combinatorSelector:($=(K=(B=t.controlElements)==null?void 0:B.combinatorSelector)!=null?K:(z=a.controlElements)==null?void 0:z.combinatorSelector)!=null?$:h.baseControls.combinatorSelector},y={...a,controlElements:{...a.controlElements,ruleGroup:ae,rule:te,inlineCombinator:ne}};return I(s.Consumer,{children:()=>I(V.QueryBuilderContext.Provider,{value:y,children:I(W.Provider,{value:{useDrag:i,useDrop:p,baseControls:u},children:t.children})},f)},f)};oe.displayName="QueryBuilderDndWithoutProvider",w.InlineCombinatorDnD=ne,w.QueryBuilderDnD=Ee,w.QueryBuilderDndWithoutProvider=oe,w.RuleDnD=te,w.RuleGroupDnD=ae,w.version=He,Object.defineProperties(w,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
//# sourceMappingURL=index.umd.js.map
import type { Ref } from 'react';
import type { QueryActions } from 'react-querybuilder';
import type { DropEffect } from '../types';
interface UseInlineCombinatorDndParams {
path: number[];
independentCombinators?: boolean;
moveRule: QueryActions['moveRule'];
useDrop: typeof import('react-dnd')['useDrop'];

@@ -13,4 +12,5 @@ }

dropRef: Ref<HTMLDivElement>;
dropEffect?: DropEffect;
}
export declare const useInlineCombinatorDnD: ({ path, independentCombinators, moveRule, useDrop, }: UseInlineCombinatorDndParams) => UseInlineCombinatorDnD;
export declare const useInlineCombinatorDnD: ({ path, independentCombinators, useDrop, }: UseInlineCombinatorDndParams) => UseInlineCombinatorDnD;
export {};

@@ -1,3 +0,4 @@

import { Ref } from 'react';
import type { QueryActions } from 'react-querybuilder';
import type { QueryActions } from '@react-querybuilder/ts';
import type { Ref } from 'react';
import type { DropEffect } from '../types';
interface UseRuleDndParams {

@@ -18,4 +19,5 @@ path: number[];

dndRef: Ref<HTMLDivElement>;
dropEffect?: DropEffect;
}
export declare const useRuleDnD: ({ path, disabled, independentCombinators, moveRule, useDrag, useDrop, }: UseRuleDndParams) => UseRuleDnD;
export {};

@@ -0,6 +1,8 @@

import type { QueryActions } from '@react-querybuilder/ts';
import type { Ref } from 'react';
import type { QueryActions } from 'react-querybuilder';
import type { DropEffect } from '../types';
interface UseRuleGroupDndParams {
path: number[];
disabled?: boolean;
independentCombinators?: boolean;
moveRule: QueryActions['moveRule'];

@@ -18,4 +20,5 @@ useDrag: typeof import('react-dnd')['useDrag'];

dropRef: Ref<HTMLDivElement>;
dropEffect?: DropEffect;
}
export declare const useRuleGroupDnD: ({ disabled, path, moveRule, useDrag, useDrop, }: UseRuleGroupDndParams) => UseRuleGroupDnD;
export declare const useRuleGroupDnD: ({ disabled, path, independentCombinators, moveRule, useDrag, useDrop, }: UseRuleGroupDndParams) => UseRuleGroupDnD;
export {};
import type { InlineCombinatorProps } from 'react-querybuilder';
export declare const InlineCombinatorDnD: {
(props: InlineCombinatorProps): JSX.Element;
({ component, path, independentCombinators, ...props }: InlineCombinatorProps): JSX.Element;
displayName: string;
};

@@ -1,2 +0,2 @@

import type { RuleProps } from 'react-querybuilder';
import type { RuleProps } from '@react-querybuilder/ts';
export declare const RuleDnD: {

@@ -3,0 +3,0 @@ (props: RuleProps): JSX.Element;

@@ -1,2 +0,2 @@

import type { RuleGroupProps } from 'react-querybuilder';
import type { RuleGroupProps } from '@react-querybuilder/ts';
export declare const RuleGroupDnD: {

@@ -3,0 +3,0 @@ (props: RuleGroupProps): JSX.Element;

@@ -0,1 +1,2 @@

export * from './misc';
export * from './props';
{
"name": "@react-querybuilder/dnd",
"description": "Drag-and-drop-enabled version of react-querybuilder",
"version": "5.0.0-alpha.5",
"version": "5.0.0-alpha.6",
"publishConfig": {

@@ -29,11 +29,11 @@ "access": "public"

"dependencies": {
"@react-querybuilder/ctx": "^5.0.0-alpha.5",
"@react-querybuilder/ts": "^5.0.0-alpha.5",
"react-querybuilder": "^5.0.0-alpha.5"
"@react-querybuilder/ctx": "^5.0.0-alpha.6",
"@react-querybuilder/ts": "^5.0.0-alpha.6",
"react-querybuilder": "^5.0.0-alpha.6"
},
"devDependencies": {
"@testing-library/react": "^13.3.0",
"@types/node": "^18.7.14",
"@types/react": "^18.0.17",
"@vitejs/plugin-react": "^2.0.1",
"@testing-library/react": "^13.4.0",
"@types/node": "^18.7.16",
"@types/react": "^18.0.19",
"@vitejs/plugin-react": "^2.1.0",
"react": "^18.2.0",

@@ -45,4 +45,4 @@ "react-dnd": "^16.0.1",

"react-dom": "^18.2.0",
"typescript": "^4.8.2",
"vite": "^3.0.9"
"typescript": "^4.8.3",
"vite": "^3.1.0"
},

@@ -54,3 +54,3 @@ "peerDependencies": {

},
"gitHead": "57858414dba5040c307331df4c629fc917f9957d"
"gitHead": "db801bcc7240c6800a49fd750cfd37a466ac28ea"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet