Campus Advisory
Storm Updates

Official campus advisories and announcements for the NMC community. Check here for the latest updates as weather conditions develop.

Read Updates

smartslider3[151]

NMC Storm Updates — Super Typhoon Bavi

Northern Marianas College

Storm Updates

Official campus advisories and announcements for the NMC community. Check here for the latest updates as weather conditions develop.

Latest Advisories

Official advisories, press releases, and campus updates following Super Typhoon Bavi.

Student and Community Support

Support and assistance available to NMC students. Tap the card for contact details.

Resources & Downloads

Reference documents.

🚨
Emergency?
Call 911 for immediate emergencies. Crisis Hotline: 988
or call (670) 237-6728 or 6772.

' + '' }, { icon: '\uD83D\uDCC5', tag: 'Academics', blurb: 'Damage assessment underway. Summer and Fall 2026 updates coming through official channels.', title: 'Will the storm impact future semesters?', content: '

The College is assessing damage and planning for a safe return. Updates on Summer and Fall 2026 will be shared through official channels.

' }, /* ---------- PROGRAMS & STUDENT WORK ---------- */ { icon: '\uD83C\uDFE5', tag: 'Programs & Student Work', blurb: 'Postponed while community partners focus on their own recovery.', title: 'Practicum / Clinical / Internship', content: '

All practicum, clinical, and internship activities are currently postponed as community partners focus on recovery.

' }, { icon: '\uD83D\uDCBC', tag: 'Programs & Student Work', blurb: 'Campus access limited \u2014 expect updates from your supervisor once it is safe to return.', title: 'Student Employment', content: '

Campus access is limited. Student employees should expect updates from supervisors once it is safe to return.

' }, /* ---------- FINANCIAL & PAYMENTS ---------- */ { icon: '\uD83D\uDCB0', tag: 'Financial & Payments', blurb: 'Remaining PELL refunds expected within the next two weeks.', title: 'PELL Grant Distribution', content: '

Remaining refunds are expected within the next two weeks.

' + '

Reminder

' + '

Log in to Portal+, confirm your banking details, and ensure all required documents are submitted.

' }, { icon: '\uD83D\uDCB3', tag: 'Financial & Payments', blurb: 'Deadlines will be adjusted \u2014 watch for updates once campus access resumes.', title: 'Tuition & Fees', content: '

Deadlines will be adjusted. Watch for updates once campus access resumes.

' }, /* ---------- STUDENT STATUS & SUPPORT ---------- */ { icon: '\uD83C\uDF0D', tag: 'Student Status & Support', blurb: 'Student visas are not affected. Updates will be communicated if anything changes.', title: 'International Students (Visa Status)', content: '

Student visas are not affected at this time. Updates will be communicated if anything changes.

' + '

For questions or updates, contact Mr. Fermin Dela Cruz, International Student Coordinator at This email address is being protected from spambots. You need JavaScript enabled to view it..

' }, { icon: '\uD83C\uDFEB', tag: 'Student Status & Support', blurb: 'All campuses are currently closed due to safety concerns.', title: 'Campus Resources (Proa Pantry, etc.)', content: '

All campuses are currently closed due to safety concerns.

