High-Net-Worth (HNW) Asset Protection Model

High-Net-Worth (HNW) Asset Protection Model

Strategically structure and shield your wealth from potential risks and liabilities.

Step 1: Inventory of Assets

Total Asset Value: $0.00

No specific threats were selected.

`; } }; // --- RENDER FUNCTIONS --- const renderAssets = () => { const container = document.getElementById('asset-list'); container.innerHTML = modelData.assets.map(asset => `
`).join(''); updateTotalAssetValue(); }; const renderThreats = () => { const container = document.getElementById('threat-list'); container.innerHTML = modelData.threats.map(threat => ` `).join(''); }; const renderStrategies = () => { const container = document.getElementById('strategy-list'); container.innerHTML = modelData.strategies.map(strategy => { const assignedValue = strategy.assetIds.reduce((sum, id) => { const asset = modelData.assets.find(a => a.id === id); return sum + (asset ? asset.value : 0); }, 0); return `

${strategy.type}

Protected Value: ${formatCurrency(assignedValue)}
Assets Assigned: ${strategy.assetIds.length}
` }).join(''); }; // --- PDF DOWNLOAD --- window.downloadPDF = async () => { const pdfButton = document.getElementById('pdf-button-container').querySelector('button'); const btnText = document.getElementById('pdf-btn-text'); const spinner = document.getElementById('pdf-spinner'); btnText.style.display = 'none'; spinner.style.display = 'inline-block'; pdfButton.disabled = true; const { jsPDF } = window.jspdf; const content = document.getElementById('summary-content'); // Temporarily activate icons for render feather.replace(); try { const canvas = await html2canvas(content, { scale: 2, useCORS: true }); const imgData = canvas.toDataURL('image/png'); const pdf = new jsPDF({ orientation: 'p', unit: 'mm', format: 'a4' }); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = pdf.internal.pageSize.getHeight(); const canvasWidth = canvas.width; const canvasHeight = canvas.height; const ratio = canvasWidth / canvasHeight; let imgWidth = pdfWidth - 20; let imgHeight = imgWidth / ratio; if (imgHeight > pdfHeight - 20) { imgHeight = pdfHeight - 20; imgWidth = imgHeight * ratio; } const x = (pdfWidth - imgWidth) / 2; const y = 10; pdf.addImage(imgData, 'PNG', x, y, imgWidth, imgHeight); pdf.save(`HNW_Asset_Protection_Model_${new Date().toISOString().slice(0, 10)}.pdf`); } catch(e) { console.error("PDF generation failed", e); } finally { btnText.style.display = 'inline-block'; spinner.style.display = 'none'; pdfButton.disabled = false; } }; // --- INITIALIZATION --- const init = () => { renderAssets(); renderThreats(); renderStrategies(); window.changeTab(0); feather.replace(); // Initial icon render // Modal event listeners document.getElementById('modal-cancel-btn').addEventListener('click', closeModal); document.getElementById('modal-save-btn').addEventListener('click', saveAssetAssignments); }; init(); });
Scroll to Top