PageSourceSearch

https://www.unsw.edu.au/etc.clientlibs/unsw-common/clientlibs/clie…/cmp-embed-5bb4264b0c843d182bcf.js

js unsw.edu.au collected 2026-10-01 07:19:44 UTC 3,169 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkunsw_common_ui_frontend=self.webpackChunkunsw_common_ui_frontend||[]).push([[169],{7452:(function(g,a,n){var l=n(2138);const o=class r extends l.A{constructor(e){super(),this.defaultIframeTitles={mazemap:"Interactive map",youtube:"YouTube video",vimeo:"Vimeo video",soundcloud:"SoundCloud audio"},this.$el=e,this.init(),this.onAemUpdate=()=>this.init()}getDefaultTitle(e){const i=(e.getAttribute("src")||e.getAttribute("data-src")||"").toLowerCase();for(const t in this.defaultIframeTitles)if(i.includes(t))return this.defaultIframeTitles[t];return"External content"}injectTitle(e){const i=e.getAttribute("title");(!i||!i.trim())&&e.setAttribute("title",this.getDefaultTitle(e))}isAuthorMode(){var e;return((e=document.getElementById("wcmmode-id"))==null?void 0:e.dataset.mode)==="edit"}restoreIframeHeight(e){e.getAttribute("height")==="0"&&(e.dataset[r.originalHeightAttributeKey]==="true"?e.setAttribute("height",e.dataset[r.originalHeightKey]||""):e.removeAttribute("height"),e.style.height=e.dataset[r.originalInlineHeightKey]||"")}collapseIfEmpty(e){var i;if(!(!document.body.classList.contains("events-page")||this.isAuthorMode())&&(Object.prototype.hasOwnProperty.call(e.dataset,r.originalHeightKey)||(e.dataset[r.originalHeightKey]=e.getAttribute("height")||"",e.dataset[r.originalHeightAttributeKey]=e.hasAttribute("height")?"true":"false",e.dataset[r.originalInlineHeightKey]=e.style.height||""),!(!e.getAttribute("src")&&e.getAttribute("data-src"))))try{const t=e.contentDocument;if(!t){this.restoreIframeHeight(e);return}if(t.URL==="about:blank"||t.readyState!=="complete")return;if(t.head.children.length===0&&t.body.children.length===0&&!((i=t.body.textContent)!=null&&i.trim())){e.setAttribute("height","0"),e.style.height="0";return}this.restoreIframeHeight(e)}catch(t){this.restoreIframeHeight(e)}}processIframe(e){this.injectTitle(e),this.collapseIfEmpty(e),e.addEventListener("load",()=>this.collapseIfEmpty(e),{once:!0})}processNode(e){if(!(e instanceof HTMLElement))return;e instanceof HTMLIFrameElement&&this.processIframe(e),e.querySelectorAll("iframe").forEach(t=>{this.processIframe(t)})}init(){const e=this.$el.querySelector("iframe");e&&this.processIframe(e),new MutationObserver(t=>{t.forEach(s=>{s.addedNodes.forEach(d=>{this.processNode(d)})})}).observe(this.$el,{childList:!0,subtree:!0})}};o.originalHeightKey="originalHeight",o.originalHeightAttributeKey="originalHeightAttribute",o.originalInlineHeightKey="originalInlineHeight";let c=o;document.querySelectorAll('[data-cmp-is="cmp-embed"]').forEach(h=>{new c(h)})}),2138:(function(g,a,n){n.d(a,{A:function(){return l}});class l{constructor(){this.selector="",this.onAemUpdate=()=>{}}observe(){if(!this.selector)throw new Error("A selector needs to be assigned");const c=window.MutationObserver,u=document.querySelector("body");new c(e=>{e.forEach(i=>{const t=[].slice.call(i.addedNodes);t.length>0&&t.forEach(s=>{s instanceof Element&&s.matches(this.selector)&&this.onAemUpdate(s),s.querySelectorAll&&[].slice.call(s.querySelectorAll(this.selector)).forEach(b=>{this.onAemUpdate(b)})})})}).observe(u,{subtree:!0,childList:!0,characterData:!0})}}})}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.