' } ]; var faqScroller = ROOT.querySelector('#nmc-adv-faq-scroller'); var faqOverlay = ROOT.querySelector('#nmc-adv-faq-modal-overlay'); var faqModalTag = ROOT.querySelector('#nmc-adv-faq-modal-tag'); var faqModalTitle = ROOT.querySelector('#nmc-adv-faq-modal-title'); var faqModalBody = ROOT.querySelector('#nmc-adv-faq-modal-body'); var faqModalClose = ROOT.querySelector('#nmc-adv-faq-modal-close'); var faqPrevBtns = ROOT.querySelectorAll('.nmc-adv-faq-prev'); var faqNextBtns = ROOT.querySelectorAll('.nmc-adv-faq-next'); if (faqScroller) { var faqHtml = ''; for (var fi = 0; fi ' + '
' + escHtml(f.tag || '') + '
' + '
' + escHtml(f.title) + '
' + '
' + escHtml(f.blurb || '') + '
' + '' + ''; } faqScroller.innerHTML = faqHtml; // Open modal on card click faqScroller.addEventListener('click', function (e) { var card = e.target.closest('.nmc-adv-faq-card'); if (!card) return; var idx = parseInt(card.getAttribute('data-idx'), 10); var data = ACCORDION_DATA[idx]; if (!data) return; faqModalTag.textContent = data.tag || ''; faqModalTitle.textContent = data.title; faqModalBody.innerHTML = data.content; faqOverlay.classList.add('is-open'); faqOverlay.setAttribute('aria-hidden', 'false'); document.body.classList.add('nmc-adv-faq-modal-open'); }); function closeFaqModal() { faqOverlay.classList.remove('is-open'); faqOverlay.setAttribute('aria-hidden', 'true'); document.body.classList.remove('nmc-adv-faq-modal-open'); } if (faqModalClose) faqModalClose.addEventListener('click', closeFaqModal); if (faqOverlay) faqOverlay.addEventListener('click', function (e) { if (e.target === faqOverlay) closeFaqModal(); }); document.addEventListener('keydown', function (e) { if (e.key === 'Escape' && faqOverlay.classList.contains('is-open')) closeFaqModal(); }); // Scroll nav function faqScrollByCards(dir) { var card = faqScroller.querySelector('.nmc-adv-faq-card'); if (!card) return; var step = card.offsetWidth + 16; faqScroller.scrollBy({ left: step * dir, behavior: 'smooth' }); } for (var fpi = 0; fpi = max; for (var fpj = 0; fpj Northern Marianas College has set up a Student Hotline to support you. If you need help, have questions, or just need to talk through next steps, reach out.

' + '' + '
' + '' + 'Hours: Monday to Friday, 8AM – 5PM' + '
' + '

You can also message us on WhatsApp if calling is not possible.

' + '
' + '' + 'Special thanks to @itecnmi for helping make this support line possible.' + '
' }, { tag: 'Safety & Wellness', title: 'Be Prepared: Storm Safety and Mental Wellness Information', blurb: 'A quick guide to physical preparedness and managing storm-related stress, plus who to contact for help.', content: '

Your safety and well-being matter to us. As we monitor Super Typhoon Bavi, our priority is your safety, security, and peace of mind — and it is completely normal to feel some anxiety as a storm approaches.

' + '

Before the storm

' + '
    ' + '
  • Monitor official weather updates and emergency alerts.
  • ' + '
  • Secure outdoor items and make sure windows and doors are tightly closed.
  • ' + '
  • Prepare an emergency kit: water, non-perishable food, flashlights, batteries, medications, first aid.
  • ' + '
  • Charge phones and backup power banks.
  • ' + '
  • Know your evacuation plan and nearest safe shelter.
  • ' + '
' + '

During the storm

' + '
    ' + '
  • Stay indoors in a secure location; avoid going outside.
  • ' + '
  • Stay away from windows and glass doors — move to interior rooms or hallways.
  • ' + '
  • Unplug sensitive electronics to protect against power surges.
  • ' + '
  • Never walk or drive through flooded areas.
  • ' + '
  • Follow instructions from emergency management authorities.
  • ' + '
' + '

After the storm

' + '
    ' + '
  • Wait for official clearance before leaving shelter.
  • ' + '
  • Watch for hazards like downed power lines, debris, and unstable structures.
  • ' + '
  • Report damage or safety concerns to authorities or campus personnel.
  • ' + '
  • Check on others who may need help, if it is safe to do so.
  • ' + '
' + '

Managing stress and anxiety

' + '
    ' + '
  • Limit doomscrolling — set specific times to check official updates, then step away.
  • ' + '
  • Focus on what you can control — packing your kit or securing items gives your mind a task.
  • ' + '
  • Stay connected — talk to family or friends instead of isolating.
  • ' + '
  • Try grounding techniques — 4-7-8 breathing (inhale 4, hold 7, exhale 8), or the 5-4-3-2-1 method: name 5 things you see, 4 you feel, 3 you hear, 2 you smell, 1 you taste.
  • ' + '
  • Be gentle with yourself — it is okay to feel scared or distracted.
  • ' + '
' + '

NMC is closely monitoring the storm and will communicate any changes to class schedules, closures, or assignment extensions through official NMC email and platforms. No student will be penalized for prioritizing safety — watch your email and NMC Moodle for updates on summer courses.

' + '

Student hotline

' + '' + '

Storm updates are also posted on this page and the NMC WhatsApp Channel.

' + '

Primary emergency services

' + '' + '

Fire & Emergency Medical Services (DFEMS)

