(function(){
  const w = window;
  if (w.__COPRO_STATE_BOOTSTRAPPED) return;
  w.__COPRO_STATE_BOOTSTRAPPED = true;

  if (!Array.isArray(w.mediaItems)) w.mediaItems = [];
  if (!w.__COPRO_SINGLETONS) w.__COPRO_SINGLETONS = {};
  const s = w.__COPRO_SINGLETONS;
  s.mediaItems = w.mediaItems;
  s.overlayItems = s.overlayItems || [];
  s.virtualItems = s.virtualItems || [];
  s.transitionItems = s.transitionItems || [];
  s.guidesItems = s.guidesItems || [];
  s.overlayComposer = s.overlayComposer || { activeSceneId:'', scenes:[], bindingsCatalog:[], templatePresets:[] };

  // harmless favicon fallback if head link missing
  try{
    if (!document.querySelector('link[rel="icon"]')){
      const link = document.createElement('link');
      link.rel = 'icon';
      link.href = 'data:,';
      document.head.appendChild(link);
    }
  }catch(_){}
})();
