module.exports = "(function(e,t,n){var o=n(5894),r=n(7358),i=n(4527),c=i.get(\"stores/directive\"),a=n(8737),s=n(6500),u=n(4438),l=n(1571),_=n(6103).generate,f=n(3491),m=n(7152),v=i.get(\"stores/rum\"),O={once:!1,onTimeout:null,timeout:null},b={},d=function(e){0,d=function(){if(!c.shouldObserveChangesIndefinitely())return function(e){var t=f.poll(o.partial(p,e));b[e].cancelObservation=function(){t(),delete b[e]}};var e,t=function(){this.disconnect(),o.each(o.keys(b),p),this.observe(i,n),__RUM_DOM_OBSERVATION_COUNTERS__&&v.getSampleRum()&&l.dispatch(r.RECORD_DOM_OBSERVATION_OCCURENCE,{counterName:u.PerformanceCounters.mutation_observer_invocation})},n={attributes:!0,childList:!0,subtree:!0,characterData:!0},i=a.getDocumentElement();return e=__EXPERIMENTAL_SHADOW_DOM__?new s.ShadowDomMutationObserver(t):new MutationObserver(t),function(t){var r=b[t];e.observe(i,n),r.cancelObservation=function(){delete b[t],o.isEmpty(b)&&e.disconnect()}}}(),d(e)};function h(e){var t=b[e];t&&t.cancelObservation&&t.cancelObservation()}function p(e){if(b[e]){if(function(e){var t=e.options.timeout;if(null!==t)if(\"function\"==typeof t)try{return t()}catch(e){}else if(Date.now()-e.startTime>t)return!0;return!1}(b[e]))return 0===b[e].matchedCount&&o.isFunction(b[e].options.onTimeout)&&b[e].options.onTimeout(),h(e),void 0;var t=a.querySelectorAll(b[e].selector);t.length&&(o.each(t,(function(t){t.__optimizelyObserveSelectorIds&&t.__optimizelyObserveSelectorIds[e]||b[e].callbackQueue.push(t)})),function(e){for(;b[e]&&b[e].callbackQueue.length;){var t=b[e].callbackQueue.shift();if(E(t,e),b[e].matchedCount=b[e].matchedCount+1,b[e].callback(t),b[e]&&b[e].options.once)return h(e),void 0}}(e)),__RUM_DOM_OBSERVATION_COUNTERS__&&v.getSampleRum()&&l.dispatch(r.RECORD_DOM_OBSERVATION_OCCURENCE,{counterName:u.PerformanceCounters.match_selector_invocation})}}function E(e,t){e.__optimizelyObserveSelectorIds||(e.__optimizelyObserveSelectorIds={}),e.__optimizelyObserveSelectorIds[t]=!0}t.o=function(e,t,n){if(!function(e){try{a.querySelector(e)}catch(e){return!1}return!0}(e))throw new Error(\"observeSelector expects a valid css selector as its first argument\");if(!o.isFunction(t))throw new Error(\"observeSelector expects a function as its second argument\");if(n&&(!o.isObject(n)||o.isFunction(n)))throw new Error(\"observeSelector expects an object as its third argument\");var r=_();return n=o.assign({},O,n||{}),b[r]={callback:t,callbackQueue:[],matchedCount:0,options:n,selector:e,startTime:Date.now()},d(r),m.setTimeout(o.bind(p,null,r),0),o.partial(h,r)}})";