' + '' } ]; var ssScroller = ROOT.querySelector('#nmc-adv-ss-scroller'); var ssOverlay = ROOT.querySelector('#nmc-adv-ss-modal-overlay'); var ssModalTag = ROOT.querySelector('#nmc-adv-ss-modal-tag'); var ssModalTitle = ROOT.querySelector('#nmc-adv-ss-modal-title'); var ssModalBody = ROOT.querySelector('#nmc-adv-ss-modal-body'); var ssModalClose = ROOT.querySelector('#nmc-adv-ss-modal-close'); var ssPrevBtns = ROOT.querySelectorAll('.nmc-adv-ss-prev'); var ssNextBtns = ROOT.querySelectorAll('.nmc-adv-ss-next'); if (ssScroller) { var ssHtml = ''; for (var si = 0; si ' + '
' + escHtml(sc.tag || '') + '
' + '
' + escHtml(sc.title) + '
' + '
' + escHtml(sc.blurb || '') + '
' + '' + ''; } ssScroller.innerHTML = ssHtml; ssScroller.addEventListener('click', function (e) { var card = e.target.closest('.nmc-adv-ss-card'); if (!card) return; var idx = parseInt(card.getAttribute('data-idx'), 10); var data = SUPPORT_DATA[idx]; if (!data) return; ssModalTag.textContent = data.tag || ''; ssModalTitle.textContent = data.title; ssModalBody.innerHTML = data.content; ssOverlay.classList.add('is-open'); ssOverlay.setAttribute('aria-hidden', 'false'); document.body.classList.add('nmc-adv-ss-modal-open'); }); function closeSsModal() { ssOverlay.classList.remove('is-open'); ssOverlay.setAttribute('aria-hidden', 'true'); document.body.classList.remove('nmc-adv-ss-modal-open'); } if (ssModalClose) ssModalClose.addEventListener('click', closeSsModal); if (ssOverlay) ssOverlay.addEventListener('click', function (e) { if (e.target === ssOverlay) closeSsModal(); }); document.addEventListener('keydown', function (e) { if (e.key === 'Escape' && ssOverlay.classList.contains('is-open')) closeSsModal(); }); function ssScrollByCards(dir) { var card = ssScroller.querySelector('.nmc-adv-ss-card'); if (!card) return; var step = card.offsetWidth + 16; ssScroller.scrollBy({ left: step * dir, behavior: 'smooth' }); } for (var spi = 0; spi = max; for (var spj = 0; spj Fall 2026 Registration Continues; Classes Begin September 8, 2026

' + '

Northern Marianas College (NMC) will resume Summer Semester classes on Monday, July 13, 2026. NMC’s Saipan and Tinian Campuses will also reopen that day. The Rota Campus will remain closed until further notice as recovery efforts continue.

' + '

The Fall 2026 Semester will also proceed as planned. Registration remains open, and classes will begin on September 8, 2026.

' + '

Please continue to monitor your NMC email and other official NMC communication channels for updates and announcements:

' + '
    ' + '
  • NMC Employee and Student Email (my.marianas.edu)
  • ' + '
  • NMC Portal+ (portal.marianas.edu)
  • ' + '
  • NMC Website (marianas.edu) — this site redirects you to a temporary landing page while NMC website servers are turned off to prevent power fluctuation damage
  • ' + '
  • NMC Social Media Pages (Facebook and Instagram: @nmc.proa)
  • ' + '
  • NMC WhatsApp Channel (whatsapp.marianas.edu)
  • ' + '
  • News outlets, including local radio stations
  • ' + '
' + '

Students can also contact student hotlines for questions related to their classes or student services.

' + '' }, { category: 'advisory', date: '2026-07-08', title: 'All Clear Declared — Recovery Update and Campus Reopening Guidance', blurb: 'The "All Clear" has been declared. Campus assessments are underway — do not return until an official notice is issued. Student hotlines are active for support.', content: '

Dear NMC Students and Employees:

' + '

We hope that you are safe from the destructive winds and rain of Super Typhoon Bavi. The impact from the typhoon is profound across the Commonwealth, especially on Rota.

' + '

Student and Employee Support

' + '

Your well-being will continue to be prioritized over the next several days as our College’s recovery from this latest storm begins. We are standing up student and employee support teams that aim to help you address critical needs and connect you with resource agencies based here in the CNMI or with organizations that are on their way here.

' + '

NMC’s Student Hotlines have been activated to assist students with questions or concerns related to College operations.

' + '' + '

