"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function g(t,e,l){const{key:n}=t;let o;return l&&l.value&&t[l.value]!==void 0?{[l.value]:o}=t:"value"in t&&({value:o}=t),n??(o!==void 0?o:`rc-index-key-${e}`)}function b(t,e){const{label:l,value:n,options:o}=t||{};return{label:l||(e?"children":"label"),value:n||"value",options:o||"options"}}function h(t,{fieldNames:e,childrenAsData:l}={}){const n=[],{label:o,value:c,options:u}=b(e,!1);function f(p,r){p.forEach(i=>{const v=i[o];if(r||!(u in i)){const s=i[c];n.push({key:g(i,n.length,e),groupOption:r,data:i,label:v,value:s})}else{let s=v;s===void 0&&l&&(s=i.label),n.push({key:g(i,n.length,e),group:!0,data:i,label:s}),f(i[u],!0)}})}return f(t,!1),n}function a(t){const e={...t};return"props"in e||Object.defineProperty(e,"props",{get(){return e}}),e}function y(t,e){if(!e||!e.length)return null;let l=!1;function n(c,[u,...f]){if(!u)return[c];const p=c.split(u);return l=l||p.length>1,p.reduce((r,i)=>[...r,...n(i,f)],[]).filter(r=>r)}const o=n(t,e);return l?o:null}exports.fillFieldNames=b;exports.flattenOptions=h;exports.getSeparatedContent=y;exports.injectPropsWithOption=a;
