Liferay.Loader.define("segments-web@3.0.68/js/utils/odata.es",["module","exports","require","./constants.es"],(function(e,c,t){window;{Object.defineProperty(c,"__esModule",{value:!0}),c.buildQueryString=function c(t,o,r){return t.filter(Boolean).reduce(((t,s,u)=>{const{conjunctionName:E,items:T,operatorName:P,propertyName:i,value:O}=s;if(u>0&&(t=t.concat(" ".concat(o," "))),E)t=t.concat("(".concat(c(T,E,r),")"));else{const o=s.type||e(i,r),u=function(e,c){let t;switch(c){case n.PROPERTY_TYPES.BOOLEAN:case n.PROPERTY_TYPES.DATE:case n.PROPERTY_TYPES.DATE_TIME:case n.PROPERTY_TYPES.INTEGER:case n.PROPERTY_TYPES.DOUBLE:t=e;break;case n.PROPERTY_TYPES.COLLECTION:case n.PROPERTY_TYPES.STRING:default:t=function(e){if("string"!=typeof e)return e;return"'".concat(e.replace(/'/g,"''"),"'")}(e)}return t}(O,o);if(a(n.RELATIONAL_OPERATORS,P))t=o===n.PROPERTY_TYPES.COLLECTION?t.concat("".concat(i,"/any(c:c ").concat(P," ").concat(u,")")):t.concat("".concat(i," ").concat(P," ").concat(u));else if(a(n.FUNCTIONAL_OPERATORS,P))t=o===n.PROPERTY_TYPES.COLLECTION?t.concat("".concat(i,"/any(c:").concat(P,"(c, ").concat(u,"))")):t.concat("".concat(P,"(").concat(i,", ").concat(u,")"));else if(a(n.NOT_OPERATORS,P)){const e=P.replace(/not-/g,"");t=t.concat("(not (".concat(c([{operatorName:e,propertyName:i,type:o,value:O}],E,r),"))"))}}return t}),"")},c.unescapeSingleQuotes=function(e){if("string"!=typeof e)return e;return e.replace(/''/g,"'")};var n=t("./constants.es");const e=(e,c)=>{let t=null;if(e&&c){const n=c.find((c=>c.name===e));t=n?n.type:null}return t};function a(e,c){return Object.values(e).includes(c)}}}));
//# sourceMappingURL=odata.es.js.map