When Will Campuses Reopen?

' + '

Now that the “All Clear” Declaration has been made, our facilities and safety teams will be conducting campus assessments, clearing typhoon debris and other work to ensure the safety of our campus before students and employees return. Stay home and stay safe and do not return to campus until the official notice communicating that it is safe to return has been issued.

' + '

Employees will receive a separate email containing additional information specific to their sections. Supervisors and other employees may be called earlier to assist with assessment and clean up activities.

' + '

Class Schedules and Academic Calendar

' + '

While assessments are being conducted, we will also share announcements with more specific information about adjustments to Summer semester classes, instructional modalities, and revised schedules. Please monitor email for these updates.

' + '

As we’ve indicated, our islands have faced super typhoons before, but that does not make each new storm any easier. While the trauma and impact of past storms remain part of our collective experience, so does our ability to rebuild stronger, together.

' + '

Please continue to prioritize your health, well-being, and safety, and continue to monitor your NMC email and other official NMC communication channels for updates and announcements.

' + '

Thank you and stay safe.

' }, { category: 'advisory', date: '2026-07-06', title: 'Prioritize Safety & Well-being', blurb: 'Final precautions as Super Typhoon Bavi approaches — securing documents, medication, and supplies, plus mental health resources and where to get official updates.', content: '

Good Morning Students & Employees:

' + '

Attached is the latest weather update from the National Weather Service (NWS). As Super Typhoon Bavi approaches the CNMI and we begin to feel typhoon-strength winds later today, please be sure you’re taking any final necessary precautions to prepare for a powerful storm.

' + '' + '

If you are living in physically vulnerable structures, please seek shelter in designated facilities. Additionally, be sure to:

' + '
    ' + '
  • Secure important documents such as passports, birth certificates, tax papers, and insurance documents, and keep copies in a weather-proof bag.
  • ' + '
  • Secure an adequate supply of prescription medication.
  • ' + '
  • If able to, secure adequate fuel for your vehicles (please note that some gas stations have already been closed or will be closing soon). If you are using a generator to power your home or parts of it, use it outside, not indoors, to avoid carbon monoxide poisoning.
  • ' + '
  • Have an emergency preparedness kit with first-aid supplies, batteries, flashlights, candles, toiletries, and a portable stove in your household.
  • ' + '
  • Stock up on food and water for your household, as appropriate.
  • ' + '
  • Document any property damage with photographs — before and after the storm — for potential federal assistance.
  • ' + '
' + '

Mental Health

' + '

We also understand that Super Typhoon Bavi may trigger emotions, anxiety, and stress associated with the recent Super Typhoon Sinlaku and other past storms or disasters. Please be sure you’re seeking mental health assistance and accessing available, professional resources and talking with trusted individuals as often as you need. If you’re able to, please also check in with your friends, fellow students, fellow employees, and family members throughout the storm and after it passes.

' + '

Stay Informed

' + '

Track news and latest updates from the National Weather Service, the Office of Homeland Security and Emergency Management, and other official sources. We will also be posting NMC updates on official channels. Additionally, we will share class schedule updates and other academic information after post-storm assessments have been made. The College also anticipates activating NMC telephone hotline numbers that you can call for information; the NMC hotline number will be shared separately.

' + '

NMC Sources

' + '
    ' + '
  • NMC Employee and Student Email (my.marianas.edu)
  • ' + '
  • NMC Portal+ (portal.marianas.edu)
  • ' + '
  • NMC Website (marianas.edu) — this site redirects you to a temporary landing page while NMC website servers are turned off to prevent power fluctuation damage
  • ' + '
  • NMC Social Media Pages (Facebook and Instagram: @nmc.proa)
  • ' + '
  • NMC WhatsApp Channel (whatsapp.marianas.edu)
  • ' + '
  • News outlets, including local radio stations
  • ' + '
' + '

CNMI and Federal Resources

' + '
    ' + '
  • CNMI EOC State Warning Point (Facebook)
  • ' + '
  • CNMI Office of the Governor (Website)
  • ' + '
  • CNMI Office of the Governor (Facebook)
  • ' + '
  • U.S. National Weather Service — Guam (Website)
  • ' + '
  • U.S. National Weather Service — Guam (Facebook)
  • ' + '
  • Joint Typhoon Warning Center (Website)
  • ' + '
' + '

