module.exports = "(function(e,t,n){var r=n(5894),u=n(280).v,i=n(6322),o=n(6474),a=n(8131),c=n(9256),s=n(4934),l=n(7152),d=n(1548),g=u(\"GA4AudienceError\"),f=n(4810),_=\"gtag\";function p(e){return new g(e)}function A(e){if(e&&\"string\"==typeof e.audiences)return{audiences:e.audiences.split(\",\")};throw p(\"GA4 audience call response is either not defined or not a string: \"+e)}function G(e,t,n){return!t&&n?e+n:t&&n?e+t+\",\"+n:e+t}function v(e){var t=G(e.url+\"?projectId=\"+e.projectId+\"&ids=\",e.ga4UserId,e.ga4DeviceId);return(__PROFILE__||__RUM_VERBOSE__)&&c.time(\"Ga4audienceCall\"),o.request({url:t,contentType:\"application/json\"}).then((function(e){var t;if((__PROFILE__||__RUM_VERBOSE__)&&c.timeEnd(\"Ga4audienceCall\"),e.status>399)throw p(e.status+\": \"+e.statusText);try{t=s.parse(e.response)}catch(e){throw p(\"Error parsing response: \"+e.toString())}if(!t)throw p(\"No data received\");return A(t)}),(function(e){throw(__PROFILE__||__RUM_VERBOSE__)&&c.timeEnd(\"Ga4audienceCall\"),p(e.status+\": \"+e.statusText)}))}e.exports={createGA4Error:p,getDataLayer:function(){return l.getGlobal(\"dataLayer\")},getGtagFn:function(){return a.pollFor((function(){return l.getGlobal(_)||null}),200,50)},getTagId:function(e){var t=r.map(e,(function(e){return r.isArguments(e)?[].slice.call(e):e}));return r.reduce(t,(function(e,t){return function(e,t){return\"config\"===e[0]?e[1]:t}(t,e)}),\"\")},getGAClientIdFromGtagFn:function(e,t,n){return e.then((function(e){return new Promise((function(r){return e(\"get\",t,n,r)}))}))},getFullUrl:G,getGA4Audiences:A,fetchGa4Audiences:v,callMakeAsyncRequest:function(e){var t=e.source,n=e.url,u=e.projectId,o=e.ga4UserId,a=void 0===o?null:o,c=e.ga4DeviceId,s=void 0===c?null:c;return i.makeAsyncRequest(t,(function(){return v({url:n,projectId:u,ga4UserId:a,ga4DeviceId:s}).then((function(e){return e}),(function(e){throw e})).then(r.partial(i.resolveRequest,t),r.partial(i.rejectRequest,t))}))},getGACookie:function(){f.log(\"GA4 Audience looking for _ga cookie\");var e=d.get(\"_ga\",\"\"),t=/^GA\\d\\.\\d\\./;return t.test(e)&&(e=e.replace(t,\"\")),f.log(\"GA4 Audience returning value: \"+e),e}}})";