1(function () { 2 const pageUrl = { 3 perpetual: '/plan-and-pricing/individual/perpetual', 4 subscription: '/plan-and-pricing/individual/subscription' 5 }; 6 7 const redirectRules = [ 8 // store 9 { path: /^\/store\/?$/, url: pageUrl.subscription }, 10 11 // product.html + p=3d + hash 12 // bundle&product 13 { 14 path: /^product\.html$/, 15 query: { p: '3d' }, 16 hash: /^#3011/, 17 url: `${pageUrl.perpetual}/character-creator-5-3033` 18 }, 19 { 20 path: /^product\.html$/, 21 query: { p: '3d' }, 22 hash: /^#3012/, 23 url: `${pageUrl.perpetual}/iclone-8-3040` 24 }, 25 { 26 path: /^product\.html$/, 27 query: { p: 'cta' }, 28 hash: /^#cta-basic/, 29 url: `${pageUrl.perpetual}/cartoon-animator-5-3024` 30 }, 31 // plugins 32 { 33 path: /^product\.html$/, 34 query: { p: '3d' }, 35 hash: /^#cc-addon-actormixer-pro/, 36 url: `${pageUrl.perpetual}/actormixer-pro-plugin-for-character-creator-5-3034` 37 }, 38 { 39 path: /^product\.html$/, 40 query: { p: '3d' }, 41 hash: /^#cc-addon-headshot/, 42 url: `${pageUrl.perpetual}/headshot-2-plugin-3035` 43 }, 44 { 45 path: /^product\.html$/, 46 query: { p: '3d' }, 47 hash: /^#cc-addon-skingen/, 48 url: `${pageUrl.perpetual}/skingen-premium-plugin-3036` 49 }, 50 { 51 path: /^product\.html$/, 52 query: { p: '3d' }, 53 hash: /^#cc-addon-facetools-indie/, 54 url: `${pageUrl.perpetual}?product=cc#plugins` 55 }, 56 { 57 path: /^product\.html$/, 58 query: { p: '3d' }, 59 hash: /^#timecode/, 60 url: `${pageUrl.perpetual}?product=ic#plugins` 61 }, 62 { 63 path: /^product\.html$/, 64 query: { p: '3d' }, 65 hash: /^#building-gen/, 66 url: `${pageUrl.perpetual}/buildinggen-plugin-3043` 67 }, 68 { 69 path: /^product\.html$/, 70 query: { p: '3d' }, 71 hash: /^#ic8-addon-ue-livelink/, 72 url: `${pageUrl.perpetual}/unreal-livelink-3048` 73 }, 74 { 75 path: /^product\.html$/, 76 query: { p: '3d' }, 77 hash: /^#ic8-addon-accuface/, 78 url: `${pageUrl.perpetual}/accuface-profile-for-motion-live-plugin-3046` 79 }, 80 { 81 path: /^product\.html$/, 82 query: { p: '3d' }, 83 hash: /^#ic8-addon-iphone-live-face/, 84 url: `${pageUrl.perpetual}/iphone-live-face-3047` 85 }, 86 { 87 path: /^product\.html$/, 88 query: { p: '3d' }, 89 hash: /^#pn/, 90 url: `${pageUrl.perpetual}/perception-neuron-3049` 91 }, 92 { 93 path: /^product\.html$/, 94 query: { p: '3d' }, 95 hash: /^#rokoko/, 96 url: `${pageUrl.perpetual}/rokoko-full-body-profile-hand-mocap-profile-included-3050` 97 }, 98 { 99 path: /^product\.html$/, 100 query: { p: '3d' }, 101 hash: /^#xsens/, 102 url: `${pageUrl.perpetual}/xsens-3052` 103 }, 104 { 105 path: /^product\.html$/, 106 query: { p: '3d' }, 107 hash: /^#optitrack/, 108 url: `${pageUrl.perpetual}/optitrack-3053` 109 }, 110 { 111 path: /^product\.html$/, 112 query: { p: '3d' }, 113 hash: /^#vicon/, 114 url: `${pageUrl.perpetual}/vicon-3054` 115 }, 116 { 117 path: /^product\.html$/, 118 query: { p: 'cta' }, 119 hash: /^#face-prof-3d/, 120 url: `${pageUrl.perpetual}/webcam-profile-for-cartoon-animator-5-3057` 121 }, 122 { 123 path: /^product\.html$/, 124 query: { p: 'cta' }, 125 hash: /^#iphone-live-face-profile/, 126 url: `${pageUrl.perpetual}/iphone-live-face-3058` 127 }, 128 { 129 path: /^product\.html$/, 130 query: { p: 'cta' }, 131 hash: /^#rokoko-profile/, 132 url: `${pageUrl.perpetual}/rokoko-profile-full-body-3060` 133 }, 134 { 135 path: /^product\.html$/, 136 query: { p: 'cta' }, 137 hash: /^#pn-profile/, 138 url: `${pageUrl.perpetual}/perception-neuron-3062` 139 }, 140 { 141 path: /^product\.html$/, 142 query: { p: 'cta' }, 143 hash: /^#2d-leap-motion/, 144 url: `${pageUrl.perpetual}/leap-motion-profile-for-cartoon-animator-5-3063` 145 }, 146 { 147 path: /^product\.html$/, 148 query: { p: '3d' }, 149 hash: /^#cc-addon-skingen/, 150 url: `${pageUrl.perpetual}/skingen-premium-plugin-4-in-1-bundle-3087` 151 }, 152 153 // product.html + p=cta 154 { 155 path: /^product\.html$/, 156 query: { p: 'cta' }, 157 url: pageUrl.subscription 158 }, 159 160 // product.html + p=3d 161 { 162 path: /^product\.html$/, 163 query: { p: '3d' }, 164 url: pageUrl.subscription 165 }, 166 167 // others 168 { path: /^default\.html$/, url: pageUrl.subscription }, 169 { path: /^volume\.html$/, url: `${pageUrl.perpetual}#ap-perpetual_volume-purchase` } 170 ]; 171 172 function handleRedirect() { 173 const pathname = window.location.pathname; 174 const currentPage = pathname.split('/').pop() || ''; 175 const hash = window.location.hash; 176 const params = new URLSearchParams(window.location.search); 177 178 let anyRuleMatched = false; 179 180 for (const rule of redirectRules) { 181 const ruleMatchesPath = 182 rule.path instanceof RegExp 183 ? rule.path.test(pathname) || rule.path.test(currentPage) 184 : rule.path === pathname || rule.path === currentPage; 185 186 if (!ruleMatchesPath) continue; 187 188 if (rule.query) { 189 let queryMatches = true; 190 for (const key in rule.query) { 191 if (params.get(key) !== rule.query[key]) { 192 queryMatches = false; 193 break; 194 } 195 } 196 if (!queryMatches) continue; 197 } 198 199 if (rule.hash && !rule.hash.test(hash)) { 200 continue; 201 } 202 203 anyRuleMatched = true; 204 window.location.replace(rule.url); 205 return; 206 } 207 208 if (!anyRuleMatched) { 209 window.location.replace(pageUrl.subscription); 210 } 211 } 212 213 const params = new URLSearchParams(window.location.search); 214 const langId = params.get('l'); 215 216 if (langId === '1') { 217 handleRedirect(); 218 } else if (langId === '2') { 219 window.handleStoreRedirect = handleRedirect; 220 } else { 221 handleRedirect(); 222 } 223})();
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.