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EAAAO,EAAQ,OAAAA,EAAAP,EAAA,cAAAf,EAAA,EAA4Be,EAAA+P,YAAA,EAAiB5D,QAAAnN,CAAA,EAAUuB,CAAA","sources":["webpack://_N_E/./node_modules/lodash/isNil.js","webpack://_N_E/./node_modules/@ucast/core/dist/es6m/index.mjs","webpack://_N_E/./node_modules/@ucast/mongo/dist/es6m/index.mjs","webpack://_N_E/./node_modules/@ucast/js/dist/es6m/index.mjs","webpack://_N_E/./node_modules/@ucast/mongo2js/dist/es6m/index.mjs","webpack://_N_E/./node_modules/@casl/ability/dist/es6m/index.mjs","webpack://_N_E/./node_modules/@casl/react/dist/es6m/index.mjs"],"sourcesContent":["/**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\nfunction isNil(value) {\n return value == null;\n}\n\nmodule.exports = isNil;\n","class t{constructor(t,e){this.operator=t,this.value=e,Object.defineProperty(this,\"t\",{writable:!0})}get notes(){return this.t}addNote(t){this.t=this.t||[],this.t.push(t)}}class e extends t{}class r extends e{constructor(t,e){if(!Array.isArray(e))throw new Error(`\"${t}\" operator expects to receive an array of conditions`);super(t,e)}}const n=\"__itself__\";class o extends t{constructor(t,e,r){super(t,r),this.field=e}}const s=new e(\"__null__\",null),i=Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty);function c(t,e){return e instanceof r&&e.operator===t}function u(t,e){return 1===e.length?e[0]:new r(t,function t(e,r,n){const o=n||[];for(let n=0,s=r.length;nt,h=()=>Object.create(null),f=Object.defineProperty(h(),\"__@type@__\",{value:\"ignore value\"});function l(t,e,r=!1){if(!t||t&&t.constructor!==Object)return!1;for(const n in t){if(i(t,n)&&i(e,n)&&(!r||t[n]!==f))return!0}return!1}function d(t){const e=[];for(const r in t)i(t,r)&&t[r]!==f&&e.push(r);return e}function p(t,e){e!==s&&t.push(e)}const w=t=>u(\"and\",t),b=t=>u(\"or\",t),O={compound(t,e,n){const o=(Array.isArray(e)?e:[e]).map(t=>n.parse(t));return new r(t.name,o)},field:(t,e,r)=>new o(t.name,r.field,e),document:(t,r)=>new e(t.name,r)};class j{constructor(t,e=h()){this.o=void 0,this.s=void 0,this.i=void 0,this.u=void 0,this.h=void 0,this.parse=this.parse.bind(this),this.u={operatorToConditionName:e.operatorToConditionName||a,defaultOperatorName:e.defaultOperatorName||\"eq\",mergeFinalConditions:e.mergeFinalConditions||w},this.o=Object.keys(t).reduce((e,r)=>(e[r]=Object.assign({name:this.u.operatorToConditionName(r)},t[r]),e),{}),this.s=Object.assign({},e.fieldContext,{field:\"\",query:{},parse:this.parse,hasOperators:t=>l(t,this.o,e.useIgnoreValue)}),this.i=Object.assign({},e.documentContext,{parse:this.parse,query:{}}),this.h=e.useIgnoreValue?d:Object.keys}setParse(t){this.parse=t,this.s.parse=t,this.i.parse=t}parseField(t,e,r,n){const o=this.o[e];if(!o)throw new Error(`Unsupported operator \"${e}\"`);if(\"field\"!==o.type)throw new Error(`Unexpected ${o.type} operator \"${e}\" at field level`);return this.s.field=t,this.s.query=n,this.parseInstruction(o,r,this.s)}parseInstruction(t,e,r){\"function\"==typeof t.validate&&t.validate(t,e);return(t.parse||O[t.type])(t,e,r)}parseFieldOperators(t,e){const r=[],n=this.h(e);for(let o=0,s=n.length;o{const o=n(e,r);return _(t,o)(e,s)};break;case 3:o=(e,o,i)=>{const c=n(e,r);return _(t,c)(e,o,i,s)};break;default:o=(e,o)=>{const i=n(e,r);return _(t,i)(e,o,s)}}const s=Object.assign({},r,{interpret:o});return s.interpret}function v(t,e){return(r,...n)=>{const o=t(r,...n),s=e.bind(null,o);return s.ast=o,s}}const x=j.prototype.parseInstruction;export{r as CompoundCondition,t as Condition,e as DocumentCondition,o as FieldCondition,n as ITSELF,s as NULL_CONDITION,j as ObjectQueryParser,w as buildAnd,b as buildOr,m as createInterpreter,v as createTranslatorFactory,O as defaultInstructionParsers,l as hasOperators,a as identity,f as ignoreValue,c as isCompound,h as object,u as optimizedCompoundCondition,x as parseInstruction};\n//# sourceMappingURL=index.mjs.map\n","import{optimizedCompoundCondition as e,FieldCondition as t,CompoundCondition as r,ITSELF as o,NULL_CONDITION as a,ObjectQueryParser as n,buildAnd as i}from\"@ucast/core\";export{defaultInstructionParsers as defaultParsers}from\"@ucast/core\";function s(e,t){if(!Array.isArray(t))throw new Error(`\"${e.name}\" expects value to be an array`)}function p(e,t){if(s(e,t),!t.length)throw new Error(`\"${e.name}\" expects to have at least one element in array`)}const l=e=>(t,r)=>{if(typeof r!==e)throw new Error(`\"${t.name}\" expects value to be a \"${e}\"`)},c={type:\"compound\",validate:p,parse(t,r,{parse:o}){const a=r.map(e=>o(e));return e(t.name,a)}},f=c,d={type:\"compound\",validate:p},u={type:\"field\",validate(e,t){if(!(t&&(t instanceof RegExp||t.constructor===Object)))throw new Error(`\"${e.name}\" expects to receive either regular expression or object of field operators`)},parse(e,o,a){const n=o instanceof RegExp?new t(\"regex\",a.field,o):a.parse(o,a);return new r(e.name,[n])}},$={type:\"field\",validate(e,t){if(!t||t.constructor!==Object)throw new Error(`\"${e.name}\" expects to receive an object with nested query or field level operators`)},parse(e,r,{parse:a,field:n,hasOperators:i}){const s=i(r)?a(r,{field:o}):a(r);return new t(e.name,n,s)}},w={type:\"field\",validate:l(\"number\")},y={type:\"field\",validate:s},x=y,v=y,h={type:\"field\",validate(e,t){if(!Array.isArray(t)||2!==t.length)throw new Error(`\"${e.name}\" expects an array with 2 numeric elements`)}},m={type:\"field\",validate:l(\"boolean\")},g={type:\"field\",validate:function(e,t){if(!(\"string\"==typeof t||\"number\"==typeof t||t instanceof Date))throw new Error(`\"${e.name}\" expects value to be comparable (i.e., string, number or date)`)}},b=g,E=b,j=b,O={type:\"field\"},R=O,_={type:\"field\",validate(e,t){if(!(t instanceof RegExp)&&\"string\"!=typeof t)throw new Error(`\"${e.name}\" expects value to be a regular expression or a string that represents regular expression`)},parse(e,r,o){const a=\"string\"==typeof r?new RegExp(r,o.query.$options||\"\"):r;return new t(e.name,o.field,a)}},q={type:\"field\",parse:()=>a},A={type:\"document\",validate:l(\"function\")};var N=Object.freeze({__proto__:null,$and:c,$or:f,$nor:d,$not:u,$elemMatch:$,$size:w,$in:y,$nin:x,$all:v,$mod:h,$exists:m,$gte:g,$gt:b,$lt:E,$lte:j,$eq:O,$ne:R,$regex:_,$options:q,$where:A});class P extends n{constructor(e){super(e,{defaultOperatorName:\"$eq\",operatorToConditionName:e=>e.slice(1)})}parse(e,t){return t&&t.field?i(this.parseFieldOperators(t.field,e)):super.parse(e)}}const z=N;export{v as $all,c as $and,$ as $elemMatch,O as $eq,m as $exists,b as $gt,g as $gte,y as $in,E as $lt,j as $lte,h as $mod,R as $ne,x as $nin,d as $nor,u as $not,q as $options,f as $or,_ as $regex,w as $size,A as $where,P as MongoQueryParser,z as allParsingInstructions};\n//# sourceMappingURL=index.mjs.map\n","import{ITSELF as r,createInterpreter as t}from\"@ucast/core\";function n(r,t,n){for(let e=0,o=r.length;e{const o=e.get(n,t.field);return Array.isArray(o)?o.some(n=>r(t,n,e)):r(t,o,e)}}const c=(r,t)=>r[t];function i(r,t,n){const e=t.lastIndexOf(\".\");return-1===e?[r,t]:[n(r,t.slice(0,e)),t.slice(e+1)]}function f(t,n,e=c){if(n===r)return t;if(!t)throw new Error(`Unable to get field \"${n}\" out of ${String(t)}.`);return function(r,t,n){if(-1===t.indexOf(\".\"))return o(r,t,n);const e=t.split(\".\");let u=r;for(let r=0,t=e.length;rf(t,n,r)}function a(r,t){return r===t?0:r>t?1:-1}function l(r,n={}){return t(r,Object.assign({get:f,compare:a},n))}const p=(r,t,{interpret:n})=>r.value.some(r=>n(r,t)),g=(r,t,n)=>!p(r,t,n),m=(r,t,{interpret:n})=>r.value.every(r=>n(r,t)),y=(r,t,{interpret:n})=>!n(r.value[0],t),b=(r,t,{compare:e,get:o})=>{const u=o(t,r.field);return Array.isArray(u)&&!Array.isArray(r.value)?n(u,r.value,e):0===e(u,r.value)},A=(r,t,n)=>!b(r,t,n),d=u((r,t,n)=>{const e=n.compare(t,r.value);return 0===e||-1===e}),h=u((r,t,n)=>-1===n.compare(t,r.value)),j=u((r,t,n)=>1===n.compare(t,r.value)),w=u((r,t,n)=>{const e=n.compare(t,r.value);return 0===e||1===e}),_=(t,n,{get:o})=>{if(t.field===r)return void 0!==n;const[u,c]=i(n,t.field,o),f=r=>!!r&&r.hasOwnProperty(c)===t.value;return e(u,c)?u.some(f):f(u)},v=u((r,t)=>\"number\"==typeof t&&t%r.value[0]===r.value[1]),x=(t,n,{get:o})=>{const[u,c]=i(n,t.field,o),f=r=>{const n=o(r,c);return Array.isArray(n)&&n.length===t.value};return t.field!==r&&e(u,c)?u.some(f):f(u)},O=u((r,t)=>\"string\"==typeof t&&r.value.test(t)),N=u((r,t,{compare:e})=>n(r.value,t,e)),$=(r,t,n)=>!N(r,t,n),q=(r,t,{compare:e,get:o})=>{const u=o(t,r.field);return Array.isArray(u)&&r.value.every(r=>n(u,r,e))},z=(r,t,{interpret:n,get:e})=>{const o=e(t,r.field);return Array.isArray(o)&&o.some(t=>n(r.value,t))},E=(r,t)=>r.value.call(t);var M=Object.freeze({__proto__:null,or:p,nor:g,and:m,not:y,eq:b,ne:A,lte:d,lt:h,gt:j,gte:w,exists:_,mod:v,size:x,regex:O,within:N,nin:$,all:q,elemMatch:z,where:E});const S=Object.assign({},M,{in:N}),U=l(S);export{q as all,S as allInterpreters,m as and,a as compare,s as createGetter,l as createJsInterpreter,z as elemMatch,b as eq,_ as exists,f as getObjectField,i as getObjectFieldCursor,j as gt,w as gte,U as interpret,h as lt,d as lte,v as mod,A as ne,$ as nin,g as nor,y as not,p as or,O as regex,x as size,E as where,N as within};\n//# sourceMappingURL=index.mjs.map\n","import{createTranslatorFactory as o,ITSELF as t}from\"@ucast/core\";export*from\"@ucast/core\";import{MongoQueryParser as r,allParsingInstructions as e,defaultParsers as c}from\"@ucast/mongo\";export*from\"@ucast/mongo\";import{createJsInterpreter as n,allInterpreters as f,compare as s}from\"@ucast/js\";export*from\"@ucast/js\";function i(o){return o instanceof Date?o.getTime():o&&\"function\"==typeof o.toJSON?o.toJSON():o}const m=(o,t)=>s(i(o),i(t));function p(e,c,f){const s=new r(e),i=n(c,Object.assign({compare:m},f));if(f&&f.forPrimitives){const o={field:t},r=s.parse;s.setParse(t=>r(t,o))}return o(s.parse,i)}const a=p(e,f),u=p([\"$and\",\"$or\"].reduce((o,t)=>(o[t]=Object.assign({},o[t],{type:\"field\"}),o),Object.assign({},e,{$nor:Object.assign({},e.$nor,{type:\"field\",parse:c.compound})})),f,{forPrimitives:!0}),j=a;export{p as createFactory,j as filter,a as guard,u as squire};\n//# sourceMappingURL=index.mjs.map\n","import{createFactory as t,$eq as e,$ne as i,$lt as s,$lte as n,$gt as r,$gte as o,$in as c,$nin as u,$all as h,$size as l,$regex as a,$options as f,$elemMatch as d,$exists as y,eq as b,ne as p,lt as w,lte as g,gt as $,gte as A,within as j,nin as M,all as m,size as E,regex as v,elemMatch as x,exists as F,and as _}from\"@ucast/mongo2js\";function O(t){return Array.isArray(t)?t:[t]}const C=Object.hasOwn||Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty);const R=\"__caslSubjectType__\";function P(t,e){if(e)if(!C(e,R))Object.defineProperty(e,R,{value:t});else if(t!==e[R])throw new Error(`Trying to cast object to subject type ${t} but previously it was casted to ${e[R]}`);return e}const S=t=>{const e=typeof t;return\"string\"===e||\"function\"===e};const T=t=>t.modelName||t.name;const B=t=>\"string\"===typeof t?t:T(t);function q(t){if(C(t,R))return t[R];return T(t.constructor)}function z(t,e,i){let s=O(e);let n=0;while(nt.concat(e);function k(t,e){if(e in t)throw new Error(`Cannot use \"${e}\" as an alias because it's reserved action.`);const i=Object.keys(t);const s=(t,i)=>{const s=D(t,i);if(s)throw new Error(`Detected cycle ${s} -> ${t.join(\", \")}`);const n=\"string\"===typeof i&&i===e||-1!==t.indexOf(e)||Array.isArray(i)&&-1!==i.indexOf(e);if(n)throw new Error(`Cannot make an alias to \"${e}\" because this is reserved action`);return t.concat(i)};for(let e=0;ez(t,e,Y)}function L(t,e,i){for(let s=i;st;function J(t,e){if(Array.isArray(t.fields)&&!t.fields.length)throw new Error(\"`rawRule.fields` cannot be an empty array. https://bit.ly/390miLa\");if(t.fields&&!e.fieldMatcher)throw new Error('You need to pass \"fieldMatcher\" option in order to restrict access by fields');if(t.conditions&&!e.conditionsMatcher)throw new Error('You need to pass \"conditionsMatcher\" option in order to restrict access by conditions')}class K{constructor(t,e,i=0){J(t,e);this.action=e.resolveAction(t.action);this.subject=t.subject;this.inverted=!!t.inverted;this.conditions=t.conditions;this.reason=t.reason;this.origin=t;this.fields=t.fields?O(t.fields):void 0;this.priority=i;this.t=e}i(){if(this.conditions&&!this.o)this.o=this.t.conditionsMatcher(this.conditions);return this.o}get ast(){const t=this.i();return t?t.ast:void 0}matchesConditions(t){if(!this.conditions)return true;if(!t||S(t))return!this.inverted;const e=this.i();return e(t)}matchesField(t){if(!this.fields)return true;if(!t)return!this.inverted;if(this.fields&&!this.u)this.u=this.t.fieldMatcher(this.fields);return this.u(t)}}function N(t,e){const i={value:t,prev:e,next:null};if(e)e.next=i;return i}function Q(t){if(t.next)t.next.prev=t.prev;if(t.prev)t.prev.next=t.next;t.next=t.prev=null}const V=t=>({value:t.value,prev:t.prev,next:t.next});const W=()=>({rules:[],merged:false});const X=()=>new Map;class Z{constructor(t=[],e={}){this.h=false;this.l={conditionsMatcher:e.conditionsMatcher,fieldMatcher:e.fieldMatcher,resolveAction:e.resolveAction||H};this.p=e.anyAction||\"manage\";this.g=e.anySubjectType||\"all\";this.$=e.detectSubjectType||q;this.A=t;this.j=this.M(t)}get rules(){return this.A}detectSubjectType(t){if(S(t))return t;if(!t)return this.g;return this.$(t)}update(t){const e={rules:t,ability:this,target:this};this.m(\"update\",e);this.A=t;this.j=this.M(t);this.m(\"updated\",e);return this}M(t){const e=new Map;for(let i=t.length-1;i>=0;i--){const s=t.length-i-1;const n=new K(t[i],this.l,s);const r=O(n.action);const o=O(n.subject||this.g);if(!this.h&&n.fields)this.h=true;for(let t=0;tt.matchesField(i)))}actionsFor(t){if(!S(t))throw new Error('\"actionsFor\" accepts only subject types (i.e., string or class) as a parameter');const e=new Set;const i=this.j.get(t);if(i)Array.from(i.keys()).forEach((t=>e.add(t)));const s=t!==this.g?this.j.get(this.g):void 0;if(s)Array.from(s.keys()).forEach((t=>e.add(t)));return Array.from(e)}on(t,e){this.v=this.v||new Map;const i=this.v;const s=i.get(t)||null;const n=N(e,s);i.set(t,n);return()=>{const e=i.get(t);if(!n.next&&!n.prev&&e===n)i.delete(t);else if(n===e)i.set(t,n.prev);Q(n)}}m(t,e){if(!this.v)return;let i=this.v.get(t)||null;while(null!==i){const t=i.prev?V(i.prev):null;i.value(e);i=t}}}class PureAbility extends Z{can(t,e,i){const s=this.relevantRuleFor(t,e,i);return!!s&&!s.inverted}relevantRuleFor(t,e,i){const s=this.detectSubjectType(e);const n=this.rulesFor(t,s,i);for(let t=0,i=n.length;tt(Object.assign({},tt,e),Object.assign({},et,i),s);const st=t(tt,et);const nt=/[-/\\\\^$+?.()|[\\]{}]/g;const rt=/\\.?\\*+\\.?/g;const ot=/\\*+/;const ct=/\\./g;function ut(t,e,i){const s=\"*\"===i[0]||\".\"===t[0]&&\".\"===t[t.length-1]?\"+\":\"*\";const n=-1===t.indexOf(\"**\")?\"[^.]\":\".\";const r=t.replace(ct,\"\\\\$&\").replace(ot,n+s);return e+t.length===i.length?`(?:${r})?`:r}function ht(t,e,i){if(\".\"===t&&(\"*\"===i[e-1]||\"*\"===i[e+1]))return t;return`\\\\${t}`}function lt(t){const e=t.map((t=>t.replace(nt,ht).replace(rt,ut)));const i=e.length>1?`(?:${e.join(\"|\")})`:e[0];return new RegExp(`^${i}$`)}const at=t=>{let e;return i=>{if(\"undefined\"===typeof e)e=t.every((t=>-1===t.indexOf(\"*\")))?null:lt(t);return null===e?-1!==t.indexOf(i):e.test(i)}};class Ability extends PureAbility{constructor(t=[],e={}){super(t,Object.assign({conditionsMatcher:st,fieldMatcher:at},e))}}function createMongoAbility(t=[],e={}){return new PureAbility(t,Object.assign({conditionsMatcher:st,fieldMatcher:at},e))}function isAbilityClass(t){return\"function\"===typeof t.prototype.possibleRulesFor}class ft{constructor(t){this.F=t}because(t){this.F.reason=t;return this}}class AbilityBuilder{constructor(t){this.rules=[];this._=t;this.can=(t,e,i,s)=>this.O(t,e,i,s,false);this.cannot=(t,e,i,s)=>this.O(t,e,i,s,true);this.build=t=>isAbilityClass(this._)?new this._(this.rules,t):this._(this.rules,t)}O(t,e,i,s,n){const r={action:t};if(n)r.inverted=n;if(e){r.subject=e;if(Array.isArray(i)||\"string\"===typeof i)r.fields=i;else if(\"undefined\"!==typeof i)r.conditions=i;if(\"undefined\"!==typeof s)r.conditions=s}this.rules.push(r);return new ft(r)}}function defineAbility(t,e){const i=new AbilityBuilder(createMongoAbility);const s=t(i.can,i.cannot);if(s&&\"function\"===typeof s.then)return s.then((()=>i.build(e)));return i.build(e)}const dt=t=>`Cannot execute \"${t.action}\" on \"${t.subjectType}\"`;const yt=function t(e){this.message=e};yt.prototype=Object.create(Error.prototype);class ForbiddenError extends yt{static setDefaultMessage(t){this.C=\"string\"===typeof t?()=>t:t}static from(t){return new this(t)}constructor(t){super(\"\");this.ability=t;if(\"function\"===typeof Error.captureStackTrace){this.name=\"ForbiddenError\";Error.captureStackTrace(this,this.constructor)}}setMessage(t){this.message=t;return this}throwUnlessCan(t,e,i){const s=this.unlessCan(t,e,i);if(s)throw s}unlessCan(t,e,i){const s=this.ability.relevantRuleFor(t,e,i);if(s&&!s.inverted)return;this.action=t;this.subject=e;this.subjectType=B(this.ability.detectSubjectType(e));this.field=i;const n=s?s.reason:\"\";this.message=this.message||n||this.constructor.C(this);return this}}ForbiddenError.C=dt;var bt=Object.freeze({__proto__:null});export{Ability,AbilityBuilder,ForbiddenError,PureAbility,it as buildMongoQueryMatcher,I as createAliasResolver,createMongoAbility,defineAbility,q as detectSubjectType,at as fieldPatternMatcher,dt as getDefaultErrorMessage,bt as hkt,st as mongoQueryMatcher,P as subject,O as wrapArray};\n//# sourceMappingURL=index.mjs.map\n","import t,{PureComponent as i,createElement as n}from\"react\";const s=()=>{};class e extends i{constructor(...t){super(...t);this.t=false;this.i=null;this.o=s}componentWillUnmount(){this.o()}u(t){if(t===this.i)return;this.o();this.i=null;if(t){this.i=t;this.o=t.on(\"updated\",(()=>this.forceUpdate()))}}get allowed(){return this.t}h(){const t=this.props;const i=t.of||t.a||t.an||t.this||t.on;const n=t.not?\"cannot\":\"can\";return t.ability[n](t.I||t.do,i,t.field)}render(){this.u(this.props.ability);this.t=this.h();return this.props.passThrough||this.t?this.l():null}l(){const{children:t,ability:i}=this.props;const n=\"function\"===typeof t?t(this.t,i):t;return n}}function r(t){var i,n;return n=i=class extends e{},i.defaultProps={ability:t},n}function o(t){return i=>n(t,{children:t=>n(e,Object.assign({ability:t},i))})}function useAbility(i){if(\"production\"!==process.env.NODE_ENV&&\"function\"!==typeof t.useContext)throw new Error(\"You must use React >= 16.8 in order to use useAbility()\");const n=t.useContext(i);const[s,e]=t.useState();t.useEffect((()=>n.on(\"updated\",(t=>{if(t.rules!==s)e(t.rules)}))),[]);return n}export{e as Can,r as createCanBoundTo,o as createContextualCan,useAbility};\n//# sourceMappingURL=index.mjs.map\n"],"names":["module","exports","value","es6m_t","constructor","t","e","operator","Object","defineProperty","writable","notes","addNote","push","r","Array","isArray","es6m_n","es6m_o","field","s","i","prototype","hasOwnProperty","call","bind","u","length","n","o","a","h","create","f","d","p","w","O","compound","map","parse","name","document","j","operatorToConditionName","defaultOperatorName","mergeFinalConditions","keys","reduce","assign","fieldContext","query","hasOperators","l","useIgnoreValue","documentContext","setParse","parseField","type","parseInstruction","validate","parseFieldOperators","_","y","es6m_s","es6m_p","es6m_l","es6m_c","$","es6m_w","es6m_y","es6m_m","g","Date","es6m_O","es6m_","RegExp","$options","q","A","N","freeze","__proto__","$and","$or","$nor","$not","$elemMatch","$size","$in","$nin","$all","$mod","$exists","$gte","$gt","$lt","$lte","$eq","$ne","$regex","$where","P","slice","es6m_e","Number","isNaN","concat","dist_es6m_u","get","some","dist_es6m_c","es6m_i","lastIndexOf","dist_es6m_f","String","indexOf","split","es6m_a","dist_es6m_l","m","getInterpreterName","numberOfArguments","interpret","compare","dist_es6m_p","dist_es6m_m","every","dist_es6m_b","es6m_A","dist_es6m_d","dist_es6m_h","dist_es6m_j","dist_es6m_w","dist_es6m_","c","dist_es6m_v","dist_es6m_x","dist_es6m_O","test","es6m_N","es6m_$","es6m_q","es6m_z","S","or","nor","and","not","eq","ne","lte","lt","gt","gte","exists","mod","size","regex","within","nin","all","elemMatch","where","in","dist_es6m_i","getTime","toJSON","mongo2js_dist_es6m_m","mongo2js_dist_es6m_p","forPrimitives","ast","ability_dist_es6m_O","z","C","hasOwn","es6m_R","es6m_S","T","modelName","B","dist_es6m_q","L","es6m_U","priority","G","set","H","K","J","fields","fieldMatcher","conditions","conditionsMatcher","action","resolveAction","subject","inverted","reason","origin","matchesConditions","matchesField","V","prev","next","W","rules","merged","X","Map","Z","anyAction","anySubjectType","detectSubjectType","M","update","ability","target","possibleRulesFor","has","rulesFor","filter","actionsFor","Set","from","forEach","add","on","v","dist_es6m_N","delete","PureAbility","can","relevantRuleFor","cannot","st","nt","rt","ot","ct","ut","replace","ht","at","join","createMongoAbility","ft","F","because","AbilityBuilder","build","isAbilityClass","yt","message","Error","ForbiddenError","setDefaultMessage","captureStackTrace","setMessage","throwUnlessCan","unlessCan","subjectType","react__WEBPACK_IMPORTED_MODULE_0__","PureComponent","componentWillUnmount","forceUpdate","allowed","props","of","an","this","I","do","render","passThrough","children","defaultProps"],"sourceRoot":""}