Again, for the remainder of today and throughout the storm, prioritize your health, your well-being, and your safety. We’ve weathered Sinlaku together and we will get through Bavi together as well; our community has demonstrated many times how resilient we can be when we are here for one another.

' + '

Please stay safe and stay connected,

' }, { category: 'cancellation', date: '2026-07-03', title: 'NMC Classes Canceled Beginning Monday, July 6 — Until Further Notice', blurb: 'In anticipation of the threat from Super Typhoon Bavi, classes and offices are closed starting Monday, July 6, 2026. Closure remains in effect pending assessment of weather and safety conditions.', content: '

In anticipation of Super Typhoon Bavi Threat

' + '

Closure will remain in effect pending further assessment of weather and safety conditions.

' + '

NMC Students and Employees:

' + '

In anticipation of the threat from Super Typhoon Bavi and the potential for hazardous weather conditions, Northern Marianas College (NMC) classes scheduled for Monday, July 6, 2026, have been cancelled. This cancellation will remain in effect until further notice as dangerous weather conditions and recovery operations will likely extend for several days. All College offices will also be closed during this period.

' + '

The College will continue to monitor the storm and assess campus conditions after it has passed. Announcements regarding the resumption of classes and campus operations will be communicated through official NMC channels:

' + '' + '

Students and employees should take all precautions necessary to prepare for damaging winds (potentially typhoon or super typhoon strength), heavy rains, flooding, and other storm impacts.

' + '

It is also important to note that during emergency situations, there may be inaccurate or disinformation shared with the community. To prevent misinformation from being distributed, be sure to access information only from official sources, including:

' + '
    ' + '
  • CNMI EOC State Warning Point (Facebook)
  • ' + '
  • CNMI Office of the Governor (Website)
  • ' + '
  • CNMI Office of the Governor (Facebook)
  • ' + '
  • U.S. National Weather Service — Guam (Website)
  • ' + '
  • U.S. National Weather Service — Guam (Facebook)
  • ' + '
  • Joint Typhoon Warning Center (Website)
  • ' + '
' }, { category: 'advisory', date: '2026-07-02', title: 'NMC Website Notice: Main Site Offline, Follow This Page for Updates', blurb: 'The College has powered down its website server to prevent damage from power fluctuations. Follow this temporary site and official channels for updates.', content: '

NMC Students and Employees,

' + '

To prevent any damage from power fluctuations, the College has powered down its website server; access to website content will not be available during this time. The College is posting updates, news, and announcements to a temporary site (marianas.edu/stormupdates) to share information that will impact normal operations.

' + '

Monitor official NMC communication channels for the latest updates:

' + '' + '

The official NMC website will be restored once conditions improve and all systems are fully operational.

' + '

Thank you, and stay safe.

' }, { category: 'advisory', date: '2026-07-01', image: 'https://d1xsi6mgo67kia.cloudfront.net/uploads/2021/10/whatsapp.png', title: 'Join NMC’s Official WhatsApp Channel for Storm Updates', blurb: 'As NMC monitors Super Typhoon Bavi, join the official WhatsApp Channel to receive timely campus advisories and announcements.', content: '

Dear NMC Community,

' + '

As Northern Marianas College continues to monitor Super Typhoon Bavi, we encourage all students and employees to join the College’s official WhatsApp Channel to receive timely updates and important announcements.

' + '

As weather conditions change, the WhatsApp Channel will be used, along with other NMC official platforms, to share campus advisories, class and office updates, and other important information as it becomes available.

' + '

Join the channel here:

' + '

whatsapp.marianas.edu

' + '

To receive alerts, be sure to turn on notifications:

' + '
    ' + '
  • Open WhatsApp and tap Updates
  • ' + '
  • Find the Northern Marianas College channel
  • ' + '
  • Tap the notification bell to enable notifications
  • ' + '
' + '

The WhatsApp Channel serves as an additional communication line alongside employee and student email, Portal+, the NMC website, and the College’s official social media pages to help ensure you receive important information when it is needed.

' + '

Thank you for staying informed and staying connected with NMC.

' } ]; (function () { var section = ROOT.querySelector('#nmc-adv-la-section'); if (!section) return; var filtersEl = ROOT.querySelector('#nmc-adv-la-filters'); var featuredEl = ROOT.querySelector('#nmc-adv-la-featured'); var feedEl = ROOT.querySelector('#nmc-adv-la-feed'); var emptyEl = ROOT.querySelector('#nmc-adv-la-empty'); var moreWrap = ROOT.querySelector('#nmc-adv-la-more-wrap'); var moreBtn = ROOT.querySelector('#nmc-adv-la-more'); var overlay = ROOT.querySelector('#nmc-adv-la-modal-overlay'); var modalTag = ROOT.querySelector('#nmc-adv-la-modal-tag'); var modalTitle = ROOT.querySelector('#nmc-adv-la-modal-title'); var modalBody = ROOT.querySelector('#nmc-adv-la-modal-body'); var modalClose = ROOT.querySelector('#nmc-adv-la-modal-close'); var CATS = { advisory: 'Advisory', weather: 'Weather', 'class': 'Class update', office: 'Office update', cancellation: 'Cancellation', general: 'General' }; function catKey(it){ var c = (it.category || 'general').toLowerCase(); return CATS.hasOwnProperty(c) ? c : 'general'; } function catLabel(it){ return CATS[catKey(it)]; } var PAGE = 6, currentFilter = 'all', shown = PAGE; for (var n = 0; n ' + label + ' '; } function featuredHtml(it){ var hasMedia = !!it.image; var mediaHtml = hasMedia ? '' : ''; return ''; } function cardHtml(it){ return ''; } function render(){ var list = filtered(); featuredEl.innerHTML = ''; feedEl.innerHTML = ''; if (!list.length){ emptyEl.hidden = false; moreWrap.hidden = true; return; } emptyEl.hidden = true; var lead = list[0]; var pinned = null; for (var p = 0; p '; for (var j = 0; j ' + escHtml(CATS[order[j]]) + ' ' + counts[order[j]] + ''; } filtersEl.innerHTML = html; } filtersEl.addEventListener('click', function(e){ var b = e.target.closest('.la-filter'); if (!b) return; currentFilter = b.getAttribute('data-filter'); shown = PAGE; var btns = filtersEl.querySelectorAll('.la-filter'); for (var i = 0; i /g, '>').replace(/"/g, '"'); } var _stripDiv = document.createElement('div'); function stripHtml(s) { _stripDiv.innerHTML = s || ''; return _stripDiv.textContent || _stripDiv.innerText || ''; } function unwrapMarksWithin(container) { if (!container) return; var marks = container.querySelectorAll('mark.' + MARK_CLASS); for (var i = 0; i lastIdx) { frag.appendChild(document.createTextNode(text.slice(lastIdx, match.index))); } var mk = document.createElement('mark'); mk.className = MARK_CLASS; mk.textContent = match[0]; frag.appendChild(mk); if (collectedMarks) collectedMarks.push(mk); lastIdx = match.index + match[0].length; count++; if (match[0].length === 0) re.lastIndex++; } if (lastIdx 42) out += '…'; out += escHtmlLocal(before.replace(/\s+/g, ' ')); out += '' + escHtmlLocal(matched) + ''; out += escHtmlLocal(after.replace(/\s+/g, ' ')); if (idx + matchLen + 60 ' + '
' + '' + escHtmlLocal(r.label) + '' + '' + kindLabel + '' + '
' + '
' + r.snippet + '
' + ''; } if (resultsList.length > MAX_RESULTS) { html += ''; } searchResults.innerHTML = html; searchWrap.classList.add('has-results'); } function setCurrentMark(el) { var prev = ROOT.querySelectorAll('mark.' + MARK_CLASS + '.is-current'); for (var i = 0; i = 0) { snippetHtml = snippetAroundIndex(rawText, bodyIdx, currentTerm.length); } else { var titleIdx = (item.title || '').toLowerCase().indexOf(termLower); if (titleIdx >= 0) { snippetHtml = snippetAroundIndex(item.title, titleIdx, currentTerm.length); } else { var blurbIdx = (item.blurb || '').toLowerCase().indexOf(termLower); snippetHtml = blurbIdx >= 0 ? snippetAroundIndex(item.blurb, blurbIdx, currentTerm.length) : escHtmlLocal((item.blurb || item.title || '').slice(0, 90)); } } resultsList.push({ type: 'card', collectionKey: col.key, cardIdx: k, label: item.title + ' · ' + col.label, snippet: snippetHtml }); } } // 3) If a modal is currently open, highlight its body too var faqOverlay = ROOT.querySelector('#nmc-adv-faq-modal-overlay'); var ssOverlay = ROOT.querySelector('#nmc-adv-ss-modal-overlay'); if (faqOverlay && faqOverlay.classList.contains('is-open')) { highlightInTree(ROOT.querySelector('#nmc-adv-faq-modal-body'), currentTerm); } if (ssOverlay && ssOverlay.classList.contains('is-open')) { highlightInTree(ROOT.querySelector('#nmc-adv-ss-modal-body'), currentTerm); } var laOverlaySearch = ROOT.querySelector('#nmc-adv-la-modal-overlay'); if (laOverlaySearch && laOverlaySearch.classList.contains('is-open')) { highlightInTree(ROOT.querySelector('#nmc-adv-la-modal-body'), currentTerm); } // Render results list + counter renderResults(); var parts = []; if (domMarks.length) parts.push(domMarks.length + (domMarks.length === 1 ? ' match' : ' matches') + ' on the page'); if (cardMatchCount) parts.push(cardMatchCount + ' card' + (cardMatchCount === 1 ? '' : 's') + ' with matching content'); searchMeta.textContent = parts.length ? parts.join(' · ') + ' — click a result to jump' : 'No matches found'; } // Debounced input var debounceTimer = null; searchInput.addEventListener('input', function () { if (debounceTimer) clearTimeout(debounceTimer); var val = searchInput.value; debounceTimer = setTimeout(function () { doSearch(val); }, 140); }); // Clear searchClear.addEventListener('click', function () { searchInput.value = ''; doSearch(''); searchInput.focus(); }); // Escape clears searchInput.addEventListener('keydown', function (e) { if (e.key === 'Escape') { if (searchInput.value) { searchInput.value = ''; doSearch(''); } else { searchInput.blur(); } } }); // Results list clicks → jump to match searchResults.addEventListener('click', function (e) { var btn = e.target.closest('.search-result'); if (!btn) return; var idx = parseInt(btn.getAttribute('data-result-idx'), 10); var r = resultsList[idx]; if (!r) return; if (r.type === 'dom') { scrollToDomMark(r.markEl); } else if (r.type === 'card') { openCardAndHighlight(r.collectionKey, r.cardIdx); } }); // If the user opens a card manually while a search is active, // also apply highlights to its modal body. function wireModalHighlightOnManualOpen(scrollerSel, cardSel, bodySel) { var scroller = ROOT.querySelector(scrollerSel); if (!scroller) return; scroller.addEventListener('click', function (e) { if (!e.target.closest(cardSel)) return; setTimeout(function () { if (currentTerm && currentTerm.length >= 2) { var body = ROOT.querySelector(bodySel); if (body) { unwrapMarksWithin(body); highlightInTree(body, currentTerm); } } }, 0); }); } wireModalHighlightOnManualOpen('#nmc-adv-faq-scroller', '.nmc-adv-faq-card', '#nmc-adv-faq-modal-body'); wireModalHighlightOnManualOpen('#nmc-adv-ss-scroller', '.nmc-adv-ss-card', '#nmc-adv-ss-modal-body'); wireModalHighlightOnManualOpen('#nmc-adv-la-section', '.nmc-adv-la-card', '#nmc-adv-la-modal-body'); })(); /* ------------------------------------------------------- ADVISORIES TABS + PAGINATION (Pagination auto-activates per tab when > PAGE_SIZE items) ------------------------------------------------------- */ (function initAdvisoryTabsAndPagination() { var PAGE_SIZE = 5; // --- Tab switching --- var tabButtons = ROOT.querySelectorAll('.adv-tabs .adv-tab'); var tabPanels = ROOT.querySelectorAll('.adv-tab-panel'); for (var t = 0; t .adv-list-item'); if (items.length <= PAGE_SIZE) return; var totalPages = Math.ceil(items.length / PAGE_SIZE); var currentPage = 1; var nav = document.createElement('div'); nav.className = 'adv-pagination'; nav.innerHTML = '' + '
' + ''; listEl.parentNode.insertBefore(nav, listEl.nextSibling); var prevBtn = nav.querySelector('.adv-page-prev'); var nextBtn = nav.querySelector('.adv-page-next'); var numbersEl = nav.querySelector('.adv-page-numbers'); function render() { for (var i = 0; i ' + p + ''; } numbersEl.innerHTML = numHtml; prevBtn.disabled = (currentPage === 1); nextBtn.disabled = (currentPage === totalPages); } prevBtn.addEventListener('click', function () { if (currentPage > 1) { currentPage--; render(); } }); nextBtn.addEventListener('click', function () { if (currentPage